@secrecy/lib 1.86.2-fix-md5.1 → 1.86.3
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/dist/lib/base-client.js +6 -5
- package/dist/lib/cache.js +14 -5
- package/dist/lib/client/SecrecyCloudClient.js +2 -4
- package/dist/lib/client/SecrecyMailClient.js +12 -5
- package/dist/lib/client/data-link.js +12 -6
- package/dist/lib/client/helpers.js +34 -4
- package/dist/lib/client/index.js +6 -8
- package/dist/lib/client/upload.js +14 -12
- package/dist/lib/client.js +6 -10
- package/dist/lib/crypto/data.js +90 -145
- package/dist/lib/crypto/domain.js +3 -1
- package/dist/lib/crypto/helpers.js +1 -23
- package/dist/lib/crypto/index.js +9 -2
- package/dist/lib/error/client.js +7 -1
- package/dist/lib/react/index.js +69 -0
- package/dist/lib/transformer.js +3 -2
- package/dist/lib/utils/popup-tools.js +20 -24
- package/dist/lib/versioning.js +1 -1
- package/dist/lib/worker/md5.js +2 -2
- package/dist/lib/worker/sodium.js +15 -17
- package/dist/lib/worker/workerCodes.js +254 -0
- package/dist/types/base-client.d.ts +2 -0
- package/dist/types/cache.d.ts +7 -6
- package/dist/types/client/SecrecyMailClient.d.ts +23 -1
- package/dist/types/client/data-link.d.ts +4 -4
- package/dist/types/client/helpers.d.ts +13 -0
- package/dist/types/client/index.d.ts +4 -2
- package/dist/types/client/types/data.d.ts +1 -2
- package/dist/types/client.d.ts +75 -66
- package/dist/types/crypto/data.d.ts +1 -11
- package/dist/types/crypto/domain.d.ts +1 -0
- package/dist/types/crypto/helpers.d.ts +0 -7
- package/dist/types/error/client.d.ts +8 -0
- package/dist/types/error/index.d.ts +4 -0
- package/dist/types/react/index.d.ts +20 -0
- package/dist/types/utils/popup-tools.d.ts +2 -5
- package/dist/types/versioning.d.ts +1 -1
- package/dist/types/worker/workerCodes.d.ts +2 -0
- package/package.json +38 -16
- package/dist/lib/client/SecrecyDbClient.js +0 -3
- package/dist/lib/worker/generated/md5.js +0 -2
- package/dist/lib/worker/generated/sodium.js +0 -2
- package/dist/types/client/SecrecyDbClient.d.ts +0 -4
- package/dist/types/worker/generated/md5.d.ts +0 -1
- package/dist/types/worker/generated/sodium.d.ts +0 -1
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
export const workerSodiumScript = `let sodium;
|
|
2
|
+
|
|
3
|
+
self.sodium = {
|
|
4
|
+
onload: (sod) => {
|
|
5
|
+
sodium = sod
|
|
6
|
+
postMessage({ event: "ready" })
|
|
7
|
+
}
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
importScripts('https://cdn.jsdelivr.net/gh/jedisct1/libsodium.js@0.7.15/dist/browsers/sodium.js');
|
|
11
|
+
importScripts('https://cdnjs.cloudflare.com/ajax/libs/spark-md5/3.0.0/spark-md5.min.js');
|
|
12
|
+
|
|
13
|
+
function* chunks(arr, n) {
|
|
14
|
+
for (let i = 0; i < arr.length; i += n) {
|
|
15
|
+
yield arr.slice(i, i + n);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function assert(c, message) {
|
|
20
|
+
if (!c) {
|
|
21
|
+
throw new Error(message);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function encrypt(key) {
|
|
26
|
+
let destroyed = false;
|
|
27
|
+
const {
|
|
28
|
+
state,
|
|
29
|
+
header
|
|
30
|
+
} = sodium.crypto_secretstream_xchacha20poly1305_init_push(key);
|
|
31
|
+
|
|
32
|
+
const encrypt = (tag, plaintext) => {
|
|
33
|
+
assert(destroyed === false, "state already destroyed");
|
|
34
|
+
|
|
35
|
+
return sodium.crypto_secretstream_xchacha20poly1305_push(
|
|
36
|
+
state,
|
|
37
|
+
plaintext,
|
|
38
|
+
null,
|
|
39
|
+
tag
|
|
40
|
+
);
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
function destroy() {
|
|
44
|
+
assert(destroyed === false, "state already destroyed");
|
|
45
|
+
destroyed = true;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
return {
|
|
49
|
+
encrypt,
|
|
50
|
+
destroy,
|
|
51
|
+
header
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function decrypt(header, key) {
|
|
56
|
+
assert(
|
|
57
|
+
header.byteLength >=
|
|
58
|
+
sodium.crypto_secretstream_xchacha20poly1305_HEADERBYTES,
|
|
59
|
+
"header must be at least HEADERBYTES (" + sodium.crypto_secretstream_xchacha20poly1305_HEADERBYTES + ") long"
|
|
60
|
+
);
|
|
61
|
+
assert(
|
|
62
|
+
key.byteLength >= sodium.crypto_secretstream_xchacha20poly1305_KEYBYTES,
|
|
63
|
+
"key must be at least KEYBYTES (" + sodium.crypto_secretstream_xchacha20poly1305_KEYBYTES + ") long"
|
|
64
|
+
);
|
|
65
|
+
|
|
66
|
+
let destroyed = false;
|
|
67
|
+
const state = sodium.crypto_secretstream_xchacha20poly1305_init_pull(
|
|
68
|
+
header,
|
|
69
|
+
key
|
|
70
|
+
);
|
|
71
|
+
|
|
72
|
+
const decrypt = ciphertext => {
|
|
73
|
+
assert(destroyed === false, "state already destroyed");
|
|
74
|
+
|
|
75
|
+
return sodium.crypto_secretstream_xchacha20poly1305_pull(state, ciphertext);
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
function destroy() {
|
|
79
|
+
assert(destroyed === false, "state already destroyed");
|
|
80
|
+
destroyed = true;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
return {
|
|
84
|
+
decrypt,
|
|
85
|
+
destroy
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
const CHUNK_SIZE = 8192;
|
|
90
|
+
|
|
91
|
+
async function encryptSecretstream(key, data, progress) {
|
|
92
|
+
const { encrypt: crypt, destroy, header } = encrypt(key);
|
|
93
|
+
const cryptedChunk =
|
|
94
|
+
CHUNK_SIZE + sodium.crypto_secretstream_xchacha20poly1305_ABYTES;
|
|
95
|
+
const max =
|
|
96
|
+
Math.ceil(data.byteLength / CHUNK_SIZE) * cryptedChunk + header.byteLength;
|
|
97
|
+
|
|
98
|
+
progress?.({
|
|
99
|
+
percent: 0,
|
|
100
|
+
total: max,
|
|
101
|
+
current: 0
|
|
102
|
+
});
|
|
103
|
+
const final = new Uint8Array(max);
|
|
104
|
+
const sparkEncrypted = new SparkMD5.ArrayBuffer();
|
|
105
|
+
const spark = new SparkMD5.ArrayBuffer();
|
|
106
|
+
|
|
107
|
+
final.set(header);
|
|
108
|
+
sparkEncrypted.append(header);
|
|
109
|
+
let total = header.byteLength;
|
|
110
|
+
progress?.({
|
|
111
|
+
percent: total / max,
|
|
112
|
+
total: max,
|
|
113
|
+
current: total
|
|
114
|
+
});
|
|
115
|
+
let lastPercent = total / max;
|
|
116
|
+
|
|
117
|
+
for (const chunk of chunks(data, CHUNK_SIZE)) {
|
|
118
|
+
spark.append(chunk);
|
|
119
|
+
const tag =
|
|
120
|
+
chunk.length < CHUNK_SIZE
|
|
121
|
+
? sodium.crypto_secretstream_xchacha20poly1305_TAG_FINAL
|
|
122
|
+
: sodium.crypto_secretstream_xchacha20poly1305_TAG_MESSAGE;
|
|
123
|
+
const crypted = crypt(tag, chunk);
|
|
124
|
+
sparkEncrypted.append(crypted);
|
|
125
|
+
final.set(crypted, total);
|
|
126
|
+
total += crypted.byteLength;
|
|
127
|
+
const percent = total / max;
|
|
128
|
+
if (percent > lastPercent + 0.01) {
|
|
129
|
+
progress?.({
|
|
130
|
+
percent,
|
|
131
|
+
total: max,
|
|
132
|
+
current: total
|
|
133
|
+
});
|
|
134
|
+
lastPercent = percent;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
destroy();
|
|
139
|
+
progress?.({
|
|
140
|
+
percent: 1,
|
|
141
|
+
total,
|
|
142
|
+
current: total
|
|
143
|
+
});
|
|
144
|
+
return {
|
|
145
|
+
data: final.slice(0, total),
|
|
146
|
+
md5Encrypted: sparkEncrypted.end(),
|
|
147
|
+
md5: spark.end()
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
async function decryptSecretstream(key, data, progress) {
|
|
152
|
+
const header = data.slice(
|
|
153
|
+
0,
|
|
154
|
+
sodium.crypto_secretstream_xchacha20poly1305_HEADERBYTES
|
|
155
|
+
);
|
|
156
|
+
data = data.slice(sodium.crypto_secretstream_xchacha20poly1305_HEADERBYTES);
|
|
157
|
+
|
|
158
|
+
const { decrypt: decryptt, destroy } = decrypt(header, key);
|
|
159
|
+
const chunkSize =
|
|
160
|
+
CHUNK_SIZE + sodium.crypto_secretstream_xchacha20poly1305_ABYTES;
|
|
161
|
+
const max = Math.ceil(data.byteLength / chunkSize) * CHUNK_SIZE;
|
|
162
|
+
|
|
163
|
+
progress?.({
|
|
164
|
+
percent: 0,
|
|
165
|
+
total: max,
|
|
166
|
+
current: 0
|
|
167
|
+
});
|
|
168
|
+
const final = new Uint8Array(max);
|
|
169
|
+
let total = 0;
|
|
170
|
+
let lastPercent = total / max;
|
|
171
|
+
|
|
172
|
+
for (const chunk of chunks(data, chunkSize)) {
|
|
173
|
+
const tmp = decryptt(chunk);
|
|
174
|
+
final.set(tmp.message, total);
|
|
175
|
+
total += tmp.message.byteLength;
|
|
176
|
+
|
|
177
|
+
const percent = total / max;
|
|
178
|
+
if (percent > lastPercent + 0.01) {
|
|
179
|
+
progress?.({
|
|
180
|
+
percent,
|
|
181
|
+
total: max,
|
|
182
|
+
current: total
|
|
183
|
+
});
|
|
184
|
+
lastPercent = percent;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
destroy();
|
|
189
|
+
progress?.({
|
|
190
|
+
percent: 1,
|
|
191
|
+
total,
|
|
192
|
+
current: total
|
|
193
|
+
});
|
|
194
|
+
return final.slice(0, total);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
self.onmessage = async ({ data }) => {
|
|
198
|
+
switch (data.event) {
|
|
199
|
+
case "encrypt": {
|
|
200
|
+
postMessage({ event: "working" })
|
|
201
|
+
postMessage({
|
|
202
|
+
event: "encrypt-result",
|
|
203
|
+
data: await encryptSecretstream(data.key, data.data, progress => postMessage({
|
|
204
|
+
event: "encrypt-progress",
|
|
205
|
+
data: progress
|
|
206
|
+
}))
|
|
207
|
+
});
|
|
208
|
+
postMessage({ event: "ready" })
|
|
209
|
+
break;
|
|
210
|
+
}
|
|
211
|
+
case "decrypt": {
|
|
212
|
+
postMessage({ event: "working" })
|
|
213
|
+
postMessage({
|
|
214
|
+
event: "decrypt-result",
|
|
215
|
+
data: await decryptSecretstream(data.key, data.data, progress => postMessage({
|
|
216
|
+
event: "decrypt-progress",
|
|
217
|
+
data: progress
|
|
218
|
+
}))
|
|
219
|
+
});
|
|
220
|
+
postMessage({ event: "ready" })
|
|
221
|
+
break;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
}`;
|
|
225
|
+
export const workerMd5Script = `importScripts('https://cdnjs.cloudflare.com/ajax/libs/spark-md5/3.0.0/spark-md5.min.js');
|
|
226
|
+
|
|
227
|
+
function* chunks(arr, n) {
|
|
228
|
+
for (let i = 0; i < arr.length; i += n) {
|
|
229
|
+
yield arr.slice(i, i + n);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
const CHUNK_SIZE = 8192;
|
|
234
|
+
|
|
235
|
+
function md5(data) {
|
|
236
|
+
const spark = new SparkMD5.ArrayBuffer();
|
|
237
|
+
for (const chunk of chunks(data, CHUNK_SIZE)) {
|
|
238
|
+
spark.append(chunk);
|
|
239
|
+
}
|
|
240
|
+
return spark.end();
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
self.onmessage = ({ data }) => {
|
|
245
|
+
switch (data.event) {
|
|
246
|
+
case "md5": {
|
|
247
|
+
postMessage({
|
|
248
|
+
event: "md5-result",
|
|
249
|
+
data: md5(data.data)
|
|
250
|
+
});
|
|
251
|
+
break;
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
}`;
|
|
@@ -12,6 +12,8 @@ export type BaseClientOptions = {
|
|
|
12
12
|
apiClient?: ApiClient;
|
|
13
13
|
onAccessDenied?: () => void | Promise<void>;
|
|
14
14
|
secrecyUrls?: Partial<SecrecyUrls>;
|
|
15
|
+
timeoutMs?: number;
|
|
16
|
+
reloadOnAccessDenied?: boolean;
|
|
15
17
|
};
|
|
16
18
|
export declare class BaseClient {
|
|
17
19
|
#private;
|
package/dist/types/cache.d.ts
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import type { InternalNode, InternalData, InternalNodeFull, LocalData, InternalMinimalNodeForEncryption } from './client/types/index.js';
|
|
2
2
|
import { LRUCache } from 'lru-cache';
|
|
3
3
|
type NodeForEncryptionCached = InternalNode | InternalNodeFull | InternalMinimalNodeForEncryption;
|
|
4
|
-
export declare const dataCache:
|
|
5
|
-
export declare const nodesCache:
|
|
6
|
-
export declare const nodesEncryptionCache:
|
|
4
|
+
export declare const dataCache: LRUCache<string, InternalData, unknown>;
|
|
5
|
+
export declare const nodesCache: LRUCache<string, InternalNode | InternalNodeFull, unknown>;
|
|
6
|
+
export declare const nodesEncryptionCache: LRUCache<string, InternalMinimalNodeForEncryption, unknown>;
|
|
7
7
|
export declare const getNodeForEncryptionFromCache: (id: string) => NodeForEncryptionCached | undefined;
|
|
8
|
-
export declare const usersCache:
|
|
8
|
+
export declare const usersCache: LRUCache<string, {
|
|
9
9
|
firstname: string;
|
|
10
10
|
lastname: string;
|
|
11
11
|
id: string;
|
|
12
12
|
avatar: string | null;
|
|
13
13
|
isSearchable: boolean;
|
|
14
|
-
}>;
|
|
15
|
-
export declare const publicKeysCache:
|
|
14
|
+
}, unknown>;
|
|
15
|
+
export declare const publicKeysCache: LRUCache<string, string, unknown>;
|
|
16
16
|
export declare const dataContentCache: LRUCache<string, LocalData, unknown>;
|
|
17
|
+
export declare function clearAllCaches(): void;
|
|
17
18
|
export {};
|
|
@@ -13,9 +13,23 @@ export declare class SecrecyMailClient {
|
|
|
13
13
|
deletedMails({ mailType, }: {
|
|
14
14
|
mailType: ApiMail['type'];
|
|
15
15
|
}): Promise<Mail[]>;
|
|
16
|
+
create(data: NewMail & {
|
|
17
|
+
customMessage?: string | null | undefined;
|
|
18
|
+
}): Promise<SentMail>;
|
|
19
|
+
/**
|
|
20
|
+
* @deprecated Pass a single object instead:
|
|
21
|
+
* `create({ ...data, customMessage })`.
|
|
22
|
+
*/
|
|
16
23
|
create(data: NewMail, customMessage?: string | null | undefined): Promise<SentMail>;
|
|
17
24
|
waitingReceivedMails(): Promise<WaitingReceivedMail[]>;
|
|
18
|
-
updateDraft(
|
|
25
|
+
updateDraft(input: {
|
|
26
|
+
draftId: string;
|
|
27
|
+
} & Partial<NewMail>): Promise<DraftMail>;
|
|
28
|
+
/**
|
|
29
|
+
* @deprecated Pass a single object instead:
|
|
30
|
+
* `updateDraft({ draftId, ...args })`.
|
|
31
|
+
*/
|
|
32
|
+
updateDraft(draftId: string, args: Partial<NewMail>): Promise<DraftMail>;
|
|
19
33
|
deleteDraft(draftId: string): Promise<boolean>;
|
|
20
34
|
deleteTrash({ ids }: {
|
|
21
35
|
ids: string[];
|
|
@@ -24,6 +38,14 @@ export declare class SecrecyMailClient {
|
|
|
24
38
|
delete({ mailId }: {
|
|
25
39
|
mailId: string;
|
|
26
40
|
}): Promise<boolean>;
|
|
41
|
+
sendDraft(input: {
|
|
42
|
+
draftId: string;
|
|
43
|
+
customMessage?: string | null | undefined;
|
|
44
|
+
}): Promise<boolean>;
|
|
45
|
+
/**
|
|
46
|
+
* @deprecated Pass a single object instead:
|
|
47
|
+
* `sendDraft({ draftId, customMessage })`.
|
|
48
|
+
*/
|
|
27
49
|
sendDraft(draftId: string, customMessage?: string | null | undefined): Promise<boolean>;
|
|
28
50
|
sendWaitingEmails(): Promise<void>;
|
|
29
51
|
createDraft({ body, subject, senderFiles, recipients, replyToId, }: NewMail): Promise<DraftMail>;
|
|
@@ -3,7 +3,7 @@ import { type ProgressCallback } from '.';
|
|
|
3
3
|
import { type Progress } from 'ky';
|
|
4
4
|
export declare const downloadDataLinkSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
5
5
|
name: z.ZodString;
|
|
6
|
-
md5: z.
|
|
6
|
+
md5: z.ZodString;
|
|
7
7
|
md5Encrypted: z.ZodNullable<z.ZodString>;
|
|
8
8
|
size: z.ZodCoercedBigInt<unknown>;
|
|
9
9
|
parts: z.ZodArray<z.ZodObject<{
|
|
@@ -15,7 +15,7 @@ export declare const downloadDataLinkSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
15
15
|
isEncrypted: z.ZodBoolean;
|
|
16
16
|
}, z.core.$strip>, z.ZodObject<{
|
|
17
17
|
name: z.ZodString;
|
|
18
|
-
md5: z.
|
|
18
|
+
md5: z.ZodString;
|
|
19
19
|
md5Encrypted: z.ZodNullable<z.ZodString>;
|
|
20
20
|
size: z.ZodCoercedBigInt<unknown>;
|
|
21
21
|
bytes: z.ZodString;
|
|
@@ -34,7 +34,7 @@ export type DownloadDataFromLinkOptions = {
|
|
|
34
34
|
};
|
|
35
35
|
export declare function fetchDataLinkMetadata(dataLinkSlug: string, dataUrl?: string): Promise<{
|
|
36
36
|
name: string;
|
|
37
|
-
md5: string
|
|
37
|
+
md5: string;
|
|
38
38
|
md5Encrypted: string | null;
|
|
39
39
|
size: bigint;
|
|
40
40
|
parts: {
|
|
@@ -46,7 +46,7 @@ export declare function fetchDataLinkMetadata(dataLinkSlug: string, dataUrl?: st
|
|
|
46
46
|
isEncrypted: boolean;
|
|
47
47
|
} | {
|
|
48
48
|
name: string;
|
|
49
|
-
md5: string
|
|
49
|
+
md5: string;
|
|
50
50
|
md5Encrypted: string | null;
|
|
51
51
|
size: bigint;
|
|
52
52
|
bytes: string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { SecrecyClient } from './index.js';
|
|
2
2
|
import { type SecrecyUserApp } from './types/index.js';
|
|
3
3
|
import type { SecrecyUrls } from '../base-client.js';
|
|
4
|
+
export declare function assertBrowser(fn: string): void;
|
|
4
5
|
export declare function parseInfos(): SecrecyUserApp | null;
|
|
5
6
|
export interface HashInfos {
|
|
6
7
|
appId?: string;
|
|
@@ -29,4 +30,16 @@ type LoginResponse<Params extends UseSecrecyParams> = Params extends {
|
|
|
29
30
|
redirect: true;
|
|
30
31
|
} ? SecrecyClient | null : SecrecyClient;
|
|
31
32
|
export declare function login<Params extends UseSecrecyParams>({ appId, context, path, redirect, scopes, backPath, session, secrecyUrls, forceLogin, }: Params): Promise<LoginResponse<Params>>;
|
|
33
|
+
/**
|
|
34
|
+
* Single async entry point: runs `setup()`, reuses an existing session if
|
|
35
|
+
* one is found, and falls back to `login()` otherwise. Equivalent to
|
|
36
|
+
* `await setup()` + `getSecrecyClient()` + `login()`, without having to
|
|
37
|
+
* juggle the sync/async mismatch between them.
|
|
38
|
+
*/
|
|
39
|
+
export declare function initSecrecy(opts: {
|
|
40
|
+
appId: string;
|
|
41
|
+
session?: boolean | undefined;
|
|
42
|
+
redirect?: boolean | undefined;
|
|
43
|
+
secrecyUrls?: Partial<SecrecyUrls>;
|
|
44
|
+
}): Promise<SecrecyClient | null>;
|
|
32
45
|
export {};
|
|
@@ -3,7 +3,6 @@ import type { SecretStreamProgress } from '../crypto/data.js';
|
|
|
3
3
|
import { SecrecyCloudClient } from './SecrecyCloudClient.js';
|
|
4
4
|
import { SecrecyMailClient } from './SecrecyMailClient.js';
|
|
5
5
|
import { SecrecyAppClient } from './SecrecyAppClient.js';
|
|
6
|
-
import { SecrecyDbClient } from './SecrecyDbClient.js';
|
|
7
6
|
import { SecrecyWalletClient } from './SecrecyWalletClient.js';
|
|
8
7
|
import { SecrecyPayClient } from './SecrecyPayClient.js';
|
|
9
8
|
import { type ApiClient, type RouterInputs } from '../client.js';
|
|
@@ -22,15 +21,18 @@ export interface SecrecyClientOptions {
|
|
|
22
21
|
uaJwt: string;
|
|
23
22
|
apiClient?: ApiClient;
|
|
24
23
|
secrecyUrls?: Partial<SecrecyUrls>;
|
|
24
|
+
timeoutMs?: number;
|
|
25
|
+
reloadOnAccessDenied?: boolean;
|
|
25
26
|
}
|
|
26
27
|
export declare class SecrecyClient extends BaseClient {
|
|
27
28
|
#private;
|
|
28
29
|
cloud: SecrecyCloudClient;
|
|
29
30
|
mail: SecrecyMailClient;
|
|
30
31
|
app: SecrecyAppClient;
|
|
31
|
-
db: SecrecyDbClient;
|
|
32
32
|
organization: SecrecyOrganizationClient;
|
|
33
|
+
/** @experimental Susceptible de changer sans version majeure. */
|
|
33
34
|
wallet: SecrecyWalletClient;
|
|
35
|
+
/** @experimental Susceptible de changer sans version majeure. */
|
|
34
36
|
pay: SecrecyPayClient;
|
|
35
37
|
user: SecrecyUserClient;
|
|
36
38
|
pseudonym: SecrecyPseudonymClient;
|
|
@@ -7,8 +7,7 @@ export type LocalData = {
|
|
|
7
7
|
storageType: DataStorageType;
|
|
8
8
|
size: bigint;
|
|
9
9
|
sizeEncrypted: bigint | null;
|
|
10
|
-
|
|
11
|
-
md5: string | null;
|
|
10
|
+
md5: string;
|
|
12
11
|
data: Uint8Array<ArrayBuffer>;
|
|
13
12
|
mime?: string;
|
|
14
13
|
ext?: string;
|