@secrecy/lib 1.62.0-feat-node-sharing.11 → 1.62.0-feat-node-sharing.12

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.
@@ -38,7 +38,7 @@ export class SecrecyCloudClient {
38
38
  const shares = users.map(([user]) => {
39
39
  const publicKey = userKeys[user.id];
40
40
  if (!publicKey) {
41
- throw new Error('Unable to retreive share by public key!');
41
+ throw new Error('Unable to retrieve share by public key!');
42
42
  }
43
43
  return {
44
44
  id: user.id,
@@ -423,7 +423,6 @@ export class SecrecyCloudClient {
423
423
  {
424
424
  id: node.nodeId,
425
425
  rights: node.rights,
426
- nameKey: null,
427
426
  data: [],
428
427
  },
429
428
  ],
@@ -678,7 +677,7 @@ export class SecrecyCloudClient {
678
677
  throw new Error(`Unable to retrieve some user public keys!`);
679
678
  }
680
679
  }
681
- // Retreive and format nodes.
680
+ // Retrieve and format nodes.
682
681
  for (const nodeId of nodeIds) {
683
682
  let node;
684
683
  node ??= nodesEncryptionCache.get(nodeId);
@@ -694,14 +693,14 @@ export class SecrecyCloudClient {
694
693
  access: { nameKey: node.access.nameKey },
695
694
  history: node.history.map((data) => {
696
695
  if (!data.key) {
697
- throw new Error('Unable to retreive data key!');
696
+ throw new Error('Unable to retrieve data key!');
698
697
  }
699
698
  return { id: data.id, key: data.key };
700
699
  }),
701
700
  });
702
701
  }
703
702
  }
704
- // Retreive all missing nodes from cache to api.
703
+ // Retrieve all missing nodes from cache to api.
705
704
  const missingNodeIds = nodeIds.filter((nodeId) => !nodes.some((node) => node.id === nodeId));
706
705
  const fetchedNodes = await this.#apiClient.cloud.nodesForEncryption.query({
707
706
  ids: missingNodeIds,
@@ -720,7 +719,7 @@ export class SecrecyCloudClient {
720
719
  for (const nodeId of userNodes[userId]) {
721
720
  const node = nodes.find((node) => node.id === nodeId);
722
721
  if (!node) {
723
- throw new Error('Unable to retreive node from ram');
722
+ throw new Error('Unable to retrieve node from ram');
724
723
  }
725
724
  if (node.type === 'FILE' &&
726
725
  (!('history' in node) || node.history.length === 0)) {
@@ -4147,11 +4147,11 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => {
4147
4147
  nodes: {
4148
4148
  data: {
4149
4149
  id: string;
4150
- key: string | null;
4150
+ key?: string | null | undefined;
4151
4151
  }[];
4152
4152
  id: string;
4153
4153
  rights: "admin" | "write" | "read";
4154
- nameKey: string | null;
4154
+ nameKey?: string | null | undefined;
4155
4155
  }[];
4156
4156
  }[];
4157
4157
  _input_out: {
@@ -4159,11 +4159,11 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => {
4159
4159
  nodes: {
4160
4160
  data: {
4161
4161
  id: string;
4162
- key: string | null;
4162
+ key?: string | null | undefined;
4163
4163
  }[];
4164
4164
  id: string;
4165
4165
  rights: "admin" | "write" | "read";
4166
- nameKey: string | null;
4166
+ nameKey?: string | null | undefined;
4167
4167
  }[];
4168
4168
  }[];
4169
4169
  _output_in: {
@@ -5821,11 +5821,11 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => {
5821
5821
  nodes: {
5822
5822
  data: {
5823
5823
  id: string;
5824
- key: string | null;
5824
+ key?: string | null | undefined;
5825
5825
  }[];
5826
5826
  id: string;
5827
5827
  rights: "admin" | "write" | "read";
5828
- nameKey: string | null;
5828
+ nameKey?: string | null | undefined;
5829
5829
  }[];
5830
5830
  }[];
5831
5831
  _input_out: {
@@ -5833,11 +5833,11 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => {
5833
5833
  nodes: {
5834
5834
  data: {
5835
5835
  id: string;
5836
- key: string | null;
5836
+ key?: string | null | undefined;
5837
5837
  }[];
5838
5838
  id: string;
5839
5839
  rights: "admin" | "write" | "read";
5840
- nameKey: string | null;
5840
+ nameKey?: string | null | undefined;
5841
5841
  }[];
5842
5842
  }[];
5843
5843
  _output_in: {
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.62.0-feat-node-sharing.11",
5
+ "version": "1.62.0-feat-node-sharing.12",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "https://github.com/anonymize-org/lib.git"
@@ -74,7 +74,7 @@
74
74
  "typescript": "^5.7.2"
75
75
  },
76
76
  "dependencies": {
77
- "@secrecy/trpc-api-types": "1.33.0-feat-share-node-enhanced.21",
77
+ "@secrecy/trpc-api-types": "1.33.0-feat-share-node-enhanced.23",
78
78
  "@trpc/client": "10.45.2",
79
79
  "@trpc/server": "10.45.2",
80
80
  "@types/libsodium-wrappers-sumo": "^0.7.8",