@uniformdev/assets 19.207.1-alpha.11 → 19.207.1-alpha.28

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
@@ -1155,7 +1155,7 @@ interface components {
1155
1155
  /** @description Defines the shape of the asset input */
1156
1156
  AssetInput: {
1157
1157
  /** @description Content type of the asset */
1158
- type: string;
1158
+ type?: string;
1159
1159
  /**
1160
1160
  * Format: uuid
1161
1161
  * @description The public UUID of the asset
@@ -1405,7 +1405,7 @@ interface components {
1405
1405
  /** @description Specify multiple asset IDs to fetch. Response type will be a list */
1406
1406
  assetIDs: string[];
1407
1407
  /** @description The asset type ID to filter by */
1408
- type: ("image" | "video" | "audio" | "document")[];
1408
+ type: ("image" | "video" | "audio" | "other")[];
1409
1409
  /** @description Number of records to skip */
1410
1410
  offset: number;
1411
1411
  /** @description Max number of records to return */
@@ -1546,10 +1546,18 @@ declare class UncachedAssetClient extends AssetClient {
1546
1546
  }, 'bypassCache'>);
1547
1547
  }
1548
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
+
1549
1557
  /**
1550
1558
  * Converts a content asset to a put content asset body that has only the properties expected to the PUT API.
1551
1559
  * Removes things like author, stats, etc.
1552
1560
  */
1553
1561
  declare function convertAssetToPutAsset(asset: AssetGetResponseSingle): AssetUpsertRequest;
1554
1562
 
1555
- 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
@@ -1155,7 +1155,7 @@ interface components {
1155
1155
  /** @description Defines the shape of the asset input */
1156
1156
  AssetInput: {
1157
1157
  /** @description Content type of the asset */
1158
- type: string;
1158
+ type?: string;
1159
1159
  /**
1160
1160
  * Format: uuid
1161
1161
  * @description The public UUID of the asset
@@ -1405,7 +1405,7 @@ interface components {
1405
1405
  /** @description Specify multiple asset IDs to fetch. Response type will be a list */
1406
1406
  assetIDs: string[];
1407
1407
  /** @description The asset type ID to filter by */
1408
- type: ("image" | "video" | "audio" | "document")[];
1408
+ type: ("image" | "video" | "audio" | "other")[];
1409
1409
  /** @description Number of records to skip */
1410
1410
  offset: number;
1411
1411
  /** @description Max number of records to return */
@@ -1546,10 +1546,18 @@ declare class UncachedAssetClient extends AssetClient {
1546
1546
  }, 'bypassCache'>);
1547
1547
  }
1548
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
+
1549
1557
  /**
1550
1558
  * Converts a content asset to a put content asset body that has only the properties expected to the PUT API.
1551
1559
  * Removes things like author, stats, etc.
1552
1560
  */
1553
1561
  declare function convertAssetToPutAsset(asset: AssetGetResponseSingle): AssetUpsertRequest;
1554
1562
 
1555
- 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.207.1-alpha.11+682b1954b3",
3
+ "version": "19.207.1-alpha.28+369def3ba0",
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.207.1-alpha.11+682b1954b3"
39
+ "@uniformdev/context": "19.207.1-alpha.28+369def3ba0"
40
40
  },
41
- "gitHead": "682b1954b3ddfeb43952e44367c314cfe6feda69"
41
+ "gitHead": "369def3ba012b3fc314254d940448b9937e12900"
42
42
  }