@withmarfa/client 0.0.7 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @withmarfa/client
2
2
 
3
- The TypeScript client for a Marfa instance, generated from the repository's `openapi.json`. Paths, parameters, bodies and answers are typed from the document: a path the document does not name, or a required parameter left out, does not compile. Ranges and formats the document states only in prose are the server's to refuse.
3
+ The TypeScript SDK for a Marfa instance, generated from the repository's `openapi.json`. Paths, parameters, bodies and answers are typed from the document: a path the document does not name, or a required parameter left out, does not compile. Ranges and formats the document states only in prose are the server's to refuse.
4
4
 
5
5
  ```ts
6
6
  import { createClient, pages } from "@withmarfa/client";
package/dist/index.d.ts CHANGED
@@ -899,7 +899,7 @@ interface paths {
899
899
  put?: never;
900
900
  /**
901
901
  * Register a connector
902
- * @description Registers your key as a connector, with a name and description, and returns it. Each key has one registration: registering again updates the name and description and returns the same `id`.
902
+ * @description Registers your key as a connector and returns it. Repeating registration updates its name and description and keeps its ID. A successor key inherits its own source's inbound endpoints and retained deliveries.
903
903
  */
904
904
  post: operations["registerConnector"];
905
905
  delete?: never;
@@ -1236,6 +1236,30 @@ interface paths {
1236
1236
  patch?: never;
1237
1237
  trace?: never;
1238
1238
  };
1239
+ "/folders/{id}/status": {
1240
+ parameters: {
1241
+ query?: never;
1242
+ header?: never;
1243
+ path?: never;
1244
+ cookie?: never;
1245
+ };
1246
+ /**
1247
+ * Get a folder status
1248
+ * @description Returns the latest folder-copy reports grouped by sign-in, with receipt ages and totals from sign-ins that still stand. Historical reports remain visible.
1249
+ */
1250
+ get: operations["getFolderStatus"];
1251
+ /**
1252
+ * Replace a folder status
1253
+ * @description Replaces your sign-in's report for one folder copy and returns the latest accepted sequence and receipt time. An equal or older sequence leaves the stored report unchanged.
1254
+ */
1255
+ put: operations["reportFolderStatus"];
1256
+ post?: never;
1257
+ delete?: never;
1258
+ options?: never;
1259
+ head?: never;
1260
+ patch?: never;
1261
+ trace?: never;
1262
+ };
1239
1263
  "/keys": {
1240
1264
  parameters: {
1241
1265
  query?: never;
@@ -2616,14 +2640,14 @@ interface components {
2616
2640
  edge: components["schemas"]["Edge"] & unknown;
2617
2641
  };
2618
2642
  /** @description An error response. */
2619
- EdgeConstraintViolationOrEdgeCycleOrInvalidIdOrMissingRequiredFieldOrValidationErrorRefusal: {
2643
+ EdgeConstraintViolationOrEdgeCycleOrInvalidIdOrInvalidPropertiesOrMissingRequiredFieldOrValidationErrorRefusal: {
2620
2644
  /** @description What went wrong. */
2621
2645
  error: {
2622
2646
  /**
2623
2647
  * @description A machine-readable code for the error. Use it in your logic.
2624
2648
  * @enum {string}
2625
2649
  */
2626
- code: "edge_constraint_violation" | "edge_cycle" | "invalid_id" | "missing_required_field" | "validation_error";
2650
+ code: "edge_constraint_violation" | "edge_cycle" | "invalid_id" | "invalid_properties" | "missing_required_field" | "validation_error";
2627
2651
  /** @description A description of the error for a person to read. It can change, so don't match on it. */
2628
2652
  message: string;
2629
2653
  /** @description More about the error, such as the field it concerns. Each code defines its own details. */
@@ -2710,7 +2734,7 @@ interface components {
2710
2734
  * @enum {string}
2711
2735
  */
2712
2736
  cascade_on_delete: "cascade" | "orphan" | "block";
2713
- /** @description The properties an edge of the type can carry, by name, for clients to read. Marfa doesn't check edges against it. */
2737
+ /** @description The properties an edge of the type can carry, by name. Marfa checks an edge's properties against it each time the edge is written, and accepts a property it doesn't list. */
2714
2738
  property_schema: {
2715
2739
  [key: string]: components["schemas"]["EdgePropertyDefinition"];
2716
2740
  };
@@ -2730,13 +2754,13 @@ interface components {
2730
2754
  type: string;
2731
2755
  /** @description What the property holds. */
2732
2756
  description?: string;
2733
- /** @description `true` if every edge of the type should have the property. */
2757
+ /** @description `true` if every edge of the type must have the property. */
2734
2758
  required?: boolean;
2735
2759
  /** @description The values an `enum` property takes. */
2736
2760
  enum_values?: string[];
2737
2761
  /** @description The type of each element of an `array` property. It can't be `thumbnail`. */
2738
2762
  items_type?: string;
2739
- /** @description A refinement of a `string` property, such as `bcp47`. It can't be `thumbnail`: an edge carries no thumbnail. */
2763
+ /** @description A refinement of a `string` property. `url`, `email`, `date` and `datetime` store it as that type. `bcp47` and `iso3166` only label it. It can't be `thumbnail`. */
2740
2764
  format?: string;
2741
2765
  };
2742
2766
  /** @description An error response. */
@@ -2812,7 +2836,7 @@ interface components {
2812
2836
  * @enum {string}
2813
2837
  */
2814
2838
  cascade_on_delete?: "cascade" | "orphan" | "block";
2815
- /** @description The properties an edge of the type can carry, by name, for clients to read. Marfa doesn't check edges against it. Leave it out for none. */
2839
+ /** @description The properties an edge of the type can carry, by name. Marfa checks an edge's properties against it each time the edge is written, and accepts a property it doesn't list. Leave it out for none. */
2816
2840
  property_schema?: {
2817
2841
  [key: string]: components["schemas"]["EdgePropertyDefinition"];
2818
2842
  };
@@ -3545,7 +3569,7 @@ interface components {
3545
3569
  InboundEndpoint: {
3546
3570
  /** @description Unique identifier for the webhook endpoint. */
3547
3571
  id: string;
3548
- /** @description The ID of the connector the endpoint belongs to. */
3572
+ /** @description The ID of the current connector registration for the endpoint's source. */
3549
3573
  connector_id: string;
3550
3574
  /** @description A name for people to read; `null` if none was given. */
3551
3575
  label: string | null;
@@ -3744,6 +3768,135 @@ interface components {
3744
3768
  };
3745
3769
  };
3746
3770
  };
3771
+ /** @description The latest accepted report's sequence and receipt time. */
3772
+ FolderStatusAck: {
3773
+ /** @description `true` if this report replaced the stored report; false for an equal or older sequence. */
3774
+ accepted: boolean;
3775
+ /** @description The latest stored sequence for this copy and sign-in; a behind client resnapshots and sends a higher sequence. */
3776
+ sequence: number;
3777
+ /**
3778
+ * @description When the latest report was first accepted, in UTC; retries do not refresh it.
3779
+ * @example 2026-10-03T09:30:00.000Z
3780
+ */
3781
+ received_at: string;
3782
+ };
3783
+ /** @description A folder copy's last observed sync health, containing no file details. */
3784
+ FolderStatusReport: {
3785
+ /**
3786
+ * @description The opaque ID of this local folder copy; it reveals no path or machine name.
3787
+ * @example 01920000-0000-7000-8000-000000000000
3788
+ */
3789
+ folder_store_id: string;
3790
+ /** @description The increasing sequence for this copy under this sign-in; a retry keeps its sequence. */
3791
+ sequence: number;
3792
+ /**
3793
+ * @description When this copy last finished a fully successful sync, as reported by the client, in UTC; null if none has completed.
3794
+ * @example 2026-10-03T09:30:00.000Z
3795
+ */
3796
+ last_success_at: string | null;
3797
+ /** @description The distinct local files last observed waiting to upload. */
3798
+ pending_uploads: number;
3799
+ /** @description The distinct items whose files the last completed pull could not write; retained when a later pull fails. */
3800
+ pending_downloads: number;
3801
+ /** @description The file removals waiting for confirmation on this copy. */
3802
+ paused_removals: number;
3803
+ /** @description `true` if this copy's first sync is waiting for confirmation. */
3804
+ first_sync_waiting: boolean;
3805
+ /** @description The current problem counts, each code once; an empty list means none were observed. */
3806
+ problems: components["schemas"]["FolderStatusProblem"][];
3807
+ };
3808
+ /** @description A safe problem code and its count. */
3809
+ FolderStatusProblem: {
3810
+ /**
3811
+ * @description conflict: unresolved conflict; refused: current refused write; credential_refused: rejected credential; unreadable: unreadable entry; held_file: held file; unavailable: failed sync; root_gone: unavailable root; settings_invalid: invalid settings.
3812
+ * @enum {string}
3813
+ */
3814
+ code: "conflict" | "refused" | "credential_refused" | "unreadable" | "held_file" | "unavailable" | "root_gone" | "settings_invalid";
3815
+ /** @description The number of current observations with this problem. */
3816
+ count: number;
3817
+ };
3818
+ /** @description A folder's sync reports grouped by existing sign-in. */
3819
+ FolderStatus: {
3820
+ /**
3821
+ * @description The ID of the folder.
3822
+ * @example 01920000-0000-7000-8000-000000000002
3823
+ */
3824
+ folder_id: string;
3825
+ /** @description Current and historical reports, grouped by sign-in; age is no claim of being online. */
3826
+ sign_ins: components["schemas"]["FolderStatusGroup"][];
3827
+ /** @description Totals from current sign-ins alone; copies may contain overlapping files. */
3828
+ totals: {
3829
+ /** @description `true` if any total exceeded the safe integer bound; capped totals then mean at least that bound. */
3830
+ saturated: boolean;
3831
+ /** @description The sum of pending upload files across current sign-ins' copies. */
3832
+ pending_uploads: number;
3833
+ /** @description The sum of observed pending download files across current sign-ins' copies. */
3834
+ pending_downloads: number;
3835
+ /** @description The sum of paused file removals across current sign-ins' copies. */
3836
+ paused_removals: number;
3837
+ /** @description The number of current sign-ins' copies waiting on their first sync. */
3838
+ first_sync_waiting: number;
3839
+ /** @description The summed current problem counts across current sign-ins' copies. */
3840
+ problems: components["schemas"]["FolderStatusProblem"][];
3841
+ };
3842
+ };
3843
+ /** @description The folder-copy reports grouped under one sign-in. */
3844
+ FolderStatusGroup: {
3845
+ /** @description The sign-in that owns these reports. */
3846
+ sign_in: {
3847
+ /**
3848
+ * @description browser: owner browser session; app: signed-in app grant; key: API key.
3849
+ * @enum {string}
3850
+ */
3851
+ kind: "browser" | "app" | "key";
3852
+ /**
3853
+ * @description The ID the sign-in has in `GET /owner/sign-ins`, `local` for the local command, or an app's client ID if its sign-in was already gone. It stays the same after the sign-in ends.
3854
+ * @example Q2xYvR8mKp4TnW6aBc0dEf1gHi3jKl5M
3855
+ */
3856
+ id: string;
3857
+ /**
3858
+ * @description The sign-in's name when it wrote the version, as `GET /owner/sign-ins` showed it. At most 200 characters.
3859
+ * @example Safari on macOS
3860
+ */
3861
+ name: string;
3862
+ };
3863
+ /** @description `true` while the sign-in still stands; false for retained historical reports. This is no claim of current folder access, freshness, or being online. */
3864
+ current: boolean;
3865
+ /** @description The latest report for each copy under this sign-in. */
3866
+ copies: components["schemas"]["FolderStatusCopy"][];
3867
+ };
3868
+ /** @description One copy's latest report and its server-measured age. */
3869
+ FolderStatusCopy: {
3870
+ /**
3871
+ * @description The opaque ID of this local folder copy; it reveals no path or machine name.
3872
+ * @example 01920000-0000-7000-8000-000000000000
3873
+ */
3874
+ folder_store_id: string;
3875
+ /** @description The increasing sequence for this copy under this sign-in; a retry keeps its sequence. */
3876
+ sequence: number;
3877
+ /**
3878
+ * @description When this copy last finished a fully successful sync, as reported by the client, in UTC; null if none has completed.
3879
+ * @example 2026-10-03T09:30:00.000Z
3880
+ */
3881
+ last_success_at: string | null;
3882
+ /** @description The distinct local files last observed waiting to upload. */
3883
+ pending_uploads: number;
3884
+ /** @description The distinct items whose files the last completed pull could not write; retained when a later pull fails. */
3885
+ pending_downloads: number;
3886
+ /** @description The file removals waiting for confirmation on this copy. */
3887
+ paused_removals: number;
3888
+ /** @description `true` if this copy's first sync is waiting for confirmation. */
3889
+ first_sync_waiting: boolean;
3890
+ /** @description The current problem counts, each code once; an empty list means none were observed. */
3891
+ problems: components["schemas"]["FolderStatusProblem"][];
3892
+ /**
3893
+ * @description When the server accepted this report, in UTC.
3894
+ * @example 2026-10-03T09:30:00.000Z
3895
+ */
3896
+ received_at: string;
3897
+ /** @description The whole seconds since receipt, measured by the server; it does not show whether the copy is online. */
3898
+ age_seconds: number;
3899
+ };
3747
3900
  /** @description A new API key, with its plaintext `key`. */
3748
3901
  KeyResponse: {
3749
3902
  /** @description Unique identifier for the key. */
@@ -4712,7 +4865,7 @@ interface operations {
4712
4865
  capture_longitude?: number;
4713
4866
  /** @description Tags to put on the item: at most 100, each up to 128 characters. */
4714
4867
  tags?: string[];
4715
- /** @description Edges to create with the item, as edge type to a list of target item IDs. The new item is the source. Marfa creates the item and all its edges, or none. */
4868
+ /** @description Edges to create with the item, as edge type to a list of target item IDs. The new item is the source. Marfa creates the item and all its edges, or none. An edge made this way carries no properties, so an edge type that requires one refuses the write. */
4716
4869
  edges?: {
4717
4870
  [key: string]: string[];
4718
4871
  };
@@ -4756,11 +4909,11 @@ interface operations {
4756
4909
  };
4757
4910
  };
4758
4911
  /**
4759
- * @description - `validation_error`: a field is invalid, such as a malformed `occurred_at` or a `state` the type can't start in.
4912
+ * @description - `validation_error`: a field is invalid.
4760
4913
  * - `missing_required_field`: `type` is missing.
4761
4914
  * - `unknown_type`: `type` isn't registered.
4762
- * - `invalid_id`: `id` or an edge target is not a valid ID.
4763
- * - `invalid_properties`: the properties don't fit the type.
4915
+ * - `invalid_id`: `id` or an edge target isn't a valid ID.
4916
+ * - `invalid_properties`: the properties don't fit the type, or an inline edge lacks a property its type requires.
4764
4917
  * - `edge_constraint_violation`, `edge_cycle`: an edge breaks its type's rules.
4765
4918
  */
4766
4919
  400: {
@@ -5549,7 +5702,7 @@ interface operations {
5549
5702
  occurred_at?: string;
5550
5703
  /** @description The item's new `source_id`. Marfa moves its natural key under the item's own `source`, which never changes. */
5551
5704
  source_id?: string;
5552
- /** @description Edge types to replace, each mapped to the item IDs it should now point to. An empty list removes every edge of that type. Types you don't name are untouched. */
5705
+ /** @description Edge types to replace, each mapped to the item IDs it should now point to. An empty list removes every edge of that type. Types you don't name are untouched. An edge made this way carries no properties, so an edge type that requires one refuses the write. */
5553
5706
  edges?: {
5554
5707
  [key: string]: string[];
5555
5708
  };
@@ -5583,9 +5736,9 @@ interface operations {
5583
5736
  };
5584
5737
  /**
5585
5738
  * @description - `missing_required_field`: `version` is missing.
5586
- * - `validation_error`: the body is malformed, has an undeclared field, or changes nothing.
5587
- * - `invalid_id`: the ID or an edge target is not a valid ID.
5588
- * - `invalid_properties`: the resulting properties don't fit the type.
5739
+ * - `validation_error`: the body is malformed or changes nothing.
5740
+ * - `invalid_id`: the ID or a target isn't valid.
5741
+ * - `invalid_properties`: the properties don't fit the type, or an inline edge lacks a property its type requires.
5589
5742
  * - `unknown_type`: `type` isn't registered.
5590
5743
  * - `edge_constraint_violation`, `edge_cycle`: an edge breaks its type's rules.
5591
5744
  */
@@ -7460,7 +7613,7 @@ interface operations {
7460
7613
  version?: number;
7461
7614
  /** @description Tags to put on the item: at most 100, each up to 128 characters. */
7462
7615
  tags?: string[];
7463
- /** @description Edge types to set, each mapped to the target item IDs the item should now point to. Types you don't name are untouched. */
7616
+ /** @description Edge types to set, each mapped to the target item IDs the item should now point to. Types you don't name are untouched. An edge made this way carries no properties, so an edge type that requires one refuses the write. */
7464
7617
  edges?: {
7465
7618
  [key: string]: string[];
7466
7619
  };
@@ -8241,7 +8394,10 @@ interface operations {
8241
8394
  bulkGetItems: {
8242
8395
  parameters: {
8243
8396
  query?: never;
8244
- header?: never;
8397
+ header?: {
8398
+ /** @description A read-view certificate from a copy stream, for a working copy. Marfa reads the current data and checks the view in one snapshot, and returns `409 read_view_changed` if the view has changed. Leave it out for an ordinary read. */
8399
+ "X-Marfa-Read-View"?: string;
8400
+ };
8245
8401
  path?: never;
8246
8402
  cookie?: never;
8247
8403
  };
@@ -8256,7 +8412,7 @@ interface operations {
8256
8412
  };
8257
8413
  };
8258
8414
  responses: {
8259
- /** @description Returns the items you can read, and `metadata` if you asked for it. */
8415
+ /** @description Returns the items you can read, `metadata` if you asked for it, and `listed` if you sent `X-Marfa-Read-View`. */
8260
8416
  200: {
8261
8417
  headers: {
8262
8418
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
@@ -8264,6 +8420,7 @@ interface operations {
8264
8420
  "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
8265
8421
  "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
8266
8422
  "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
8423
+ "X-Marfa-Read-View": components["headers"]["X-Marfa-Read-View"];
8267
8424
  [name: string]: unknown;
8268
8425
  };
8269
8426
  content: {
@@ -8272,6 +8429,8 @@ interface operations {
8272
8429
  items: components["schemas"]["Item"][];
8273
8430
  /** @description The metadata of each item returned, in the same order. Present only when `include` has `metadata`. */
8274
8431
  metadata?: components["schemas"]["Metadata"][];
8432
+ /** @description For each item returned, in the same order: `true` if listings show you the item, `false` if `source_filter` leaves it out of them. Present only when you send `X-Marfa-Read-View`. */
8433
+ listed?: boolean[];
8275
8434
  };
8276
8435
  };
8277
8436
  };
@@ -8318,12 +8477,28 @@ interface operations {
8318
8477
  "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
8319
8478
  "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
8320
8479
  "X-Error-Code": components["headers"]["X-Error-Code"];
8480
+ "X-Marfa-Read-View": components["headers"]["X-Marfa-Read-View"];
8321
8481
  [name: string]: unknown;
8322
8482
  };
8323
8483
  content: {
8324
8484
  "application/json": components["schemas"]["TypeNotPermittedRefusal"];
8325
8485
  };
8326
8486
  };
8487
+ /** @description `read_view_changed`: the read view in `X-Marfa-Read-View` has changed. Rebuild the working copy. */
8488
+ 409: {
8489
+ headers: {
8490
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
8491
+ "X-Request-ID": components["headers"]["X-Request-ID"];
8492
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
8493
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
8494
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
8495
+ "X-Error-Code": components["headers"]["X-Error-Code"];
8496
+ [name: string]: unknown;
8497
+ };
8498
+ content: {
8499
+ "application/json": components["schemas"]["ReadViewChangedRefusal"];
8500
+ };
8501
+ };
8327
8502
  /** @description `request_too_large`: the request body is larger than this instance accepts. */
8328
8503
  413: {
8329
8504
  headers: {
@@ -9962,9 +10137,8 @@ interface operations {
9962
10137
  /**
9963
10138
  * @description - `missing_required_field`: `source_id`, `target_id` or `edge_type` is missing.
9964
10139
  * - `invalid_id`: `source_id`, `target_id` or `id` isn't a valid ID.
9965
- * - `validation_error`: a field is invalid, such as an `in-folder` edge's `path`.
9966
- * - `edge_constraint_violation`: the edge exists (`details.constraint` is `duplicate`) or breaks a rule of its edge type.
9967
- * - `edge_cycle`: the edge would close a cycle.
10140
+ * - `validation_error`, `invalid_properties`: a field is invalid, or a property breaks the edge type's schema.
10141
+ * - `edge_constraint_violation`, `edge_cycle`: the edge exists (`details.constraint` is `duplicate`), breaks its type's rules or closes a cycle.
9968
10142
  */
9969
10143
  400: {
9970
10144
  headers: {
@@ -9978,7 +10152,7 @@ interface operations {
9978
10152
  [name: string]: unknown;
9979
10153
  };
9980
10154
  content: {
9981
- "application/json": components["schemas"]["EdgeConstraintViolationOrEdgeCycleOrInvalidIdOrMissingRequiredFieldOrValidationErrorRefusal"];
10155
+ "application/json": components["schemas"]["EdgeConstraintViolationOrEdgeCycleOrInvalidIdOrInvalidPropertiesOrMissingRequiredFieldOrValidationErrorRefusal"];
9982
10156
  };
9983
10157
  };
9984
10158
  /** @description `unauthorized`: the request has no credential, or its credential is not valid. */
@@ -10573,9 +10747,9 @@ interface operations {
10573
10747
  };
10574
10748
  /**
10575
10749
  * @description - `missing_required_field`: `version` is missing, or `properties` is missing and no end moves.
10576
- * - `validation_error`: the body moves both ends, the edge type can't move an end this way, or a property is invalid.
10750
+ * - `validation_error`, `invalid_properties`: the body moves both ends, the edge type can't move that end, or a property is invalid or breaks its schema.
10577
10751
  * - `invalid_id`: `source_id` or `target_id` isn't a valid ID.
10578
- * - `edge_constraint_violation`, `edge_cycle`: the moved edge would break its edge type's rules.
10752
+ * - `edge_constraint_violation`, `edge_cycle`: the moved edge breaks its edge type's rules.
10579
10753
  */
10580
10754
  400: {
10581
10755
  headers: {
@@ -10589,7 +10763,7 @@ interface operations {
10589
10763
  [name: string]: unknown;
10590
10764
  };
10591
10765
  content: {
10592
- "application/json": components["schemas"]["EdgeConstraintViolationOrEdgeCycleOrInvalidIdOrMissingRequiredFieldOrValidationErrorRefusal"];
10766
+ "application/json": components["schemas"]["EdgeConstraintViolationOrEdgeCycleOrInvalidIdOrInvalidPropertiesOrMissingRequiredFieldOrValidationErrorRefusal"];
10593
10767
  };
10594
10768
  };
10595
10769
  /** @description `unauthorized`: the request has no credential, or its credential is not valid. */
@@ -18427,6 +18601,374 @@ interface operations {
18427
18601
  };
18428
18602
  };
18429
18603
  };
18604
+ getFolderStatus: {
18605
+ parameters: {
18606
+ query?: never;
18607
+ header?: never;
18608
+ path: {
18609
+ /** @description The ID of the folder. */
18610
+ id: string;
18611
+ };
18612
+ cookie?: never;
18613
+ };
18614
+ requestBody?: never;
18615
+ responses: {
18616
+ /** @description Returns current and historical reports and the current totals. */
18617
+ 200: {
18618
+ headers: {
18619
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
18620
+ "X-Request-ID": components["headers"]["X-Request-ID"];
18621
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
18622
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
18623
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
18624
+ [name: string]: unknown;
18625
+ };
18626
+ content: {
18627
+ /**
18628
+ * @example {
18629
+ * "folder_id": "01920000-0000-7000-8000-000000000002",
18630
+ * "sign_ins": [
18631
+ * {
18632
+ * "sign_in": {
18633
+ * "kind": "key",
18634
+ * "id": "01920000-0000-7000-8000-000000000001",
18635
+ * "name": "Folder sync"
18636
+ * },
18637
+ * "current": true,
18638
+ * "copies": [
18639
+ * {
18640
+ * "folder_store_id": "01920000-0000-7000-8000-000000000000",
18641
+ * "sequence": 1,
18642
+ * "last_success_at": null,
18643
+ * "pending_uploads": 2,
18644
+ * "pending_downloads": 0,
18645
+ * "paused_removals": 0,
18646
+ * "first_sync_waiting": false,
18647
+ * "problems": [],
18648
+ * "received_at": "2026-10-03T09:30:00.000Z",
18649
+ * "age_seconds": 60
18650
+ * }
18651
+ * ]
18652
+ * }
18653
+ * ],
18654
+ * "totals": {
18655
+ * "saturated": false,
18656
+ * "pending_uploads": 2,
18657
+ * "pending_downloads": 0,
18658
+ * "paused_removals": 0,
18659
+ * "first_sync_waiting": 0,
18660
+ * "problems": []
18661
+ * }
18662
+ * }
18663
+ */
18664
+ "application/json": components["schemas"]["FolderStatus"];
18665
+ };
18666
+ };
18667
+ /**
18668
+ * @description - `invalid_id`: the folder ID is malformed.
18669
+ * - `validation_error`: the query names an undeclared field, or the request asks for an unsupported conditional copy read.
18670
+ */
18671
+ 400: {
18672
+ headers: {
18673
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
18674
+ "X-Request-ID": components["headers"]["X-Request-ID"];
18675
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
18676
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
18677
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
18678
+ "X-Error-Code": components["headers"]["X-Error-Code"];
18679
+ [name: string]: unknown;
18680
+ };
18681
+ content: {
18682
+ "application/json": components["schemas"]["InvalidIdOrValidationErrorRefusal"];
18683
+ };
18684
+ };
18685
+ /** @description `unauthorized`: the request has no credential, or its credential is not valid. */
18686
+ 401: {
18687
+ headers: {
18688
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
18689
+ "X-Request-ID": components["headers"]["X-Request-ID"];
18690
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
18691
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
18692
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
18693
+ "X-Error-Code": components["headers"]["X-Error-Code"];
18694
+ [name: string]: unknown;
18695
+ };
18696
+ content: {
18697
+ "application/json": components["schemas"]["UnauthorizedRefusal"];
18698
+ };
18699
+ };
18700
+ /** @description - `type_not_permitted`: your credential reads no type. */
18701
+ 403: {
18702
+ headers: {
18703
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
18704
+ "X-Request-ID": components["headers"]["X-Request-ID"];
18705
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
18706
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
18707
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
18708
+ "X-Error-Code": components["headers"]["X-Error-Code"];
18709
+ [name: string]: unknown;
18710
+ };
18711
+ content: {
18712
+ "application/json": components["schemas"]["TypeNotPermittedRefusal"];
18713
+ };
18714
+ };
18715
+ /** @description - `item_not_found`: the folder does not exist or you cannot read it. */
18716
+ 404: {
18717
+ headers: {
18718
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
18719
+ "X-Request-ID": components["headers"]["X-Request-ID"];
18720
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
18721
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
18722
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
18723
+ "X-Error-Code": components["headers"]["X-Error-Code"];
18724
+ [name: string]: unknown;
18725
+ };
18726
+ content: {
18727
+ "application/json": components["schemas"]["ItemNotFoundRefusal"];
18728
+ };
18729
+ };
18730
+ /** @description `rate_limited`: you sent too many requests. Wait for the number of seconds in `Retry-After`, then try again. */
18731
+ 429: {
18732
+ headers: {
18733
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
18734
+ "X-Request-ID": components["headers"]["X-Request-ID"];
18735
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
18736
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
18737
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
18738
+ "X-Error-Code": components["headers"]["X-Error-Code"];
18739
+ "Retry-After": components["headers"]["Retry-After"];
18740
+ [name: string]: unknown;
18741
+ };
18742
+ content: {
18743
+ "application/json": components["schemas"]["RateLimitedRefusal"];
18744
+ };
18745
+ };
18746
+ /** @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. */
18747
+ 500: {
18748
+ headers: {
18749
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
18750
+ "X-Request-ID": components["headers"]["X-Request-ID"];
18751
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
18752
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
18753
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
18754
+ "X-Error-Code": components["headers"]["X-Error-Code"];
18755
+ [name: string]: unknown;
18756
+ };
18757
+ content: {
18758
+ "application/json": components["schemas"]["InternalErrorRefusal"];
18759
+ };
18760
+ };
18761
+ /** @description `write_contention`: the database was busy, and Marfa couldn't complete the request in time. Nothing changed. Try the request again. */
18762
+ 503: {
18763
+ headers: {
18764
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
18765
+ "X-Request-ID": components["headers"]["X-Request-ID"];
18766
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
18767
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
18768
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
18769
+ "X-Error-Code": components["headers"]["X-Error-Code"];
18770
+ [name: string]: unknown;
18771
+ };
18772
+ content: {
18773
+ "application/json": components["schemas"]["WriteContentionRefusal"];
18774
+ };
18775
+ };
18776
+ /** @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. */
18777
+ 507: {
18778
+ headers: {
18779
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
18780
+ "X-Request-ID": components["headers"]["X-Request-ID"];
18781
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
18782
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
18783
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
18784
+ "X-Error-Code": components["headers"]["X-Error-Code"];
18785
+ [name: string]: unknown;
18786
+ };
18787
+ content: {
18788
+ "application/json": components["schemas"]["InsufficientStorageRefusal"];
18789
+ };
18790
+ };
18791
+ };
18792
+ };
18793
+ reportFolderStatus: {
18794
+ parameters: {
18795
+ query?: never;
18796
+ header?: never;
18797
+ path: {
18798
+ /** @description The ID of the folder. */
18799
+ id: string;
18800
+ };
18801
+ cookie?: never;
18802
+ };
18803
+ requestBody: {
18804
+ content: {
18805
+ "application/json": components["schemas"]["FolderStatusReport"];
18806
+ };
18807
+ };
18808
+ responses: {
18809
+ /** @description Returns the latest accepted sequence and receipt time for your copy. */
18810
+ 200: {
18811
+ headers: {
18812
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
18813
+ "X-Request-ID": components["headers"]["X-Request-ID"];
18814
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
18815
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
18816
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
18817
+ [name: string]: unknown;
18818
+ };
18819
+ content: {
18820
+ /**
18821
+ * @example {
18822
+ * "accepted": true,
18823
+ * "sequence": 1,
18824
+ * "received_at": "2026-10-03T09:30:00.000Z"
18825
+ * }
18826
+ */
18827
+ "application/json": components["schemas"]["FolderStatusAck"];
18828
+ };
18829
+ };
18830
+ /**
18831
+ * @description - `invalid_id`: the folder ID is malformed.
18832
+ * - `validation_error`: a field, count, time, code, or undeclared field is invalid.
18833
+ * - `missing_required_field`: a required report field is missing.
18834
+ */
18835
+ 400: {
18836
+ headers: {
18837
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
18838
+ "X-Request-ID": components["headers"]["X-Request-ID"];
18839
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
18840
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
18841
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
18842
+ "X-Error-Code": components["headers"]["X-Error-Code"];
18843
+ [name: string]: unknown;
18844
+ };
18845
+ content: {
18846
+ "application/json": components["schemas"]["InvalidIdOrMissingRequiredFieldOrValidationErrorRefusal"];
18847
+ };
18848
+ };
18849
+ /** @description `unauthorized`: the request has no credential, or its credential is not valid. */
18850
+ 401: {
18851
+ headers: {
18852
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
18853
+ "X-Request-ID": components["headers"]["X-Request-ID"];
18854
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
18855
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
18856
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
18857
+ "X-Error-Code": components["headers"]["X-Error-Code"];
18858
+ [name: string]: unknown;
18859
+ };
18860
+ content: {
18861
+ "application/json": components["schemas"]["UnauthorizedRefusal"];
18862
+ };
18863
+ };
18864
+ /**
18865
+ * @description - `type_not_permitted`: your credential reads no type.
18866
+ * - `forbidden`: a local command has no sign-in to report under.
18867
+ */
18868
+ 403: {
18869
+ headers: {
18870
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
18871
+ "X-Request-ID": components["headers"]["X-Request-ID"];
18872
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
18873
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
18874
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
18875
+ "X-Error-Code": components["headers"]["X-Error-Code"];
18876
+ [name: string]: unknown;
18877
+ };
18878
+ content: {
18879
+ "application/json": components["schemas"]["ForbiddenOrTypeNotPermittedRefusal"];
18880
+ };
18881
+ };
18882
+ /** @description - `item_not_found`: the folder does not exist or you cannot read it. */
18883
+ 404: {
18884
+ headers: {
18885
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
18886
+ "X-Request-ID": components["headers"]["X-Request-ID"];
18887
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
18888
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
18889
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
18890
+ "X-Error-Code": components["headers"]["X-Error-Code"];
18891
+ [name: string]: unknown;
18892
+ };
18893
+ content: {
18894
+ "application/json": components["schemas"]["ItemNotFoundRefusal"];
18895
+ };
18896
+ };
18897
+ /** @description `request_too_large`: the request body is larger than this instance accepts. */
18898
+ 413: {
18899
+ headers: {
18900
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
18901
+ "X-Request-ID": components["headers"]["X-Request-ID"];
18902
+ "X-Error-Code": components["headers"]["X-Error-Code"];
18903
+ [name: string]: unknown;
18904
+ };
18905
+ content: {
18906
+ "application/json": components["schemas"]["RequestTooLargeRefusal"];
18907
+ };
18908
+ };
18909
+ /** @description `rate_limited`: you sent too many requests. Wait for the number of seconds in `Retry-After`, then try again. */
18910
+ 429: {
18911
+ headers: {
18912
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
18913
+ "X-Request-ID": components["headers"]["X-Request-ID"];
18914
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
18915
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
18916
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
18917
+ "X-Error-Code": components["headers"]["X-Error-Code"];
18918
+ "Retry-After": components["headers"]["Retry-After"];
18919
+ [name: string]: unknown;
18920
+ };
18921
+ content: {
18922
+ "application/json": components["schemas"]["RateLimitedRefusal"];
18923
+ };
18924
+ };
18925
+ /** @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. */
18926
+ 500: {
18927
+ headers: {
18928
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
18929
+ "X-Request-ID": components["headers"]["X-Request-ID"];
18930
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
18931
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
18932
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
18933
+ "X-Error-Code": components["headers"]["X-Error-Code"];
18934
+ [name: string]: unknown;
18935
+ };
18936
+ content: {
18937
+ "application/json": components["schemas"]["InternalErrorRefusal"];
18938
+ };
18939
+ };
18940
+ /** @description `write_contention`: the database was busy, and Marfa couldn't complete the request in time. Nothing changed. Try the request again. */
18941
+ 503: {
18942
+ headers: {
18943
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
18944
+ "X-Request-ID": components["headers"]["X-Request-ID"];
18945
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
18946
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
18947
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
18948
+ "X-Error-Code": components["headers"]["X-Error-Code"];
18949
+ [name: string]: unknown;
18950
+ };
18951
+ content: {
18952
+ "application/json": components["schemas"]["WriteContentionRefusal"];
18953
+ };
18954
+ };
18955
+ /** @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. */
18956
+ 507: {
18957
+ headers: {
18958
+ "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
18959
+ "X-Request-ID": components["headers"]["X-Request-ID"];
18960
+ "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
18961
+ "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
18962
+ "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
18963
+ "X-Error-Code": components["headers"]["X-Error-Code"];
18964
+ [name: string]: unknown;
18965
+ };
18966
+ content: {
18967
+ "application/json": components["schemas"]["InsufficientStorageRefusal"];
18968
+ };
18969
+ };
18970
+ };
18971
+ };
18430
18972
  listKeys: {
18431
18973
  parameters: {
18432
18974
  query?: never;
@@ -19584,7 +20126,7 @@ interface operations {
19584
20126
  };
19585
20127
  };
19586
20128
  responses: {
19587
- /** @description Returns the counts. Items and edges keep their IDs, versions and dates, and items keep their tags, extensions and history. Marfa leaves an existing item as it is when an archived one has its ID, natural key or link. An archive holds no keys, webhooks, configuration or tombstones. */
20129
+ /** @description Returns the counts. Items and edges keep their IDs, versions and dates, and items keep their tags, extensions and history. Marfa restores an edge whether or not its properties fit its edge type's `property_schema`. Marfa leaves an existing item as it is when an archived one has its ID, natural key or link. An archive holds no keys, webhooks, configuration or tombstones. */
19588
20130
  200: {
19589
20131
  headers: {
19590
20132
  "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.7",
3
+ "version": "0.0.8",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",