@cookiemunch/sdk 0.15.0 → 0.16.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.
package/dist/types.d.ts CHANGED
@@ -182,6 +182,7 @@ export interface ProvisionRequest {
182
182
  dsrWebhook?: boolean;
183
183
  rightsIdentity?: boolean;
184
184
  frontendApiHost?: string;
185
+ connect?: boolean;
185
186
  };
186
187
  forumulate?: {
187
188
  token: string;
@@ -562,8 +563,10 @@ export interface SubjectCard {
562
563
  export interface IntegrationConnect {
563
564
  /** The site the provider opens cases on. */
564
565
  cbid: string;
565
- /** The provider instance's secret key, used for this one call; never stored or echoed. */
566
+ /** The provider instance's secret key (Forumulate: an org token, fck_…), used for this one call; never stored or echoed. */
566
567
  providerKey: string;
568
+ /** Forumulate only (required there): the Forumulate organisation whose consent follows the site. */
569
+ orgId?: string;
567
570
  /** Only for a provider with no built-in connector. A body value "{apiKey}" becomes the minted key. */
568
571
  connector?: {
569
572
  url: string;
@@ -571,8 +574,9 @@ export interface IntegrationConnect {
571
574
  body: Record<string, unknown>;
572
575
  };
573
576
  /**
574
- * Atlas only: also create (or update) the `atlas` connection, holding the narrow key Atlas mints for it and
575
- * the `whsec_` secret of the completion webhook Atlas points at its `webhookUrl`. Needs a key not locked to properties.
577
+ * Atlas: also create (or update) the `atlas` connection, holding the narrow key Atlas mints for it and
578
+ * the `whsec_` secret of the completion webhook Atlas points at its `webhookUrl`. Forumulate: also mint
579
+ * Forumulate's executor key into the `forumulate` connection. Needs a key not locked to properties.
576
580
  */
577
581
  executor?: boolean;
578
582
  }
@@ -581,8 +585,10 @@ export interface IntegrationConnectResult {
581
585
  dryRun?: true;
582
586
  provider: string;
583
587
  cbid: string;
584
- /** The minted key's metadata; the key itself is never returned. */
585
- key: {
588
+ /** Forumulate: the Forumulate organisation. */
589
+ orgId?: string;
590
+ /** The minted key's metadata; the key itself is never returned. Not for Forumulate, which mints no key. */
591
+ key?: {
586
592
  prefix?: string;
587
593
  name: string;
588
594
  owner: string;
@@ -591,19 +597,28 @@ export interface IntegrationConnectResult {
591
597
  expiresAt?: number | null;
592
598
  expiresInDays?: number;
593
599
  };
594
- request: {
600
+ request?: {
595
601
  method: 'PUT' | 'POST';
596
602
  url: string;
597
603
  status?: number;
598
604
  };
605
+ /** Forumulate: the provision steps run, as POST /v1/provision answers them. */
606
+ steps?: Array<{
607
+ step: string;
608
+ status: string;
609
+ detail?: string;
610
+ waitingOn?: string;
611
+ }>;
612
+ summary?: Record<'changed' | 'unchanged' | 'waiting' | 'failed', number>;
613
+ trace?: string;
599
614
  /** Only on a dry run: the body that would be sent, the key shown as a placeholder. */
600
615
  requestBody?: Record<string, unknown>;
601
616
  /** Earlier keys for this provider and site, revoked now. */
602
617
  revoked?: string[];
603
618
  wouldRevoke?: string[];
604
- /** With `executor: true`: the `atlas` connection (answer 207 when it could not be stored). */
619
+ /** With `executor: true`: the `atlas` (or `forumulate`) connection (answer 207 when it could not be stored). */
605
620
  executor?: {
606
- status: 'created' | 'updated' | 'unchanged' | 'failed' | 'would_create' | 'would_update';
621
+ status: 'created' | 'updated' | 'unchanged' | 'failed' | 'would_create' | 'would_update' | 'skipped' | 'waiting';
607
622
  id?: string | null;
608
623
  system?: string;
609
624
  webhookUrl?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cookiemunch/sdk",
3
- "version": "0.15.0",
3
+ "version": "0.16.0",
4
4
  "description": "Typed REST client for the Cookie Munch Developer API (/v1)",
5
5
  "license": "MIT",
6
6
  "type": "module",