@withmarfa/client 0.0.58 → 0.0.60

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 +229 -17
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -200,6 +200,26 @@ interface paths {
200
200
  patch?: never;
201
201
  trace?: never;
202
202
  };
203
+ "/items/titles": {
204
+ parameters: {
205
+ query?: never;
206
+ header?: never;
207
+ path?: never;
208
+ cookie?: never;
209
+ };
210
+ get?: never;
211
+ put?: never;
212
+ /**
213
+ * Find items by title
214
+ * @description Finds the active and archived items titled by each of up to 200 names, matched without regard to case, Unicode form or the white space around a name. `system.*` items and items you can't read are left out.
215
+ */
216
+ post: operations["findItemsByTitle"];
217
+ delete?: never;
218
+ options?: never;
219
+ head?: never;
220
+ patch?: never;
221
+ trace?: never;
222
+ };
203
223
  "/items/bulk-get": {
204
224
  parameters: {
205
225
  query?: never;
@@ -3698,6 +3718,34 @@ interface components {
3698
3718
  };
3699
3719
  };
3700
3720
  };
3721
+ /** @description An item whose title matches a name. */
3722
+ TitledItem: {
3723
+ /** @description The item's ID. */
3724
+ id: string;
3725
+ /** @description The item's type. */
3726
+ type: string;
3727
+ /** @description The item's title as it is stored, which the caller can compare itself. */
3728
+ title: string;
3729
+ /** @description `true` if the item's `blob_ref` property holds a blob digest. */
3730
+ has_blob: boolean;
3731
+ };
3732
+ /** @description An error response. */
3733
+ MissingRequiredFieldOrValidationErrorRefusal: {
3734
+ /** @description What went wrong. */
3735
+ error: {
3736
+ /**
3737
+ * @description A machine-readable code for the error. Use it in your logic.
3738
+ * @enum {string}
3739
+ */
3740
+ code: "missing_required_field" | "validation_error";
3741
+ /** @description A description of the error for a person to read. It can change, so don't match on it. */
3742
+ message: string;
3743
+ /** @description More about the error, such as the field it concerns. Each code defines its own details. */
3744
+ details?: {
3745
+ [key: string]: unknown;
3746
+ };
3747
+ };
3748
+ };
3701
3749
  /** @description An item's extension namespaces that you can read. */
3702
3750
  ExtensionsResponse: {
3703
3751
  /** @description The item's extension namespaces that you can read, each mapped to its data. */
@@ -4973,23 +5021,6 @@ interface components {
4973
5021
  /** @description When Marfa recorded the run. */
4974
5022
  reported_at: string;
4975
5023
  };
4976
- /** @description An error response. */
4977
- MissingRequiredFieldOrValidationErrorRefusal: {
4978
- /** @description What went wrong. */
4979
- error: {
4980
- /**
4981
- * @description A machine-readable code for the error. Use it in your logic.
4982
- * @enum {string}
4983
- */
4984
- code: "missing_required_field" | "validation_error";
4985
- /** @description A description of the error for a person to read. It can change, so don't match on it. */
4986
- message: string;
4987
- /** @description More about the error, such as the field it concerns. Each code defines its own details. */
4988
- details?: {
4989
- [key: string]: unknown;
4990
- };
4991
- };
4992
- };
4993
5024
  /** @description A page holding every connector you can read. */
4994
5025
  ConnectorPage: {
4995
5026
  /** @description Every connector you can read. */
@@ -9145,6 +9176,187 @@ interface operations {
9145
9176
  };
9146
9177
  };
9147
9178
  };
9179
+ findItemsByTitle: {
9180
+ parameters: {
9181
+ query?: never;
9182
+ header?: {
9183
+ /** @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. */
9184
+ "X-Marfa-Instance-Id"?: string;
9185
+ };
9186
+ path?: never;
9187
+ cookie?: never;
9188
+ };
9189
+ requestBody: {
9190
+ content: {
9191
+ "application/json": {
9192
+ /** @description The titles to look for, at most 200, each at most 1000 UTF-16 code units. Case, Unicode form and surrounding white space do not matter. */
9193
+ names: string[];
9194
+ };
9195
+ };
9196
+ };
9197
+ responses: {
9198
+ /** @description Returns one result for each name. A name matching nothing, or empty after trimming, has no items. */
9199
+ 200: {
9200
+ headers: {
9201
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
9202
+ "X-Request-ID": components["headers"]["X-Request-ID"];
9203
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
9204
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
9205
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
9206
+ [name: string]: unknown;
9207
+ };
9208
+ content: {
9209
+ "application/json": {
9210
+ /** @description One result for each name, in the order the request named them. */
9211
+ results: {
9212
+ /** @description The name, as the request sent it. */
9213
+ name: string;
9214
+ /** @description The active and archived items you can read whose title matches the name, by ID, at most 20. */
9215
+ items: components["schemas"]["TitledItem"][];
9216
+ /** @description `true` if more than 20 items match and `items` holds the first 20. */
9217
+ more: boolean;
9218
+ }[];
9219
+ };
9220
+ };
9221
+ };
9222
+ /**
9223
+ * @description - `missing_required_field`: `names` is missing.
9224
+ * - `validation_error`: `names` is not a list of strings, has more than 200 names, has a name longer than 1,000 UTF-16 code units, or the body has a field this endpoint doesn't take.
9225
+ */
9226
+ 400: {
9227
+ headers: {
9228
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
9229
+ "X-Request-ID": components["headers"]["X-Request-ID"];
9230
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
9231
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
9232
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
9233
+ "X-Error-Code": components["headers"]["X-Error-Code"];
9234
+ [name: string]: unknown;
9235
+ };
9236
+ content: {
9237
+ "application/json": components["schemas"]["MissingRequiredFieldOrValidationErrorRefusal"];
9238
+ };
9239
+ };
9240
+ /** @description `unauthorized`: the request has no credential, or its credential is not valid. */
9241
+ 401: {
9242
+ headers: {
9243
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
9244
+ "X-Request-ID": components["headers"]["X-Request-ID"];
9245
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
9246
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
9247
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
9248
+ "X-Error-Code": components["headers"]["X-Error-Code"];
9249
+ [name: string]: unknown;
9250
+ };
9251
+ content: {
9252
+ "application/json": components["schemas"]["UnauthorizedRefusal"];
9253
+ };
9254
+ };
9255
+ /** @description - `type_not_permitted`: your credential reaches no type. If it reaches some types, items of the others are left out instead. */
9256
+ 403: {
9257
+ headers: {
9258
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
9259
+ "X-Request-ID": components["headers"]["X-Request-ID"];
9260
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
9261
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
9262
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
9263
+ "X-Error-Code": components["headers"]["X-Error-Code"];
9264
+ [name: string]: unknown;
9265
+ };
9266
+ content: {
9267
+ "application/json": components["schemas"]["TypeNotPermittedRefusal"];
9268
+ };
9269
+ };
9270
+ /** @description `instance_changed`: `X-Marfa-Instance-Id` names another instance. Nothing is written. Rebuild the working copy from the instance at this address. */
9271
+ 409: {
9272
+ headers: {
9273
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
9274
+ "X-Request-ID": components["headers"]["X-Request-ID"];
9275
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
9276
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
9277
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
9278
+ "X-Error-Code": components["headers"]["X-Error-Code"];
9279
+ [name: string]: unknown;
9280
+ };
9281
+ content: {
9282
+ "application/json": components["schemas"]["InstanceChangedRefusal"];
9283
+ };
9284
+ };
9285
+ /** @description `request_too_large`: the request body is larger than this instance accepts. */
9286
+ 413: {
9287
+ headers: {
9288
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
9289
+ "X-Request-ID": components["headers"]["X-Request-ID"];
9290
+ "X-Error-Code": components["headers"]["X-Error-Code"];
9291
+ [name: string]: unknown;
9292
+ };
9293
+ content: {
9294
+ "application/json": components["schemas"]["RequestTooLargeRefusal"];
9295
+ };
9296
+ };
9297
+ /** @description `rate_limited`: you sent too many requests. Wait for the number of seconds in `Retry-After`, then try again. */
9298
+ 429: {
9299
+ headers: {
9300
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
9301
+ "X-Request-ID": components["headers"]["X-Request-ID"];
9302
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
9303
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
9304
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
9305
+ "X-Error-Code": components["headers"]["X-Error-Code"];
9306
+ "Retry-After": components["headers"]["Retry-After"];
9307
+ [name: string]: unknown;
9308
+ };
9309
+ content: {
9310
+ "application/json": components["schemas"]["RateLimitedRefusal"];
9311
+ };
9312
+ };
9313
+ /** @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. */
9314
+ 500: {
9315
+ headers: {
9316
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
9317
+ "X-Request-ID": components["headers"]["X-Request-ID"];
9318
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
9319
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
9320
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
9321
+ "X-Error-Code": components["headers"]["X-Error-Code"];
9322
+ [name: string]: unknown;
9323
+ };
9324
+ content: {
9325
+ "application/json": components["schemas"]["InternalErrorRefusal"];
9326
+ };
9327
+ };
9328
+ /** @description `write_contention`: the database was busy, and Marfa couldn't complete the request in time. Nothing changed. Try the request again. */
9329
+ 503: {
9330
+ headers: {
9331
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
9332
+ "X-Request-ID": components["headers"]["X-Request-ID"];
9333
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
9334
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
9335
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
9336
+ "X-Error-Code": components["headers"]["X-Error-Code"];
9337
+ [name: string]: unknown;
9338
+ };
9339
+ content: {
9340
+ "application/json": components["schemas"]["WriteContentionRefusal"];
9341
+ };
9342
+ };
9343
+ /** @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. */
9344
+ 507: {
9345
+ headers: {
9346
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
9347
+ "X-Request-ID": components["headers"]["X-Request-ID"];
9348
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
9349
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
9350
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
9351
+ "X-Error-Code": components["headers"]["X-Error-Code"];
9352
+ [name: string]: unknown;
9353
+ };
9354
+ content: {
9355
+ "application/json": components["schemas"]["InsufficientStorageRefusal"];
9356
+ };
9357
+ };
9358
+ };
9359
+ };
9148
9360
  bulkGetItems: {
9149
9361
  parameters: {
9150
9362
  query?: never;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@withmarfa/client",
3
- "version": "0.0.58",
3
+ "version": "0.0.60",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",