@datocms/cma-client 5.1.23 → 5.1.25
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/cjs/generated/Client.js +1 -1
- package/dist/cjs/generated/resources/ItemType.js +25 -0
- package/dist/cjs/generated/resources/ItemType.js.map +1 -1
- package/dist/esm/fieldTypes/appearance/seo.d.ts +1 -1
- package/dist/esm/generated/ApiTypes.d.ts +27 -26
- package/dist/esm/generated/Client.js +1 -1
- package/dist/esm/generated/RawApiTypes.d.ts +29 -25
- package/dist/esm/generated/resources/Field.d.ts +0 -200
- package/dist/esm/generated/resources/ItemType.d.ts +18 -0
- package/dist/esm/generated/resources/ItemType.js +25 -0
- package/dist/esm/generated/resources/ItemType.js.map +1 -1
- package/dist/types/fieldTypes/appearance/seo.d.ts +1 -1
- package/dist/types/generated/ApiTypes.d.ts +27 -26
- package/dist/types/generated/RawApiTypes.d.ts +29 -25
- package/dist/types/generated/resources/Field.d.ts +0 -200
- package/dist/types/generated/resources/ItemType.d.ts +18 -0
- package/package.json +2 -2
- package/resources.json +28 -0
- package/src/fieldTypes/appearance/seo.ts +1 -1
- package/src/generated/ApiTypes.ts +27 -26
- package/src/generated/Client.ts +1 -1
- package/src/generated/RawApiTypes.ts +29 -25
- package/src/generated/resources/ItemType.ts +33 -0
|
@@ -88,7 +88,7 @@ class Client {
|
|
|
88
88
|
return this.config.baseUrl || Client.defaultBaseUrl;
|
|
89
89
|
}
|
|
90
90
|
request(options) {
|
|
91
|
-
return (0, rest_client_utils_1.request)(Object.assign(Object.assign(Object.assign({}, this.config), options), { logFn: this.config.logFn || console.log, userAgent: '@datocms/cma-client v5.1.
|
|
91
|
+
return (0, rest_client_utils_1.request)(Object.assign(Object.assign(Object.assign({}, this.config), options), { logFn: this.config.logFn || console.log, userAgent: '@datocms/cma-client v5.1.25', baseUrl: this.baseUrl, preCallStack: new Error().stack, extraHeaders: Object.assign(Object.assign(Object.assign({}, (this.config.extraHeaders || {})), (this.config.environment
|
|
92
92
|
? { 'X-Environment': this.config.environment }
|
|
93
93
|
: {})), { 'X-API-Version': '3' }), fetchJobResult: (jobId) => {
|
|
94
94
|
return this.jobResultsFetcher
|
|
@@ -241,6 +241,31 @@ class ItemType extends BaseResource_1.default {
|
|
|
241
241
|
queryParams,
|
|
242
242
|
});
|
|
243
243
|
}
|
|
244
|
+
/**
|
|
245
|
+
* List models referencing a model or block model
|
|
246
|
+
*
|
|
247
|
+
* Read more: https://www.datocms.com/docs/content-management-api/resources/item-type/referencing
|
|
248
|
+
*
|
|
249
|
+
* @throws {ApiError}
|
|
250
|
+
* @throws {TimeoutError}
|
|
251
|
+
*/
|
|
252
|
+
referencing(itemTypeId) {
|
|
253
|
+
return this.rawReferencing(Utils.toId(itemTypeId)).then((body) => Utils.deserializeResponseBody(body));
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* List models referencing a model or block model
|
|
257
|
+
*
|
|
258
|
+
* Read more: https://www.datocms.com/docs/content-management-api/resources/item-type/referencing
|
|
259
|
+
*
|
|
260
|
+
* @throws {ApiError}
|
|
261
|
+
* @throws {TimeoutError}
|
|
262
|
+
*/
|
|
263
|
+
rawReferencing(itemTypeId) {
|
|
264
|
+
return this.client.request({
|
|
265
|
+
method: 'GET',
|
|
266
|
+
url: `/item-types/${itemTypeId}/referencing`,
|
|
267
|
+
});
|
|
268
|
+
}
|
|
244
269
|
/**
|
|
245
270
|
* Reorders a set of fields and fieldsets within the model
|
|
246
271
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ItemType.js","sourceRoot":"","sources":["../../../../src/generated/resources/ItemType.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kEAAoD;AACpD,sEAA8C;AAI9C,MAAqB,QAAS,SAAQ,sBAAY;IAGhD;;;;;;;OAOG;IACH,MAAM,CACJ,IAAmC,EACnC,WAA+C;QAE/C,OAAO,IAAI,CAAC,SAAS,CACn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OAOG;IACH,SAAS,CAAC,UAA0C;QAClD,OAAO,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAC7D,KAAK,CAAC,uBAAuB,CAC3B,IAAI,CACL,CACF,CAAC;IACJ,CAAC;IAED;;;;;;;OAOG;IACH,YAAY,CACV,UAAkB;QAElB,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAA4C;YACpE,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,eAAe,UAAU,YAAY;SAC3C,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;OAOG;IACH,OAAO,CACL,UAA0C,EAC1C,WAAgD;QAEhD,OAAO,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,WAAW,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CACxE,KAAK,CAAC,uBAAuB,CAAoC,IAAI,CAAC,CACvE,CAAC;IACJ,CAAC;IAED;;;;;;;OAOG;IACH,UAAU,CACR,UAAkB,EAClB,WAAmD;QAEnD,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAuC;YAC/D,MAAM,EAAE,QAAQ;YAChB,GAAG,EAAE,eAAe,UAAU,EAAE;YAChC,WAAW;SACZ,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;OASG;IACH,4BAA4B,CAC1B,UAAkB,EAClB,IAAyD;QAEzD,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CACxB;YACE,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,eAAe,UAAU,+BAA+B;YAC7D,IAAI;SACL,CACF,CAAC;IACJ,CAAC;;
|
|
1
|
+
{"version":3,"file":"ItemType.js","sourceRoot":"","sources":["../../../../src/generated/resources/ItemType.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kEAAoD;AACpD,sEAA8C;AAI9C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OG;IACH,cAAc,CACZ,UAAkB;QAElB,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAA8C;YACtE,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,eAAe,UAAU,cAAc;SAC7C,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;OASG;IACH,4BAA4B,CAC1B,UAAkB,EAClB,IAAyD;QAEzD,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CACxB;YACE,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,eAAe,UAAU,+BAA+B;YAC7D,IAAI;SACL,CACF,CAAC;IACJ,CAAC;;AAnUH,2BAoUC;AAnUiB,aAAI,GAAG,WAAoB,CAAC"}
|
|
@@ -5,5 +5,5 @@ export type SeoEditorConfiguration = {
|
|
|
5
5
|
/** Specify which fields of the SEO input should be visible to editors */
|
|
6
6
|
fields: Array<'title' | 'description' | 'image' | 'no_index' | 'twitter_card'>;
|
|
7
7
|
/** Specify which previews should be visible to editors */
|
|
8
|
-
previews: Array<'
|
|
8
|
+
previews: Array<'google' | 'twitter' | 'slack' | 'whatsapp' | 'telegram' | 'facebook' | 'linkedin'>;
|
|
9
9
|
};
|
|
@@ -578,6 +578,11 @@ export type ItemTypeDestroyHrefSchema = {
|
|
|
578
578
|
skip_menu_items_deletion?: boolean;
|
|
579
579
|
[k: string]: unknown;
|
|
580
580
|
};
|
|
581
|
+
/**
|
|
582
|
+
* This interface was referenced by `ItemType`'s JSON-Schema
|
|
583
|
+
* via the `referencing.targetSchema` link.
|
|
584
|
+
*/
|
|
585
|
+
export type ItemTypeReferencingTargetSchema = ItemType[];
|
|
581
586
|
/**
|
|
582
587
|
* This interface was referenced by `ItemType`'s JSON-Schema
|
|
583
588
|
* via the `reorder_fields_and_fieldsets.schema` link.
|
|
@@ -4941,11 +4946,11 @@ export type ItemTypeUpdateSchema = {
|
|
|
4941
4946
|
* <details>
|
|
4942
4947
|
* <summary>Multi-line text (<code>text</code>)</summary>
|
|
4943
4948
|
*
|
|
4944
|
-
* | Property | Value
|
|
4945
|
-
* | ------------------------------ |
|
|
4946
|
-
* | Code | `text`
|
|
4947
|
-
* | Built-in editors for the field | `markdown`, `wysiwyg`, `textarea`
|
|
4948
|
-
* | Available validators | `required`, `length`, `format`, `
|
|
4949
|
+
* | Property | Value |
|
|
4950
|
+
* | ------------------------------ | ------------------------------------------------ |
|
|
4951
|
+
* | Code | `text` |
|
|
4952
|
+
* | Built-in editors for the field | `markdown`, `wysiwyg`, `textarea` |
|
|
4953
|
+
* | Available validators | `required`, `length`, `format`, `sanitized_html` |
|
|
4949
4954
|
*
|
|
4950
4955
|
* </details>
|
|
4951
4956
|
*
|
|
@@ -5051,11 +5056,11 @@ export type ItemTypeUpdateSchema = {
|
|
|
5051
5056
|
* <details>
|
|
5052
5057
|
* <summary>Slug (<code>slug</code>)</summary>
|
|
5053
5058
|
*
|
|
5054
|
-
* | Property | Value
|
|
5055
|
-
* | ------------------------------ |
|
|
5056
|
-
* | Code | `slug`
|
|
5057
|
-
* | Built-in editors for the field | `slug`
|
|
5058
|
-
* | Available validators | `required`, `length`, `slug_format`, `slug_title_field` |
|
|
5059
|
+
* | Property | Value |
|
|
5060
|
+
* | ------------------------------ | ----------------------------------------------------------------- |
|
|
5061
|
+
* | Code | `slug` |
|
|
5062
|
+
* | Built-in editors for the field | `slug` |
|
|
5063
|
+
* | Available validators | `required`, `unique`, `length`, `slug_format`, `slug_title_field` |
|
|
5059
5064
|
*
|
|
5060
5065
|
* </details>
|
|
5061
5066
|
*
|
|
@@ -5145,12 +5150,12 @@ export type ItemTypeUpdateSchema = {
|
|
|
5145
5150
|
* <details>
|
|
5146
5151
|
* <summary>Structured text (<code>structured_text</code>)</summary>
|
|
5147
5152
|
*
|
|
5148
|
-
* | Property | Value
|
|
5149
|
-
* | ------------------------------ |
|
|
5150
|
-
* | Code | `structured_text`
|
|
5151
|
-
* | Built-in editors for the field | `structured_text`
|
|
5152
|
-
* | Required validators | `structured_text_blocks`, `structured_text_links`
|
|
5153
|
-
* | Other validators available | `length`, `structured_text_inline_blocks`
|
|
5153
|
+
* | Property | Value |
|
|
5154
|
+
* | ------------------------------ | ----------------------------------------------------- |
|
|
5155
|
+
* | Code | `structured_text` |
|
|
5156
|
+
* | Built-in editors for the field | `structured_text` |
|
|
5157
|
+
* | Required validators | `structured_text_blocks`, `structured_text_links` |
|
|
5158
|
+
* | Other validators available | `required`, `length`, `structured_text_inline_blocks` |
|
|
5154
5159
|
*
|
|
5155
5160
|
* </details>
|
|
5156
5161
|
*
|
|
@@ -5464,9 +5469,9 @@ export type ItemTypeUpdateSchema = {
|
|
|
5464
5469
|
* </details>
|
|
5465
5470
|
*
|
|
5466
5471
|
* <details>
|
|
5467
|
-
* <summary><code>
|
|
5472
|
+
* <summary><code>sanitized_html</code></summary>
|
|
5468
5473
|
*
|
|
5469
|
-
* Checks for the presence of malicious
|
|
5474
|
+
* Checks for the presence of malicious code in HTML fields: content is valid if no dangerous code is present.
|
|
5470
5475
|
*
|
|
5471
5476
|
* | Parameter | Type | Required | Description |
|
|
5472
5477
|
* | ---------------------------- | --------- | -------- | ------------------------------------------------------------ |
|
|
@@ -5693,10 +5698,10 @@ export type ItemTypeUpdateSchema = {
|
|
|
5693
5698
|
*
|
|
5694
5699
|
* Built-in editor for _seo_ fields.
|
|
5695
5700
|
*
|
|
5696
|
-
* | Parameter | Type | Required | Description
|
|
5697
|
-
* | ---------- | --------------- | -------- |
|
|
5698
|
-
* | `fields` | `Array<String>` | ✅ | Specify which fields of the SEO input should be visible to editors. Valid values: `"title"`, `"description"`, `"image"`, `"no_index"`, `"twitter_card"`
|
|
5699
|
-
* | `previews` | `Array<String>` | ✅ | Specify which previews should be visible to editors. Valid values: `"
|
|
5701
|
+
* | Parameter | Type | Required | Description |
|
|
5702
|
+
* | ---------- | --------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
5703
|
+
* | `fields` | `Array<String>` | ✅ | Specify which fields of the SEO input should be visible to editors. Valid values: `"title"`, `"description"`, `"image"`, `"no_index"`, `"twitter_card"` |
|
|
5704
|
+
* | `previews` | `Array<String>` | ✅ | Specify which previews should be visible to editors. Valid values: `"google"`, `"twitter"`, `"slack"`, `"whatsapp"`, `"telegram"`, `"facebook"`, `"linkedin"` |
|
|
5700
5705
|
*
|
|
5701
5706
|
* </details>
|
|
5702
5707
|
*
|
|
@@ -5858,7 +5863,6 @@ export type FieldStableShell = {
|
|
|
5858
5863
|
};
|
|
5859
5864
|
[k: string]: unknown;
|
|
5860
5865
|
}[];
|
|
5861
|
-
[k: string]: unknown;
|
|
5862
5866
|
};
|
|
5863
5867
|
/**
|
|
5864
5868
|
* Ordering index
|
|
@@ -5960,7 +5964,6 @@ export type FieldAttributesStableShell = {
|
|
|
5960
5964
|
};
|
|
5961
5965
|
[k: string]: unknown;
|
|
5962
5966
|
}[];
|
|
5963
|
-
[k: string]: unknown;
|
|
5964
5967
|
};
|
|
5965
5968
|
/**
|
|
5966
5969
|
* Ordering index
|
|
@@ -6055,7 +6058,6 @@ export type FieldCreateSchemaStableShell = {
|
|
|
6055
6058
|
};
|
|
6056
6059
|
[k: string]: unknown;
|
|
6057
6060
|
}[];
|
|
6058
|
-
[k: string]: unknown;
|
|
6059
6061
|
};
|
|
6060
6062
|
/**
|
|
6061
6063
|
* Ordering index
|
|
@@ -6153,7 +6155,6 @@ export type FieldUpdateSchemaStableShell = {
|
|
|
6153
6155
|
};
|
|
6154
6156
|
[k: string]: unknown;
|
|
6155
6157
|
}[];
|
|
6156
|
-
[k: string]: unknown;
|
|
6157
6158
|
};
|
|
6158
6159
|
/**
|
|
6159
6160
|
* Ordering index
|
|
@@ -62,7 +62,7 @@ export class Client {
|
|
|
62
62
|
return this.config.baseUrl || Client.defaultBaseUrl;
|
|
63
63
|
}
|
|
64
64
|
request(options) {
|
|
65
|
-
return request(Object.assign(Object.assign(Object.assign({}, this.config), options), { logFn: this.config.logFn || console.log, userAgent: '@datocms/cma-client v5.1.
|
|
65
|
+
return request(Object.assign(Object.assign(Object.assign({}, this.config), options), { logFn: this.config.logFn || console.log, userAgent: '@datocms/cma-client v5.1.25', baseUrl: this.baseUrl, preCallStack: new Error().stack, extraHeaders: Object.assign(Object.assign(Object.assign({}, (this.config.extraHeaders || {})), (this.config.environment
|
|
66
66
|
? { 'X-Environment': this.config.environment }
|
|
67
67
|
: {})), { 'X-API-Version': '3' }), fetchJobResult: (jobId) => {
|
|
68
68
|
return this.jobResultsFetcher
|
|
@@ -4516,6 +4516,13 @@ export type ItemTypeDestroyTargetSchema = {
|
|
|
4516
4516
|
export type ItemTypeDestroyJobSchema = {
|
|
4517
4517
|
data: ItemType;
|
|
4518
4518
|
};
|
|
4519
|
+
/**
|
|
4520
|
+
* This interface was referenced by `ItemType`'s JSON-Schema
|
|
4521
|
+
* via the `referencing.targetSchema` link.
|
|
4522
|
+
*/
|
|
4523
|
+
export type ItemTypeReferencingTargetSchema = {
|
|
4524
|
+
data: ItemType[];
|
|
4525
|
+
};
|
|
4519
4526
|
/**
|
|
4520
4527
|
* This interface was referenced by `ItemType`'s JSON-Schema
|
|
4521
4528
|
* via the `reorder_fields_and_fieldsets.schema` link.
|
|
@@ -4686,11 +4693,11 @@ export type ItemTypeReorderFieldsAndFieldsetsJobSchema = {
|
|
|
4686
4693
|
* <details>
|
|
4687
4694
|
* <summary>Multi-line text (<code>text</code>)</summary>
|
|
4688
4695
|
*
|
|
4689
|
-
* | Property | Value
|
|
4690
|
-
* | ------------------------------ |
|
|
4691
|
-
* | Code | `text`
|
|
4692
|
-
* | Built-in editors for the field | `markdown`, `wysiwyg`, `textarea`
|
|
4693
|
-
* | Available validators | `required`, `length`, `format`, `
|
|
4696
|
+
* | Property | Value |
|
|
4697
|
+
* | ------------------------------ | ------------------------------------------------ |
|
|
4698
|
+
* | Code | `text` |
|
|
4699
|
+
* | Built-in editors for the field | `markdown`, `wysiwyg`, `textarea` |
|
|
4700
|
+
* | Available validators | `required`, `length`, `format`, `sanitized_html` |
|
|
4694
4701
|
*
|
|
4695
4702
|
* </details>
|
|
4696
4703
|
*
|
|
@@ -4796,11 +4803,11 @@ export type ItemTypeReorderFieldsAndFieldsetsJobSchema = {
|
|
|
4796
4803
|
* <details>
|
|
4797
4804
|
* <summary>Slug (<code>slug</code>)</summary>
|
|
4798
4805
|
*
|
|
4799
|
-
* | Property | Value
|
|
4800
|
-
* | ------------------------------ |
|
|
4801
|
-
* | Code | `slug`
|
|
4802
|
-
* | Built-in editors for the field | `slug`
|
|
4803
|
-
* | Available validators | `required`, `length`, `slug_format`, `slug_title_field` |
|
|
4806
|
+
* | Property | Value |
|
|
4807
|
+
* | ------------------------------ | ----------------------------------------------------------------- |
|
|
4808
|
+
* | Code | `slug` |
|
|
4809
|
+
* | Built-in editors for the field | `slug` |
|
|
4810
|
+
* | Available validators | `required`, `unique`, `length`, `slug_format`, `slug_title_field` |
|
|
4804
4811
|
*
|
|
4805
4812
|
* </details>
|
|
4806
4813
|
*
|
|
@@ -4890,12 +4897,12 @@ export type ItemTypeReorderFieldsAndFieldsetsJobSchema = {
|
|
|
4890
4897
|
* <details>
|
|
4891
4898
|
* <summary>Structured text (<code>structured_text</code>)</summary>
|
|
4892
4899
|
*
|
|
4893
|
-
* | Property | Value
|
|
4894
|
-
* | ------------------------------ |
|
|
4895
|
-
* | Code | `structured_text`
|
|
4896
|
-
* | Built-in editors for the field | `structured_text`
|
|
4897
|
-
* | Required validators | `structured_text_blocks`, `structured_text_links`
|
|
4898
|
-
* | Other validators available | `length`, `structured_text_inline_blocks`
|
|
4900
|
+
* | Property | Value |
|
|
4901
|
+
* | ------------------------------ | ----------------------------------------------------- |
|
|
4902
|
+
* | Code | `structured_text` |
|
|
4903
|
+
* | Built-in editors for the field | `structured_text` |
|
|
4904
|
+
* | Required validators | `structured_text_blocks`, `structured_text_links` |
|
|
4905
|
+
* | Other validators available | `required`, `length`, `structured_text_inline_blocks` |
|
|
4899
4906
|
*
|
|
4900
4907
|
* </details>
|
|
4901
4908
|
*
|
|
@@ -5209,9 +5216,9 @@ export type ItemTypeReorderFieldsAndFieldsetsJobSchema = {
|
|
|
5209
5216
|
* </details>
|
|
5210
5217
|
*
|
|
5211
5218
|
* <details>
|
|
5212
|
-
* <summary><code>
|
|
5219
|
+
* <summary><code>sanitized_html</code></summary>
|
|
5213
5220
|
*
|
|
5214
|
-
* Checks for the presence of malicious
|
|
5221
|
+
* Checks for the presence of malicious code in HTML fields: content is valid if no dangerous code is present.
|
|
5215
5222
|
*
|
|
5216
5223
|
* | Parameter | Type | Required | Description |
|
|
5217
5224
|
* | ---------------------------- | --------- | -------- | ------------------------------------------------------------ |
|
|
@@ -5438,10 +5445,10 @@ export type ItemTypeReorderFieldsAndFieldsetsJobSchema = {
|
|
|
5438
5445
|
*
|
|
5439
5446
|
* Built-in editor for _seo_ fields.
|
|
5440
5447
|
*
|
|
5441
|
-
* | Parameter | Type | Required | Description
|
|
5442
|
-
* | ---------- | --------------- | -------- |
|
|
5443
|
-
* | `fields` | `Array<String>` | ✅ | Specify which fields of the SEO input should be visible to editors. Valid values: `"title"`, `"description"`, `"image"`, `"no_index"`, `"twitter_card"`
|
|
5444
|
-
* | `previews` | `Array<String>` | ✅ | Specify which previews should be visible to editors. Valid values: `"
|
|
5448
|
+
* | Parameter | Type | Required | Description |
|
|
5449
|
+
* | ---------- | --------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
5450
|
+
* | `fields` | `Array<String>` | ✅ | Specify which fields of the SEO input should be visible to editors. Valid values: `"title"`, `"description"`, `"image"`, `"no_index"`, `"twitter_card"` |
|
|
5451
|
+
* | `previews` | `Array<String>` | ✅ | Specify which previews should be visible to editors. Valid values: `"google"`, `"twitter"`, `"slack"`, `"whatsapp"`, `"telegram"`, `"facebook"`, `"linkedin"` |
|
|
5445
5452
|
*
|
|
5446
5453
|
* </details>
|
|
5447
5454
|
*
|
|
@@ -5613,7 +5620,6 @@ export type FieldAttributesStableShell = {
|
|
|
5613
5620
|
};
|
|
5614
5621
|
[k: string]: unknown;
|
|
5615
5622
|
}[];
|
|
5616
|
-
[k: string]: unknown;
|
|
5617
5623
|
};
|
|
5618
5624
|
/**
|
|
5619
5625
|
* Ordering index
|
|
@@ -5723,7 +5729,6 @@ export type FieldCreateSchemaStableShell = {
|
|
|
5723
5729
|
};
|
|
5724
5730
|
[k: string]: unknown;
|
|
5725
5731
|
}[];
|
|
5726
|
-
[k: string]: unknown;
|
|
5727
5732
|
};
|
|
5728
5733
|
/**
|
|
5729
5734
|
* Ordering index
|
|
@@ -5850,7 +5855,6 @@ export type FieldUpdateSchemaStableShell = {
|
|
|
5850
5855
|
};
|
|
5851
5856
|
[k: string]: unknown;
|
|
5852
5857
|
}[];
|
|
5853
|
-
[k: string]: unknown;
|
|
5854
5858
|
};
|
|
5855
5859
|
/**
|
|
5856
5860
|
* Ordering index
|