@withmarfa/client 0.0.96 → 0.0.98
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.cts +546 -12
- package/dist/index.d.ts +546 -12
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -2292,7 +2292,7 @@ interface paths {
|
|
|
2292
2292
|
post?: never;
|
|
2293
2293
|
/**
|
|
2294
2294
|
* Revoke an app grant
|
|
2295
|
-
* @description Revokes the app's tokens and consent. Requires `grants.manage`.
|
|
2295
|
+
* @description Revokes the app's tokens and consent. Its keys stay unless `revoke_keys` is `true`, and its data stays unless `remove_data` is `true`. Requires `grants.manage`.
|
|
2296
2296
|
*/
|
|
2297
2297
|
delete: operations["revokeAppGrant"];
|
|
2298
2298
|
options?: never;
|
|
@@ -2344,6 +2344,30 @@ interface paths {
|
|
|
2344
2344
|
patch?: never;
|
|
2345
2345
|
trace?: never;
|
|
2346
2346
|
};
|
|
2347
|
+
"/app-vendors/{vendor}/data": {
|
|
2348
|
+
parameters: {
|
|
2349
|
+
query?: never;
|
|
2350
|
+
header?: never;
|
|
2351
|
+
path?: never;
|
|
2352
|
+
cookie?: never;
|
|
2353
|
+
};
|
|
2354
|
+
/**
|
|
2355
|
+
* List an app's data
|
|
2356
|
+
* @description Returns each type under an `app.<vendor>` namespace, registered or held by an item, with its items counted by state, and a page of those items in every state. Requires the browser session or `grants.manage`; a key also needs read on those types.
|
|
2357
|
+
*/
|
|
2358
|
+
get: operations["listAppVendorData"];
|
|
2359
|
+
put?: never;
|
|
2360
|
+
post?: never;
|
|
2361
|
+
/**
|
|
2362
|
+
* Delete an app's data
|
|
2363
|
+
* @description Deletes for good up to 1,000 items under an `app.<vendor>` namespace, in every state, and its registered types once none is left. Needs `items.purge` and the browser session or `grants.manage`; a key also needs write on its types and `schema.write`.
|
|
2364
|
+
*/
|
|
2365
|
+
delete: operations["deleteAppVendorData"];
|
|
2366
|
+
options?: never;
|
|
2367
|
+
head?: never;
|
|
2368
|
+
patch?: never;
|
|
2369
|
+
trace?: never;
|
|
2370
|
+
};
|
|
2347
2371
|
"/oauth/authorize": {
|
|
2348
2372
|
parameters: {
|
|
2349
2373
|
query?: never;
|
|
@@ -2524,7 +2548,7 @@ interface paths {
|
|
|
2524
2548
|
post?: never;
|
|
2525
2549
|
/**
|
|
2526
2550
|
* End a sign-in
|
|
2527
|
-
* @description Ends a sign-in at once: it can't refresh or make another request, even when it is your own. An app's keys stay unless `revoke_keys` is `true`. Requires `sign_ins.manage`.
|
|
2551
|
+
* @description Ends a sign-in at once: it can't refresh or make another request, even when it is your own. An app's keys stay unless `revoke_keys` is `true`, and its data unless `remove_data` is `true`. Requires `sign_ins.manage`.
|
|
2528
2552
|
*/
|
|
2529
2553
|
delete: operations["endSignIn"];
|
|
2530
2554
|
options?: never;
|
|
@@ -7517,6 +7541,9 @@ interface components {
|
|
|
7517
7541
|
* "scopes": [
|
|
7518
7542
|
* "core.note:read"
|
|
7519
7543
|
* ],
|
|
7544
|
+
* "vendors": [
|
|
7545
|
+
* "app.reader"
|
|
7546
|
+
* ],
|
|
7520
7547
|
* "status": "active",
|
|
7521
7548
|
* "granted_at": "2026-10-03T09:30:00.000Z",
|
|
7522
7549
|
* "last_used_at": null
|
|
@@ -7542,6 +7569,9 @@ interface components {
|
|
|
7542
7569
|
* "scopes": [
|
|
7543
7570
|
* "core.note:read"
|
|
7544
7571
|
* ],
|
|
7572
|
+
* "vendors": [
|
|
7573
|
+
* "app.reader"
|
|
7574
|
+
* ],
|
|
7545
7575
|
* "status": "active",
|
|
7546
7576
|
* "granted_at": "2026-10-03T09:30:00.000Z",
|
|
7547
7577
|
* "last_used_at": null
|
|
@@ -7569,6 +7599,13 @@ interface components {
|
|
|
7569
7599
|
origins: string[];
|
|
7570
7600
|
/** @description The access the owner approved for the app. */
|
|
7571
7601
|
scopes: string[];
|
|
7602
|
+
/**
|
|
7603
|
+
* @description Each `app.<vendor>` namespace the app holds. `GET /app-vendors/{vendor}/data` lists what it keeps there.
|
|
7604
|
+
* @example [
|
|
7605
|
+
* "app.reader"
|
|
7606
|
+
* ]
|
|
7607
|
+
*/
|
|
7608
|
+
vendors: string[];
|
|
7572
7609
|
/** @description The grant's status. */
|
|
7573
7610
|
status: string;
|
|
7574
7611
|
/**
|
|
@@ -9558,6 +9595,11 @@ interface components {
|
|
|
9558
9595
|
* @example 01a10127-d974-7c54-8cc4-5c5581d45c4c
|
|
9559
9596
|
*/
|
|
9560
9597
|
client_id: string | null;
|
|
9598
|
+
/**
|
|
9599
|
+
* @description The name the app that holds the namespace registered, or `null` while the owner holds it or the app registered none.
|
|
9600
|
+
* @example Reader
|
|
9601
|
+
*/
|
|
9602
|
+
client_name: string | null;
|
|
9561
9603
|
/**
|
|
9562
9604
|
* Format: date-time
|
|
9563
9605
|
* @description When the namespace was first held, or when it was given to the app that holds it.
|
|
@@ -10443,6 +10485,120 @@ interface components {
|
|
|
10443
10485
|
/** @description The ID of the item the connector rendered, or `null` if it rendered from its service. Present only if the connector sent it. */
|
|
10444
10486
|
source_item?: string | null;
|
|
10445
10487
|
};
|
|
10488
|
+
/** @description An error response. */
|
|
10489
|
+
InstanceChangedOrTypeHasSubtypesOrTypeInUseRefusal: {
|
|
10490
|
+
/** @description What went wrong. */
|
|
10491
|
+
error: {
|
|
10492
|
+
/**
|
|
10493
|
+
* @description A machine-readable code for the error. Use it in your logic.
|
|
10494
|
+
* @enum {string}
|
|
10495
|
+
*/
|
|
10496
|
+
code: "instance_changed" | "type_has_subtypes" | "type_in_use";
|
|
10497
|
+
/** @description A description of the error for a person to read. It can change, so don't match on it. */
|
|
10498
|
+
message: string;
|
|
10499
|
+
/** @description More about the error, such as the field it concerns. Each code defines its own details. */
|
|
10500
|
+
details?: {
|
|
10501
|
+
[key: string]: unknown;
|
|
10502
|
+
};
|
|
10503
|
+
};
|
|
10504
|
+
};
|
|
10505
|
+
/** @description An error response. */
|
|
10506
|
+
BulkCapExceededOrValidationErrorRefusal: {
|
|
10507
|
+
/** @description What went wrong. */
|
|
10508
|
+
error: {
|
|
10509
|
+
/**
|
|
10510
|
+
* @description A machine-readable code for the error. Use it in your logic.
|
|
10511
|
+
* @enum {string}
|
|
10512
|
+
*/
|
|
10513
|
+
code: "bulk_cap_exceeded" | "validation_error";
|
|
10514
|
+
/** @description A description of the error for a person to read. It can change, so don't match on it. */
|
|
10515
|
+
message: string;
|
|
10516
|
+
/** @description More about the error, such as the field it concerns. Each code defines its own details. */
|
|
10517
|
+
details?: {
|
|
10518
|
+
[key: string]: unknown;
|
|
10519
|
+
};
|
|
10520
|
+
};
|
|
10521
|
+
};
|
|
10522
|
+
/** @description A type registered under an `app.<vendor>` namespace, with how many items of it stand in each state. */
|
|
10523
|
+
AppVendorDataType: {
|
|
10524
|
+
/**
|
|
10525
|
+
* @description The type's identifier.
|
|
10526
|
+
* @example app.acme.setting
|
|
10527
|
+
*/
|
|
10528
|
+
type: string;
|
|
10529
|
+
/** @description How many of its items are active. */
|
|
10530
|
+
active: number;
|
|
10531
|
+
/** @description How many of its items are archived. */
|
|
10532
|
+
archived: number;
|
|
10533
|
+
/** @description How many of its items are in the trash. */
|
|
10534
|
+
trashed: number;
|
|
10535
|
+
};
|
|
10536
|
+
/** @description An item of a type under an `app.<vendor>` namespace, in any state. */
|
|
10537
|
+
AppVendorDataItem: {
|
|
10538
|
+
/**
|
|
10539
|
+
* @description Unique identifier for the item.
|
|
10540
|
+
* @example 019980d6-7612-7000-8000-000000000002
|
|
10541
|
+
*/
|
|
10542
|
+
id: string;
|
|
10543
|
+
/**
|
|
10544
|
+
* @description The item's type.
|
|
10545
|
+
* @example app.acme.setting
|
|
10546
|
+
*/
|
|
10547
|
+
type: string;
|
|
10548
|
+
/** @description The item's version. */
|
|
10549
|
+
version: number;
|
|
10550
|
+
/** @description The item's title, or a name Marfa gives an item without one. */
|
|
10551
|
+
name: string;
|
|
10552
|
+
/** @description The source that wrote the item. */
|
|
10553
|
+
source: string;
|
|
10554
|
+
/**
|
|
10555
|
+
* @description The item's state: `active`, `archived`, or `trashed` while it is in the trash.
|
|
10556
|
+
* @enum {string}
|
|
10557
|
+
*/
|
|
10558
|
+
state: "active" | "archived" | "trashed";
|
|
10559
|
+
/**
|
|
10560
|
+
* Format: date-time
|
|
10561
|
+
* @description When the item was created, in UTC.
|
|
10562
|
+
* @example 2026-11-21T09:30:00.000Z
|
|
10563
|
+
*/
|
|
10564
|
+
created_at: string;
|
|
10565
|
+
};
|
|
10566
|
+
/** @description What an app keeps under one `app.<vendor>` namespace: its types with counts, and a page of its items in every state. */
|
|
10567
|
+
AppVendorDataPage: {
|
|
10568
|
+
/**
|
|
10569
|
+
* @description The namespace, as `app.<vendor>`.
|
|
10570
|
+
* @example app.acme
|
|
10571
|
+
*/
|
|
10572
|
+
vendor: string;
|
|
10573
|
+
/**
|
|
10574
|
+
* @description The OAuth client ID of the app that holds the namespace, or `null` while the owner holds it.
|
|
10575
|
+
* @example 01a10127-d974-7c54-8cc4-5c5581d45c4c
|
|
10576
|
+
*/
|
|
10577
|
+
client_id: string | null;
|
|
10578
|
+
/** @description Every type registered under the namespace, by identifier, each in every page. */
|
|
10579
|
+
types: components["schemas"]["AppVendorDataType"][];
|
|
10580
|
+
/** @description A page of the namespace's items, oldest first. */
|
|
10581
|
+
data: components["schemas"]["AppVendorDataItem"][];
|
|
10582
|
+
/**
|
|
10583
|
+
* @description Send as `cursor` for the next page, or `null` on the last page.
|
|
10584
|
+
* @example null
|
|
10585
|
+
*/
|
|
10586
|
+
next_cursor: string | null;
|
|
10587
|
+
};
|
|
10588
|
+
/** @description What one removal of an `app.<vendor>` namespace's data deleted, and how many of its items are left. */
|
|
10589
|
+
AppVendorDataRemoval: {
|
|
10590
|
+
/**
|
|
10591
|
+
* @description The namespace, as `app.<vendor>`.
|
|
10592
|
+
* @example app.acme
|
|
10593
|
+
*/
|
|
10594
|
+
vendor: string;
|
|
10595
|
+
/** @description How many items this call deleted, at most 1,000. */
|
|
10596
|
+
removed_items: number;
|
|
10597
|
+
/** @description How many types this call deleted: every type under the namespace, in the call that leaves no item. */
|
|
10598
|
+
removed_types: number;
|
|
10599
|
+
/** @description How many items of the namespace are left. Call again until it is `0`. */
|
|
10600
|
+
remaining_items: number;
|
|
10601
|
+
};
|
|
10446
10602
|
};
|
|
10447
10603
|
responses: never;
|
|
10448
10604
|
parameters: never;
|
|
@@ -38676,6 +38832,9 @@ interface operations {
|
|
|
38676
38832
|
* "scopes": [
|
|
38677
38833
|
* "core.note:read"
|
|
38678
38834
|
* ],
|
|
38835
|
+
* "vendors": [
|
|
38836
|
+
* "app.reader"
|
|
38837
|
+
* ],
|
|
38679
38838
|
* "status": "active",
|
|
38680
38839
|
* "granted_at": "2026-10-03T09:30:00.000Z",
|
|
38681
38840
|
* "last_used_at": null
|
|
@@ -38792,6 +38951,8 @@ interface operations {
|
|
|
38792
38951
|
query?: {
|
|
38793
38952
|
/** @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. */
|
|
38794
38953
|
revoke_keys?: boolean;
|
|
38954
|
+
/** @description For an app, also delete for good the items and types of every `app.<vendor>` namespace it holds, in the same write. Needs `items.purge`; a key also needs write on those types and `schema.write`. Omitting it, or `false`, keeps them. */
|
|
38955
|
+
remove_data?: boolean;
|
|
38795
38956
|
};
|
|
38796
38957
|
header?: never;
|
|
38797
38958
|
path: {
|
|
@@ -38818,7 +38979,10 @@ interface operations {
|
|
|
38818
38979
|
"application/json": components["schemas"]["Ok"];
|
|
38819
38980
|
};
|
|
38820
38981
|
};
|
|
38821
|
-
/**
|
|
38982
|
+
/**
|
|
38983
|
+
* @description - `validation_error`: the query has a parameter this endpoint doesn't take, or `revoke_keys` or `remove_data` is neither `true` nor `false`, or is named more than once. Nothing is revoked.
|
|
38984
|
+
* - `bulk_cap_exceeded`: with `remove_data`, the app holds more than 1,000 items. Nothing is revoked; delete them first with `DELETE /app-vendors/{vendor}/data`.
|
|
38985
|
+
*/
|
|
38822
38986
|
400: {
|
|
38823
38987
|
headers: {
|
|
38824
38988
|
"X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
|
|
@@ -38827,7 +38991,7 @@ interface operations {
|
|
|
38827
38991
|
[name: string]: unknown;
|
|
38828
38992
|
};
|
|
38829
38993
|
content: {
|
|
38830
|
-
"application/json": components["schemas"]["
|
|
38994
|
+
"application/json": components["schemas"]["BulkCapExceededOrValidationErrorRefusal"];
|
|
38831
38995
|
};
|
|
38832
38996
|
};
|
|
38833
38997
|
/** @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. */
|
|
@@ -38842,7 +39006,10 @@ interface operations {
|
|
|
38842
39006
|
"application/json": components["schemas"]["UnauthorizedRefusal"];
|
|
38843
39007
|
};
|
|
38844
39008
|
};
|
|
38845
|
-
/**
|
|
39009
|
+
/**
|
|
39010
|
+
* @description - `forbidden`: the credential lacks `grants.manage`, or with `remove_data` `items.purge` or `schema.write` (`details.required_scope`), or with `remove_data` it is an app's sign-in or a key an app made and the grant is another app's.
|
|
39011
|
+
* - `type_not_permitted`: a key or an app's sign-in lacks write on a type under the app's namespaces with `remove_data`. `details.grant` names `<vendor>.*`.
|
|
39012
|
+
*/
|
|
38846
39013
|
403: {
|
|
38847
39014
|
headers: {
|
|
38848
39015
|
"X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
|
|
@@ -38851,7 +39018,7 @@ interface operations {
|
|
|
38851
39018
|
[name: string]: unknown;
|
|
38852
39019
|
};
|
|
38853
39020
|
content: {
|
|
38854
|
-
"application/json": components["schemas"]["
|
|
39021
|
+
"application/json": components["schemas"]["ForbiddenOrTypeNotPermittedRefusal"];
|
|
38855
39022
|
};
|
|
38856
39023
|
};
|
|
38857
39024
|
/** @description - `grant_not_found`: the ID does not name an app grant. */
|
|
@@ -38866,6 +39033,21 @@ interface operations {
|
|
|
38866
39033
|
"application/json": components["schemas"]["GrantNotFoundRefusal"];
|
|
38867
39034
|
};
|
|
38868
39035
|
};
|
|
39036
|
+
/**
|
|
39037
|
+
* @description - `type_in_use`: with `remove_data`, a folder, view, webhook or table column outside the app's namespaces names one of its types. Nothing is revoked.
|
|
39038
|
+
* - `type_has_subtypes`: with `remove_data`, a type outside the app's namespaces inherits from one of its types. Nothing is revoked.
|
|
39039
|
+
*/
|
|
39040
|
+
409: {
|
|
39041
|
+
headers: {
|
|
39042
|
+
"X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
|
|
39043
|
+
"X-Request-ID": components["headers"]["X-Request-ID"];
|
|
39044
|
+
"X-Error-Code": components["headers"]["X-Error-Code"];
|
|
39045
|
+
[name: string]: unknown;
|
|
39046
|
+
};
|
|
39047
|
+
content: {
|
|
39048
|
+
"application/json": components["schemas"]["TypeHasSubtypesOrTypeInUseRefusal"];
|
|
39049
|
+
};
|
|
39050
|
+
};
|
|
38869
39051
|
/** @description `contract_mismatch`: `X-Marfa-Contract` names another contract version than this instance speaks, or is not a whole number. Nothing was done. */
|
|
38870
39052
|
412: {
|
|
38871
39053
|
headers: {
|
|
@@ -39156,6 +39338,7 @@ interface operations {
|
|
|
39156
39338
|
* {
|
|
39157
39339
|
* "vendor": "app.acme",
|
|
39158
39340
|
* "client_id": "01a10127-d974-7c54-8cc4-5b1e0f3c2a10",
|
|
39341
|
+
* "client_name": "Reader",
|
|
39159
39342
|
* "claimed_at": "2026-11-20T09:30:00.000Z"
|
|
39160
39343
|
* }
|
|
39161
39344
|
* ],
|
|
@@ -39302,6 +39485,7 @@ interface operations {
|
|
|
39302
39485
|
* @example {
|
|
39303
39486
|
* "vendor": "app.acme",
|
|
39304
39487
|
* "client_id": "01a10127-d974-7c54-8cc4-5b1e0f3c2a10",
|
|
39488
|
+
* "client_name": "Reader",
|
|
39305
39489
|
* "claimed_at": "2026-11-20T09:30:00.000Z"
|
|
39306
39490
|
* }
|
|
39307
39491
|
*/
|
|
@@ -39459,6 +39643,342 @@ interface operations {
|
|
|
39459
39643
|
};
|
|
39460
39644
|
};
|
|
39461
39645
|
};
|
|
39646
|
+
listAppVendorData: {
|
|
39647
|
+
parameters: {
|
|
39648
|
+
query?: {
|
|
39649
|
+
/** @description The maximum number of results to return. */
|
|
39650
|
+
limit?: number;
|
|
39651
|
+
/** @description The `next_cursor` from the previous page. Leave it out to get the first page. */
|
|
39652
|
+
cursor?: string;
|
|
39653
|
+
};
|
|
39654
|
+
header?: never;
|
|
39655
|
+
path: {
|
|
39656
|
+
/** @description The namespace, as `app.<vendor>`. */
|
|
39657
|
+
vendor: string;
|
|
39658
|
+
};
|
|
39659
|
+
cookie?: never;
|
|
39660
|
+
};
|
|
39661
|
+
requestBody?: never;
|
|
39662
|
+
responses: {
|
|
39663
|
+
/** @description Returns the namespace's types and a page of its items. */
|
|
39664
|
+
200: {
|
|
39665
|
+
headers: {
|
|
39666
|
+
"X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
|
|
39667
|
+
"X-Request-ID": components["headers"]["X-Request-ID"];
|
|
39668
|
+
[name: string]: unknown;
|
|
39669
|
+
};
|
|
39670
|
+
content: {
|
|
39671
|
+
/**
|
|
39672
|
+
* @example {
|
|
39673
|
+
* "vendor": "app.acme",
|
|
39674
|
+
* "client_id": "01a10127-d974-7c54-8cc4-5c5581d45c4c",
|
|
39675
|
+
* "types": [
|
|
39676
|
+
* {
|
|
39677
|
+
* "type": "app.acme.setting",
|
|
39678
|
+
* "active": 1,
|
|
39679
|
+
* "archived": 0,
|
|
39680
|
+
* "trashed": 1
|
|
39681
|
+
* }
|
|
39682
|
+
* ],
|
|
39683
|
+
* "data": [
|
|
39684
|
+
* {
|
|
39685
|
+
* "id": "019980d6-7612-7000-8000-000000000002",
|
|
39686
|
+
* "type": "app.acme.setting",
|
|
39687
|
+
* "version": 3,
|
|
39688
|
+
* "name": "Preferences",
|
|
39689
|
+
* "source": "oauth:01a10127-d974-7c54-8cc4-5c5581d45c4c",
|
|
39690
|
+
* "state": "active",
|
|
39691
|
+
* "created_at": "2026-11-21T09:30:00.000Z"
|
|
39692
|
+
* }
|
|
39693
|
+
* ],
|
|
39694
|
+
* "next_cursor": null
|
|
39695
|
+
* }
|
|
39696
|
+
*/
|
|
39697
|
+
"application/json": components["schemas"]["AppVendorDataPage"];
|
|
39698
|
+
};
|
|
39699
|
+
};
|
|
39700
|
+
/** @description - `validation_error`: the vendor is not an `app.<vendor>` namespace, `limit` is not a whole number from 1 to 200, `cursor` is not one this listing gave, or the query has a parameter this endpoint doesn't take. */
|
|
39701
|
+
400: {
|
|
39702
|
+
headers: {
|
|
39703
|
+
"X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
|
|
39704
|
+
"X-Request-ID": components["headers"]["X-Request-ID"];
|
|
39705
|
+
"X-Error-Code": components["headers"]["X-Error-Code"];
|
|
39706
|
+
[name: string]: unknown;
|
|
39707
|
+
};
|
|
39708
|
+
content: {
|
|
39709
|
+
"application/json": components["schemas"]["ValidationErrorRefusal"];
|
|
39710
|
+
};
|
|
39711
|
+
};
|
|
39712
|
+
/** @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. */
|
|
39713
|
+
401: {
|
|
39714
|
+
headers: {
|
|
39715
|
+
"X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
|
|
39716
|
+
"X-Request-ID": components["headers"]["X-Request-ID"];
|
|
39717
|
+
"X-Error-Code": components["headers"]["X-Error-Code"];
|
|
39718
|
+
[name: string]: unknown;
|
|
39719
|
+
};
|
|
39720
|
+
content: {
|
|
39721
|
+
"application/json": components["schemas"]["UnauthorizedRefusal"];
|
|
39722
|
+
};
|
|
39723
|
+
};
|
|
39724
|
+
/**
|
|
39725
|
+
* @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 and another app or the owner holds the namespace.
|
|
39726
|
+
* - `type_not_permitted`: a key or an app's sign-in lacks read on a type under the namespace. `details.grant` names `<vendor>.*`.
|
|
39727
|
+
*/
|
|
39728
|
+
403: {
|
|
39729
|
+
headers: {
|
|
39730
|
+
"X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
|
|
39731
|
+
"X-Request-ID": components["headers"]["X-Request-ID"];
|
|
39732
|
+
"X-Error-Code": components["headers"]["X-Error-Code"];
|
|
39733
|
+
[name: string]: unknown;
|
|
39734
|
+
};
|
|
39735
|
+
content: {
|
|
39736
|
+
"application/json": components["schemas"]["ForbiddenOrTypeNotPermittedRefusal"];
|
|
39737
|
+
};
|
|
39738
|
+
};
|
|
39739
|
+
/** @description - `not_found`: no app or owner holds the namespace, and `details.vendor` names it. */
|
|
39740
|
+
404: {
|
|
39741
|
+
headers: {
|
|
39742
|
+
"X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
|
|
39743
|
+
"X-Request-ID": components["headers"]["X-Request-ID"];
|
|
39744
|
+
"X-Error-Code": components["headers"]["X-Error-Code"];
|
|
39745
|
+
[name: string]: unknown;
|
|
39746
|
+
};
|
|
39747
|
+
content: {
|
|
39748
|
+
"application/json": components["schemas"]["NotFoundRefusal"];
|
|
39749
|
+
};
|
|
39750
|
+
};
|
|
39751
|
+
/** @description `contract_mismatch`: `X-Marfa-Contract` names another contract version than this instance speaks, or is not a whole number. Nothing was done. */
|
|
39752
|
+
412: {
|
|
39753
|
+
headers: {
|
|
39754
|
+
"X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
|
|
39755
|
+
"X-Request-ID": components["headers"]["X-Request-ID"];
|
|
39756
|
+
"X-Error-Code": components["headers"]["X-Error-Code"];
|
|
39757
|
+
[name: string]: unknown;
|
|
39758
|
+
};
|
|
39759
|
+
content: {
|
|
39760
|
+
"application/json": components["schemas"]["ContractMismatchRefusal"];
|
|
39761
|
+
};
|
|
39762
|
+
};
|
|
39763
|
+
/** @description `rate_limited`: you sent too many requests. Wait for the number of seconds in `Retry-After`, then try again. */
|
|
39764
|
+
429: {
|
|
39765
|
+
headers: {
|
|
39766
|
+
"X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
|
|
39767
|
+
"X-Request-ID": components["headers"]["X-Request-ID"];
|
|
39768
|
+
"X-Error-Code": components["headers"]["X-Error-Code"];
|
|
39769
|
+
"Retry-After": components["headers"]["Retry-After"];
|
|
39770
|
+
[name: string]: unknown;
|
|
39771
|
+
};
|
|
39772
|
+
content: {
|
|
39773
|
+
"application/json": components["schemas"]["RateLimitedRefusal"];
|
|
39774
|
+
};
|
|
39775
|
+
};
|
|
39776
|
+
/** @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. */
|
|
39777
|
+
500: {
|
|
39778
|
+
headers: {
|
|
39779
|
+
"X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
|
|
39780
|
+
"X-Request-ID": components["headers"]["X-Request-ID"];
|
|
39781
|
+
"X-Error-Code": components["headers"]["X-Error-Code"];
|
|
39782
|
+
[name: string]: unknown;
|
|
39783
|
+
};
|
|
39784
|
+
content: {
|
|
39785
|
+
"application/json": components["schemas"]["InternalErrorRefusal"];
|
|
39786
|
+
};
|
|
39787
|
+
};
|
|
39788
|
+
/** @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`. */
|
|
39789
|
+
503: {
|
|
39790
|
+
headers: {
|
|
39791
|
+
"X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
|
|
39792
|
+
"X-Request-ID": components["headers"]["X-Request-ID"];
|
|
39793
|
+
"X-Error-Code": components["headers"]["X-Error-Code"];
|
|
39794
|
+
"Retry-After": components["headers"]["Retry-After"];
|
|
39795
|
+
[name: string]: unknown;
|
|
39796
|
+
};
|
|
39797
|
+
content: {
|
|
39798
|
+
"application/json": components["schemas"]["WriteContentionRefusal"];
|
|
39799
|
+
};
|
|
39800
|
+
};
|
|
39801
|
+
/** @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. */
|
|
39802
|
+
507: {
|
|
39803
|
+
headers: {
|
|
39804
|
+
"X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
|
|
39805
|
+
"X-Request-ID": components["headers"]["X-Request-ID"];
|
|
39806
|
+
"X-Error-Code": components["headers"]["X-Error-Code"];
|
|
39807
|
+
[name: string]: unknown;
|
|
39808
|
+
};
|
|
39809
|
+
content: {
|
|
39810
|
+
"application/json": components["schemas"]["InsufficientStorageRefusal"];
|
|
39811
|
+
};
|
|
39812
|
+
};
|
|
39813
|
+
};
|
|
39814
|
+
};
|
|
39815
|
+
deleteAppVendorData: {
|
|
39816
|
+
parameters: {
|
|
39817
|
+
query?: never;
|
|
39818
|
+
header?: {
|
|
39819
|
+
/** @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. */
|
|
39820
|
+
"X-Marfa-Instance-Id"?: string;
|
|
39821
|
+
};
|
|
39822
|
+
path: {
|
|
39823
|
+
/** @description The namespace, as `app.<vendor>`. */
|
|
39824
|
+
vendor: string;
|
|
39825
|
+
};
|
|
39826
|
+
cookie?: never;
|
|
39827
|
+
};
|
|
39828
|
+
requestBody?: never;
|
|
39829
|
+
responses: {
|
|
39830
|
+
/** @description Returns what the call deleted and how many items are left. */
|
|
39831
|
+
200: {
|
|
39832
|
+
headers: {
|
|
39833
|
+
"X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
|
|
39834
|
+
"X-Request-ID": components["headers"]["X-Request-ID"];
|
|
39835
|
+
[name: string]: unknown;
|
|
39836
|
+
};
|
|
39837
|
+
content: {
|
|
39838
|
+
/**
|
|
39839
|
+
* @example {
|
|
39840
|
+
* "vendor": "app.acme",
|
|
39841
|
+
* "removed_items": 2,
|
|
39842
|
+
* "removed_types": 1,
|
|
39843
|
+
* "remaining_items": 0
|
|
39844
|
+
* }
|
|
39845
|
+
*/
|
|
39846
|
+
"application/json": components["schemas"]["AppVendorDataRemoval"];
|
|
39847
|
+
};
|
|
39848
|
+
};
|
|
39849
|
+
/** @description - `validation_error`: the vendor is not an `app.<vendor>` namespace, or the query has a parameter this endpoint doesn't take. */
|
|
39850
|
+
400: {
|
|
39851
|
+
headers: {
|
|
39852
|
+
"X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
|
|
39853
|
+
"X-Request-ID": components["headers"]["X-Request-ID"];
|
|
39854
|
+
"X-Error-Code": components["headers"]["X-Error-Code"];
|
|
39855
|
+
[name: string]: unknown;
|
|
39856
|
+
};
|
|
39857
|
+
content: {
|
|
39858
|
+
"application/json": components["schemas"]["ValidationErrorRefusal"];
|
|
39859
|
+
};
|
|
39860
|
+
};
|
|
39861
|
+
/** @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. */
|
|
39862
|
+
401: {
|
|
39863
|
+
headers: {
|
|
39864
|
+
"X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
|
|
39865
|
+
"X-Request-ID": components["headers"]["X-Request-ID"];
|
|
39866
|
+
"X-Error-Code": components["headers"]["X-Error-Code"];
|
|
39867
|
+
[name: string]: unknown;
|
|
39868
|
+
};
|
|
39869
|
+
content: {
|
|
39870
|
+
"application/json": components["schemas"]["UnauthorizedRefusal"];
|
|
39871
|
+
};
|
|
39872
|
+
};
|
|
39873
|
+
/**
|
|
39874
|
+
* @description - `forbidden`: the credential lacks `grants.manage`, `items.purge`, or `schema.write` while types are registered there (`details.required_scope`), or it is an app's sign-in or a key an app made and another app or the owner holds the namespace.
|
|
39875
|
+
* - `type_not_permitted`: a key or an app's sign-in lacks write on a type under the namespace. `details.grant` names `<vendor>.*`.
|
|
39876
|
+
*/
|
|
39877
|
+
403: {
|
|
39878
|
+
headers: {
|
|
39879
|
+
"X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
|
|
39880
|
+
"X-Request-ID": components["headers"]["X-Request-ID"];
|
|
39881
|
+
"X-Error-Code": components["headers"]["X-Error-Code"];
|
|
39882
|
+
[name: string]: unknown;
|
|
39883
|
+
};
|
|
39884
|
+
content: {
|
|
39885
|
+
"application/json": components["schemas"]["ForbiddenOrTypeNotPermittedRefusal"];
|
|
39886
|
+
};
|
|
39887
|
+
};
|
|
39888
|
+
/** @description - `not_found`: no app or owner holds the namespace, and `details.vendor` names it. */
|
|
39889
|
+
404: {
|
|
39890
|
+
headers: {
|
|
39891
|
+
"X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
|
|
39892
|
+
"X-Request-ID": components["headers"]["X-Request-ID"];
|
|
39893
|
+
"X-Error-Code": components["headers"]["X-Error-Code"];
|
|
39894
|
+
[name: string]: unknown;
|
|
39895
|
+
};
|
|
39896
|
+
content: {
|
|
39897
|
+
"application/json": components["schemas"]["NotFoundRefusal"];
|
|
39898
|
+
};
|
|
39899
|
+
};
|
|
39900
|
+
/**
|
|
39901
|
+
* @description - `instance_changed`: `X-Marfa-Instance-Id` names another instance.
|
|
39902
|
+
* - `type_in_use`: a folder, view, webhook or table column outside the namespace names one of its types; `details.settings` and `details.columns` name them.
|
|
39903
|
+
* - `type_has_subtypes`: a type outside the namespace inherits from one of its types.
|
|
39904
|
+
*
|
|
39905
|
+
* Nothing is deleted.
|
|
39906
|
+
*/
|
|
39907
|
+
409: {
|
|
39908
|
+
headers: {
|
|
39909
|
+
"X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
|
|
39910
|
+
"X-Request-ID": components["headers"]["X-Request-ID"];
|
|
39911
|
+
"X-Error-Code": components["headers"]["X-Error-Code"];
|
|
39912
|
+
[name: string]: unknown;
|
|
39913
|
+
};
|
|
39914
|
+
content: {
|
|
39915
|
+
"application/json": components["schemas"]["InstanceChangedOrTypeHasSubtypesOrTypeInUseRefusal"];
|
|
39916
|
+
};
|
|
39917
|
+
};
|
|
39918
|
+
/** @description `contract_mismatch`: `X-Marfa-Contract` names another contract version than this instance speaks, or is not a whole number. Nothing was done. */
|
|
39919
|
+
412: {
|
|
39920
|
+
headers: {
|
|
39921
|
+
"X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
|
|
39922
|
+
"X-Request-ID": components["headers"]["X-Request-ID"];
|
|
39923
|
+
"X-Error-Code": components["headers"]["X-Error-Code"];
|
|
39924
|
+
[name: string]: unknown;
|
|
39925
|
+
};
|
|
39926
|
+
content: {
|
|
39927
|
+
"application/json": components["schemas"]["ContractMismatchRefusal"];
|
|
39928
|
+
};
|
|
39929
|
+
};
|
|
39930
|
+
/** @description `rate_limited`: you sent too many requests. Wait for the number of seconds in `Retry-After`, then try again. */
|
|
39931
|
+
429: {
|
|
39932
|
+
headers: {
|
|
39933
|
+
"X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
|
|
39934
|
+
"X-Request-ID": components["headers"]["X-Request-ID"];
|
|
39935
|
+
"X-Error-Code": components["headers"]["X-Error-Code"];
|
|
39936
|
+
"Retry-After": components["headers"]["Retry-After"];
|
|
39937
|
+
[name: string]: unknown;
|
|
39938
|
+
};
|
|
39939
|
+
content: {
|
|
39940
|
+
"application/json": components["schemas"]["RateLimitedRefusal"];
|
|
39941
|
+
};
|
|
39942
|
+
};
|
|
39943
|
+
/** @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. */
|
|
39944
|
+
500: {
|
|
39945
|
+
headers: {
|
|
39946
|
+
"X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
|
|
39947
|
+
"X-Request-ID": components["headers"]["X-Request-ID"];
|
|
39948
|
+
"X-Error-Code": components["headers"]["X-Error-Code"];
|
|
39949
|
+
[name: string]: unknown;
|
|
39950
|
+
};
|
|
39951
|
+
content: {
|
|
39952
|
+
"application/json": components["schemas"]["InternalErrorRefusal"];
|
|
39953
|
+
};
|
|
39954
|
+
};
|
|
39955
|
+
/** @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`. */
|
|
39956
|
+
503: {
|
|
39957
|
+
headers: {
|
|
39958
|
+
"X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
|
|
39959
|
+
"X-Request-ID": components["headers"]["X-Request-ID"];
|
|
39960
|
+
"X-Error-Code": components["headers"]["X-Error-Code"];
|
|
39961
|
+
"Retry-After": components["headers"]["Retry-After"];
|
|
39962
|
+
[name: string]: unknown;
|
|
39963
|
+
};
|
|
39964
|
+
content: {
|
|
39965
|
+
"application/json": components["schemas"]["WriteContentionRefusal"];
|
|
39966
|
+
};
|
|
39967
|
+
};
|
|
39968
|
+
/** @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. */
|
|
39969
|
+
507: {
|
|
39970
|
+
headers: {
|
|
39971
|
+
"X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
|
|
39972
|
+
"X-Request-ID": components["headers"]["X-Request-ID"];
|
|
39973
|
+
"X-Error-Code": components["headers"]["X-Error-Code"];
|
|
39974
|
+
[name: string]: unknown;
|
|
39975
|
+
};
|
|
39976
|
+
content: {
|
|
39977
|
+
"application/json": components["schemas"]["InsufficientStorageRefusal"];
|
|
39978
|
+
};
|
|
39979
|
+
};
|
|
39980
|
+
};
|
|
39981
|
+
};
|
|
39462
39982
|
authorizeApp: {
|
|
39463
39983
|
parameters: {
|
|
39464
39984
|
query: {
|
|
@@ -41080,6 +41600,8 @@ interface operations {
|
|
|
41080
41600
|
query?: {
|
|
41081
41601
|
/** @description For an app, also revoke every key it minted but an owner's key (`owner_key`), as its `minted_by` entries show. Only an app takes it. */
|
|
41082
41602
|
revoke_keys?: boolean;
|
|
41603
|
+
/** @description For an app, also delete for good the items and types of every `app.<vendor>` namespace it holds, in the same write. Needs `items.purge`; a key also needs write on those types and `schema.write`. Omitting it, or `false`, keeps them. */
|
|
41604
|
+
remove_data?: boolean;
|
|
41083
41605
|
};
|
|
41084
41606
|
header?: {
|
|
41085
41607
|
/** @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. */
|
|
@@ -41109,7 +41631,10 @@ interface operations {
|
|
|
41109
41631
|
"application/json": components["schemas"]["Ok"];
|
|
41110
41632
|
};
|
|
41111
41633
|
};
|
|
41112
|
-
/**
|
|
41634
|
+
/**
|
|
41635
|
+
* @description - `validation_error`: `revoke_keys` or `remove_data` is neither `true` nor `false`, or is named more than once, or it is `true` and the ID names a browser or a key. Nothing ends.
|
|
41636
|
+
* - `bulk_cap_exceeded`: with `remove_data`, the app holds more than 1,000 items. Nothing ends; delete them first with `DELETE /app-vendors/{vendor}/data`.
|
|
41637
|
+
*/
|
|
41113
41638
|
400: {
|
|
41114
41639
|
headers: {
|
|
41115
41640
|
"X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
|
|
@@ -41118,7 +41643,7 @@ interface operations {
|
|
|
41118
41643
|
[name: string]: unknown;
|
|
41119
41644
|
};
|
|
41120
41645
|
content: {
|
|
41121
|
-
"application/json": components["schemas"]["
|
|
41646
|
+
"application/json": components["schemas"]["BulkCapExceededOrValidationErrorRefusal"];
|
|
41122
41647
|
};
|
|
41123
41648
|
};
|
|
41124
41649
|
/** @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. */
|
|
@@ -41133,7 +41658,10 @@ interface operations {
|
|
|
41133
41658
|
"application/json": components["schemas"]["UnauthorizedRefusal"];
|
|
41134
41659
|
};
|
|
41135
41660
|
};
|
|
41136
|
-
/**
|
|
41661
|
+
/**
|
|
41662
|
+
* @description - `forbidden`: the credential lacks `sign_ins.manage`, or with `remove_data` `items.purge` or `schema.write` (`details.required_scope`), or with `remove_data` it is an app's sign-in or a key an app made and the ID names another app.
|
|
41663
|
+
* - `type_not_permitted`: a key or an app's sign-in lacks write on a type under the app's namespaces with `remove_data`. `details.grant` names `<vendor>.*`.
|
|
41664
|
+
*/
|
|
41137
41665
|
403: {
|
|
41138
41666
|
headers: {
|
|
41139
41667
|
"X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
|
|
@@ -41142,7 +41670,7 @@ interface operations {
|
|
|
41142
41670
|
[name: string]: unknown;
|
|
41143
41671
|
};
|
|
41144
41672
|
content: {
|
|
41145
|
-
"application/json": components["schemas"]["
|
|
41673
|
+
"application/json": components["schemas"]["ForbiddenOrTypeNotPermittedRefusal"];
|
|
41146
41674
|
};
|
|
41147
41675
|
};
|
|
41148
41676
|
/** @description - `sign_in_not_found`: no live sign-in of the owner has this ID. It may have ended or expired. */
|
|
@@ -41157,7 +41685,13 @@ interface operations {
|
|
|
41157
41685
|
"application/json": components["schemas"]["SignInNotFoundRefusal"];
|
|
41158
41686
|
};
|
|
41159
41687
|
};
|
|
41160
|
-
/**
|
|
41688
|
+
/**
|
|
41689
|
+
* @description - `instance_changed`: `X-Marfa-Instance-Id` names another instance. Rebuild the working copy from the instance at this address.
|
|
41690
|
+
* - `type_in_use`: with `remove_data`, a folder, view, webhook or table column outside the app's namespaces names one of its types.
|
|
41691
|
+
* - `type_has_subtypes`: with `remove_data`, a type outside them inherits from one.
|
|
41692
|
+
*
|
|
41693
|
+
* Nothing ends.
|
|
41694
|
+
*/
|
|
41161
41695
|
409: {
|
|
41162
41696
|
headers: {
|
|
41163
41697
|
"X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
|
|
@@ -41166,7 +41700,7 @@ interface operations {
|
|
|
41166
41700
|
[name: string]: unknown;
|
|
41167
41701
|
};
|
|
41168
41702
|
content: {
|
|
41169
|
-
"application/json": components["schemas"]["
|
|
41703
|
+
"application/json": components["schemas"]["InstanceChangedOrTypeHasSubtypesOrTypeInUseRefusal"];
|
|
41170
41704
|
};
|
|
41171
41705
|
};
|
|
41172
41706
|
/** @description `contract_mismatch`: `X-Marfa-Contract` names another contract version than this instance speaks, or is not a whole number. Nothing was done. */
|