@withmarfa/client 0.0.13 → 0.0.15

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 +105 -27
  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 display name, `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;
@@ -2185,6 +2185,8 @@ interface components {
2185
2185
  name: string;
2186
2186
  /** @description The build the instance runs. */
2187
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;
2188
2190
  /** @description Unique identifier for the instance. `GET /config` and an archive's manifest show the same value. */
2189
2191
  instance_id: string;
2190
2192
  /** @description The contract version, the same number as this document's `info.version`. It stays at `0` until the first public release. */
@@ -2268,14 +2270,14 @@ interface components {
2268
2270
  };
2269
2271
  };
2270
2272
  /** @description An error response. */
2271
- EdgeTypeNotFoundOrItemNotFoundRefusal: {
2273
+ BlobNotFoundOrEdgeTypeNotFoundOrItemNotFoundRefusal: {
2272
2274
  /** @description What went wrong. */
2273
2275
  error: {
2274
2276
  /**
2275
2277
  * @description A machine-readable code for the error. Use it in your logic.
2276
2278
  * @enum {string}
2277
2279
  */
2278
- code: "edge_type_not_found" | "item_not_found";
2280
+ code: "blob_not_found" | "edge_type_not_found" | "item_not_found";
2279
2281
  /** @description A description of the error for a person to read. It can change, so don't match on it. */
2280
2282
  message: string;
2281
2283
  /** @description More about the error, such as the field it concerns. Each code defines its own details. */
@@ -2452,14 +2454,14 @@ interface components {
2452
2454
  };
2453
2455
  };
2454
2456
  /** @description An error response. */
2455
- EdgeNotFoundOrEdgeTypeNotFoundOrItemNotFoundRefusal: {
2457
+ BlobNotFoundOrEdgeNotFoundOrEdgeTypeNotFoundOrItemNotFoundRefusal: {
2456
2458
  /** @description What went wrong. */
2457
2459
  error: {
2458
2460
  /**
2459
2461
  * @description A machine-readable code for the error. Use it in your logic.
2460
2462
  * @enum {string}
2461
2463
  */
2462
- 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";
2463
2465
  /** @description A description of the error for a person to read. It can change, so don't match on it. */
2464
2466
  message: string;
2465
2467
  /** @description More about the error, such as the field it concerns. Each code defines its own details. */
@@ -2828,6 +2830,23 @@ interface components {
2828
2830
  };
2829
2831
  };
2830
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. */
2831
2850
  IdReusedRefusal: {
2832
2851
  /** @description What went wrong. */
2833
2852
  error: {
@@ -2861,6 +2880,23 @@ interface components {
2861
2880
  };
2862
2881
  };
2863
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
+ };
2864
2900
  /** @description A stale update's answer: the refusal and the current edge. */
2865
2901
  EdgeVersionConflict: {
2866
2902
  error: components["schemas"]["VersionConflictError"] & unknown;
@@ -3752,7 +3788,7 @@ interface components {
3752
3788
  method: string;
3753
3789
  /** @description The query string as the sender sent it, without the `?`; empty if there was none. */
3754
3790
  query: string;
3755
- /** @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-`. */
3756
3792
  headers: [
3757
3793
  string,
3758
3794
  string
@@ -4063,7 +4099,7 @@ interface components {
4063
4099
  created_at: string;
4064
4100
  /** @description When the key stops working, in UTC, or `null` if it doesn't expire. */
4065
4101
  expires_at: string | null;
4066
- /** @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. */
4067
4103
  last_used_at: string | null;
4068
4104
  };
4069
4105
  /**
@@ -4120,7 +4156,7 @@ interface components {
4120
4156
  created_at: string;
4121
4157
  /** @description When the key stops working, in UTC, or `null` if it doesn't expire. */
4122
4158
  expires_at: string | null;
4123
- /** @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. */
4124
4160
  last_used_at: string | null;
4125
4161
  };
4126
4162
  /** @description An error response. */
@@ -4214,6 +4250,23 @@ interface components {
4214
4250
  };
4215
4251
  };
4216
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
+ };
4217
4270
  /** @description A page holding every stale type. */
4218
4271
  DriftedPlatformTypePage: {
4219
4272
  /** @description Every stale type. */
@@ -4229,7 +4282,7 @@ interface components {
4229
4282
  item_count: number;
4230
4283
  /** @description The types that name this one as their `parent`. */
4231
4284
  child_types: string[];
4232
- /** @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`. */
4233
4286
  removable: boolean;
4234
4287
  };
4235
4288
  /** @description An error response. */
@@ -4309,7 +4362,7 @@ interface components {
4309
4362
  */
4310
4363
  created_at: string;
4311
4364
  /**
4312
- * @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.
4313
4366
  * @example 2026-10-05T14:12:08.000Z
4314
4367
  */
4315
4368
  last_used_at: string | null;
@@ -5250,6 +5303,7 @@ interface operations {
5250
5303
  /**
5251
5304
  * @description - `edge_type_not_found`: an edge names an edge type that doesn't exist.
5252
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.
5253
5307
  */
5254
5308
  404: {
5255
5309
  headers: {
@@ -5263,7 +5317,7 @@ interface operations {
5263
5317
  [name: string]: unknown;
5264
5318
  };
5265
5319
  content: {
5266
- "application/json": components["schemas"]["EdgeTypeNotFoundOrItemNotFoundRefusal"];
5320
+ "application/json": components["schemas"]["BlobNotFoundOrEdgeTypeNotFoundOrItemNotFoundRefusal"];
5267
5321
  };
5268
5322
  };
5269
5323
  /**
@@ -6083,9 +6137,10 @@ interface operations {
6083
6137
  };
6084
6138
  };
6085
6139
  /**
6086
- * @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.
6087
6141
  * - `edge_type_not_found`: an edge names an edge type that doesn't exist.
6088
- * - `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.
6089
6144
  */
6090
6145
  404: {
6091
6146
  headers: {
@@ -6099,7 +6154,7 @@ interface operations {
6099
6154
  [name: string]: unknown;
6100
6155
  };
6101
6156
  content: {
6102
- "application/json": components["schemas"]["EdgeNotFoundOrEdgeTypeNotFoundOrItemNotFoundRefusal"];
6157
+ "application/json": components["schemas"]["BlobNotFoundOrEdgeNotFoundOrEdgeTypeNotFoundOrItemNotFoundRefusal"];
6103
6158
  };
6104
6159
  };
6105
6160
  /**
@@ -12529,7 +12584,7 @@ interface operations {
12529
12584
  };
12530
12585
  /**
12531
12586
  * @description - `forbidden`: you don't have `metadata.types:write`, or the identifier is under `core.*`, `system.*` or `marfa.*`, which no credential can register.
12532
- * - `type_not_permitted`: your type map doesn't grant write on the identifier, or on `parent` (`details.grant` names it).
12587
+ * - `type_not_permitted`: your type map lacks write on the identifier or a non-platform `parent` or `compatible_with` target (`details.grant` names it).
12533
12588
  */
12534
12589
  403: {
12535
12590
  headers: {
@@ -12872,9 +12927,9 @@ interface operations {
12872
12927
  };
12873
12928
  };
12874
12929
  /**
12875
- * @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.
12930
+ * @description - `forbidden`: you lack `schema.write` and `metadata.types:write`, or `details.changes` names changes needing `schema.write`.
12876
12931
  * - `core_type_immutable`: Marfa ships this type.
12877
- * - `type_not_permitted`: your type map doesn't grant write on the type or a new `parent` (`details.grant` names it).
12932
+ * - `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).
12878
12933
  */
12879
12934
  403: {
12880
12935
  headers: {
@@ -12932,7 +12987,7 @@ interface operations {
12932
12987
  "application/json": components["schemas"]["RequestTooLargeRefusal"];
12933
12988
  };
12934
12989
  };
12935
- /** @description `compatible_with_violation`: `compatible_with` names a type this instance doesn't hold, or one the type doesn't satisfy. */
12990
+ /** @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`). */
12936
12991
  422: {
12937
12992
  headers: {
12938
12993
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
@@ -13013,7 +13068,7 @@ interface operations {
13013
13068
  deleteType: {
13014
13069
  parameters: {
13015
13070
  query?: {
13016
- /** @description Delete the type even if items of it exist, in any state. It doesn't cover a type that has subtypes. */
13071
+ /** @description Delete the type even if items of it exist, in any state. It doesn't cover subtypes or compatibility dependents. */
13017
13072
  force?: "true" | "false";
13018
13073
  };
13019
13074
  header?: {
@@ -13136,6 +13191,21 @@ interface operations {
13136
13191
  "application/json": components["schemas"]["RequestTooLargeRefusal"];
13137
13192
  };
13138
13193
  };
13194
+ /** @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. */
13195
+ 422: {
13196
+ headers: {
13197
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
13198
+ "X-Request-ID": components["headers"]["X-Request-ID"];
13199
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
13200
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
13201
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
13202
+ "X-Error-Code": components["headers"]["X-Error-Code"];
13203
+ [name: string]: unknown;
13204
+ };
13205
+ content: {
13206
+ "application/json": components["schemas"]["CompatibleWithViolationRefusal"];
13207
+ };
13208
+ };
13139
13209
  /** @description `rate_limited`: you sent too many requests. Wait for the number of seconds in `Retry-After`, then try again. */
13140
13210
  429: {
13141
13211
  headers: {
@@ -21136,6 +21206,8 @@ interface operations {
21136
21206
  };
21137
21207
  /** @description How many blobs the archive carried whose bytes match their hash, whether or not the instance already had them. */
21138
21208
  blobs_imported: number;
21209
+ /** @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. */
21210
+ blobs_missing: string[];
21139
21211
  /** @description How many types Marfa registered. */
21140
21212
  types_registered: number;
21141
21213
  /** @description How many types Marfa skipped because the instance already registers them identically. */
@@ -21257,7 +21329,10 @@ interface operations {
21257
21329
  "application/json": components["schemas"]["InternalErrorRefusal"];
21258
21330
  };
21259
21331
  };
21260
- /** @description `write_contention`: the database was busy, and Marfa couldn't complete the request in time. Nothing changed. Try the request again. */
21332
+ /**
21333
+ * @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.
21334
+ * - `write_contention`: the database was busy, and Marfa couldn't complete the request in time. Nothing changed. Try the request again.
21335
+ */
21261
21336
  503: {
21262
21337
  headers: {
21263
21338
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
@@ -21269,7 +21344,7 @@ interface operations {
21269
21344
  [name: string]: unknown;
21270
21345
  };
21271
21346
  content: {
21272
- "application/json": components["schemas"]["WriteContentionRefusal"];
21347
+ "application/json": components["schemas"]["BlobStoreUnavailableOrWriteContentionRefusal"];
21273
21348
  };
21274
21349
  };
21275
21350
  /** @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. */
@@ -21516,7 +21591,7 @@ interface operations {
21516
21591
  "application/json": components["schemas"]["NotFoundOrTypeNotFoundRefusal"];
21517
21592
  };
21518
21593
  };
21519
- /** @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). */
21594
+ /** @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`). */
21520
21595
  409: {
21521
21596
  headers: {
21522
21597
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
@@ -23268,7 +23343,7 @@ interface operations {
23268
23343
  occurred_after?: string;
23269
23344
  /** @description Only export items whose own time (`occurred_at`, else `created_at`) is before this time. */
23270
23345
  occurred_before?: string;
23271
- /** @description `ndjson` for lines of JSON, or `archive` for a `.tar.gz` file that `POST /restore` reads. Defaults to `ndjson`. */
23346
+ /** @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. */
23272
23347
  format?: "ndjson" | "archive";
23273
23348
  };
23274
23349
  header?: never;
@@ -23371,7 +23446,10 @@ interface operations {
23371
23446
  "application/json": components["schemas"]["InternalErrorRefusal"];
23372
23447
  };
23373
23448
  };
23374
- /** @description `write_contention`: the database was busy, and Marfa couldn't complete the request in time. Nothing changed. Try the request again. */
23449
+ /**
23450
+ * @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.
23451
+ * - `write_contention`: the database was busy, and Marfa couldn't complete the request in time. Nothing changed. Try the request again.
23452
+ */
23375
23453
  503: {
23376
23454
  headers: {
23377
23455
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
@@ -23383,7 +23461,7 @@ interface operations {
23383
23461
  [name: string]: unknown;
23384
23462
  };
23385
23463
  content: {
23386
- "application/json": components["schemas"]["WriteContentionRefusal"];
23464
+ "application/json": components["schemas"]["BlobStoreUnavailableOrWriteContentionRefusal"];
23387
23465
  };
23388
23466
  };
23389
23467
  /** @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. */
@@ -23952,7 +24030,7 @@ interface operations {
23952
24030
  requestBody: {
23953
24031
  content: {
23954
24032
  "application/json": {
23955
- /** @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. */
24033
+ /** @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. */
23956
24034
  url: string;
23957
24035
  /** @description The events to send. Name each one: there's no wildcard. */
23958
24036
  events: ("item.created" | "item.updated" | "item.deleted" | "item.restored" | "item.purged" | "item.state_changed" | "metadata.changed" | "edge.created" | "edge.updated" | "edge.deleted")[];
@@ -24460,7 +24538,7 @@ interface operations {
24460
24538
  requestBody: {
24461
24539
  content: {
24462
24540
  "application/json": {
24463
- /** @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. */
24541
+ /** @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. */
24464
24542
  url?: string;
24465
24543
  /** @description The events to send. Name each one: there's no wildcard. */
24466
24544
  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.13",
3
+ "version": "0.0.15",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",