@secrecy/lib 1.52.0-feat-public-data-link.1 → 1.52.0-feat-public-data-link.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.
@@ -556,6 +556,15 @@ export class SecrecyCloudClient {
556
556
  });
557
557
  }
558
558
  async updateDataStorageType(input) {
559
+ const data = dataContentCache.get(input.dataId);
560
+ if (data) {
561
+ if (data.storageType === input.storageType) {
562
+ throw new Error(`The data is already on "${data.storageType}`);
563
+ }
564
+ if (data.storageType === 'cold' && input.storageType === 'lite') {
565
+ throw new Error("It's not possible to transfer a cold stored data to a lite storage!");
566
+ }
567
+ }
559
568
  return this.#apiClient.cloud.moveToStorageType.mutate(input);
560
569
  }
561
570
  getPublicDataLink(input) {
@@ -3849,14 +3849,18 @@ export declare const createTRPCClient: (session?: string | null | undefined, onA
3849
3849
  _meta: object;
3850
3850
  _ctx_out: {};
3851
3851
  _input_in: {
3852
- name: string;
3853
3852
  id: string;
3854
- expireAt: Date | null;
3853
+ } & {
3854
+ name?: string | undefined;
3855
+ expireAt?: Date | null | undefined;
3856
+ slug?: string | undefined;
3855
3857
  };
3856
3858
  _input_out: {
3857
- name: string;
3858
3859
  id: string;
3859
- expireAt: Date | null;
3860
+ } & {
3861
+ name?: string | undefined;
3862
+ expireAt?: Date | null | undefined;
3863
+ slug?: string | undefined;
3860
3864
  };
3861
3865
  _output_in: {
3862
3866
  name: 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.52.0-feat-public-data-link.1",
5
+ "version": "1.52.0-feat-public-data-link.2",
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.6.2"
75
75
  },
76
76
  "dependencies": {
77
- "@secrecy/trpc-api-types": "1.33.0-feat-unencrypted-pub-link.2",
77
+ "@secrecy/trpc-api-types": "1.33.0-feat-unencrypted-pub-link.3",
78
78
  "@trpc/client": "10.45.2",
79
79
  "@trpc/server": "10.45.2",
80
80
  "@types/libsodium-wrappers-sumo": "^0.7.8",