@relyio/sdk 0.15.0 → 0.17.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.
Files changed (40) hide show
  1. package/CHANGELOG.md +61 -0
  2. package/dist/{chunk-3BHDGUNS.cjs → chunk-6E22GYPB.cjs} +434 -593
  3. package/dist/chunk-6PTRZP5U.cjs +433 -0
  4. package/dist/{chunk-PCFTJLEP.js → chunk-DIZY6CKM.js} +2 -2
  5. package/dist/{chunk-X4KSS7PP.cjs → chunk-GHYB6IZK.cjs} +2 -2
  6. package/dist/chunk-OVMIHAYK.js +411 -0
  7. package/dist/{chunk-PXA5ONIU.js → chunk-VS2DEUTN.js} +397 -560
  8. package/dist/client/index.cjs +4 -3
  9. package/dist/client/index.d.cts +3 -4
  10. package/dist/client/index.d.ts +3 -4
  11. package/dist/client/index.js +2 -1
  12. package/dist/{define-content-type-B2gQZkTy.d.cts → define-content-type-AuL9-oz6.d.cts} +668 -85
  13. package/dist/{define-content-type-Ds5rCAYl.d.ts → define-content-type-BGoQxqLf.d.ts} +668 -85
  14. package/dist/{define-schema-CxpIYFFR.d.ts → define-schema-DgCX9YB7.d.ts} +1 -1
  15. package/dist/{define-schema-Cm_5y3ei.d.cts → define-schema-DkXwpp0I.d.cts} +1 -1
  16. package/dist/{index-DQ7eTUPQ.d.ts → index-BBp8_tn9.d.ts} +467 -193
  17. package/dist/{index-DY64WjZM.d.cts → index-Bp4AiNT3.d.cts} +1 -1
  18. package/dist/{index-Db3_tmYf.d.ts → index-DaMZ4FQ_.d.ts} +1 -1
  19. package/dist/{index-F0UuHpRj.d.cts → index-DxRmKPrR.d.cts} +467 -193
  20. package/dist/index.cjs +96 -71
  21. package/dist/index.d.cts +26 -16
  22. package/dist/index.d.ts +26 -16
  23. package/dist/index.js +4 -3
  24. package/dist/markdown/index.cjs +10 -2
  25. package/dist/markdown/index.d.cts +12 -3
  26. package/dist/markdown/index.d.ts +12 -3
  27. package/dist/markdown/index.js +10 -2
  28. package/dist/preview/index.cjs +29 -0
  29. package/dist/preview/index.d.cts +117 -0
  30. package/dist/preview/index.d.ts +117 -0
  31. package/dist/preview/index.js +4 -0
  32. package/dist/rich-text/index.d.cts +2 -2
  33. package/dist/rich-text/index.d.ts +2 -2
  34. package/dist/schema/index.cjs +33 -33
  35. package/dist/schema/index.d.cts +3 -3
  36. package/dist/schema/index.d.ts +3 -3
  37. package/dist/schema/index.js +1 -1
  38. package/dist/types/index.d.cts +1 -1
  39. package/dist/types/index.d.ts +1 -1
  40. package/package.json +10 -4
@@ -439,6 +439,23 @@ interface paths {
439
439
  patch?: never;
440
440
  trace?: never;
441
441
  };
442
+ '/v1/{contentType}/{id}/shared-versions/{versionNumber}/restore': {
443
+ parameters: {
444
+ query?: never;
445
+ header?: never;
446
+ path?: never;
447
+ cookie?: never;
448
+ };
449
+ get?: never;
450
+ put?: never;
451
+ /** Restore the untranslated fields from a version */
452
+ post: operations['restoreSharedEntryVersion'];
453
+ delete?: never;
454
+ options?: never;
455
+ head?: never;
456
+ patch?: never;
457
+ trace?: never;
458
+ };
442
459
  '/v1/{contentType}/{id}/versions': {
443
460
  parameters: {
444
461
  query?: never;
@@ -1010,7 +1027,7 @@ interface components {
1010
1027
  retriable?: boolean;
1011
1028
  };
1012
1029
  };
1013
- /** @description An asset entry’s `urls`, sent beside its `file` once `file.status` is `ready`: an image’s `original` and `variants`, a file’s `original`, a video’s `playback`, `poster` and `download`. Every URL is on the delivery gateway; a protected or private asset’s carries a short-lived token minted for this request. */
1030
+ /** @description An asset entry’s `urls`, sent beside its `file` once `file.status` is `ready`: an image’s `original` and `variants`, a file’s `original`, a video’s `playback`, `poster`, `download`, `captions`, `storyboard` and `storyboardSprite`. Every URL is on the delivery gateway; a protected or private asset’s carries a short-lived token minted for this request. */
1014
1031
  AssetUrls: {
1015
1032
  /** @description An image or a file: its original bytes. */
1016
1033
  original?: string;
@@ -1024,6 +1041,14 @@ interface components {
1024
1041
  poster?: string;
1025
1042
  /** @description A video: its downloadable MP4, when enabled. */
1026
1043
  download?: string;
1044
+ /** @description A video: each caption locale its type declares (`video.captions.requiredLocales`), mapped to that WebVTT track’s URL. */
1045
+ captions?: {
1046
+ [key: string]: string;
1047
+ };
1048
+ /** @description A video: its storyboard — the WebVTT thumbnail track for scrubbing previews — once enrichment found it available. */
1049
+ storyboard?: string;
1050
+ /** @description A video: the sprite sheet its storyboard’s cues address, beside `storyboard`. */
1051
+ storyboardSprite?: string;
1027
1052
  };
1028
1053
  /** @description One distinct value of the field, and the entry it was first found in. */
1029
1054
  AutocompleteSuggestion: {
@@ -1060,6 +1085,90 @@ interface components {
1060
1085
  /** @description Opaque. The cursor of the ledger row this change came from; changes from one row share it. */
1061
1086
  cursor: string;
1062
1087
  };
1088
+ /** @description The entry a create published: its fields at the top level and `_metadata`, which also lists the warnings the publish landed with. */
1089
+ CreatedEntry: {
1090
+ _metadata: components['schemas']['CreatedEntryMetadata'];
1091
+ } & {
1092
+ [key: string]: unknown;
1093
+ };
1094
+ /** @description What this service reports about an entry beside its fields, and the warnings the create that published it landed with. */
1095
+ CreatedEntryMetadata: {
1096
+ id: string;
1097
+ /** @description The content type. */
1098
+ type: string;
1099
+ /** @enum {string} */
1100
+ entryType: 'asset' | 'content' | 'settings' | 'singleton';
1101
+ /** @description The slug field’s value at `locale`, or null when the type declares none. */
1102
+ slug: string | null;
1103
+ /**
1104
+ * @description Container lifecycle only. Publication is per locale: `localeStatus`.
1105
+ * @enum {string}
1106
+ */
1107
+ status: 'active' | 'archived' | 'proposed';
1108
+ /** @description The reported locale’s own version counter — not the entry’s shared-field counter. `0` when that locale has no content of its own; a write checked at `0` goes through only while that is still so. With `id`, `locale` and `sharedVersion`, it is what `X-Entity-Tag` is minted from. */
1109
+ version: number;
1110
+ /** @description The shared (non-localized) fields’ version counter, the same in every locale. A write checked against it is refused once it has moved only when the write changes a shared field. */
1111
+ sharedVersion: number;
1112
+ /** @description The locale the fields beside this object were composed for. */
1113
+ locale: string;
1114
+ /** @description How many versions `locale` has. Sent on a single-entry read; a list leaves it out. */
1115
+ versionCount?: number;
1116
+ /** @description `locale`’s version numbers, newest first, at most 25. Sent on a single-entry read; a list leaves it out. */
1117
+ versions?: number[];
1118
+ /**
1119
+ * @description Publication state of `locale`. Absent when that locale has no content of its own: what is visible in it is inherited through the fallback chain.
1120
+ * @enum {string}
1121
+ */
1122
+ localeStatus?: 'archived' | 'draft' | 'published';
1123
+ /** @description Whether `locale` has unpublished changes of its own. */
1124
+ localeHasDraft: boolean;
1125
+ /** @description Every locale holding unpublished content of its own, sorted. A shared-field draft is not listed: it is `hasDraft`. */
1126
+ draftLocales: string[];
1127
+ /** @description Whether the shared (non-localized) fields have unpublished changes. Publishing any locale makes them live, so they are unpublished work in every locale. */
1128
+ hasDraft: boolean;
1129
+ /** @description The locale the request named, when it named one other than the default. On `?locales=a,b,c` it is always sent: the primary, or `*` when the list names as many locales as the entry has — as on `?locale=*`. */
1130
+ requestedLocale?: string;
1131
+ /** @description The schema’s default locale. */
1132
+ defaultLocale: string;
1133
+ /** @description Each field whose value came from another locale, mapped to that locale. Absent when none did. */
1134
+ localeFallbacksApplied?: {
1135
+ [key: string]: string;
1136
+ };
1137
+ /** @description Each required field the entry holds no value for, which this read filled with its kind’s empty value — `""` for text, the tree holding nothing (`{ _type: "richText", version: 1, children: [] }`) for rich text, `[]` for a list, `false` for a boolean — so a required field is always present. A draft may leave these empty; publishing refuses it. Each is a value path, a list item named by its key: `title`, `seo.title`, `faq[_key=="k1"].question` — the spelling a validation error’s path uses, so a path still finds its item after a reorder. Absent when none was filled. */
1138
+ emptyRequiredFields?: string[];
1139
+ /** @description Every locale the entry has content in, the default first. */
1140
+ availableLocales: components['schemas']['EntryLocale'][];
1141
+ /** @description The fields of every other locale asked for, keyed by locale. Present on every `?locale=*` or `?locales=` read — `{}` when no other locale has visible fields — and absent on a single-locale read. A locale with no visible fields is left out. */
1142
+ localizations?: {
1143
+ [key: string]: {
1144
+ [key: string]: unknown;
1145
+ };
1146
+ };
1147
+ /**
1148
+ * Format: date-time
1149
+ * @description When the entry was created.
1150
+ */
1151
+ createdAt: string;
1152
+ /**
1153
+ * Format: date-time
1154
+ * @description When the entry was last written.
1155
+ */
1156
+ updatedAt: string;
1157
+ /**
1158
+ * Format: date-time
1159
+ * @description When the entry was last published. Absent until it is.
1160
+ */
1161
+ publishedAt?: string;
1162
+ /**
1163
+ * Format: date-time
1164
+ * @description When the entry was first published. Absent until it is.
1165
+ */
1166
+ firstPublishedAt?: string;
1167
+ /** @description The entry’s outgoing references, across every locale, each once. */
1168
+ refs: components['schemas']['EntryRef'][];
1169
+ /** @description Each reference the content type declares `weak` that this create made live while the entry it points at is not published, as a `REFERENCE_NOT_PUBLISHED` warning at its place. The write is never refused for them; a strong reference to an unpublished entry is refused instead. Empty when there are none, and when the write made nothing live. A replay of the create under the same `Idempotency-Key` answers the warnings the create did. */
1170
+ warnings: components['schemas']['WriteWarning'][];
1171
+ };
1063
1172
  CursorPage: {
1064
1173
  nextCursor: string | null;
1065
1174
  hasMore: boolean;
@@ -1068,9 +1177,60 @@ interface components {
1068
1177
  /** @description Locale of the binding to delete */
1069
1178
  locale?: string;
1070
1179
  };
1071
- /** @description One entry: its fields at the top level, as the content type declares them, and `_metadata`. An asset entry also carries `file`, an `AssetFile`, and `urls`, an `AssetUrls`, once the file is ready. */
1180
+ /** @description One version of a singleton or a settings group: the fields that locale stored when the version was written, and which version of which locale it is. */
1181
+ DocumentVersion: {
1182
+ /** @description The version’s own number, on `locale`’s counter. */
1183
+ version: number;
1184
+ /** @description That locale’s own fields, as stored when the version was written. */
1185
+ fields: {
1186
+ [key: string]: unknown;
1187
+ };
1188
+ /** @description The locale the version belongs to. */
1189
+ locale: string;
1190
+ /**
1191
+ * Format: date-time
1192
+ * @description When the version was published.
1193
+ */
1194
+ publishedAt: string;
1195
+ /** @description Who wrote the version. */
1196
+ publishedBy: string;
1197
+ };
1198
+ /** @description A singleton’s or a settings group’s version history in one locale, newest first, and the version it is at now. */
1199
+ DocumentVersionHistory: {
1200
+ /** @description The listed locale’s own version counter, the number its `_metadata.version` reports when the document is read in that locale. A locale with nothing written of its own, or one the key cannot read, reports 0 and lists no versions. */
1201
+ currentVersion: number;
1202
+ /** @description The locale’s versions, newest first. */
1203
+ versions: components['schemas']['DocumentVersionRow'][];
1204
+ };
1205
+ /** @description One row of a singleton’s or a settings group’s version history: which version of which locale it is, who wrote it and when. The fields it stored are not listed; read one version for them. */
1206
+ DocumentVersionRow: {
1207
+ /** @description The version’s own number, on `locale`’s counter. */
1208
+ version: number;
1209
+ /** @description The locale the version belongs to. */
1210
+ locale: string;
1211
+ /**
1212
+ * Format: date-time
1213
+ * @description When the version was published.
1214
+ */
1215
+ publishedAt: string;
1216
+ /** @description Who wrote the version. */
1217
+ publishedBy: string;
1218
+ };
1219
+ /** @description The entry, or a locale the write reaches, has unpublished changes made in the Studio, and a write through this API would land on top of them. Publish or discard the draft, then retry. */
1220
+ DraftExistsBlockage: {
1221
+ /** @enum {string} */
1222
+ kind: 'draft-exists';
1223
+ facts: Record<string, never>;
1224
+ };
1225
+ /** @description One entry: its fields at the top level, as the content type declares them, and `_metadata`. An asset entry also carries `file`, an `AssetFile`, and `urls`, an `AssetUrls`, once the file is ready. A read that asks for `children` also carries `_children`. */
1072
1226
  Entry: {
1073
1227
  _metadata: components['schemas']['EntryMetadata'];
1228
+ /** @description The entry’s first children, of every content type, to the depth the read asked for in `children`: `data` holds at most `page.limit` of them (`childrenLimit`), always from `page.offset` 0, and `page.total` counts the entry’s children, so more remain when the length of `data` is less than `page.total`. This block does not page: `GET /{contentType}/{id}/children` lists every child from its own first page, by its own cursor. For a key limited to some locales `page.total` is an upper bound, since it still counts children past `page.limit` that hold none of the key’s locales. Present only on a read that asked. */
1229
+ _children?: {
1230
+ /** @description The children, in the hierarchy’s order. */
1231
+ data: components['schemas']['Entry'][];
1232
+ page: components['schemas']['OffsetPage'];
1233
+ };
1074
1234
  } & {
1075
1235
  [key: string]: unknown;
1076
1236
  };
@@ -1134,7 +1294,7 @@ interface components {
1134
1294
  emptyRequiredFields?: string[];
1135
1295
  /** @description Every locale the entry has content in, the default first. */
1136
1296
  availableLocales: components['schemas']['EntryLocale'][];
1137
- /** @description The fields of every other locale asked for, keyed by locale — on `?locales=a,b` and `?locale=*`. A locale with no visible fields is left out. */
1297
+ /** @description The fields of every other locale asked for, keyed by locale. Present on every `?locale=*` or `?locales=` read — `{}` when no other locale has visible fields — and absent on a single-locale read. A locale with no visible fields is left out. */
1138
1298
  localizations?: {
1139
1299
  [key: string]: {
1140
1300
  [key: string]: unknown;
@@ -1170,9 +1330,110 @@ interface components {
1170
1330
  /** @description The referenced entry’s id. */
1171
1331
  entryUid: string;
1172
1332
  };
1333
+ /** @description One version of an entry: the fields that locale stored when the version was written, at the top level and in the active schema’s order — a field since removed included, since a version is history — and `_metadata`. */
1334
+ EntryVersion: {
1335
+ _metadata: components['schemas']['EntryVersionMetadata'];
1336
+ } & {
1337
+ [key: string]: unknown;
1338
+ };
1339
+ /** @description What this service reports about one version of an entry. Not an entry read’s `EntryMetadata`: `version` and `locale` are the row’s own, `status` is `version`, and it carries no default or available locales, no fallback and no version list. */
1340
+ EntryVersionMetadata: {
1341
+ id: string;
1342
+ /** @description The content type the version was written under. */
1343
+ type: string;
1344
+ /** @enum {string} */
1345
+ entryType: 'asset' | 'content' | 'settings' | 'singleton';
1346
+ /** @description The entry’s live slug at the version’s locale, or null when the type declares none. */
1347
+ slug: string | null;
1348
+ /**
1349
+ * @description Always `version`: this is a historical row, not the entry’s lifecycle.
1350
+ * @enum {string}
1351
+ */
1352
+ status: 'version';
1353
+ /** @description The version’s own number, on `locale`’s counter. */
1354
+ version: number;
1355
+ /** @description The entry’s live shared-field counter. A version is not a state a write is checked against, and no `X-Entity-Tag` is minted from it. */
1356
+ sharedVersion: number;
1357
+ /** @description The locale the version belongs to. */
1358
+ locale: string;
1359
+ /**
1360
+ * @description Publication state of `locale` on the live entry. Absent when it has no content of its own.
1361
+ * @enum {string}
1362
+ */
1363
+ localeStatus?: 'archived' | 'draft' | 'published';
1364
+ /** @description Whether `locale` has unpublished changes of its own. */
1365
+ localeHasDraft: boolean;
1366
+ /** @description Every locale holding unpublished content of its own, sorted. A shared-field draft is not listed: it is `hasDraft`. */
1367
+ draftLocales: string[];
1368
+ /** @description Whether the shared (non-localized) fields have unpublished changes. Publishing any locale makes them live, so they are unpublished work in every locale. */
1369
+ hasDraft: boolean;
1370
+ /**
1371
+ * Format: date-time
1372
+ * @description When the version was written.
1373
+ */
1374
+ createdAt: string;
1375
+ /**
1376
+ * Format: date-time
1377
+ * @description When the version was published — the same instant as `publishedAt`.
1378
+ */
1379
+ updatedAt: string;
1380
+ /**
1381
+ * Format: date-time
1382
+ * @description When the version was published.
1383
+ */
1384
+ publishedAt: string;
1385
+ /** @description The references the version held. */
1386
+ refs: components['schemas']['EntryRef'][];
1387
+ };
1388
+ /** @description One row of an entry’s version history in one locale: which version it is, who wrote it and when, and the fields that locale stored. */
1389
+ EntryVersionRow: {
1390
+ /** @description The version’s own number, on `locale`’s counter. */
1391
+ versionNumber: number;
1392
+ /** @description The locale the version belongs to. */
1393
+ locale: string;
1394
+ /** @description That locale’s own fields, as stored when the version was written. */
1395
+ fields: {
1396
+ [key: string]: unknown;
1397
+ };
1398
+ /**
1399
+ * Format: date-time
1400
+ * @description When the version was published.
1401
+ */
1402
+ publishedAt: string;
1403
+ /** @description Who wrote the version. */
1404
+ publishedBy: string;
1405
+ };
1173
1406
  ErrorResponse: {
1174
1407
  error: {
1175
- /** @enum {string} */
1408
+ /**
1409
+ * @description - `ACCESS_DENIED`: The credential is valid, but its subject may not do this here. Fix: Use a key or a Role that grants this action on this resource, or ask an Owner to grant it; `details.rule` names the rule that refused.
1410
+ * - `AI_UNAVAILABLE_IN_REGION`: The Project's data region promises residency, and no AI processes inside that region yet. Fix: Run AI work on a Project in another region; no Plan, credential or retry changes this one.
1411
+ * - `CONTENT_INVALID`: The content does not satisfy the schema of the type it was written to. Fix: Correct each field `details.issues` names so it matches the schema, then write it again.
1412
+ * - `INTERNAL_ERROR`: The service failed while handling the request. Fix: Retry once; if it fails again, report it with the time and the request that failed.
1413
+ * - `INVALID_API_KEY`: The credential was read but is not accepted: it is malformed, expired, revoked, unknown, or a kind this route does not take. Fix: Read `details.reason`, then send a current credential of the kind the route takes, creating a new key if this one was revoked or expired.
1414
+ * - `METHOD_NOT_ALLOWED`: The route does not accept this HTTP method. Fix: Send the request with one of the methods the `Allow` header lists.
1415
+ * - `MISSING_API_KEY`: The request carried no credential, or one that did not authenticate. Fix: Send a credential with the request: an API key in the `X-API-Key` header, or the bearer token the route takes.
1416
+ * - `ORGANIZATION_BEING_DELETED`: The Organization is being deleted, so nothing more may be read from or written to it. Fix: Stop using the Organization: its deletion was asked for at `details.requestedAt`, and no retry succeeds.
1417
+ * - `ORGANIZATION_DELETE_BLOCKED`: The Organization cannot be deleted while a paid subscription or an open checkout still holds it. Fix: Resolve what `details.reason` names: downgrade and wait for the paid period to end, or let the open checkout expire, then delete again.
1418
+ * - `ORGANIZATION_IN_ANOTHER_CELL`: The request reached a region that is not the home of the Organization it names. Fix: Send the same request to the region `details.region` names; retrying it here will not succeed.
1419
+ * - `PAYLOAD_TOO_LARGE`: The request body is larger than the route accepts. Fix: Send a body within `details.limitBytes`, splitting the work across several requests.
1420
+ * - `PLAN_DOWNGRADE_BLOCKED`: The Organization keeps more than the target Plan allows, so it cannot move to it. Fix: Reduce each Stock Limit `details.stockLimits` lists to within the target Plan, then retry the change.
1421
+ * - `PLAN_FEATURE_UNAVAILABLE`: The Organization's Plan does not include the feature this request uses. Fix: Move the Organization to a Plan that includes `details.feature`, or leave the feature out of the request.
1422
+ * - `PROJECT_IN_ANOTHER_CELL`: The request reached a region that does not hold the Project it names. Fix: Send the same request to the region `details.region` names; retrying it here will not succeed.
1423
+ * - `RATE_LIMIT_EXCEEDED`: Too many requests arrived within the current rate-limit window. Fix: Wait the seconds the `Retry-After` header names before retrying, and spread requests out.
1424
+ * - `READ_ONLY_KEY`: The key may read but not write. Fix: Send the write with a key that may write, and keep the read-only key for reads.
1425
+ * - `REQUEST_INVALID`: The request is malformed: a path parameter, query parameter, header or body field the route cannot accept. Fix: Correct each field `details.issues` names, by its path and message, and send the request again.
1426
+ * - `REQUEST_TIMEOUT`: The request ran longer than the service allows and was stopped. Fix: Ask for less in one request, with a narrower filter or a smaller page, then retry.
1427
+ * - `RESOURCE_CONFLICT`: The write conflicts with the resource's current state: it changed since it was read, or something stands in the way. Fix: Re-read the resource and retry with what that read returns, or resolve the blockage `details.blockage` names.
1428
+ * - `RESOURCE_EXPIRED`: What the request names existed but has expired: a cursor the feed can no longer replay from, or an invitation or link past its date. Fix: Start again without it: read afresh instead of from the cursor, or ask for a new invitation or link.
1429
+ * - `RESOURCE_NOT_FOUND`: Nothing the credential can see exists under that id or path. Fix: Check the id, the path and the dataset the request selects; `details.kind` names what was looked for.
1430
+ * - `REVERIFICATION_REQUIRED`: The action hands authority out, and the session verified its factor too long ago. Fix: Have the User verify again at the level `details.level` names, then retry the request.
1431
+ * - `SERVICE_INDETERMINATE`: A service this request depends on could not answer, so the outcome could not be decided. Fix: Retry after the seconds the `Retry-After` header names; `details.missing` names what was unavailable.
1432
+ * - `TRANSACTION_ROLLED_BACK`: One operation of an all-or-nothing batch failed, so none of the batch was applied. Fix: Nothing was written. `details.failedIndex` is the index of the operation this refusal is for, which is not necessarily the one that failed. Fix the batch, then send the whole of it again.
1433
+ * - `USAGE_QUOTA_EXCEEDED`: The Organization has used all of this period's allowance for `details.meter`. Fix: Wait for the next billing period, or raise the allowance by moving to a larger Plan.
1434
+ * - `USER_NOT_PROVISIONED`: The session is valid, but the User's account is still being set up after sign-up. Fix: Keep the session and retry after the seconds the `Retry-After` header names.
1435
+ * @enum {string}
1436
+ */
1176
1437
  code: 'ACCESS_DENIED' | 'AI_UNAVAILABLE_IN_REGION' | 'CONTENT_INVALID' | 'INTERNAL_ERROR' | 'INVALID_API_KEY' | 'METHOD_NOT_ALLOWED' | 'MISSING_API_KEY' | 'ORGANIZATION_BEING_DELETED' | 'ORGANIZATION_DELETE_BLOCKED' | 'ORGANIZATION_IN_ANOTHER_CELL' | 'PAYLOAD_TOO_LARGE' | 'PLAN_DOWNGRADE_BLOCKED' | 'PLAN_FEATURE_UNAVAILABLE' | 'PROJECT_IN_ANOTHER_CELL' | 'RATE_LIMIT_EXCEEDED' | 'READ_ONLY_KEY' | 'REQUEST_INVALID' | 'REQUEST_TIMEOUT' | 'RESOURCE_CONFLICT' | 'RESOURCE_EXPIRED' | 'RESOURCE_NOT_FOUND' | 'REVERIFICATION_REQUIRED' | 'SERVICE_INDETERMINATE' | 'TRANSACTION_ROLLED_BACK' | 'USAGE_QUOTA_EXCEEDED' | 'USER_NOT_PROVISIONED';
1177
1438
  messages: string[];
1178
1439
  details?: {
@@ -1390,7 +1651,10 @@ interface components {
1390
1651
  };
1391
1652
  RefusalAccessDenied: {
1392
1653
  error: {
1393
- /** @enum {string} */
1654
+ /**
1655
+ * @description - `ACCESS_DENIED`: The credential is valid, but its subject may not do this here. Fix: Use a key or a Role that grants this action on this resource, or ask an Owner to grant it; `details.rule` names the rule that refused.
1656
+ * @enum {string}
1657
+ */
1394
1658
  code: 'ACCESS_DENIED';
1395
1659
  messages: string[];
1396
1660
  details?: {
@@ -1400,7 +1664,13 @@ interface components {
1400
1664
  };
1401
1665
  RefusalAccessDeniedOrPlanFeatureUnavailableOrReadOnlyKeyOrUsageQuotaExceeded: {
1402
1666
  error: {
1403
- /** @enum {string} */
1667
+ /**
1668
+ * @description - `ACCESS_DENIED`: The credential is valid, but its subject may not do this here. Fix: Use a key or a Role that grants this action on this resource, or ask an Owner to grant it; `details.rule` names the rule that refused.
1669
+ * - `PLAN_FEATURE_UNAVAILABLE`: The Organization's Plan does not include the feature this request uses. Fix: Move the Organization to a Plan that includes `details.feature`, or leave the feature out of the request.
1670
+ * - `READ_ONLY_KEY`: The key may read but not write. Fix: Send the write with a key that may write, and keep the read-only key for reads.
1671
+ * - `USAGE_QUOTA_EXCEEDED`: The Organization has used all of this period's allowance for `details.meter`. Fix: Wait for the next billing period, or raise the allowance by moving to a larger Plan.
1672
+ * @enum {string}
1673
+ */
1404
1674
  code: 'ACCESS_DENIED' | 'PLAN_FEATURE_UNAVAILABLE' | 'READ_ONLY_KEY' | 'USAGE_QUOTA_EXCEEDED';
1405
1675
  messages: string[];
1406
1676
  details?: {
@@ -1410,7 +1680,12 @@ interface components {
1410
1680
  };
1411
1681
  RefusalAccessDeniedOrPlanFeatureUnavailableOrUsageQuotaExceeded: {
1412
1682
  error: {
1413
- /** @enum {string} */
1683
+ /**
1684
+ * @description - `ACCESS_DENIED`: The credential is valid, but its subject may not do this here. Fix: Use a key or a Role that grants this action on this resource, or ask an Owner to grant it; `details.rule` names the rule that refused.
1685
+ * - `PLAN_FEATURE_UNAVAILABLE`: The Organization's Plan does not include the feature this request uses. Fix: Move the Organization to a Plan that includes `details.feature`, or leave the feature out of the request.
1686
+ * - `USAGE_QUOTA_EXCEEDED`: The Organization has used all of this period's allowance for `details.meter`. Fix: Wait for the next billing period, or raise the allowance by moving to a larger Plan.
1687
+ * @enum {string}
1688
+ */
1414
1689
  code: 'ACCESS_DENIED' | 'PLAN_FEATURE_UNAVAILABLE' | 'USAGE_QUOTA_EXCEEDED';
1415
1690
  messages: string[];
1416
1691
  details?: {
@@ -1420,7 +1695,11 @@ interface components {
1420
1695
  };
1421
1696
  RefusalContentInvalidOrRequestInvalid: {
1422
1697
  error: {
1423
- /** @enum {string} */
1698
+ /**
1699
+ * @description - `CONTENT_INVALID`: The content does not satisfy the schema of the type it was written to. Fix: Correct each field `details.issues` names so it matches the schema, then write it again.
1700
+ * - `REQUEST_INVALID`: The request is malformed: a path parameter, query parameter, header or body field the route cannot accept. Fix: Correct each field `details.issues` names, by its path and message, and send the request again.
1701
+ * @enum {string}
1702
+ */
1424
1703
  code: 'CONTENT_INVALID' | 'REQUEST_INVALID';
1425
1704
  messages: string[];
1426
1705
  details?: {
@@ -1430,7 +1709,10 @@ interface components {
1430
1709
  };
1431
1710
  RefusalInternalError: {
1432
1711
  error: {
1433
- /** @enum {string} */
1712
+ /**
1713
+ * @description - `INTERNAL_ERROR`: The service failed while handling the request. Fix: Retry once; if it fails again, report it with the time and the request that failed.
1714
+ * @enum {string}
1715
+ */
1434
1716
  code: 'INTERNAL_ERROR';
1435
1717
  messages: string[];
1436
1718
  details?: {
@@ -1440,7 +1722,11 @@ interface components {
1440
1722
  };
1441
1723
  RefusalInvalidApiKeyOrMissingApiKey: {
1442
1724
  error: {
1443
- /** @enum {string} */
1725
+ /**
1726
+ * @description - `INVALID_API_KEY`: The credential was read but is not accepted: it is malformed, expired, revoked, unknown, or a kind this route does not take. Fix: Read `details.reason`, then send a current credential of the kind the route takes, creating a new key if this one was revoked or expired.
1727
+ * - `MISSING_API_KEY`: The request carried no credential, or one that did not authenticate. Fix: Send a credential with the request: an API key in the `X-API-Key` header, or the bearer token the route takes.
1728
+ * @enum {string}
1729
+ */
1444
1730
  code: 'INVALID_API_KEY' | 'MISSING_API_KEY';
1445
1731
  messages: string[];
1446
1732
  details?: {
@@ -1450,7 +1736,10 @@ interface components {
1450
1736
  };
1451
1737
  RefusalProjectInAnotherCell: {
1452
1738
  error: {
1453
- /** @enum {string} */
1739
+ /**
1740
+ * @description - `PROJECT_IN_ANOTHER_CELL`: The request reached a region that does not hold the Project it names. Fix: Send the same request to the region `details.region` names; retrying it here will not succeed.
1741
+ * @enum {string}
1742
+ */
1454
1743
  code: 'PROJECT_IN_ANOTHER_CELL';
1455
1744
  messages: string[];
1456
1745
  details: {
@@ -1461,7 +1750,10 @@ interface components {
1461
1750
  };
1462
1751
  RefusalRateLimitExceeded: {
1463
1752
  error: {
1464
- /** @enum {string} */
1753
+ /**
1754
+ * @description - `RATE_LIMIT_EXCEEDED`: Too many requests arrived within the current rate-limit window. Fix: Wait the seconds the `Retry-After` header names before retrying, and spread requests out.
1755
+ * @enum {string}
1756
+ */
1465
1757
  code: 'RATE_LIMIT_EXCEEDED';
1466
1758
  messages: string[];
1467
1759
  details?: {
@@ -1471,7 +1763,10 @@ interface components {
1471
1763
  };
1472
1764
  RefusalRequestInvalid: {
1473
1765
  error: {
1474
- /** @enum {string} */
1766
+ /**
1767
+ * @description - `REQUEST_INVALID`: The request is malformed: a path parameter, query parameter, header or body field the route cannot accept. Fix: Correct each field `details.issues` names, by its path and message, and send the request again.
1768
+ * @enum {string}
1769
+ */
1475
1770
  code: 'REQUEST_INVALID';
1476
1771
  messages: string[];
1477
1772
  details?: {
@@ -1481,7 +1776,10 @@ interface components {
1481
1776
  };
1482
1777
  RefusalRequestTimeout: {
1483
1778
  error: {
1484
- /** @enum {string} */
1779
+ /**
1780
+ * @description - `REQUEST_TIMEOUT`: The request ran longer than the service allows and was stopped. Fix: Ask for less in one request, with a narrower filter or a smaller page, then retry.
1781
+ * @enum {string}
1782
+ */
1485
1783
  code: 'REQUEST_TIMEOUT';
1486
1784
  messages: string[];
1487
1785
  details?: {
@@ -1491,7 +1789,10 @@ interface components {
1491
1789
  };
1492
1790
  RefusalResourceConflict: {
1493
1791
  error: {
1494
- /** @enum {string} */
1792
+ /**
1793
+ * @description - `RESOURCE_CONFLICT`: The write conflicts with the resource's current state: it changed since it was read, or something stands in the way. Fix: Re-read the resource and retry with what that read returns, or resolve the blockage `details.blockage` names.
1794
+ * @enum {string}
1795
+ */
1495
1796
  code: 'RESOURCE_CONFLICT';
1496
1797
  messages: string[];
1497
1798
  details?: {
@@ -1499,19 +1800,44 @@ interface components {
1499
1800
  };
1500
1801
  };
1501
1802
  };
1502
- RefusalResourceExpired: {
1803
+ RefusalResourceConflictNamingDraftExistsBlockageOrReleaseLockedBlockageOrSlugTakenBlockage: {
1503
1804
  error: {
1504
- /** @enum {string} */
1505
- code: 'RESOURCE_EXPIRED';
1805
+ /**
1806
+ * @description - `RESOURCE_CONFLICT`: The write conflicts with the resource's current state: it changed since it was read, or something stands in the way. Fix: Re-read the resource and retry with what that read returns, or resolve the blockage `details.blockage` names.
1807
+ * @enum {string}
1808
+ */
1809
+ code: 'RESOURCE_CONFLICT';
1506
1810
  messages: string[];
1507
1811
  details?: {
1812
+ blockage?: components['schemas']['DraftExistsBlockage'] | components['schemas']['ReleaseLockedBlockage'] | components['schemas']['SlugTakenBlockage'];
1813
+ } & {
1508
1814
  [key: string]: unknown;
1509
1815
  };
1510
1816
  };
1511
1817
  };
1818
+ RefusalResourceExpired: {
1819
+ error: {
1820
+ /**
1821
+ * @description - `RESOURCE_EXPIRED`: What the request names existed but has expired: a cursor the feed can no longer replay from, or an invitation or link past its date. Fix: Start again without it: read afresh instead of from the cursor, or ask for a new invitation or link.
1822
+ * @enum {string}
1823
+ */
1824
+ code: 'RESOURCE_EXPIRED';
1825
+ messages: string[];
1826
+ details: {
1827
+ /**
1828
+ * @description `retention` and `dataset-replaced`: the changes feed cannot replay from the cursor. `version-pruned` and `superseded`: an idempotent replay cannot reproduce the original answer, though the original write happened. `past-expiry`: an invitation past its date.
1829
+ * @enum {string}
1830
+ */
1831
+ reason: 'dataset-replaced' | 'past-expiry' | 'retention' | 'superseded' | 'version-pruned';
1832
+ };
1833
+ };
1834
+ };
1512
1835
  RefusalResourceNotFound: {
1513
1836
  error: {
1514
- /** @enum {string} */
1837
+ /**
1838
+ * @description - `RESOURCE_NOT_FOUND`: Nothing the credential can see exists under that id or path. Fix: Check the id, the path and the dataset the request selects; `details.kind` names what was looked for.
1839
+ * @enum {string}
1840
+ */
1515
1841
  code: 'RESOURCE_NOT_FOUND';
1516
1842
  messages: string[];
1517
1843
  details?: {
@@ -1521,7 +1847,10 @@ interface components {
1521
1847
  };
1522
1848
  RefusalServiceIndeterminate: {
1523
1849
  error: {
1524
- /** @enum {string} */
1850
+ /**
1851
+ * @description - `SERVICE_INDETERMINATE`: A service this request depends on could not answer, so the outcome could not be decided. Fix: Retry after the seconds the `Retry-After` header names; `details.missing` names what was unavailable.
1852
+ * @enum {string}
1853
+ */
1525
1854
  code: 'SERVICE_INDETERMINATE';
1526
1855
  messages: string[];
1527
1856
  details?: {
@@ -1529,6 +1858,12 @@ interface components {
1529
1858
  };
1530
1859
  };
1531
1860
  };
1861
+ /** @description A scheduled release holds the entry and refuses edits to it until the release publishes or lets it go. */
1862
+ ReleaseLockedBlockage: {
1863
+ /** @enum {string} */
1864
+ kind: 'release-locked';
1865
+ facts: Record<string, never>;
1866
+ };
1532
1867
  /** @description The entry after a restore: its fields at the top level and `_metadata`, which also lists what the restore left out and the links other entries publish that it left pointing nowhere. */
1533
1868
  RestoredEntry: {
1534
1869
  _metadata: components['schemas']['RestoredEntryMetadata'];
@@ -1582,7 +1917,7 @@ interface components {
1582
1917
  emptyRequiredFields?: string[];
1583
1918
  /** @description Every locale the entry has content in, the default first. */
1584
1919
  availableLocales: components['schemas']['EntryLocale'][];
1585
- /** @description The fields of every other locale asked for, keyed by locale — on `?locales=a,b` and `?locale=*`. A locale with no visible fields is left out. */
1920
+ /** @description The fields of every other locale asked for, keyed by locale. Present on every `?locale=*` or `?locales=` read — `{}` when no other locale has visible fields — and absent on a single-locale read. A locale with no visible fields is left out. */
1586
1921
  localizations?: {
1587
1922
  [key: string]: {
1588
1923
  [key: string]: unknown;
@@ -1668,7 +2003,7 @@ interface components {
1668
2003
  emptyRequiredFields?: string[];
1669
2004
  /** @description Every locale the entry has content in, the default first. */
1670
2005
  availableLocales: components['schemas']['EntryLocale'][];
1671
- /** @description The fields of every other locale asked for, keyed by locale — on `?locales=a,b` and `?locale=*`. A locale with no visible fields is left out. */
2006
+ /** @description The fields of every other locale asked for, keyed by locale. Present on every `?locale=*` or `?locales=` read — `{}` when no other locale has visible fields — and absent on a single-locale read. A locale with no visible fields is left out. */
1672
2007
  localizations?: {
1673
2008
  [key: string]: {
1674
2009
  [key: string]: unknown;
@@ -1698,14 +2033,16 @@ interface components {
1698
2033
  refs: components['schemas']['EntryRef'][];
1699
2034
  /** @description Each entry link another entry publishes whose `anchor` names a heading this revision took away from the content its reader lands on — in the link’s locale, or the first locale of its fallback chain this entry publishes. The revision is never refused for them; the linking entry’s own next publish is (`ENTRY_LINK_ANCHOR_NOT_FOUND`). Only what this revision took away is listed, and empty when it took none. A replay of the revision under the same `Idempotency-Key` answers the list the revision did. */
1700
2035
  brokenLinks?: components['schemas']['BrokenEntryLink'][];
2036
+ /** @description Each reference the content type declares `weak` that this revision made live while the entry it points at is not published, as a `REFERENCE_NOT_PUBLISHED` warning at its place. The write is never refused for them; a strong reference to an unpublished entry is refused instead. Empty when there are none, and when the write made nothing live. A replay of the revision under the same `Idempotency-Key` answers the warnings the revision did. */
2037
+ warnings?: components['schemas']['WriteWarning'][];
1701
2038
  };
1702
- /** @description The settings group after a write or a reset: its fields at the top level and `_metadata`, which also lists the links other entries publish that the write left pointing nowhere. */
2039
+ /** @description The settings group after a write or a reset: its fields at the top level and `_metadata`, which also lists the links other entries publish that the write left pointing nowhere and the warnings it landed with. */
1703
2040
  RevisedSettingsGroup: {
1704
2041
  _metadata: components['schemas']['RevisedSettingsGroupMetadata'];
1705
2042
  } & {
1706
2043
  [key: string]: unknown;
1707
2044
  };
1708
- /** @description What this service reports about a settings group beside its fields, and the links a write left pointing nowhere. */
2045
+ /** @description What this service reports about a settings group beside its fields, the links a write left pointing nowhere, and the warnings it landed with. */
1709
2046
  RevisedSettingsGroupMetadata: {
1710
2047
  id: string;
1711
2048
  /** @description The settings group. */
@@ -1738,14 +2075,16 @@ interface components {
1738
2075
  updatedAt: string;
1739
2076
  /** @description Each entry link another entry publishes whose `anchor` names a heading this write took away from the settings group’s content, as an entry revision lists them. The write is never refused for them; the linking entry’s own next publish is (`ENTRY_LINK_ANCHOR_NOT_FOUND`). Empty when it took none away. A replay of the write under the same `Idempotency-Key` answers the list the write did. */
1740
2077
  brokenLinks?: components['schemas']['BrokenEntryLink'][];
2078
+ /** @description Each reference the settings group’s type declares `weak` that this write made live while the entry it points at is not published, as a `REFERENCE_NOT_PUBLISHED` warning at its place, as an entry revision lists them. The write is never refused for them; a strong reference to an unpublished entry is refused instead. Empty when there are none, and when the write made nothing live. A replay of the write under the same `Idempotency-Key` answers the warnings the write did. */
2079
+ warnings: components['schemas']['WriteWarning'][];
1741
2080
  };
1742
- /** @description The singleton after a write: its fields at the top level and `_metadata`, which also lists the links other entries publish that the write left pointing nowhere. */
2081
+ /** @description The singleton after a write: its fields at the top level and `_metadata`, which also lists the links other entries publish that the write left pointing nowhere and the warnings it landed with. */
1743
2082
  RevisedSingleton: {
1744
2083
  _metadata: components['schemas']['RevisedSingletonMetadata'];
1745
2084
  } & {
1746
2085
  [key: string]: unknown;
1747
2086
  };
1748
- /** @description What this service reports about a singleton beside its fields, and the links a write left pointing nowhere. */
2087
+ /** @description What this service reports about a singleton beside its fields, the links a write left pointing nowhere, and the warnings it landed with. */
1749
2088
  RevisedSingletonMetadata: {
1750
2089
  id: string;
1751
2090
  /** @description The singleton type. */
@@ -1800,6 +2139,8 @@ interface components {
1800
2139
  emptyRequiredFields?: string[];
1801
2140
  /** @description Each entry link another entry publishes whose `anchor` names a heading this write took away from the singleton’s content, as an entry revision lists them. The write is never refused for them; the linking entry’s own next publish is (`ENTRY_LINK_ANCHOR_NOT_FOUND`). Empty when it took none away. A replay of the write under the same `Idempotency-Key` answers the list the write did. */
1802
2141
  brokenLinks?: components['schemas']['BrokenEntryLink'][];
2142
+ /** @description Each reference the singleton’s type declares `weak` that this write made live while the entry it points at is not published, as a `REFERENCE_NOT_PUBLISHED` warning at its place, as an entry revision lists them. The write is never refused for them; a strong reference to an unpublished entry is refused instead. Empty when there are none, and when the write made nothing live. A replay of the write under the same `Idempotency-Key` answers the warnings the write did. */
2143
+ warnings: components['schemas']['WriteWarning'][];
1803
2144
  };
1804
2145
  /** @description How a hit’s relevance was reached. Sent on a search that asked for `explain`. */
1805
2146
  ScoreBreakdown: {
@@ -2022,11 +2363,56 @@ interface components {
2022
2363
  /** @description Each required field the singleton holds no value for, which this read filled with its kind’s empty value, as a value path naming a list item by its key — as on an entry. Absent when none was. */
2023
2364
  emptyRequiredFields?: string[];
2024
2365
  };
2366
+ /** @description Another entry holds the slug this write would store, in the locale `facts` names. Choose another slug. */
2367
+ SlugTakenBlockage: {
2368
+ /** @enum {string} */
2369
+ kind: 'slug-taken';
2370
+ facts: {
2371
+ /** @description The slug field, as a `CONTENT_INVALID` issue names it: with the locale for a localized slug (`slug.fr-FR`), without one for a shared slug. */
2372
+ path: string;
2373
+ /** @enum {string} */
2374
+ code: 'SLUG_TAKEN';
2375
+ /** @description The locale whose slug collided. A shared slug is reserved in every locale its entry has, so it names one too. */
2376
+ locale: string;
2377
+ /** @description The slug another entry holds. */
2378
+ slug: string;
2379
+ /** @description The entry holding the slug in that locale. */
2380
+ entryId: string;
2381
+ };
2382
+ };
2025
2383
  SubFailure: {
2026
2384
  index: number;
2027
2385
  id?: string;
2028
2386
  error: {
2029
- /** @enum {string} */
2387
+ /**
2388
+ * @description - `ACCESS_DENIED`: The credential is valid, but its subject may not do this here. Fix: Use a key or a Role that grants this action on this resource, or ask an Owner to grant it; `details.rule` names the rule that refused.
2389
+ * - `AI_UNAVAILABLE_IN_REGION`: The Project's data region promises residency, and no AI processes inside that region yet. Fix: Run AI work on a Project in another region; no Plan, credential or retry changes this one.
2390
+ * - `CONTENT_INVALID`: The content does not satisfy the schema of the type it was written to. Fix: Correct each field `details.issues` names so it matches the schema, then write it again.
2391
+ * - `INTERNAL_ERROR`: The service failed while handling the request. Fix: Retry once; if it fails again, report it with the time and the request that failed.
2392
+ * - `INVALID_API_KEY`: The credential was read but is not accepted: it is malformed, expired, revoked, unknown, or a kind this route does not take. Fix: Read `details.reason`, then send a current credential of the kind the route takes, creating a new key if this one was revoked or expired.
2393
+ * - `METHOD_NOT_ALLOWED`: The route does not accept this HTTP method. Fix: Send the request with one of the methods the `Allow` header lists.
2394
+ * - `MISSING_API_KEY`: The request carried no credential, or one that did not authenticate. Fix: Send a credential with the request: an API key in the `X-API-Key` header, or the bearer token the route takes.
2395
+ * - `ORGANIZATION_BEING_DELETED`: The Organization is being deleted, so nothing more may be read from or written to it. Fix: Stop using the Organization: its deletion was asked for at `details.requestedAt`, and no retry succeeds.
2396
+ * - `ORGANIZATION_DELETE_BLOCKED`: The Organization cannot be deleted while a paid subscription or an open checkout still holds it. Fix: Resolve what `details.reason` names: downgrade and wait for the paid period to end, or let the open checkout expire, then delete again.
2397
+ * - `ORGANIZATION_IN_ANOTHER_CELL`: The request reached a region that is not the home of the Organization it names. Fix: Send the same request to the region `details.region` names; retrying it here will not succeed.
2398
+ * - `PAYLOAD_TOO_LARGE`: The request body is larger than the route accepts. Fix: Send a body within `details.limitBytes`, splitting the work across several requests.
2399
+ * - `PLAN_DOWNGRADE_BLOCKED`: The Organization keeps more than the target Plan allows, so it cannot move to it. Fix: Reduce each Stock Limit `details.stockLimits` lists to within the target Plan, then retry the change.
2400
+ * - `PLAN_FEATURE_UNAVAILABLE`: The Organization's Plan does not include the feature this request uses. Fix: Move the Organization to a Plan that includes `details.feature`, or leave the feature out of the request.
2401
+ * - `PROJECT_IN_ANOTHER_CELL`: The request reached a region that does not hold the Project it names. Fix: Send the same request to the region `details.region` names; retrying it here will not succeed.
2402
+ * - `RATE_LIMIT_EXCEEDED`: Too many requests arrived within the current rate-limit window. Fix: Wait the seconds the `Retry-After` header names before retrying, and spread requests out.
2403
+ * - `READ_ONLY_KEY`: The key may read but not write. Fix: Send the write with a key that may write, and keep the read-only key for reads.
2404
+ * - `REQUEST_INVALID`: The request is malformed: a path parameter, query parameter, header or body field the route cannot accept. Fix: Correct each field `details.issues` names, by its path and message, and send the request again.
2405
+ * - `REQUEST_TIMEOUT`: The request ran longer than the service allows and was stopped. Fix: Ask for less in one request, with a narrower filter or a smaller page, then retry.
2406
+ * - `RESOURCE_CONFLICT`: The write conflicts with the resource's current state: it changed since it was read, or something stands in the way. Fix: Re-read the resource and retry with what that read returns, or resolve the blockage `details.blockage` names.
2407
+ * - `RESOURCE_EXPIRED`: What the request names existed but has expired: a cursor the feed can no longer replay from, or an invitation or link past its date. Fix: Start again without it: read afresh instead of from the cursor, or ask for a new invitation or link.
2408
+ * - `RESOURCE_NOT_FOUND`: Nothing the credential can see exists under that id or path. Fix: Check the id, the path and the dataset the request selects; `details.kind` names what was looked for.
2409
+ * - `REVERIFICATION_REQUIRED`: The action hands authority out, and the session verified its factor too long ago. Fix: Have the User verify again at the level `details.level` names, then retry the request.
2410
+ * - `SERVICE_INDETERMINATE`: A service this request depends on could not answer, so the outcome could not be decided. Fix: Retry after the seconds the `Retry-After` header names; `details.missing` names what was unavailable.
2411
+ * - `TRANSACTION_ROLLED_BACK`: One operation of an all-or-nothing batch failed, so none of the batch was applied. Fix: Nothing was written. `details.failedIndex` is the index of the operation this refusal is for, which is not necessarily the one that failed. Fix the batch, then send the whole of it again.
2412
+ * - `USAGE_QUOTA_EXCEEDED`: The Organization has used all of this period's allowance for `details.meter`. Fix: Wait for the next billing period, or raise the allowance by moving to a larger Plan.
2413
+ * - `USER_NOT_PROVISIONED`: The session is valid, but the User's account is still being set up after sign-up. Fix: Keep the session and retry after the seconds the `Retry-After` header names.
2414
+ * @enum {string}
2415
+ */
2030
2416
  code: 'ACCESS_DENIED' | 'AI_UNAVAILABLE_IN_REGION' | 'CONTENT_INVALID' | 'INTERNAL_ERROR' | 'INVALID_API_KEY' | 'METHOD_NOT_ALLOWED' | 'MISSING_API_KEY' | 'ORGANIZATION_BEING_DELETED' | 'ORGANIZATION_DELETE_BLOCKED' | 'ORGANIZATION_IN_ANOTHER_CELL' | 'PAYLOAD_TOO_LARGE' | 'PLAN_DOWNGRADE_BLOCKED' | 'PLAN_FEATURE_UNAVAILABLE' | 'PROJECT_IN_ANOTHER_CELL' | 'RATE_LIMIT_EXCEEDED' | 'READ_ONLY_KEY' | 'REQUEST_INVALID' | 'REQUEST_TIMEOUT' | 'RESOURCE_CONFLICT' | 'RESOURCE_EXPIRED' | 'RESOURCE_NOT_FOUND' | 'REVERIFICATION_REQUIRED' | 'SERVICE_INDETERMINATE' | 'TRANSACTION_ROLLED_BACK' | 'USAGE_QUOTA_EXCEEDED' | 'USER_NOT_PROVISIONED';
2031
2417
  messages: string[];
2032
2418
  details?: {
@@ -2042,6 +2428,18 @@ interface components {
2042
2428
  /** @description The written entry, when the batch asked for it. */
2043
2429
  data?: unknown;
2044
2430
  };
2431
+ /** @description Something a write landed with and was not refused for, named as a refusal names an issue: where it stands, what it is, and a sentence. */
2432
+ WriteWarning: {
2433
+ /** @description Where it stands, as a value path naming a list item by its key: `related`, `cards[_key=="k1"].link`. */
2434
+ path: string;
2435
+ /**
2436
+ * @description `REFERENCE_NOT_PUBLISHED`: a reference the content type declares `weak` points at an entry that is not published, so a reader is served a reference it cannot follow yet.
2437
+ * @enum {string}
2438
+ */
2439
+ code: 'REFERENCE_NOT_PUBLISHED';
2440
+ /** @description The warning, for a person. */
2441
+ message: string;
2442
+ };
2045
2443
  };
2046
2444
  responses: never;
2047
2445
  parameters: never;
@@ -2897,8 +3295,7 @@ interface operations {
2897
3295
  };
2898
3296
  content: {
2899
3297
  'application/json': {
2900
- /** @description The payload itself. */
2901
- data: unknown;
3298
+ data: components['schemas']['CreatedEntry'];
2902
3299
  };
2903
3300
  };
2904
3301
  };
@@ -2944,7 +3341,7 @@ interface operations {
2944
3341
  [name: string]: unknown;
2945
3342
  };
2946
3343
  content: {
2947
- 'application/json': components['schemas']['RefusalResourceConflict'];
3344
+ 'application/json': components['schemas']['RefusalResourceConflictNamingDraftExistsBlockageOrReleaseLockedBlockageOrSlugTakenBlockage'];
2948
3345
  };
2949
3346
  };
2950
3347
  /** @description RESOURCE_EXPIRED */
@@ -3173,7 +3570,7 @@ interface operations {
3173
3570
  [name: string]: unknown;
3174
3571
  };
3175
3572
  content: {
3176
- 'application/json': components['schemas']['RefusalResourceConflict'];
3573
+ 'application/json': components['schemas']['RefusalResourceConflictNamingDraftExistsBlockageOrReleaseLockedBlockageOrSlugTakenBlockage'];
3177
3574
  };
3178
3575
  };
3179
3576
  /** @description RESOURCE_EXPIRED */
@@ -3291,7 +3688,7 @@ interface operations {
3291
3688
  [name: string]: unknown;
3292
3689
  };
3293
3690
  content: {
3294
- 'application/json': components['schemas']['RefusalResourceConflict'];
3691
+ 'application/json': components['schemas']['RefusalResourceConflictNamingDraftExistsBlockageOrReleaseLockedBlockageOrSlugTakenBlockage'];
3295
3692
  };
3296
3693
  };
3297
3694
  /** @description RESOURCE_EXPIRED */
@@ -3488,13 +3885,13 @@ interface operations {
3488
3885
  };
3489
3886
  };
3490
3887
  };
3491
- /** @description CONTENT_INVALID, REQUEST_INVALID */
3888
+ /** @description REQUEST_INVALID */
3492
3889
  400: {
3493
3890
  headers: {
3494
3891
  [name: string]: unknown;
3495
3892
  };
3496
3893
  content: {
3497
- 'application/json': components['schemas']['RefusalContentInvalidOrRequestInvalid'];
3894
+ 'application/json': components['schemas']['RefusalRequestInvalid'];
3498
3895
  };
3499
3896
  };
3500
3897
  /** @description INVALID_API_KEY, MISSING_API_KEY */
@@ -4709,6 +5106,125 @@ interface operations {
4709
5106
  };
4710
5107
  };
4711
5108
  };
5109
+ restoreSharedEntryVersion: {
5110
+ parameters: {
5111
+ query?: never;
5112
+ header?: {
5113
+ 'Idempotency-Key'?: string;
5114
+ 'If-Match'?: string;
5115
+ };
5116
+ path: {
5117
+ contentType: string;
5118
+ id: string;
5119
+ versionNumber: string;
5120
+ };
5121
+ cookie?: never;
5122
+ };
5123
+ requestBody?: never;
5124
+ responses: {
5125
+ /** @description Success. */
5126
+ 200: {
5127
+ headers: {
5128
+ [name: string]: unknown;
5129
+ };
5130
+ content: {
5131
+ 'application/json': {
5132
+ data: components['schemas']['RestoredEntry'];
5133
+ };
5134
+ };
5135
+ };
5136
+ /** @description CONTENT_INVALID, REQUEST_INVALID */
5137
+ 400: {
5138
+ headers: {
5139
+ [name: string]: unknown;
5140
+ };
5141
+ content: {
5142
+ 'application/json': components['schemas']['RefusalContentInvalidOrRequestInvalid'];
5143
+ };
5144
+ };
5145
+ /** @description INVALID_API_KEY, MISSING_API_KEY */
5146
+ 401: {
5147
+ headers: {
5148
+ [name: string]: unknown;
5149
+ };
5150
+ content: {
5151
+ 'application/json': components['schemas']['RefusalInvalidApiKeyOrMissingApiKey'];
5152
+ };
5153
+ };
5154
+ /** @description ACCESS_DENIED, PLAN_FEATURE_UNAVAILABLE, READ_ONLY_KEY, USAGE_QUOTA_EXCEEDED */
5155
+ 403: {
5156
+ headers: {
5157
+ [name: string]: unknown;
5158
+ };
5159
+ content: {
5160
+ 'application/json': components['schemas']['RefusalAccessDeniedOrPlanFeatureUnavailableOrReadOnlyKeyOrUsageQuotaExceeded'];
5161
+ };
5162
+ };
5163
+ /** @description RESOURCE_NOT_FOUND */
5164
+ 404: {
5165
+ headers: {
5166
+ [name: string]: unknown;
5167
+ };
5168
+ content: {
5169
+ 'application/json': components['schemas']['RefusalResourceNotFound'];
5170
+ };
5171
+ };
5172
+ /** @description RESOURCE_CONFLICT */
5173
+ 409: {
5174
+ headers: {
5175
+ [name: string]: unknown;
5176
+ };
5177
+ content: {
5178
+ 'application/json': components['schemas']['RefusalResourceConflictNamingDraftExistsBlockageOrReleaseLockedBlockageOrSlugTakenBlockage'];
5179
+ };
5180
+ };
5181
+ /** @description RESOURCE_EXPIRED */
5182
+ 410: {
5183
+ headers: {
5184
+ [name: string]: unknown;
5185
+ };
5186
+ content: {
5187
+ 'application/json': components['schemas']['RefusalResourceExpired'];
5188
+ };
5189
+ };
5190
+ /** @description PROJECT_IN_ANOTHER_CELL */
5191
+ 421: {
5192
+ headers: {
5193
+ [name: string]: unknown;
5194
+ };
5195
+ content: {
5196
+ 'application/json': components['schemas']['RefusalProjectInAnotherCell'];
5197
+ };
5198
+ };
5199
+ /** @description RATE_LIMIT_EXCEEDED */
5200
+ 429: {
5201
+ headers: {
5202
+ [name: string]: unknown;
5203
+ };
5204
+ content: {
5205
+ 'application/json': components['schemas']['RefusalRateLimitExceeded'];
5206
+ };
5207
+ };
5208
+ /** @description INTERNAL_ERROR */
5209
+ 500: {
5210
+ headers: {
5211
+ [name: string]: unknown;
5212
+ };
5213
+ content: {
5214
+ 'application/json': components['schemas']['RefusalInternalError'];
5215
+ };
5216
+ };
5217
+ /** @description SERVICE_INDETERMINATE */
5218
+ 503: {
5219
+ headers: {
5220
+ [name: string]: unknown;
5221
+ };
5222
+ content: {
5223
+ 'application/json': components['schemas']['RefusalServiceIndeterminate'];
5224
+ };
5225
+ };
5226
+ };
5227
+ };
4712
5228
  getEntryVersions: {
4713
5229
  parameters: {
4714
5230
  query?: {
@@ -4733,8 +5249,7 @@ interface operations {
4733
5249
  };
4734
5250
  content: {
4735
5251
  'application/json': {
4736
- /** @description The payload itself. */
4737
- data: unknown;
5252
+ data: components['schemas']['EntryVersionRow'][];
4738
5253
  };
4739
5254
  };
4740
5255
  };
@@ -4835,8 +5350,7 @@ interface operations {
4835
5350
  };
4836
5351
  content: {
4837
5352
  'application/json': {
4838
- /** @description The payload itself. */
4839
- data: unknown;
5353
+ data: components['schemas']['EntryVersion'];
4840
5354
  };
4841
5355
  };
4842
5356
  };
@@ -4983,7 +5497,7 @@ interface operations {
4983
5497
  [name: string]: unknown;
4984
5498
  };
4985
5499
  content: {
4986
- 'application/json': components['schemas']['RefusalResourceConflict'];
5500
+ 'application/json': components['schemas']['RefusalResourceConflictNamingDraftExistsBlockageOrReleaseLockedBlockageOrSlugTakenBlockage'];
4987
5501
  };
4988
5502
  };
4989
5503
  /** @description RESOURCE_EXPIRED */
@@ -6006,6 +6520,8 @@ interface operations {
6006
6520
  runSavedQuery: {
6007
6521
  parameters: {
6008
6522
  query?: {
6523
+ /** @description A changes-feed cursor at or after the change this read follows — the `fresh` a change carries in `@relyio/sdk`. The answer is the read’s own, unchanged; the term only makes the request one that no cache holds an answer to from before that change. A value that is not a cursor the feed issued is refused. */
6524
+ _fresh?: string;
6009
6525
  /** @description The locale to read. Outranks `Accept-Language`. */
6010
6526
  locale?: string;
6011
6527
  };
@@ -6020,6 +6536,10 @@ interface operations {
6020
6536
  /** @description Success. */
6021
6537
  200: {
6022
6538
  headers: {
6539
+ 'Cache-Control'?: string;
6540
+ ETag?: string;
6541
+ Vary?: string;
6542
+ 'X-Cache'?: string;
6023
6543
  [name: string]: unknown;
6024
6544
  };
6025
6545
  content: {
@@ -6115,6 +6635,8 @@ interface operations {
6115
6635
  runSavedQueryWithBody: {
6116
6636
  parameters: {
6117
6637
  query?: {
6638
+ /** @description A changes-feed cursor at or after the change this read follows — the `fresh` a change carries in `@relyio/sdk`. The answer is the read’s own, unchanged; the term only makes the request one that no cache holds an answer to from before that change. A value that is not a cursor the feed issued is refused. */
6639
+ _fresh?: string;
6118
6640
  /** @description The locale to read. Outranks `Accept-Language`. */
6119
6641
  locale?: string;
6120
6642
  };
@@ -6129,6 +6651,8 @@ interface operations {
6129
6651
  /** @description Success. */
6130
6652
  200: {
6131
6653
  headers: {
6654
+ 'Cache-Control'?: string;
6655
+ 'X-Cache'?: string;
6132
6656
  [name: string]: unknown;
6133
6657
  };
6134
6658
  content: {
@@ -6226,6 +6750,12 @@ interface operations {
6226
6750
  query?: {
6227
6751
  /** @description A changes-feed cursor at or after the change this read follows — the `fresh` a change carries in `@relyio/sdk`. The answer is the read’s own, unchanged; the term only makes the request one that no cache holds an answer to from before that change. A value that is not a cursor the feed issued is refused. */
6228
6752
  _fresh?: string;
6753
+ /** @description Return the page after this one: the `page.nextCursor` of the previous answer. Absent, the first page. Only a fetch pages; a cursor is refused on a query that is not one. */
6754
+ cursor?: string;
6755
+ /** @description The locale to read. Outranks `Accept-Language`. Use `*` to retrieve every locale: the default at the top level and the rest in `_metadata.localizations`. */
6756
+ locale?: string;
6757
+ /** @description Comma-separated locales to retrieve. The first is the primary, composed at the top level; the rest go in `_metadata.localizations`. */
6758
+ locales?: string;
6229
6759
  };
6230
6760
  header?: never;
6231
6761
  path?: never;
@@ -6242,8 +6772,11 @@ interface operations {
6242
6772
  };
6243
6773
  content: {
6244
6774
  'application/json': {
6245
- /** @description The payload itself. */
6246
- data: unknown;
6775
+ data: unknown[];
6776
+ page: components['schemas']['CursorPage'];
6777
+ meta: {
6778
+ [key: string]: unknown;
6779
+ };
6247
6780
  };
6248
6781
  };
6249
6782
  };
@@ -6919,7 +7452,7 @@ interface operations {
6919
7452
  [name: string]: unknown;
6920
7453
  };
6921
7454
  content: {
6922
- 'application/json': components['schemas']['RefusalResourceConflict'];
7455
+ 'application/json': components['schemas']['RefusalResourceConflictNamingDraftExistsBlockageOrReleaseLockedBlockageOrSlugTakenBlockage'];
6923
7456
  };
6924
7457
  };
6925
7458
  /** @description RESOURCE_EXPIRED */
@@ -7138,7 +7671,7 @@ interface operations {
7138
7671
  [name: string]: unknown;
7139
7672
  };
7140
7673
  content: {
7141
- 'application/json': components['schemas']['RefusalResourceConflict'];
7674
+ 'application/json': components['schemas']['RefusalResourceConflictNamingDraftExistsBlockageOrReleaseLockedBlockageOrSlugTakenBlockage'];
7142
7675
  };
7143
7676
  };
7144
7677
  /** @description RESOURCE_EXPIRED */
@@ -7211,8 +7744,7 @@ interface operations {
7211
7744
  };
7212
7745
  content: {
7213
7746
  'application/json': {
7214
- /** @description The payload itself. */
7215
- data: unknown;
7747
+ data: components['schemas']['DocumentVersionHistory'];
7216
7748
  };
7217
7749
  };
7218
7750
  };
@@ -7312,8 +7844,7 @@ interface operations {
7312
7844
  };
7313
7845
  content: {
7314
7846
  'application/json': {
7315
- /** @description The payload itself. */
7316
- data: unknown;
7847
+ data: components['schemas']['DocumentVersion'];
7317
7848
  };
7318
7849
  };
7319
7850
  };
@@ -7566,7 +8097,7 @@ interface operations {
7566
8097
  [name: string]: unknown;
7567
8098
  };
7568
8099
  content: {
7569
- 'application/json': components['schemas']['RefusalResourceConflict'];
8100
+ 'application/json': components['schemas']['RefusalResourceConflictNamingDraftExistsBlockageOrReleaseLockedBlockageOrSlugTakenBlockage'];
7570
8101
  };
7571
8102
  };
7572
8103
  /** @description RESOURCE_EXPIRED */
@@ -7736,8 +8267,7 @@ interface operations {
7736
8267
  };
7737
8268
  content: {
7738
8269
  'application/json': {
7739
- /** @description The payload itself. */
7740
- data: unknown;
8270
+ data: components['schemas']['DocumentVersionHistory'];
7741
8271
  };
7742
8272
  };
7743
8273
  };
@@ -7837,8 +8367,7 @@ interface operations {
7837
8367
  };
7838
8368
  content: {
7839
8369
  'application/json': {
7840
- /** @description The payload itself. */
7841
- data: unknown;
8370
+ data: components['schemas']['DocumentVersion'];
7842
8371
  };
7843
8372
  };
7844
8373
  };
@@ -7934,7 +8463,15 @@ interface RelyIOConfig {
7934
8463
  apiKey: string;
7935
8464
  /** Base URL for the RelyIO API */
7936
8465
  baseUrl?: string;
7937
- /** Dataset to use */
8466
+ /**
8467
+ * Dataset to use, sent as `X-RelyIO-Dataset` — an id or a name.
8468
+ *
8469
+ * Which dataset a client reads, first match wins: an active `relyio dev` sandbox; this option; on
8470
+ * a host preview deployment (`VERCEL_ENV=preview`) and with a preview key (`rly_prev_…`), the pull
8471
+ * request's preview, `previewDatasetSlug(VERCEL_GIT_COMMIT_REF)` from `@relyio/sdk/preview` —
8472
+ * never in production, never with a published key, and, once the api answers that no such preview
8473
+ * exists, never again in that process; the key's own default.
8474
+ */
7938
8475
  dataset?: string;
7939
8476
  /**
7940
8477
  * Default locale for all content queries
@@ -7972,8 +8509,6 @@ interface RelyIOConfig {
7972
8509
  * turn off under a framework that caches `fetch` itself (Next.js).
7973
8510
  */
7974
8511
  cache?: CacheConfig;
7975
- /** Real-time configuration */
7976
- realtime?: RealtimeConfig;
7977
8512
  /** Debug configuration */
7978
8513
  debug?: DebugConfig;
7979
8514
  /** Custom headers to include with requests */
@@ -8072,7 +8607,6 @@ type LiveWebSocketConstructor = new (url: string) => LiveWebSocket;
8072
8607
  type RelyIOConfigUpdate = Update<Omit<RelyIOConfig, OptionBag | 'headers'>, UndefaultedOption> & {
8073
8608
  browser?: Update<BrowserConfig, UndefaultedField['browser']>;
8074
8609
  cache?: Update<CacheConfig, UndefaultedField['cache']>;
8075
- realtime?: Update<RealtimeConfig, UndefaultedField['realtime']>;
8076
8610
  debug?: Update<DebugConfig, UndefaultedField['debug']>;
8077
8611
  /** Headers to add or replace, each kept until named again; `null` stops sending that header. */
8078
8612
  headers?: Record<string, string | null>;
@@ -8093,18 +8627,6 @@ interface CacheConfig {
8093
8627
  /** Cache strategies to use */
8094
8628
  strategies?: CacheStrategy[];
8095
8629
  }
8096
- interface RealtimeConfig {
8097
- /** Whether real-time features are enabled (defaults to true) */
8098
- enabled?: boolean;
8099
- /** WebSocket URL for real-time connections */
8100
- wsUrl?: string;
8101
- /** Maximum number of reconnection attempts (defaults to 10) */
8102
- maxReconnectAttempts?: number;
8103
- /** Reconnection delay in milliseconds (defaults to 1000) */
8104
- reconnectDelay?: number;
8105
- /** Heartbeat interval in milliseconds (defaults to 30000) */
8106
- heartbeatInterval?: number;
8107
- }
8108
8630
  interface DebugConfig {
8109
8631
  /** Whether debug mode is enabled (defaults to false) */
8110
8632
  enabled?: boolean;
@@ -8225,7 +8747,7 @@ type WithDefaults<T, NoDefault extends keyof T = never> = Required<Omit<T, NoDef
8225
8747
  */
8226
8748
  type UndefaultedOption = 'apiKey' | 'dataset' | 'locale' | 'dev' | 'fetch' | 'liveUrl' | 'webSocket';
8227
8749
  /** The options that are themselves bags of options, each merged field by field. */
8228
- type OptionBag = 'browser' | 'cache' | 'realtime' | 'debug';
8750
+ type OptionBag = 'browser' | 'cache' | 'debug';
8229
8751
  /**
8230
8752
  * The fields of each bag with no default, absent from a merged configuration until the caller gives
8231
8753
  * one — and the fields of a bag `updateConfig()` can clear with `null`.
@@ -8233,20 +8755,18 @@ type OptionBag = 'browser' | 'cache' | 'realtime' | 'debug';
8233
8755
  interface UndefaultedField {
8234
8756
  browser: 'onCorsError';
8235
8757
  cache: never;
8236
- realtime: 'wsUrl';
8237
8758
  debug: 'logger';
8238
8759
  }
8239
8760
  /**
8240
8761
  * The value each option takes when the caller gives none, down to each field of each bag — so a
8241
8762
  * field of a merged configuration that has a default is never `undefined`, and a reader does not
8242
- * restate the default. A field with no default (`onCorsError`, `wsUrl`, `logger`) is named in
8763
+ * restate the default. A field with no default (`onCorsError`, `logger`) is named in
8243
8764
  * {@link UndefaultedField}; a field added to a bag without one fails to compile at
8244
8765
  * {@link DEFAULT_CONFIG} until it gets a default or a name there.
8245
8766
  */
8246
8767
  type ConfigDefaults = WithDefaults<Omit<RelyIOConfig, UndefaultedOption | OptionBag>> & {
8247
8768
  browser: WithDefaults<BrowserConfig, UndefaultedField['browser']>;
8248
8769
  cache: WithDefaults<CacheConfig, UndefaultedField['cache']>;
8249
- realtime: WithDefaults<RealtimeConfig, UndefaultedField['realtime']>;
8250
8770
  debug: WithDefaults<DebugConfig, UndefaultedField['debug']>;
8251
8771
  };
8252
8772
  /** The configuration a client runs on: each option the caller gave, and its default where not. */
@@ -10037,7 +10557,16 @@ declare abstract class SDKError extends Error {
10037
10557
  */
10038
10558
  isType(errorType: string): boolean;
10039
10559
  /**
10040
- * Create a new error with additional context
10560
+ * Create a copy of this error with additional context.
10561
+ *
10562
+ * The copy is made from this error's own properties, not by calling a constructor: subclasses
10563
+ * declare constructors of their own (violations, a timeout, a feature, a failed index second),
10564
+ * and no single argument order fits them all. Rebuilding through the base order put the status
10565
+ * code in the subclass's second slot. Copying keeps every field, the subclass's own included, and
10566
+ * the original `timestamp` and `stack`, since it is the same failure.
10567
+ *
10568
+ * `Object.create` runs no constructor, so a `#private` field would not survive the copy; none
10569
+ * exist in this directory. `stack` is not an own property on V8 and is copied by hand below.
10041
10570
  */
10042
10571
  withContext(context: Record<string, unknown>): this;
10043
10572
  }
@@ -10159,8 +10688,13 @@ type ViewScopeConfig = ContentTypeScopeConfig | ContentTypesScopeConfig | EntryT
10159
10688
  * written here, so a view pulled by `relyio generate-types` that named one did not compile.
10160
10689
  * `@relyio/codegen-typescript`'s `src/__tests__/sdk-definition-config.types.ts` holds the two to each
10161
10690
  * other (REL-1457).
10691
+ *
10692
+ * Only spellings some field accepts (REL-1697): `isTrue`, `isFalse`, `today`, `yesterday`,
10693
+ * `thisWeek`, `thisMonth`, `thisYear`, `includes` and `notIncludes` were offered here and refused at
10694
+ * deploy on every field. A boolean is asked `is` with `true` or `false`; a date `isOn` or
10695
+ * `inTheLast`; tags `hasValue` or `isEmpty`.
10162
10696
  */
10163
- type ViewFilterOperator = 'is' | 'isNot' | 'contains' | 'notContains' | 'startsWith' | 'endsWith' | 'isAnyOf' | 'isNoneOf' | 'includes' | 'notIncludes' | 'isTrue' | 'isFalse' | 'equals' | 'notEquals' | 'greaterThan' | 'lessThan' | 'greaterThanOrEqual' | 'lessThanOrEqual' | 'between' | 'isOn' | 'isBefore' | 'isAfter' | 'isBetween' | 'inTheLast' | 'inTheNext' | 'today' | 'yesterday' | 'thisWeek' | 'thisMonth' | 'thisYear' | 'isEmpty' | 'hasValue';
10697
+ type ViewFilterOperator = 'is' | 'isNot' | 'contains' | 'notContains' | 'startsWith' | 'endsWith' | 'isAnyOf' | 'isNoneOf' | 'equals' | 'notEquals' | 'greaterThan' | 'lessThan' | 'greaterThanOrEqual' | 'lessThanOrEqual' | 'between' | 'isOn' | 'isBefore' | 'isAfter' | 'isBetween' | 'inTheLast' | 'inTheNext' | 'isEmpty' | 'hasValue';
10164
10698
  /** A span of time back or forward from now, for `inTheLast` and `inTheNext`. */
10165
10699
  interface ViewFilterRelativeDate {
10166
10700
  amount: number;
@@ -10464,14 +10998,46 @@ type CreateInput<T extends BaseContent> = WriteFields<T> & {
10464
10998
  locale?: string;
10465
10999
  };
10466
11000
  };
11001
+ /**
11002
+ * What a create answers: the entry, its `_metadata` also listing the warnings the publish landed
11003
+ * with — each reference the content type declares `weak` that it made live while the entry it
11004
+ * points at is unpublished (`REFERENCE_NOT_PUBLISHED`) — the document's `CreatedEntryMetadata`
11005
+ * (REL-3097). Always present, empty when there are none; the write is never refused for them.
11006
+ */
11007
+ type CreatedContent<T extends BaseContent> = Omit<T, '_metadata'> & {
11008
+ _metadata: T['_metadata'] & Pick<components['schemas']['CreatedEntryMetadata'], 'warnings'>;
11009
+ };
10467
11010
  /**
10468
11011
  * What a revision answers: the entry, its `_metadata` also listing the entry links other entries
10469
11012
  * publish that the revision left pointing nowhere — the document's `RevisedEntryMetadata`
10470
- * (REL-2110, REL-2130). The write is never refused for them; the linking entry's next publish is.
11013
+ * (REL-2110, REL-2130) — and the warnings the revision landed with, as a create's (REL-3097). The
11014
+ * write is never refused for either; the linking entry's next publish is.
10471
11015
  */
10472
11016
  type RevisedContent<T extends BaseContent> = Omit<T, '_metadata'> & {
10473
- _metadata: T['_metadata'] & Pick<components['schemas']['RevisedEntryMetadata'], 'brokenLinks'>;
11017
+ _metadata: T['_metadata'] & Pick<components['schemas']['RevisedEntryMetadata'], 'brokenLinks' | 'warnings'>;
11018
+ };
11019
+ /**
11020
+ * What a singleton write answers (`update`): the singleton, its `_metadata` also listing the entry
11021
+ * links other entries publish that the write left pointing nowhere and the warnings it landed with —
11022
+ * each reference declared `weak` that it made live while the entry it points at is unpublished
11023
+ * (`REFERENCE_NOT_PUBLISHED`) — the document's `RevisedSingletonMetadata` (REL-2130, REL-3097).
11024
+ * `warnings` is always present, empty when there are none; the write is never refused for either.
11025
+ */
11026
+ type WrittenSingleton<T> = Omit<T, '_metadata'> & {
11027
+ _metadata: MetadataOf<T> & Pick<components['schemas']['RevisedSingletonMetadata'], 'brokenLinks' | 'warnings'>;
11028
+ };
11029
+ /**
11030
+ * What a settings group write answers (`update`, `reset`): the group, its `_metadata` also listing
11031
+ * what the write left pointing nowhere and the warnings it landed with — the document's
11032
+ * `RevisedSettingsGroupMetadata` (REL-2130, REL-3097), as a singleton write's.
11033
+ */
11034
+ type WrittenSettingsGroup<T> = Omit<T, '_metadata'> & {
11035
+ _metadata: MetadataOf<T> & Pick<components['schemas']['RevisedSettingsGroupMetadata'], 'brokenLinks' | 'warnings'>;
10474
11036
  };
11037
+ /** A document's `_metadata`, or nothing for a type that declares none. */
11038
+ type MetadataOf<T> = T extends {
11039
+ _metadata: infer M;
11040
+ } ? M : unknown;
10475
11041
  /**
10476
11042
  * What a version restore answers: the entry, its `_metadata` also listing what the restore left out
10477
11043
  * and the links it left pointing nowhere — the document's `RestoredEntryMetadata` (REL-1793,
@@ -10480,6 +11046,24 @@ type RevisedContent<T extends BaseContent> = Omit<T, '_metadata'> & {
10480
11046
  type RestoredContent<T extends BaseContent> = Omit<T, '_metadata'> & {
10481
11047
  _metadata: T['_metadata'] & Pick<components['schemas']['RestoredEntryMetadata'], 'leftOut' | 'brokenLinks'>;
10482
11048
  };
11049
+ /**
11050
+ * One version of an entry, as `version(id, { version })` reads it — the document's `EntryVersion`
11051
+ * (REL-3181): the fields that locale stored when the version was written, at the top level, and
11052
+ * `EntryVersionMetadata`, whose `status` is `'version'` and which names no default or available
11053
+ * locales. Every field is optional: a locale's row holds that locale's own fields, never the shared
11054
+ * ones.
11055
+ */
11056
+ type ContentVersion<T extends BaseContent> = Partial<Omit<T, '_metadata'>> & {
11057
+ _metadata: components['schemas']['EntryVersionMetadata'];
11058
+ };
11059
+ /**
11060
+ * One row of an entry's history, as `versions(id)` lists it — the document's `EntryVersionRow`
11061
+ * (REL-3269): which version of which locale, who wrote it and when, and the fields that locale
11062
+ * stored, nested under `fields` — its own fields only, never the shared ones.
11063
+ */
11064
+ type ContentVersionRow<T extends BaseContent> = Omit<components['schemas']['EntryVersionRow'], 'fields'> & {
11065
+ fields: Partial<Omit<T, '_metadata'>>;
11066
+ };
10483
11067
  /**
10484
11068
  * Content update input - excludes system-managed metadata fields
10485
11069
  */
@@ -10535,7 +11119,7 @@ interface FieldDefinition {
10535
11119
  /** Field name */
10536
11120
  name: string;
10537
11121
  /** Field type */
10538
- type: FieldTypeName;
11122
+ type: FieldKind;
10539
11123
  /** Display title */
10540
11124
  title?: string;
10541
11125
  /** Field description */
@@ -10549,10 +11133,6 @@ interface FieldDefinition {
10549
11133
  /** Field options */
10550
11134
  options?: FieldOptions;
10551
11135
  }
10552
- /**
10553
- * Supported field type names (string identifiers)
10554
- */
10555
- type FieldTypeName = 'string' | 'number' | 'boolean' | 'date' | 'datetime' | 'text' | 'markdown' | 'richtext' | 'slug' | 'url' | 'email' | 'image' | 'file' | 'reference' | 'array' | 'object' | 'geopoint' | 'color';
10556
11136
  /**
10557
11137
  * Field validation rules
10558
11138
  */
@@ -10711,8 +11291,12 @@ type FieldsOfShapes$2<Shape> = Shape extends {
10711
11291
  type TargetFields<F, S> = F extends {
10712
11292
  readonly config?: infer C;
10713
11293
  } ? S extends FieldSchemaContext ? FieldsOfDefinition<Declared$1<S['contentTypes'], ReferenceTarget<NonNullable<C>>> | Declared$1<S['singletonContentTypes'], ReferenceTarget<NonNullable<C>>> | Declared$1<NonNullable<S['assetTypes']>, ReferenceTarget<NonNullable<C>>>> : never : never;
11294
+ /**
11295
+ * The fields a definition declares. An asset type's `fields` are optional, so they are read as
11296
+ * optional here — a required `fields` would read every asset as `never` and accept any path (REL-2366).
11297
+ */
10714
11298
  type FieldsOfDefinition<D> = D extends {
10715
- readonly fields: readonly unknown[];
11299
+ readonly fields?: unknown;
10716
11300
  } ? DeclaredFields<D> : never;
10717
11301
  /** `true` when a field is a reference, or a list or object holding one at any depth. */
10718
11302
  type HoldsReference<F> = F extends AnyFieldDefinition ? IsReference<F> extends true ? true : true extends HoldsReference<ShapeFields<F>> ? true : true extends IsLinkingRichText<F> ? true : false : false;
@@ -10997,9 +11581,8 @@ interface AssetReading<D extends AnyAssetTypeDefinition, S extends FieldSchemaCo
10997
11581
  /**
10998
11582
  * What its `where` takes: every key the API filters its fields by, as a content type's
10999
11583
  * ({@link FilterPaths}) — an asset is an entry on the same routes, held to the same check (REL-2195).
11000
- * Its `fields` are optional, so they are read with `DeclaredFields`, which takes them so.
11001
11584
  */
11002
- readonly where: FilterPaths<DeclaredFields<D>, S>;
11585
+ readonly where: FilterPaths<FieldsOfDefinition<D>, S>;
11003
11586
  }
11004
11587
  /** A read of the settings group `D` defines, in schema `S`. */
11005
11588
  interface SettingsReading<D extends AnySettingsGroupDefinition, S extends FieldSchemaContext | undefined> extends Reading {
@@ -11952,4 +12535,4 @@ type InferContentType<T extends AnyContentTypeDefinition, S extends FieldSchemaC
11952
12535
  _metadata: EntryMetadata;
11953
12536
  };
11954
12537
 
11955
- export { enumField as $, type AIConfig as A, type BaseFieldConfig as B, type CodeConfig as C, type DateConfig as D, type EmailConfig as E, type FieldAIConfig as F, type RuleConditions as G, type SlugConfig as H, type IntegerConfig as I, type JsonConfig as J, type KeyedEnumConfig as K, type ListConfig as L, type TagsConfig as M, type VisibilityRule as N, type ObjectConfig as O, boolean as P, code as Q, type ReadOnlyRule as R, type ShortTextConfig as S, type TableConfig as T, type UrlConfig as U, type ValidationRule$1 as V, type WidgetOptions as W, date as X, dateTime as Y, decimal as Z, email as _, type AnyFieldDefinition as a, type AssetTypeDefinition as a$, integer as a0, json as a1, list as a2, longText as a3, object as a4, reference as a5, richText as a6, shortText as a7, slug as a8, table as a9, type TextDirection as aA, type LocaleOptions as aB, type LocaleDefinition as aC, defineContentType as aD, fieldset as aE, type Fieldset as aF, type DeclaredFieldset as aG, type AnyDeclaredFieldset as aH, type KeyedFieldsetConfig as aI, type FieldMember as aJ, type KeyedContentTypeConfig as aK, type ContentTypeDefinition as aL, type EntryMetadata as aM, type InferContentType as aN, type LocalePublicationFields as aO, defineSingleton as aP, type KeyedSingletonConfig as aQ, type SingletonContentTypeDefinition as aR, type SingletonMetadata as aS, type InferSingleton as aT, defineSettingsGroup as aU, type KeyedSettingsGroupConfig as aV, type SettingsGroupDefinition as aW, type SettingsGroupMetadata as aX, type InferSettingsGroup as aY, defineAssetType as aZ, type KeyedAssetTypeConfig as a_, tags as aa, url as ab, type FieldSchemaContext as ac, type FieldValue as ad, type FieldValues as ae, type DeclaredFields as af, type UnresolvedEntry as ag, type Keyed as ah, type BlockOf as ai, type ShapeValue as aj, type AssetReading as ak, type CheckedIncludes as al, type CheckInclude as am, type ContentReading as an, type IncludablePaths as ao, type Reading as ap, type ReadWith as aq, type SettingsReading as ar, type SingletonReading as as, type UntypedReading as at, defineLocale as au, isLocaleDefinition as av, getLocaleCodes as aw, findDefaultLocale as ax, getActiveLocales as ay, buildFallbackChain as az, type AnyKeyedField as b, type ViewFilterOperator as b$, type InferAssetType as b0, type InferAssetEntry as b1, type AssetServedBlocks as b2, type ImageKindConfig as b3, type VideoKindConfig as b4, type FileKindConfig as b5, type ImageTransform as b6, type ImageFitMode as b7, type ImageOutputFormat as b8, type ImageUploadConfig as b9, type KeyedRolesAsList as bA, defineWorkflow as bB, defineWorkflowStage as bC, defineContentTypeWorkflow as bD, isWorkflowDefinition as bE, isWorkflowStageDefinition as bF, getWorkflowStageIds as bG, findWorkflowStage as bH, getNextWorkflowStage as bI, getFirstWorkflowStage as bJ, isFinalWorkflowStage as bK, type WorkflowEscalation as bL, type WorkflowAutoAssign as bM, type WorkflowStageConfig as bN, type WorkflowStageDefinition as bO, type WorkflowDefinition as bP, type ContentTypeWorkflowConfig as bQ, type KeyedWorkflowConfig as bR, type KeyedWorkflowStageConfig as bS, type KeyedWorkflowStageDefinition as bT, type KeyedWorkflowStages as bU, defineView as bV, type ViewScopeConfig as bW, type ContentTypeScopeConfig as bX, type ContentTypesScopeConfig as bY, type EntryTypeScopeConfig as bZ, type AllScopeConfig as b_, type ImageSourceConfig as ba, type ImageExifConfig as bb, type VariantDefinition as bc, type VideoUploadConfig as bd, type VideoPosterConfig as be, type VideoCaptionsConfig as bf, type VideoDownloadConfig as bg, type VideoWatermarkConfig as bh, type FileUploadConfig as bi, type FileScanConfig as bj, defineRole as bk, isRoleDefinition as bl, isBuiltInRole as bm, getBuiltInRoleActions as bn, BUILT_IN_ROLES as bo, ROLE_ACTIONS as bp, BUILT_IN_ROLE_ACTIONS as bq, type BuiltInRole as br, type RoleAction as bs, type ResourcePermission as bt, type FieldVisibility as bu, type RoleConfig as bv, type RoleDefinition as bw, type KeyedRoleConfig as bx, type KeyedRoleDefinition as by, type KeyedRoles as bz, type AssetAIConfig as c, type paths as c$, type ViewFilterValue as c0, type ViewFilterRelativeDate as c1, type ViewFilterCondition as c2, type ViewFilter as c3, type ViewConfig as c4, type ViewDefinition as c5, type KeyedViewConfig as c6, type KeyedViewDefinition as c7, type KeyedViews as c8, type KeyedViewsAsList as c9, type CreateInput as cA, type RevisedContent as cB, type RestoredContent as cC, type UpdateInput as cD, type SingletonContent as cE, type CustomQuery as cF, type ContentTypeSchema as cG, type FieldTypeName as cH, type ValidationRule as cI, type FieldOptions as cJ, type RealtimeEventType as cK, type RealtimeEvent as cL, type SubscriptionOptions as cM, type PerformanceMetrics as cN, type CacheConfig as cO, type RealtimeConfig as cP, type DebugConfig as cQ, type RequestConfig as cR, type ApiResponse as cS, type RetryConfig as cT, type CacheStrategy as cU, type LogLevel as cV, type Environment as cW, type ValidationViolation as cX, BaseValidationError as cY, ValidationError as cZ, InvalidPayloadError as c_, type InferJsonSchema as ca, type JsonFieldValue as cb, type JsonSchema as cc, type JsonValue as cd, type CheckedLocales as ce, type CheckedRoles as cf, type CheckedWorkflow as cg, type CheckedSection as ch, type KeysDeclared as ci, type LocaleCodesOf as cj, type StagesDeclared as ck, SDKError as cl, type RelyIOConfig as cm, type RelyIOConfigUpdate as cn, type LiveWebSocket as co, type LiveWebSocketConstructor as cp, type AssetFileBlock as cq, type AssetUrls as cr, type BaseContent as cs, type BaseSingleton as ct, type BaseSettingsGroup as cu, type WhereScalar as cv, type WhereFieldCondition as cw, type WhereClause as cx, type WhereOperator as cy, type DateOnlyOperator as cz, type BooleanConfig as d, type MergedRelyIOConfig as d0, type ReadWhere as d1, type CheckedInclude as d2, type components as d3, type FieldDefinition as d4, type DateTimeConfig as e, type DecimalConfig as f, type EnumConfig as g, type FieldDefinition$1 as h, type FieldRule as i, type FieldType as j, type FieldUIConfig as k, type KeyedField as l, type KeyedFieldOptions as m, type KeyedFields as n, type KeyedFieldsOf as o, type KeyedMembers as p, type KeyedMembersOf as q, type LocalizationConfig as r, type Localized as s, type LocalizedDetails as t, type LongTextConfig as u, type ReferenceConfig as v, type RequirementRule as w, type RichTextConfig as x, type RichTextLinks as y, type RuleCondition as z };
12538
+ export { enumField as $, type AIConfig as A, type BaseFieldConfig as B, type CodeConfig as C, type DateConfig as D, type EmailConfig as E, type FieldAIConfig as F, type RuleConditions as G, type SlugConfig as H, type IntegerConfig as I, type JsonConfig as J, type KeyedEnumConfig as K, type ListConfig as L, type TagsConfig as M, type VisibilityRule as N, type ObjectConfig as O, boolean as P, code as Q, type ReadOnlyRule as R, type ShortTextConfig as S, type TableConfig as T, type UrlConfig as U, type ValidationRule$1 as V, type WidgetOptions as W, date as X, dateTime as Y, decimal as Z, email as _, type AnyFieldDefinition as a, type AssetTypeDefinition as a$, integer as a0, json as a1, list as a2, longText as a3, object as a4, reference as a5, richText as a6, shortText as a7, slug as a8, table as a9, type TextDirection as aA, type LocaleOptions as aB, type LocaleDefinition as aC, defineContentType as aD, fieldset as aE, type Fieldset as aF, type DeclaredFieldset as aG, type AnyDeclaredFieldset as aH, type KeyedFieldsetConfig as aI, type FieldMember as aJ, type KeyedContentTypeConfig as aK, type ContentTypeDefinition as aL, type EntryMetadata as aM, type InferContentType as aN, type LocalePublicationFields as aO, defineSingleton as aP, type KeyedSingletonConfig as aQ, type SingletonContentTypeDefinition as aR, type SingletonMetadata as aS, type InferSingleton as aT, defineSettingsGroup as aU, type KeyedSettingsGroupConfig as aV, type SettingsGroupDefinition as aW, type SettingsGroupMetadata as aX, type InferSettingsGroup as aY, defineAssetType as aZ, type KeyedAssetTypeConfig as a_, tags as aa, url as ab, type FieldSchemaContext as ac, type FieldValue as ad, type FieldValues as ae, type DeclaredFields as af, type UnresolvedEntry as ag, type Keyed as ah, type BlockOf as ai, type ShapeValue as aj, type AssetReading as ak, type CheckedIncludes as al, type CheckInclude as am, type ContentReading as an, type IncludablePaths as ao, type Reading as ap, type ReadWith as aq, type SettingsReading as ar, type SingletonReading as as, type UntypedReading as at, defineLocale as au, isLocaleDefinition as av, getLocaleCodes as aw, findDefaultLocale as ax, getActiveLocales as ay, buildFallbackChain as az, type AnyKeyedField as b, type ViewFilterOperator as b$, type InferAssetType as b0, type InferAssetEntry as b1, type AssetServedBlocks as b2, type ImageKindConfig as b3, type VideoKindConfig as b4, type FileKindConfig as b5, type ImageTransform as b6, type ImageFitMode as b7, type ImageOutputFormat as b8, type ImageUploadConfig as b9, type KeyedRolesAsList as bA, defineWorkflow as bB, defineWorkflowStage as bC, defineContentTypeWorkflow as bD, isWorkflowDefinition as bE, isWorkflowStageDefinition as bF, getWorkflowStageIds as bG, findWorkflowStage as bH, getNextWorkflowStage as bI, getFirstWorkflowStage as bJ, isFinalWorkflowStage as bK, type WorkflowEscalation as bL, type WorkflowAutoAssign as bM, type WorkflowStageConfig as bN, type WorkflowStageDefinition as bO, type WorkflowDefinition as bP, type ContentTypeWorkflowConfig as bQ, type KeyedWorkflowConfig as bR, type KeyedWorkflowStageConfig as bS, type KeyedWorkflowStageDefinition as bT, type KeyedWorkflowStages as bU, defineView as bV, type ViewScopeConfig as bW, type ContentTypeScopeConfig as bX, type ContentTypesScopeConfig as bY, type EntryTypeScopeConfig as bZ, type AllScopeConfig as b_, type ImageSourceConfig as ba, type ImageExifConfig as bb, type VariantDefinition as bc, type VideoUploadConfig as bd, type VideoPosterConfig as be, type VideoCaptionsConfig as bf, type VideoDownloadConfig as bg, type VideoWatermarkConfig as bh, type FileUploadConfig as bi, type FileScanConfig as bj, defineRole as bk, isRoleDefinition as bl, isBuiltInRole as bm, getBuiltInRoleActions as bn, BUILT_IN_ROLES as bo, ROLE_ACTIONS as bp, BUILT_IN_ROLE_ACTIONS as bq, type BuiltInRole as br, type RoleAction as bs, type ResourcePermission as bt, type FieldVisibility as bu, type RoleConfig as bv, type RoleDefinition as bw, type KeyedRoleConfig as bx, type KeyedRoleDefinition as by, type KeyedRoles as bz, type AssetAIConfig as c, BaseValidationError as c$, type ViewFilterValue as c0, type ViewFilterRelativeDate as c1, type ViewFilterCondition as c2, type ViewFilter as c3, type ViewConfig as c4, type ViewDefinition as c5, type KeyedViewConfig as c6, type KeyedViewDefinition as c7, type KeyedViews as c8, type KeyedViewsAsList as c9, type CreateInput as cA, type CreatedContent as cB, type RevisedContent as cC, type WrittenSingleton as cD, type WrittenSettingsGroup as cE, type RestoredContent as cF, type ContentVersion as cG, type ContentVersionRow as cH, type UpdateInput as cI, type SingletonContent as cJ, type CustomQuery as cK, type ContentTypeSchema as cL, type ValidationRule as cM, type FieldOptions as cN, type RealtimeEventType as cO, type RealtimeEvent as cP, type SubscriptionOptions as cQ, type PerformanceMetrics as cR, type CacheConfig as cS, type DebugConfig as cT, type RequestConfig as cU, type ApiResponse as cV, type RetryConfig as cW, type CacheStrategy as cX, type LogLevel as cY, type Environment as cZ, type ValidationViolation as c_, type InferJsonSchema as ca, type JsonFieldValue as cb, type JsonSchema as cc, type JsonValue as cd, type CheckedLocales as ce, type CheckedRoles as cf, type CheckedWorkflow as cg, type CheckedSection as ch, type KeysDeclared as ci, type LocaleCodesOf as cj, type StagesDeclared as ck, SDKError as cl, type RelyIOConfig as cm, type RelyIOConfigUpdate as cn, type LiveWebSocket as co, type LiveWebSocketConstructor as cp, type AssetFileBlock as cq, type AssetUrls as cr, type BaseContent as cs, type BaseSingleton as ct, type BaseSettingsGroup as cu, type WhereScalar as cv, type WhereFieldCondition as cw, type WhereClause as cx, type WhereOperator as cy, type DateOnlyOperator as cz, type BooleanConfig as d, ValidationError as d0, InvalidPayloadError as d1, type paths as d2, type MergedRelyIOConfig as d3, type ReadWhere as d4, type components as d5, type CheckedInclude as d6, type FieldDefinition as d7, type DateTimeConfig as e, type DecimalConfig as f, type EnumConfig as g, type FieldDefinition$1 as h, type FieldRule as i, type FieldType as j, type FieldUIConfig as k, type KeyedField as l, type KeyedFieldOptions as m, type KeyedFields as n, type KeyedFieldsOf as o, type KeyedMembers as p, type KeyedMembersOf as q, type LocalizationConfig as r, type Localized as s, type LocalizedDetails as t, type LongTextConfig as u, type ReferenceConfig as v, type RequirementRule as w, type RichTextConfig as x, type RichTextLinks as y, type RuleCondition as z };