@withmarfa/client 0.0.8 → 0.0.10

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 (2) hide show
  1. package/dist/index.d.ts +1635 -709
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -8,6 +8,26 @@ declare const CONTRACT_VERSION = 0;
8
8
  * Do not make direct changes to the file.
9
9
  */
10
10
  interface paths {
11
+ "/": {
12
+ parameters: {
13
+ query?: never;
14
+ header?: never;
15
+ path?: never;
16
+ cookie?: never;
17
+ };
18
+ /**
19
+ * Describe the instance
20
+ * @description Describes the instance: its `instance_id`, the build it runs, the contract version it speaks and the features it serves. Needs no credential.
21
+ */
22
+ get: operations["getInstance"];
23
+ put?: never;
24
+ post?: never;
25
+ delete?: never;
26
+ options?: never;
27
+ head?: never;
28
+ patch?: never;
29
+ trace?: never;
30
+ };
11
31
  "/items": {
12
32
  parameters: {
13
33
  query?: never;
@@ -75,7 +95,7 @@ interface paths {
75
95
  head?: never;
76
96
  /**
77
97
  * Update an item
78
- * @description Updates an item's properties, tier, own time, natural key or edges. Send the `version` you read: if the item changed since, Marfa merges your changes where nothing collides. To change its type, send `type` with `retype: true`.
98
+ * @description Updates an item's properties, tier, own time, natural key or edges. Send the `version` you read; stale writes can merge unless `version_match` is `exact`. To change its type, send `type` with `retype: true`.
79
99
  */
80
100
  patch: operations["updateItem"];
81
101
  trace?: never;
@@ -425,7 +445,7 @@ interface paths {
425
445
  };
426
446
  /**
427
447
  * List outbound edges
428
- * @description Returns the edges that start at an item. An item in the trash still lists its edges. `GET /items/{id}/backrefs` lists the edges that point at it.
448
+ * @description Returns the edges that start at an item. An item in the trash still lists its edges. If `source_filter` leaves the item out, none of its edges appear here. `GET /items/{id}/backrefs` lists the edges that point at it.
429
449
  */
430
450
  get: operations["listItemEdges"];
431
451
  put?: never;
@@ -445,7 +465,7 @@ interface paths {
445
465
  };
446
466
  /**
447
467
  * List inbound edges
448
- * @description Returns the edges that point at an item. An item in the trash still lists its edges. `GET /items/{id}/edges` lists the edges that start at it.
468
+ * @description Returns the edges that point at an item. An item in the trash still lists its edges. An edge whose source item `source_filter` leaves out doesn't appear here, whatever the source of this item. `GET /items/{id}/edges` lists the edges that start at it.
449
469
  */
450
470
  get: operations["listItemBackrefs"];
451
471
  put?: never;
@@ -465,13 +485,13 @@ interface paths {
465
485
  };
466
486
  /**
467
487
  * List edges
468
- * @description Returns the edges you can read, newest first, whether or not the items they join are in the trash. A deleted edge doesn't appear here: `GET /events` reports deletions.
488
+ * @description Returns the edges you can read, newest first, whether or not the items they join are in the trash. A deleted edge doesn't appear: `GET /events` reports deletions. Nor does an edge whose source item `source_filter` leaves out.
469
489
  */
470
490
  get: operations["listEdges"];
471
491
  put?: never;
472
492
  /**
473
493
  * Create an edge
474
- * @description Creates an edge between two existing items. Repeating an `id` you already created returns the stored edge with `acknowledged: true` and writes nothing.
494
+ * @description Creates an edge between two existing items. After any `source_version` precondition passes, repeating an `id` you already created returns the stored edge with `acknowledged: true` and writes nothing.
475
495
  */
476
496
  post: operations["createEdge"];
477
497
  delete?: never;
@@ -543,7 +563,7 @@ interface paths {
543
563
  put?: never;
544
564
  /**
545
565
  * Register an edge type
546
- * @description Registers an edge type and returns it. An edge type can't extend another.
566
+ * @description Registers an edge type and returns it. With `evolve_constraints: true`, widens a registered type's endpoint constraints without changing its edges. An edge type can't extend another.
547
567
  */
548
568
  post: operations["registerEdgeType"];
549
569
  delete?: never;
@@ -1500,6 +1520,46 @@ interface paths {
1500
1520
  patch?: never;
1501
1521
  trace?: never;
1502
1522
  };
1523
+ "/auth/oauth2/register": {
1524
+ parameters: {
1525
+ query?: never;
1526
+ header?: never;
1527
+ path?: never;
1528
+ cookie?: never;
1529
+ };
1530
+ get?: never;
1531
+ put?: never;
1532
+ /**
1533
+ * Register an OAuth client
1534
+ * @description Registers an OAuth client for an app and returns it with its `client_id`. Send no credential; a web page can call it from a browser on any origin. The `client_credentials` grant isn't available: a program that acts for no person uses an API key.
1535
+ */
1536
+ post: operations["registerOAuthClient"];
1537
+ delete?: never;
1538
+ options?: never;
1539
+ head?: never;
1540
+ patch?: never;
1541
+ trace?: never;
1542
+ };
1543
+ "/events": {
1544
+ parameters: {
1545
+ query?: never;
1546
+ header?: never;
1547
+ path?: never;
1548
+ cookie?: never;
1549
+ };
1550
+ /**
1551
+ * Stream change events
1552
+ * @description Opens a Server-Sent Events stream of the changes to items and edges that you can read. Send `Last-Event-ID` to resume after a disconnect, or `copy=1` to follow a working copy.
1553
+ */
1554
+ get: operations["streamEvents"];
1555
+ put?: never;
1556
+ post?: never;
1557
+ delete?: never;
1558
+ options?: never;
1559
+ head?: never;
1560
+ patch?: never;
1561
+ trace?: never;
1562
+ };
1503
1563
  "/webhooks": {
1504
1564
  parameters: {
1505
1565
  query?: never;
@@ -1632,69 +1692,60 @@ interface paths {
1632
1692
  patch?: never;
1633
1693
  trace?: never;
1634
1694
  };
1635
- "/": {
1636
- parameters: {
1637
- query?: never;
1638
- header?: never;
1639
- path?: never;
1640
- cookie?: never;
1641
- };
1642
- /**
1643
- * Describe the instance
1644
- * @description Describes the instance: its `instance_id`, the build it runs, the contract version it speaks and the features it serves. Needs no credential.
1645
- */
1646
- get: operations["getInstance"];
1647
- put?: never;
1648
- post?: never;
1649
- delete?: never;
1650
- options?: never;
1651
- head?: never;
1652
- patch?: never;
1653
- trace?: never;
1654
- };
1655
- "/events": {
1656
- parameters: {
1657
- query?: never;
1658
- header?: never;
1659
- path?: never;
1660
- cookie?: never;
1661
- };
1662
- /**
1663
- * Stream change events
1664
- * @description Opens a Server-Sent Events stream of the changes to items and edges that you can read. Send `Last-Event-ID` to resume after a disconnect, or `copy=1` to follow a working copy.
1665
- */
1666
- get: operations["streamEvents"];
1667
- put?: never;
1668
- post?: never;
1669
- delete?: never;
1670
- options?: never;
1671
- head?: never;
1672
- patch?: never;
1673
- trace?: never;
1674
- };
1675
- "/auth/oauth2/register": {
1676
- parameters: {
1677
- query?: never;
1678
- header?: never;
1679
- path?: never;
1680
- cookie?: never;
1681
- };
1682
- get?: never;
1683
- put?: never;
1684
- /**
1685
- * Register an OAuth client
1686
- * @description Registers an OAuth client for an app and returns it with its `client_id`. Send no credential. The `client_credentials` grant isn't available: a program that acts for no person uses an API key.
1687
- */
1688
- post: operations["registerOAuthClient"];
1689
- delete?: never;
1690
- options?: never;
1691
- head?: never;
1692
- patch?: never;
1693
- trace?: never;
1694
- };
1695
1695
  }
1696
1696
  interface components {
1697
1697
  schemas: {
1698
+ /** @description An edge type says how edges of that type behave: its cardinality, what a delete does to the items they join, and which item types they can join. */
1699
+ EdgeType: {
1700
+ /** @description Unique identifier for the edge type. */
1701
+ id: string;
1702
+ /** @description A name for people to read. */
1703
+ label?: string;
1704
+ /** @description What the edge type is for. */
1705
+ description?: string;
1706
+ /**
1707
+ * @description How many edges of the type an item can hold. `one-to-one`: each source and each target holds one. `one-to-many`: each target holds one. `many-to-one`: each source holds one. `many-to-many`: no limit.
1708
+ * @enum {string}
1709
+ */
1710
+ cardinality: "one-to-one" | "one-to-many" | "many-to-one" | "many-to-many";
1711
+ /** @description The types an edge's source item can have: `*`, a type identifier or `role:<name>`. A type matches its subtypes. */
1712
+ source_type_constraints: string[];
1713
+ /** @description The types an edge's target item can have, in the same form as `source_type_constraints`. */
1714
+ target_type_constraints: string[];
1715
+ /**
1716
+ * @description What happens when an item an edge joins is deleted. `cascade`: deleting the source trashes the target. `orphan`: the other item stays. `block`: the delete fails while the edge exists.
1717
+ * @enum {string}
1718
+ */
1719
+ cascade_on_delete: "cascade" | "orphan" | "block";
1720
+ /** @description The properties an edge of the type can carry, by name. Marfa checks an edge's properties against it each time the edge is written, and accepts a property it doesn't list. */
1721
+ property_schema: {
1722
+ [key: string]: components["schemas"]["EdgePropertyDefinition"];
1723
+ };
1724
+ /** @description The name the edge goes by when read from its target, such as `child-of` for `parent-of`. */
1725
+ reverse_name?: string;
1726
+ /**
1727
+ * @description The end of an edge whose file writes it in a folder: `source`, or `target` under the reverse name.
1728
+ * @enum {string}
1729
+ */
1730
+ written_at: "source" | "target";
1731
+ /** @description `true` if Marfa ships the edge type: it exists on every instance, and you can't register or delete it. `false` for one registered through `POST /edge-types`. */
1732
+ shipped: boolean;
1733
+ };
1734
+ /** @description One property an edge of an edge type can carry. */
1735
+ EdgePropertyDefinition: {
1736
+ /** @description The property's type: one of the field types a type's `fields` take, except `thumbnail`. */
1737
+ type: string;
1738
+ /** @description What the property holds. */
1739
+ description?: string;
1740
+ /** @description `true` if every edge of the type must have the property. */
1741
+ required?: boolean;
1742
+ /** @description The values an `enum` property takes. */
1743
+ enum_values?: string[];
1744
+ /** @description The type of each element of an `array` property. It can't be `thumbnail`. */
1745
+ items_type?: string;
1746
+ /** @description A refinement of a `string` property. `url`, `email`, `date` and `datetime` store it as that type. `bcp47` and `iso3166` only label it. It can't be `thumbnail`. */
1747
+ format?: string;
1748
+ };
1698
1749
  /** @description A lever that applies to the types it names. */
1699
1750
  TypeLever: {
1700
1751
  /** @description The types the lever applies to. */
@@ -1790,7 +1841,7 @@ interface components {
1790
1841
  trashed_by_cascade?: boolean;
1791
1842
  /** @description The ID of the item whose trash took this one into the trash, beside `trashed_by_cascade`, whatever became of that item since. Present only if you can read that item's type. */
1792
1843
  trashed_with?: string;
1793
- /** @description The item's outbound edges you can read, by edge type. Each holds the first page of that type, which `GET /items/{id}/edges` continues. Absent where an operation doesn't return edges, such as a listing without `include=edges`. */
1844
+ /** @description The item's outbound edges you can read, by edge type, each the first page that `GET /items/{id}/edges` continues. Empty if `source_filter` leaves the item out. Absent where an operation doesn't return edges, such as a listing without `include=edges`. */
1794
1845
  edges?: {
1795
1846
  [key: string]: components["schemas"]["EdgePage"];
1796
1847
  };
@@ -2021,6 +2072,39 @@ interface components {
2021
2072
  [key: string]: unknown;
2022
2073
  };
2023
2074
  };
2075
+ /** @description An instance: its identity, build, contract version and features. */
2076
+ InstanceDescription: {
2077
+ /**
2078
+ * @description Always `marfa`.
2079
+ * @enum {string}
2080
+ */
2081
+ name: "marfa";
2082
+ /** @description The build the instance runs. */
2083
+ version: string;
2084
+ /** @description Unique identifier for the instance. `GET /config` and an archive's manifest show the same value. */
2085
+ instance_id: string;
2086
+ /** @description The contract version, the same number as this document's `info.version`. It stays at `0` until the first public release. */
2087
+ contract: number;
2088
+ /** @description The features the instance serves, such as `items` and `webhooks`. */
2089
+ features: string[];
2090
+ };
2091
+ /** @description An error response. */
2092
+ ValidationErrorRefusal: {
2093
+ /** @description What went wrong. */
2094
+ error: {
2095
+ /**
2096
+ * @description A machine-readable code for the error. Use it in your logic.
2097
+ * @enum {string}
2098
+ */
2099
+ code: "validation_error";
2100
+ /** @description A description of the error for a person to read. It can change, so don't match on it. */
2101
+ message: string;
2102
+ /** @description More about the error, such as the field it concerns. Each code defines its own details. */
2103
+ details?: {
2104
+ [key: string]: unknown;
2105
+ };
2106
+ };
2107
+ };
2024
2108
  /** @description An item with its metadata. */
2025
2109
  ItemWithMetadata: {
2026
2110
  item: components["schemas"]["Item"] & unknown;
@@ -2198,7 +2282,7 @@ interface components {
2198
2282
  ItemDetail: {
2199
2283
  item: components["schemas"]["Item"] & unknown;
2200
2284
  metadata: components["schemas"]["Metadata"] & unknown;
2201
- /** @description The item's inbound edges you can read, by edge type. Each holds the first page of that type, which `GET /items/{id}/backrefs` continues. Present with `include=backrefs`. */
2285
+ /** @description The item's inbound edges you can read, by edge type. Each holds the first page of that type, which `GET /items/{id}/backrefs` continues. An edge whose source item `source_filter` leaves out doesn't appear. Present with `include=backrefs`. */
2202
2286
  backrefs?: {
2203
2287
  [key: string]: components["schemas"]["EdgePage"];
2204
2288
  };
@@ -2280,7 +2364,7 @@ interface components {
2280
2364
  };
2281
2365
  };
2282
2366
  };
2283
- /** @description A stale write that carried nothing to merge: the error and the item now. */
2367
+ /** @description A failed exact version precondition: the error and the item now. */
2284
2368
  ItemStaleVersion: {
2285
2369
  error: components["schemas"]["VersionConflictError"] & unknown;
2286
2370
  current: components["schemas"]["ConflictSnapshot"] & unknown;
@@ -2550,23 +2634,6 @@ interface components {
2550
2634
  filter?: string;
2551
2635
  };
2552
2636
  /** @description An error response. */
2553
- ValidationErrorRefusal: {
2554
- /** @description What went wrong. */
2555
- error: {
2556
- /**
2557
- * @description A machine-readable code for the error. Use it in your logic.
2558
- * @enum {string}
2559
- */
2560
- code: "validation_error";
2561
- /** @description A description of the error for a person to read. It can change, so don't match on it. */
2562
- message: string;
2563
- /** @description More about the error, such as the field it concerns. Each code defines its own details. */
2564
- details?: {
2565
- [key: string]: unknown;
2566
- };
2567
- };
2568
- };
2569
- /** @description An error response. */
2570
2637
  ForbiddenRefusal: {
2571
2638
  /** @description What went wrong. */
2572
2639
  error: {
@@ -2712,56 +2779,9 @@ interface components {
2712
2779
  };
2713
2780
  };
2714
2781
  };
2715
- /** @description An edge type says how edges of that type behave: its cardinality, what a delete does to the items they join, and which item types they can join. */
2716
- EdgeType: {
2717
- /** @description Unique identifier for the edge type. */
2718
- id: string;
2719
- /** @description A name for people to read. */
2720
- label?: string;
2721
- /** @description What the edge type is for. */
2722
- description?: string;
2723
- /**
2724
- * @description How many edges of the type an item can hold. `one-to-one`: each source and each target holds one. `one-to-many`: each target holds one. `many-to-one`: each source holds one. `many-to-many`: no limit.
2725
- * @enum {string}
2726
- */
2727
- cardinality: "one-to-one" | "one-to-many" | "many-to-one" | "many-to-many";
2728
- /** @description The types an edge's source item can have: `*`, a type identifier or `role:<name>`. A type matches its subtypes. */
2729
- source_type_constraints: string[];
2730
- /** @description The types an edge's target item can have, in the same form as `source_type_constraints`. */
2731
- target_type_constraints: string[];
2732
- /**
2733
- * @description What happens when an item an edge joins is deleted. `cascade`: deleting the source trashes the target. `orphan`: the other item stays. `block`: the delete fails while the edge exists.
2734
- * @enum {string}
2735
- */
2736
- cascade_on_delete: "cascade" | "orphan" | "block";
2737
- /** @description The properties an edge of the type can carry, by name. Marfa checks an edge's properties against it each time the edge is written, and accepts a property it doesn't list. */
2738
- property_schema: {
2739
- [key: string]: components["schemas"]["EdgePropertyDefinition"];
2740
- };
2741
- /** @description The name the edge goes by when read from its target, such as `child-of` for `parent-of`. */
2742
- reverse_name?: string;
2743
- /**
2744
- * @description The end of an edge whose file writes it in a folder: `source`, or `target` under the reverse name.
2745
- * @enum {string}
2746
- */
2747
- written_at: "source" | "target";
2748
- /** @description `true` if Marfa ships the edge type: it exists on every instance, and you can't register or delete it. `false` for one registered through `POST /edge-types`. */
2749
- shipped: boolean;
2750
- };
2751
- /** @description One property an edge of an edge type can carry. */
2752
- EdgePropertyDefinition: {
2753
- /** @description The property's type: one of the field types a type's `fields` take, except `thumbnail`. */
2754
- type: string;
2755
- /** @description What the property holds. */
2756
- description?: string;
2757
- /** @description `true` if every edge of the type must have the property. */
2758
- required?: boolean;
2759
- /** @description The values an `enum` property takes. */
2760
- enum_values?: string[];
2761
- /** @description The type of each element of an `array` property. It can't be `thumbnail`. */
2762
- items_type?: string;
2763
- /** @description A refinement of a `string` property. `url`, `email`, `date` and `datetime` store it as that type. `bcp47` and `iso3166` only label it. It can't be `thumbnail`. */
2764
- format?: string;
2782
+ /** @description One registered edge type. */
2783
+ EdgeTypeRegistrationResponse: {
2784
+ edge_type: components["schemas"]["EdgeType"] & unknown;
2765
2785
  };
2766
2786
  /** @description An error response. */
2767
2787
  InvalidSchemaOrMissingRequiredFieldOrValidationErrorRefusal: {
@@ -2798,6 +2818,23 @@ interface components {
2798
2818
  };
2799
2819
  };
2800
2820
  /** @description An error response. */
2821
+ EdgeTypeNotFoundRefusal: {
2822
+ /** @description What went wrong. */
2823
+ error: {
2824
+ /**
2825
+ * @description A machine-readable code for the error. Use it in your logic.
2826
+ * @enum {string}
2827
+ */
2828
+ code: "edge_type_not_found";
2829
+ /** @description A description of the error for a person to read. It can change, so don't match on it. */
2830
+ message: string;
2831
+ /** @description More about the error, such as the field it concerns. Each code defines its own details. */
2832
+ details?: {
2833
+ [key: string]: unknown;
2834
+ };
2835
+ };
2836
+ };
2837
+ /** @description An error response. */
2801
2838
  ConflictRefusal: {
2802
2839
  /** @description What went wrong. */
2803
2840
  error: {
@@ -2815,7 +2852,7 @@ interface components {
2815
2852
  };
2816
2853
  };
2817
2854
  /** @description An edge type to register. */
2818
- EdgeTypeRequest: {
2855
+ EdgeTypeRegistrationRequest: {
2819
2856
  /** @description The identifier of the edge type, such as `acme.list-member`. */
2820
2857
  id: string;
2821
2858
  /** @description A name for people to read. */
@@ -2847,6 +2884,8 @@ interface components {
2847
2884
  * @enum {string}
2848
2885
  */
2849
2886
  written_at?: "source" | "target";
2887
+ /** @description `true` widens a registered type's endpoints in place. Retain every existing constraint token, or allow all types with `[]` or `*`; other members must stay unchanged. Omit or set `false` to register a new type. Not stored in the definition. */
2888
+ evolve_constraints?: boolean;
2850
2889
  };
2851
2890
  /** @description A page holding every edge type. */
2852
2891
  EdgeTypePage: {
@@ -2856,23 +2895,6 @@ interface components {
2856
2895
  next_cursor: string | null;
2857
2896
  };
2858
2897
  /** @description An error response. */
2859
- EdgeTypeNotFoundRefusal: {
2860
- /** @description What went wrong. */
2861
- error: {
2862
- /**
2863
- * @description A machine-readable code for the error. Use it in your logic.
2864
- * @enum {string}
2865
- */
2866
- code: "edge_type_not_found";
2867
- /** @description A description of the error for a person to read. It can change, so don't match on it. */
2868
- message: string;
2869
- /** @description More about the error, such as the field it concerns. Each code defines its own details. */
2870
- details?: {
2871
- [key: string]: unknown;
2872
- };
2873
- };
2874
- };
2875
- /** @description An error response. */
2876
2898
  EdgeTypeInUseRefusal: {
2877
2899
  /** @description What went wrong. */
2878
2900
  error: {
@@ -3059,8 +3081,6 @@ interface components {
3059
3081
  merge_policy?: components["schemas"]["MergePolicy"] & unknown;
3060
3082
  /** @description The type's identifier, such as `acme.deal` or `user.recipe`. */
3061
3083
  id: string;
3062
- } & {
3063
- [key: string]: unknown;
3064
3084
  };
3065
3085
  /** @description One type. */
3066
3086
  TypeResponse: {
@@ -3142,8 +3162,8 @@ interface components {
3142
3162
  link_field?: string;
3143
3163
  version_policy?: components["schemas"]["VersionPolicy"] & unknown;
3144
3164
  merge_policy?: components["schemas"]["MergePolicy"] & unknown;
3145
- } & {
3146
- [key: string]: unknown;
3165
+ /** @description The type's identifier, as `GET /types/{id}` returns it. The path names the type, so an identifier here changes nothing. */
3166
+ id?: string;
3147
3167
  };
3148
3168
  /** @description An error response. */
3149
3169
  TypeHasSubtypesOrTypeInUseRefusal: {
@@ -4261,6 +4281,83 @@ interface components {
4261
4281
  };
4262
4282
  };
4263
4283
  };
4284
+ /** @description An OAuth client: its app metadata and the grants it uses. */
4285
+ OAuthClientRegistration: {
4286
+ /** @description The addresses Marfa may send a person back to after authorization. Required for `authorization_code`. At most 10. A `web` client's URIs must use `https` off the loopback; a `native` client may use `http` on `localhost`, `127.0.0.1` or `[::1]`. */
4287
+ redirect_uris?: string[];
4288
+ /** @description Space-separated scopes to register the client for. `offline_access` needs `refresh_token` or `authorization_code` in `grant_types`. Leave it out to register the client for every scope the instance allows that it can use. */
4289
+ scope?: string;
4290
+ /** @description The app's name, which Marfa shows a person asked to approve it. */
4291
+ client_name?: string;
4292
+ /** @description The app's home page URL. Leave it out if the app has none. */
4293
+ client_uri?: string;
4294
+ /** @description The app's logo URL. Leave it out if the app has none. */
4295
+ logo_uri?: string;
4296
+ /** @description Contact addresses for the app. Leave it out if there are none. */
4297
+ contacts?: string[];
4298
+ /** @description The app's terms of service URL. Leave it out if the app has none. */
4299
+ tos_uri?: string;
4300
+ /** @description The app's privacy policy URL. Leave it out if the app has none. */
4301
+ policy_uri?: string;
4302
+ /** @description The software's identifier. Leave it out if there is none. */
4303
+ software_id?: string;
4304
+ /** @description The software's version. Leave it out if there is none. */
4305
+ software_version?: string;
4306
+ /** @description A signed software statement. Leave it out to register without one. */
4307
+ software_statement?: string;
4308
+ /** @description Addresses the app may return to after sign-out. Leave it out if there are none. */
4309
+ post_logout_redirect_uris?: string[];
4310
+ /**
4311
+ * @description `none` is public, `client_secret_basic` uses HTTP Basic and `client_secret_post` sends the secret in the body. Other methods, including `private_key_jwt`, are refused with `invalid_client_metadata`.
4312
+ * @default client_secret_basic
4313
+ * @enum {string}
4314
+ */
4315
+ token_endpoint_auth_method: "none" | "client_secret_basic" | "client_secret_post";
4316
+ /** @description The client's public JSON Web Key Set. Leave it out if the client has none. */
4317
+ jwks?: {
4318
+ /** @description The client's public JSON Web Keys, including any extension members. */
4319
+ keys: {
4320
+ [key: string]: unknown;
4321
+ }[];
4322
+ };
4323
+ /** @description The URL of the client's public JSON Web Key Set. Leave it out if the client has none. */
4324
+ jwks_uri?: string;
4325
+ /** @description The grants the client uses: `authorization_code`, `refresh_token` or `urn:ietf:params:oauth:grant-type:device_code`. Defaults to `authorization_code`. Without `authorization_code`, add `refresh_token` to get a refresh token with `offline_access`. */
4326
+ grant_types?: string[];
4327
+ /** @description The response types the client uses. Defaults to `code` when `grant_types` includes `authorization_code`. */
4328
+ response_types?: "code"[];
4329
+ /**
4330
+ * @description `web` or `native`, which decides the redirect URIs the client may use. Defaults to `web`.
4331
+ * @enum {string}
4332
+ */
4333
+ application_type?: "web" | "native";
4334
+ /**
4335
+ * @description `public` for public subject identifiers. Leave it out to use public identifiers. `pairwise` is refused with `invalid_client_metadata`.
4336
+ * @enum {string}
4337
+ */
4338
+ subject_type?: "public";
4339
+ /** @description `true` to bind the client's access tokens to DPoP proofs. Leave it out for tokens without that binding. */
4340
+ dpop_bound_access_tokens?: boolean;
4341
+ /** @description Resource identifiers to register the client for. Leave it out for the instance's default resources. */
4342
+ resources?: string[];
4343
+ };
4344
+ /** @description An error response. */
4345
+ StreamCapacityExhaustedOrWriteContentionRefusal: {
4346
+ /** @description What went wrong. */
4347
+ error: {
4348
+ /**
4349
+ * @description A machine-readable code for the error. Use it in your logic.
4350
+ * @enum {string}
4351
+ */
4352
+ code: "stream_capacity_exhausted" | "write_contention";
4353
+ /** @description A description of the error for a person to read. It can change, so don't match on it. */
4354
+ message: string;
4355
+ /** @description More about the error, such as the field it concerns. Each code defines its own details. */
4356
+ details?: {
4357
+ [key: string]: unknown;
4358
+ };
4359
+ };
4360
+ };
4264
4361
  /** @description A webhook sends the events you choose, as you can read them, to a URL. */
4265
4362
  Webhook: {
4266
4363
  /** @description Unique identifier for the webhook. */
@@ -4437,14 +4534,14 @@ interface components {
4437
4534
  };
4438
4535
  };
4439
4536
  /** @description An error response. */
4440
- IdempotencyKeyInFlightRefusal: {
4537
+ InstanceChangedRefusal: {
4441
4538
  /** @description What went wrong. */
4442
4539
  error: {
4443
4540
  /**
4444
4541
  * @description A machine-readable code for the error. Use it in your logic.
4445
4542
  * @enum {string}
4446
4543
  */
4447
- code: "idempotency_key_in_flight";
4544
+ code: "instance_changed";
4448
4545
  /** @description A description of the error for a person to read. It can change, so don't match on it. */
4449
4546
  message: string;
4450
4547
  /** @description More about the error, such as the field it concerns. Each code defines its own details. */
@@ -4454,14 +4551,14 @@ interface components {
4454
4551
  };
4455
4552
  };
4456
4553
  /** @description An error response. */
4457
- IdempotencyKeyReusedOrIdempotencyResultNotRetainedRefusal: {
4554
+ IdempotencyKeyInFlightRefusal: {
4458
4555
  /** @description What went wrong. */
4459
4556
  error: {
4460
4557
  /**
4461
4558
  * @description A machine-readable code for the error. Use it in your logic.
4462
4559
  * @enum {string}
4463
4560
  */
4464
- code: "idempotency_key_reused" | "idempotency_result_not_retained";
4561
+ code: "idempotency_key_in_flight";
4465
4562
  /** @description A description of the error for a person to read. It can change, so don't match on it. */
4466
4563
  message: string;
4467
4564
  /** @description More about the error, such as the field it concerns. Each code defines its own details. */
@@ -4471,14 +4568,14 @@ interface components {
4471
4568
  };
4472
4569
  };
4473
4570
  /** @description An error response. */
4474
- StreamCapacityExhaustedOrWriteContentionRefusal: {
4571
+ IdempotencyKeyReusedOrIdempotencyResultNotRetainedRefusal: {
4475
4572
  /** @description What went wrong. */
4476
4573
  error: {
4477
4574
  /**
4478
4575
  * @description A machine-readable code for the error. Use it in your logic.
4479
4576
  * @enum {string}
4480
4577
  */
4481
- code: "stream_capacity_exhausted" | "write_contention";
4578
+ code: "idempotency_key_reused" | "idempotency_result_not_retained";
4482
4579
  /** @description A description of the error for a person to read. It can change, so don't match on it. */
4483
4580
  message: string;
4484
4581
  /** @description More about the error, such as the field it concerns. Each code defines its own details. */
@@ -4639,6 +4736,52 @@ interface components {
4639
4736
  pathItems: never;
4640
4737
  }
4641
4738
  interface operations {
4739
+ getInstance: {
4740
+ parameters: {
4741
+ query?: never;
4742
+ header?: never;
4743
+ path?: never;
4744
+ cookie?: never;
4745
+ };
4746
+ requestBody?: never;
4747
+ responses: {
4748
+ /** @description Returns the instance's description. A request whose `Accept` header prefers `text/html` gets an HTML page instead. */
4749
+ 200: {
4750
+ headers: {
4751
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
4752
+ "X-Request-ID": components["headers"]["X-Request-ID"];
4753
+ [name: string]: unknown;
4754
+ };
4755
+ content: {
4756
+ "application/json": components["schemas"]["InstanceDescription"];
4757
+ };
4758
+ };
4759
+ /** @description - `validation_error`: the query has a parameter this endpoint doesn't take. */
4760
+ 400: {
4761
+ headers: {
4762
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
4763
+ "X-Request-ID": components["headers"]["X-Request-ID"];
4764
+ "X-Error-Code": components["headers"]["X-Error-Code"];
4765
+ [name: string]: unknown;
4766
+ };
4767
+ content: {
4768
+ "application/json": components["schemas"]["ValidationErrorRefusal"];
4769
+ };
4770
+ };
4771
+ /** @description `internal_error`: Marfa failed in a way it didn't expect, and the request may not have completed. Read what you changed before you repeat a write. */
4772
+ 500: {
4773
+ headers: {
4774
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
4775
+ "X-Request-ID": components["headers"]["X-Request-ID"];
4776
+ "X-Error-Code": components["headers"]["X-Error-Code"];
4777
+ [name: string]: unknown;
4778
+ };
4779
+ content: {
4780
+ "application/json": components["schemas"]["InternalErrorRefusal"];
4781
+ };
4782
+ };
4783
+ };
4784
+ };
4642
4785
  listItems: {
4643
4786
  parameters: {
4644
4787
  query?: {
@@ -4833,6 +4976,8 @@ interface operations {
4833
4976
  header?: {
4834
4977
  /** @description A unique key that makes the request safe to retry. If you send the same request with the same key again, Marfa returns the first response and doesn't write again. A key belongs to the credential that sends it. */
4835
4978
  "Idempotency-Key"?: string;
4979
+ /** @description The ID of the instance you expect, as `GET /` returns it. If another instance answers at this address, Marfa returns `409 instance_changed` and doesn't write. Leave it out to send the request to whichever instance answers. */
4980
+ "X-Marfa-Instance-Id"?: string;
4836
4981
  };
4837
4982
  path?: never;
4838
4983
  cookie?: never;
@@ -4909,7 +5054,7 @@ interface operations {
4909
5054
  };
4910
5055
  };
4911
5056
  /**
4912
- * @description - `validation_error`: a field is invalid.
5057
+ * @description - `validation_error`: a field is invalid or undeclared.
4913
5058
  * - `missing_required_field`: `type` is missing.
4914
5059
  * - `unknown_type`: `type` isn't registered.
4915
5060
  * - `invalid_id`: `id` or an edge target isn't a valid ID.
@@ -5003,7 +5148,7 @@ interface operations {
5003
5148
  [name: string]: unknown;
5004
5149
  };
5005
5150
  content: {
5006
- "application/json": components["schemas"]["ItemVersionConflict"] | components["schemas"]["ItemAncestorUnavailable"] | components["schemas"]["ConflictOrIdReusedOrLinkTakenOrTypeMismatchRefusal"] | components["schemas"]["IdempotencyKeyInFlightRefusal"];
5151
+ "application/json": components["schemas"]["ItemVersionConflict"] | components["schemas"]["ItemAncestorUnavailable"] | components["schemas"]["ConflictOrIdReusedOrLinkTakenOrTypeMismatchRefusal"] | components["schemas"]["InstanceChangedRefusal"] | components["schemas"]["IdempotencyKeyInFlightRefusal"];
5007
5152
  };
5008
5153
  };
5009
5154
  /** @description `request_too_large`: the request body is larger than this instance accepts. */
@@ -5453,6 +5598,8 @@ interface operations {
5453
5598
  header?: {
5454
5599
  /** @description A unique key that makes the request safe to retry. If you send the same request with the same key again, Marfa returns the first response and doesn't write again. A key belongs to the credential that sends it. */
5455
5600
  "Idempotency-Key"?: string;
5601
+ /** @description The ID of the instance you expect, as `GET /` returns it. If another instance answers at this address, Marfa returns `409 instance_changed` and doesn't write. Leave it out to send the request to whichever instance answers. */
5602
+ "X-Marfa-Instance-Id"?: string;
5456
5603
  };
5457
5604
  path: {
5458
5605
  /** @description The ID of the item. */
@@ -5562,7 +5709,7 @@ interface operations {
5562
5709
  [name: string]: unknown;
5563
5710
  };
5564
5711
  content: {
5565
- "application/json": components["schemas"]["ItemStaleVersion"] | components["schemas"]["IdempotencyKeyInFlightRefusal"];
5712
+ "application/json": components["schemas"]["ItemStaleVersion"] | components["schemas"]["InstanceChangedRefusal"] | components["schemas"]["IdempotencyKeyInFlightRefusal"];
5566
5713
  };
5567
5714
  };
5568
5715
  /** @description `request_too_large`: the request body is larger than this instance accepts. */
@@ -5672,6 +5819,8 @@ interface operations {
5672
5819
  header?: {
5673
5820
  /** @description A unique key that makes the request safe to retry. If you send the same request with the same key again, Marfa returns the first response and doesn't write again. A key belongs to the credential that sends it. */
5674
5821
  "Idempotency-Key"?: string;
5822
+ /** @description The ID of the instance you expect, as `GET /` returns it. If another instance answers at this address, Marfa returns `409 instance_changed` and doesn't write. Leave it out to send the request to whichever instance answers. */
5823
+ "X-Marfa-Instance-Id"?: string;
5675
5824
  };
5676
5825
  path: {
5677
5826
  /** @description The ID of the item. */
@@ -5697,6 +5846,11 @@ interface operations {
5697
5846
  retype?: boolean;
5698
5847
  /** @description The version of the item you read, which this update is based on. */
5699
5848
  version: number;
5849
+ /**
5850
+ * @description `exact` requires the item to still hold `version`, even if the fields changed do not collide. If omitted, a stale write can merge over changes to other fields.
5851
+ * @enum {string}
5852
+ */
5853
+ version_match?: "exact";
5700
5854
  tier?: components["schemas"]["Tier"] & unknown;
5701
5855
  /** @description When the item occurred, as an ISO 8601 time. */
5702
5856
  occurred_at?: string;
@@ -5812,11 +5966,11 @@ interface operations {
5812
5966
  };
5813
5967
  };
5814
5968
  /**
5815
- * @description - `version_conflict`: `version` is stale and a change collides, or only edges change. `current` is the item now.
5816
- * - `ancestor_unavailable`: Marfa holds no snapshot of `version` that you can read.
5817
- * - `source_id_conflict`: another item under the source holds this `source_id`.
5818
- * - `link_taken`: another item of the type holds this link.
5819
- * - `type_mismatch`: `type` differs and `retype` isn't `true`.
5969
+ * @description - `version_conflict`: stale exact precondition, colliding change, or stale edges-only write. `current` is the item now.
5970
+ * - `ancestor_unavailable`: no readable snapshot of `version`.
5971
+ * - `source_id_conflict`: another item under the source holds `source_id`.
5972
+ * - `link_taken`: another item of the type holds the link.
5973
+ * - `type_mismatch`: `type` differs without `retype: true`.
5820
5974
  */
5821
5975
  409: {
5822
5976
  headers: {
@@ -5830,7 +5984,7 @@ interface operations {
5830
5984
  [name: string]: unknown;
5831
5985
  };
5832
5986
  content: {
5833
- "application/json": components["schemas"]["ItemVersionConflict"] | components["schemas"]["ItemStaleVersion"] | components["schemas"]["ItemAncestorUnavailable"] | components["schemas"]["LinkTakenOrSourceIdConflictOrTypeMismatchRefusal"] | components["schemas"]["IdempotencyKeyInFlightRefusal"];
5987
+ "application/json": components["schemas"]["ItemVersionConflict"] | components["schemas"]["ItemStaleVersion"] | components["schemas"]["ItemAncestorUnavailable"] | components["schemas"]["LinkTakenOrSourceIdConflictOrTypeMismatchRefusal"] | components["schemas"]["InstanceChangedRefusal"] | components["schemas"]["IdempotencyKeyInFlightRefusal"];
5834
5988
  };
5835
5989
  };
5836
5990
  /** @description `request_too_large`: the request body is larger than this instance accepts. */
@@ -5937,6 +6091,8 @@ interface operations {
5937
6091
  header?: {
5938
6092
  /** @description A unique key that makes the request safe to retry. If you send the same request with the same key again, Marfa returns the first response and doesn't write again. A key belongs to the credential that sends it. */
5939
6093
  "Idempotency-Key"?: string;
6094
+ /** @description The ID of the instance you expect, as `GET /` returns it. If another instance answers at this address, Marfa returns `409 instance_changed` and doesn't write. Leave it out to send the request to whichever instance answers. */
6095
+ "X-Marfa-Instance-Id"?: string;
5940
6096
  };
5941
6097
  path: {
5942
6098
  /** @description The ID of the item. */
@@ -6027,7 +6183,7 @@ interface operations {
6027
6183
  "application/json": components["schemas"]["ItemNotFoundRefusal"];
6028
6184
  };
6029
6185
  };
6030
- /** @description - `idempotency_key_in_flight`: a request with this `Idempotency-Key` is still running, and this one wrote nothing. Retry. */
6186
+ /** @description `instance_changed`: `X-Marfa-Instance-Id` names another instance. Nothing is written. Rebuild the working copy from the instance at this address. */
6031
6187
  409: {
6032
6188
  headers: {
6033
6189
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
@@ -6040,7 +6196,7 @@ interface operations {
6040
6196
  [name: string]: unknown;
6041
6197
  };
6042
6198
  content: {
6043
- "application/json": components["schemas"]["IdempotencyKeyInFlightRefusal"];
6199
+ "application/json": components["schemas"]["InstanceChangedRefusal"] | components["schemas"]["IdempotencyKeyInFlightRefusal"];
6044
6200
  };
6045
6201
  };
6046
6202
  /** @description `request_too_large`: the request body is larger than this instance accepts. */
@@ -6143,10 +6299,15 @@ interface operations {
6143
6299
  };
6144
6300
  transitionItem: {
6145
6301
  parameters: {
6146
- query?: never;
6302
+ query?: {
6303
+ /** @description The item version you read. If it differs, nothing moves. Leave it out to move the item as it is. */
6304
+ version?: number;
6305
+ };
6147
6306
  header?: {
6148
6307
  /** @description A unique key that makes the request safe to retry. If you send the same request with the same key again, Marfa returns the first response and doesn't write again. A key belongs to the credential that sends it. */
6149
6308
  "Idempotency-Key"?: string;
6309
+ /** @description The ID of the instance you expect, as `GET /` returns it. If another instance answers at this address, Marfa returns `409 instance_changed` and doesn't write. Leave it out to send the request to whichever instance answers. */
6310
+ "X-Marfa-Instance-Id"?: string;
6150
6311
  };
6151
6312
  path: {
6152
6313
  /** @description The ID of the item. */
@@ -6184,7 +6345,7 @@ interface operations {
6184
6345
  /**
6185
6346
  * @description - `invalid_transition`: the type's lifecycle doesn't allow the move, such as `trashed` to `archived`. Restore first.
6186
6347
  * - `edge_constraint_violation`: a `block` edge holds an item that a move to `trashed` would take.
6187
- * - `validation_error`: `state` is not a valid state.
6348
+ * - `validation_error`: `state` is invalid, or the body has a field this endpoint doesn't take.
6188
6349
  * - `missing_required_field`: `state` is missing.
6189
6350
  * - `invalid_id`: the ID is not valid.
6190
6351
  */
@@ -6252,7 +6413,7 @@ interface operations {
6252
6413
  "application/json": components["schemas"]["EdgeNotFoundOrItemNotFoundRefusal"];
6253
6414
  };
6254
6415
  };
6255
- /** @description - `idempotency_key_in_flight`: a request with this `Idempotency-Key` is still running, and this one wrote nothing. Retry. */
6416
+ /** @description `version_conflict`: `version` differs from the item. `current` is the item now; nothing moved. */
6256
6417
  409: {
6257
6418
  headers: {
6258
6419
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
@@ -6265,7 +6426,7 @@ interface operations {
6265
6426
  [name: string]: unknown;
6266
6427
  };
6267
6428
  content: {
6268
- "application/json": components["schemas"]["IdempotencyKeyInFlightRefusal"];
6429
+ "application/json": components["schemas"]["ItemStaleVersion"] | components["schemas"]["InstanceChangedRefusal"] | components["schemas"]["IdempotencyKeyInFlightRefusal"];
6269
6430
  };
6270
6431
  };
6271
6432
  /** @description `request_too_large`: the request body is larger than this instance accepts. */
@@ -6678,7 +6839,12 @@ interface operations {
6678
6839
  replaceItemMetadata: {
6679
6840
  parameters: {
6680
6841
  query?: never;
6681
- header?: never;
6842
+ header?: {
6843
+ /** @description A unique key that makes the request safe to retry. If you send the same request with the same key again, Marfa returns the first response and doesn't write again. A key belongs to the credential that sends it. */
6844
+ "Idempotency-Key"?: string;
6845
+ /** @description The ID of the instance you expect, as `GET /` returns it. If another instance answers at this address, Marfa returns `409 instance_changed` and doesn't write. Leave it out to send the request to whichever instance answers. */
6846
+ "X-Marfa-Instance-Id"?: string;
6847
+ };
6682
6848
  path: {
6683
6849
  /** @description The ID of the item. */
6684
6850
  id: string;
@@ -6705,6 +6871,7 @@ interface operations {
6705
6871
  "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
6706
6872
  "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
6707
6873
  "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
6874
+ "Idempotency-Replayed": components["headers"]["Idempotency-Replayed"];
6708
6875
  [name: string]: unknown;
6709
6876
  };
6710
6877
  content: {
@@ -6712,7 +6879,7 @@ interface operations {
6712
6879
  };
6713
6880
  };
6714
6881
  /**
6715
- * @description - `validation_error`: `tags` is not a list of valid tags, or has more than 100.
6882
+ * @description - `validation_error`: `tags` is not a list of valid tags or has more than 100, or the body has a field this endpoint doesn't take.
6716
6883
  * - `invalid_id`: the ID is not a valid item ID.
6717
6884
  */
6718
6885
  400: {
@@ -6723,6 +6890,7 @@ interface operations {
6723
6890
  "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
6724
6891
  "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
6725
6892
  "X-Error-Code": components["headers"]["X-Error-Code"];
6893
+ "Idempotency-Replayed": components["headers"]["Idempotency-Replayed"];
6726
6894
  [name: string]: unknown;
6727
6895
  };
6728
6896
  content: {
@@ -6768,12 +6936,29 @@ interface operations {
6768
6936
  "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
6769
6937
  "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
6770
6938
  "X-Error-Code": components["headers"]["X-Error-Code"];
6939
+ "Idempotency-Replayed": components["headers"]["Idempotency-Replayed"];
6771
6940
  [name: string]: unknown;
6772
6941
  };
6773
6942
  content: {
6774
6943
  "application/json": components["schemas"]["ItemNotFoundRefusal"];
6775
6944
  };
6776
6945
  };
6946
+ /** @description `instance_changed`: `X-Marfa-Instance-Id` names another instance. Nothing is written. Rebuild the working copy from the instance at this address. */
6947
+ 409: {
6948
+ headers: {
6949
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
6950
+ "X-Request-ID": components["headers"]["X-Request-ID"];
6951
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
6952
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
6953
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
6954
+ "X-Error-Code": components["headers"]["X-Error-Code"];
6955
+ "Idempotency-Replayed": components["headers"]["Idempotency-Replayed"];
6956
+ [name: string]: unknown;
6957
+ };
6958
+ content: {
6959
+ "application/json": components["schemas"]["InstanceChangedRefusal"] | components["schemas"]["IdempotencyKeyInFlightRefusal"];
6960
+ };
6961
+ };
6777
6962
  /** @description `request_too_large`: the request body is larger than this instance accepts. */
6778
6963
  413: {
6779
6964
  headers: {
@@ -6786,6 +6971,25 @@ interface operations {
6786
6971
  "application/json": components["schemas"]["RequestTooLargeRefusal"];
6787
6972
  };
6788
6973
  };
6974
+ /**
6975
+ * @description - `idempotency_key_reused`: the key was first used for a different request. Nothing is written.
6976
+ * - `idempotency_result_not_retained`: the first response was too large to keep, so Marfa can't replay it. The write isn't repeated.
6977
+ */
6978
+ 422: {
6979
+ headers: {
6980
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
6981
+ "X-Request-ID": components["headers"]["X-Request-ID"];
6982
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
6983
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
6984
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
6985
+ "X-Error-Code": components["headers"]["X-Error-Code"];
6986
+ "Idempotency-Replayed": components["headers"]["Idempotency-Replayed"];
6987
+ [name: string]: unknown;
6988
+ };
6989
+ content: {
6990
+ "application/json": components["schemas"]["IdempotencyKeyReusedOrIdempotencyResultNotRetainedRefusal"];
6991
+ };
6992
+ };
6789
6993
  /** @description `rate_limited`: you sent too many requests. Wait for the number of seconds in `Retry-After`, then try again. */
6790
6994
  429: {
6791
6995
  headers: {
@@ -6796,6 +7000,7 @@ interface operations {
6796
7000
  "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
6797
7001
  "X-Error-Code": components["headers"]["X-Error-Code"];
6798
7002
  "Retry-After": components["headers"]["Retry-After"];
7003
+ "Idempotency-Replayed": components["headers"]["Idempotency-Replayed"];
6799
7004
  [name: string]: unknown;
6800
7005
  };
6801
7006
  content: {
@@ -6811,6 +7016,7 @@ interface operations {
6811
7016
  "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
6812
7017
  "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
6813
7018
  "X-Error-Code": components["headers"]["X-Error-Code"];
7019
+ "Idempotency-Replayed": components["headers"]["Idempotency-Replayed"];
6814
7020
  [name: string]: unknown;
6815
7021
  };
6816
7022
  content: {
@@ -6826,6 +7032,7 @@ interface operations {
6826
7032
  "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
6827
7033
  "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
6828
7034
  "X-Error-Code": components["headers"]["X-Error-Code"];
7035
+ "Idempotency-Replayed": components["headers"]["Idempotency-Replayed"];
6829
7036
  [name: string]: unknown;
6830
7037
  };
6831
7038
  content: {
@@ -6841,6 +7048,7 @@ interface operations {
6841
7048
  "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
6842
7049
  "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
6843
7050
  "X-Error-Code": components["headers"]["X-Error-Code"];
7051
+ "Idempotency-Replayed": components["headers"]["Idempotency-Replayed"];
6844
7052
  [name: string]: unknown;
6845
7053
  };
6846
7054
  content: {
@@ -6852,7 +7060,12 @@ interface operations {
6852
7060
  updateItemMetadata: {
6853
7061
  parameters: {
6854
7062
  query?: never;
6855
- header?: never;
7063
+ header?: {
7064
+ /** @description A unique key that makes the request safe to retry. If you send the same request with the same key again, Marfa returns the first response and doesn't write again. A key belongs to the credential that sends it. */
7065
+ "Idempotency-Key"?: string;
7066
+ /** @description The ID of the instance you expect, as `GET /` returns it. If another instance answers at this address, Marfa returns `409 instance_changed` and doesn't write. Leave it out to send the request to whichever instance answers. */
7067
+ "X-Marfa-Instance-Id"?: string;
7068
+ };
6856
7069
  path: {
6857
7070
  /** @description The ID of the item. */
6858
7071
  id: string;
@@ -6876,6 +7089,7 @@ interface operations {
6876
7089
  "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
6877
7090
  "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
6878
7091
  "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
7092
+ "Idempotency-Replayed": components["headers"]["Idempotency-Replayed"];
6879
7093
  [name: string]: unknown;
6880
7094
  };
6881
7095
  content: {
@@ -6883,7 +7097,7 @@ interface operations {
6883
7097
  };
6884
7098
  };
6885
7099
  /**
6886
- * @description - `validation_error`: `tags` is not a list of valid tags, or the item would hold more than 100.
7100
+ * @description - `validation_error`: `tags` is not a list of valid tags or the item would hold more than 100, or the body has a field this endpoint doesn't take.
6887
7101
  * - `invalid_id`: the ID is not a valid item ID.
6888
7102
  */
6889
7103
  400: {
@@ -6894,6 +7108,7 @@ interface operations {
6894
7108
  "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
6895
7109
  "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
6896
7110
  "X-Error-Code": components["headers"]["X-Error-Code"];
7111
+ "Idempotency-Replayed": components["headers"]["Idempotency-Replayed"];
6897
7112
  [name: string]: unknown;
6898
7113
  };
6899
7114
  content: {
@@ -6939,12 +7154,29 @@ interface operations {
6939
7154
  "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
6940
7155
  "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
6941
7156
  "X-Error-Code": components["headers"]["X-Error-Code"];
7157
+ "Idempotency-Replayed": components["headers"]["Idempotency-Replayed"];
6942
7158
  [name: string]: unknown;
6943
7159
  };
6944
7160
  content: {
6945
7161
  "application/json": components["schemas"]["ItemNotFoundRefusal"];
6946
7162
  };
6947
7163
  };
7164
+ /** @description `instance_changed`: `X-Marfa-Instance-Id` names another instance. Nothing is written. Rebuild the working copy from the instance at this address. */
7165
+ 409: {
7166
+ headers: {
7167
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
7168
+ "X-Request-ID": components["headers"]["X-Request-ID"];
7169
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
7170
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
7171
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
7172
+ "X-Error-Code": components["headers"]["X-Error-Code"];
7173
+ "Idempotency-Replayed": components["headers"]["Idempotency-Replayed"];
7174
+ [name: string]: unknown;
7175
+ };
7176
+ content: {
7177
+ "application/json": components["schemas"]["InstanceChangedRefusal"] | components["schemas"]["IdempotencyKeyInFlightRefusal"];
7178
+ };
7179
+ };
6948
7180
  /** @description `request_too_large`: the request body is larger than this instance accepts. */
6949
7181
  413: {
6950
7182
  headers: {
@@ -6957,6 +7189,25 @@ interface operations {
6957
7189
  "application/json": components["schemas"]["RequestTooLargeRefusal"];
6958
7190
  };
6959
7191
  };
7192
+ /**
7193
+ * @description - `idempotency_key_reused`: the key was first used for a different request. Nothing is written.
7194
+ * - `idempotency_result_not_retained`: the first response was too large to keep, so Marfa can't replay it. The write isn't repeated.
7195
+ */
7196
+ 422: {
7197
+ headers: {
7198
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
7199
+ "X-Request-ID": components["headers"]["X-Request-ID"];
7200
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
7201
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
7202
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
7203
+ "X-Error-Code": components["headers"]["X-Error-Code"];
7204
+ "Idempotency-Replayed": components["headers"]["Idempotency-Replayed"];
7205
+ [name: string]: unknown;
7206
+ };
7207
+ content: {
7208
+ "application/json": components["schemas"]["IdempotencyKeyReusedOrIdempotencyResultNotRetainedRefusal"];
7209
+ };
7210
+ };
6960
7211
  /** @description `rate_limited`: you sent too many requests. Wait for the number of seconds in `Retry-After`, then try again. */
6961
7212
  429: {
6962
7213
  headers: {
@@ -6967,6 +7218,7 @@ interface operations {
6967
7218
  "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
6968
7219
  "X-Error-Code": components["headers"]["X-Error-Code"];
6969
7220
  "Retry-After": components["headers"]["Retry-After"];
7221
+ "Idempotency-Replayed": components["headers"]["Idempotency-Replayed"];
6970
7222
  [name: string]: unknown;
6971
7223
  };
6972
7224
  content: {
@@ -6982,6 +7234,7 @@ interface operations {
6982
7234
  "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
6983
7235
  "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
6984
7236
  "X-Error-Code": components["headers"]["X-Error-Code"];
7237
+ "Idempotency-Replayed": components["headers"]["Idempotency-Replayed"];
6985
7238
  [name: string]: unknown;
6986
7239
  };
6987
7240
  content: {
@@ -6997,6 +7250,7 @@ interface operations {
6997
7250
  "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
6998
7251
  "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
6999
7252
  "X-Error-Code": components["headers"]["X-Error-Code"];
7253
+ "Idempotency-Replayed": components["headers"]["Idempotency-Replayed"];
7000
7254
  [name: string]: unknown;
7001
7255
  };
7002
7256
  content: {
@@ -7012,6 +7266,7 @@ interface operations {
7012
7266
  "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
7013
7267
  "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
7014
7268
  "X-Error-Code": components["headers"]["X-Error-Code"];
7269
+ "Idempotency-Replayed": components["headers"]["Idempotency-Replayed"];
7015
7270
  [name: string]: unknown;
7016
7271
  };
7017
7272
  content: {
@@ -7023,7 +7278,12 @@ interface operations {
7023
7278
  addItemTags: {
7024
7279
  parameters: {
7025
7280
  query?: never;
7026
- header?: never;
7281
+ header?: {
7282
+ /** @description A unique key that makes the request safe to retry. If you send the same request with the same key again, Marfa returns the first response and doesn't write again. A key belongs to the credential that sends it. */
7283
+ "Idempotency-Key"?: string;
7284
+ /** @description The ID of the instance you expect, as `GET /` returns it. If another instance answers at this address, Marfa returns `409 instance_changed` and doesn't write. Leave it out to send the request to whichever instance answers. */
7285
+ "X-Marfa-Instance-Id"?: string;
7286
+ };
7027
7287
  path: {
7028
7288
  /** @description The ID of the item. */
7029
7289
  id: string;
@@ -7047,6 +7307,7 @@ interface operations {
7047
7307
  "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
7048
7308
  "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
7049
7309
  "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
7310
+ "Idempotency-Replayed": components["headers"]["Idempotency-Replayed"];
7050
7311
  [name: string]: unknown;
7051
7312
  };
7052
7313
  content: {
@@ -7054,7 +7315,7 @@ interface operations {
7054
7315
  };
7055
7316
  };
7056
7317
  /**
7057
- * @description - `validation_error`: `tags` is empty or not a list of valid tags, or the item would hold more than 100.
7318
+ * @description - `validation_error`: `tags` is empty or not a list of valid tags or the item would hold more than 100, or the body has a field this endpoint doesn't take.
7058
7319
  * - `missing_required_field`: `tags` is missing.
7059
7320
  * - `invalid_id`: the ID is not a valid item ID.
7060
7321
  */
@@ -7066,6 +7327,7 @@ interface operations {
7066
7327
  "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
7067
7328
  "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
7068
7329
  "X-Error-Code": components["headers"]["X-Error-Code"];
7330
+ "Idempotency-Replayed": components["headers"]["Idempotency-Replayed"];
7069
7331
  [name: string]: unknown;
7070
7332
  };
7071
7333
  content: {
@@ -7111,42 +7373,46 @@ interface operations {
7111
7373
  "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
7112
7374
  "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
7113
7375
  "X-Error-Code": components["headers"]["X-Error-Code"];
7376
+ "Idempotency-Replayed": components["headers"]["Idempotency-Replayed"];
7114
7377
  [name: string]: unknown;
7115
7378
  };
7116
7379
  content: {
7117
7380
  "application/json": components["schemas"]["ItemNotFoundRefusal"];
7118
7381
  };
7119
7382
  };
7120
- /** @description `request_too_large`: the request body is larger than this instance accepts. */
7121
- 413: {
7383
+ /** @description `instance_changed`: `X-Marfa-Instance-Id` names another instance. Nothing is written. Rebuild the working copy from the instance at this address. */
7384
+ 409: {
7122
7385
  headers: {
7123
7386
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
7124
7387
  "X-Request-ID": components["headers"]["X-Request-ID"];
7388
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
7389
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
7390
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
7125
7391
  "X-Error-Code": components["headers"]["X-Error-Code"];
7392
+ "Idempotency-Replayed": components["headers"]["Idempotency-Replayed"];
7126
7393
  [name: string]: unknown;
7127
7394
  };
7128
7395
  content: {
7129
- "application/json": components["schemas"]["RequestTooLargeRefusal"];
7396
+ "application/json": components["schemas"]["InstanceChangedRefusal"] | components["schemas"]["IdempotencyKeyInFlightRefusal"];
7130
7397
  };
7131
7398
  };
7132
- /** @description `rate_limited`: you sent too many requests. Wait for the number of seconds in `Retry-After`, then try again. */
7133
- 429: {
7399
+ /** @description `request_too_large`: the request body is larger than this instance accepts. */
7400
+ 413: {
7134
7401
  headers: {
7135
7402
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
7136
7403
  "X-Request-ID": components["headers"]["X-Request-ID"];
7137
- "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
7138
- "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
7139
- "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
7140
7404
  "X-Error-Code": components["headers"]["X-Error-Code"];
7141
- "Retry-After": components["headers"]["Retry-After"];
7142
7405
  [name: string]: unknown;
7143
7406
  };
7144
7407
  content: {
7145
- "application/json": components["schemas"]["RateLimitedRefusal"];
7408
+ "application/json": components["schemas"]["RequestTooLargeRefusal"];
7146
7409
  };
7147
7410
  };
7148
- /** @description `internal_error`: Marfa failed in a way it didn't expect, and the request may not have completed. Read what you changed before you repeat a write. */
7149
- 500: {
7411
+ /**
7412
+ * @description - `idempotency_key_reused`: the key was first used for a different request. Nothing is written.
7413
+ * - `idempotency_result_not_retained`: the first response was too large to keep, so Marfa can't replay it. The write isn't repeated.
7414
+ */
7415
+ 422: {
7150
7416
  headers: {
7151
7417
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
7152
7418
  "X-Request-ID": components["headers"]["X-Request-ID"];
@@ -7154,10 +7420,44 @@ interface operations {
7154
7420
  "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
7155
7421
  "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
7156
7422
  "X-Error-Code": components["headers"]["X-Error-Code"];
7423
+ "Idempotency-Replayed": components["headers"]["Idempotency-Replayed"];
7157
7424
  [name: string]: unknown;
7158
7425
  };
7159
7426
  content: {
7160
- "application/json": components["schemas"]["InternalErrorRefusal"];
7427
+ "application/json": components["schemas"]["IdempotencyKeyReusedOrIdempotencyResultNotRetainedRefusal"];
7428
+ };
7429
+ };
7430
+ /** @description `rate_limited`: you sent too many requests. Wait for the number of seconds in `Retry-After`, then try again. */
7431
+ 429: {
7432
+ headers: {
7433
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
7434
+ "X-Request-ID": components["headers"]["X-Request-ID"];
7435
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
7436
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
7437
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
7438
+ "X-Error-Code": components["headers"]["X-Error-Code"];
7439
+ "Retry-After": components["headers"]["Retry-After"];
7440
+ "Idempotency-Replayed": components["headers"]["Idempotency-Replayed"];
7441
+ [name: string]: unknown;
7442
+ };
7443
+ content: {
7444
+ "application/json": components["schemas"]["RateLimitedRefusal"];
7445
+ };
7446
+ };
7447
+ /** @description `internal_error`: Marfa failed in a way it didn't expect, and the request may not have completed. Read what you changed before you repeat a write. */
7448
+ 500: {
7449
+ headers: {
7450
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
7451
+ "X-Request-ID": components["headers"]["X-Request-ID"];
7452
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
7453
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
7454
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
7455
+ "X-Error-Code": components["headers"]["X-Error-Code"];
7456
+ "Idempotency-Replayed": components["headers"]["Idempotency-Replayed"];
7457
+ [name: string]: unknown;
7458
+ };
7459
+ content: {
7460
+ "application/json": components["schemas"]["InternalErrorRefusal"];
7161
7461
  };
7162
7462
  };
7163
7463
  /** @description `write_contention`: the database was busy, and Marfa couldn't complete the request in time. Nothing changed. Try the request again. */
@@ -7169,6 +7469,7 @@ interface operations {
7169
7469
  "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
7170
7470
  "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
7171
7471
  "X-Error-Code": components["headers"]["X-Error-Code"];
7472
+ "Idempotency-Replayed": components["headers"]["Idempotency-Replayed"];
7172
7473
  [name: string]: unknown;
7173
7474
  };
7174
7475
  content: {
@@ -7184,6 +7485,7 @@ interface operations {
7184
7485
  "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
7185
7486
  "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
7186
7487
  "X-Error-Code": components["headers"]["X-Error-Code"];
7488
+ "Idempotency-Replayed": components["headers"]["Idempotency-Replayed"];
7187
7489
  [name: string]: unknown;
7188
7490
  };
7189
7491
  content: {
@@ -7201,6 +7503,8 @@ interface operations {
7201
7503
  header?: {
7202
7504
  /** @description A unique key that makes the request safe to retry. If you send the same request with the same key again, Marfa returns the first response and doesn't write again. A key belongs to the credential that sends it. */
7203
7505
  "Idempotency-Key"?: string;
7506
+ /** @description The ID of the instance you expect, as `GET /` returns it. If another instance answers at this address, Marfa returns `409 instance_changed` and doesn't write. Leave it out to send the request to whichever instance answers. */
7507
+ "X-Marfa-Instance-Id"?: string;
7204
7508
  };
7205
7509
  path: {
7206
7510
  /** @description The ID of the item. */
@@ -7310,7 +7614,7 @@ interface operations {
7310
7614
  [name: string]: unknown;
7311
7615
  };
7312
7616
  content: {
7313
- "application/json": components["schemas"]["ItemStaleVersion"] | components["schemas"]["IdempotencyKeyInFlightRefusal"];
7617
+ "application/json": components["schemas"]["ItemStaleVersion"] | components["schemas"]["InstanceChangedRefusal"] | components["schemas"]["IdempotencyKeyInFlightRefusal"];
7314
7618
  };
7315
7619
  };
7316
7620
  /** @description `request_too_large`: the request body is larger than this instance accepts. */
@@ -7414,7 +7718,12 @@ interface operations {
7414
7718
  removeItemTag: {
7415
7719
  parameters: {
7416
7720
  query?: never;
7417
- header?: never;
7721
+ header?: {
7722
+ /** @description A unique key that makes the request safe to retry. If you send the same request with the same key again, Marfa returns the first response and doesn't write again. A key belongs to the credential that sends it. */
7723
+ "Idempotency-Key"?: string;
7724
+ /** @description The ID of the instance you expect, as `GET /` returns it. If another instance answers at this address, Marfa returns `409 instance_changed` and doesn't write. Leave it out to send the request to whichever instance answers. */
7725
+ "X-Marfa-Instance-Id"?: string;
7726
+ };
7418
7727
  path: {
7419
7728
  /** @description The ID of the item. */
7420
7729
  id: string;
@@ -7433,6 +7742,7 @@ interface operations {
7433
7742
  "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
7434
7743
  "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
7435
7744
  "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
7745
+ "Idempotency-Replayed": components["headers"]["Idempotency-Replayed"];
7436
7746
  [name: string]: unknown;
7437
7747
  };
7438
7748
  content: {
@@ -7451,6 +7761,7 @@ interface operations {
7451
7761
  "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
7452
7762
  "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
7453
7763
  "X-Error-Code": components["headers"]["X-Error-Code"];
7764
+ "Idempotency-Replayed": components["headers"]["Idempotency-Replayed"];
7454
7765
  [name: string]: unknown;
7455
7766
  };
7456
7767
  content: {
@@ -7496,12 +7807,29 @@ interface operations {
7496
7807
  "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
7497
7808
  "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
7498
7809
  "X-Error-Code": components["headers"]["X-Error-Code"];
7810
+ "Idempotency-Replayed": components["headers"]["Idempotency-Replayed"];
7499
7811
  [name: string]: unknown;
7500
7812
  };
7501
7813
  content: {
7502
7814
  "application/json": components["schemas"]["ItemNotFoundRefusal"];
7503
7815
  };
7504
7816
  };
7817
+ /** @description `instance_changed`: `X-Marfa-Instance-Id` names another instance. Nothing is written. Rebuild the working copy from the instance at this address. */
7818
+ 409: {
7819
+ headers: {
7820
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
7821
+ "X-Request-ID": components["headers"]["X-Request-ID"];
7822
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
7823
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
7824
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
7825
+ "X-Error-Code": components["headers"]["X-Error-Code"];
7826
+ "Idempotency-Replayed": components["headers"]["Idempotency-Replayed"];
7827
+ [name: string]: unknown;
7828
+ };
7829
+ content: {
7830
+ "application/json": components["schemas"]["InstanceChangedRefusal"] | components["schemas"]["IdempotencyKeyInFlightRefusal"];
7831
+ };
7832
+ };
7505
7833
  /** @description `request_too_large`: the request body is larger than this instance accepts. */
7506
7834
  413: {
7507
7835
  headers: {
@@ -7514,6 +7842,25 @@ interface operations {
7514
7842
  "application/json": components["schemas"]["RequestTooLargeRefusal"];
7515
7843
  };
7516
7844
  };
7845
+ /**
7846
+ * @description - `idempotency_key_reused`: the key was first used for a different request. Nothing is written.
7847
+ * - `idempotency_result_not_retained`: the first response was too large to keep, so Marfa can't replay it. The write isn't repeated.
7848
+ */
7849
+ 422: {
7850
+ headers: {
7851
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
7852
+ "X-Request-ID": components["headers"]["X-Request-ID"];
7853
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
7854
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
7855
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
7856
+ "X-Error-Code": components["headers"]["X-Error-Code"];
7857
+ "Idempotency-Replayed": components["headers"]["Idempotency-Replayed"];
7858
+ [name: string]: unknown;
7859
+ };
7860
+ content: {
7861
+ "application/json": components["schemas"]["IdempotencyKeyReusedOrIdempotencyResultNotRetainedRefusal"];
7862
+ };
7863
+ };
7517
7864
  /** @description `rate_limited`: you sent too many requests. Wait for the number of seconds in `Retry-After`, then try again. */
7518
7865
  429: {
7519
7866
  headers: {
@@ -7524,6 +7871,7 @@ interface operations {
7524
7871
  "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
7525
7872
  "X-Error-Code": components["headers"]["X-Error-Code"];
7526
7873
  "Retry-After": components["headers"]["Retry-After"];
7874
+ "Idempotency-Replayed": components["headers"]["Idempotency-Replayed"];
7527
7875
  [name: string]: unknown;
7528
7876
  };
7529
7877
  content: {
@@ -7539,6 +7887,7 @@ interface operations {
7539
7887
  "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
7540
7888
  "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
7541
7889
  "X-Error-Code": components["headers"]["X-Error-Code"];
7890
+ "Idempotency-Replayed": components["headers"]["Idempotency-Replayed"];
7542
7891
  [name: string]: unknown;
7543
7892
  };
7544
7893
  content: {
@@ -7554,6 +7903,7 @@ interface operations {
7554
7903
  "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
7555
7904
  "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
7556
7905
  "X-Error-Code": components["headers"]["X-Error-Code"];
7906
+ "Idempotency-Replayed": components["headers"]["Idempotency-Replayed"];
7557
7907
  [name: string]: unknown;
7558
7908
  };
7559
7909
  content: {
@@ -7569,6 +7919,7 @@ interface operations {
7569
7919
  "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
7570
7920
  "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
7571
7921
  "X-Error-Code": components["headers"]["X-Error-Code"];
7922
+ "Idempotency-Replayed": components["headers"]["Idempotency-Replayed"];
7572
7923
  [name: string]: unknown;
7573
7924
  };
7574
7925
  content: {
@@ -7580,14 +7931,17 @@ interface operations {
7580
7931
  bulkUpsertItems: {
7581
7932
  parameters: {
7582
7933
  query?: never;
7583
- header?: never;
7934
+ header?: {
7935
+ /** @description The ID of the instance you expect, as `GET /` returns it. If another instance answers at this address, Marfa returns `409 instance_changed` and doesn't write. Leave it out to send the request to whichever instance answers. */
7936
+ "X-Marfa-Instance-Id"?: string;
7937
+ };
7584
7938
  path?: never;
7585
7939
  cookie?: never;
7586
7940
  };
7587
7941
  requestBody: {
7588
7942
  content: {
7589
7943
  "application/json": {
7590
- /** @description The entries to write, at most 5,000. */
7944
+ /** @description The entries to write, at most 5,000. An entry with a key this operation doesn't declare is refused as `validation_error`, and `details.unknown_body_fields` names each key. */
7591
7945
  items: {
7592
7946
  /** @description A UUIDv7 for the item. Leave it out and Marfa creates one. If no item matches the natural key, an `id` naming an existing item matches that item: under `upsert` only a live item you can read. */
7593
7947
  id?: string;
@@ -7648,7 +8002,7 @@ interface operations {
7648
8002
  };
7649
8003
  };
7650
8004
  /**
7651
- * @description - `validation_error`: the body is malformed, or has more than 5,000 entries.
8005
+ * @description - `validation_error`: the body is malformed, has a key this operation doesn't declare, or has more than 5,000 entries.
7652
8006
  * - `missing_required_field`: a required field is missing.
7653
8007
  * - `bulk_atomic_rollback`: with `atomic` true, an entry was refused and nothing was written. `details.code` and `details.index` give its code and position. The status is the one that refusal carries alone.
7654
8008
  */
@@ -7727,7 +8081,7 @@ interface operations {
7727
8081
  [name: string]: unknown;
7728
8082
  };
7729
8083
  content: {
7730
- "application/json": components["schemas"]["BulkAtomicRollbackRefusal"];
8084
+ "application/json": components["schemas"]["BulkAtomicRollbackRefusal"] | components["schemas"]["InstanceChangedRefusal"];
7731
8085
  };
7732
8086
  };
7733
8087
  /** @description `request_too_large`: the request body is larger than this instance accepts. */
@@ -7811,6 +8165,8 @@ interface operations {
7811
8165
  header?: {
7812
8166
  /** @description A unique key that makes the request safe to retry. If you send the same request with the same key again, Marfa returns the first response and doesn't write again. A key belongs to the credential that sends it. */
7813
8167
  "Idempotency-Key"?: string;
8168
+ /** @description The ID of the instance you expect, as `GET /` returns it. If another instance answers at this address, Marfa returns `409 instance_changed` and doesn't write. Leave it out to send the request to whichever instance answers. */
8169
+ "X-Marfa-Instance-Id"?: string;
7814
8170
  };
7815
8171
  path?: never;
7816
8172
  cookie?: never;
@@ -7967,7 +8323,7 @@ interface operations {
7967
8323
  "application/json": components["schemas"]["EdgePermissionDeniedOrForbiddenOrTypeNotPermittedRefusal"];
7968
8324
  };
7969
8325
  };
7970
- /** @description - `idempotency_key_in_flight`: a request with this `Idempotency-Key` is still running, and this one wrote nothing. Retry. */
8326
+ /** @description `instance_changed`: `X-Marfa-Instance-Id` names another instance. Nothing is written. Rebuild the working copy from the instance at this address. */
7971
8327
  409: {
7972
8328
  headers: {
7973
8329
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
@@ -7980,7 +8336,7 @@ interface operations {
7980
8336
  [name: string]: unknown;
7981
8337
  };
7982
8338
  content: {
7983
- "application/json": components["schemas"]["IdempotencyKeyInFlightRefusal"];
8339
+ "application/json": components["schemas"]["InstanceChangedRefusal"] | components["schemas"]["IdempotencyKeyInFlightRefusal"];
7984
8340
  };
7985
8341
  };
7986
8342
  /** @description `request_too_large`: the request body is larger than this instance accepts. */
@@ -8233,7 +8589,10 @@ interface operations {
8233
8589
  cancelBulkActionJob: {
8234
8590
  parameters: {
8235
8591
  query?: never;
8236
- header?: never;
8592
+ header?: {
8593
+ /** @description The ID of the instance you expect, as `GET /` returns it. If another instance answers at this address, Marfa returns `409 instance_changed` and doesn't write. Leave it out to send the request to whichever instance answers. */
8594
+ "X-Marfa-Instance-Id"?: string;
8595
+ };
8237
8596
  path: {
8238
8597
  /** @description The ID of the bulk-action job. */
8239
8598
  id: string;
@@ -8316,6 +8675,21 @@ interface operations {
8316
8675
  "application/json": components["schemas"]["BulkJobNotFoundRefusal"];
8317
8676
  };
8318
8677
  };
8678
+ /** @description `instance_changed`: `X-Marfa-Instance-Id` names another instance. Nothing is written. Rebuild the working copy from the instance at this address. */
8679
+ 409: {
8680
+ headers: {
8681
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
8682
+ "X-Request-ID": components["headers"]["X-Request-ID"];
8683
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
8684
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
8685
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
8686
+ "X-Error-Code": components["headers"]["X-Error-Code"];
8687
+ [name: string]: unknown;
8688
+ };
8689
+ content: {
8690
+ "application/json": components["schemas"]["InstanceChangedRefusal"];
8691
+ };
8692
+ };
8319
8693
  /** @description `request_too_large`: the request body is larger than this instance accepts. */
8320
8694
  413: {
8321
8695
  headers: {
@@ -8397,6 +8771,8 @@ interface operations {
8397
8771
  header?: {
8398
8772
  /** @description A read-view certificate from a copy stream, for a working copy. Marfa reads the current data and checks the view in one snapshot, and returns `409 read_view_changed` if the view has changed. Leave it out for an ordinary read. */
8399
8773
  "X-Marfa-Read-View"?: string;
8774
+ /** @description The ID of the instance you expect, as `GET /` returns it. If another instance answers at this address, Marfa returns `409 instance_changed` and doesn't write. Leave it out to send the request to whichever instance answers. */
8775
+ "X-Marfa-Instance-Id"?: string;
8400
8776
  };
8401
8777
  path?: never;
8402
8778
  cookie?: never;
@@ -8436,7 +8812,7 @@ interface operations {
8436
8812
  };
8437
8813
  /**
8438
8814
  * @description - `missing_required_field`: `ids` is missing.
8439
- * - `validation_error`: `ids` is not a list, or has more than 100 IDs.
8815
+ * - `validation_error`: `ids` is not a list or has more than 100 IDs, or the body has a field this endpoint doesn't take.
8440
8816
  * - `invalid_id`: an ID in `ids` is not a valid item ID.
8441
8817
  */
8442
8818
  400: {
@@ -8496,7 +8872,7 @@ interface operations {
8496
8872
  [name: string]: unknown;
8497
8873
  };
8498
8874
  content: {
8499
- "application/json": components["schemas"]["ReadViewChangedRefusal"];
8875
+ "application/json": components["schemas"]["ReadViewChangedRefusal"] | components["schemas"]["InstanceChangedRefusal"];
8500
8876
  };
8501
8877
  };
8502
8878
  /** @description `request_too_large`: the request body is larger than this instance accepts. */
@@ -8577,7 +8953,10 @@ interface operations {
8577
8953
  lookupItems: {
8578
8954
  parameters: {
8579
8955
  query?: never;
8580
- header?: never;
8956
+ header?: {
8957
+ /** @description The ID of the instance you expect, as `GET /` returns it. If another instance answers at this address, Marfa returns `409 instance_changed` and doesn't write. Leave it out to send the request to whichever instance answers. */
8958
+ "X-Marfa-Instance-Id"?: string;
8959
+ };
8581
8960
  path?: never;
8582
8961
  cookie?: never;
8583
8962
  };
@@ -8669,6 +9048,21 @@ interface operations {
8669
9048
  "application/json": components["schemas"]["TypeNotPermittedRefusal"];
8670
9049
  };
8671
9050
  };
9051
+ /** @description `instance_changed`: `X-Marfa-Instance-Id` names another instance. Nothing is written. Rebuild the working copy from the instance at this address. */
9052
+ 409: {
9053
+ headers: {
9054
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
9055
+ "X-Request-ID": components["headers"]["X-Request-ID"];
9056
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
9057
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
9058
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
9059
+ "X-Error-Code": components["headers"]["X-Error-Code"];
9060
+ [name: string]: unknown;
9061
+ };
9062
+ content: {
9063
+ "application/json": components["schemas"]["InstanceChangedRefusal"];
9064
+ };
9065
+ };
8672
9066
  /** @description `request_too_large`: the request body is larger than this instance accepts. */
8673
9067
  413: {
8674
9068
  headers: {
@@ -8747,7 +9141,10 @@ interface operations {
8747
9141
  settleTombstones: {
8748
9142
  parameters: {
8749
9143
  query?: never;
8750
- header?: never;
9144
+ header?: {
9145
+ /** @description The ID of the instance you expect, as `GET /` returns it. If another instance answers at this address, Marfa returns `409 instance_changed` and doesn't write. Leave it out to send the request to whichever instance answers. */
9146
+ "X-Marfa-Instance-Id"?: string;
9147
+ };
8751
9148
  path?: never;
8752
9149
  cookie?: never;
8753
9150
  };
@@ -8837,6 +9234,21 @@ interface operations {
8837
9234
  "application/json": components["schemas"]["ForbiddenOrTypeNotPermittedRefusal"];
8838
9235
  };
8839
9236
  };
9237
+ /** @description `instance_changed`: `X-Marfa-Instance-Id` names another instance. Nothing is written. Rebuild the working copy from the instance at this address. */
9238
+ 409: {
9239
+ headers: {
9240
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
9241
+ "X-Request-ID": components["headers"]["X-Request-ID"];
9242
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
9243
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
9244
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
9245
+ "X-Error-Code": components["headers"]["X-Error-Code"];
9246
+ [name: string]: unknown;
9247
+ };
9248
+ content: {
9249
+ "application/json": components["schemas"]["InstanceChangedRefusal"];
9250
+ };
9251
+ };
8840
9252
  /** @description `request_too_large`: the request body is larger than this instance accepts. */
8841
9253
  413: {
8842
9254
  headers: {
@@ -9229,7 +9641,12 @@ interface operations {
9229
9641
  replaceItemExtension: {
9230
9642
  parameters: {
9231
9643
  query?: never;
9232
- header?: never;
9644
+ header?: {
9645
+ /** @description A unique key that makes the request safe to retry. If you send the same request with the same key again, Marfa returns the first response and doesn't write again. A key belongs to the credential that sends it. */
9646
+ "Idempotency-Key"?: string;
9647
+ /** @description The ID of the instance you expect, as `GET /` returns it. If another instance answers at this address, Marfa returns `409 instance_changed` and doesn't write. Leave it out to send the request to whichever instance answers. */
9648
+ "X-Marfa-Instance-Id"?: string;
9649
+ };
9233
9650
  path: {
9234
9651
  /** @description The ID of the item. */
9235
9652
  id: string;
@@ -9254,6 +9671,7 @@ interface operations {
9254
9671
  "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
9255
9672
  "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
9256
9673
  "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
9674
+ "Idempotency-Replayed": components["headers"]["Idempotency-Replayed"];
9257
9675
  [name: string]: unknown;
9258
9676
  };
9259
9677
  content: {
@@ -9272,6 +9690,7 @@ interface operations {
9272
9690
  "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
9273
9691
  "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
9274
9692
  "X-Error-Code": components["headers"]["X-Error-Code"];
9693
+ "Idempotency-Replayed": components["headers"]["Idempotency-Replayed"];
9275
9694
  [name: string]: unknown;
9276
9695
  };
9277
9696
  content: {
@@ -9320,12 +9739,29 @@ interface operations {
9320
9739
  "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
9321
9740
  "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
9322
9741
  "X-Error-Code": components["headers"]["X-Error-Code"];
9742
+ "Idempotency-Replayed": components["headers"]["Idempotency-Replayed"];
9323
9743
  [name: string]: unknown;
9324
9744
  };
9325
9745
  content: {
9326
9746
  "application/json": components["schemas"]["ItemNotFoundRefusal"];
9327
9747
  };
9328
9748
  };
9749
+ /** @description `instance_changed`: `X-Marfa-Instance-Id` names another instance. Nothing is written. Rebuild the working copy from the instance at this address. */
9750
+ 409: {
9751
+ headers: {
9752
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
9753
+ "X-Request-ID": components["headers"]["X-Request-ID"];
9754
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
9755
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
9756
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
9757
+ "X-Error-Code": components["headers"]["X-Error-Code"];
9758
+ "Idempotency-Replayed": components["headers"]["Idempotency-Replayed"];
9759
+ [name: string]: unknown;
9760
+ };
9761
+ content: {
9762
+ "application/json": components["schemas"]["InstanceChangedRefusal"] | components["schemas"]["IdempotencyKeyInFlightRefusal"];
9763
+ };
9764
+ };
9329
9765
  /** @description `request_too_large`: the request body is larger than this instance accepts. */
9330
9766
  413: {
9331
9767
  headers: {
@@ -9338,6 +9774,25 @@ interface operations {
9338
9774
  "application/json": components["schemas"]["RequestTooLargeRefusal"];
9339
9775
  };
9340
9776
  };
9777
+ /**
9778
+ * @description - `idempotency_key_reused`: the key was first used for a different request. Nothing is written.
9779
+ * - `idempotency_result_not_retained`: the first response was too large to keep, so Marfa can't replay it. The write isn't repeated.
9780
+ */
9781
+ 422: {
9782
+ headers: {
9783
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
9784
+ "X-Request-ID": components["headers"]["X-Request-ID"];
9785
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
9786
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
9787
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
9788
+ "X-Error-Code": components["headers"]["X-Error-Code"];
9789
+ "Idempotency-Replayed": components["headers"]["Idempotency-Replayed"];
9790
+ [name: string]: unknown;
9791
+ };
9792
+ content: {
9793
+ "application/json": components["schemas"]["IdempotencyKeyReusedOrIdempotencyResultNotRetainedRefusal"];
9794
+ };
9795
+ };
9341
9796
  /** @description `rate_limited`: you sent too many requests. Wait for the number of seconds in `Retry-After`, then try again. */
9342
9797
  429: {
9343
9798
  headers: {
@@ -9348,6 +9803,7 @@ interface operations {
9348
9803
  "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
9349
9804
  "X-Error-Code": components["headers"]["X-Error-Code"];
9350
9805
  "Retry-After": components["headers"]["Retry-After"];
9806
+ "Idempotency-Replayed": components["headers"]["Idempotency-Replayed"];
9351
9807
  [name: string]: unknown;
9352
9808
  };
9353
9809
  content: {
@@ -9363,6 +9819,7 @@ interface operations {
9363
9819
  "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
9364
9820
  "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
9365
9821
  "X-Error-Code": components["headers"]["X-Error-Code"];
9822
+ "Idempotency-Replayed": components["headers"]["Idempotency-Replayed"];
9366
9823
  [name: string]: unknown;
9367
9824
  };
9368
9825
  content: {
@@ -9378,6 +9835,7 @@ interface operations {
9378
9835
  "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
9379
9836
  "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
9380
9837
  "X-Error-Code": components["headers"]["X-Error-Code"];
9838
+ "Idempotency-Replayed": components["headers"]["Idempotency-Replayed"];
9381
9839
  [name: string]: unknown;
9382
9840
  };
9383
9841
  content: {
@@ -9393,6 +9851,7 @@ interface operations {
9393
9851
  "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
9394
9852
  "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
9395
9853
  "X-Error-Code": components["headers"]["X-Error-Code"];
9854
+ "Idempotency-Replayed": components["headers"]["Idempotency-Replayed"];
9396
9855
  [name: string]: unknown;
9397
9856
  };
9398
9857
  content: {
@@ -9404,7 +9863,12 @@ interface operations {
9404
9863
  deleteItemExtension: {
9405
9864
  parameters: {
9406
9865
  query?: never;
9407
- header?: never;
9866
+ header?: {
9867
+ /** @description A unique key that makes the request safe to retry. If you send the same request with the same key again, Marfa returns the first response and doesn't write again. A key belongs to the credential that sends it. */
9868
+ "Idempotency-Key"?: string;
9869
+ /** @description The ID of the instance you expect, as `GET /` returns it. If another instance answers at this address, Marfa returns `409 instance_changed` and doesn't write. Leave it out to send the request to whichever instance answers. */
9870
+ "X-Marfa-Instance-Id"?: string;
9871
+ };
9408
9872
  path: {
9409
9873
  /** @description The ID of the item. */
9410
9874
  id: string;
@@ -9423,6 +9887,7 @@ interface operations {
9423
9887
  "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
9424
9888
  "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
9425
9889
  "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
9890
+ "Idempotency-Replayed": components["headers"]["Idempotency-Replayed"];
9426
9891
  [name: string]: unknown;
9427
9892
  };
9428
9893
  content: {
@@ -9441,6 +9906,7 @@ interface operations {
9441
9906
  "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
9442
9907
  "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
9443
9908
  "X-Error-Code": components["headers"]["X-Error-Code"];
9909
+ "Idempotency-Replayed": components["headers"]["Idempotency-Replayed"];
9444
9910
  [name: string]: unknown;
9445
9911
  };
9446
9912
  content: {
@@ -9489,12 +9955,29 @@ interface operations {
9489
9955
  "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
9490
9956
  "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
9491
9957
  "X-Error-Code": components["headers"]["X-Error-Code"];
9958
+ "Idempotency-Replayed": components["headers"]["Idempotency-Replayed"];
9492
9959
  [name: string]: unknown;
9493
9960
  };
9494
9961
  content: {
9495
9962
  "application/json": components["schemas"]["ItemNotFoundRefusal"];
9496
9963
  };
9497
9964
  };
9965
+ /** @description `instance_changed`: `X-Marfa-Instance-Id` names another instance. Nothing is written. Rebuild the working copy from the instance at this address. */
9966
+ 409: {
9967
+ headers: {
9968
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
9969
+ "X-Request-ID": components["headers"]["X-Request-ID"];
9970
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
9971
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
9972
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
9973
+ "X-Error-Code": components["headers"]["X-Error-Code"];
9974
+ "Idempotency-Replayed": components["headers"]["Idempotency-Replayed"];
9975
+ [name: string]: unknown;
9976
+ };
9977
+ content: {
9978
+ "application/json": components["schemas"]["InstanceChangedRefusal"] | components["schemas"]["IdempotencyKeyInFlightRefusal"];
9979
+ };
9980
+ };
9498
9981
  /** @description `request_too_large`: the request body is larger than this instance accepts. */
9499
9982
  413: {
9500
9983
  headers: {
@@ -9507,6 +9990,25 @@ interface operations {
9507
9990
  "application/json": components["schemas"]["RequestTooLargeRefusal"];
9508
9991
  };
9509
9992
  };
9993
+ /**
9994
+ * @description - `idempotency_key_reused`: the key was first used for a different request. Nothing is written.
9995
+ * - `idempotency_result_not_retained`: the first response was too large to keep, so Marfa can't replay it. The write isn't repeated.
9996
+ */
9997
+ 422: {
9998
+ headers: {
9999
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
10000
+ "X-Request-ID": components["headers"]["X-Request-ID"];
10001
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
10002
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
10003
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
10004
+ "X-Error-Code": components["headers"]["X-Error-Code"];
10005
+ "Idempotency-Replayed": components["headers"]["Idempotency-Replayed"];
10006
+ [name: string]: unknown;
10007
+ };
10008
+ content: {
10009
+ "application/json": components["schemas"]["IdempotencyKeyReusedOrIdempotencyResultNotRetainedRefusal"];
10010
+ };
10011
+ };
9510
10012
  /** @description `rate_limited`: you sent too many requests. Wait for the number of seconds in `Retry-After`, then try again. */
9511
10013
  429: {
9512
10014
  headers: {
@@ -9517,6 +10019,7 @@ interface operations {
9517
10019
  "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
9518
10020
  "X-Error-Code": components["headers"]["X-Error-Code"];
9519
10021
  "Retry-After": components["headers"]["Retry-After"];
10022
+ "Idempotency-Replayed": components["headers"]["Idempotency-Replayed"];
9520
10023
  [name: string]: unknown;
9521
10024
  };
9522
10025
  content: {
@@ -9532,6 +10035,7 @@ interface operations {
9532
10035
  "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
9533
10036
  "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
9534
10037
  "X-Error-Code": components["headers"]["X-Error-Code"];
10038
+ "Idempotency-Replayed": components["headers"]["Idempotency-Replayed"];
9535
10039
  [name: string]: unknown;
9536
10040
  };
9537
10041
  content: {
@@ -9547,6 +10051,7 @@ interface operations {
9547
10051
  "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
9548
10052
  "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
9549
10053
  "X-Error-Code": components["headers"]["X-Error-Code"];
10054
+ "Idempotency-Replayed": components["headers"]["Idempotency-Replayed"];
9550
10055
  [name: string]: unknown;
9551
10056
  };
9552
10057
  content: {
@@ -9562,6 +10067,7 @@ interface operations {
9562
10067
  "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
9563
10068
  "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
9564
10069
  "X-Error-Code": components["headers"]["X-Error-Code"];
10070
+ "Idempotency-Replayed": components["headers"]["Idempotency-Replayed"];
9565
10071
  [name: string]: unknown;
9566
10072
  };
9567
10073
  content: {
@@ -10073,10 +10579,15 @@ interface operations {
10073
10579
  };
10074
10580
  createEdge: {
10075
10581
  parameters: {
10076
- query?: never;
10582
+ query?: {
10583
+ /** @description The source item version you read. If it differs, the edge is not changed. Leave it out to use the source as it is. */
10584
+ source_version?: number;
10585
+ };
10077
10586
  header?: {
10078
10587
  /** @description A unique key that makes the request safe to retry. If you send the same request with the same key again, Marfa returns the first response and doesn't write again. A key belongs to the credential that sends it. */
10079
10588
  "Idempotency-Key"?: string;
10589
+ /** @description The ID of the instance you expect, as `GET /` returns it. If another instance answers at this address, Marfa returns `409 instance_changed` and doesn't write. Leave it out to send the request to whichever instance answers. */
10590
+ "X-Marfa-Instance-Id"?: string;
10080
10591
  };
10081
10592
  path?: never;
10082
10593
  cookie?: never;
@@ -10100,7 +10611,7 @@ interface operations {
10100
10611
  };
10101
10612
  };
10102
10613
  responses: {
10103
- /** @description Returns the stored edge with `acknowledged: true`. `id` repeats a create you made with the same source, target and edge type, so Marfa wrote nothing and sent no event. */
10614
+ /** @description Returns the stored edge with `acknowledged: true` after any `source_version` precondition passes. `id` repeats a create you made with the same source, target and edge type, so Marfa wrote nothing and sent no event. */
10104
10615
  200: {
10105
10616
  headers: {
10106
10617
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
@@ -10137,7 +10648,7 @@ interface operations {
10137
10648
  /**
10138
10649
  * @description - `missing_required_field`: `source_id`, `target_id` or `edge_type` is missing.
10139
10650
  * - `invalid_id`: `source_id`, `target_id` or `id` isn't a valid ID.
10140
- * - `validation_error`, `invalid_properties`: a field is invalid, or a property breaks the edge type's schema.
10651
+ * - `validation_error`, `invalid_properties`: a field is invalid or undeclared, or a property breaks its schema.
10141
10652
  * - `edge_constraint_violation`, `edge_cycle`: the edge exists (`details.constraint` is `duplicate`), breaks its type's rules or closes a cycle.
10142
10653
  */
10143
10654
  400: {
@@ -10207,7 +10718,10 @@ interface operations {
10207
10718
  "application/json": components["schemas"]["EdgeTypeNotFoundOrItemNotFoundRefusal"];
10208
10719
  };
10209
10720
  };
10210
- /** @description `id_reused`: `id` belongs to a different edge. `details.differs` lists which of `source_id`, `target_id` and `edge_type` differ. If you can't read that edge, only `details.existing_id` is set. */
10721
+ /**
10722
+ * @description - `version_conflict`: `source_version` differs; `current` is the source now.
10723
+ * - `id_reused`: `id` belongs to a different edge. `details.differs` lists the differing ends or type; an unreadable edge supplies only `details.existing_id`.
10724
+ */
10211
10725
  409: {
10212
10726
  headers: {
10213
10727
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
@@ -10220,7 +10734,7 @@ interface operations {
10220
10734
  [name: string]: unknown;
10221
10735
  };
10222
10736
  content: {
10223
- "application/json": components["schemas"]["IdReusedRefusal"] | components["schemas"]["IdempotencyKeyInFlightRefusal"];
10737
+ "application/json": components["schemas"]["ItemStaleVersion"] | components["schemas"]["IdReusedRefusal"] | components["schemas"]["InstanceChangedRefusal"] | components["schemas"]["IdempotencyKeyInFlightRefusal"];
10224
10738
  };
10225
10739
  };
10226
10740
  /** @description `request_too_large`: the request body is larger than this instance accepts. */
@@ -10493,10 +11007,15 @@ interface operations {
10493
11007
  };
10494
11008
  deleteEdge: {
10495
11009
  parameters: {
10496
- query?: never;
11010
+ query?: {
11011
+ /** @description The source item version you read. If it differs, the edge is not changed. Leave it out to use the source as it is. */
11012
+ source_version?: number;
11013
+ };
10497
11014
  header?: {
10498
11015
  /** @description A unique key that makes the request safe to retry. If you send the same request with the same key again, Marfa returns the first response and doesn't write again. A key belongs to the credential that sends it. */
10499
11016
  "Idempotency-Key"?: string;
11017
+ /** @description The ID of the instance you expect, as `GET /` returns it. If another instance answers at this address, Marfa returns `409 instance_changed` and doesn't write. Leave it out to send the request to whichever instance answers. */
11018
+ "X-Marfa-Instance-Id"?: string;
10500
11019
  };
10501
11020
  path: {
10502
11021
  /** @description The ID of the edge. */
@@ -10586,7 +11105,7 @@ interface operations {
10586
11105
  "application/json": components["schemas"]["EdgeNotFoundRefusal"];
10587
11106
  };
10588
11107
  };
10589
- /** @description - `idempotency_key_in_flight`: a request with this `Idempotency-Key` is still running, and this one wrote nothing. Retry. */
11108
+ /** @description `version_conflict`: `source_version` differs from the source item. `current` is the source now; no edge changed. */
10590
11109
  409: {
10591
11110
  headers: {
10592
11111
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
@@ -10599,7 +11118,7 @@ interface operations {
10599
11118
  [name: string]: unknown;
10600
11119
  };
10601
11120
  content: {
10602
- "application/json": components["schemas"]["IdempotencyKeyInFlightRefusal"];
11121
+ "application/json": components["schemas"]["ItemStaleVersion"] | components["schemas"]["InstanceChangedRefusal"] | components["schemas"]["IdempotencyKeyInFlightRefusal"];
10603
11122
  };
10604
11123
  };
10605
11124
  /** @description `request_too_large`: the request body is larger than this instance accepts. */
@@ -10706,6 +11225,8 @@ interface operations {
10706
11225
  header?: {
10707
11226
  /** @description A unique key that makes the request safe to retry. If you send the same request with the same key again, Marfa returns the first response and doesn't write again. A key belongs to the credential that sends it. */
10708
11227
  "Idempotency-Key"?: string;
11228
+ /** @description The ID of the instance you expect, as `GET /` returns it. If another instance answers at this address, Marfa returns `409 instance_changed` and doesn't write. Leave it out to send the request to whichever instance answers. */
11229
+ "X-Marfa-Instance-Id"?: string;
10709
11230
  };
10710
11231
  path: {
10711
11232
  /** @description The ID of the edge. */
@@ -10747,9 +11268,9 @@ interface operations {
10747
11268
  };
10748
11269
  /**
10749
11270
  * @description - `missing_required_field`: `version` is missing, or `properties` is missing and no end moves.
10750
- * - `validation_error`, `invalid_properties`: the body moves both ends, the edge type can't move that end, or a property is invalid or breaks its schema.
11271
+ * - `validation_error`, `invalid_properties`: the body has an undeclared key, moves both ends or an end its type can't move, or a property breaks its schema.
10751
11272
  * - `invalid_id`: `source_id` or `target_id` isn't a valid ID.
10752
- * - `edge_constraint_violation`, `edge_cycle`: the moved edge breaks its edge type's rules.
11273
+ * - `edge_constraint_violation`, `edge_cycle`: the moved edge breaks its type's rules.
10753
11274
  */
10754
11275
  400: {
10755
11276
  headers: {
@@ -10832,7 +11353,7 @@ interface operations {
10832
11353
  [name: string]: unknown;
10833
11354
  };
10834
11355
  content: {
10835
- "application/json": components["schemas"]["EdgeVersionConflict"] | components["schemas"]["IdempotencyKeyInFlightRefusal"];
11356
+ "application/json": components["schemas"]["EdgeVersionConflict"] | components["schemas"]["InstanceChangedRefusal"] | components["schemas"]["IdempotencyKeyInFlightRefusal"];
10836
11357
  };
10837
11358
  };
10838
11359
  /** @description `request_too_large`: the request body is larger than this instance accepts. */
@@ -10936,14 +11457,17 @@ interface operations {
10936
11457
  bulkUpsertEdges: {
10937
11458
  parameters: {
10938
11459
  query?: never;
10939
- header?: never;
11460
+ header?: {
11461
+ /** @description The ID of the instance you expect, as `GET /` returns it. If another instance answers at this address, Marfa returns `409 instance_changed` and doesn't write. Leave it out to send the request to whichever instance answers. */
11462
+ "X-Marfa-Instance-Id"?: string;
11463
+ };
10940
11464
  path?: never;
10941
11465
  cookie?: never;
10942
11466
  };
10943
11467
  requestBody: {
10944
11468
  content: {
10945
11469
  "application/json": {
10946
- /** @description The entries to write, at most 5,000. The items they join must already exist. */
11470
+ /** @description The entries to write, at most 5,000. The items they join must already exist. An entry with a key this operation doesn't declare is refused as `validation_error`, and `details.unknown_body_fields` names each key. */
10947
11471
  edges: {
10948
11472
  /** @description A UUIDv7 you choose for the edge, if the entry creates one. Leave it out and Marfa creates one. */
10949
11473
  id?: string;
@@ -10988,9 +11512,9 @@ interface operations {
10988
11512
  };
10989
11513
  };
10990
11514
  /**
10991
- * @description - `validation_error`: the body is malformed, or has more than 5,000 entries.
10992
- * - `missing_required_field`: `edges` is missing, or an entry is missing `source_id`, `target_id` or `edge_type`.
10993
- * - `bulk_atomic_rollback`: with `atomic` true, an entry was refused and nothing was written. `details.code` and `details.index` give its code and position. The status is the one that refusal carries alone.
11515
+ * @description - `validation_error`: the body is malformed, has an undeclared key, or has more than 5,000 entries.
11516
+ * - `missing_required_field`: `edges` is missing, or an entry lacks `source_id`, `target_id` or `edge_type`.
11517
+ * - `bulk_atomic_rollback`: with `atomic` true, an entry was refused and nothing was written. `details.code` and `details.index` give its code and position. The status is that refusal's own.
10994
11518
  */
10995
11519
  400: {
10996
11520
  headers: {
@@ -11066,7 +11590,7 @@ interface operations {
11066
11590
  [name: string]: unknown;
11067
11591
  };
11068
11592
  content: {
11069
- "application/json": components["schemas"]["BulkAtomicRollbackRefusal"];
11593
+ "application/json": components["schemas"]["BulkAtomicRollbackRefusal"] | components["schemas"]["InstanceChangedRefusal"];
11070
11594
  };
11071
11595
  };
11072
11596
  /** @description `request_too_large`: the request body is larger than this instance accepts. */
@@ -11282,16 +11806,33 @@ interface operations {
11282
11806
  registerEdgeType: {
11283
11807
  parameters: {
11284
11808
  query?: never;
11285
- header?: never;
11809
+ header?: {
11810
+ /** @description The ID of the instance you expect, as `GET /` returns it. If another instance answers at this address, Marfa returns `409 instance_changed` and doesn't write. Leave it out to send the request to whichever instance answers. */
11811
+ "X-Marfa-Instance-Id"?: string;
11812
+ };
11286
11813
  path?: never;
11287
11814
  cookie?: never;
11288
11815
  };
11289
11816
  requestBody: {
11290
11817
  content: {
11291
- "application/json": components["schemas"]["EdgeTypeRequest"];
11818
+ "application/json": components["schemas"]["EdgeTypeRegistrationRequest"];
11292
11819
  };
11293
11820
  };
11294
11821
  responses: {
11822
+ /** @description Returns the widened edge type, or its unchanged definition for a repeated request. */
11823
+ 200: {
11824
+ headers: {
11825
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
11826
+ "X-Request-ID": components["headers"]["X-Request-ID"];
11827
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
11828
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
11829
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
11830
+ [name: string]: unknown;
11831
+ };
11832
+ content: {
11833
+ "application/json": components["schemas"]["EdgeTypeRegistrationResponse"];
11834
+ };
11835
+ };
11295
11836
  /** @description Returns the new edge type. */
11296
11837
  201: {
11297
11838
  headers: {
@@ -11303,9 +11844,7 @@ interface operations {
11303
11844
  [name: string]: unknown;
11304
11845
  };
11305
11846
  content: {
11306
- "application/json": {
11307
- edge_type: components["schemas"]["EdgeType"];
11308
- };
11847
+ "application/json": components["schemas"]["EdgeTypeRegistrationResponse"];
11309
11848
  };
11310
11849
  };
11311
11850
  /**
@@ -11360,8 +11899,8 @@ interface operations {
11360
11899
  "application/json": components["schemas"]["EdgePermissionDeniedOrForbiddenRefusal"];
11361
11900
  };
11362
11901
  };
11363
- /** @description `conflict`: `id` is the name of an edge type Marfa ships, `id` or `reverse_name` is already the ID or reverse name of an edge type, or `reverse_name` equals `id`. */
11364
- 409: {
11902
+ /** @description `edge_type_not_found`: constraint evolution names no registered edge type. */
11903
+ 404: {
11365
11904
  headers: {
11366
11905
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
11367
11906
  "X-Request-ID": components["headers"]["X-Request-ID"];
@@ -11372,7 +11911,22 @@ interface operations {
11372
11911
  [name: string]: unknown;
11373
11912
  };
11374
11913
  content: {
11375
- "application/json": components["schemas"]["ConflictRefusal"];
11914
+ "application/json": components["schemas"]["EdgeTypeNotFoundRefusal"];
11915
+ };
11916
+ };
11917
+ /** @description `conflict`: `id` is the name of an edge type Marfa ships, `id` or `reverse_name` is already the ID or reverse name of an edge type, or `reverse_name` equals `id`, or constraint evolution would remove a constraint token without allowing every type or change another definition member. */
11918
+ 409: {
11919
+ headers: {
11920
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
11921
+ "X-Request-ID": components["headers"]["X-Request-ID"];
11922
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
11923
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
11924
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
11925
+ "X-Error-Code": components["headers"]["X-Error-Code"];
11926
+ [name: string]: unknown;
11927
+ };
11928
+ content: {
11929
+ "application/json": components["schemas"]["ConflictRefusal"] | components["schemas"]["InstanceChangedRefusal"];
11376
11930
  };
11377
11931
  };
11378
11932
  /** @description `request_too_large`: the request body is larger than this instance accepts. */
@@ -11456,7 +12010,10 @@ interface operations {
11456
12010
  /** @description Delete the edge type even though edges of it exist. Those edges stay and keep naming it. */
11457
12011
  force?: "true" | "false";
11458
12012
  };
11459
- header?: never;
12013
+ header?: {
12014
+ /** @description The ID of the instance you expect, as `GET /` returns it. If another instance answers at this address, Marfa returns `409 instance_changed` and doesn't write. Leave it out to send the request to whichever instance answers. */
12015
+ "X-Marfa-Instance-Id"?: string;
12016
+ };
11460
12017
  path: {
11461
12018
  /** @description The identifier of the edge type. */
11462
12019
  id: string;
@@ -11554,7 +12111,7 @@ interface operations {
11554
12111
  [name: string]: unknown;
11555
12112
  };
11556
12113
  content: {
11557
- "application/json": components["schemas"]["EdgeTypeInUseRefusal"];
12114
+ "application/json": components["schemas"]["EdgeTypeInUseRefusal"] | components["schemas"]["InstanceChangedRefusal"];
11558
12115
  };
11559
12116
  };
11560
12117
  /** @description `request_too_large`: the request body is larger than this instance accepts. */
@@ -11770,7 +12327,10 @@ interface operations {
11770
12327
  registerType: {
11771
12328
  parameters: {
11772
12329
  query?: never;
11773
- header?: never;
12330
+ header?: {
12331
+ /** @description The ID of the instance you expect, as `GET /` returns it. If another instance answers at this address, Marfa returns `409 instance_changed` and doesn't write. Leave it out to send the request to whichever instance answers. */
12332
+ "X-Marfa-Instance-Id"?: string;
12333
+ };
11774
12334
  path?: never;
11775
12335
  cookie?: never;
11776
12336
  };
@@ -11863,7 +12423,7 @@ interface operations {
11863
12423
  [name: string]: unknown;
11864
12424
  };
11865
12425
  content: {
11866
- "application/json": components["schemas"]["LinkTakenOrTypeAlreadyExistsRefusal"];
12426
+ "application/json": components["schemas"]["LinkTakenOrTypeAlreadyExistsRefusal"] | components["schemas"]["InstanceChangedRefusal"];
11867
12427
  };
11868
12428
  };
11869
12429
  /** @description `request_too_large`: the request body is larger than this instance accepts. */
@@ -12108,7 +12668,10 @@ interface operations {
12108
12668
  replaceType: {
12109
12669
  parameters: {
12110
12670
  query?: never;
12111
- header?: never;
12671
+ header?: {
12672
+ /** @description The ID of the instance you expect, as `GET /` returns it. If another instance answers at this address, Marfa returns `409 instance_changed` and doesn't write. Leave it out to send the request to whichever instance answers. */
12673
+ "X-Marfa-Instance-Id"?: string;
12674
+ };
12112
12675
  path: {
12113
12676
  /** @description The identifier of the type, such as `acme.deal`. */
12114
12677
  id: string;
@@ -12217,7 +12780,7 @@ interface operations {
12217
12780
  [name: string]: unknown;
12218
12781
  };
12219
12782
  content: {
12220
- "application/json": components["schemas"]["LinkTakenRefusal"];
12783
+ "application/json": components["schemas"]["LinkTakenRefusal"] | components["schemas"]["InstanceChangedRefusal"];
12221
12784
  };
12222
12785
  };
12223
12786
  /** @description `request_too_large`: the request body is larger than this instance accepts. */
@@ -12316,7 +12879,10 @@ interface operations {
12316
12879
  /** @description Delete the type even if items of it exist, in any state. It doesn't cover a type that has subtypes. */
12317
12880
  force?: "true" | "false";
12318
12881
  };
12319
- header?: never;
12882
+ header?: {
12883
+ /** @description The ID of the instance you expect, as `GET /` returns it. If another instance answers at this address, Marfa returns `409 instance_changed` and doesn't write. Leave it out to send the request to whichever instance answers. */
12884
+ "X-Marfa-Instance-Id"?: string;
12885
+ };
12320
12886
  path: {
12321
12887
  /** @description The identifier of the type, such as `acme.deal`. */
12322
12888
  id: string;
@@ -12418,7 +12984,7 @@ interface operations {
12418
12984
  [name: string]: unknown;
12419
12985
  };
12420
12986
  content: {
12421
- "application/json": components["schemas"]["TypeHasSubtypesOrTypeInUseRefusal"];
12987
+ "application/json": components["schemas"]["TypeHasSubtypesOrTypeInUseRefusal"] | components["schemas"]["InstanceChangedRefusal"];
12422
12988
  };
12423
12989
  };
12424
12990
  /** @description `request_too_large`: the request body is larger than this instance accepts. */
@@ -12499,7 +13065,10 @@ interface operations {
12499
13065
  normalizeType: {
12500
13066
  parameters: {
12501
13067
  query?: never;
12502
- header?: never;
13068
+ header?: {
13069
+ /** @description The ID of the instance you expect, as `GET /` returns it. If another instance answers at this address, Marfa returns `409 instance_changed` and doesn't write. Leave it out to send the request to whichever instance answers. */
13070
+ "X-Marfa-Instance-Id"?: string;
13071
+ };
12503
13072
  path?: never;
12504
13073
  cookie?: never;
12505
13074
  };
@@ -12571,7 +13140,7 @@ interface operations {
12571
13140
  [name: string]: unknown;
12572
13141
  };
12573
13142
  content: {
12574
- "application/json": components["schemas"]["TypeChainUnresolvableRefusal"];
13143
+ "application/json": components["schemas"]["TypeChainUnresolvableRefusal"] | components["schemas"]["InstanceChangedRefusal"];
12575
13144
  };
12576
13145
  };
12577
13146
  /** @description `request_too_large`: the request body is larger than this instance accepts. */
@@ -13101,7 +13670,10 @@ interface operations {
13101
13670
  uploadBlob: {
13102
13671
  parameters: {
13103
13672
  query?: never;
13104
- header?: never;
13673
+ header?: {
13674
+ /** @description The ID of the instance you expect, as `GET /` returns it. If another instance answers at this address, Marfa returns `409 instance_changed` and doesn't write. Leave it out to send the request to whichever instance answers. */
13675
+ "X-Marfa-Instance-Id"?: string;
13676
+ };
13105
13677
  path?: never;
13106
13678
  cookie?: never;
13107
13679
  };
@@ -13178,6 +13750,21 @@ interface operations {
13178
13750
  "application/json": components["schemas"]["TypeNotPermittedRefusal"];
13179
13751
  };
13180
13752
  };
13753
+ /** @description `instance_changed`: `X-Marfa-Instance-Id` names another instance. Nothing is written. Rebuild the working copy from the instance at this address. */
13754
+ 409: {
13755
+ headers: {
13756
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
13757
+ "X-Request-ID": components["headers"]["X-Request-ID"];
13758
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
13759
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
13760
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
13761
+ "X-Error-Code": components["headers"]["X-Error-Code"];
13762
+ [name: string]: unknown;
13763
+ };
13764
+ content: {
13765
+ "application/json": components["schemas"]["InstanceChangedRefusal"];
13766
+ };
13767
+ };
13181
13768
  /** @description `rate_limited`: you sent too many requests. Wait for the number of seconds in `Retry-After`, then try again. */
13182
13769
  429: {
13183
13770
  headers: {
@@ -14010,7 +14597,10 @@ interface operations {
14010
14597
  deleteBlobLocation: {
14011
14598
  parameters: {
14012
14599
  query?: never;
14013
- header?: never;
14600
+ header?: {
14601
+ /** @description The ID of the instance you expect, as `GET /` returns it. If another instance answers at this address, Marfa returns `409 instance_changed` and doesn't write. Leave it out to send the request to whichever instance answers. */
14602
+ "X-Marfa-Instance-Id"?: string;
14603
+ };
14014
14604
  path: {
14015
14605
  /** @description The blob's hash, `sha256:<hex>`. */
14016
14606
  hash: string;
@@ -14110,7 +14700,7 @@ interface operations {
14110
14700
  [name: string]: unknown;
14111
14701
  };
14112
14702
  content: {
14113
- "application/json": components["schemas"]["CopiesBelowMinimumRefusal"];
14703
+ "application/json": components["schemas"]["CopiesBelowMinimumRefusal"] | components["schemas"]["InstanceChangedRefusal"];
14114
14704
  };
14115
14705
  };
14116
14706
  /** @description `rate_limited`: you sent too many requests. Wait for the number of seconds in `Retry-After`, then try again. */
@@ -14310,7 +14900,10 @@ interface operations {
14310
14900
  runHousekeeping: {
14311
14901
  parameters: {
14312
14902
  query?: never;
14313
- header?: never;
14903
+ header?: {
14904
+ /** @description The ID of the instance you expect, as `GET /` returns it. If another instance answers at this address, Marfa returns `409 instance_changed` and doesn't write. Leave it out to send the request to whichever instance answers. */
14905
+ "X-Marfa-Instance-Id"?: string;
14906
+ };
14314
14907
  path: {
14315
14908
  /** @description The housekeeping job's name, as `GET /housekeeping` lists it. */
14316
14909
  name: string;
@@ -14405,7 +14998,7 @@ interface operations {
14405
14998
  [name: string]: unknown;
14406
14999
  };
14407
15000
  content: {
14408
- "application/json": components["schemas"]["HousekeepingJobRunningRefusal"];
15001
+ "application/json": components["schemas"]["HousekeepingJobRunningRefusal"] | components["schemas"]["InstanceChangedRefusal"];
14409
15002
  };
14410
15003
  };
14411
15004
  /** @description `request_too_large`: the request body is larger than this instance accepts. */
@@ -14602,7 +15195,10 @@ interface operations {
14602
15195
  registerConnector: {
14603
15196
  parameters: {
14604
15197
  query?: never;
14605
- header?: never;
15198
+ header?: {
15199
+ /** @description The ID of the instance you expect, as `GET /` returns it. If another instance answers at this address, Marfa returns `409 instance_changed` and doesn't write. Leave it out to send the request to whichever instance answers. */
15200
+ "X-Marfa-Instance-Id"?: string;
15201
+ };
14606
15202
  path?: never;
14607
15203
  cookie?: never;
14608
15204
  };
@@ -14693,6 +15289,21 @@ interface operations {
14693
15289
  "application/json": components["schemas"]["ForbiddenRefusal"];
14694
15290
  };
14695
15291
  };
15292
+ /** @description `instance_changed`: `X-Marfa-Instance-Id` names another instance. Nothing is written. Rebuild the working copy from the instance at this address. */
15293
+ 409: {
15294
+ headers: {
15295
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
15296
+ "X-Request-ID": components["headers"]["X-Request-ID"];
15297
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
15298
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
15299
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
15300
+ "X-Error-Code": components["headers"]["X-Error-Code"];
15301
+ [name: string]: unknown;
15302
+ };
15303
+ content: {
15304
+ "application/json": components["schemas"]["InstanceChangedRefusal"];
15305
+ };
15306
+ };
14696
15307
  /** @description `request_too_large`: the request body is larger than this instance accepts. */
14697
15308
  413: {
14698
15309
  headers: {
@@ -14905,7 +15516,10 @@ interface operations {
14905
15516
  deleteConnector: {
14906
15517
  parameters: {
14907
15518
  query?: never;
14908
- header?: never;
15519
+ header?: {
15520
+ /** @description The ID of the instance you expect, as `GET /` returns it. If another instance answers at this address, Marfa returns `409 instance_changed` and doesn't write. Leave it out to send the request to whichever instance answers. */
15521
+ "X-Marfa-Instance-Id"?: string;
15522
+ };
14909
15523
  path: {
14910
15524
  /** @description The ID of the connector. */
14911
15525
  id: string;
@@ -14988,6 +15602,21 @@ interface operations {
14988
15602
  "application/json": components["schemas"]["ConnectorNotFoundRefusal"];
14989
15603
  };
14990
15604
  };
15605
+ /** @description `instance_changed`: `X-Marfa-Instance-Id` names another instance. Nothing is written. Rebuild the working copy from the instance at this address. */
15606
+ 409: {
15607
+ headers: {
15608
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
15609
+ "X-Request-ID": components["headers"]["X-Request-ID"];
15610
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
15611
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
15612
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
15613
+ "X-Error-Code": components["headers"]["X-Error-Code"];
15614
+ [name: string]: unknown;
15615
+ };
15616
+ content: {
15617
+ "application/json": components["schemas"]["InstanceChangedRefusal"];
15618
+ };
15619
+ };
14991
15620
  /** @description `request_too_large`: the request body is larger than this instance accepts. */
14992
15621
  413: {
14993
15622
  headers: {
@@ -15066,7 +15695,10 @@ interface operations {
15066
15695
  heartbeatConnector: {
15067
15696
  parameters: {
15068
15697
  query?: never;
15069
- header?: never;
15698
+ header?: {
15699
+ /** @description The ID of the instance you expect, as `GET /` returns it. If another instance answers at this address, Marfa returns `409 instance_changed` and doesn't write. Leave it out to send the request to whichever instance answers. */
15700
+ "X-Marfa-Instance-Id"?: string;
15701
+ };
15070
15702
  path: {
15071
15703
  /** @description The ID of the connector. */
15072
15704
  id: string;
@@ -15152,6 +15784,21 @@ interface operations {
15152
15784
  "application/json": components["schemas"]["ConnectorNotFoundRefusal"];
15153
15785
  };
15154
15786
  };
15787
+ /** @description `instance_changed`: `X-Marfa-Instance-Id` names another instance. Nothing is written. Rebuild the working copy from the instance at this address. */
15788
+ 409: {
15789
+ headers: {
15790
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
15791
+ "X-Request-ID": components["headers"]["X-Request-ID"];
15792
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
15793
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
15794
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
15795
+ "X-Error-Code": components["headers"]["X-Error-Code"];
15796
+ [name: string]: unknown;
15797
+ };
15798
+ content: {
15799
+ "application/json": components["schemas"]["InstanceChangedRefusal"];
15800
+ };
15801
+ };
15155
15802
  /** @description `request_too_large`: the request body is larger than this instance accepts. */
15156
15803
  413: {
15157
15804
  headers: {
@@ -15369,7 +16016,10 @@ interface operations {
15369
16016
  reportConnectorRun: {
15370
16017
  parameters: {
15371
16018
  query?: never;
15372
- header?: never;
16019
+ header?: {
16020
+ /** @description The ID of the instance you expect, as `GET /` returns it. If another instance answers at this address, Marfa returns `409 instance_changed` and doesn't write. Leave it out to send the request to whichever instance answers. */
16021
+ "X-Marfa-Instance-Id"?: string;
16022
+ };
15373
16023
  path: {
15374
16024
  /** @description The ID of the connector. */
15375
16025
  id: string;
@@ -15473,6 +16123,21 @@ interface operations {
15473
16123
  "application/json": components["schemas"]["ConnectorNotFoundRefusal"];
15474
16124
  };
15475
16125
  };
16126
+ /** @description `instance_changed`: `X-Marfa-Instance-Id` names another instance. Nothing is written. Rebuild the working copy from the instance at this address. */
16127
+ 409: {
16128
+ headers: {
16129
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
16130
+ "X-Request-ID": components["headers"]["X-Request-ID"];
16131
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
16132
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
16133
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
16134
+ "X-Error-Code": components["headers"]["X-Error-Code"];
16135
+ [name: string]: unknown;
16136
+ };
16137
+ content: {
16138
+ "application/json": components["schemas"]["InstanceChangedRefusal"];
16139
+ };
16140
+ };
15476
16141
  /** @description `request_too_large`: the request body is larger than this instance accepts. */
15477
16142
  413: {
15478
16143
  headers: {
@@ -15700,7 +16365,10 @@ interface operations {
15700
16365
  createInboundEndpoint: {
15701
16366
  parameters: {
15702
16367
  query?: never;
15703
- header?: never;
16368
+ header?: {
16369
+ /** @description The ID of the instance you expect, as `GET /` returns it. If another instance answers at this address, Marfa returns `409 instance_changed` and doesn't write. Leave it out to send the request to whichever instance answers. */
16370
+ "X-Marfa-Instance-Id"?: string;
16371
+ };
15704
16372
  path: {
15705
16373
  /** @description The ID of the connector. */
15706
16374
  id: string;
@@ -15804,7 +16472,7 @@ interface operations {
15804
16472
  [name: string]: unknown;
15805
16473
  };
15806
16474
  content: {
15807
- "application/json": components["schemas"]["ConflictRefusal"];
16475
+ "application/json": components["schemas"]["ConflictRefusal"] | components["schemas"]["InstanceChangedRefusal"];
15808
16476
  };
15809
16477
  };
15810
16478
  /** @description `request_too_large`: the request body is larger than this instance accepts. */
@@ -15885,7 +16553,10 @@ interface operations {
15885
16553
  retireInboundEndpoint: {
15886
16554
  parameters: {
15887
16555
  query?: never;
15888
- header?: never;
16556
+ header?: {
16557
+ /** @description The ID of the instance you expect, as `GET /` returns it. If another instance answers at this address, Marfa returns `409 instance_changed` and doesn't write. Leave it out to send the request to whichever instance answers. */
16558
+ "X-Marfa-Instance-Id"?: string;
16559
+ };
15889
16560
  path: {
15890
16561
  /** @description The ID of the connector. */
15891
16562
  id: string;
@@ -15973,6 +16644,21 @@ interface operations {
15973
16644
  "application/json": components["schemas"]["ConnectorNotFoundOrEndpointNotFoundRefusal"];
15974
16645
  };
15975
16646
  };
16647
+ /** @description `instance_changed`: `X-Marfa-Instance-Id` names another instance. Nothing is written. Rebuild the working copy from the instance at this address. */
16648
+ 409: {
16649
+ headers: {
16650
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
16651
+ "X-Request-ID": components["headers"]["X-Request-ID"];
16652
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
16653
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
16654
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
16655
+ "X-Error-Code": components["headers"]["X-Error-Code"];
16656
+ [name: string]: unknown;
16657
+ };
16658
+ content: {
16659
+ "application/json": components["schemas"]["InstanceChangedRefusal"];
16660
+ };
16661
+ };
15976
16662
  /** @description `request_too_large`: the request body is larger than this instance accepts. */
15977
16663
  413: {
15978
16664
  headers: {
@@ -16363,7 +17049,10 @@ interface operations {
16363
17049
  markInboundDeliveriesHandled: {
16364
17050
  parameters: {
16365
17051
  query?: never;
16366
- header?: never;
17052
+ header?: {
17053
+ /** @description The ID of the instance you expect, as `GET /` returns it. If another instance answers at this address, Marfa returns `409 instance_changed` and doesn't write. Leave it out to send the request to whichever instance answers. */
17054
+ "X-Marfa-Instance-Id"?: string;
17055
+ };
16367
17056
  path: {
16368
17057
  /** @description The ID of the connector. */
16369
17058
  id: string;
@@ -16467,6 +17156,21 @@ interface operations {
16467
17156
  "application/json": components["schemas"]["ConnectorNotFoundOrDeliveryNotFoundRefusal"];
16468
17157
  };
16469
17158
  };
17159
+ /** @description `instance_changed`: `X-Marfa-Instance-Id` names another instance. Nothing is written. Rebuild the working copy from the instance at this address. */
17160
+ 409: {
17161
+ headers: {
17162
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
17163
+ "X-Request-ID": components["headers"]["X-Request-ID"];
17164
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
17165
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
17166
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
17167
+ "X-Error-Code": components["headers"]["X-Error-Code"];
17168
+ [name: string]: unknown;
17169
+ };
17170
+ content: {
17171
+ "application/json": components["schemas"]["InstanceChangedRefusal"];
17172
+ };
17173
+ };
16470
17174
  /** @description `request_too_large`: the request body is larger than this instance accepts. */
16471
17175
  413: {
16472
17176
  headers: {
@@ -16545,7 +17249,10 @@ interface operations {
16545
17249
  holdConnector: {
16546
17250
  parameters: {
16547
17251
  query?: never;
16548
- header?: never;
17252
+ header?: {
17253
+ /** @description The ID of the instance you expect, as `GET /` returns it. If another instance answers at this address, Marfa returns `409 instance_changed` and doesn't write. Leave it out to send the request to whichever instance answers. */
17254
+ "X-Marfa-Instance-Id"?: string;
17255
+ };
16549
17256
  path: {
16550
17257
  /** @description The ID of the connector. */
16551
17258
  id: string;
@@ -16657,7 +17364,7 @@ interface operations {
16657
17364
  [name: string]: unknown;
16658
17365
  };
16659
17366
  content: {
16660
- "application/json": components["schemas"]["ConnectorHeldRefusal"];
17367
+ "application/json": components["schemas"]["ConnectorHeldRefusal"] | components["schemas"]["InstanceChangedRefusal"];
16661
17368
  };
16662
17369
  };
16663
17370
  /** @description `request_too_large`: the request body is larger than this instance accepts. */
@@ -16741,7 +17448,10 @@ interface operations {
16741
17448
  /** @description The name the process took the connector's hold under. */
16742
17449
  process: string;
16743
17450
  };
16744
- header?: never;
17451
+ header?: {
17452
+ /** @description The ID of the instance you expect, as `GET /` returns it. If another instance answers at this address, Marfa returns `409 instance_changed` and doesn't write. Leave it out to send the request to whichever instance answers. */
17453
+ "X-Marfa-Instance-Id"?: string;
17454
+ };
16745
17455
  path: {
16746
17456
  /** @description The ID of the connector. */
16747
17457
  id: string;
@@ -16827,6 +17537,21 @@ interface operations {
16827
17537
  "application/json": components["schemas"]["ConnectorNotFoundRefusal"];
16828
17538
  };
16829
17539
  };
17540
+ /** @description `instance_changed`: `X-Marfa-Instance-Id` names another instance. Nothing is written. Rebuild the working copy from the instance at this address. */
17541
+ 409: {
17542
+ headers: {
17543
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
17544
+ "X-Request-ID": components["headers"]["X-Request-ID"];
17545
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
17546
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
17547
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
17548
+ "X-Error-Code": components["headers"]["X-Error-Code"];
17549
+ [name: string]: unknown;
17550
+ };
17551
+ content: {
17552
+ "application/json": components["schemas"]["InstanceChangedRefusal"];
17553
+ };
17554
+ };
16830
17555
  /** @description `request_too_large`: the request body is larger than this instance accepts. */
16831
17556
  413: {
16832
17557
  headers: {
@@ -17054,7 +17779,10 @@ interface operations {
17054
17779
  replaceConnectorState: {
17055
17780
  parameters: {
17056
17781
  query?: never;
17057
- header?: never;
17782
+ header?: {
17783
+ /** @description The ID of the instance you expect, as `GET /` returns it. If another instance answers at this address, Marfa returns `409 instance_changed` and doesn't write. Leave it out to send the request to whichever instance answers. */
17784
+ "X-Marfa-Instance-Id"?: string;
17785
+ };
17058
17786
  path: {
17059
17787
  /** @description The ID of the connector. */
17060
17788
  id: string;
@@ -17172,7 +17900,7 @@ interface operations {
17172
17900
  [name: string]: unknown;
17173
17901
  };
17174
17902
  content: {
17175
- "application/json": components["schemas"]["ConnectorHeldRefusal"];
17903
+ "application/json": components["schemas"]["ConnectorHeldRefusal"] | components["schemas"]["InstanceChangedRefusal"];
17176
17904
  };
17177
17905
  };
17178
17906
  /** @description `request_too_large`: the request body is larger than this instance accepts. */
@@ -17253,7 +17981,10 @@ interface operations {
17253
17981
  deleteConnectorState: {
17254
17982
  parameters: {
17255
17983
  query?: never;
17256
- header?: never;
17984
+ header?: {
17985
+ /** @description The ID of the instance you expect, as `GET /` returns it. If another instance answers at this address, Marfa returns `409 instance_changed` and doesn't write. Leave it out to send the request to whichever instance answers. */
17986
+ "X-Marfa-Instance-Id"?: string;
17987
+ };
17257
17988
  path: {
17258
17989
  /** @description The ID of the connector. */
17259
17990
  id: string;
@@ -17336,6 +18067,21 @@ interface operations {
17336
18067
  "application/json": components["schemas"]["ConnectorNotFoundRefusal"];
17337
18068
  };
17338
18069
  };
18070
+ /** @description `instance_changed`: `X-Marfa-Instance-Id` names another instance. Nothing is written. Rebuild the working copy from the instance at this address. */
18071
+ 409: {
18072
+ headers: {
18073
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
18074
+ "X-Request-ID": components["headers"]["X-Request-ID"];
18075
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
18076
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
18077
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
18078
+ "X-Error-Code": components["headers"]["X-Error-Code"];
18079
+ [name: string]: unknown;
18080
+ };
18081
+ content: {
18082
+ "application/json": components["schemas"]["InstanceChangedRefusal"];
18083
+ };
18084
+ };
17339
18085
  /** @description `request_too_large`: the request body is larger than this instance accepts. */
17340
18086
  413: {
17341
18087
  headers: {
@@ -17570,7 +18316,10 @@ interface operations {
17570
18316
  writeConnectorAgreements: {
17571
18317
  parameters: {
17572
18318
  query?: never;
17573
- header?: never;
18319
+ header?: {
18320
+ /** @description The ID of the instance you expect, as `GET /` returns it. If another instance answers at this address, Marfa returns `409 instance_changed` and doesn't write. Leave it out to send the request to whichever instance answers. */
18321
+ "X-Marfa-Instance-Id"?: string;
18322
+ };
17574
18323
  path: {
17575
18324
  /** @description The ID of the connector. */
17576
18325
  id: string;
@@ -17695,7 +18444,7 @@ interface operations {
17695
18444
  [name: string]: unknown;
17696
18445
  };
17697
18446
  content: {
17698
- "application/json": components["schemas"]["ConnectorHeldRefusal"];
18447
+ "application/json": components["schemas"]["ConnectorHeldRefusal"] | components["schemas"]["InstanceChangedRefusal"];
17699
18448
  };
17700
18449
  };
17701
18450
  /** @description `request_too_large`: the request body is larger than this instance accepts. */
@@ -17776,7 +18525,10 @@ interface operations {
17776
18525
  lookupConnectorAgreements: {
17777
18526
  parameters: {
17778
18527
  query?: never;
17779
- header?: never;
18528
+ header?: {
18529
+ /** @description The ID of the instance you expect, as `GET /` returns it. If another instance answers at this address, Marfa returns `409 instance_changed` and doesn't write. Leave it out to send the request to whichever instance answers. */
18530
+ "X-Marfa-Instance-Id"?: string;
18531
+ };
17780
18532
  path: {
17781
18533
  /** @description The ID of the connector. */
17782
18534
  id: string;
@@ -17872,6 +18624,21 @@ interface operations {
17872
18624
  "application/json": components["schemas"]["ConnectorNotFoundRefusal"];
17873
18625
  };
17874
18626
  };
18627
+ /** @description `instance_changed`: `X-Marfa-Instance-Id` names another instance. Nothing is written. Rebuild the working copy from the instance at this address. */
18628
+ 409: {
18629
+ headers: {
18630
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
18631
+ "X-Request-ID": components["headers"]["X-Request-ID"];
18632
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
18633
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
18634
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
18635
+ "X-Error-Code": components["headers"]["X-Error-Code"];
18636
+ [name: string]: unknown;
18637
+ };
18638
+ content: {
18639
+ "application/json": components["schemas"]["InstanceChangedRefusal"];
18640
+ };
18641
+ };
17875
18642
  /** @description `request_too_large`: the request body is larger than this instance accepts. */
17876
18643
  413: {
17877
18644
  headers: {
@@ -17953,6 +18720,8 @@ interface operations {
17953
18720
  header?: {
17954
18721
  /** @description A unique key that makes the request safe to retry. If you send the same request with the same key again, Marfa returns the first response and doesn't write again. A key belongs to the credential that sends it. */
17955
18722
  "Idempotency-Key"?: string;
18723
+ /** @description The ID of the instance you expect, as `GET /` returns it. If another instance answers at this address, Marfa returns `409 instance_changed` and doesn't write. Leave it out to send the request to whichever instance answers. */
18724
+ "X-Marfa-Instance-Id"?: string;
17956
18725
  };
17957
18726
  path?: never;
17958
18727
  cookie?: never;
@@ -17993,7 +18762,7 @@ interface operations {
17993
18762
  };
17994
18763
  };
17995
18764
  /**
17996
- * @description - `validation_error`: a setting is malformed, such as a `system.*` type, an invalid `filter` or a `first_placement` directory outside the folder. `details.errors[0].path` names it.
18765
+ * @description - `validation_error`: a setting is malformed, such as a `system.*` type, an invalid `filter` or a `first_placement` directory outside the folder. `details.errors[0].path` names it. A key the body or a setting doesn't declare is named in `details.unknown_body_fields`.
17997
18766
  * - `missing_required_field`: `title` is missing.
17998
18767
  * - `unknown_type`: a setting names a type that isn't registered.
17999
18768
  */
@@ -18042,7 +18811,7 @@ interface operations {
18042
18811
  "application/json": components["schemas"]["TypeNotPermittedRefusal"];
18043
18812
  };
18044
18813
  };
18045
- /** @description - `idempotency_key_in_flight`: a request with this `Idempotency-Key` is still running, and this one wrote nothing. Retry. */
18814
+ /** @description `instance_changed`: `X-Marfa-Instance-Id` names another instance. Nothing is written. Rebuild the working copy from the instance at this address. */
18046
18815
  409: {
18047
18816
  headers: {
18048
18817
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
@@ -18055,7 +18824,7 @@ interface operations {
18055
18824
  [name: string]: unknown;
18056
18825
  };
18057
18826
  content: {
18058
- "application/json": components["schemas"]["IdempotencyKeyInFlightRefusal"];
18827
+ "application/json": components["schemas"]["InstanceChangedRefusal"] | components["schemas"]["IdempotencyKeyInFlightRefusal"];
18059
18828
  };
18060
18829
  };
18061
18830
  /** @description `request_too_large`: the request body is larger than this instance accepts. */
@@ -18162,6 +18931,8 @@ interface operations {
18162
18931
  header?: {
18163
18932
  /** @description A unique key that makes the request safe to retry. If you send the same request with the same key again, Marfa returns the first response and doesn't write again. A key belongs to the credential that sends it. */
18164
18933
  "Idempotency-Key"?: string;
18934
+ /** @description The ID of the instance you expect, as `GET /` returns it. If another instance answers at this address, Marfa returns `409 instance_changed` and doesn't write. Leave it out to send the request to whichever instance answers. */
18935
+ "X-Marfa-Instance-Id"?: string;
18165
18936
  };
18166
18937
  path: {
18167
18938
  /** @description The ID of the folder. */
@@ -18207,7 +18978,7 @@ interface operations {
18207
18978
  };
18208
18979
  };
18209
18980
  /**
18210
- * @description - `validation_error`: a setting is malformed (`details.errors[0].path` names it), the body names no setting, or the query has a parameter such as `conflict`, which this endpoint doesn't take.
18981
+ * @description - `validation_error`: a setting is malformed (`details.errors[0].path` names it), a key is undeclared (`details.unknown_body_fields` names it), the body names no setting, or the query has `conflict`.
18211
18982
  * - `missing_required_field`: `version` is missing.
18212
18983
  * - `unknown_type`: a setting names a type that isn't registered.
18213
18984
  * - `invalid_id`: the ID is malformed.
@@ -18290,7 +19061,7 @@ interface operations {
18290
19061
  [name: string]: unknown;
18291
19062
  };
18292
19063
  content: {
18293
- "application/json": components["schemas"]["ItemVersionConflict"] | components["schemas"]["ItemAncestorUnavailable"] | components["schemas"]["IdempotencyKeyInFlightRefusal"];
19064
+ "application/json": components["schemas"]["ItemVersionConflict"] | components["schemas"]["ItemAncestorUnavailable"] | components["schemas"]["InstanceChangedRefusal"] | components["schemas"]["IdempotencyKeyInFlightRefusal"];
18294
19065
  };
18295
19066
  };
18296
19067
  /** @description `request_too_large`: the request body is larger than this instance accepts. */
@@ -18397,6 +19168,8 @@ interface operations {
18397
19168
  header?: {
18398
19169
  /** @description A unique key that makes the request safe to retry. If you send the same request with the same key again, Marfa returns the first response and doesn't write again. A key belongs to the credential that sends it. */
18399
19170
  "Idempotency-Key"?: string;
19171
+ /** @description The ID of the instance you expect, as `GET /` returns it. If another instance answers at this address, Marfa returns `409 instance_changed` and doesn't write. Leave it out to send the request to whichever instance answers. */
19172
+ "X-Marfa-Instance-Id"?: string;
18400
19173
  };
18401
19174
  path: {
18402
19175
  /** @description The ID of the folder. */
@@ -18487,7 +19260,7 @@ interface operations {
18487
19260
  "application/json": components["schemas"]["ItemNotFoundRefusal"];
18488
19261
  };
18489
19262
  };
18490
- /** @description - `idempotency_key_in_flight`: a request with this `Idempotency-Key` is still running, and this one wrote nothing. Retry. */
19263
+ /** @description `instance_changed`: `X-Marfa-Instance-Id` names another instance. Nothing is written. Rebuild the working copy from the instance at this address. */
18491
19264
  409: {
18492
19265
  headers: {
18493
19266
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
@@ -18500,7 +19273,7 @@ interface operations {
18500
19273
  [name: string]: unknown;
18501
19274
  };
18502
19275
  content: {
18503
- "application/json": components["schemas"]["IdempotencyKeyInFlightRefusal"];
19276
+ "application/json": components["schemas"]["InstanceChangedRefusal"] | components["schemas"]["IdempotencyKeyInFlightRefusal"];
18504
19277
  };
18505
19278
  };
18506
19279
  /** @description `request_too_large`: the request body is larger than this instance accepts. */
@@ -18793,7 +19566,10 @@ interface operations {
18793
19566
  reportFolderStatus: {
18794
19567
  parameters: {
18795
19568
  query?: never;
18796
- header?: never;
19569
+ header?: {
19570
+ /** @description The ID of the instance you expect, as `GET /` returns it. If another instance answers at this address, Marfa returns `409 instance_changed` and doesn't write. Leave it out to send the request to whichever instance answers. */
19571
+ "X-Marfa-Instance-Id"?: string;
19572
+ };
18797
19573
  path: {
18798
19574
  /** @description The ID of the folder. */
18799
19575
  id: string;
@@ -18894,6 +19670,21 @@ interface operations {
18894
19670
  "application/json": components["schemas"]["ItemNotFoundRefusal"];
18895
19671
  };
18896
19672
  };
19673
+ /** @description `instance_changed`: `X-Marfa-Instance-Id` names another instance. Nothing is written. Rebuild the working copy from the instance at this address. */
19674
+ 409: {
19675
+ headers: {
19676
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
19677
+ "X-Request-ID": components["headers"]["X-Request-ID"];
19678
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
19679
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
19680
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
19681
+ "X-Error-Code": components["headers"]["X-Error-Code"];
19682
+ [name: string]: unknown;
19683
+ };
19684
+ content: {
19685
+ "application/json": components["schemas"]["InstanceChangedRefusal"];
19686
+ };
19687
+ };
18897
19688
  /** @description `request_too_large`: the request body is larger than this instance accepts. */
18898
19689
  413: {
18899
19690
  headers: {
@@ -19103,7 +19894,10 @@ interface operations {
19103
19894
  createKey: {
19104
19895
  parameters: {
19105
19896
  query?: never;
19106
- header?: never;
19897
+ header?: {
19898
+ /** @description The ID of the instance you expect, as `GET /` returns it. If another instance answers at this address, Marfa returns `409 instance_changed` and doesn't write. Leave it out to send the request to whichever instance answers. */
19899
+ "X-Marfa-Instance-Id"?: string;
19900
+ };
19107
19901
  path?: never;
19108
19902
  cookie?: never;
19109
19903
  };
@@ -19220,7 +20014,7 @@ interface operations {
19220
20014
  [name: string]: unknown;
19221
20015
  };
19222
20016
  content: {
19223
- "application/json": components["schemas"]["ConflictRefusal"];
20017
+ "application/json": components["schemas"]["ConflictRefusal"] | components["schemas"]["InstanceChangedRefusal"];
19224
20018
  };
19225
20019
  };
19226
20020
  /** @description `request_too_large`: the request body is larger than this instance accepts. */
@@ -19452,7 +20246,10 @@ interface operations {
19452
20246
  revokeKey: {
19453
20247
  parameters: {
19454
20248
  query?: never;
19455
- header?: never;
20249
+ header?: {
20250
+ /** @description The ID of the instance you expect, as `GET /` returns it. If another instance answers at this address, Marfa returns `409 instance_changed` and doesn't write. Leave it out to send the request to whichever instance answers. */
20251
+ "X-Marfa-Instance-Id"?: string;
20252
+ };
19456
20253
  path: {
19457
20254
  /** @description The ID of the key. */
19458
20255
  id: string;
@@ -19535,6 +20332,21 @@ interface operations {
19535
20332
  "application/json": components["schemas"]["ApiKeyNotFoundRefusal"];
19536
20333
  };
19537
20334
  };
20335
+ /** @description `instance_changed`: `X-Marfa-Instance-Id` names another instance. Nothing is written. Rebuild the working copy from the instance at this address. */
20336
+ 409: {
20337
+ headers: {
20338
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
20339
+ "X-Request-ID": components["headers"]["X-Request-ID"];
20340
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
20341
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
20342
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
20343
+ "X-Error-Code": components["headers"]["X-Error-Code"];
20344
+ [name: string]: unknown;
20345
+ };
20346
+ content: {
20347
+ "application/json": components["schemas"]["InstanceChangedRefusal"];
20348
+ };
20349
+ };
19538
20350
  /** @description `request_too_large`: the request body is larger than this instance accepts. */
19539
20351
  413: {
19540
20352
  headers: {
@@ -19613,7 +20425,10 @@ interface operations {
19613
20425
  updateKey: {
19614
20426
  parameters: {
19615
20427
  query?: never;
19616
- header?: never;
20428
+ header?: {
20429
+ /** @description The ID of the instance you expect, as `GET /` returns it. If another instance answers at this address, Marfa returns `409 instance_changed` and doesn't write. Leave it out to send the request to whichever instance answers. */
20430
+ "X-Marfa-Instance-Id"?: string;
20431
+ };
19617
20432
  path: {
19618
20433
  /** @description The ID of the key. */
19619
20434
  id: string;
@@ -19737,21 +20552,36 @@ interface operations {
19737
20552
  "application/json": components["schemas"]["ApiKeyNotFoundRefusal"];
19738
20553
  };
19739
20554
  };
19740
- /** @description `request_too_large`: the request body is larger than this instance accepts. */
19741
- 413: {
20555
+ /** @description `instance_changed`: `X-Marfa-Instance-Id` names another instance. Nothing is written. Rebuild the working copy from the instance at this address. */
20556
+ 409: {
19742
20557
  headers: {
19743
20558
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
19744
20559
  "X-Request-ID": components["headers"]["X-Request-ID"];
20560
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
20561
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
20562
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
19745
20563
  "X-Error-Code": components["headers"]["X-Error-Code"];
19746
20564
  [name: string]: unknown;
19747
20565
  };
19748
20566
  content: {
19749
- "application/json": components["schemas"]["RequestTooLargeRefusal"];
20567
+ "application/json": components["schemas"]["InstanceChangedRefusal"];
19750
20568
  };
19751
20569
  };
19752
- /** @description `rate_limited`: you sent too many requests. Wait for the number of seconds in `Retry-After`, then try again. */
19753
- 429: {
19754
- headers: {
20570
+ /** @description `request_too_large`: the request body is larger than this instance accepts. */
20571
+ 413: {
20572
+ headers: {
20573
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
20574
+ "X-Request-ID": components["headers"]["X-Request-ID"];
20575
+ "X-Error-Code": components["headers"]["X-Error-Code"];
20576
+ [name: string]: unknown;
20577
+ };
20578
+ content: {
20579
+ "application/json": components["schemas"]["RequestTooLargeRefusal"];
20580
+ };
20581
+ };
20582
+ /** @description `rate_limited`: you sent too many requests. Wait for the number of seconds in `Retry-After`, then try again. */
20583
+ 429: {
20584
+ headers: {
19755
20585
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
19756
20586
  "X-Request-ID": components["headers"]["X-Request-ID"];
19757
20587
  "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
@@ -19946,7 +20776,10 @@ interface operations {
19946
20776
  replaceConfig: {
19947
20777
  parameters: {
19948
20778
  query?: never;
19949
- header?: never;
20779
+ header?: {
20780
+ /** @description The ID of the instance you expect, as `GET /` returns it. If another instance answers at this address, Marfa returns `409 instance_changed` and doesn't write. Leave it out to send the request to whichever instance answers. */
20781
+ "X-Marfa-Instance-Id"?: string;
20782
+ };
19950
20783
  path?: never;
19951
20784
  cookie?: never;
19952
20785
  };
@@ -20037,6 +20870,21 @@ interface operations {
20037
20870
  "application/json": components["schemas"]["ForbiddenRefusal"];
20038
20871
  };
20039
20872
  };
20873
+ /** @description `instance_changed`: `X-Marfa-Instance-Id` names another instance. Nothing is written. Rebuild the working copy from the instance at this address. */
20874
+ 409: {
20875
+ headers: {
20876
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
20877
+ "X-Request-ID": components["headers"]["X-Request-ID"];
20878
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
20879
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
20880
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
20881
+ "X-Error-Code": components["headers"]["X-Error-Code"];
20882
+ [name: string]: unknown;
20883
+ };
20884
+ content: {
20885
+ "application/json": components["schemas"]["InstanceChangedRefusal"];
20886
+ };
20887
+ };
20040
20888
  /** @description `request_too_large`: the request body is larger than this instance accepts. */
20041
20889
  413: {
20042
20890
  headers: {
@@ -20115,7 +20963,10 @@ interface operations {
20115
20963
  restoreArchive: {
20116
20964
  parameters: {
20117
20965
  query?: never;
20118
- header?: never;
20966
+ header?: {
20967
+ /** @description The ID of the instance you expect, as `GET /` returns it. If another instance answers at this address, Marfa returns `409 instance_changed` and doesn't write. Leave it out to send the request to whichever instance answers. */
20968
+ "X-Marfa-Instance-Id"?: string;
20969
+ };
20119
20970
  path?: never;
20120
20971
  cookie?: never;
20121
20972
  };
@@ -20227,7 +21078,7 @@ interface operations {
20227
21078
  [name: string]: unknown;
20228
21079
  };
20229
21080
  content: {
20230
- "application/json": components["schemas"]["ConflictOrLinkTakenRefusal"];
21081
+ "application/json": components["schemas"]["ConflictOrLinkTakenRefusal"] | components["schemas"]["InstanceChangedRefusal"];
20231
21082
  };
20232
21083
  };
20233
21084
  /** @description - `request_too_large`: an item's properties, the properties of one of its earlier versions, or an edge's properties are larger than the bulk write endpoints accept. `details` names the row and the field. */
@@ -20439,7 +21290,10 @@ interface operations {
20439
21290
  deletePlatformType: {
20440
21291
  parameters: {
20441
21292
  query?: never;
20442
- header?: never;
21293
+ header?: {
21294
+ /** @description The ID of the instance you expect, as `GET /` returns it. If another instance answers at this address, Marfa returns `409 instance_changed` and doesn't write. Leave it out to send the request to whichever instance answers. */
21295
+ "X-Marfa-Instance-Id"?: string;
21296
+ };
20443
21297
  path: {
20444
21298
  /** @description The identifier of the stale type to delete. */
20445
21299
  id: string;
@@ -20541,7 +21395,7 @@ interface operations {
20541
21395
  [name: string]: unknown;
20542
21396
  };
20543
21397
  content: {
20544
- "application/json": components["schemas"]["ConflictRefusal"];
21398
+ "application/json": components["schemas"]["ConflictRefusal"] | components["schemas"]["InstanceChangedRefusal"];
20545
21399
  };
20546
21400
  };
20547
21401
  /** @description `request_too_large`: the request body is larger than this instance accepts. */
@@ -20768,7 +21622,10 @@ interface operations {
20768
21622
  createOwner: {
20769
21623
  parameters: {
20770
21624
  query?: never;
20771
- header?: never;
21625
+ header?: {
21626
+ /** @description The ID of the instance you expect, as `GET /` returns it. If another instance answers at this address, Marfa returns `409 instance_changed` and doesn't write. Leave it out to send the request to whichever instance answers. */
21627
+ "X-Marfa-Instance-Id"?: string;
21628
+ };
20772
21629
  path?: never;
20773
21630
  cookie?: never;
20774
21631
  };
@@ -20801,7 +21658,7 @@ interface operations {
20801
21658
  "application/json": components["schemas"]["Owner"];
20802
21659
  };
20803
21660
  };
20804
- /** @description Owner details are invalid. */
21661
+ /** @description Owner details are invalid, or the body has a field this endpoint doesn't take. */
20805
21662
  400: {
20806
21663
  headers: {
20807
21664
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
@@ -20846,7 +21703,7 @@ interface operations {
20846
21703
  [name: string]: unknown;
20847
21704
  };
20848
21705
  content: {
20849
- "application/json": components["schemas"]["OwnerExistsRefusal"];
21706
+ "application/json": components["schemas"]["OwnerExistsRefusal"] | components["schemas"]["InstanceChangedRefusal"];
20850
21707
  };
20851
21708
  };
20852
21709
  /** @description `request_too_large`: the request body is larger than this instance accepts. */
@@ -21025,7 +21882,10 @@ interface operations {
21025
21882
  /** @description For an app, also revoke every key it minted, as its `minted_by` rows show. Only an app takes it. */
21026
21883
  revoke_keys?: "true" | "false";
21027
21884
  };
21028
- header?: never;
21885
+ header?: {
21886
+ /** @description The ID of the instance you expect, as `GET /` returns it. If another instance answers at this address, Marfa returns `409 instance_changed` and doesn't write. Leave it out to send the request to whichever instance answers. */
21887
+ "X-Marfa-Instance-Id"?: string;
21888
+ };
21029
21889
  path: {
21030
21890
  /** @description The ID of the sign-in. */
21031
21891
  id: string;
@@ -21108,6 +21968,21 @@ interface operations {
21108
21968
  "application/json": components["schemas"]["SignInNotFoundRefusal"];
21109
21969
  };
21110
21970
  };
21971
+ /** @description `instance_changed`: `X-Marfa-Instance-Id` names another instance. Nothing is written. Rebuild the working copy from the instance at this address. */
21972
+ 409: {
21973
+ headers: {
21974
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
21975
+ "X-Request-ID": components["headers"]["X-Request-ID"];
21976
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
21977
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
21978
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
21979
+ "X-Error-Code": components["headers"]["X-Error-Code"];
21980
+ [name: string]: unknown;
21981
+ };
21982
+ content: {
21983
+ "application/json": components["schemas"]["InstanceChangedRefusal"];
21984
+ };
21985
+ };
21111
21986
  /** @description `request_too_large`: the request body is larger than this instance accepts. */
21112
21987
  413: {
21113
21988
  headers: {
@@ -21186,7 +22061,10 @@ interface operations {
21186
22061
  updateSignIn: {
21187
22062
  parameters: {
21188
22063
  query?: never;
21189
- header?: never;
22064
+ header?: {
22065
+ /** @description The ID of the instance you expect, as `GET /` returns it. If another instance answers at this address, Marfa returns `409 instance_changed` and doesn't write. Leave it out to send the request to whichever instance answers. */
22066
+ "X-Marfa-Instance-Id"?: string;
22067
+ };
21190
22068
  path: {
21191
22069
  /** @description The ID of the sign-in. */
21192
22070
  id: string;
@@ -21282,6 +22160,21 @@ interface operations {
21282
22160
  "application/json": components["schemas"]["SignInNotFoundRefusal"];
21283
22161
  };
21284
22162
  };
22163
+ /** @description `instance_changed`: `X-Marfa-Instance-Id` names another instance. Nothing is written. Rebuild the working copy from the instance at this address. */
22164
+ 409: {
22165
+ headers: {
22166
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
22167
+ "X-Request-ID": components["headers"]["X-Request-ID"];
22168
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
22169
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
22170
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
22171
+ "X-Error-Code": components["headers"]["X-Error-Code"];
22172
+ [name: string]: unknown;
22173
+ };
22174
+ content: {
22175
+ "application/json": components["schemas"]["InstanceChangedRefusal"];
22176
+ };
22177
+ };
21285
22178
  /** @description `request_too_large`: the request body is larger than this instance accepts. */
21286
22179
  413: {
21287
22180
  headers: {
@@ -21505,17 +22398,21 @@ interface operations {
21505
22398
  };
21506
22399
  };
21507
22400
  };
21508
- listWebhooks: {
22401
+ registerOAuthClient: {
21509
22402
  parameters: {
21510
22403
  query?: never;
21511
22404
  header?: never;
21512
22405
  path?: never;
21513
22406
  cookie?: never;
21514
22407
  };
21515
- requestBody?: never;
22408
+ requestBody: {
22409
+ content: {
22410
+ "application/json": components["schemas"]["OAuthClientRegistration"];
22411
+ };
22412
+ };
21516
22413
  responses: {
21517
- /** @description Returns your webhooks. */
21518
- 200: {
22414
+ /** @description Returns the registered client, with its `client_id` and, unless it's a public client, its `client_secret`. */
22415
+ 201: {
21519
22416
  headers: {
21520
22417
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
21521
22418
  "X-Request-ID": components["headers"]["X-Request-ID"];
@@ -21525,10 +22422,87 @@ interface operations {
21525
22422
  [name: string]: unknown;
21526
22423
  };
21527
22424
  content: {
21528
- "application/json": components["schemas"]["WebhookPage"];
22425
+ "application/json": {
22426
+ /** @description The redirect URIs, as registered. */
22427
+ redirect_uris?: string[];
22428
+ /** @description Space-separated scopes the client is registered for: the ones you named, or every scope the instance allows, without `offline_access` for a client that can't use a refresh token. */
22429
+ scope?: string;
22430
+ /** @description The app's name, as registered. */
22431
+ client_name?: string;
22432
+ /** @description The app's home page URL, as registered. Absent if none was sent. */
22433
+ client_uri?: string;
22434
+ /** @description Icon URL for the application */
22435
+ logo_uri?: string;
22436
+ /** @description List representing ways to contact people responsible for this client, typically email addresses */
22437
+ contacts?: string[];
22438
+ /** @description Client's terms of service uri */
22439
+ tos_uri?: string;
22440
+ /** @description Client's policy uri */
22441
+ policy_uri?: string;
22442
+ /** @description Unique identifier assigned by the developer to help in the dynamic registration process */
22443
+ software_id?: string;
22444
+ /** @description Version identifier for the software_id */
22445
+ software_version?: string;
22446
+ /** @description JWT containing metadata values about the client software as claims */
22447
+ software_statement?: string;
22448
+ /** @description List of allowed logout redirect uris */
22449
+ post_logout_redirect_uris?: string[];
22450
+ /**
22451
+ * @description How the client proves itself at the token endpoint.
22452
+ * @enum {string}
22453
+ */
22454
+ token_endpoint_auth_method?: "none" | "client_secret_basic" | "client_secret_post";
22455
+ /** @description The client's public JSON Web Key Set, as registered. */
22456
+ jwks?: {
22457
+ /** @description The client's public JSON Web Keys, including any extension members. */
22458
+ keys: {
22459
+ [key: string]: unknown;
22460
+ }[];
22461
+ };
22462
+ /** @description The URL of the client's public JSON Web Key Set, as registered. */
22463
+ jwks_uri?: string;
22464
+ /** @description The grants, as registered. */
22465
+ grant_types?: string[];
22466
+ /** @description The response types, as registered. */
22467
+ response_types?: "code"[];
22468
+ /**
22469
+ * @description `web` or `native`.
22470
+ * @enum {string}
22471
+ */
22472
+ application_type?: "web" | "native";
22473
+ /**
22474
+ * @description `public` for public subject identifiers.
22475
+ * @enum {string}
22476
+ */
22477
+ subject_type?: "public";
22478
+ /** @description `true` if the client always uses DPoP for its token requests. */
22479
+ dpop_bound_access_tokens?: boolean;
22480
+ /** @description Final resource identifiers linked to the registered client */
22481
+ resources?: string[];
22482
+ /** @description Unique identifier for the client. */
22483
+ client_id: string;
22484
+ /** @description The secret the client proves itself with at the token endpoint. Absent for a public client. */
22485
+ client_secret?: string;
22486
+ /** @description When the secret expires, in seconds since the Unix epoch, or `0` if it doesn't. */
22487
+ client_secret_expires_at?: number;
22488
+ /** @description The ID of the user who registered the client. Absent for anonymous registration. */
22489
+ user_id?: string;
22490
+ /** @description When the client was registered, in seconds since the Unix epoch. */
22491
+ client_id_issued_at?: number;
22492
+ /** @description `true` if the client is disabled. */
22493
+ disabled?: boolean;
22494
+ };
21529
22495
  };
21530
22496
  };
21531
- /** @description - `validation_error`: the query has a parameter this endpoint doesn't take. */
22497
+ /**
22498
+ * @description - `invalid_client_metadata`: client metadata is invalid.
22499
+ * - `invalid_redirect_uri`: a redirect URI is invalid, or there are more than 10.
22500
+ * - `invalid_scope`: a scope is not allowed.
22501
+ * - `invalid_target`: a resource is invalid.
22502
+ * - `invalid_software_statement`: a software statement is invalid.
22503
+ *
22504
+ * These errors use RFC 7591. An unknown query parameter gets Marfa's `validation_error` instead.
22505
+ */
21532
22506
  400: {
21533
22507
  headers: {
21534
22508
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
@@ -21540,10 +22514,21 @@ interface operations {
21540
22514
  [name: string]: unknown;
21541
22515
  };
21542
22516
  content: {
21543
- "application/json": components["schemas"]["ValidationErrorRefusal"];
22517
+ "application/json": components["schemas"]["ValidationErrorRefusal"] | {
22518
+ /**
22519
+ * @description The OAuth error code.
22520
+ * @enum {string}
22521
+ */
22522
+ error: "invalid_client_metadata" | "invalid_redirect_uri" | "invalid_scope" | "invalid_target" | "invalid_software_statement";
22523
+ /** @description A description of the error for a person to read. */
22524
+ error_description?: string;
22525
+ };
21544
22526
  };
21545
22527
  };
21546
- /** @description `unauthorized`: the request has no credential, or its credential is not valid. */
22528
+ /**
22529
+ * @description An error in the shape RFC 6750 defines:
22530
+ * - `invalid_token`: the request sends a bearer token, such as an API key. Register with no credential.
22531
+ */
21547
22532
  401: {
21548
22533
  headers: {
21549
22534
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
@@ -21551,46 +22536,59 @@ interface operations {
21551
22536
  "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
21552
22537
  "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
21553
22538
  "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
21554
- "X-Error-Code": components["headers"]["X-Error-Code"];
21555
22539
  [name: string]: unknown;
21556
22540
  };
21557
22541
  content: {
21558
- "application/json": components["schemas"]["UnauthorizedRefusal"];
22542
+ "application/json": {
22543
+ /**
22544
+ * @description The OAuth error code.
22545
+ * @enum {string}
22546
+ */
22547
+ error: "invalid_token";
22548
+ /** @description A description of the error for a person to read. */
22549
+ error_description?: string;
22550
+ };
21559
22551
  };
21560
22552
  };
21561
- /** @description - `forbidden`: you don't have `webhooks.manage`. */
21562
- 403: {
22553
+ /** @description `request_too_large`: the request body is larger than this instance accepts. */
22554
+ 413: {
21563
22555
  headers: {
21564
22556
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
21565
22557
  "X-Request-ID": components["headers"]["X-Request-ID"];
21566
- "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
21567
- "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
21568
- "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
21569
22558
  "X-Error-Code": components["headers"]["X-Error-Code"];
21570
22559
  [name: string]: unknown;
21571
22560
  };
21572
22561
  content: {
21573
- "application/json": components["schemas"]["ForbiddenRefusal"];
22562
+ "application/json": components["schemas"]["RequestTooLargeRefusal"];
21574
22563
  };
21575
22564
  };
21576
- /** @description `rate_limited`: you sent too many requests. Wait for the number of seconds in `Retry-After`, then try again. */
21577
- 429: {
22565
+ /**
22566
+ * @description An error with `message` and `code`, rather than Marfa's own shape:
22567
+ * - `UNSUPPORTED_MEDIA_TYPE`: the request doesn't send its body as `application/json`.
22568
+ */
22569
+ 415: {
21578
22570
  headers: {
21579
22571
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
21580
22572
  "X-Request-ID": components["headers"]["X-Request-ID"];
21581
22573
  "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
21582
22574
  "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
21583
22575
  "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
21584
- "X-Error-Code": components["headers"]["X-Error-Code"];
21585
- "Retry-After": components["headers"]["Retry-After"];
21586
22576
  [name: string]: unknown;
21587
22577
  };
21588
22578
  content: {
21589
- "application/json": components["schemas"]["RateLimitedRefusal"];
22579
+ "application/json": {
22580
+ /**
22581
+ * @description A machine-readable code for the error. Use it in your logic.
22582
+ * @enum {string}
22583
+ */
22584
+ code: "UNSUPPORTED_MEDIA_TYPE";
22585
+ /** @description A description of the error for a person to read. It can change, so don't match on it. */
22586
+ message: string;
22587
+ };
21590
22588
  };
21591
22589
  };
21592
- /** @description `internal_error`: Marfa failed in a way it didn't expect, and the request may not have completed. Read what you changed before you repeat a write. */
21593
- 500: {
22590
+ /** @description `rate_limited`: you sent too many requests. Wait for the number of seconds in `Retry-After`, then try again. */
22591
+ 429: {
21594
22592
  headers: {
21595
22593
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
21596
22594
  "X-Request-ID": components["headers"]["X-Request-ID"];
@@ -21598,10 +22596,11 @@ interface operations {
21598
22596
  "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
21599
22597
  "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
21600
22598
  "X-Error-Code": components["headers"]["X-Error-Code"];
22599
+ "Retry-After": components["headers"]["Retry-After"];
21601
22600
  [name: string]: unknown;
21602
22601
  };
21603
22602
  content: {
21604
- "application/json": components["schemas"]["InternalErrorRefusal"];
22603
+ "application/json": components["schemas"]["RateLimitedRefusal"];
21605
22604
  };
21606
22605
  };
21607
22606
  /** @description `write_contention`: the database was busy, and Marfa couldn't complete the request in time. Nothing changed. Try the request again. */
@@ -21619,47 +22618,37 @@ interface operations {
21619
22618
  "application/json": components["schemas"]["WriteContentionRefusal"];
21620
22619
  };
21621
22620
  };
21622
- /** @description `insufficient_storage`: the disk that holds the instance's data has no room for the request, or the request would leave less free than the instance keeps in reserve. Nothing changed, unless `details.write_outcome` is `unknown`, which means the write may have landed: read what you changed before you repeat it. Free space on the disk, then try the request again. */
21623
- 507: {
21624
- headers: {
21625
- "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
21626
- "X-Request-ID": components["headers"]["X-Request-ID"];
21627
- "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
21628
- "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
21629
- "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
21630
- "X-Error-Code": components["headers"]["X-Error-Code"];
21631
- [name: string]: unknown;
21632
- };
21633
- content: {
21634
- "application/json": components["schemas"]["InsufficientStorageRefusal"];
21635
- };
21636
- };
21637
22621
  };
21638
22622
  };
21639
- createWebhook: {
22623
+ streamEvents: {
21640
22624
  parameters: {
21641
- query?: never;
21642
- header?: never;
22625
+ query?: {
22626
+ /** @description Set to `1` for a copy stream, which a working copy follows. It takes `edges=all` and no other parameter. Its `stream_cursor` and `stream_live` carry `instance_id` and `read_view`, and its item frames carry `listed`. */
22627
+ copy?: "1";
22628
+ /** @description Only send item events for these types and their subtypes: a comma-separated list of up to 10, such as `core.note,app.*`. A pattern matches the types you can read. Edge events aren't filtered. Leave it out for every type. */
22629
+ type?: string;
22630
+ /** @description Set to `none` to leave out edge events. You receive an edge event only if you could read the edge with `GET /edges/{id}`. */
22631
+ edges?: "all" | "none";
22632
+ };
22633
+ header?: {
22634
+ /** @description On a copy stream, the `read_view` from the last `stream_cursor` or `stream_live` you received. Send it with `Last-Event-ID` to resume, and leave both out to start a new copy. */
22635
+ "X-Marfa-Read-View"?: string;
22636
+ /** @description The ID of the last event you received. Marfa replays every event after it that the log still holds, then goes live. Send it as the stream wrote it. Empty means none, except on a copy stream. */
22637
+ "Last-Event-ID"?: string;
22638
+ };
21643
22639
  path?: never;
21644
22640
  cookie?: never;
21645
22641
  };
21646
- requestBody: {
21647
- content: {
21648
- "application/json": {
21649
- /** @description The URL Marfa posts events to: `http` or `https`, with no user name or password. Unless the instance allows private addresses, it must reach a public address, which Marfa checks again at each delivery. */
21650
- url: string;
21651
- /** @description The events to send. Name each one: there's no wildcard. */
21652
- events: ("item.created" | "item.updated" | "item.deleted" | "item.restored" | "item.purged" | "item.state_changed" | "metadata.changed" | "edge.created" | "edge.updated" | "edge.deleted")[];
21653
- /** @description Send item events only for this type and its subtypes, such as `core.media`, or for every type a pattern such as `app.*` matches. The type needn't be registered. Edge events aren't filtered. Leave it out, blank or `null` for every type. */
21654
- type_filter?: string | null;
21655
- /** @description The key Marfa signs each delivery with. Leave it out for Marfa to generate one. */
21656
- secret?: string;
21657
- };
21658
- };
21659
- };
22642
+ requestBody?: never;
21660
22643
  responses: {
21661
- /** @description Returns the new webhook with its whole `secret`, which no other response shows. Use it to check each delivery's `X-Marfa-Signature`. */
21662
- 201: {
22644
+ /**
22645
+ * @description Returns the stream. Each frame's `event:` names it:
22646
+ * - `stream_cursor`: first, where the log stands.
22647
+ * - An event, such as `item.created`, with its event ID as `id:`.
22648
+ * - `stream_live`: once the catch-up is over.
22649
+ * - `stream_incomplete`, `catchup_too_old`, `cursor_ahead` or `read_view_changed`: last, before the stream closes.
22650
+ */
22651
+ 200: {
21663
22652
  headers: {
21664
22653
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
21665
22654
  "X-Request-ID": components["headers"]["X-Request-ID"];
@@ -21669,12 +22658,25 @@ interface operations {
21669
22658
  [name: string]: unknown;
21670
22659
  };
21671
22660
  content: {
21672
- "application/json": components["schemas"]["Webhook"];
22661
+ /**
22662
+ * @example : connected
22663
+ *
22664
+ * event: stream_cursor
22665
+ * data: {"event_type":"stream_cursor","cursor":"1041"}
22666
+ *
22667
+ * event: stream_live
22668
+ * data: {"event_type":"stream_live","cursor":"1041"}
22669
+ *
22670
+ * id: 1042
22671
+ * event: item.created
22672
+ * data: {"event_type":"item.created","item":{"id":"0199a9c4-7c1e-7d3a-9f2b-3c4d5e6f7a8b","type":"core.note","properties":{"title":"Reading list","body":"Finish the chapter on tides."},"state":"active","tier":"library","version":1,"schema_version":0,"source":"notes-app","occurred_at":"2026-10-03T09:30:00.000Z","created_at":"2026-10-03T09:30:00.000Z","updated_at":"2026-10-03T09:30:00.000Z"},"metadata":{"item_id":"0199a9c4-7c1e-7d3a-9f2b-3c4d5e6f7a8b","tags":[],"extensions":{}}}
22673
+ */
22674
+ "text/event-stream": components["schemas"]["EventStreamFrame"];
21673
22675
  };
21674
22676
  };
21675
22677
  /**
21676
- * @description - `validation_error`: a field is invalid. For example, `url` isn't `http` or `https`, carries a user name or password, or names an IP address that isn't public; `events` is empty or names an unknown event or `*`; `secret` is too short; or `type_filter` is `*`, malformed or a list.
21677
- * - `missing_required_field`: `url` or `events` is missing.
22678
+ * @description - `validation_error`: a parameter or header is invalid, or not one this endpoint takes. For example, `type` has more than 10 entries or is `*`, or `Last-Event-ID` isn't an event ID. A copy stream takes only `copy=1` and `edges=all`, and both resume headers or neither; another stream takes no `X-Marfa-Read-View`.
22679
+ * - `unknown_type`: a `type` entry isn't registered.
21678
22680
  */
21679
22681
  400: {
21680
22682
  headers: {
@@ -21687,7 +22689,7 @@ interface operations {
21687
22689
  [name: string]: unknown;
21688
22690
  };
21689
22691
  content: {
21690
- "application/json": components["schemas"]["MissingRequiredFieldOrValidationErrorRefusal"];
22692
+ "application/json": components["schemas"]["UnknownTypeOrValidationErrorRefusal"];
21691
22693
  };
21692
22694
  };
21693
22695
  /** @description `unauthorized`: the request has no credential, or its credential is not valid. */
@@ -21705,7 +22707,7 @@ interface operations {
21705
22707
  "application/json": components["schemas"]["UnauthorizedRefusal"];
21706
22708
  };
21707
22709
  };
21708
- /** @description - `forbidden`: you don't have `webhooks.manage`. */
22710
+ /** @description - `type_not_permitted`: you can't read any type, or a `type` entry names a type you can't read, with no subtype you can. */
21709
22711
  403: {
21710
22712
  headers: {
21711
22713
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
@@ -21717,19 +22719,22 @@ interface operations {
21717
22719
  [name: string]: unknown;
21718
22720
  };
21719
22721
  content: {
21720
- "application/json": components["schemas"]["ForbiddenRefusal"];
22722
+ "application/json": components["schemas"]["TypeNotPermittedRefusal"];
21721
22723
  };
21722
22724
  };
21723
- /** @description `request_too_large`: the request body is larger than this instance accepts. */
21724
- 413: {
22725
+ /** @description `read_view_changed`: the read view in `X-Marfa-Read-View` has changed. Rebuild the working copy. */
22726
+ 409: {
21725
22727
  headers: {
21726
22728
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
21727
22729
  "X-Request-ID": components["headers"]["X-Request-ID"];
22730
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
22731
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
22732
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
21728
22733
  "X-Error-Code": components["headers"]["X-Error-Code"];
21729
22734
  [name: string]: unknown;
21730
22735
  };
21731
22736
  content: {
21732
- "application/json": components["schemas"]["RequestTooLargeRefusal"];
22737
+ "application/json": components["schemas"]["ReadViewChangedRefusal"];
21733
22738
  };
21734
22739
  };
21735
22740
  /** @description `rate_limited`: you sent too many requests. Wait for the number of seconds in `Retry-After`, then try again. */
@@ -21763,7 +22768,10 @@ interface operations {
21763
22768
  "application/json": components["schemas"]["InternalErrorRefusal"];
21764
22769
  };
21765
22770
  };
21766
- /** @description `write_contention`: the database was busy, and Marfa couldn't complete the request in time. Nothing changed. Try the request again. */
22771
+ /**
22772
+ * @description - `stream_capacity_exhausted`: the instance is serving as many streams as its operator allows. Try again later.
22773
+ * - `write_contention`: the database was busy, and Marfa couldn't complete the request in time. Nothing changed. Try the request again.
22774
+ */
21767
22775
  503: {
21768
22776
  headers: {
21769
22777
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
@@ -21775,7 +22783,7 @@ interface operations {
21775
22783
  [name: string]: unknown;
21776
22784
  };
21777
22785
  content: {
21778
- "application/json": components["schemas"]["WriteContentionRefusal"];
22786
+ "application/json": components["schemas"]["StreamCapacityExhaustedOrWriteContentionRefusal"];
21779
22787
  };
21780
22788
  };
21781
22789
  /** @description `insufficient_storage`: the disk that holds the instance's data has no room for the request, or the request would leave less free than the instance keeps in reserve. Nothing changed, unless `details.write_outcome` is `unknown`, which means the write may have landed: read what you changed before you repeat it. Free space on the disk, then try the request again. */
@@ -21795,19 +22803,16 @@ interface operations {
21795
22803
  };
21796
22804
  };
21797
22805
  };
21798
- getWebhook: {
22806
+ listWebhooks: {
21799
22807
  parameters: {
21800
22808
  query?: never;
21801
22809
  header?: never;
21802
- path: {
21803
- /** @description The ID of the webhook. */
21804
- id: string;
21805
- };
22810
+ path?: never;
21806
22811
  cookie?: never;
21807
22812
  };
21808
22813
  requestBody?: never;
21809
22814
  responses: {
21810
- /** @description Returns the webhook. */
22815
+ /** @description Returns your webhooks. */
21811
22816
  200: {
21812
22817
  headers: {
21813
22818
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
@@ -21818,7 +22823,7 @@ interface operations {
21818
22823
  [name: string]: unknown;
21819
22824
  };
21820
22825
  content: {
21821
- "application/json": components["schemas"]["Webhook"];
22826
+ "application/json": components["schemas"]["WebhookPage"];
21822
22827
  };
21823
22828
  };
21824
22829
  /** @description - `validation_error`: the query has a parameter this endpoint doesn't take. */
@@ -21866,21 +22871,6 @@ interface operations {
21866
22871
  "application/json": components["schemas"]["ForbiddenRefusal"];
21867
22872
  };
21868
22873
  };
21869
- /** @description - `webhook_not_found`: no webhook of yours has this ID. */
21870
- 404: {
21871
- headers: {
21872
- "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
21873
- "X-Request-ID": components["headers"]["X-Request-ID"];
21874
- "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
21875
- "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
21876
- "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
21877
- "X-Error-Code": components["headers"]["X-Error-Code"];
21878
- [name: string]: unknown;
21879
- };
21880
- content: {
21881
- "application/json": components["schemas"]["WebhookNotFoundRefusal"];
21882
- };
21883
- };
21884
22874
  /** @description `rate_limited`: you sent too many requests. Wait for the number of seconds in `Retry-After`, then try again. */
21885
22875
  429: {
21886
22876
  headers: {
@@ -21944,20 +22934,33 @@ interface operations {
21944
22934
  };
21945
22935
  };
21946
22936
  };
21947
- deleteWebhook: {
22937
+ createWebhook: {
21948
22938
  parameters: {
21949
22939
  query?: never;
21950
- header?: never;
21951
- path: {
21952
- /** @description The ID of the webhook. */
21953
- id: string;
22940
+ header?: {
22941
+ /** @description The ID of the instance you expect, as `GET /` returns it. If another instance answers at this address, Marfa returns `409 instance_changed` and doesn't write. Leave it out to send the request to whichever instance answers. */
22942
+ "X-Marfa-Instance-Id"?: string;
21954
22943
  };
22944
+ path?: never;
21955
22945
  cookie?: never;
21956
22946
  };
21957
- requestBody?: never;
22947
+ requestBody: {
22948
+ content: {
22949
+ "application/json": {
22950
+ /** @description The URL Marfa posts events to: `http` or `https`, with no user name or password. Unless the instance allows private addresses, it must reach a public address, which Marfa checks again at each delivery. */
22951
+ url: string;
22952
+ /** @description The events to send. Name each one: there's no wildcard. */
22953
+ events: ("item.created" | "item.updated" | "item.deleted" | "item.restored" | "item.purged" | "item.state_changed" | "metadata.changed" | "edge.created" | "edge.updated" | "edge.deleted")[];
22954
+ /** @description Send item events only for this type and its subtypes, such as `core.media`, or for every type a pattern such as `app.*` matches. The type needn't be registered. Edge events aren't filtered. Leave it out, blank or `null` for every type. */
22955
+ type_filter?: string | null;
22956
+ /** @description The key Marfa signs each delivery with. Leave it out for Marfa to generate one. */
22957
+ secret?: string;
22958
+ };
22959
+ };
22960
+ };
21958
22961
  responses: {
21959
- /** @description Returns `ok: true`. */
21960
- 200: {
22962
+ /** @description Returns the new webhook with its whole `secret`, which no other response shows. Use it to check each delivery's `X-Marfa-Signature`. */
22963
+ 201: {
21961
22964
  headers: {
21962
22965
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
21963
22966
  "X-Request-ID": components["headers"]["X-Request-ID"];
@@ -21967,10 +22970,13 @@ interface operations {
21967
22970
  [name: string]: unknown;
21968
22971
  };
21969
22972
  content: {
21970
- "application/json": components["schemas"]["Ok"];
22973
+ "application/json": components["schemas"]["Webhook"];
21971
22974
  };
21972
22975
  };
21973
- /** @description - `validation_error`: the query has a parameter this endpoint doesn't take. */
22976
+ /**
22977
+ * @description - `validation_error`: a field is invalid. For example, `url` isn't `http` or `https`, carries a user name or password, or names an IP address that isn't public; `events` is empty or names an unknown event or `*`; `secret` is too short; or `type_filter` is `*`, malformed or a list; or the body has a field this endpoint doesn't take.
22978
+ * - `missing_required_field`: `url` or `events` is missing.
22979
+ */
21974
22980
  400: {
21975
22981
  headers: {
21976
22982
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
@@ -21982,7 +22988,7 @@ interface operations {
21982
22988
  [name: string]: unknown;
21983
22989
  };
21984
22990
  content: {
21985
- "application/json": components["schemas"]["ValidationErrorRefusal"];
22991
+ "application/json": components["schemas"]["MissingRequiredFieldOrValidationErrorRefusal"];
21986
22992
  };
21987
22993
  };
21988
22994
  /** @description `unauthorized`: the request has no credential, or its credential is not valid. */
@@ -22015,8 +23021,8 @@ interface operations {
22015
23021
  "application/json": components["schemas"]["ForbiddenRefusal"];
22016
23022
  };
22017
23023
  };
22018
- /** @description - `webhook_not_found`: no webhook of yours has this ID. */
22019
- 404: {
23024
+ /** @description `instance_changed`: `X-Marfa-Instance-Id` names another instance. Nothing is written. Rebuild the working copy from the instance at this address. */
23025
+ 409: {
22020
23026
  headers: {
22021
23027
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
22022
23028
  "X-Request-ID": components["headers"]["X-Request-ID"];
@@ -22027,7 +23033,7 @@ interface operations {
22027
23033
  [name: string]: unknown;
22028
23034
  };
22029
23035
  content: {
22030
- "application/json": components["schemas"]["WebhookNotFoundRefusal"];
23036
+ "application/json": components["schemas"]["InstanceChangedRefusal"];
22031
23037
  };
22032
23038
  };
22033
23039
  /** @description `request_too_large`: the request body is larger than this instance accepts. */
@@ -22105,7 +23111,7 @@ interface operations {
22105
23111
  };
22106
23112
  };
22107
23113
  };
22108
- updateWebhook: {
23114
+ getWebhook: {
22109
23115
  parameters: {
22110
23116
  query?: never;
22111
23117
  header?: never;
@@ -22115,22 +23121,9 @@ interface operations {
22115
23121
  };
22116
23122
  cookie?: never;
22117
23123
  };
22118
- requestBody: {
22119
- content: {
22120
- "application/json": {
22121
- /** @description The URL Marfa posts events to: `http` or `https`, with no user name or password. Unless the instance allows private addresses, it must reach a public address, which Marfa checks again at each delivery. */
22122
- url?: string;
22123
- /** @description The events to send. Name each one: there's no wildcard. */
22124
- events?: ("item.created" | "item.updated" | "item.deleted" | "item.restored" | "item.purged" | "item.state_changed" | "metadata.changed" | "edge.created" | "edge.updated" | "edge.deleted")[];
22125
- /** @description Send item events only for this type and its subtypes, such as `core.media`, or for every type a pattern such as `app.*` matches. The type needn't be registered. Edge events aren't filtered. Blank or `null` removes it. */
22126
- type_filter?: string | null;
22127
- /** @description `false` stops sending events and cancels pending deliveries. `true` starts again. */
22128
- active?: boolean;
22129
- };
22130
- };
22131
- };
23124
+ requestBody?: never;
22132
23125
  responses: {
22133
- /** @description Returns the updated webhook. */
23126
+ /** @description Returns the webhook. */
22134
23127
  200: {
22135
23128
  headers: {
22136
23129
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
@@ -22144,7 +23137,7 @@ interface operations {
22144
23137
  "application/json": components["schemas"]["Webhook"];
22145
23138
  };
22146
23139
  };
22147
- /** @description - `validation_error`: a field is invalid. For example, `url` isn't `http` or `https`, carries a user name or password, or names an IP address that isn't public; `events` is empty or names an unknown event or `*`; or `type_filter` is `*`, malformed or a list. */
23140
+ /** @description - `validation_error`: the query has a parameter this endpoint doesn't take. */
22148
23141
  400: {
22149
23142
  headers: {
22150
23143
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
@@ -22204,18 +23197,6 @@ interface operations {
22204
23197
  "application/json": components["schemas"]["WebhookNotFoundRefusal"];
22205
23198
  };
22206
23199
  };
22207
- /** @description `request_too_large`: the request body is larger than this instance accepts. */
22208
- 413: {
22209
- headers: {
22210
- "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
22211
- "X-Request-ID": components["headers"]["X-Request-ID"];
22212
- "X-Error-Code": components["headers"]["X-Error-Code"];
22213
- [name: string]: unknown;
22214
- };
22215
- content: {
22216
- "application/json": components["schemas"]["RequestTooLargeRefusal"];
22217
- };
22218
- };
22219
23200
  /** @description `rate_limited`: you sent too many requests. Wait for the number of seconds in `Retry-After`, then try again. */
22220
23201
  429: {
22221
23202
  headers: {
@@ -22279,15 +23260,13 @@ interface operations {
22279
23260
  };
22280
23261
  };
22281
23262
  };
22282
- listWebhookDeliveries: {
23263
+ deleteWebhook: {
22283
23264
  parameters: {
22284
- query?: {
22285
- /** @description The maximum number of results to return. */
22286
- limit?: number;
22287
- /** @description The `next_cursor` from the previous page. Leave it out to get the first page. */
22288
- cursor?: string;
23265
+ query?: never;
23266
+ header?: {
23267
+ /** @description The ID of the instance you expect, as `GET /` returns it. If another instance answers at this address, Marfa returns `409 instance_changed` and doesn't write. Leave it out to send the request to whichever instance answers. */
23268
+ "X-Marfa-Instance-Id"?: string;
22289
23269
  };
22290
- header?: never;
22291
23270
  path: {
22292
23271
  /** @description The ID of the webhook. */
22293
23272
  id: string;
@@ -22296,7 +23275,7 @@ interface operations {
22296
23275
  };
22297
23276
  requestBody?: never;
22298
23277
  responses: {
22299
- /** @description Returns a page of deliveries. */
23278
+ /** @description Returns `ok: true`. */
22300
23279
  200: {
22301
23280
  headers: {
22302
23281
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
@@ -22307,7 +23286,7 @@ interface operations {
22307
23286
  [name: string]: unknown;
22308
23287
  };
22309
23288
  content: {
22310
- "application/json": components["schemas"]["WebhookDeliveryPage"];
23289
+ "application/json": components["schemas"]["Ok"];
22311
23290
  };
22312
23291
  };
22313
23292
  /** @description - `validation_error`: the query has a parameter this endpoint doesn't take. */
@@ -22370,6 +23349,33 @@ interface operations {
22370
23349
  "application/json": components["schemas"]["WebhookNotFoundRefusal"];
22371
23350
  };
22372
23351
  };
23352
+ /** @description `instance_changed`: `X-Marfa-Instance-Id` names another instance. Nothing is written. Rebuild the working copy from the instance at this address. */
23353
+ 409: {
23354
+ headers: {
23355
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
23356
+ "X-Request-ID": components["headers"]["X-Request-ID"];
23357
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
23358
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
23359
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
23360
+ "X-Error-Code": components["headers"]["X-Error-Code"];
23361
+ [name: string]: unknown;
23362
+ };
23363
+ content: {
23364
+ "application/json": components["schemas"]["InstanceChangedRefusal"];
23365
+ };
23366
+ };
23367
+ /** @description `request_too_large`: the request body is larger than this instance accepts. */
23368
+ 413: {
23369
+ headers: {
23370
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
23371
+ "X-Request-ID": components["headers"]["X-Request-ID"];
23372
+ "X-Error-Code": components["headers"]["X-Error-Code"];
23373
+ [name: string]: unknown;
23374
+ };
23375
+ content: {
23376
+ "application/json": components["schemas"]["RequestTooLargeRefusal"];
23377
+ };
23378
+ };
22373
23379
  /** @description `rate_limited`: you sent too many requests. Wait for the number of seconds in `Retry-After`, then try again. */
22374
23380
  429: {
22375
23381
  headers: {
@@ -22433,22 +23439,36 @@ interface operations {
22433
23439
  };
22434
23440
  };
22435
23441
  };
22436
- redeliverWebhookDelivery: {
23442
+ updateWebhook: {
22437
23443
  parameters: {
22438
23444
  query?: never;
22439
- header?: never;
23445
+ header?: {
23446
+ /** @description The ID of the instance you expect, as `GET /` returns it. If another instance answers at this address, Marfa returns `409 instance_changed` and doesn't write. Leave it out to send the request to whichever instance answers. */
23447
+ "X-Marfa-Instance-Id"?: string;
23448
+ };
22440
23449
  path: {
22441
23450
  /** @description The ID of the webhook. */
22442
23451
  id: string;
22443
- /** @description The ID of the delivery. */
22444
- delivery_id: string;
22445
23452
  };
22446
23453
  cookie?: never;
22447
23454
  };
22448
- requestBody?: never;
23455
+ requestBody: {
23456
+ content: {
23457
+ "application/json": {
23458
+ /** @description The URL Marfa posts events to: `http` or `https`, with no user name or password. Unless the instance allows private addresses, it must reach a public address, which Marfa checks again at each delivery. */
23459
+ url?: string;
23460
+ /** @description The events to send. Name each one: there's no wildcard. */
23461
+ events?: ("item.created" | "item.updated" | "item.deleted" | "item.restored" | "item.purged" | "item.state_changed" | "metadata.changed" | "edge.created" | "edge.updated" | "edge.deleted")[];
23462
+ /** @description Send item events only for this type and its subtypes, such as `core.media`, or for every type a pattern such as `app.*` matches. The type needn't be registered. Edge events aren't filtered. Blank or `null` removes it. */
23463
+ type_filter?: string | null;
23464
+ /** @description `false` stops sending events and cancels pending deliveries. `true` starts again. */
23465
+ active?: boolean;
23466
+ };
23467
+ };
23468
+ };
22449
23469
  responses: {
22450
- /** @description Returns the delivery as `pending`. Its `status_code`, `error` and `attempt` keep their values until the next attempt records an outcome. */
22451
- 202: {
23470
+ /** @description Returns the updated webhook. */
23471
+ 200: {
22452
23472
  headers: {
22453
23473
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
22454
23474
  "X-Request-ID": components["headers"]["X-Request-ID"];
@@ -22458,10 +23478,10 @@ interface operations {
22458
23478
  [name: string]: unknown;
22459
23479
  };
22460
23480
  content: {
22461
- "application/json": components["schemas"]["WebhookDelivery"];
23481
+ "application/json": components["schemas"]["Webhook"];
22462
23482
  };
22463
23483
  };
22464
- /** @description - `validation_error`: the query has a parameter this endpoint doesn't take. */
23484
+ /** @description - `validation_error`: a field is invalid. For example, `url` isn't `http` or `https`, carries a user name or password, or names an IP address that isn't public; `events` is empty or names an unknown event or `*`; or `type_filter` is `*`, malformed or a list; or the body has a field this endpoint doesn't take. */
22465
23485
  400: {
22466
23486
  headers: {
22467
23487
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
@@ -22506,7 +23526,7 @@ interface operations {
22506
23526
  "application/json": components["schemas"]["ForbiddenRefusal"];
22507
23527
  };
22508
23528
  };
22509
- /** @description - `webhook_not_found`: no webhook of yours has this ID, or it has no delivery with this `delivery_id`. */
23529
+ /** @description - `webhook_not_found`: no webhook of yours has this ID. */
22510
23530
  404: {
22511
23531
  headers: {
22512
23532
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
@@ -22521,7 +23541,7 @@ interface operations {
22521
23541
  "application/json": components["schemas"]["WebhookNotFoundRefusal"];
22522
23542
  };
22523
23543
  };
22524
- /** @description - `conflict`: the delivery isn't `dead_letter`, it's older than the instance's audit retention, or the webhook is turned off. */
23544
+ /** @description `instance_changed`: `X-Marfa-Instance-Id` names another instance. Nothing is written. Rebuild the working copy from the instance at this address. */
22525
23545
  409: {
22526
23546
  headers: {
22527
23547
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
@@ -22533,7 +23553,7 @@ interface operations {
22533
23553
  [name: string]: unknown;
22534
23554
  };
22535
23555
  content: {
22536
- "application/json": components["schemas"]["ConflictRefusal"];
23556
+ "application/json": components["schemas"]["InstanceChangedRefusal"];
22537
23557
  };
22538
23558
  };
22539
23559
  /** @description `request_too_large`: the request body is larger than this instance accepts. */
@@ -22611,31 +23631,24 @@ interface operations {
22611
23631
  };
22612
23632
  };
22613
23633
  };
22614
- listAuditLog: {
23634
+ listWebhookDeliveries: {
22615
23635
  parameters: {
22616
23636
  query?: {
22617
- /** @description Only return entries with this action, such as `key.create`. */
22618
- action?: string;
22619
- /** @description Only return entries for this kind of resource, such as `key`. */
22620
- resource_type?: string;
22621
- /** @description Only return entries for the resource with this ID. */
22622
- resource_id?: string;
22623
- /** @description Only return entries recorded after this time. */
22624
- created_after?: string;
22625
- /** @description Only return entries recorded before this time. */
22626
- created_before?: string;
22627
23637
  /** @description The maximum number of results to return. */
22628
23638
  limit?: number;
22629
23639
  /** @description The `next_cursor` from the previous page. Leave it out to get the first page. */
22630
23640
  cursor?: string;
22631
23641
  };
22632
23642
  header?: never;
22633
- path?: never;
23643
+ path: {
23644
+ /** @description The ID of the webhook. */
23645
+ id: string;
23646
+ };
22634
23647
  cookie?: never;
22635
23648
  };
22636
23649
  requestBody?: never;
22637
23650
  responses: {
22638
- /** @description Returns a page of entries. */
23651
+ /** @description Returns a page of deliveries. */
22639
23652
  200: {
22640
23653
  headers: {
22641
23654
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
@@ -22646,10 +23659,10 @@ interface operations {
22646
23659
  [name: string]: unknown;
22647
23660
  };
22648
23661
  content: {
22649
- "application/json": components["schemas"]["AuditEntryPage"];
23662
+ "application/json": components["schemas"]["WebhookDeliveryPage"];
22650
23663
  };
22651
23664
  };
22652
- /** @description - `validation_error`: a query parameter is unknown or invalid, such as a time that isn't a timestamp, or `cursor` is malformed or came from another listing. */
23665
+ /** @description - `validation_error`: the query has a parameter this endpoint doesn't take. */
22653
23666
  400: {
22654
23667
  headers: {
22655
23668
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
@@ -22679,7 +23692,7 @@ interface operations {
22679
23692
  "application/json": components["schemas"]["UnauthorizedRefusal"];
22680
23693
  };
22681
23694
  };
22682
- /** @description - `forbidden`: you don't hold `audit.read`. `details.required_scope` names it. */
23695
+ /** @description - `forbidden`: you don't have `webhooks.manage`. */
22683
23696
  403: {
22684
23697
  headers: {
22685
23698
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
@@ -22694,6 +23707,21 @@ interface operations {
22694
23707
  "application/json": components["schemas"]["ForbiddenRefusal"];
22695
23708
  };
22696
23709
  };
23710
+ /** @description - `webhook_not_found`: no webhook of yours has this ID. */
23711
+ 404: {
23712
+ headers: {
23713
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
23714
+ "X-Request-ID": components["headers"]["X-Request-ID"];
23715
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
23716
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
23717
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
23718
+ "X-Error-Code": components["headers"]["X-Error-Code"];
23719
+ [name: string]: unknown;
23720
+ };
23721
+ content: {
23722
+ "application/json": components["schemas"]["WebhookNotFoundRefusal"];
23723
+ };
23724
+ };
22697
23725
  /** @description `rate_limited`: you sent too many requests. Wait for the number of seconds in `Retry-After`, then try again. */
22698
23726
  429: {
22699
23727
  headers: {
@@ -22757,17 +23785,25 @@ interface operations {
22757
23785
  };
22758
23786
  };
22759
23787
  };
22760
- getServerMetrics: {
23788
+ redeliverWebhookDelivery: {
22761
23789
  parameters: {
22762
23790
  query?: never;
22763
- header?: never;
22764
- path?: never;
23791
+ header?: {
23792
+ /** @description The ID of the instance you expect, as `GET /` returns it. If another instance answers at this address, Marfa returns `409 instance_changed` and doesn't write. Leave it out to send the request to whichever instance answers. */
23793
+ "X-Marfa-Instance-Id"?: string;
23794
+ };
23795
+ path: {
23796
+ /** @description The ID of the webhook. */
23797
+ id: string;
23798
+ /** @description The ID of the delivery. */
23799
+ delivery_id: string;
23800
+ };
22765
23801
  cookie?: never;
22766
23802
  };
22767
23803
  requestBody?: never;
22768
23804
  responses: {
22769
- /** @description Server metrics */
22770
- 200: {
23805
+ /** @description Returns the delivery as `pending`. Its `status_code`, `error` and `attempt` keep their values until the next attempt records an outcome. */
23806
+ 202: {
22771
23807
  headers: {
22772
23808
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
22773
23809
  "X-Request-ID": components["headers"]["X-Request-ID"];
@@ -22777,37 +23813,7 @@ interface operations {
22777
23813
  [name: string]: unknown;
22778
23814
  };
22779
23815
  content: {
22780
- "application/json": {
22781
- /** @description Instance-wide item counts. */
22782
- items: {
22783
- /** @description Number of items across all states. */
22784
- total: number;
22785
- /** @description Item counts by state. */
22786
- by_state: {
22787
- [key: string]: number;
22788
- };
22789
- };
22790
- /** @description Stored blob counts and size. */
22791
- blobs: {
22792
- /** @description Number of stored blobs. */
22793
- count: number;
22794
- /** @description Total size of stored blobs, in bytes. */
22795
- total_bytes: number;
22796
- };
22797
- /** @description Built-in and registered type counts. */
22798
- types: {
22799
- /** @description Number of built-in types. */
22800
- core: number;
22801
- /** @description Number of registered types. */
22802
- registered: number;
22803
- };
22804
- keys: components["schemas"]["MetricCount"];
22805
- webhooks: components["schemas"]["MetricCount"] & unknown;
22806
- /** @description Seconds since this server process started. */
22807
- uptime_seconds: number;
22808
- /** @description When these counters were collected, in UTC. */
22809
- cached_at: string;
22810
- };
23816
+ "application/json": components["schemas"]["WebhookDelivery"];
22811
23817
  };
22812
23818
  };
22813
23819
  /** @description - `validation_error`: the query has a parameter this endpoint doesn't take. */
@@ -22840,7 +23846,7 @@ interface operations {
22840
23846
  "application/json": components["schemas"]["UnauthorizedRefusal"];
22841
23847
  };
22842
23848
  };
22843
- /** @description Caller lacks instance.read */
23849
+ /** @description - `forbidden`: you don't have `webhooks.manage`. */
22844
23850
  403: {
22845
23851
  headers: {
22846
23852
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
@@ -22855,8 +23861,8 @@ interface operations {
22855
23861
  "application/json": components["schemas"]["ForbiddenRefusal"];
22856
23862
  };
22857
23863
  };
22858
- /** @description `rate_limited`: you sent too many requests. Wait for the number of seconds in `Retry-After`, then try again. */
22859
- 429: {
23864
+ /** @description - `webhook_not_found`: no webhook of yours has this ID, or it has no delivery with this `delivery_id`. */
23865
+ 404: {
22860
23866
  headers: {
22861
23867
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
22862
23868
  "X-Request-ID": components["headers"]["X-Request-ID"];
@@ -22864,15 +23870,14 @@ interface operations {
22864
23870
  "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
22865
23871
  "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
22866
23872
  "X-Error-Code": components["headers"]["X-Error-Code"];
22867
- "Retry-After": components["headers"]["Retry-After"];
22868
23873
  [name: string]: unknown;
22869
23874
  };
22870
23875
  content: {
22871
- "application/json": components["schemas"]["RateLimitedRefusal"];
23876
+ "application/json": components["schemas"]["WebhookNotFoundRefusal"];
22872
23877
  };
22873
23878
  };
22874
- /** @description `internal_error`: Marfa failed in a way it didn't expect, and the request may not have completed. Read what you changed before you repeat a write. */
22875
- 500: {
23879
+ /** @description - `conflict`: the delivery isn't `dead_letter`, it's older than the instance's audit retention, or the webhook is turned off. */
23880
+ 409: {
22876
23881
  headers: {
22877
23882
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
22878
23883
  "X-Request-ID": components["headers"]["X-Request-ID"];
@@ -22883,26 +23888,23 @@ interface operations {
22883
23888
  [name: string]: unknown;
22884
23889
  };
22885
23890
  content: {
22886
- "application/json": components["schemas"]["InternalErrorRefusal"];
23891
+ "application/json": components["schemas"]["ConflictRefusal"] | components["schemas"]["InstanceChangedRefusal"];
22887
23892
  };
22888
23893
  };
22889
- /** @description `write_contention`: the database was busy, and Marfa couldn't complete the request in time. Nothing changed. Try the request again. */
22890
- 503: {
23894
+ /** @description `request_too_large`: the request body is larger than this instance accepts. */
23895
+ 413: {
22891
23896
  headers: {
22892
23897
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
22893
23898
  "X-Request-ID": components["headers"]["X-Request-ID"];
22894
- "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
22895
- "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
22896
- "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
22897
23899
  "X-Error-Code": components["headers"]["X-Error-Code"];
22898
23900
  [name: string]: unknown;
22899
23901
  };
22900
23902
  content: {
22901
- "application/json": components["schemas"]["WriteContentionRefusal"];
23903
+ "application/json": components["schemas"]["RequestTooLargeRefusal"];
22902
23904
  };
22903
23905
  };
22904
- /** @description `insufficient_storage`: the disk that holds the instance's data has no room for the request, or the request would leave less free than the instance keeps in reserve. Nothing changed, unless `details.write_outcome` is `unknown`, which means the write may have landed: read what you changed before you repeat it. Free space on the disk, then try the request again. */
22905
- 507: {
23906
+ /** @description `rate_limited`: you sent too many requests. Wait for the number of seconds in `Retry-After`, then try again. */
23907
+ 429: {
22906
23908
  headers: {
22907
23909
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
22908
23910
  "X-Request-ID": components["headers"]["X-Request-ID"];
@@ -22910,102 +23912,85 @@ interface operations {
22910
23912
  "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
22911
23913
  "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
22912
23914
  "X-Error-Code": components["headers"]["X-Error-Code"];
23915
+ "Retry-After": components["headers"]["Retry-After"];
22913
23916
  [name: string]: unknown;
22914
23917
  };
22915
23918
  content: {
22916
- "application/json": components["schemas"]["InsufficientStorageRefusal"];
23919
+ "application/json": components["schemas"]["RateLimitedRefusal"];
22917
23920
  };
22918
23921
  };
22919
- };
22920
- };
22921
- getInstance: {
22922
- parameters: {
22923
- query?: never;
22924
- header?: never;
22925
- path?: never;
22926
- cookie?: never;
22927
- };
22928
- requestBody?: never;
22929
- responses: {
22930
- /** @description Returns the instance's description. A request whose `Accept` header prefers `text/html` gets an HTML page instead. */
22931
- 200: {
23922
+ /** @description `internal_error`: Marfa failed in a way it didn't expect, and the request may not have completed. Read what you changed before you repeat a write. */
23923
+ 500: {
22932
23924
  headers: {
22933
23925
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
22934
23926
  "X-Request-ID": components["headers"]["X-Request-ID"];
23927
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
23928
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
23929
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
23930
+ "X-Error-Code": components["headers"]["X-Error-Code"];
22935
23931
  [name: string]: unknown;
22936
23932
  };
22937
23933
  content: {
22938
- "application/json": {
22939
- /**
22940
- * @description Always `marfa`.
22941
- * @constant
22942
- */
22943
- name: "marfa";
22944
- /** @description The build the instance runs. */
22945
- version: string;
22946
- /** @description Unique identifier for the instance. `GET /config` and an archive's manifest show the same value. */
22947
- instance_id: string;
22948
- /** @description The contract version, the same number as this document's `info.version`. It stays at `0` until the first public release. */
22949
- contract: number;
22950
- /** @description The features the instance serves, such as `items` and `webhooks`. */
22951
- features: string[];
22952
- };
23934
+ "application/json": components["schemas"]["InternalErrorRefusal"];
22953
23935
  };
22954
23936
  };
22955
- /** @description `validation_error`: the query has a parameter this endpoint doesn't take. */
22956
- 400: {
23937
+ /** @description `write_contention`: the database was busy, and Marfa couldn't complete the request in time. Nothing changed. Try the request again. */
23938
+ 503: {
22957
23939
  headers: {
22958
23940
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
22959
23941
  "X-Request-ID": components["headers"]["X-Request-ID"];
23942
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
23943
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
23944
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
22960
23945
  "X-Error-Code": components["headers"]["X-Error-Code"];
22961
23946
  [name: string]: unknown;
22962
23947
  };
22963
23948
  content: {
22964
- "application/json": components["schemas"]["ValidationErrorRefusal"];
23949
+ "application/json": components["schemas"]["WriteContentionRefusal"];
22965
23950
  };
22966
23951
  };
22967
- /** @description `internal_error`: Marfa failed in a way it didn't expect, and the request may not have completed. Read what you changed before you repeat a write. */
22968
- 500: {
23952
+ /** @description `insufficient_storage`: the disk that holds the instance's data has no room for the request, or the request would leave less free than the instance keeps in reserve. Nothing changed, unless `details.write_outcome` is `unknown`, which means the write may have landed: read what you changed before you repeat it. Free space on the disk, then try the request again. */
23953
+ 507: {
22969
23954
  headers: {
22970
23955
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
22971
23956
  "X-Request-ID": components["headers"]["X-Request-ID"];
23957
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
23958
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
23959
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
22972
23960
  "X-Error-Code": components["headers"]["X-Error-Code"];
22973
23961
  [name: string]: unknown;
22974
23962
  };
22975
23963
  content: {
22976
- "application/json": components["schemas"]["InternalErrorRefusal"];
23964
+ "application/json": components["schemas"]["InsufficientStorageRefusal"];
22977
23965
  };
22978
23966
  };
22979
23967
  };
22980
23968
  };
22981
- streamEvents: {
23969
+ listAuditLog: {
22982
23970
  parameters: {
22983
23971
  query?: {
22984
- /** @description Set to `1` for a copy stream, which a working copy follows. It takes `edges=all` and no other parameter. Its `stream_cursor` and `stream_live` carry `instance_id` and `read_view`, and its item frames carry `listed`. */
22985
- copy?: "1";
22986
- /** @description Only send item events for these types and their subtypes: a comma-separated list of up to 10, such as `core.note,app.*`. A pattern matches the types you can read. Edge events aren't filtered. Leave it out for every type. */
22987
- type?: string;
22988
- /** @description Set to `none` to leave out edge events. You receive an edge event only if you could read the edge with `GET /edges/{id}`. */
22989
- edges?: "all" | "none";
22990
- };
22991
- header?: {
22992
- /** @description On a copy stream, the `read_view` from the last `stream_cursor` or `stream_live` you received. Send it with `Last-Event-ID` to resume, and leave both out to start a new copy. */
22993
- "X-Marfa-Read-View"?: string;
22994
- /** @description The ID of the last event you received. Marfa replays every event after it that the log still holds, then goes live. Send it as the stream wrote it. Empty means none, except on a copy stream. */
22995
- "Last-Event-ID"?: string;
23972
+ /** @description Only return entries with this action, such as `key.create`. */
23973
+ action?: string;
23974
+ /** @description Only return entries for this kind of resource, such as `key`. */
23975
+ resource_type?: string;
23976
+ /** @description Only return entries for the resource with this ID. */
23977
+ resource_id?: string;
23978
+ /** @description Only return entries recorded after this time. */
23979
+ created_after?: string;
23980
+ /** @description Only return entries recorded before this time. */
23981
+ created_before?: string;
23982
+ /** @description The maximum number of results to return. */
23983
+ limit?: number;
23984
+ /** @description The `next_cursor` from the previous page. Leave it out to get the first page. */
23985
+ cursor?: string;
22996
23986
  };
23987
+ header?: never;
22997
23988
  path?: never;
22998
23989
  cookie?: never;
22999
23990
  };
23000
23991
  requestBody?: never;
23001
23992
  responses: {
23002
- /**
23003
- * @description Returns the stream. Each frame's `event:` names it:
23004
- * - `stream_cursor`: first, where the log stands.
23005
- * - An event, such as `item.created`, with its event ID as `id:`.
23006
- * - `stream_live`: once the catch-up is over.
23007
- * - `stream_incomplete`, `catchup_too_old`, `cursor_ahead` or `read_view_changed`: last, before the stream closes.
23008
- */
23993
+ /** @description Returns a page of entries. */
23009
23994
  200: {
23010
23995
  headers: {
23011
23996
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
@@ -23016,26 +24001,10 @@ interface operations {
23016
24001
  [name: string]: unknown;
23017
24002
  };
23018
24003
  content: {
23019
- /**
23020
- * @example : connected
23021
- *
23022
- * event: stream_cursor
23023
- * data: {"event_type":"stream_cursor","cursor":"1041"}
23024
- *
23025
- * event: stream_live
23026
- * data: {"event_type":"stream_live","cursor":"1041"}
23027
- *
23028
- * id: 1042
23029
- * event: item.created
23030
- * data: {"event_type":"item.created","item":{"id":"0199a9c4-7c1e-7d3a-9f2b-3c4d5e6f7a8b","type":"core.note","properties":{"title":"Reading list","body":"Finish the chapter on tides."},"state":"active","tier":"library","version":1,"schema_version":0,"source":"notes-app","occurred_at":"2026-10-03T09:30:00.000Z","created_at":"2026-10-03T09:30:00.000Z","updated_at":"2026-10-03T09:30:00.000Z"},"metadata":{"item_id":"0199a9c4-7c1e-7d3a-9f2b-3c4d5e6f7a8b","tags":[],"extensions":{}}}
23031
- */
23032
- "text/event-stream": components["schemas"]["EventStreamFrame"];
24004
+ "application/json": components["schemas"]["AuditEntryPage"];
23033
24005
  };
23034
24006
  };
23035
- /**
23036
- * @description - `validation_error`: a parameter or header is invalid, or not one this endpoint takes. For example, `type` has more than 10 entries or is `*`, or `Last-Event-ID` isn't an event ID. A copy stream takes only `copy=1` and `edges=all`, and both resume headers or neither; another stream takes no `X-Marfa-Read-View`.
23037
- * - `unknown_type`: a `type` entry isn't registered.
23038
- */
24007
+ /** @description - `validation_error`: a query parameter is unknown or invalid, such as a time that isn't a timestamp, or `cursor` is malformed or came from another listing. */
23039
24008
  400: {
23040
24009
  headers: {
23041
24010
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
@@ -23047,7 +24016,7 @@ interface operations {
23047
24016
  [name: string]: unknown;
23048
24017
  };
23049
24018
  content: {
23050
- "application/json": components["schemas"]["UnknownTypeOrValidationErrorRefusal"];
24019
+ "application/json": components["schemas"]["ValidationErrorRefusal"];
23051
24020
  };
23052
24021
  };
23053
24022
  /** @description `unauthorized`: the request has no credential, or its credential is not valid. */
@@ -23065,7 +24034,7 @@ interface operations {
23065
24034
  "application/json": components["schemas"]["UnauthorizedRefusal"];
23066
24035
  };
23067
24036
  };
23068
- /** @description - `type_not_permitted`: you can't read any type, or a `type` entry names a type you can't read, with no subtype you can. */
24037
+ /** @description - `forbidden`: you don't hold `audit.read`. `details.required_scope` names it. */
23069
24038
  403: {
23070
24039
  headers: {
23071
24040
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
@@ -23077,22 +24046,7 @@ interface operations {
23077
24046
  [name: string]: unknown;
23078
24047
  };
23079
24048
  content: {
23080
- "application/json": components["schemas"]["TypeNotPermittedRefusal"];
23081
- };
23082
- };
23083
- /** @description `read_view_changed`: the read view in `X-Marfa-Read-View` has changed. Rebuild the working copy. */
23084
- 409: {
23085
- headers: {
23086
- "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
23087
- "X-Request-ID": components["headers"]["X-Request-ID"];
23088
- "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
23089
- "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
23090
- "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
23091
- "X-Error-Code": components["headers"]["X-Error-Code"];
23092
- [name: string]: unknown;
23093
- };
23094
- content: {
23095
- "application/json": components["schemas"]["ReadViewChangedRefusal"];
24049
+ "application/json": components["schemas"]["ForbiddenRefusal"];
23096
24050
  };
23097
24051
  };
23098
24052
  /** @description `rate_limited`: you sent too many requests. Wait for the number of seconds in `Retry-After`, then try again. */
@@ -23126,10 +24080,7 @@ interface operations {
23126
24080
  "application/json": components["schemas"]["InternalErrorRefusal"];
23127
24081
  };
23128
24082
  };
23129
- /**
23130
- * @description - `stream_capacity_exhausted`: the instance is serving as many streams as its operator allows. Try again later.
23131
- * - `write_contention`: the database was busy, and Marfa couldn't complete the request in time. Nothing changed. Try the request again.
23132
- */
24083
+ /** @description `write_contention`: the database was busy, and Marfa couldn't complete the request in time. Nothing changed. Try the request again. */
23133
24084
  503: {
23134
24085
  headers: {
23135
24086
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
@@ -23141,7 +24092,7 @@ interface operations {
23141
24092
  [name: string]: unknown;
23142
24093
  };
23143
24094
  content: {
23144
- "application/json": components["schemas"]["StreamCapacityExhaustedOrWriteContentionRefusal"];
24095
+ "application/json": components["schemas"]["WriteContentionRefusal"];
23145
24096
  };
23146
24097
  };
23147
24098
  /** @description `insufficient_storage`: the disk that holds the instance's data has no room for the request, or the request would leave less free than the instance keeps in reserve. Nothing changed, unless `details.write_outcome` is `unknown`, which means the write may have landed: read what you changed before you repeat it. Free space on the disk, then try the request again. */
@@ -23161,36 +24112,17 @@ interface operations {
23161
24112
  };
23162
24113
  };
23163
24114
  };
23164
- registerOAuthClient: {
24115
+ getServerMetrics: {
23165
24116
  parameters: {
23166
24117
  query?: never;
23167
24118
  header?: never;
23168
24119
  path?: never;
23169
24120
  cookie?: never;
23170
24121
  };
23171
- requestBody: {
23172
- content: {
23173
- "application/json": {
23174
- /** @description The addresses Marfa may send a person back to after authorization. Required for `authorization_code`. A `web` client's URIs must use `https` off the loopback; a `native` client may use `http` on `localhost`, `127.0.0.1` or `[::1]`. */
23175
- redirect_uris?: string[];
23176
- /** @description The grants the client uses: `authorization_code`, `refresh_token` or `urn:ietf:params:oauth:grant-type:device_code`. Defaults to `authorization_code`. Without `authorization_code`, add `refresh_token` to get a refresh token with `offline_access`. */
23177
- grant_types?: string[];
23178
- /** @description The response types the client uses. Defaults to `code` when `grant_types` includes `authorization_code`. */
23179
- response_types?: string[];
23180
- /** @description The app's name, which Marfa shows a person asked to approve it. */
23181
- client_name?: string;
23182
- /** @description `web` or `native`, which decides the redirect URIs the client may use. Defaults to `web`. */
23183
- application_type?: string;
23184
- /** @description Space-separated scopes to register the client for. `offline_access` needs `refresh_token` or `authorization_code` in `grant_types`. Leave it out to register the client for every scope the instance allows that it can use. */
23185
- scope?: string;
23186
- /** @description How the client proves itself at the token endpoint. Defaults to `client_secret_basic`. Send `none` for a public client, which gets no `client_secret`. */
23187
- token_endpoint_auth_method?: string;
23188
- };
23189
- };
23190
- };
24122
+ requestBody?: never;
23191
24123
  responses: {
23192
- /** @description Returns the registered client, with its `client_id` and, unless it's a public client, its `client_secret`. */
23193
- 201: {
24124
+ /** @description Server metrics */
24125
+ 200: {
23194
24126
  headers: {
23195
24127
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
23196
24128
  "X-Request-ID": components["headers"]["X-Request-ID"];
@@ -23201,43 +24133,39 @@ interface operations {
23201
24133
  };
23202
24134
  content: {
23203
24135
  "application/json": {
23204
- /** @description Unique identifier for the client. */
23205
- client_id?: string;
23206
- /** @description The secret the client proves itself with at the token endpoint. Absent for a public client. */
23207
- client_secret?: string;
23208
- /** @description When the client was registered, in seconds since the Unix epoch. */
23209
- client_id_issued_at?: number;
23210
- /** @description Space-separated scopes the client is registered for: the ones you named, or every scope the instance allows, without `offline_access` for a client that can't use a refresh token. */
23211
- scope?: string;
23212
- /** @description The redirect URIs, as registered. */
23213
- redirect_uris?: string[];
23214
- /** @description The grants, as registered. */
23215
- grant_types?: string[];
23216
- /** @description The response types, as registered. */
23217
- response_types?: string[];
23218
- /** @description How the client proves itself at the token endpoint. */
23219
- token_endpoint_auth_method?: string;
23220
- /** @description When the secret expires, in seconds since the Unix epoch, or `0` if it doesn't. */
23221
- client_secret_expires_at?: number;
23222
- /** @description The app's name, as registered. */
23223
- client_name?: string;
23224
- /** @description `web` or `native`. */
23225
- application_type?: string;
23226
- /** @description `true` if the client is disabled. */
23227
- disabled?: boolean;
23228
- /** @description `true` if the client always uses DPoP for its token requests. */
23229
- dpop_bound_access_tokens?: boolean;
24136
+ /** @description Instance-wide item counts. */
24137
+ items: {
24138
+ /** @description Number of items across all states. */
24139
+ total: number;
24140
+ /** @description Item counts by state. */
24141
+ by_state: {
24142
+ [key: string]: number;
24143
+ };
24144
+ };
24145
+ /** @description Stored blob counts and size. */
24146
+ blobs: {
24147
+ /** @description Number of stored blobs. */
24148
+ count: number;
24149
+ /** @description Total size of stored blobs, in bytes. */
24150
+ total_bytes: number;
24151
+ };
24152
+ /** @description Built-in and registered type counts. */
24153
+ types: {
24154
+ /** @description Number of built-in types. */
24155
+ core: number;
24156
+ /** @description Number of registered types. */
24157
+ registered: number;
24158
+ };
24159
+ keys: components["schemas"]["MetricCount"];
24160
+ webhooks: components["schemas"]["MetricCount"] & unknown;
24161
+ /** @description Seconds since this server process started. */
24162
+ uptime_seconds: number;
24163
+ /** @description When these counters were collected, in UTC. */
24164
+ cached_at: string;
23230
24165
  };
23231
24166
  };
23232
24167
  };
23233
- /**
23234
- * @description An error in the shape RFC 7591 defines:
23235
- * - `invalid_client_metadata`: a field is invalid, such as `grant_types` naming `client_credentials`.
23236
- * - `invalid_redirect_uri`: a redirect URI is missing, malformed or not allowed for the `application_type`.
23237
- * - `invalid_scope`: `scope` names a scope the instance doesn't allow.
23238
- *
23239
- * An unknown query parameter gets Marfa's own `validation_error` instead.
23240
- */
24168
+ /** @description - `validation_error`: the query has a parameter this endpoint doesn't take. */
23241
24169
  400: {
23242
24170
  headers: {
23243
24171
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
@@ -23249,17 +24177,10 @@ interface operations {
23249
24177
  [name: string]: unknown;
23250
24178
  };
23251
24179
  content: {
23252
- "application/json": components["schemas"]["ValidationErrorRefusal"] | {
23253
- /** @enum {string} */
23254
- error: "invalid_client_metadata" | "invalid_redirect_uri" | "invalid_scope";
23255
- error_description?: string;
23256
- };
24180
+ "application/json": components["schemas"]["ValidationErrorRefusal"];
23257
24181
  };
23258
24182
  };
23259
- /**
23260
- * @description An error in the shape RFC 6750 defines:
23261
- * - `invalid_token`: the request sends a bearer token, such as an API key. Register with no credential.
23262
- */
24183
+ /** @description `unauthorized`: the request has no credential, or its credential is not valid. */
23263
24184
  401: {
23264
24185
  headers: {
23265
24186
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
@@ -23267,55 +24188,46 @@ interface operations {
23267
24188
  "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
23268
24189
  "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
23269
24190
  "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
24191
+ "X-Error-Code": components["headers"]["X-Error-Code"];
23270
24192
  [name: string]: unknown;
23271
24193
  };
23272
24194
  content: {
23273
- "application/json": {
23274
- /** @enum {string} */
23275
- error: "invalid_token";
23276
- error_description?: string;
23277
- };
24195
+ "application/json": components["schemas"]["UnauthorizedRefusal"];
23278
24196
  };
23279
24197
  };
23280
- /** @description `request_too_large`: the request body is larger than this instance accepts. */
23281
- 413: {
24198
+ /** @description Caller lacks instance.read */
24199
+ 403: {
23282
24200
  headers: {
23283
24201
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
23284
24202
  "X-Request-ID": components["headers"]["X-Request-ID"];
24203
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
24204
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
24205
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
23285
24206
  "X-Error-Code": components["headers"]["X-Error-Code"];
23286
24207
  [name: string]: unknown;
23287
24208
  };
23288
24209
  content: {
23289
- "application/json": components["schemas"]["RequestTooLargeRefusal"];
24210
+ "application/json": components["schemas"]["ForbiddenRefusal"];
23290
24211
  };
23291
24212
  };
23292
- /**
23293
- * @description An error with `message` and `code`, rather than Marfa's own shape:
23294
- * - `UNSUPPORTED_MEDIA_TYPE`: the request doesn't send its body as `application/json`.
23295
- */
23296
- 415: {
24213
+ /** @description `rate_limited`: you sent too many requests. Wait for the number of seconds in `Retry-After`, then try again. */
24214
+ 429: {
23297
24215
  headers: {
23298
24216
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
23299
24217
  "X-Request-ID": components["headers"]["X-Request-ID"];
23300
24218
  "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
23301
24219
  "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
23302
24220
  "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
24221
+ "X-Error-Code": components["headers"]["X-Error-Code"];
24222
+ "Retry-After": components["headers"]["Retry-After"];
23303
24223
  [name: string]: unknown;
23304
24224
  };
23305
24225
  content: {
23306
- "application/json": {
23307
- /**
23308
- * @description A machine-readable code for the error. Use it in your logic.
23309
- * @enum {string}
23310
- */
23311
- code: "UNSUPPORTED_MEDIA_TYPE";
23312
- /** @description A description of the error for a person to read. It can change, so don't match on it. */
23313
- message: string;
23314
- };
24226
+ "application/json": components["schemas"]["RateLimitedRefusal"];
23315
24227
  };
23316
24228
  };
23317
- /** @description `rate_limited`: you sent too many requests. Wait for the number of seconds in `Retry-After`, then try again. */
23318
- 429: {
24229
+ /** @description `internal_error`: Marfa failed in a way it didn't expect, and the request may not have completed. Read what you changed before you repeat a write. */
24230
+ 500: {
23319
24231
  headers: {
23320
24232
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
23321
24233
  "X-Request-ID": components["headers"]["X-Request-ID"];
@@ -23323,11 +24235,10 @@ interface operations {
23323
24235
  "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
23324
24236
  "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
23325
24237
  "X-Error-Code": components["headers"]["X-Error-Code"];
23326
- "Retry-After": components["headers"]["Retry-After"];
23327
24238
  [name: string]: unknown;
23328
24239
  };
23329
24240
  content: {
23330
- "application/json": components["schemas"]["RateLimitedRefusal"];
24241
+ "application/json": components["schemas"]["InternalErrorRefusal"];
23331
24242
  };
23332
24243
  };
23333
24244
  /** @description `write_contention`: the database was busy, and Marfa couldn't complete the request in time. Nothing changed. Try the request again. */
@@ -23345,6 +24256,21 @@ interface operations {
23345
24256
  "application/json": components["schemas"]["WriteContentionRefusal"];
23346
24257
  };
23347
24258
  };
24259
+ /** @description `insufficient_storage`: the disk that holds the instance's data has no room for the request, or the request would leave less free than the instance keeps in reserve. Nothing changed, unless `details.write_outcome` is `unknown`, which means the write may have landed: read what you changed before you repeat it. Free space on the disk, then try the request again. */
24260
+ 507: {
24261
+ headers: {
24262
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
24263
+ "X-Request-ID": components["headers"]["X-Request-ID"];
24264
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
24265
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
24266
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
24267
+ "X-Error-Code": components["headers"]["X-Error-Code"];
24268
+ [name: string]: unknown;
24269
+ };
24270
+ content: {
24271
+ "application/json": components["schemas"]["InsufficientStorageRefusal"];
24272
+ };
24273
+ };
23348
24274
  };
23349
24275
  };
23350
24276
  receiveWebhookEvent: {