parse 6.1.0-alpha.3 → 6.1.0-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/parse.js +28 -38
- package/dist/parse.min.js +2 -2
- package/dist/parse.weapp.js +28 -38
- package/dist/parse.weapp.min.js +2 -2
- package/lib/browser/CoreManager.js +1 -1
- package/lib/browser/Parse.js +14 -14
- package/lib/browser/ParseObject.js +2 -1
- package/lib/browser/ParseOp.js +1 -1
- package/lib/browser/ParseQuery.js +8 -20
- package/lib/browser/TaskQueue.js +1 -0
- package/lib/node/CoreManager.js +1 -1
- package/lib/node/Parse.js +14 -14
- package/lib/node/ParseObject.js +2 -1
- package/lib/node/ParseOp.js +1 -1
- package/lib/node/ParseQuery.js +8 -20
- package/lib/node/TaskQueue.js +1 -0
- package/lib/react-native/CoreManager.js +1 -1
- package/lib/react-native/ObjectStateMutations.js +13 -13
- package/lib/react-native/ParseACL.js +7 -7
- package/lib/react-native/ParseCLP.js +15 -15
- package/lib/react-native/ParseObject.js +9 -9
- package/lib/react-native/ParseQuery.js +8 -16
- package/lib/react-native/ParseUser.js +15 -15
- package/lib/weapp/CoreManager.js +1 -1
- package/lib/weapp/Parse.js +14 -14
- package/lib/weapp/ParseObject.js +2 -1
- package/lib/weapp/ParseOp.js +1 -1
- package/lib/weapp/ParseQuery.js +8 -20
- package/lib/weapp/TaskQueue.js +1 -0
- package/package.json +8 -8
- package/types/Analytics.d.ts +1 -3
- package/types/CoreManager.d.ts +56 -62
- package/types/LocalDatastore.d.ts +3 -3
- package/types/LocalDatastoreController.default.d.ts +1 -1
- package/types/LocalDatastoreController.react-native.d.ts +1 -1
- package/types/ObjectStateMutations.d.ts +12 -18
- package/types/Parse.d.ts +63 -324
- package/types/ParseACL.d.ts +2 -6
- package/types/ParseCLP.d.ts +2 -6
- package/types/ParseConfig.d.ts +3 -11
- package/types/ParseFile.d.ts +8 -12
- package/types/ParseInstallation.d.ts +4 -4
- package/types/ParseObject.d.ts +24 -26
- package/types/ParseOp.d.ts +13 -15
- package/types/ParsePolygon.d.ts +3 -3
- package/types/ParseQuery.d.ts +39 -55
- package/types/ParseSchema.d.ts +12 -28
- package/types/ParseUser.d.ts +8 -14
- package/types/Push.d.ts +2 -2
- package/types/RESTController.d.ts +4 -4
- package/types/SingleInstanceStateController.d.ts +1 -1
- package/types/Storage.d.ts +2 -2
- package/types/StorageController.react-native.d.ts +2 -2
- package/types/TaskQueue.d.ts +3 -3
- package/types/UniqueInstanceStateController.d.ts +1 -1
- package/types/arrayContainsObject.d.ts +1 -1
- package/types/encode.d.ts +1 -1
- package/types/eslint.config.mjs +30 -0
- package/types/unique.d.ts +1 -1
- package/types/unsavedChildren.d.ts +1 -1
|
@@ -22,14 +22,14 @@ import type ParseObject from './ParseObject';
|
|
|
22
22
|
declare const LocalDatastore: {
|
|
23
23
|
isEnabled: boolean;
|
|
24
24
|
isSyncing: boolean;
|
|
25
|
-
fromPinWithName(name: string): Promise<
|
|
25
|
+
fromPinWithName(name: string): Promise<any[]>;
|
|
26
26
|
pinWithName(name: string, value: any): Promise<void>;
|
|
27
27
|
unPinWithName(name: string): Promise<void>;
|
|
28
28
|
_getAllContents(): Promise<any>;
|
|
29
29
|
_getRawStorage(): Promise<any>;
|
|
30
30
|
_clear(): Promise<void>;
|
|
31
|
-
_handlePinAllWithName(name: string, objects:
|
|
32
|
-
_handleUnPinAllWithName(name: string, objects:
|
|
31
|
+
_handlePinAllWithName(name: string, objects: ParseObject[]): Promise<void>;
|
|
32
|
+
_handleUnPinAllWithName(name: string, objects: ParseObject[]): Promise<any[]>;
|
|
33
33
|
_getChildren(object: ParseObject): any;
|
|
34
34
|
_traverse(object: any, encountered: any): void;
|
|
35
35
|
_serializeObjectsFromPinName(name: string): Promise<any[]>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare const LocalDatastoreController: {
|
|
2
|
-
fromPinWithName(name: string): Promise<
|
|
2
|
+
fromPinWithName(name: string): Promise<any[]>;
|
|
3
3
|
pinWithName(name: string, value: any): Promise<void>;
|
|
4
4
|
unPinWithName(name: string): Promise<void>;
|
|
5
5
|
getAllContents(): Promise<any>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare const LocalDatastoreController: {
|
|
2
|
-
fromPinWithName(name: string): Promise<
|
|
2
|
+
fromPinWithName(name: string): Promise<any[]>;
|
|
3
3
|
pinWithName(name: string, value: any): Promise<void>;
|
|
4
4
|
unPinWithName(name: string): Promise<void>;
|
|
5
5
|
getAllContents(): Promise<any>;
|
|
@@ -1,28 +1,22 @@
|
|
|
1
1
|
import TaskQueue from './TaskQueue';
|
|
2
2
|
import type { Op } from './ParseOp';
|
|
3
3
|
import type ParseObject from './ParseObject';
|
|
4
|
-
export type AttributeMap =
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export
|
|
8
|
-
[attr: string]: Op;
|
|
9
|
-
};
|
|
10
|
-
export type ObjectCache = {
|
|
11
|
-
[attr: string]: string;
|
|
12
|
-
};
|
|
13
|
-
export type State = {
|
|
4
|
+
export type AttributeMap = Record<string, any>;
|
|
5
|
+
export type OpsMap = Record<string, Op>;
|
|
6
|
+
export type ObjectCache = Record<string, string>;
|
|
7
|
+
export interface State {
|
|
14
8
|
serverData: AttributeMap;
|
|
15
|
-
pendingOps:
|
|
9
|
+
pendingOps: OpsMap[];
|
|
16
10
|
objectCache: ObjectCache;
|
|
17
11
|
tasks: TaskQueue;
|
|
18
12
|
existed: boolean;
|
|
19
|
-
}
|
|
13
|
+
}
|
|
20
14
|
export declare function defaultState(): State;
|
|
21
15
|
export declare function setServerData(serverData: AttributeMap, attributes: AttributeMap): void;
|
|
22
|
-
export declare function setPendingOp(pendingOps:
|
|
23
|
-
export declare function pushPendingState(pendingOps:
|
|
24
|
-
export declare function popPendingState(pendingOps:
|
|
25
|
-
export declare function mergeFirstPendingState(pendingOps:
|
|
26
|
-
export declare function estimateAttribute(serverData: AttributeMap, pendingOps:
|
|
27
|
-
export declare function estimateAttributes(serverData: AttributeMap, pendingOps:
|
|
16
|
+
export declare function setPendingOp(pendingOps: OpsMap[], attr: string, op?: Op): void;
|
|
17
|
+
export declare function pushPendingState(pendingOps: OpsMap[]): void;
|
|
18
|
+
export declare function popPendingState(pendingOps: OpsMap[]): OpsMap;
|
|
19
|
+
export declare function mergeFirstPendingState(pendingOps: OpsMap[]): void;
|
|
20
|
+
export declare function estimateAttribute(serverData: AttributeMap, pendingOps: OpsMap[], object: ParseObject, attr: string): any;
|
|
21
|
+
export declare function estimateAttributes(serverData: AttributeMap, pendingOps: OpsMap[], object: ParseObject): AttributeMap;
|
|
28
22
|
export declare function commitServerChanges(serverData: AttributeMap, objectCache: ObjectCache, changes: AttributeMap): void;
|
package/types/Parse.d.ts
CHANGED
|
@@ -6,7 +6,6 @@ import CLP from './ParseCLP';
|
|
|
6
6
|
import Config from './ParseConfig';
|
|
7
7
|
import ParseError from './ParseError';
|
|
8
8
|
import File from './ParseFile';
|
|
9
|
-
import * as Hooks from './ParseHooks';
|
|
10
9
|
import GeoPoint from './ParseGeoPoint';
|
|
11
10
|
import Polygon from './ParsePolygon';
|
|
12
11
|
import Installation from './ParseInstallation';
|
|
@@ -45,208 +44,38 @@ declare const Parse: {
|
|
|
45
44
|
get: (key: string) => any;
|
|
46
45
|
set: (key: string, value: any) => void;
|
|
47
46
|
setIfNeeded: (key: string, value: any) => any;
|
|
48
|
-
setAnalyticsController(controller:
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}) => Promise<any>;
|
|
57
|
-
};
|
|
58
|
-
setCloudController(controller: {
|
|
59
|
-
run: (name: string, data: any, options?: import("./RESTController").RequestOptions) => Promise<any>;
|
|
60
|
-
getJobsData: (options?: import("./RESTController").RequestOptions) => Promise<any>;
|
|
61
|
-
startJob: (name: string, data: any, options?: import("./RESTController").RequestOptions) => Promise<string>;
|
|
62
|
-
}): void;
|
|
63
|
-
getCloudController(): {
|
|
64
|
-
run: (name: string, data: any, options?: import("./RESTController").RequestOptions) => Promise<any>;
|
|
65
|
-
getJobsData: (options?: import("./RESTController").RequestOptions) => Promise<any>;
|
|
66
|
-
startJob: (name: string, data: any, options?: import("./RESTController").RequestOptions) => Promise<string>;
|
|
67
|
-
};
|
|
68
|
-
setConfigController(controller: {
|
|
69
|
-
current: () => Promise<Config> | Config;
|
|
70
|
-
get: (opts?: import("./RESTController").RequestOptions) => Promise<Config>;
|
|
71
|
-
save: (attrs: {
|
|
72
|
-
[key: string]: any;
|
|
73
|
-
}, masterKeyOnlyFlags?: {
|
|
74
|
-
[key: string]: any;
|
|
75
|
-
}) => Promise<void>;
|
|
76
|
-
}): void;
|
|
77
|
-
getConfigController(): {
|
|
78
|
-
current: () => Promise<Config> | Config;
|
|
79
|
-
get: (opts?: import("./RESTController").RequestOptions) => Promise<Config>;
|
|
80
|
-
save: (attrs: {
|
|
81
|
-
[key: string]: any;
|
|
82
|
-
}, masterKeyOnlyFlags?: {
|
|
83
|
-
[key: string]: any;
|
|
84
|
-
}) => Promise<void>;
|
|
85
|
-
};
|
|
86
|
-
setCryptoController(controller: {
|
|
87
|
-
encrypt: (obj: any, secretKey: string) => string;
|
|
88
|
-
decrypt: (encryptedText: string, secretKey: any) => string;
|
|
89
|
-
}): void;
|
|
90
|
-
getCryptoController(): {
|
|
91
|
-
encrypt: (obj: any, secretKey: string) => string;
|
|
92
|
-
decrypt: (encryptedText: string, secretKey: any) => string;
|
|
93
|
-
};
|
|
47
|
+
setAnalyticsController(controller: import("./CoreManager").AnalyticsController): void;
|
|
48
|
+
getAnalyticsController(): import("./CoreManager").AnalyticsController;
|
|
49
|
+
setCloudController(controller: import("./CoreManager").CloudController): void;
|
|
50
|
+
getCloudController(): import("./CoreManager").CloudController;
|
|
51
|
+
setConfigController(controller: import("./CoreManager").ConfigController): void;
|
|
52
|
+
getConfigController(): import("./CoreManager").ConfigController;
|
|
53
|
+
setCryptoController(controller: import("./CoreManager").CryptoController): void;
|
|
54
|
+
getCryptoController(): import("./CoreManager").CryptoController;
|
|
94
55
|
setEventEmitter(eventEmitter: any): void;
|
|
95
56
|
getEventEmitter(): any;
|
|
96
|
-
setFileController(controller:
|
|
97
|
-
saveFile: (name: string, source: import("./ParseFile").FileSource, options?: import("./RESTController").FullOptions) => Promise<any>;
|
|
98
|
-
saveBase64: (name: string, source: import("./ParseFile").FileSource, options?: import("./ParseFile").FileSaveOptions) => Promise<{
|
|
99
|
-
name: string;
|
|
100
|
-
url: string;
|
|
101
|
-
}>;
|
|
102
|
-
download: (uri: string, options?: any) => Promise<{
|
|
103
|
-
base64?: string;
|
|
104
|
-
contentType?: string;
|
|
105
|
-
}>;
|
|
106
|
-
deleteFile: (name: string, options?: {
|
|
107
|
-
useMasterKey?: boolean;
|
|
108
|
-
}) => Promise<void>;
|
|
109
|
-
}): void;
|
|
57
|
+
setFileController(controller: import("./CoreManager").FileController): void;
|
|
110
58
|
setEventuallyQueue(controller: EventuallyQueue): void;
|
|
111
59
|
getEventuallyQueue(): EventuallyQueue;
|
|
112
|
-
getFileController():
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
name: string;
|
|
116
|
-
url: string;
|
|
117
|
-
}>;
|
|
118
|
-
download: (uri: string, options?: any) => Promise<{
|
|
119
|
-
base64?: string;
|
|
120
|
-
contentType?: string;
|
|
121
|
-
}>;
|
|
122
|
-
deleteFile: (name: string, options?: {
|
|
123
|
-
useMasterKey?: boolean;
|
|
124
|
-
}) => Promise<void>;
|
|
125
|
-
};
|
|
126
|
-
setInstallationController(controller: {
|
|
127
|
-
currentInstallationId: () => Promise<string>;
|
|
128
|
-
currentInstallation: () => Promise<Installation | null>;
|
|
129
|
-
updateInstallationOnDisk: (installation: Installation) => Promise<void>;
|
|
130
|
-
}): void;
|
|
131
|
-
getInstallationController(): {
|
|
132
|
-
currentInstallationId: () => Promise<string>;
|
|
133
|
-
currentInstallation: () => Promise<Installation | null>;
|
|
134
|
-
updateInstallationOnDisk: (installation: Installation) => Promise<void>;
|
|
135
|
-
};
|
|
60
|
+
getFileController(): import("./CoreManager").FileController;
|
|
61
|
+
setInstallationController(controller: import("./CoreManager").InstallationController): void;
|
|
62
|
+
getInstallationController(): import("./CoreManager").InstallationController;
|
|
136
63
|
setLiveQuery(liveQuery: any): void;
|
|
137
64
|
getLiveQuery(): any;
|
|
138
|
-
setObjectController(controller:
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
getServerData: (obj: any) => import("./ObjectStateMutations").AttributeMap;
|
|
153
|
-
setServerData: (obj: any, attributes: import("./ObjectStateMutations").AttributeMap) => void;
|
|
154
|
-
getPendingOps: (obj: any) => Array<import("./ObjectStateMutations").OpsMap>;
|
|
155
|
-
setPendingOp: (obj: any, attr: string, op?: ParseOp.Op) => void;
|
|
156
|
-
pushPendingState: (obj: any) => void;
|
|
157
|
-
popPendingState: (obj: any) => import("./ObjectStateMutations").OpsMap | undefined;
|
|
158
|
-
mergeFirstPendingState: (obj: any) => void;
|
|
159
|
-
getObjectCache: (obj: any) => import("./ObjectStateMutations").ObjectCache;
|
|
160
|
-
estimateAttribute: (obj: any, attr: string) => any;
|
|
161
|
-
estimateAttributes: (obj: any) => import("./ObjectStateMutations").AttributeMap;
|
|
162
|
-
commitServerChanges: (obj: any, changes: import("./ObjectStateMutations").AttributeMap) => void;
|
|
163
|
-
enqueueTask: (obj: any, task: () => Promise<void>) => Promise<void>;
|
|
164
|
-
clearAllState: () => void;
|
|
165
|
-
duplicateState: (source: any, dest: any) => void;
|
|
166
|
-
}): void;
|
|
167
|
-
getObjectStateController(): {
|
|
168
|
-
getState: (obj: any) => import("./ObjectStateMutations").State | null;
|
|
169
|
-
initializeState: (obj: any, initial?: import("./ObjectStateMutations").State) => import("./ObjectStateMutations").State;
|
|
170
|
-
removeState: (obj: any) => import("./ObjectStateMutations").State | null;
|
|
171
|
-
getServerData: (obj: any) => import("./ObjectStateMutations").AttributeMap;
|
|
172
|
-
setServerData: (obj: any, attributes: import("./ObjectStateMutations").AttributeMap) => void;
|
|
173
|
-
getPendingOps: (obj: any) => Array<import("./ObjectStateMutations").OpsMap>;
|
|
174
|
-
setPendingOp: (obj: any, attr: string, op?: ParseOp.Op) => void;
|
|
175
|
-
pushPendingState: (obj: any) => void;
|
|
176
|
-
popPendingState: (obj: any) => import("./ObjectStateMutations").OpsMap | undefined;
|
|
177
|
-
mergeFirstPendingState: (obj: any) => void;
|
|
178
|
-
getObjectCache: (obj: any) => import("./ObjectStateMutations").ObjectCache;
|
|
179
|
-
estimateAttribute: (obj: any, attr: string) => any;
|
|
180
|
-
estimateAttributes: (obj: any) => import("./ObjectStateMutations").AttributeMap;
|
|
181
|
-
commitServerChanges: (obj: any, changes: import("./ObjectStateMutations").AttributeMap) => void;
|
|
182
|
-
enqueueTask: (obj: any, task: () => Promise<void>) => Promise<void>;
|
|
183
|
-
clearAllState: () => void;
|
|
184
|
-
duplicateState: (source: any, dest: any) => void;
|
|
185
|
-
};
|
|
186
|
-
setPushController(controller: {
|
|
187
|
-
send: (data: Push.PushData, options?: import("./RESTController").FullOptions) => Promise<any>;
|
|
188
|
-
}): void;
|
|
189
|
-
getPushController(): {
|
|
190
|
-
send: (data: Push.PushData, options?: import("./RESTController").FullOptions) => Promise<any>;
|
|
191
|
-
};
|
|
192
|
-
setQueryController(controller: {
|
|
193
|
-
find(className: string, params: import("./ParseQuery").QueryJSON, options?: import("./RESTController").RequestOptions): Promise<{
|
|
194
|
-
results?: Array<ParseObject>;
|
|
195
|
-
className?: string;
|
|
196
|
-
count?: number;
|
|
197
|
-
}>;
|
|
198
|
-
aggregate(className: string, params: any, options?: import("./RESTController").RequestOptions): Promise<{
|
|
199
|
-
results?: Array<any>;
|
|
200
|
-
}>;
|
|
201
|
-
}): void;
|
|
202
|
-
getQueryController(): {
|
|
203
|
-
find(className: string, params: import("./ParseQuery").QueryJSON, options?: import("./RESTController").RequestOptions): Promise<{
|
|
204
|
-
results?: Array<ParseObject>;
|
|
205
|
-
className?: string;
|
|
206
|
-
count?: number;
|
|
207
|
-
}>;
|
|
208
|
-
aggregate(className: string, params: any, options?: import("./RESTController").RequestOptions): Promise<{
|
|
209
|
-
results?: Array<any>;
|
|
210
|
-
}>;
|
|
211
|
-
};
|
|
212
|
-
setRESTController(controller: {
|
|
213
|
-
request: (method: string, path: string, data?: any, options?: import("./RESTController").RequestOptions) => Promise<any>;
|
|
214
|
-
ajax: (method: string, url: string, data: any, headers?: any, options?: import("./RESTController").FullOptions) => Promise<any>;
|
|
215
|
-
handleError: (err?: any) => void;
|
|
216
|
-
}): void;
|
|
217
|
-
getRESTController(): {
|
|
218
|
-
request: (method: string, path: string, data?: any, options?: import("./RESTController").RequestOptions) => Promise<any>;
|
|
219
|
-
ajax: (method: string, url: string, data: any, headers?: any, options?: import("./RESTController").FullOptions) => Promise<any>;
|
|
220
|
-
handleError: (err?: any) => void;
|
|
221
|
-
};
|
|
222
|
-
setSchemaController(controller: {
|
|
223
|
-
purge: (className: string) => Promise<any>;
|
|
224
|
-
get: (className: string, options?: import("./RESTController").RequestOptions) => Promise<any>;
|
|
225
|
-
delete: (className: string, options?: import("./RESTController").RequestOptions) => Promise<void>;
|
|
226
|
-
create: (className: string, params: any, options? /**
|
|
227
|
-
* @member {string} Parse.maintenanceKey
|
|
228
|
-
* @static
|
|
229
|
-
*/: import("./RESTController").RequestOptions) => Promise<any>;
|
|
230
|
-
update: (className: string, params: any, options?: import("./RESTController").RequestOptions) => Promise<any>;
|
|
231
|
-
send(className: string, method: string, params: any, options?: import("./RESTController").RequestOptions): Promise<any>;
|
|
232
|
-
}): void;
|
|
233
|
-
getSchemaController(): {
|
|
234
|
-
purge: (className: string) => Promise<any>;
|
|
235
|
-
get: (className: string, options?: import("./RESTController").RequestOptions) => Promise<any>;
|
|
236
|
-
delete: (className: string, options?: import("./RESTController").RequestOptions) => Promise<void>;
|
|
237
|
-
create: (className: string, params: any, options? /**
|
|
238
|
-
* @member {string} Parse.maintenanceKey
|
|
239
|
-
* @static
|
|
240
|
-
*/: import("./RESTController").RequestOptions) => Promise<any>;
|
|
241
|
-
update: (className: string, params: any, options?: import("./RESTController").RequestOptions) => Promise<any>;
|
|
242
|
-
send(className: string, method: string, params: any, options?: import("./RESTController").RequestOptions): Promise<any>;
|
|
243
|
-
};
|
|
244
|
-
setSessionController(controller: {
|
|
245
|
-
getSession: (options?: import("./RESTController").RequestOptions) => Promise<Session>;
|
|
246
|
-
}): void;
|
|
247
|
-
getSessionController(): {
|
|
248
|
-
getSession: (options?: import("./RESTController").RequestOptions) => Promise<Session>;
|
|
249
|
-
};
|
|
65
|
+
setObjectController(controller: import("./CoreManager").ObjectController): void;
|
|
66
|
+
getObjectController(): import("./CoreManager").ObjectController;
|
|
67
|
+
setObjectStateController(controller: import("./CoreManager").ObjectStateController): void;
|
|
68
|
+
getObjectStateController(): import("./CoreManager").ObjectStateController;
|
|
69
|
+
setPushController(controller: import("./CoreManager").PushController): void;
|
|
70
|
+
getPushController(): import("./CoreManager").PushController;
|
|
71
|
+
setQueryController(controller: import("./CoreManager").QueryController): void;
|
|
72
|
+
getQueryController(): import("./CoreManager").QueryController;
|
|
73
|
+
setRESTController(controller: import("./CoreManager").RESTController): void;
|
|
74
|
+
getRESTController(): import("./CoreManager").RESTController;
|
|
75
|
+
setSchemaController(controller: import("./CoreManager").SchemaController): void;
|
|
76
|
+
getSchemaController(): import("./CoreManager").SchemaController;
|
|
77
|
+
setSessionController(controller: import("./CoreManager").SessionController): void;
|
|
78
|
+
getSessionController(): import("./CoreManager").SessionController;
|
|
250
79
|
setStorageController(controller: {
|
|
251
80
|
async: 0;
|
|
252
81
|
getItem: (path: string) => string | null;
|
|
@@ -256,8 +85,8 @@ declare const Parse: {
|
|
|
256
85
|
setItemAsync?: (path: string, value: string) => Promise<void>;
|
|
257
86
|
removeItemAsync?: (path: string) => Promise<void>;
|
|
258
87
|
clear: () => void;
|
|
259
|
-
getAllKeys?: () =>
|
|
260
|
-
getAllKeysAsync?: () => Promise<
|
|
88
|
+
getAllKeys?: () => string[];
|
|
89
|
+
getAllKeysAsync?: () => Promise<string[]>;
|
|
261
90
|
} | {
|
|
262
91
|
async: 1;
|
|
263
92
|
getItem?: (path: string) => string | null;
|
|
@@ -267,23 +96,11 @@ declare const Parse: {
|
|
|
267
96
|
setItemAsync: (path: string, value: string) => Promise<void>;
|
|
268
97
|
removeItemAsync: (path: string) => Promise<void>;
|
|
269
98
|
clear: () => void;
|
|
270
|
-
getAllKeys?: () =>
|
|
271
|
-
getAllKeysAsync?: () => Promise<
|
|
99
|
+
getAllKeys?: () => string[];
|
|
100
|
+
getAllKeysAsync?: () => Promise<string[]>;
|
|
272
101
|
}): void;
|
|
273
|
-
setLocalDatastoreController(controller:
|
|
274
|
-
|
|
275
|
-
pinWithName: (name: string, objects: any) => void;
|
|
276
|
-
unPinWithName: (name: string) => void;
|
|
277
|
-
getAllContents: () => any | undefined;
|
|
278
|
-
clear: () => void;
|
|
279
|
-
}): void;
|
|
280
|
-
getLocalDatastoreController(): {
|
|
281
|
-
fromPinWithName: (name: string) => any | undefined;
|
|
282
|
-
pinWithName: (name: string, objects: any) => void;
|
|
283
|
-
unPinWithName: (name: string) => void;
|
|
284
|
-
getAllContents: () => any | undefined;
|
|
285
|
-
clear: () => void;
|
|
286
|
-
};
|
|
102
|
+
setLocalDatastoreController(controller: import("./CoreManager").LocalDatastoreController): void;
|
|
103
|
+
getLocalDatastoreController(): import("./CoreManager").LocalDatastoreController;
|
|
287
104
|
setLocalDatastore(store: any): void;
|
|
288
105
|
getLocalDatastore(): any;
|
|
289
106
|
getStorageController(): {
|
|
@@ -295,8 +112,8 @@ declare const Parse: {
|
|
|
295
112
|
setItemAsync?: (path: string, value: string) => Promise<void>;
|
|
296
113
|
removeItemAsync?: (path: string) => Promise<void>;
|
|
297
114
|
clear: () => void;
|
|
298
|
-
getAllKeys?: () =>
|
|
299
|
-
getAllKeysAsync?: () => Promise<
|
|
115
|
+
getAllKeys?: () => string[];
|
|
116
|
+
getAllKeysAsync?: () => Promise<string[]>;
|
|
300
117
|
} | {
|
|
301
118
|
async: 1;
|
|
302
119
|
getItem?: (path: string) => string | null;
|
|
@@ -306,97 +123,19 @@ declare const Parse: {
|
|
|
306
123
|
setItemAsync: (path: string, value: string) => Promise<void>;
|
|
307
124
|
removeItemAsync: (path: string) => Promise<void>;
|
|
308
125
|
clear: () => void;
|
|
309
|
-
getAllKeys?: () =>
|
|
310
|
-
getAllKeysAsync?: () => Promise<
|
|
311
|
-
};
|
|
312
|
-
setAsyncStorage(storage: {
|
|
313
|
-
getItem: (key: string, callback?: (error?: Error | null, result?: string | null) => void) => Promise<string | null>;
|
|
314
|
-
setItem: (key: string, value: string, callback?: (error?: Error | null) => void) => Promise<void>;
|
|
315
|
-
removeItem: (key: string, callback?: (error?: Error | null) => void) => Promise<void>;
|
|
316
|
-
mergeItem: (key: string, value: string, callback?: (error?: Error | null) => void) => Promise<void>;
|
|
317
|
-
clear: (callback?: (error?: Error | null) => void) => Promise<void>;
|
|
318
|
-
getAllKeys: (callback?: (error?: Error | null, result?: readonly string[] | null) => void) => Promise<readonly string[]>;
|
|
319
|
-
multiGet: (keys: readonly string[], callback?: (errors?: readonly (Error | null)[] | null, result?: readonly [string, string][]) => void) => Promise<readonly [string, string | null][]>;
|
|
320
|
-
multiSet: (keyValuePairs: [string, string][], callback?: (errors?: readonly (Error | null)[] | null) => void) => Promise<readonly [string, string | null][]>;
|
|
321
|
-
multiRemove: (keys: readonly string[], callback?: (errors?: readonly (Error | null)[] | null) => void) => Promise<void>;
|
|
322
|
-
multiMerge: (keyValuePairs: [string, string][], callback?: (errors?: readonly (Error | null)[] | null) => void) => Promise<void>;
|
|
323
|
-
}): void;
|
|
324
|
-
getAsyncStorage(): {
|
|
325
|
-
getItem: (key: string, callback?: (error?: Error | null, result?: string | null) => void) => Promise<string | null>;
|
|
326
|
-
setItem: (key: string, value: string, callback?: (error?: Error | null) => void) => Promise<void>;
|
|
327
|
-
removeItem: (key: string, callback?: (error?: Error | null) => void) => Promise<void>;
|
|
328
|
-
mergeItem: (key: string, value: string, callback?: (error?: Error | null) => void) => Promise<void>;
|
|
329
|
-
clear: (callback?: (error?: Error | null) => void) => Promise<void>;
|
|
330
|
-
getAllKeys: (callback?: (error?: Error | null, result?: readonly string[] | null) => void) => Promise<readonly string[]>;
|
|
331
|
-
multiGet: (keys: readonly string[], callback?: (errors?: readonly (Error | null)[] | null, result?: readonly [string, string][]) => void) => Promise<readonly [string, string | null][]>;
|
|
332
|
-
multiSet: (keyValuePairs: [string, string][], callback?: (errors?: readonly (Error | null)[] | null) => void) => Promise<readonly [string, string | null][]>;
|
|
333
|
-
multiRemove: (keys: readonly string[], callback?: (errors?: readonly (Error | null)[] | null) => void) => Promise<void>;
|
|
334
|
-
multiMerge: (keyValuePairs: [string, string][], callback?: (errors?: readonly (Error | null)[] | null) => void) => Promise<void>;
|
|
126
|
+
getAllKeys?: () => string[];
|
|
127
|
+
getAllKeysAsync?: () => Promise<string[]>;
|
|
335
128
|
};
|
|
129
|
+
setAsyncStorage(storage: import("./CoreManager").AsyncStorageType): void;
|
|
130
|
+
getAsyncStorage(): import("./CoreManager").AsyncStorageType;
|
|
336
131
|
setWebSocketController(controller: new (url: string | URL, protocols?: string | string[] | undefined) => import("./CoreManager").WebSocketController): void;
|
|
337
132
|
getWebSocketController(): new (url: string | URL, protocols?: string | string[] | undefined) => import("./CoreManager").WebSocketController;
|
|
338
|
-
setUserController(controller:
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
loginAs: (user: User, userId: string) => Promise<User>;
|
|
345
|
-
become: (user: User, options?: import("./RESTController").RequestOptions) => Promise<User>;
|
|
346
|
-
hydrate: (user: User, userJSON: import("./ObjectStateMutations").AttributeMap) => Promise<User>;
|
|
347
|
-
logOut: (options?: import("./RESTController").RequestOptions) => Promise<void>;
|
|
348
|
-
me: (user: User, options?: import("./RESTController").RequestOptions) => Promise<User>;
|
|
349
|
-
requestPasswordReset: (email: string, options?: import("./RESTController").RequestOptions) => Promise<void>;
|
|
350
|
-
updateUserOnDisk: (user: User) => Promise<User>;
|
|
351
|
-
upgradeToRevocableSession: (user: User, options?: import("./RESTController").RequestOptions) => Promise<void>;
|
|
352
|
-
linkWith: (user: User, authData: import("./ParseUser").AuthData, options?: import("./RESTController").FullOptions) => Promise<User>;
|
|
353
|
-
removeUserFromDisk: () => Promise<User | void>;
|
|
354
|
-
verifyPassword: (username: string, password: string, options?: import("./RESTController").RequestOptions) => Promise<User>;
|
|
355
|
-
requestEmailVerification: (email: string, options?: import("./RESTController").RequestOptions) => Promise<void>;
|
|
356
|
-
}): void;
|
|
357
|
-
getUserController(): {
|
|
358
|
-
setCurrentUser: (user: User) => Promise<void>;
|
|
359
|
-
currentUser: () => User | null;
|
|
360
|
-
currentUserAsync: () => Promise<User | null>;
|
|
361
|
-
signUp: (user: User, attrs: import("./ObjectStateMutations").AttributeMap, options?: import("./RESTController").RequestOptions) => Promise<User>;
|
|
362
|
-
logIn: (user: User, options?: import("./RESTController").RequestOptions) => Promise<User>;
|
|
363
|
-
loginAs: (user: User, userId: string) => Promise<User>;
|
|
364
|
-
become: (user: User, options?: import("./RESTController").RequestOptions) => Promise<User>;
|
|
365
|
-
hydrate: (user: User, userJSON: import("./ObjectStateMutations").AttributeMap) => Promise<User>;
|
|
366
|
-
logOut: (options?: import("./RESTController").RequestOptions) => Promise<void>;
|
|
367
|
-
me: (user: User, options?: import("./RESTController").RequestOptions) => Promise<User>;
|
|
368
|
-
requestPasswordReset: (email: string, options?: import("./RESTController").RequestOptions) => Promise<void>;
|
|
369
|
-
updateUserOnDisk: (user: User) => Promise<User>;
|
|
370
|
-
upgradeToRevocableSession: (user: User, options?: import("./RESTController").RequestOptions) => Promise<void>;
|
|
371
|
-
linkWith: (user: User, authData: import("./ParseUser").AuthData, options?: import("./RESTController").FullOptions) => Promise<User>;
|
|
372
|
-
removeUserFromDisk: () => Promise<User | void>;
|
|
373
|
-
verifyPassword: (username: string, password: string, options?: import("./RESTController").RequestOptions) => Promise<User>;
|
|
374
|
-
requestEmailVerification: (email: string, options?: import("./RESTController").RequestOptions) => Promise<void>;
|
|
375
|
-
};
|
|
376
|
-
setLiveQueryController(controller: {
|
|
377
|
-
setDefaultLiveQueryClient(liveQueryClient: LiveQueryClient): void;
|
|
378
|
-
getDefaultLiveQueryClient(): Promise<LiveQueryClient>;
|
|
379
|
-
_clearCachedDefaultClient(): void;
|
|
380
|
-
}): void;
|
|
381
|
-
getLiveQueryController(): {
|
|
382
|
-
setDefaultLiveQueryClient(liveQueryClient: LiveQueryClient): void;
|
|
383
|
-
getDefaultLiveQueryClient(): Promise<LiveQueryClient>;
|
|
384
|
-
_clearCachedDefaultClient(): void;
|
|
385
|
-
};
|
|
386
|
-
setHooksController(controller: {
|
|
387
|
-
get: (type: string, functionName?: string, triggerName?: string) => Promise<any>;
|
|
388
|
-
create: (hook: Hooks.HookDeclaration) => Promise<any>;
|
|
389
|
-
remove: (hook: Hooks.HookDeleteArg) => Promise<any>;
|
|
390
|
-
update: (hook: Hooks.HookDeclaration) => Promise<any>;
|
|
391
|
-
sendRequest?: (method: string, path: string, body?: any) => Promise<any>;
|
|
392
|
-
}): void;
|
|
393
|
-
getHooksController(): {
|
|
394
|
-
get: (type: string, functionName?: string, triggerName?: string) => Promise<any>;
|
|
395
|
-
create: (hook: Hooks.HookDeclaration) => Promise<any>;
|
|
396
|
-
remove: (hook: Hooks.HookDeleteArg) => Promise<any>;
|
|
397
|
-
update: (hook: Hooks.HookDeclaration) => Promise<any>;
|
|
398
|
-
sendRequest?: (method: string, path: string, body?: any) => Promise<any>;
|
|
399
|
-
};
|
|
133
|
+
setUserController(controller: import("./CoreManager").UserController): void;
|
|
134
|
+
getUserController(): import("./CoreManager").UserController;
|
|
135
|
+
setLiveQueryController(controller: import("./CoreManager").LiveQueryControllerType): void;
|
|
136
|
+
getLiveQueryController(): import("./CoreManager").LiveQueryControllerType;
|
|
137
|
+
setHooksController(controller: import("./CoreManager").HooksController): void;
|
|
138
|
+
getHooksController(): import("./CoreManager").HooksController;
|
|
400
139
|
setParseOp(op: any): void;
|
|
401
140
|
getParseOp(): any;
|
|
402
141
|
setParseObject(object: any): void;
|
|
@@ -425,14 +164,14 @@ declare const Parse: {
|
|
|
425
164
|
LocalDatastore: {
|
|
426
165
|
isEnabled: boolean;
|
|
427
166
|
isSyncing: boolean;
|
|
428
|
-
fromPinWithName(name: string): Promise<
|
|
167
|
+
fromPinWithName(name: string): Promise<any[]>;
|
|
429
168
|
pinWithName(name: string, value: any): Promise<void>;
|
|
430
169
|
unPinWithName(name: string): Promise<void>;
|
|
431
170
|
_getAllContents(): Promise<any>;
|
|
432
171
|
_getRawStorage(): Promise<any>;
|
|
433
172
|
_clear(): Promise<void>;
|
|
434
|
-
_handlePinAllWithName(name: string, objects:
|
|
435
|
-
_handleUnPinAllWithName(name: string, objects:
|
|
173
|
+
_handlePinAllWithName(name: string, objects: ParseObject[]): Promise<void>;
|
|
174
|
+
_handleUnPinAllWithName(name: string, objects: ParseObject[]): Promise<any[]>;
|
|
436
175
|
_getChildren(object: ParseObject): any;
|
|
437
176
|
_traverse(object: any, encountered: any): void;
|
|
438
177
|
_serializeObjectsFromPinName(name: string): Promise<any[]>;
|
|
@@ -469,8 +208,8 @@ declare const Parse: {
|
|
|
469
208
|
setItemAsync(path: string, value: string): Promise<void>;
|
|
470
209
|
removeItem(path: string): void;
|
|
471
210
|
removeItemAsync(path: string): Promise<void>;
|
|
472
|
-
getAllKeys():
|
|
473
|
-
getAllKeysAsync(): Promise<
|
|
211
|
+
getAllKeys(): string[];
|
|
212
|
+
getAllKeysAsync(): Promise<string[]>;
|
|
474
213
|
generatePath(path: string): string;
|
|
475
214
|
_clear(): void;
|
|
476
215
|
};
|
|
@@ -480,7 +219,7 @@ declare const Parse: {
|
|
|
480
219
|
Hooks: any;
|
|
481
220
|
Parse: any;
|
|
482
221
|
/**
|
|
483
|
-
* @
|
|
222
|
+
* @property {EventuallyQueue} Parse.EventuallyQueue
|
|
484
223
|
* @static
|
|
485
224
|
*/
|
|
486
225
|
EventuallyQueue: EventuallyQueue;
|
|
@@ -519,67 +258,67 @@ declare const Parse: {
|
|
|
519
258
|
*/
|
|
520
259
|
getServerHealth(): Promise<any>;
|
|
521
260
|
/**
|
|
522
|
-
* @
|
|
261
|
+
* @property {string} Parse.applicationId
|
|
523
262
|
* @static
|
|
524
263
|
*/
|
|
525
264
|
applicationId: any;
|
|
526
265
|
/**
|
|
527
|
-
* @
|
|
266
|
+
* @property {string} Parse.javaScriptKey
|
|
528
267
|
* @static
|
|
529
268
|
*/
|
|
530
269
|
javaScriptKey: any;
|
|
531
270
|
/**
|
|
532
|
-
* @
|
|
271
|
+
* @property {string} Parse.masterKey
|
|
533
272
|
* @static
|
|
534
273
|
*/
|
|
535
274
|
masterKey: any;
|
|
536
275
|
/**
|
|
537
|
-
* @
|
|
276
|
+
* @property {string} Parse.maintenanceKey
|
|
538
277
|
* @static
|
|
539
278
|
*/
|
|
540
279
|
maintenanceKey: any;
|
|
541
280
|
/**
|
|
542
|
-
* @
|
|
281
|
+
* @property {string} Parse.serverURL
|
|
543
282
|
* @static
|
|
544
283
|
*/
|
|
545
284
|
serverURL: any;
|
|
546
285
|
/**
|
|
547
|
-
* @
|
|
286
|
+
* @property {string} Parse.serverAuthToken
|
|
548
287
|
* @static
|
|
549
288
|
*/
|
|
550
289
|
serverAuthToken: any;
|
|
551
290
|
/**
|
|
552
|
-
* @
|
|
291
|
+
* @property {string} Parse.serverAuthType
|
|
553
292
|
* @static
|
|
554
293
|
*/
|
|
555
294
|
serverAuthType: any;
|
|
556
295
|
/**
|
|
557
|
-
* @
|
|
296
|
+
* @property {ParseLiveQuery} Parse.LiveQuery
|
|
558
297
|
* @static
|
|
559
298
|
*/
|
|
560
299
|
LiveQuery: ParseLiveQuery;
|
|
561
300
|
/**
|
|
562
|
-
* @
|
|
301
|
+
* @property {string} Parse.liveQueryServerURL
|
|
563
302
|
* @static
|
|
564
303
|
*/
|
|
565
304
|
liveQueryServerURL: any;
|
|
566
305
|
/**
|
|
567
|
-
* @
|
|
306
|
+
* @property {boolean} Parse.encryptedUser
|
|
568
307
|
* @static
|
|
569
308
|
*/
|
|
570
309
|
encryptedUser: boolean;
|
|
571
310
|
/**
|
|
572
|
-
* @
|
|
311
|
+
* @property {string} Parse.secret
|
|
573
312
|
* @static
|
|
574
313
|
*/
|
|
575
314
|
secret: any;
|
|
576
315
|
/**
|
|
577
|
-
* @
|
|
316
|
+
* @property {boolean} Parse.idempotency
|
|
578
317
|
* @static
|
|
579
318
|
*/
|
|
580
319
|
idempotency: any;
|
|
581
320
|
/**
|
|
582
|
-
* @
|
|
321
|
+
* @property {boolean} Parse.allowCustomObjectId
|
|
583
322
|
* @static
|
|
584
323
|
*/
|
|
585
324
|
allowCustomObjectId: any;
|
package/types/ParseACL.d.ts
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import type ParseRole from './ParseRole';
|
|
2
2
|
import type ParseUser from './ParseUser';
|
|
3
|
-
type PermissionsMap =
|
|
4
|
-
|
|
5
|
-
};
|
|
6
|
-
type ByIdMap = {
|
|
7
|
-
[userId: string]: PermissionsMap;
|
|
8
|
-
};
|
|
3
|
+
type PermissionsMap = Record<string, boolean>;
|
|
4
|
+
type ByIdMap = Record<string, PermissionsMap>;
|
|
9
5
|
/**
|
|
10
6
|
* Creates a new ACL.
|
|
11
7
|
* If no argument is given, the ACL has no permissions for anyone.
|
package/types/ParseCLP.d.ts
CHANGED
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
import ParseRole from './ParseRole';
|
|
2
2
|
import ParseUser from './ParseUser';
|
|
3
3
|
type Entity = ParseUser | ParseRole | string;
|
|
4
|
-
type UsersMap =
|
|
5
|
-
[userId: string]: boolean | any;
|
|
6
|
-
};
|
|
4
|
+
type UsersMap = Record<string, boolean | any>;
|
|
7
5
|
export type PermissionsMap = {
|
|
8
6
|
writeUserFields?: string[];
|
|
9
7
|
readUserFields?: string[];
|
|
10
|
-
} &
|
|
11
|
-
[permission: string]: UsersMap;
|
|
12
|
-
};
|
|
8
|
+
} & Record<string, UsersMap>;
|
|
13
9
|
/**
|
|
14
10
|
* Creates a new CLP.
|
|
15
11
|
* If no argument is given, the CLP has no permissions for anyone.
|