@withmarfa/client 0.0.13 → 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.
- package/dist/index.d.ts +80 -17
- 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
|
-
|
|
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
|
-
|
|
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
|
|
@@ -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. */
|
|
@@ -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"]["
|
|
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
|
|
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
|
|
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"]["
|
|
6157
|
+
"application/json": components["schemas"]["BlobNotFoundOrEdgeNotFoundOrEdgeTypeNotFoundOrItemNotFoundRefusal"];
|
|
6103
6158
|
};
|
|
6104
6159
|
};
|
|
6105
6160
|
/**
|
|
@@ -21136,6 +21191,8 @@ interface operations {
|
|
|
21136
21191
|
};
|
|
21137
21192
|
/** @description How many blobs the archive carried whose bytes match their hash, whether or not the instance already had them. */
|
|
21138
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[];
|
|
21139
21196
|
/** @description How many types Marfa registered. */
|
|
21140
21197
|
types_registered: number;
|
|
21141
21198
|
/** @description How many types Marfa skipped because the instance already registers them identically. */
|
|
@@ -21257,7 +21314,10 @@ interface operations {
|
|
|
21257
21314
|
"application/json": components["schemas"]["InternalErrorRefusal"];
|
|
21258
21315
|
};
|
|
21259
21316
|
};
|
|
21260
|
-
/**
|
|
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
|
+
*/
|
|
21261
21321
|
503: {
|
|
21262
21322
|
headers: {
|
|
21263
21323
|
"X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
|
|
@@ -21269,7 +21329,7 @@ interface operations {
|
|
|
21269
21329
|
[name: string]: unknown;
|
|
21270
21330
|
};
|
|
21271
21331
|
content: {
|
|
21272
|
-
"application/json": components["schemas"]["
|
|
21332
|
+
"application/json": components["schemas"]["BlobStoreUnavailableOrWriteContentionRefusal"];
|
|
21273
21333
|
};
|
|
21274
21334
|
};
|
|
21275
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. */
|
|
@@ -23268,7 +23328,7 @@ interface operations {
|
|
|
23268
23328
|
occurred_after?: string;
|
|
23269
23329
|
/** @description Only export items whose own time (`occurred_at`, else `created_at`) is before this time. */
|
|
23270
23330
|
occurred_before?: string;
|
|
23271
|
-
/** @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. */
|
|
23272
23332
|
format?: "ndjson" | "archive";
|
|
23273
23333
|
};
|
|
23274
23334
|
header?: never;
|
|
@@ -23371,7 +23431,10 @@ interface operations {
|
|
|
23371
23431
|
"application/json": components["schemas"]["InternalErrorRefusal"];
|
|
23372
23432
|
};
|
|
23373
23433
|
};
|
|
23374
|
-
/**
|
|
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
|
+
*/
|
|
23375
23438
|
503: {
|
|
23376
23439
|
headers: {
|
|
23377
23440
|
"X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
|
|
@@ -23383,7 +23446,7 @@ interface operations {
|
|
|
23383
23446
|
[name: string]: unknown;
|
|
23384
23447
|
};
|
|
23385
23448
|
content: {
|
|
23386
|
-
"application/json": components["schemas"]["
|
|
23449
|
+
"application/json": components["schemas"]["BlobStoreUnavailableOrWriteContentionRefusal"];
|
|
23387
23450
|
};
|
|
23388
23451
|
};
|
|
23389
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. */
|
|
@@ -23952,7 +24015,7 @@ interface operations {
|
|
|
23952
24015
|
requestBody: {
|
|
23953
24016
|
content: {
|
|
23954
24017
|
"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,
|
|
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. */
|
|
23956
24019
|
url: string;
|
|
23957
24020
|
/** @description The events to send. Name each one: there's no wildcard. */
|
|
23958
24021
|
events: ("item.created" | "item.updated" | "item.deleted" | "item.restored" | "item.purged" | "item.state_changed" | "metadata.changed" | "edge.created" | "edge.updated" | "edge.deleted")[];
|
|
@@ -24460,7 +24523,7 @@ interface operations {
|
|
|
24460
24523
|
requestBody: {
|
|
24461
24524
|
content: {
|
|
24462
24525
|
"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,
|
|
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. */
|
|
24464
24527
|
url?: string;
|
|
24465
24528
|
/** @description The events to send. Name each one: there's no wildcard. */
|
|
24466
24529
|
events?: ("item.created" | "item.updated" | "item.deleted" | "item.restored" | "item.purged" | "item.state_changed" | "metadata.changed" | "edge.created" | "edge.updated" | "edge.deleted")[];
|