@secrecy/lib 1.52.0 → 1.54.0

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.
@@ -15,6 +15,7 @@ import { promiseAllLimit } from '../utils/promise.js';
15
15
  import { kiloToBytes } from '../utils.js';
16
16
  // import { md5 } from "../worker/index.js";
17
17
  // import { firstValueFrom, of } from "rxjs";
18
+ import { fileTypeFromBlob, fileTypeFromBuffer } from 'file-type';
18
19
  export class SecrecyCloudClient {
19
20
  #client;
20
21
  #keys;
@@ -49,12 +50,26 @@ export class SecrecyCloudClient {
49
50
  }
50
51
  return internalNodeFullToNodeFull(node);
51
52
  }
52
- async uploadData({ storageType, data, encrypted = true, encryptProgress, uploadProgress, signal, }) {
53
+ async uploadData({ storageType, data, encrypted = true, encryptProgress, uploadProgress, signal, meta, }) {
54
+ let filetype;
55
+ if (meta === true) {
56
+ filetype = await (data instanceof File
57
+ ? fileTypeFromBlob(data)
58
+ : fileTypeFromBuffer(data));
59
+ }
60
+ else if (typeof meta !== 'undefined') {
61
+ filetype = meta;
62
+ }
63
+ else if (!encrypted) {
64
+ filetype = await (data instanceof File
65
+ ? fileTypeFromBlob(data)
66
+ : fileTypeFromBuffer(data));
67
+ }
53
68
  const dataBuffer = data instanceof File ? new Uint8Array(await data.arrayBuffer()) : data;
54
69
  if (storageType === 'lite' && dataBuffer.byteLength > kiloToBytes(4500)) {
55
70
  throw new Error('The data is too big for lite upload!');
56
71
  }
57
- const compressed = compress(dataBuffer);
72
+ const compressed = encrypted ? compress(dataBuffer) : dataBuffer;
58
73
  const dataKey = encrypted ? secretStreamKeygen() : null;
59
74
  const { data: encryptedData, md5: md5Data, md5Encrypted, } = dataKey
60
75
  ? await encrypt(dataKey, compressed, encryptProgress, signal)
@@ -80,12 +95,15 @@ export class SecrecyCloudClient {
80
95
  key: sodium.to_hex(encryptedDataKey),
81
96
  md5Encrypted,
82
97
  md5: md5Data,
98
+ ...filetype,
83
99
  }
84
100
  : {
85
101
  type: 'unencrypted',
86
102
  content: Buffer.from(encryptedData),
87
103
  md5: md5Data,
104
+ sizeEncrypted: undefined,
88
105
  size: BigInt(dataBuffer.byteLength),
106
+ ...filetype,
89
107
  };
90
108
  const uploadData = await this.#apiClient.cloud.uploadLiteData.mutate(uploadDataArgs, { signal });
91
109
  await uploadProgress?.({
@@ -93,17 +111,16 @@ export class SecrecyCloudClient {
93
111
  current: encryptedData.byteLength,
94
112
  percent: 1,
95
113
  });
96
- dataContentCache.set(uploadData.id, {
114
+ const localData = {
97
115
  id: uploadData.id,
98
116
  storageType: 'lite',
99
117
  size: uploadDataArgs.size,
100
118
  sizeEncrypted: uploadDataArgs.sizeEncrypted ?? null,
101
119
  data: dataBuffer,
102
- });
103
- return {
104
- object: 'lite',
105
- id: uploadData.id,
120
+ ...filetype,
106
121
  };
122
+ dataContentCache.set(uploadData.id, localData);
123
+ return localData;
107
124
  }
108
125
  if (storageType === 's3' || storageType === 'cold') {
109
126
  const uploadDataArgs = encryptedDataKey && md5Encrypted
@@ -114,11 +131,14 @@ export class SecrecyCloudClient {
114
131
  key: sodium.to_hex(encryptedDataKey),
115
132
  md5Encrypted,
116
133
  md5: md5Data,
134
+ ...filetype,
117
135
  }
118
136
  : {
119
137
  type: 'unencrypted',
120
138
  md5: md5Data,
121
139
  size: BigInt(dataBuffer.byteLength),
140
+ sizeEncrypted: undefined,
141
+ ...filetype,
122
142
  };
123
143
  const uploadDataCaller = storageType === 's3'
124
144
  ? this.#apiClient.cloud.uploadData
@@ -135,17 +155,16 @@ export class SecrecyCloudClient {
135
155
  current: encryptedData.byteLength,
136
156
  percent: 1,
137
157
  });
138
- dataContentCache.set(uploadData.id, {
158
+ const localData = {
139
159
  id: uploadData.id,
140
160
  storageType: storageType,
141
161
  size: uploadDataArgs.size,
142
162
  sizeEncrypted: uploadDataArgs.sizeEncrypted ?? null,
143
163
  data: dataBuffer,
144
- });
145
- return {
146
- object: storageType,
147
- id: uploadData.id,
164
+ ...filetype,
148
165
  };
166
+ dataContentCache.set(uploadData.id, localData);
167
+ return localData;
149
168
  }
150
169
  const uploadDataPartEnd = async (md5, order) => {
151
170
  return this.#apiClient.cloud.uploadDataPartEnd.mutate({
@@ -193,17 +212,16 @@ export class SecrecyCloudClient {
193
212
  await promiseAllLimit(3, uploadData.parts.map((p) => async () => {
194
213
  await byPart(p);
195
214
  }));
196
- dataContentCache.set(uploadData.id, {
215
+ const localData = {
197
216
  id: uploadData.id,
198
217
  storageType: storageType,
199
218
  size: uploadDataArgs.size,
200
219
  sizeEncrypted: uploadDataArgs.sizeEncrypted ?? null,
201
220
  data: dataBuffer,
202
- });
203
- return {
204
- object: storageType,
205
- id: uploadData.id,
221
+ ...filetype,
206
222
  };
223
+ dataContentCache.set(uploadData.id, localData);
224
+ return localData;
207
225
  }
208
226
  throw new Error(`The "${storageType}" is not implemented yet!`);
209
227
  }
@@ -666,6 +684,8 @@ export class SecrecyCloudClient {
666
684
  sizeEncrypted: dataContent.sizeEncrypted,
667
685
  storageType: dataContent.storageType,
668
686
  data: decompressed,
687
+ mime: dataContent.mime ?? undefined,
688
+ ext: dataContent.ext ?? undefined,
669
689
  });
670
690
  return {
671
691
  id: dataContent.id,
@@ -673,6 +693,8 @@ export class SecrecyCloudClient {
673
693
  sizeEncrypted: dataContent.sizeEncrypted,
674
694
  storageType: dataContent.storageType,
675
695
  data: decompressed,
696
+ mime: dataContent.mime ?? undefined,
697
+ ext: dataContent.ext ?? undefined,
676
698
  };
677
699
  }
678
700
  }
@@ -2,6 +2,7 @@ import type { ProgressCallback, SecrecyClient } from '../index.js';
2
2
  import type { DataMetadata, DataStorageType, KeyPair, LocalData, Node, NodeFull, NodeType, Rights } from './types/index.js';
3
3
  import { type RouterInputs, type ApiClient, type RouterOutputs } from '../client.js';
4
4
  import { type DownloadProgress } from '../types.js';
5
+ import { FileTypeResult } from 'file-type';
5
6
  export declare class SecrecyCloudClient {
6
7
  #private;
7
8
  constructor(client: SecrecyClient, keys: KeyPair, apiClient: ApiClient);
@@ -9,17 +10,15 @@ export declare class SecrecyCloudClient {
9
10
  dataId: string;
10
11
  nodeId: string;
11
12
  }): Promise<NodeFull>;
12
- uploadData({ storageType, data, encrypted, encryptProgress, uploadProgress, signal, }: {
13
+ uploadData({ storageType, data, encrypted, encryptProgress, uploadProgress, signal, meta, }: {
13
14
  storageType: DataStorageType;
14
15
  data: globalThis.File | Uint8Array;
15
16
  encrypted?: boolean;
16
17
  encryptProgress?: ProgressCallback;
17
18
  uploadProgress?: ProgressCallback;
18
19
  signal?: AbortSignal;
19
- }): Promise<{
20
- id: string;
21
- object: DataStorageType;
22
- }>;
20
+ meta?: FileTypeResult | true;
21
+ }): Promise<LocalData>;
23
22
  uploadDataInCloud({ data, name, nodeId, encryptProgress, uploadProgress, storageType, signal, }: {
24
23
  data: globalThis.File | Uint8Array;
25
24
  name: string;
@@ -8,6 +8,8 @@ export type LocalData = {
8
8
  size: bigint;
9
9
  sizeEncrypted: bigint | null;
10
10
  data: Uint8Array;
11
+ mime?: string;
12
+ ext?: string;
11
13
  };
12
14
  export type DataMetadata = Pick<ApiData, 'id' | 'size' | 'sizeEncrypted' | 'md5' | 'md5Encrypted' | 'createdAt'>;
13
15
  export type InternalData = DataMetadata & {
@@ -2093,6 +2093,8 @@ export declare const createTRPCClient: (session?: string | null | undefined, onA
2093
2093
  userAppAppId: string;
2094
2094
  sizeEncrypted: bigint | null;
2095
2095
  md5Encrypted: string | null;
2096
+ mime: string | null;
2097
+ ext: string | null;
2096
2098
  validatedAt: Date | null;
2097
2099
  restoreSince: Date | null;
2098
2100
  access: {
@@ -2110,6 +2112,8 @@ export declare const createTRPCClient: (session?: string | null | undefined, onA
2110
2112
  userAppAppId: string;
2111
2113
  sizeEncrypted: bigint | null;
2112
2114
  md5Encrypted: string | null;
2115
+ mime: string | null;
2116
+ ext: string | null;
2113
2117
  validatedAt: Date | null;
2114
2118
  restoreSince: Date | null;
2115
2119
  access: {
@@ -2240,6 +2244,8 @@ export declare const createTRPCClient: (session?: string | null | undefined, onA
2240
2244
  userAppAppId: string;
2241
2245
  sizeEncrypted: bigint | null;
2242
2246
  md5Encrypted: string | null;
2247
+ mime: string | null;
2248
+ ext: string | null;
2243
2249
  validatedAt: Date | null;
2244
2250
  restoreSince: Date | null;
2245
2251
  access: {
@@ -2257,6 +2263,8 @@ export declare const createTRPCClient: (session?: string | null | undefined, onA
2257
2263
  userAppAppId: string;
2258
2264
  sizeEncrypted: bigint | null;
2259
2265
  md5Encrypted: string | null;
2266
+ mime: string | null;
2267
+ ext: string | null;
2260
2268
  validatedAt: Date | null;
2261
2269
  restoreSince: Date | null;
2262
2270
  access: {
@@ -2426,6 +2434,8 @@ export declare const createTRPCClient: (session?: string | null | undefined, onA
2426
2434
  userAppAppId: string;
2427
2435
  sizeEncrypted: bigint | null;
2428
2436
  md5Encrypted: string | null;
2437
+ mime: string | null;
2438
+ ext: string | null;
2429
2439
  validatedAt: Date | null;
2430
2440
  restoreSince: Date | null;
2431
2441
  access: {
@@ -2443,6 +2453,8 @@ export declare const createTRPCClient: (session?: string | null | undefined, onA
2443
2453
  userAppAppId: string;
2444
2454
  sizeEncrypted: bigint | null;
2445
2455
  md5Encrypted: string | null;
2456
+ mime: string | null;
2457
+ ext: string | null;
2446
2458
  validatedAt: Date | null;
2447
2459
  restoreSince: Date | null;
2448
2460
  access: {
@@ -2491,6 +2503,8 @@ export declare const createTRPCClient: (session?: string | null | undefined, onA
2491
2503
  md5: string;
2492
2504
  sizeEncrypted: bigint | null;
2493
2505
  md5Encrypted: string | null;
2506
+ mime: string | null;
2507
+ ext: string | null;
2494
2508
  senderPublicKey: string;
2495
2509
  maybeParts: {
2496
2510
  md5: string;
@@ -2507,6 +2521,8 @@ export declare const createTRPCClient: (session?: string | null | undefined, onA
2507
2521
  md5: string;
2508
2522
  sizeEncrypted: bigint | null;
2509
2523
  md5Encrypted: string | null;
2524
+ mime: string | null;
2525
+ ext: string | null;
2510
2526
  maybeParts: {
2511
2527
  md5: string;
2512
2528
  order: number;
@@ -2522,6 +2538,8 @@ export declare const createTRPCClient: (session?: string | null | undefined, onA
2522
2538
  md5: string;
2523
2539
  sizeEncrypted: bigint | null;
2524
2540
  md5Encrypted: string | null;
2541
+ mime: string | null;
2542
+ ext: string | null;
2525
2543
  parts: {
2526
2544
  md5: string;
2527
2545
  order: number;
@@ -2537,6 +2555,8 @@ export declare const createTRPCClient: (session?: string | null | undefined, onA
2537
2555
  md5: string;
2538
2556
  sizeEncrypted: bigint | null;
2539
2557
  md5Encrypted: string | null;
2558
+ mime: string | null;
2559
+ ext: string | null;
2540
2560
  content: Buffer;
2541
2561
  publicKey: string;
2542
2562
  };
@@ -2549,6 +2569,8 @@ export declare const createTRPCClient: (session?: string | null | undefined, onA
2549
2569
  md5: string;
2550
2570
  sizeEncrypted: bigint | null;
2551
2571
  md5Encrypted: string | null;
2572
+ mime: string | null;
2573
+ ext: string | null;
2552
2574
  senderPublicKey: string;
2553
2575
  maybeParts: {
2554
2576
  md5: string;
@@ -2565,6 +2587,8 @@ export declare const createTRPCClient: (session?: string | null | undefined, onA
2565
2587
  md5: string;
2566
2588
  sizeEncrypted: bigint | null;
2567
2589
  md5Encrypted: string | null;
2590
+ mime: string | null;
2591
+ ext: string | null;
2568
2592
  maybeParts: {
2569
2593
  md5: string;
2570
2594
  order: number;
@@ -2580,6 +2604,8 @@ export declare const createTRPCClient: (session?: string | null | undefined, onA
2580
2604
  md5: string;
2581
2605
  sizeEncrypted: bigint | null;
2582
2606
  md5Encrypted: string | null;
2607
+ mime: string | null;
2608
+ ext: string | null;
2583
2609
  parts: {
2584
2610
  md5: string;
2585
2611
  order: number;
@@ -2595,6 +2621,8 @@ export declare const createTRPCClient: (session?: string | null | undefined, onA
2595
2621
  md5: string;
2596
2622
  sizeEncrypted: bigint | null;
2597
2623
  md5Encrypted: string | null;
2624
+ mime: string | null;
2625
+ ext: string | null;
2598
2626
  content: Buffer;
2599
2627
  publicKey: string;
2600
2628
  };
@@ -2639,6 +2667,8 @@ export declare const createTRPCClient: (session?: string | null | undefined, onA
2639
2667
  md5: string;
2640
2668
  sizeEncrypted: bigint | null;
2641
2669
  md5Encrypted: string | null;
2670
+ mime: string | null;
2671
+ ext: string | null;
2642
2672
  senderPublicKey: string;
2643
2673
  maybeParts: {
2644
2674
  md5: string;
@@ -2655,6 +2685,8 @@ export declare const createTRPCClient: (session?: string | null | undefined, onA
2655
2685
  md5: string;
2656
2686
  sizeEncrypted: bigint | null;
2657
2687
  md5Encrypted: string | null;
2688
+ mime: string | null;
2689
+ ext: string | null;
2658
2690
  maybeParts: {
2659
2691
  md5: string;
2660
2692
  order: number;
@@ -2670,6 +2702,8 @@ export declare const createTRPCClient: (session?: string | null | undefined, onA
2670
2702
  md5: string;
2671
2703
  sizeEncrypted: bigint | null;
2672
2704
  md5Encrypted: string | null;
2705
+ mime: string | null;
2706
+ ext: string | null;
2673
2707
  parts: {
2674
2708
  md5: string;
2675
2709
  order: number;
@@ -2685,6 +2719,8 @@ export declare const createTRPCClient: (session?: string | null | undefined, onA
2685
2719
  md5: string;
2686
2720
  sizeEncrypted: bigint | null;
2687
2721
  md5Encrypted: string | null;
2722
+ mime: string | null;
2723
+ ext: string | null;
2688
2724
  content: Buffer;
2689
2725
  publicKey: string;
2690
2726
  })[];
@@ -2697,6 +2733,8 @@ export declare const createTRPCClient: (session?: string | null | undefined, onA
2697
2733
  md5: string;
2698
2734
  sizeEncrypted: bigint | null;
2699
2735
  md5Encrypted: string | null;
2736
+ mime: string | null;
2737
+ ext: string | null;
2700
2738
  senderPublicKey: string;
2701
2739
  maybeParts: {
2702
2740
  md5: string;
@@ -2713,6 +2751,8 @@ export declare const createTRPCClient: (session?: string | null | undefined, onA
2713
2751
  md5: string;
2714
2752
  sizeEncrypted: bigint | null;
2715
2753
  md5Encrypted: string | null;
2754
+ mime: string | null;
2755
+ ext: string | null;
2716
2756
  maybeParts: {
2717
2757
  md5: string;
2718
2758
  order: number;
@@ -2728,6 +2768,8 @@ export declare const createTRPCClient: (session?: string | null | undefined, onA
2728
2768
  md5: string;
2729
2769
  sizeEncrypted: bigint | null;
2730
2770
  md5Encrypted: string | null;
2771
+ mime: string | null;
2772
+ ext: string | null;
2731
2773
  parts: {
2732
2774
  md5: string;
2733
2775
  order: number;
@@ -2743,6 +2785,8 @@ export declare const createTRPCClient: (session?: string | null | undefined, onA
2743
2785
  md5: string;
2744
2786
  sizeEncrypted: bigint | null;
2745
2787
  md5Encrypted: string | null;
2788
+ mime: string | null;
2789
+ ext: string | null;
2746
2790
  content: Buffer;
2747
2791
  publicKey: string;
2748
2792
  })[];
@@ -2911,6 +2955,8 @@ export declare const createTRPCClient: (session?: string | null | undefined, onA
2911
2955
  userAppAppId: string;
2912
2956
  sizeEncrypted: bigint | null;
2913
2957
  md5Encrypted: string | null;
2958
+ mime: string | null;
2959
+ ext: string | null;
2914
2960
  validatedAt: Date | null;
2915
2961
  restoreSince: Date | null;
2916
2962
  access: {
@@ -2928,6 +2974,8 @@ export declare const createTRPCClient: (session?: string | null | undefined, onA
2928
2974
  userAppAppId: string;
2929
2975
  sizeEncrypted: bigint | null;
2930
2976
  md5Encrypted: string | null;
2977
+ mime: string | null;
2978
+ ext: string | null;
2931
2979
  validatedAt: Date | null;
2932
2980
  restoreSince: Date | null;
2933
2981
  access: {
@@ -3058,6 +3106,8 @@ export declare const createTRPCClient: (session?: string | null | undefined, onA
3058
3106
  userAppAppId: string;
3059
3107
  sizeEncrypted: bigint | null;
3060
3108
  md5Encrypted: string | null;
3109
+ mime: string | null;
3110
+ ext: string | null;
3061
3111
  validatedAt: Date | null;
3062
3112
  restoreSince: Date | null;
3063
3113
  access: {
@@ -3075,6 +3125,8 @@ export declare const createTRPCClient: (session?: string | null | undefined, onA
3075
3125
  userAppAppId: string;
3076
3126
  sizeEncrypted: bigint | null;
3077
3127
  md5Encrypted: string | null;
3128
+ mime: string | null;
3129
+ ext: string | null;
3078
3130
  validatedAt: Date | null;
3079
3131
  restoreSince: Date | null;
3080
3132
  access: {
@@ -3445,10 +3497,14 @@ export declare const createTRPCClient: (session?: string | null | undefined, onA
3445
3497
  md5: string;
3446
3498
  sizeEncrypted: bigint;
3447
3499
  md5Encrypted: string;
3500
+ mime?: string | undefined;
3501
+ ext?: string | undefined;
3448
3502
  } | {
3449
3503
  type: "unencrypted";
3450
3504
  size: bigint;
3451
3505
  md5: string;
3506
+ mime?: string | undefined;
3507
+ ext?: string | undefined;
3452
3508
  };
3453
3509
  _input_out: {
3454
3510
  type: "encrypted";
@@ -3457,10 +3513,14 @@ export declare const createTRPCClient: (session?: string | null | undefined, onA
3457
3513
  md5: string;
3458
3514
  sizeEncrypted: bigint;
3459
3515
  md5Encrypted: string;
3516
+ mime?: string | undefined;
3517
+ ext?: string | undefined;
3460
3518
  } | {
3461
3519
  type: "unencrypted";
3462
3520
  size: bigint;
3463
3521
  md5: string;
3522
+ mime?: string | undefined;
3523
+ ext?: string | undefined;
3464
3524
  };
3465
3525
  _output_in: {
3466
3526
  id: string;
@@ -3523,10 +3583,14 @@ export declare const createTRPCClient: (session?: string | null | undefined, onA
3523
3583
  md5: string;
3524
3584
  sizeEncrypted: bigint;
3525
3585
  md5Encrypted: string;
3586
+ mime?: string | undefined;
3587
+ ext?: string | undefined;
3526
3588
  } | {
3527
3589
  type: "unencrypted";
3528
3590
  size: bigint;
3529
3591
  md5: string;
3592
+ mime?: string | undefined;
3593
+ ext?: string | undefined;
3530
3594
  };
3531
3595
  _input_out: {
3532
3596
  type: "encrypted";
@@ -3535,10 +3599,14 @@ export declare const createTRPCClient: (session?: string | null | undefined, onA
3535
3599
  md5: string;
3536
3600
  sizeEncrypted: bigint;
3537
3601
  md5Encrypted: string;
3602
+ mime?: string | undefined;
3603
+ ext?: string | undefined;
3538
3604
  } | {
3539
3605
  type: "unencrypted";
3540
3606
  size: bigint;
3541
3607
  md5: string;
3608
+ mime?: string | undefined;
3609
+ ext?: string | undefined;
3542
3610
  };
3543
3611
  _output_in: {
3544
3612
  id: string;
@@ -3602,11 +3670,15 @@ export declare const createTRPCClient: (session?: string | null | undefined, onA
3602
3670
  sizeEncrypted: bigint;
3603
3671
  md5Encrypted: string;
3604
3672
  content: Buffer;
3673
+ mime?: string | undefined;
3674
+ ext?: string | undefined;
3605
3675
  } | {
3606
3676
  type: "unencrypted";
3607
3677
  size: bigint;
3608
3678
  md5: string;
3609
3679
  content: Buffer;
3680
+ mime?: string | undefined;
3681
+ ext?: string | undefined;
3610
3682
  };
3611
3683
  _input_out: {
3612
3684
  type: "encrypted";
@@ -3616,11 +3688,15 @@ export declare const createTRPCClient: (session?: string | null | undefined, onA
3616
3688
  sizeEncrypted: bigint;
3617
3689
  md5Encrypted: string;
3618
3690
  content: Buffer;
3691
+ mime?: string | undefined;
3692
+ ext?: string | undefined;
3619
3693
  } | {
3620
3694
  type: "unencrypted";
3621
3695
  size: bigint;
3622
3696
  md5: string;
3623
3697
  content: Buffer;
3698
+ mime?: string | undefined;
3699
+ ext?: string | undefined;
3624
3700
  };
3625
3701
  _output_in: {
3626
3702
  id: string;
@@ -3802,11 +3878,13 @@ export declare const createTRPCClient: (session?: string | null | undefined, onA
3802
3878
  name: string;
3803
3879
  dataId: string;
3804
3880
  expireAt: Date | null;
3881
+ slug: string;
3805
3882
  };
3806
3883
  _input_out: {
3807
3884
  name: string;
3808
3885
  dataId: string;
3809
3886
  expireAt: Date | null;
3887
+ slug: string;
3810
3888
  };
3811
3889
  _output_in: {
3812
3890
  name: string;
@@ -4005,6 +4083,8 @@ export declare const createTRPCClient: (session?: string | null | undefined, onA
4005
4083
  userAppAppId: string;
4006
4084
  sizeEncrypted: bigint | null;
4007
4085
  md5Encrypted: string | null;
4086
+ mime: string | null;
4087
+ ext: string | null;
4008
4088
  validatedAt: Date | null;
4009
4089
  restoreSince: Date | null;
4010
4090
  access: {
@@ -4022,6 +4102,8 @@ export declare const createTRPCClient: (session?: string | null | undefined, onA
4022
4102
  userAppAppId: string;
4023
4103
  sizeEncrypted: bigint | null;
4024
4104
  md5Encrypted: string | null;
4105
+ mime: string | null;
4106
+ ext: string | null;
4025
4107
  validatedAt: Date | null;
4026
4108
  restoreSince: Date | null;
4027
4109
  access: {
@@ -4152,6 +4234,8 @@ export declare const createTRPCClient: (session?: string | null | undefined, onA
4152
4234
  userAppAppId: string;
4153
4235
  sizeEncrypted: bigint | null;
4154
4236
  md5Encrypted: string | null;
4237
+ mime: string | null;
4238
+ ext: string | null;
4155
4239
  validatedAt: Date | null;
4156
4240
  restoreSince: Date | null;
4157
4241
  access: {
@@ -4169,6 +4253,8 @@ export declare const createTRPCClient: (session?: string | null | undefined, onA
4169
4253
  userAppAppId: string;
4170
4254
  sizeEncrypted: bigint | null;
4171
4255
  md5Encrypted: string | null;
4256
+ mime: string | null;
4257
+ ext: string | null;
4172
4258
  validatedAt: Date | null;
4173
4259
  restoreSince: Date | null;
4174
4260
  access: {
@@ -4817,6 +4903,8 @@ export declare const createTRPCClient: (session?: string | null | undefined, onA
4817
4903
  userAppAppId: string;
4818
4904
  sizeEncrypted: bigint | null;
4819
4905
  md5Encrypted: string | null;
4906
+ mime: string | null;
4907
+ ext: string | null;
4820
4908
  validatedAt: Date | null;
4821
4909
  restoreSince: Date | null;
4822
4910
  access: {
@@ -4834,6 +4922,8 @@ export declare const createTRPCClient: (session?: string | null | undefined, onA
4834
4922
  userAppAppId: string;
4835
4923
  sizeEncrypted: bigint | null;
4836
4924
  md5Encrypted: string | null;
4925
+ mime: string | null;
4926
+ ext: string | null;
4837
4927
  validatedAt: Date | null;
4838
4928
  restoreSince: Date | null;
4839
4929
  access: {
@@ -4964,6 +5054,8 @@ export declare const createTRPCClient: (session?: string | null | undefined, onA
4964
5054
  userAppAppId: string;
4965
5055
  sizeEncrypted: bigint | null;
4966
5056
  md5Encrypted: string | null;
5057
+ mime: string | null;
5058
+ ext: string | null;
4967
5059
  validatedAt: Date | null;
4968
5060
  restoreSince: Date | null;
4969
5061
  access: {
@@ -4981,6 +5073,8 @@ export declare const createTRPCClient: (session?: string | null | undefined, onA
4981
5073
  userAppAppId: string;
4982
5074
  sizeEncrypted: bigint | null;
4983
5075
  md5Encrypted: string | null;
5076
+ mime: string | null;
5077
+ ext: string | null;
4984
5078
  validatedAt: Date | null;
4985
5079
  restoreSince: Date | null;
4986
5080
  access: {
@@ -5603,6 +5697,8 @@ export declare const createTRPCClient: (session?: string | null | undefined, onA
5603
5697
  userAppAppId: string;
5604
5698
  sizeEncrypted: bigint | null;
5605
5699
  md5Encrypted: string | null;
5700
+ mime: string | null;
5701
+ ext: string | null;
5606
5702
  validatedAt: Date | null;
5607
5703
  restoreSince: Date | null;
5608
5704
  access: {
@@ -5620,6 +5716,8 @@ export declare const createTRPCClient: (session?: string | null | undefined, onA
5620
5716
  userAppAppId: string;
5621
5717
  sizeEncrypted: bigint | null;
5622
5718
  md5Encrypted: string | null;
5719
+ mime: string | null;
5720
+ ext: string | null;
5623
5721
  validatedAt: Date | null;
5624
5722
  restoreSince: Date | null;
5625
5723
  access: {
@@ -5750,6 +5848,8 @@ export declare const createTRPCClient: (session?: string | null | undefined, onA
5750
5848
  userAppAppId: string;
5751
5849
  sizeEncrypted: bigint | null;
5752
5850
  md5Encrypted: string | null;
5851
+ mime: string | null;
5852
+ ext: string | null;
5753
5853
  validatedAt: Date | null;
5754
5854
  restoreSince: Date | null;
5755
5855
  access: {
@@ -5767,6 +5867,8 @@ export declare const createTRPCClient: (session?: string | null | undefined, onA
5767
5867
  userAppAppId: string;
5768
5868
  sizeEncrypted: bigint | null;
5769
5869
  md5Encrypted: string | null;
5870
+ mime: string | null;
5871
+ ext: string | null;
5770
5872
  validatedAt: Date | null;
5771
5873
  restoreSince: Date | null;
5772
5874
  access: {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@secrecy/lib",
3
3
  "author": "Anonymize <anonymize@gmail.com>",
4
4
  "description": "Anonymize Secrecy Library",
5
- "version": "1.52.0",
5
+ "version": "1.54.0",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "https://github.com/anonymize-org/lib.git"
@@ -74,13 +74,14 @@
74
74
  "typescript": "^5.6.2"
75
75
  },
76
76
  "dependencies": {
77
- "@secrecy/trpc-api-types": "1.33.0-feat-unencrypted-pub-link.3",
77
+ "@secrecy/trpc-api-types": "1.33.0-dev.42",
78
78
  "@trpc/client": "10.45.2",
79
79
  "@trpc/server": "10.45.2",
80
80
  "@types/libsodium-wrappers-sumo": "^0.7.8",
81
81
  "axios": "^1.7.7",
82
82
  "bson": "^6.8.0",
83
83
  "ethers": "^6.13.2",
84
+ "file-type": "^19.6.0",
84
85
  "jsonwebtoken": "^9.0.2",
85
86
  "ky": "^1.7.2",
86
87
  "libsodium-wrappers-sumo": "^0.7.15",