@datocms/cma-client 5.1.15 → 5.1.17

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.
Files changed (33) hide show
  1. package/README.md +31 -28
  2. package/dist/cjs/generated/Client.js +1 -1
  3. package/dist/cjs/generated/resources/Item.js.map +1 -1
  4. package/dist/cjs/utilities/itemInstancesHrefSchema.js +3 -0
  5. package/dist/cjs/utilities/itemInstancesHrefSchema.js.map +1 -0
  6. package/dist/cjs/utilities/normalizedFieldValues.js +39 -39
  7. package/dist/cjs/utilities/normalizedFieldValues.js.map +1 -1
  8. package/dist/esm/generated/ApiTypes.d.ts +4 -6
  9. package/dist/esm/generated/Client.js +1 -1
  10. package/dist/esm/generated/RawApiTypes.d.ts +4 -6
  11. package/dist/esm/generated/resources/Item.d.ts +7 -7
  12. package/dist/esm/generated/resources/Item.js.map +1 -1
  13. package/dist/esm/utilities/itemDefinition.d.ts +30 -0
  14. package/dist/esm/utilities/itemInstancesHrefSchema.d.ts +256 -0
  15. package/dist/esm/utilities/itemInstancesHrefSchema.js +2 -0
  16. package/dist/esm/utilities/itemInstancesHrefSchema.js.map +1 -0
  17. package/dist/esm/utilities/normalizedFieldValues.d.ts +25 -25
  18. package/dist/esm/utilities/normalizedFieldValues.js +39 -39
  19. package/dist/esm/utilities/normalizedFieldValues.js.map +1 -1
  20. package/dist/types/generated/ApiTypes.d.ts +4 -6
  21. package/dist/types/generated/RawApiTypes.d.ts +4 -6
  22. package/dist/types/generated/resources/Item.d.ts +7 -7
  23. package/dist/types/utilities/itemDefinition.d.ts +30 -0
  24. package/dist/types/utilities/itemInstancesHrefSchema.d.ts +256 -0
  25. package/dist/types/utilities/normalizedFieldValues.d.ts +25 -25
  26. package/package.json +2 -2
  27. package/src/generated/ApiTypes.ts +7 -5
  28. package/src/generated/Client.ts +1 -1
  29. package/src/generated/RawApiTypes.ts +7 -5
  30. package/src/generated/resources/Item.ts +10 -10
  31. package/src/utilities/itemDefinition.ts +92 -0
  32. package/src/utilities/itemInstancesHrefSchema.ts +308 -0
  33. package/src/utilities/normalizedFieldValues.ts +60 -39
@@ -14,10 +14,10 @@ export default class Item extends BaseResource {
14
14
  * @throws {ApiError}
15
15
  * @throws {TimeoutError}
16
16
  */
17
- list<D extends ItemTypeDefinition = ItemTypeDefinition>(queryParams: ApiTypes.ItemInstancesHrefSchema & {
17
+ list<D extends ItemTypeDefinition = ItemTypeDefinition>(queryParams: ApiTypes.ItemInstancesHrefSchema<D> & {
18
18
  nested: true;
19
19
  }): Promise<ApiTypes.ItemInstancesTargetSchema<NoInfer<D>, true>>;
20
- list<D extends ItemTypeDefinition = ItemTypeDefinition>(queryParams?: ApiTypes.ItemInstancesHrefSchema & {
20
+ list<D extends ItemTypeDefinition = ItemTypeDefinition>(queryParams?: ApiTypes.ItemInstancesHrefSchema<D> & {
21
21
  nested?: false | undefined;
22
22
  }): Promise<ApiTypes.ItemInstancesTargetSchema<NoInfer<D>, false>>;
23
23
  /**
@@ -28,13 +28,13 @@ export default class Item extends BaseResource {
28
28
  * @throws {ApiError}
29
29
  * @throws {TimeoutError}
30
30
  */
31
- rawList<D extends ItemTypeDefinition = ItemTypeDefinition>(queryParams: RawApiTypes.ItemInstancesHrefSchema & {
31
+ rawList<D extends ItemTypeDefinition = ItemTypeDefinition>(queryParams: RawApiTypes.ItemInstancesHrefSchema<D> & {
32
32
  nested: true;
33
33
  }): Promise<RawApiTypes.ItemInstancesTargetSchema<NoInfer<D>, true>>;
34
- rawList<D extends ItemTypeDefinition = ItemTypeDefinition>(queryParams?: RawApiTypes.ItemInstancesHrefSchema & {
34
+ rawList<D extends ItemTypeDefinition = ItemTypeDefinition>(queryParams?: RawApiTypes.ItemInstancesHrefSchema<D> & {
35
35
  nested?: false | undefined;
36
36
  }): Promise<RawApiTypes.ItemInstancesTargetSchema<NoInfer<D>, false>>;
37
- rawList<D extends ItemTypeDefinition = ItemTypeDefinition>(queryParams?: RawApiTypes.ItemInstancesHrefSchema): Promise<RawApiTypes.ItemInstancesTargetSchema<NoInfer<D>, true>>;
37
+ rawList<D extends ItemTypeDefinition = ItemTypeDefinition>(queryParams?: RawApiTypes.ItemInstancesHrefSchema<D>): Promise<RawApiTypes.ItemInstancesTargetSchema<NoInfer<D>, true>>;
38
38
  /**
39
39
  * Async iterator to auto-paginate over elements returned by list()
40
40
  *
@@ -43,7 +43,7 @@ export default class Item extends BaseResource {
43
43
  * @throws {ApiError}
44
44
  * @throws {TimeoutError}
45
45
  */
46
- listPagedIterator<D extends ItemTypeDefinition = ItemTypeDefinition>(queryParams?: Utils.OmitFromKnownKeys<ApiTypes.ItemInstancesHrefSchema, 'page'>, iteratorOptions?: Utils.IteratorOptions): AsyncGenerator<ApiTypes.ItemInNestedResponse<NoInfer<D>>, void, unknown>;
46
+ listPagedIterator<D extends ItemTypeDefinition = ItemTypeDefinition>(queryParams?: Utils.OmitFromKnownKeys<ApiTypes.ItemInstancesHrefSchema<D>, 'page'>, iteratorOptions?: Utils.IteratorOptions): AsyncGenerator<ApiTypes.ItemInNestedResponse<NoInfer<D>>, void, unknown>;
47
47
  /**
48
48
  * Async iterator to auto-paginate over elements returned by rawList()
49
49
  *
@@ -52,7 +52,7 @@ export default class Item extends BaseResource {
52
52
  * @throws {ApiError}
53
53
  * @throws {TimeoutError}
54
54
  */
55
- rawListPagedIterator<D extends ItemTypeDefinition = ItemTypeDefinition>(queryParams?: Utils.OmitFromKnownKeys<RawApiTypes.ItemInstancesHrefSchema, 'page'>, iteratorOptions?: Utils.IteratorOptions): AsyncGenerator<RawApiTypes.ItemInNestedResponse<NoInfer<D>>, void, unknown>;
55
+ rawListPagedIterator<D extends ItemTypeDefinition = ItemTypeDefinition>(queryParams?: Utils.OmitFromKnownKeys<RawApiTypes.ItemInstancesHrefSchema<D>, 'page'>, iteratorOptions?: Utils.IteratorOptions): AsyncGenerator<RawApiTypes.ItemInNestedResponse<NoInfer<D>>, void, unknown>;
56
56
  /**
57
57
  * Validates an existing record field
58
58
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9C,OAAO,IAAI,CAAC,cAAc,CACxB,KAAK,CAAC,oBAAoB,CAAoC,IAAI,EAAE;YAClE,IAAI,EAAE,6BAA6B;YACnC,UAAU,EAAE,EAAE;YACd,aAAa,EAAE,CAAC,OAAO,CAAC;SACzB,CAAC,CACH,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CACd,KAAK,CAAC,uBAAuB,CAAoC,IAAI,CAAC,CACvE,CAAC;IACJ,CAAC;IAED;;;;;;;OAOG;IACH,cAAc,CACZ,IAAuC;QAEvC,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAuC;YAC/D,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,qBAAqB;YAC1B,IAAI;SACL,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;OAOG;IACH,eAAe,CAAC,IAAwC;QACtD,OAAO,IAAI,CAAC,kBAAkB,CAC5B,KAAK,CAAC,oBAAoB,CAAwC,IAAI,EAAE;YACtE,IAAI,EAAE,mCAAmC;YACzC,UAAU,EAAE,CAAC,OAAO,CAAC;YACrB,aAAa,EAAE,CAAC,OAAO,CAAC;SACzB,CAAC,CACH,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CACd,KAAK,CAAC,uBAAuB,CAC3B,IAAI,CACL,CACF,CAAC;IACJ,CAAC;IAED;;;;;;;OAOG;IACH,kBAAkB,CAChB,IAA2C;QAE3C,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAA2C;YACnE,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,2BAA2B;YAChC,IAAI;SACL,CAAC,CAAC;IACL,CAAC;;AA/1Be,SAAI,GAAG,MAAe,CAAC"}
1
+ {"version":3,"file":"Item.js","sourceRoot":"","sources":["../../../../src/generated/resources/Item.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,KAAK,MAAM,4BAA4B,CAAC;AACpD,OAAO,YAAY,MAAM,oBAAoB,CAAC;AAO9C,MAAM,CAA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AAE,CACd,KAAK,CAAC,uBAAuB,CAAoC,IAAI,CAAC,CACvE,CAAC;IACJ,CAAC;IAED;;;;;;;OAOG;IACH,cAAc,CACZ,IAAuC;QAEvC,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAuC;YAC/D,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,qBAAqB;YAC1B,IAAI;SACL,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;OAOG;IACH,eAAe,CAAC,IAAwC;QACtD,OAAO,IAAI,CAAC,kBAAkB,CAC5B,KAAK,CAAC,oBAAoB,CAAwC,IAAI,EAAE;YACtE,IAAI,EAAE,mCAAmC;YACzC,UAAU,EAAE,CAAC,OAAO,CAAC;YACrB,aAAa,EAAE,CAAC,OAAO,CAAC;SACzB,CAAC,CACH,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CACd,KAAK,CAAC,uBAAuB,CAC3B,IAAI,CACL,CACF,CAAC;IACJ,CAAC;IAED;;;;;;;OAOG;IACH,kBAAkB,CAChB,IAA2C;QAE3C,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAA2C;YACnE,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,2BAA2B;YAChC,IAAI;SACL,CAAC,CAAC;IACL,CAAC;;AA/1Be,SAAI,GAAG,MAAe,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import type { BlockInNestedResponse, BlockInRequest, BooleanFieldValue, ColorFieldValue, DateFieldValue, DateTimeFieldValue, FileFieldValue, FileFieldValueInRequest, FloatFieldValue, GalleryFieldValue, GalleryFieldValueInRequest, IntegerFieldValue, JsonFieldValue, LatLonFieldValue, LinkFieldValue, LinksFieldValue, RichTextFieldValue, RichTextFieldValueInNestedResponse, RichTextFieldValueInRequest, SeoFieldValue, SingleBlockFieldValue, SingleBlockFieldValueInNestedResponse, SingleBlockFieldValueInRequest, SlugFieldValue, StringFieldValue, StructuredTextFieldValue, StructuredTextFieldValueInNestedResponse, StructuredTextFieldValueInRequest, TextFieldValue, VideoFieldValue } from '../fieldTypes';
2
+ import type { BooleanHrefFilter, ColorHrefFilter, DateHrefFilter, DateTimeHrefFilter, FileHrefFilter, FloatHrefFilter, GalleryHrefFilter, IntegerHrefFilter, ItemMetaFilter, ItemMetaOrderBy, JsonHrefFilter, LatLonHrefFilter, LinkHrefFilter, LinksHrefFilter, ParentIdFilter, PositionFilter, RichTextHrefFilter, SeoHrefFilter, SingleBlockHrefFilter, SlugHrefFilter, StringHrefFilter, StructuredTextHrefFilter, TextHrefFilter, VideoHrefFilter } from './itemInstancesHrefSchema';
2
3
  import type { LocalizedFieldValue } from './normalizedFieldValues';
3
4
  /** Base field definition */
4
5
  type BaseFieldDefinition<Type extends string> = {
@@ -75,6 +76,29 @@ type FieldTypeToValueInRequest = {
75
76
  video: VideoFieldValue;
76
77
  unknown: unknown;
77
78
  };
79
+ type FieldTypeToHrefFilter = {
80
+ boolean: BooleanHrefFilter;
81
+ color: ColorHrefFilter;
82
+ date: DateHrefFilter;
83
+ date_time: DateTimeHrefFilter;
84
+ file: FileHrefFilter;
85
+ float: FloatHrefFilter;
86
+ gallery: GalleryHrefFilter;
87
+ integer: IntegerHrefFilter;
88
+ json: JsonHrefFilter;
89
+ lat_lon: LatLonHrefFilter;
90
+ link: LinkHrefFilter;
91
+ links: LinksHrefFilter;
92
+ rich_text: RichTextHrefFilter;
93
+ seo: SeoHrefFilter;
94
+ single_block: SingleBlockHrefFilter;
95
+ slug: SlugHrefFilter;
96
+ string: StringHrefFilter;
97
+ structured_text: StructuredTextHrefFilter;
98
+ text: TextHrefFilter;
99
+ video: VideoHrefFilter;
100
+ unknown: unknown;
101
+ };
78
102
  /** Localized wrapper */
79
103
  type LocalizeIfNeeded<T extends FieldDefinition, Value, Locales extends string> = T extends {
80
104
  localized: true;
@@ -102,6 +126,12 @@ export type ToItemAttributesInRequest<T extends ItemTypeDefinition<any, any, any
102
126
  export type ToItemAttributesInNestedResponse<T extends ItemTypeDefinition<any, any, any>> = T extends ItemTypeDefinition<infer Settings, infer ItemTypeId, infer Fields> ? keyof Fields extends never ? Record<string, unknown> : {
103
127
  [K in keyof Fields]: Fields[K] extends FieldDefinition ? FieldDefinitionToFieldValueInNestedResponse<Fields[K], Settings['locales']> : never;
104
128
  } : never;
129
+ export type ToItemHrefSchemaField<T extends ItemTypeDefinition<any, any, any>> = T extends ItemTypeDefinition<infer Settings, infer ItemTypeId, infer Fields> ? keyof Fields extends never ? Record<string, unknown> : ItemMetaFilter & Partial<{
130
+ [K in keyof Fields]: K extends 'position' ? PositionFilter : K extends 'parent_id' ? ParentIdFilter : Fields[K] extends FieldDefinition ? FieldTypeToHrefFilter[Fields[K]['type']] : never;
131
+ }> : never;
132
+ export type ToItemHrefSchemaOrderBy<T extends ItemTypeDefinition<any, any, any>> = (T extends ItemTypeDefinition<infer Settings, infer ItemTypeId, infer Fields> ? keyof Fields extends never ? string : {
133
+ [K in keyof Fields]: Fields[K] extends FieldDefinition ? Fields[K]['type'] extends 'boolean' | 'date' | 'date_time' | 'float' | 'integer' | 'string' ? `${K & string}_ASC` | `${K & string}_DESC` : never : never;
134
+ }[keyof Fields] : never) | ItemMetaOrderBy;
105
135
  type NestedItemTypeDefinitions<T extends ItemTypeDefinition<any, any, any>, Seen extends string = never> = T extends ItemTypeDefinition<any, infer Id, infer Fields> ? Id extends Seen ? never : {
106
136
  [K in keyof Fields]: Fields[K] extends RichTextFieldDefinition<infer B> ? B | NestedItemTypeDefinitions<B, Seen | Id> : Fields[K] extends SingleBlockFieldDefinition<infer B> ? B | NestedItemTypeDefinitions<B, Seen | Id> : Fields[K] extends StructuredTextFieldDefinition<infer B, infer I> ? B | I | NestedItemTypeDefinitions<B, Seen | Id> | NestedItemTypeDefinitions<I, Seen | Id> : never;
107
137
  }[keyof Fields] : never;
@@ -0,0 +1,256 @@
1
+ export type StringMatchesFilter = {
2
+ /** Pattern to match against */
3
+ pattern: string;
4
+ /** Whether the match should be case sensitive */
5
+ case_sensitive?: boolean;
6
+ /** Whether to treat the pattern as a regular expression */
7
+ regexp?: boolean;
8
+ };
9
+ export type LatLonNearFilter = {
10
+ /** Latitude coordinate */
11
+ latitude: number;
12
+ /** Longitude coordinate */
13
+ longitude: number;
14
+ /** Radius in meters */
15
+ radius: number;
16
+ };
17
+ export type BooleanHrefFilter = {
18
+ /** Search for records with an exact match */
19
+ eq?: boolean;
20
+ };
21
+ export type IntegerHrefFilter = {
22
+ /** Filter records with a value that's strictly greater than the one specified */
23
+ gt?: number;
24
+ /** Filter records with a value that's less than the one specified */
25
+ lt?: number;
26
+ /** Filter records with a value that's greater than or equal to the one specified */
27
+ gte?: number;
28
+ /** Filter records with a value that's less or equal than the one specified */
29
+ lte?: number;
30
+ /** Filter records with the specified field defined (i.e. with any value) or not */
31
+ exists?: boolean;
32
+ /** Search for records with an exact match */
33
+ eq?: number;
34
+ /** Exclude records with an exact match */
35
+ neq?: number;
36
+ };
37
+ export type FloatHrefFilter = {
38
+ /** Filter records with a value that's strictly greater than the one specified */
39
+ gt?: number;
40
+ /** Filter records with a value that's less than the one specified */
41
+ lt?: number;
42
+ /** Filter records with a value that's greater than or equal to the one specified */
43
+ gte?: number;
44
+ /** Filter records with a value that's less or equal than the one specified */
45
+ lte?: number;
46
+ /** Filter records with the specified field defined (i.e. with any value) or not */
47
+ exists?: boolean;
48
+ /** Search for records with an exact match */
49
+ eq?: number;
50
+ /** Exclude records with an exact match */
51
+ neq?: number;
52
+ };
53
+ export type DateHrefFilter = {
54
+ /** Filter records with a value that's strictly greater than the one specified */
55
+ gt?: string;
56
+ /** Filter records with a value that's less than the one specified */
57
+ lt?: string;
58
+ /** Filter records with a value that's greater than or equal to the one specified */
59
+ gte?: string;
60
+ /** Filter records with a value that's less or equal than the one specified */
61
+ lte?: string;
62
+ /** Filter records with the specified field defined (i.e. with any value) or not */
63
+ exists?: boolean;
64
+ /** Search for records with an exact match */
65
+ eq?: string;
66
+ /** Exclude records with an exact match */
67
+ neq?: string;
68
+ };
69
+ export type ColorHrefFilter = {
70
+ /** Filter records with the specified field defined (i.e. with any value) or not */
71
+ exists?: boolean;
72
+ };
73
+ export type StringHrefFilter = {
74
+ /** Filter records based on a regular expression */
75
+ matches?: StringMatchesFilter;
76
+ /** Exclude records based on a regular expression */
77
+ not_matches?: StringMatchesFilter;
78
+ /** Filter records with the specified field set as blank (null or empty string) */
79
+ is_blank?: boolean;
80
+ /** Filter records with the specified field present (neither null, nor empty string) */
81
+ is_present?: boolean;
82
+ /** Search for records with an exact match */
83
+ eq?: string;
84
+ /** Exclude records with an exact match */
85
+ neq?: string;
86
+ /** Filter records that equal one of the specified values */
87
+ in?: string[];
88
+ /** Filter records that do not equal one of the specified values */
89
+ not_in?: string[];
90
+ /** @deprecated Use is_present instead. Filter records with the specified field defined (i.e. with any value) or not */
91
+ exists?: boolean;
92
+ };
93
+ export type DateTimeHrefFilter = {
94
+ /** Filter records with a value that's strictly greater than the one specified. Seconds and milliseconds are truncated from the argument. */
95
+ gt?: string;
96
+ /** Filter records with a value that's less than the one specified. Seconds and milliseconds are truncated from the argument. */
97
+ lt?: string;
98
+ /** Filter records with a value that's greater than or equal to than the one specified. Seconds and milliseconds are truncated from the argument. */
99
+ gte?: string;
100
+ /** Filter records with a value that's less or equal than the one specified. Seconds and milliseconds are truncated from the argument. */
101
+ lte?: string;
102
+ /** Filter records with a value that's within the specified minute range. Seconds and milliseconds are truncated from the argument. */
103
+ eq?: string;
104
+ /** Filter records with a value that's outside the specified minute range. Seconds and milliseconds are truncated from the argument. */
105
+ neq?: string;
106
+ /** Filter records with the specified field defined (i.e. with any value) or not */
107
+ exists?: boolean;
108
+ };
109
+ export type JsonHrefFilter = {
110
+ /** Filter records with the specified field defined (i.e. with any value) or not */
111
+ exists?: boolean;
112
+ };
113
+ export type LatLonHrefFilter = {
114
+ /** Filter records within the specified radius in meters */
115
+ near?: LatLonNearFilter;
116
+ /** Filter records with the specified field defined (i.e. with any value) or not */
117
+ exists?: boolean;
118
+ };
119
+ export type SlugHrefFilter = {
120
+ /** Search for records with an exact match */
121
+ eq?: string;
122
+ /** Exclude records with an exact match */
123
+ neq?: string;
124
+ /** Filter records that have one of the specified slugs */
125
+ in?: string[];
126
+ /** Filter records that do not have one of the specified slugs */
127
+ not_in?: string[];
128
+ };
129
+ export type VideoHrefFilter = {
130
+ /** Filter records with the specified field defined (i.e. with any value) or not */
131
+ exists?: boolean;
132
+ };
133
+ export type SeoHrefFilter = {
134
+ /** Filter records with the specified field defined (i.e. with any value) or not */
135
+ exists?: boolean;
136
+ };
137
+ export type FileHrefFilter = {
138
+ /** Search for records with an exact match. The specified value must be an Upload ID */
139
+ eq?: string;
140
+ /** Exclude records with an exact match. The specified value must be an Upload ID */
141
+ neq?: string;
142
+ /** Filter records that have one of the specified uploads */
143
+ in?: string[];
144
+ /** Filter records that do not have one of the specified uploads */
145
+ not_in?: string[];
146
+ /** Filter records with the specified field defined (i.e. with any value) or not */
147
+ exists?: boolean;
148
+ };
149
+ export type GalleryHrefFilter = {
150
+ /** Search for records with an exact match. The specified values must be Upload IDs */
151
+ eq?: string[];
152
+ /** Filter records that have all of the specified uploads. The specified values must be Upload IDs */
153
+ all_in?: string[];
154
+ /** Filter records that have one of the specified uploads. The specified values must be Upload IDs */
155
+ any_in?: string[];
156
+ /** Filter records that do not have any of the specified uploads. The specified values must be Upload IDs */
157
+ not_in?: string[];
158
+ /** Filter records with the specified field defined (i.e. with any value) or not */
159
+ exists?: boolean;
160
+ };
161
+ export type LinkHrefFilter = {
162
+ /** Search for records with an exact match. The specified value must be a Record ID */
163
+ eq?: string;
164
+ /** Exclude records with an exact match. The specified value must be a Record ID */
165
+ neq?: string;
166
+ /** Filter records linked to one of the specified records */
167
+ in?: string[];
168
+ /** Filter records not linked to one of the specified records */
169
+ not_in?: string[];
170
+ /** Filter records with the specified field defined (i.e. with any value) or not */
171
+ exists?: boolean;
172
+ };
173
+ export type LinksHrefFilter = {
174
+ /** Search for records with an exact match. The specified values must be Record IDs */
175
+ eq?: string[];
176
+ /** Filter records linked to all of the specified records. The specified values must be Record IDs */
177
+ all_in?: string[];
178
+ /** Filter records linked to at least one of the specified records. The specified values must be Record IDs */
179
+ any_in?: string[];
180
+ /** Filter records not linked to any of the specified records. The specified values must be Record IDs */
181
+ not_in?: string[];
182
+ /** Filter records with the specified field defined (i.e. with any value) or not */
183
+ exists?: boolean;
184
+ };
185
+ export type RichTextHrefFilter = Record<string, never>;
186
+ export type StructuredTextHrefFilter = {
187
+ /** Filter records based on a regular expression */
188
+ matches?: StringMatchesFilter;
189
+ /** Exclude records based on a regular expression */
190
+ not_matches?: StringMatchesFilter;
191
+ };
192
+ export type SingleBlockHrefFilter = Record<string, never>;
193
+ export type TextHrefFilter = {
194
+ /** Filter records based on a regular expression */
195
+ matches?: StringMatchesFilter;
196
+ /** Exclude records based on a regular expression */
197
+ not_matches?: StringMatchesFilter;
198
+ /** Filter records with the specified field set as blank (null or empty string) */
199
+ is_blank?: boolean;
200
+ /** Filter records with the specified field present (neither null, nor empty string) */
201
+ is_present?: boolean;
202
+ /** @deprecated Use is_present instead. Filter records with the specified field defined (i.e. with any value) or not */
203
+ exists?: boolean;
204
+ };
205
+ export type StatusFilter = {
206
+ /** Search the record with the specified status */
207
+ eq?: 'draft' | 'updated' | 'published';
208
+ /** Exclude the record with the specified status */
209
+ neq?: 'draft' | 'updated' | 'published';
210
+ /** Search records with the specified statuses */
211
+ in?: ('draft' | 'updated' | 'published')[];
212
+ /** Search records without the specified statuses */
213
+ notIn?: ('draft' | 'updated' | 'published')[];
214
+ };
215
+ export type ItemIdFilter = {
216
+ /** Search the record with the specified ID */
217
+ eq?: string;
218
+ /** Exclude the record with the specified ID */
219
+ neq?: string;
220
+ /** Search records with the specified IDs */
221
+ in?: string[];
222
+ /** Search records that do not have the specified IDs */
223
+ notIn?: string[];
224
+ };
225
+ export type ParentIdFilter = {
226
+ /** Filter records children of the specified record. Value must be a Record ID */
227
+ eq?: string;
228
+ /** Filter records with a parent record or not */
229
+ exists?: boolean;
230
+ };
231
+ export type PositionFilter = {
232
+ /** Filter records with a value that's strictly greater than the one specified */
233
+ gt?: number;
234
+ /** Filter records with a value that's less than the one specified */
235
+ lt?: number;
236
+ /** Filter records with a value that's greater than or equal to the one specified */
237
+ gte?: number;
238
+ /** Filter records with a value that's less or equal than the one specified */
239
+ lte?: number;
240
+ /** Search for records with an exact match */
241
+ eq?: number;
242
+ /** Exclude records with an exact match */
243
+ neq?: number;
244
+ };
245
+ export type ItemMetaFilter = {
246
+ _created_at?: DateTimeHrefFilter;
247
+ _first_published_at?: DateTimeHrefFilter;
248
+ _is_valid?: BooleanHrefFilter;
249
+ _publication_scheduled_at?: DateTimeHrefFilter;
250
+ _published_at?: DateTimeHrefFilter;
251
+ _status?: StatusFilter;
252
+ _unpublishing_scheduled_at?: DateTimeHrefFilter;
253
+ _updated_at?: DateTimeHrefFilter;
254
+ id?: ItemIdFilter;
255
+ };
256
+ export type ItemMetaOrderBy = '_created_at_ASC' | '_created_at_DESC' | 'id_ASC' | 'id_DESC' | '_first_published_at_ASC' | '_first_published_at_DESC' | '_publication_scheduled_at_ASC' | '_publication_scheduled_at_DESC' | '_unpublishing_scheduled_at_ASC' | '_unpublishing_scheduled_at_DESC' | '_published_at_ASC' | '_published_at_DESC' | '_status_ASC' | '_status_DESC' | '_updated_at_ASC' | '_updated_at_DESC' | '_is_valid_ASC' | '_is_valid_DESC';
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=itemInstancesHrefSchema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"itemInstancesHrefSchema.js","sourceRoot":"","sources":["../../../src/utilities/itemInstancesHrefSchema.ts"],"names":[],"mappings":""}
@@ -14,8 +14,8 @@ export type LocalizedFieldValue<T = unknown, L extends string = string> = Partia
14
14
  * This function handles both full Schema field objects and simplified Schema field objects
15
15
  * by checking the appropriate property based on the object structure.
16
16
  *
17
- * @param field - The DatoCMS field definition (either full or simple schema)
18
17
  * @returns true if the field is localized, false otherwise
18
+ * @param field - The DatoCMS field definition (either full or simple schema)
19
19
  */
20
20
  export declare function isLocalized(field: RawApiTypes.Field | ApiTypes.Field): boolean;
21
21
  export declare function isLocalizedFieldValue<T = unknown, L extends string = string>(value: unknown): value is LocalizedFieldValue<T, L>;
@@ -37,11 +37,11 @@ export type NormalizedFieldValueEntry<T = unknown, L extends string = string> =
37
37
  * This function normalizes the handling of field values by converting them into a consistent
38
38
  * array format, regardless of whether the field is localized or not.
39
39
  *
40
- * @param field - The DatoCMS field definition that determines localization behavior
41
40
  * @param value - The field value to convert (either a localized object or direct value)
41
+ * @param field - The DatoCMS field definition that determines localization behavior
42
42
  * @returns Array of entries where each entry contains a locale (string for localized, undefined for non-localized) and the corresponding value
43
43
  */
44
- export declare function toNormalizedFieldValueEntries<T = unknown, L extends string = string>(field: RawApiTypes.Field | ApiTypes.Field, value: T | LocalizedFieldValue<T, L>): NormalizedFieldValueEntry<T, L>[];
44
+ export declare function toNormalizedFieldValueEntries<T = unknown, L extends string = string>(value: T | LocalizedFieldValue<T, L>, field: RawApiTypes.Field | ApiTypes.Field): NormalizedFieldValueEntry<T, L>[];
45
45
  /**
46
46
  * Converts an array of possibly localized entries back into the appropriate field value format.
47
47
  *
@@ -49,118 +49,118 @@ export declare function toNormalizedFieldValueEntries<T = unknown, L extends str
49
49
  * array of entries and converts them back to either a localized object or a direct value,
50
50
  * depending on the field's localization setting.
51
51
  *
52
- * @param field - The DatoCMS field definition that determines the output format
53
52
  * @param entries - Array of entries to convert back to field value format
53
+ * @param field - The DatoCMS field definition that determines the output format
54
54
  * @returns Either a localized object (for localized fields) or the direct value (for non-localized fields)
55
55
  */
56
- export declare function fromNormalizedFieldValueEntries<T = unknown, L extends string = string>(field: RawApiTypes.Field | ApiTypes.Field, entries: NormalizedFieldValueEntry<T, L>[]): T | LocalizedFieldValue<T, L>;
56
+ export declare function fromNormalizedFieldValueEntries<T = unknown, L extends string = string>(entries: NormalizedFieldValueEntry<T, L>[], field: RawApiTypes.Field | ApiTypes.Field): T | LocalizedFieldValue<T, L>;
57
57
  /**
58
58
  * Maps field values using a provided mapping function.
59
59
  * For localized fields, applies the mapping function to each locale value.
60
60
  * For non-localized fields, applies the mapping function directly to the value.
61
61
  *
62
62
  * @template T - The type that the mapping function returns
63
+ * @param localizedOrNonLocalizedFieldValue - The field value (either localized object or direct value)
63
64
  * @param field - The DatoCMS field definition
64
- * @param value - The field value (either localized object or direct value)
65
65
  * @param mapFn - The function to apply to each locale value or the direct value
66
66
  * @returns The mapped value with the same structure as the input
67
67
  */
68
- export declare function mapNormalizedFieldValues<TInput = unknown, TOutput = unknown, L extends string = string>(field: RawApiTypes.Field | ApiTypes.Field, value: TInput | LocalizedFieldValue<TInput, L>, mapFn: (locale: L | undefined, localeValue: TInput) => TOutput): TOutput | LocalizedFieldValue<TOutput, L>;
68
+ export declare function mapNormalizedFieldValues<TInput = unknown, TOutput = unknown, L extends string = string>(localizedOrNonLocalizedFieldValue: TInput | LocalizedFieldValue<TInput, L>, field: RawApiTypes.Field | ApiTypes.Field, mapFn: (locale: L | undefined, localeValue: TInput) => TOutput): TOutput | LocalizedFieldValue<TOutput, L>;
69
69
  /**
70
70
  * Maps field values using a provided mapping function (async version).
71
71
  * For localized fields, applies the mapping function to each locale value.
72
72
  * For non-localized fields, applies the mapping function directly to the value.
73
73
  *
74
74
  * @template T - The type that the mapping function returns
75
+ * @param localizedOrNonLocalizedFieldValue - The field value (either localized object or direct value)
75
76
  * @param field - The DatoCMS field definition
76
- * @param value - The field value (either localized object or direct value)
77
77
  * @param mapFn - The function to apply to each locale value or the direct value
78
78
  * @returns The mapped value with the same structure as the input
79
79
  */
80
- export declare function mapNormalizedFieldValuesAsync<TInput = unknown, TOutput = unknown, L extends string = string>(field: RawApiTypes.Field | ApiTypes.Field, value: TInput | LocalizedFieldValue<TInput, L>, mapFn: (locale: L | undefined, localeValue: TInput) => Promise<TOutput>): Promise<TOutput | LocalizedFieldValue<TOutput, L>>;
80
+ export declare function mapNormalizedFieldValuesAsync<TInput = unknown, TOutput = unknown, L extends string = string>(localizedOrNonLocalizedFieldValue: TInput | LocalizedFieldValue<TInput, L>, field: RawApiTypes.Field | ApiTypes.Field, mapFn: (locale: L | undefined, localeValue: TInput) => Promise<TOutput>): Promise<TOutput | LocalizedFieldValue<TOutput, L>>;
81
81
  /**
82
82
  * Filters field values using a provided filter function.
83
83
  * For localized fields, filters each locale value.
84
84
  * For non-localized fields, returns the value if the filter passes, otherwise undefined.
85
85
  *
86
+ * @param localizedOrNonLocalizedFieldValue - The field value (either localized object or direct value)
86
87
  * @param field - The DatoCMS field definition
87
- * @param value - The field value (either localized object or direct value)
88
88
  * @param filterFn - The function to test each locale value or the direct value
89
89
  * @returns The filtered value with the same structure as the input
90
90
  */
91
- export declare function filterNormalizedFieldValues<T = unknown, L extends string = string>(field: RawApiTypes.Field | ApiTypes.Field, value: T | LocalizedFieldValue<T, L>, filterFn: (locale: L | undefined, localeValue: T) => boolean): T | LocalizedFieldValue<T, L> | undefined;
91
+ export declare function filterNormalizedFieldValues<T = unknown, L extends string = string>(localizedOrNonLocalizedFieldValue: T | LocalizedFieldValue<T, L>, field: RawApiTypes.Field | ApiTypes.Field, filterFn: (locale: L | undefined, localeValue: T) => boolean): T | LocalizedFieldValue<T, L> | undefined;
92
92
  /**
93
93
  * Filters field values using a provided filter function (async version).
94
94
  * For localized fields, filters each locale value.
95
95
  * For non-localized fields, returns the value if the filter passes, otherwise undefined.
96
96
  *
97
+ * @param localizedOrNonLocalizedFieldValue - The field value (either localized object or direct value)
97
98
  * @param field - The DatoCMS field definition
98
- * @param value - The field value (either localized object or direct value)
99
99
  * @param filterFn - The function to test each locale value or the direct value
100
100
  * @returns The filtered value with the same structure as the input
101
101
  */
102
- export declare function filterNormalizedFieldValuesAsync<T = unknown, L extends string = string>(field: RawApiTypes.Field | ApiTypes.Field, value: T | LocalizedFieldValue<T, L>, filterFn: (locale: L | undefined, localeValue: T) => Promise<boolean>): Promise<T | LocalizedFieldValue<T, L> | undefined>;
102
+ export declare function filterNormalizedFieldValuesAsync<T = unknown, L extends string = string>(localizedOrNonLocalizedFieldValue: T | LocalizedFieldValue<T, L>, field: RawApiTypes.Field | ApiTypes.Field, filterFn: (locale: L | undefined, localeValue: T) => Promise<boolean>): Promise<T | LocalizedFieldValue<T, L> | undefined>;
103
103
  /**
104
104
  * Tests whether at least one field value passes the test implemented by the provided function.
105
105
  * For localized fields, tests each locale value.
106
106
  * For non-localized fields, tests the direct value.
107
107
  *
108
+ * @param localizedOrNonLocalizedFieldValue - The field value (either localized object or direct value)
108
109
  * @param field - The DatoCMS field definition
109
- * @param value - The field value (either localized object or direct value)
110
110
  * @param testFn - The function to test each locale value or the direct value
111
111
  * @returns true if at least one value passes the test, false otherwise
112
112
  */
113
- export declare function someNormalizedFieldValues<T = unknown, L extends string = string>(field: RawApiTypes.Field | ApiTypes.Field, value: T | LocalizedFieldValue<T, L>, testFn: (locale: L | undefined, localeValue: T) => boolean): boolean;
113
+ export declare function someNormalizedFieldValues<T = unknown, L extends string = string>(localizedOrNonLocalizedFieldValue: T | LocalizedFieldValue<T, L>, field: RawApiTypes.Field | ApiTypes.Field, testFn: (locale: L | undefined, localeValue: T) => boolean): boolean;
114
114
  /**
115
115
  * Tests whether at least one field value passes the test implemented by the provided function (async version).
116
116
  * For localized fields, tests each locale value.
117
117
  * For non-localized fields, tests the direct value.
118
118
  *
119
+ * @param localizedOrNonLocalizedFieldValue - The field value (either localized object or direct value)
119
120
  * @param field - The DatoCMS field definition
120
- * @param value - The field value (either localized object or direct value)
121
121
  * @param testFn - The function to test each locale value or the direct value
122
122
  * @returns true if at least one value passes the test, false otherwise
123
123
  */
124
- export declare function someNormalizedFieldValuesAsync<T = unknown, L extends string = string>(field: RawApiTypes.Field | ApiTypes.Field, value: T | LocalizedFieldValue<T, L>, testFn: (locale: L | undefined, localeValue: T) => Promise<boolean>): Promise<boolean>;
124
+ export declare function someNormalizedFieldValuesAsync<T = unknown, L extends string = string>(localizedOrNonLocalizedFieldValue: T | LocalizedFieldValue<T, L>, field: RawApiTypes.Field | ApiTypes.Field, testFn: (locale: L | undefined, localeValue: T) => Promise<boolean>): Promise<boolean>;
125
125
  /**
126
126
  * Tests whether all field values pass the test implemented by the provided function.
127
127
  * For localized fields, tests each locale value.
128
128
  * For non-localized fields, tests the direct value.
129
129
  *
130
+ * @param localizedOrNonLocalizedFieldValue - The field value (either localized object or direct value)
130
131
  * @param field - The DatoCMS field definition
131
- * @param value - The field value (either localized object or direct value)
132
132
  * @param testFn - The function to test each locale value or the direct value
133
133
  * @returns true if all values pass the test, false otherwise
134
134
  */
135
- export declare function everyNormalizedFieldValue<T = unknown, L extends string = string>(field: RawApiTypes.Field | ApiTypes.Field, value: T | LocalizedFieldValue<T, L>, testFn: (locale: L | undefined, localeValue: T) => boolean): boolean;
135
+ export declare function everyNormalizedFieldValue<T = unknown, L extends string = string>(localizedOrNonLocalizedFieldValue: T | LocalizedFieldValue<T, L>, field: RawApiTypes.Field | ApiTypes.Field, testFn: (locale: L | undefined, localeValue: T) => boolean): boolean;
136
136
  /**
137
137
  * Tests whether all field values pass the test implemented by the provided function (async version).
138
138
  * For localized fields, tests each locale value.
139
139
  * For non-localized fields, tests the direct value.
140
140
  *
141
+ * @param localizedOrNonLocalizedFieldValue - The field value (either localized object or direct value)
141
142
  * @param field - The DatoCMS field definition
142
- * @param value - The field value (either localized object or direct value)
143
143
  * @param testFn - The function to test each locale value or the direct value
144
144
  * @returns true if all values pass the test, false otherwise
145
145
  */
146
- export declare function everyNormalizedFieldValueAsync<T = unknown, L extends string = string>(field: RawApiTypes.Field | ApiTypes.Field, value: T | LocalizedFieldValue<T, L>, testFn: (locale: L | undefined, localeValue: T) => Promise<boolean>): Promise<boolean>;
146
+ export declare function everyNormalizedFieldValueAsync<T = unknown, L extends string = string>(localizedOrNonLocalizedFieldValue: T | LocalizedFieldValue<T, L>, field: RawApiTypes.Field | ApiTypes.Field, testFn: (locale: L | undefined, localeValue: T) => Promise<boolean>): Promise<boolean>;
147
147
  /**
148
148
  * Visits each field value with the provided function.
149
149
  * For localized fields, visits each locale value.
150
150
  * For non-localized fields, visits the direct value.
151
151
  *
152
- * @param field - The DatoCMS field definition
153
152
  * @param value - The field value (either localized object or direct value)
153
+ * @param field - The DatoCMS field definition
154
154
  * @param visitFn - The function to call for each locale value or the direct value
155
155
  */
156
- export declare function visitNormalizedFieldValues<T = unknown, L extends string = string>(field: RawApiTypes.Field | ApiTypes.Field, value: T | LocalizedFieldValue<T, L>, visitFn: (locale: L | undefined, localeValue: T) => void): void;
156
+ export declare function visitNormalizedFieldValues<T = unknown, L extends string = string>(value: T | LocalizedFieldValue<T, L>, field: RawApiTypes.Field | ApiTypes.Field, visitFn: (locale: L | undefined, localeValue: T) => void): void;
157
157
  /**
158
158
  * Visits each field value with the provided function (async version).
159
159
  * For localized fields, visits each locale value.
160
160
  * For non-localized fields, visits the direct value.
161
161
  *
162
+ * @param localizedOrNonLocalizedFieldValue - The field value (either localized object or direct value)
162
163
  * @param field - The DatoCMS field definition
163
- * @param value - The field value (either localized object or direct value)
164
164
  * @param visitFn - The function to call for each locale value or the direct value
165
165
  */
166
- export declare function visitNormalizedFieldValuesAsync<T = unknown, L extends string = string>(field: RawApiTypes.Field | ApiTypes.Field, value: T | LocalizedFieldValue<T, L>, visitFn: (locale: L | undefined, localeValue: T) => Promise<void>): Promise<void>;
166
+ export declare function visitNormalizedFieldValuesAsync<T = unknown, L extends string = string>(localizedOrNonLocalizedFieldValue: T | LocalizedFieldValue<T, L>, field: RawApiTypes.Field | ApiTypes.Field, visitFn: (locale: L | undefined, localeValue: T) => Promise<void>): Promise<void>;