@secrecy/lib 1.68.0 → 1.69.0-feat-anonymous-upload.1

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.
@@ -142,7 +142,8 @@ export class SecrecyCloudClient {
142
142
  signal,
143
143
  });
144
144
  if (uploadData.parts.length === 0) {
145
- if (uploadData.keyPair.pub !== this.#keys.publicKey) {
145
+ if (uploadData.keyPair &&
146
+ uploadData.keyPair.pub !== this.#keys.publicKey) {
146
147
  throw new Error('The public key does not match with cached key!');
147
148
  }
148
149
  await uploadProgress?.({
@@ -109,6 +109,9 @@ export declare class SecrecyCloudClient {
109
109
  slug: string;
110
110
  expireAt: Date | null;
111
111
  dataId: string;
112
+ createdByUserId: string | null;
113
+ createdByOrgId: string | null;
114
+ createdByAppId: string | null;
112
115
  }>;
113
116
  getPublicDataLinks(input: RouterInputs['cloud']['dataLinks']): Promise<{
114
117
  id: string;
@@ -116,6 +119,9 @@ export declare class SecrecyCloudClient {
116
119
  slug: string;
117
120
  expireAt: Date | null;
118
121
  dataId: string;
122
+ createdByUserId: string | null;
123
+ createdByOrgId: string | null;
124
+ createdByAppId: string | null;
119
125
  }[]>;
120
126
  checkAccesses(input: RouterInputs['cloud']['checkAccesses']): Promise<{
121
127
  isMatching: true;
@@ -159,6 +165,9 @@ export declare class SecrecyCloudClient {
159
165
  slug: string;
160
166
  expireAt: Date | null;
161
167
  dataId: string;
168
+ createdByUserId: string | null;
169
+ createdByOrgId: string | null;
170
+ createdByAppId: string | null;
162
171
  }>;
163
172
  updatePublicDataLink(input: RouterInputs['cloud']['updateDataLink']): Promise<{
164
173
  id: string;
@@ -166,6 +175,9 @@ export declare class SecrecyCloudClient {
166
175
  slug: string;
167
176
  expireAt: Date | null;
168
177
  dataId: string;
178
+ createdByUserId: string | null;
179
+ createdByOrgId: string | null;
180
+ createdByAppId: string | null;
169
181
  }>;
170
182
  deletePublicDataLink(input: RouterInputs['cloud']['deleteDataLink']): Promise<{
171
183
  id: string;
@@ -173,6 +185,9 @@ export declare class SecrecyCloudClient {
173
185
  slug: string;
174
186
  expireAt: Date | null;
175
187
  dataId: string;
188
+ createdByUserId: string | null;
189
+ createdByOrgId: string | null;
190
+ createdByAppId: string | null;
176
191
  }>;
177
192
  private _handleDataContent;
178
193
  }
@@ -324,7 +324,7 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
324
324
  userId: string;
325
325
  reportedDataId: string;
326
326
  } & {
327
- user: {
327
+ dataReportUser: {
328
328
  id: string;
329
329
  emails: string[];
330
330
  phones: string[];
@@ -365,7 +365,7 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
365
365
  date: Date;
366
366
  reportedDataId: string;
367
367
  } & {
368
- user: {
368
+ dataReportUser: {
369
369
  id: string;
370
370
  emails: string[];
371
371
  phones: string[];
@@ -1499,11 +1499,11 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
1499
1499
  fields: Record<string, string>;
1500
1500
  }[];
1501
1501
  partSize: bigint;
1502
- key: string | null;
1503
- keyPair: {
1502
+ key?: string | null | undefined;
1503
+ keyPair?: {
1504
1504
  pub: string;
1505
1505
  encPriv: string;
1506
- };
1506
+ } | undefined;
1507
1507
  };
1508
1508
  meta: any;
1509
1509
  }>;
@@ -1532,11 +1532,11 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
1532
1532
  fields: Record<string, string>;
1533
1533
  }[];
1534
1534
  partSize: bigint;
1535
- key: string | null;
1536
- keyPair: {
1535
+ key?: string | null | undefined;
1536
+ keyPair?: {
1537
1537
  pub: string;
1538
1538
  encPriv: string;
1539
- };
1539
+ } | undefined;
1540
1540
  };
1541
1541
  meta: any;
1542
1542
  }>;
@@ -1561,11 +1561,11 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
1561
1561
  };
1562
1562
  output: {
1563
1563
  id: string;
1564
- key: string | null;
1565
- keyPair: {
1564
+ key?: string | null | undefined;
1565
+ keyPair?: {
1566
1566
  pub: string;
1567
1567
  encPriv: string;
1568
- };
1568
+ } | undefined;
1569
1569
  };
1570
1570
  meta: any;
1571
1571
  }>;
@@ -1590,6 +1590,9 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
1590
1590
  slug: string;
1591
1591
  expireAt: Date | null;
1592
1592
  dataId: string;
1593
+ createdByUserId: string | null;
1594
+ createdByOrgId: string | null;
1595
+ createdByAppId: string | null;
1593
1596
  };
1594
1597
  meta: any;
1595
1598
  }>;
@@ -1603,6 +1606,9 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
1603
1606
  slug: string;
1604
1607
  expireAt: Date | null;
1605
1608
  dataId: string;
1609
+ createdByUserId: string | null;
1610
+ createdByOrgId: string | null;
1611
+ createdByAppId: string | null;
1606
1612
  }[];
1607
1613
  meta: any;
1608
1614
  }>;
@@ -1620,6 +1626,9 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
1620
1626
  slug: string;
1621
1627
  expireAt: Date | null;
1622
1628
  dataId: string;
1629
+ createdByUserId: string | null;
1630
+ createdByOrgId: string | null;
1631
+ createdByAppId: string | null;
1623
1632
  };
1624
1633
  meta: any;
1625
1634
  }>;
@@ -1637,6 +1646,9 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
1637
1646
  slug: string;
1638
1647
  expireAt: Date | null;
1639
1648
  dataId: string;
1649
+ createdByUserId: string | null;
1650
+ createdByOrgId: string | null;
1651
+ createdByAppId: string | null;
1640
1652
  };
1641
1653
  meta: any;
1642
1654
  }>;
@@ -1650,6 +1662,9 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
1650
1662
  slug: string;
1651
1663
  expireAt: Date | null;
1652
1664
  dataId: string;
1665
+ createdByUserId: string | null;
1666
+ createdByOrgId: string | null;
1667
+ createdByAppId: string | null;
1653
1668
  };
1654
1669
  meta: any;
1655
1670
  }>;
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.68.0",
5
+ "version": "1.69.0-feat-anonymous-upload.1",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "https://github.com/anonymize-org/lib.git"
@@ -75,9 +75,9 @@
75
75
  },
76
76
  "dependencies": {
77
77
  "@js-temporal/polyfill": "^0.5.1",
78
- "@secrecy/trpc-api-types": "1.33.0-feat-next15.14",
79
78
  "@trpc/client": "11.5.1",
80
79
  "@trpc/server": "11.5.1",
80
+ "@secrecy/trpc-api-types": "1.33.0-feat-unlog-upload.10",
81
81
  "@types/libsodium-wrappers-sumo": "^0.7.8",
82
82
  "axios": "^1.11.0",
83
83
  "bson": "^6.10.4",