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