@foir/cli 0.72.1 → 0.74.0

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.
@@ -363,7 +363,11 @@ interface ApplyConfigOperationInput {
363
363
  *
364
364
  * Cross-cutting caps: `embeddings:read`, `embeddings:write`,
365
365
  * `files:read`, `files:write`, `customers:write` (create a customer,
366
- * such as the buyer at a guest checkout),
366
+ * such as the buyer at a guest checkout), `customers:read:named` (read one
367
+ * customer the operation names, by id or by their exact email address),
368
+ * `customers:read` (that, and the list), `notifications:write` (notify the
369
+ * project's customers; an operation acting for a customer notifies that
370
+ * customer alone, and one at an organisation reaches only its customers),
367
371
  * `config:read`, `status:write`, and the secrets:* family. A capability
368
372
  * outside this vocabulary is refused at push, by name. See
369
373
  * `services/internal/scopedtoken/capabilities.go` for the full enum.
@@ -381,7 +385,8 @@ interface ApplyConfigOperationInput {
381
385
  * registers a root Query field resolved synchronously in-process.
382
386
  * `field` attaches a resolver field to `attachedToModel`, batched per
383
387
  * request. QUERY/FIELD operations are the new "resolver" kind and use
384
- * `requestTemplate` / `responseTransform` to call an upstream endpoint.
388
+ * `requestTemplate` / `responseTransform` to call an upstream endpoint. A
389
+ * `mutation` with a `requestTemplate` is a pass-through write, called SYNC.
385
390
  */
386
391
  kind?: 'mutation' | 'query' | 'field';
387
392
  /**
@@ -412,10 +417,14 @@ interface ApplyConfigOperationInput {
412
417
  secretRef: string;
413
418
  }>;
414
419
  /**
415
- * Shapes the outbound HTTP request for QUERY / FIELD operations. Template
416
- * variables `{{input.X}}`, `{{parent.X}}`, `{{secret.NAME}}`,
417
- * `{{context.X}}` are interpolated at dispatch time. Set `batchCapable`
418
- * to send one upstream request for the whole deduped input set.
420
+ * The request Foir makes to a third-party host itself, for QUERY / FIELD
421
+ * operations and for a `mutation` called SYNC (a pass-through write, which
422
+ * cannot run ASYNC or from a hook). Template variables `{{input.X}}`,
423
+ * `{{parent.X}}`, `{{secret.NAME}}`, `{{context.X}}` are filled in at call
424
+ * time, each escaped for where it stands; `{{context.idempotencyKey}}` is
425
+ * the key the caller sent. The host is sent only what the template writes:
426
+ * no Foir token. Set `batchCapable` to send one upstream request for the
427
+ * whole deduped input set.
419
428
  */
420
429
  requestTemplate?: {
421
430
  method?: string;
@@ -427,7 +436,8 @@ interface ApplyConfigOperationInput {
427
436
  };
428
437
  /**
429
438
  * jq-style transform applied to the upstream response before it is
430
- * returned to the caller. QUERY / FIELD only.
439
+ * returned to the caller: a QUERY / FIELD operation's, or a templated
440
+ * mutation's.
431
441
  */
432
442
  responseTransform?: string;
433
443
  }
@@ -772,6 +782,14 @@ interface AppSourceMappingInput {
772
782
  toModel: string;
773
783
  naturalKey: string;
774
784
  fields: Record<string, string>;
785
+ /**
786
+ * How the install holds this source, when the app offers to read it live:
787
+ * `'reference'` reads the host's fields live and stores the record and its
788
+ * key; `'sync'` keeps a copy. Omit it to leave the choice alone: a new install
789
+ * reads live wherever the app offers it, and a push never moves an existing
790
+ * install's choice unless it names one.
791
+ */
792
+ mode?: 'sync' | 'reference';
775
793
  }
776
794
  /**
777
795
  * Sink-contract mapping entry for an app install.
@@ -799,6 +817,16 @@ interface AppInput {
799
817
  source: string;
800
818
  /** Opaque settings forwarded to the app's middleware. */
801
819
  settings?: Record<string, unknown>;
820
+ /**
821
+ * The customer sign-in this install pairs with the app, for an app whose own
822
+ * system has customers: the key of one of the project's OAuth or OIDC
823
+ * customer sign-ins, declared under `authProviders`. Every identity the app
824
+ * names is resolved through it.
825
+ *
826
+ * `false` pairs none. Leave it out to leave the install's pairing alone: a
827
+ * push never removes a pairing it was not told about.
828
+ */
829
+ customerSignIn?: string | false;
802
830
  mappings?: {
803
831
  /** `false` declines an OPTIONAL source. See AppMappingDeclined. */
804
832
  sources?: Record<string, AppSourceMappingInput | AppMappingDeclined>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@foir/cli",
3
- "version": "0.72.1",
3
+ "version": "0.74.0",
4
4
  "description": "Universal platform CLI for Foir platform",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -65,7 +65,7 @@
65
65
  "@foir/console-routes": "0.0.0",
66
66
  "@foir/proto-ts": "0.109.0",
67
67
  "@foir/rpc-node": "0.0.0",
68
- "@foir/sdk": "0.11.0"
68
+ "@foir/sdk": "0.18.0"
69
69
  },
70
70
  "engines": {
71
71
  "node": ">=18.0.0"