@cookiemunch/sdk 0.15.1 → 0.17.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/CHANGELOG.md +15 -0
- package/dist/index.cjs +2 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +45 -5
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +22 -8
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -563,8 +563,10 @@ export interface SubjectCard {
|
|
|
563
563
|
export interface IntegrationConnect {
|
|
564
564
|
/** The site the provider opens cases on. */
|
|
565
565
|
cbid: string;
|
|
566
|
-
/** 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. */
|
|
567
567
|
providerKey: string;
|
|
568
|
+
/** Forumulate only (required there): the Forumulate organisation whose consent follows the site. */
|
|
569
|
+
orgId?: string;
|
|
568
570
|
/** Only for a provider with no built-in connector. A body value "{apiKey}" becomes the minted key. */
|
|
569
571
|
connector?: {
|
|
570
572
|
url: string;
|
|
@@ -572,8 +574,9 @@ export interface IntegrationConnect {
|
|
|
572
574
|
body: Record<string, unknown>;
|
|
573
575
|
};
|
|
574
576
|
/**
|
|
575
|
-
* Atlas
|
|
576
|
-
* the `whsec_` secret of the completion webhook Atlas points at its `webhookUrl`.
|
|
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.
|
|
577
580
|
*/
|
|
578
581
|
executor?: boolean;
|
|
579
582
|
}
|
|
@@ -582,8 +585,10 @@ export interface IntegrationConnectResult {
|
|
|
582
585
|
dryRun?: true;
|
|
583
586
|
provider: string;
|
|
584
587
|
cbid: string;
|
|
585
|
-
/**
|
|
586
|
-
|
|
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?: {
|
|
587
592
|
prefix?: string;
|
|
588
593
|
name: string;
|
|
589
594
|
owner: string;
|
|
@@ -592,19 +597,28 @@ export interface IntegrationConnectResult {
|
|
|
592
597
|
expiresAt?: number | null;
|
|
593
598
|
expiresInDays?: number;
|
|
594
599
|
};
|
|
595
|
-
request
|
|
600
|
+
request?: {
|
|
596
601
|
method: 'PUT' | 'POST';
|
|
597
602
|
url: string;
|
|
598
603
|
status?: number;
|
|
599
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;
|
|
600
614
|
/** Only on a dry run: the body that would be sent, the key shown as a placeholder. */
|
|
601
615
|
requestBody?: Record<string, unknown>;
|
|
602
616
|
/** Earlier keys for this provider and site, revoked now. */
|
|
603
617
|
revoked?: string[];
|
|
604
618
|
wouldRevoke?: string[];
|
|
605
|
-
/** 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). */
|
|
606
620
|
executor?: {
|
|
607
|
-
status: 'created' | 'updated' | 'unchanged' | 'failed' | 'would_create' | 'would_update';
|
|
621
|
+
status: 'created' | 'updated' | 'unchanged' | 'failed' | 'would_create' | 'would_update' | 'skipped' | 'waiting';
|
|
608
622
|
id?: string | null;
|
|
609
623
|
system?: string;
|
|
610
624
|
webhookUrl?: string;
|