@uniformdev/assets 19.61.1-alpha.10 → 19.61.1-alpha.13

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/index.d.mts CHANGED
@@ -81,7 +81,8 @@ interface paths {
81
81
  * @description The project ID to upsert the asset to
82
82
  */
83
83
  projectId: string;
84
- asset: components["schemas"]["AssetInput"];
84
+ asset?: components["schemas"]["AssetInput"];
85
+ assets?: components["schemas"]["AssetInput"][];
85
86
  };
86
87
  };
87
88
  };
@@ -717,15 +718,8 @@ interface external {
717
718
  allowedOnComponents?: string[];
718
719
  /** @description Resource path, appended to the data source's baseUrl (e.g. baseUrl = https://base.url, path = /v1/endpoint -> final URL https://base.url/v1/endpoint). Must have leading slash. */
719
720
  path: string;
720
- /** @description Time-to-live (in seconds) for the primary resource data cache. */
721
+ /** @description Time-to-live (in seconds) for the resource data cache. */
721
722
  ttl?: number;
722
- /** @description Long term data resource cache configuration. */
723
- longTermCache?: {
724
- /** @description A flag to turn the long term cache on. */
725
- enabled: boolean;
726
- /** @description Time-to-live (in hours) for the long term resource data cache. */
727
- ttlInHours?: number;
728
- };
729
723
  /** @description A key for the resource data cache purging. */
730
724
  purgeKey?: string;
731
725
  /** @description URL to a custom badge icon for the Uniform dashboard for this data type. If not set falls back to the data connector or integration icons. */
@@ -805,6 +799,28 @@ interface external {
805
799
  DataResourceVariables: {
806
800
  [key: string]: string;
807
801
  };
802
+ HistoryApiResponse: {
803
+ /**
804
+ * @description If there are more results, this will be populated with a token to pass in the next request to get the next page of results.
805
+ * If this is undefined then no more results are available.
806
+ */
807
+ cursor?: string;
808
+ /** @description If more history is available than your plan allows, and additional entries are available by upgrading, this will be true */
809
+ truncated?: boolean;
810
+ /** @description Version history entries. */
811
+ results?: external["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["HistoryEntry"][];
812
+ };
813
+ HistoryEntry: {
814
+ /** @description The version ID of the entity. This can be used to fetch the version's data via the entity API. */
815
+ versionId: string;
816
+ /** @description The timestamp when the version was created in epoch milliseconds. */
817
+ timestamp: number;
818
+ /** @description The name (full name) of the user who created the version. */
819
+ authorName: string;
820
+ authorIsApiKey: boolean;
821
+ /** @description The state of the entity when the history entry was made. */
822
+ state: number;
823
+ };
808
824
  /** @description Category for tagging canvas entities */
809
825
  Category: {
810
826
  /**
@@ -835,6 +851,26 @@ interface external {
835
851
  */
836
852
  projectMapId: string;
837
853
  };
854
+ /** @description AI Prompt definition. */
855
+ Prompt: {
856
+ /**
857
+ * Format: uuid
858
+ * @description Unique identifier for the prompt
859
+ */
860
+ id: string;
861
+ /** @description Unique identifier for the integration that this prompt belongs to. */
862
+ integrationType: string;
863
+ /** @description Name for the prompt */
864
+ promptName?: string | null;
865
+ /** @description Text for the prompt */
866
+ promptText?: string | null;
867
+ /** @description Data for the prompt */
868
+ promptData?: string | null;
869
+ /** @description Turn off/on prompt */
870
+ enabled?: boolean | null;
871
+ /** @description Integration default prompt */
872
+ builtIn?: boolean | null;
873
+ };
838
874
  };
839
875
  };
840
876
  operations: {};
@@ -871,4 +907,10 @@ declare class UncachedAssetClient extends AssetClient {
871
907
  }, 'bypassCache'>);
872
908
  }
873
909
 
874
- export { Asset, AssetClient, AssetDeleteRequest, AssetGetRequest, AssetGetRequestList, AssetGetRequestSingle, AssetGetResponse, AssetGetResponseList, AssetGetResponseSingle, AssetUpsertRequest, UncachedAssetClient };
910
+ /**
911
+ * Converts a content asset to a put content asset body that has only the properties expected to the PUT API.
912
+ * Removes things like author, stats, etc.
913
+ */
914
+ declare function convertAssetToPutAsset(asset: AssetGetResponseSingle): AssetUpsertRequest;
915
+
916
+ export { Asset, AssetClient, AssetDeleteRequest, AssetGetRequest, AssetGetRequestList, AssetGetRequestSingle, AssetGetResponse, AssetGetResponseList, AssetGetResponseSingle, AssetUpsertRequest, UncachedAssetClient, convertAssetToPutAsset };
package/dist/index.d.ts CHANGED
@@ -81,7 +81,8 @@ interface paths {
81
81
  * @description The project ID to upsert the asset to
82
82
  */
83
83
  projectId: string;
84
- asset: components["schemas"]["AssetInput"];
84
+ asset?: components["schemas"]["AssetInput"];
85
+ assets?: components["schemas"]["AssetInput"][];
85
86
  };
86
87
  };
87
88
  };
@@ -717,15 +718,8 @@ interface external {
717
718
  allowedOnComponents?: string[];
718
719
  /** @description Resource path, appended to the data source's baseUrl (e.g. baseUrl = https://base.url, path = /v1/endpoint -> final URL https://base.url/v1/endpoint). Must have leading slash. */
719
720
  path: string;
720
- /** @description Time-to-live (in seconds) for the primary resource data cache. */
721
+ /** @description Time-to-live (in seconds) for the resource data cache. */
721
722
  ttl?: number;
722
- /** @description Long term data resource cache configuration. */
723
- longTermCache?: {
724
- /** @description A flag to turn the long term cache on. */
725
- enabled: boolean;
726
- /** @description Time-to-live (in hours) for the long term resource data cache. */
727
- ttlInHours?: number;
728
- };
729
723
  /** @description A key for the resource data cache purging. */
730
724
  purgeKey?: string;
731
725
  /** @description URL to a custom badge icon for the Uniform dashboard for this data type. If not set falls back to the data connector or integration icons. */
@@ -805,6 +799,28 @@ interface external {
805
799
  DataResourceVariables: {
806
800
  [key: string]: string;
807
801
  };
802
+ HistoryApiResponse: {
803
+ /**
804
+ * @description If there are more results, this will be populated with a token to pass in the next request to get the next page of results.
805
+ * If this is undefined then no more results are available.
806
+ */
807
+ cursor?: string;
808
+ /** @description If more history is available than your plan allows, and additional entries are available by upgrading, this will be true */
809
+ truncated?: boolean;
810
+ /** @description Version history entries. */
811
+ results?: external["uniform-canvas-types.swagger.yml"]["components"]["schemas"]["HistoryEntry"][];
812
+ };
813
+ HistoryEntry: {
814
+ /** @description The version ID of the entity. This can be used to fetch the version's data via the entity API. */
815
+ versionId: string;
816
+ /** @description The timestamp when the version was created in epoch milliseconds. */
817
+ timestamp: number;
818
+ /** @description The name (full name) of the user who created the version. */
819
+ authorName: string;
820
+ authorIsApiKey: boolean;
821
+ /** @description The state of the entity when the history entry was made. */
822
+ state: number;
823
+ };
808
824
  /** @description Category for tagging canvas entities */
809
825
  Category: {
810
826
  /**
@@ -835,6 +851,26 @@ interface external {
835
851
  */
836
852
  projectMapId: string;
837
853
  };
854
+ /** @description AI Prompt definition. */
855
+ Prompt: {
856
+ /**
857
+ * Format: uuid
858
+ * @description Unique identifier for the prompt
859
+ */
860
+ id: string;
861
+ /** @description Unique identifier for the integration that this prompt belongs to. */
862
+ integrationType: string;
863
+ /** @description Name for the prompt */
864
+ promptName?: string | null;
865
+ /** @description Text for the prompt */
866
+ promptText?: string | null;
867
+ /** @description Data for the prompt */
868
+ promptData?: string | null;
869
+ /** @description Turn off/on prompt */
870
+ enabled?: boolean | null;
871
+ /** @description Integration default prompt */
872
+ builtIn?: boolean | null;
873
+ };
838
874
  };
839
875
  };
840
876
  operations: {};
@@ -871,4 +907,10 @@ declare class UncachedAssetClient extends AssetClient {
871
907
  }, 'bypassCache'>);
872
908
  }
873
909
 
874
- export { Asset, AssetClient, AssetDeleteRequest, AssetGetRequest, AssetGetRequestList, AssetGetRequestSingle, AssetGetResponse, AssetGetResponseList, AssetGetResponseSingle, AssetUpsertRequest, UncachedAssetClient };
910
+ /**
911
+ * Converts a content asset to a put content asset body that has only the properties expected to the PUT API.
912
+ * Removes things like author, stats, etc.
913
+ */
914
+ declare function convertAssetToPutAsset(asset: AssetGetResponseSingle): AssetUpsertRequest;
915
+
916
+ export { Asset, AssetClient, AssetDeleteRequest, AssetGetRequest, AssetGetRequestList, AssetGetRequestSingle, AssetGetResponse, AssetGetResponseList, AssetGetResponseSingle, AssetUpsertRequest, UncachedAssetClient, convertAssetToPutAsset };
package/dist/index.esm.js CHANGED
@@ -37,7 +37,24 @@ var UncachedAssetClient = class extends AssetClient {
37
37
  super({ ...options, bypassCache: true });
38
38
  }
39
39
  };
40
+
41
+ // src/utils/assetConverter.ts
42
+ function convertAssetToPutAsset(asset) {
43
+ return {
44
+ asset: {
45
+ _id: asset.asset._id,
46
+ _dataResources: asset.asset._dataResources,
47
+ _name: asset.asset._name,
48
+ type: asset.asset.type,
49
+ title: asset.asset.title,
50
+ description: asset.asset.description,
51
+ file: asset.asset.file
52
+ },
53
+ projectId: asset.projectId
54
+ };
55
+ }
40
56
  export {
41
57
  AssetClient,
42
- UncachedAssetClient
58
+ UncachedAssetClient,
59
+ convertAssetToPutAsset
43
60
  };
package/dist/index.js CHANGED
@@ -21,7 +21,8 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
21
21
  var src_exports = {};
22
22
  __export(src_exports, {
23
23
  AssetClient: () => AssetClient,
24
- UncachedAssetClient: () => UncachedAssetClient
24
+ UncachedAssetClient: () => UncachedAssetClient,
25
+ convertAssetToPutAsset: () => convertAssetToPutAsset
25
26
  });
26
27
  module.exports = __toCommonJS(src_exports);
27
28
 
@@ -64,8 +65,25 @@ var UncachedAssetClient = class extends AssetClient {
64
65
  super({ ...options, bypassCache: true });
65
66
  }
66
67
  };
68
+
69
+ // src/utils/assetConverter.ts
70
+ function convertAssetToPutAsset(asset) {
71
+ return {
72
+ asset: {
73
+ _id: asset.asset._id,
74
+ _dataResources: asset.asset._dataResources,
75
+ _name: asset.asset._name,
76
+ type: asset.asset.type,
77
+ title: asset.asset.title,
78
+ description: asset.asset.description,
79
+ file: asset.asset.file
80
+ },
81
+ projectId: asset.projectId
82
+ };
83
+ }
67
84
  // Annotate the CommonJS export names for ESM import in node:
68
85
  0 && (module.exports = {
69
86
  AssetClient,
70
- UncachedAssetClient
87
+ UncachedAssetClient,
88
+ convertAssetToPutAsset
71
89
  });
package/dist/index.mjs CHANGED
@@ -37,7 +37,24 @@ var UncachedAssetClient = class extends AssetClient {
37
37
  super({ ...options, bypassCache: true });
38
38
  }
39
39
  };
40
+
41
+ // src/utils/assetConverter.ts
42
+ function convertAssetToPutAsset(asset) {
43
+ return {
44
+ asset: {
45
+ _id: asset.asset._id,
46
+ _dataResources: asset.asset._dataResources,
47
+ _name: asset.asset._name,
48
+ type: asset.asset.type,
49
+ title: asset.asset.title,
50
+ description: asset.asset.description,
51
+ file: asset.asset.file
52
+ },
53
+ projectId: asset.projectId
54
+ };
55
+ }
40
56
  export {
41
57
  AssetClient,
42
- UncachedAssetClient
58
+ UncachedAssetClient,
59
+ convertAssetToPutAsset
43
60
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/assets",
3
- "version": "19.61.1-alpha.10+8aa257167",
3
+ "version": "19.61.1-alpha.13+9ea7c72e6",
4
4
  "description": "Uniform Assets",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -36,7 +36,7 @@
36
36
  "access": "public"
37
37
  },
38
38
  "dependencies": {
39
- "@uniformdev/context": "19.61.1-alpha.10+8aa257167"
39
+ "@uniformdev/context": "19.61.1-alpha.13+9ea7c72e6"
40
40
  },
41
- "gitHead": "8aa2571675505a90ba544863f87621dd90750c3a"
41
+ "gitHead": "9ea7c72e685bf1dd690149aa40a9b7a443d2ad28"
42
42
  }