@withmarfa/client 0.0.17 → 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 +283 -41
  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": {
@@ -1492,7 +1496,7 @@ interface paths {
1492
1496
  post?: never;
1493
1497
  /**
1494
1498
  * End a sign-in
1495
- * @description Ends a sign-in at once: it can't make another request, and an app can't refresh its tokens. The keys an app minted stay unless `revoke_keys` is `true`. Requires the owner's browser session, signed in within five minutes, or the local command.
1499
+ * @description Ends a sign-in at once: it can't refresh or make another request. An app's keys stay unless `revoke_keys` is `true`. Needs the owner's browser session or the local command. A browser over five minutes old can end only itself, without `revoke_keys`.
1496
1500
  */
1497
1501
  delete: operations["endSignIn"];
1498
1502
  options?: never;
@@ -1675,7 +1679,7 @@ interface paths {
1675
1679
  head?: never;
1676
1680
  /**
1677
1681
  * Update a webhook
1678
- * @description Updates a webhook and returns it. Fields you leave out keep their values. Changing `url`, or setting `active` to `false`, cancels its pending deliveries. To change the secret, create a new webhook.
1682
+ * @description Updates a webhook and returns it. Fields you leave out keep their values. Marfa cancels a pending delivery if you change `url`, set `active` to `false`, or change `events` or `type_filter` to exclude it. To change the secret, create a new webhook.
1679
1683
  */
1680
1684
  patch: operations["updateWebhook"];
1681
1685
  trace?: never;
@@ -2632,14 +2636,14 @@ interface components {
2632
2636
  error?: components["schemas"]["BulkEntryError"] & unknown;
2633
2637
  };
2634
2638
  /** @description An error response. */
2635
- BulkAtomicRollbackOrMissingRequiredFieldOrValidationErrorRefusal: {
2639
+ BulkAtomicRollbackOrInvalidPropertiesOrMissingRequiredFieldOrValidationErrorRefusal: {
2636
2640
  /** @description What went wrong. */
2637
2641
  error: {
2638
2642
  /**
2639
2643
  * @description A machine-readable code for the error. Use it in your logic.
2640
2644
  * @enum {string}
2641
2645
  */
2642
- code: "bulk_atomic_rollback" | "missing_required_field" | "validation_error";
2646
+ code: "bulk_atomic_rollback" | "invalid_properties" | "missing_required_field" | "validation_error";
2643
2647
  /** @description A description of the error for a person to read. It can change, so don't match on it. */
2644
2648
  message: string;
2645
2649
  /** @description More about the error, such as the field it concerns. Each code defines its own details. */
@@ -2706,14 +2710,14 @@ interface components {
2706
2710
  result?: components["schemas"]["BulkActionResult"] & unknown;
2707
2711
  };
2708
2712
  /** @description An error response. */
2709
- BulkCapExceededOrBulkConfirmationRequiredOrMissingRequiredFieldOrValidationErrorRefusal: {
2713
+ BulkCapExceededOrBulkConfirmationRequiredOrInvalidPropertiesOrMissingRequiredFieldOrValidationErrorRefusal: {
2710
2714
  /** @description What went wrong. */
2711
2715
  error: {
2712
2716
  /**
2713
2717
  * @description A machine-readable code for the error. Use it in your logic.
2714
2718
  * @enum {string}
2715
2719
  */
2716
- code: "bulk_cap_exceeded" | "bulk_confirmation_required" | "missing_required_field" | "validation_error";
2720
+ code: "bulk_cap_exceeded" | "bulk_confirmation_required" | "invalid_properties" | "missing_required_field" | "validation_error";
2717
2721
  /** @description A description of the error for a person to read. It can change, so don't match on it. */
2718
2722
  message: string;
2719
2723
  /** @description More about the error, such as the field it concerns. Each code defines its own details. */
@@ -2808,6 +2812,23 @@ interface components {
2808
2812
  };
2809
2813
  };
2810
2814
  };
2815
+ /** @description An error response. */
2816
+ InvalidIdOrInvalidPropertiesOrMissingRequiredFieldOrValidationErrorRefusal: {
2817
+ /** @description What went wrong. */
2818
+ error: {
2819
+ /**
2820
+ * @description A machine-readable code for the error. Use it in your logic.
2821
+ * @enum {string}
2822
+ */
2823
+ code: "invalid_id" | "invalid_properties" | "missing_required_field" | "validation_error";
2824
+ /** @description A description of the error for a person to read. It can change, so don't match on it. */
2825
+ message: string;
2826
+ /** @description More about the error, such as the field it concerns. Each code defines its own details. */
2827
+ details?: {
2828
+ [key: string]: unknown;
2829
+ };
2830
+ };
2831
+ };
2811
2832
  /** @description One edge. */
2812
2833
  EdgeResponse: {
2813
2834
  edge: components["schemas"]["Edge"] & unknown;
@@ -3913,6 +3934,23 @@ interface components {
3913
3934
  /** @description Pass as `cursor` for the next page; `null` on the last. A page can be short, or empty, with a cursor still to follow, so a walk stops on `null` and never on a short page. */
3914
3935
  next_cursor: string | null;
3915
3936
  };
3937
+ /** @description An error response. */
3938
+ InvalidPropertiesOrMissingRequiredFieldOrUnknownTypeOrValidationErrorRefusal: {
3939
+ /** @description What went wrong. */
3940
+ error: {
3941
+ /**
3942
+ * @description A machine-readable code for the error. Use it in your logic.
3943
+ * @enum {string}
3944
+ */
3945
+ code: "invalid_properties" | "missing_required_field" | "unknown_type" | "validation_error";
3946
+ /** @description A description of the error for a person to read. It can change, so don't match on it. */
3947
+ message: string;
3948
+ /** @description More about the error, such as the field it concerns. Each code defines its own details. */
3949
+ details?: {
3950
+ [key: string]: unknown;
3951
+ };
3952
+ };
3953
+ };
3916
3954
  /** @description Which items the folder holds. */
3917
3955
  FolderSearch: {
3918
3956
  /** @description The types the folder holds, each with its subtypes. Empty or absent holds every type the machine's key can read, except `system.*`. */
@@ -3930,7 +3968,7 @@ interface components {
3930
3968
  /** @description The type a new file becomes if its frontmatter names none. */
3931
3969
  type?: string;
3932
3970
  tier?: components["schemas"]["Tier"] & unknown;
3933
- /** @description Properties a new file takes where its frontmatter doesn't set them. A default for the type's body field is never taken: the file's body is that property. */
3971
+ /** @description Properties a new file takes where its frontmatter doesn't set them. A default for the type's body field is never taken: the file's body is that property. A whole number whose digits a 64-bit float doesn't keep is refused. */
3934
3972
  properties?: {
3935
3973
  [key: string]: unknown;
3936
3974
  };
@@ -3949,14 +3987,14 @@ interface components {
3949
3987
  fraction?: number;
3950
3988
  };
3951
3989
  /** @description An error response. */
3952
- InvalidIdOrInvalidTransitionOrMissingRequiredFieldOrUnknownTypeOrValidationErrorRefusal: {
3990
+ InvalidIdOrInvalidPropertiesOrInvalidTransitionOrMissingRequiredFieldOrUnknownTypeOrValidationErrorRefusal: {
3953
3991
  /** @description What went wrong. */
3954
3992
  error: {
3955
3993
  /**
3956
3994
  * @description A machine-readable code for the error. Use it in your logic.
3957
3995
  * @enum {string}
3958
3996
  */
3959
- code: "invalid_id" | "invalid_transition" | "missing_required_field" | "unknown_type" | "validation_error";
3997
+ code: "invalid_id" | "invalid_properties" | "invalid_transition" | "missing_required_field" | "unknown_type" | "validation_error";
3960
3998
  /** @description A description of the error for a person to read. It can change, so don't match on it. */
3961
3999
  message: string;
3962
4000
  /** @description More about the error, such as the field it concerns. Each code defines its own details. */
@@ -5228,7 +5266,7 @@ interface operations {
5228
5266
  "application/json": {
5229
5267
  /** @description The item's type identifier, such as `core.note`. */
5230
5268
  type: string;
5231
- /** @description The item's properties, checked against the type's schema. If the instance's strict mode names the type, an undeclared property is refused as `invalid_properties` with `details.code` `unknown_property`. */
5269
+ /** @description The item's properties, checked against the type's schema. Strict mode refuses an undeclared property as `invalid_properties` (`details.code` `unknown_property`). A whole number whose digits a 64-bit float doesn't keep is refused: send it as a string. */
5232
5270
  properties?: {
5233
5271
  [key: string]: unknown;
5234
5272
  };
@@ -5869,7 +5907,7 @@ interface operations {
5869
5907
  /**
5870
5908
  * @description - `invalid_id`: the ID is not a valid item ID.
5871
5909
  * - `edge_constraint_violation`: an edge type on the item has `cascade_on_delete: block`, and such an edge exists.
5872
- * - `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.
5873
5911
  */
5874
5912
  400: {
5875
5913
  headers: {
@@ -6073,7 +6111,7 @@ interface operations {
6073
6111
  requestBody: {
6074
6112
  content: {
6075
6113
  "application/json": {
6076
- /** @description The properties to write. They lay over the item's properties, or become all of them when `properties_mode` is `replace`. Strict mode refuses an undeclared property, as in `POST /items`. */
6114
+ /** @description The properties to write. They lay over the item's properties, or become all of them when `properties_mode` is `replace`. As in `POST /items`, strict mode refuses an undeclared property, and a whole number whose digits a 64-bit float doesn't keep is refused. */
6077
6115
  properties?: {
6078
6116
  [key: string]: unknown;
6079
6117
  };
@@ -7775,7 +7813,7 @@ interface operations {
7775
7813
  /**
7776
7814
  * @description - `invalid_id`: the ID is not a valid item ID.
7777
7815
  * - `invalid_transition`: the item is not in the trash.
7778
- * - `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.
7779
7817
  */
7780
7818
  400: {
7781
7819
  headers: {
@@ -8190,7 +8228,7 @@ interface operations {
8190
8228
  id?: string;
8191
8229
  /** @description The item's type identifier, such as `core.note`. */
8192
8230
  type: string;
8193
- /** @description The item's properties, checked against the type's schema. If the instance's strict mode names the type, an undeclared property is refused as `invalid_properties` with `details.code` `unknown_property`. */
8231
+ /** @description The item's properties, checked against the type's schema. Strict mode refuses an undeclared property as `invalid_properties` (`details.code` `unknown_property`). A whole number whose digits a 64-bit float doesn't keep is refused: send it as a string. */
8194
8232
  properties?: {
8195
8233
  [key: string]: unknown;
8196
8234
  };
@@ -8245,9 +8283,10 @@ interface operations {
8245
8283
  };
8246
8284
  };
8247
8285
  /**
8248
- * @description - `validation_error`: the body is malformed, has a key this operation doesn't declare, or has more than 5,000 entries.
8286
+ * @description - `validation_error`: the body is malformed, has an undeclared key or has over 5,000 entries.
8249
8287
  * - `missing_required_field`: a required field is missing.
8250
- * - `bulk_atomic_rollback`: with `atomic` true, an entry was refused and nothing was written. `details.code` and `details.index` give its code and position. The status is the one that refusal carries alone.
8288
+ * - `invalid_properties`: an entry's `properties` hold a whole number a 64-bit float can't keep.
8289
+ * - `bulk_atomic_rollback`: an `atomic` entry was refused and nothing was written (`details.code`, `details.index`). The status is the refusal's own.
8251
8290
  */
8252
8291
  400: {
8253
8292
  headers: {
@@ -8260,7 +8299,7 @@ interface operations {
8260
8299
  [name: string]: unknown;
8261
8300
  };
8262
8301
  content: {
8263
- "application/json": components["schemas"]["BulkAtomicRollbackOrMissingRequiredFieldOrValidationErrorRefusal"];
8302
+ "application/json": components["schemas"]["BulkAtomicRollbackOrInvalidPropertiesOrMissingRequiredFieldOrValidationErrorRefusal"];
8264
8303
  };
8265
8304
  };
8266
8305
  /** @description `unauthorized`: the request has no credential, or its credential is not valid. */
@@ -8465,6 +8504,7 @@ interface operations {
8465
8504
  enable_fanout?: boolean;
8466
8505
  /** @enum {string} */
8467
8506
  action: "update_properties";
8507
+ /** @description The properties to lay over each item's properties. A whole number whose digits a 64-bit float doesn't keep is refused: send it as a string. */
8468
8508
  patch: {
8469
8509
  [key: string]: unknown;
8470
8510
  };
@@ -8512,8 +8552,9 @@ interface operations {
8512
8552
  };
8513
8553
  };
8514
8554
  /**
8515
- * @description - `validation_error`: the body or `filter` is malformed or has an undeclared key or an empty field, `update_tags` has neither `add` nor `remove`, or `expected_ids` is empty or not on a purge.
8516
- * - `missing_required_field`: a field the action needs is missing.
8555
+ * @description - `validation_error`: the body is malformed or has an undeclared or empty field, or `update_tags` has no `add` or `remove`.
8556
+ * - `missing_required_field`: a needed field is missing.
8557
+ * - `invalid_properties`: `patch` holds a whole number a 64-bit float cannot keep.
8517
8558
  * - `bulk_confirmation_required`: a purge without `confirm: "PURGE"`.
8518
8559
  * - `bulk_cap_exceeded`: more items match than `max_items` allows.
8519
8560
  */
@@ -8529,7 +8570,7 @@ interface operations {
8529
8570
  [name: string]: unknown;
8530
8571
  };
8531
8572
  content: {
8532
- "application/json": components["schemas"]["BulkCapExceededOrBulkConfirmationRequiredOrMissingRequiredFieldOrValidationErrorRefusal"];
8573
+ "application/json": components["schemas"]["BulkCapExceededOrBulkConfirmationRequiredOrInvalidPropertiesOrMissingRequiredFieldOrValidationErrorRefusal"];
8533
8574
  };
8534
8575
  };
8535
8576
  /** @description `unauthorized`: the request has no credential, or its credential is not valid. */
@@ -9924,6 +9965,7 @@ interface operations {
9924
9965
  /**
9925
9966
  * @description - `validation_error`: the body is not a JSON object, or its JSON is longer than 102,400 characters.
9926
9967
  * - `invalid_id`: the ID is not a valid item ID.
9968
+ * - `invalid_properties`: the body holds a whole number a 64-bit float can't keep.
9927
9969
  */
9928
9970
  400: {
9929
9971
  headers: {
@@ -9937,7 +9979,7 @@ interface operations {
9937
9979
  [name: string]: unknown;
9938
9980
  };
9939
9981
  content: {
9940
- "application/json": components["schemas"]["InvalidIdOrMissingRequiredFieldOrValidationErrorRefusal"];
9982
+ "application/json": components["schemas"]["InvalidIdOrInvalidPropertiesOrMissingRequiredFieldOrValidationErrorRefusal"];
9941
9983
  };
9942
9984
  };
9943
9985
  /** @description `unauthorized`: the request has no credential, or its credential is not valid. */
@@ -10846,7 +10888,7 @@ interface operations {
10846
10888
  target_id: string;
10847
10889
  /** @description The identifier of the edge type, such as `parent-of`. */
10848
10890
  edge_type: string;
10849
- /** @description The edge's properties. Leave it out for none. */
10891
+ /** @description The edge's properties. Leave it out for none. A whole number whose digits a 64-bit float doesn't keep is refused: send it as a string. */
10850
10892
  properties?: {
10851
10893
  [key: string]: unknown;
10852
10894
  };
@@ -11480,7 +11522,7 @@ interface operations {
11480
11522
  requestBody: {
11481
11523
  content: {
11482
11524
  "application/json": {
11483
- /** @description Properties to merge over the edge's. Required unless an end moves. */
11525
+ /** @description Properties to merge over the edge's. Required unless an end moves. A whole number whose digits a 64-bit float doesn't keep is refused: send it as a string. */
11484
11526
  properties?: {
11485
11527
  [key: string]: unknown;
11486
11528
  };
@@ -11720,7 +11762,7 @@ interface operations {
11720
11762
  target_id: string;
11721
11763
  /** @description The identifier of the edge type, such as `parent-of`. */
11722
11764
  edge_type: string;
11723
- /** @description The edge's properties. On an existing edge they merge over its own. Leave it out for none. */
11765
+ /** @description The edge's properties. On an existing edge they merge over its own. Leave it out for none. A whole number whose digits a 64-bit float doesn't keep is refused: send it as a string. */
11724
11766
  properties?: {
11725
11767
  [key: string]: unknown;
11726
11768
  };
@@ -11755,9 +11797,10 @@ interface operations {
11755
11797
  };
11756
11798
  };
11757
11799
  /**
11758
- * @description - `validation_error`: the body is malformed, has an undeclared key, or has more than 5,000 entries.
11759
- * - `missing_required_field`: `edges` is missing, or an entry lacks `source_id`, `target_id` or `edge_type`.
11760
- * - `bulk_atomic_rollback`: with `atomic` true, an entry was refused and nothing was written. `details.code` and `details.index` give its code and position. The status is that refusal's own.
11800
+ * @description - `validation_error`: the body is malformed, has an undeclared key or has over 5,000 entries.
11801
+ * - `missing_required_field`: a required field is missing.
11802
+ * - `invalid_properties`: an entry's `properties` hold a whole number a 64-bit float can't keep.
11803
+ * - `bulk_atomic_rollback`: an `atomic` entry was refused and nothing was written (`details.code`, `details.index`). The status is the refusal's own.
11761
11804
  */
11762
11805
  400: {
11763
11806
  headers: {
@@ -11770,7 +11813,7 @@ interface operations {
11770
11813
  [name: string]: unknown;
11771
11814
  };
11772
11815
  content: {
11773
- "application/json": components["schemas"]["BulkAtomicRollbackOrMissingRequiredFieldOrValidationErrorRefusal"];
11816
+ "application/json": components["schemas"]["BulkAtomicRollbackOrInvalidPropertiesOrMissingRequiredFieldOrValidationErrorRefusal"];
11774
11817
  };
11775
11818
  };
11776
11819
  /** @description `unauthorized`: the request has no credential, or its credential is not valid. */
@@ -19038,9 +19081,10 @@ interface operations {
19038
19081
  };
19039
19082
  };
19040
19083
  /**
19041
- * @description - `validation_error`: a setting is malformed, such as a `system.*` type, an invalid `filter` or a `first_placement` directory outside the folder. `details.errors[0].path` names it. A key the body or a setting doesn't declare is named in `details.unknown_body_fields`.
19084
+ * @description - `validation_error`: a setting is malformed or undeclared, such as a `system.*` type or a `first_placement` outside the folder. `details.errors[0].path` or `details.unknown_body_fields` names it.
19042
19085
  * - `missing_required_field`: `title` is missing.
19043
- * - `unknown_type`: a setting names a type that isn't registered.
19086
+ * - `unknown_type`: a setting's type is unknown.
19087
+ * - `invalid_properties`: `defaults.properties` has a whole number a 64-bit float can't keep.
19044
19088
  */
19045
19089
  400: {
19046
19090
  headers: {
@@ -19054,7 +19098,7 @@ interface operations {
19054
19098
  [name: string]: unknown;
19055
19099
  };
19056
19100
  content: {
19057
- "application/json": components["schemas"]["MissingRequiredFieldOrUnknownTypeOrValidationErrorRefusal"];
19101
+ "application/json": components["schemas"]["InvalidPropertiesOrMissingRequiredFieldOrUnknownTypeOrValidationErrorRefusal"];
19058
19102
  };
19059
19103
  };
19060
19104
  /** @description `unauthorized`: the request has no credential, or its credential is not valid. */
@@ -19254,10 +19298,11 @@ interface operations {
19254
19298
  };
19255
19299
  };
19256
19300
  /**
19257
- * @description - `validation_error`: a setting is malformed (`details.errors[0].path` names it), a key is undeclared (`details.unknown_body_fields` names it), the body names no setting, or the query has `conflict`.
19301
+ * @description - `validation_error`: a setting is malformed or undeclared (`details.errors[0].path` or `details.unknown_body_fields` names it).
19258
19302
  * - `missing_required_field`: `version` is missing.
19259
- * - `unknown_type`: a setting names a type that isn't registered.
19260
- * - `invalid_id`: the ID is malformed.
19303
+ * - `unknown_type`: a setting's type is unknown.
19304
+ * - `invalid_properties`: `defaults.properties` has a whole number a 64-bit float can't keep.
19305
+ * - `invalid_id`: the ID is invalid.
19261
19306
  * - `invalid_transition`: the folder is revoked.
19262
19307
  */
19263
19308
  400: {
@@ -19272,7 +19317,7 @@ interface operations {
19272
19317
  [name: string]: unknown;
19273
19318
  };
19274
19319
  content: {
19275
- "application/json": components["schemas"]["InvalidIdOrInvalidTransitionOrMissingRequiredFieldOrUnknownTypeOrValidationErrorRefusal"];
19320
+ "application/json": components["schemas"]["InvalidIdOrInvalidPropertiesOrInvalidTransitionOrMissingRequiredFieldOrUnknownTypeOrValidationErrorRefusal"];
19276
19321
  };
19277
19322
  };
19278
19323
  /** @description `unauthorized`: the request has no credential, or its credential is not valid. */
@@ -20737,10 +20782,12 @@ interface operations {
20737
20782
  permissions?: components["schemas"]["Permission"][];
20738
20783
  /** @description Replaces the key's enforcement levers whole. `null` clears them. */
20739
20784
  enforcement_override?: components["schemas"]["EnforcementOverride"] | null;
20740
- /** @description Replaces when the key stops working, as an ISO 8601 date and time in the future. `null` clears it. Leave it out to keep it. It can't be later than your own key's `expires_at`, or the key's current one for a key an app made or through `keys.manage`. */
20785
+ /** @description Replaces when the key stops working, as an ISO 8601 date and time in the future. `null` clears it. Leave it out to keep it. It can't be later than your own key's `expires_at`, or the key's current one for a key an app made, through `keys.manage` or with `narrow_only`. */
20741
20786
  expires_at?: string | null;
20742
20787
  /** @description Can't change. To give a key another source, create a new key and revoke this one. */
20743
20788
  source?: string;
20789
+ /** @description `true` to refuse the update if it would give the key more: a permission, map entry or claimed source it doesn't hold, a later `expires_at` or none, or an `enforcement_override` other than its own. Defaults to `false`. */
20790
+ narrow_only?: boolean;
20744
20791
  };
20745
20792
  };
20746
20793
  };
@@ -20792,7 +20839,7 @@ interface operations {
20792
20839
  "application/json": components["schemas"]["UnauthorizedRefusal"];
20793
20840
  };
20794
20841
  };
20795
- /** @description - `forbidden`: you don't hold `keys.mint` and aren't the owner or local command; the body gives the key a permission, map entry or source you don't hold, or an `expires_at` later than yours; it widens a key an app created or, through `keys.manage`, any key; or it names `enforcement_override` and you don't hold `config.manage`. `details.required_scope` or `details.source` names what's missing. */
20842
+ /** @description - `forbidden`: you don't hold `keys.mint` and aren't the owner or local command; the body gives the key more than you hold or an `expires_at` later than yours; it widens or lengthens an app's key, or any key through `keys.manage` or with `narrow_only`, which also refuses a changed `enforcement_override`; or it names `enforcement_override` without `config.manage`. `details` names what's missing. */
20796
20843
  403: {
20797
20844
  headers: {
20798
20845
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
@@ -21232,6 +21279,195 @@ interface operations {
21232
21279
  };
21233
21280
  };
21234
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
+ };
21235
21471
  restoreArchive: {
21236
21472
  parameters: {
21237
21473
  query?: never;
@@ -22418,7 +22654,7 @@ interface operations {
22418
22654
  "application/json": components["schemas"]["UnauthorizedRefusal"];
22419
22655
  };
22420
22656
  };
22421
- /** @description - `forbidden`: the request carries a key or an app's token rather than the owner's browser session or the local command's authority, or the browser signed in more than five minutes ago. */
22657
+ /** @description - `forbidden`: the request carries a key or an app's token rather than the owner's browser session or the local command's authority, or the browser signed in more than five minutes ago and the ID names another sign-in or `revoke_keys` is `true`. */
22422
22658
  403: {
22423
22659
  headers: {
22424
22660
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
@@ -23427,8 +23663,10 @@ interface operations {
23427
23663
  occurred_after?: string;
23428
23664
  /** @description Only export items whose own time (`occurred_at`, else `created_at`) is before this time. */
23429
23665
  occurred_before?: string;
23430
- /** @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. */
23431
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";
23432
23670
  };
23433
23671
  header?: never;
23434
23672
  path?: never;
@@ -25158,6 +25396,10 @@ interface operations {
25158
25396
  resource_type?: string;
25159
25397
  /** @description Only return entries for the resource with this ID. */
25160
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;
25161
25403
  /** @description Only return entries recorded after this time. */
25162
25404
  created_after?: string;
25163
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.17",
3
+ "version": "0.0.19",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",