@withmarfa/client 0.0.90 → 0.0.92

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 (3) hide show
  1. package/dist/index.d.cts +1846 -316
  2. package/dist/index.d.ts +1846 -316
  3. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -17,7 +17,7 @@ interface paths {
17
17
  };
18
18
  /**
19
19
  * List items
20
- * @description Returns a page of the items you can read that match the filters. System items are left out unless you ask for them with `include=system`. Use `include` to add edges, metadata or extensions to each item.
20
+ * @description Returns a page of the items you can read that match the filters. Hidden items (`system.*` and `app.*`) are left out unless you ask for them with `include=hidden`. Use `include` to add edges, metadata or extensions to each item.
21
21
  */
22
22
  get: operations["listItems"];
23
23
  put?: never;
@@ -211,7 +211,7 @@ interface paths {
211
211
  put?: never;
212
212
  /**
213
213
  * Find items by title
214
- * @description Finds the active and archived items titled by each of up to 200 names, matched without regard to case, Unicode form or the white space around a name. `system.*` items and items you can't read are left out.
214
+ * @description Finds the active and archived items titled by each of up to 200 names, matched without regard to case, Unicode form or the white space around a name. `system.*` and `app.*` items and items you can't read are left out.
215
215
  */
216
216
  post: operations["findItemsByTitle"];
217
217
  delete?: never;
@@ -309,7 +309,7 @@ interface paths {
309
309
  };
310
310
  /**
311
311
  * List item summaries
312
- * @description Returns item names, types, versions, sources and creation times, newest first, of the types you can read. Trashed and system items are excluded.
312
+ * @description Returns item names, types, versions, sources and creation times, newest first, of the types you can read. Trashed and hidden items (`system.*` and `app.*`) are excluded.
313
313
  */
314
314
  get: operations["listItemSummaries"];
315
315
  put?: never;
@@ -828,6 +828,54 @@ interface paths {
828
828
  patch?: never;
829
829
  trace?: never;
830
830
  };
831
+ "/plugins": {
832
+ parameters: {
833
+ query?: never;
834
+ header?: never;
835
+ path?: never;
836
+ cookie?: never;
837
+ };
838
+ /**
839
+ * List plugins
840
+ * @description Returns every installed plugin, by name, with the types it installed.
841
+ */
842
+ get: operations["listPlugins"];
843
+ put?: never;
844
+ /**
845
+ * Install a plugin
846
+ * @description Installs a plugin's bundle in one write and records the plugin on each type. Needs `schema.write`, write on each type and edge type name, and `connectors.manage` for a `connector`. An app can't install guidance.
847
+ */
848
+ post: operations["installPlugin"];
849
+ delete?: never;
850
+ options?: never;
851
+ head?: never;
852
+ patch?: never;
853
+ trace?: never;
854
+ };
855
+ "/plugins/{name}": {
856
+ parameters: {
857
+ query?: never;
858
+ header?: never;
859
+ path?: never;
860
+ cookie?: never;
861
+ };
862
+ /**
863
+ * Get a plugin
864
+ * @description Returns an installed plugin, with the types it installed.
865
+ */
866
+ get: operations["getPlugin"];
867
+ put?: never;
868
+ post?: never;
869
+ /**
870
+ * Remove a plugin
871
+ * @description Removes a plugin's install record. Its types and edge types stay, with their items, edges and provenance; delete a type with `DELETE /types/{id}`. Needs `schema.write`.
872
+ */
873
+ delete: operations["removePlugin"];
874
+ options?: never;
875
+ head?: never;
876
+ patch?: never;
877
+ trace?: never;
878
+ };
831
879
  "/types": {
832
880
  parameters: {
833
881
  query?: never;
@@ -843,7 +891,7 @@ interface paths {
843
891
  put?: never;
844
892
  /**
845
893
  * Register a type
846
- * @description Registers a type under the `app.*`, `user.*` or `<publisher>.*` namespace and returns it. Name a `parent` to inherit its fields.
894
+ * @description Registers a type under the `app.*`, `user.*` or `<publisher>.*` namespace and returns it. Name a `parent` to inherit its fields. The first type under an `app.<vendor>` namespace gives that namespace to the app that registered it.
847
895
  */
848
896
  post: operations["registerType"];
849
897
  delete?: never;
@@ -1864,6 +1912,46 @@ interface paths {
1864
1912
  patch: operations["narrowAppGrant"];
1865
1913
  trace?: never;
1866
1914
  };
1915
+ "/app-vendors": {
1916
+ parameters: {
1917
+ query?: never;
1918
+ header?: never;
1919
+ path?: never;
1920
+ cookie?: never;
1921
+ };
1922
+ /**
1923
+ * List app vendors
1924
+ * @description Returns each `app.<vendor>` namespace and who holds it, in one page: the app that registered its first type, or the owner until they give it to an app. Requires the owner's browser session or `grants.manage`.
1925
+ */
1926
+ get: operations["listAppVendors"];
1927
+ put?: never;
1928
+ post?: never;
1929
+ delete?: never;
1930
+ options?: never;
1931
+ head?: never;
1932
+ patch?: never;
1933
+ trace?: never;
1934
+ };
1935
+ "/app-vendors/{vendor}": {
1936
+ parameters: {
1937
+ query?: never;
1938
+ header?: never;
1939
+ path?: never;
1940
+ cookie?: never;
1941
+ };
1942
+ get?: never;
1943
+ /**
1944
+ * Give a vendor to an app
1945
+ * @description Gives an `app.<vendor>` namespace to the app you name by client ID, which then registers types under it and reaches its items. Use it when an app's client ID changes. Requires the owner's browser session, or `grants.manage` on a key the owner made.
1946
+ */
1947
+ put: operations["giveAppVendor"];
1948
+ post?: never;
1949
+ delete?: never;
1950
+ options?: never;
1951
+ head?: never;
1952
+ patch?: never;
1953
+ trace?: never;
1954
+ };
1867
1955
  "/oauth/authorize": {
1868
1956
  parameters: {
1869
1957
  query?: never;
@@ -2942,7 +3030,7 @@ interface components {
2942
3030
  DisplayHints: {
2943
3031
  /** @description The field that holds an item's title for display. */
2944
3032
  title_field?: string;
2945
- /** @description The field that holds an item's body for display. The field holds Markdown, and a `string` field named here holds up to 1,000,000 UTF-16 code units unless its `max_length` says otherwise. */
3033
+ /** @description The field that holds an item's body for display. The field holds Markdown, and a `string` field named here holds up to 1,000,000 Unicode characters unless its `max_length` says otherwise. */
2946
3034
  body_field?: string;
2947
3035
  /** @description Whether an item with no title is named by the first line of its body. `false` where the body is not a name, such as a highlight's passage: such an item is named after what it comes from, or `Untitled`. Defaults to `true`. */
2948
3036
  name_from_body?: boolean;
@@ -2971,13 +3059,26 @@ interface components {
2971
3059
  } & {
2972
3060
  [key: string]: unknown;
2973
3061
  };
2974
- /** @description Whether Marfa ships the type, and the sign-in that first registered it when known. */
3062
+ /** @description Where the type came from, the plugin that installed it, and the sign-in that first registered it when known. */
2975
3063
  TypeProvenance: {
2976
3064
  /**
2977
- * @description Where the type came from: shipped by Marfa, registered by a caller, or unknown.
3065
+ * @description Where the type came from: shipped by Marfa, registered through `POST /types` or a restore, installed by a plugin, or unknown.
2978
3066
  * @enum {string}
2979
3067
  */
2980
- origin: "platform" | "user" | "unknown";
3068
+ origin: "platform" | "registered" | "plugin" | "unknown";
3069
+ /** @description The plugin that installed the type, or `null` for a type no plugin installed. It stays after the plugin is removed. */
3070
+ plugin: {
3071
+ /**
3072
+ * @description The plugin's name.
3073
+ * @example tickets
3074
+ */
3075
+ name: string;
3076
+ /**
3077
+ * @description The version of the plugin that last installed the type.
3078
+ * @example 1.2.0
3079
+ */
3080
+ version: string;
3081
+ } | null;
2981
3082
  /** @description The sign-in that first registered the type, or null when none is recorded. */
2982
3083
  created_by: {
2983
3084
  /**
@@ -3701,7 +3802,7 @@ interface components {
3701
3802
  };
3702
3803
  /** @description `true` if listings show you this item, `false` if `source_filter` leaves it out of them and you can read it only by ID. Present only when you send `X-Marfa-Reach`. */
3703
3804
  listed?: boolean;
3704
- /** @description The items you can read at the far end of `item.edges`, and of `backrefs` if you asked for both, with their metadata. Leaves out `system.*` items without counting them in `neighbors_omitted`. Present with `include=neighbors`. */
3805
+ /** @description The items you can read at the far end of `item.edges`, and of `backrefs` if you asked for both, with their metadata. Leaves out `system.*` and `app.*` items without counting them in `neighbors_omitted`. Present with `include=neighbors`. */
3705
3806
  neighbors?: components["schemas"]["ItemReadWithMetadata"][];
3706
3807
  /** @description `true` if this answer's edges reach more than 100 items, so `neighbors` leaves some out. Page `GET /items/{id}/edges` and `GET /items/{id}/backrefs` for the rest. Present with `include=neighbors`. */
3707
3808
  neighbors_truncated?: boolean;
@@ -4582,7 +4683,7 @@ interface components {
4582
4683
  format?: "url" | "email" | "date" | "thumbnail" | "bcp47" | "iso3166" | "currency" | "phone";
4583
4684
  /** @description `false` if full-text search should skip the field. Items still return it. */
4584
4685
  searchable?: boolean;
4585
- /** @description The longest value a `string` or `enum` field allows, in UTF-16 code units. Defaults to 1,000,000 on the `string` field `display_hints.body_field` names, and to 100,000 on any other. */
4686
+ /** @description The longest `string` value, in Unicode characters, not UTF-16 code units. Defaults to 1,000,000 on the field `display_hints.body_field` names, and to 100,000 on any other. Ignored on `enum` fields. */
4586
4687
  max_length?: number;
4587
4688
  /** @description The most elements an `array` field allows. */
4588
4689
  max_items?: number;
@@ -5936,7 +6037,7 @@ interface components {
5936
6037
  };
5937
6038
  /** @description Which items the folder holds. */
5938
6039
  FolderQuery: {
5939
- /** @description The types the folder holds, each with its subtypes. Empty or absent holds every type the machine's key can read, except `system.*`. */
6040
+ /** @description The types the folder holds, each with its subtypes. Empty or absent holds every type the machine's key can read, except `system.*` and `app.*`. */
5940
6041
  types?: string[];
5941
6042
  /**
5942
6043
  * @description The tiers the folder holds: `library`, `feed`, or `all` for both. Absent means `library`.
@@ -6128,9 +6229,9 @@ interface components {
6128
6229
  /** @description The whole seconds since receipt, measured by the server; it does not show whether the copy is online. */
6129
6230
  age_seconds: number;
6130
6231
  };
6131
- /** @description Which items the view lists. Absent lists every item the reading key can read, except `system.*`. */
6232
+ /** @description Which items the view lists. Absent lists every item the reading key can read, except `system.*` and `app.*`. */
6132
6233
  ViewQuery: {
6133
- /** @description The types the view lists, each with its subtypes. Empty or absent lists every type the reading key can read, except `system.*`. */
6234
+ /** @description The types the view lists, each with its subtypes. Empty or absent lists every type the reading key can read, except `system.*` and `app.*`. */
6134
6235
  types?: string[];
6135
6236
  tier?: components["schemas"]["ViewTier"] & unknown;
6136
6237
  /** @description The states the view lists. Absent means both. */
@@ -8462,6 +8563,338 @@ interface components {
8462
8563
  /** @description What the owner does next, in order. */
8463
8564
  next_steps: components["schemas"]["AddressNextStep"][];
8464
8565
  };
8566
+ /** @description A plugin's bundle, `<name>.plugin.json`: its identity, version, types and edge types. */
8567
+ PluginBundle: {
8568
+ /**
8569
+ * @description The bundle format.
8570
+ * @enum {integer}
8571
+ */
8572
+ format: 1;
8573
+ /**
8574
+ * @description The plugin's name: lowercase words and numbers joined by hyphens.
8575
+ * @example tickets
8576
+ */
8577
+ name: string;
8578
+ /**
8579
+ * @description The name people see for the plugin.
8580
+ * @example Tickets
8581
+ */
8582
+ title: string;
8583
+ /**
8584
+ * @description What the plugin adds, in a sentence.
8585
+ * @example Tickets for tracking work.
8586
+ */
8587
+ description: string;
8588
+ /**
8589
+ * @description The icon the plugin is shown by, an Iconify icon ID.
8590
+ * @example lucide:ticket
8591
+ */
8592
+ mark: string;
8593
+ /**
8594
+ * @description Who made the plugin.
8595
+ * @example Marfa
8596
+ */
8597
+ maker: string;
8598
+ /**
8599
+ * @description The oldest Marfa release the plugin works with.
8600
+ * @example 0.0.90
8601
+ */
8602
+ marfa: string;
8603
+ /**
8604
+ * @description The plugin's version. `0.0.0` is a bundle built from a source folder with no version.
8605
+ * @example 1.2.0
8606
+ */
8607
+ version: string;
8608
+ /** @description The type definitions the plugin installs, each as `POST /types` takes it, with its `guidance`. */
8609
+ types: {
8610
+ [key: string]: unknown;
8611
+ }[];
8612
+ /** @description The edge types the plugin installs, each as `POST /edge-types` takes it. */
8613
+ edge_types: {
8614
+ [key: string]: unknown;
8615
+ }[];
8616
+ /** @description The plugin's connector. Marfa keeps it with the install record as it is. */
8617
+ connector?: {
8618
+ [key: string]: unknown;
8619
+ };
8620
+ };
8621
+ /** @description An installed plugin. */
8622
+ Plugin: {
8623
+ /**
8624
+ * @description The plugin's name: lowercase words and numbers joined by hyphens.
8625
+ * @example tickets
8626
+ */
8627
+ name: string;
8628
+ /**
8629
+ * @description The name people see for the plugin.
8630
+ * @example Tickets
8631
+ */
8632
+ title: string;
8633
+ /**
8634
+ * @description What the plugin adds, in a sentence.
8635
+ * @example Tickets for tracking work.
8636
+ */
8637
+ description: string;
8638
+ /**
8639
+ * @description The icon the plugin is shown by, an Iconify icon ID.
8640
+ * @example lucide:ticket
8641
+ */
8642
+ mark: string;
8643
+ /**
8644
+ * @description Who made the plugin.
8645
+ * @example Marfa
8646
+ */
8647
+ maker: string;
8648
+ /**
8649
+ * @description The oldest Marfa release the plugin works with.
8650
+ * @example 0.0.90
8651
+ */
8652
+ marfa: string;
8653
+ /**
8654
+ * @description The plugin's version. `0.0.0` is a bundle built from a source folder with no version.
8655
+ * @example 1.2.0
8656
+ */
8657
+ version: string;
8658
+ /** @description The IDs of the types the plugin installed, at any version. */
8659
+ types: string[];
8660
+ /** @description The IDs of the edge types any installed version of the plugin brought that the instance still holds. */
8661
+ edge_types: string[];
8662
+ /** @description The installed version's connector, as its bundle gave it, or `null`. */
8663
+ connector: {
8664
+ [key: string]: unknown;
8665
+ } | null;
8666
+ /**
8667
+ * @description The SHA-256 of the bundle's bytes as the install that wrote this version received them, in lowercase hexadecimal.
8668
+ * @example 9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08
8669
+ */
8670
+ fingerprint: string;
8671
+ /**
8672
+ * Format: date-time
8673
+ * @description When the plugin was first installed.
8674
+ * @example 2026-11-21T10:00:00.000Z
8675
+ */
8676
+ installed_at: string;
8677
+ /** @description The sign-in that first installed the plugin, or `null` when it is not known. */
8678
+ installed_by: components["schemas"]["PluginInstaller"] | null;
8679
+ /**
8680
+ * Format: date-time
8681
+ * @description When the installed version last changed.
8682
+ * @example 2026-11-21T12:00:00.000Z
8683
+ */
8684
+ updated_at: string;
8685
+ };
8686
+ /** @description The installed plugin, and what installing did. */
8687
+ PluginInstalled: {
8688
+ /**
8689
+ * @description The plugin's name: lowercase words and numbers joined by hyphens.
8690
+ * @example tickets
8691
+ */
8692
+ name: string;
8693
+ /**
8694
+ * @description The name people see for the plugin.
8695
+ * @example Tickets
8696
+ */
8697
+ title: string;
8698
+ /**
8699
+ * @description What the plugin adds, in a sentence.
8700
+ * @example Tickets for tracking work.
8701
+ */
8702
+ description: string;
8703
+ /**
8704
+ * @description The icon the plugin is shown by, an Iconify icon ID.
8705
+ * @example lucide:ticket
8706
+ */
8707
+ mark: string;
8708
+ /**
8709
+ * @description Who made the plugin.
8710
+ * @example Marfa
8711
+ */
8712
+ maker: string;
8713
+ /**
8714
+ * @description The oldest Marfa release the plugin works with.
8715
+ * @example 0.0.90
8716
+ */
8717
+ marfa: string;
8718
+ /**
8719
+ * @description The plugin's version. `0.0.0` is a bundle built from a source folder with no version.
8720
+ * @example 1.2.0
8721
+ */
8722
+ version: string;
8723
+ /** @description The IDs of the types the plugin installed, at any version. */
8724
+ types: string[];
8725
+ /** @description The IDs of the edge types any installed version of the plugin brought that the instance still holds. */
8726
+ edge_types: string[];
8727
+ /** @description The installed version's connector, as its bundle gave it, or `null`. */
8728
+ connector: {
8729
+ [key: string]: unknown;
8730
+ } | null;
8731
+ /**
8732
+ * @description The SHA-256 of the bundle's bytes as the install that wrote this version received them, in lowercase hexadecimal.
8733
+ * @example 9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08
8734
+ */
8735
+ fingerprint: string;
8736
+ /**
8737
+ * Format: date-time
8738
+ * @description When the plugin was first installed.
8739
+ * @example 2026-11-21T10:00:00.000Z
8740
+ */
8741
+ installed_at: string;
8742
+ /** @description The sign-in that first installed the plugin, or `null` when it is not known. */
8743
+ installed_by: components["schemas"]["PluginInstaller"] | null;
8744
+ /**
8745
+ * Format: date-time
8746
+ * @description When the installed version last changed.
8747
+ * @example 2026-11-21T12:00:00.000Z
8748
+ */
8749
+ updated_at: string;
8750
+ /**
8751
+ * @description `installed` for a new plugin, `updated` for a newer version, or `unchanged` when this version is already installed.
8752
+ * @enum {string}
8753
+ */
8754
+ outcome: "installed" | "updated" | "unchanged";
8755
+ };
8756
+ /** @description What removing the plugin removed, and what it kept. */
8757
+ PluginRemoved: {
8758
+ /** @description The install record Marfa removed. */
8759
+ removed: {
8760
+ /**
8761
+ * @description The plugin's name: lowercase words and numbers joined by hyphens.
8762
+ * @example tickets
8763
+ */
8764
+ name: string;
8765
+ /**
8766
+ * @description The plugin's version. `0.0.0` is a bundle built from a source folder with no version.
8767
+ * @example 1.2.0
8768
+ */
8769
+ version: string;
8770
+ };
8771
+ /** @description What stays. */
8772
+ kept: {
8773
+ /** @description The types the plugin installed that the instance still holds, which stay with their items and provenance. */
8774
+ types: string[];
8775
+ /** @description The edge types any installed version of the plugin brought that the instance still holds, which stay with their edges. */
8776
+ edge_types: string[];
8777
+ };
8778
+ };
8779
+ /** @description An error response. */
8780
+ PluginNotFoundRefusal: {
8781
+ /** @description What went wrong. */
8782
+ error: {
8783
+ /**
8784
+ * @description A machine-readable code for the error. Use it in your logic.
8785
+ * @enum {string}
8786
+ */
8787
+ code: "plugin_not_found";
8788
+ /** @description A description of the error for a person to read. It can change, so don't match on it. */
8789
+ message: string;
8790
+ /** @description More about the error, such as the field it concerns. Each code defines its own details. */
8791
+ details?: {
8792
+ [key: string]: unknown;
8793
+ };
8794
+ };
8795
+ };
8796
+ /** @description An error response. */
8797
+ PluginBundleRefusal: {
8798
+ /** @description What went wrong. */
8799
+ error: {
8800
+ /**
8801
+ * @description A machine-readable code for the error. Use it in your logic.
8802
+ * @enum {string}
8803
+ */
8804
+ code: "validation_error" | "missing_required_field" | "invalid_schema" | "inheritance_violation" | "property_shadows_field";
8805
+ /** @description A description of the error for a person to read. It can change, so don't match on it. */
8806
+ message: string;
8807
+ /** @description More about the error, such as the field it concerns. Each code defines its own details. */
8808
+ details?: {
8809
+ [key: string]: unknown;
8810
+ };
8811
+ };
8812
+ };
8813
+ /** @description An error response. */
8814
+ PluginInstallForbiddenRefusal: {
8815
+ /** @description What went wrong. */
8816
+ error: {
8817
+ /**
8818
+ * @description A machine-readable code for the error. Use it in your logic.
8819
+ * @enum {string}
8820
+ */
8821
+ code: "forbidden" | "type_not_permitted" | "edge_type_not_permitted";
8822
+ /** @description A description of the error for a person to read. It can change, so don't match on it. */
8823
+ message: string;
8824
+ /** @description More about the error, such as the field it concerns. Each code defines its own details. */
8825
+ details?: {
8826
+ [key: string]: unknown;
8827
+ };
8828
+ };
8829
+ };
8830
+ /** @description An error response. */
8831
+ PluginInstallConflictRefusal: {
8832
+ /** @description What went wrong. */
8833
+ error: {
8834
+ /**
8835
+ * @description A machine-readable code for the error. Use it in your logic.
8836
+ * @enum {string}
8837
+ */
8838
+ code: "conflict" | "type_exists" | "plugin_child_conflict" | "plugin_narrows" | "plugin_needs_newer_server" | "plugin_version_older" | "instance_changed";
8839
+ /** @description A description of the error for a person to read. It can change, so don't match on it. */
8840
+ message: string;
8841
+ /** @description More about the error, such as the field it concerns. Each code defines its own details. */
8842
+ details?: {
8843
+ [key: string]: unknown;
8844
+ };
8845
+ };
8846
+ };
8847
+ /** @description The sign-in that first installed a plugin. */
8848
+ PluginInstaller: {
8849
+ /**
8850
+ * @description The recorded sign-in kind. `browser`: the owner's browser. `app`: an app the owner approved. `key`: an API key. `local`: the local command on the server's machine.
8851
+ * @enum {string}
8852
+ */
8853
+ kind: "browser" | "app" | "key" | "local";
8854
+ /**
8855
+ * @description The ID the sign-in has in `GET /owner/sign-ins`, `local` for the local command, or an app's client ID if its sign-in was already gone. It stays the same after the sign-in ends.
8856
+ * @example 01a1011b-b5e5-7be6-8f3b-77492475b5a4
8857
+ */
8858
+ id: string;
8859
+ /**
8860
+ * @description The sign-in's name when the action happened, as `GET /owner/sign-ins` showed it. At most 200 characters.
8861
+ * @example Safari on macOS
8862
+ */
8863
+ name: string;
8864
+ };
8865
+ /** @description A page holding every installed plugin. */
8866
+ PluginPage: {
8867
+ /** @description Every installed plugin, by name. */
8868
+ data: components["schemas"]["Plugin"][];
8869
+ /** @description Always `null`: Marfa returns every installed plugin in one page. */
8870
+ next_cursor: string | null;
8871
+ };
8872
+ /** @description An `app.<vendor>` namespace and who holds it. Only the app that holds it registers types under it, and that app reaches the namespace's items without a scope that names them. While the owner holds it, no app does until the owner gives it to one. */
8873
+ AppVendor: {
8874
+ /**
8875
+ * @description The namespace, as `app.<vendor>`.
8876
+ * @example app.acme
8877
+ */
8878
+ vendor: string;
8879
+ /**
8880
+ * @description The OAuth client ID of the app that holds the namespace, or `null` while the owner holds it because no one app is known to have made its types.
8881
+ * @example 01a10127-d974-7c54-8cc4-5c5581d45c4c
8882
+ */
8883
+ client_id: string | null;
8884
+ /**
8885
+ * Format: date-time
8886
+ * @description When the namespace was first held, or when it was given to the app that holds it.
8887
+ * @example 2026-11-21T09:30:00.000Z
8888
+ */
8889
+ claimed_at: string;
8890
+ };
8891
+ /** @description A page holding every held `app.<vendor>` namespace. */
8892
+ AppVendorPage: {
8893
+ /** @description Every held namespace, by name. */
8894
+ data: components["schemas"]["AppVendor"][];
8895
+ /** @description Always `null`: every binding comes in one page. */
8896
+ next_cursor: null;
8897
+ };
8465
8898
  };
8466
8899
  responses: never;
8467
8900
  parameters: never;
@@ -8518,7 +8951,7 @@ interface operations {
8518
8951
  limit?: number;
8519
8952
  /** @description The `next_cursor` from the previous page. Leave it out to get the first page. */
8520
8953
  cursor?: string;
8521
- /** @description Comma-separated extras. `edges`, `metadata` and `extensions` add that data to each item. `system` also returns `system.*` items, which are left out by default; a `system.` type filter does the same. */
8954
+ /** @description Comma-separated extras. `edges`, `metadata` and `extensions` add that data to each item. `hidden` also returns `system.*` and `app.*` items, which are left out by default; a type filter naming one does the same. */
8522
8955
  include?: string;
8523
8956
  };
8524
8957
  header?: {
@@ -11132,7 +11565,7 @@ interface operations {
11132
11565
  * }
11133
11566
  */
11134
11567
  "application/json": {
11135
- /** @description The items found, in any state, in the order the request named their keys, each once. Items you can't read, and `system.*` items, are left out. */
11568
+ /** @description The items found, in any state, in the order the request named their keys, each once. Items you can't read, and `system.*` and `app.*` items, are left out. */
11136
11569
  data: components["schemas"]["Item"][];
11137
11570
  /** @description The tombstones under `type` for the keys named, in the order named. Empty when you look up by `ids`. */
11138
11571
  tombstones: components["schemas"]["Tombstone"][];
@@ -11293,7 +11726,7 @@ interface operations {
11293
11726
  requestBody: {
11294
11727
  content: {
11295
11728
  "application/json": {
11296
- /** @description The titles to look for, at most 200, each at most 1000 UTF-16 code units. Case, Unicode form and surrounding white space do not matter. */
11729
+ /** @description The titles to look for, at most 200, each at most 1,000 Unicode characters, not UTF-16 code units. Case, Unicode form and surrounding white space do not matter. */
11297
11730
  names: string[];
11298
11731
  };
11299
11732
  };
@@ -11340,7 +11773,7 @@ interface operations {
11340
11773
  };
11341
11774
  /**
11342
11775
  * @description - `missing_required_field`: `names` is missing.
11343
- * - `validation_error`: `names` is not a list of strings, has more than 200 names, has a name longer than 1,000 UTF-16 code units, or the body has a field this endpoint doesn't take.
11776
+ * - `validation_error`: `names` is not a list of strings, has more than 200 names, has a name longer than 1,000 Unicode characters, or the body has a field this endpoint doesn't take.
11344
11777
  */
11345
11778
  400: {
11346
11779
  headers: {
@@ -11494,8 +11927,8 @@ interface operations {
11494
11927
  "application/json": {
11495
11928
  /** @description The IDs of the items to read, at most 100. */
11496
11929
  ids: string[];
11497
- /** @description `edges`, `metadata` and `extensions` add that data to each item. `system` also returns `system.*` items, which are left out by default. */
11498
- include?: ("edges" | "metadata" | "extensions" | "system")[];
11930
+ /** @description `edges`, `metadata` and `extensions` add that data to each item. `hidden` also returns `system.*` and `app.*` items, which are left out by default. */
11931
+ include?: ("edges" | "metadata" | "extensions" | "hidden")[];
11499
11932
  };
11500
11933
  };
11501
11934
  };
@@ -12246,8 +12679,8 @@ interface operations {
12246
12679
  updated_after?: string;
12247
12680
  /** @description Only return items changed before this time. It doesn't change the ordering, so it works with any `sort`. */
12248
12681
  updated_before?: string;
12249
- /** @description `system` counts `system.*` items too, which are left out by default. A `type` filter in the `system.` namespace opts in on its own. */
12250
- include?: "system";
12682
+ /** @description `hidden` counts `system.*` and `app.*` items too, which are left out by default. A `type` filter naming one opts in on its own. */
12683
+ include?: "hidden";
12251
12684
  };
12252
12685
  header?: never;
12253
12686
  path?: never;
@@ -18385,7 +18818,7 @@ interface operations {
18385
18818
  source?: string;
18386
18819
  /** @description Only return items in this tier. Omit it or send `all` for both tiers. */
18387
18820
  tier?: "library" | "feed" | "all";
18388
- /** @description Comma-separated extras. `system` also returns `system.*` items, which are left out by default. A `system.` type filter does the same. */
18821
+ /** @description Comma-separated extras. `hidden` also returns `system.*` and `app.*` items, which are left out by default. A type filter naming one does the same. */
18389
18822
  include?: string;
18390
18823
  /** @description Comma-separated tags. Only return items that carry all of them. At most 100 distinct tags, each at most 128 characters. */
18391
18824
  tags?: string;
@@ -18571,24 +19004,20 @@ interface operations {
18571
19004
  };
18572
19005
  };
18573
19006
  };
18574
- listTypes: {
19007
+ listPlugins: {
18575
19008
  parameters: {
18576
19009
  query?: never;
18577
- header?: {
18578
- /** @description The reach from a copy stream, for a working copy. Marfa reads the current data and checks the reach in one snapshot, and returns `409 reach_changed` if it has changed. Leave it out for an ordinary read. */
18579
- "X-Marfa-Reach"?: string;
18580
- };
19010
+ header?: never;
18581
19011
  path?: never;
18582
19012
  cookie?: never;
18583
19013
  };
18584
19014
  requestBody?: never;
18585
19015
  responses: {
18586
- /** @description Returns every type. A type lists only its own fields, so resolve the rest through `parent`. */
19016
+ /** @description Returns the installed plugins. */
18587
19017
  200: {
18588
19018
  headers: {
18589
19019
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
18590
19020
  "X-Request-ID": components["headers"]["X-Request-ID"];
18591
- "X-Marfa-Reach": components["headers"]["X-Marfa-Reach"];
18592
19021
  [name: string]: unknown;
18593
19022
  };
18594
19023
  content: {
@@ -18596,74 +19025,35 @@ interface operations {
18596
19025
  * @example {
18597
19026
  * "data": [
18598
19027
  * {
18599
- * "id": "acme.contact",
18600
- * "label": "Contact",
18601
- * "version": 0,
18602
- * "fields": {
18603
- * "name": {
18604
- * "type": "string",
18605
- * "label": "Name",
18606
- * "required": true
18607
- * }
18608
- * },
18609
- * "display_hints": {
18610
- * "title_field": "name"
18611
- * },
18612
- * "plural": "Contacts",
18613
- * "own_roles": [],
18614
- * "provenance": {
18615
- * "origin": "user",
18616
- * "created_by": {
18617
- * "kind": "key",
18618
- * "id": "01a1011b-b5e5-7be6-8f3b-77492475b5a4",
18619
- * "name": "CRM sync"
18620
- * }
18621
- * }
18622
- * },
18623
- * {
18624
- * "id": "acme.deal",
18625
- * "label": "Deal",
18626
- * "version": 0,
18627
- * "fields": {
18628
- * "name": {
18629
- * "type": "string",
18630
- * "label": "Name",
18631
- * "required": true
18632
- * },
18633
- * "amount": {
18634
- * "type": "number",
18635
- * "label": "Amount"
18636
- * },
18637
- * "stage": {
18638
- * "type": "enum",
18639
- * "label": "Stage",
18640
- * "enum_values": [
18641
- * "lead",
18642
- * "won",
18643
- * "lost"
18644
- * ]
18645
- * }
18646
- * },
18647
- * "display_hints": {
18648
- * "title_field": "name"
19028
+ * "name": "tickets",
19029
+ * "title": "Tickets",
19030
+ * "description": "Tickets for tracking work.",
19031
+ * "mark": "lucide:ticket",
19032
+ * "maker": "Marfa",
19033
+ * "marfa": "0.0.90",
19034
+ * "version": "1.2.0",
19035
+ * "types": [
19036
+ * "common.ticket",
19037
+ * "common.ticket.spike"
19038
+ * ],
19039
+ * "edge_types": [
19040
+ * "blocks"
19041
+ * ],
19042
+ * "connector": null,
19043
+ * "fingerprint": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
19044
+ * "installed_at": "2026-11-21T10:00:00.000Z",
19045
+ * "installed_by": {
19046
+ * "kind": "key",
19047
+ * "id": "01a1011b-b5e5-7be6-8f3b-77492475b5a4",
19048
+ * "name": "laptop"
18649
19049
  * },
18650
- * "description": "A sales deal.",
18651
- * "plural": "Deals",
18652
- * "own_roles": [],
18653
- * "provenance": {
18654
- * "origin": "user",
18655
- * "created_by": {
18656
- * "kind": "key",
18657
- * "id": "01a1011b-b5e5-7be6-8f3b-77492475b5a4",
18658
- * "name": "CRM sync"
18659
- * }
18660
- * }
19050
+ * "updated_at": "2026-11-21T12:00:00.000Z"
18661
19051
  * }
18662
19052
  * ],
18663
19053
  * "next_cursor": null
18664
19054
  * }
18665
19055
  */
18666
- "application/json": components["schemas"]["TypeDefinitionPage"];
19056
+ "application/json": components["schemas"]["PluginPage"];
18667
19057
  };
18668
19058
  };
18669
19059
  /** @description - `validation_error`: the query has a parameter this endpoint doesn't take. */
@@ -18766,7 +19156,7 @@ interface operations {
18766
19156
  };
18767
19157
  };
18768
19158
  };
18769
- registerType: {
19159
+ installPlugin: {
18770
19160
  parameters: {
18771
19161
  query?: never;
18772
19162
  header?: {
@@ -18778,12 +19168,12 @@ interface operations {
18778
19168
  };
18779
19169
  requestBody: {
18780
19170
  content: {
18781
- "application/json": components["schemas"]["TypeDefinitionInput"];
19171
+ "application/json": components["schemas"]["PluginBundle"];
18782
19172
  };
18783
19173
  };
18784
19174
  responses: {
18785
- /** @description Returns the new type. */
18786
- 201: {
19175
+ /** @description Returns the plugin after a newer version only added to it, or as it is when this version is already installed. */
19176
+ 200: {
18787
19177
  headers: {
18788
19178
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
18789
19179
  "X-Request-ID": components["headers"]["X-Request-ID"];
@@ -18792,39 +19182,77 @@ interface operations {
18792
19182
  content: {
18793
19183
  /**
18794
19184
  * @example {
18795
- * "id": "acme.contact",
18796
- * "label": "Contact",
18797
- * "version": 0,
18798
- * "fields": {
18799
- * "name": {
18800
- * "type": "string",
18801
- * "label": "Name",
18802
- * "required": true
18803
- * }
19185
+ * "name": "tickets",
19186
+ * "title": "Tickets",
19187
+ * "description": "Tickets for tracking work.",
19188
+ * "mark": "lucide:ticket",
19189
+ * "maker": "Marfa",
19190
+ * "marfa": "0.0.90",
19191
+ * "version": "1.2.0",
19192
+ * "types": [
19193
+ * "common.ticket",
19194
+ * "common.ticket.spike"
19195
+ * ],
19196
+ * "edge_types": [
19197
+ * "blocks"
19198
+ * ],
19199
+ * "connector": null,
19200
+ * "fingerprint": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
19201
+ * "installed_at": "2026-11-21T10:00:00.000Z",
19202
+ * "installed_by": {
19203
+ * "kind": "key",
19204
+ * "id": "01a1011b-b5e5-7be6-8f3b-77492475b5a4",
19205
+ * "name": "laptop"
18804
19206
  * },
18805
- * "plural": "Contacts",
18806
- * "display_hints": {
18807
- * "title_field": "name"
19207
+ * "updated_at": "2026-11-21T12:00:00.000Z",
19208
+ * "outcome": "updated"
19209
+ * }
19210
+ */
19211
+ "application/json": components["schemas"]["PluginInstalled"];
19212
+ };
19213
+ };
19214
+ /** @description Returns the newly installed plugin. */
19215
+ 201: {
19216
+ headers: {
19217
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
19218
+ "X-Request-ID": components["headers"]["X-Request-ID"];
19219
+ [name: string]: unknown;
19220
+ };
19221
+ content: {
19222
+ /**
19223
+ * @example {
19224
+ * "name": "tickets",
19225
+ * "title": "Tickets",
19226
+ * "description": "Tickets for tracking work.",
19227
+ * "mark": "lucide:ticket",
19228
+ * "maker": "Marfa",
19229
+ * "marfa": "0.0.90",
19230
+ * "version": "1.0.0",
19231
+ * "types": [
19232
+ * "common.ticket",
19233
+ * "common.ticket.spike"
19234
+ * ],
19235
+ * "edge_types": [
19236
+ * "blocks"
19237
+ * ],
19238
+ * "connector": null,
19239
+ * "fingerprint": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
19240
+ * "installed_at": "2026-11-21T10:00:00.000Z",
19241
+ * "installed_by": {
19242
+ * "kind": "key",
19243
+ * "id": "01a1011b-b5e5-7be6-8f3b-77492475b5a4",
19244
+ * "name": "laptop"
18808
19245
  * },
18809
- * "provenance": {
18810
- * "origin": "user",
18811
- * "created_by": {
18812
- * "kind": "key",
18813
- * "id": "01a1011b-b5e5-7be6-8f3b-77492475b5a4",
18814
- * "name": "CRM sync"
18815
- * }
18816
- * }
19246
+ * "updated_at": "2026-11-21T10:00:00.000Z",
19247
+ * "outcome": "installed"
18817
19248
  * }
18818
19249
  */
18819
- "application/json": components["schemas"]["RegisteredType"];
19250
+ "application/json": components["schemas"]["PluginInstalled"];
18820
19251
  };
18821
19252
  };
18822
19253
  /**
18823
- * @description - `missing_required_field`: `fields` is missing.
18824
- * - `validation_error`: `id` is malformed, or `parent` isn't registered or makes too deep a chain.
18825
- * - `invalid_schema`: the schema is invalid, or has an unknown key or overlong text (`details.errors` names each path).
18826
- * - `property_shadows_field`: a field is named like one every item has.
18827
- * - `inheritance_violation`: the type reshapes an inherited field.
19254
+ * @description - `validation_error`: the bundle has a key it does not hold, a field of the wrong shape, an ID named twice, or an edge type the rules refuse. `details.errors` names each.
19255
+ * - `missing_required_field`, `invalid_schema`, `inheritance_violation`, `property_shadows_field`: a type is refused as `POST /types` refuses it. `details.type_id` names it.
18828
19256
  */
18829
19257
  400: {
18830
19258
  headers: {
@@ -18834,7 +19262,7 @@ interface operations {
18834
19262
  [name: string]: unknown;
18835
19263
  };
18836
19264
  content: {
18837
- "application/json": components["schemas"]["InheritanceViolationOrInvalidSchemaOrMissingRequiredFieldOrPropertyShadowsFieldOrValidationErrorRefusal"];
19265
+ "application/json": components["schemas"]["PluginBundleRefusal"];
18838
19266
  };
18839
19267
  };
18840
19268
  /** @description `unauthorized`: the request has no credential, or its credential is not valid. For a key that has expired, `details.expired_at` says when it expired. */
@@ -18850,8 +19278,9 @@ interface operations {
18850
19278
  };
18851
19279
  };
18852
19280
  /**
18853
- * @description - `forbidden`: you don't have `metadata.types:write`, the type has `guidance` and you lack `schema.write`, or the identifier is under `core.*`, `system.*` or `marfa.*`, which no credential can register.
18854
- * - `type_not_permitted`: your type map lacks write on the identifier or a non-platform `parent` (`details.grant` names it).
19281
+ * @description - `forbidden`: no `schema.write`, no `connectors.manage` for a `connector` (`details.required_scope`), a type under `core`, `system`, `marfa`, `app` or `user` (`details.namespace`), or app guidance.
19282
+ * - `type_not_permitted`: no write on a type of the bundle, or on a parent outside it that isn't shipped or under `common`.
19283
+ * - `edge_type_not_permitted`: no write on an edge type name of the bundle.
18855
19284
  */
18856
19285
  403: {
18857
19286
  headers: {
@@ -18861,7 +19290,7 @@ interface operations {
18861
19290
  [name: string]: unknown;
18862
19291
  };
18863
19292
  content: {
18864
- "application/json": components["schemas"]["ForbiddenOrTypeNotPermittedRefusal"];
19293
+ "application/json": components["schemas"]["PluginInstallForbiddenRefusal"];
18865
19294
  };
18866
19295
  };
18867
19296
  /** @description `request_timeout`: the request body didn't arrive whole within 180 seconds. Nothing changed, and Marfa closed the connection. Send the request again. A body larger than about 21 MiB can't arrive in that time over a 1 Mbit/s link, so send it in smaller requests. */
@@ -18877,8 +19306,12 @@ interface operations {
18877
19306
  };
18878
19307
  };
18879
19308
  /**
18880
- * @description - `type_exists`: a type has this identifier.
18881
- * - `link_taken`: two items that a forced delete left under this identifier hold the same value in the `link_field`.
19309
+ * @description - `plugin_needs_newer_server`: the bundle needs a later Marfa.
19310
+ * - `plugin_version_older`: a later version is installed.
19311
+ * - `type_exists`: a type exists that the plugin did not install.
19312
+ * - `plugin_narrows`: a type loses or narrows a member. See `details.changes`.
19313
+ * - `plugin_child_conflict`: a type below clashes. See `details.conflicts`.
19314
+ * - `conflict`: an edge type is held in another shape.
18882
19315
  */
18883
19316
  409: {
18884
19317
  headers: {
@@ -18888,7 +19321,7 @@ interface operations {
18888
19321
  [name: string]: unknown;
18889
19322
  };
18890
19323
  content: {
18891
- "application/json": components["schemas"]["LinkTakenOrTypeAlreadyExistsRefusal"] | components["schemas"]["InstanceChangedRefusal"];
19324
+ "application/json": components["schemas"]["PluginInstallConflictRefusal"];
18892
19325
  };
18893
19326
  };
18894
19327
  /** @description `contract_mismatch`: `X-Marfa-Contract` names another contract version than this instance speaks, or is not a whole number. Nothing was done. */
@@ -18967,19 +19400,19 @@ interface operations {
18967
19400
  };
18968
19401
  };
18969
19402
  };
18970
- getType: {
19403
+ getPlugin: {
18971
19404
  parameters: {
18972
19405
  query?: never;
18973
19406
  header?: never;
18974
19407
  path: {
18975
- /** @description The identifier of the type, such as `core.note`. */
18976
- id: string;
19408
+ /** @description The plugin's name. */
19409
+ name: string;
18977
19410
  };
18978
19411
  cookie?: never;
18979
19412
  };
18980
19413
  requestBody?: never;
18981
19414
  responses: {
18982
- /** @description Returns the type. */
19415
+ /** @description Returns the plugin. */
18983
19416
  200: {
18984
19417
  headers: {
18985
19418
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
@@ -18989,45 +19422,32 @@ interface operations {
18989
19422
  content: {
18990
19423
  /**
18991
19424
  * @example {
18992
- * "id": "acme.deal",
18993
- * "version": 0,
18994
- * "fields": {
18995
- * "name": {
18996
- * "type": "string",
18997
- * "label": "Name",
18998
- * "required": true
18999
- * },
19000
- * "amount": {
19001
- * "type": "number",
19002
- * "label": "Amount"
19003
- * },
19004
- * "stage": {
19005
- * "type": "enum",
19006
- * "label": "Stage",
19007
- * "enum_values": [
19008
- * "lead",
19009
- * "won",
19010
- * "lost"
19011
- * ]
19012
- * }
19013
- * },
19014
- * "label": "Deal",
19015
- * "plural": "Deals",
19016
- * "description": "A sales deal.",
19017
- * "display_hints": {
19018
- * "title_field": "name"
19425
+ * "name": "tickets",
19426
+ * "title": "Tickets",
19427
+ * "description": "Tickets for tracking work.",
19428
+ * "mark": "lucide:ticket",
19429
+ * "maker": "Marfa",
19430
+ * "marfa": "0.0.90",
19431
+ * "version": "1.2.0",
19432
+ * "types": [
19433
+ * "common.ticket",
19434
+ * "common.ticket.spike"
19435
+ * ],
19436
+ * "edge_types": [
19437
+ * "blocks"
19438
+ * ],
19439
+ * "connector": null,
19440
+ * "fingerprint": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
19441
+ * "installed_at": "2026-11-21T10:00:00.000Z",
19442
+ * "installed_by": {
19443
+ * "kind": "key",
19444
+ * "id": "01a1011b-b5e5-7be6-8f3b-77492475b5a4",
19445
+ * "name": "laptop"
19019
19446
  * },
19020
- * "provenance": {
19021
- * "origin": "user",
19022
- * "created_by": {
19023
- * "kind": "key",
19024
- * "id": "01a1011b-b5e5-7be6-8f3b-77492475b5a4",
19025
- * "name": "CRM sync"
19026
- * }
19027
- * }
19447
+ * "updated_at": "2026-11-21T12:00:00.000Z"
19028
19448
  * }
19029
19449
  */
19030
- "application/json": components["schemas"]["RegisteredType"];
19450
+ "application/json": components["schemas"]["Plugin"];
19031
19451
  };
19032
19452
  };
19033
19453
  /** @description - `validation_error`: the query has a parameter this endpoint doesn't take. */
@@ -19054,7 +19474,7 @@ interface operations {
19054
19474
  "application/json": components["schemas"]["UnauthorizedRefusal"];
19055
19475
  };
19056
19476
  };
19057
- /** @description `type_not_found`: no type has this identifier. */
19477
+ /** @description `plugin_not_found`: no plugin of this name is installed. */
19058
19478
  404: {
19059
19479
  headers: {
19060
19480
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
@@ -19063,10 +19483,10 @@ interface operations {
19063
19483
  [name: string]: unknown;
19064
19484
  };
19065
19485
  content: {
19066
- "application/json": components["schemas"]["TypeNotFoundRefusal"];
19486
+ "application/json": components["schemas"]["PluginNotFoundRefusal"];
19067
19487
  };
19068
19488
  };
19069
- /** @description `type_chain_unresolvable`: the type's stored definition does not read. `PUT /types/{id}` can correct it. */
19489
+ /** @description `reach_changed`: the reach in `X-Marfa-Reach` has changed. Rebuild the working copy. */
19070
19490
  409: {
19071
19491
  headers: {
19072
19492
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
@@ -19075,7 +19495,7 @@ interface operations {
19075
19495
  [name: string]: unknown;
19076
19496
  };
19077
19497
  content: {
19078
- "application/json": components["schemas"]["TypeChainUnresolvableRefusal"];
19498
+ "application/json": components["schemas"]["ReachChangedRefusal"];
19079
19499
  };
19080
19500
  };
19081
19501
  /** @description `contract_mismatch`: `X-Marfa-Contract` names another contract version than this instance speaks, or is not a whole number. Nothing was done. */
@@ -19142,29 +19562,22 @@ interface operations {
19142
19562
  };
19143
19563
  };
19144
19564
  };
19145
- replaceType: {
19565
+ removePlugin: {
19146
19566
  parameters: {
19147
- query?: {
19148
- /** @description `true` to keep the rows and values of tables and columns the replacement removes or retypes, instead of refusing it. */
19149
- force?: boolean;
19150
- };
19567
+ query?: never;
19151
19568
  header?: {
19152
19569
  /** @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. */
19153
19570
  "X-Marfa-Instance-Id"?: string;
19154
19571
  };
19155
19572
  path: {
19156
- /** @description The identifier of the type, such as `acme.deal`. */
19157
- id: string;
19573
+ /** @description The plugin's name. */
19574
+ name: string;
19158
19575
  };
19159
19576
  cookie?: never;
19160
19577
  };
19161
- requestBody: {
19162
- content: {
19163
- "application/json": components["schemas"]["TypeDefinitionUpdate"];
19164
- };
19165
- };
19578
+ requestBody?: never;
19166
19579
  responses: {
19167
- /** @description Returns the replaced type. */
19580
+ /** @description Returns what Marfa removed and what it kept. */
19168
19581
  200: {
19169
19582
  headers: {
19170
19583
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
@@ -19174,54 +19587,25 @@ interface operations {
19174
19587
  content: {
19175
19588
  /**
19176
19589
  * @example {
19177
- * "id": "acme.deal",
19178
- * "label": "Deal",
19179
- * "version": 1,
19180
- * "fields": {
19181
- * "name": {
19182
- * "type": "string",
19183
- * "label": "Name",
19184
- * "required": true
19185
- * },
19186
- * "amount": {
19187
- * "type": "number",
19188
- * "label": "Amount"
19189
- * },
19190
- * "stage": {
19191
- * "type": "enum",
19192
- * "label": "Stage",
19193
- * "enum_values": [
19194
- * "lead",
19195
- * "won",
19196
- * "lost"
19197
- * ]
19198
- * }
19590
+ * "removed": {
19591
+ * "name": "tickets",
19592
+ * "version": "1.2.0"
19199
19593
  * },
19200
- * "plural": "Deals",
19201
- * "description": "A sales deal.",
19202
- * "display_hints": {
19203
- * "title_field": "name"
19204
- * },
19205
- * "provenance": {
19206
- * "origin": "user",
19207
- * "created_by": {
19208
- * "kind": "key",
19209
- * "id": "01a1011b-b5e5-7be6-8f3b-77492475b5a4",
19210
- * "name": "CRM sync"
19211
- * }
19594
+ * "kept": {
19595
+ * "types": [
19596
+ * "common.ticket",
19597
+ * "common.ticket.spike"
19598
+ * ],
19599
+ * "edge_types": [
19600
+ * "blocks"
19601
+ * ]
19212
19602
  * }
19213
19603
  * }
19214
19604
  */
19215
- "application/json": components["schemas"]["RegisteredType"];
19605
+ "application/json": components["schemas"]["PluginRemoved"];
19216
19606
  };
19217
19607
  };
19218
- /**
19219
- * @description - `missing_required_field`: `fields` is missing.
19220
- * - `validation_error`: `id` is malformed, or `parent` isn't registered or chains badly.
19221
- * - `invalid_schema`: the schema is invalid, or has an unknown key or overlong text (`details.errors` names each path).
19222
- * - `property_shadows_field`: a field has the name of one every item has.
19223
- * - `inheritance_violation`: a field's shape differs in a parent or subtype.
19224
- */
19608
+ /** @description - `validation_error`: the query has a parameter this endpoint doesn't take. */
19225
19609
  400: {
19226
19610
  headers: {
19227
19611
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
@@ -19230,7 +19614,7 @@ interface operations {
19230
19614
  [name: string]: unknown;
19231
19615
  };
19232
19616
  content: {
19233
- "application/json": components["schemas"]["InheritanceViolationOrInvalidSchemaOrMissingRequiredFieldOrPropertyShadowsFieldOrValidationErrorRefusal"];
19617
+ "application/json": components["schemas"]["ValidationErrorRefusal"];
19234
19618
  };
19235
19619
  };
19236
19620
  /** @description `unauthorized`: the request has no credential, or its credential is not valid. For a key that has expired, `details.expired_at` says when it expired. */
@@ -19245,11 +19629,7 @@ interface operations {
19245
19629
  "application/json": components["schemas"]["UnauthorizedRefusal"];
19246
19630
  };
19247
19631
  };
19248
- /**
19249
- * @description - `forbidden`: you lack `schema.write` and `metadata.types:write`, or `details.changes` names changes needing `schema.write`.
19250
- * - `core_type_immutable`: Marfa ships this type.
19251
- * - `type_not_permitted`: your type map lacks write on the type or a new non-platform `parent` (`details.grant` names it).
19252
- */
19632
+ /** @description `forbidden`: you don't have `schema.write`. */
19253
19633
  403: {
19254
19634
  headers: {
19255
19635
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
@@ -19258,10 +19638,10 @@ interface operations {
19258
19638
  [name: string]: unknown;
19259
19639
  };
19260
19640
  content: {
19261
- "application/json": components["schemas"]["CoreTypeImmutableOrForbiddenOrTypeNotPermittedRefusal"];
19641
+ "application/json": components["schemas"]["ForbiddenRefusal"];
19262
19642
  };
19263
19643
  };
19264
- /** @description `type_not_found`: no type has this identifier. */
19644
+ /** @description `plugin_not_found`: no plugin of this name is installed. */
19265
19645
  404: {
19266
19646
  headers: {
19267
19647
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
@@ -19270,25 +19650,10 @@ interface operations {
19270
19650
  [name: string]: unknown;
19271
19651
  };
19272
19652
  content: {
19273
- "application/json": components["schemas"]["TypeNotFoundRefusal"];
19274
- };
19275
- };
19276
- /** @description `request_timeout`: the request body didn't arrive whole within 180 seconds. Nothing changed, and Marfa closed the connection. Send the request again. A body larger than about 21 MiB can't arrive in that time over a 1 Mbit/s link, so send it in smaller requests. */
19277
- 408: {
19278
- headers: {
19279
- "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
19280
- "X-Request-ID": components["headers"]["X-Request-ID"];
19281
- "X-Error-Code": components["headers"]["X-Error-Code"];
19282
- [name: string]: unknown;
19283
- };
19284
- content: {
19285
- "application/json": components["schemas"]["RequestTimeoutRefusal"];
19653
+ "application/json": components["schemas"]["PluginNotFoundRefusal"];
19286
19654
  };
19287
19655
  };
19288
- /**
19289
- * @description - `link_taken`: the replacement names a `link_field` in which two items of the type, in any state, hold the same value.
19290
- * - `type_in_use`: rows hold a table or column the replacement removes, or a column whose `type` it changes, and `force` isn't `true`. `details.tables` names each.
19291
- */
19656
+ /** @description `instance_changed`: another instance answers at this address. */
19292
19657
  409: {
19293
19658
  headers: {
19294
19659
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
@@ -19297,7 +19662,817 @@ interface operations {
19297
19662
  [name: string]: unknown;
19298
19663
  };
19299
19664
  content: {
19300
- "application/json": components["schemas"]["LinkTakenRefusal"] | components["schemas"]["TypeInUseRefusal"] | components["schemas"]["InstanceChangedRefusal"];
19665
+ "application/json": components["schemas"]["InstanceChangedRefusal"];
19666
+ };
19667
+ };
19668
+ /** @description `contract_mismatch`: `X-Marfa-Contract` names another contract version than this instance speaks, or is not a whole number. Nothing was done. */
19669
+ 412: {
19670
+ headers: {
19671
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
19672
+ "X-Request-ID": components["headers"]["X-Request-ID"];
19673
+ "X-Error-Code": components["headers"]["X-Error-Code"];
19674
+ [name: string]: unknown;
19675
+ };
19676
+ content: {
19677
+ "application/json": components["schemas"]["ContractMismatchRefusal"];
19678
+ };
19679
+ };
19680
+ /** @description `request_too_large`: the request body is larger than this instance accepts. */
19681
+ 413: {
19682
+ headers: {
19683
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
19684
+ "X-Request-ID": components["headers"]["X-Request-ID"];
19685
+ "X-Error-Code": components["headers"]["X-Error-Code"];
19686
+ [name: string]: unknown;
19687
+ };
19688
+ content: {
19689
+ "application/json": components["schemas"]["RequestTooLargeRefusal"];
19690
+ };
19691
+ };
19692
+ /** @description `rate_limited`: you sent too many requests. Wait for the number of seconds in `Retry-After`, then try again. */
19693
+ 429: {
19694
+ headers: {
19695
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
19696
+ "X-Request-ID": components["headers"]["X-Request-ID"];
19697
+ "X-Error-Code": components["headers"]["X-Error-Code"];
19698
+ "Retry-After": components["headers"]["Retry-After"];
19699
+ [name: string]: unknown;
19700
+ };
19701
+ content: {
19702
+ "application/json": components["schemas"]["RateLimitedRefusal"];
19703
+ };
19704
+ };
19705
+ /** @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. */
19706
+ 500: {
19707
+ headers: {
19708
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
19709
+ "X-Request-ID": components["headers"]["X-Request-ID"];
19710
+ "X-Error-Code": components["headers"]["X-Error-Code"];
19711
+ [name: string]: unknown;
19712
+ };
19713
+ content: {
19714
+ "application/json": components["schemas"]["InternalErrorRefusal"];
19715
+ };
19716
+ };
19717
+ /** @description `write_contention`: the database was busy, and Marfa couldn't complete the request in time. Nothing changed. Try the request again. While a restore runs, `details.reason` is `restore_running`. */
19718
+ 503: {
19719
+ headers: {
19720
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
19721
+ "X-Request-ID": components["headers"]["X-Request-ID"];
19722
+ "X-Error-Code": components["headers"]["X-Error-Code"];
19723
+ "Retry-After": components["headers"]["Retry-After"];
19724
+ [name: string]: unknown;
19725
+ };
19726
+ content: {
19727
+ "application/json": components["schemas"]["WriteContentionRefusal"];
19728
+ };
19729
+ };
19730
+ /** @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. */
19731
+ 507: {
19732
+ headers: {
19733
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
19734
+ "X-Request-ID": components["headers"]["X-Request-ID"];
19735
+ "X-Error-Code": components["headers"]["X-Error-Code"];
19736
+ [name: string]: unknown;
19737
+ };
19738
+ content: {
19739
+ "application/json": components["schemas"]["InsufficientStorageRefusal"];
19740
+ };
19741
+ };
19742
+ };
19743
+ };
19744
+ listTypes: {
19745
+ parameters: {
19746
+ query?: never;
19747
+ header?: {
19748
+ /** @description The reach from a copy stream, for a working copy. Marfa reads the current data and checks the reach in one snapshot, and returns `409 reach_changed` if it has changed. Leave it out for an ordinary read. */
19749
+ "X-Marfa-Reach"?: string;
19750
+ };
19751
+ path?: never;
19752
+ cookie?: never;
19753
+ };
19754
+ requestBody?: never;
19755
+ responses: {
19756
+ /** @description Returns every type. A type lists only its own fields, so resolve the rest through `parent`. */
19757
+ 200: {
19758
+ headers: {
19759
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
19760
+ "X-Request-ID": components["headers"]["X-Request-ID"];
19761
+ "X-Marfa-Reach": components["headers"]["X-Marfa-Reach"];
19762
+ [name: string]: unknown;
19763
+ };
19764
+ content: {
19765
+ /**
19766
+ * @example {
19767
+ * "data": [
19768
+ * {
19769
+ * "id": "acme.contact",
19770
+ * "label": "Contact",
19771
+ * "version": 0,
19772
+ * "fields": {
19773
+ * "name": {
19774
+ * "type": "string",
19775
+ * "label": "Name",
19776
+ * "required": true
19777
+ * }
19778
+ * },
19779
+ * "display_hints": {
19780
+ * "title_field": "name"
19781
+ * },
19782
+ * "plural": "Contacts",
19783
+ * "own_roles": [],
19784
+ * "provenance": {
19785
+ * "origin": "registered",
19786
+ * "plugin": null,
19787
+ * "created_by": {
19788
+ * "kind": "key",
19789
+ * "id": "01a1011b-b5e5-7be6-8f3b-77492475b5a4",
19790
+ * "name": "CRM sync"
19791
+ * }
19792
+ * }
19793
+ * },
19794
+ * {
19795
+ * "id": "acme.deal",
19796
+ * "label": "Deal",
19797
+ * "version": 0,
19798
+ * "fields": {
19799
+ * "name": {
19800
+ * "type": "string",
19801
+ * "label": "Name",
19802
+ * "required": true
19803
+ * },
19804
+ * "amount": {
19805
+ * "type": "number",
19806
+ * "label": "Amount"
19807
+ * },
19808
+ * "stage": {
19809
+ * "type": "enum",
19810
+ * "label": "Stage",
19811
+ * "enum_values": [
19812
+ * "lead",
19813
+ * "won",
19814
+ * "lost"
19815
+ * ]
19816
+ * }
19817
+ * },
19818
+ * "display_hints": {
19819
+ * "title_field": "name"
19820
+ * },
19821
+ * "description": "A sales deal.",
19822
+ * "plural": "Deals",
19823
+ * "own_roles": [],
19824
+ * "provenance": {
19825
+ * "origin": "registered",
19826
+ * "plugin": null,
19827
+ * "created_by": {
19828
+ * "kind": "key",
19829
+ * "id": "01a1011b-b5e5-7be6-8f3b-77492475b5a4",
19830
+ * "name": "CRM sync"
19831
+ * }
19832
+ * }
19833
+ * }
19834
+ * ],
19835
+ * "next_cursor": null
19836
+ * }
19837
+ */
19838
+ "application/json": components["schemas"]["TypeDefinitionPage"];
19839
+ };
19840
+ };
19841
+ /** @description - `validation_error`: the query has a parameter this endpoint doesn't take. */
19842
+ 400: {
19843
+ headers: {
19844
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
19845
+ "X-Request-ID": components["headers"]["X-Request-ID"];
19846
+ "X-Error-Code": components["headers"]["X-Error-Code"];
19847
+ [name: string]: unknown;
19848
+ };
19849
+ content: {
19850
+ "application/json": components["schemas"]["ValidationErrorRefusal"];
19851
+ };
19852
+ };
19853
+ /** @description `unauthorized`: the request has no credential, or its credential is not valid. For a key that has expired, `details.expired_at` says when it expired. */
19854
+ 401: {
19855
+ headers: {
19856
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
19857
+ "X-Request-ID": components["headers"]["X-Request-ID"];
19858
+ "X-Error-Code": components["headers"]["X-Error-Code"];
19859
+ [name: string]: unknown;
19860
+ };
19861
+ content: {
19862
+ "application/json": components["schemas"]["UnauthorizedRefusal"];
19863
+ };
19864
+ };
19865
+ /** @description `reach_changed`: the reach in `X-Marfa-Reach` has changed. Rebuild the working copy. */
19866
+ 409: {
19867
+ headers: {
19868
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
19869
+ "X-Request-ID": components["headers"]["X-Request-ID"];
19870
+ "X-Error-Code": components["headers"]["X-Error-Code"];
19871
+ [name: string]: unknown;
19872
+ };
19873
+ content: {
19874
+ "application/json": components["schemas"]["ReachChangedRefusal"];
19875
+ };
19876
+ };
19877
+ /** @description `contract_mismatch`: `X-Marfa-Contract` names another contract version than this instance speaks, or is not a whole number. Nothing was done. */
19878
+ 412: {
19879
+ headers: {
19880
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
19881
+ "X-Request-ID": components["headers"]["X-Request-ID"];
19882
+ "X-Error-Code": components["headers"]["X-Error-Code"];
19883
+ [name: string]: unknown;
19884
+ };
19885
+ content: {
19886
+ "application/json": components["schemas"]["ContractMismatchRefusal"];
19887
+ };
19888
+ };
19889
+ /** @description `rate_limited`: you sent too many requests. Wait for the number of seconds in `Retry-After`, then try again. */
19890
+ 429: {
19891
+ headers: {
19892
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
19893
+ "X-Request-ID": components["headers"]["X-Request-ID"];
19894
+ "X-Error-Code": components["headers"]["X-Error-Code"];
19895
+ "Retry-After": components["headers"]["Retry-After"];
19896
+ [name: string]: unknown;
19897
+ };
19898
+ content: {
19899
+ "application/json": components["schemas"]["RateLimitedRefusal"];
19900
+ };
19901
+ };
19902
+ /** @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. */
19903
+ 500: {
19904
+ headers: {
19905
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
19906
+ "X-Request-ID": components["headers"]["X-Request-ID"];
19907
+ "X-Error-Code": components["headers"]["X-Error-Code"];
19908
+ [name: string]: unknown;
19909
+ };
19910
+ content: {
19911
+ "application/json": components["schemas"]["InternalErrorRefusal"];
19912
+ };
19913
+ };
19914
+ /** @description `write_contention`: the database was busy, and Marfa couldn't complete the request in time. Nothing changed. Try the request again. While a restore runs, `details.reason` is `restore_running`. */
19915
+ 503: {
19916
+ headers: {
19917
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
19918
+ "X-Request-ID": components["headers"]["X-Request-ID"];
19919
+ "X-Error-Code": components["headers"]["X-Error-Code"];
19920
+ "Retry-After": components["headers"]["Retry-After"];
19921
+ [name: string]: unknown;
19922
+ };
19923
+ content: {
19924
+ "application/json": components["schemas"]["WriteContentionRefusal"];
19925
+ };
19926
+ };
19927
+ /** @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. */
19928
+ 507: {
19929
+ headers: {
19930
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
19931
+ "X-Request-ID": components["headers"]["X-Request-ID"];
19932
+ "X-Error-Code": components["headers"]["X-Error-Code"];
19933
+ [name: string]: unknown;
19934
+ };
19935
+ content: {
19936
+ "application/json": components["schemas"]["InsufficientStorageRefusal"];
19937
+ };
19938
+ };
19939
+ };
19940
+ };
19941
+ registerType: {
19942
+ parameters: {
19943
+ query?: never;
19944
+ header?: {
19945
+ /** @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. */
19946
+ "X-Marfa-Instance-Id"?: string;
19947
+ };
19948
+ path?: never;
19949
+ cookie?: never;
19950
+ };
19951
+ requestBody: {
19952
+ content: {
19953
+ "application/json": components["schemas"]["TypeDefinitionInput"];
19954
+ };
19955
+ };
19956
+ responses: {
19957
+ /** @description Returns the new type. */
19958
+ 201: {
19959
+ headers: {
19960
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
19961
+ "X-Request-ID": components["headers"]["X-Request-ID"];
19962
+ [name: string]: unknown;
19963
+ };
19964
+ content: {
19965
+ /**
19966
+ * @example {
19967
+ * "id": "acme.contact",
19968
+ * "label": "Contact",
19969
+ * "version": 0,
19970
+ * "fields": {
19971
+ * "name": {
19972
+ * "type": "string",
19973
+ * "label": "Name",
19974
+ * "required": true
19975
+ * }
19976
+ * },
19977
+ * "plural": "Contacts",
19978
+ * "display_hints": {
19979
+ * "title_field": "name"
19980
+ * },
19981
+ * "provenance": {
19982
+ * "origin": "registered",
19983
+ * "plugin": null,
19984
+ * "created_by": {
19985
+ * "kind": "key",
19986
+ * "id": "01a1011b-b5e5-7be6-8f3b-77492475b5a4",
19987
+ * "name": "CRM sync"
19988
+ * }
19989
+ * }
19990
+ * }
19991
+ */
19992
+ "application/json": components["schemas"]["RegisteredType"];
19993
+ };
19994
+ };
19995
+ /**
19996
+ * @description - `missing_required_field`: `fields` is missing.
19997
+ * - `validation_error`: `id` is malformed, or `parent` isn't registered or makes too deep a chain.
19998
+ * - `invalid_schema`: the schema is invalid, or has an unknown key or overlong text (`details.errors` names each path).
19999
+ * - `property_shadows_field`: a field is named like one every item has.
20000
+ * - `inheritance_violation`: the type reshapes an inherited field.
20001
+ */
20002
+ 400: {
20003
+ headers: {
20004
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
20005
+ "X-Request-ID": components["headers"]["X-Request-ID"];
20006
+ "X-Error-Code": components["headers"]["X-Error-Code"];
20007
+ [name: string]: unknown;
20008
+ };
20009
+ content: {
20010
+ "application/json": components["schemas"]["InheritanceViolationOrInvalidSchemaOrMissingRequiredFieldOrPropertyShadowsFieldOrValidationErrorRefusal"];
20011
+ };
20012
+ };
20013
+ /** @description `unauthorized`: the request has no credential, or its credential is not valid. For a key that has expired, `details.expired_at` says when it expired. */
20014
+ 401: {
20015
+ headers: {
20016
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
20017
+ "X-Request-ID": components["headers"]["X-Request-ID"];
20018
+ "X-Error-Code": components["headers"]["X-Error-Code"];
20019
+ [name: string]: unknown;
20020
+ };
20021
+ content: {
20022
+ "application/json": components["schemas"]["UnauthorizedRefusal"];
20023
+ };
20024
+ };
20025
+ /**
20026
+ * @description - `forbidden`: you lack `metadata.types:write`, guidance needs `schema.write`, the identifier is under `core.*`, `system.*`, `marfa.*` or `common.*` (install its plugin), or you are an app and another app or the owner holds its `app.<vendor>` namespace (`details.namespace`).
20027
+ * - `type_not_permitted`: your type map lacks write on the identifier or a non-platform `parent` (`details.grant` names it).
20028
+ */
20029
+ 403: {
20030
+ headers: {
20031
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
20032
+ "X-Request-ID": components["headers"]["X-Request-ID"];
20033
+ "X-Error-Code": components["headers"]["X-Error-Code"];
20034
+ [name: string]: unknown;
20035
+ };
20036
+ content: {
20037
+ "application/json": components["schemas"]["ForbiddenOrTypeNotPermittedRefusal"];
20038
+ };
20039
+ };
20040
+ /** @description `request_timeout`: the request body didn't arrive whole within 180 seconds. Nothing changed, and Marfa closed the connection. Send the request again. A body larger than about 21 MiB can't arrive in that time over a 1 Mbit/s link, so send it in smaller requests. */
20041
+ 408: {
20042
+ headers: {
20043
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
20044
+ "X-Request-ID": components["headers"]["X-Request-ID"];
20045
+ "X-Error-Code": components["headers"]["X-Error-Code"];
20046
+ [name: string]: unknown;
20047
+ };
20048
+ content: {
20049
+ "application/json": components["schemas"]["RequestTimeoutRefusal"];
20050
+ };
20051
+ };
20052
+ /**
20053
+ * @description - `type_exists`: a type has this identifier.
20054
+ * - `link_taken`: two items that a forced delete left under this identifier hold the same value in the `link_field`.
20055
+ */
20056
+ 409: {
20057
+ headers: {
20058
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
20059
+ "X-Request-ID": components["headers"]["X-Request-ID"];
20060
+ "X-Error-Code": components["headers"]["X-Error-Code"];
20061
+ [name: string]: unknown;
20062
+ };
20063
+ content: {
20064
+ "application/json": components["schemas"]["LinkTakenOrTypeAlreadyExistsRefusal"] | components["schemas"]["InstanceChangedRefusal"];
20065
+ };
20066
+ };
20067
+ /** @description `contract_mismatch`: `X-Marfa-Contract` names another contract version than this instance speaks, or is not a whole number. Nothing was done. */
20068
+ 412: {
20069
+ headers: {
20070
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
20071
+ "X-Request-ID": components["headers"]["X-Request-ID"];
20072
+ "X-Error-Code": components["headers"]["X-Error-Code"];
20073
+ [name: string]: unknown;
20074
+ };
20075
+ content: {
20076
+ "application/json": components["schemas"]["ContractMismatchRefusal"];
20077
+ };
20078
+ };
20079
+ /** @description `request_too_large`: the request body is larger than this instance accepts. */
20080
+ 413: {
20081
+ headers: {
20082
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
20083
+ "X-Request-ID": components["headers"]["X-Request-ID"];
20084
+ "X-Error-Code": components["headers"]["X-Error-Code"];
20085
+ [name: string]: unknown;
20086
+ };
20087
+ content: {
20088
+ "application/json": components["schemas"]["RequestTooLargeRefusal"];
20089
+ };
20090
+ };
20091
+ /** @description `rate_limited`: you sent too many requests. Wait for the number of seconds in `Retry-After`, then try again. */
20092
+ 429: {
20093
+ headers: {
20094
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
20095
+ "X-Request-ID": components["headers"]["X-Request-ID"];
20096
+ "X-Error-Code": components["headers"]["X-Error-Code"];
20097
+ "Retry-After": components["headers"]["Retry-After"];
20098
+ [name: string]: unknown;
20099
+ };
20100
+ content: {
20101
+ "application/json": components["schemas"]["RateLimitedRefusal"];
20102
+ };
20103
+ };
20104
+ /** @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. */
20105
+ 500: {
20106
+ headers: {
20107
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
20108
+ "X-Request-ID": components["headers"]["X-Request-ID"];
20109
+ "X-Error-Code": components["headers"]["X-Error-Code"];
20110
+ [name: string]: unknown;
20111
+ };
20112
+ content: {
20113
+ "application/json": components["schemas"]["InternalErrorRefusal"];
20114
+ };
20115
+ };
20116
+ /** @description `write_contention`: the database was busy, and Marfa couldn't complete the request in time. Nothing changed. Try the request again. While a restore runs, `details.reason` is `restore_running`. */
20117
+ 503: {
20118
+ headers: {
20119
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
20120
+ "X-Request-ID": components["headers"]["X-Request-ID"];
20121
+ "X-Error-Code": components["headers"]["X-Error-Code"];
20122
+ "Retry-After": components["headers"]["Retry-After"];
20123
+ [name: string]: unknown;
20124
+ };
20125
+ content: {
20126
+ "application/json": components["schemas"]["WriteContentionRefusal"];
20127
+ };
20128
+ };
20129
+ /** @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. */
20130
+ 507: {
20131
+ headers: {
20132
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
20133
+ "X-Request-ID": components["headers"]["X-Request-ID"];
20134
+ "X-Error-Code": components["headers"]["X-Error-Code"];
20135
+ [name: string]: unknown;
20136
+ };
20137
+ content: {
20138
+ "application/json": components["schemas"]["InsufficientStorageRefusal"];
20139
+ };
20140
+ };
20141
+ };
20142
+ };
20143
+ getType: {
20144
+ parameters: {
20145
+ query?: never;
20146
+ header?: never;
20147
+ path: {
20148
+ /** @description The identifier of the type, such as `core.note`. */
20149
+ id: string;
20150
+ };
20151
+ cookie?: never;
20152
+ };
20153
+ requestBody?: never;
20154
+ responses: {
20155
+ /** @description Returns the type. */
20156
+ 200: {
20157
+ headers: {
20158
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
20159
+ "X-Request-ID": components["headers"]["X-Request-ID"];
20160
+ [name: string]: unknown;
20161
+ };
20162
+ content: {
20163
+ /**
20164
+ * @example {
20165
+ * "id": "acme.deal",
20166
+ * "version": 0,
20167
+ * "fields": {
20168
+ * "name": {
20169
+ * "type": "string",
20170
+ * "label": "Name",
20171
+ * "required": true
20172
+ * },
20173
+ * "amount": {
20174
+ * "type": "number",
20175
+ * "label": "Amount"
20176
+ * },
20177
+ * "stage": {
20178
+ * "type": "enum",
20179
+ * "label": "Stage",
20180
+ * "enum_values": [
20181
+ * "lead",
20182
+ * "won",
20183
+ * "lost"
20184
+ * ]
20185
+ * }
20186
+ * },
20187
+ * "label": "Deal",
20188
+ * "plural": "Deals",
20189
+ * "description": "A sales deal.",
20190
+ * "display_hints": {
20191
+ * "title_field": "name"
20192
+ * },
20193
+ * "provenance": {
20194
+ * "origin": "registered",
20195
+ * "plugin": null,
20196
+ * "created_by": {
20197
+ * "kind": "key",
20198
+ * "id": "01a1011b-b5e5-7be6-8f3b-77492475b5a4",
20199
+ * "name": "CRM sync"
20200
+ * }
20201
+ * }
20202
+ * }
20203
+ */
20204
+ "application/json": components["schemas"]["RegisteredType"];
20205
+ };
20206
+ };
20207
+ /** @description - `validation_error`: the query has a parameter this endpoint doesn't take. */
20208
+ 400: {
20209
+ headers: {
20210
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
20211
+ "X-Request-ID": components["headers"]["X-Request-ID"];
20212
+ "X-Error-Code": components["headers"]["X-Error-Code"];
20213
+ [name: string]: unknown;
20214
+ };
20215
+ content: {
20216
+ "application/json": components["schemas"]["ValidationErrorRefusal"];
20217
+ };
20218
+ };
20219
+ /** @description `unauthorized`: the request has no credential, or its credential is not valid. For a key that has expired, `details.expired_at` says when it expired. */
20220
+ 401: {
20221
+ headers: {
20222
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
20223
+ "X-Request-ID": components["headers"]["X-Request-ID"];
20224
+ "X-Error-Code": components["headers"]["X-Error-Code"];
20225
+ [name: string]: unknown;
20226
+ };
20227
+ content: {
20228
+ "application/json": components["schemas"]["UnauthorizedRefusal"];
20229
+ };
20230
+ };
20231
+ /** @description `type_not_found`: no type has this identifier. */
20232
+ 404: {
20233
+ headers: {
20234
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
20235
+ "X-Request-ID": components["headers"]["X-Request-ID"];
20236
+ "X-Error-Code": components["headers"]["X-Error-Code"];
20237
+ [name: string]: unknown;
20238
+ };
20239
+ content: {
20240
+ "application/json": components["schemas"]["TypeNotFoundRefusal"];
20241
+ };
20242
+ };
20243
+ /** @description `type_chain_unresolvable`: the type's stored definition does not read. `PUT /types/{id}` can correct it. */
20244
+ 409: {
20245
+ headers: {
20246
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
20247
+ "X-Request-ID": components["headers"]["X-Request-ID"];
20248
+ "X-Error-Code": components["headers"]["X-Error-Code"];
20249
+ [name: string]: unknown;
20250
+ };
20251
+ content: {
20252
+ "application/json": components["schemas"]["TypeChainUnresolvableRefusal"];
20253
+ };
20254
+ };
20255
+ /** @description `contract_mismatch`: `X-Marfa-Contract` names another contract version than this instance speaks, or is not a whole number. Nothing was done. */
20256
+ 412: {
20257
+ headers: {
20258
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
20259
+ "X-Request-ID": components["headers"]["X-Request-ID"];
20260
+ "X-Error-Code": components["headers"]["X-Error-Code"];
20261
+ [name: string]: unknown;
20262
+ };
20263
+ content: {
20264
+ "application/json": components["schemas"]["ContractMismatchRefusal"];
20265
+ };
20266
+ };
20267
+ /** @description `rate_limited`: you sent too many requests. Wait for the number of seconds in `Retry-After`, then try again. */
20268
+ 429: {
20269
+ headers: {
20270
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
20271
+ "X-Request-ID": components["headers"]["X-Request-ID"];
20272
+ "X-Error-Code": components["headers"]["X-Error-Code"];
20273
+ "Retry-After": components["headers"]["Retry-After"];
20274
+ [name: string]: unknown;
20275
+ };
20276
+ content: {
20277
+ "application/json": components["schemas"]["RateLimitedRefusal"];
20278
+ };
20279
+ };
20280
+ /** @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. */
20281
+ 500: {
20282
+ headers: {
20283
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
20284
+ "X-Request-ID": components["headers"]["X-Request-ID"];
20285
+ "X-Error-Code": components["headers"]["X-Error-Code"];
20286
+ [name: string]: unknown;
20287
+ };
20288
+ content: {
20289
+ "application/json": components["schemas"]["InternalErrorRefusal"];
20290
+ };
20291
+ };
20292
+ /** @description `write_contention`: the database was busy, and Marfa couldn't complete the request in time. Nothing changed. Try the request again. While a restore runs, `details.reason` is `restore_running`. */
20293
+ 503: {
20294
+ headers: {
20295
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
20296
+ "X-Request-ID": components["headers"]["X-Request-ID"];
20297
+ "X-Error-Code": components["headers"]["X-Error-Code"];
20298
+ "Retry-After": components["headers"]["Retry-After"];
20299
+ [name: string]: unknown;
20300
+ };
20301
+ content: {
20302
+ "application/json": components["schemas"]["WriteContentionRefusal"];
20303
+ };
20304
+ };
20305
+ /** @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. */
20306
+ 507: {
20307
+ headers: {
20308
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
20309
+ "X-Request-ID": components["headers"]["X-Request-ID"];
20310
+ "X-Error-Code": components["headers"]["X-Error-Code"];
20311
+ [name: string]: unknown;
20312
+ };
20313
+ content: {
20314
+ "application/json": components["schemas"]["InsufficientStorageRefusal"];
20315
+ };
20316
+ };
20317
+ };
20318
+ };
20319
+ replaceType: {
20320
+ parameters: {
20321
+ query?: {
20322
+ /** @description `true` to keep the rows and values of tables and columns the replacement removes or retypes, instead of refusing it. */
20323
+ force?: boolean;
20324
+ };
20325
+ header?: {
20326
+ /** @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. */
20327
+ "X-Marfa-Instance-Id"?: string;
20328
+ };
20329
+ path: {
20330
+ /** @description The identifier of the type, such as `acme.deal`. */
20331
+ id: string;
20332
+ };
20333
+ cookie?: never;
20334
+ };
20335
+ requestBody: {
20336
+ content: {
20337
+ "application/json": components["schemas"]["TypeDefinitionUpdate"];
20338
+ };
20339
+ };
20340
+ responses: {
20341
+ /** @description Returns the replaced type. */
20342
+ 200: {
20343
+ headers: {
20344
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
20345
+ "X-Request-ID": components["headers"]["X-Request-ID"];
20346
+ [name: string]: unknown;
20347
+ };
20348
+ content: {
20349
+ /**
20350
+ * @example {
20351
+ * "id": "acme.deal",
20352
+ * "label": "Deal",
20353
+ * "version": 1,
20354
+ * "fields": {
20355
+ * "name": {
20356
+ * "type": "string",
20357
+ * "label": "Name",
20358
+ * "required": true
20359
+ * },
20360
+ * "amount": {
20361
+ * "type": "number",
20362
+ * "label": "Amount"
20363
+ * },
20364
+ * "stage": {
20365
+ * "type": "enum",
20366
+ * "label": "Stage",
20367
+ * "enum_values": [
20368
+ * "lead",
20369
+ * "won",
20370
+ * "lost"
20371
+ * ]
20372
+ * }
20373
+ * },
20374
+ * "plural": "Deals",
20375
+ * "description": "A sales deal.",
20376
+ * "display_hints": {
20377
+ * "title_field": "name"
20378
+ * },
20379
+ * "provenance": {
20380
+ * "origin": "registered",
20381
+ * "plugin": null,
20382
+ * "created_by": {
20383
+ * "kind": "key",
20384
+ * "id": "01a1011b-b5e5-7be6-8f3b-77492475b5a4",
20385
+ * "name": "CRM sync"
20386
+ * }
20387
+ * }
20388
+ * }
20389
+ */
20390
+ "application/json": components["schemas"]["RegisteredType"];
20391
+ };
20392
+ };
20393
+ /**
20394
+ * @description - `missing_required_field`: `fields` is missing.
20395
+ * - `validation_error`: `id` is malformed, or `parent` isn't registered or chains badly.
20396
+ * - `invalid_schema`: the schema is invalid, or has an unknown key or overlong text (`details.errors` names each path).
20397
+ * - `property_shadows_field`: a field has the name of one every item has.
20398
+ * - `inheritance_violation`: a field's shape differs in a parent or subtype.
20399
+ */
20400
+ 400: {
20401
+ headers: {
20402
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
20403
+ "X-Request-ID": components["headers"]["X-Request-ID"];
20404
+ "X-Error-Code": components["headers"]["X-Error-Code"];
20405
+ [name: string]: unknown;
20406
+ };
20407
+ content: {
20408
+ "application/json": components["schemas"]["InheritanceViolationOrInvalidSchemaOrMissingRequiredFieldOrPropertyShadowsFieldOrValidationErrorRefusal"];
20409
+ };
20410
+ };
20411
+ /** @description `unauthorized`: the request has no credential, or its credential is not valid. For a key that has expired, `details.expired_at` says when it expired. */
20412
+ 401: {
20413
+ headers: {
20414
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
20415
+ "X-Request-ID": components["headers"]["X-Request-ID"];
20416
+ "X-Error-Code": components["headers"]["X-Error-Code"];
20417
+ [name: string]: unknown;
20418
+ };
20419
+ content: {
20420
+ "application/json": components["schemas"]["UnauthorizedRefusal"];
20421
+ };
20422
+ };
20423
+ /**
20424
+ * @description - `forbidden`: you lack `schema.write` and `metadata.types:write`, or `details.changes` names changes needing `schema.write`.
20425
+ * - `core_type_immutable`: Marfa ships this type.
20426
+ * - `type_not_permitted`: your type map lacks write on the type or a new non-platform `parent` (`details.grant` names it).
20427
+ */
20428
+ 403: {
20429
+ headers: {
20430
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
20431
+ "X-Request-ID": components["headers"]["X-Request-ID"];
20432
+ "X-Error-Code": components["headers"]["X-Error-Code"];
20433
+ [name: string]: unknown;
20434
+ };
20435
+ content: {
20436
+ "application/json": components["schemas"]["CoreTypeImmutableOrForbiddenOrTypeNotPermittedRefusal"];
20437
+ };
20438
+ };
20439
+ /** @description `type_not_found`: no type has this identifier. */
20440
+ 404: {
20441
+ headers: {
20442
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
20443
+ "X-Request-ID": components["headers"]["X-Request-ID"];
20444
+ "X-Error-Code": components["headers"]["X-Error-Code"];
20445
+ [name: string]: unknown;
20446
+ };
20447
+ content: {
20448
+ "application/json": components["schemas"]["TypeNotFoundRefusal"];
20449
+ };
20450
+ };
20451
+ /** @description `request_timeout`: the request body didn't arrive whole within 180 seconds. Nothing changed, and Marfa closed the connection. Send the request again. A body larger than about 21 MiB can't arrive in that time over a 1 Mbit/s link, so send it in smaller requests. */
20452
+ 408: {
20453
+ headers: {
20454
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
20455
+ "X-Request-ID": components["headers"]["X-Request-ID"];
20456
+ "X-Error-Code": components["headers"]["X-Error-Code"];
20457
+ [name: string]: unknown;
20458
+ };
20459
+ content: {
20460
+ "application/json": components["schemas"]["RequestTimeoutRefusal"];
20461
+ };
20462
+ };
20463
+ /**
20464
+ * @description - `link_taken`: the replacement names a `link_field` in which two items of the type, in any state, hold the same value.
20465
+ * - `type_in_use`: rows hold a table or column the replacement removes, or a column whose `type` it changes, and `force` isn't `true`. `details.tables` names each.
20466
+ */
20467
+ 409: {
20468
+ headers: {
20469
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
20470
+ "X-Request-ID": components["headers"]["X-Request-ID"];
20471
+ "X-Error-Code": components["headers"]["X-Error-Code"];
20472
+ [name: string]: unknown;
20473
+ };
20474
+ content: {
20475
+ "application/json": components["schemas"]["LinkTakenRefusal"] | components["schemas"]["TypeInUseRefusal"] | components["schemas"]["InstanceChangedRefusal"];
19301
20476
  };
19302
20477
  };
19303
20478
  /** @description `contract_mismatch`: `X-Marfa-Contract` names another contract version than this instance speaks, or is not a whole number. Nothing was done. */
@@ -20099,7 +21274,8 @@ interface operations {
20099
21274
  * "icon": "simple-icons:github"
20100
21275
  * },
20101
21276
  * "provenance": {
20102
- * "origin": "user",
21277
+ * "origin": "registered",
21278
+ * "plugin": null,
20103
21279
  * "created_by": {
20104
21280
  * "kind": "key",
20105
21281
  * "id": "01a1011b-b5e5-7be6-8f3b-77492475b5a4",
@@ -20320,7 +21496,8 @@ interface operations {
20320
21496
  * "title_field": "name"
20321
21497
  * },
20322
21498
  * "provenance": {
20323
- * "origin": "user",
21499
+ * "origin": "registered",
21500
+ * "plugin": null,
20324
21501
  * "created_by": {
20325
21502
  * "kind": "key",
20326
21503
  * "id": "01a1011b-b5e5-7be6-8f3b-77492475b5a4",
@@ -23882,7 +25059,7 @@ interface operations {
23882
25059
  };
23883
25060
  };
23884
25061
  /**
23885
- * @description - `validation_error`: a setting is malformed or undeclared, such as a `system.*` type, a `..` placement or a `backref` filter. `details.errors[0].path` or `details.unknown_body_fields` names it.
25062
+ * @description - `validation_error`: a setting is malformed or undeclared, such as a `system.*` or `app.*` type, a `..` placement or a `backref` filter. `details.errors[0].path` or `details.unknown_body_fields` names it.
23886
25063
  * - `missing_required_field`: `title` is missing.
23887
25064
  * - `unknown_type`: a setting's type is unknown.
23888
25065
  * - `invalid_properties`: `defaults.properties` has a whole number a 64-bit float can't keep.
@@ -31194,16 +32371,162 @@ interface operations {
31194
32371
  };
31195
32372
  };
31196
32373
  };
31197
- listAppGrants: {
32374
+ listAppGrants: {
32375
+ parameters: {
32376
+ query?: never;
32377
+ header?: never;
32378
+ path?: never;
32379
+ cookie?: never;
32380
+ };
32381
+ requestBody?: never;
32382
+ responses: {
32383
+ /** @description Returns every active app grant. */
32384
+ 200: {
32385
+ headers: {
32386
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
32387
+ "X-Request-ID": components["headers"]["X-Request-ID"];
32388
+ [name: string]: unknown;
32389
+ };
32390
+ content: {
32391
+ /**
32392
+ * @example {
32393
+ * "data": [
32394
+ * {
32395
+ * "id": "019980d6-7612-7000-8000-000000000001",
32396
+ * "kind": "app",
32397
+ * "client_id": "01a10127-d974-7c54-8cc4-5c5581d45c4c",
32398
+ * "client_name": "Reader",
32399
+ * "origins": [],
32400
+ * "scopes": [
32401
+ * "core.note:read"
32402
+ * ],
32403
+ * "status": "active",
32404
+ * "granted_at": "2026-10-03T09:30:00.000Z",
32405
+ * "last_used_at": null
32406
+ * }
32407
+ * ],
32408
+ * "next_cursor": null
32409
+ * }
32410
+ */
32411
+ "application/json": components["schemas"]["AppGrantPage"];
32412
+ };
32413
+ };
32414
+ /** @description - `validation_error`: the query has a parameter this endpoint doesn't take. */
32415
+ 400: {
32416
+ headers: {
32417
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
32418
+ "X-Request-ID": components["headers"]["X-Request-ID"];
32419
+ "X-Error-Code": components["headers"]["X-Error-Code"];
32420
+ [name: string]: unknown;
32421
+ };
32422
+ content: {
32423
+ "application/json": components["schemas"]["ValidationErrorRefusal"];
32424
+ };
32425
+ };
32426
+ /** @description `unauthorized`: the request has no credential, or its credential is not valid. For a key that has expired, `details.expired_at` says when it expired. */
32427
+ 401: {
32428
+ headers: {
32429
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
32430
+ "X-Request-ID": components["headers"]["X-Request-ID"];
32431
+ "X-Error-Code": components["headers"]["X-Error-Code"];
32432
+ [name: string]: unknown;
32433
+ };
32434
+ content: {
32435
+ "application/json": components["schemas"]["UnauthorizedRefusal"];
32436
+ };
32437
+ };
32438
+ /** @description - `forbidden`: the credential lacks `grants.manage`. */
32439
+ 403: {
32440
+ headers: {
32441
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
32442
+ "X-Request-ID": components["headers"]["X-Request-ID"];
32443
+ "X-Error-Code": components["headers"]["X-Error-Code"];
32444
+ [name: string]: unknown;
32445
+ };
32446
+ content: {
32447
+ "application/json": components["schemas"]["ForbiddenRefusal"];
32448
+ };
32449
+ };
32450
+ /** @description `contract_mismatch`: `X-Marfa-Contract` names another contract version than this instance speaks, or is not a whole number. Nothing was done. */
32451
+ 412: {
32452
+ headers: {
32453
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
32454
+ "X-Request-ID": components["headers"]["X-Request-ID"];
32455
+ "X-Error-Code": components["headers"]["X-Error-Code"];
32456
+ [name: string]: unknown;
32457
+ };
32458
+ content: {
32459
+ "application/json": components["schemas"]["ContractMismatchRefusal"];
32460
+ };
32461
+ };
32462
+ /** @description `rate_limited`: you sent too many requests. Wait for the number of seconds in `Retry-After`, then try again. */
32463
+ 429: {
32464
+ headers: {
32465
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
32466
+ "X-Request-ID": components["headers"]["X-Request-ID"];
32467
+ "X-Error-Code": components["headers"]["X-Error-Code"];
32468
+ "Retry-After": components["headers"]["Retry-After"];
32469
+ [name: string]: unknown;
32470
+ };
32471
+ content: {
32472
+ "application/json": components["schemas"]["RateLimitedRefusal"];
32473
+ };
32474
+ };
32475
+ /** @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. */
32476
+ 500: {
32477
+ headers: {
32478
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
32479
+ "X-Request-ID": components["headers"]["X-Request-ID"];
32480
+ "X-Error-Code": components["headers"]["X-Error-Code"];
32481
+ [name: string]: unknown;
32482
+ };
32483
+ content: {
32484
+ "application/json": components["schemas"]["InternalErrorRefusal"];
32485
+ };
32486
+ };
32487
+ /** @description `write_contention`: the database was busy, and Marfa couldn't complete the request in time. Nothing changed. Try the request again. While a restore runs, `details.reason` is `restore_running`. */
32488
+ 503: {
32489
+ headers: {
32490
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
32491
+ "X-Request-ID": components["headers"]["X-Request-ID"];
32492
+ "X-Error-Code": components["headers"]["X-Error-Code"];
32493
+ "Retry-After": components["headers"]["Retry-After"];
32494
+ [name: string]: unknown;
32495
+ };
32496
+ content: {
32497
+ "application/json": components["schemas"]["WriteContentionRefusal"];
32498
+ };
32499
+ };
32500
+ /** @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. */
32501
+ 507: {
32502
+ headers: {
32503
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
32504
+ "X-Request-ID": components["headers"]["X-Request-ID"];
32505
+ "X-Error-Code": components["headers"]["X-Error-Code"];
32506
+ [name: string]: unknown;
32507
+ };
32508
+ content: {
32509
+ "application/json": components["schemas"]["InsufficientStorageRefusal"];
32510
+ };
32511
+ };
32512
+ };
32513
+ };
32514
+ revokeAppGrant: {
31198
32515
  parameters: {
31199
- query?: never;
32516
+ query?: {
32517
+ /** @description Also revoke every key the app minted, and every key those keys minted, but an owner's key (`owner_key`). Omitting it, or `false`, leaves them working. */
32518
+ revoke_keys?: boolean;
32519
+ };
31200
32520
  header?: never;
31201
- path?: never;
32521
+ path: {
32522
+ /** @description The ID of the app's grant. */
32523
+ id: string;
32524
+ };
31202
32525
  cookie?: never;
31203
32526
  };
31204
32527
  requestBody?: never;
31205
32528
  responses: {
31206
- /** @description Returns every active app grant. */
32529
+ /** @description Returns `ok: true`. The app's grant is revoked. */
31207
32530
  200: {
31208
32531
  headers: {
31209
32532
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
@@ -31213,28 +32536,13 @@ interface operations {
31213
32536
  content: {
31214
32537
  /**
31215
32538
  * @example {
31216
- * "data": [
31217
- * {
31218
- * "id": "019980d6-7612-7000-8000-000000000001",
31219
- * "kind": "app",
31220
- * "client_id": "01a10127-d974-7c54-8cc4-5c5581d45c4c",
31221
- * "client_name": "Reader",
31222
- * "origins": [],
31223
- * "scopes": [
31224
- * "core.note:read"
31225
- * ],
31226
- * "status": "active",
31227
- * "granted_at": "2026-10-03T09:30:00.000Z",
31228
- * "last_used_at": null
31229
- * }
31230
- * ],
31231
- * "next_cursor": null
32539
+ * "ok": true
31232
32540
  * }
31233
32541
  */
31234
- "application/json": components["schemas"]["AppGrantPage"];
32542
+ "application/json": components["schemas"]["Ok"];
31235
32543
  };
31236
32544
  };
31237
- /** @description - `validation_error`: the query has a parameter this endpoint doesn't take. */
32545
+ /** @description - `validation_error`: the query has a parameter this endpoint doesn't take, or `revoke_keys` is neither `true` nor `false`, or is named more than once. Nothing is revoked. */
31238
32546
  400: {
31239
32547
  headers: {
31240
32548
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
@@ -31270,6 +32578,18 @@ interface operations {
31270
32578
  "application/json": components["schemas"]["ForbiddenRefusal"];
31271
32579
  };
31272
32580
  };
32581
+ /** @description - `grant_not_found`: the ID does not name an app grant. */
32582
+ 404: {
32583
+ headers: {
32584
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
32585
+ "X-Request-ID": components["headers"]["X-Request-ID"];
32586
+ "X-Error-Code": components["headers"]["X-Error-Code"];
32587
+ [name: string]: unknown;
32588
+ };
32589
+ content: {
32590
+ "application/json": components["schemas"]["GrantNotFoundRefusal"];
32591
+ };
32592
+ };
31273
32593
  /** @description `contract_mismatch`: `X-Marfa-Contract` names another contract version than this instance speaks, or is not a whole number. Nothing was done. */
31274
32594
  412: {
31275
32595
  headers: {
@@ -31282,6 +32602,18 @@ interface operations {
31282
32602
  "application/json": components["schemas"]["ContractMismatchRefusal"];
31283
32603
  };
31284
32604
  };
32605
+ /** @description `request_too_large`: the request body is larger than this instance accepts. */
32606
+ 413: {
32607
+ headers: {
32608
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
32609
+ "X-Request-ID": components["headers"]["X-Request-ID"];
32610
+ "X-Error-Code": components["headers"]["X-Error-Code"];
32611
+ [name: string]: unknown;
32612
+ };
32613
+ content: {
32614
+ "application/json": components["schemas"]["RequestTooLargeRefusal"];
32615
+ };
32616
+ };
31285
32617
  /** @description `rate_limited`: you sent too many requests. Wait for the number of seconds in `Retry-After`, then try again. */
31286
32618
  429: {
31287
32619
  headers: {
@@ -31334,12 +32666,9 @@ interface operations {
31334
32666
  };
31335
32667
  };
31336
32668
  };
31337
- revokeAppGrant: {
32669
+ narrowAppGrant: {
31338
32670
  parameters: {
31339
- query?: {
31340
- /** @description Also revoke every key the app minted, and every key those keys minted, but an owner's key (`owner_key`). Omitting it, or `false`, leaves them working. */
31341
- revoke_keys?: boolean;
31342
- };
32671
+ query?: never;
31343
32672
  header?: never;
31344
32673
  path: {
31345
32674
  /** @description The ID of the app's grant. */
@@ -31347,9 +32676,18 @@ interface operations {
31347
32676
  };
31348
32677
  cookie?: never;
31349
32678
  };
31350
- requestBody?: never;
32679
+ requestBody: {
32680
+ content: {
32681
+ "application/json": {
32682
+ /** @description The complete resulting scope set, no wider than the current grant. */
32683
+ scopes: string[];
32684
+ /** @description The complete scope set last read from the grant. A changed grant refuses the update. */
32685
+ expected_scopes: string[];
32686
+ };
32687
+ };
32688
+ };
31351
32689
  responses: {
31352
- /** @description Returns `ok: true`. The app's grant is revoked. */
32690
+ /** @description Returns the app's narrowed access. */
31353
32691
  200: {
31354
32692
  headers: {
31355
32693
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
@@ -31359,13 +32697,19 @@ interface operations {
31359
32697
  content: {
31360
32698
  /**
31361
32699
  * @example {
31362
- * "ok": true
32700
+ * "scopes": [
32701
+ * "core.note:read"
32702
+ * ],
32703
+ * "revoked_keys": 1
31363
32704
  * }
31364
32705
  */
31365
- "application/json": components["schemas"]["Ok"];
32706
+ "application/json": components["schemas"]["NarrowedAppGrant"];
31366
32707
  };
31367
32708
  };
31368
- /** @description - `validation_error`: the query has a parameter this endpoint doesn't take, or `revoke_keys` is neither `true` nor `false`, or is named more than once. Nothing is revoked. */
32709
+ /**
32710
+ * @description - `validation_error`: the body has an invalid or unknown field.
32711
+ * - `missing_required_field`: a required field is absent.
32712
+ */
31369
32713
  400: {
31370
32714
  headers: {
31371
32715
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
@@ -31374,7 +32718,7 @@ interface operations {
31374
32718
  [name: string]: unknown;
31375
32719
  };
31376
32720
  content: {
31377
- "application/json": components["schemas"]["ValidationErrorRefusal"];
32721
+ "application/json": components["schemas"]["MissingRequiredFieldOrValidationErrorRefusal"];
31378
32722
  };
31379
32723
  };
31380
32724
  /** @description `unauthorized`: the request has no credential, or its credential is not valid. For a key that has expired, `details.expired_at` says when it expired. */
@@ -31389,7 +32733,7 @@ interface operations {
31389
32733
  "application/json": components["schemas"]["UnauthorizedRefusal"];
31390
32734
  };
31391
32735
  };
31392
- /** @description - `forbidden`: the credential lacks `grants.manage`. */
32736
+ /** @description - `forbidden`: the credential lacks `grants.manage`, and `details.required_scope` names it, or the requested scopes widen access. */
31393
32737
  403: {
31394
32738
  headers: {
31395
32739
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
@@ -31401,7 +32745,7 @@ interface operations {
31401
32745
  "application/json": components["schemas"]["ForbiddenRefusal"];
31402
32746
  };
31403
32747
  };
31404
- /** @description - `grant_not_found`: the ID does not name an app grant. */
32748
+ /** @description - `grant_not_found`: the ID does not name a live app grant. */
31405
32749
  404: {
31406
32750
  headers: {
31407
32751
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
@@ -31413,6 +32757,30 @@ interface operations {
31413
32757
  "application/json": components["schemas"]["GrantNotFoundRefusal"];
31414
32758
  };
31415
32759
  };
32760
+ /** @description `request_timeout`: the request body didn't arrive whole within 180 seconds. Nothing changed, and Marfa closed the connection. Send the request again. A body larger than about 21 MiB can't arrive in that time over a 1 Mbit/s link, so send it in smaller requests. */
32761
+ 408: {
32762
+ headers: {
32763
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
32764
+ "X-Request-ID": components["headers"]["X-Request-ID"];
32765
+ "X-Error-Code": components["headers"]["X-Error-Code"];
32766
+ [name: string]: unknown;
32767
+ };
32768
+ content: {
32769
+ "application/json": components["schemas"]["RequestTimeoutRefusal"];
32770
+ };
32771
+ };
32772
+ /** @description - `conflict`: the grant's scopes changed; read them again before submitting. */
32773
+ 409: {
32774
+ headers: {
32775
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
32776
+ "X-Request-ID": components["headers"]["X-Request-ID"];
32777
+ "X-Error-Code": components["headers"]["X-Error-Code"];
32778
+ [name: string]: unknown;
32779
+ };
32780
+ content: {
32781
+ "application/json": components["schemas"]["ConflictRefusal"];
32782
+ };
32783
+ };
31416
32784
  /** @description `contract_mismatch`: `X-Marfa-Contract` names another contract version than this instance speaks, or is not a whole number. Nothing was done. */
31417
32785
  412: {
31418
32786
  headers: {
@@ -31489,28 +32857,164 @@ interface operations {
31489
32857
  };
31490
32858
  };
31491
32859
  };
31492
- narrowAppGrant: {
32860
+ listAppVendors: {
31493
32861
  parameters: {
31494
32862
  query?: never;
31495
32863
  header?: never;
32864
+ path?: never;
32865
+ cookie?: never;
32866
+ };
32867
+ requestBody?: never;
32868
+ responses: {
32869
+ /** @description Returns every vendor binding, ordered by vendor. */
32870
+ 200: {
32871
+ headers: {
32872
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
32873
+ "X-Request-ID": components["headers"]["X-Request-ID"];
32874
+ [name: string]: unknown;
32875
+ };
32876
+ content: {
32877
+ /**
32878
+ * @example {
32879
+ * "data": [
32880
+ * {
32881
+ * "vendor": "app.acme",
32882
+ * "client_id": "01a10127-d974-7c54-8cc4-5b1e0f3c2a10",
32883
+ * "claimed_at": "2026-11-20T09:30:00.000Z"
32884
+ * }
32885
+ * ],
32886
+ * "next_cursor": null
32887
+ * }
32888
+ */
32889
+ "application/json": components["schemas"]["AppVendorPage"];
32890
+ };
32891
+ };
32892
+ /** @description - `validation_error`: the query has a parameter this endpoint doesn't take. */
32893
+ 400: {
32894
+ headers: {
32895
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
32896
+ "X-Request-ID": components["headers"]["X-Request-ID"];
32897
+ "X-Error-Code": components["headers"]["X-Error-Code"];
32898
+ [name: string]: unknown;
32899
+ };
32900
+ content: {
32901
+ "application/json": components["schemas"]["ValidationErrorRefusal"];
32902
+ };
32903
+ };
32904
+ /** @description `unauthorized`: the request has no credential, or its credential is not valid. For a key that has expired, `details.expired_at` says when it expired. */
32905
+ 401: {
32906
+ headers: {
32907
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
32908
+ "X-Request-ID": components["headers"]["X-Request-ID"];
32909
+ "X-Error-Code": components["headers"]["X-Error-Code"];
32910
+ [name: string]: unknown;
32911
+ };
32912
+ content: {
32913
+ "application/json": components["schemas"]["UnauthorizedRefusal"];
32914
+ };
32915
+ };
32916
+ /** @description - `forbidden`: the credential lacks `grants.manage`, and `details.required_scope` names it. */
32917
+ 403: {
32918
+ headers: {
32919
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
32920
+ "X-Request-ID": components["headers"]["X-Request-ID"];
32921
+ "X-Error-Code": components["headers"]["X-Error-Code"];
32922
+ [name: string]: unknown;
32923
+ };
32924
+ content: {
32925
+ "application/json": components["schemas"]["ForbiddenRefusal"];
32926
+ };
32927
+ };
32928
+ /** @description `contract_mismatch`: `X-Marfa-Contract` names another contract version than this instance speaks, or is not a whole number. Nothing was done. */
32929
+ 412: {
32930
+ headers: {
32931
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
32932
+ "X-Request-ID": components["headers"]["X-Request-ID"];
32933
+ "X-Error-Code": components["headers"]["X-Error-Code"];
32934
+ [name: string]: unknown;
32935
+ };
32936
+ content: {
32937
+ "application/json": components["schemas"]["ContractMismatchRefusal"];
32938
+ };
32939
+ };
32940
+ /** @description `rate_limited`: you sent too many requests. Wait for the number of seconds in `Retry-After`, then try again. */
32941
+ 429: {
32942
+ headers: {
32943
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
32944
+ "X-Request-ID": components["headers"]["X-Request-ID"];
32945
+ "X-Error-Code": components["headers"]["X-Error-Code"];
32946
+ "Retry-After": components["headers"]["Retry-After"];
32947
+ [name: string]: unknown;
32948
+ };
32949
+ content: {
32950
+ "application/json": components["schemas"]["RateLimitedRefusal"];
32951
+ };
32952
+ };
32953
+ /** @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. */
32954
+ 500: {
32955
+ headers: {
32956
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
32957
+ "X-Request-ID": components["headers"]["X-Request-ID"];
32958
+ "X-Error-Code": components["headers"]["X-Error-Code"];
32959
+ [name: string]: unknown;
32960
+ };
32961
+ content: {
32962
+ "application/json": components["schemas"]["InternalErrorRefusal"];
32963
+ };
32964
+ };
32965
+ /** @description `write_contention`: the database was busy, and Marfa couldn't complete the request in time. Nothing changed. Try the request again. While a restore runs, `details.reason` is `restore_running`. */
32966
+ 503: {
32967
+ headers: {
32968
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
32969
+ "X-Request-ID": components["headers"]["X-Request-ID"];
32970
+ "X-Error-Code": components["headers"]["X-Error-Code"];
32971
+ "Retry-After": components["headers"]["Retry-After"];
32972
+ [name: string]: unknown;
32973
+ };
32974
+ content: {
32975
+ "application/json": components["schemas"]["WriteContentionRefusal"];
32976
+ };
32977
+ };
32978
+ /** @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. */
32979
+ 507: {
32980
+ headers: {
32981
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
32982
+ "X-Request-ID": components["headers"]["X-Request-ID"];
32983
+ "X-Error-Code": components["headers"]["X-Error-Code"];
32984
+ [name: string]: unknown;
32985
+ };
32986
+ content: {
32987
+ "application/json": components["schemas"]["InsufficientStorageRefusal"];
32988
+ };
32989
+ };
32990
+ };
32991
+ };
32992
+ giveAppVendor: {
32993
+ parameters: {
32994
+ query?: never;
32995
+ header?: {
32996
+ /** @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. */
32997
+ "X-Marfa-Instance-Id"?: string;
32998
+ };
31496
32999
  path: {
31497
- /** @description The ID of the app's grant. */
31498
- id: string;
33000
+ /** @description The namespace, as `app.<vendor>`. */
33001
+ vendor: string;
31499
33002
  };
31500
33003
  cookie?: never;
31501
33004
  };
31502
33005
  requestBody: {
31503
33006
  content: {
31504
33007
  "application/json": {
31505
- /** @description The complete resulting scope set, no wider than the current grant. */
31506
- scopes: string[];
31507
- /** @description The complete scope set last read from the grant. A changed grant refuses the update. */
31508
- expected_scopes: string[];
33008
+ /**
33009
+ * @description The OAuth client ID of the app to give the namespace to. `GET /grants` lists each app's `client_id`.
33010
+ * @example 01a10127-d974-7c54-8cc4-5c5581d45c4c
33011
+ */
33012
+ client_id: string;
31509
33013
  };
31510
33014
  };
31511
33015
  };
31512
33016
  responses: {
31513
- /** @description Returns the app's narrowed access. */
33017
+ /** @description Returns the vendor binding as it now reads. */
31514
33018
  200: {
31515
33019
  headers: {
31516
33020
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
@@ -31520,18 +33024,17 @@ interface operations {
31520
33024
  content: {
31521
33025
  /**
31522
33026
  * @example {
31523
- * "scopes": [
31524
- * "core.note:read"
31525
- * ],
31526
- * "revoked_keys": 1
33027
+ * "vendor": "app.acme",
33028
+ * "client_id": "01a10127-d974-7c54-8cc4-5b1e0f3c2a10",
33029
+ * "claimed_at": "2026-11-20T09:30:00.000Z"
31527
33030
  * }
31528
33031
  */
31529
- "application/json": components["schemas"]["NarrowedAppGrant"];
33032
+ "application/json": components["schemas"]["AppVendor"];
31530
33033
  };
31531
33034
  };
31532
33035
  /**
31533
- * @description - `validation_error`: the body has an invalid or unknown field.
31534
- * - `missing_required_field`: a required field is absent.
33036
+ * @description - `validation_error`: the vendor is not an `app.<vendor>` namespace, the body is malformed, `client_id` is not a string, the body has a field this endpoint doesn't take, or the query has a parameter it doesn't take.
33037
+ * - `missing_required_field`: `client_id` is missing.
31535
33038
  */
31536
33039
  400: {
31537
33040
  headers: {
@@ -31556,7 +33059,7 @@ interface operations {
31556
33059
  "application/json": components["schemas"]["UnauthorizedRefusal"];
31557
33060
  };
31558
33061
  };
31559
- /** @description - `forbidden`: the credential lacks `grants.manage`, and `details.required_scope` names it, or the requested scopes widen access. */
33062
+ /** @description - `forbidden`: the credential lacks `grants.manage`, and `details.required_scope` names it, or it is an app's sign-in or a key an app made, which never gives a namespace to an app. */
31560
33063
  403: {
31561
33064
  headers: {
31562
33065
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
@@ -31568,7 +33071,7 @@ interface operations {
31568
33071
  "application/json": components["schemas"]["ForbiddenRefusal"];
31569
33072
  };
31570
33073
  };
31571
- /** @description - `grant_not_found`: the ID does not name a live app grant. */
33074
+ /** @description - `not_found`: no app with that client ID has registered on this instance, and `details.client_id` names it. */
31572
33075
  404: {
31573
33076
  headers: {
31574
33077
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
@@ -31577,7 +33080,7 @@ interface operations {
31577
33080
  [name: string]: unknown;
31578
33081
  };
31579
33082
  content: {
31580
- "application/json": components["schemas"]["GrantNotFoundRefusal"];
33083
+ "application/json": components["schemas"]["NotFoundRefusal"];
31581
33084
  };
31582
33085
  };
31583
33086
  /** @description `request_timeout`: the request body didn't arrive whole within 180 seconds. Nothing changed, and Marfa closed the connection. Send the request again. A body larger than about 21 MiB can't arrive in that time over a 1 Mbit/s link, so send it in smaller requests. */
@@ -31592,7 +33095,7 @@ interface operations {
31592
33095
  "application/json": components["schemas"]["RequestTimeoutRefusal"];
31593
33096
  };
31594
33097
  };
31595
- /** @description - `conflict`: the grant's scopes changed; read them again before submitting. */
33098
+ /** @description `instance_changed`: `X-Marfa-Instance-Id` names another instance. Nothing is written. Rebuild the working copy from the instance at this address. */
31596
33099
  409: {
31597
33100
  headers: {
31598
33101
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
@@ -31601,7 +33104,7 @@ interface operations {
31601
33104
  [name: string]: unknown;
31602
33105
  };
31603
33106
  content: {
31604
- "application/json": components["schemas"]["ConflictRefusal"];
33107
+ "application/json": components["schemas"]["InstanceChangedRefusal"];
31605
33108
  };
31606
33109
  };
31607
33110
  /** @description `contract_mismatch`: `X-Marfa-Contract` names another contract version than this instance speaks, or is not a whole number. Nothing was done. */
@@ -32363,9 +33866,9 @@ interface operations {
32363
33866
  name?: string;
32364
33867
  /**
32365
33868
  * Format: email
32366
- * @description The owner's email address. It plays no part in signing in. Marfa stores it in lowercase, with spaces at each end trimmed.
33869
+ * @description The owner's email address, which plays no part in signing in. Marfa stores it in lowercase, with spaces at each end trimmed. Leave it out or send `null` to set none.
32367
33870
  */
32368
- email?: string;
33871
+ email?: string | null;
32369
33872
  /** @description Machine-issued setup code. Omit when using a setup-only browser session. */
32370
33873
  code?: string;
32371
33874
  };
@@ -36558,7 +38061,8 @@ interface operations {
36558
38061
  * },
36559
38062
  * "types": {
36560
38063
  * "core": 29,
36561
- * "registered": 3
38064
+ * "registered": 3,
38065
+ * "plugin": 0
36562
38066
  * },
36563
38067
  * "keys": {
36564
38068
  * "total": 1
@@ -36603,12 +38107,14 @@ interface operations {
36603
38107
  /** @description Total size of stored blobs, in bytes. */
36604
38108
  total_bytes: number;
36605
38109
  };
36606
- /** @description Built-in and registered type counts. */
38110
+ /** @description Built-in, registered and plugin type counts. */
36607
38111
  types: {
36608
38112
  /** @description Number of built-in types. */
36609
38113
  core: number;
36610
- /** @description Number of registered types. */
38114
+ /** @description Number of types registered through `POST /types` or a restore. */
36611
38115
  registered: number;
38116
+ /** @description Number of types a plugin installed. */
38117
+ plugin: number;
36612
38118
  };
36613
38119
  keys: components["schemas"]["MetricCount"];
36614
38120
  webhooks: components["schemas"]["MetricCount"] & unknown;
@@ -37911,6 +39417,8 @@ interface operations {
37911
39417
  * "sources_skipped_reasons": {
37912
39418
  * "already_set": 1
37913
39419
  * },
39420
+ * "plugins_added": 0,
39421
+ * "plugins_skipped": 0,
37914
39422
  * "settings_added": 0,
37915
39423
  * "settings_skipped": 0,
37916
39424
  * "settings_dropped": [],
@@ -37921,6 +39429,8 @@ interface operations {
37921
39429
  * "connector_states_skipped": 0,
37922
39430
  * "connector_agreements_added": 0,
37923
39431
  * "connector_agreements_skipped": 0,
39432
+ * "app_vendors_added": 0,
39433
+ * "app_vendors_skipped": 0,
37924
39434
  * "rows_imported": 0,
37925
39435
  * "rows_skipped": 0,
37926
39436
  * "entries_skipped": [],
@@ -37993,6 +39503,10 @@ interface operations {
37993
39503
  sources_skipped_reasons: {
37994
39504
  [key: string]: number;
37995
39505
  };
39506
+ /** @description Plugin install records the restore added. */
39507
+ plugins_added: number;
39508
+ /** @description Plugin install records the restore left as this instance holds them. */
39509
+ plugins_skipped: number;
37996
39510
  /** @description How many settings Marfa stored, for settings the instance had not stored. */
37997
39511
  settings_added: number;
37998
39512
  /** @description How many settings Marfa skipped because the instance already stores them. */
@@ -38013,6 +39527,10 @@ interface operations {
38013
39527
  connector_agreements_added: number;
38014
39528
  /** @description How many connector agreements Marfa skipped because the instance holds no such item or already holds an agreement for it. */
38015
39529
  connector_agreements_skipped: number;
39530
+ /** @description How many vendor bindings Marfa stored, each giving an `app.<vendor>` namespace to the app that holds it. */
39531
+ app_vendors_added: number;
39532
+ /** @description How many vendor bindings Marfa skipped: the namespace was already held here, or an app's sign-in or a key an app made sent the restore. */
39533
+ app_vendors_skipped: number;
38016
39534
  /** @description How many table rows Marfa wrote. */
38017
39535
  rows_imported: number;
38018
39536
  /** @description How many table rows Marfa skipped because their item was counted as a duplicate. */
@@ -38701,6 +40219,8 @@ interface operations {
38701
40219
  * "sources_added": 0,
38702
40220
  * "sources_skipped": 0,
38703
40221
  * "sources_skipped_reasons": {},
40222
+ * "plugins_added": 0,
40223
+ * "plugins_skipped": 0,
38704
40224
  * "settings_added": 0,
38705
40225
  * "settings_skipped": 0,
38706
40226
  * "settings_dropped": [],
@@ -38711,6 +40231,8 @@ interface operations {
38711
40231
  * "connector_states_skipped": 0,
38712
40232
  * "connector_agreements_added": 0,
38713
40233
  * "connector_agreements_skipped": 0,
40234
+ * "app_vendors_added": 0,
40235
+ * "app_vendors_skipped": 0,
38714
40236
  * "rows_imported": 0,
38715
40237
  * "rows_skipped": 0,
38716
40238
  * "entries_skipped": [],
@@ -38777,6 +40299,10 @@ interface operations {
38777
40299
  sources_skipped_reasons: {
38778
40300
  [key: string]: number;
38779
40301
  };
40302
+ /** @description Plugin install records the restore added. */
40303
+ plugins_added: number;
40304
+ /** @description Plugin install records the restore left as this instance holds them. */
40305
+ plugins_skipped: number;
38780
40306
  /** @description How many settings Marfa stored, for settings the instance had not stored. */
38781
40307
  settings_added: number;
38782
40308
  /** @description How many settings Marfa skipped because the instance already stores them. */
@@ -38797,6 +40323,10 @@ interface operations {
38797
40323
  connector_agreements_added: number;
38798
40324
  /** @description How many connector agreements Marfa skipped because the instance holds no such item or already holds an agreement for it. */
38799
40325
  connector_agreements_skipped: number;
40326
+ /** @description How many vendor bindings Marfa stored, each giving an `app.<vendor>` namespace to the app that holds it. */
40327
+ app_vendors_added: number;
40328
+ /** @description How many vendor bindings Marfa skipped: the namespace was already held here, or an app's sign-in or a key an app made sent the restore. */
40329
+ app_vendors_skipped: number;
38800
40330
  /** @description How many table rows Marfa wrote. */
38801
40331
  rows_imported: number;
38802
40332
  /** @description How many table rows Marfa skipped because their item was counted as a duplicate. */