-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathCSIOInternalHeaders.h
More file actions
117 lines (92 loc) · 3.55 KB
/
CSIOInternalHeaders.h
File metadata and controls
117 lines (92 loc) · 3.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
//
// CSIOInternalHeaders.h
// contentstack
//
// Created by Reefaq on 15/07/15.
// Copyright (c) 2015 Contentstack. All rights reserved.
//
#import "CSIOCoreNetworkingProtocol.h"
#import "Contentstack.h"
#import "SyncStack.h"
#import "Stack.h"
#import "Query.h"
#import "ContentType.h"
#import "Entry.h"
#import "Asset.h"
#import "QueryResult.h"
#import "ISO8601DateFormatter.h"
#import "Common.h"
#import "CSIOConstants.h"
#import "Config.h"
#import "AssetLibrary.h"
#import "Group.h"
#import "CSError.h"
//MARK: Extensions -
@interface Stack ()
@property (nonatomic, copy) NSString *hostURL;
@property (nonatomic, copy) NSString *version;
@property (nonatomic, strong) NSMutableDictionary *stackHeaders;
@property (nonatomic, strong) NSObject<CSIOCoreNetworkingProtocol> *network;
@property (nonatomic, strong) ISO8601DateFormatter *commonDateFormatter;
@property (nonatomic, strong) NSMutableSet *requestOperationSet;
- (instancetype)initWithAPIKey:(NSString*)apiKey andaccessToken:(NSString *)accessToken andEnvironment:(NSString*)environment andConfig:(Config *)sConfig;
@end
@interface Contentstack()
+ (Contentstack *)sharedInstance;
@end
@interface Query ()
@property (nonatomic, assign) BOOL shouldFetchFromNetwork;
@property (nonatomic, strong) ContentType *contentType;
- (instancetype)initWithContentType:(ContentType *)contentType;
@property (nonatomic, strong) NSMutableDictionary *queryDictionary;
@end
@interface QueryResult ()
- (instancetype)initWithContentType:(ContentType *)contentType objectDictionary:(NSDictionary*)dictionary;
@property (nonatomic, strong) ContentType *contentType;
@end
@interface ContentType ()
@property (nonatomic, strong) NSString *name;
@property (nonatomic, strong) NSMutableDictionary *headers;
@property (nonatomic, strong) NSMutableDictionary *postParamDictionary;
-(instancetype)initWithStack:(Stack *)stack withName:(NSString*)contentTypeName;
-(Entry *)entry;
-(Stack *)stack;
@end
@interface Entry ()
@property (nonatomic, assign, getter=isDeleted) BOOL deleted;
@property (nonatomic, strong) ContentType *contentType;
@property (nonatomic, strong) NSMutableDictionary *postParamDictionary;
- (instancetype)initWithContentType:(ContentType *)contentType;
- (instancetype)initWithContentType:(ContentType *)contentType withEntryUID:(NSString*)uid;
@end
@interface Asset ()
- (instancetype)initWithStack:(Stack *)stack;
- (instancetype)initWithStack:(Stack *)stack withAssetUID:(NSString*)assetUID;
@property (nonatomic, strong) NSMutableDictionary *postParamDictionary;
@end
@interface AssetLibrary ()
- (instancetype)initWithStack:(Stack *)stack;
@property (nonatomic, strong) NSMutableDictionary *postParamDictionary;
@end
@interface Group ()
- (void)configureWithDictionary:(NSDictionary*)dictionary;
- (instancetype)initWithStack:(Stack *)stack;
- (instancetype)initWithStack:(Stack *)stack andField:(NSString*)field;
@end
@interface SyncStack ()
-(instancetype)initWithParmas:(NSDictionary*) parmas;
-(void)parseSyncResult:(NSDictionary*) dictionary;
-(NSDictionary*)getParameters;
@property (nonatomic, copy) NSArray *items;
@property (nonatomic, copy) NSString *paginationToken;
@property (nonatomic, copy) NSString *syncToken;
@property (nonatomic, copy) NSString *seqId;
@property (nonatomic, assign) BOOL hasMorePages;
@property (nonatomic, assign) unsigned int skip;
@property (nonatomic, assign) unsigned int limit;
@property (nonatomic, assign) unsigned int totalCount;
@property (nonatomic, strong) NSDictionary *params;
@end
@interface CSError ()
+(instancetype)error:(NSDictionary*) errorDictionary statusCode:(NSInteger) statusCode;
@end