@uniformdev/assets 19.66.1 → 19.68.1-alpha.27
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 +7 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.esm.js +18 -1
- package/dist/index.js +20 -2
- package/dist/index.mjs +18 -1
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -907,4 +907,10 @@ declare class UncachedAssetClient extends AssetClient {
|
|
|
907
907
|
}, 'bypassCache'>);
|
|
908
908
|
}
|
|
909
909
|
|
|
910
|
-
|
|
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
|
@@ -907,4 +907,10 @@ declare class UncachedAssetClient extends AssetClient {
|
|
|
907
907
|
}, 'bypassCache'>);
|
|
908
908
|
}
|
|
909
909
|
|
|
910
|
-
|
|
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.
|
|
3
|
+
"version": "19.68.1-alpha.27+9da5c6b31",
|
|
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.
|
|
39
|
+
"@uniformdev/context": "19.68.1-alpha.27+9da5c6b31"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "9da5c6b318807a05aa003ceb52317b27f4e1d8cf"
|
|
42
42
|
}
|