@withmarfa/client 0.0.12 → 0.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.d.ts +526 -47
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -17,7 +17,7 @@ interface paths {
17
17
  };
18
18
  /**
19
19
  * Describe the instance
20
- * @description Describes the instance: its `instance_id`, the build it runs, the contract version it speaks and the features it serves. Needs no credential.
20
+ * @description Describes the instance: its display name, `instance_id`, the build it runs, the release it was made as when it is one, the contract version it speaks and the features it serves. Needs no credential.
21
21
  */
22
22
  get: operations["getInstance"];
23
23
  put?: never;
@@ -1357,7 +1357,7 @@ interface paths {
1357
1357
  };
1358
1358
  /**
1359
1359
  * Get the configuration
1360
- * @description Returns the instance configuration: its enforcement levers and retention settings, with its `instance_id`. A setting nobody has set is left out. Requires `config.manage`.
1360
+ * @description Returns the instance configuration: its display name, enforcement levers and retention settings, with its `instance_id`. A setting nobody has set is left out. Requires `config.manage`.
1361
1361
  */
1362
1362
  get: operations["getConfig"];
1363
1363
  /**
@@ -1453,7 +1453,11 @@ interface paths {
1453
1453
  delete?: never;
1454
1454
  options?: never;
1455
1455
  head?: never;
1456
- patch?: never;
1456
+ /**
1457
+ * Update the owner
1458
+ * @description Updates the owner's email or name and returns the owner. Requires a direct owner sign-in within five minutes or private machine authority. Changing email needs no confirmation; credentials, sessions, and grants keep their identity.
1459
+ */
1460
+ patch: operations["updateOwner"];
1457
1461
  trace?: never;
1458
1462
  };
1459
1463
  "/owner/sign-ins": {
@@ -1544,6 +1548,26 @@ interface paths {
1544
1548
  patch: operations["updateOwnerPasskey"];
1545
1549
  trace?: never;
1546
1550
  };
1551
+ "/profile": {
1552
+ parameters: {
1553
+ query?: never;
1554
+ header?: never;
1555
+ path?: never;
1556
+ cookie?: never;
1557
+ };
1558
+ get?: never;
1559
+ put?: never;
1560
+ post?: never;
1561
+ delete?: never;
1562
+ options?: never;
1563
+ head?: never;
1564
+ /**
1565
+ * Update the profile
1566
+ * @description Updates the owner's name or avatar and returns `ok: true`. Requires profile write permission for every submitted field; email cannot be changed here. All fields commit together.
1567
+ */
1568
+ patch: operations["updateProfile"];
1569
+ trace?: never;
1570
+ };
1547
1571
  "/export": {
1548
1572
  parameters: {
1549
1573
  query?: never;
@@ -1820,6 +1844,38 @@ interface components {
1820
1844
  source_allowlist?: components["schemas"]["TypeAndSourceLever"] & unknown;
1821
1845
  source_filter?: components["schemas"]["TypeAndSourceLever"] & unknown;
1822
1846
  };
1847
+ /** @description Profile field permissions. Only the owner can change email. */
1848
+ ProfilePermissions: {
1849
+ /**
1850
+ * @description Access to every profile field. write changes only name and avatar.
1851
+ * @enum {string}
1852
+ */
1853
+ "*"?: "read" | "write";
1854
+ /**
1855
+ * @description Access to the owner's name.
1856
+ * @enum {string}
1857
+ */
1858
+ name?: "read" | "write";
1859
+ /**
1860
+ * @description Read access to the owner's email address.
1861
+ * @enum {string}
1862
+ */
1863
+ email?: "read";
1864
+ /**
1865
+ * @description Access to the owner's avatar URL.
1866
+ * @enum {string}
1867
+ */
1868
+ avatar?: "read" | "write";
1869
+ };
1870
+ /** @description Stored profile levels by field. Only name and avatar permit writes. */
1871
+ StoredProfilePermissions: {
1872
+ [key: string]: components["schemas"]["PermissionLevel"];
1873
+ };
1874
+ /**
1875
+ * @description What a key may do with an entry: `read` it, or `write` it (which includes reading). A name no entry covers is denied.
1876
+ * @enum {string}
1877
+ */
1878
+ PermissionLevel: "read" | "write";
1823
1879
  /**
1824
1880
  * @description An item's lifecycle state. `active`: in use, and what a listing returns by default. `archived`: kept and readable by ID, but left out of a default listing. `trashed`: in the trash until restored or purged. `revoked`: retired for good, on `system.*` items only.
1825
1881
  * @enum {string}
@@ -2125,13 +2181,12 @@ interface components {
2125
2181
  };
2126
2182
  /** @description An instance: its identity, build, contract version and features. */
2127
2183
  InstanceDescription: {
2128
- /**
2129
- * @description Always `marfa`.
2130
- * @enum {string}
2131
- */
2132
- name: "marfa";
2184
+ /** @description The instance's display name. Defaults to `Marfa`. */
2185
+ name: string;
2133
2186
  /** @description The build the instance runs. */
2134
2187
  version: string;
2188
+ /** @description The release the build was made as, such as `0.0.14`. Absent for a build that is not a release. */
2189
+ release?: string;
2135
2190
  /** @description Unique identifier for the instance. `GET /config` and an archive's manifest show the same value. */
2136
2191
  instance_id: string;
2137
2192
  /** @description The contract version, the same number as this document's `info.version`. It stays at `0` until the first public release. */
@@ -2215,14 +2270,14 @@ interface components {
2215
2270
  };
2216
2271
  };
2217
2272
  /** @description An error response. */
2218
- EdgeTypeNotFoundOrItemNotFoundRefusal: {
2273
+ BlobNotFoundOrEdgeTypeNotFoundOrItemNotFoundRefusal: {
2219
2274
  /** @description What went wrong. */
2220
2275
  error: {
2221
2276
  /**
2222
2277
  * @description A machine-readable code for the error. Use it in your logic.
2223
2278
  * @enum {string}
2224
2279
  */
2225
- code: "edge_type_not_found" | "item_not_found";
2280
+ code: "blob_not_found" | "edge_type_not_found" | "item_not_found";
2226
2281
  /** @description A description of the error for a person to read. It can change, so don't match on it. */
2227
2282
  message: string;
2228
2283
  /** @description More about the error, such as the field it concerns. Each code defines its own details. */
@@ -2399,14 +2454,14 @@ interface components {
2399
2454
  };
2400
2455
  };
2401
2456
  /** @description An error response. */
2402
- EdgeNotFoundOrEdgeTypeNotFoundOrItemNotFoundRefusal: {
2457
+ BlobNotFoundOrEdgeNotFoundOrEdgeTypeNotFoundOrItemNotFoundRefusal: {
2403
2458
  /** @description What went wrong. */
2404
2459
  error: {
2405
2460
  /**
2406
2461
  * @description A machine-readable code for the error. Use it in your logic.
2407
2462
  * @enum {string}
2408
2463
  */
2409
- code: "edge_not_found" | "edge_type_not_found" | "item_not_found";
2464
+ code: "blob_not_found" | "edge_not_found" | "edge_type_not_found" | "item_not_found";
2410
2465
  /** @description A description of the error for a person to read. It can change, so don't match on it. */
2411
2466
  message: string;
2412
2467
  /** @description More about the error, such as the field it concerns. Each code defines its own details. */
@@ -2775,6 +2830,23 @@ interface components {
2775
2830
  };
2776
2831
  };
2777
2832
  /** @description An error response. */
2833
+ EdgeTypeNotFoundOrItemNotFoundRefusal: {
2834
+ /** @description What went wrong. */
2835
+ error: {
2836
+ /**
2837
+ * @description A machine-readable code for the error. Use it in your logic.
2838
+ * @enum {string}
2839
+ */
2840
+ code: "edge_type_not_found" | "item_not_found";
2841
+ /** @description A description of the error for a person to read. It can change, so don't match on it. */
2842
+ message: string;
2843
+ /** @description More about the error, such as the field it concerns. Each code defines its own details. */
2844
+ details?: {
2845
+ [key: string]: unknown;
2846
+ };
2847
+ };
2848
+ };
2849
+ /** @description An error response. */
2778
2850
  IdReusedRefusal: {
2779
2851
  /** @description What went wrong. */
2780
2852
  error: {
@@ -2808,6 +2880,23 @@ interface components {
2808
2880
  };
2809
2881
  };
2810
2882
  };
2883
+ /** @description An error response. */
2884
+ EdgeNotFoundOrEdgeTypeNotFoundOrItemNotFoundRefusal: {
2885
+ /** @description What went wrong. */
2886
+ error: {
2887
+ /**
2888
+ * @description A machine-readable code for the error. Use it in your logic.
2889
+ * @enum {string}
2890
+ */
2891
+ code: "edge_not_found" | "edge_type_not_found" | "item_not_found";
2892
+ /** @description A description of the error for a person to read. It can change, so don't match on it. */
2893
+ message: string;
2894
+ /** @description More about the error, such as the field it concerns. Each code defines its own details. */
2895
+ details?: {
2896
+ [key: string]: unknown;
2897
+ };
2898
+ };
2899
+ };
2811
2900
  /** @description A stale update's answer: the refusal and the current edge. */
2812
2901
  EdgeVersionConflict: {
2813
2902
  error: components["schemas"]["VersionConflictError"] & unknown;
@@ -3699,7 +3788,7 @@ interface components {
3699
3788
  method: string;
3700
3789
  /** @description The query string as the sender sent it, without the `?`; empty if there was none. */
3701
3790
  query: string;
3702
- /** @description `[name, value]` pairs in the order and case they arrived. */
3791
+ /** @description `[name, value]` pairs in the order and case they arrived, without any header whose name begins with `Tailscale-`. */
3703
3792
  headers: [
3704
3793
  string,
3705
3794
  string
@@ -4004,10 +4093,7 @@ interface components {
4004
4093
  metadata_permissions: {
4005
4094
  [key: string]: components["schemas"]["PermissionLevel"];
4006
4095
  };
4007
- /** @description What the key may `read` or `write` of the owner's profile: `name`, `email` or `avatar`, or `*` for all of it. */
4008
- profile_permissions: {
4009
- [key: string]: components["schemas"]["PermissionLevel"];
4010
- };
4096
+ profile_permissions: components["schemas"]["StoredProfilePermissions"] & unknown;
4011
4097
  enforcement_override?: components["schemas"]["EnforcementOverride"] & unknown;
4012
4098
  /** @description When the key was created, in UTC. */
4013
4099
  created_at: string;
@@ -4026,11 +4112,6 @@ interface components {
4026
4112
  * @enum {string}
4027
4113
  */
4028
4114
  TypePermissionLevel: "read" | "write" | "none";
4029
- /**
4030
- * @description What a key may do with an entry: `read` it, or `write` it (which includes reading). A name no entry covers is denied.
4031
- * @enum {string}
4032
- */
4033
- PermissionLevel: "read" | "write";
4034
4115
  /** @description A page holding every key you can reach. */
4035
4116
  ApiKeyPage: {
4036
4117
  /** @description Every key you can reach. */
@@ -4069,10 +4150,7 @@ interface components {
4069
4150
  metadata_permissions: {
4070
4151
  [key: string]: components["schemas"]["PermissionLevel"];
4071
4152
  };
4072
- /** @description What the key may `read` or `write` of the owner's profile: `name`, `email` or `avatar`, or `*` for all of it. */
4073
- profile_permissions: {
4074
- [key: string]: components["schemas"]["PermissionLevel"];
4075
- };
4153
+ profile_permissions: components["schemas"]["StoredProfilePermissions"] & unknown;
4076
4154
  enforcement_override?: components["schemas"]["EnforcementOverride"] & unknown;
4077
4155
  /** @description When the key was created, in UTC. */
4078
4156
  created_at: string;
@@ -4098,10 +4176,12 @@ interface components {
4098
4176
  };
4099
4177
  };
4100
4178
  };
4101
- /** @description The instance configuration: its enforcement levers and retention settings, with the instance's ID. */
4179
+ /** @description The instance configuration: its display name, enforcement levers and retention settings, with the instance's ID. */
4102
4180
  InstanceConfig: {
4103
4181
  /** @description Unique identifier for the instance, the same value `GET /` returns. */
4104
4182
  instance_id: string;
4183
+ /** @description The instance's display name, without control or bidirectional formatting characters. Spaces at each end are trimmed. Absent: `Marfa`. */
4184
+ name?: string;
4105
4185
  /** @description The instance's enforcement levers. Each applies to every credential that doesn't set the same lever itself. Absent: no lever is on. */
4106
4186
  enforcement?: {
4107
4187
  strict_mode?: components["schemas"]["TypeLever"] & unknown;
@@ -4170,6 +4250,23 @@ interface components {
4170
4250
  };
4171
4251
  };
4172
4252
  };
4253
+ /** @description An error response. */
4254
+ BlobStoreUnavailableOrWriteContentionRefusal: {
4255
+ /** @description What went wrong. */
4256
+ error: {
4257
+ /**
4258
+ * @description A machine-readable code for the error. Use it in your logic.
4259
+ * @enum {string}
4260
+ */
4261
+ code: "blob_store_unavailable" | "write_contention";
4262
+ /** @description A description of the error for a person to read. It can change, so don't match on it. */
4263
+ message: string;
4264
+ /** @description More about the error, such as the field it concerns. Each code defines its own details. */
4265
+ details?: {
4266
+ [key: string]: unknown;
4267
+ };
4268
+ };
4269
+ };
4173
4270
  /** @description A page holding every stale type. */
4174
4271
  DriftedPlatformTypePage: {
4175
4272
  /** @description Every stale type. */
@@ -5206,6 +5303,7 @@ interface operations {
5206
5303
  /**
5207
5304
  * @description - `edge_type_not_found`: an edge names an edge type that doesn't exist.
5208
5305
  * - `item_not_found`: an edge's target doesn't exist, or its type is one you can't read.
5306
+ * - `blob_not_found`: `blob_ref` names bytes you didn't upload and can't read.
5209
5307
  */
5210
5308
  404: {
5211
5309
  headers: {
@@ -5219,7 +5317,7 @@ interface operations {
5219
5317
  [name: string]: unknown;
5220
5318
  };
5221
5319
  content: {
5222
- "application/json": components["schemas"]["EdgeTypeNotFoundOrItemNotFoundRefusal"];
5320
+ "application/json": components["schemas"]["BlobNotFoundOrEdgeTypeNotFoundOrItemNotFoundRefusal"];
5223
5321
  };
5224
5322
  };
5225
5323
  /**
@@ -6039,9 +6137,10 @@ interface operations {
6039
6137
  };
6040
6138
  };
6041
6139
  /**
6042
- * @description - `item_not_found`: no item has this ID, its type is one you can't read, or an edge target doesn't exist or has a type you can't read. For an item in the trash, `details.trashed` is `true` if you can read its type.
6140
+ * @description - `item_not_found`: no item you can read has this ID or an edge target's ID. For a trashed item, `details.trashed` is `true` if you can read its type.
6043
6141
  * - `edge_type_not_found`: an edge names an edge type that doesn't exist.
6044
- * - `edge_not_found`: a repeat under the `Idempotency-Key` would show an edge you can no longer read.
6142
+ * - `edge_not_found`: a repeat under the `Idempotency-Key` would show an edge you can't read now.
6143
+ * - `blob_not_found`: `blob_ref` names bytes you didn't upload and can't read.
6045
6144
  */
6046
6145
  404: {
6047
6146
  headers: {
@@ -6055,7 +6154,7 @@ interface operations {
6055
6154
  [name: string]: unknown;
6056
6155
  };
6057
6156
  content: {
6058
- "application/json": components["schemas"]["EdgeNotFoundOrEdgeTypeNotFoundOrItemNotFoundRefusal"];
6157
+ "application/json": components["schemas"]["BlobNotFoundOrEdgeNotFoundOrEdgeTypeNotFoundOrItemNotFoundRefusal"];
6059
6158
  };
6060
6159
  };
6061
6160
  /**
@@ -20022,10 +20121,7 @@ interface operations {
20022
20121
  metadata_permissions?: {
20023
20122
  [key: string]: components["schemas"]["PermissionLevel"];
20024
20123
  };
20025
- /** @description What the key may `read` or `write` of the owner's profile: `name`, `email` or `avatar`, or `*` for all of it. */
20026
- profile_permissions?: {
20027
- [key: string]: components["schemas"]["PermissionLevel"];
20028
- };
20124
+ profile_permissions?: components["schemas"]["ProfilePermissions"] & unknown;
20029
20125
  enforcement_override?: components["schemas"]["EnforcementOverride"] & unknown;
20030
20126
  /** @description When the key stops working, as an ISO 8601 date and time in the future. Leave it out for a key that never expires, or, if your own key expires, for one that expires when yours does. It can't be later than your own key's `expires_at`. */
20031
20127
  expires_at?: string;
@@ -20552,10 +20648,7 @@ interface operations {
20552
20648
  metadata_permissions?: {
20553
20649
  [key: string]: components["schemas"]["PermissionLevel"];
20554
20650
  };
20555
- /** @description What the key may `read` or `write` of the owner's profile: `name`, `email` or `avatar`, or `*` for all of it. */
20556
- profile_permissions?: {
20557
- [key: string]: components["schemas"]["PermissionLevel"];
20558
- };
20651
+ profile_permissions?: components["schemas"]["ProfilePermissions"] & unknown;
20559
20652
  /** @description The permissions the key holds, such as `audit.read`. */
20560
20653
  permissions?: components["schemas"]["Permission"][];
20561
20654
  /** @description Replaces the key's enforcement levers whole. `null` clears them. */
@@ -20881,6 +20974,8 @@ interface operations {
20881
20974
  "application/json": {
20882
20975
  /** @description This instance's ID, accepted so you can send back what `GET /config` returned. It sets nothing. */
20883
20976
  instance_id?: string;
20977
+ /** @description The instance's display name, without control or bidirectional formatting characters. Spaces at each end are trimmed. Absent: `Marfa`. */
20978
+ name?: string;
20884
20979
  /** @description The instance's enforcement levers. Each applies to every credential that doesn't set the same lever itself. Absent: no lever is on. */
20885
20980
  enforcement?: {
20886
20981
  strict_mode?: components["schemas"]["TypeLeverStrict"] & unknown;
@@ -20917,7 +21012,7 @@ interface operations {
20917
21012
  };
20918
21013
  /**
20919
21014
  * @description - `missing_required_field`: a lever lacks `types` or `sources`.
20920
- * - `validation_error`: the body names a setting Marfa doesn't know, a retention value is out of range, or `instance_id` names a different instance.
21015
+ * - `validation_error`: the body names a setting Marfa doesn't know, a retention value is out of range, the name is invalid, or `instance_id` names a different instance.
20921
21016
  */
20922
21017
  400: {
20923
21018
  headers: {
@@ -21096,6 +21191,8 @@ interface operations {
21096
21191
  };
21097
21192
  /** @description How many blobs the archive carried whose bytes match their hash, whether or not the instance already had them. */
21098
21193
  blobs_imported: number;
21194
+ /** @description The hashes of the blobs the archive names but doesn't carry with matching bytes, and that Marfa holds no copy of. Upload their bytes again with `POST /blobs` to restore them. */
21195
+ blobs_missing: string[];
21099
21196
  /** @description How many types Marfa registered. */
21100
21197
  types_registered: number;
21101
21198
  /** @description How many types Marfa skipped because the instance already registers them identically. */
@@ -21217,7 +21314,10 @@ interface operations {
21217
21314
  "application/json": components["schemas"]["InternalErrorRefusal"];
21218
21315
  };
21219
21316
  };
21220
- /** @description `write_contention`: the database was busy, and Marfa couldn't complete the request in time. Nothing changed. Try the request again. */
21317
+ /**
21318
+ * @description - `blob_store_unavailable`: a blob store failed, or didn't answer in time, while Marfa checked a blob's copy. Nothing was written. Try again later.
21319
+ * - `write_contention`: the database was busy, and Marfa couldn't complete the request in time. Nothing changed. Try the request again.
21320
+ */
21221
21321
  503: {
21222
21322
  headers: {
21223
21323
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
@@ -21229,7 +21329,7 @@ interface operations {
21229
21329
  [name: string]: unknown;
21230
21330
  };
21231
21331
  content: {
21232
- "application/json": components["schemas"]["WriteContentionRefusal"];
21332
+ "application/json": components["schemas"]["BlobStoreUnavailableOrWriteContentionRefusal"];
21233
21333
  };
21234
21334
  };
21235
21335
  /** @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. */
@@ -21838,6 +21938,194 @@ interface operations {
21838
21938
  };
21839
21939
  };
21840
21940
  };
21941
+ updateOwner: {
21942
+ parameters: {
21943
+ query?: never;
21944
+ header?: {
21945
+ /** @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. */
21946
+ "X-Marfa-Instance-Id"?: string;
21947
+ };
21948
+ path?: never;
21949
+ cookie?: never;
21950
+ };
21951
+ requestBody: {
21952
+ content: {
21953
+ "application/json": {
21954
+ /**
21955
+ * Format: email
21956
+ * @description Email address used to sign in. Stored in lowercase; changing it clears email verification.
21957
+ */
21958
+ email?: string;
21959
+ /** @description Display name, without control or bidirectional formatting characters. Spaces at each end are trimmed. */
21960
+ name?: string;
21961
+ };
21962
+ };
21963
+ };
21964
+ responses: {
21965
+ /** @description The updated owner. */
21966
+ 200: {
21967
+ headers: {
21968
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
21969
+ "X-Request-ID": components["headers"]["X-Request-ID"];
21970
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
21971
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
21972
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
21973
+ [name: string]: unknown;
21974
+ };
21975
+ content: {
21976
+ "application/json": components["schemas"]["Owner"];
21977
+ };
21978
+ };
21979
+ /** @description The body is empty, has an unknown field, or a field is invalid. */
21980
+ 400: {
21981
+ headers: {
21982
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
21983
+ "X-Request-ID": components["headers"]["X-Request-ID"];
21984
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
21985
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
21986
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
21987
+ "X-Error-Code": components["headers"]["X-Error-Code"];
21988
+ [name: string]: unknown;
21989
+ };
21990
+ content: {
21991
+ "application/json": components["schemas"]["MissingRequiredFieldOrValidationErrorRefusal"];
21992
+ };
21993
+ };
21994
+ /** @description `unauthorized`: the request has no credential, or its credential is not valid. */
21995
+ 401: {
21996
+ headers: {
21997
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
21998
+ "X-Request-ID": components["headers"]["X-Request-ID"];
21999
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
22000
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
22001
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
22002
+ "X-Error-Code": components["headers"]["X-Error-Code"];
22003
+ [name: string]: unknown;
22004
+ };
22005
+ content: {
22006
+ "application/json": components["schemas"]["UnauthorizedRefusal"];
22007
+ };
22008
+ };
22009
+ /** @description The request needs private machine authority or direct owner authentication within five minutes. */
22010
+ 403: {
22011
+ headers: {
22012
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
22013
+ "X-Request-ID": components["headers"]["X-Request-ID"];
22014
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
22015
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
22016
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
22017
+ "X-Error-Code": components["headers"]["X-Error-Code"];
22018
+ [name: string]: unknown;
22019
+ };
22020
+ content: {
22021
+ "application/json": components["schemas"]["ForbiddenRefusal"];
22022
+ };
22023
+ };
22024
+ /** @description The owner is unavailable. */
22025
+ 404: {
22026
+ headers: {
22027
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
22028
+ "X-Request-ID": components["headers"]["X-Request-ID"];
22029
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
22030
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
22031
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
22032
+ "X-Error-Code": components["headers"]["X-Error-Code"];
22033
+ [name: string]: unknown;
22034
+ };
22035
+ content: {
22036
+ "application/json": components["schemas"]["OwnerNotFoundRefusal"];
22037
+ };
22038
+ };
22039
+ /** @description `instance_changed`: `X-Marfa-Instance-Id` names another instance. Nothing is written. Rebuild the working copy from the instance at this address. */
22040
+ 409: {
22041
+ headers: {
22042
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
22043
+ "X-Request-ID": components["headers"]["X-Request-ID"];
22044
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
22045
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
22046
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
22047
+ "X-Error-Code": components["headers"]["X-Error-Code"];
22048
+ [name: string]: unknown;
22049
+ };
22050
+ content: {
22051
+ "application/json": components["schemas"]["InstanceChangedRefusal"];
22052
+ };
22053
+ };
22054
+ /** @description `request_too_large`: the request body is larger than this instance accepts. */
22055
+ 413: {
22056
+ headers: {
22057
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
22058
+ "X-Request-ID": components["headers"]["X-Request-ID"];
22059
+ "X-Error-Code": components["headers"]["X-Error-Code"];
22060
+ [name: string]: unknown;
22061
+ };
22062
+ content: {
22063
+ "application/json": components["schemas"]["RequestTooLargeRefusal"];
22064
+ };
22065
+ };
22066
+ /** @description `rate_limited`: you sent too many requests. Wait for the number of seconds in `Retry-After`, then try again. */
22067
+ 429: {
22068
+ headers: {
22069
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
22070
+ "X-Request-ID": components["headers"]["X-Request-ID"];
22071
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
22072
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
22073
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
22074
+ "X-Error-Code": components["headers"]["X-Error-Code"];
22075
+ "Retry-After": components["headers"]["Retry-After"];
22076
+ [name: string]: unknown;
22077
+ };
22078
+ content: {
22079
+ "application/json": components["schemas"]["RateLimitedRefusal"];
22080
+ };
22081
+ };
22082
+ /** @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. */
22083
+ 500: {
22084
+ headers: {
22085
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
22086
+ "X-Request-ID": components["headers"]["X-Request-ID"];
22087
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
22088
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
22089
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
22090
+ "X-Error-Code": components["headers"]["X-Error-Code"];
22091
+ [name: string]: unknown;
22092
+ };
22093
+ content: {
22094
+ "application/json": components["schemas"]["InternalErrorRefusal"];
22095
+ };
22096
+ };
22097
+ /** @description `write_contention`: the database was busy, and Marfa couldn't complete the request in time. Nothing changed. Try the request again. */
22098
+ 503: {
22099
+ headers: {
22100
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
22101
+ "X-Request-ID": components["headers"]["X-Request-ID"];
22102
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
22103
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
22104
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
22105
+ "X-Error-Code": components["headers"]["X-Error-Code"];
22106
+ [name: string]: unknown;
22107
+ };
22108
+ content: {
22109
+ "application/json": components["schemas"]["WriteContentionRefusal"];
22110
+ };
22111
+ };
22112
+ /** @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. */
22113
+ 507: {
22114
+ headers: {
22115
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
22116
+ "X-Request-ID": components["headers"]["X-Request-ID"];
22117
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
22118
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
22119
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
22120
+ "X-Error-Code": components["headers"]["X-Error-Code"];
22121
+ [name: string]: unknown;
22122
+ };
22123
+ content: {
22124
+ "application/json": components["schemas"]["InsufficientStorageRefusal"];
22125
+ };
22126
+ };
22127
+ };
22128
+ };
21841
22129
  listSignIns: {
21842
22130
  parameters: {
21843
22131
  query?: never;
@@ -22839,6 +23127,194 @@ interface operations {
22839
23127
  };
22840
23128
  };
22841
23129
  };
23130
+ updateProfile: {
23131
+ parameters: {
23132
+ query?: never;
23133
+ header?: {
23134
+ /** @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. */
23135
+ "X-Marfa-Instance-Id"?: string;
23136
+ };
23137
+ path?: never;
23138
+ cookie?: never;
23139
+ };
23140
+ requestBody: {
23141
+ content: {
23142
+ "application/json": {
23143
+ /** @description Display name, without control or bidirectional formatting characters. Spaces at each end are trimmed. */
23144
+ name?: string;
23145
+ /**
23146
+ * Format: uri
23147
+ * @description HTTP or HTTPS avatar URL, at most 2048 characters. null clears it. Marfa does not fetch the URL.
23148
+ */
23149
+ avatar?: string | null;
23150
+ };
23151
+ };
23152
+ };
23153
+ responses: {
23154
+ /** @description Returns ok: true. The profile was updated. */
23155
+ 200: {
23156
+ headers: {
23157
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
23158
+ "X-Request-ID": components["headers"]["X-Request-ID"];
23159
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
23160
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
23161
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
23162
+ [name: string]: unknown;
23163
+ };
23164
+ content: {
23165
+ "application/json": components["schemas"]["Ok"];
23166
+ };
23167
+ };
23168
+ /** @description The body is empty, contains an unknown field, or a field is invalid. */
23169
+ 400: {
23170
+ headers: {
23171
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
23172
+ "X-Request-ID": components["headers"]["X-Request-ID"];
23173
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
23174
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
23175
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
23176
+ "X-Error-Code": components["headers"]["X-Error-Code"];
23177
+ [name: string]: unknown;
23178
+ };
23179
+ content: {
23180
+ "application/json": components["schemas"]["MissingRequiredFieldOrValidationErrorRefusal"];
23181
+ };
23182
+ };
23183
+ /** @description `unauthorized`: the request has no credential, or its credential is not valid. */
23184
+ 401: {
23185
+ headers: {
23186
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
23187
+ "X-Request-ID": components["headers"]["X-Request-ID"];
23188
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
23189
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
23190
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
23191
+ "X-Error-Code": components["headers"]["X-Error-Code"];
23192
+ [name: string]: unknown;
23193
+ };
23194
+ content: {
23195
+ "application/json": components["schemas"]["UnauthorizedRefusal"];
23196
+ };
23197
+ };
23198
+ /** @description The credential lacks profile write permission for a submitted field. */
23199
+ 403: {
23200
+ headers: {
23201
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
23202
+ "X-Request-ID": components["headers"]["X-Request-ID"];
23203
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
23204
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
23205
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
23206
+ "X-Error-Code": components["headers"]["X-Error-Code"];
23207
+ [name: string]: unknown;
23208
+ };
23209
+ content: {
23210
+ "application/json": components["schemas"]["ForbiddenRefusal"];
23211
+ };
23212
+ };
23213
+ /** @description The owner is unavailable. */
23214
+ 404: {
23215
+ headers: {
23216
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
23217
+ "X-Request-ID": components["headers"]["X-Request-ID"];
23218
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
23219
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
23220
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
23221
+ "X-Error-Code": components["headers"]["X-Error-Code"];
23222
+ [name: string]: unknown;
23223
+ };
23224
+ content: {
23225
+ "application/json": components["schemas"]["OwnerNotFoundRefusal"];
23226
+ };
23227
+ };
23228
+ /** @description `instance_changed`: `X-Marfa-Instance-Id` names another instance. Nothing is written. Rebuild the working copy from the instance at this address. */
23229
+ 409: {
23230
+ headers: {
23231
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
23232
+ "X-Request-ID": components["headers"]["X-Request-ID"];
23233
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
23234
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
23235
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
23236
+ "X-Error-Code": components["headers"]["X-Error-Code"];
23237
+ [name: string]: unknown;
23238
+ };
23239
+ content: {
23240
+ "application/json": components["schemas"]["InstanceChangedRefusal"];
23241
+ };
23242
+ };
23243
+ /** @description `request_too_large`: the request body is larger than this instance accepts. */
23244
+ 413: {
23245
+ headers: {
23246
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
23247
+ "X-Request-ID": components["headers"]["X-Request-ID"];
23248
+ "X-Error-Code": components["headers"]["X-Error-Code"];
23249
+ [name: string]: unknown;
23250
+ };
23251
+ content: {
23252
+ "application/json": components["schemas"]["RequestTooLargeRefusal"];
23253
+ };
23254
+ };
23255
+ /** @description `rate_limited`: you sent too many requests. Wait for the number of seconds in `Retry-After`, then try again. */
23256
+ 429: {
23257
+ headers: {
23258
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
23259
+ "X-Request-ID": components["headers"]["X-Request-ID"];
23260
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
23261
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
23262
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
23263
+ "X-Error-Code": components["headers"]["X-Error-Code"];
23264
+ "Retry-After": components["headers"]["Retry-After"];
23265
+ [name: string]: unknown;
23266
+ };
23267
+ content: {
23268
+ "application/json": components["schemas"]["RateLimitedRefusal"];
23269
+ };
23270
+ };
23271
+ /** @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. */
23272
+ 500: {
23273
+ headers: {
23274
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
23275
+ "X-Request-ID": components["headers"]["X-Request-ID"];
23276
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
23277
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
23278
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
23279
+ "X-Error-Code": components["headers"]["X-Error-Code"];
23280
+ [name: string]: unknown;
23281
+ };
23282
+ content: {
23283
+ "application/json": components["schemas"]["InternalErrorRefusal"];
23284
+ };
23285
+ };
23286
+ /** @description `write_contention`: the database was busy, and Marfa couldn't complete the request in time. Nothing changed. Try the request again. */
23287
+ 503: {
23288
+ headers: {
23289
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
23290
+ "X-Request-ID": components["headers"]["X-Request-ID"];
23291
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
23292
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
23293
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
23294
+ "X-Error-Code": components["headers"]["X-Error-Code"];
23295
+ [name: string]: unknown;
23296
+ };
23297
+ content: {
23298
+ "application/json": components["schemas"]["WriteContentionRefusal"];
23299
+ };
23300
+ };
23301
+ /** @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. */
23302
+ 507: {
23303
+ headers: {
23304
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
23305
+ "X-Request-ID": components["headers"]["X-Request-ID"];
23306
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
23307
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
23308
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
23309
+ "X-Error-Code": components["headers"]["X-Error-Code"];
23310
+ [name: string]: unknown;
23311
+ };
23312
+ content: {
23313
+ "application/json": components["schemas"]["InsufficientStorageRefusal"];
23314
+ };
23315
+ };
23316
+ };
23317
+ };
22842
23318
  exportData: {
22843
23319
  parameters: {
22844
23320
  query?: {
@@ -22852,7 +23328,7 @@ interface operations {
22852
23328
  occurred_after?: string;
22853
23329
  /** @description Only export items whose own time (`occurred_at`, else `created_at`) is before this time. */
22854
23330
  occurred_before?: string;
22855
- /** @description `ndjson` for lines of JSON, or `archive` for a `.tar.gz` file that `POST /restore` reads. Defaults to `ndjson`. */
23331
+ /** @description `ndjson` for lines of JSON, or `archive` for a `.tar.gz` file that `POST /restore` reads. Defaults to `ndjson`. An archive's `manifest.json` lists in `missing_blobs` each blob no store could read, which the archive doesn't hold. */
22856
23332
  format?: "ndjson" | "archive";
22857
23333
  };
22858
23334
  header?: never;
@@ -22955,7 +23431,10 @@ interface operations {
22955
23431
  "application/json": components["schemas"]["InternalErrorRefusal"];
22956
23432
  };
22957
23433
  };
22958
- /** @description `write_contention`: the database was busy, and Marfa couldn't complete the request in time. Nothing changed. Try the request again. */
23434
+ /**
23435
+ * @description - `blob_store_unavailable`: a blob store failed, or didn't answer in time, while Marfa checked a blob's copy. Nothing was written. Try again later.
23436
+ * - `write_contention`: the database was busy, and Marfa couldn't complete the request in time. Nothing changed. Try the request again.
23437
+ */
22959
23438
  503: {
22960
23439
  headers: {
22961
23440
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
@@ -22967,7 +23446,7 @@ interface operations {
22967
23446
  [name: string]: unknown;
22968
23447
  };
22969
23448
  content: {
22970
- "application/json": components["schemas"]["WriteContentionRefusal"];
23449
+ "application/json": components["schemas"]["BlobStoreUnavailableOrWriteContentionRefusal"];
22971
23450
  };
22972
23451
  };
22973
23452
  /** @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. */
@@ -23536,7 +24015,7 @@ interface operations {
23536
24015
  requestBody: {
23537
24016
  content: {
23538
24017
  "application/json": {
23539
- /** @description The URL Marfa posts events to: `http` or `https`, with no user name or password. Unless the instance allows private addresses, it must reach a public address, which Marfa checks again at each delivery. */
24018
+ /** @description The URL Marfa posts events to: `http` or `https`, with no user name or password. Unless the instance allows private addresses, it must reach a public address: Marfa refuses a URL whose host resolves to a private one, and checks again at each delivery. */
23540
24019
  url: string;
23541
24020
  /** @description The events to send. Name each one: there's no wildcard. */
23542
24021
  events: ("item.created" | "item.updated" | "item.deleted" | "item.restored" | "item.purged" | "item.state_changed" | "metadata.changed" | "edge.created" | "edge.updated" | "edge.deleted")[];
@@ -24044,7 +24523,7 @@ interface operations {
24044
24523
  requestBody: {
24045
24524
  content: {
24046
24525
  "application/json": {
24047
- /** @description The URL Marfa posts events to: `http` or `https`, with no user name or password. Unless the instance allows private addresses, it must reach a public address, which Marfa checks again at each delivery. */
24526
+ /** @description The URL Marfa posts events to: `http` or `https`, with no user name or password. Unless the instance allows private addresses, it must reach a public address: Marfa refuses a URL whose host resolves to a private one, and checks again at each delivery. */
24048
24527
  url?: string;
24049
24528
  /** @description The events to send. Name each one: there's no wildcard. */
24050
24529
  events?: ("item.created" | "item.updated" | "item.deleted" | "item.restored" | "item.purged" | "item.state_changed" | "metadata.changed" | "edge.created" | "edge.updated" | "edge.deleted")[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@withmarfa/client",
3
- "version": "0.0.12",
3
+ "version": "0.0.14",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",