@uniformdev/assets 20.72.3-alpha.2 → 20.72.3-alpha.3
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 +57 -11
- package/dist/index.d.ts +57 -11
- package/package.json +5 -6
package/dist/index.d.mts
CHANGED
|
@@ -1001,6 +1001,58 @@ interface paths {
|
|
|
1001
1001
|
path?: never;
|
|
1002
1002
|
cookie?: never;
|
|
1003
1003
|
};
|
|
1004
|
+
/**
|
|
1005
|
+
* @description In addition to the named parameters below, this endpoint accepts the
|
|
1006
|
+
* following query parameter convention which is pattern-validated and
|
|
1007
|
+
* therefore not declared as named parameters:
|
|
1008
|
+
*
|
|
1009
|
+
* * `filters.<field>[<op>]` — content filtering (documented below).
|
|
1010
|
+
*
|
|
1011
|
+
* #### Content filtering (`filters.*`)
|
|
1012
|
+
*
|
|
1013
|
+
* Filtering narrows list results to assets matching field values. The
|
|
1014
|
+
* allowed field names are project-specific — they come from the project's
|
|
1015
|
+
* asset definitions — which is why `filters.*` parameters are
|
|
1016
|
+
* pattern-validated rather than declared as named parameters.
|
|
1017
|
+
*
|
|
1018
|
+
* Syntax: `filters.<field>[<operator>]=<value>`. `<field>` is one of:
|
|
1019
|
+
*
|
|
1020
|
+
* * A system field such as `name`, `type`, `created`, `modified`,
|
|
1021
|
+
* `entityId`, `creator`, `creatorSubject`, `author`, `authorSubject`,
|
|
1022
|
+
* `categoryId`, `labels`, `labelGroups`, or `uiStatus`.
|
|
1023
|
+
* * An asset field, addressed as `fields.<fieldId>`. Unlike entries and
|
|
1024
|
+
* compositions, asset field filters do not require a single-type
|
|
1025
|
+
* filter — but if the same field ID has differing types across asset
|
|
1026
|
+
* types, HTTP 400 is returned and a single asset type must be
|
|
1027
|
+
* filtered.
|
|
1028
|
+
*
|
|
1029
|
+
* | Operator | Effect |
|
|
1030
|
+
* |---|---|
|
|
1031
|
+
* | `[eq]` / `[neq]` | Exact equality / inequality. |
|
|
1032
|
+
* | `[match]` | Contains (text search) match; text-like fields only. |
|
|
1033
|
+
* | `[starts]` | Prefix match. Value limited to letters, numbers, `_`, `.`, `-`, and spaces. |
|
|
1034
|
+
* | `[lt]` / `[lte]` / `[gt]` / `[gte]` | Comparisons for number, date, and datetime fields (including `created` / `modified`). |
|
|
1035
|
+
* | `[in]` / `[nin]` | Comma-separated list; matches any (OR) / none of the values. |
|
|
1036
|
+
* | `[all]` | Comma-separated list; list-valued fields (e.g. `labels`, multi-selects) must contain every value (AND). |
|
|
1037
|
+
* | `[def]` | `true` or `false`; whether the field has a value at all. |
|
|
1038
|
+
*
|
|
1039
|
+
* Behavior:
|
|
1040
|
+
*
|
|
1041
|
+
* * Values are single strings, or comma-separated lists for `[in]`,
|
|
1042
|
+
* `[nin]`, and `[all]`. Dates accept `YYYY-MM-DD` or a full datetime
|
|
1043
|
+
* string. An empty value is rejected — use `[def]` to test presence.
|
|
1044
|
+
* * Not every operator is valid for every field; the allowed set depends
|
|
1045
|
+
* on the field's type. An unsupported combination returns HTTP 400
|
|
1046
|
+
* with the supported operators listed.
|
|
1047
|
+
* * Malformed keys, unknown operators, and unknown field names return
|
|
1048
|
+
* HTTP 400.
|
|
1049
|
+
*
|
|
1050
|
+
* Examples:
|
|
1051
|
+
*
|
|
1052
|
+
* * `filters.type[eq]=productImage` — only assets of type `productImage`.
|
|
1053
|
+
* * `filters.modified[gte]=2026-01-01` — modified this year.
|
|
1054
|
+
* * `filters.fields.altText[def]=false` — assets missing alt text.
|
|
1055
|
+
*/
|
|
1004
1056
|
get: {
|
|
1005
1057
|
parameters: {
|
|
1006
1058
|
query: {
|
|
@@ -1818,20 +1870,14 @@ type ImageFromTransformProps = XOR<{
|
|
|
1818
1870
|
y: number;
|
|
1819
1871
|
};
|
|
1820
1872
|
}>;
|
|
1821
|
-
/**
|
|
1822
|
-
* Fluent API for reading and transforming an asset image URL.
|
|
1823
|
-
*/
|
|
1824
|
-
interface ImageFromApi {
|
|
1825
|
-
/** Returns the image URL with the current transformations applied. */
|
|
1826
|
-
url: () => string;
|
|
1827
|
-
/** Applies image transformations and returns the same fluent API. */
|
|
1828
|
-
transform: (transformProps: ImageFromTransformProps) => ImageFromApi;
|
|
1829
|
-
}
|
|
1830
1873
|
/**
|
|
1831
1874
|
* A helper function for extracting the image URL from an asset and optionally
|
|
1832
1875
|
* applying transformation URL query parameters.
|
|
1833
1876
|
*/
|
|
1834
|
-
declare const imageFrom: (asset: Asset | AssetParamValueItem | string) =>
|
|
1877
|
+
declare const imageFrom: (asset: Asset | AssetParamValueItem | string) => {
|
|
1878
|
+
url: () => string;
|
|
1879
|
+
transform: (transformProps: ImageFromTransformProps) => /*elided*/ any;
|
|
1880
|
+
};
|
|
1835
1881
|
|
|
1836
1882
|
/**
|
|
1837
1883
|
* Converts a content asset to a put content asset body that has only the properties expected to the PUT API.
|
|
@@ -1842,4 +1888,4 @@ declare function convertAssetToPutAsset(asset: {
|
|
|
1842
1888
|
projectId: string;
|
|
1843
1889
|
}): AssetUpsertRequest;
|
|
1844
1890
|
|
|
1845
|
-
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, type ImageDeliveryParams, type
|
|
1891
|
+
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, type ImageDeliveryParams, type ImageFromTransformProps, UncachedAssetClient, assetDefinitions, convertAssetToPutAsset, getAssetDefinitionType, imageFrom };
|
package/dist/index.d.ts
CHANGED
|
@@ -1001,6 +1001,58 @@ interface paths {
|
|
|
1001
1001
|
path?: never;
|
|
1002
1002
|
cookie?: never;
|
|
1003
1003
|
};
|
|
1004
|
+
/**
|
|
1005
|
+
* @description In addition to the named parameters below, this endpoint accepts the
|
|
1006
|
+
* following query parameter convention which is pattern-validated and
|
|
1007
|
+
* therefore not declared as named parameters:
|
|
1008
|
+
*
|
|
1009
|
+
* * `filters.<field>[<op>]` — content filtering (documented below).
|
|
1010
|
+
*
|
|
1011
|
+
* #### Content filtering (`filters.*`)
|
|
1012
|
+
*
|
|
1013
|
+
* Filtering narrows list results to assets matching field values. The
|
|
1014
|
+
* allowed field names are project-specific — they come from the project's
|
|
1015
|
+
* asset definitions — which is why `filters.*` parameters are
|
|
1016
|
+
* pattern-validated rather than declared as named parameters.
|
|
1017
|
+
*
|
|
1018
|
+
* Syntax: `filters.<field>[<operator>]=<value>`. `<field>` is one of:
|
|
1019
|
+
*
|
|
1020
|
+
* * A system field such as `name`, `type`, `created`, `modified`,
|
|
1021
|
+
* `entityId`, `creator`, `creatorSubject`, `author`, `authorSubject`,
|
|
1022
|
+
* `categoryId`, `labels`, `labelGroups`, or `uiStatus`.
|
|
1023
|
+
* * An asset field, addressed as `fields.<fieldId>`. Unlike entries and
|
|
1024
|
+
* compositions, asset field filters do not require a single-type
|
|
1025
|
+
* filter — but if the same field ID has differing types across asset
|
|
1026
|
+
* types, HTTP 400 is returned and a single asset type must be
|
|
1027
|
+
* filtered.
|
|
1028
|
+
*
|
|
1029
|
+
* | Operator | Effect |
|
|
1030
|
+
* |---|---|
|
|
1031
|
+
* | `[eq]` / `[neq]` | Exact equality / inequality. |
|
|
1032
|
+
* | `[match]` | Contains (text search) match; text-like fields only. |
|
|
1033
|
+
* | `[starts]` | Prefix match. Value limited to letters, numbers, `_`, `.`, `-`, and spaces. |
|
|
1034
|
+
* | `[lt]` / `[lte]` / `[gt]` / `[gte]` | Comparisons for number, date, and datetime fields (including `created` / `modified`). |
|
|
1035
|
+
* | `[in]` / `[nin]` | Comma-separated list; matches any (OR) / none of the values. |
|
|
1036
|
+
* | `[all]` | Comma-separated list; list-valued fields (e.g. `labels`, multi-selects) must contain every value (AND). |
|
|
1037
|
+
* | `[def]` | `true` or `false`; whether the field has a value at all. |
|
|
1038
|
+
*
|
|
1039
|
+
* Behavior:
|
|
1040
|
+
*
|
|
1041
|
+
* * Values are single strings, or comma-separated lists for `[in]`,
|
|
1042
|
+
* `[nin]`, and `[all]`. Dates accept `YYYY-MM-DD` or a full datetime
|
|
1043
|
+
* string. An empty value is rejected — use `[def]` to test presence.
|
|
1044
|
+
* * Not every operator is valid for every field; the allowed set depends
|
|
1045
|
+
* on the field's type. An unsupported combination returns HTTP 400
|
|
1046
|
+
* with the supported operators listed.
|
|
1047
|
+
* * Malformed keys, unknown operators, and unknown field names return
|
|
1048
|
+
* HTTP 400.
|
|
1049
|
+
*
|
|
1050
|
+
* Examples:
|
|
1051
|
+
*
|
|
1052
|
+
* * `filters.type[eq]=productImage` — only assets of type `productImage`.
|
|
1053
|
+
* * `filters.modified[gte]=2026-01-01` — modified this year.
|
|
1054
|
+
* * `filters.fields.altText[def]=false` — assets missing alt text.
|
|
1055
|
+
*/
|
|
1004
1056
|
get: {
|
|
1005
1057
|
parameters: {
|
|
1006
1058
|
query: {
|
|
@@ -1818,20 +1870,14 @@ type ImageFromTransformProps = XOR<{
|
|
|
1818
1870
|
y: number;
|
|
1819
1871
|
};
|
|
1820
1872
|
}>;
|
|
1821
|
-
/**
|
|
1822
|
-
* Fluent API for reading and transforming an asset image URL.
|
|
1823
|
-
*/
|
|
1824
|
-
interface ImageFromApi {
|
|
1825
|
-
/** Returns the image URL with the current transformations applied. */
|
|
1826
|
-
url: () => string;
|
|
1827
|
-
/** Applies image transformations and returns the same fluent API. */
|
|
1828
|
-
transform: (transformProps: ImageFromTransformProps) => ImageFromApi;
|
|
1829
|
-
}
|
|
1830
1873
|
/**
|
|
1831
1874
|
* A helper function for extracting the image URL from an asset and optionally
|
|
1832
1875
|
* applying transformation URL query parameters.
|
|
1833
1876
|
*/
|
|
1834
|
-
declare const imageFrom: (asset: Asset | AssetParamValueItem | string) =>
|
|
1877
|
+
declare const imageFrom: (asset: Asset | AssetParamValueItem | string) => {
|
|
1878
|
+
url: () => string;
|
|
1879
|
+
transform: (transformProps: ImageFromTransformProps) => /*elided*/ any;
|
|
1880
|
+
};
|
|
1835
1881
|
|
|
1836
1882
|
/**
|
|
1837
1883
|
* Converts a content asset to a put content asset body that has only the properties expected to the PUT API.
|
|
@@ -1842,4 +1888,4 @@ declare function convertAssetToPutAsset(asset: {
|
|
|
1842
1888
|
projectId: string;
|
|
1843
1889
|
}): AssetUpsertRequest;
|
|
1844
1890
|
|
|
1845
|
-
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, type ImageDeliveryParams, type
|
|
1891
|
+
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, type ImageDeliveryParams, type ImageFromTransformProps, UncachedAssetClient, assetDefinitions, convertAssetToPutAsset, getAssetDefinitionType, imageFrom };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/assets",
|
|
3
|
-
"version": "20.72.3-alpha.
|
|
3
|
+
"version": "20.72.3-alpha.3+3e396259ba",
|
|
4
4
|
"description": "Uniform Assets",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -21,12 +21,11 @@
|
|
|
21
21
|
"sideEffects": false,
|
|
22
22
|
"scripts": {
|
|
23
23
|
"build": "run-s update-openapi build:ts",
|
|
24
|
-
"build:ts": "tsup
|
|
24
|
+
"build:ts": "tsup",
|
|
25
25
|
"dev": "run-s update-openapi dev:ts",
|
|
26
26
|
"dev:ts": "tsup --watch",
|
|
27
27
|
"clean": "rimraf dist",
|
|
28
28
|
"test": "vitest run",
|
|
29
|
-
"test:types": "tsc --ignoreConfig --noEmit --strict --skipLibCheck --module esnext --moduleResolution bundler --target es2018 type-tests/imageFrom.ts",
|
|
30
29
|
"format": "prettier --write \"src/**/*.{js,ts,tsx}\"",
|
|
31
30
|
"update-openapi": "tsx ./scripts/update-openapi.cts"
|
|
32
31
|
},
|
|
@@ -37,11 +36,11 @@
|
|
|
37
36
|
"access": "public"
|
|
38
37
|
},
|
|
39
38
|
"dependencies": {
|
|
40
|
-
"@uniformdev/context": "20.72.3-alpha.
|
|
41
|
-
"@uniformdev/files": "20.72.3-alpha.
|
|
39
|
+
"@uniformdev/context": "20.72.3-alpha.3+3e396259ba",
|
|
40
|
+
"@uniformdev/files": "20.72.3-alpha.3+3e396259ba"
|
|
42
41
|
},
|
|
43
42
|
"devDependencies": {
|
|
44
43
|
"ts-xor": "^1.3.0"
|
|
45
44
|
},
|
|
46
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "3e396259bafc25b69071cda4102cea340b866922"
|
|
47
46
|
}
|