//
//  OLDataProvider.h
//  iSales-NPD
//
//  Created by Ray on 2/2/16.
//  Copyright © 2016 United Software Applications, Inc. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface OLDataProvider : NSObject

//sales order
+(NSData*) offline_request_salesorder :(NSMutableDictionary *) params;

+(NSDictionary*) offline_category :(NSMutableDictionary *) params;
+(NSDictionary*) offline_search :(NSMutableDictionary *) params;
+(NSDictionary*) offline_itemsearch :(NSMutableDictionary *) params;

+(NSData*) offline_categoryaddall :(NSMutableDictionary *) params;
+(NSData*) offline_searchaddall :(NSMutableDictionary *) params;
+(NSData*) offline_itemsearchaddall :(NSMutableDictionary *) params;

+(NSDictionary*) offline_model :(NSMutableDictionary *) params;


/**
 *  @author Jack, 16-08-02 17:08:51
 *
 *  新建客户信息数据
 *
 *  @param params 指定需要哪些类型参数
 *
 *  @return 返回新建客户信息所需数据
 */
+(NSData *) offline_contactAdvancedSearch:(NSMutableDictionary *) params;
+(NSData *) offline_createContact:(NSMutableDictionary *) params;
+(NSData *) offline_editContact:(NSMutableDictionary *) params;
+(NSData *) offline_saveNewContact:(NSMutableDictionary *) params;
+(NSData *) offline_saveContact:(NSMutableDictionary *) params;
+(NSDictionary*) offline_contactlist :(NSMutableDictionary *) params;
+(NSDictionary*) offline_contactinfo :(NSMutableDictionary *) params;
+(NSData *) offline_saveBusinesscard:(NSData *) image;
+(NSData*) offline_saveaddr :(NSMutableDictionary *) params;


+(NSDictionary*) offline_commoneditor_partialrefresh :(NSMutableDictionary *) params;
+(NSDictionary*) offline_wishlist :(NSMutableDictionary *) params;
+(NSDictionary*) offline_add2wishlist :(NSMutableDictionary *) params;
+(NSDictionary*) offline_deletewishlist :(NSMutableDictionary *) params;


+(NSData*) offline_login :(NSMutableDictionary *) params;
+(NSDictionary*) offline_logout :(NSMutableDictionary *) params;


+(NSData*) offline_createorder :(NSMutableDictionary *) params;
+(NSData*) offline_orderlist :(NSMutableDictionary *) params;
+(NSData*) offline_orderdetail :(NSMutableDictionary *) params;
+(NSData*) offline_editorder :(NSMutableDictionary *) params;
+(NSData*) offline_cancelorder :(NSMutableDictionary *) params;
+(NSData*) offline_signorder :(NSMutableDictionary *) params;
+(NSData*) offline_saveorder :(NSMutableDictionary *) params;
+(NSData*) offline_resetorder :(NSMutableDictionary *) params;
+(NSData*) offline_copyorder :(NSMutableDictionary *) params;
+(NSData*) offline_submitorder :(NSMutableDictionary *) params;

+ (NSData*)offline_movewish2cart:(NSMutableDictionary *)params;
+(NSData*) offline_add2cart :(NSMutableDictionary *) params;
+(NSData*) offline_add2cartbyname :(NSMutableDictionary *) params;
+(NSData*) offline_requestcart :(NSMutableDictionary *) params;
+(NSData*) offline_updategnotes :(NSMutableDictionary *) params;
+(NSData*) offline_movecart2wish :(NSMutableDictionary *) params;
+(NSData*) offline_cartremove :(NSMutableDictionary *) params;
+(NSData*) offline_cartsetprice :(NSMutableDictionary *) params;
+(NSData*) offline_cartsetlnotes :(NSMutableDictionary *) params;
+(NSData*) offline_cartsetqty :(NSMutableDictionary *) params;
+(NSData*) offline_placeorder :(NSMutableDictionary *) params;
+(NSData*) offline_addreditor :(NSMutableDictionary *) params;


+(NSDictionary*) offline_category_menu ;
+(NSDictionary*) offline_home ;

+(NSDictionary*) offline_notimpl;


+(bool) check_offlinedata ;



// sync
+(NSArray*) enumOfflineOrder;
+(NSDictionary*) prepareUpload:(NSArray*) arr_order;
+(void) uploadFile:(NSString*) file;
//  category filter, contact advanced search, item search, search,wishlist,

//+(NSDictionary*) model_img :(int)product_id;
//+(NSDictionary*) model_property :(int)product_id field:(NSString*) value ;

#pragma mark - portfolio

+ (NSData *)offline_portfolioList:(NSMutableDictionary *)params;

+ (NSData *)offline_createTearSheet:(NSMutableDictionary *)params;

+ (NSData *)offline_direct_save_TearSheet:(NSMutableDictionary *)params;

+ (NSData *)offline_save_TearSheet:(NSMutableDictionary *)params;

+ (NSData *)offline_pdfList:(NSMutableDictionary *)params;

+ (NSData *)offline_add2Portfolio:(NSMutableDictionary *)params;

+ (NSData *)offline_model_qty:(NSMutableDictionary *)params;

+ (NSData *)offline_editPortfolio:(NSMutableDictionary *)params;

+ (NSData *)offline_removePortfolio:(NSMutableDictionary *)params;

+ (NSData *)offline_removePDF:(NSMutableDictionary *)params;

+(NSData*) offline_request_tearsheet :(NSMutableDictionary *) params;

+ (void) offline_clear_PDFCache;

+ (void) offline_removePDFWithName:(NSString *)name;

@end
