@secrecy/lib 1.66.0 → 1.68.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.
- package/dist/lib/client/SecrecyCloudClient.js +1 -1
- package/dist/lib/client/SecrecyUserClient.js +0 -6
- package/dist/lib/client/index.js +2 -2
- package/dist/types/client/SecrecyCloudClient.d.ts +25 -10
- package/dist/types/client/SecrecyUserClient.d.ts +0 -1
- package/dist/types/client/index.d.ts +1 -1
- package/dist/types/client.d.ts +265 -218
- package/package.json +2 -2
|
@@ -148,7 +148,7 @@ export class SecrecyCloudClient {
|
|
|
148
148
|
signal,
|
|
149
149
|
});
|
|
150
150
|
if (uploadData.parts.length === 0) {
|
|
151
|
-
if (uploadData.keyPair
|
|
151
|
+
if (uploadData.keyPair?.pub !== this.#keys.publicKey) {
|
|
152
152
|
throw new Error('The public key does not match with cached key!');
|
|
153
153
|
}
|
|
154
154
|
await uploadProgress?.({
|
|
@@ -24,10 +24,4 @@ export class SecrecyUserClient {
|
|
|
24
24
|
async removeContact(input) {
|
|
25
25
|
return await this.#apiClient.contacts.removeContact.mutate(input);
|
|
26
26
|
}
|
|
27
|
-
async changeContext(input) {
|
|
28
|
-
if (!input.userId && !input.orgId) {
|
|
29
|
-
throw new Error('Either orgId or userId must be defined as input!');
|
|
30
|
-
}
|
|
31
|
-
return await this.#apiClient.auth.changeContext.mutate(input);
|
|
32
|
-
}
|
|
33
27
|
}
|
package/dist/lib/client/index.js
CHANGED
|
@@ -16,7 +16,7 @@ export class SecrecyClient extends BaseClient {
|
|
|
16
16
|
mail;
|
|
17
17
|
app;
|
|
18
18
|
db;
|
|
19
|
-
|
|
19
|
+
organization;
|
|
20
20
|
wallet;
|
|
21
21
|
pay;
|
|
22
22
|
user;
|
|
@@ -41,7 +41,7 @@ export class SecrecyClient extends BaseClient {
|
|
|
41
41
|
this.mail = new SecrecyMailClient(this, this.#keys, this.client);
|
|
42
42
|
this.app = new SecrecyAppClient(opts.uaJwt, this, this.#keys, this.client);
|
|
43
43
|
this.db = new SecrecyDbClient(this, this.#keys, this.client);
|
|
44
|
-
this.
|
|
44
|
+
this.organization = new SecrecyOrganizationClient(this, this.#keys, this.client);
|
|
45
45
|
this.wallet = new SecrecyWalletClient(this);
|
|
46
46
|
this.pay = new SecrecyPayClient(this, this.#keys, this.client);
|
|
47
47
|
this.user = new SecrecyUserClient(this, this.#keys, this.client);
|
|
@@ -106,16 +106,22 @@ export declare class SecrecyCloudClient {
|
|
|
106
106
|
getPublicDataLink(input: RouterInputs['cloud']['dataLink']): Promise<{
|
|
107
107
|
name: string;
|
|
108
108
|
id: string;
|
|
109
|
-
|
|
110
|
-
|
|
109
|
+
createdByUserId: string | null;
|
|
110
|
+
createdByAppId: string | null;
|
|
111
|
+
createdByOrgId: string | null;
|
|
111
112
|
slug: string;
|
|
113
|
+
expireAt: Date | null;
|
|
114
|
+
dataId: string;
|
|
112
115
|
}>;
|
|
113
116
|
getPublicDataLinks(input: RouterInputs['cloud']['dataLinks']): Promise<{
|
|
114
117
|
name: string;
|
|
115
118
|
id: string;
|
|
116
|
-
|
|
117
|
-
|
|
119
|
+
createdByUserId: string | null;
|
|
120
|
+
createdByAppId: string | null;
|
|
121
|
+
createdByOrgId: string | null;
|
|
118
122
|
slug: string;
|
|
123
|
+
expireAt: Date | null;
|
|
124
|
+
dataId: string;
|
|
119
125
|
}[]>;
|
|
120
126
|
checkAccesses(input: RouterInputs['cloud']['checkAccesses']): Promise<{
|
|
121
127
|
isMatching: true;
|
|
@@ -156,23 +162,32 @@ export declare class SecrecyCloudClient {
|
|
|
156
162
|
createPublicDataLink(input: RouterInputs['cloud']['createDataLink']): Promise<{
|
|
157
163
|
name: string;
|
|
158
164
|
id: string;
|
|
159
|
-
|
|
160
|
-
|
|
165
|
+
createdByUserId: string | null;
|
|
166
|
+
createdByAppId: string | null;
|
|
167
|
+
createdByOrgId: string | null;
|
|
161
168
|
slug: string;
|
|
169
|
+
expireAt: Date | null;
|
|
170
|
+
dataId: string;
|
|
162
171
|
}>;
|
|
163
172
|
updatePublicDataLink(input: RouterInputs['cloud']['updateDataLink']): Promise<{
|
|
164
173
|
name: string;
|
|
165
174
|
id: string;
|
|
166
|
-
|
|
167
|
-
|
|
175
|
+
createdByUserId: string | null;
|
|
176
|
+
createdByAppId: string | null;
|
|
177
|
+
createdByOrgId: string | null;
|
|
168
178
|
slug: string;
|
|
179
|
+
expireAt: Date | null;
|
|
180
|
+
dataId: string;
|
|
169
181
|
}>;
|
|
170
182
|
deletePublicDataLink(input: RouterInputs['cloud']['deleteDataLink']): Promise<{
|
|
171
183
|
name: string;
|
|
172
184
|
id: string;
|
|
173
|
-
|
|
174
|
-
|
|
185
|
+
createdByUserId: string | null;
|
|
186
|
+
createdByAppId: string | null;
|
|
187
|
+
createdByOrgId: string | null;
|
|
175
188
|
slug: string;
|
|
189
|
+
expireAt: Date | null;
|
|
190
|
+
dataId: string;
|
|
176
191
|
}>;
|
|
177
192
|
private _handleDataContent;
|
|
178
193
|
}
|
|
@@ -11,5 +11,4 @@ export declare class SecrecyUserClient {
|
|
|
11
11
|
getReceivedInvitations(input: RouterInputs['contacts']['getReceivedInvitations']): Promise<RouterOutputs['contacts']['getReceivedInvitations']>;
|
|
12
12
|
getSentInvitations(input: RouterInputs['contacts']['getSentInvitations']): Promise<RouterOutputs['contacts']['getSentInvitations']>;
|
|
13
13
|
removeContact(input: RouterInputs['contacts']['removeContact']): Promise<RouterOutputs['contacts']['removeContact']>;
|
|
14
|
-
changeContext(input: RouterInputs['auth']['changeContext']): Promise<RouterOutputs['auth']['changeContext']>;
|
|
15
14
|
}
|
|
@@ -26,7 +26,7 @@ export declare class SecrecyClient extends BaseClient {
|
|
|
26
26
|
mail: SecrecyMailClient;
|
|
27
27
|
app: SecrecyAppClient;
|
|
28
28
|
db: SecrecyDbClient;
|
|
29
|
-
|
|
29
|
+
organization: SecrecyOrganizationClient;
|
|
30
30
|
wallet: SecrecyWalletClient;
|
|
31
31
|
pay: SecrecyPayClient;
|
|
32
32
|
user: SecrecyUserClient;
|