@secrecy/lib 1.0.0-dev.21 → 1.0.0-dev.22
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 -1
- package/lib/BaseClient.d.ts +10 -10
- package/lib/BaseClient.js +448 -57
- package/lib/client/admin/index.d.ts +1 -1
- package/lib/client/admin/index.js +42 -7
- package/lib/client/index.d.ts +34 -34
- package/lib/client/index.js +1924 -247
- package/lib/zeus/const.js +422 -50
- package/lib/zeus/index.d.ts +1419 -291
- package/lib/zeus/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
package/lib/BaseClient.d.ts
CHANGED
|
@@ -211,10 +211,10 @@ export declare class BaseClient {
|
|
|
211
211
|
firstname: string | null;
|
|
212
212
|
lastname: string | null;
|
|
213
213
|
lang: Lang | null;
|
|
214
|
-
}): Promise<User>;
|
|
214
|
+
}): Promise<SuccessResponse<User> | ErrorNotFound | ErrorAccessDenied | null>;
|
|
215
215
|
static plans(env: SecrecyEnv, sessionId?: string | null | undefined): Promise<SuccessResponse<Plan[]> | null>;
|
|
216
|
-
pay(planCode: SecrecyPlansCodes, input: PayInput, autoRenew?: boolean | null | undefined): Promise<boolean>;
|
|
217
|
-
cancelPayment(): Promise<boolean>;
|
|
216
|
+
pay(planCode: SecrecyPlansCodes, input: PayInput, autoRenew?: boolean | null | undefined): Promise<SuccessResponse<boolean> | ErrorAccessDenied | null>;
|
|
217
|
+
cancelPayment(): Promise<SuccessResponse<boolean> | ErrorAccessDenied | null>;
|
|
218
218
|
paymentInfos(): Promise<SuccessResponse<PaymentInfos> | ErrorAccessDenied | null>;
|
|
219
219
|
limits(): Promise<SuccessResponse<QueryLimits> | ErrorAccessDenied | ErrorNotExist | ErrorLimit | ErrorNotFound | null>;
|
|
220
220
|
godFatherAndChildren(): Promise<SuccessResponse<GodFatherAndChildren> | ErrorNotFound | null>;
|
|
@@ -223,7 +223,7 @@ export declare class BaseClient {
|
|
|
223
223
|
config: AppDBConfig;
|
|
224
224
|
env: SecrecyEnv;
|
|
225
225
|
sessionId?: string | null | undefined;
|
|
226
|
-
}): Promise<AppDBConfig>;
|
|
226
|
+
}): Promise<SuccessResponse<AppDBConfig> | ErrorAccessDenied | null>;
|
|
227
227
|
static getAppDBConfig(appCode: string, env: SecrecyEnv, sessionId?: string | null | undefined): Promise<SuccessResponse<AppDBConfig> | ErrorAccessDenied | ErrorNotFound | ErrorNotExist | null>;
|
|
228
228
|
static getFAQ({ lang, env, sessionId }: {
|
|
229
229
|
lang?: Lang;
|
|
@@ -235,12 +235,12 @@ export declare class BaseClient {
|
|
|
235
235
|
lang?: Lang | null | undefined;
|
|
236
236
|
sessionId?: string | null | undefined;
|
|
237
237
|
}): Promise<SuccessResponse<BlogItem[]> | ErrorLangNotExist | null>;
|
|
238
|
-
reportUser(reportedUserId: string, customMessage?: string): Promise<SendReport |
|
|
238
|
+
reportUser(reportedUserId: string, customMessage?: string): Promise<SuccessResponse<SendReport> | ErrorAccessDenied | ErrorNotFound | null>;
|
|
239
239
|
static deleteUser({ sessionId, userId, env }: {
|
|
240
240
|
sessionId: string;
|
|
241
241
|
userId?: string;
|
|
242
242
|
env: SecrecyEnv;
|
|
243
|
-
}): Promise<boolean>;
|
|
243
|
+
}): Promise<SuccessResponse<boolean> | ErrorAccessDenied | null>;
|
|
244
244
|
dbGet<U>({ field, userId }: {
|
|
245
245
|
field: string;
|
|
246
246
|
userId?: string | null | undefined;
|
|
@@ -248,22 +248,22 @@ export declare class BaseClient {
|
|
|
248
248
|
dbSet<T extends UserData, U extends Document>({ value, userId }: {
|
|
249
249
|
value: U;
|
|
250
250
|
userId?: string | null | undefined;
|
|
251
|
-
}): Promise<T>;
|
|
251
|
+
}): Promise<SuccessResponse<T> | ErrorAccessDenied | ErrorNotFound | null>;
|
|
252
252
|
dbSearch<T>({ search, field }: {
|
|
253
253
|
field: string;
|
|
254
254
|
search: string;
|
|
255
255
|
}): Promise<SuccessResponse<T[]> | ErrorAccessDenied | ErrorBasic | ErrorNotExist | null>;
|
|
256
256
|
deleteFolder({ id }: {
|
|
257
257
|
id: string;
|
|
258
|
-
}): Promise<boolean>;
|
|
258
|
+
}): Promise<SuccessResponse<boolean> | ErrorNotExist | ErrorAccessDenied | null>;
|
|
259
259
|
moveFolders({ foldersId, parentFolderId }: {
|
|
260
260
|
foldersId: string[];
|
|
261
261
|
parentFolderId?: string | null | undefined;
|
|
262
|
-
}): Promise<boolean>;
|
|
262
|
+
}): Promise<SuccessResponse<boolean> | ErrorAccessDenied | null>;
|
|
263
263
|
moveFiles({ filesId, parentFolderId }: {
|
|
264
264
|
filesId: string[];
|
|
265
265
|
parentFolderId?: string | null | undefined;
|
|
266
|
-
}): Promise<boolean>;
|
|
266
|
+
}): Promise<SuccessResponse<boolean> | ErrorAccessDenied | null>;
|
|
267
267
|
folderSize({ folderId }: {
|
|
268
268
|
folderId?: string | null | undefined;
|
|
269
269
|
}): Promise<SuccessResponse<FolderSize> | ErrorAccessDenied | null>;
|