@uniformdev/assets 19.199.0 → 19.199.1-alpha.10

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
@@ -461,6 +461,13 @@ interface components$1 {
461
461
  [key: string]: components$1["schemas"]["ComponentInstance"][];
462
462
  };
463
463
  variant?: string;
464
+ /** @description Overrides data resource definitions for a pattern component.
465
+ * Object keys defined under this property override the corresponding keys in the pattern's data resources.
466
+ * Overrides defined here replace values in either _dataResources or _patternDataResources on the target component.
467
+ * */
468
+ dataResources?: {
469
+ [key: string]: components$1["schemas"]["DataResourceDefinition"];
470
+ };
464
471
  };
465
472
  /** @description Defines how a component on a pattern may have its values overridden.
466
473
  * NOTE: Data resources' overridability is defined in the data resource definition, not here.
@@ -1148,7 +1155,7 @@ interface components {
1148
1155
  /** @description Defines the shape of the asset input */
1149
1156
  AssetInput: {
1150
1157
  /** @description Content type of the asset */
1151
- type: string;
1158
+ type?: string;
1152
1159
  /**
1153
1160
  * Format: uuid
1154
1161
  * @description The public UUID of the asset
@@ -1398,7 +1405,7 @@ interface components {
1398
1405
  /** @description Specify multiple asset IDs to fetch. Response type will be a list */
1399
1406
  assetIDs: string[];
1400
1407
  /** @description The asset type ID to filter by */
1401
- type: ("image" | "video" | "audio" | "document")[];
1408
+ type: ("image" | "video" | "audio" | "other")[];
1402
1409
  /** @description Number of records to skip */
1403
1410
  offset: number;
1404
1411
  /** @description Max number of records to return */
@@ -1539,10 +1546,18 @@ declare class UncachedAssetClient extends AssetClient {
1539
1546
  }, 'bypassCache'>);
1540
1547
  }
1541
1548
 
1549
+ type AssetDefinitionType = 'image' | 'video' | 'audio' | 'other';
1550
+ type AssetDefinition = {
1551
+ id: AssetDefinitionType;
1552
+ name: string;
1553
+ namePlural: string;
1554
+ };
1555
+ declare const assetDefinitions: Record<AssetDefinitionType, AssetDefinition>;
1556
+
1542
1557
  /**
1543
1558
  * Converts a content asset to a put content asset body that has only the properties expected to the PUT API.
1544
1559
  * Removes things like author, stats, etc.
1545
1560
  */
1546
1561
  declare function convertAssetToPutAsset(asset: AssetGetResponseSingle): AssetUpsertRequest;
1547
1562
 
1548
- export { type Asset, AssetClient, type AssetDeleteRequest, type AssetGetRequest, type AssetGetRequestList, type AssetGetRequestSingle, type AssetGetResponse, type AssetGetResponseList, type AssetGetResponseSingle, type AssetParamValue, type AssetParamValueItem, type AssetUpsertRequest, UncachedAssetClient, convertAssetToPutAsset };
1563
+ export { type Asset, AssetClient, type AssetDefinitionType, type AssetDeleteRequest, type AssetGetRequest, type AssetGetRequestList, type AssetGetRequestSingle, type AssetGetResponse, type AssetGetResponseList, type AssetGetResponseSingle, type AssetParamValue, type AssetParamValueItem, type AssetUpsertRequest, UncachedAssetClient, assetDefinitions, convertAssetToPutAsset };
package/dist/index.d.ts CHANGED
@@ -461,6 +461,13 @@ interface components$1 {
461
461
  [key: string]: components$1["schemas"]["ComponentInstance"][];
462
462
  };
463
463
  variant?: string;
464
+ /** @description Overrides data resource definitions for a pattern component.
465
+ * Object keys defined under this property override the corresponding keys in the pattern's data resources.
466
+ * Overrides defined here replace values in either _dataResources or _patternDataResources on the target component.
467
+ * */
468
+ dataResources?: {
469
+ [key: string]: components$1["schemas"]["DataResourceDefinition"];
470
+ };
464
471
  };
465
472
  /** @description Defines how a component on a pattern may have its values overridden.
466
473
  * NOTE: Data resources' overridability is defined in the data resource definition, not here.
@@ -1148,7 +1155,7 @@ interface components {
1148
1155
  /** @description Defines the shape of the asset input */
1149
1156
  AssetInput: {
1150
1157
  /** @description Content type of the asset */
1151
- type: string;
1158
+ type?: string;
1152
1159
  /**
1153
1160
  * Format: uuid
1154
1161
  * @description The public UUID of the asset
@@ -1398,7 +1405,7 @@ interface components {
1398
1405
  /** @description Specify multiple asset IDs to fetch. Response type will be a list */
1399
1406
  assetIDs: string[];
1400
1407
  /** @description The asset type ID to filter by */
1401
- type: ("image" | "video" | "audio" | "document")[];
1408
+ type: ("image" | "video" | "audio" | "other")[];
1402
1409
  /** @description Number of records to skip */
1403
1410
  offset: number;
1404
1411
  /** @description Max number of records to return */
@@ -1539,10 +1546,18 @@ declare class UncachedAssetClient extends AssetClient {
1539
1546
  }, 'bypassCache'>);
1540
1547
  }
1541
1548
 
1549
+ type AssetDefinitionType = 'image' | 'video' | 'audio' | 'other';
1550
+ type AssetDefinition = {
1551
+ id: AssetDefinitionType;
1552
+ name: string;
1553
+ namePlural: string;
1554
+ };
1555
+ declare const assetDefinitions: Record<AssetDefinitionType, AssetDefinition>;
1556
+
1542
1557
  /**
1543
1558
  * Converts a content asset to a put content asset body that has only the properties expected to the PUT API.
1544
1559
  * Removes things like author, stats, etc.
1545
1560
  */
1546
1561
  declare function convertAssetToPutAsset(asset: AssetGetResponseSingle): AssetUpsertRequest;
1547
1562
 
1548
- export { type Asset, AssetClient, type AssetDeleteRequest, type AssetGetRequest, type AssetGetRequestList, type AssetGetRequestSingle, type AssetGetResponse, type AssetGetResponseList, type AssetGetResponseSingle, type AssetParamValue, type AssetParamValueItem, type AssetUpsertRequest, UncachedAssetClient, convertAssetToPutAsset };
1563
+ export { type Asset, AssetClient, type AssetDefinitionType, type AssetDeleteRequest, type AssetGetRequest, type AssetGetRequestList, type AssetGetRequestSingle, type AssetGetResponse, type AssetGetResponseList, type AssetGetResponseSingle, type AssetParamValue, type AssetParamValueItem, type AssetUpsertRequest, UncachedAssetClient, assetDefinitions, convertAssetToPutAsset };
package/dist/index.esm.js CHANGED
@@ -38,6 +38,30 @@ var UncachedAssetClient = class extends AssetClient {
38
38
  }
39
39
  };
40
40
 
41
+ // src/definitions.ts
42
+ var assetDefinitions = {
43
+ image: {
44
+ id: "image",
45
+ name: "Image Asset",
46
+ namePlural: "Image Assets"
47
+ },
48
+ video: {
49
+ id: "video",
50
+ name: "Video Asset",
51
+ namePlural: "Video Assets"
52
+ },
53
+ audio: {
54
+ id: "audio",
55
+ name: "Audio Asset",
56
+ namePlural: "Audio Assets"
57
+ },
58
+ other: {
59
+ id: "other",
60
+ name: "Other Asset",
61
+ namePlural: "Other Assets"
62
+ }
63
+ };
64
+
41
65
  // src/utils/assetConverter.ts
42
66
  function convertAssetToPutAsset(asset) {
43
67
  var _a, _b, _c;
@@ -59,5 +83,6 @@ function convertAssetToPutAsset(asset) {
59
83
  export {
60
84
  AssetClient,
61
85
  UncachedAssetClient,
86
+ assetDefinitions,
62
87
  convertAssetToPutAsset
63
88
  };
package/dist/index.js CHANGED
@@ -22,6 +22,7 @@ var src_exports = {};
22
22
  __export(src_exports, {
23
23
  AssetClient: () => AssetClient,
24
24
  UncachedAssetClient: () => UncachedAssetClient,
25
+ assetDefinitions: () => assetDefinitions,
25
26
  convertAssetToPutAsset: () => convertAssetToPutAsset
26
27
  });
27
28
  module.exports = __toCommonJS(src_exports);
@@ -66,6 +67,30 @@ var UncachedAssetClient = class extends AssetClient {
66
67
  }
67
68
  };
68
69
 
70
+ // src/definitions.ts
71
+ var assetDefinitions = {
72
+ image: {
73
+ id: "image",
74
+ name: "Image Asset",
75
+ namePlural: "Image Assets"
76
+ },
77
+ video: {
78
+ id: "video",
79
+ name: "Video Asset",
80
+ namePlural: "Video Assets"
81
+ },
82
+ audio: {
83
+ id: "audio",
84
+ name: "Audio Asset",
85
+ namePlural: "Audio Assets"
86
+ },
87
+ other: {
88
+ id: "other",
89
+ name: "Other Asset",
90
+ namePlural: "Other Assets"
91
+ }
92
+ };
93
+
69
94
  // src/utils/assetConverter.ts
70
95
  function convertAssetToPutAsset(asset) {
71
96
  var _a, _b, _c;
@@ -88,5 +113,6 @@ function convertAssetToPutAsset(asset) {
88
113
  0 && (module.exports = {
89
114
  AssetClient,
90
115
  UncachedAssetClient,
116
+ assetDefinitions,
91
117
  convertAssetToPutAsset
92
118
  });
package/dist/index.mjs CHANGED
@@ -38,6 +38,30 @@ var UncachedAssetClient = class extends AssetClient {
38
38
  }
39
39
  };
40
40
 
41
+ // src/definitions.ts
42
+ var assetDefinitions = {
43
+ image: {
44
+ id: "image",
45
+ name: "Image Asset",
46
+ namePlural: "Image Assets"
47
+ },
48
+ video: {
49
+ id: "video",
50
+ name: "Video Asset",
51
+ namePlural: "Video Assets"
52
+ },
53
+ audio: {
54
+ id: "audio",
55
+ name: "Audio Asset",
56
+ namePlural: "Audio Assets"
57
+ },
58
+ other: {
59
+ id: "other",
60
+ name: "Other Asset",
61
+ namePlural: "Other Assets"
62
+ }
63
+ };
64
+
41
65
  // src/utils/assetConverter.ts
42
66
  function convertAssetToPutAsset(asset) {
43
67
  var _a, _b, _c;
@@ -59,5 +83,6 @@ function convertAssetToPutAsset(asset) {
59
83
  export {
60
84
  AssetClient,
61
85
  UncachedAssetClient,
86
+ assetDefinitions,
62
87
  convertAssetToPutAsset
63
88
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/assets",
3
- "version": "19.199.0",
3
+ "version": "19.199.1-alpha.10+7f62130189",
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.199.0"
39
+ "@uniformdev/context": "19.199.1-alpha.10+7f62130189"
40
40
  },
41
- "gitHead": "10b981b78ca171d82d8535f8162c2072e1e944c5"
41
+ "gitHead": "7f62130189d43f7ecaaed0a41c929e5c166860d2"
42
42
  }