@withmarfa/client 0.0.14 → 0.0.16

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 +79 -14
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -4099,7 +4099,7 @@ interface components {
4099
4099
  created_at: string;
4100
4100
  /** @description When the key stops working, in UTC, or `null` if it doesn't expire. */
4101
4101
  expires_at: string | null;
4102
- /** @description When the key was last used, in UTC, or `null` if never. Marfa updates it at most once an hour. */
4102
+ /** @description When the key's use was last recorded, in UTC, or `null` if none is recorded. Marfa records usage asynchronously at most once an hour; a busy or unavailable store can delay or drop a record. */
4103
4103
  last_used_at: string | null;
4104
4104
  };
4105
4105
  /**
@@ -4156,7 +4156,7 @@ interface components {
4156
4156
  created_at: string;
4157
4157
  /** @description When the key stops working, in UTC, or `null` if it doesn't expire. */
4158
4158
  expires_at: string | null;
4159
- /** @description When the key was last used, in UTC, or `null` if never. Marfa updates it at most once an hour. */
4159
+ /** @description When the key's use was last recorded, in UTC, or `null` if none is recorded. Marfa records usage asynchronously at most once an hour; a busy or unavailable store can delay or drop a record. */
4160
4160
  last_used_at: string | null;
4161
4161
  };
4162
4162
  /** @description An error response. */
@@ -4282,7 +4282,7 @@ interface components {
4282
4282
  item_count: number;
4283
4283
  /** @description The types that name this one as their `parent`. */
4284
4284
  child_types: string[];
4285
- /** @description `true` if `DELETE /platform-types/{id}` would remove the type: no item carries it and no type inherits from it. */
4285
+ /** @description `true` if `DELETE /platform-types/{id}` would remove the type: no item carries it and no type inherits from it or names it in `compatible_with`. */
4286
4286
  removable: boolean;
4287
4287
  };
4288
4288
  /** @description An error response. */
@@ -4362,7 +4362,7 @@ interface components {
4362
4362
  */
4363
4363
  created_at: string;
4364
4364
  /**
4365
- * @description When the sign-in last made a request, in UTC, or `null` if it hasn't. Marfa records a browser's use at most once a minute and an app's or key's at most once an hour.
4365
+ * @description When a recorded use occurred, in UTC, or `null` if none is recorded. Uses are recorded at most once a minute for browsers and once an hour for apps or keys. Failed recording leaves the previous value.
4366
4366
  * @example 2026-10-05T14:12:08.000Z
4367
4367
  */
4368
4368
  last_used_at: string | null;
@@ -4471,6 +4471,40 @@ interface components {
4471
4471
  };
4472
4472
  };
4473
4473
  };
4474
+ /** @description An error response. */
4475
+ ExportRowsUnrestorableRefusal: {
4476
+ /** @description What went wrong. */
4477
+ error: {
4478
+ /**
4479
+ * @description A machine-readable code for the error. Use it in your logic.
4480
+ * @enum {string}
4481
+ */
4482
+ code: "export_rows_unrestorable";
4483
+ /** @description A description of the error for a person to read. It can change, so don't match on it. */
4484
+ message: string;
4485
+ /** @description More about the error, such as the field it concerns. Each code defines its own details. */
4486
+ details?: {
4487
+ [key: string]: unknown;
4488
+ };
4489
+ };
4490
+ };
4491
+ /** @description An error response. */
4492
+ BlobStoreUnavailableOrExportUnrestorableOrWriteContentionRefusal: {
4493
+ /** @description What went wrong. */
4494
+ error: {
4495
+ /**
4496
+ * @description A machine-readable code for the error. Use it in your logic.
4497
+ * @enum {string}
4498
+ */
4499
+ code: "blob_store_unavailable" | "export_unrestorable" | "write_contention";
4500
+ /** @description A description of the error for a person to read. It can change, so don't match on it. */
4501
+ message: string;
4502
+ /** @description More about the error, such as the field it concerns. Each code defines its own details. */
4503
+ details?: {
4504
+ [key: string]: unknown;
4505
+ };
4506
+ };
4507
+ };
4474
4508
  /** @description An OAuth client: its app metadata and the grants it uses. */
4475
4509
  OAuthClientRegistration: {
4476
4510
  /** @description The addresses Marfa may send a person back to after authorization. Required for `authorization_code`. At most 10. A `web` client's URIs must use `https` off the loopback; a `native` client may use `http` on `localhost`, `127.0.0.1` or `[::1]`. */
@@ -12584,7 +12618,7 @@ interface operations {
12584
12618
  };
12585
12619
  /**
12586
12620
  * @description - `forbidden`: you don't have `metadata.types:write`, or the identifier is under `core.*`, `system.*` or `marfa.*`, which no credential can register.
12587
- * - `type_not_permitted`: your type map doesn't grant write on the identifier, or on `parent` (`details.grant` names it).
12621
+ * - `type_not_permitted`: your type map lacks write on the identifier or a non-platform `parent` or `compatible_with` target (`details.grant` names it).
12588
12622
  */
12589
12623
  403: {
12590
12624
  headers: {
@@ -12927,9 +12961,9 @@ interface operations {
12927
12961
  };
12928
12962
  };
12929
12963
  /**
12930
- * @description - `forbidden`: you have neither `schema.write` nor `metadata.types:write`, or the change needs `schema.write`, such as adding a field some item already holds a value under. `details.changes` lists what needs it.
12964
+ * @description - `forbidden`: you lack `schema.write` and `metadata.types:write`, or `details.changes` names changes needing `schema.write`.
12931
12965
  * - `core_type_immutable`: Marfa ships this type.
12932
- * - `type_not_permitted`: your type map doesn't grant write on the type or a new `parent` (`details.grant` names it).
12966
+ * - `type_not_permitted`: your type map lacks write on the type or a new non-platform `parent` or `compatible_with` target (`details.grant` names it).
12933
12967
  */
12934
12968
  403: {
12935
12969
  headers: {
@@ -12987,7 +13021,7 @@ interface operations {
12987
13021
  "application/json": components["schemas"]["RequestTooLargeRefusal"];
12988
13022
  };
12989
13023
  };
12990
- /** @description `compatible_with_violation`: `compatible_with` names a type this instance doesn't hold, or one the type doesn't satisfy. */
13024
+ /** @description `compatible_with_violation`: `compatible_with` names a type this instance doesn't hold, or one the type doesn't satisfy, or the change breaks another type's claim (`details.dependent_type_ids`). */
12991
13025
  422: {
12992
13026
  headers: {
12993
13027
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
@@ -13068,7 +13102,7 @@ interface operations {
13068
13102
  deleteType: {
13069
13103
  parameters: {
13070
13104
  query?: {
13071
- /** @description Delete the type even if items of it exist, in any state. It doesn't cover a type that has subtypes. */
13105
+ /** @description Delete the type even if items of it exist, in any state. It doesn't cover subtypes or compatibility dependents. */
13072
13106
  force?: "true" | "false";
13073
13107
  };
13074
13108
  header?: {
@@ -13191,6 +13225,21 @@ interface operations {
13191
13225
  "application/json": components["schemas"]["RequestTooLargeRefusal"];
13192
13226
  };
13193
13227
  };
13228
+ /** @description `compatible_with_violation`: other types name this type in `compatible_with`. `details.dependent_type_ids` lists them. Remove their claims before deleting the target; `force=true` does not bypass this check. */
13229
+ 422: {
13230
+ headers: {
13231
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
13232
+ "X-Request-ID": components["headers"]["X-Request-ID"];
13233
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
13234
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
13235
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
13236
+ "X-Error-Code": components["headers"]["X-Error-Code"];
13237
+ [name: string]: unknown;
13238
+ };
13239
+ content: {
13240
+ "application/json": components["schemas"]["CompatibleWithViolationRefusal"];
13241
+ };
13242
+ };
13194
13243
  /** @description `rate_limited`: you sent too many requests. Wait for the number of seconds in `Retry-After`, then try again. */
13195
13244
  429: {
13196
13245
  headers: {
@@ -20491,7 +20540,7 @@ interface operations {
20491
20540
  "application/json": components["schemas"]["UnauthorizedRefusal"];
20492
20541
  };
20493
20542
  };
20494
- /** @description - `forbidden`: this operation requires its explicit permission or direct owner or local authority. `details.required_scope` names it. */
20543
+ /** @description - `forbidden`: you hold neither `keys.manage` nor `keys.mint` and aren't the owner or local command, or you're the owner and your browser session signed in more than five minutes ago. `details.required_scope` names a missing permission. */
20495
20544
  403: {
20496
20545
  headers: {
20497
20546
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
@@ -21576,7 +21625,7 @@ interface operations {
21576
21625
  "application/json": components["schemas"]["NotFoundOrTypeNotFoundRefusal"];
21577
21626
  };
21578
21627
  };
21579
- /** @description `conflict`: the type isn't one this build stopped shipping, items still carry it, or another type inherits from it (`details.child_types` lists them). */
21628
+ /** @description `conflict`: the type isn't one this build stopped shipping, items still carry it, another type inherits from it (`details.child_types`), or another type declares compatibility with it (`details.dependent_type_ids`). */
21580
21629
  409: {
21581
21630
  headers: {
21582
21631
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
@@ -23400,6 +23449,21 @@ interface operations {
23400
23449
  "application/json": components["schemas"]["TypeNotPermittedRefusal"];
23401
23450
  };
23402
23451
  };
23452
+ /** @description - `export_rows_unrestorable`: with `format=archive`, Marfa read the selection twice, and both times a restore would refuse or skip the same row, which was unchanged between the reads, so no archive was sent. `details.row` names the row by `kind`, `id`, `type` and `field`, with the `code` a restore refuses it with or the reason it skips it. Correct the row or its type, then export again. */
23453
+ 409: {
23454
+ headers: {
23455
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
23456
+ "X-Request-ID": components["headers"]["X-Request-ID"];
23457
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
23458
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
23459
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
23460
+ "X-Error-Code": components["headers"]["X-Error-Code"];
23461
+ [name: string]: unknown;
23462
+ };
23463
+ content: {
23464
+ "application/json": components["schemas"]["ExportRowsUnrestorableRefusal"];
23465
+ };
23466
+ };
23403
23467
  /** @description `rate_limited`: you sent too many requests. Wait for the number of seconds in `Retry-After`, then try again. */
23404
23468
  429: {
23405
23469
  headers: {
@@ -23432,8 +23496,9 @@ interface operations {
23432
23496
  };
23433
23497
  };
23434
23498
  /**
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.
23499
+ * @description - `blob_store_unavailable`: a blob store failed, or didn't answer in time, while Marfa checked a blob's copy. Try again later.
23500
+ * - `write_contention`: the database was busy. Nothing changed. Try the request again.
23501
+ * - `export_unrestorable`: with `format=archive`, writes changed a row that a restore would refuse, or its type, between two reads. No archive was sent. Retry the export.
23437
23502
  */
23438
23503
  503: {
23439
23504
  headers: {
@@ -23446,7 +23511,7 @@ interface operations {
23446
23511
  [name: string]: unknown;
23447
23512
  };
23448
23513
  content: {
23449
- "application/json": components["schemas"]["BlobStoreUnavailableOrWriteContentionRefusal"];
23514
+ "application/json": components["schemas"]["BlobStoreUnavailableOrExportUnrestorableOrWriteContentionRefusal"];
23450
23515
  };
23451
23516
  };
23452
23517
  /** @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. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@withmarfa/client",
3
- "version": "0.0.14",
3
+ "version": "0.0.16",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",