@withmarfa/client 0.0.18 → 0.0.19

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 +204 -5
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -1362,14 +1362,18 @@ interface paths {
1362
1362
  get: operations["getConfig"];
1363
1363
  /**
1364
1364
  * Replace the configuration
1365
- * @description Replaces the instance configuration with the body and returns it. A setting you leave out goes back to its default, so send the whole configuration with your change. Requires `config.manage`.
1365
+ * @description Replaces the instance configuration with the body and returns it. A setting you leave out goes back to its default, so send the whole configuration with your change. To change only some settings, use `PATCH`. Requires `config.manage`.
1366
1366
  */
1367
1367
  put: operations["replaceConfig"];
1368
1368
  post?: never;
1369
1369
  delete?: never;
1370
1370
  options?: never;
1371
1371
  head?: never;
1372
- patch?: never;
1372
+ /**
1373
+ * Update the configuration
1374
+ * @description Changes only the settings the body names and returns the whole configuration. A setting you leave out stays as it is, and `null` removes one so its default applies. `enforcement` is one setting: send every lever you want on. Requires `config.manage`.
1375
+ */
1376
+ patch: operations["updateConfig"];
1373
1377
  trace?: never;
1374
1378
  };
1375
1379
  "/restore": {
@@ -5903,7 +5907,7 @@ interface operations {
5903
5907
  /**
5904
5908
  * @description - `invalid_id`: the ID is not a valid item ID.
5905
5909
  * - `edge_constraint_violation`: an edge type on the item has `cascade_on_delete: block`, and such an edge exists.
5906
- * - `validation_error`: the item is a live `system.connection` (revoke its grant with `DELETE /auth/grants/{id}` first), or `version` is not a positive whole number.
5910
+ * - `validation_error`: the item is a live `system.connection` (end it with `DELETE /owner/sign-ins/{id}` first), or `version` is not a positive whole number.
5907
5911
  */
5908
5912
  400: {
5909
5913
  headers: {
@@ -7809,7 +7813,7 @@ interface operations {
7809
7813
  /**
7810
7814
  * @description - `invalid_id`: the ID is not a valid item ID.
7811
7815
  * - `invalid_transition`: the item is not in the trash.
7812
- * - `validation_error`: the item is a live `system.connection` (revoke its grant with `DELETE /auth/grants/{id}` first), or `version` is not a positive whole number.
7816
+ * - `validation_error`: the item is a live `system.connection` (end it with `DELETE /owner/sign-ins/{id}` first), or `version` is not a positive whole number.
7813
7817
  */
7814
7818
  400: {
7815
7819
  headers: {
@@ -21275,6 +21279,195 @@ interface operations {
21275
21279
  };
21276
21280
  };
21277
21281
  };
21282
+ updateConfig: {
21283
+ parameters: {
21284
+ query?: never;
21285
+ header?: {
21286
+ /** @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. */
21287
+ "X-Marfa-Instance-Id"?: string;
21288
+ };
21289
+ path?: never;
21290
+ cookie?: never;
21291
+ };
21292
+ requestBody: {
21293
+ content: {
21294
+ "application/json": {
21295
+ /** @description This instance's ID, accepted so you can send back what `GET /config` returned. It sets nothing. */
21296
+ instance_id?: string;
21297
+ /** @description The instance's display name. `null` removes it, so the server's default applies. */
21298
+ name?: string | null;
21299
+ /** @description The instance's enforcement levers. Sending this replaces all three levers, so include every lever you want on. `null` removes them all. */
21300
+ enforcement?: {
21301
+ strict_mode?: components["schemas"]["TypeLeverStrict"] & unknown;
21302
+ source_allowlist?: components["schemas"]["TypeAndSourceLeverStrict"] & unknown;
21303
+ source_filter?: components["schemas"]["TypeAndSourceLeverStrict"] & unknown;
21304
+ } | null;
21305
+ /** @description Days Marfa keeps audit log entries and outbound webhook delivery history. `0` keeps them with no age limit. `null` removes it, so the server's default applies. */
21306
+ audit_retention_days?: number | null;
21307
+ /** @description Hours Marfa keeps events, which a stream can replay from a cursor, and the answers it replays for an `Idempotency-Key`. `0` keeps them with no age limit. `null` removes it, so the server's default applies. */
21308
+ event_log_retention_hours?: number | null;
21309
+ /** @description Days an item stays in the trash before Marfa purges it. `0` keeps them with no age limit. `null` removes it, so the server's default applies. */
21310
+ trash_retention_days?: number | null;
21311
+ /** @description Days Marfa keeps inbound webhook deliveries a connector has marked handled. `0` keeps them with no age limit. `null` removes it, so the server's default applies. */
21312
+ inbound_handled_retention_days?: number | null;
21313
+ /** @description Days Marfa keeps inbound webhook deliveries no connector has marked handled. `0` keeps them with no age limit. `null` removes it, so the server's default applies. */
21314
+ inbound_pending_retention_days?: number | null;
21315
+ };
21316
+ };
21317
+ };
21318
+ responses: {
21319
+ /** @description Returns the configuration as stored. */
21320
+ 200: {
21321
+ headers: {
21322
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
21323
+ "X-Request-ID": components["headers"]["X-Request-ID"];
21324
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
21325
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
21326
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
21327
+ [name: string]: unknown;
21328
+ };
21329
+ content: {
21330
+ "application/json": components["schemas"]["InstanceConfig"];
21331
+ };
21332
+ };
21333
+ /**
21334
+ * @description - `missing_required_field`: a lever lacks `types` or `sources`.
21335
+ * - `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.
21336
+ */
21337
+ 400: {
21338
+ headers: {
21339
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
21340
+ "X-Request-ID": components["headers"]["X-Request-ID"];
21341
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
21342
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
21343
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
21344
+ "X-Error-Code": components["headers"]["X-Error-Code"];
21345
+ [name: string]: unknown;
21346
+ };
21347
+ content: {
21348
+ "application/json": components["schemas"]["MissingRequiredFieldOrValidationErrorRefusal"];
21349
+ };
21350
+ };
21351
+ /** @description `unauthorized`: the request has no credential, or its credential is not valid. */
21352
+ 401: {
21353
+ headers: {
21354
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
21355
+ "X-Request-ID": components["headers"]["X-Request-ID"];
21356
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
21357
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
21358
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
21359
+ "X-Error-Code": components["headers"]["X-Error-Code"];
21360
+ [name: string]: unknown;
21361
+ };
21362
+ content: {
21363
+ "application/json": components["schemas"]["UnauthorizedRefusal"];
21364
+ };
21365
+ };
21366
+ /** @description - `forbidden`: you don't hold `config.manage`. `details.required_scope` names it. */
21367
+ 403: {
21368
+ headers: {
21369
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
21370
+ "X-Request-ID": components["headers"]["X-Request-ID"];
21371
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
21372
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
21373
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
21374
+ "X-Error-Code": components["headers"]["X-Error-Code"];
21375
+ [name: string]: unknown;
21376
+ };
21377
+ content: {
21378
+ "application/json": components["schemas"]["ForbiddenRefusal"];
21379
+ };
21380
+ };
21381
+ /** @description `instance_changed`: `X-Marfa-Instance-Id` names another instance. Nothing is written. Rebuild the working copy from the instance at this address. */
21382
+ 409: {
21383
+ headers: {
21384
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
21385
+ "X-Request-ID": components["headers"]["X-Request-ID"];
21386
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
21387
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
21388
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
21389
+ "X-Error-Code": components["headers"]["X-Error-Code"];
21390
+ [name: string]: unknown;
21391
+ };
21392
+ content: {
21393
+ "application/json": components["schemas"]["InstanceChangedRefusal"];
21394
+ };
21395
+ };
21396
+ /** @description `request_too_large`: the request body is larger than this instance accepts. */
21397
+ 413: {
21398
+ headers: {
21399
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
21400
+ "X-Request-ID": components["headers"]["X-Request-ID"];
21401
+ "X-Error-Code": components["headers"]["X-Error-Code"];
21402
+ [name: string]: unknown;
21403
+ };
21404
+ content: {
21405
+ "application/json": components["schemas"]["RequestTooLargeRefusal"];
21406
+ };
21407
+ };
21408
+ /** @description `rate_limited`: you sent too many requests. Wait for the number of seconds in `Retry-After`, then try again. */
21409
+ 429: {
21410
+ headers: {
21411
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
21412
+ "X-Request-ID": components["headers"]["X-Request-ID"];
21413
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
21414
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
21415
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
21416
+ "X-Error-Code": components["headers"]["X-Error-Code"];
21417
+ "Retry-After": components["headers"]["Retry-After"];
21418
+ [name: string]: unknown;
21419
+ };
21420
+ content: {
21421
+ "application/json": components["schemas"]["RateLimitedRefusal"];
21422
+ };
21423
+ };
21424
+ /** @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. */
21425
+ 500: {
21426
+ headers: {
21427
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
21428
+ "X-Request-ID": components["headers"]["X-Request-ID"];
21429
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
21430
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
21431
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
21432
+ "X-Error-Code": components["headers"]["X-Error-Code"];
21433
+ [name: string]: unknown;
21434
+ };
21435
+ content: {
21436
+ "application/json": components["schemas"]["InternalErrorRefusal"];
21437
+ };
21438
+ };
21439
+ /** @description `write_contention`: the database was busy, and Marfa couldn't complete the request in time. Nothing changed. Try the request again. */
21440
+ 503: {
21441
+ headers: {
21442
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
21443
+ "X-Request-ID": components["headers"]["X-Request-ID"];
21444
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
21445
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
21446
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
21447
+ "X-Error-Code": components["headers"]["X-Error-Code"];
21448
+ [name: string]: unknown;
21449
+ };
21450
+ content: {
21451
+ "application/json": components["schemas"]["WriteContentionRefusal"];
21452
+ };
21453
+ };
21454
+ /** @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. */
21455
+ 507: {
21456
+ headers: {
21457
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
21458
+ "X-Request-ID": components["headers"]["X-Request-ID"];
21459
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
21460
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
21461
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
21462
+ "X-Error-Code": components["headers"]["X-Error-Code"];
21463
+ [name: string]: unknown;
21464
+ };
21465
+ content: {
21466
+ "application/json": components["schemas"]["InsufficientStorageRefusal"];
21467
+ };
21468
+ };
21469
+ };
21470
+ };
21278
21471
  restoreArchive: {
21279
21472
  parameters: {
21280
21473
  query?: never;
@@ -23470,8 +23663,10 @@ interface operations {
23470
23663
  occurred_after?: string;
23471
23664
  /** @description Only export items whose own time (`occurred_at`, else `created_at`) is before this time. */
23472
23665
  occurred_before?: string;
23473
- /** @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. */
23666
+ /** @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 under `missing_blobs` each blob it doesn't hold. */
23474
23667
  format?: "ndjson" | "archive";
23668
+ /** @description With `format=archive`, `false` leaves out the bytes of files, which the manifest then names in `missing_blobs`. Defaults to `true`. `format=ndjson` carries no file bytes either way. */
23669
+ files?: "true" | "false";
23475
23670
  };
23476
23671
  header?: never;
23477
23672
  path?: never;
@@ -25201,6 +25396,10 @@ interface operations {
25201
25396
  resource_type?: string;
25202
25397
  /** @description Only return entries for the resource with this ID. */
25203
25398
  resource_id?: string;
25399
+ /** @description Only return entries of this kind: `access` is sign-ins, keys, folders and the profile, `data` is items, edges, types, files and restores, `settings` is configuration, webhooks and connectors, and `housekeeping` is what Marfa does on its own. */
25400
+ kind?: "access" | "data" | "settings" | "housekeeping";
25401
+ /** @description Only return entries that hold every word of this text, in any order and ignoring ASCII case, in their action, resource, key, address or details. */
25402
+ q?: string;
25204
25403
  /** @description Only return entries recorded after this time. */
25205
25404
  created_after?: string;
25206
25405
  /** @description Only return entries recorded before this time. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@withmarfa/client",
3
- "version": "0.0.18",
3
+ "version": "0.0.19",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",