@withmarfa/client 0.0.17 → 0.0.18

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 +79 -36
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -1492,7 +1492,7 @@ interface paths {
1492
1492
  post?: never;
1493
1493
  /**
1494
1494
  * 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.
1495
+ * @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
1496
  */
1497
1497
  delete: operations["endSignIn"];
1498
1498
  options?: never;
@@ -1675,7 +1675,7 @@ interface paths {
1675
1675
  head?: never;
1676
1676
  /**
1677
1677
  * 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.
1678
+ * @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
1679
  */
1680
1680
  patch: operations["updateWebhook"];
1681
1681
  trace?: never;
@@ -2632,14 +2632,14 @@ interface components {
2632
2632
  error?: components["schemas"]["BulkEntryError"] & unknown;
2633
2633
  };
2634
2634
  /** @description An error response. */
2635
- BulkAtomicRollbackOrMissingRequiredFieldOrValidationErrorRefusal: {
2635
+ BulkAtomicRollbackOrInvalidPropertiesOrMissingRequiredFieldOrValidationErrorRefusal: {
2636
2636
  /** @description What went wrong. */
2637
2637
  error: {
2638
2638
  /**
2639
2639
  * @description A machine-readable code for the error. Use it in your logic.
2640
2640
  * @enum {string}
2641
2641
  */
2642
- code: "bulk_atomic_rollback" | "missing_required_field" | "validation_error";
2642
+ code: "bulk_atomic_rollback" | "invalid_properties" | "missing_required_field" | "validation_error";
2643
2643
  /** @description A description of the error for a person to read. It can change, so don't match on it. */
2644
2644
  message: string;
2645
2645
  /** @description More about the error, such as the field it concerns. Each code defines its own details. */
@@ -2706,14 +2706,14 @@ interface components {
2706
2706
  result?: components["schemas"]["BulkActionResult"] & unknown;
2707
2707
  };
2708
2708
  /** @description An error response. */
2709
- BulkCapExceededOrBulkConfirmationRequiredOrMissingRequiredFieldOrValidationErrorRefusal: {
2709
+ BulkCapExceededOrBulkConfirmationRequiredOrInvalidPropertiesOrMissingRequiredFieldOrValidationErrorRefusal: {
2710
2710
  /** @description What went wrong. */
2711
2711
  error: {
2712
2712
  /**
2713
2713
  * @description A machine-readable code for the error. Use it in your logic.
2714
2714
  * @enum {string}
2715
2715
  */
2716
- code: "bulk_cap_exceeded" | "bulk_confirmation_required" | "missing_required_field" | "validation_error";
2716
+ code: "bulk_cap_exceeded" | "bulk_confirmation_required" | "invalid_properties" | "missing_required_field" | "validation_error";
2717
2717
  /** @description A description of the error for a person to read. It can change, so don't match on it. */
2718
2718
  message: string;
2719
2719
  /** @description More about the error, such as the field it concerns. Each code defines its own details. */
@@ -2808,6 +2808,23 @@ interface components {
2808
2808
  };
2809
2809
  };
2810
2810
  };
2811
+ /** @description An error response. */
2812
+ InvalidIdOrInvalidPropertiesOrMissingRequiredFieldOrValidationErrorRefusal: {
2813
+ /** @description What went wrong. */
2814
+ error: {
2815
+ /**
2816
+ * @description A machine-readable code for the error. Use it in your logic.
2817
+ * @enum {string}
2818
+ */
2819
+ code: "invalid_id" | "invalid_properties" | "missing_required_field" | "validation_error";
2820
+ /** @description A description of the error for a person to read. It can change, so don't match on it. */
2821
+ message: string;
2822
+ /** @description More about the error, such as the field it concerns. Each code defines its own details. */
2823
+ details?: {
2824
+ [key: string]: unknown;
2825
+ };
2826
+ };
2827
+ };
2811
2828
  /** @description One edge. */
2812
2829
  EdgeResponse: {
2813
2830
  edge: components["schemas"]["Edge"] & unknown;
@@ -3913,6 +3930,23 @@ interface components {
3913
3930
  /** @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
3931
  next_cursor: string | null;
3915
3932
  };
3933
+ /** @description An error response. */
3934
+ InvalidPropertiesOrMissingRequiredFieldOrUnknownTypeOrValidationErrorRefusal: {
3935
+ /** @description What went wrong. */
3936
+ error: {
3937
+ /**
3938
+ * @description A machine-readable code for the error. Use it in your logic.
3939
+ * @enum {string}
3940
+ */
3941
+ code: "invalid_properties" | "missing_required_field" | "unknown_type" | "validation_error";
3942
+ /** @description A description of the error for a person to read. It can change, so don't match on it. */
3943
+ message: string;
3944
+ /** @description More about the error, such as the field it concerns. Each code defines its own details. */
3945
+ details?: {
3946
+ [key: string]: unknown;
3947
+ };
3948
+ };
3949
+ };
3916
3950
  /** @description Which items the folder holds. */
3917
3951
  FolderSearch: {
3918
3952
  /** @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 +3964,7 @@ interface components {
3930
3964
  /** @description The type a new file becomes if its frontmatter names none. */
3931
3965
  type?: string;
3932
3966
  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. */
3967
+ /** @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
3968
  properties?: {
3935
3969
  [key: string]: unknown;
3936
3970
  };
@@ -3949,14 +3983,14 @@ interface components {
3949
3983
  fraction?: number;
3950
3984
  };
3951
3985
  /** @description An error response. */
3952
- InvalidIdOrInvalidTransitionOrMissingRequiredFieldOrUnknownTypeOrValidationErrorRefusal: {
3986
+ InvalidIdOrInvalidPropertiesOrInvalidTransitionOrMissingRequiredFieldOrUnknownTypeOrValidationErrorRefusal: {
3953
3987
  /** @description What went wrong. */
3954
3988
  error: {
3955
3989
  /**
3956
3990
  * @description A machine-readable code for the error. Use it in your logic.
3957
3991
  * @enum {string}
3958
3992
  */
3959
- code: "invalid_id" | "invalid_transition" | "missing_required_field" | "unknown_type" | "validation_error";
3993
+ code: "invalid_id" | "invalid_properties" | "invalid_transition" | "missing_required_field" | "unknown_type" | "validation_error";
3960
3994
  /** @description A description of the error for a person to read. It can change, so don't match on it. */
3961
3995
  message: string;
3962
3996
  /** @description More about the error, such as the field it concerns. Each code defines its own details. */
@@ -5228,7 +5262,7 @@ interface operations {
5228
5262
  "application/json": {
5229
5263
  /** @description The item's type identifier, such as `core.note`. */
5230
5264
  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`. */
5265
+ /** @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
5266
  properties?: {
5233
5267
  [key: string]: unknown;
5234
5268
  };
@@ -6073,7 +6107,7 @@ interface operations {
6073
6107
  requestBody: {
6074
6108
  content: {
6075
6109
  "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`. */
6110
+ /** @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
6111
  properties?: {
6078
6112
  [key: string]: unknown;
6079
6113
  };
@@ -8190,7 +8224,7 @@ interface operations {
8190
8224
  id?: string;
8191
8225
  /** @description The item's type identifier, such as `core.note`. */
8192
8226
  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`. */
8227
+ /** @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
8228
  properties?: {
8195
8229
  [key: string]: unknown;
8196
8230
  };
@@ -8245,9 +8279,10 @@ interface operations {
8245
8279
  };
8246
8280
  };
8247
8281
  /**
8248
- * @description - `validation_error`: the body is malformed, has a key this operation doesn't declare, or has more than 5,000 entries.
8282
+ * @description - `validation_error`: the body is malformed, has an undeclared key or has over 5,000 entries.
8249
8283
  * - `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.
8284
+ * - `invalid_properties`: an entry's `properties` hold a whole number a 64-bit float can't keep.
8285
+ * - `bulk_atomic_rollback`: an `atomic` entry was refused and nothing was written (`details.code`, `details.index`). The status is the refusal's own.
8251
8286
  */
8252
8287
  400: {
8253
8288
  headers: {
@@ -8260,7 +8295,7 @@ interface operations {
8260
8295
  [name: string]: unknown;
8261
8296
  };
8262
8297
  content: {
8263
- "application/json": components["schemas"]["BulkAtomicRollbackOrMissingRequiredFieldOrValidationErrorRefusal"];
8298
+ "application/json": components["schemas"]["BulkAtomicRollbackOrInvalidPropertiesOrMissingRequiredFieldOrValidationErrorRefusal"];
8264
8299
  };
8265
8300
  };
8266
8301
  /** @description `unauthorized`: the request has no credential, or its credential is not valid. */
@@ -8465,6 +8500,7 @@ interface operations {
8465
8500
  enable_fanout?: boolean;
8466
8501
  /** @enum {string} */
8467
8502
  action: "update_properties";
8503
+ /** @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
8504
  patch: {
8469
8505
  [key: string]: unknown;
8470
8506
  };
@@ -8512,8 +8548,9 @@ interface operations {
8512
8548
  };
8513
8549
  };
8514
8550
  /**
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.
8551
+ * @description - `validation_error`: the body is malformed or has an undeclared or empty field, or `update_tags` has no `add` or `remove`.
8552
+ * - `missing_required_field`: a needed field is missing.
8553
+ * - `invalid_properties`: `patch` holds a whole number a 64-bit float cannot keep.
8517
8554
  * - `bulk_confirmation_required`: a purge without `confirm: "PURGE"`.
8518
8555
  * - `bulk_cap_exceeded`: more items match than `max_items` allows.
8519
8556
  */
@@ -8529,7 +8566,7 @@ interface operations {
8529
8566
  [name: string]: unknown;
8530
8567
  };
8531
8568
  content: {
8532
- "application/json": components["schemas"]["BulkCapExceededOrBulkConfirmationRequiredOrMissingRequiredFieldOrValidationErrorRefusal"];
8569
+ "application/json": components["schemas"]["BulkCapExceededOrBulkConfirmationRequiredOrInvalidPropertiesOrMissingRequiredFieldOrValidationErrorRefusal"];
8533
8570
  };
8534
8571
  };
8535
8572
  /** @description `unauthorized`: the request has no credential, or its credential is not valid. */
@@ -9924,6 +9961,7 @@ interface operations {
9924
9961
  /**
9925
9962
  * @description - `validation_error`: the body is not a JSON object, or its JSON is longer than 102,400 characters.
9926
9963
  * - `invalid_id`: the ID is not a valid item ID.
9964
+ * - `invalid_properties`: the body holds a whole number a 64-bit float can't keep.
9927
9965
  */
9928
9966
  400: {
9929
9967
  headers: {
@@ -9937,7 +9975,7 @@ interface operations {
9937
9975
  [name: string]: unknown;
9938
9976
  };
9939
9977
  content: {
9940
- "application/json": components["schemas"]["InvalidIdOrMissingRequiredFieldOrValidationErrorRefusal"];
9978
+ "application/json": components["schemas"]["InvalidIdOrInvalidPropertiesOrMissingRequiredFieldOrValidationErrorRefusal"];
9941
9979
  };
9942
9980
  };
9943
9981
  /** @description `unauthorized`: the request has no credential, or its credential is not valid. */
@@ -10846,7 +10884,7 @@ interface operations {
10846
10884
  target_id: string;
10847
10885
  /** @description The identifier of the edge type, such as `parent-of`. */
10848
10886
  edge_type: string;
10849
- /** @description The edge's properties. Leave it out for none. */
10887
+ /** @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
10888
  properties?: {
10851
10889
  [key: string]: unknown;
10852
10890
  };
@@ -11480,7 +11518,7 @@ interface operations {
11480
11518
  requestBody: {
11481
11519
  content: {
11482
11520
  "application/json": {
11483
- /** @description Properties to merge over the edge's. Required unless an end moves. */
11521
+ /** @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
11522
  properties?: {
11485
11523
  [key: string]: unknown;
11486
11524
  };
@@ -11720,7 +11758,7 @@ interface operations {
11720
11758
  target_id: string;
11721
11759
  /** @description The identifier of the edge type, such as `parent-of`. */
11722
11760
  edge_type: string;
11723
- /** @description The edge's properties. On an existing edge they merge over its own. Leave it out for none. */
11761
+ /** @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
11762
  properties?: {
11725
11763
  [key: string]: unknown;
11726
11764
  };
@@ -11755,9 +11793,10 @@ interface operations {
11755
11793
  };
11756
11794
  };
11757
11795
  /**
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.
11796
+ * @description - `validation_error`: the body is malformed, has an undeclared key or has over 5,000 entries.
11797
+ * - `missing_required_field`: a required field is missing.
11798
+ * - `invalid_properties`: an entry's `properties` hold a whole number a 64-bit float can't keep.
11799
+ * - `bulk_atomic_rollback`: an `atomic` entry was refused and nothing was written (`details.code`, `details.index`). The status is the refusal's own.
11761
11800
  */
11762
11801
  400: {
11763
11802
  headers: {
@@ -11770,7 +11809,7 @@ interface operations {
11770
11809
  [name: string]: unknown;
11771
11810
  };
11772
11811
  content: {
11773
- "application/json": components["schemas"]["BulkAtomicRollbackOrMissingRequiredFieldOrValidationErrorRefusal"];
11812
+ "application/json": components["schemas"]["BulkAtomicRollbackOrInvalidPropertiesOrMissingRequiredFieldOrValidationErrorRefusal"];
11774
11813
  };
11775
11814
  };
11776
11815
  /** @description `unauthorized`: the request has no credential, or its credential is not valid. */
@@ -19038,9 +19077,10 @@ interface operations {
19038
19077
  };
19039
19078
  };
19040
19079
  /**
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`.
19080
+ * @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
19081
  * - `missing_required_field`: `title` is missing.
19043
- * - `unknown_type`: a setting names a type that isn't registered.
19082
+ * - `unknown_type`: a setting's type is unknown.
19083
+ * - `invalid_properties`: `defaults.properties` has a whole number a 64-bit float can't keep.
19044
19084
  */
19045
19085
  400: {
19046
19086
  headers: {
@@ -19054,7 +19094,7 @@ interface operations {
19054
19094
  [name: string]: unknown;
19055
19095
  };
19056
19096
  content: {
19057
- "application/json": components["schemas"]["MissingRequiredFieldOrUnknownTypeOrValidationErrorRefusal"];
19097
+ "application/json": components["schemas"]["InvalidPropertiesOrMissingRequiredFieldOrUnknownTypeOrValidationErrorRefusal"];
19058
19098
  };
19059
19099
  };
19060
19100
  /** @description `unauthorized`: the request has no credential, or its credential is not valid. */
@@ -19254,10 +19294,11 @@ interface operations {
19254
19294
  };
19255
19295
  };
19256
19296
  /**
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`.
19297
+ * @description - `validation_error`: a setting is malformed or undeclared (`details.errors[0].path` or `details.unknown_body_fields` names it).
19258
19298
  * - `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.
19299
+ * - `unknown_type`: a setting's type is unknown.
19300
+ * - `invalid_properties`: `defaults.properties` has a whole number a 64-bit float can't keep.
19301
+ * - `invalid_id`: the ID is invalid.
19261
19302
  * - `invalid_transition`: the folder is revoked.
19262
19303
  */
19263
19304
  400: {
@@ -19272,7 +19313,7 @@ interface operations {
19272
19313
  [name: string]: unknown;
19273
19314
  };
19274
19315
  content: {
19275
- "application/json": components["schemas"]["InvalidIdOrInvalidTransitionOrMissingRequiredFieldOrUnknownTypeOrValidationErrorRefusal"];
19316
+ "application/json": components["schemas"]["InvalidIdOrInvalidPropertiesOrInvalidTransitionOrMissingRequiredFieldOrUnknownTypeOrValidationErrorRefusal"];
19276
19317
  };
19277
19318
  };
19278
19319
  /** @description `unauthorized`: the request has no credential, or its credential is not valid. */
@@ -20737,10 +20778,12 @@ interface operations {
20737
20778
  permissions?: components["schemas"]["Permission"][];
20738
20779
  /** @description Replaces the key's enforcement levers whole. `null` clears them. */
20739
20780
  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`. */
20781
+ /** @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
20782
  expires_at?: string | null;
20742
20783
  /** @description Can't change. To give a key another source, create a new key and revoke this one. */
20743
20784
  source?: string;
20785
+ /** @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`. */
20786
+ narrow_only?: boolean;
20744
20787
  };
20745
20788
  };
20746
20789
  };
@@ -20792,7 +20835,7 @@ interface operations {
20792
20835
  "application/json": components["schemas"]["UnauthorizedRefusal"];
20793
20836
  };
20794
20837
  };
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. */
20838
+ /** @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
20839
  403: {
20797
20840
  headers: {
20798
20841
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
@@ -22418,7 +22461,7 @@ interface operations {
22418
22461
  "application/json": components["schemas"]["UnauthorizedRefusal"];
22419
22462
  };
22420
22463
  };
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. */
22464
+ /** @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
22465
  403: {
22423
22466
  headers: {
22424
22467
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@withmarfa/client",
3
- "version": "0.0.17",
3
+ "version": "0.0.18",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",