@withmarfa/client 0.0.72 → 0.0.74
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/dist/index.d.ts +33 -19
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ interface paths {
|
|
|
23
23
|
put?: never;
|
|
24
24
|
/**
|
|
25
25
|
* Create an item
|
|
26
|
-
* @description Creates an item. If `source_id` matches an existing item under the same source, updates that item instead.
|
|
26
|
+
* @description Creates an item. If `source_id` matches an existing item under the same source, updates that item instead. A repeated `id`, or an update that leaves the item as it is, returns the stored item with `acknowledged: true` and writes nothing.
|
|
27
27
|
*/
|
|
28
28
|
post: operations["createItem"];
|
|
29
29
|
delete?: never;
|
|
@@ -55,7 +55,7 @@ interface paths {
|
|
|
55
55
|
head?: never;
|
|
56
56
|
/**
|
|
57
57
|
* Update an item
|
|
58
|
-
* @description Updates an item's properties, tier, own time, natural key or edges. Send the `version` you read; stale writes can merge unless `version_match` is `exact`. To change its type, send `type` with `retype: true`.
|
|
58
|
+
* @description Updates an item's properties, tier, own time, natural key or edges. Send the `version` you read; stale writes can merge unless `version_match` is `exact`. A no-change update writes nothing. To change its type, send `type` with `retype: true`.
|
|
59
59
|
*/
|
|
60
60
|
patch: operations["updateItem"];
|
|
61
61
|
trace?: never;
|
|
@@ -2945,7 +2945,7 @@ interface components {
|
|
|
2945
2945
|
message?: string;
|
|
2946
2946
|
};
|
|
2947
2947
|
/**
|
|
2948
|
-
* @description A field: an own field (`title`, `created_at`, `updated_at`, `occurred_at`, `type`, `state`, `tier`, `tags`) or `properties.<name>`.
|
|
2948
|
+
* @description A field: an own field (`title`, `created_at`, `updated_at`, `occurred_at`, `last_activity_at`, `type`, `state`, `tier`, `tags`) or `properties.<name>`.
|
|
2949
2949
|
* @example properties.status
|
|
2950
2950
|
*/
|
|
2951
2951
|
ViewField: string;
|
|
@@ -2966,7 +2966,7 @@ interface components {
|
|
|
2966
2966
|
/** @description How a view groups its items. */
|
|
2967
2967
|
ViewGroup: {
|
|
2968
2968
|
/**
|
|
2969
|
-
* @description The field to group by: a field, or `edge[<type>]` or `backref[<type>]` for the item an edge of that type joins.
|
|
2969
|
+
* @description The field to group by: a field other than `last_activity_at`, which only a sort takes, or `edge[<type>]` or `backref[<type>]` for the item an edge of that type joins.
|
|
2970
2970
|
* @example properties.status
|
|
2971
2971
|
*/
|
|
2972
2972
|
by: string;
|
|
@@ -3170,6 +3170,20 @@ interface components {
|
|
|
3170
3170
|
}[] | null;
|
|
3171
3171
|
/** @description The keys of stored settings that no longer read, which Marfa runs on their defaults. */
|
|
3172
3172
|
unreadable_settings: string[];
|
|
3173
|
+
/** @description Why the jobs that delete old records do nothing, or `null` if they run. */
|
|
3174
|
+
held: {
|
|
3175
|
+
/**
|
|
3176
|
+
* @description Why the jobs that delete are held. `clock_ahead`: the server's clock is more than 7 days later than the trusted time.
|
|
3177
|
+
* @enum {string}
|
|
3178
|
+
*/
|
|
3179
|
+
reason: "clock_ahead";
|
|
3180
|
+
/** @description What the server's clock reads, in UTC. */
|
|
3181
|
+
clock_at: string;
|
|
3182
|
+
/** @description The trusted time, in UTC: the time last confirmed or, if later, the latest time the server's clock read since while clean-up was not held. */
|
|
3183
|
+
trusted_at: string;
|
|
3184
|
+
/** @description When the hold ends if the clock runs without jumping until then, in UTC. `marfa housekeeping confirm-clock` on the server ends it at once. */
|
|
3185
|
+
ends_at: string;
|
|
3186
|
+
} | null;
|
|
3173
3187
|
};
|
|
3174
3188
|
};
|
|
3175
3189
|
/** @description A page of trashed item summaries. */
|
|
@@ -3324,7 +3338,7 @@ interface components {
|
|
|
3324
3338
|
ItemWithMetadata: {
|
|
3325
3339
|
item: components["schemas"]["Item"] & unknown;
|
|
3326
3340
|
metadata: components["schemas"]["Metadata"] & unknown;
|
|
3327
|
-
/** @description `true` when Marfa accepted a
|
|
3341
|
+
/** @description `true` when Marfa accepted a write and stored nothing: a create repeats an `id` you already created, its natural key matches a trashed item, or an update or upsert leaves the item as it is, so `item` is at the version it holds. Absent otherwise. */
|
|
3328
3342
|
acknowledged?: boolean;
|
|
3329
3343
|
};
|
|
3330
3344
|
/** @description An error response. */
|
|
@@ -3823,10 +3837,10 @@ interface components {
|
|
|
3823
3837
|
/** @description The id of what the entry wrote or resolved. Absent where an item entry's natural key resolved an item of a type the credential may not read: the entry learns that its key is taken and nothing of the item. */
|
|
3824
3838
|
id?: string;
|
|
3825
3839
|
/**
|
|
3826
|
-
* @description Why a `skipped` entry wrote nothing. Under `create_only`, a match exists: `duplicate_source` by natural key, `duplicate_id` by `id`, `duplicate_edge` by source, target and edge type. Under `upsert
|
|
3840
|
+
* @description Why a `skipped` entry wrote nothing. Under `create_only`, a match exists: `duplicate_source` by natural key, `duplicate_id` by `id`, `duplicate_edge` by source, target and edge type. Under `upsert`: `trashed`, a trashed item matches, or `unchanged`.
|
|
3827
3841
|
* @enum {string}
|
|
3828
3842
|
*/
|
|
3829
|
-
reason?: "duplicate_edge" | "duplicate_id" | "duplicate_source" | "trashed";
|
|
3843
|
+
reason?: "duplicate_edge" | "duplicate_id" | "duplicate_source" | "trashed" | "unchanged";
|
|
3830
3844
|
error?: components["schemas"]["BulkEntryError"] & unknown;
|
|
3831
3845
|
};
|
|
3832
3846
|
/** @description An error response. */
|
|
@@ -5187,10 +5201,10 @@ interface components {
|
|
|
5187
5201
|
last_result: components["schemas"]["HousekeepingReport"] | null;
|
|
5188
5202
|
};
|
|
5189
5203
|
/**
|
|
5190
|
-
* @description How a run ended: `ok` if it finished, `error` if it failed.
|
|
5204
|
+
* @description How a run ended: `ok` if it finished, `error` if it failed, `held` if it did nothing because the clock is far ahead or a restore holds writes.
|
|
5191
5205
|
* @enum {string}
|
|
5192
5206
|
*/
|
|
5193
|
-
HousekeepingOutcome: "ok" | "error";
|
|
5207
|
+
HousekeepingOutcome: "ok" | "error" | "held";
|
|
5194
5208
|
/** @description What a run reports, under names its job chooses, such as `deleted`, `copied` or, for `trash-purge`, `passed_over`: the items it could not purge and left for the next run. */
|
|
5195
5209
|
HousekeepingReport: {
|
|
5196
5210
|
[key: string]: number | boolean | string | null;
|
|
@@ -5502,11 +5516,11 @@ interface components {
|
|
|
5502
5516
|
/** @description One known concern or unavailable check. */
|
|
5503
5517
|
AttentionConcern: {
|
|
5504
5518
|
/**
|
|
5505
|
-
* @description health: component degraded or down; job: last run failed; connector: failed, has problems, or quiet
|
|
5519
|
+
* @description health: component degraded or down; job: last run failed; connector: failed, has problems, or quiet a day; folder: sync problems; key: expires soon; backup: none kept, off, store failing, or run failed; clock: ahead or behind; unavailable: no answer.
|
|
5506
5520
|
* @enum {string}
|
|
5507
5521
|
*/
|
|
5508
|
-
kind: "health" | "job" | "connector" | "folder" | "key" | "backup" | "unavailable";
|
|
5509
|
-
/** @description The component, job, connector, folder, or key ID, the name of the check that could not answer,
|
|
5522
|
+
kind: "health" | "job" | "connector" | "folder" | "key" | "backup" | "clock" | "unavailable";
|
|
5523
|
+
/** @description The component, job, connector, folder, or key ID, the name of the check that could not answer, for a backup concern `no_backup_destination`, `turned_off`, `store` or `run`, or for a clock concern `clock_ahead` or `clock_behind`. */
|
|
5510
5524
|
reference: string;
|
|
5511
5525
|
/** @description A short name for the concern. */
|
|
5512
5526
|
title: string;
|
|
@@ -6086,10 +6100,10 @@ interface components {
|
|
|
6086
6100
|
*/
|
|
6087
6101
|
expires_at: string | null;
|
|
6088
6102
|
/**
|
|
6089
|
-
* @description The address a browser signed in from, or `null` for an app, a key, or a browser whose address Marfa could not tell.
|
|
6103
|
+
* @description The IP address a browser signed in from, or `null` for an app, a key, or a browser whose address Marfa could not tell.
|
|
6090
6104
|
* @example 203.0.113.24
|
|
6091
6105
|
*/
|
|
6092
|
-
|
|
6106
|
+
client_ip: string | null;
|
|
6093
6107
|
/** @description The `User-Agent` a browser sent when it signed in, or `null` for an app, a key, or a browser that sent none. */
|
|
6094
6108
|
user_agent: string | null;
|
|
6095
6109
|
/** @description For a key an app minted, the ID of that app's sign-in while the app is signed in. `null` for a browser, an app, any other key, and a key whose app has ended. */
|
|
@@ -7582,7 +7596,7 @@ interface operations {
|
|
|
7582
7596
|
responses: {
|
|
7583
7597
|
/**
|
|
7584
7598
|
* @description Returns the existing item and its metadata:
|
|
7585
|
-
* - `source_id` matched a live item: Marfa updated it.
|
|
7599
|
+
* - `source_id` matched a live item: Marfa updated it, or wrote nothing and set `acknowledged: true` if that changed nothing.
|
|
7586
7600
|
* - `source_id` matched a trashed item: Marfa wrote nothing and set `acknowledged: true`.
|
|
7587
7601
|
* - `id` repeated a create you made: Marfa wrote nothing and set `acknowledged: true`, in any state.
|
|
7588
7602
|
*/
|
|
@@ -8186,7 +8200,7 @@ interface operations {
|
|
|
8186
8200
|
};
|
|
8187
8201
|
};
|
|
8188
8202
|
responses: {
|
|
8189
|
-
/** @description Returns the updated item and its metadata. If `conflict=auto` resolved a collision, `conflict_resolution` lists the fields and strategies. A `keep_both_copies` field keeps the current value and puts yours on a new sibling tagged `conflicted-copy`, with a `derived-from` edge to this item. */
|
|
8203
|
+
/** @description Returns the updated item and its metadata, with `acknowledged: true` if the update changed nothing. If `conflict=auto` resolved a collision, `conflict_resolution` lists the fields and strategies. A `keep_both_copies` field keeps the current value and puts yours on a new sibling tagged `conflicted-copy`, with a `derived-from` edge to this item. */
|
|
8190
8204
|
200: {
|
|
8191
8205
|
headers: {
|
|
8192
8206
|
"X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
|
|
@@ -10058,7 +10072,7 @@ interface operations {
|
|
|
10058
10072
|
};
|
|
10059
10073
|
};
|
|
10060
10074
|
responses: {
|
|
10061
|
-
/** @description Returns `counts` and a `results` entry for each item, in order: `created`, `updated`, `skipped` or `errored`. Under `upsert`, an entry
|
|
10075
|
+
/** @description Returns `counts` and a `results` entry for each item, in order: `created`, `updated`, `skipped` or `errored`. Under `upsert`, an entry is `skipped` with reason `trashed` where it matches a trashed item, or `unchanged` where it would leave its item as it is. Under `create_only`, a matching entry is `skipped` with reason `duplicate_source` or `duplicate_id`. */
|
|
10062
10076
|
200: {
|
|
10063
10077
|
headers: {
|
|
10064
10078
|
"X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
|
|
@@ -13757,7 +13771,7 @@ interface operations {
|
|
|
13757
13771
|
* }
|
|
13758
13772
|
*/
|
|
13759
13773
|
"application/json": {
|
|
13760
|
-
/** @description The operations, applied in order. A later operation on a row sees what an earlier one left. */
|
|
13774
|
+
/** @description The operations, applied in order. A later operation on a row sees what an earlier one left. A whole number in `values` whose digits a 64-bit float doesn't keep is refused: send it as a string. */
|
|
13761
13775
|
operations: components["schemas"]["RowOperation"][];
|
|
13762
13776
|
};
|
|
13763
13777
|
};
|
|
@@ -13797,7 +13811,7 @@ interface operations {
|
|
|
13797
13811
|
};
|
|
13798
13812
|
/**
|
|
13799
13813
|
* @description - `invalid_id`: the ID is not a valid item ID.
|
|
13800
|
-
* - `validation_error`: an operation is malformed, names a column the table doesn't declare, breaks a column's rule or names an item you can't read, or the batch holds no operations or more than 1000. `details.operation` names the operation.
|
|
13814
|
+
* - `validation_error`: an operation is malformed, names a column the table doesn't declare, breaks a column's rule, holds a whole number a 64-bit float can't keep or names an item you can't read, or the batch holds no operations or more than 1000. `details.operation` names the operation.
|
|
13801
13815
|
*/
|
|
13802
13816
|
400: {
|
|
13803
13817
|
headers: {
|