@withmarfa/client 0.0.52 → 0.0.54

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 +32 -5
  2. package/package.json +3 -3
package/dist/index.d.ts CHANGED
@@ -1323,7 +1323,7 @@ interface paths {
1323
1323
  put?: never;
1324
1324
  /**
1325
1325
  * Register a connector
1326
- * @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.
1326
+ * @description Registers your key as a connector and returns it. Repeating registration replaces its name, description and `read_only_types` and keeps its ID. A successor key inherits its own source's inbound endpoints and retained deliveries.
1327
1327
  */
1328
1328
  post: operations["registerConnector"];
1329
1329
  delete?: never;
@@ -2397,6 +2397,8 @@ interface components {
2397
2397
  source: string;
2398
2398
  /** @description The item's identifier at its source. With `source`, it is the item's natural key. Absent if the writer set none. */
2399
2399
  source_id?: string;
2400
+ /** @description `true` if every connector with a live write key for the item's type that owns or claims its `source` lists the type in `read_only_types`, so it puts back an edit made in Marfa on its next run. Marfa doesn't refuse the edit. */
2401
+ read_only: boolean;
2400
2402
  /** @description The latitude where the item was captured. Absent if the writer set none. */
2401
2403
  capture_latitude?: number;
2402
2404
  /** @description The longitude where the item was captured. Absent if the writer set none. */
@@ -3975,6 +3977,8 @@ interface components {
3975
3977
  /** @description A type in the list of types: its own definition, with the roles it declares and the roles it plays. */
3976
3978
  ListedType: components["schemas"]["TypeDefinition"] & {
3977
3979
  provenance: components["schemas"]["TypeProvenance"] & unknown;
3980
+ /** @description The fields this type declares in another shape than a type above it. Present only while there are some, and it clears once the type declares the shape above. Items of the type stay readable. */
3981
+ conflicts?: components["schemas"]["TypeConflict"][];
3978
3982
  /** @description The structural roles the type declares itself, without those it only inherits. Empty if it declares none. */
3979
3983
  own_roles: components["schemas"]["TypeRole"][];
3980
3984
  };
@@ -4063,6 +4067,19 @@ interface components {
4063
4067
  } & {
4064
4068
  [key: string]: unknown;
4065
4069
  };
4070
+ /** @description A field this type declares in a shape a type above it declares differently. */
4071
+ TypeConflict: {
4072
+ /** @description The name of the field the type declares. */
4073
+ field: string;
4074
+ /** @description The first part of the field's shape that differs, such as `type`. */
4075
+ attribute: string;
4076
+ /** @description The ID of the type above this one that declares the field. */
4077
+ inherited_from: string;
4078
+ /** @description What the types above give the field, such as `type "string"`. */
4079
+ inherited: string;
4080
+ /** @description What this type declares, such as `type "number"`. */
4081
+ declared: string;
4082
+ };
4066
4083
  /** @description A type says which fields the items of that type hold, and what else Marfa does for them. */
4067
4084
  TypeDefinition: {
4068
4085
  /** @description Unique identifier for the type. */
@@ -4920,10 +4937,12 @@ interface components {
4920
4937
  description: string | null;
4921
4938
  /** @description When the connector first registered. */
4922
4939
  registered_at: string;
4923
- /** @description When the connector's name or description was last set. */
4940
+ /** @description When the connector's name, description or `read_only_types` was last set. */
4924
4941
  updated_at: string;
4925
4942
  /** @description When the connector last sent a heartbeat; `null` if never. */
4926
4943
  last_heartbeat_at: string | null;
4944
+ /** @description The types whose items the connector holds read only, putting back any edit made in Marfa. `[]` if it declared none. */
4945
+ read_only_types: string[];
4927
4946
  /** @description The connector's most recently reported run; `null` if it has reported none. */
4928
4947
  last_run: components["schemas"]["ConnectorRun"] | null;
4929
4948
  problems: components["schemas"]["ConnectorProblems"] & unknown;
@@ -5891,6 +5910,11 @@ interface components {
5891
5910
  * @example 2026-10-03T09:30:00.000Z
5892
5911
  */
5893
5912
  created_at: string;
5913
+ /**
5914
+ * @description When the passkey last signed the owner in, in UTC, to the second, or `null` if no use is recorded.
5915
+ * @example 2026-10-05T14:12:08.000Z
5916
+ */
5917
+ last_used_at: string | null;
5894
5918
  };
5895
5919
  /** @description An error response. */
5896
5920
  PasskeyNotFoundRefusal: {
@@ -21895,11 +21919,13 @@ interface operations {
21895
21919
  name: string;
21896
21920
  /** @description What the connector does. Leave it out for none: registering again without it clears the old one. */
21897
21921
  description?: string;
21922
+ /** @description The types whose items the connector holds read only, putting back any edit made in Marfa. An item reads `read_only` as `true` when every connector for its source whose live key may write its type lists the type. The types needn't be registered. Leaving it out clears the list. */
21923
+ read_only_types?: string[];
21898
21924
  };
21899
21925
  };
21900
21926
  };
21901
21927
  responses: {
21902
- /** @description Returns the existing connector with its name and description updated. Its `id` and `registered_at` don't change. */
21928
+ /** @description Returns the existing connector with its name, description and `read_only_types` replaced. Its `id` and `registered_at` don't change. */
21903
21929
  200: {
21904
21930
  headers: {
21905
21931
  "X-Marfa-Contract": components["headers"]["X-Marfa-Contract"];
@@ -21929,7 +21955,7 @@ interface operations {
21929
21955
  };
21930
21956
  /**
21931
21957
  * @description - `missing_required_field`: `name` is missing.
21932
- * - `validation_error`: `name` isn't 1 to 200 characters, `description` is over 2,000 characters, or the body has a top-level field this endpoint doesn't take.
21958
+ * - `validation_error`: `name` isn't 1 to 200 characters, `description` is over 2,000 characters, `read_only_types` holds a malformed type identifier or over 1,000 entries, or the body has a top-level field this endpoint doesn't take.
21933
21959
  */
21934
21960
  400: {
21935
21961
  headers: {
@@ -31919,4 +31945,5 @@ interface Page<T> {
31919
31945
  */
31920
31946
  declare function pages<T>(fetchPage: (cursor: string | undefined) => Promise<Page<T>>): AsyncGenerator<T, void, undefined>;
31921
31947
 
31922
- export { CONTRACT_HEADER, CONTRACT_VERSION, type ClientOptions, ContractMismatchError, type MarfaClient, type Page, type components, createClient, type operations, pages, type paths };
31948
+ export { CONTRACT_HEADER, CONTRACT_VERSION, ContractMismatchError, createClient, pages };
31949
+ export type { ClientOptions, MarfaClient, Page, components, operations, paths };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@withmarfa/client",
3
- "version": "0.0.52",
3
+ "version": "0.0.54",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -25,9 +25,9 @@
25
25
  "openapi-fetch": "0.17.0"
26
26
  },
27
27
  "devDependencies": {
28
- "@types/node": "^26.6.4",
28
+ "@types/node": "^26.6.6",
29
29
  "openapi-typescript": "7.13.0",
30
- "tsup": "^8.5.1",
30
+ "tsup": "^9.0.0",
31
31
  "tsx": "^4.23.15",
32
32
  "typescript": "^6.0.3"
33
33
  },