Skip to content

Commit 3d7ca81

Browse files
committed
build types
1 parent a7a1aaf commit 3d7ca81

File tree

3 files changed

+26
-35
lines changed

3 files changed

+26
-35
lines changed

types/CoreManager.d.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,13 @@ type ConfigController = {
3535
}) => Promise<void>;
3636
};
3737
type CryptoController = {
38-
encrypt: (obj: any, secretKey: string) => string;
39-
decrypt: (encryptedText: string, secretKey: any) => string;
38+
async: 0;
39+
encrypt: (json: any, parseSecret: any) => string;
40+
decrypt: (encryptedJSON: string, secretKey: any) => string;
41+
} | {
42+
async: 1;
43+
encrypt: (json: any, parseSecret: any) => Promise<string>;
44+
decrypt: (encryptedJSON: string, secretKey: any) => Promise<string>;
4045
};
4146
type FileController = {
4247
saveFile: (name: string, source: FileSource, options?: FullOptions) => Promise<any>;

types/CryptoController.d.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
declare const CryptoController: {
2-
encrypt(obj: any, secretKey: string): string;
3-
decrypt(encryptedText: string, secretKey: string): string;
2+
async: number;
3+
encrypt(json: any, parseSecret: any): Promise<string>;
4+
decrypt(encryptedJSON: string, parseSecret: any): Promise<string>;
45
};
56
export default CryptoController;

types/Parse.d.ts

Lines changed: 16 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,22 @@ declare const Parse: {
8484
}) => Promise<void>;
8585
};
8686
setCryptoController(controller: {
87-
encrypt: (obj: any, secretKey: string) => string;
88-
decrypt: (encryptedText: string, secretKey: any) => string;
87+
async: 0;
88+
encrypt: (json: any, parseSecret: any) => string;
89+
decrypt: (encryptedJSON: string, secretKey: any) => string;
90+
} | {
91+
async: 1;
92+
encrypt: (json: any, parseSecret: any) => Promise<string>;
93+
decrypt: (encryptedJSON: string, secretKey: any) => Promise<string>;
8994
}): void;
9095
getCryptoController(): {
91-
encrypt: (obj: any, secretKey: string) => string;
92-
decrypt: (encryptedText: string, secretKey: any) => string;
96+
async: 0;
97+
encrypt: (json: any, parseSecret: any) => string;
98+
decrypt: (encryptedJSON: string, secretKey: any) => string;
99+
} | {
100+
async: 1;
101+
encrypt: (json: any, parseSecret: any) => Promise<string>;
102+
decrypt: (encryptedJSON: string, secretKey: any) => Promise<string>;
93103
};
94104
setEventEmitter(eventEmitter: any): void;
95105
getEventEmitter(): any;
@@ -223,21 +233,15 @@ declare const Parse: {
223233
purge: (className: string) => Promise<any>;
224234
get: (className: string, options?: import("./RESTController").RequestOptions) => Promise<any>;
225235
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>;
236+
create: (className: string, params: any, options?: import("./RESTController").RequestOptions) => Promise<any>;
230237
update: (className: string, params: any, options?: import("./RESTController").RequestOptions) => Promise<any>;
231238
send(className: string, method: string, params: any, options?: import("./RESTController").RequestOptions): Promise<any>;
232239
}): void;
233240
getSchemaController(): {
234241
purge: (className: string) => Promise<any>;
235242
get: (className: string, options?: import("./RESTController").RequestOptions) => Promise<any>;
236243
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>;
244+
create: (className: string, params: any, options?: import("./RESTController").RequestOptions) => Promise<any>;
241245
update: (className: string, params: any, options?: import("./RESTController").RequestOptions) => Promise<any>;
242246
send(className: string, method: string, params: any, options?: import("./RESTController").RequestOptions): Promise<any>;
243247
};
@@ -563,11 +567,6 @@ declare const Parse: {
563567
* @static
564568
*/
565569
liveQueryServerURL: any;
566-
/**
567-
* @member {boolean} Parse.encryptedUser
568-
* @static
569-
*/
570-
encryptedUser: boolean;
571570
/**
572571
* @member {string} Parse.secret
573572
* @static
@@ -615,19 +614,5 @@ declare const Parse: {
615614
* @returns {object}
616615
*/
617616
dumpLocalDatastore(): Promise<any>;
618-
/**
619-
* Enable the current user encryption.
620-
* This must be called before login any user.
621-
*
622-
* @static
623-
*/
624-
enableEncryptedUser(): void;
625-
/**
626-
* Flag that indicates whether Encrypted User is enabled.
627-
*
628-
* @static
629-
* @returns {boolean}
630-
*/
631-
isEncryptedUserEnabled(): any;
632617
};
633618
export default Parse;

0 commit comments

Comments
 (0)