@uniformdev/assets 20.72.3-alpha.2 → 20.72.3-alpha.23

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
  };
@@ -1001,6 +1003,58 @@ interface paths {
1001
1003
  path?: never;
1002
1004
  cookie?: never;
1003
1005
  };
1006
+ /**
1007
+ * @description In addition to the named parameters below, this endpoint accepts the
1008
+ * following query parameter convention which is pattern-validated and
1009
+ * therefore not declared as named parameters:
1010
+ *
1011
+ * * `filters.<field>[<op>]` — content filtering (documented below).
1012
+ *
1013
+ * #### Content filtering (`filters.*`)
1014
+ *
1015
+ * Filtering narrows list results to assets matching field values. The
1016
+ * allowed field names are project-specific — they come from the project's
1017
+ * asset definitions — which is why `filters.*` parameters are
1018
+ * pattern-validated rather than declared as named parameters.
1019
+ *
1020
+ * Syntax: `filters.<field>[<operator>]=<value>`. `<field>` is one of:
1021
+ *
1022
+ * * A system field such as `name`, `type`, `created`, `modified`,
1023
+ * `entityId`, `creator`, `creatorSubject`, `author`, `authorSubject`,
1024
+ * `categoryId`, `labels`, `labelGroups`, or `uiStatus`.
1025
+ * * An asset field, addressed as `fields.<fieldId>`. Unlike entries and
1026
+ * compositions, asset field filters do not require a single-type
1027
+ * filter — but if the same field ID has differing types across asset
1028
+ * types, HTTP 400 is returned and a single asset type must be
1029
+ * filtered.
1030
+ *
1031
+ * | Operator | Effect |
1032
+ * |---|---|
1033
+ * | `[eq]` / `[neq]` | Exact equality / inequality. |
1034
+ * | `[match]` | Contains (text search) match; text-like fields only. |
1035
+ * | `[starts]` | Prefix match. Value limited to letters, numbers, `_`, `.`, `-`, and spaces. |
1036
+ * | `[lt]` / `[lte]` / `[gt]` / `[gte]` | Comparisons for number, date, and datetime fields (including `created` / `modified`). |
1037
+ * | `[in]` / `[nin]` | Comma-separated list; matches any (OR) / none of the values. |
1038
+ * | `[all]` | Comma-separated list; list-valued fields (e.g. `labels`, multi-selects) must contain every value (AND). |
1039
+ * | `[def]` | `true` or `false`; whether the field has a value at all. |
1040
+ *
1041
+ * Behavior:
1042
+ *
1043
+ * * Values are single strings, or comma-separated lists for `[in]`,
1044
+ * `[nin]`, and `[all]`. Dates accept `YYYY-MM-DD` or a full datetime
1045
+ * string. An empty value is rejected — use `[def]` to test presence.
1046
+ * * Not every operator is valid for every field; the allowed set depends
1047
+ * on the field's type. An unsupported combination returns HTTP 400
1048
+ * with the supported operators listed.
1049
+ * * Malformed keys, unknown operators, and unknown field names return
1050
+ * HTTP 400.
1051
+ *
1052
+ * Examples:
1053
+ *
1054
+ * * `filters.type[eq]=productImage` — only assets of type `productImage`.
1055
+ * * `filters.modified[gte]=2026-01-01` — modified this year.
1056
+ * * `filters.fields.altText[def]=false` — assets missing alt text.
1057
+ */
1004
1058
  get: {
1005
1059
  parameters: {
1006
1060
  query: {
@@ -1757,9 +1811,20 @@ declare class AssetClient extends ApiClient {
1757
1811
  get(options: WithoutProjectId<AssetGetRequestList> & {
1758
1812
  filters?: Record<string, unknown>;
1759
1813
  }): Promise<AssetGetResponseList>;
1814
+ /**
1815
+ * Fetches a list of assets
1816
+ */
1817
+ list(options?: WithoutProjectId<AssetGetRequestList> & {
1818
+ filters?: Record<string, unknown>;
1819
+ }): Promise<AssetGetResponseList>;
1820
+ save(options: WithoutProjectId<AssetUpsertRequest>): Promise<void>;
1821
+ /** @deprecated Use {@link save} instead. */
1760
1822
  upsert(options: WithoutProjectId<AssetUpsertRequest>): Promise<void>;
1823
+ remove(options: WithoutProjectId<AssetDeleteRequest>): Promise<void>;
1824
+ /** @deprecated Use {@link remove} instead. */
1761
1825
  delete(options: WithoutProjectId<AssetDeleteRequest>): Promise<void>;
1762
1826
  }
1827
+ /** @deprecated Pass `bypassCache: true` to {@link AssetClient} instead. */
1763
1828
  declare class UncachedAssetClient extends AssetClient {
1764
1829
  constructor(options: Omit<ClientOptions & {
1765
1830
  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
  };
@@ -1001,6 +1003,58 @@ interface paths {
1001
1003
  path?: never;
1002
1004
  cookie?: never;
1003
1005
  };
1006
+ /**
1007
+ * @description In addition to the named parameters below, this endpoint accepts the
1008
+ * following query parameter convention which is pattern-validated and
1009
+ * therefore not declared as named parameters:
1010
+ *
1011
+ * * `filters.<field>[<op>]` — content filtering (documented below).
1012
+ *
1013
+ * #### Content filtering (`filters.*`)
1014
+ *
1015
+ * Filtering narrows list results to assets matching field values. The
1016
+ * allowed field names are project-specific — they come from the project's
1017
+ * asset definitions — which is why `filters.*` parameters are
1018
+ * pattern-validated rather than declared as named parameters.
1019
+ *
1020
+ * Syntax: `filters.<field>[<operator>]=<value>`. `<field>` is one of:
1021
+ *
1022
+ * * A system field such as `name`, `type`, `created`, `modified`,
1023
+ * `entityId`, `creator`, `creatorSubject`, `author`, `authorSubject`,
1024
+ * `categoryId`, `labels`, `labelGroups`, or `uiStatus`.
1025
+ * * An asset field, addressed as `fields.<fieldId>`. Unlike entries and
1026
+ * compositions, asset field filters do not require a single-type
1027
+ * filter — but if the same field ID has differing types across asset
1028
+ * types, HTTP 400 is returned and a single asset type must be
1029
+ * filtered.
1030
+ *
1031
+ * | Operator | Effect |
1032
+ * |---|---|
1033
+ * | `[eq]` / `[neq]` | Exact equality / inequality. |
1034
+ * | `[match]` | Contains (text search) match; text-like fields only. |
1035
+ * | `[starts]` | Prefix match. Value limited to letters, numbers, `_`, `.`, `-`, and spaces. |
1036
+ * | `[lt]` / `[lte]` / `[gt]` / `[gte]` | Comparisons for number, date, and datetime fields (including `created` / `modified`). |
1037
+ * | `[in]` / `[nin]` | Comma-separated list; matches any (OR) / none of the values. |
1038
+ * | `[all]` | Comma-separated list; list-valued fields (e.g. `labels`, multi-selects) must contain every value (AND). |
1039
+ * | `[def]` | `true` or `false`; whether the field has a value at all. |
1040
+ *
1041
+ * Behavior:
1042
+ *
1043
+ * * Values are single strings, or comma-separated lists for `[in]`,
1044
+ * `[nin]`, and `[all]`. Dates accept `YYYY-MM-DD` or a full datetime
1045
+ * string. An empty value is rejected — use `[def]` to test presence.
1046
+ * * Not every operator is valid for every field; the allowed set depends
1047
+ * on the field's type. An unsupported combination returns HTTP 400
1048
+ * with the supported operators listed.
1049
+ * * Malformed keys, unknown operators, and unknown field names return
1050
+ * HTTP 400.
1051
+ *
1052
+ * Examples:
1053
+ *
1054
+ * * `filters.type[eq]=productImage` — only assets of type `productImage`.
1055
+ * * `filters.modified[gte]=2026-01-01` — modified this year.
1056
+ * * `filters.fields.altText[def]=false` — assets missing alt text.
1057
+ */
1004
1058
  get: {
1005
1059
  parameters: {
1006
1060
  query: {
@@ -1757,9 +1811,20 @@ declare class AssetClient extends ApiClient {
1757
1811
  get(options: WithoutProjectId<AssetGetRequestList> & {
1758
1812
  filters?: Record<string, unknown>;
1759
1813
  }): Promise<AssetGetResponseList>;
1814
+ /**
1815
+ * Fetches a list of assets
1816
+ */
1817
+ list(options?: WithoutProjectId<AssetGetRequestList> & {
1818
+ filters?: Record<string, unknown>;
1819
+ }): Promise<AssetGetResponseList>;
1820
+ save(options: WithoutProjectId<AssetUpsertRequest>): Promise<void>;
1821
+ /** @deprecated Use {@link save} instead. */
1760
1822
  upsert(options: WithoutProjectId<AssetUpsertRequest>): Promise<void>;
1823
+ remove(options: WithoutProjectId<AssetDeleteRequest>): Promise<void>;
1824
+ /** @deprecated Use {@link remove} instead. */
1761
1825
  delete(options: WithoutProjectId<AssetDeleteRequest>): Promise<void>;
1762
1826
  }
1827
+ /** @deprecated Pass `bypassCache: true` to {@link AssetClient} instead. */
1763
1828
  declare class UncachedAssetClient extends AssetClient {
1764
1829
  constructor(options: Omit<ClientOptions & {
1765
1830
  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.72.3-alpha.2+36e92d30ab",
3
+ "version": "20.72.3-alpha.23+cbe06f1e8a",
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.72.3-alpha.2+36e92d30ab",
41
- "@uniformdev/files": "20.72.3-alpha.2+36e92d30ab"
40
+ "@uniformdev/context": "20.72.3-alpha.23+cbe06f1e8a",
41
+ "@uniformdev/files": "20.72.3-alpha.23+cbe06f1e8a"
42
42
  },
43
43
  "devDependencies": {
44
44
  "ts-xor": "^1.3.0"
45
45
  },
46
- "gitHead": "36e92d30ab1b97fc68cf16fc22c6f7865ac8ba97"
46
+ "gitHead": "cbe06f1e8a5bb93b0e3cae6b1c8774f21c10506e"
47
47
  }