@secrecy/lib 1.0.0-dev.8 → 1.0.0-dev.81

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 (127) hide show
  1. package/README.md +1 -1
  2. package/dist/BaseClient.d.ts +104 -0
  3. package/dist/BaseClient.js +430 -0
  4. package/{lib → dist}/PopupTools.d.ts +1 -1
  5. package/dist/PopupTools.js +196 -0
  6. package/{lib → dist}/ZeusThunder.d.ts +0 -0
  7. package/dist/ZeusThunder.js +65 -0
  8. package/dist/cache.d.ts +6 -0
  9. package/dist/cache.js +4 -0
  10. package/dist/client/SecrecyAppClient.d.ts +17 -0
  11. package/dist/client/SecrecyAppClient.js +227 -0
  12. package/dist/client/SecrecyCloudClient.d.ts +89 -0
  13. package/dist/client/SecrecyCloudClient.js +1411 -0
  14. package/dist/client/SecrecyDbClient.d.ts +21 -0
  15. package/dist/client/SecrecyDbClient.js +177 -0
  16. package/dist/client/SecrecyMailClient.d.ts +42 -0
  17. package/dist/client/SecrecyMailClient.js +1022 -0
  18. package/dist/client/SecrecyPayClient.d.ts +28 -0
  19. package/dist/client/SecrecyPayClient.js +68 -0
  20. package/dist/client/SecrecyWalletClient.d.ts +30 -0
  21. package/dist/client/SecrecyWalletClient.js +73 -0
  22. package/{lib → dist}/client/convert/file.d.ts +3 -3
  23. package/dist/client/convert/file.js +33 -0
  24. package/dist/client/convert/mail.d.ts +3 -0
  25. package/dist/client/convert/mail.js +43 -0
  26. package/dist/client/convert/node.d.ts +9 -0
  27. package/dist/client/convert/node.js +88 -0
  28. package/{lib → dist}/client/helpers.d.ts +6 -1
  29. package/dist/client/helpers.js +119 -0
  30. package/dist/client/index.d.ts +34 -0
  31. package/dist/client/index.js +46 -0
  32. package/{lib → dist}/client/storage.d.ts +0 -0
  33. package/dist/client/storage.js +12 -0
  34. package/dist/client/types/File.d.ts +14 -0
  35. package/dist/client/types/File.js +3 -0
  36. package/{lib → dist}/client/types/Inputs.d.ts +2 -7
  37. package/dist/client/types/Inputs.js +3 -0
  38. package/dist/client/types/Node.d.ts +56 -0
  39. package/dist/client/types/Node.js +3 -0
  40. package/{lib → dist}/client/types/UserAppNotifications.d.ts +1 -1
  41. package/dist/client/types/UserAppNotifications.js +3 -0
  42. package/{lib → dist}/client/types/UserAppSettings.d.ts +1 -3
  43. package/dist/client/types/UserAppSettings.js +3 -0
  44. package/{lib → dist}/client/types/index.d.ts +9 -43
  45. package/dist/client/types/index.js +8 -0
  46. package/dist/client/types/selectors.d.ts +400 -0
  47. package/dist/client/types/selectors.js +135 -0
  48. package/{lib → dist}/crypto/file.d.ts +0 -0
  49. package/dist/crypto/file.js +195 -0
  50. package/{lib → dist}/crypto/index.d.ts +0 -0
  51. package/dist/crypto/index.js +45 -0
  52. package/dist/error.d.ts +33 -0
  53. package/dist/error.js +3 -0
  54. package/dist/index.d.ts +14 -0
  55. package/dist/index.js +10 -0
  56. package/{lib → dist}/minify/index.d.ts +0 -0
  57. package/dist/minify/index.js +23 -0
  58. package/{lib → dist}/minify/lz4.d.ts +0 -0
  59. package/dist/minify/lz4.js +539 -0
  60. package/{lib → dist}/sodium.d.ts +0 -0
  61. package/dist/sodium.js +6 -0
  62. package/{lib → dist}/utils/store-buddy.d.ts +0 -0
  63. package/dist/utils/store-buddy.js +58 -0
  64. package/{lib → dist}/utils/time.d.ts +0 -0
  65. package/dist/utils/time.js +12 -0
  66. package/{lib → dist/utils}/utils.d.ts +0 -0
  67. package/dist/utils/utils.js +47 -0
  68. package/{lib → dist}/worker/md5.d.ts +0 -0
  69. package/dist/worker/md5.js +24 -0
  70. package/{lib → dist}/worker/sodium.d.ts +0 -0
  71. package/dist/worker/sodium.js +118 -0
  72. package/{lib → dist}/worker/workerCodes.d.ts +0 -0
  73. package/dist/worker/workerCodes.js +255 -0
  74. package/{lib → dist}/zeus/const.d.ts +5 -0
  75. package/dist/zeus/const.js +1670 -0
  76. package/dist/zeus/index.d.ts +7896 -0
  77. package/dist/zeus/index.js +602 -0
  78. package/package.json +64 -54
  79. package/lib/BaseClient.d.ts +0 -266
  80. package/lib/BaseClient.js +0 -1332
  81. package/lib/PopupTools.js +0 -213
  82. package/lib/ZeusThunder.js +0 -112
  83. package/lib/cache.d.ts +0 -7
  84. package/lib/cache.js +0 -5
  85. package/lib/client/convert/file.js +0 -39
  86. package/lib/client/convert/folder.d.ts +0 -8
  87. package/lib/client/convert/folder.js +0 -264
  88. package/lib/client/convert/mail.d.ts +0 -3
  89. package/lib/client/convert/mail.js +0 -46
  90. package/lib/client/convert/vFile.d.ts +0 -5
  91. package/lib/client/convert/vFile.js +0 -164
  92. package/lib/client/helpers.js +0 -116
  93. package/lib/client/index.d.ts +0 -168
  94. package/lib/client/index.js +0 -3795
  95. package/lib/client/storage.js +0 -12
  96. package/lib/client/types/File.d.ts +0 -21
  97. package/lib/client/types/File.js +0 -2
  98. package/lib/client/types/FilesOnUsersOnApplications.d.ts +0 -9
  99. package/lib/client/types/FilesOnUsersOnApplications.js +0 -2
  100. package/lib/client/types/Folder.d.ts +0 -68
  101. package/lib/client/types/Folder.js +0 -7
  102. package/lib/client/types/Inputs.js +0 -2
  103. package/lib/client/types/UserAppNotifications.js +0 -2
  104. package/lib/client/types/UserAppSettings.js +0 -2
  105. package/lib/client/types/VFile.d.ts +0 -62
  106. package/lib/client/types/VFile.js +0 -4
  107. package/lib/client/types/index.js +0 -9
  108. package/lib/client/types/queries.d.ts +0 -535
  109. package/lib/client/types/queries.js +0 -192
  110. package/lib/crypto/file.js +0 -291
  111. package/lib/crypto/index.js +0 -37
  112. package/lib/index.d.ts +0 -11
  113. package/lib/index.js +0 -40
  114. package/lib/minify/index.js +0 -28
  115. package/lib/minify/lz4.js +0 -633
  116. package/lib/sodium.js +0 -28
  117. package/lib/utils/store-buddy.js +0 -69
  118. package/lib/utils/time.js +0 -22
  119. package/lib/utils.js +0 -188
  120. package/lib/worker/__mock__/sodium.worker.d.ts +0 -19
  121. package/lib/worker/__mock__/sodium.worker.js +0 -57
  122. package/lib/worker/md5.js +0 -43
  123. package/lib/worker/sodium.js +0 -155
  124. package/lib/worker/workerCodes.js +0 -3
  125. package/lib/zeus/const.js +0 -1644
  126. package/lib/zeus/index.d.ts +0 -26279
  127. package/lib/zeus/index.js +0 -552
package/package.json CHANGED
@@ -2,92 +2,102 @@
2
2
  "name": "@secrecy/lib",
3
3
  "author": "Anonymize <anonymize@gmail.com>",
4
4
  "description": "Anonymize Secrecy Library",
5
- "version": "1.0.0-dev.8",
5
+ "version": "1.0.0-dev.81",
6
6
  "repository": {
7
7
  "type": "git",
8
- "url": "ssh://git@github.com/xsecrecy/lib.git"
8
+ "url": "https://github.com/anonymize-org/lib.git"
9
9
  },
10
10
  "license": "MIT",
11
11
  "bugs": {
12
- "url": "https://github.com/xsecrecy/lib/issues"
12
+ "url": "https://github.com/anonymize-org/lib/issues"
13
13
  },
14
- "homepage": "https://github.com/xsecrecy/lib#readme",
14
+ "homepage": "https://github.com/anonymize-org/lib#readme",
15
15
  "keywords": [
16
16
  "anonymize",
17
17
  "lib",
18
- "secrecy"
18
+ "secrecy",
19
+ "wallet",
20
+ "stripe"
19
21
  ],
20
22
  "type": "module",
21
- "exports": "./lib/index.js",
22
- "types": "lib/index.d.ts",
23
+ "exports": "./dist/index.js",
24
+ "types": "dist/index.d.ts",
23
25
  "files": [
24
- "lib"
26
+ "dist"
25
27
  ],
26
28
  "engines": {
27
- "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
29
+ "node": ">=16.13.0"
28
30
  },
29
31
  "scripts": {
30
- "test": "NODE_OPTIONS=--experimental-vm-modules jest --detectOpenHandles --forceExit",
32
+ "clean": "rimraf dist",
33
+ "test": "cross-env NEXT_PUBLIC_SECRECY_API_URL=http://localhost:4000/graphql NODE_OPTIONS=--experimental-vm-modules jest --detectOpenHandles --forceExit",
31
34
  "lint": "eslint \"./**/*.{ts,tsx}\"",
32
- "lint:fix": "yarn lint --fix",
33
- "format": "prettier --write \"./**/*.{ts,tsx}\"",
34
- "editor": "yarn dlx @yarnpkg/sdks",
35
+ "format": "prettier --cache --write \"./**/*.{ts,tsx}\"",
35
36
  "doc": "typedoc --out docs src",
36
- "prepublish": "yarn build",
37
+ "prepublish": "pnpm build",
37
38
  "type-check": "tsc --noEmit",
38
- "type-check:watch": "yarn type-check -- --watch",
39
+ "type-check:watch": "pnpm type-check --watch",
39
40
  "build:types": "tsc --emitDeclarationOnly",
40
- "clean": "rimraf lib tsconfig.tsbuildinfo",
41
41
  "build": "run-p -l clean build:types babel",
42
- "watch": "webpack --mode development --watch",
43
- "babel": "babel src --out-dir lib --extensions \".ts,.tsx\" --source-maps inline",
44
- "zeus": "zeus https://api.dev.secrecy.me/graphql ./src --ts",
45
- "prepare": "husky install"
42
+ "babel": "babel src --out-dir dist --extensions \".ts,.tsx\" --source-maps inline",
43
+ "watch": "pnpm build --watch",
44
+ "zeus": "zeus http://localhost:4000/graphql ./src --ts --es",
45
+ "prepare": "husky install",
46
+ "semantic-release": "semantic-release"
46
47
  },
47
48
  "devDependencies": {
48
- "@babel/cli": "^7.15.7",
49
- "@babel/core": "^7.15.5",
50
- "@babel/plugin-proposal-class-properties": "^7.14.5",
51
- "@babel/plugin-proposal-object-rest-spread": "^7.15.6",
49
+ "@babel/cli": "^7.19.3",
50
+ "@babel/core": "^7.19.3",
51
+ "@babel/plugin-proposal-class-properties": "^7.18.6",
52
+ "@babel/plugin-proposal-object-rest-spread": "^7.19.4",
53
+ "@babel/plugin-proposal-private-methods": "^7.18.6",
52
54
  "@babel/plugin-syntax-import-meta": "^7.10.4",
53
- "@babel/plugin-transform-runtime": "^7.15.0",
54
- "@babel/preset-env": "^7.15.6",
55
- "@babel/preset-typescript": "^7.15.0",
56
- "@commitlint/cli": "^13.2.0",
57
- "@commitlint/config-conventional": "^13.2.0",
58
- "@semantic-release/changelog": "^6.0.0",
59
- "@semantic-release/git": "^10.0.0",
60
- "@types/jest": "^27.0.2",
61
- "@types/node-fetch": "^3.0.3",
55
+ "@babel/plugin-transform-runtime": "^7.19.1",
56
+ "@babel/plugin-transform-typescript": "^7.19.3",
57
+ "@babel/preset-env": "^7.19.4",
58
+ "@babel/preset-typescript": "^7.18.6",
59
+ "@commitlint/cli": "^17.1.2",
60
+ "@commitlint/config-conventional": "^17.1.0",
61
+ "@types/jest": "28",
62
+ "@types/jsonwebtoken": "^8.5.9",
63
+ "@types/node": "^18.11.4",
62
64
  "@types/shortid": "^0.0.29",
63
65
  "@types/spark-md5": "^3.0.2",
64
- "@typescript-eslint/eslint-plugin": "^4.33.0",
65
- "@typescript-eslint/parser": "^4.33.0",
66
- "babel-loader": "^8.2.2",
67
- "eslint": "^7.32.0",
68
- "eslint-config-prettier": "^8.3.0",
69
- "eslint-plugin-prettier": "^4.0.0",
70
- "graphql-zeus": "^3.2.4",
71
- "husky": "^7.0.2",
72
- "jest": "^27.2.4",
66
+ "@typescript-eslint/eslint-plugin": "^5.40.1",
67
+ "@typescript-eslint/parser": "^5.40.1",
68
+ "babel-loader": "^8.2.5",
69
+ "babel-plugin-const-enum": "^1.2.0",
70
+ "cross-env": "^7.0.3",
71
+ "eslint": "^8.26.0",
72
+ "eslint-config-prettier": "^8.5.0",
73
+ "eslint-plugin-prettier": "^4.2.1",
74
+ "graphql-zeus": "^5.1.9",
75
+ "husky": "^8.0.1",
76
+ "jest": "28",
77
+ "jest-environment-jsdom": "28",
73
78
  "jest-fetch-mock": "^3.0.3",
74
79
  "npm-run-all": "^4.1.5",
75
- "prettier": "^2.4.1",
80
+ "prettier": "^2.7.0",
76
81
  "rimraf": "^3.0.2",
77
- "ts-jest": "^27.0.5",
78
- "ts-node": "^10.2.1",
79
- "typedoc": "^0.22.5",
80
- "typescript": "^4.5.0-dev.20210913"
82
+ "semantic-release": "^19.0.5",
83
+ "ts-jest": "28",
84
+ "ts-node": "^10.9.1",
85
+ "tsup": "^6.3.0",
86
+ "typedoc": "^0.23.18",
87
+ "typedoc-plugin-missing-exports": "^1.0.0",
88
+ "typescript": "^4.8.4"
81
89
  },
82
90
  "dependencies": {
83
- "@types/libsodium-wrappers": "^0.7.9",
84
- "axios": "^0.22.0",
85
- "bson": "^4.5.2",
86
- "graphql": "^15.6.0",
87
- "ky": "^0.28.5",
88
- "libsodium-wrappers": "^0.7.9",
91
+ "@secrecy/lib-utils": "^1.0.18",
92
+ "@types/libsodium-wrappers": "^0.7.10",
93
+ "axios": "^1.1.3",
94
+ "bson": "^4.7.0",
95
+ "ethers": "^5.7.2",
96
+ "jsonwebtoken": "^8.5.1",
97
+ "ky": "^0.31.4",
98
+ "libsodium-wrappers": "^0.7.10",
89
99
  "shortid": "^2.2.16",
90
100
  "spark-md5": "^3.0.2"
91
101
  },
92
- "packageManager": "yarn@3.0.2"
102
+ "packageManager": "pnpm@7.9.4"
93
103
  }
@@ -1,266 +0,0 @@
1
- import type { DownloadProgress as DLProgress } from "ky";
2
- import type { Document } from "bson";
3
- import type { UserSession } from "./client/types/index.js";
4
- import type { SecrecyEnv } from "./client/helpers.js";
5
- import type { Lang, PayInputType, PlanKind, Thunder, UserRole } from "./zeus/index.js";
6
- export declare type DownloadProgress = DLProgress;
7
- export declare type PayInput = {
8
- type: PayInputType;
9
- token: string;
10
- firstName: string;
11
- lastName: string;
12
- street: string;
13
- postalCode: string;
14
- city: string;
15
- country: string;
16
- month: string;
17
- year: string;
18
- cvv: string;
19
- number: string;
20
- };
21
- export declare type MailLimits = {
22
- count?: string | undefined;
23
- fileCount?: string | undefined;
24
- fileSize?: string | undefined;
25
- hardCount?: string | undefined;
26
- hardFileCount?: string | undefined;
27
- hardFileSize?: string | undefined;
28
- perFileSize?: string | undefined;
29
- };
30
- export declare type Limits = {
31
- downloadBandwidth?: string | undefined;
32
- downloadCount?: string | undefined;
33
- hardFileCount?: string | undefined;
34
- hardFileSize?: string | undefined;
35
- perFileSize?: string | undefined;
36
- receivedMails: MailLimits;
37
- sentMails: MailLimits;
38
- uploadBandwidth?: string | undefined;
39
- uploadCount?: string | undefined;
40
- };
41
- export declare type GodUser = {
42
- id: string;
43
- firstname: string;
44
- lastname: string;
45
- email: string;
46
- phone: string;
47
- };
48
- export declare type GodFatherAndChildren = {
49
- godFather: GodUser | null;
50
- godChildren: GodUser[];
51
- };
52
- export declare type Plan = {
53
- codes: string[];
54
- kind: PlanKind;
55
- limits: Limits;
56
- };
57
- export declare type SubscriptionState = "active" | "canceled" | "paused" | "expired" | "future" | "in_trial" | "live" | "past_due";
58
- export declare type SubscriptionCollectionMethod = "automatic" | "manual";
59
- declare type RecurlyInvoiceStatus = "pending" | "paid" | "failed" | "past_due" | "open" | "closed" | "voided" | "processing";
60
- export declare type Subscription = {
61
- autorenew: boolean;
62
- activatedAt?: Date | null | undefined;
63
- currentPeriodEndsAt?: Date | null | undefined;
64
- currentPeriodStartedAt?: Date | null | undefined;
65
- canceledAt?: Date | null | undefined;
66
- createdAt?: Date | null | undefined;
67
- expiresAt?: Date | null | undefined;
68
- pausedAt?: Date | null | undefined;
69
- trialEndsAt?: Date | null | undefined;
70
- trialStartedAt?: Date | null | undefined;
71
- updatedAt?: Date | null | undefined;
72
- collectionMethod: SubscriptionCollectionMethod;
73
- state: SubscriptionState;
74
- plan?: string | null | undefined;
75
- planCode?: string | null | undefined;
76
- total?: number | null | undefined;
77
- };
78
- export declare type RecurlyInvoices = {
79
- pdf: string;
80
- date: Date;
81
- due: Date;
82
- status: RecurlyInvoiceStatus;
83
- total: number;
84
- name: string;
85
- currency: string;
86
- };
87
- export declare type PaymentInfos = {
88
- hostedUrl: string;
89
- currentSubscription: Subscription;
90
- invoices: RecurlyInvoices[];
91
- };
92
- export declare type SendReport = {
93
- id: string;
94
- user: {
95
- id: string;
96
- firstname: string;
97
- lastname: string;
98
- email: string;
99
- };
100
- reportedUser: {
101
- id: string;
102
- firstname: string;
103
- lastname: string;
104
- email: string;
105
- };
106
- customMessage?: string | undefined;
107
- };
108
- declare const plansCodes: readonly ["basic_month", "advanced_month", "pro_month", "basic_year", "advanced_year", "pro_year"];
109
- export declare type SecrecyPlansCodes = typeof plansCodes[number];
110
- export declare function isValidPlan(planCode: string): planCode is SecrecyPlansCodes;
111
- export declare type UserData<T extends Record<string, unknown> = Record<string, unknown>> = {
112
- isSuperuser: boolean;
113
- isSearchable: boolean;
114
- } & T;
115
- export declare type FolderSize = {
116
- size: bigint;
117
- sizeBefore: bigint;
118
- };
119
- export declare type AppDBConfigField = {
120
- name: string;
121
- type: "string" | "number" | "boolean" | "object";
122
- isArray?: boolean | undefined;
123
- isNullable?: boolean | undefined;
124
- isEditable?: boolean | undefined;
125
- isKey?: boolean | undefined;
126
- default?: unknown;
127
- };
128
- export declare type AppDBConfig = {
129
- fields: AppDBConfigField[];
130
- };
131
- export declare type FaqItem = {
132
- order: number;
133
- question: string;
134
- answer: string;
135
- };
136
- export declare type BlogItem = {
137
- id: string;
138
- blogId: string;
139
- order: number;
140
- author: string;
141
- body: string;
142
- date: Date;
143
- image: string;
144
- imageAlt: string;
145
- summary: string;
146
- title: string;
147
- };
148
- export declare type UserBase = {
149
- email: string;
150
- phone: string;
151
- lastname: string;
152
- role: UserRole;
153
- firstname: string;
154
- id: string;
155
- deletedAt: Date | null;
156
- lastLogin: Date;
157
- lang: Lang;
158
- };
159
- declare type WithPublicKey = {
160
- withPublicKey?: boolean;
161
- };
162
- export declare type User<T extends WithPublicKey = WithPublicKey> = T extends {
163
- withPublicKey: true;
164
- } ? UserBase & {
165
- publicKey: string;
166
- } : UserBase;
167
- declare type ClassGetUserParams = WithPublicKey & {
168
- userId?: string;
169
- };
170
- declare type StaticGetUserParams = ClassGetUserParams & {
171
- env: SecrecyEnv;
172
- };
173
- export declare type CloudLimits = {
174
- count: bigint;
175
- maxCount: bigint | null;
176
- size: bigint;
177
- maxSize: bigint | null;
178
- };
179
- export declare type MailLimitsValues = {
180
- count: bigint;
181
- maxCount: bigint | null;
182
- fileSize: bigint;
183
- maxFileSize: bigint | null;
184
- fileCount: bigint;
185
- maxFileCount: bigint | null;
186
- };
187
- export declare type QueryLimits = {
188
- cloud: CloudLimits;
189
- mail: {
190
- sent: MailLimitsValues;
191
- received: MailLimitsValues;
192
- };
193
- };
194
- export declare class BaseClient {
195
- static readonly getBaseUrl: (env?: SecrecyEnv, graphcdn?: boolean) => string;
196
- private static readonly _getBaseClient;
197
- protected client: ReturnType<typeof Thunder>;
198
- sessionId: string;
199
- constructor(session: string, env: SecrecyEnv);
200
- sessions(): Promise<UserSession[]>;
201
- logout(sessionId?: string | null | undefined): Promise<void>;
202
- me<T extends WithPublicKey = WithPublicKey>(params?: T): Promise<User<T> | null>;
203
- static user<T extends StaticGetUserParams>(params: T, sessionId?: string | null | undefined): Promise<User<T> | null>;
204
- user<T extends ClassGetUserParams>(params: T): Promise<User<T> | null>;
205
- updateProfile({ firstname, lastname, lang }: {
206
- firstname: string | null;
207
- lastname: string | null;
208
- lang: Lang | null;
209
- }): Promise<User>;
210
- static plans(env: SecrecyEnv, sessionId?: string | null | undefined): Promise<Plan[]>;
211
- pay(planCode: SecrecyPlansCodes, input: PayInput, autoRenew?: boolean | null | undefined): Promise<boolean>;
212
- cancelPayment(): Promise<boolean>;
213
- paymentInfos(): Promise<PaymentInfos | null>;
214
- limits(): Promise<QueryLimits | null>;
215
- godFatherAndChildren(): Promise<GodFatherAndChildren | null>;
216
- static updateAppDBConfig({ appCode, config, env, sessionId }: {
217
- appCode: string;
218
- config: AppDBConfig;
219
- env: SecrecyEnv;
220
- sessionId?: string | null | undefined;
221
- }): Promise<AppDBConfig>;
222
- static getAppDBConfig(appCode: string, env: SecrecyEnv, sessionId?: string | null | undefined): Promise<AppDBConfig>;
223
- static getFAQ({ lang, env, sessionId }: {
224
- lang?: Lang;
225
- env: SecrecyEnv;
226
- sessionId?: string | null | undefined;
227
- }): Promise<FaqItem[]>;
228
- static getBlog({ env, lang, sessionId }: {
229
- env: SecrecyEnv;
230
- lang?: Lang | null | undefined;
231
- sessionId?: string | null | undefined;
232
- }): Promise<BlogItem[]>;
233
- reportUser(reportedUserId: string, customMessage?: string): Promise<SendReport | undefined>;
234
- static deleteUser({ sessionId, userId, env }: {
235
- sessionId: string;
236
- userId?: string;
237
- env: SecrecyEnv;
238
- }): Promise<boolean>;
239
- dbGet<U>({ field, userId }: {
240
- field: string;
241
- userId?: string | null | undefined;
242
- }): Promise<U>;
243
- dbSet<T extends UserData, U extends Document>({ value, userId }: {
244
- value: U;
245
- userId?: string | null | undefined;
246
- }): Promise<T>;
247
- dbSearch<T>({ search, field }: {
248
- field: string;
249
- search: string;
250
- }): Promise<T[]>;
251
- deleteFolder({ id }: {
252
- id: string;
253
- }): Promise<boolean>;
254
- moveFolders({ foldersId, parentFolderId }: {
255
- foldersId: string[];
256
- parentFolderId?: string | null | undefined;
257
- }): Promise<boolean>;
258
- moveFiles({ filesId, parentFolderId }: {
259
- filesId: string[];
260
- parentFolderId?: string | null | undefined;
261
- }): Promise<boolean>;
262
- folderSize({ folderId }: {
263
- folderId?: string | null | undefined;
264
- }): Promise<FolderSize | null>;
265
- }
266
- export {};