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.
- package/README.md +0 -8
- package/dist/parse.js +31 -49
- package/dist/parse.min.js +2 -2
- package/dist/parse.weapp.js +31 -49
- package/dist/parse.weapp.min.js +2 -2
- package/lib/browser/CoreManager.js +1 -2
- package/lib/browser/CryptoController.js +0 -1
- package/lib/browser/EventEmitter.js +0 -1
- package/lib/browser/EventuallyQueue.js +0 -1
- package/lib/browser/IndexedDBStorageController.js +0 -1
- package/lib/browser/InstallationController.js +0 -1
- package/lib/browser/LocalDatastore.js +0 -1
- package/lib/browser/LocalDatastoreController.default.js +0 -1
- package/lib/browser/LocalDatastoreController.js +0 -1
- package/lib/browser/LocalDatastoreController.react-native.js +0 -1
- package/lib/browser/OfflineQuery.js +0 -1
- package/lib/browser/ParseInstallation.js +0 -1
- package/lib/browser/ParseObject.js +2 -1
- package/lib/browser/ParseOp.js +1 -1
- package/lib/browser/ParseQuery.js +19 -17
- package/lib/browser/RESTController.js +4 -3
- package/lib/browser/Socket.weapp.js +0 -1
- package/lib/browser/Storage.js +0 -1
- package/lib/browser/StorageController.browser.js +0 -1
- package/lib/browser/StorageController.default.js +0 -1
- package/lib/browser/StorageController.js +0 -1
- package/lib/browser/StorageController.react-native.js +0 -1
- package/lib/browser/StorageController.weapp.js +0 -1
- package/lib/browser/TaskQueue.js +1 -1
- package/lib/browser/WebSocketController.js +0 -1
- package/lib/browser/Xhr.weapp.js +0 -1
- package/lib/browser/uuid.js +0 -1
- package/lib/node/CoreManager.js +1 -2
- package/lib/node/CryptoController.js +0 -1
- package/lib/node/EventEmitter.js +0 -1
- package/lib/node/EventuallyQueue.js +0 -1
- package/lib/node/IndexedDBStorageController.js +0 -1
- package/lib/node/InstallationController.js +0 -1
- package/lib/node/LocalDatastore.js +0 -1
- package/lib/node/LocalDatastoreController.default.js +0 -1
- package/lib/node/LocalDatastoreController.js +0 -1
- package/lib/node/LocalDatastoreController.react-native.js +0 -1
- package/lib/node/OfflineQuery.js +0 -1
- package/lib/node/ParseInstallation.js +0 -1
- package/lib/node/ParseObject.js +2 -1
- package/lib/node/ParseOp.js +1 -1
- package/lib/node/RESTController.js +0 -1
- package/lib/node/Socket.weapp.js +0 -1
- package/lib/node/Storage.js +0 -1
- package/lib/node/StorageController.browser.js +0 -1
- package/lib/node/StorageController.default.js +0 -1
- package/lib/node/StorageController.js +0 -1
- package/lib/node/StorageController.react-native.js +0 -1
- package/lib/node/StorageController.weapp.js +0 -1
- package/lib/node/TaskQueue.js +1 -1
- package/lib/node/WebSocketController.js +0 -1
- package/lib/node/Xhr.weapp.js +0 -1
- package/lib/node/uuid.js +0 -1
- package/lib/react-native/CoreManager.js +1 -2
- package/lib/react-native/CryptoController.js +0 -1
- package/lib/react-native/EventEmitter.js +0 -1
- package/lib/react-native/EventuallyQueue.js +0 -1
- package/lib/react-native/IndexedDBStorageController.js +0 -1
- package/lib/react-native/InstallationController.js +0 -1
- package/lib/react-native/LocalDatastore.js +0 -1
- package/lib/react-native/LocalDatastoreController.default.js +0 -1
- package/lib/react-native/LocalDatastoreController.js +0 -1
- package/lib/react-native/LocalDatastoreController.react-native.js +0 -1
- package/lib/react-native/ObjectStateMutations.js +13 -13
- package/lib/react-native/OfflineQuery.js +0 -1
- package/lib/react-native/ParseACL.js +7 -7
- package/lib/react-native/ParseCLP.js +15 -15
- package/lib/react-native/ParseInstallation.js +0 -1
- package/lib/react-native/ParseObject.js +9 -9
- package/lib/react-native/ParseUser.js +15 -15
- package/lib/react-native/RESTController.js +0 -1
- package/lib/react-native/Socket.weapp.js +0 -1
- package/lib/react-native/Storage.js +0 -1
- package/lib/react-native/StorageController.browser.js +0 -1
- package/lib/react-native/StorageController.default.js +0 -1
- package/lib/react-native/StorageController.js +0 -1
- package/lib/react-native/StorageController.react-native.js +0 -1
- package/lib/react-native/StorageController.weapp.js +0 -1
- package/lib/react-native/TaskQueue.js +0 -1
- package/lib/react-native/WebSocketController.js +0 -1
- package/lib/react-native/Xhr.weapp.js +0 -1
- package/lib/react-native/uuid.js +0 -1
- package/lib/weapp/CoreManager.js +1 -2
- package/lib/weapp/CryptoController.js +0 -1
- package/lib/weapp/EventEmitter.js +0 -1
- package/lib/weapp/EventuallyQueue.js +0 -1
- package/lib/weapp/IndexedDBStorageController.js +0 -1
- package/lib/weapp/InstallationController.js +0 -1
- package/lib/weapp/LocalDatastore.js +0 -1
- package/lib/weapp/LocalDatastoreController.default.js +0 -1
- package/lib/weapp/LocalDatastoreController.js +0 -1
- package/lib/weapp/LocalDatastoreController.react-native.js +0 -1
- package/lib/weapp/OfflineQuery.js +0 -1
- package/lib/weapp/ParseInstallation.js +0 -1
- package/lib/weapp/ParseObject.js +2 -1
- package/lib/weapp/ParseOp.js +1 -1
- package/lib/weapp/ParseQuery.js +19 -17
- package/lib/weapp/RESTController.js +4 -3
- package/lib/weapp/Socket.weapp.js +0 -1
- package/lib/weapp/Storage.js +0 -1
- package/lib/weapp/StorageController.browser.js +0 -1
- package/lib/weapp/StorageController.default.js +0 -1
- package/lib/weapp/StorageController.js +0 -1
- package/lib/weapp/StorageController.react-native.js +0 -1
- package/lib/weapp/StorageController.weapp.js +0 -1
- package/lib/weapp/TaskQueue.js +1 -1
- package/lib/weapp/WebSocketController.js +0 -1
- package/lib/weapp/Xhr.weapp.js +0 -1
- package/lib/weapp/uuid.js +0 -1
- package/package.json +14 -12
- package/types/Analytics.d.ts +40 -0
- package/types/AnonymousUtils.d.ts +84 -0
- package/types/Cloud.d.ts +65 -0
- package/types/CloudCode.d.ts +307 -0
- package/types/CoreManager.d.ts +319 -0
- package/types/CryptoController.d.ts +5 -0
- package/types/EventEmitter.d.ts +5 -0
- package/types/EventuallyQueue.d.ts +168 -0
- package/types/FacebookUtils.d.ts +107 -0
- package/types/IndexedDBStorageController.d.ts +2 -0
- package/types/InstallationController.d.ts +10 -0
- package/types/LiveQueryClient.d.ts +128 -0
- package/types/LiveQuerySubscription.d.ts +103 -0
- package/types/LocalDatastore.d.ts +56 -0
- package/types/LocalDatastoreController.d.ts +2 -0
- package/types/LocalDatastoreController.default.d.ts +9 -0
- package/types/LocalDatastoreController.react-native.d.ts +9 -0
- package/types/LocalDatastoreUtils.d.ts +5 -0
- package/types/ObjectStateMutations.d.ts +22 -0
- package/types/OfflineQuery.d.ts +20 -0
- package/types/Parse.d.ts +372 -0
- package/types/ParseACL.d.ts +137 -0
- package/types/ParseCLP.d.ts +289 -0
- package/types/ParseConfig.d.ts +69 -0
- package/types/ParseError.d.ts +476 -0
- package/types/ParseFile.d.ts +188 -0
- package/types/ParseGeoPoint.d.ts +104 -0
- package/types/ParseHooks.d.ts +27 -0
- package/types/ParseInstallation.d.ts +179 -0
- package/types/ParseLiveQuery.d.ts +48 -0
- package/types/ParseObject.d.ts +1070 -0
- package/types/ParseOp.d.ts +76 -0
- package/types/ParsePolygon.d.ts +69 -0
- package/types/ParseQuery.d.ts +953 -0
- package/types/ParseRelation.d.ts +56 -0
- package/types/ParseRole.d.ts +79 -0
- package/types/ParseSchema.d.ts +270 -0
- package/types/ParseSession.d.ts +45 -0
- package/types/ParseUser.d.ts +511 -0
- package/types/Push.d.ts +62 -0
- package/types/RESTController.d.ts +35 -0
- package/types/SingleInstanceStateController.d.ts +24 -0
- package/types/Socket.weapp.d.ts +10 -0
- package/types/Storage.d.ts +14 -0
- package/types/StorageController.browser.d.ts +9 -0
- package/types/StorageController.d.ts +2 -0
- package/types/StorageController.default.d.ts +9 -0
- package/types/StorageController.react-native.d.ts +11 -0
- package/types/StorageController.weapp.d.ts +9 -0
- package/types/TaskQueue.d.ts +11 -0
- package/types/UniqueInstanceStateController.d.ts +20 -0
- package/types/WebSocketController.d.ts +2 -0
- package/types/Xhr.weapp.d.ts +29 -0
- package/types/arrayContainsObject.d.ts +2 -0
- package/types/canBeSerialized.d.ts +2 -0
- package/types/decode.d.ts +1 -0
- package/types/encode.d.ts +1 -0
- package/types/equals.d.ts +1 -0
- package/types/escape.d.ts +1 -0
- package/types/eslint.config.mjs +30 -0
- package/types/index.d.ts +66 -0
- package/types/isRevocableSession.d.ts +1 -0
- package/types/node.d.ts +3 -0
- package/types/parseDate.d.ts +1 -0
- package/types/promiseUtils.d.ts +9 -0
- package/types/react-native.d.ts +3 -0
- package/types/tests.ts +2256 -0
- package/types/tsconfig.json +25 -0
- package/types/unique.d.ts +1 -0
- package/types/unsavedChildren.d.ts +11 -0
- package/types/uuid.d.ts +2 -0
package/types/Parse.d.ts
ADDED
|
@@ -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;
|