parse 6.1.0-alpha.2 → 6.1.0-alpha.4

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.
Files changed (186) hide show
  1. package/README.md +0 -8
  2. package/dist/parse.js +31 -49
  3. package/dist/parse.min.js +2 -2
  4. package/dist/parse.weapp.js +31 -49
  5. package/dist/parse.weapp.min.js +2 -2
  6. package/lib/browser/CoreManager.js +1 -2
  7. package/lib/browser/CryptoController.js +0 -1
  8. package/lib/browser/EventEmitter.js +0 -1
  9. package/lib/browser/EventuallyQueue.js +0 -1
  10. package/lib/browser/IndexedDBStorageController.js +0 -1
  11. package/lib/browser/InstallationController.js +0 -1
  12. package/lib/browser/LocalDatastore.js +0 -1
  13. package/lib/browser/LocalDatastoreController.default.js +0 -1
  14. package/lib/browser/LocalDatastoreController.js +0 -1
  15. package/lib/browser/LocalDatastoreController.react-native.js +0 -1
  16. package/lib/browser/OfflineQuery.js +0 -1
  17. package/lib/browser/ParseInstallation.js +0 -1
  18. package/lib/browser/ParseObject.js +2 -1
  19. package/lib/browser/ParseOp.js +1 -1
  20. package/lib/browser/ParseQuery.js +19 -17
  21. package/lib/browser/RESTController.js +4 -3
  22. package/lib/browser/Socket.weapp.js +0 -1
  23. package/lib/browser/Storage.js +0 -1
  24. package/lib/browser/StorageController.browser.js +0 -1
  25. package/lib/browser/StorageController.default.js +0 -1
  26. package/lib/browser/StorageController.js +0 -1
  27. package/lib/browser/StorageController.react-native.js +0 -1
  28. package/lib/browser/StorageController.weapp.js +0 -1
  29. package/lib/browser/TaskQueue.js +1 -1
  30. package/lib/browser/WebSocketController.js +0 -1
  31. package/lib/browser/Xhr.weapp.js +0 -1
  32. package/lib/browser/uuid.js +0 -1
  33. package/lib/node/CoreManager.js +1 -2
  34. package/lib/node/CryptoController.js +0 -1
  35. package/lib/node/EventEmitter.js +0 -1
  36. package/lib/node/EventuallyQueue.js +0 -1
  37. package/lib/node/IndexedDBStorageController.js +0 -1
  38. package/lib/node/InstallationController.js +0 -1
  39. package/lib/node/LocalDatastore.js +0 -1
  40. package/lib/node/LocalDatastoreController.default.js +0 -1
  41. package/lib/node/LocalDatastoreController.js +0 -1
  42. package/lib/node/LocalDatastoreController.react-native.js +0 -1
  43. package/lib/node/OfflineQuery.js +0 -1
  44. package/lib/node/ParseInstallation.js +0 -1
  45. package/lib/node/ParseObject.js +2 -1
  46. package/lib/node/ParseOp.js +1 -1
  47. package/lib/node/RESTController.js +0 -1
  48. package/lib/node/Socket.weapp.js +0 -1
  49. package/lib/node/Storage.js +0 -1
  50. package/lib/node/StorageController.browser.js +0 -1
  51. package/lib/node/StorageController.default.js +0 -1
  52. package/lib/node/StorageController.js +0 -1
  53. package/lib/node/StorageController.react-native.js +0 -1
  54. package/lib/node/StorageController.weapp.js +0 -1
  55. package/lib/node/TaskQueue.js +1 -1
  56. package/lib/node/WebSocketController.js +0 -1
  57. package/lib/node/Xhr.weapp.js +0 -1
  58. package/lib/node/uuid.js +0 -1
  59. package/lib/react-native/CoreManager.js +1 -2
  60. package/lib/react-native/CryptoController.js +0 -1
  61. package/lib/react-native/EventEmitter.js +0 -1
  62. package/lib/react-native/EventuallyQueue.js +0 -1
  63. package/lib/react-native/IndexedDBStorageController.js +0 -1
  64. package/lib/react-native/InstallationController.js +0 -1
  65. package/lib/react-native/LocalDatastore.js +0 -1
  66. package/lib/react-native/LocalDatastoreController.default.js +0 -1
  67. package/lib/react-native/LocalDatastoreController.js +0 -1
  68. package/lib/react-native/LocalDatastoreController.react-native.js +0 -1
  69. package/lib/react-native/ObjectStateMutations.js +13 -13
  70. package/lib/react-native/OfflineQuery.js +0 -1
  71. package/lib/react-native/ParseACL.js +7 -7
  72. package/lib/react-native/ParseCLP.js +15 -15
  73. package/lib/react-native/ParseInstallation.js +0 -1
  74. package/lib/react-native/ParseObject.js +9 -9
  75. package/lib/react-native/ParseUser.js +15 -15
  76. package/lib/react-native/RESTController.js +0 -1
  77. package/lib/react-native/Socket.weapp.js +0 -1
  78. package/lib/react-native/Storage.js +0 -1
  79. package/lib/react-native/StorageController.browser.js +0 -1
  80. package/lib/react-native/StorageController.default.js +0 -1
  81. package/lib/react-native/StorageController.js +0 -1
  82. package/lib/react-native/StorageController.react-native.js +0 -1
  83. package/lib/react-native/StorageController.weapp.js +0 -1
  84. package/lib/react-native/TaskQueue.js +0 -1
  85. package/lib/react-native/WebSocketController.js +0 -1
  86. package/lib/react-native/Xhr.weapp.js +0 -1
  87. package/lib/react-native/uuid.js +0 -1
  88. package/lib/weapp/CoreManager.js +1 -2
  89. package/lib/weapp/CryptoController.js +0 -1
  90. package/lib/weapp/EventEmitter.js +0 -1
  91. package/lib/weapp/EventuallyQueue.js +0 -1
  92. package/lib/weapp/IndexedDBStorageController.js +0 -1
  93. package/lib/weapp/InstallationController.js +0 -1
  94. package/lib/weapp/LocalDatastore.js +0 -1
  95. package/lib/weapp/LocalDatastoreController.default.js +0 -1
  96. package/lib/weapp/LocalDatastoreController.js +0 -1
  97. package/lib/weapp/LocalDatastoreController.react-native.js +0 -1
  98. package/lib/weapp/OfflineQuery.js +0 -1
  99. package/lib/weapp/ParseInstallation.js +0 -1
  100. package/lib/weapp/ParseObject.js +2 -1
  101. package/lib/weapp/ParseOp.js +1 -1
  102. package/lib/weapp/ParseQuery.js +19 -17
  103. package/lib/weapp/RESTController.js +4 -3
  104. package/lib/weapp/Socket.weapp.js +0 -1
  105. package/lib/weapp/Storage.js +0 -1
  106. package/lib/weapp/StorageController.browser.js +0 -1
  107. package/lib/weapp/StorageController.default.js +0 -1
  108. package/lib/weapp/StorageController.js +0 -1
  109. package/lib/weapp/StorageController.react-native.js +0 -1
  110. package/lib/weapp/StorageController.weapp.js +0 -1
  111. package/lib/weapp/TaskQueue.js +1 -1
  112. package/lib/weapp/WebSocketController.js +0 -1
  113. package/lib/weapp/Xhr.weapp.js +0 -1
  114. package/lib/weapp/uuid.js +0 -1
  115. package/package.json +14 -12
  116. package/types/Analytics.d.ts +40 -0
  117. package/types/AnonymousUtils.d.ts +84 -0
  118. package/types/Cloud.d.ts +65 -0
  119. package/types/CloudCode.d.ts +307 -0
  120. package/types/CoreManager.d.ts +319 -0
  121. package/types/CryptoController.d.ts +5 -0
  122. package/types/EventEmitter.d.ts +5 -0
  123. package/types/EventuallyQueue.d.ts +168 -0
  124. package/types/FacebookUtils.d.ts +107 -0
  125. package/types/IndexedDBStorageController.d.ts +2 -0
  126. package/types/InstallationController.d.ts +10 -0
  127. package/types/LiveQueryClient.d.ts +128 -0
  128. package/types/LiveQuerySubscription.d.ts +103 -0
  129. package/types/LocalDatastore.d.ts +56 -0
  130. package/types/LocalDatastoreController.d.ts +2 -0
  131. package/types/LocalDatastoreController.default.d.ts +9 -0
  132. package/types/LocalDatastoreController.react-native.d.ts +9 -0
  133. package/types/LocalDatastoreUtils.d.ts +5 -0
  134. package/types/ObjectStateMutations.d.ts +22 -0
  135. package/types/OfflineQuery.d.ts +20 -0
  136. package/types/Parse.d.ts +372 -0
  137. package/types/ParseACL.d.ts +137 -0
  138. package/types/ParseCLP.d.ts +289 -0
  139. package/types/ParseConfig.d.ts +69 -0
  140. package/types/ParseError.d.ts +476 -0
  141. package/types/ParseFile.d.ts +188 -0
  142. package/types/ParseGeoPoint.d.ts +104 -0
  143. package/types/ParseHooks.d.ts +27 -0
  144. package/types/ParseInstallation.d.ts +179 -0
  145. package/types/ParseLiveQuery.d.ts +48 -0
  146. package/types/ParseObject.d.ts +1070 -0
  147. package/types/ParseOp.d.ts +76 -0
  148. package/types/ParsePolygon.d.ts +69 -0
  149. package/types/ParseQuery.d.ts +953 -0
  150. package/types/ParseRelation.d.ts +56 -0
  151. package/types/ParseRole.d.ts +79 -0
  152. package/types/ParseSchema.d.ts +270 -0
  153. package/types/ParseSession.d.ts +45 -0
  154. package/types/ParseUser.d.ts +511 -0
  155. package/types/Push.d.ts +62 -0
  156. package/types/RESTController.d.ts +35 -0
  157. package/types/SingleInstanceStateController.d.ts +24 -0
  158. package/types/Socket.weapp.d.ts +10 -0
  159. package/types/Storage.d.ts +14 -0
  160. package/types/StorageController.browser.d.ts +9 -0
  161. package/types/StorageController.d.ts +2 -0
  162. package/types/StorageController.default.d.ts +9 -0
  163. package/types/StorageController.react-native.d.ts +11 -0
  164. package/types/StorageController.weapp.d.ts +9 -0
  165. package/types/TaskQueue.d.ts +11 -0
  166. package/types/UniqueInstanceStateController.d.ts +20 -0
  167. package/types/WebSocketController.d.ts +2 -0
  168. package/types/Xhr.weapp.d.ts +29 -0
  169. package/types/arrayContainsObject.d.ts +2 -0
  170. package/types/canBeSerialized.d.ts +2 -0
  171. package/types/decode.d.ts +1 -0
  172. package/types/encode.d.ts +1 -0
  173. package/types/equals.d.ts +1 -0
  174. package/types/escape.d.ts +1 -0
  175. package/types/eslint.config.mjs +30 -0
  176. package/types/index.d.ts +66 -0
  177. package/types/isRevocableSession.d.ts +1 -0
  178. package/types/node.d.ts +3 -0
  179. package/types/parseDate.d.ts +1 -0
  180. package/types/promiseUtils.d.ts +9 -0
  181. package/types/react-native.d.ts +3 -0
  182. package/types/tests.ts +2256 -0
  183. package/types/tsconfig.json +25 -0
  184. package/types/unique.d.ts +1 -0
  185. package/types/unsavedChildren.d.ts +11 -0
  186. package/types/uuid.d.ts +2 -0
@@ -0,0 +1,372 @@
1
+ import * as ParseOp from './ParseOp';
2
+ import ACL from './ParseACL';
3
+ import * as Analytics from './Analytics';
4
+ import * as Cloud from './Cloud';
5
+ import CLP from './ParseCLP';
6
+ import Config from './ParseConfig';
7
+ import ParseError from './ParseError';
8
+ import File from './ParseFile';
9
+ import GeoPoint from './ParseGeoPoint';
10
+ import Polygon from './ParsePolygon';
11
+ import Installation from './ParseInstallation';
12
+ import ParseObject from './ParseObject';
13
+ import * as Push from './Push';
14
+ import Query from './ParseQuery';
15
+ import Relation from './ParseRelation';
16
+ import Role from './ParseRole';
17
+ import Schema from './ParseSchema';
18
+ import Session from './ParseSession';
19
+ import User from './ParseUser';
20
+ import ParseLiveQuery from './ParseLiveQuery';
21
+ import LiveQueryClient from './LiveQueryClient';
22
+ import type { EventuallyQueue } from './CoreManager';
23
+ declare const Parse: {
24
+ ACL: typeof ACL;
25
+ Analytics: typeof Analytics;
26
+ AnonymousUtils: {
27
+ isLinked(user: User): boolean;
28
+ logIn(options?: import("./RESTController").RequestOptions): Promise<User>;
29
+ link(user: User, options?: import("./RESTController").RequestOptions): Promise<User>;
30
+ isRegistered(): boolean;
31
+ _getAuthProvider(): {
32
+ restoreAuthentication(): boolean;
33
+ getAuthType(): string;
34
+ getAuthData(): {
35
+ authData: {
36
+ id: string;
37
+ };
38
+ };
39
+ };
40
+ };
41
+ Cloud: typeof Cloud;
42
+ CLP: typeof CLP;
43
+ CoreManager: {
44
+ get: (key: string) => any;
45
+ set: (key: string, value: any) => void;
46
+ setIfNeeded: (key: string, value: any) => any;
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;
55
+ setEventEmitter(eventEmitter: any): void;
56
+ getEventEmitter(): any;
57
+ setFileController(controller: import("./CoreManager").FileController): void;
58
+ setEventuallyQueue(controller: EventuallyQueue): void;
59
+ getEventuallyQueue(): EventuallyQueue;
60
+ getFileController(): import("./CoreManager").FileController;
61
+ setInstallationController(controller: import("./CoreManager").InstallationController): void;
62
+ getInstallationController(): import("./CoreManager").InstallationController;
63
+ setLiveQuery(liveQuery: any): void;
64
+ getLiveQuery(): any;
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;
79
+ setStorageController(controller: {
80
+ async: 0;
81
+ getItem: (path: string) => string | null;
82
+ setItem: (path: string, value: string) => void;
83
+ removeItem: (path: string) => void;
84
+ getItemAsync?: (path: string) => Promise<string | null>;
85
+ setItemAsync?: (path: string, value: string) => Promise<void>;
86
+ removeItemAsync?: (path: string) => Promise<void>;
87
+ clear: () => void;
88
+ getAllKeys?: () => string[];
89
+ getAllKeysAsync?: () => Promise<string[]>;
90
+ } | {
91
+ async: 1;
92
+ getItem?: (path: string) => string | null;
93
+ setItem?: (path: string, value: string) => void;
94
+ removeItem?: (path: string) => void;
95
+ getItemAsync: (path: string) => Promise<string | null>;
96
+ setItemAsync: (path: string, value: string) => Promise<void>;
97
+ removeItemAsync: (path: string) => Promise<void>;
98
+ clear: () => void;
99
+ getAllKeys?: () => string[];
100
+ getAllKeysAsync?: () => Promise<string[]>;
101
+ }): void;
102
+ setLocalDatastoreController(controller: import("./CoreManager").LocalDatastoreController): void;
103
+ getLocalDatastoreController(): import("./CoreManager").LocalDatastoreController;
104
+ setLocalDatastore(store: any): void;
105
+ getLocalDatastore(): any;
106
+ getStorageController(): {
107
+ async: 0;
108
+ getItem: (path: string) => string | null;
109
+ setItem: (path: string, value: string) => void;
110
+ removeItem: (path: string) => void;
111
+ getItemAsync?: (path: string) => Promise<string | null>;
112
+ setItemAsync?: (path: string, value: string) => Promise<void>;
113
+ removeItemAsync?: (path: string) => Promise<void>;
114
+ clear: () => void;
115
+ getAllKeys?: () => string[];
116
+ getAllKeysAsync?: () => Promise<string[]>;
117
+ } | {
118
+ async: 1;
119
+ getItem?: (path: string) => string | null;
120
+ setItem?: (path: string, value: string) => void;
121
+ removeItem?: (path: string) => void;
122
+ getItemAsync: (path: string) => Promise<string | null>;
123
+ setItemAsync: (path: string, value: string) => Promise<void>;
124
+ removeItemAsync: (path: string) => Promise<void>;
125
+ clear: () => void;
126
+ getAllKeys?: () => string[];
127
+ getAllKeysAsync?: () => Promise<string[]>;
128
+ };
129
+ setAsyncStorage(storage: import("./CoreManager").AsyncStorageType): void;
130
+ getAsyncStorage(): import("./CoreManager").AsyncStorageType;
131
+ setWebSocketController(controller: new (url: string | URL, protocols?: string | string[] | undefined) => import("./CoreManager").WebSocketController): void;
132
+ getWebSocketController(): new (url: string | URL, protocols?: string | string[] | undefined) => import("./CoreManager").WebSocketController;
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;
139
+ setParseOp(op: any): void;
140
+ getParseOp(): any;
141
+ setParseObject(object: any): void;
142
+ getParseObject(): any;
143
+ setParseQuery(query: any): void;
144
+ getParseQuery(): any;
145
+ setParseRole(role: any): void;
146
+ getParseRole(): any;
147
+ setParseUser(user: any): void;
148
+ getParseUser(): any;
149
+ };
150
+ Config: typeof Config;
151
+ Error: typeof ParseError;
152
+ FacebookUtils: {
153
+ init(options: any): void;
154
+ isLinked(user: any): any;
155
+ logIn(permissions: any, options: any): Promise<User<import("./ParseObject").Attributes>>;
156
+ link(user: any, permissions: any, options: any): any;
157
+ unlink: (user: any, options: any) => any;
158
+ _getAuthProvider(): import("./ParseUser").AuthProvider;
159
+ };
160
+ File: typeof File;
161
+ GeoPoint: typeof GeoPoint;
162
+ Polygon: typeof Polygon;
163
+ Installation: typeof Installation;
164
+ LocalDatastore: {
165
+ isEnabled: boolean;
166
+ isSyncing: boolean;
167
+ fromPinWithName(name: string): Promise<any[]>;
168
+ pinWithName(name: string, value: any): Promise<void>;
169
+ unPinWithName(name: string): Promise<void>;
170
+ _getAllContents(): Promise<any>;
171
+ _getRawStorage(): Promise<any>;
172
+ _clear(): Promise<void>;
173
+ _handlePinAllWithName(name: string, objects: ParseObject[]): Promise<void>;
174
+ _handleUnPinAllWithName(name: string, objects: ParseObject[]): Promise<any[]>;
175
+ _getChildren(object: ParseObject): any;
176
+ _traverse(object: any, encountered: any): void;
177
+ _serializeObjectsFromPinName(name: string): Promise<any[]>;
178
+ _serializeObject(objectKey: string, localDatastore: any): Promise<any>;
179
+ _updateObjectIfPinned(object: ParseObject): Promise<void>;
180
+ _destroyObjectIfPinned(object: ParseObject): Promise<any[]>;
181
+ _updateLocalIdForObject(localId: string, object: ParseObject): Promise<any[]>;
182
+ updateFromServer(): Promise<void>;
183
+ getKeyForObject(object: any): string;
184
+ getPinName(pinName?: string): string;
185
+ checkIfEnabled(): any;
186
+ };
187
+ Object: typeof ParseObject;
188
+ Op: {
189
+ Set: typeof ParseOp.SetOp;
190
+ Unset: typeof ParseOp.UnsetOp;
191
+ Increment: typeof ParseOp.IncrementOp;
192
+ Add: typeof ParseOp.AddOp;
193
+ Remove: typeof ParseOp.RemoveOp;
194
+ AddUnique: typeof ParseOp.AddUniqueOp;
195
+ Relation: typeof ParseOp.RelationOp;
196
+ };
197
+ Push: typeof Push;
198
+ Query: typeof Query;
199
+ Relation: typeof Relation;
200
+ Role: typeof Role;
201
+ Schema: typeof Schema;
202
+ Session: typeof Session;
203
+ Storage: {
204
+ async(): boolean;
205
+ getItem(path: string): string | null;
206
+ getItemAsync(path: string): Promise<string | null>;
207
+ setItem(path: string, value: string): void;
208
+ setItemAsync(path: string, value: string): Promise<void>;
209
+ removeItem(path: string): void;
210
+ removeItemAsync(path: string): Promise<void>;
211
+ getAllKeys(): string[];
212
+ getAllKeysAsync(): Promise<string[]>;
213
+ generatePath(path: string): string;
214
+ _clear(): void;
215
+ };
216
+ User: typeof User;
217
+ LiveQueryClient: typeof LiveQueryClient;
218
+ IndexedDB: any;
219
+ Hooks: any;
220
+ Parse: any;
221
+ /**
222
+ * @member {EventuallyQueue} Parse.EventuallyQueue
223
+ * @static
224
+ */
225
+ EventuallyQueue: EventuallyQueue;
226
+ /**
227
+ * Call this method first to set up your authentication tokens for Parse.
228
+ *
229
+ * @param {string} applicationId Your Parse Application ID.
230
+ * @param {string} [javaScriptKey] Your Parse JavaScript Key (Not needed for parse-server)
231
+ * @param {string} [masterKey] Your Parse Master Key. (Node.js only!)
232
+ * @static
233
+ */
234
+ initialize(applicationId: string, javaScriptKey: string): void;
235
+ _initialize(applicationId: string, javaScriptKey: string, masterKey?: string, maintenanceKey?: string): void;
236
+ /**
237
+ * Call this method to set your AsyncStorage engine
238
+ * Starting Parse@1.11, the ParseSDK do not provide a React AsyncStorage as the ReactNative module
239
+ * is not provided at a stable path and changes over versions.
240
+ *
241
+ * @param {AsyncStorage} storage a react native async storage.
242
+ * @static
243
+ */
244
+ setAsyncStorage(storage: any): void;
245
+ /**
246
+ * Call this method to set your LocalDatastoreStorage engine
247
+ * If using React-Native use {@link Parse.setAsyncStorage Parse.setAsyncStorage()}
248
+ *
249
+ * @param {LocalDatastoreController} controller a data storage.
250
+ * @static
251
+ */
252
+ setLocalDatastoreController(controller: any): void;
253
+ /**
254
+ * Returns information regarding the current server's health
255
+ *
256
+ * @returns {Promise}
257
+ * @static
258
+ */
259
+ getServerHealth(): Promise<any>;
260
+ /**
261
+ * @member {string} Parse.applicationId
262
+ * @static
263
+ */
264
+ applicationId: any;
265
+ /**
266
+ * @member {string} Parse.javaScriptKey
267
+ * @static
268
+ */
269
+ javaScriptKey: any;
270
+ /**
271
+ * @member {string} Parse.masterKey
272
+ * @static
273
+ */
274
+ masterKey: any;
275
+ /**
276
+ * @member {string} Parse.maintenanceKey
277
+ * @static
278
+ */
279
+ maintenanceKey: any;
280
+ /**
281
+ * @member {string} Parse.serverURL
282
+ * @static
283
+ */
284
+ serverURL: any;
285
+ /**
286
+ * @member {string} Parse.serverAuthToken
287
+ * @static
288
+ */
289
+ serverAuthToken: any;
290
+ /**
291
+ * @member {string} Parse.serverAuthType
292
+ * @static
293
+ */
294
+ serverAuthType: any;
295
+ /**
296
+ * @member {ParseLiveQuery} Parse.LiveQuery
297
+ * @static
298
+ */
299
+ LiveQuery: ParseLiveQuery;
300
+ /**
301
+ * @member {string} Parse.liveQueryServerURL
302
+ * @static
303
+ */
304
+ liveQueryServerURL: any;
305
+ /**
306
+ * @member {boolean} Parse.encryptedUser
307
+ * @static
308
+ */
309
+ encryptedUser: boolean;
310
+ /**
311
+ * @member {string} Parse.secret
312
+ * @static
313
+ */
314
+ secret: any;
315
+ /**
316
+ * @member {boolean} Parse.idempotency
317
+ * @static
318
+ */
319
+ idempotency: any;
320
+ /**
321
+ * @member {boolean} Parse.allowCustomObjectId
322
+ * @static
323
+ */
324
+ allowCustomObjectId: any;
325
+ _request(...args: any[]): any;
326
+ _ajax(...args: any[]): any;
327
+ _decode(_: any, value: any): any;
328
+ _encode(value: any, _: any, disallowObjects: any): any;
329
+ _getInstallationId(): Promise<string>;
330
+ /**
331
+ * Enable pinning in your application.
332
+ * This must be called after `Parse.initialize` in your application.
333
+ *
334
+ * @param [polling] Allow pinging the server /health endpoint. Default true
335
+ * @param [ms] Milliseconds to ping the server. Default 2000ms
336
+ * @static
337
+ */
338
+ enableLocalDatastore(polling?: boolean, ms?: number): void;
339
+ /**
340
+ * Flag that indicates whether Local Datastore is enabled.
341
+ *
342
+ * @static
343
+ * @returns {boolean}
344
+ */
345
+ isLocalDatastoreEnabled(): boolean;
346
+ /**
347
+ * Gets all contents from Local Datastore
348
+ *
349
+ * <pre>
350
+ * await Parse.dumpLocalDatastore();
351
+ * </pre>
352
+ *
353
+ * @static
354
+ * @returns {object}
355
+ */
356
+ dumpLocalDatastore(): Promise<any>;
357
+ /**
358
+ * Enable the current user encryption.
359
+ * This must be called before login any user.
360
+ *
361
+ * @static
362
+ */
363
+ enableEncryptedUser(): void;
364
+ /**
365
+ * Flag that indicates whether Encrypted User is enabled.
366
+ *
367
+ * @static
368
+ * @returns {boolean}
369
+ */
370
+ isEncryptedUserEnabled(): any;
371
+ };
372
+ export default Parse;
@@ -0,0 +1,137 @@
1
+ import type ParseRole from './ParseRole';
2
+ import type ParseUser from './ParseUser';
3
+ type PermissionsMap = Record<string, boolean>;
4
+ type ByIdMap = Record<string, PermissionsMap>;
5
+ /**
6
+ * Creates a new ACL.
7
+ * If no argument is given, the ACL has no permissions for anyone.
8
+ * If the argument is a Parse.User, the ACL will have read and write
9
+ * permission for only that user.
10
+ * If the argument is any other JSON object, that object will be interpretted
11
+ * as a serialized ACL created with toJSON().
12
+ *
13
+ * <p>An ACL, or Access Control List can be added to any
14
+ * <code>Parse.Object</code> to restrict access to only a subset of users
15
+ * of your application.</p>
16
+ *
17
+ * @alias Parse.ACL
18
+ */
19
+ declare class ParseACL {
20
+ permissionsById: ByIdMap;
21
+ /**
22
+ * @param {(Parse.User | object | null)} arg1 The user to initialize the ACL for
23
+ */
24
+ constructor(arg1?: ParseUser | ByIdMap | null);
25
+ /**
26
+ * Returns a JSON-encoded version of the ACL.
27
+ *
28
+ * @returns {object}
29
+ */
30
+ toJSON(): ByIdMap;
31
+ /**
32
+ * Returns whether this ACL is equal to another object
33
+ *
34
+ * @param {ParseACL} other The other object's ACL to compare to
35
+ * @returns {boolean}
36
+ */
37
+ equals(other: ParseACL): boolean;
38
+ _setAccess(accessType: string, userId: ParseUser | ParseRole | string, allowed: boolean): void;
39
+ _getAccess(accessType: string, userId: ParseUser | ParseRole | string): boolean;
40
+ /**
41
+ * Sets whether the given user is allowed to read this object.
42
+ *
43
+ * @param userId An instance of Parse.User or its objectId.
44
+ * @param {boolean} allowed Whether that user should have read access.
45
+ */
46
+ setReadAccess(userId: ParseUser | ParseRole | string, allowed: boolean): void;
47
+ /**
48
+ * Get whether the given user id is *explicitly* allowed to read this object.
49
+ * Even if this returns false, the user may still be able to access it if
50
+ * getPublicReadAccess returns true or a role that the user belongs to has
51
+ * write access.
52
+ *
53
+ * @param userId An instance of Parse.User or its objectId, or a Parse.Role.
54
+ * @returns {boolean}
55
+ */
56
+ getReadAccess(userId: ParseUser | ParseRole | string): boolean;
57
+ /**
58
+ * Sets whether the given user id is allowed to write this object.
59
+ *
60
+ * @param userId An instance of Parse.User or its objectId, or a Parse.Role..
61
+ * @param {boolean} allowed Whether that user should have write access.
62
+ */
63
+ setWriteAccess(userId: ParseUser | ParseRole | string, allowed: boolean): void;
64
+ /**
65
+ * Gets whether the given user id is *explicitly* allowed to write this object.
66
+ * Even if this returns false, the user may still be able to write it if
67
+ * getPublicWriteAccess returns true or a role that the user belongs to has
68
+ * write access.
69
+ *
70
+ * @param userId An instance of Parse.User or its objectId, or a Parse.Role.
71
+ * @returns {boolean}
72
+ */
73
+ getWriteAccess(userId: ParseUser | ParseRole | string): boolean;
74
+ /**
75
+ * Sets whether the public is allowed to read this object.
76
+ *
77
+ * @param {boolean} allowed
78
+ */
79
+ setPublicReadAccess(allowed: boolean): void;
80
+ /**
81
+ * Gets whether the public is allowed to read this object.
82
+ *
83
+ * @returns {boolean}
84
+ */
85
+ getPublicReadAccess(): boolean;
86
+ /**
87
+ * Sets whether the public is allowed to write this object.
88
+ *
89
+ * @param {boolean} allowed
90
+ */
91
+ setPublicWriteAccess(allowed: boolean): void;
92
+ /**
93
+ * Gets whether the public is allowed to write this object.
94
+ *
95
+ * @returns {boolean}
96
+ */
97
+ getPublicWriteAccess(): boolean;
98
+ /**
99
+ * Gets whether users belonging to the given role are allowed
100
+ * to read this object. Even if this returns false, the role may
101
+ * still be able to write it if a parent role has read access.
102
+ *
103
+ * @param role The name of the role, or a Parse.Role object.
104
+ * @returns {boolean} true if the role has read access. false otherwise.
105
+ * @throws {TypeError} If role is neither a Parse.Role nor a String.
106
+ */
107
+ getRoleReadAccess(role: ParseRole | string): boolean;
108
+ /**
109
+ * Gets whether users belonging to the given role are allowed
110
+ * to write this object. Even if this returns false, the role may
111
+ * still be able to write it if a parent role has write access.
112
+ *
113
+ * @param role The name of the role, or a Parse.Role object.
114
+ * @returns {boolean} true if the role has write access. false otherwise.
115
+ * @throws {TypeError} If role is neither a Parse.Role nor a String.
116
+ */
117
+ getRoleWriteAccess(role: ParseRole | string): boolean;
118
+ /**
119
+ * Sets whether users belonging to the given role are allowed
120
+ * to read this object.
121
+ *
122
+ * @param role The name of the role, or a Parse.Role object.
123
+ * @param {boolean} allowed Whether the given role can read this object.
124
+ * @throws {TypeError} If role is neither a Parse.Role nor a String.
125
+ */
126
+ setRoleReadAccess(role: ParseRole | string, allowed: boolean): void;
127
+ /**
128
+ * Sets whether users belonging to the given role are allowed
129
+ * to write this object.
130
+ *
131
+ * @param role The name of the role, or a Parse.Role object.
132
+ * @param {boolean} allowed Whether the given role can write this object.
133
+ * @throws {TypeError} If role is neither a Parse.Role nor a String.
134
+ */
135
+ setRoleWriteAccess(role: ParseRole | string, allowed: boolean): void;
136
+ }
137
+ export default ParseACL;