@nohead/sdk 0.3.0 → 0.4.0

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.
@@ -43,7 +43,80 @@ export type RecordFilterValue = string | {
43
43
  exists?: 'true' | 'false';
44
44
  };
45
45
  export type FieldType = 'text' | 'long_text' | 'rich_text' | 'integer' | 'decimal' | 'date' | 'boolean' | 'enum' | 'asset' | 'relation' | 'json';
46
- export type Field = {
46
+ /**
47
+ * A field, typed by its `type`, which also decides the options its `configuration` takes.
48
+ */
49
+ export type Field = ({
50
+ type: 'text';
51
+ } & TextField) | ({
52
+ type: 'long_text';
53
+ } & LongTextField) | ({
54
+ type: 'rich_text';
55
+ } & RichTextField) | ({
56
+ type: 'integer';
57
+ } & IntegerField) | ({
58
+ type: 'decimal';
59
+ } & DecimalField) | ({
60
+ type: 'date';
61
+ } & DateField) | ({
62
+ type: 'boolean';
63
+ } & BooleanField) | ({
64
+ type: 'enum';
65
+ } & EnumField) | ({
66
+ type: 'asset';
67
+ } & AssetField) | ({
68
+ type: 'relation';
69
+ } & RelationField) | ({
70
+ type: 'json';
71
+ } & JsonField);
72
+ export type TextField = FieldProperties & {
73
+ type: 'text';
74
+ configuration: TextFieldConfiguration;
75
+ };
76
+ export type LongTextField = FieldProperties & {
77
+ type: 'long_text';
78
+ configuration: LongTextFieldConfiguration;
79
+ };
80
+ export type RichTextField = FieldProperties & {
81
+ type: 'rich_text';
82
+ configuration: RichTextFieldConfiguration;
83
+ };
84
+ export type IntegerField = FieldProperties & {
85
+ type: 'integer';
86
+ configuration: IntegerFieldConfiguration;
87
+ };
88
+ export type DecimalField = FieldProperties & {
89
+ type: 'decimal';
90
+ configuration: DecimalFieldConfiguration;
91
+ };
92
+ export type DateField = FieldProperties & {
93
+ type: 'date';
94
+ configuration: DateFieldConfiguration;
95
+ };
96
+ export type BooleanField = FieldProperties & {
97
+ type: 'boolean';
98
+ configuration: BooleanFieldConfiguration;
99
+ };
100
+ export type EnumField = FieldProperties & {
101
+ type: 'enum';
102
+ configuration: EnumFieldConfiguration;
103
+ };
104
+ export type AssetField = FieldProperties & {
105
+ type: 'asset';
106
+ configuration: AssetFieldConfiguration;
107
+ };
108
+ export type RelationField = FieldProperties & {
109
+ type: 'relation';
110
+ configuration: RelationFieldConfiguration;
111
+ };
112
+ export type JsonField = FieldProperties & {
113
+ type: 'json';
114
+ configuration: JsonFieldConfiguration;
115
+ };
116
+ /**
117
+ * What every field has; `Field` adds its `type` and that type's `configuration`.
118
+ */
119
+ export type FieldProperties = {
47
120
  /**
48
121
  * Stable field ID. Never changes, even when the field is renamed.
49
122
  */
@@ -57,8 +130,7 @@ export type Field = {
57
130
  /**
58
131
  * Key used in record data. Part of the API contract.
59
132
  */
60
- api_key: string;
61
- type: FieldType;
133
+ key: string;
62
134
  /**
63
135
  * Every record must have a value. Not available for boolean fields (a boolean is true or false; no value reads as false).
64
136
  */
@@ -71,47 +143,6 @@ export type Field = {
71
143
  * Where the field sorts in the collection's order, lowest first. New fields are added last; `PUT /v1/collections/{collection_id}/field-order` changes the order, numbering the fields from 0.
72
144
  */
73
145
  position: number;
74
- /**
75
- * Type-specific options, e.g. `max_length`, `options`, `target_collection_id`,
76
- * `accepted_types` (asset fields: MIME types or `type*` wildcards that newly
77
- * written values must have; any file when absent), `include_time` and
78
- * `time_zone` (date fields, below), `format` (text fields, below),
79
- * `unique` (text and integer fields, below), plus
80
- * the options for searches with API keys: `searchable` (the search words match the
81
- * field; default true for text, long_text, rich_text and enum), `filterable` and
82
- * `sortable` (default false).
83
- *
84
- * Date fields hold a calendar date, `YYYY-MM-DD`, with no time and no
85
- * time zone: returned exactly as written, so it never shows as the day
86
- * before or after. With `include_time: true` they hold a moment: ISO
87
- * 8601 with an offset, stored in UTC and returned in UTC, or with the
88
- * offset of `time_zone` (an IANA name such as `Europe/Copenhagen`,
89
- * daylight saving included) when the field has one. Input may use any
90
- * offset. Changing `time_zone` never rewrites values; turning
91
- * `include_time` on or off does, through a field migration.
92
- *
93
- * Text fields (not long text) can have a `format`: `slug`
94
- * (lowercase letters, digits and single hyphens, at most 200
95
- * characters; one value per record, never a list, and always
96
- * unique: a slug field has `unique: true`), `url` (an absolute
97
- * `http` or `https` address) or `email`. A value that doesn't match is
98
- * refused with `invalid_format`. A format sets its own length limits
99
- * (254 characters for emails, 2,048 for URLs), so `min_length` and
100
- * `max_length` are for plain text. Text and integer
101
- * fields with one value can be `unique`: no two active records of the
102
- * collection share a value (emails compare ignoring capitals; records
103
- * without a value don't count). A taken value is refused with
104
- * `taken` and the `record_id` that has it. Turning `unique` on is
105
- * refused with `duplicate_values` while records share a value (and
106
- * so is restoring a deleted unique field, `409`). A field migration
107
- * to a unique field is refused with `duplicate_values` when its
108
- * converted values or backfill would be shared, and fails if values
109
- * written while it waits would be.
110
- *
111
- */
112
- configuration: {
113
- [key: string]: unknown;
114
- };
115
146
  /**
116
147
  * When the field was deleted; null unless it is. Its values stay hidden in records until it is restored or purged.
117
148
  */
@@ -121,31 +152,383 @@ export type Field = {
121
152
  */
122
153
  purge_after: NullableTimestamp;
123
154
  /**
124
- * Old API keys of a renamed field that still work until `expires_at`:
155
+ * Old keys of a renamed field that still work until `expires_at`:
125
156
  * record data also carries the value under them, and writes, filters,
126
157
  * sorts and `expand` accept them. Responses about the collection then
127
158
  * have `Deprecation` and `Sunset` headers.
128
159
  *
129
160
  */
130
161
  aliases: Array<{
131
- api_key: string;
162
+ key: string;
132
163
  expires_at: Timestamp;
133
164
  }>;
134
165
  created_at: Timestamp;
135
166
  updated_at: Timestamp;
136
167
  };
168
+ /**
169
+ * Plain text up to 10,000 characters, or a `format`.
170
+ */
171
+ export type TextFieldConfiguration = {
172
+ /**
173
+ * Help text for editors.
174
+ */
175
+ description?: string;
176
+ /**
177
+ * Search words match the field (API searches). Default true for text, long_text, rich_text and enum.
178
+ */
179
+ searchable?: boolean;
180
+ /**
181
+ * API searches can filter on it. Default false.
182
+ */
183
+ filterable?: boolean;
184
+ /**
185
+ * API searches can sort on it (one value only). Default false.
186
+ */
187
+ sortable?: boolean;
188
+ min_length?: number;
189
+ max_length?: number;
190
+ /**
191
+ * `slug` (always unique, one value), `url` (absolute http or https) or `email`; each sets its own length limits.
192
+ */
193
+ format?: 'slug' | 'url' | 'email';
194
+ /**
195
+ * No two active records of the collection share a value (one value only; a slug is always unique).
196
+ */
197
+ unique?: boolean;
198
+ };
199
+ /**
200
+ * Text up to 100,000 characters.
201
+ */
202
+ export type LongTextFieldConfiguration = {
203
+ /**
204
+ * Help text for editors.
205
+ */
206
+ description?: string;
207
+ /**
208
+ * Search words match the field (API searches). Default true for text, long_text, rich_text and enum.
209
+ */
210
+ searchable?: boolean;
211
+ /**
212
+ * API searches can filter on it. Default false.
213
+ */
214
+ filterable?: boolean;
215
+ /**
216
+ * API searches can sort on it (one value only). Default false.
217
+ */
218
+ sortable?: boolean;
219
+ min_length?: number;
220
+ max_length?: number;
221
+ };
222
+ export type RichTextFieldConfiguration = {
223
+ /**
224
+ * Help text for editors.
225
+ */
226
+ description?: string;
227
+ /**
228
+ * Search words match the field (API searches). Default true for text, long_text, rich_text and enum.
229
+ */
230
+ searchable?: boolean;
231
+ /**
232
+ * API searches can filter on it. Default false.
233
+ */
234
+ filterable?: boolean;
235
+ /**
236
+ * API searches can sort on it (one value only). Default false.
237
+ */
238
+ sortable?: boolean;
239
+ };
240
+ export type IntegerFieldConfiguration = {
241
+ /**
242
+ * Help text for editors.
243
+ */
244
+ description?: string;
245
+ /**
246
+ * Search words match the field (API searches). Default true for text, long_text, rich_text and enum.
247
+ */
248
+ searchable?: boolean;
249
+ /**
250
+ * API searches can filter on it. Default false.
251
+ */
252
+ filterable?: boolean;
253
+ /**
254
+ * API searches can sort on it (one value only). Default false.
255
+ */
256
+ sortable?: boolean;
257
+ min?: number;
258
+ max?: number;
259
+ /**
260
+ * No two active records of the collection share a value (one value only).
261
+ */
262
+ unique?: boolean;
263
+ };
264
+ export type DecimalFieldConfiguration = {
265
+ /**
266
+ * Help text for editors.
267
+ */
268
+ description?: string;
269
+ /**
270
+ * Search words match the field (API searches). Default true for text, long_text, rich_text and enum.
271
+ */
272
+ searchable?: boolean;
273
+ /**
274
+ * API searches can filter on it. Default false.
275
+ */
276
+ filterable?: boolean;
277
+ /**
278
+ * API searches can sort on it (one value only). Default false.
279
+ */
280
+ sortable?: boolean;
281
+ min?: number;
282
+ max?: number;
283
+ };
284
+ export type DateFieldConfiguration = {
285
+ /**
286
+ * Help text for editors.
287
+ */
288
+ description?: string;
289
+ /**
290
+ * Search words match the field (API searches). Default true for text, long_text, rich_text and enum.
291
+ */
292
+ searchable?: boolean;
293
+ /**
294
+ * API searches can filter on it. Default false.
295
+ */
296
+ filterable?: boolean;
297
+ /**
298
+ * API searches can sort on it (one value only). Default false.
299
+ */
300
+ sortable?: boolean;
301
+ /**
302
+ * Holds a moment (ISO 8601 with an offset) instead of a calendar date; changing it is a field migration.
303
+ */
304
+ include_time?: boolean;
305
+ /**
306
+ * An IANA time zone (`Europe/Copenhagen`) moments are returned in; changing it never rewrites values.
307
+ */
308
+ time_zone?: string;
309
+ };
310
+ export type BooleanFieldConfiguration = {
311
+ /**
312
+ * Help text for editors.
313
+ */
314
+ description?: string;
315
+ /**
316
+ * Search words match the field (API searches). Default true for text, long_text, rich_text and enum.
317
+ */
318
+ searchable?: boolean;
319
+ /**
320
+ * API searches can filter on it. Default false.
321
+ */
322
+ filterable?: boolean;
323
+ /**
324
+ * API searches can sort on it (one value only). Default false.
325
+ */
326
+ sortable?: boolean;
327
+ };
328
+ export type EnumFieldConfiguration = {
329
+ /**
330
+ * Help text for editors.
331
+ */
332
+ description?: string;
333
+ /**
334
+ * Search words match the field (API searches). Default true for text, long_text, rich_text and enum.
335
+ */
336
+ searchable?: boolean;
337
+ /**
338
+ * API searches can filter on it. Default false.
339
+ */
340
+ filterable?: boolean;
341
+ /**
342
+ * API searches can sort on it (one value only). Default false.
343
+ */
344
+ sortable?: boolean;
345
+ options: Array<string>;
346
+ };
347
+ export type AssetFieldConfiguration = {
348
+ /**
349
+ * Help text for editors.
350
+ */
351
+ description?: string;
352
+ /**
353
+ * Search words match the field (API searches). Default true for text, long_text, rich_text and enum.
354
+ */
355
+ searchable?: boolean;
356
+ /**
357
+ * API searches can filter on it. Default false.
358
+ */
359
+ filterable?: boolean;
360
+ /**
361
+ * API searches can sort on it (one value only). Default false.
362
+ */
363
+ sortable?: boolean;
364
+ /**
365
+ * MIME types or `type*` wildcards newly written values must have (`["image*", "application/pdf"]`); any file when absent.
366
+ */
367
+ accepted_types?: Array<string>;
368
+ };
369
+ export type RelationFieldConfiguration = {
370
+ /**
371
+ * Help text for editors.
372
+ */
373
+ description?: string;
374
+ /**
375
+ * Search words match the field (API searches). Default true for text, long_text, rich_text and enum.
376
+ */
377
+ searchable?: boolean;
378
+ /**
379
+ * API searches can filter on it. Default false.
380
+ */
381
+ filterable?: boolean;
382
+ /**
383
+ * API searches can sort on it (one value only). Default false.
384
+ */
385
+ sortable?: boolean;
386
+ /**
387
+ * The collection (same project) whose records it points at.
388
+ */
389
+ target_collection_id: string;
390
+ };
391
+ export type JsonFieldConfiguration = {
392
+ /**
393
+ * Help text for editors.
394
+ */
395
+ description?: string;
396
+ /**
397
+ * Search words match the field (API searches). Default true for text, long_text, rich_text and enum.
398
+ */
399
+ searchable?: boolean;
400
+ /**
401
+ * API searches can filter on it. Default false.
402
+ */
403
+ filterable?: boolean;
404
+ /**
405
+ * API searches can sort on it (one value only). Default false.
406
+ */
407
+ sortable?: boolean;
408
+ };
409
+ /**
410
+ * Type-specific options, e.g. `max_length`, `options`, `target_collection_id`,
411
+ * `accepted_types` (asset fields: MIME types or `type*` wildcards that newly
412
+ * written values must have; any file when absent), `include_time` and
413
+ * `time_zone` (date fields, below), `format` (text fields, below),
414
+ * `unique` (text and integer fields, below), plus
415
+ * the options for searches with API keys: `searchable` (the search words match the
416
+ * field; default true for text, long_text, rich_text and enum), `filterable` and
417
+ * `sortable` (default false).
418
+ *
419
+ * Date fields hold a calendar date, `YYYY-MM-DD`, with no time and no
420
+ * time zone: returned exactly as written, so it never shows as the day
421
+ * before or after. With `include_time: true` they hold a moment: ISO
422
+ * 8601 with an offset, stored in UTC and returned in UTC, or with the
423
+ * offset of `time_zone` (an IANA name such as `Europe/Copenhagen`,
424
+ * daylight saving included) when the field has one. Input may use any
425
+ * offset. Changing `time_zone` never rewrites values; turning
426
+ * `include_time` on or off does, through a field migration.
427
+ *
428
+ * Text fields (not long text) can have a `format`: `slug`
429
+ * (lowercase letters, digits and single hyphens, at most 200
430
+ * characters; one value per record, never a list, and always
431
+ * unique: a slug field has `unique: true`), `url` (an absolute
432
+ * `http` or `https` address) or `email`. A value that doesn't match is
433
+ * refused with `invalid_format`. A format sets its own length limits
434
+ * (254 characters for emails, 2,048 for URLs), so `min_length` and
435
+ * `max_length` are for plain text. Text and integer
436
+ * fields with one value can be `unique`: no two active records of the
437
+ * collection share a value (emails compare ignoring capitals; records
438
+ * without a value don't count). A taken value is refused with
439
+ * `taken` and the `record_id` that has it. Turning `unique` on is
440
+ * refused with `duplicate_values` while records share a value (and
441
+ * so is restoring a deleted unique field, `409`). A field migration
442
+ * to a unique field is refused with `duplicate_values` when its
443
+ * converted values or backfill would be shared, and fails if values
444
+ * written while it waits would be.
445
+ *
446
+ */
447
+ export type FieldConfiguration = TextFieldConfiguration | LongTextFieldConfiguration | RichTextFieldConfiguration | IntegerFieldConfiguration | DecimalFieldConfiguration | DateFieldConfiguration | BooleanFieldConfiguration | EnumFieldConfiguration | AssetFieldConfiguration | RelationFieldConfiguration | JsonFieldConfiguration;
137
448
  export type RecordCount = {
138
449
  object: 'record_count';
139
450
  collection_id: string;
140
451
  count: number;
141
452
  };
142
- export type FieldCreate = {
453
+ /**
454
+ * A new field. Its `type` decides the options `configuration` takes.
455
+ */
456
+ export type FieldCreate = ({
457
+ type: 'text';
458
+ } & TextFieldCreate) | ({
459
+ type: 'long_text';
460
+ } & LongTextFieldCreate) | ({
461
+ type: 'rich_text';
462
+ } & RichTextFieldCreate) | ({
463
+ type: 'integer';
464
+ } & IntegerFieldCreate) | ({
465
+ type: 'decimal';
466
+ } & DecimalFieldCreate) | ({
467
+ type: 'date';
468
+ } & DateFieldCreate) | ({
469
+ type: 'boolean';
470
+ } & BooleanFieldCreate) | ({
471
+ type: 'enum';
472
+ } & EnumFieldCreate) | ({
473
+ type: 'asset';
474
+ } & AssetFieldCreate) | ({
475
+ type: 'relation';
476
+ } & RelationFieldCreate) | ({
477
+ type: 'json';
478
+ } & JsonFieldCreate);
479
+ export type TextFieldCreate = FieldCreateProperties & {
480
+ type: 'text';
481
+ configuration?: TextFieldConfiguration;
482
+ };
483
+ export type LongTextFieldCreate = FieldCreateProperties & {
484
+ type: 'long_text';
485
+ configuration?: LongTextFieldConfiguration;
486
+ };
487
+ export type RichTextFieldCreate = FieldCreateProperties & {
488
+ type: 'rich_text';
489
+ configuration?: RichTextFieldConfiguration;
490
+ };
491
+ export type IntegerFieldCreate = FieldCreateProperties & {
492
+ type: 'integer';
493
+ configuration?: IntegerFieldConfiguration;
494
+ };
495
+ export type DecimalFieldCreate = FieldCreateProperties & {
496
+ type: 'decimal';
497
+ configuration?: DecimalFieldConfiguration;
498
+ };
499
+ export type DateFieldCreate = FieldCreateProperties & {
500
+ type: 'date';
501
+ configuration?: DateFieldConfiguration;
502
+ };
503
+ export type BooleanFieldCreate = FieldCreateProperties & {
504
+ type: 'boolean';
505
+ configuration?: BooleanFieldConfiguration;
506
+ };
507
+ export type EnumFieldCreate = FieldCreateProperties & {
508
+ type: 'enum';
509
+ configuration: EnumFieldConfiguration;
510
+ };
511
+ export type AssetFieldCreate = FieldCreateProperties & {
512
+ type: 'asset';
513
+ configuration?: AssetFieldConfiguration;
514
+ };
515
+ export type RelationFieldCreate = FieldCreateProperties & {
516
+ type: 'relation';
517
+ configuration: RelationFieldConfiguration;
518
+ };
519
+ export type JsonFieldCreate = FieldCreateProperties & {
520
+ type: 'json';
521
+ configuration?: JsonFieldConfiguration;
522
+ };
523
+ /**
524
+ * What every new field takes; `FieldCreate` adds its `type` and that type's `configuration`.
525
+ */
526
+ export type FieldCreateProperties = {
143
527
  name: string;
144
528
  /**
145
529
  * The field's key in records' `data`, filters and sorts. Reserved for records' own attributes, and a few kept for later: `id`, `object`, `collection`, `data`, `status`, `published_at`, `created_at`, `updated_at`, `deleted`, `deleted_at`, `purge_after`, `revision` and `schema_version`.
146
530
  */
147
- api_key: string;
148
- type: FieldType;
531
+ key: string;
149
532
  /**
150
533
  * Every record must have a value. Not available for boolean fields (a boolean is true or false; no value reads as false).
151
534
  */
@@ -154,28 +537,21 @@ export type FieldCreate = {
154
537
  * A list of distinct values (a repeated value is refused with `duplicate_value`, an empty string with `blank_value`). Not available for boolean, long_text, rich_text and json fields.
155
538
  */
156
539
  multiple?: boolean;
157
- configuration?: {
158
- [key: string]: unknown;
159
- };
160
540
  };
541
+ /**
542
+ * Renames, describes or loosens a field. A change to its `type` or `multiple` rewrites record values, so it is a field migration (`POST /v1/fields/{id}/migrations`); either key here is `400` `unknown_parameter`, saying so.
543
+ */
161
544
  export type FieldUpdate = {
162
545
  name?: string;
163
546
  /**
164
547
  * The field's key in records' `data`, filters and sorts. Reserved for records' own attributes, and a few kept for later: `id`, `object`, `collection`, `data`, `status`, `published_at`, `created_at`, `updated_at`, `deleted`, `deleted_at`, `purge_after`, `revision` and `schema_version`.
165
548
  */
166
- api_key?: string;
167
- type?: FieldType;
549
+ key?: string;
168
550
  /**
169
551
  * Every record must have a value. Not available for boolean fields (a boolean is true or false; no value reads as false).
170
552
  */
171
553
  required?: boolean;
172
- /**
173
- * A list of distinct values (a repeated value is refused with `duplicate_value`, an empty string with `blank_value`). Not available for boolean, long_text, rich_text and json fields.
174
- */
175
- multiple?: boolean;
176
- configuration?: {
177
- [key: string]: unknown;
178
- };
554
+ configuration?: FieldConfiguration;
179
555
  };
180
556
  export type FieldList = {
181
557
  data: Array<Field>;
@@ -240,14 +616,12 @@ export type SchemaDefinition = {
240
616
  fields: Array<{
241
617
  id: string;
242
618
  name: string;
243
- api_key: string;
619
+ key: string;
244
620
  type: FieldType;
245
621
  required: boolean;
246
622
  multiple: boolean;
247
623
  position: number;
248
- configuration: {
249
- [key: string]: unknown;
250
- };
624
+ configuration: FieldConfiguration;
251
625
  deleted_at: NullableTimestamp;
252
626
  }>;
253
627
  };
@@ -301,9 +675,7 @@ export type SchemaChangeList = {
301
675
  };
302
676
  export type FieldDefinition = {
303
677
  type: FieldType;
304
- configuration: {
305
- [key: string]: unknown;
306
- };
678
+ configuration: FieldConfiguration;
307
679
  /**
308
680
  * A list of distinct values (a repeated value is refused with `duplicate_value`, an empty string with `blank_value`). Not available for boolean, long_text, rich_text and json fields.
309
681
  */
@@ -318,9 +690,7 @@ export type FieldMigrationRequest = {
318
690
  /**
319
691
  * The complete new configuration. When the type changes and this is omitted, only `description`, `searchable`, `filterable` and `sortable` carry over.
320
692
  */
321
- configuration?: {
322
- [key: string]: unknown;
323
- };
693
+ configuration?: FieldConfiguration;
324
694
  /**
325
695
  * A list of distinct values (a repeated value is refused with `duplicate_value`, an empty string with `blank_value`). Not available for boolean, long_text, rich_text and json fields.
326
696
  */
@@ -534,7 +904,7 @@ export type Draft = {
534
904
  */
535
905
  data: RecordData;
536
906
  /**
537
- * API keys of the fields the draft changes.
907
+ * Keys of the fields the draft changes.
538
908
  */
539
909
  changed_fields: Array<string>;
540
910
  schedule: DraftSchedule;
@@ -586,7 +956,7 @@ export type MergedDraft = {
586
956
  edited_by: Array<Actor>;
587
957
  };
588
958
  /**
589
- * Field values keyed by field `api_key`. A rich text value is a
959
+ * Field values keyed by field `key`. A rich text value is a
590
960
  * ProseMirror/Tiptap JSON document (`{"type": "doc", "content": [...]}`).
591
961
  * An image of an asset in it is `{"type": "image", "attrs": {"asset_id":
592
962
  * "ast_...", "alt": "..."}}`, between the document's blocks (not inside
@@ -631,7 +1001,7 @@ export type Record = {
631
1001
  data: RecordData;
632
1002
  /**
633
1003
  * Only with `expand`: what each requested relation, asset or rich
634
- * text field points at, keyed by field API key: records for
1004
+ * text field points at, keyed by field key: records for
635
1005
  * relation fields, assets for asset fields. A single value is the object, or null when
636
1006
  * it no longer exists; a multiple value is a list of those that still
637
1007
  * exist. For a rich text field, the list of assets its images show,
@@ -680,11 +1050,11 @@ export type RecordRevisionProperties = {
680
1050
  schema_version: number;
681
1051
  reverted_to_revision: number | null;
682
1052
  /**
683
- * API keys of changed fields, and changed attributes.
1053
+ * Keys of changed fields, and changed attributes.
684
1054
  */
685
1055
  changed_fields: Array<string>;
686
1056
  /**
687
- * API keys of fields whose values in this revision were redacted (owners
1057
+ * Keys of fields whose values in this revision were redacted (owners
688
1058
  * and admins redact them in the web app); those values read
689
1059
  * `{"$redacted": true}`.
690
1060
  *
@@ -1153,7 +1523,7 @@ export type AssetUsage = {
1153
1523
  uses: Array<{
1154
1524
  record: Record;
1155
1525
  /**
1156
- * API keys of the record's fields that use the asset, in its content or its draft.
1526
+ * Keys of the record's fields that use the asset, in its content or its draft.
1157
1527
  */
1158
1528
  fields: Array<string>;
1159
1529
  }>;
@@ -1208,7 +1578,7 @@ export type PublishedOnly = boolean;
1208
1578
  export type ErrorType = 'invalid_request' | 'authentication_error' | 'plan_limit_exceeded' | 'authorization_error' | 'not_found' | 'conflict' | 'precondition_failed' | 'validation_error' | 'rate_limited' | 'internal_error' | 'service_unavailable';
1209
1579
  export type ErrorDetail = {
1210
1580
  /**
1211
- * API key of the offending field or parameter, when applicable.
1581
+ * Key of the offending field or parameter, when applicable.
1212
1582
  */
1213
1583
  field?: string;
1214
1584
  /**
@@ -1263,12 +1633,12 @@ export type DraftId = string;
1263
1633
  */
1264
1634
  export type RevisionNumber = number;
1265
1635
  /**
1266
- * Comma-separated relation, asset or rich text field API keys whose records or assets to embed under `expanded` (at most 5); for a rich text field, the assets its images show. Embedding needs permission to read what is embedded: `records:read` for relations, `assets:read` for assets and rich text (`403` otherwise).
1636
+ * Comma-separated relation, asset or rich text field keys whose records or assets to embed under `expanded` (at most 5); for a rich text field, the assets its images show. Embedding needs permission to read what is embedded: `records:read` for relations, `assets:read` for assets and rich text (`403` otherwise).
1267
1637
  */
1268
1638
  export type Expand = string;
1269
1639
  /**
1270
1640
  * `filter[<key>]=value` (equal), or `filter[<key>][<operator>]=value`;
1271
- * filters combine with AND. Keys are field API keys, `published_at`,
1641
+ * filters combine with AND. Keys are field keys, `published_at`,
1272
1642
  * `deleted` (`true` lists soft-deleted records instead) and, in record
1273
1643
  * lists and counts, `created_at` and `updated_at`. In search,
1274
1644
  * `published_at` takes only `exists`.
@@ -1395,7 +1765,7 @@ export type RecordsListData = {
1395
1765
  query?: {
1396
1766
  /**
1397
1767
  * `filter[<key>]=value` (equal), or `filter[<key>][<operator>]=value`;
1398
- * filters combine with AND. Keys are field API keys, `published_at`,
1768
+ * filters combine with AND. Keys are field keys, `published_at`,
1399
1769
  * `deleted` (`true` lists soft-deleted records instead) and, in record
1400
1770
  * lists and counts, `created_at` and `updated_at`. In search,
1401
1771
  * `published_at` takes only `exists`.
@@ -1425,14 +1795,14 @@ export type RecordsListData = {
1425
1795
  };
1426
1796
  /**
1427
1797
  * `id`, `created_at`, `updated_at`, `published_at` (unpublished
1428
- * records first), or the API key of a text, number, boolean, date or
1798
+ * records first), or the key of a text, number, boolean, date or
1429
1799
  * enum field with one value (records without a value last, in both
1430
1800
  * directions; text by code point). `-` for descending.
1431
1801
  *
1432
1802
  */
1433
1803
  sort?: string;
1434
1804
  /**
1435
- * Comma-separated relation, asset or rich text field API keys whose records or assets to embed under `expanded` (at most 5); for a rich text field, the assets its images show. Embedding needs permission to read what is embedded: `records:read` for relations, `assets:read` for assets and rich text (`403` otherwise).
1805
+ * Comma-separated relation, asset or rich text field keys whose records or assets to embed under `expanded` (at most 5); for a rich text field, the assets its images show. Embedding needs permission to read what is embedded: `records:read` for relations, `assets:read` for assets and rich text (`403` otherwise).
1436
1806
  */
1437
1807
  expand?: string;
1438
1808
  /**
@@ -1448,7 +1818,7 @@ export type RecordsListData = {
1448
1818
  };
1449
1819
  export type RecordsListErrors = {
1450
1820
  /**
1451
- * The request was malformed.
1821
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
1452
1822
  */
1453
1823
  400: Error;
1454
1824
  /**
@@ -1519,7 +1889,7 @@ export type RecordsCreateData = {
1519
1889
  };
1520
1890
  export type RecordsCreateErrors = {
1521
1891
  /**
1522
- * The request was malformed.
1892
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
1523
1893
  */
1524
1894
  400: Error;
1525
1895
  /**
@@ -1605,7 +1975,7 @@ export type RecordsDeleteData = {
1605
1975
  };
1606
1976
  export type RecordsDeleteErrors = {
1607
1977
  /**
1608
- * The request was malformed.
1978
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
1609
1979
  */
1610
1980
  400: Error;
1611
1981
  /**
@@ -1654,7 +2024,7 @@ export type RecordsGetData = {
1654
2024
  };
1655
2025
  query?: {
1656
2026
  /**
1657
- * Comma-separated relation, asset or rich text field API keys whose records or assets to embed under `expanded` (at most 5); for a rich text field, the assets its images show. Embedding needs permission to read what is embedded: `records:read` for relations, `assets:read` for assets and rich text (`403` otherwise).
2027
+ * Comma-separated relation, asset or rich text field keys whose records or assets to embed under `expanded` (at most 5); for a rich text field, the assets its images show. Embedding needs permission to read what is embedded: `records:read` for relations, `assets:read` for assets and rich text (`403` otherwise).
1658
2028
  */
1659
2029
  expand?: string;
1660
2030
  };
@@ -1662,7 +2032,7 @@ export type RecordsGetData = {
1662
2032
  };
1663
2033
  export type RecordsGetErrors = {
1664
2034
  /**
1665
- * The request was malformed.
2035
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
1666
2036
  */
1667
2037
  400: Error;
1668
2038
  /**
@@ -1734,7 +2104,7 @@ export type RecordsUpdateData = {
1734
2104
  };
1735
2105
  export type RecordsUpdateErrors = {
1736
2106
  /**
1737
- * The request was malformed.
2107
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
1738
2108
  */
1739
2109
  400: Error;
1740
2110
  /**
@@ -1791,7 +2161,7 @@ export type RecordsCountData = {
1791
2161
  query?: {
1792
2162
  /**
1793
2163
  * `filter[<key>]=value` (equal), or `filter[<key>][<operator>]=value`;
1794
- * filters combine with AND. Keys are field API keys, `published_at`,
2164
+ * filters combine with AND. Keys are field keys, `published_at`,
1795
2165
  * `deleted` (`true` lists soft-deleted records instead) and, in record
1796
2166
  * lists and counts, `created_at` and `updated_at`. In search,
1797
2167
  * `published_at` takes only `exists`.
@@ -1824,7 +2194,7 @@ export type RecordsCountData = {
1824
2194
  };
1825
2195
  export type RecordsCountErrors = {
1826
2196
  /**
1827
- * The request was malformed.
2197
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
1828
2198
  */
1829
2199
  400: Error;
1830
2200
  /**
@@ -1895,7 +2265,7 @@ export type RecordsBulkData = {
1895
2265
  };
1896
2266
  export type RecordsBulkErrors = {
1897
2267
  /**
1898
- * The request was malformed.
2268
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
1899
2269
  */
1900
2270
  400: Error;
1901
2271
  /**
@@ -1975,7 +2345,7 @@ export type RecordsRestoreData = {
1975
2345
  };
1976
2346
  export type RecordsRestoreErrors = {
1977
2347
  /**
1978
- * The request was malformed.
2348
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
1979
2349
  */
1980
2350
  400: Error;
1981
2351
  /**
@@ -2063,7 +2433,7 @@ export type RecordsUnpublishData = {
2063
2433
  };
2064
2434
  export type RecordsUnpublishErrors = {
2065
2435
  /**
2066
- * The request was malformed.
2436
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
2067
2437
  */
2068
2438
  400: Error;
2069
2439
  /**
@@ -2115,7 +2485,7 @@ export type RecordsGetPublicationData = {
2115
2485
  };
2116
2486
  export type RecordsGetPublicationErrors = {
2117
2487
  /**
2118
- * The request was malformed.
2488
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
2119
2489
  */
2120
2490
  400: Error;
2121
2491
  /**
@@ -2187,7 +2557,7 @@ export type RecordsPublishData = {
2187
2557
  };
2188
2558
  export type RecordsPublishErrors = {
2189
2559
  /**
2190
- * The request was malformed.
2560
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
2191
2561
  */
2192
2562
  400: Error;
2193
2563
  /**
@@ -2255,7 +2625,7 @@ export type RecordsUnscheduleData = {
2255
2625
  };
2256
2626
  export type RecordsUnscheduleErrors = {
2257
2627
  /**
2258
- * The request was malformed.
2628
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
2259
2629
  */
2260
2630
  400: Error;
2261
2631
  /**
@@ -2301,7 +2671,7 @@ export type RecordsGetScheduleData = {
2301
2671
  };
2302
2672
  export type RecordsGetScheduleErrors = {
2303
2673
  /**
2304
- * The request was malformed.
2674
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
2305
2675
  */
2306
2676
  400: Error;
2307
2677
  /**
@@ -2359,7 +2729,7 @@ export type RecordsScheduleData = {
2359
2729
  };
2360
2730
  export type RecordsScheduleErrors = {
2361
2731
  /**
2362
- * The request was malformed.
2732
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
2363
2733
  */
2364
2734
  400: Error;
2365
2735
  /**
@@ -2422,7 +2792,7 @@ export type ScheduledChangesListData = {
2422
2792
  };
2423
2793
  export type ScheduledChangesListErrors = {
2424
2794
  /**
2425
- * The request was malformed.
2795
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
2426
2796
  */
2427
2797
  400: Error;
2428
2798
  /**
@@ -2484,7 +2854,7 @@ export type RecordRevisionsListData = {
2484
2854
  };
2485
2855
  export type RecordRevisionsListErrors = {
2486
2856
  /**
2487
- * The request was malformed.
2857
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
2488
2858
  */
2489
2859
  400: Error;
2490
2860
  /**
@@ -2530,7 +2900,7 @@ export type RecordRevisionsGetData = {
2530
2900
  };
2531
2901
  export type RecordRevisionsGetErrors = {
2532
2902
  /**
2533
- * The request was malformed.
2903
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
2534
2904
  */
2535
2905
  400: Error;
2536
2906
  /**
@@ -2608,7 +2978,7 @@ export type RecordRevisionsRevertData = {
2608
2978
  };
2609
2979
  export type RecordRevisionsRevertErrors = {
2610
2980
  /**
2611
- * The request was malformed.
2981
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
2612
2982
  */
2613
2983
  400: Error;
2614
2984
  /**
@@ -2667,7 +3037,7 @@ export type RecordsDiffData = {
2667
3037
  };
2668
3038
  export type RecordsDiffErrors = {
2669
3039
  /**
2670
- * The request was malformed.
3040
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
2671
3041
  */
2672
3042
  400: Error;
2673
3043
  /**
@@ -2718,7 +3088,7 @@ export type RecordDraftsListData = {
2718
3088
  };
2719
3089
  export type RecordDraftsListErrors = {
2720
3090
  /**
2721
- * The request was malformed.
3091
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
2722
3092
  */
2723
3093
  400: Error;
2724
3094
  /**
@@ -2776,7 +3146,7 @@ export type DraftsCreateData = {
2776
3146
  };
2777
3147
  export type DraftsCreateErrors = {
2778
3148
  /**
2779
- * The request was malformed.
3149
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
2780
3150
  */
2781
3151
  400: Error;
2782
3152
  /**
@@ -2847,7 +3217,7 @@ export type DraftsListData = {
2847
3217
  };
2848
3218
  export type DraftsListErrors = {
2849
3219
  /**
2850
- * The request was malformed.
3220
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
2851
3221
  */
2852
3222
  400: Error;
2853
3223
  /**
@@ -2909,7 +3279,7 @@ export type DraftsDiscardData = {
2909
3279
  };
2910
3280
  export type DraftsDiscardErrors = {
2911
3281
  /**
2912
- * The request was malformed.
3282
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
2913
3283
  */
2914
3284
  400: Error;
2915
3285
  /**
@@ -2958,7 +3328,7 @@ export type DraftsGetData = {
2958
3328
  };
2959
3329
  query?: {
2960
3330
  /**
2961
- * Comma-separated relation, asset or rich text field API keys whose records or assets to embed under `expanded` (at most 5); for a rich text field, the assets its images show. Embedding needs permission to read what is embedded: `records:read` for relations, `assets:read` for assets and rich text (`403` otherwise).
3331
+ * Comma-separated relation, asset or rich text field keys whose records or assets to embed under `expanded` (at most 5); for a rich text field, the assets its images show. Embedding needs permission to read what is embedded: `records:read` for relations, `assets:read` for assets and rich text (`403` otherwise).
2962
3332
  */
2963
3333
  expand?: string;
2964
3334
  };
@@ -2966,7 +3336,7 @@ export type DraftsGetData = {
2966
3336
  };
2967
3337
  export type DraftsGetErrors = {
2968
3338
  /**
2969
- * The request was malformed.
3339
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
2970
3340
  */
2971
3341
  400: Error;
2972
3342
  /**
@@ -3028,7 +3398,7 @@ export type DraftsUpdateData = {
3028
3398
  };
3029
3399
  export type DraftsUpdateErrors = {
3030
3400
  /**
3031
- * The request was malformed.
3401
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
3032
3402
  */
3033
3403
  400: Error;
3034
3404
  /**
@@ -3114,7 +3484,7 @@ export type DraftsMergeData = {
3114
3484
  };
3115
3485
  export type DraftsMergeErrors = {
3116
3486
  /**
3117
- * The request was malformed.
3487
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
3118
3488
  */
3119
3489
  400: Error;
3120
3490
  /**
@@ -3186,7 +3556,7 @@ export type DraftsUnscheduleData = {
3186
3556
  };
3187
3557
  export type DraftsUnscheduleErrors = {
3188
3558
  /**
3189
- * The request was malformed.
3559
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
3190
3560
  */
3191
3561
  400: Error;
3192
3562
  /**
@@ -3248,7 +3618,7 @@ export type DraftsScheduleData = {
3248
3618
  };
3249
3619
  export type DraftsScheduleErrors = {
3250
3620
  /**
3251
- * The request was malformed.
3621
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
3252
3622
  */
3253
3623
  400: Error;
3254
3624
  /**
@@ -3313,7 +3683,7 @@ export type CollectionsListData = {
3313
3683
  };
3314
3684
  export type CollectionsListErrors = {
3315
3685
  /**
3316
- * The request was malformed.
3686
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
3317
3687
  */
3318
3688
  400: Error;
3319
3689
  /**
@@ -3381,7 +3751,7 @@ export type CollectionsCreateData = {
3381
3751
  };
3382
3752
  export type CollectionsCreateErrors = {
3383
3753
  /**
3384
- * The request was malformed.
3754
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
3385
3755
  */
3386
3756
  400: Error;
3387
3757
  /**
@@ -3466,7 +3836,7 @@ export type CollectionsDeleteData = {
3466
3836
  };
3467
3837
  export type CollectionsDeleteErrors = {
3468
3838
  /**
3469
- * The request was malformed.
3839
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
3470
3840
  */
3471
3841
  400: Error;
3472
3842
  /**
@@ -3515,7 +3885,7 @@ export type CollectionsGetData = {
3515
3885
  };
3516
3886
  export type CollectionsGetErrors = {
3517
3887
  /**
3518
- * The request was malformed.
3888
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
3519
3889
  */
3520
3890
  400: Error;
3521
3891
  /**
@@ -3586,7 +3956,7 @@ export type CollectionsUpdateData = {
3586
3956
  };
3587
3957
  export type CollectionsUpdateErrors = {
3588
3958
  /**
3589
- * The request was malformed.
3959
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
3590
3960
  */
3591
3961
  400: Error;
3592
3962
  /**
@@ -3665,7 +4035,7 @@ export type CollectionsRestoreData = {
3665
4035
  };
3666
4036
  export type CollectionsRestoreErrors = {
3667
4037
  /**
3668
- * The request was malformed.
4038
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
3669
4039
  */
3670
4040
  400: Error;
3671
4041
  /**
@@ -3729,7 +4099,7 @@ export type CollectionsGetSchemaData = {
3729
4099
  };
3730
4100
  export type CollectionsGetSchemaErrors = {
3731
4101
  /**
3732
- * The request was malformed.
4102
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
3733
4103
  */
3734
4104
  400: Error;
3735
4105
  /**
@@ -3783,7 +4153,7 @@ export type SchemaChangesListData = {
3783
4153
  };
3784
4154
  export type SchemaChangesListErrors = {
3785
4155
  /**
3786
- * The request was malformed.
4156
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
3787
4157
  */
3788
4158
  400: Error;
3789
4159
  /**
@@ -3818,18 +4188,14 @@ export type SchemaChangesListResponse = SchemaChangesListResponses[keyof SchemaC
3818
4188
  export type SchemaChangesGetData = {
3819
4189
  body?: never;
3820
4190
  path: {
3821
- /**
3822
- * Collection ID, or the collection slug when authenticating with an API key.
3823
- */
3824
- collection_id: string;
3825
4191
  schema_change_id: string;
3826
4192
  };
3827
4193
  query?: never;
3828
- url: '/v1/collections/{collection_id}/schema-changes/{schema_change_id}';
4194
+ url: '/v1/schema-changes/{schema_change_id}';
3829
4195
  };
3830
4196
  export type SchemaChangesGetErrors = {
3831
4197
  /**
3832
- * The request was malformed.
4198
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
3833
4199
  */
3834
4200
  400: Error;
3835
4201
  /**
@@ -3889,7 +4255,7 @@ export type FieldsListData = {
3889
4255
  };
3890
4256
  export type FieldsListErrors = {
3891
4257
  /**
3892
- * The request was malformed.
4258
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
3893
4259
  */
3894
4260
  400: Error;
3895
4261
  /**
@@ -3960,7 +4326,7 @@ export type FieldsCreateData = {
3960
4326
  };
3961
4327
  export type FieldsCreateErrors = {
3962
4328
  /**
3963
- * The request was malformed.
4329
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
3964
4330
  */
3965
4331
  400: Error;
3966
4332
  /**
@@ -4036,7 +4402,7 @@ export type FieldsDeleteData = {
4036
4402
  };
4037
4403
  export type FieldsDeleteErrors = {
4038
4404
  /**
4039
- * The request was malformed.
4405
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
4040
4406
  */
4041
4407
  400: Error;
4042
4408
  /**
@@ -4082,7 +4448,7 @@ export type FieldsGetData = {
4082
4448
  };
4083
4449
  export type FieldsGetErrors = {
4084
4450
  /**
4085
- * The request was malformed.
4451
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
4086
4452
  */
4087
4453
  400: Error;
4088
4454
  /**
@@ -4150,7 +4516,7 @@ export type FieldsUpdateData = {
4150
4516
  };
4151
4517
  export type FieldsUpdateErrors = {
4152
4518
  /**
4153
- * The request was malformed.
4519
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
4154
4520
  */
4155
4521
  400: Error;
4156
4522
  /**
@@ -4203,7 +4569,7 @@ export type FieldsGetOrderData = {
4203
4569
  };
4204
4570
  export type FieldsGetOrderErrors = {
4205
4571
  /**
4206
- * The request was malformed.
4572
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
4207
4573
  */
4208
4574
  400: Error;
4209
4575
  /**
@@ -4276,7 +4642,7 @@ export type FieldsReorderData = {
4276
4642
  };
4277
4643
  export type FieldsReorderErrors = {
4278
4644
  /**
4279
- * The request was malformed.
4645
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
4280
4646
  */
4281
4647
  400: Error;
4282
4648
  /**
@@ -4337,7 +4703,7 @@ export type FieldsRemoveAliasData = {
4337
4703
  path: {
4338
4704
  field_id: string;
4339
4705
  /**
4340
- * The old API key.
4706
+ * The old key.
4341
4707
  */
4342
4708
  alias: string;
4343
4709
  };
@@ -4346,7 +4712,7 @@ export type FieldsRemoveAliasData = {
4346
4712
  };
4347
4713
  export type FieldsRemoveAliasErrors = {
4348
4714
  /**
4349
- * The request was malformed.
4715
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
4350
4716
  */
4351
4717
  400: Error;
4352
4718
  /**
@@ -4418,7 +4784,7 @@ export type FieldsRestoreData = {
4418
4784
  };
4419
4785
  export type FieldsRestoreErrors = {
4420
4786
  /**
4421
- * The request was malformed.
4787
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
4422
4788
  */
4423
4789
  400: Error;
4424
4790
  /**
@@ -4480,7 +4846,7 @@ export type MigrationsListData = {
4480
4846
  };
4481
4847
  export type MigrationsListErrors = {
4482
4848
  /**
4483
- * The request was malformed.
4849
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
4484
4850
  */
4485
4851
  400: Error;
4486
4852
  /**
@@ -4550,7 +4916,7 @@ export type FieldsMigrateData = {
4550
4916
  };
4551
4917
  export type FieldsMigrateErrors = {
4552
4918
  /**
4553
- * The request was malformed.
4919
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
4554
4920
  */
4555
4921
  400: Error;
4556
4922
  /**
@@ -4604,7 +4970,7 @@ export type MigrationsGetData = {
4604
4970
  };
4605
4971
  export type MigrationsGetErrors = {
4606
4972
  /**
4607
- * The request was malformed.
4973
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
4608
4974
  */
4609
4975
  400: Error;
4610
4976
  /**
@@ -4662,7 +5028,7 @@ export type MigrationsCancelData = {
4662
5028
  };
4663
5029
  export type MigrationsCancelErrors = {
4664
5030
  /**
4665
- * The request was malformed.
5031
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
4666
5032
  */
4667
5033
  400: Error;
4668
5034
  /**
@@ -4728,7 +5094,7 @@ export type AssetsListData = {
4728
5094
  };
4729
5095
  export type AssetsListErrors = {
4730
5096
  /**
4731
- * The request was malformed.
5097
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
4732
5098
  */
4733
5099
  400: Error;
4734
5100
  /**
@@ -4786,7 +5152,7 @@ export type AssetsUploadData = {
4786
5152
  };
4787
5153
  export type AssetsUploadErrors = {
4788
5154
  /**
4789
- * The request was malformed.
5155
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
4790
5156
  */
4791
5157
  400: Error;
4792
5158
  /**
@@ -4858,7 +5224,7 @@ export type AssetsCompleteData = {
4858
5224
  };
4859
5225
  export type AssetsCompleteErrors = {
4860
5226
  /**
4861
- * The request was malformed.
5227
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
4862
5228
  */
4863
5229
  400: Error;
4864
5230
  /**
@@ -4924,7 +5290,7 @@ export type AssetsDeleteData = {
4924
5290
  };
4925
5291
  export type AssetsDeleteErrors = {
4926
5292
  /**
4927
- * The request was malformed.
5293
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
4928
5294
  */
4929
5295
  400: Error;
4930
5296
  /**
@@ -4970,7 +5336,7 @@ export type AssetsGetData = {
4970
5336
  };
4971
5337
  export type AssetsGetErrors = {
4972
5338
  /**
4973
- * The request was malformed.
5339
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
4974
5340
  */
4975
5341
  400: Error;
4976
5342
  /**
@@ -5021,7 +5387,7 @@ export type AssetsImageUrlData = {
5021
5387
  };
5022
5388
  export type AssetsImageUrlErrors = {
5023
5389
  /**
5024
- * The request was malformed.
5390
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
5025
5391
  */
5026
5392
  400: Error;
5027
5393
  /**
@@ -5075,7 +5441,7 @@ export type AssetsDownloadUrlData = {
5075
5441
  };
5076
5442
  export type AssetsDownloadUrlErrors = {
5077
5443
  /**
5078
- * The request was malformed.
5444
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
5079
5445
  */
5080
5446
  400: Error;
5081
5447
  /**
@@ -5121,7 +5487,7 @@ export type AssetsUsageData = {
5121
5487
  };
5122
5488
  export type AssetsUsageErrors = {
5123
5489
  /**
5124
- * The request was malformed.
5490
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
5125
5491
  */
5126
5492
  400: Error;
5127
5493
  /**
@@ -5179,7 +5545,7 @@ export type AssetsRestoreData = {
5179
5545
  };
5180
5546
  export type AssetsRestoreErrors = {
5181
5547
  /**
5182
- * The request was malformed.
5548
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
5183
5549
  */
5184
5550
  400: Error;
5185
5551
  /**
@@ -5241,7 +5607,7 @@ export type AssetsPurgeData = {
5241
5607
  };
5242
5608
  export type AssetsPurgeErrors = {
5243
5609
  /**
5244
- * The request was malformed.
5610
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
5245
5611
  */
5246
5612
  400: Error;
5247
5613
  /**
@@ -5300,7 +5666,7 @@ export type CollectionsSearchData = {
5300
5666
  cursor?: string;
5301
5667
  /**
5302
5668
  * `filter[<key>]=value` (equal), or `filter[<key>][<operator>]=value`;
5303
- * filters combine with AND. Keys are field API keys, `published_at`,
5669
+ * filters combine with AND. Keys are field keys, `published_at`,
5304
5670
  * `deleted` (`true` lists soft-deleted records instead) and, in record
5305
5671
  * lists and counts, `created_at` and `updated_at`. In search,
5306
5672
  * `published_at` takes only `exists`.
@@ -5330,7 +5696,7 @@ export type CollectionsSearchData = {
5330
5696
  };
5331
5697
  sort?: string;
5332
5698
  /**
5333
- * Comma-separated relation, asset or rich text field API keys whose records or assets to embed under `expanded` (at most 5); for a rich text field, the assets its images show. Embedding needs permission to read what is embedded: `records:read` for relations, `assets:read` for assets and rich text (`403` otherwise).
5699
+ * Comma-separated relation, asset or rich text field keys whose records or assets to embed under `expanded` (at most 5); for a rich text field, the assets its images show. Embedding needs permission to read what is embedded: `records:read` for relations, `assets:read` for assets and rich text (`403` otherwise).
5334
5700
  */
5335
5701
  expand?: string;
5336
5702
  };
@@ -5338,7 +5704,7 @@ export type CollectionsSearchData = {
5338
5704
  };
5339
5705
  export type CollectionsSearchErrors = {
5340
5706
  /**
5341
- * The request was malformed.
5707
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
5342
5708
  */
5343
5709
  400: Error;
5344
5710
  /**
@@ -5414,7 +5780,7 @@ export type ProjectsSearchData = {
5414
5780
  };
5415
5781
  export type ProjectsSearchErrors = {
5416
5782
  /**
5417
- * The request was malformed.
5783
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
5418
5784
  */
5419
5785
  400: Error;
5420
5786
  /**
@@ -5463,7 +5829,7 @@ export type SearchIndexGetData = {
5463
5829
  };
5464
5830
  export type SearchIndexGetErrors = {
5465
5831
  /**
5466
- * The request was malformed.
5832
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
5467
5833
  */
5468
5834
  400: Error;
5469
5835
  /**
@@ -5524,7 +5890,7 @@ export type SearchIndexRebuildData = {
5524
5890
  };
5525
5891
  export type SearchIndexRebuildErrors = {
5526
5892
  /**
5527
- * The request was malformed.
5893
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
5528
5894
  */
5529
5895
  400: Error;
5530
5896
  /**
@@ -5585,7 +5951,7 @@ export type WebhooksListData = {
5585
5951
  };
5586
5952
  export type WebhooksListErrors = {
5587
5953
  /**
5588
- * The request was malformed.
5954
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
5589
5955
  */
5590
5956
  400: Error;
5591
5957
  /**
@@ -5643,7 +6009,7 @@ export type WebhooksCreateData = {
5643
6009
  };
5644
6010
  export type WebhooksCreateErrors = {
5645
6011
  /**
5646
- * The request was malformed.
6012
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
5647
6013
  */
5648
6014
  400: Error;
5649
6015
  /**
@@ -5715,7 +6081,7 @@ export type WebhooksDeleteData = {
5715
6081
  };
5716
6082
  export type WebhooksDeleteErrors = {
5717
6083
  /**
5718
- * The request was malformed.
6084
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
5719
6085
  */
5720
6086
  400: Error;
5721
6087
  /**
@@ -5761,7 +6127,7 @@ export type WebhooksGetData = {
5761
6127
  };
5762
6128
  export type WebhooksGetErrors = {
5763
6129
  /**
5764
- * The request was malformed.
6130
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
5765
6131
  */
5766
6132
  400: Error;
5767
6133
  /**
@@ -5819,7 +6185,7 @@ export type WebhooksUpdateData = {
5819
6185
  };
5820
6186
  export type WebhooksUpdateErrors = {
5821
6187
  /**
5822
- * The request was malformed.
6188
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
5823
6189
  */
5824
6190
  400: Error;
5825
6191
  /**
@@ -5885,7 +6251,7 @@ export type WebhooksTestData = {
5885
6251
  };
5886
6252
  export type WebhooksTestErrors = {
5887
6253
  /**
5888
- * The request was malformed.
6254
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
5889
6255
  */
5890
6256
  400: Error;
5891
6257
  /**
@@ -5940,7 +6306,7 @@ export type WebhookSecretsListData = {
5940
6306
  };
5941
6307
  export type WebhookSecretsListErrors = {
5942
6308
  /**
5943
- * The request was malformed.
6309
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
5944
6310
  */
5945
6311
  400: Error;
5946
6312
  /**
@@ -5998,7 +6364,7 @@ export type WebhooksRotateSecretData = {
5998
6364
  };
5999
6365
  export type WebhooksRotateSecretErrors = {
6000
6366
  /**
6001
- * The request was malformed.
6367
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
6002
6368
  */
6003
6369
  400: Error;
6004
6370
  /**
@@ -6060,7 +6426,7 @@ export type WebhookSecretsRetireData = {
6060
6426
  };
6061
6427
  export type WebhookSecretsRetireErrors = {
6062
6428
  /**
6063
- * The request was malformed.
6429
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
6064
6430
  */
6065
6431
  400: Error;
6066
6432
  /**
@@ -6122,7 +6488,7 @@ export type WebhooksRestoreData = {
6122
6488
  };
6123
6489
  export type WebhooksRestoreErrors = {
6124
6490
  /**
6125
- * The request was malformed.
6491
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
6126
6492
  */
6127
6493
  400: Error;
6128
6494
  /**
@@ -6186,7 +6552,7 @@ export type WebhookDeliveriesListData = {
6186
6552
  };
6187
6553
  export type WebhookDeliveriesListErrors = {
6188
6554
  /**
6189
- * The request was malformed.
6555
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
6190
6556
  */
6191
6557
  400: Error;
6192
6558
  /**
@@ -6228,7 +6594,7 @@ export type WebhookDeliveriesGetData = {
6228
6594
  };
6229
6595
  export type WebhookDeliveriesGetErrors = {
6230
6596
  /**
6231
- * The request was malformed.
6597
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
6232
6598
  */
6233
6599
  400: Error;
6234
6600
  /**
@@ -6286,7 +6652,7 @@ export type WebhookDeliveriesRetryData = {
6286
6652
  };
6287
6653
  export type WebhookDeliveriesRetryErrors = {
6288
6654
  /**
6289
- * The request was malformed.
6655
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
6290
6656
  */
6291
6657
  400: Error;
6292
6658
  /**
@@ -6365,7 +6731,7 @@ export type AuditEventsListData = {
6365
6731
  };
6366
6732
  export type AuditEventsListErrors = {
6367
6733
  /**
6368
- * The request was malformed.
6734
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
6369
6735
  */
6370
6736
  400: Error;
6371
6737
  /**
@@ -6453,7 +6819,7 @@ export type FeatureFlagsListData = {
6453
6819
  };
6454
6820
  export type FeatureFlagsListErrors = {
6455
6821
  /**
6456
- * The request was malformed.
6822
+ * The request was malformed: unparseable JSON, an invalid query parameter, or a body key the operation doesn't take (detail code `unknown_parameter`, naming the key).
6457
6823
  */
6458
6824
  400: Error;
6459
6825
  /**