@secrecy/lib 1.33.0 → 1.34.0

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.
@@ -166,7 +166,7 @@ export class SecrecyCloudClient {
166
166
  });
167
167
  return isDeleted;
168
168
  }
169
- async duplicateNode({ nodeId, folderId, customName, }) {
169
+ async duplicateNode({ nodeId, folderId, name, }) {
170
170
  let node = nodesCache.get(nodeId);
171
171
  if (node === undefined) {
172
172
  await this.node({ id: nodeId });
@@ -178,14 +178,14 @@ export class SecrecyCloudClient {
178
178
  if (node.access?.nameKey === undefined) {
179
179
  throw new Error(`Can't have access to node ${nodeId}`);
180
180
  }
181
- customName =
182
- typeof customName === 'string' && node.access.nameKey !== null
183
- ? await encryptName(customName, node.access.nameKey)
181
+ name =
182
+ typeof name === 'string' && node.access.nameKey !== null
183
+ ? await encryptName(name, node.access.nameKey)
184
184
  : null;
185
185
  const { isDuplicated } = await this.#apiClient.cloud.duplicateNode.mutate({
186
186
  nodeId,
187
187
  folderId: folderId ?? null,
188
- name: customName,
188
+ name,
189
189
  });
190
190
  return isDuplicated;
191
191
  }
@@ -30,10 +30,10 @@ export declare class SecrecyCloudClient {
30
30
  nodeId: string;
31
31
  userId: string;
32
32
  }): Promise<boolean>;
33
- duplicateNode({ nodeId, folderId, customName, }: {
33
+ duplicateNode({ nodeId, folderId, name, }: {
34
34
  nodeId: string;
35
35
  folderId?: string | null | undefined;
36
- customName?: string | null | undefined;
36
+ name?: string | null | undefined;
37
37
  }): Promise<boolean>;
38
38
  deleteNodeCloudTrash({ ids }: {
39
39
  ids: 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.33.0",
5
+ "version": "1.34.0",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "https://github.com/anonymize-org/lib.git"