@uniformdev/assets 20.73.1-alpha.13 → 20.74.2-alpha.26

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
@@ -764,9 +764,11 @@ interface components$1 {
764
764
  versionId: string;
765
765
  /** @description The timestamp when the version was created in epoch milliseconds */
766
766
  timestamp: number;
767
- /** @description The name (full name) of the user who created the version */
767
+ /** @description The name (full name) of the user who created the version, or "Unknown user" if the author can no longer be resolved */
768
768
  authorName: string;
769
769
  authorIsApiKey: boolean;
770
+ /** @description The identity who created the version; absent on old history entries. */
771
+ authorSubject?: string;
770
772
  /** @description The state of the entity when the history entry was made */
771
773
  state: number;
772
774
  };
@@ -1120,6 +1122,14 @@ interface paths {
1120
1122
  * This internal status is subject to change without notice and is thus marked deprecated to discourage use of internal data
1121
1123
  */
1122
1124
  withUIStatus?: components["parameters"]["withUIStatus"];
1125
+ /**
1126
+ * @description Controls filtering of trashed items.
1127
+ *
1128
+ * exclude: (default) Only return items not in trash.
1129
+ * only: Only return trashed items (for trash view).
1130
+ * include: Return both trashed and non-trashed items.
1131
+ */
1132
+ deleted?: components["parameters"]["deleted"];
1123
1133
  };
1124
1134
  header?: never;
1125
1135
  path?: never;
@@ -1155,7 +1165,10 @@ interface paths {
1155
1165
  500: components["responses"]["InternalServerError"];
1156
1166
  };
1157
1167
  };
1158
- /** @description Upserts an asset */
1168
+ /**
1169
+ * @description Creates or updates assets. Submitting the ID of a trashed asset restores it.
1170
+ * A file-backed asset must include its original file reference when restored.
1171
+ */
1159
1172
  put: {
1160
1173
  parameters: {
1161
1174
  query?: never;
@@ -1197,7 +1210,10 @@ interface paths {
1197
1210
  };
1198
1211
  };
1199
1212
  post?: never;
1200
- /** @description Deletes or unpublishes an asset */
1213
+ /**
1214
+ * @description Moves an asset to trash. Trashed assets are omitted from default GET results and
1215
+ * permanently deleted after the configured retention period.
1216
+ */
1201
1217
  delete: {
1202
1218
  parameters: {
1203
1219
  query?: never;
@@ -1210,12 +1226,12 @@ interface paths {
1210
1226
  "application/json": {
1211
1227
  /**
1212
1228
  * Format: uuid
1213
- * @description The ID of the asset to delete
1229
+ * @description The ID of the asset to move to trash
1214
1230
  */
1215
1231
  assetId: string;
1216
1232
  /**
1217
1233
  * Format: uuid
1218
- * @description The ID of the project the asset to delete belongs to
1234
+ * @description The ID of the project the asset belongs to
1219
1235
  */
1220
1236
  projectId: string;
1221
1237
  /**
@@ -1298,8 +1314,12 @@ interface components {
1298
1314
  /** @constant */
1299
1315
  type: "text";
1300
1316
  };
1317
+ /** @description An asset can reference at most one file. A file can be attached to only one asset. */
1301
1318
  file?: {
1302
- /** Format: uuid */
1319
+ /**
1320
+ * Format: uuid
1321
+ * @description File ID to attach. A trashed file cannot be attached to an active asset.
1322
+ */
1303
1323
  value: string;
1304
1324
  /** @constant */
1305
1325
  type: "file";
@@ -1368,8 +1388,12 @@ interface components {
1368
1388
  /** @constant */
1369
1389
  type: "text";
1370
1390
  };
1391
+ /** @description An asset can reference at most one file. A file can be attached to only one asset. */
1371
1392
  file?: {
1372
- /** Format: uuid */
1393
+ /**
1394
+ * Format: uuid
1395
+ * @description File ID to attach. A trashed file cannot be attached to an active asset.
1396
+ */
1373
1397
  value: string;
1374
1398
  /** @constant */
1375
1399
  type: "file";
@@ -1403,6 +1427,11 @@ interface components {
1403
1427
  * @description Modified date string for this definition
1404
1428
  */
1405
1429
  modified: string;
1430
+ /**
1431
+ * Format: date-time
1432
+ * @description Timestamp when the item was moved to trash. Omitted if not in trash.
1433
+ */
1434
+ deletedAt?: string;
1406
1435
  /**
1407
1436
  * Format: uuid
1408
1437
  * @description The release this asset belongs to. If not set, the asset belongs to the base
@@ -1705,6 +1734,14 @@ interface components {
1705
1734
  * This internal status is subject to change without notice and is thus marked deprecated to discourage use of internal data
1706
1735
  */
1707
1736
  withUIStatus: boolean;
1737
+ /**
1738
+ * @description Controls filtering of trashed items.
1739
+ *
1740
+ * exclude: (default) Only return items not in trash.
1741
+ * only: Only return trashed items (for trash view).
1742
+ * include: Return both trashed and non-trashed items.
1743
+ */
1744
+ deleted: "exclude" | "only" | "include";
1708
1745
  };
1709
1746
  requestBodies: never;
1710
1747
  headers: never;
@@ -1809,9 +1846,20 @@ declare class AssetClient extends ApiClient {
1809
1846
  get(options: WithoutProjectId<AssetGetRequestList> & {
1810
1847
  filters?: Record<string, unknown>;
1811
1848
  }): Promise<AssetGetResponseList>;
1849
+ /**
1850
+ * Fetches a list of assets
1851
+ */
1852
+ list(options?: WithoutProjectId<AssetGetRequestList> & {
1853
+ filters?: Record<string, unknown>;
1854
+ }): Promise<AssetGetResponseList>;
1855
+ save(options: WithoutProjectId<AssetUpsertRequest>): Promise<void>;
1856
+ /** @deprecated Use {@link save} instead. */
1812
1857
  upsert(options: WithoutProjectId<AssetUpsertRequest>): Promise<void>;
1858
+ remove(options: WithoutProjectId<AssetDeleteRequest>): Promise<void>;
1859
+ /** @deprecated Use {@link remove} instead. */
1813
1860
  delete(options: WithoutProjectId<AssetDeleteRequest>): Promise<void>;
1814
1861
  }
1862
+ /** @deprecated Pass `bypassCache: true` to {@link AssetClient} instead. */
1815
1863
  declare class UncachedAssetClient extends AssetClient {
1816
1864
  constructor(options: Omit<ClientOptions & {
1817
1865
  projectId: NonNullable<ClientOptions['projectId']>;
package/dist/index.d.ts CHANGED
@@ -764,9 +764,11 @@ interface components$1 {
764
764
  versionId: string;
765
765
  /** @description The timestamp when the version was created in epoch milliseconds */
766
766
  timestamp: number;
767
- /** @description The name (full name) of the user who created the version */
767
+ /** @description The name (full name) of the user who created the version, or "Unknown user" if the author can no longer be resolved */
768
768
  authorName: string;
769
769
  authorIsApiKey: boolean;
770
+ /** @description The identity who created the version; absent on old history entries. */
771
+ authorSubject?: string;
770
772
  /** @description The state of the entity when the history entry was made */
771
773
  state: number;
772
774
  };
@@ -1120,6 +1122,14 @@ interface paths {
1120
1122
  * This internal status is subject to change without notice and is thus marked deprecated to discourage use of internal data
1121
1123
  */
1122
1124
  withUIStatus?: components["parameters"]["withUIStatus"];
1125
+ /**
1126
+ * @description Controls filtering of trashed items.
1127
+ *
1128
+ * exclude: (default) Only return items not in trash.
1129
+ * only: Only return trashed items (for trash view).
1130
+ * include: Return both trashed and non-trashed items.
1131
+ */
1132
+ deleted?: components["parameters"]["deleted"];
1123
1133
  };
1124
1134
  header?: never;
1125
1135
  path?: never;
@@ -1155,7 +1165,10 @@ interface paths {
1155
1165
  500: components["responses"]["InternalServerError"];
1156
1166
  };
1157
1167
  };
1158
- /** @description Upserts an asset */
1168
+ /**
1169
+ * @description Creates or updates assets. Submitting the ID of a trashed asset restores it.
1170
+ * A file-backed asset must include its original file reference when restored.
1171
+ */
1159
1172
  put: {
1160
1173
  parameters: {
1161
1174
  query?: never;
@@ -1197,7 +1210,10 @@ interface paths {
1197
1210
  };
1198
1211
  };
1199
1212
  post?: never;
1200
- /** @description Deletes or unpublishes an asset */
1213
+ /**
1214
+ * @description Moves an asset to trash. Trashed assets are omitted from default GET results and
1215
+ * permanently deleted after the configured retention period.
1216
+ */
1201
1217
  delete: {
1202
1218
  parameters: {
1203
1219
  query?: never;
@@ -1210,12 +1226,12 @@ interface paths {
1210
1226
  "application/json": {
1211
1227
  /**
1212
1228
  * Format: uuid
1213
- * @description The ID of the asset to delete
1229
+ * @description The ID of the asset to move to trash
1214
1230
  */
1215
1231
  assetId: string;
1216
1232
  /**
1217
1233
  * Format: uuid
1218
- * @description The ID of the project the asset to delete belongs to
1234
+ * @description The ID of the project the asset belongs to
1219
1235
  */
1220
1236
  projectId: string;
1221
1237
  /**
@@ -1298,8 +1314,12 @@ interface components {
1298
1314
  /** @constant */
1299
1315
  type: "text";
1300
1316
  };
1317
+ /** @description An asset can reference at most one file. A file can be attached to only one asset. */
1301
1318
  file?: {
1302
- /** Format: uuid */
1319
+ /**
1320
+ * Format: uuid
1321
+ * @description File ID to attach. A trashed file cannot be attached to an active asset.
1322
+ */
1303
1323
  value: string;
1304
1324
  /** @constant */
1305
1325
  type: "file";
@@ -1368,8 +1388,12 @@ interface components {
1368
1388
  /** @constant */
1369
1389
  type: "text";
1370
1390
  };
1391
+ /** @description An asset can reference at most one file. A file can be attached to only one asset. */
1371
1392
  file?: {
1372
- /** Format: uuid */
1393
+ /**
1394
+ * Format: uuid
1395
+ * @description File ID to attach. A trashed file cannot be attached to an active asset.
1396
+ */
1373
1397
  value: string;
1374
1398
  /** @constant */
1375
1399
  type: "file";
@@ -1403,6 +1427,11 @@ interface components {
1403
1427
  * @description Modified date string for this definition
1404
1428
  */
1405
1429
  modified: string;
1430
+ /**
1431
+ * Format: date-time
1432
+ * @description Timestamp when the item was moved to trash. Omitted if not in trash.
1433
+ */
1434
+ deletedAt?: string;
1406
1435
  /**
1407
1436
  * Format: uuid
1408
1437
  * @description The release this asset belongs to. If not set, the asset belongs to the base
@@ -1705,6 +1734,14 @@ interface components {
1705
1734
  * This internal status is subject to change without notice and is thus marked deprecated to discourage use of internal data
1706
1735
  */
1707
1736
  withUIStatus: boolean;
1737
+ /**
1738
+ * @description Controls filtering of trashed items.
1739
+ *
1740
+ * exclude: (default) Only return items not in trash.
1741
+ * only: Only return trashed items (for trash view).
1742
+ * include: Return both trashed and non-trashed items.
1743
+ */
1744
+ deleted: "exclude" | "only" | "include";
1708
1745
  };
1709
1746
  requestBodies: never;
1710
1747
  headers: never;
@@ -1809,9 +1846,20 @@ declare class AssetClient extends ApiClient {
1809
1846
  get(options: WithoutProjectId<AssetGetRequestList> & {
1810
1847
  filters?: Record<string, unknown>;
1811
1848
  }): Promise<AssetGetResponseList>;
1849
+ /**
1850
+ * Fetches a list of assets
1851
+ */
1852
+ list(options?: WithoutProjectId<AssetGetRequestList> & {
1853
+ filters?: Record<string, unknown>;
1854
+ }): Promise<AssetGetResponseList>;
1855
+ save(options: WithoutProjectId<AssetUpsertRequest>): Promise<void>;
1856
+ /** @deprecated Use {@link save} instead. */
1812
1857
  upsert(options: WithoutProjectId<AssetUpsertRequest>): Promise<void>;
1858
+ remove(options: WithoutProjectId<AssetDeleteRequest>): Promise<void>;
1859
+ /** @deprecated Use {@link remove} instead. */
1813
1860
  delete(options: WithoutProjectId<AssetDeleteRequest>): Promise<void>;
1814
1861
  }
1862
+ /** @deprecated Pass `bypassCache: true` to {@link AssetClient} instead. */
1815
1863
  declare class UncachedAssetClient extends AssetClient {
1816
1864
  constructor(options: Omit<ClientOptions & {
1817
1865
  projectId: NonNullable<ClientOptions['projectId']>;
package/dist/index.esm.js CHANGED
@@ -16,7 +16,21 @@ var AssetClient = class extends ApiClient {
16
16
  });
17
17
  return this.apiClient(fetchUri);
18
18
  }
19
- async upsert(options) {
19
+ /**
20
+ * Fetches a list of assets
21
+ */
22
+ async list(options = {}) {
23
+ const { projectId } = this.options;
24
+ const { filters, ...params } = options;
25
+ const rewrittenFilters = rewriteFiltersForApi(filters);
26
+ const fetchUri = this.createUrl(ASSET_BASE_PATH, {
27
+ ...params,
28
+ projectId,
29
+ ...rewrittenFilters
30
+ });
31
+ return this.apiClient(fetchUri);
32
+ }
33
+ async save(options) {
20
34
  const { projectId } = this.options;
21
35
  const fetchUri = this.createUrl(ASSET_BASE_PATH);
22
36
  await this.apiClient(fetchUri, {
@@ -25,7 +39,11 @@ var AssetClient = class extends ApiClient {
25
39
  expectNoContent: true
26
40
  });
27
41
  }
28
- async delete(options) {
42
+ /** @deprecated Use {@link save} instead. */
43
+ async upsert(options) {
44
+ return this.save(options);
45
+ }
46
+ async remove(options) {
29
47
  const { projectId } = this.options;
30
48
  const fetchUri = this.createUrl(ASSET_BASE_PATH);
31
49
  await this.apiClient(fetchUri, {
@@ -34,6 +52,10 @@ var AssetClient = class extends ApiClient {
34
52
  expectNoContent: true
35
53
  });
36
54
  }
55
+ /** @deprecated Use {@link remove} instead. */
56
+ async delete(options) {
57
+ return this.remove(options);
58
+ }
37
59
  };
38
60
  var UncachedAssetClient = class extends AssetClient {
39
61
  constructor(options) {
package/dist/index.js CHANGED
@@ -47,7 +47,21 @@ var AssetClient = class extends import_api.ApiClient {
47
47
  });
48
48
  return this.apiClient(fetchUri);
49
49
  }
50
- async upsert(options) {
50
+ /**
51
+ * Fetches a list of assets
52
+ */
53
+ async list(options = {}) {
54
+ const { projectId } = this.options;
55
+ const { filters, ...params } = options;
56
+ const rewrittenFilters = (0, import_api.rewriteFiltersForApi)(filters);
57
+ const fetchUri = this.createUrl(ASSET_BASE_PATH, {
58
+ ...params,
59
+ projectId,
60
+ ...rewrittenFilters
61
+ });
62
+ return this.apiClient(fetchUri);
63
+ }
64
+ async save(options) {
51
65
  const { projectId } = this.options;
52
66
  const fetchUri = this.createUrl(ASSET_BASE_PATH);
53
67
  await this.apiClient(fetchUri, {
@@ -56,7 +70,11 @@ var AssetClient = class extends import_api.ApiClient {
56
70
  expectNoContent: true
57
71
  });
58
72
  }
59
- async delete(options) {
73
+ /** @deprecated Use {@link save} instead. */
74
+ async upsert(options) {
75
+ return this.save(options);
76
+ }
77
+ async remove(options) {
60
78
  const { projectId } = this.options;
61
79
  const fetchUri = this.createUrl(ASSET_BASE_PATH);
62
80
  await this.apiClient(fetchUri, {
@@ -65,6 +83,10 @@ var AssetClient = class extends import_api.ApiClient {
65
83
  expectNoContent: true
66
84
  });
67
85
  }
86
+ /** @deprecated Use {@link remove} instead. */
87
+ async delete(options) {
88
+ return this.remove(options);
89
+ }
68
90
  };
69
91
  var UncachedAssetClient = class extends AssetClient {
70
92
  constructor(options) {
package/dist/index.mjs CHANGED
@@ -16,7 +16,21 @@ var AssetClient = class extends ApiClient {
16
16
  });
17
17
  return this.apiClient(fetchUri);
18
18
  }
19
- async upsert(options) {
19
+ /**
20
+ * Fetches a list of assets
21
+ */
22
+ async list(options = {}) {
23
+ const { projectId } = this.options;
24
+ const { filters, ...params } = options;
25
+ const rewrittenFilters = rewriteFiltersForApi(filters);
26
+ const fetchUri = this.createUrl(ASSET_BASE_PATH, {
27
+ ...params,
28
+ projectId,
29
+ ...rewrittenFilters
30
+ });
31
+ return this.apiClient(fetchUri);
32
+ }
33
+ async save(options) {
20
34
  const { projectId } = this.options;
21
35
  const fetchUri = this.createUrl(ASSET_BASE_PATH);
22
36
  await this.apiClient(fetchUri, {
@@ -25,7 +39,11 @@ var AssetClient = class extends ApiClient {
25
39
  expectNoContent: true
26
40
  });
27
41
  }
28
- async delete(options) {
42
+ /** @deprecated Use {@link save} instead. */
43
+ async upsert(options) {
44
+ return this.save(options);
45
+ }
46
+ async remove(options) {
29
47
  const { projectId } = this.options;
30
48
  const fetchUri = this.createUrl(ASSET_BASE_PATH);
31
49
  await this.apiClient(fetchUri, {
@@ -34,6 +52,10 @@ var AssetClient = class extends ApiClient {
34
52
  expectNoContent: true
35
53
  });
36
54
  }
55
+ /** @deprecated Use {@link remove} instead. */
56
+ async delete(options) {
57
+ return this.remove(options);
58
+ }
37
59
  };
38
60
  var UncachedAssetClient = class extends AssetClient {
39
61
  constructor(options) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/assets",
3
- "version": "20.73.1-alpha.13+1ef8c4abf6",
3
+ "version": "20.74.2-alpha.26+464c3f6dc2",
4
4
  "description": "Uniform Assets",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -37,11 +37,11 @@
37
37
  "access": "public"
38
38
  },
39
39
  "dependencies": {
40
- "@uniformdev/context": "20.73.1-alpha.13+1ef8c4abf6",
41
- "@uniformdev/files": "20.73.1-alpha.13+1ef8c4abf6"
40
+ "@uniformdev/context": "20.74.2-alpha.26+464c3f6dc2",
41
+ "@uniformdev/files": "20.74.2-alpha.26+464c3f6dc2"
42
42
  },
43
43
  "devDependencies": {
44
44
  "ts-xor": "^1.3.0"
45
45
  },
46
- "gitHead": "1ef8c4abf6483807fd16f7fdb684411f9a303e93"
46
+ "gitHead": "464c3f6dc27746f5e89e2f61542ed2c458c35cc5"
47
47
  }