@secrecy/lib 1.75.1-feat-create-folder-perms.2 → 1.75.2
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 +51 -48
- package/dist/lib/client/convert/node.js +0 -1
- package/dist/lib/client/data-link.js +6 -4
- package/dist/lib/crypto/helpers.js +3 -6
- package/dist/types/client/types/node.d.ts +0 -1
- package/dist/types/client.d.ts +82 -134
- package/dist/types/crypto/helpers.d.ts +1 -6
- package/package.json +2 -2
|
@@ -9,9 +9,8 @@ import { apiNodeForEncryptionToInternal, apiNodeFullToInternalFull, apiNodeToExt
|
|
|
9
9
|
import { buildBytesFromApiData } from '../crypto/domain.js';
|
|
10
10
|
import { chunkByTotalItems } from '../utils/object.js';
|
|
11
11
|
import { uploadData } from './upload.js';
|
|
12
|
-
import { encryptName,
|
|
12
|
+
import { encryptName, generateAndEncryptNameAndKey } from '../crypto/helpers.js';
|
|
13
13
|
import { downloadDataFromLink, } from './data-link.js';
|
|
14
|
-
import { secretStreamKeygen } from '../crypto/data.js';
|
|
15
14
|
export class SecrecyCloudClient {
|
|
16
15
|
#client;
|
|
17
16
|
constructor(client) {
|
|
@@ -100,7 +99,7 @@ export class SecrecyCloudClient {
|
|
|
100
99
|
}
|
|
101
100
|
name =
|
|
102
101
|
typeof name === 'string' && node.accesses[0].nameKey !== null
|
|
103
|
-
? await encryptName(name,
|
|
102
|
+
? await encryptName(name, node.accesses[0].nameKey)
|
|
104
103
|
: null;
|
|
105
104
|
const { isDuplicated } = await this.#client.apiClient.cloud.duplicateNode.mutate({
|
|
106
105
|
nodeId,
|
|
@@ -114,26 +113,33 @@ export class SecrecyCloudClient {
|
|
|
114
113
|
return isDeleted;
|
|
115
114
|
}
|
|
116
115
|
async createFolder({ name, parentFolderId, }) {
|
|
117
|
-
const
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
nameKey,
|
|
123
|
-
privateKey: this.#client.uaPrivateKey,
|
|
124
|
-
publicKey: pubKey,
|
|
125
|
-
});
|
|
126
|
-
return {
|
|
127
|
-
pubKey,
|
|
128
|
-
nameKey: encryptedNameKey,
|
|
129
|
-
};
|
|
130
|
-
}));
|
|
116
|
+
const { encryptedNameKey, encryptedName } = await generateAndEncryptNameAndKey({
|
|
117
|
+
name,
|
|
118
|
+
privateKey: this.#client.uaPrivateKey,
|
|
119
|
+
publicKey: this.#client.uaIdentity.identityPubKey,
|
|
120
|
+
});
|
|
131
121
|
const createdFolder = await this.#client.apiClient.cloud.createFolder.mutate({
|
|
132
|
-
name:
|
|
122
|
+
name: encryptedName,
|
|
133
123
|
parentId: parentFolderId ?? null,
|
|
134
|
-
|
|
124
|
+
nameKey: encryptedNameKey,
|
|
135
125
|
});
|
|
136
|
-
|
|
126
|
+
const folder = await apiNodeToExternalNodeFull(createdFolder, this.#client.keyPairs);
|
|
127
|
+
if (folder.parent) {
|
|
128
|
+
const othersIdentities = Object.entries(folder.parent.identities).filter(([id]) => id !== this.#client.uaIdentity.identityPubKey);
|
|
129
|
+
// TODO: ??
|
|
130
|
+
if (othersIdentities.length > 0) {
|
|
131
|
+
await this.shareNode(othersIdentities.map(([identityPubKey, permissions]) => ({
|
|
132
|
+
pubKey: identityPubKey,
|
|
133
|
+
nodeId: folder.id,
|
|
134
|
+
rights: permissions.rights,
|
|
135
|
+
addAccess: permissions.addAccess,
|
|
136
|
+
delAccess: permissions.delAccess,
|
|
137
|
+
sharingAddAccess: permissions.sharingAddAccess,
|
|
138
|
+
sharingDelAccess: permissions.sharingDelAccess,
|
|
139
|
+
})));
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
return folder;
|
|
137
143
|
}
|
|
138
144
|
async node({ id, deleted, } = {}) {
|
|
139
145
|
const node = await this.#client.apiClient.cloud.nodeFullById.query({
|
|
@@ -199,7 +205,6 @@ export class SecrecyCloudClient {
|
|
|
199
205
|
if (!item) {
|
|
200
206
|
throw new Error('Unable to retrieve user mapped nodes!');
|
|
201
207
|
}
|
|
202
|
-
console.dir({ node, item });
|
|
203
208
|
return {
|
|
204
209
|
id: node.id,
|
|
205
210
|
data: node.data,
|
|
@@ -286,7 +291,7 @@ export class SecrecyCloudClient {
|
|
|
286
291
|
}
|
|
287
292
|
name =
|
|
288
293
|
typeof name === 'string' && node.accesses[0].nameKey !== null
|
|
289
|
-
? await encryptName(name,
|
|
294
|
+
? await encryptName(name, node.accesses[0].nameKey)
|
|
290
295
|
: null;
|
|
291
296
|
const updateNode = await this.#client.apiClient.cloud.updateNode.mutate({
|
|
292
297
|
deletedAt: deletedAt ?? null,
|
|
@@ -435,35 +440,33 @@ export class SecrecyCloudClient {
|
|
|
435
440
|
else {
|
|
436
441
|
key = data.key;
|
|
437
442
|
}
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
const
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
const encryptedNameKey = await encryptNameKey({
|
|
447
|
-
nameKey,
|
|
448
|
-
privateKey: this.#client.uaPrivateKey,
|
|
449
|
-
publicKey: pubKey,
|
|
450
|
-
});
|
|
451
|
-
const dataKey = rawDataKey
|
|
452
|
-
? sodium.to_hex(encryptCryptoBox(rawDataKey, pubKey, this.#client.uaPrivateKey))
|
|
453
|
-
: null;
|
|
454
|
-
return {
|
|
455
|
-
pubKey: pubKey,
|
|
456
|
-
nameKey: encryptedNameKey,
|
|
457
|
-
key: dataKey,
|
|
458
|
-
};
|
|
459
|
-
}));
|
|
443
|
+
key = key
|
|
444
|
+
? sodium.to_hex(encryptCryptoBox(sodium.from_hex(key), this.#client.uaIdentity.identityPubKey, this.#client.uaPrivateKey))
|
|
445
|
+
: null;
|
|
446
|
+
const { encryptedNameKey, encryptedName } = await generateAndEncryptNameAndKey({
|
|
447
|
+
name,
|
|
448
|
+
privateKey: this.#client.uaPrivateKey,
|
|
449
|
+
publicKey: this.#client.uaIdentity.identityPubKey,
|
|
450
|
+
});
|
|
460
451
|
const saveInCloud = await this.#client.apiClient.cloud.saveInCloud.mutate({
|
|
461
452
|
dataId,
|
|
453
|
+
key,
|
|
462
454
|
nodeId: nodeId ?? null,
|
|
463
|
-
fileName:
|
|
464
|
-
|
|
455
|
+
fileName: encryptedName,
|
|
456
|
+
nameKey: encryptedNameKey,
|
|
465
457
|
});
|
|
466
458
|
const node = await apiNodeToExternalNodeFull(saveInCloud, this.#client.keyPairs);
|
|
459
|
+
if (node.parent) {
|
|
460
|
+
const othersIdentities = Object.entries(node.parent.identities).filter(([id]) => id !== this.#client.uaIdentity.identityPubKey);
|
|
461
|
+
// TODO: ??
|
|
462
|
+
if (othersIdentities.length > 0) {
|
|
463
|
+
await this.shareNode(othersIdentities.map(([identityPubKey, permissions]) => ({
|
|
464
|
+
pubKey: identityPubKey,
|
|
465
|
+
nodeId: node.id,
|
|
466
|
+
...permissions,
|
|
467
|
+
})));
|
|
468
|
+
}
|
|
469
|
+
}
|
|
467
470
|
return node;
|
|
468
471
|
}
|
|
469
472
|
encryptNodesForIdentities = async (identityNodes) => {
|
|
@@ -507,8 +510,8 @@ export class SecrecyCloudClient {
|
|
|
507
510
|
ids: missingNodeIds,
|
|
508
511
|
})
|
|
509
512
|
: [];
|
|
510
|
-
|
|
511
|
-
|
|
513
|
+
const diff = missingNodeIds.filter((id) => !fetchedNodes.some((node) => node.id === id));
|
|
514
|
+
if (diff.length > 0) {
|
|
512
515
|
throw new Error(`Unable to fetch some node infos (${diff.join(', ')})`);
|
|
513
516
|
}
|
|
514
517
|
const finalNodes = await Promise.all(fetchedNodes.map((node) => {
|
|
@@ -32,14 +32,16 @@ export const downloadDataLinkSchema = z.union([
|
|
|
32
32
|
export async function downloadDataFromLink(opts) {
|
|
33
33
|
let dataUrl = opts.dataUrl ?? 'https://data.secrecy.tech/';
|
|
34
34
|
dataUrl = dataUrl.endsWith('/') ? dataUrl : `${dataUrl}/`;
|
|
35
|
-
const
|
|
35
|
+
const rawDataLinkRes = await fetch(`${dataUrl}${opts.dataLinkSlug}/json`, {
|
|
36
36
|
mode: 'no-cors',
|
|
37
37
|
credentials: 'include',
|
|
38
|
-
})
|
|
39
|
-
.then((res) => res.json())
|
|
40
|
-
.catch((err) => {
|
|
38
|
+
}).catch((err) => {
|
|
41
39
|
throw new Error(`Unable to fetch "${`${dataUrl}${opts.dataLinkSlug}/json"`}`, { cause: err });
|
|
42
40
|
});
|
|
41
|
+
const rawDataLink = await rawDataLinkRes.json().catch((err) => {
|
|
42
|
+
console.error(err);
|
|
43
|
+
throw new Error('Unable to parse data link json!', { cause: err });
|
|
44
|
+
});
|
|
43
45
|
const dataLink = downloadDataLinkSchema.safeParse(rawDataLink);
|
|
44
46
|
if (dataLink.error) {
|
|
45
47
|
throw new Error(`Should not happen!`, { cause: dataLink.error });
|
|
@@ -8,19 +8,16 @@ export function derivePassword(password, salt) {
|
|
|
8
8
|
return sodium.crypto_pwhash(sodium.crypto_secretbox_KEYBYTES, password, salt, sodium.crypto_pwhash_OPSLIMIT_INTERACTIVE, sodium.crypto_pwhash_MEMLIMIT_INTERACTIVE, sodium.crypto_pwhash_ALG_ARGON2ID13, 'hex');
|
|
9
9
|
}
|
|
10
10
|
export async function encryptName(name, nameKey) {
|
|
11
|
-
const { data } = await encryptSecretStream(nameKey, sodium.from_string(name));
|
|
11
|
+
const { data } = await encryptSecretStream(sodium.from_hex(nameKey), sodium.from_string(name));
|
|
12
12
|
return sodium.to_hex(data);
|
|
13
13
|
}
|
|
14
14
|
export async function generateAndEncryptNameAndKey(args) {
|
|
15
15
|
const nameKey = secretStreamKeygen();
|
|
16
|
-
const encryptedName = await encryptName(args.name, nameKey);
|
|
17
|
-
const encryptedNameKey =
|
|
16
|
+
const encryptedName = await encryptName(args.name, sodium.to_hex(nameKey));
|
|
17
|
+
const encryptedNameKey = sodium.to_hex(encryptCryptoBox(nameKey, args.publicKey, args.privateKey));
|
|
18
18
|
return {
|
|
19
19
|
nameKey,
|
|
20
20
|
encryptedName,
|
|
21
21
|
encryptedNameKey,
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
|
-
export async function encryptNameKey(args) {
|
|
25
|
-
return sodium.to_hex(encryptCryptoBox(args.nameKey, args.publicKey, args.privateKey));
|
|
26
|
-
}
|
|
@@ -5,7 +5,6 @@ export type Rights = Permissions['rights'];
|
|
|
5
5
|
export type NodeAccess<T extends Record<string, unknown> = Record<string, unknown>> = T & Permissions & {
|
|
6
6
|
isRoot: boolean;
|
|
7
7
|
sharedByPubKey: string;
|
|
8
|
-
sharedByRootPubKey: string;
|
|
9
8
|
identityPubKey: string;
|
|
10
9
|
};
|
|
11
10
|
export interface NodeBreadcrumbItem {
|
package/dist/types/client.d.ts
CHANGED
|
@@ -823,8 +823,6 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
|
|
|
823
823
|
appId: string;
|
|
824
824
|
};
|
|
825
825
|
accesses: {
|
|
826
|
-
identityPubKey: string;
|
|
827
|
-
sharedByPubKey: string;
|
|
828
826
|
rights: "delete" | "read" | "write";
|
|
829
827
|
nameKey: string | null;
|
|
830
828
|
isRoot: boolean;
|
|
@@ -832,7 +830,8 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
|
|
|
832
830
|
sharingAddAccess: "delete" | "read" | "write" | null;
|
|
833
831
|
delAccess: "delete" | "read" | "write" | null;
|
|
834
832
|
sharingDelAccess: "delete" | "read" | "write" | null;
|
|
835
|
-
|
|
833
|
+
sharedByPubKey: string;
|
|
834
|
+
identityPubKey: string;
|
|
836
835
|
}[];
|
|
837
836
|
permissions: {
|
|
838
837
|
rights: "delete" | "read" | "write";
|
|
@@ -873,8 +872,6 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
|
|
|
873
872
|
appId: string;
|
|
874
873
|
};
|
|
875
874
|
accesses: {
|
|
876
|
-
identityPubKey: string;
|
|
877
|
-
sharedByPubKey: string;
|
|
878
875
|
rights: "delete" | "read" | "write";
|
|
879
876
|
nameKey: string | null;
|
|
880
877
|
isRoot: boolean;
|
|
@@ -882,7 +879,8 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
|
|
|
882
879
|
sharingAddAccess: "delete" | "read" | "write" | null;
|
|
883
880
|
delAccess: "delete" | "read" | "write" | null;
|
|
884
881
|
sharingDelAccess: "delete" | "read" | "write" | null;
|
|
885
|
-
|
|
882
|
+
sharedByPubKey: string;
|
|
883
|
+
identityPubKey: string;
|
|
886
884
|
}[];
|
|
887
885
|
permissions: {
|
|
888
886
|
rights: "delete" | "read" | "write";
|
|
@@ -918,8 +916,6 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
|
|
|
918
916
|
appId: string;
|
|
919
917
|
};
|
|
920
918
|
accesses: {
|
|
921
|
-
identityPubKey: string;
|
|
922
|
-
sharedByPubKey: string;
|
|
923
919
|
rights: "delete" | "read" | "write";
|
|
924
920
|
nameKey: string | null;
|
|
925
921
|
isRoot: boolean;
|
|
@@ -927,7 +923,8 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
|
|
|
927
923
|
sharingAddAccess: "delete" | "read" | "write" | null;
|
|
928
924
|
delAccess: "delete" | "read" | "write" | null;
|
|
929
925
|
sharingDelAccess: "delete" | "read" | "write" | null;
|
|
930
|
-
|
|
926
|
+
sharedByPubKey: string;
|
|
927
|
+
identityPubKey: string;
|
|
931
928
|
}[];
|
|
932
929
|
permissions: {
|
|
933
930
|
rights: "delete" | "read" | "write";
|
|
@@ -1224,12 +1221,9 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
|
|
|
1224
1221
|
fromIdentityPubKey?: string | null | undefined;
|
|
1225
1222
|
dataId: string;
|
|
1226
1223
|
nodeId: string | null;
|
|
1224
|
+
key: string | null;
|
|
1227
1225
|
fileName: string;
|
|
1228
|
-
|
|
1229
|
-
pubKey: string;
|
|
1230
|
-
key: string | null;
|
|
1231
|
-
nameKey: string;
|
|
1232
|
-
}[];
|
|
1226
|
+
nameKey: string;
|
|
1233
1227
|
};
|
|
1234
1228
|
output: {
|
|
1235
1229
|
id: string;
|
|
@@ -1248,8 +1242,6 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
|
|
|
1248
1242
|
appId: string;
|
|
1249
1243
|
};
|
|
1250
1244
|
accesses: {
|
|
1251
|
-
identityPubKey: string;
|
|
1252
|
-
sharedByPubKey: string;
|
|
1253
1245
|
rights: "delete" | "read" | "write";
|
|
1254
1246
|
nameKey: string | null;
|
|
1255
1247
|
isRoot: boolean;
|
|
@@ -1257,7 +1249,8 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
|
|
|
1257
1249
|
sharingAddAccess: "delete" | "read" | "write" | null;
|
|
1258
1250
|
delAccess: "delete" | "read" | "write" | null;
|
|
1259
1251
|
sharingDelAccess: "delete" | "read" | "write" | null;
|
|
1260
|
-
|
|
1252
|
+
sharedByPubKey: string;
|
|
1253
|
+
identityPubKey: string;
|
|
1261
1254
|
}[];
|
|
1262
1255
|
permissions: {
|
|
1263
1256
|
rights: "delete" | "read" | "write";
|
|
@@ -1298,8 +1291,6 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
|
|
|
1298
1291
|
appId: string;
|
|
1299
1292
|
};
|
|
1300
1293
|
accesses: {
|
|
1301
|
-
identityPubKey: string;
|
|
1302
|
-
sharedByPubKey: string;
|
|
1303
1294
|
rights: "delete" | "read" | "write";
|
|
1304
1295
|
nameKey: string | null;
|
|
1305
1296
|
isRoot: boolean;
|
|
@@ -1307,7 +1298,8 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
|
|
|
1307
1298
|
sharingAddAccess: "delete" | "read" | "write" | null;
|
|
1308
1299
|
delAccess: "delete" | "read" | "write" | null;
|
|
1309
1300
|
sharingDelAccess: "delete" | "read" | "write" | null;
|
|
1310
|
-
|
|
1301
|
+
sharedByPubKey: string;
|
|
1302
|
+
identityPubKey: string;
|
|
1311
1303
|
}[];
|
|
1312
1304
|
permissions: {
|
|
1313
1305
|
rights: "delete" | "read" | "write";
|
|
@@ -1343,8 +1335,6 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
|
|
|
1343
1335
|
appId: string;
|
|
1344
1336
|
};
|
|
1345
1337
|
accesses: {
|
|
1346
|
-
identityPubKey: string;
|
|
1347
|
-
sharedByPubKey: string;
|
|
1348
1338
|
rights: "delete" | "read" | "write";
|
|
1349
1339
|
nameKey: string | null;
|
|
1350
1340
|
isRoot: boolean;
|
|
@@ -1352,7 +1342,8 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
|
|
|
1352
1342
|
sharingAddAccess: "delete" | "read" | "write" | null;
|
|
1353
1343
|
delAccess: "delete" | "read" | "write" | null;
|
|
1354
1344
|
sharingDelAccess: "delete" | "read" | "write" | null;
|
|
1355
|
-
|
|
1345
|
+
sharedByPubKey: string;
|
|
1346
|
+
identityPubKey: string;
|
|
1356
1347
|
}[];
|
|
1357
1348
|
permissions: {
|
|
1358
1349
|
rights: "delete" | "read" | "write";
|
|
@@ -1822,12 +1813,9 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
|
|
|
1822
1813
|
createFolder: import("@trpc/server").TRPCMutationProcedure<{
|
|
1823
1814
|
input: {
|
|
1824
1815
|
fromIdentityPubKey?: string | null | undefined;
|
|
1816
|
+
nameKey: string | null;
|
|
1825
1817
|
name: string;
|
|
1826
1818
|
parentId: string | null;
|
|
1827
|
-
encryptedAccesses: {
|
|
1828
|
-
pubKey: string;
|
|
1829
|
-
nameKey: string;
|
|
1830
|
-
}[];
|
|
1831
1819
|
};
|
|
1832
1820
|
output: {
|
|
1833
1821
|
id: string;
|
|
@@ -1846,8 +1834,6 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
|
|
|
1846
1834
|
appId: string;
|
|
1847
1835
|
};
|
|
1848
1836
|
accesses: {
|
|
1849
|
-
identityPubKey: string;
|
|
1850
|
-
sharedByPubKey: string;
|
|
1851
1837
|
rights: "delete" | "read" | "write";
|
|
1852
1838
|
nameKey: string | null;
|
|
1853
1839
|
isRoot: boolean;
|
|
@@ -1855,7 +1841,8 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
|
|
|
1855
1841
|
sharingAddAccess: "delete" | "read" | "write" | null;
|
|
1856
1842
|
delAccess: "delete" | "read" | "write" | null;
|
|
1857
1843
|
sharingDelAccess: "delete" | "read" | "write" | null;
|
|
1858
|
-
|
|
1844
|
+
sharedByPubKey: string;
|
|
1845
|
+
identityPubKey: string;
|
|
1859
1846
|
}[];
|
|
1860
1847
|
permissions: {
|
|
1861
1848
|
rights: "delete" | "read" | "write";
|
|
@@ -1896,8 +1883,6 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
|
|
|
1896
1883
|
appId: string;
|
|
1897
1884
|
};
|
|
1898
1885
|
accesses: {
|
|
1899
|
-
identityPubKey: string;
|
|
1900
|
-
sharedByPubKey: string;
|
|
1901
1886
|
rights: "delete" | "read" | "write";
|
|
1902
1887
|
nameKey: string | null;
|
|
1903
1888
|
isRoot: boolean;
|
|
@@ -1905,7 +1890,8 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
|
|
|
1905
1890
|
sharingAddAccess: "delete" | "read" | "write" | null;
|
|
1906
1891
|
delAccess: "delete" | "read" | "write" | null;
|
|
1907
1892
|
sharingDelAccess: "delete" | "read" | "write" | null;
|
|
1908
|
-
|
|
1893
|
+
sharedByPubKey: string;
|
|
1894
|
+
identityPubKey: string;
|
|
1909
1895
|
}[];
|
|
1910
1896
|
permissions: {
|
|
1911
1897
|
rights: "delete" | "read" | "write";
|
|
@@ -1941,8 +1927,6 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
|
|
|
1941
1927
|
appId: string;
|
|
1942
1928
|
};
|
|
1943
1929
|
accesses: {
|
|
1944
|
-
identityPubKey: string;
|
|
1945
|
-
sharedByPubKey: string;
|
|
1946
1930
|
rights: "delete" | "read" | "write";
|
|
1947
1931
|
nameKey: string | null;
|
|
1948
1932
|
isRoot: boolean;
|
|
@@ -1950,7 +1934,8 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
|
|
|
1950
1934
|
sharingAddAccess: "delete" | "read" | "write" | null;
|
|
1951
1935
|
delAccess: "delete" | "read" | "write" | null;
|
|
1952
1936
|
sharingDelAccess: "delete" | "read" | "write" | null;
|
|
1953
|
-
|
|
1937
|
+
sharedByPubKey: string;
|
|
1938
|
+
identityPubKey: string;
|
|
1954
1939
|
}[];
|
|
1955
1940
|
permissions: {
|
|
1956
1941
|
rights: "delete" | "read" | "write";
|
|
@@ -2123,7 +2108,6 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
|
|
|
2123
2108
|
sharingDelAccess: "delete" | "read" | "write" | null;
|
|
2124
2109
|
identityPubKey: string;
|
|
2125
2110
|
sharedByPubKey: string;
|
|
2126
|
-
sharedByRootPubKey: string;
|
|
2127
2111
|
initiatorAppId: string;
|
|
2128
2112
|
initiatorUserId: string;
|
|
2129
2113
|
};
|
|
@@ -2166,8 +2150,6 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
|
|
|
2166
2150
|
appId: string;
|
|
2167
2151
|
};
|
|
2168
2152
|
accesses: {
|
|
2169
|
-
identityPubKey: string;
|
|
2170
|
-
sharedByPubKey: string;
|
|
2171
2153
|
rights: "delete" | "read" | "write";
|
|
2172
2154
|
nameKey: string | null;
|
|
2173
2155
|
isRoot: boolean;
|
|
@@ -2175,7 +2157,8 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
|
|
|
2175
2157
|
sharingAddAccess: "delete" | "read" | "write" | null;
|
|
2176
2158
|
delAccess: "delete" | "read" | "write" | null;
|
|
2177
2159
|
sharingDelAccess: "delete" | "read" | "write" | null;
|
|
2178
|
-
|
|
2160
|
+
sharedByPubKey: string;
|
|
2161
|
+
identityPubKey: string;
|
|
2179
2162
|
}[];
|
|
2180
2163
|
permissions: {
|
|
2181
2164
|
rights: "delete" | "read" | "write";
|
|
@@ -2224,8 +2207,6 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
|
|
|
2224
2207
|
appId: string;
|
|
2225
2208
|
};
|
|
2226
2209
|
accesses: {
|
|
2227
|
-
identityPubKey: string;
|
|
2228
|
-
sharedByPubKey: string;
|
|
2229
2210
|
rights: "delete" | "read" | "write";
|
|
2230
2211
|
nameKey: string | null;
|
|
2231
2212
|
isRoot: boolean;
|
|
@@ -2233,7 +2214,8 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
|
|
|
2233
2214
|
sharingAddAccess: "delete" | "read" | "write" | null;
|
|
2234
2215
|
delAccess: "delete" | "read" | "write" | null;
|
|
2235
2216
|
sharingDelAccess: "delete" | "read" | "write" | null;
|
|
2236
|
-
|
|
2217
|
+
sharedByPubKey: string;
|
|
2218
|
+
identityPubKey: string;
|
|
2237
2219
|
}[];
|
|
2238
2220
|
permissions: {
|
|
2239
2221
|
rights: "delete" | "read" | "write";
|
|
@@ -2274,8 +2256,6 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
|
|
|
2274
2256
|
appId: string;
|
|
2275
2257
|
};
|
|
2276
2258
|
accesses: {
|
|
2277
|
-
identityPubKey: string;
|
|
2278
|
-
sharedByPubKey: string;
|
|
2279
2259
|
rights: "delete" | "read" | "write";
|
|
2280
2260
|
nameKey: string | null;
|
|
2281
2261
|
isRoot: boolean;
|
|
@@ -2283,7 +2263,8 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
|
|
|
2283
2263
|
sharingAddAccess: "delete" | "read" | "write" | null;
|
|
2284
2264
|
delAccess: "delete" | "read" | "write" | null;
|
|
2285
2265
|
sharingDelAccess: "delete" | "read" | "write" | null;
|
|
2286
|
-
|
|
2266
|
+
sharedByPubKey: string;
|
|
2267
|
+
identityPubKey: string;
|
|
2287
2268
|
}[];
|
|
2288
2269
|
permissions: {
|
|
2289
2270
|
rights: "delete" | "read" | "write";
|
|
@@ -2319,8 +2300,6 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
|
|
|
2319
2300
|
appId: string;
|
|
2320
2301
|
};
|
|
2321
2302
|
accesses: {
|
|
2322
|
-
identityPubKey: string;
|
|
2323
|
-
sharedByPubKey: string;
|
|
2324
2303
|
rights: "delete" | "read" | "write";
|
|
2325
2304
|
nameKey: string | null;
|
|
2326
2305
|
isRoot: boolean;
|
|
@@ -2328,7 +2307,8 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
|
|
|
2328
2307
|
sharingAddAccess: "delete" | "read" | "write" | null;
|
|
2329
2308
|
delAccess: "delete" | "read" | "write" | null;
|
|
2330
2309
|
sharingDelAccess: "delete" | "read" | "write" | null;
|
|
2331
|
-
|
|
2310
|
+
sharedByPubKey: string;
|
|
2311
|
+
identityPubKey: string;
|
|
2332
2312
|
}[];
|
|
2333
2313
|
permissions: {
|
|
2334
2314
|
rights: "delete" | "read" | "write";
|
|
@@ -2464,8 +2444,6 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
|
|
|
2464
2444
|
appId: string;
|
|
2465
2445
|
};
|
|
2466
2446
|
accesses: {
|
|
2467
|
-
identityPubKey: string;
|
|
2468
|
-
sharedByPubKey: string;
|
|
2469
2447
|
rights: "delete" | "read" | "write";
|
|
2470
2448
|
nameKey: string | null;
|
|
2471
2449
|
isRoot: boolean;
|
|
@@ -2473,7 +2451,8 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
|
|
|
2473
2451
|
sharingAddAccess: "delete" | "read" | "write" | null;
|
|
2474
2452
|
delAccess: "delete" | "read" | "write" | null;
|
|
2475
2453
|
sharingDelAccess: "delete" | "read" | "write" | null;
|
|
2476
|
-
|
|
2454
|
+
sharedByPubKey: string;
|
|
2455
|
+
identityPubKey: string;
|
|
2477
2456
|
}[];
|
|
2478
2457
|
permissions: {
|
|
2479
2458
|
rights: "delete" | "read" | "write";
|
|
@@ -2516,8 +2495,6 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
|
|
|
2516
2495
|
appId: string;
|
|
2517
2496
|
};
|
|
2518
2497
|
accesses: {
|
|
2519
|
-
identityPubKey: string;
|
|
2520
|
-
sharedByPubKey: string;
|
|
2521
2498
|
rights: "delete" | "read" | "write";
|
|
2522
2499
|
nameKey: string | null;
|
|
2523
2500
|
isRoot: boolean;
|
|
@@ -2525,7 +2502,8 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
|
|
|
2525
2502
|
sharingAddAccess: "delete" | "read" | "write" | null;
|
|
2526
2503
|
delAccess: "delete" | "read" | "write" | null;
|
|
2527
2504
|
sharingDelAccess: "delete" | "read" | "write" | null;
|
|
2528
|
-
|
|
2505
|
+
sharedByPubKey: string;
|
|
2506
|
+
identityPubKey: string;
|
|
2529
2507
|
}[];
|
|
2530
2508
|
permissions: {
|
|
2531
2509
|
rights: "delete" | "read" | "write";
|
|
@@ -2567,8 +2545,6 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
|
|
|
2567
2545
|
appId: string;
|
|
2568
2546
|
};
|
|
2569
2547
|
accesses: {
|
|
2570
|
-
identityPubKey: string;
|
|
2571
|
-
sharedByPubKey: string;
|
|
2572
2548
|
rights: "delete" | "read" | "write";
|
|
2573
2549
|
nameKey: string | null;
|
|
2574
2550
|
isRoot: boolean;
|
|
@@ -2576,7 +2552,8 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
|
|
|
2576
2552
|
sharingAddAccess: "delete" | "read" | "write" | null;
|
|
2577
2553
|
delAccess: "delete" | "read" | "write" | null;
|
|
2578
2554
|
sharingDelAccess: "delete" | "read" | "write" | null;
|
|
2579
|
-
|
|
2555
|
+
sharedByPubKey: string;
|
|
2556
|
+
identityPubKey: string;
|
|
2580
2557
|
}[];
|
|
2581
2558
|
permissions: {
|
|
2582
2559
|
rights: "delete" | "read" | "write";
|
|
@@ -2750,8 +2727,6 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
|
|
|
2750
2727
|
appId: string;
|
|
2751
2728
|
};
|
|
2752
2729
|
accesses: {
|
|
2753
|
-
identityPubKey: string;
|
|
2754
|
-
sharedByPubKey: string;
|
|
2755
2730
|
rights: "delete" | "read" | "write";
|
|
2756
2731
|
nameKey: string | null;
|
|
2757
2732
|
isRoot: boolean;
|
|
@@ -2759,7 +2734,8 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
|
|
|
2759
2734
|
sharingAddAccess: "delete" | "read" | "write" | null;
|
|
2760
2735
|
delAccess: "delete" | "read" | "write" | null;
|
|
2761
2736
|
sharingDelAccess: "delete" | "read" | "write" | null;
|
|
2762
|
-
|
|
2737
|
+
sharedByPubKey: string;
|
|
2738
|
+
identityPubKey: string;
|
|
2763
2739
|
}[];
|
|
2764
2740
|
permissions: {
|
|
2765
2741
|
rights: "delete" | "read" | "write";
|
|
@@ -2800,8 +2776,6 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
|
|
|
2800
2776
|
appId: string;
|
|
2801
2777
|
};
|
|
2802
2778
|
accesses: {
|
|
2803
|
-
identityPubKey: string;
|
|
2804
|
-
sharedByPubKey: string;
|
|
2805
2779
|
rights: "delete" | "read" | "write";
|
|
2806
2780
|
nameKey: string | null;
|
|
2807
2781
|
isRoot: boolean;
|
|
@@ -2809,7 +2783,8 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
|
|
|
2809
2783
|
sharingAddAccess: "delete" | "read" | "write" | null;
|
|
2810
2784
|
delAccess: "delete" | "read" | "write" | null;
|
|
2811
2785
|
sharingDelAccess: "delete" | "read" | "write" | null;
|
|
2812
|
-
|
|
2786
|
+
sharedByPubKey: string;
|
|
2787
|
+
identityPubKey: string;
|
|
2813
2788
|
}[];
|
|
2814
2789
|
permissions: {
|
|
2815
2790
|
rights: "delete" | "read" | "write";
|
|
@@ -2845,8 +2820,6 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
|
|
|
2845
2820
|
appId: string;
|
|
2846
2821
|
};
|
|
2847
2822
|
accesses: {
|
|
2848
|
-
identityPubKey: string;
|
|
2849
|
-
sharedByPubKey: string;
|
|
2850
2823
|
rights: "delete" | "read" | "write";
|
|
2851
2824
|
nameKey: string | null;
|
|
2852
2825
|
isRoot: boolean;
|
|
@@ -2854,7 +2827,8 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
|
|
|
2854
2827
|
sharingAddAccess: "delete" | "read" | "write" | null;
|
|
2855
2828
|
delAccess: "delete" | "read" | "write" | null;
|
|
2856
2829
|
sharingDelAccess: "delete" | "read" | "write" | null;
|
|
2857
|
-
|
|
2830
|
+
sharedByPubKey: string;
|
|
2831
|
+
identityPubKey: string;
|
|
2858
2832
|
}[];
|
|
2859
2833
|
permissions: {
|
|
2860
2834
|
rights: "delete" | "read" | "write";
|
|
@@ -6895,8 +6869,6 @@ export declare const getTrpcGuestClient: ({ url }?: {
|
|
|
6895
6869
|
appId: string;
|
|
6896
6870
|
};
|
|
6897
6871
|
accesses: {
|
|
6898
|
-
identityPubKey: string;
|
|
6899
|
-
sharedByPubKey: string;
|
|
6900
6872
|
rights: "delete" | "read" | "write";
|
|
6901
6873
|
nameKey: string | null;
|
|
6902
6874
|
isRoot: boolean;
|
|
@@ -6904,7 +6876,8 @@ export declare const getTrpcGuestClient: ({ url }?: {
|
|
|
6904
6876
|
sharingAddAccess: "delete" | "read" | "write" | null;
|
|
6905
6877
|
delAccess: "delete" | "read" | "write" | null;
|
|
6906
6878
|
sharingDelAccess: "delete" | "read" | "write" | null;
|
|
6907
|
-
|
|
6879
|
+
sharedByPubKey: string;
|
|
6880
|
+
identityPubKey: string;
|
|
6908
6881
|
}[];
|
|
6909
6882
|
permissions: {
|
|
6910
6883
|
rights: "delete" | "read" | "write";
|
|
@@ -6945,8 +6918,6 @@ export declare const getTrpcGuestClient: ({ url }?: {
|
|
|
6945
6918
|
appId: string;
|
|
6946
6919
|
};
|
|
6947
6920
|
accesses: {
|
|
6948
|
-
identityPubKey: string;
|
|
6949
|
-
sharedByPubKey: string;
|
|
6950
6921
|
rights: "delete" | "read" | "write";
|
|
6951
6922
|
nameKey: string | null;
|
|
6952
6923
|
isRoot: boolean;
|
|
@@ -6954,7 +6925,8 @@ export declare const getTrpcGuestClient: ({ url }?: {
|
|
|
6954
6925
|
sharingAddAccess: "delete" | "read" | "write" | null;
|
|
6955
6926
|
delAccess: "delete" | "read" | "write" | null;
|
|
6956
6927
|
sharingDelAccess: "delete" | "read" | "write" | null;
|
|
6957
|
-
|
|
6928
|
+
sharedByPubKey: string;
|
|
6929
|
+
identityPubKey: string;
|
|
6958
6930
|
}[];
|
|
6959
6931
|
permissions: {
|
|
6960
6932
|
rights: "delete" | "read" | "write";
|
|
@@ -6990,8 +6962,6 @@ export declare const getTrpcGuestClient: ({ url }?: {
|
|
|
6990
6962
|
appId: string;
|
|
6991
6963
|
};
|
|
6992
6964
|
accesses: {
|
|
6993
|
-
identityPubKey: string;
|
|
6994
|
-
sharedByPubKey: string;
|
|
6995
6965
|
rights: "delete" | "read" | "write";
|
|
6996
6966
|
nameKey: string | null;
|
|
6997
6967
|
isRoot: boolean;
|
|
@@ -6999,7 +6969,8 @@ export declare const getTrpcGuestClient: ({ url }?: {
|
|
|
6999
6969
|
sharingAddAccess: "delete" | "read" | "write" | null;
|
|
7000
6970
|
delAccess: "delete" | "read" | "write" | null;
|
|
7001
6971
|
sharingDelAccess: "delete" | "read" | "write" | null;
|
|
7002
|
-
|
|
6972
|
+
sharedByPubKey: string;
|
|
6973
|
+
identityPubKey: string;
|
|
7003
6974
|
}[];
|
|
7004
6975
|
permissions: {
|
|
7005
6976
|
rights: "delete" | "read" | "write";
|
|
@@ -7296,12 +7267,9 @@ export declare const getTrpcGuestClient: ({ url }?: {
|
|
|
7296
7267
|
fromIdentityPubKey?: string | null | undefined;
|
|
7297
7268
|
dataId: string;
|
|
7298
7269
|
nodeId: string | null;
|
|
7270
|
+
key: string | null;
|
|
7299
7271
|
fileName: string;
|
|
7300
|
-
|
|
7301
|
-
pubKey: string;
|
|
7302
|
-
key: string | null;
|
|
7303
|
-
nameKey: string;
|
|
7304
|
-
}[];
|
|
7272
|
+
nameKey: string;
|
|
7305
7273
|
};
|
|
7306
7274
|
output: {
|
|
7307
7275
|
id: string;
|
|
@@ -7320,8 +7288,6 @@ export declare const getTrpcGuestClient: ({ url }?: {
|
|
|
7320
7288
|
appId: string;
|
|
7321
7289
|
};
|
|
7322
7290
|
accesses: {
|
|
7323
|
-
identityPubKey: string;
|
|
7324
|
-
sharedByPubKey: string;
|
|
7325
7291
|
rights: "delete" | "read" | "write";
|
|
7326
7292
|
nameKey: string | null;
|
|
7327
7293
|
isRoot: boolean;
|
|
@@ -7329,7 +7295,8 @@ export declare const getTrpcGuestClient: ({ url }?: {
|
|
|
7329
7295
|
sharingAddAccess: "delete" | "read" | "write" | null;
|
|
7330
7296
|
delAccess: "delete" | "read" | "write" | null;
|
|
7331
7297
|
sharingDelAccess: "delete" | "read" | "write" | null;
|
|
7332
|
-
|
|
7298
|
+
sharedByPubKey: string;
|
|
7299
|
+
identityPubKey: string;
|
|
7333
7300
|
}[];
|
|
7334
7301
|
permissions: {
|
|
7335
7302
|
rights: "delete" | "read" | "write";
|
|
@@ -7370,8 +7337,6 @@ export declare const getTrpcGuestClient: ({ url }?: {
|
|
|
7370
7337
|
appId: string;
|
|
7371
7338
|
};
|
|
7372
7339
|
accesses: {
|
|
7373
|
-
identityPubKey: string;
|
|
7374
|
-
sharedByPubKey: string;
|
|
7375
7340
|
rights: "delete" | "read" | "write";
|
|
7376
7341
|
nameKey: string | null;
|
|
7377
7342
|
isRoot: boolean;
|
|
@@ -7379,7 +7344,8 @@ export declare const getTrpcGuestClient: ({ url }?: {
|
|
|
7379
7344
|
sharingAddAccess: "delete" | "read" | "write" | null;
|
|
7380
7345
|
delAccess: "delete" | "read" | "write" | null;
|
|
7381
7346
|
sharingDelAccess: "delete" | "read" | "write" | null;
|
|
7382
|
-
|
|
7347
|
+
sharedByPubKey: string;
|
|
7348
|
+
identityPubKey: string;
|
|
7383
7349
|
}[];
|
|
7384
7350
|
permissions: {
|
|
7385
7351
|
rights: "delete" | "read" | "write";
|
|
@@ -7415,8 +7381,6 @@ export declare const getTrpcGuestClient: ({ url }?: {
|
|
|
7415
7381
|
appId: string;
|
|
7416
7382
|
};
|
|
7417
7383
|
accesses: {
|
|
7418
|
-
identityPubKey: string;
|
|
7419
|
-
sharedByPubKey: string;
|
|
7420
7384
|
rights: "delete" | "read" | "write";
|
|
7421
7385
|
nameKey: string | null;
|
|
7422
7386
|
isRoot: boolean;
|
|
@@ -7424,7 +7388,8 @@ export declare const getTrpcGuestClient: ({ url }?: {
|
|
|
7424
7388
|
sharingAddAccess: "delete" | "read" | "write" | null;
|
|
7425
7389
|
delAccess: "delete" | "read" | "write" | null;
|
|
7426
7390
|
sharingDelAccess: "delete" | "read" | "write" | null;
|
|
7427
|
-
|
|
7391
|
+
sharedByPubKey: string;
|
|
7392
|
+
identityPubKey: string;
|
|
7428
7393
|
}[];
|
|
7429
7394
|
permissions: {
|
|
7430
7395
|
rights: "delete" | "read" | "write";
|
|
@@ -7894,12 +7859,9 @@ export declare const getTrpcGuestClient: ({ url }?: {
|
|
|
7894
7859
|
createFolder: import("@trpc/server").TRPCMutationProcedure<{
|
|
7895
7860
|
input: {
|
|
7896
7861
|
fromIdentityPubKey?: string | null | undefined;
|
|
7862
|
+
nameKey: string | null;
|
|
7897
7863
|
name: string;
|
|
7898
7864
|
parentId: string | null;
|
|
7899
|
-
encryptedAccesses: {
|
|
7900
|
-
pubKey: string;
|
|
7901
|
-
nameKey: string;
|
|
7902
|
-
}[];
|
|
7903
7865
|
};
|
|
7904
7866
|
output: {
|
|
7905
7867
|
id: string;
|
|
@@ -7918,8 +7880,6 @@ export declare const getTrpcGuestClient: ({ url }?: {
|
|
|
7918
7880
|
appId: string;
|
|
7919
7881
|
};
|
|
7920
7882
|
accesses: {
|
|
7921
|
-
identityPubKey: string;
|
|
7922
|
-
sharedByPubKey: string;
|
|
7923
7883
|
rights: "delete" | "read" | "write";
|
|
7924
7884
|
nameKey: string | null;
|
|
7925
7885
|
isRoot: boolean;
|
|
@@ -7927,7 +7887,8 @@ export declare const getTrpcGuestClient: ({ url }?: {
|
|
|
7927
7887
|
sharingAddAccess: "delete" | "read" | "write" | null;
|
|
7928
7888
|
delAccess: "delete" | "read" | "write" | null;
|
|
7929
7889
|
sharingDelAccess: "delete" | "read" | "write" | null;
|
|
7930
|
-
|
|
7890
|
+
sharedByPubKey: string;
|
|
7891
|
+
identityPubKey: string;
|
|
7931
7892
|
}[];
|
|
7932
7893
|
permissions: {
|
|
7933
7894
|
rights: "delete" | "read" | "write";
|
|
@@ -7968,8 +7929,6 @@ export declare const getTrpcGuestClient: ({ url }?: {
|
|
|
7968
7929
|
appId: string;
|
|
7969
7930
|
};
|
|
7970
7931
|
accesses: {
|
|
7971
|
-
identityPubKey: string;
|
|
7972
|
-
sharedByPubKey: string;
|
|
7973
7932
|
rights: "delete" | "read" | "write";
|
|
7974
7933
|
nameKey: string | null;
|
|
7975
7934
|
isRoot: boolean;
|
|
@@ -7977,7 +7936,8 @@ export declare const getTrpcGuestClient: ({ url }?: {
|
|
|
7977
7936
|
sharingAddAccess: "delete" | "read" | "write" | null;
|
|
7978
7937
|
delAccess: "delete" | "read" | "write" | null;
|
|
7979
7938
|
sharingDelAccess: "delete" | "read" | "write" | null;
|
|
7980
|
-
|
|
7939
|
+
sharedByPubKey: string;
|
|
7940
|
+
identityPubKey: string;
|
|
7981
7941
|
}[];
|
|
7982
7942
|
permissions: {
|
|
7983
7943
|
rights: "delete" | "read" | "write";
|
|
@@ -8013,8 +7973,6 @@ export declare const getTrpcGuestClient: ({ url }?: {
|
|
|
8013
7973
|
appId: string;
|
|
8014
7974
|
};
|
|
8015
7975
|
accesses: {
|
|
8016
|
-
identityPubKey: string;
|
|
8017
|
-
sharedByPubKey: string;
|
|
8018
7976
|
rights: "delete" | "read" | "write";
|
|
8019
7977
|
nameKey: string | null;
|
|
8020
7978
|
isRoot: boolean;
|
|
@@ -8022,7 +7980,8 @@ export declare const getTrpcGuestClient: ({ url }?: {
|
|
|
8022
7980
|
sharingAddAccess: "delete" | "read" | "write" | null;
|
|
8023
7981
|
delAccess: "delete" | "read" | "write" | null;
|
|
8024
7982
|
sharingDelAccess: "delete" | "read" | "write" | null;
|
|
8025
|
-
|
|
7983
|
+
sharedByPubKey: string;
|
|
7984
|
+
identityPubKey: string;
|
|
8026
7985
|
}[];
|
|
8027
7986
|
permissions: {
|
|
8028
7987
|
rights: "delete" | "read" | "write";
|
|
@@ -8195,7 +8154,6 @@ export declare const getTrpcGuestClient: ({ url }?: {
|
|
|
8195
8154
|
sharingDelAccess: "delete" | "read" | "write" | null;
|
|
8196
8155
|
identityPubKey: string;
|
|
8197
8156
|
sharedByPubKey: string;
|
|
8198
|
-
sharedByRootPubKey: string;
|
|
8199
8157
|
initiatorAppId: string;
|
|
8200
8158
|
initiatorUserId: string;
|
|
8201
8159
|
};
|
|
@@ -8238,8 +8196,6 @@ export declare const getTrpcGuestClient: ({ url }?: {
|
|
|
8238
8196
|
appId: string;
|
|
8239
8197
|
};
|
|
8240
8198
|
accesses: {
|
|
8241
|
-
identityPubKey: string;
|
|
8242
|
-
sharedByPubKey: string;
|
|
8243
8199
|
rights: "delete" | "read" | "write";
|
|
8244
8200
|
nameKey: string | null;
|
|
8245
8201
|
isRoot: boolean;
|
|
@@ -8247,7 +8203,8 @@ export declare const getTrpcGuestClient: ({ url }?: {
|
|
|
8247
8203
|
sharingAddAccess: "delete" | "read" | "write" | null;
|
|
8248
8204
|
delAccess: "delete" | "read" | "write" | null;
|
|
8249
8205
|
sharingDelAccess: "delete" | "read" | "write" | null;
|
|
8250
|
-
|
|
8206
|
+
sharedByPubKey: string;
|
|
8207
|
+
identityPubKey: string;
|
|
8251
8208
|
}[];
|
|
8252
8209
|
permissions: {
|
|
8253
8210
|
rights: "delete" | "read" | "write";
|
|
@@ -8296,8 +8253,6 @@ export declare const getTrpcGuestClient: ({ url }?: {
|
|
|
8296
8253
|
appId: string;
|
|
8297
8254
|
};
|
|
8298
8255
|
accesses: {
|
|
8299
|
-
identityPubKey: string;
|
|
8300
|
-
sharedByPubKey: string;
|
|
8301
8256
|
rights: "delete" | "read" | "write";
|
|
8302
8257
|
nameKey: string | null;
|
|
8303
8258
|
isRoot: boolean;
|
|
@@ -8305,7 +8260,8 @@ export declare const getTrpcGuestClient: ({ url }?: {
|
|
|
8305
8260
|
sharingAddAccess: "delete" | "read" | "write" | null;
|
|
8306
8261
|
delAccess: "delete" | "read" | "write" | null;
|
|
8307
8262
|
sharingDelAccess: "delete" | "read" | "write" | null;
|
|
8308
|
-
|
|
8263
|
+
sharedByPubKey: string;
|
|
8264
|
+
identityPubKey: string;
|
|
8309
8265
|
}[];
|
|
8310
8266
|
permissions: {
|
|
8311
8267
|
rights: "delete" | "read" | "write";
|
|
@@ -8346,8 +8302,6 @@ export declare const getTrpcGuestClient: ({ url }?: {
|
|
|
8346
8302
|
appId: string;
|
|
8347
8303
|
};
|
|
8348
8304
|
accesses: {
|
|
8349
|
-
identityPubKey: string;
|
|
8350
|
-
sharedByPubKey: string;
|
|
8351
8305
|
rights: "delete" | "read" | "write";
|
|
8352
8306
|
nameKey: string | null;
|
|
8353
8307
|
isRoot: boolean;
|
|
@@ -8355,7 +8309,8 @@ export declare const getTrpcGuestClient: ({ url }?: {
|
|
|
8355
8309
|
sharingAddAccess: "delete" | "read" | "write" | null;
|
|
8356
8310
|
delAccess: "delete" | "read" | "write" | null;
|
|
8357
8311
|
sharingDelAccess: "delete" | "read" | "write" | null;
|
|
8358
|
-
|
|
8312
|
+
sharedByPubKey: string;
|
|
8313
|
+
identityPubKey: string;
|
|
8359
8314
|
}[];
|
|
8360
8315
|
permissions: {
|
|
8361
8316
|
rights: "delete" | "read" | "write";
|
|
@@ -8391,8 +8346,6 @@ export declare const getTrpcGuestClient: ({ url }?: {
|
|
|
8391
8346
|
appId: string;
|
|
8392
8347
|
};
|
|
8393
8348
|
accesses: {
|
|
8394
|
-
identityPubKey: string;
|
|
8395
|
-
sharedByPubKey: string;
|
|
8396
8349
|
rights: "delete" | "read" | "write";
|
|
8397
8350
|
nameKey: string | null;
|
|
8398
8351
|
isRoot: boolean;
|
|
@@ -8400,7 +8353,8 @@ export declare const getTrpcGuestClient: ({ url }?: {
|
|
|
8400
8353
|
sharingAddAccess: "delete" | "read" | "write" | null;
|
|
8401
8354
|
delAccess: "delete" | "read" | "write" | null;
|
|
8402
8355
|
sharingDelAccess: "delete" | "read" | "write" | null;
|
|
8403
|
-
|
|
8356
|
+
sharedByPubKey: string;
|
|
8357
|
+
identityPubKey: string;
|
|
8404
8358
|
}[];
|
|
8405
8359
|
permissions: {
|
|
8406
8360
|
rights: "delete" | "read" | "write";
|
|
@@ -8536,8 +8490,6 @@ export declare const getTrpcGuestClient: ({ url }?: {
|
|
|
8536
8490
|
appId: string;
|
|
8537
8491
|
};
|
|
8538
8492
|
accesses: {
|
|
8539
|
-
identityPubKey: string;
|
|
8540
|
-
sharedByPubKey: string;
|
|
8541
8493
|
rights: "delete" | "read" | "write";
|
|
8542
8494
|
nameKey: string | null;
|
|
8543
8495
|
isRoot: boolean;
|
|
@@ -8545,7 +8497,8 @@ export declare const getTrpcGuestClient: ({ url }?: {
|
|
|
8545
8497
|
sharingAddAccess: "delete" | "read" | "write" | null;
|
|
8546
8498
|
delAccess: "delete" | "read" | "write" | null;
|
|
8547
8499
|
sharingDelAccess: "delete" | "read" | "write" | null;
|
|
8548
|
-
|
|
8500
|
+
sharedByPubKey: string;
|
|
8501
|
+
identityPubKey: string;
|
|
8549
8502
|
}[];
|
|
8550
8503
|
permissions: {
|
|
8551
8504
|
rights: "delete" | "read" | "write";
|
|
@@ -8588,8 +8541,6 @@ export declare const getTrpcGuestClient: ({ url }?: {
|
|
|
8588
8541
|
appId: string;
|
|
8589
8542
|
};
|
|
8590
8543
|
accesses: {
|
|
8591
|
-
identityPubKey: string;
|
|
8592
|
-
sharedByPubKey: string;
|
|
8593
8544
|
rights: "delete" | "read" | "write";
|
|
8594
8545
|
nameKey: string | null;
|
|
8595
8546
|
isRoot: boolean;
|
|
@@ -8597,7 +8548,8 @@ export declare const getTrpcGuestClient: ({ url }?: {
|
|
|
8597
8548
|
sharingAddAccess: "delete" | "read" | "write" | null;
|
|
8598
8549
|
delAccess: "delete" | "read" | "write" | null;
|
|
8599
8550
|
sharingDelAccess: "delete" | "read" | "write" | null;
|
|
8600
|
-
|
|
8551
|
+
sharedByPubKey: string;
|
|
8552
|
+
identityPubKey: string;
|
|
8601
8553
|
}[];
|
|
8602
8554
|
permissions: {
|
|
8603
8555
|
rights: "delete" | "read" | "write";
|
|
@@ -8639,8 +8591,6 @@ export declare const getTrpcGuestClient: ({ url }?: {
|
|
|
8639
8591
|
appId: string;
|
|
8640
8592
|
};
|
|
8641
8593
|
accesses: {
|
|
8642
|
-
identityPubKey: string;
|
|
8643
|
-
sharedByPubKey: string;
|
|
8644
8594
|
rights: "delete" | "read" | "write";
|
|
8645
8595
|
nameKey: string | null;
|
|
8646
8596
|
isRoot: boolean;
|
|
@@ -8648,7 +8598,8 @@ export declare const getTrpcGuestClient: ({ url }?: {
|
|
|
8648
8598
|
sharingAddAccess: "delete" | "read" | "write" | null;
|
|
8649
8599
|
delAccess: "delete" | "read" | "write" | null;
|
|
8650
8600
|
sharingDelAccess: "delete" | "read" | "write" | null;
|
|
8651
|
-
|
|
8601
|
+
sharedByPubKey: string;
|
|
8602
|
+
identityPubKey: string;
|
|
8652
8603
|
}[];
|
|
8653
8604
|
permissions: {
|
|
8654
8605
|
rights: "delete" | "read" | "write";
|
|
@@ -8822,8 +8773,6 @@ export declare const getTrpcGuestClient: ({ url }?: {
|
|
|
8822
8773
|
appId: string;
|
|
8823
8774
|
};
|
|
8824
8775
|
accesses: {
|
|
8825
|
-
identityPubKey: string;
|
|
8826
|
-
sharedByPubKey: string;
|
|
8827
8776
|
rights: "delete" | "read" | "write";
|
|
8828
8777
|
nameKey: string | null;
|
|
8829
8778
|
isRoot: boolean;
|
|
@@ -8831,7 +8780,8 @@ export declare const getTrpcGuestClient: ({ url }?: {
|
|
|
8831
8780
|
sharingAddAccess: "delete" | "read" | "write" | null;
|
|
8832
8781
|
delAccess: "delete" | "read" | "write" | null;
|
|
8833
8782
|
sharingDelAccess: "delete" | "read" | "write" | null;
|
|
8834
|
-
|
|
8783
|
+
sharedByPubKey: string;
|
|
8784
|
+
identityPubKey: string;
|
|
8835
8785
|
}[];
|
|
8836
8786
|
permissions: {
|
|
8837
8787
|
rights: "delete" | "read" | "write";
|
|
@@ -8872,8 +8822,6 @@ export declare const getTrpcGuestClient: ({ url }?: {
|
|
|
8872
8822
|
appId: string;
|
|
8873
8823
|
};
|
|
8874
8824
|
accesses: {
|
|
8875
|
-
identityPubKey: string;
|
|
8876
|
-
sharedByPubKey: string;
|
|
8877
8825
|
rights: "delete" | "read" | "write";
|
|
8878
8826
|
nameKey: string | null;
|
|
8879
8827
|
isRoot: boolean;
|
|
@@ -8881,7 +8829,8 @@ export declare const getTrpcGuestClient: ({ url }?: {
|
|
|
8881
8829
|
sharingAddAccess: "delete" | "read" | "write" | null;
|
|
8882
8830
|
delAccess: "delete" | "read" | "write" | null;
|
|
8883
8831
|
sharingDelAccess: "delete" | "read" | "write" | null;
|
|
8884
|
-
|
|
8832
|
+
sharedByPubKey: string;
|
|
8833
|
+
identityPubKey: string;
|
|
8885
8834
|
}[];
|
|
8886
8835
|
permissions: {
|
|
8887
8836
|
rights: "delete" | "read" | "write";
|
|
@@ -8917,8 +8866,6 @@ export declare const getTrpcGuestClient: ({ url }?: {
|
|
|
8917
8866
|
appId: string;
|
|
8918
8867
|
};
|
|
8919
8868
|
accesses: {
|
|
8920
|
-
identityPubKey: string;
|
|
8921
|
-
sharedByPubKey: string;
|
|
8922
8869
|
rights: "delete" | "read" | "write";
|
|
8923
8870
|
nameKey: string | null;
|
|
8924
8871
|
isRoot: boolean;
|
|
@@ -8926,7 +8873,8 @@ export declare const getTrpcGuestClient: ({ url }?: {
|
|
|
8926
8873
|
sharingAddAccess: "delete" | "read" | "write" | null;
|
|
8927
8874
|
delAccess: "delete" | "read" | "write" | null;
|
|
8928
8875
|
sharingDelAccess: "delete" | "read" | "write" | null;
|
|
8929
|
-
|
|
8876
|
+
sharedByPubKey: string;
|
|
8877
|
+
identityPubKey: string;
|
|
8930
8878
|
}[];
|
|
8931
8879
|
permissions: {
|
|
8932
8880
|
rights: "delete" | "read" | "write";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare function generatePassword(): string;
|
|
2
2
|
export declare function derivePassword(password: string, salt: Uint8Array<ArrayBufferLike>): string;
|
|
3
|
-
export declare function encryptName(name: string, nameKey:
|
|
3
|
+
export declare function encryptName(name: string, nameKey: string): Promise<string>;
|
|
4
4
|
export declare function generateAndEncryptNameAndKey(args: {
|
|
5
5
|
name: string;
|
|
6
6
|
privateKey: string;
|
|
@@ -10,8 +10,3 @@ export declare function generateAndEncryptNameAndKey(args: {
|
|
|
10
10
|
encryptedName: string;
|
|
11
11
|
encryptedNameKey: string;
|
|
12
12
|
}>;
|
|
13
|
-
export declare function encryptNameKey(args: {
|
|
14
|
-
nameKey: Uint8Array<ArrayBufferLike>;
|
|
15
|
-
publicKey: string;
|
|
16
|
-
privateKey: string;
|
|
17
|
-
}): Promise<string>;
|
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.75.
|
|
5
|
+
"version": "1.75.2",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "https://github.com/anonymize-org/lib.git"
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
},
|
|
77
77
|
"dependencies": {
|
|
78
78
|
"@js-temporal/polyfill": "^0.5.1",
|
|
79
|
-
"@secrecy/trpc-api-types": "1.33.0-
|
|
79
|
+
"@secrecy/trpc-api-types": "1.33.0-feat-groups-identity.33",
|
|
80
80
|
"@trpc/client": "11.6.0",
|
|
81
81
|
"@trpc/server": "^11.6.0",
|
|
82
82
|
"@types/libsodium-wrappers-sumo": "^0.7.8",
|