@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.
Files changed (45) hide show
  1. package/dist/lib/base-client.js +6 -5
  2. package/dist/lib/cache.js +14 -5
  3. package/dist/lib/client/SecrecyCloudClient.js +2 -4
  4. package/dist/lib/client/SecrecyMailClient.js +12 -5
  5. package/dist/lib/client/data-link.js +12 -6
  6. package/dist/lib/client/helpers.js +34 -4
  7. package/dist/lib/client/index.js +6 -8
  8. package/dist/lib/client/upload.js +14 -12
  9. package/dist/lib/client.js +6 -10
  10. package/dist/lib/crypto/data.js +90 -145
  11. package/dist/lib/crypto/domain.js +3 -1
  12. package/dist/lib/crypto/helpers.js +1 -23
  13. package/dist/lib/crypto/index.js +9 -2
  14. package/dist/lib/error/client.js +7 -1
  15. package/dist/lib/react/index.js +69 -0
  16. package/dist/lib/transformer.js +3 -2
  17. package/dist/lib/utils/popup-tools.js +20 -24
  18. package/dist/lib/versioning.js +1 -1
  19. package/dist/lib/worker/md5.js +2 -2
  20. package/dist/lib/worker/sodium.js +15 -17
  21. package/dist/lib/worker/workerCodes.js +254 -0
  22. package/dist/types/base-client.d.ts +2 -0
  23. package/dist/types/cache.d.ts +7 -6
  24. package/dist/types/client/SecrecyMailClient.d.ts +23 -1
  25. package/dist/types/client/data-link.d.ts +4 -4
  26. package/dist/types/client/helpers.d.ts +13 -0
  27. package/dist/types/client/index.d.ts +4 -2
  28. package/dist/types/client/types/data.d.ts +1 -2
  29. package/dist/types/client.d.ts +75 -66
  30. package/dist/types/crypto/data.d.ts +1 -11
  31. package/dist/types/crypto/domain.d.ts +1 -0
  32. package/dist/types/crypto/helpers.d.ts +0 -7
  33. package/dist/types/error/client.d.ts +8 -0
  34. package/dist/types/error/index.d.ts +4 -0
  35. package/dist/types/react/index.d.ts +20 -0
  36. package/dist/types/utils/popup-tools.d.ts +2 -5
  37. package/dist/types/versioning.d.ts +1 -1
  38. package/dist/types/worker/workerCodes.d.ts +2 -0
  39. package/package.json +38 -16
  40. package/dist/lib/client/SecrecyDbClient.js +0 -3
  41. package/dist/lib/worker/generated/md5.js +0 -2
  42. package/dist/lib/worker/generated/sodium.js +0 -2
  43. package/dist/types/client/SecrecyDbClient.d.ts +0 -4
  44. package/dist/types/worker/generated/md5.d.ts +0 -1
  45. package/dist/types/worker/generated/sodium.d.ts +0 -1
@@ -8,6 +8,7 @@ export interface CreateTrpcClientOptions {
8
8
  session?: string | null | undefined;
9
9
  apiUrl?: string | null | undefined;
10
10
  onAccessDenied?: () => void | Promise<void> | null | undefined;
11
+ timeoutMs?: number | undefined;
11
12
  }
12
13
  export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import("@trpc/client").TRPCClient<import("@trpc/server").TRPCBuiltRouter<{
13
14
  ctx: any;
@@ -67,7 +68,6 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
67
68
  hasDatabase: boolean;
68
69
  devsCount: bigint;
69
70
  usersCount: bigint;
70
- } & {
71
71
  totalDataCount: bigint;
72
72
  totalDataSize: bigint;
73
73
  downloadBandwidth: bigint;
@@ -142,12 +142,11 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
142
142
  paidByApp?: boolean | undefined;
143
143
  userIds?: string[] | undefined;
144
144
  };
145
- output: ({
145
+ output: {
146
146
  lastReset: Date;
147
147
  hasDatabase: boolean;
148
148
  devsCount: bigint;
149
149
  usersCount: bigint;
150
- } & {
151
150
  totalDataCount: bigint;
152
151
  totalDataSize: bigint;
153
152
  downloadBandwidth: bigint;
@@ -157,11 +156,12 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
157
156
  sentMailCount: bigint;
158
157
  sentMailDataCount: bigint;
159
158
  sentMailDataSize: bigint;
160
- }) | {
159
+ type: "application";
160
+ } | {
161
+ type: "details";
161
162
  lastReset: Date;
162
- details: ({
163
+ details: {
163
164
  userId: string;
164
- } & {
165
165
  totalDataCount: bigint;
166
166
  totalDataSize: bigint;
167
167
  downloadBandwidth: bigint;
@@ -171,7 +171,7 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
171
171
  sentMailCount: bigint;
172
172
  sentMailDataCount: bigint;
173
173
  sentMailDataSize: bigint;
174
- })[];
174
+ }[];
175
175
  };
176
176
  meta: any;
177
177
  }>;
@@ -398,7 +398,7 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
398
398
  };
399
399
  output: ({
400
400
  id: string;
401
- md5: string | null;
401
+ md5: string;
402
402
  dataPart: number;
403
403
  dataKey: string;
404
404
  createdAt: Date;
@@ -1084,7 +1084,7 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
1084
1084
  size: bigint;
1085
1085
  prefix: string;
1086
1086
  sizeEncrypted: bigint | null;
1087
- md5: string | null;
1087
+ md5: string;
1088
1088
  md5Encrypted: string | null;
1089
1089
  mime: string | null;
1090
1090
  ext: string | null;
@@ -1106,7 +1106,7 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
1106
1106
  size: bigint;
1107
1107
  prefix: string;
1108
1108
  sizeEncrypted: bigint | null;
1109
- md5: string | null;
1109
+ md5: string;
1110
1110
  md5Encrypted: string | null;
1111
1111
  mime: string | null;
1112
1112
  ext: string | null;
@@ -1156,7 +1156,7 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
1156
1156
  size: bigint;
1157
1157
  prefix: string;
1158
1158
  sizeEncrypted: bigint | null;
1159
- md5: string | null;
1159
+ md5: string;
1160
1160
  md5Encrypted: string | null;
1161
1161
  mime: string | null;
1162
1162
  ext: string | null;
@@ -1182,7 +1182,7 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
1182
1182
  };
1183
1183
  output: {
1184
1184
  id: string;
1185
- md5: string | null;
1185
+ md5: string;
1186
1186
  size: bigint;
1187
1187
  sizeEncrypted: bigint | null;
1188
1188
  md5Encrypted: string | null;
@@ -1201,7 +1201,7 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
1201
1201
  maybeContent: Uint8Array<ArrayBufferLike> | null;
1202
1202
  } | {
1203
1203
  id: string;
1204
- md5: string | null;
1204
+ md5: string;
1205
1205
  size: bigint;
1206
1206
  sizeEncrypted: bigint | null;
1207
1207
  md5Encrypted: string | null;
@@ -1219,7 +1219,7 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
1219
1219
  maybeContent: Uint8Array<ArrayBufferLike> | null;
1220
1220
  } | {
1221
1221
  id: string;
1222
- md5: string | null;
1222
+ md5: string;
1223
1223
  size: bigint;
1224
1224
  sizeEncrypted: bigint | null;
1225
1225
  md5Encrypted: string | null;
@@ -1237,7 +1237,7 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
1237
1237
  }[];
1238
1238
  } | {
1239
1239
  id: string;
1240
- md5: string | null;
1240
+ md5: string;
1241
1241
  size: bigint;
1242
1242
  sizeEncrypted: bigint | null;
1243
1243
  md5Encrypted: string | null;
@@ -1260,7 +1260,7 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
1260
1260
  };
1261
1261
  output: ({
1262
1262
  id: string;
1263
- md5: string | null;
1263
+ md5: string;
1264
1264
  size: bigint;
1265
1265
  sizeEncrypted: bigint | null;
1266
1266
  md5Encrypted: string | null;
@@ -1279,7 +1279,7 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
1279
1279
  maybeContent: Uint8Array<ArrayBufferLike> | null;
1280
1280
  } | {
1281
1281
  id: string;
1282
- md5: string | null;
1282
+ md5: string;
1283
1283
  size: bigint;
1284
1284
  sizeEncrypted: bigint | null;
1285
1285
  md5Encrypted: string | null;
@@ -1297,7 +1297,7 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
1297
1297
  maybeContent: Uint8Array<ArrayBufferLike> | null;
1298
1298
  } | {
1299
1299
  id: string;
1300
- md5: string | null;
1300
+ md5: string;
1301
1301
  size: bigint;
1302
1302
  sizeEncrypted: bigint | null;
1303
1303
  md5Encrypted: string | null;
@@ -1315,7 +1315,7 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
1315
1315
  }[];
1316
1316
  } | {
1317
1317
  id: string;
1318
- md5: string | null;
1318
+ md5: string;
1319
1319
  size: bigint;
1320
1320
  sizeEncrypted: bigint | null;
1321
1321
  md5Encrypted: string | null;
@@ -1525,7 +1525,7 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
1525
1525
  size: bigint;
1526
1526
  prefix: string;
1527
1527
  sizeEncrypted: bigint | null;
1528
- md5: string | null;
1528
+ md5: string;
1529
1529
  md5Encrypted: string | null;
1530
1530
  mime: string | null;
1531
1531
  ext: string | null;
@@ -1547,7 +1547,7 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
1547
1547
  size: bigint;
1548
1548
  prefix: string;
1549
1549
  sizeEncrypted: bigint | null;
1550
- md5: string | null;
1550
+ md5: string;
1551
1551
  md5Encrypted: string | null;
1552
1552
  mime: string | null;
1553
1553
  ext: string | null;
@@ -1682,6 +1682,7 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
1682
1682
  uploadData: import("@trpc/server").TRPCMutationProcedure<{
1683
1683
  input: {
1684
1684
  size: bigint;
1685
+ md5: string;
1685
1686
  sizeEncrypted: bigint;
1686
1687
  md5Encrypted: string;
1687
1688
  type: "encrypted";
@@ -1728,6 +1729,7 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
1728
1729
  fromIdentityPubKey?: string | null | undefined;
1729
1730
  appId?: string | null | undefined;
1730
1731
  size: bigint;
1732
+ md5: string;
1731
1733
  sizeEncrypted: bigint;
1732
1734
  md5Encrypted: string;
1733
1735
  type: "encrypted";
@@ -1772,6 +1774,7 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
1772
1774
  uploadLiteData: import("@trpc/server").TRPCMutationProcedure<{
1773
1775
  input: {
1774
1776
  size: bigint;
1777
+ md5: string;
1775
1778
  sizeEncrypted: bigint;
1776
1779
  md5Encrypted: string;
1777
1780
  type: "encrypted";
@@ -2137,7 +2140,7 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
2137
2140
  size: bigint;
2138
2141
  prefix: string;
2139
2142
  sizeEncrypted: bigint | null;
2140
- md5: string | null;
2143
+ md5: string;
2141
2144
  md5Encrypted: string | null;
2142
2145
  mime: string | null;
2143
2146
  ext: string | null;
@@ -2159,7 +2162,7 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
2159
2162
  size: bigint;
2160
2163
  prefix: string;
2161
2164
  sizeEncrypted: bigint | null;
2162
- md5: string | null;
2165
+ md5: string;
2163
2166
  md5Encrypted: string | null;
2164
2167
  mime: string | null;
2165
2168
  ext: string | null;
@@ -2608,7 +2611,7 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
2608
2611
  size: bigint;
2609
2612
  prefix: string;
2610
2613
  sizeEncrypted: bigint | null;
2611
- md5: string | null;
2614
+ md5: string;
2612
2615
  md5Encrypted: string | null;
2613
2616
  mime: string | null;
2614
2617
  ext: string | null;
@@ -2630,7 +2633,7 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
2630
2633
  size: bigint;
2631
2634
  prefix: string;
2632
2635
  sizeEncrypted: bigint | null;
2633
- md5: string | null;
2636
+ md5: string;
2634
2637
  md5Encrypted: string | null;
2635
2638
  mime: string | null;
2636
2639
  ext: string | null;
@@ -2827,7 +2830,7 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
2827
2830
  size: bigint;
2828
2831
  prefix: string;
2829
2832
  sizeEncrypted: bigint | null;
2830
- md5: string | null;
2833
+ md5: string;
2831
2834
  md5Encrypted: string | null;
2832
2835
  mime: string | null;
2833
2836
  ext: string | null;
@@ -2849,7 +2852,7 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
2849
2852
  size: bigint;
2850
2853
  prefix: string;
2851
2854
  sizeEncrypted: bigint | null;
2852
- md5: string | null;
2855
+ md5: string;
2853
2856
  md5Encrypted: string | null;
2854
2857
  mime: string | null;
2855
2858
  ext: string | null;
@@ -3387,7 +3390,7 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
3387
3390
  size: bigint;
3388
3391
  prefix: string;
3389
3392
  sizeEncrypted: bigint | null;
3390
- md5: string | null;
3393
+ md5: string;
3391
3394
  md5Encrypted: string | null;
3392
3395
  mime: string | null;
3393
3396
  ext: string | null;
@@ -3409,7 +3412,7 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
3409
3412
  size: bigint;
3410
3413
  prefix: string;
3411
3414
  sizeEncrypted: bigint | null;
3412
- md5: string | null;
3415
+ md5: string;
3413
3416
  md5Encrypted: string | null;
3414
3417
  mime: string | null;
3415
3418
  ext: string | null;
@@ -5306,7 +5309,6 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
5306
5309
  metrics: {
5307
5310
  lastReset: Date;
5308
5311
  membersCount: bigint;
5309
- } & {
5310
5312
  totalDataCount: bigint;
5311
5313
  totalDataSize: bigint;
5312
5314
  downloadBandwidth: bigint;
@@ -5344,10 +5346,9 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
5344
5346
  paidByApp?: boolean | undefined;
5345
5347
  userIds?: string[] | undefined;
5346
5348
  };
5347
- output: ({
5349
+ output: {
5348
5350
  lastReset: Date;
5349
5351
  membersCount: bigint;
5350
- } & {
5351
5352
  totalDataCount: bigint;
5352
5353
  totalDataSize: bigint;
5353
5354
  downloadBandwidth: bigint;
@@ -5357,7 +5358,9 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
5357
5358
  sentMailCount: bigint;
5358
5359
  sentMailDataCount: bigint;
5359
5360
  sentMailDataSize: bigint;
5360
- }) | {
5361
+ type: "organization";
5362
+ } | {
5363
+ type: "details";
5361
5364
  lastReset: Date;
5362
5365
  details: {
5363
5366
  totalDataCount: bigint;
@@ -5369,6 +5372,8 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
5369
5372
  sentMailCount: bigint;
5370
5373
  sentMailDataCount: bigint;
5371
5374
  sentMailDataSize: bigint;
5375
+ userId?: string | undefined;
5376
+ appId?: string | undefined;
5372
5377
  }[];
5373
5378
  };
5374
5379
  meta: any;
@@ -6774,7 +6779,6 @@ export declare const getTrpcGuestClient: ({ url }?: {
6774
6779
  hasDatabase: boolean;
6775
6780
  devsCount: bigint;
6776
6781
  usersCount: bigint;
6777
- } & {
6778
6782
  totalDataCount: bigint;
6779
6783
  totalDataSize: bigint;
6780
6784
  downloadBandwidth: bigint;
@@ -6849,12 +6853,11 @@ export declare const getTrpcGuestClient: ({ url }?: {
6849
6853
  paidByApp?: boolean | undefined;
6850
6854
  userIds?: string[] | undefined;
6851
6855
  };
6852
- output: ({
6856
+ output: {
6853
6857
  lastReset: Date;
6854
6858
  hasDatabase: boolean;
6855
6859
  devsCount: bigint;
6856
6860
  usersCount: bigint;
6857
- } & {
6858
6861
  totalDataCount: bigint;
6859
6862
  totalDataSize: bigint;
6860
6863
  downloadBandwidth: bigint;
@@ -6864,11 +6867,12 @@ export declare const getTrpcGuestClient: ({ url }?: {
6864
6867
  sentMailCount: bigint;
6865
6868
  sentMailDataCount: bigint;
6866
6869
  sentMailDataSize: bigint;
6867
- }) | {
6870
+ type: "application";
6871
+ } | {
6872
+ type: "details";
6868
6873
  lastReset: Date;
6869
- details: ({
6874
+ details: {
6870
6875
  userId: string;
6871
- } & {
6872
6876
  totalDataCount: bigint;
6873
6877
  totalDataSize: bigint;
6874
6878
  downloadBandwidth: bigint;
@@ -6878,7 +6882,7 @@ export declare const getTrpcGuestClient: ({ url }?: {
6878
6882
  sentMailCount: bigint;
6879
6883
  sentMailDataCount: bigint;
6880
6884
  sentMailDataSize: bigint;
6881
- })[];
6885
+ }[];
6882
6886
  };
6883
6887
  meta: any;
6884
6888
  }>;
@@ -7105,7 +7109,7 @@ export declare const getTrpcGuestClient: ({ url }?: {
7105
7109
  };
7106
7110
  output: ({
7107
7111
  id: string;
7108
- md5: string | null;
7112
+ md5: string;
7109
7113
  dataPart: number;
7110
7114
  dataKey: string;
7111
7115
  createdAt: Date;
@@ -7791,7 +7795,7 @@ export declare const getTrpcGuestClient: ({ url }?: {
7791
7795
  size: bigint;
7792
7796
  prefix: string;
7793
7797
  sizeEncrypted: bigint | null;
7794
- md5: string | null;
7798
+ md5: string;
7795
7799
  md5Encrypted: string | null;
7796
7800
  mime: string | null;
7797
7801
  ext: string | null;
@@ -7813,7 +7817,7 @@ export declare const getTrpcGuestClient: ({ url }?: {
7813
7817
  size: bigint;
7814
7818
  prefix: string;
7815
7819
  sizeEncrypted: bigint | null;
7816
- md5: string | null;
7820
+ md5: string;
7817
7821
  md5Encrypted: string | null;
7818
7822
  mime: string | null;
7819
7823
  ext: string | null;
@@ -7863,7 +7867,7 @@ export declare const getTrpcGuestClient: ({ url }?: {
7863
7867
  size: bigint;
7864
7868
  prefix: string;
7865
7869
  sizeEncrypted: bigint | null;
7866
- md5: string | null;
7870
+ md5: string;
7867
7871
  md5Encrypted: string | null;
7868
7872
  mime: string | null;
7869
7873
  ext: string | null;
@@ -7889,7 +7893,7 @@ export declare const getTrpcGuestClient: ({ url }?: {
7889
7893
  };
7890
7894
  output: {
7891
7895
  id: string;
7892
- md5: string | null;
7896
+ md5: string;
7893
7897
  size: bigint;
7894
7898
  sizeEncrypted: bigint | null;
7895
7899
  md5Encrypted: string | null;
@@ -7908,7 +7912,7 @@ export declare const getTrpcGuestClient: ({ url }?: {
7908
7912
  maybeContent: Uint8Array<ArrayBufferLike> | null;
7909
7913
  } | {
7910
7914
  id: string;
7911
- md5: string | null;
7915
+ md5: string;
7912
7916
  size: bigint;
7913
7917
  sizeEncrypted: bigint | null;
7914
7918
  md5Encrypted: string | null;
@@ -7926,7 +7930,7 @@ export declare const getTrpcGuestClient: ({ url }?: {
7926
7930
  maybeContent: Uint8Array<ArrayBufferLike> | null;
7927
7931
  } | {
7928
7932
  id: string;
7929
- md5: string | null;
7933
+ md5: string;
7930
7934
  size: bigint;
7931
7935
  sizeEncrypted: bigint | null;
7932
7936
  md5Encrypted: string | null;
@@ -7944,7 +7948,7 @@ export declare const getTrpcGuestClient: ({ url }?: {
7944
7948
  }[];
7945
7949
  } | {
7946
7950
  id: string;
7947
- md5: string | null;
7951
+ md5: string;
7948
7952
  size: bigint;
7949
7953
  sizeEncrypted: bigint | null;
7950
7954
  md5Encrypted: string | null;
@@ -7967,7 +7971,7 @@ export declare const getTrpcGuestClient: ({ url }?: {
7967
7971
  };
7968
7972
  output: ({
7969
7973
  id: string;
7970
- md5: string | null;
7974
+ md5: string;
7971
7975
  size: bigint;
7972
7976
  sizeEncrypted: bigint | null;
7973
7977
  md5Encrypted: string | null;
@@ -7986,7 +7990,7 @@ export declare const getTrpcGuestClient: ({ url }?: {
7986
7990
  maybeContent: Uint8Array<ArrayBufferLike> | null;
7987
7991
  } | {
7988
7992
  id: string;
7989
- md5: string | null;
7993
+ md5: string;
7990
7994
  size: bigint;
7991
7995
  sizeEncrypted: bigint | null;
7992
7996
  md5Encrypted: string | null;
@@ -8004,7 +8008,7 @@ export declare const getTrpcGuestClient: ({ url }?: {
8004
8008
  maybeContent: Uint8Array<ArrayBufferLike> | null;
8005
8009
  } | {
8006
8010
  id: string;
8007
- md5: string | null;
8011
+ md5: string;
8008
8012
  size: bigint;
8009
8013
  sizeEncrypted: bigint | null;
8010
8014
  md5Encrypted: string | null;
@@ -8022,7 +8026,7 @@ export declare const getTrpcGuestClient: ({ url }?: {
8022
8026
  }[];
8023
8027
  } | {
8024
8028
  id: string;
8025
- md5: string | null;
8029
+ md5: string;
8026
8030
  size: bigint;
8027
8031
  sizeEncrypted: bigint | null;
8028
8032
  md5Encrypted: string | null;
@@ -8232,7 +8236,7 @@ export declare const getTrpcGuestClient: ({ url }?: {
8232
8236
  size: bigint;
8233
8237
  prefix: string;
8234
8238
  sizeEncrypted: bigint | null;
8235
- md5: string | null;
8239
+ md5: string;
8236
8240
  md5Encrypted: string | null;
8237
8241
  mime: string | null;
8238
8242
  ext: string | null;
@@ -8254,7 +8258,7 @@ export declare const getTrpcGuestClient: ({ url }?: {
8254
8258
  size: bigint;
8255
8259
  prefix: string;
8256
8260
  sizeEncrypted: bigint | null;
8257
- md5: string | null;
8261
+ md5: string;
8258
8262
  md5Encrypted: string | null;
8259
8263
  mime: string | null;
8260
8264
  ext: string | null;
@@ -8389,6 +8393,7 @@ export declare const getTrpcGuestClient: ({ url }?: {
8389
8393
  uploadData: import("@trpc/server").TRPCMutationProcedure<{
8390
8394
  input: {
8391
8395
  size: bigint;
8396
+ md5: string;
8392
8397
  sizeEncrypted: bigint;
8393
8398
  md5Encrypted: string;
8394
8399
  type: "encrypted";
@@ -8435,6 +8440,7 @@ export declare const getTrpcGuestClient: ({ url }?: {
8435
8440
  fromIdentityPubKey?: string | null | undefined;
8436
8441
  appId?: string | null | undefined;
8437
8442
  size: bigint;
8443
+ md5: string;
8438
8444
  sizeEncrypted: bigint;
8439
8445
  md5Encrypted: string;
8440
8446
  type: "encrypted";
@@ -8479,6 +8485,7 @@ export declare const getTrpcGuestClient: ({ url }?: {
8479
8485
  uploadLiteData: import("@trpc/server").TRPCMutationProcedure<{
8480
8486
  input: {
8481
8487
  size: bigint;
8488
+ md5: string;
8482
8489
  sizeEncrypted: bigint;
8483
8490
  md5Encrypted: string;
8484
8491
  type: "encrypted";
@@ -8844,7 +8851,7 @@ export declare const getTrpcGuestClient: ({ url }?: {
8844
8851
  size: bigint;
8845
8852
  prefix: string;
8846
8853
  sizeEncrypted: bigint | null;
8847
- md5: string | null;
8854
+ md5: string;
8848
8855
  md5Encrypted: string | null;
8849
8856
  mime: string | null;
8850
8857
  ext: string | null;
@@ -8866,7 +8873,7 @@ export declare const getTrpcGuestClient: ({ url }?: {
8866
8873
  size: bigint;
8867
8874
  prefix: string;
8868
8875
  sizeEncrypted: bigint | null;
8869
- md5: string | null;
8876
+ md5: string;
8870
8877
  md5Encrypted: string | null;
8871
8878
  mime: string | null;
8872
8879
  ext: string | null;
@@ -9315,7 +9322,7 @@ export declare const getTrpcGuestClient: ({ url }?: {
9315
9322
  size: bigint;
9316
9323
  prefix: string;
9317
9324
  sizeEncrypted: bigint | null;
9318
- md5: string | null;
9325
+ md5: string;
9319
9326
  md5Encrypted: string | null;
9320
9327
  mime: string | null;
9321
9328
  ext: string | null;
@@ -9337,7 +9344,7 @@ export declare const getTrpcGuestClient: ({ url }?: {
9337
9344
  size: bigint;
9338
9345
  prefix: string;
9339
9346
  sizeEncrypted: bigint | null;
9340
- md5: string | null;
9347
+ md5: string;
9341
9348
  md5Encrypted: string | null;
9342
9349
  mime: string | null;
9343
9350
  ext: string | null;
@@ -9534,7 +9541,7 @@ export declare const getTrpcGuestClient: ({ url }?: {
9534
9541
  size: bigint;
9535
9542
  prefix: string;
9536
9543
  sizeEncrypted: bigint | null;
9537
- md5: string | null;
9544
+ md5: string;
9538
9545
  md5Encrypted: string | null;
9539
9546
  mime: string | null;
9540
9547
  ext: string | null;
@@ -9556,7 +9563,7 @@ export declare const getTrpcGuestClient: ({ url }?: {
9556
9563
  size: bigint;
9557
9564
  prefix: string;
9558
9565
  sizeEncrypted: bigint | null;
9559
- md5: string | null;
9566
+ md5: string;
9560
9567
  md5Encrypted: string | null;
9561
9568
  mime: string | null;
9562
9569
  ext: string | null;
@@ -10094,7 +10101,7 @@ export declare const getTrpcGuestClient: ({ url }?: {
10094
10101
  size: bigint;
10095
10102
  prefix: string;
10096
10103
  sizeEncrypted: bigint | null;
10097
- md5: string | null;
10104
+ md5: string;
10098
10105
  md5Encrypted: string | null;
10099
10106
  mime: string | null;
10100
10107
  ext: string | null;
@@ -10116,7 +10123,7 @@ export declare const getTrpcGuestClient: ({ url }?: {
10116
10123
  size: bigint;
10117
10124
  prefix: string;
10118
10125
  sizeEncrypted: bigint | null;
10119
- md5: string | null;
10126
+ md5: string;
10120
10127
  md5Encrypted: string | null;
10121
10128
  mime: string | null;
10122
10129
  ext: string | null;
@@ -12013,7 +12020,6 @@ export declare const getTrpcGuestClient: ({ url }?: {
12013
12020
  metrics: {
12014
12021
  lastReset: Date;
12015
12022
  membersCount: bigint;
12016
- } & {
12017
12023
  totalDataCount: bigint;
12018
12024
  totalDataSize: bigint;
12019
12025
  downloadBandwidth: bigint;
@@ -12051,10 +12057,9 @@ export declare const getTrpcGuestClient: ({ url }?: {
12051
12057
  paidByApp?: boolean | undefined;
12052
12058
  userIds?: string[] | undefined;
12053
12059
  };
12054
- output: ({
12060
+ output: {
12055
12061
  lastReset: Date;
12056
12062
  membersCount: bigint;
12057
- } & {
12058
12063
  totalDataCount: bigint;
12059
12064
  totalDataSize: bigint;
12060
12065
  downloadBandwidth: bigint;
@@ -12064,7 +12069,9 @@ export declare const getTrpcGuestClient: ({ url }?: {
12064
12069
  sentMailCount: bigint;
12065
12070
  sentMailDataCount: bigint;
12066
12071
  sentMailDataSize: bigint;
12067
- }) | {
12072
+ type: "organization";
12073
+ } | {
12074
+ type: "details";
12068
12075
  lastReset: Date;
12069
12076
  details: {
12070
12077
  totalDataCount: bigint;
@@ -12076,6 +12083,8 @@ export declare const getTrpcGuestClient: ({ url }?: {
12076
12083
  sentMailCount: bigint;
12077
12084
  sentMailDataCount: bigint;
12078
12085
  sentMailDataSize: bigint;
12086
+ userId?: string | undefined;
12087
+ appId?: string | undefined;
12079
12088
  }[];
12080
12089
  };
12081
12090
  meta: any;
@@ -1,6 +1,6 @@
1
1
  export interface EncryptedFile {
2
2
  data: Uint8Array<ArrayBuffer>;
3
- /** md5 of the ciphertext. No digest of the plaintext is ever computed. */
3
+ md5: string;
4
4
  md5Encrypted: string;
5
5
  }
6
6
  export declare function secretStreamKeygen(): Uint8Array;
@@ -10,15 +10,5 @@ export interface SecretStreamProgress {
10
10
  total: number;
11
11
  current: number;
12
12
  }
13
- /**
14
- * Encrypt `data` as a secretstream: the header followed by one authenticated
15
- * chunk per CHUNK_SIZE bytes of plaintext. The last chunk (an empty one for
16
- * empty data) is always tagged `TAG_FINAL` so that truncation is detected.
17
- */
18
13
  export declare function encryptSecretStream(key: Uint8Array, data: Uint8Array<ArrayBuffer>, progress?: (progress: SecretStreamProgress) => Promise<void>, signal?: AbortSignal): Promise<EncryptedFile>;
19
- /**
20
- * Decrypt a secretstream produced by `encryptSecretStream`. Throws if any
21
- * chunk fails authentication, if data follows the `TAG_FINAL` chunk, or if the
22
- * stream ends without it (truncation).
23
- */
24
14
  export declare function decryptSecretStream(key: Uint8Array, data: Uint8Array<ArrayBuffer>, progress?: (progress: SecretStreamProgress) => Promise<void>, signal?: AbortSignal): Promise<Uint8Array<ArrayBuffer>>;
@@ -19,6 +19,7 @@ export declare function encryptDataAndKey({ data, currentIdentity, keyPairs, pro
19
19
  encryptedDataKey?: Uint8Array<ArrayBufferLike>;
20
20
  encryptedData: Uint8Array<ArrayBuffer>;
21
21
  dataKey: Uint8Array<ArrayBufferLike>;
22
+ md5Data: string;
22
23
  md5Encrypted: string;
23
24
  }>;
24
25
  export declare function buildBytesFromApiData({ dataContent, totalBytes, progressParts, onDownloadProgress, signal, }: {
@@ -1,12 +1,5 @@
1
1
  export declare function generatePassword(): string;
2
2
  export declare function derivePassword(password: string, salt: Uint8Array<ArrayBufferLike>): string;
3
- /**
4
- * Wrap a data key under a password, with a random salt:
5
- * `version (1 byte) || salt || nonce || secretbox(key)`.
6
- */
7
- export declare function encryptKeyWithPassword(key: Uint8Array, password: string): Uint8Array;
8
- /** Unwrap a data key produced by `encryptKeyWithPassword`. */
9
- export declare function decryptKeyWithPassword(wrapped: Uint8Array, password: string): Uint8Array;
10
3
  export declare function encryptName(name: string, nameKey: string): Promise<string>;
11
4
  export declare function generateAndEncryptNameAndKey(args: {
12
5
  name: string;
@@ -1,12 +1,20 @@
1
1
  import { z } from 'zod';
2
2
  export declare const clientErrorCodeKey: z.ZodEnum<{
3
3
  NOT_FOUND: "NOT_FOUND";
4
+ DATA_TOO_SHORT: "DATA_TOO_SHORT";
5
+ POPUP_BLOCKED: "POPUP_BLOCKED";
6
+ POPUP_CLOSED: "POPUP_CLOSED";
7
+ SERVER_ENVIRONMENT: "SERVER_ENVIRONMENT";
4
8
  }>;
5
9
  export type CLIENT_ERROR_CODE_KEY = z.infer<typeof clientErrorCodeKey>;
6
10
  export declare const clientError: z.ZodObject<{
7
11
  name: z.ZodLiteral<"ClientError">;
8
12
  code: z.ZodEnum<{
9
13
  NOT_FOUND: "NOT_FOUND";
14
+ DATA_TOO_SHORT: "DATA_TOO_SHORT";
15
+ POPUP_BLOCKED: "POPUP_BLOCKED";
16
+ POPUP_CLOSED: "POPUP_CLOSED";
17
+ SERVER_ENVIRONMENT: "SERVER_ENVIRONMENT";
10
18
  }>;
11
19
  message: z.ZodString;
12
20
  }, z.core.$strip>;
@@ -24,6 +24,10 @@ export declare const secrecyError: z.ZodDiscriminatedUnion<[z.ZodObject<{
24
24
  name: z.ZodLiteral<"ClientError">;
25
25
  code: z.ZodEnum<{
26
26
  NOT_FOUND: "NOT_FOUND";
27
+ DATA_TOO_SHORT: "DATA_TOO_SHORT";
28
+ POPUP_BLOCKED: "POPUP_BLOCKED";
29
+ POPUP_CLOSED: "POPUP_CLOSED";
30
+ SERVER_ENVIRONMENT: "SERVER_ENVIRONMENT";
27
31
  }>;
28
32
  message: z.ZodString;
29
33
  }, z.core.$strip>], "name">;