@epilot/sdk 2.19.3 → 2.19.5
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/definitions/access-token-runtime.json +1 -0
- package/definitions/access-token.json +835 -0
- package/definitions/address-runtime.json +1 -0
- package/definitions/address-suggestions-runtime.json +1 -0
- package/definitions/address-suggestions.json +582 -0
- package/definitions/address.json +578 -0
- package/definitions/ai-agents-runtime.json +1 -0
- package/definitions/ai-agents.json +2863 -0
- package/definitions/app-runtime.json +1 -0
- package/definitions/app.json +5743 -0
- package/definitions/audit-logs-runtime.json +1 -0
- package/definitions/audit-logs.json +305 -0
- package/definitions/automation-runtime.json +1 -0
- package/definitions/automation.json +5557 -0
- package/definitions/billing-runtime.json +1 -0
- package/definitions/billing.json +2386 -0
- package/definitions/blueprint-manifest-runtime.json +1 -0
- package/definitions/blueprint-manifest.json +7718 -0
- package/definitions/calendar-runtime.json +1 -0
- package/definitions/calendar.json +2904 -0
- package/definitions/configuration-hub-runtime.json +1 -0
- package/definitions/configuration-hub.json +2250 -0
- package/definitions/consent-runtime.json +1 -0
- package/definitions/consent.json +344 -0
- package/definitions/customer-portal-runtime.json +1 -0
- package/definitions/customer-portal.json +19945 -0
- package/definitions/dashboard-runtime.json +1 -0
- package/definitions/dashboard.json +1355 -0
- package/definitions/data-governance-runtime.json +1 -0
- package/definitions/data-governance.json +1126 -0
- package/definitions/deduplication-runtime.json +1 -0
- package/definitions/deduplication.json +782 -0
- package/definitions/design-runtime.json +1 -0
- package/definitions/design.json +1827 -0
- package/definitions/document-runtime.json +1 -0
- package/definitions/document.json +758 -0
- package/definitions/email-settings-runtime.json +1 -0
- package/definitions/email-settings.json +3736 -0
- package/definitions/email-template-runtime.json +1 -0
- package/definitions/email-template.json +1441 -0
- package/definitions/entity-mapping-runtime.json +1 -0
- package/definitions/entity-mapping.json +1642 -0
- package/definitions/entity-runtime.json +1 -0
- package/definitions/entity.json +11517 -0
- package/definitions/environments-runtime.json +1 -0
- package/definitions/environments.json +539 -0
- package/definitions/event-catalog-runtime.json +1 -0
- package/definitions/event-catalog.json +1524 -0
- package/definitions/file-runtime.json +1 -0
- package/definitions/file.json +3905 -0
- package/definitions/iban-runtime.json +1 -0
- package/definitions/iban.json +132 -0
- package/definitions/integration-toolkit-runtime.json +1 -0
- package/definitions/integration-toolkit.json +12769 -0
- package/definitions/journey-runtime.json +1 -0
- package/definitions/journey.json +2640 -0
- package/definitions/kanban-runtime.json +1 -0
- package/definitions/kanban.json +1506 -0
- package/definitions/message-runtime.json +1 -0
- package/definitions/message.json +3667 -0
- package/definitions/metering-runtime.json +1 -0
- package/definitions/metering.json +3132 -0
- package/definitions/notes-runtime.json +1 -0
- package/definitions/notes.json +1698 -0
- package/definitions/notification-runtime.json +1 -0
- package/definitions/notification.json +1439 -0
- package/definitions/organization-runtime.json +1 -0
- package/definitions/organization.json +1192 -0
- package/definitions/partner-directory-runtime.json +1 -0
- package/definitions/partner-directory.json +2284 -0
- package/definitions/permissions-runtime.json +1 -0
- package/definitions/permissions.json +1598 -0
- package/definitions/pricing-runtime.json +1 -0
- package/definitions/pricing-tier-runtime.json +1 -0
- package/definitions/pricing-tier.json +105 -0
- package/definitions/pricing.json +11569 -0
- package/definitions/purpose-runtime.json +1 -0
- package/definitions/purpose.json +524 -0
- package/definitions/query-runtime.json +1 -0
- package/definitions/query.json +3178 -0
- package/definitions/sandbox-runtime.json +1 -0
- package/definitions/sandbox.json +453 -0
- package/definitions/sharing-runtime.json +1 -0
- package/definitions/sharing.json +956 -0
- package/definitions/snapshot-runtime.json +1 -0
- package/definitions/snapshot.json +1103 -0
- package/definitions/submission-runtime.json +1 -0
- package/definitions/submission.json +313 -0
- package/definitions/targeting-runtime.json +1 -0
- package/definitions/targeting.json +2222 -0
- package/definitions/template-variables-runtime.json +1 -0
- package/definitions/template-variables.json +1416 -0
- package/definitions/user-runtime.json +1 -0
- package/definitions/user.json +3051 -0
- package/definitions/validation-rules-runtime.json +1 -0
- package/definitions/validation-rules.json +2365 -0
- package/definitions/webhooks-runtime.json +1 -0
- package/definitions/webhooks.json +1875 -0
- package/definitions/workflow-definition-runtime.json +1 -0
- package/definitions/workflow-definition.json +3592 -0
- package/definitions/workflow-runtime.json +1 -0
- package/definitions/workflow.json +4669 -0
- package/dist/apis/access-token.cjs +6 -6
- package/dist/apis/access-token.js +1 -1
- package/dist/apis/address-suggestions.cjs +6 -6
- package/dist/apis/address-suggestions.js +1 -1
- package/dist/apis/address.cjs +6 -6
- package/dist/apis/address.js +1 -1
- package/dist/apis/ai-agents.cjs +6 -6
- package/dist/apis/ai-agents.js +1 -1
- package/dist/apis/app.cjs +6 -6
- package/dist/apis/app.js +1 -1
- package/dist/apis/audit-logs.cjs +6 -6
- package/dist/apis/audit-logs.js +1 -1
- package/dist/apis/automation.cjs +6 -6
- package/dist/apis/automation.js +1 -1
- package/dist/apis/billing.cjs +6 -6
- package/dist/apis/billing.js +1 -1
- package/dist/apis/blueprint-manifest.cjs +6 -6
- package/dist/apis/blueprint-manifest.js +1 -1
- package/dist/apis/calendar.cjs +6 -6
- package/dist/apis/calendar.js +1 -1
- package/dist/apis/configuration-hub.cjs +6 -6
- package/dist/apis/configuration-hub.js +1 -1
- package/dist/apis/consent.cjs +6 -6
- package/dist/apis/consent.js +1 -1
- package/dist/apis/customer-portal.cjs +6 -6
- package/dist/apis/customer-portal.d.cts +2 -2
- package/dist/apis/customer-portal.d.ts +2 -2
- package/dist/apis/customer-portal.js +1 -1
- package/dist/apis/dashboard.cjs +6 -6
- package/dist/apis/dashboard.js +1 -1
- package/dist/apis/data-governance.cjs +6 -6
- package/dist/apis/data-governance.js +1 -1
- package/dist/apis/deduplication.cjs +6 -6
- package/dist/apis/deduplication.js +1 -1
- package/dist/apis/design.cjs +6 -6
- package/dist/apis/design.js +1 -1
- package/dist/apis/document.cjs +6 -6
- package/dist/apis/document.js +1 -1
- package/dist/apis/email-settings.cjs +6 -6
- package/dist/apis/email-settings.js +1 -1
- package/dist/apis/email-template.cjs +6 -6
- package/dist/apis/email-template.js +1 -1
- package/dist/apis/entity-mapping.cjs +6 -6
- package/dist/apis/entity-mapping.js +1 -1
- package/dist/apis/entity.cjs +6 -6
- package/dist/apis/entity.js +1 -1
- package/dist/apis/environments.cjs +6 -6
- package/dist/apis/environments.js +1 -1
- package/dist/apis/event-catalog.cjs +6 -6
- package/dist/apis/event-catalog.js +1 -1
- package/dist/apis/file.cjs +6 -6
- package/dist/apis/file.js +1 -1
- package/dist/apis/iban.cjs +6 -6
- package/dist/apis/iban.js +1 -1
- package/dist/apis/integration-toolkit.cjs +6 -6
- package/dist/apis/integration-toolkit.js +1 -1
- package/dist/apis/journey.cjs +6 -6
- package/dist/apis/journey.js +1 -1
- package/dist/apis/kanban.cjs +6 -6
- package/dist/apis/kanban.js +1 -1
- package/dist/apis/message.cjs +6 -6
- package/dist/apis/message.js +1 -1
- package/dist/apis/metering.cjs +6 -6
- package/dist/apis/metering.js +1 -1
- package/dist/apis/notes.cjs +6 -6
- package/dist/apis/notes.js +1 -1
- package/dist/apis/notification.cjs +6 -6
- package/dist/apis/notification.js +1 -1
- package/dist/apis/organization.cjs +6 -6
- package/dist/apis/organization.js +1 -1
- package/dist/apis/partner-directory.cjs +6 -6
- package/dist/apis/partner-directory.js +1 -1
- package/dist/apis/permissions.cjs +6 -6
- package/dist/apis/permissions.js +1 -1
- package/dist/apis/pricing-tier.cjs +6 -6
- package/dist/apis/pricing-tier.js +1 -1
- package/dist/apis/pricing.cjs +6 -6
- package/dist/apis/pricing.js +1 -1
- package/dist/apis/purpose.cjs +6 -6
- package/dist/apis/purpose.js +1 -1
- package/dist/apis/query.cjs +6 -6
- package/dist/apis/query.js +1 -1
- package/dist/apis/sandbox.cjs +6 -6
- package/dist/apis/sandbox.js +1 -1
- package/dist/apis/sharing.cjs +6 -6
- package/dist/apis/sharing.js +1 -1
- package/dist/apis/snapshot.cjs +6 -6
- package/dist/apis/snapshot.js +1 -1
- package/dist/apis/submission.cjs +6 -6
- package/dist/apis/submission.js +1 -1
- package/dist/apis/target.cjs +6 -6
- package/dist/apis/target.js +1 -1
- package/dist/apis/targeting.cjs +6 -6
- package/dist/apis/targeting.d.cts +2 -2
- package/dist/apis/targeting.d.ts +2 -2
- package/dist/apis/targeting.js +1 -1
- package/dist/apis/template-variables.cjs +6 -6
- package/dist/apis/template-variables.js +1 -1
- package/dist/apis/user.cjs +6 -6
- package/dist/apis/user.js +1 -1
- package/dist/apis/validation-rules.cjs +6 -6
- package/dist/apis/validation-rules.js +1 -1
- package/dist/apis/webhooks.cjs +6 -6
- package/dist/apis/webhooks.js +1 -1
- package/dist/apis/workflow-definition.cjs +6 -6
- package/dist/apis/workflow-definition.js +1 -1
- package/dist/apis/workflow.cjs +6 -6
- package/dist/apis/workflow.js +1 -1
- package/dist/{chunk-UC3IKFHD.js → chunk-HWPPR3IM.js} +2 -2
- package/dist/{chunk-QWWGJOYR.cjs → chunk-VB6VABGZ.cjs} +2 -2
- package/dist/customer-portal-CDFQM72A.js +7 -0
- package/dist/customer-portal-MS6WNXAO.cjs +7 -0
- package/dist/{customer-portal.d-DTnk0yQf.d.cts → customer-portal.d-DJHJY-vb.d.cts} +51 -8
- package/dist/{customer-portal.d-DTnk0yQf.d.ts → customer-portal.d-DJHJY-vb.d.ts} +51 -8
- package/dist/index.cjs +8 -8
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/targeting-5U4XGOXY.cjs +7 -0
- package/dist/targeting-R3G32HI4.js +7 -0
- package/dist/{targeting.d-16SvPyj4.d.cts → targeting.d-KcawmWBB.d.cts} +8 -0
- package/dist/{targeting.d-16SvPyj4.d.ts → targeting.d-KcawmWBB.d.ts} +8 -0
- package/docs/customer-portal.md +13 -4
- package/docs/targeting.md +9 -1
- package/package.json +1 -1
- package/dist/customer-portal-FCUPDA7V.cjs +0 -7
- package/dist/customer-portal-GRWXQYKT.js +0 -7
- package/dist/targeting-BTVCLYFW.cjs +0 -7
- package/dist/targeting-NWYDE3E7.js +0 -7
|
@@ -1460,6 +1460,10 @@ declare namespace Components {
|
|
|
1460
1460
|
* Configures which 360 events generate an in-app notification for the portal user. Each enabled trigger renders the referenced notification template and creates a notification addressed to the portal user. Admin/builder-only — never exposed via the public portal config.
|
|
1461
1461
|
*/
|
|
1462
1462
|
notification_triggers?: NotificationTriggerConfig[];
|
|
1463
|
+
/**
|
|
1464
|
+
* Master toggle for the portal's engagement center (in-app notifications including the notification triggers above). Off when absent — portal users only see the engagement center and receive trigger notifications after an admin enables it.
|
|
1465
|
+
*/
|
|
1466
|
+
engagement_center_enabled?: boolean;
|
|
1463
1467
|
}
|
|
1464
1468
|
export interface CommonConfigAttributesV3 {
|
|
1465
1469
|
/**
|
|
@@ -3290,7 +3294,27 @@ declare namespace Components {
|
|
|
3290
3294
|
templates?: {
|
|
3291
3295
|
[name: string]: string;
|
|
3292
3296
|
};
|
|
3293
|
-
|
|
3297
|
+
/**
|
|
3298
|
+
* Reference to admin-authored portal configuration (a page block or a global search configuration item) from which the API derives Handlebars templates server-side. This replaces client-supplied template strings so portal users can never submit arbitrary templates for resolution. When both a reference and raw `templates` are provided, the reference wins and the raw templates are ignored.
|
|
3299
|
+
*/
|
|
3300
|
+
templates_ref?: {
|
|
3301
|
+
/**
|
|
3302
|
+
* ID of the portal page to derive templates from. When given without `block_id`, templates are derived from every block of the page and returned resolved as a nested map keyed by block id (the entity detail page contract).
|
|
3303
|
+
*/
|
|
3304
|
+
page_id?: string;
|
|
3305
|
+
/**
|
|
3306
|
+
* ID of a block within the page. Templates are derived from the block's content according to its block type (e.g. meter_selector, meter_reading, entity_list).
|
|
3307
|
+
*/
|
|
3308
|
+
block_id?: string;
|
|
3309
|
+
/**
|
|
3310
|
+
* For blocks carrying a per-schema configuration array (entity_list), the id of the configuration item to derive templates from. Requires `page_id` and `block_id`.
|
|
3311
|
+
*/
|
|
3312
|
+
config_id?: string;
|
|
3313
|
+
/**
|
|
3314
|
+
* ID of the portal's `global_search` configuration item to derive search result templates and the group title template from. Mutually exclusive with `page_id`.
|
|
3315
|
+
*/
|
|
3316
|
+
global_search_config_id?: string;
|
|
3317
|
+
};
|
|
3294
3318
|
}
|
|
3295
3319
|
export interface EntityTemplates {
|
|
3296
3320
|
/**
|
|
@@ -6610,6 +6634,10 @@ declare namespace Components {
|
|
|
6610
6634
|
* Configures which 360 events generate an in-app notification for the portal user. Each enabled trigger renders the referenced notification template and creates a notification addressed to the portal user. Admin/builder-only — never exposed via the public portal config.
|
|
6611
6635
|
*/
|
|
6612
6636
|
notification_triggers?: NotificationTriggerConfig[];
|
|
6637
|
+
/**
|
|
6638
|
+
* Master toggle for the portal's engagement center (in-app notifications including the notification triggers above). Off when absent — portal users only see the engagement center and receive trigger notifications after an admin enables it.
|
|
6639
|
+
*/
|
|
6640
|
+
engagement_center_enabled?: boolean;
|
|
6613
6641
|
/**
|
|
6614
6642
|
* ID of the organization
|
|
6615
6643
|
* example:
|
|
@@ -8103,11 +8131,14 @@ declare namespace Components {
|
|
|
8103
8131
|
*/
|
|
8104
8132
|
code: string;
|
|
8105
8133
|
/**
|
|
8106
|
-
* The redirect uri
|
|
8134
|
+
* The redirect uri used in the authorization request. Optional: when omitted it is
|
|
8135
|
+
* resolved server-side from the provider's configured `redirect_uri`, falling back to
|
|
8136
|
+
* the portal's own callback route (`https://<domain>/sso`).
|
|
8137
|
+
*
|
|
8107
8138
|
* example:
|
|
8108
|
-
* https://customer-portal.com/
|
|
8139
|
+
* https://customer-portal.com/sso
|
|
8109
8140
|
*/
|
|
8110
|
-
redirect_uri
|
|
8141
|
+
redirect_uri?: string;
|
|
8111
8142
|
/**
|
|
8112
8143
|
* The client id
|
|
8113
8144
|
* example:
|
|
@@ -9011,6 +9042,10 @@ declare namespace Components {
|
|
|
9011
9042
|
* Configures which 360 events generate an in-app notification for the portal user. Each enabled trigger renders the referenced notification template and creates a notification addressed to the portal user. Admin/builder-only — never exposed via the public portal config.
|
|
9012
9043
|
*/
|
|
9013
9044
|
notification_triggers?: NotificationTriggerConfig[];
|
|
9045
|
+
/**
|
|
9046
|
+
* Master toggle for the portal's engagement center (in-app notifications including the notification triggers above). Off when absent — portal users only see the engagement center and receive trigger notifications after an admin enables it.
|
|
9047
|
+
*/
|
|
9048
|
+
engagement_center_enabled?: boolean;
|
|
9014
9049
|
}
|
|
9015
9050
|
export interface UpsertPortalConfigV3 {
|
|
9016
9051
|
/**
|
|
@@ -9664,7 +9699,7 @@ declare namespace Components {
|
|
|
9664
9699
|
/**
|
|
9665
9700
|
* Intervals supported for the current context. If omitted, all intervals are assumed supported.
|
|
9666
9701
|
*/
|
|
9667
|
-
intervals?: ("PT15M" | "PT1H" | "P1D" | "P1M")[];
|
|
9702
|
+
intervals?: ("PT15M" | "PT1H" | "P1D" | "P1M" | "P1Y")[];
|
|
9668
9703
|
data_range?: /* Earliest / latest timestamps for which data is available in the current context. */ VisualizationDataRange;
|
|
9669
9704
|
}
|
|
9670
9705
|
export interface VisualizationTypeOption {
|
|
@@ -11355,7 +11390,7 @@ declare namespace Paths {
|
|
|
11355
11390
|
export type ExtensionId = string;
|
|
11356
11391
|
export type From = string; // date-time
|
|
11357
11392
|
export type HookId = string;
|
|
11358
|
-
export type Interval = "PT15M" | "PT1H" | "P1D" | "P1M";
|
|
11393
|
+
export type Interval = "PT15M" | "PT1H" | "P1D" | "P1M" | "P1Y";
|
|
11359
11394
|
export type MeterId = string;
|
|
11360
11395
|
export type To = string; // date-time
|
|
11361
11396
|
}
|
|
@@ -11712,7 +11747,7 @@ declare namespace Paths {
|
|
|
11712
11747
|
export type ExtensionId = string;
|
|
11713
11748
|
export type From = string; // date-time
|
|
11714
11749
|
export type HookId = string;
|
|
11715
|
-
export type Interval = "PT15M" | "PT1H" | "P1D" | "P1M";
|
|
11750
|
+
export type Interval = "PT15M" | "PT1H" | "P1D" | "P1M" | "P1Y";
|
|
11716
11751
|
export type MeterId = string;
|
|
11717
11752
|
export type To = string; // date-time
|
|
11718
11753
|
}
|
|
@@ -13558,6 +13593,10 @@ declare namespace Paths {
|
|
|
13558
13593
|
* Configures which 360 events generate an in-app notification for the portal user. Each enabled trigger renders the referenced notification template and creates a notification addressed to the portal user. Admin/builder-only — never exposed via the public portal config.
|
|
13559
13594
|
*/
|
|
13560
13595
|
notification_triggers?: Components.Schemas.NotificationTriggerConfig[];
|
|
13596
|
+
/**
|
|
13597
|
+
* Master toggle for the portal's engagement center (in-app notifications including the notification triggers above). Off when absent — portal users only see the engagement center and receive trigger notifications after an admin enables it.
|
|
13598
|
+
*/
|
|
13599
|
+
engagement_center_enabled?: boolean;
|
|
13561
13600
|
/**
|
|
13562
13601
|
* ID of the organization
|
|
13563
13602
|
* example:
|
|
@@ -14180,6 +14219,10 @@ declare namespace Paths {
|
|
|
14180
14219
|
* Configures which 360 events generate an in-app notification for the portal user. Each enabled trigger renders the referenced notification template and creates a notification addressed to the portal user. Admin/builder-only — never exposed via the public portal config.
|
|
14181
14220
|
*/
|
|
14182
14221
|
notification_triggers?: Components.Schemas.NotificationTriggerConfig[];
|
|
14222
|
+
/**
|
|
14223
|
+
* Master toggle for the portal's engagement center (in-app notifications including the notification triggers above). Off when absent — portal users only see the engagement center and receive trigger notifications after an admin enables it.
|
|
14224
|
+
*/
|
|
14225
|
+
engagement_center_enabled?: boolean;
|
|
14183
14226
|
/**
|
|
14184
14227
|
* ID of the organization
|
|
14185
14228
|
* example:
|
|
@@ -14580,7 +14623,7 @@ declare namespace Paths {
|
|
|
14580
14623
|
export type ExtensionId = string;
|
|
14581
14624
|
export type From = string; // date-time
|
|
14582
14625
|
export type HookId = string;
|
|
14583
|
-
export type Interval = "PT15M" | "PT1H" | "P1D" | "P1M";
|
|
14626
|
+
export type Interval = "PT15M" | "PT1H" | "P1D" | "P1M" | "P1Y";
|
|
14584
14627
|
export type MeterId = string;
|
|
14585
14628
|
export type To = string; // date-time
|
|
14586
14629
|
}
|
|
@@ -1460,6 +1460,10 @@ declare namespace Components {
|
|
|
1460
1460
|
* Configures which 360 events generate an in-app notification for the portal user. Each enabled trigger renders the referenced notification template and creates a notification addressed to the portal user. Admin/builder-only — never exposed via the public portal config.
|
|
1461
1461
|
*/
|
|
1462
1462
|
notification_triggers?: NotificationTriggerConfig[];
|
|
1463
|
+
/**
|
|
1464
|
+
* Master toggle for the portal's engagement center (in-app notifications including the notification triggers above). Off when absent — portal users only see the engagement center and receive trigger notifications after an admin enables it.
|
|
1465
|
+
*/
|
|
1466
|
+
engagement_center_enabled?: boolean;
|
|
1463
1467
|
}
|
|
1464
1468
|
export interface CommonConfigAttributesV3 {
|
|
1465
1469
|
/**
|
|
@@ -3290,7 +3294,27 @@ declare namespace Components {
|
|
|
3290
3294
|
templates?: {
|
|
3291
3295
|
[name: string]: string;
|
|
3292
3296
|
};
|
|
3293
|
-
|
|
3297
|
+
/**
|
|
3298
|
+
* Reference to admin-authored portal configuration (a page block or a global search configuration item) from which the API derives Handlebars templates server-side. This replaces client-supplied template strings so portal users can never submit arbitrary templates for resolution. When both a reference and raw `templates` are provided, the reference wins and the raw templates are ignored.
|
|
3299
|
+
*/
|
|
3300
|
+
templates_ref?: {
|
|
3301
|
+
/**
|
|
3302
|
+
* ID of the portal page to derive templates from. When given without `block_id`, templates are derived from every block of the page and returned resolved as a nested map keyed by block id (the entity detail page contract).
|
|
3303
|
+
*/
|
|
3304
|
+
page_id?: string;
|
|
3305
|
+
/**
|
|
3306
|
+
* ID of a block within the page. Templates are derived from the block's content according to its block type (e.g. meter_selector, meter_reading, entity_list).
|
|
3307
|
+
*/
|
|
3308
|
+
block_id?: string;
|
|
3309
|
+
/**
|
|
3310
|
+
* For blocks carrying a per-schema configuration array (entity_list), the id of the configuration item to derive templates from. Requires `page_id` and `block_id`.
|
|
3311
|
+
*/
|
|
3312
|
+
config_id?: string;
|
|
3313
|
+
/**
|
|
3314
|
+
* ID of the portal's `global_search` configuration item to derive search result templates and the group title template from. Mutually exclusive with `page_id`.
|
|
3315
|
+
*/
|
|
3316
|
+
global_search_config_id?: string;
|
|
3317
|
+
};
|
|
3294
3318
|
}
|
|
3295
3319
|
export interface EntityTemplates {
|
|
3296
3320
|
/**
|
|
@@ -6610,6 +6634,10 @@ declare namespace Components {
|
|
|
6610
6634
|
* Configures which 360 events generate an in-app notification for the portal user. Each enabled trigger renders the referenced notification template and creates a notification addressed to the portal user. Admin/builder-only — never exposed via the public portal config.
|
|
6611
6635
|
*/
|
|
6612
6636
|
notification_triggers?: NotificationTriggerConfig[];
|
|
6637
|
+
/**
|
|
6638
|
+
* Master toggle for the portal's engagement center (in-app notifications including the notification triggers above). Off when absent — portal users only see the engagement center and receive trigger notifications after an admin enables it.
|
|
6639
|
+
*/
|
|
6640
|
+
engagement_center_enabled?: boolean;
|
|
6613
6641
|
/**
|
|
6614
6642
|
* ID of the organization
|
|
6615
6643
|
* example:
|
|
@@ -8103,11 +8131,14 @@ declare namespace Components {
|
|
|
8103
8131
|
*/
|
|
8104
8132
|
code: string;
|
|
8105
8133
|
/**
|
|
8106
|
-
* The redirect uri
|
|
8134
|
+
* The redirect uri used in the authorization request. Optional: when omitted it is
|
|
8135
|
+
* resolved server-side from the provider's configured `redirect_uri`, falling back to
|
|
8136
|
+
* the portal's own callback route (`https://<domain>/sso`).
|
|
8137
|
+
*
|
|
8107
8138
|
* example:
|
|
8108
|
-
* https://customer-portal.com/
|
|
8139
|
+
* https://customer-portal.com/sso
|
|
8109
8140
|
*/
|
|
8110
|
-
redirect_uri
|
|
8141
|
+
redirect_uri?: string;
|
|
8111
8142
|
/**
|
|
8112
8143
|
* The client id
|
|
8113
8144
|
* example:
|
|
@@ -9011,6 +9042,10 @@ declare namespace Components {
|
|
|
9011
9042
|
* Configures which 360 events generate an in-app notification for the portal user. Each enabled trigger renders the referenced notification template and creates a notification addressed to the portal user. Admin/builder-only — never exposed via the public portal config.
|
|
9012
9043
|
*/
|
|
9013
9044
|
notification_triggers?: NotificationTriggerConfig[];
|
|
9045
|
+
/**
|
|
9046
|
+
* Master toggle for the portal's engagement center (in-app notifications including the notification triggers above). Off when absent — portal users only see the engagement center and receive trigger notifications after an admin enables it.
|
|
9047
|
+
*/
|
|
9048
|
+
engagement_center_enabled?: boolean;
|
|
9014
9049
|
}
|
|
9015
9050
|
export interface UpsertPortalConfigV3 {
|
|
9016
9051
|
/**
|
|
@@ -9664,7 +9699,7 @@ declare namespace Components {
|
|
|
9664
9699
|
/**
|
|
9665
9700
|
* Intervals supported for the current context. If omitted, all intervals are assumed supported.
|
|
9666
9701
|
*/
|
|
9667
|
-
intervals?: ("PT15M" | "PT1H" | "P1D" | "P1M")[];
|
|
9702
|
+
intervals?: ("PT15M" | "PT1H" | "P1D" | "P1M" | "P1Y")[];
|
|
9668
9703
|
data_range?: /* Earliest / latest timestamps for which data is available in the current context. */ VisualizationDataRange;
|
|
9669
9704
|
}
|
|
9670
9705
|
export interface VisualizationTypeOption {
|
|
@@ -11355,7 +11390,7 @@ declare namespace Paths {
|
|
|
11355
11390
|
export type ExtensionId = string;
|
|
11356
11391
|
export type From = string; // date-time
|
|
11357
11392
|
export type HookId = string;
|
|
11358
|
-
export type Interval = "PT15M" | "PT1H" | "P1D" | "P1M";
|
|
11393
|
+
export type Interval = "PT15M" | "PT1H" | "P1D" | "P1M" | "P1Y";
|
|
11359
11394
|
export type MeterId = string;
|
|
11360
11395
|
export type To = string; // date-time
|
|
11361
11396
|
}
|
|
@@ -11712,7 +11747,7 @@ declare namespace Paths {
|
|
|
11712
11747
|
export type ExtensionId = string;
|
|
11713
11748
|
export type From = string; // date-time
|
|
11714
11749
|
export type HookId = string;
|
|
11715
|
-
export type Interval = "PT15M" | "PT1H" | "P1D" | "P1M";
|
|
11750
|
+
export type Interval = "PT15M" | "PT1H" | "P1D" | "P1M" | "P1Y";
|
|
11716
11751
|
export type MeterId = string;
|
|
11717
11752
|
export type To = string; // date-time
|
|
11718
11753
|
}
|
|
@@ -13558,6 +13593,10 @@ declare namespace Paths {
|
|
|
13558
13593
|
* Configures which 360 events generate an in-app notification for the portal user. Each enabled trigger renders the referenced notification template and creates a notification addressed to the portal user. Admin/builder-only — never exposed via the public portal config.
|
|
13559
13594
|
*/
|
|
13560
13595
|
notification_triggers?: Components.Schemas.NotificationTriggerConfig[];
|
|
13596
|
+
/**
|
|
13597
|
+
* Master toggle for the portal's engagement center (in-app notifications including the notification triggers above). Off when absent — portal users only see the engagement center and receive trigger notifications after an admin enables it.
|
|
13598
|
+
*/
|
|
13599
|
+
engagement_center_enabled?: boolean;
|
|
13561
13600
|
/**
|
|
13562
13601
|
* ID of the organization
|
|
13563
13602
|
* example:
|
|
@@ -14180,6 +14219,10 @@ declare namespace Paths {
|
|
|
14180
14219
|
* Configures which 360 events generate an in-app notification for the portal user. Each enabled trigger renders the referenced notification template and creates a notification addressed to the portal user. Admin/builder-only — never exposed via the public portal config.
|
|
14181
14220
|
*/
|
|
14182
14221
|
notification_triggers?: Components.Schemas.NotificationTriggerConfig[];
|
|
14222
|
+
/**
|
|
14223
|
+
* Master toggle for the portal's engagement center (in-app notifications including the notification triggers above). Off when absent — portal users only see the engagement center and receive trigger notifications after an admin enables it.
|
|
14224
|
+
*/
|
|
14225
|
+
engagement_center_enabled?: boolean;
|
|
14183
14226
|
/**
|
|
14184
14227
|
* ID of the organization
|
|
14185
14228
|
* example:
|
|
@@ -14580,7 +14623,7 @@ declare namespace Paths {
|
|
|
14580
14623
|
export type ExtensionId = string;
|
|
14581
14624
|
export type From = string; // date-time
|
|
14582
14625
|
export type HookId = string;
|
|
14583
|
-
export type Interval = "PT15M" | "PT1H" | "P1D" | "P1M";
|
|
14626
|
+
export type Interval = "PT15M" | "PT1H" | "P1D" | "P1M" | "P1Y";
|
|
14584
14627
|
export type MeterId = string;
|
|
14585
14628
|
export type To = string; // date-time
|
|
14586
14629
|
}
|
package/dist/index.cjs
CHANGED
|
@@ -158,7 +158,7 @@ var _chunkADSWGLIVcjs = require('./chunk-ADSWGLIV.cjs');
|
|
|
158
158
|
|
|
159
159
|
|
|
160
160
|
|
|
161
|
-
var
|
|
161
|
+
var _chunkVB6VABGZcjs = require('./chunk-VB6VABGZ.cjs');
|
|
162
162
|
|
|
163
163
|
|
|
164
164
|
var _chunkNJK5F5TFcjs = require('./chunk-NJK5F5TF.cjs');
|
|
@@ -225,7 +225,7 @@ var resolveClient = (params) => {
|
|
|
225
225
|
}
|
|
226
226
|
if (!entry.instance) {
|
|
227
227
|
const definition = entry.loader();
|
|
228
|
-
entry.instance =
|
|
228
|
+
entry.instance = _chunkVB6VABGZcjs.createApiClient.call(void 0, {
|
|
229
229
|
definition,
|
|
230
230
|
token: state.token,
|
|
231
231
|
headers: state.globalHeaders,
|
|
@@ -258,7 +258,7 @@ var resetAllClients = (registry) => {
|
|
|
258
258
|
};
|
|
259
259
|
|
|
260
260
|
// src/apis/_registry.ts
|
|
261
|
-
var expandDef = (mod) =>
|
|
261
|
+
var expandDef = (mod) => _chunkVB6VABGZcjs.expand.call(void 0, _nullishCoalesce(mod.default, () => ( mod)));
|
|
262
262
|
var registerBuiltinApis = (registry) => {
|
|
263
263
|
registerApi({
|
|
264
264
|
registry,
|
|
@@ -601,9 +601,9 @@ var createSDK = () => {
|
|
|
601
601
|
const available = [...registry.keys()].join(", ");
|
|
602
602
|
throw new Error(`Unknown API: "${name}". Available: ${available}`);
|
|
603
603
|
}
|
|
604
|
-
return
|
|
604
|
+
return _chunkVB6VABGZcjs.createApiHandle.call(void 0, {
|
|
605
605
|
resolveClient: () => resolveClient({ registry, name, state }),
|
|
606
|
-
createClient: () =>
|
|
606
|
+
createClient: () => _chunkVB6VABGZcjs.createApiClient.call(void 0, { definition: entry.loader(), apiName: name }),
|
|
607
607
|
apiName: name
|
|
608
608
|
});
|
|
609
609
|
};
|
|
@@ -651,9 +651,9 @@ var createSDK = () => {
|
|
|
651
651
|
return interceptorUse;
|
|
652
652
|
}
|
|
653
653
|
case "help":
|
|
654
|
-
return (apiName) =>
|
|
654
|
+
return (apiName) => _chunkVB6VABGZcjs.help.call(void 0, apiName);
|
|
655
655
|
case "openapi":
|
|
656
|
-
return (apiName) =>
|
|
656
|
+
return (apiName) => _chunkVB6VABGZcjs.openapi.call(void 0, apiName);
|
|
657
657
|
case "then":
|
|
658
658
|
case "catch":
|
|
659
659
|
case "finally":
|
|
@@ -683,4 +683,4 @@ var epilot = createSDK();
|
|
|
683
683
|
|
|
684
684
|
|
|
685
685
|
|
|
686
|
-
exports.applyLargeResponseInterceptor = applyLargeResponseInterceptor; exports.applyRetryInterceptor = applyRetryInterceptor; exports.authorize =
|
|
686
|
+
exports.applyLargeResponseInterceptor = applyLargeResponseInterceptor; exports.applyRetryInterceptor = applyRetryInterceptor; exports.authorize = _chunkVB6VABGZcjs.authorize; exports.createSDK = createSDK; exports.epilot = epilot; exports.help = _chunkVB6VABGZcjs.help; exports.openapi = _chunkVB6VABGZcjs.openapi;
|
package/dist/index.d.cts
CHANGED
|
@@ -15,7 +15,7 @@ import { C as Client$8 } from './blueprint-manifest.d-BVxmCeu7.cjs';
|
|
|
15
15
|
import { C as Client$9 } from './calendar.d-mk-ltGpk.cjs';
|
|
16
16
|
import { C as Client$a } from './configuration-hub.d-Dv41yC3b.cjs';
|
|
17
17
|
import { C as Client$b } from './consent.d-C2PROHhX.cjs';
|
|
18
|
-
import { C as Client$c } from './customer-portal.d-
|
|
18
|
+
import { C as Client$c } from './customer-portal.d-DJHJY-vb.cjs';
|
|
19
19
|
import { C as Client$d } from './dashboard.d-BSevFHjf.cjs';
|
|
20
20
|
import { C as Client$e } from './data-governance.d-BbZ466j5.cjs';
|
|
21
21
|
import { C as Client$f } from './deduplication.d-Cueh8bDD.cjs';
|
|
@@ -47,7 +47,7 @@ import { C as Client$E } from './sandbox.d-BdbOFzDu.cjs';
|
|
|
47
47
|
import { C as Client$F } from './sharing.d-sOXq-gtz.cjs';
|
|
48
48
|
import { C as Client$G } from './snapshot.d-DT0zg2CS.cjs';
|
|
49
49
|
import { C as Client$H } from './submission.d-BamwfhXw.cjs';
|
|
50
|
-
import { C as Client$I } from './targeting.d-
|
|
50
|
+
import { C as Client$I } from './targeting.d-KcawmWBB.cjs';
|
|
51
51
|
import { C as Client$J } from './template-variables.d-Ble9TSBa.cjs';
|
|
52
52
|
import { C as Client$K } from './user.d-rqYtwsCz.cjs';
|
|
53
53
|
import { C as Client$L } from './validation-rules.d-CvGvBnMX.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ import { C as Client$8 } from './blueprint-manifest.d-BVxmCeu7.js';
|
|
|
15
15
|
import { C as Client$9 } from './calendar.d-mk-ltGpk.js';
|
|
16
16
|
import { C as Client$a } from './configuration-hub.d-Dv41yC3b.js';
|
|
17
17
|
import { C as Client$b } from './consent.d-C2PROHhX.js';
|
|
18
|
-
import { C as Client$c } from './customer-portal.d-
|
|
18
|
+
import { C as Client$c } from './customer-portal.d-DJHJY-vb.js';
|
|
19
19
|
import { C as Client$d } from './dashboard.d-BSevFHjf.js';
|
|
20
20
|
import { C as Client$e } from './data-governance.d-BbZ466j5.js';
|
|
21
21
|
import { C as Client$f } from './deduplication.d-Cueh8bDD.js';
|
|
@@ -47,7 +47,7 @@ import { C as Client$E } from './sandbox.d-BdbOFzDu.js';
|
|
|
47
47
|
import { C as Client$F } from './sharing.d-sOXq-gtz.js';
|
|
48
48
|
import { C as Client$G } from './snapshot.d-DT0zg2CS.js';
|
|
49
49
|
import { C as Client$H } from './submission.d-BamwfhXw.js';
|
|
50
|
-
import { C as Client$I } from './targeting.d-
|
|
50
|
+
import { C as Client$I } from './targeting.d-KcawmWBB.js';
|
|
51
51
|
import { C as Client$J } from './template-variables.d-Ble9TSBa.js';
|
|
52
52
|
import { C as Client$K } from './user.d-rqYtwsCz.js';
|
|
53
53
|
import { C as Client$L } from './validation-rules.d-CvGvBnMX.js';
|
package/dist/index.js
CHANGED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-NJK5F5TF.cjs');
|
|
2
|
+
|
|
3
|
+
// src/docs/targeting.json
|
|
4
|
+
var targeting_default = '# Targeting API\n\n- **Base URL:** `https://targeting.sls.epilot.io`\n- **Full API Docs:** [https://docs.epilot.io/api/targeting](https://docs.epilot.io/api/targeting)\n\n## Usage\n\n```ts\nimport { epilot } from \'@epilot/sdk\'\n\nepilot.authorize(() => \'<token>\')\nconst { data } = await epilot.targeting.changeCampaignStatus(...)\n```\n\n### Tree-shakeable import\n\n```ts\nimport { getClient, authorize } from \'@epilot/sdk/targeting\'\n\nconst targetingClient = getClient()\nauthorize(targetingClient, () => \'<token>\')\nconst { data } = await targetingClient.changeCampaignStatus(...)\n```\n\n## Operations\n\n**Campaign**\n- [`changeCampaignStatus`](#changecampaignstatus)\n- [`getCampaignJobStatus`](#getcampaignjobstatus)\n- [`getCampaignPortals`](#getcampaignportals)\n- [`setupCampaign`](#setupcampaign)\n- [`matchCampaigns`](#matchcampaigns)\n- [`discoverCampaigns`](#discovercampaigns)\n\n**Campaign Delivery**\n- [`retriggerCampaignAutomations`](#retriggercampaignautomations)\n\n**Target**\n- [`matchTargets`](#matchtargets)\n- [`getTargetQueries`](#gettargetqueries)\n\n**Campaign Recipient**\n- [`createRecipient`](#createrecipient)\n- [`updateRecipient`](#updaterecipient)\n- [`updateRecipientPortalStatus`](#updaterecipientportalstatus)\n- [`updateRecipientEntityUiStatus`](#updaterecipiententityuistatus)\n- [`restoreRecipientEntityUiStatus`](#restorerecipiententityuistatus)\n- [`getRecipients`](#getrecipients)\n- [`getEmailStats`](#getemailstats)\n\n**Schemas**\n- [`BaseError`](#baseerror)\n- [`ServerError`](#servererror)\n- [`ClientError`](#clienterror)\n- [`BaseUUID`](#baseuuid)\n- [`BaseNanoID`](#basenanoid)\n- [`BaseTags`](#basetags)\n- [`BaseRelation`](#baserelation)\n- [`BaseSystemId`](#basesystemid)\n- [`BaseEntityOwner`](#baseentityowner)\n- [`BaseEntityAcl`](#baseentityacl)\n- [`BaseSystemFields`](#basesystemfields)\n- [`BaseSystemFieldsRequired`](#basesystemfieldsrequired)\n- [`CampaignStatus`](#campaignstatus)\n- [`ExecutionSummaryItem`](#executionsummaryitem)\n- [`JobStatus`](#jobstatus)\n- [`Campaign`](#campaign)\n- [`Target`](#target)\n- [`MatchCampaignParams`](#matchcampaignparams)\n- [`NextBestAction`](#nextbestaction)\n- [`DiscoverCampaignsParams`](#discovercampaignsparams)\n- [`DiscoverResult`](#discoverresult)\n- [`MatchTargetParams`](#matchtargetparams)\n- [`GetTargetQueriesParams`](#gettargetqueriesparams)\n- [`TargetQueryResult`](#targetqueryresult)\n- [`AutomationStatus`](#automationstatus)\n- [`PortalStatus`](#portalstatus)\n- [`EntityUiStatus`](#entityuistatus)\n- [`EmailStatus`](#emailstatus)\n- [`EmailBounceType`](#emailbouncetype)\n- [`Recipient`](#recipient)\n- [`BaseRecipientPayload`](#baserecipientpayload)\n- [`AutomationRecipientPayload`](#automationrecipientpayload)\n- [`PortalRecipientPayload`](#portalrecipientpayload)\n- [`CreateRecipientPayload`](#createrecipientpayload)\n- [`UpdateRecipientPayload`](#updaterecipientpayload)\n- [`RetriggerAutomationsRequest`](#retriggerautomationsrequest)\n- [`RetriggerAutomationsResult`](#retriggerautomationsresult)\n- [`UpdatePortalStatusRequest`](#updateportalstatusrequest)\n- [`UpdateEntityUiStatusRequest`](#updateentityuistatusrequest)\n- [`SetupCampaignRequest`](#setupcampaignrequest)\n- [`SetupTariffChangeCampaignRequest`](#setuptariffchangecampaignrequest)\n- [`SetupTariffChangeCampaignResponse`](#setuptariffchangecampaignresponse)\n\n### `changeCampaignStatus`\n\nChange the status of a campaign to a desired status.\n\n`POST /v1/campaign/{campaign_id}/status`\n\n```ts\nconst { data } = await client.changeCampaignStatus({\n campaign_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "campaign": {\n "_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",\n "_org": "string",\n "_owners": [\n {\n "org_id": "123",\n "user_id": "123"\n }\n ],\n "_schema": "string",\n "_title": "string",\n "_tags": ["string"],\n "_created_at": "1970-01-01T00:00:00.000Z",\n "_updated_at": "1970-01-01T00:00:00.000Z",\n "_acl": {\n "view": ["org:456"],\n "edit": ["org:456"],\n "delete": ["org:456"]\n },\n "name": "string",\n "goal": "string",\n "status": "draft",\n "start_date": "1970-01-01",\n "end_date": "1970-01-01",\n "flow_id": "string",\n "job_id": "string",\n "target": {\n "$relation": [\n {\n "entity_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",\n "_tags": ["string"]\n }\n ]\n }\n }\n}\n```\n\n</details>\n\n---\n\n### `getCampaignJobStatus`\n\nGet the status of a campaign\'s automation job\n\n`GET /v1/campaign/{campaign_id}/job`\n\n```ts\nconst { data } = await client.getCampaignJobStatus({\n campaign_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "status": "queued",\n "execution_summary": [\n {\n "execution_id": "string",\n "execution_status": "string"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `getCampaignPortals`\n\nGet the list of portals and its widgets where the campaign is used.\n\n`GET /v1/campaign/{campaign_id}/portals`\n\n```ts\nconst { data } = await client.getCampaignPortals({\n campaign_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n[\n {\n "portal": {\n "origin": "string",\n "domain": "string",\n "name": "string"\n },\n "widgets": [\n {\n "id": "string",\n "headline": {\n "en": "string",\n "de": "string"\n }\n }\n ]\n }\n]\n```\n\n</details>\n\n---\n\n### `retriggerCampaignAutomations`\n\nRetrigger automation executions for specific campaign recipients that have failed.\n\n`POST /v1/campaign/{campaign_id}/automations:retrigger`\n\n```ts\nconst { data } = await client.retriggerCampaignAutomations(\n {\n campaign_id: \'example\',\n },\n {\n recipient_ids: [\'3fa85f64-5717-4562-b3fc-2c963f66afa6\']\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "message": "string",\n "results": [\n {\n "recipient_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "result": "success",\n "execution_id": "string",\n "error": "string"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `setupCampaign`\n\nCreates a `campaign` entity together with its related entities and configurations in a single call.\nUsed by the campaign wizard UI, but not restricted to it.\n\n`POST /v1/campaign:setup`\n\n```ts\nconst { data } = await client.setupCampaign(\n null,\n {\n type: \'tariff_change\',\n product_recommendation: {\n name: \'string\',\n source_product_id: \'b8c01433-5556-4e2b-aad4-6f5348d1df84\',\n source_price_id: \'b8c01433-5556-4e2b-aad4-6f5348d1df84\',\n offers: [\n {\n target_id: \'b8c01433-5556-4e2b-aad4-6f5348d1df84\',\n items: [\n {\n product_id: \'b8c01433-5556-4e2b-aad4-6f5348d1df84\',\n price_id: \'b8c01433-5556-4e2b-aad4-6f5348d1df84\',\n highlight_config: {}\n }\n ]\n }\n ]\n },\n campaign: {\n name: \'string\',\n goal: \'string\',\n target_ids: [\'b8c01433-5556-4e2b-aad4-6f5348d1df84\']\n },\n journey: {\n journey_id: \'b8c01433-5556-4e2b-aad4-6f5348d1df84\'\n },\n channels: {\n portal_widget: {\n portal_id: \'b8c01433-5556-4e2b-aad4-6f5348d1df84\',\n block_id: \'b8c01433-5556-4e2b-aad4-6f5348d1df84\'\n },\n email: {\n automation_id: \'b8c01433-5556-4e2b-aad4-6f5348d1df84\',\n template_id: \'b8c01433-5556-4e2b-aad4-6f5348d1df84\'\n }\n }\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "type": "tariff_change",\n "product_recommendation_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",\n "campaign_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",\n "journey_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",\n "portal_widget_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84"\n}\n```\n\n</details>\n\n---\n\n### `matchCampaigns`\n\nMatch campaigns based on target entities.\n\n`POST /v1/campaign:match`\n\n```ts\nconst { data } = await client.matchCampaigns(\n null,\n {\n entity_refs: [\n {\n entity_id: \'b8c01433-5556-4e2b-aad4-6f5348d1df84\',\n entity_schema: \'string\'\n }\n ],\n campaign_ids: [\'b8c01433-5556-4e2b-aad4-6f5348d1df84\']\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "hits": 0,\n "results": [\n {\n "campaign": {\n "_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",\n "_org": "string",\n "_owners": [\n {\n "org_id": "123",\n "user_id": "123"\n }\n ],\n "_schema": "string",\n "_title": "string",\n "_tags": ["string"],\n "_created_at": "1970-01-01T00:00:00.000Z",\n "_updated_at": "1970-01-01T00:00:00.000Z",\n "_acl": {\n "view": ["org:456"],\n "edit": ["org:456"],\n "delete": ["org:456"]\n },\n "name": "string",\n "goal": "string",\n "status": "draft",\n "start_date": "1970-01-01",\n "end_date": "1970-01-01",\n "flow_id": "string",\n "job_id": "string",\n "target": {\n "$relation": [\n {\n "entity_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",\n "_tags": ["string"]\n }\n ]\n }\n }\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `discoverCampaigns`\n\nGiven an entity, returns the Next Best Actions it should see on the Entity-UI channel.\n\n`POST /v1/campaign:discover`\n\n```ts\nconst { data } = await client.discoverCampaigns(\n null,\n {\n entity_id: \'b8c01433-5556-4e2b-aad4-6f5348d1df84\',\n entity_schema: \'string\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "hits": 0,\n "results": [\n {\n "campaign_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",\n "nba": {\n "category": "string",\n "icon": {\n "name": "string",\n "color": "string"\n },\n "title": "string",\n "body": "string",\n "priority": "medium",\n "is_dismissable": true,\n "cta": {\n "type": "journey",\n "target": "string",\n "context_params": [\n {\n "key": "string",\n "value": "string"\n }\n ]\n }\n },\n "status": "seen",\n "status_updated_at": "1970-01-01T00:00:00.000Z"\n }\n ],\n "dismissed": [\n {\n "campaign_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",\n "nba": {\n "category": "string",\n "icon": {\n "name": "string",\n "color": "string"\n },\n "title": "string",\n "body": "string",\n "priority": "medium",\n "is_dismissable": true,\n "cta": {\n "type": "journey",\n "target": "string",\n "context_params": [\n {\n "key": "string",\n "value": "string"\n }\n ]\n }\n },\n "status": "seen",\n "status_updated_at": "1970-01-01T00:00:00.000Z"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `matchTargets`\n\nFind targets from the provided list that include the provide entities.\n\n`POST /v1/target:match`\n\n```ts\nconst { data } = await client.matchTargets(\n null,\n {\n entity_refs: [\n {\n entity_id: \'b8c01433-5556-4e2b-aad4-6f5348d1df84\',\n entity_schema: \'string\'\n }\n ],\n target_ids: [\'b8c01433-5556-4e2b-aad4-6f5348d1df84\']\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "hits": 0,\n "results": [\n {\n "target": {\n "_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",\n "_org": "string",\n "_owners": [\n {\n "org_id": "123",\n "user_id": "123"\n }\n ],\n "_schema": "string",\n "_title": "string",\n "_tags": ["string"],\n "_created_at": "1970-01-01T00:00:00.000Z",\n "_updated_at": "1970-01-01T00:00:00.000Z",\n "_acl": {\n "view": ["org:456"],\n "edit": ["org:456"],\n "delete": ["org:456"]\n },\n "name": "string",\n "description": "string",\n "entity_schema": "string",\n "entity_filters": {}\n }\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `getTargetQueries`\n\nTransform target filters into Lucene queries for the provided target IDs.\nReturns the transformed query string for each target along with any errors encountered.\n\n`POST /v1/target/queries`\n\n```ts\nconst { data } = await client.getTargetQueries(\n null,\n {\n target_ids: [\'b8c01433-5556-4e2b-aad4-6f5348d1df84\']\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "results": [\n {\n "target_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",\n "query": "string",\n "error": "string"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `createRecipient`\n\nCreates a new recipient associated with a campaign.\n\n`POST /v1/campaign/{campaign_id}/recipient`\n\n```ts\nconst { data } = await client.createRecipient(\n {\n campaign_id: \'example\',\n },\n {\n entity_id: \'b8c01433-5556-4e2b-aad4-6f5348d1df84\',\n entity_schema: \'string\',\n automation_status: \'pending\',\n automation_execution_id: \'string\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "entity_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",\n "entity_schema": "string",\n "title": "string",\n "automation_status": "pending",\n "automation_execution_id": "string",\n "portal_status": "sent",\n "portal_status_updated_at": "1970-01-01T00:00:00.000Z",\n "portal_state": {},\n "entity_ui_status": "seen",\n "entity_ui_status_updated_at": "1970-01-01T00:00:00.000Z",\n "entity_ui_status_before_dismiss": "seen",\n "message_entity_id": "string",\n "email_status": "sent",\n "email_status_updated_at": "1970-01-01T00:00:00.000Z",\n "email_bounce_type": "permanent",\n "email_bounce_subtype": "string",\n "email_complaint_type": "string",\n "email_bounce_reason": "string",\n "email_send_error": {},\n "email_unsubscribed_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z"\n}\n```\n\n</details>\n\n---\n\n### `updateRecipient`\n\nUpdates a recipient\'s attributes.\n\n`PATCH /v1/campaign/{campaign_id}/recipient/{recipient_id}`\n\n```ts\nconst { data } = await client.updateRecipient(\n {\n campaign_id: \'example\',\n recipient_id: \'example\',\n },\n {\n automation_status: \'pending\',\n automation_execution_id: \'string\',\n portal_status: \'sent\',\n portal_state: {}\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "entity_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",\n "entity_schema": "string",\n "title": "string",\n "automation_status": "pending",\n "automation_execution_id": "string",\n "portal_status": "sent",\n "portal_status_updated_at": "1970-01-01T00:00:00.000Z",\n "portal_state": {},\n "entity_ui_status": "seen",\n "entity_ui_status_updated_at": "1970-01-01T00:00:00.000Z",\n "entity_ui_status_before_dismiss": "seen",\n "message_entity_id": "string",\n "email_status": "sent",\n "email_status_updated_at": "1970-01-01T00:00:00.000Z",\n "email_bounce_type": "permanent",\n "email_bounce_subtype": "string",\n "email_complaint_type": "string",\n "email_bounce_reason": "string",\n "email_send_error": {},\n "email_unsubscribed_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z"\n}\n```\n\n</details>\n\n---\n\n### `updateRecipientPortalStatus`\n\nUpdates the portal status for a specific campaign recipient.\nThe portal_status_updated_at timestamp is automatically set when the status changes.\n\n`PATCH /v1/campaign/{campaign_id}/recipient/{recipient_id}/portal:status`\n\n```ts\nconst { data } = await client.updateRecipientPortalStatus(\n {\n campaign_id: \'example\',\n recipient_id: \'example\',\n },\n {\n status: \'sent\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "entity_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",\n "entity_schema": "string",\n "title": "string",\n "automation_status": "pending",\n "automation_execution_id": "string",\n "portal_status": "sent",\n "portal_status_updated_at": "1970-01-01T00:00:00.000Z",\n "portal_state": {},\n "entity_ui_status": "seen",\n "entity_ui_status_updated_at": "1970-01-01T00:00:00.000Z",\n "entity_ui_status_before_dismiss": "seen",\n "message_entity_id": "string",\n "email_status": "sent",\n "email_status_updated_at": "1970-01-01T00:00:00.000Z",\n "email_bounce_type": "permanent",\n "email_bounce_subtype": "string",\n "email_complaint_type": "string",\n "email_bounce_reason": "string",\n "email_send_error": {},\n "email_unsubscribed_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z"\n}\n```\n\n</details>\n\n---\n\n### `updateRecipientEntityUiStatus`\n\nRecords a Next Best Action interaction for a recipient on the Entity-UI channel.\n\n`PATCH /v1/campaign/{campaign_id}/recipient/{recipient_id}/entity_ui:status`\n\n```ts\nconst { data } = await client.updateRecipientEntityUiStatus(\n {\n campaign_id: \'example\',\n recipient_id: \'example\',\n },\n {\n status: \'seen\',\n entity_schema: \'string\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "entity_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",\n "entity_schema": "string",\n "title": "string",\n "automation_status": "pending",\n "automation_execution_id": "string",\n "portal_status": "sent",\n "portal_status_updated_at": "1970-01-01T00:00:00.000Z",\n "portal_state": {},\n "entity_ui_status": "seen",\n "entity_ui_status_updated_at": "1970-01-01T00:00:00.000Z",\n "entity_ui_status_before_dismiss": "seen",\n "message_entity_id": "string",\n "email_status": "sent",\n "email_status_updated_at": "1970-01-01T00:00:00.000Z",\n "email_bounce_type": "permanent",\n "email_bounce_subtype": "string",\n "email_complaint_type": "string",\n "email_bounce_reason": "string",\n "email_send_error": {},\n "email_unsubscribed_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z"\n}\n```\n\n</details>\n\n---\n\n### `restoreRecipientEntityUiStatus`\n\nUndo a dismissal on the Entity-UI (Next Best Action) channel\n\n`POST /v1/campaign/{campaign_id}/recipient/{recipient_id}/entity_ui:restore`\n\n```ts\nconst { data } = await client.restoreRecipientEntityUiStatus({\n campaign_id: \'example\',\n recipient_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "entity_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",\n "entity_schema": "string",\n "title": "string",\n "automation_status": "pending",\n "automation_execution_id": "string",\n "portal_status": "sent",\n "portal_status_updated_at": "1970-01-01T00:00:00.000Z",\n "portal_state": {},\n "entity_ui_status": "seen",\n "entity_ui_status_updated_at": "1970-01-01T00:00:00.000Z",\n "entity_ui_status_before_dismiss": "seen",\n "message_entity_id": "string",\n "email_status": "sent",\n "email_status_updated_at": "1970-01-01T00:00:00.000Z",\n "email_bounce_type": "permanent",\n "email_bounce_subtype": "string",\n "email_complaint_type": "string",\n "email_bounce_reason": "string",\n "email_send_error": {},\n "email_unsubscribed_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z"\n}\n```\n\n</details>\n\n---\n\n### `getRecipients`\n\nGet a paginated list of recipients for a campaign.\n\n`GET /v1/campaign/{campaign_id}/recipients`\n\n```ts\nconst { data } = await client.getRecipients({\n campaign_id: \'example\',\n limit: 1,\n next: \'example\',\n q: \'example\',\n automation_status: [\'...\'],\n portal_status: \'example\',\n email_status: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "results": [\n {\n "entity_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",\n "entity_schema": "string",\n "title": "string",\n "automation_status": "pending",\n "automation_execution_id": "string",\n "portal_status": "sent",\n "portal_status_updated_at": "1970-01-01T00:00:00.000Z",\n "portal_state": {},\n "entity_ui_status": "seen",\n "entity_ui_status_updated_at": "1970-01-01T00:00:00.000Z",\n "entity_ui_status_before_dismiss": "seen",\n "message_entity_id": "string",\n "email_status": "sent",\n "email_status_updated_at": "1970-01-01T00:00:00.000Z",\n "email_bounce_type": "permanent",\n "email_bounce_subtype": "string",\n "email_complaint_type": "string",\n "email_bounce_reason": "string",\n "email_send_error": {},\n "email_unsubscribed_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z"\n }\n ],\n "next": "string",\n "total": 0\n}\n```\n\n</details>\n\n---\n\n### `getEmailStats`\n\nAggregate email delivery counts for a campaign, for the KPI summary on the campaign UI.\nCounts cover the email (automation) channel only; `total_emailed` is the number of\nrecipients with a recorded em\n\n`GET /v1/campaign/{campaign_id}/email-stats`\n\n```ts\nconst { data } = await client.getEmailStats({\n campaign_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "total_emailed": 0,\n "sent": 0,\n "delivered": 0,\n "bounced": 0,\n "bounced_hard": 0,\n "bounced_soft": 0,\n "complained": 0,\n "failed": 0,\n "unsubscribed": 0\n}\n```\n\n</details>\n\n---\n\n## Schemas\n\n### `BaseError`\n\n```ts\ntype BaseError = {\n status: number\n message: string\n}\n```\n\n### `ServerError`\n\n```ts\ntype ServerError = {\n status: number\n message: string\n}\n```\n\n### `ClientError`\n\nDescribes the structure of a client error response, which can be one of several types:\n1. `MessageError`: Contains a \'message\' field for general descriptive errors.\n2. `CodeError`: Contains a \'code\' field for specific, machine-readable error codes.\n3. `StatusedError`: Contains \'error\' and \'status\' f\n\n```ts\ntype ClientError = {\n message: string\n} | {\n code: "CAMPAIGN_NOT_FOUND" | "CAMPAIGN_HAS_NO_TARGET" | "CAMPAIGN_HAS_NO_DELIVERY_METHOD" | "INVALID_NEXT_BEST_ACTION" | "CAMPAIGN_HAS_JOB_IN_PROGRESS" | "CAMPAIGN_HAS_UNEXPECTED_STATUS" | "JOB_TOKEN_MISSING" | "TARGET_WITHOUT_FILTERS"\n} | {\n error: string\n status: number\n}\n```\n\n### `BaseUUID`\n\n```ts\ntype BaseUUID = string // uuid\n```\n\n### `BaseNanoID`\n\n```ts\ntype BaseNanoID = string\n```\n\n### `BaseTags`\n\n```ts\ntype BaseTags = string[]\n```\n\n### `BaseRelation`\n\n```ts\ntype BaseRelation = {\n $relation?: Array<{\n entity_id?: string // uuid\n _tags?: string[]\n }>\n}\n```\n\n### `BaseSystemId`\n\n```ts\ntype BaseSystemId = {\n _id: string // uuid\n}\n```\n\n### `BaseEntityOwner`\n\nThe user / organization owning this entity.\n\nNote: Owner implicitly has access to the entity regardless of ACLs.\n\n\n```ts\ntype BaseEntityOwner = {\n org_id: string\n user_id?: string\n}\n```\n\n### `BaseEntityAcl`\n\nAccess control list (ACL) for an entity. Defines sharing access to external orgs or users.\n\n```ts\ntype BaseEntityAcl = {\n view?: string[]\n edit?: string[]\n delete?: string[]\n}\n```\n\n### `BaseSystemFields`\n\n```ts\ntype BaseSystemFields = {\n _id?: string // uuid\n _org?: string\n _owners?: Array<{\n org_id: string\n user_id?: string\n }>\n _schema?: string\n _title?: string\n _tags?: string[]\n _created_at?: string // date-time\n _updated_at?: string // date-time\n _acl?: {\n view?: string[]\n edit?: string[]\n delete?: string[]\n }\n}\n```\n\n### `BaseSystemFieldsRequired`\n\n```ts\ntype BaseSystemFieldsRequired = object\n```\n\n### `CampaignStatus`\n\n```ts\ntype CampaignStatus = "draft" | "activating" | "active" | "inactive"\n```\n\n### `ExecutionSummaryItem`\n\n```ts\ntype ExecutionSummaryItem = {\n execution_id?: string\n execution_status?: string\n}\n```\n\n### `JobStatus`\n\n```ts\ntype JobStatus = {\n status?: "queued" | "processing" | "finished" | "failed" | "cancelled" | "send_report"\n execution_summary?: Array<{\n execution_id?: string\n execution_status?: string\n }>\n}\n```\n\n### `Campaign`\n\n```ts\ntype Campaign = {\n _id?: string // uuid\n _org?: string\n _owners?: Array<{\n org_id: string\n user_id?: string\n }>\n _schema?: string\n _title?: string\n _tags?: string[]\n _created_at?: string // date-time\n _updated_at?: string // date-time\n _acl?: {\n view?: string[]\n edit?: string[]\n delete?: string[]\n }\n name?: string\n goal?: string\n status?: "draft" | "activating" | "active" | "inactive"\n start_date?: string // date\n end_date?: string // date\n flow_id?: string\n job_id?: string\n target?: {\n $relation?: Array<{\n entity_id?: { ... }\n _tags?: { ... }\n }>\n }\n}\n```\n\n### `Target`\n\n```ts\ntype Target = {\n _id?: string // uuid\n _org?: string\n _owners?: Array<{\n org_id: string\n user_id?: string\n }>\n _schema?: string\n _title?: string\n _tags?: string[]\n _created_at?: string // date-time\n _updated_at?: string // date-time\n _acl?: {\n view?: string[]\n edit?: string[]\n delete?: string[]\n }\n name?: string\n description?: string\n entity_schema?: string\n entity_filters?: Record<string, unknown>\n}\n```\n\n### `MatchCampaignParams`\n\n```ts\ntype MatchCampaignParams = {\n entity_refs: Array<{\n entity_id: string // uuid\n entity_schema: string\n }>\n campaign_ids: string // uuid[]\n}\n```\n\n### `NextBestAction`\n\nA Next Best Action configured on a campaign\'s Entity-UI channel.\nThis is the canonical NBA contract shared by discovery (this API), authoring, and rendering.\nNBA content is single-language in v1; text fields may contain `{{placeholders}}` resolved at render time.\n\n\n```ts\ntype NextBestAction = {\n category?: string\n icon?: {\n name: string\n color?: string\n }\n title: string\n body?: string\n priority?: "low" | "medium" | "high"\n is_dismissable?: boolean\n cta: {\n type: "journey" | "workflow" | "flow"\n target: string\n context_params?: Array<{\n key: { ... }\n value: { ... }\n }>\n }\n}\n```\n\n### `DiscoverCampaignsParams`\n\n```ts\ntype DiscoverCampaignsParams = {\n entity_id: string // uuid\n entity_schema: string\n}\n```\n\n### `DiscoverResult`\n\nOne discovered Next Best Action, plus this entity\'s interaction state for it.\n\n```ts\ntype DiscoverResult = {\n campaign_id: string // uuid\n nba: {\n category?: string\n icon?: {\n name: { ... }\n color?: { ... }\n }\n title: string\n body?: string\n priority?: "low" | "medium" | "high"\n is_dismissable?: boolean\n cta: {\n type: { ... }\n target: { ... }\n context_params?: { ... }\n }\n }\n status?: "seen" | "dismissed" | "clicked"\n status_updated_at?: string // date-time\n}\n```\n\n### `MatchTargetParams`\n\n```ts\ntype MatchTargetParams = {\n entity_refs: Array<{\n entity_id: string // uuid\n entity_schema: string\n }>\n target_ids: string // uuid[]\n}\n```\n\n### `GetTargetQueriesParams`\n\n```ts\ntype GetTargetQueriesParams = {\n target_ids: string // uuid[]\n}\n```\n\n### `TargetQueryResult`\n\n```ts\ntype TargetQueryResult = {\n target_id: string // uuid\n query: string\n error?: string\n}\n```\n\n### `AutomationStatus`\n\n```ts\ntype AutomationStatus = "pending" | "in_progress" | "success" | "failed" | "cancelled"\n```\n\n### `PortalStatus`\n\n```ts\ntype PortalStatus = "sent" | "seen" | "dismissed" | "clicked"\n```\n\n### `EntityUiStatus`\n\nLifecycle status of a Next Best Action on the Entity-UI channel. Unlike the portal\nchannel there is no `sent` state: an NBA recipient is born at `seen`, the moment the\naction is first rendered to an agent.\n\n\n```ts\ntype EntityUiStatus = "seen" | "dismissed" | "clicked"\n```\n\n### `EmailStatus`\n\nDelivery status of the email a campaign\'s automation sends to a recipient. Set to `sent`\nonce the automation hands the email off, then updated asynchronously as SES notifications\narrive (`bounced` / `complained`; an SES Reject maps to `bounced`). `failed` is a send-time\nfailure (the automation execu\n\n```ts\ntype EmailStatus = "sent" | "delivered" | "bounced" | "complained" | "failed"\n```\n\n### `EmailBounceType`\n\nSES bounce classification: `permanent` (hard) or `transient` (soft).\n\n```ts\ntype EmailBounceType = "permanent" | "transient"\n```\n\n### `Recipient`\n\n```ts\ntype Recipient = {\n entity_id?: string // uuid\n entity_schema?: string\n title?: string\n automation_status?: "pending" | "in_progress" | "success" | "failed" | "cancelled"\n automation_execution_id?: string\n portal_status?: "sent" | "seen" | "dismissed" | "clicked"\n portal_status_updated_at?: string // date-time\n portal_state?: Record<string, unknown>\n entity_ui_status?: "seen" | "dismissed" | "clicked"\n entity_ui_status_updated_at?: string // date-time\n entity_ui_status_before_dismiss?: "seen" | "dismissed" | "clicked"\n message_entity_id?: string\n email_status?: "sent" | "delivered" | "bounced" | "complained" | "failed"\n email_status_updated_at?: string // date-time\n email_bounce_type?: "permanent" | "transient"\n email_bounce_subtype?: string\n email_complaint_type?: string\n email_bounce_reason?: string\n email_send_error?: Record<string, unknown>\n email_unsubscribed_at?: string // date-time\n updated_at?: string // date-time\n}\n```\n\n### `BaseRecipientPayload`\n\n```ts\ntype BaseRecipientPayload = {\n entity_id: string // uuid\n entity_schema: string\n}\n```\n\n### `AutomationRecipientPayload`\n\n```ts\ntype AutomationRecipientPayload = {\n automation_status: "pending" | "in_progress" | "success" | "failed" | "cancelled"\n automation_execution_id: string\n}\n```\n\n### `PortalRecipientPayload`\n\n```ts\ntype PortalRecipientPayload = {\n portal_status: "sent" | "seen" | "dismissed" | "clicked"\n portal_state?: Record<string, unknown>\n}\n```\n\n### `CreateRecipientPayload`\n\n```ts\ntype CreateRecipientPayload = {\n entity_id: string // uuid\n entity_schema: string\n automation_status: "pending" | "in_progress" | "success" | "failed" | "cancelled"\n automation_execution_id: string\n} | {\n entity_id: string // uuid\n entity_schema: string\n portal_status: "sent" | "seen" | "dismissed" | "clicked"\n portal_state?: Record<string, unknown>\n} | {\n entity_id: string // uuid\n entity_schema: string\n automation_status: "pending" | "in_progress" | "success" | "failed" | "cancelled"\n automation_execution_id: string\n portal_status: "sent" | "seen" | "dismissed" | "clicked"\n portal_state?: Record<string, unknown>\n}\n```\n\n### `UpdateRecipientPayload`\n\n```ts\ntype UpdateRecipientPayload = {\n automation_status?: "pending" | "in_progress" | "success" | "failed" | "cancelled"\n automation_execution_id?: string\n portal_status?: "sent" | "seen" | "dismissed" | "clicked"\n portal_state?: Record<string, unknown>\n}\n```\n\n### `RetriggerAutomationsRequest`\n\n```ts\ntype RetriggerAutomationsRequest = {\n recipient_ids: string // uuid[]\n}\n```\n\n### `RetriggerAutomationsResult`\n\n```ts\ntype RetriggerAutomationsResult = {\n recipient_id: string // uuid\n result: "success" | "failure" | "not_found" | "invalid_status"\n execution_id?: string\n error?: string\n}\n```\n\n### `UpdatePortalStatusRequest`\n\n```ts\ntype UpdatePortalStatusRequest = {\n status: "sent" | "seen" | "dismissed" | "clicked"\n}\n```\n\n### `UpdateEntityUiStatusRequest`\n\n```ts\ntype UpdateEntityUiStatusRequest = {\n status: "seen" | "dismissed" | "clicked"\n entity_schema?: string\n}\n```\n\n### `SetupCampaignRequest`\n\nDiscriminated by `type`. Each campaign variant has its own request shape;\nnew variants are added by introducing a new schema and extending the `oneOf` list.\n\n\n```ts\ntype SetupCampaignRequest = {\n type: "tariff_change"\n product_recommendation: {\n name?: string\n source_product_id?: string // uuid\n source_price_id?: string // uuid\n offers?: Array<{\n target_id?: { ... }\n items: { ... }\n }>\n }\n campaign: {\n name: string\n goal?: string\n target_ids: string // uuid[]\n }\n journey?: {\n journey_id: string // uuid\n }\n channels?: {\n portal_widget?: {\n portal_id: { ... }\n block_id: { ... }\n }\n email?: {\n automation_id?: { ... }\n template_id?: { ... }\n }\n }\n}\n```\n\n### `SetupTariffChangeCampaignRequest`\n\n```ts\ntype SetupTariffChangeCampaignRequest = {\n type: "tariff_change"\n product_recommendation: {\n name?: string\n source_product_id?: string // uuid\n source_price_id?: string // uuid\n offers?: Array<{\n target_id?: { ... }\n items: { ... }\n }>\n }\n campaign: {\n name: string\n goal?: string\n target_ids: string // uuid[]\n }\n journey?: {\n journey_id: string // uuid\n }\n channels?: {\n portal_widget?: {\n portal_id: { ... }\n block_id: { ... }\n }\n email?: {\n automation_id?: { ... }\n template_id?: { ... }\n }\n }\n}\n```\n\n### `SetupTariffChangeCampaignResponse`\n\n```ts\ntype SetupTariffChangeCampaignResponse = {\n type: "tariff_change"\n product_recommendation_id: string // uuid\n campaign_id: string // uuid\n journey_id?: string // uuid\n portal_widget_id?: string // uuid\n}\n```\n';
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
exports.default = targeting_default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import "./chunk-YPSWSI3M.js";
|
|
2
|
+
|
|
3
|
+
// src/docs/targeting.json
|
|
4
|
+
var targeting_default = '# Targeting API\n\n- **Base URL:** `https://targeting.sls.epilot.io`\n- **Full API Docs:** [https://docs.epilot.io/api/targeting](https://docs.epilot.io/api/targeting)\n\n## Usage\n\n```ts\nimport { epilot } from \'@epilot/sdk\'\n\nepilot.authorize(() => \'<token>\')\nconst { data } = await epilot.targeting.changeCampaignStatus(...)\n```\n\n### Tree-shakeable import\n\n```ts\nimport { getClient, authorize } from \'@epilot/sdk/targeting\'\n\nconst targetingClient = getClient()\nauthorize(targetingClient, () => \'<token>\')\nconst { data } = await targetingClient.changeCampaignStatus(...)\n```\n\n## Operations\n\n**Campaign**\n- [`changeCampaignStatus`](#changecampaignstatus)\n- [`getCampaignJobStatus`](#getcampaignjobstatus)\n- [`getCampaignPortals`](#getcampaignportals)\n- [`setupCampaign`](#setupcampaign)\n- [`matchCampaigns`](#matchcampaigns)\n- [`discoverCampaigns`](#discovercampaigns)\n\n**Campaign Delivery**\n- [`retriggerCampaignAutomations`](#retriggercampaignautomations)\n\n**Target**\n- [`matchTargets`](#matchtargets)\n- [`getTargetQueries`](#gettargetqueries)\n\n**Campaign Recipient**\n- [`createRecipient`](#createrecipient)\n- [`updateRecipient`](#updaterecipient)\n- [`updateRecipientPortalStatus`](#updaterecipientportalstatus)\n- [`updateRecipientEntityUiStatus`](#updaterecipiententityuistatus)\n- [`restoreRecipientEntityUiStatus`](#restorerecipiententityuistatus)\n- [`getRecipients`](#getrecipients)\n- [`getEmailStats`](#getemailstats)\n\n**Schemas**\n- [`BaseError`](#baseerror)\n- [`ServerError`](#servererror)\n- [`ClientError`](#clienterror)\n- [`BaseUUID`](#baseuuid)\n- [`BaseNanoID`](#basenanoid)\n- [`BaseTags`](#basetags)\n- [`BaseRelation`](#baserelation)\n- [`BaseSystemId`](#basesystemid)\n- [`BaseEntityOwner`](#baseentityowner)\n- [`BaseEntityAcl`](#baseentityacl)\n- [`BaseSystemFields`](#basesystemfields)\n- [`BaseSystemFieldsRequired`](#basesystemfieldsrequired)\n- [`CampaignStatus`](#campaignstatus)\n- [`ExecutionSummaryItem`](#executionsummaryitem)\n- [`JobStatus`](#jobstatus)\n- [`Campaign`](#campaign)\n- [`Target`](#target)\n- [`MatchCampaignParams`](#matchcampaignparams)\n- [`NextBestAction`](#nextbestaction)\n- [`DiscoverCampaignsParams`](#discovercampaignsparams)\n- [`DiscoverResult`](#discoverresult)\n- [`MatchTargetParams`](#matchtargetparams)\n- [`GetTargetQueriesParams`](#gettargetqueriesparams)\n- [`TargetQueryResult`](#targetqueryresult)\n- [`AutomationStatus`](#automationstatus)\n- [`PortalStatus`](#portalstatus)\n- [`EntityUiStatus`](#entityuistatus)\n- [`EmailStatus`](#emailstatus)\n- [`EmailBounceType`](#emailbouncetype)\n- [`Recipient`](#recipient)\n- [`BaseRecipientPayload`](#baserecipientpayload)\n- [`AutomationRecipientPayload`](#automationrecipientpayload)\n- [`PortalRecipientPayload`](#portalrecipientpayload)\n- [`CreateRecipientPayload`](#createrecipientpayload)\n- [`UpdateRecipientPayload`](#updaterecipientpayload)\n- [`RetriggerAutomationsRequest`](#retriggerautomationsrequest)\n- [`RetriggerAutomationsResult`](#retriggerautomationsresult)\n- [`UpdatePortalStatusRequest`](#updateportalstatusrequest)\n- [`UpdateEntityUiStatusRequest`](#updateentityuistatusrequest)\n- [`SetupCampaignRequest`](#setupcampaignrequest)\n- [`SetupTariffChangeCampaignRequest`](#setuptariffchangecampaignrequest)\n- [`SetupTariffChangeCampaignResponse`](#setuptariffchangecampaignresponse)\n\n### `changeCampaignStatus`\n\nChange the status of a campaign to a desired status.\n\n`POST /v1/campaign/{campaign_id}/status`\n\n```ts\nconst { data } = await client.changeCampaignStatus({\n campaign_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "campaign": {\n "_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",\n "_org": "string",\n "_owners": [\n {\n "org_id": "123",\n "user_id": "123"\n }\n ],\n "_schema": "string",\n "_title": "string",\n "_tags": ["string"],\n "_created_at": "1970-01-01T00:00:00.000Z",\n "_updated_at": "1970-01-01T00:00:00.000Z",\n "_acl": {\n "view": ["org:456"],\n "edit": ["org:456"],\n "delete": ["org:456"]\n },\n "name": "string",\n "goal": "string",\n "status": "draft",\n "start_date": "1970-01-01",\n "end_date": "1970-01-01",\n "flow_id": "string",\n "job_id": "string",\n "target": {\n "$relation": [\n {\n "entity_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",\n "_tags": ["string"]\n }\n ]\n }\n }\n}\n```\n\n</details>\n\n---\n\n### `getCampaignJobStatus`\n\nGet the status of a campaign\'s automation job\n\n`GET /v1/campaign/{campaign_id}/job`\n\n```ts\nconst { data } = await client.getCampaignJobStatus({\n campaign_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "status": "queued",\n "execution_summary": [\n {\n "execution_id": "string",\n "execution_status": "string"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `getCampaignPortals`\n\nGet the list of portals and its widgets where the campaign is used.\n\n`GET /v1/campaign/{campaign_id}/portals`\n\n```ts\nconst { data } = await client.getCampaignPortals({\n campaign_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n[\n {\n "portal": {\n "origin": "string",\n "domain": "string",\n "name": "string"\n },\n "widgets": [\n {\n "id": "string",\n "headline": {\n "en": "string",\n "de": "string"\n }\n }\n ]\n }\n]\n```\n\n</details>\n\n---\n\n### `retriggerCampaignAutomations`\n\nRetrigger automation executions for specific campaign recipients that have failed.\n\n`POST /v1/campaign/{campaign_id}/automations:retrigger`\n\n```ts\nconst { data } = await client.retriggerCampaignAutomations(\n {\n campaign_id: \'example\',\n },\n {\n recipient_ids: [\'3fa85f64-5717-4562-b3fc-2c963f66afa6\']\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "message": "string",\n "results": [\n {\n "recipient_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "result": "success",\n "execution_id": "string",\n "error": "string"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `setupCampaign`\n\nCreates a `campaign` entity together with its related entities and configurations in a single call.\nUsed by the campaign wizard UI, but not restricted to it.\n\n`POST /v1/campaign:setup`\n\n```ts\nconst { data } = await client.setupCampaign(\n null,\n {\n type: \'tariff_change\',\n product_recommendation: {\n name: \'string\',\n source_product_id: \'b8c01433-5556-4e2b-aad4-6f5348d1df84\',\n source_price_id: \'b8c01433-5556-4e2b-aad4-6f5348d1df84\',\n offers: [\n {\n target_id: \'b8c01433-5556-4e2b-aad4-6f5348d1df84\',\n items: [\n {\n product_id: \'b8c01433-5556-4e2b-aad4-6f5348d1df84\',\n price_id: \'b8c01433-5556-4e2b-aad4-6f5348d1df84\',\n highlight_config: {}\n }\n ]\n }\n ]\n },\n campaign: {\n name: \'string\',\n goal: \'string\',\n target_ids: [\'b8c01433-5556-4e2b-aad4-6f5348d1df84\']\n },\n journey: {\n journey_id: \'b8c01433-5556-4e2b-aad4-6f5348d1df84\'\n },\n channels: {\n portal_widget: {\n portal_id: \'b8c01433-5556-4e2b-aad4-6f5348d1df84\',\n block_id: \'b8c01433-5556-4e2b-aad4-6f5348d1df84\'\n },\n email: {\n automation_id: \'b8c01433-5556-4e2b-aad4-6f5348d1df84\',\n template_id: \'b8c01433-5556-4e2b-aad4-6f5348d1df84\'\n }\n }\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "type": "tariff_change",\n "product_recommendation_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",\n "campaign_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",\n "journey_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",\n "portal_widget_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84"\n}\n```\n\n</details>\n\n---\n\n### `matchCampaigns`\n\nMatch campaigns based on target entities.\n\n`POST /v1/campaign:match`\n\n```ts\nconst { data } = await client.matchCampaigns(\n null,\n {\n entity_refs: [\n {\n entity_id: \'b8c01433-5556-4e2b-aad4-6f5348d1df84\',\n entity_schema: \'string\'\n }\n ],\n campaign_ids: [\'b8c01433-5556-4e2b-aad4-6f5348d1df84\']\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "hits": 0,\n "results": [\n {\n "campaign": {\n "_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",\n "_org": "string",\n "_owners": [\n {\n "org_id": "123",\n "user_id": "123"\n }\n ],\n "_schema": "string",\n "_title": "string",\n "_tags": ["string"],\n "_created_at": "1970-01-01T00:00:00.000Z",\n "_updated_at": "1970-01-01T00:00:00.000Z",\n "_acl": {\n "view": ["org:456"],\n "edit": ["org:456"],\n "delete": ["org:456"]\n },\n "name": "string",\n "goal": "string",\n "status": "draft",\n "start_date": "1970-01-01",\n "end_date": "1970-01-01",\n "flow_id": "string",\n "job_id": "string",\n "target": {\n "$relation": [\n {\n "entity_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",\n "_tags": ["string"]\n }\n ]\n }\n }\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `discoverCampaigns`\n\nGiven an entity, returns the Next Best Actions it should see on the Entity-UI channel.\n\n`POST /v1/campaign:discover`\n\n```ts\nconst { data } = await client.discoverCampaigns(\n null,\n {\n entity_id: \'b8c01433-5556-4e2b-aad4-6f5348d1df84\',\n entity_schema: \'string\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "hits": 0,\n "results": [\n {\n "campaign_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",\n "nba": {\n "category": "string",\n "icon": {\n "name": "string",\n "color": "string"\n },\n "title": "string",\n "body": "string",\n "priority": "medium",\n "is_dismissable": true,\n "cta": {\n "type": "journey",\n "target": "string",\n "context_params": [\n {\n "key": "string",\n "value": "string"\n }\n ]\n }\n },\n "status": "seen",\n "status_updated_at": "1970-01-01T00:00:00.000Z"\n }\n ],\n "dismissed": [\n {\n "campaign_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",\n "nba": {\n "category": "string",\n "icon": {\n "name": "string",\n "color": "string"\n },\n "title": "string",\n "body": "string",\n "priority": "medium",\n "is_dismissable": true,\n "cta": {\n "type": "journey",\n "target": "string",\n "context_params": [\n {\n "key": "string",\n "value": "string"\n }\n ]\n }\n },\n "status": "seen",\n "status_updated_at": "1970-01-01T00:00:00.000Z"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `matchTargets`\n\nFind targets from the provided list that include the provide entities.\n\n`POST /v1/target:match`\n\n```ts\nconst { data } = await client.matchTargets(\n null,\n {\n entity_refs: [\n {\n entity_id: \'b8c01433-5556-4e2b-aad4-6f5348d1df84\',\n entity_schema: \'string\'\n }\n ],\n target_ids: [\'b8c01433-5556-4e2b-aad4-6f5348d1df84\']\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "hits": 0,\n "results": [\n {\n "target": {\n "_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",\n "_org": "string",\n "_owners": [\n {\n "org_id": "123",\n "user_id": "123"\n }\n ],\n "_schema": "string",\n "_title": "string",\n "_tags": ["string"],\n "_created_at": "1970-01-01T00:00:00.000Z",\n "_updated_at": "1970-01-01T00:00:00.000Z",\n "_acl": {\n "view": ["org:456"],\n "edit": ["org:456"],\n "delete": ["org:456"]\n },\n "name": "string",\n "description": "string",\n "entity_schema": "string",\n "entity_filters": {}\n }\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `getTargetQueries`\n\nTransform target filters into Lucene queries for the provided target IDs.\nReturns the transformed query string for each target along with any errors encountered.\n\n`POST /v1/target/queries`\n\n```ts\nconst { data } = await client.getTargetQueries(\n null,\n {\n target_ids: [\'b8c01433-5556-4e2b-aad4-6f5348d1df84\']\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "results": [\n {\n "target_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",\n "query": "string",\n "error": "string"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `createRecipient`\n\nCreates a new recipient associated with a campaign.\n\n`POST /v1/campaign/{campaign_id}/recipient`\n\n```ts\nconst { data } = await client.createRecipient(\n {\n campaign_id: \'example\',\n },\n {\n entity_id: \'b8c01433-5556-4e2b-aad4-6f5348d1df84\',\n entity_schema: \'string\',\n automation_status: \'pending\',\n automation_execution_id: \'string\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "entity_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",\n "entity_schema": "string",\n "title": "string",\n "automation_status": "pending",\n "automation_execution_id": "string",\n "portal_status": "sent",\n "portal_status_updated_at": "1970-01-01T00:00:00.000Z",\n "portal_state": {},\n "entity_ui_status": "seen",\n "entity_ui_status_updated_at": "1970-01-01T00:00:00.000Z",\n "entity_ui_status_before_dismiss": "seen",\n "message_entity_id": "string",\n "email_status": "sent",\n "email_status_updated_at": "1970-01-01T00:00:00.000Z",\n "email_bounce_type": "permanent",\n "email_bounce_subtype": "string",\n "email_complaint_type": "string",\n "email_bounce_reason": "string",\n "email_send_error": {},\n "email_unsubscribed_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z"\n}\n```\n\n</details>\n\n---\n\n### `updateRecipient`\n\nUpdates a recipient\'s attributes.\n\n`PATCH /v1/campaign/{campaign_id}/recipient/{recipient_id}`\n\n```ts\nconst { data } = await client.updateRecipient(\n {\n campaign_id: \'example\',\n recipient_id: \'example\',\n },\n {\n automation_status: \'pending\',\n automation_execution_id: \'string\',\n portal_status: \'sent\',\n portal_state: {}\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "entity_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",\n "entity_schema": "string",\n "title": "string",\n "automation_status": "pending",\n "automation_execution_id": "string",\n "portal_status": "sent",\n "portal_status_updated_at": "1970-01-01T00:00:00.000Z",\n "portal_state": {},\n "entity_ui_status": "seen",\n "entity_ui_status_updated_at": "1970-01-01T00:00:00.000Z",\n "entity_ui_status_before_dismiss": "seen",\n "message_entity_id": "string",\n "email_status": "sent",\n "email_status_updated_at": "1970-01-01T00:00:00.000Z",\n "email_bounce_type": "permanent",\n "email_bounce_subtype": "string",\n "email_complaint_type": "string",\n "email_bounce_reason": "string",\n "email_send_error": {},\n "email_unsubscribed_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z"\n}\n```\n\n</details>\n\n---\n\n### `updateRecipientPortalStatus`\n\nUpdates the portal status for a specific campaign recipient.\nThe portal_status_updated_at timestamp is automatically set when the status changes.\n\n`PATCH /v1/campaign/{campaign_id}/recipient/{recipient_id}/portal:status`\n\n```ts\nconst { data } = await client.updateRecipientPortalStatus(\n {\n campaign_id: \'example\',\n recipient_id: \'example\',\n },\n {\n status: \'sent\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "entity_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",\n "entity_schema": "string",\n "title": "string",\n "automation_status": "pending",\n "automation_execution_id": "string",\n "portal_status": "sent",\n "portal_status_updated_at": "1970-01-01T00:00:00.000Z",\n "portal_state": {},\n "entity_ui_status": "seen",\n "entity_ui_status_updated_at": "1970-01-01T00:00:00.000Z",\n "entity_ui_status_before_dismiss": "seen",\n "message_entity_id": "string",\n "email_status": "sent",\n "email_status_updated_at": "1970-01-01T00:00:00.000Z",\n "email_bounce_type": "permanent",\n "email_bounce_subtype": "string",\n "email_complaint_type": "string",\n "email_bounce_reason": "string",\n "email_send_error": {},\n "email_unsubscribed_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z"\n}\n```\n\n</details>\n\n---\n\n### `updateRecipientEntityUiStatus`\n\nRecords a Next Best Action interaction for a recipient on the Entity-UI channel.\n\n`PATCH /v1/campaign/{campaign_id}/recipient/{recipient_id}/entity_ui:status`\n\n```ts\nconst { data } = await client.updateRecipientEntityUiStatus(\n {\n campaign_id: \'example\',\n recipient_id: \'example\',\n },\n {\n status: \'seen\',\n entity_schema: \'string\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "entity_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",\n "entity_schema": "string",\n "title": "string",\n "automation_status": "pending",\n "automation_execution_id": "string",\n "portal_status": "sent",\n "portal_status_updated_at": "1970-01-01T00:00:00.000Z",\n "portal_state": {},\n "entity_ui_status": "seen",\n "entity_ui_status_updated_at": "1970-01-01T00:00:00.000Z",\n "entity_ui_status_before_dismiss": "seen",\n "message_entity_id": "string",\n "email_status": "sent",\n "email_status_updated_at": "1970-01-01T00:00:00.000Z",\n "email_bounce_type": "permanent",\n "email_bounce_subtype": "string",\n "email_complaint_type": "string",\n "email_bounce_reason": "string",\n "email_send_error": {},\n "email_unsubscribed_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z"\n}\n```\n\n</details>\n\n---\n\n### `restoreRecipientEntityUiStatus`\n\nUndo a dismissal on the Entity-UI (Next Best Action) channel\n\n`POST /v1/campaign/{campaign_id}/recipient/{recipient_id}/entity_ui:restore`\n\n```ts\nconst { data } = await client.restoreRecipientEntityUiStatus({\n campaign_id: \'example\',\n recipient_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "entity_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",\n "entity_schema": "string",\n "title": "string",\n "automation_status": "pending",\n "automation_execution_id": "string",\n "portal_status": "sent",\n "portal_status_updated_at": "1970-01-01T00:00:00.000Z",\n "portal_state": {},\n "entity_ui_status": "seen",\n "entity_ui_status_updated_at": "1970-01-01T00:00:00.000Z",\n "entity_ui_status_before_dismiss": "seen",\n "message_entity_id": "string",\n "email_status": "sent",\n "email_status_updated_at": "1970-01-01T00:00:00.000Z",\n "email_bounce_type": "permanent",\n "email_bounce_subtype": "string",\n "email_complaint_type": "string",\n "email_bounce_reason": "string",\n "email_send_error": {},\n "email_unsubscribed_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z"\n}\n```\n\n</details>\n\n---\n\n### `getRecipients`\n\nGet a paginated list of recipients for a campaign.\n\n`GET /v1/campaign/{campaign_id}/recipients`\n\n```ts\nconst { data } = await client.getRecipients({\n campaign_id: \'example\',\n limit: 1,\n next: \'example\',\n q: \'example\',\n automation_status: [\'...\'],\n portal_status: \'example\',\n email_status: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "results": [\n {\n "entity_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",\n "entity_schema": "string",\n "title": "string",\n "automation_status": "pending",\n "automation_execution_id": "string",\n "portal_status": "sent",\n "portal_status_updated_at": "1970-01-01T00:00:00.000Z",\n "portal_state": {},\n "entity_ui_status": "seen",\n "entity_ui_status_updated_at": "1970-01-01T00:00:00.000Z",\n "entity_ui_status_before_dismiss": "seen",\n "message_entity_id": "string",\n "email_status": "sent",\n "email_status_updated_at": "1970-01-01T00:00:00.000Z",\n "email_bounce_type": "permanent",\n "email_bounce_subtype": "string",\n "email_complaint_type": "string",\n "email_bounce_reason": "string",\n "email_send_error": {},\n "email_unsubscribed_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z"\n }\n ],\n "next": "string",\n "total": 0\n}\n```\n\n</details>\n\n---\n\n### `getEmailStats`\n\nAggregate email delivery counts for a campaign, for the KPI summary on the campaign UI.\nCounts cover the email (automation) channel only; `total_emailed` is the number of\nrecipients with a recorded em\n\n`GET /v1/campaign/{campaign_id}/email-stats`\n\n```ts\nconst { data } = await client.getEmailStats({\n campaign_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "total_emailed": 0,\n "sent": 0,\n "delivered": 0,\n "bounced": 0,\n "bounced_hard": 0,\n "bounced_soft": 0,\n "complained": 0,\n "failed": 0,\n "unsubscribed": 0\n}\n```\n\n</details>\n\n---\n\n## Schemas\n\n### `BaseError`\n\n```ts\ntype BaseError = {\n status: number\n message: string\n}\n```\n\n### `ServerError`\n\n```ts\ntype ServerError = {\n status: number\n message: string\n}\n```\n\n### `ClientError`\n\nDescribes the structure of a client error response, which can be one of several types:\n1. `MessageError`: Contains a \'message\' field for general descriptive errors.\n2. `CodeError`: Contains a \'code\' field for specific, machine-readable error codes.\n3. `StatusedError`: Contains \'error\' and \'status\' f\n\n```ts\ntype ClientError = {\n message: string\n} | {\n code: "CAMPAIGN_NOT_FOUND" | "CAMPAIGN_HAS_NO_TARGET" | "CAMPAIGN_HAS_NO_DELIVERY_METHOD" | "INVALID_NEXT_BEST_ACTION" | "CAMPAIGN_HAS_JOB_IN_PROGRESS" | "CAMPAIGN_HAS_UNEXPECTED_STATUS" | "JOB_TOKEN_MISSING" | "TARGET_WITHOUT_FILTERS"\n} | {\n error: string\n status: number\n}\n```\n\n### `BaseUUID`\n\n```ts\ntype BaseUUID = string // uuid\n```\n\n### `BaseNanoID`\n\n```ts\ntype BaseNanoID = string\n```\n\n### `BaseTags`\n\n```ts\ntype BaseTags = string[]\n```\n\n### `BaseRelation`\n\n```ts\ntype BaseRelation = {\n $relation?: Array<{\n entity_id?: string // uuid\n _tags?: string[]\n }>\n}\n```\n\n### `BaseSystemId`\n\n```ts\ntype BaseSystemId = {\n _id: string // uuid\n}\n```\n\n### `BaseEntityOwner`\n\nThe user / organization owning this entity.\n\nNote: Owner implicitly has access to the entity regardless of ACLs.\n\n\n```ts\ntype BaseEntityOwner = {\n org_id: string\n user_id?: string\n}\n```\n\n### `BaseEntityAcl`\n\nAccess control list (ACL) for an entity. Defines sharing access to external orgs or users.\n\n```ts\ntype BaseEntityAcl = {\n view?: string[]\n edit?: string[]\n delete?: string[]\n}\n```\n\n### `BaseSystemFields`\n\n```ts\ntype BaseSystemFields = {\n _id?: string // uuid\n _org?: string\n _owners?: Array<{\n org_id: string\n user_id?: string\n }>\n _schema?: string\n _title?: string\n _tags?: string[]\n _created_at?: string // date-time\n _updated_at?: string // date-time\n _acl?: {\n view?: string[]\n edit?: string[]\n delete?: string[]\n }\n}\n```\n\n### `BaseSystemFieldsRequired`\n\n```ts\ntype BaseSystemFieldsRequired = object\n```\n\n### `CampaignStatus`\n\n```ts\ntype CampaignStatus = "draft" | "activating" | "active" | "inactive"\n```\n\n### `ExecutionSummaryItem`\n\n```ts\ntype ExecutionSummaryItem = {\n execution_id?: string\n execution_status?: string\n}\n```\n\n### `JobStatus`\n\n```ts\ntype JobStatus = {\n status?: "queued" | "processing" | "finished" | "failed" | "cancelled" | "send_report"\n execution_summary?: Array<{\n execution_id?: string\n execution_status?: string\n }>\n}\n```\n\n### `Campaign`\n\n```ts\ntype Campaign = {\n _id?: string // uuid\n _org?: string\n _owners?: Array<{\n org_id: string\n user_id?: string\n }>\n _schema?: string\n _title?: string\n _tags?: string[]\n _created_at?: string // date-time\n _updated_at?: string // date-time\n _acl?: {\n view?: string[]\n edit?: string[]\n delete?: string[]\n }\n name?: string\n goal?: string\n status?: "draft" | "activating" | "active" | "inactive"\n start_date?: string // date\n end_date?: string // date\n flow_id?: string\n job_id?: string\n target?: {\n $relation?: Array<{\n entity_id?: { ... }\n _tags?: { ... }\n }>\n }\n}\n```\n\n### `Target`\n\n```ts\ntype Target = {\n _id?: string // uuid\n _org?: string\n _owners?: Array<{\n org_id: string\n user_id?: string\n }>\n _schema?: string\n _title?: string\n _tags?: string[]\n _created_at?: string // date-time\n _updated_at?: string // date-time\n _acl?: {\n view?: string[]\n edit?: string[]\n delete?: string[]\n }\n name?: string\n description?: string\n entity_schema?: string\n entity_filters?: Record<string, unknown>\n}\n```\n\n### `MatchCampaignParams`\n\n```ts\ntype MatchCampaignParams = {\n entity_refs: Array<{\n entity_id: string // uuid\n entity_schema: string\n }>\n campaign_ids: string // uuid[]\n}\n```\n\n### `NextBestAction`\n\nA Next Best Action configured on a campaign\'s Entity-UI channel.\nThis is the canonical NBA contract shared by discovery (this API), authoring, and rendering.\nNBA content is single-language in v1; text fields may contain `{{placeholders}}` resolved at render time.\n\n\n```ts\ntype NextBestAction = {\n category?: string\n icon?: {\n name: string\n color?: string\n }\n title: string\n body?: string\n priority?: "low" | "medium" | "high"\n is_dismissable?: boolean\n cta: {\n type: "journey" | "workflow" | "flow"\n target: string\n context_params?: Array<{\n key: { ... }\n value: { ... }\n }>\n }\n}\n```\n\n### `DiscoverCampaignsParams`\n\n```ts\ntype DiscoverCampaignsParams = {\n entity_id: string // uuid\n entity_schema: string\n}\n```\n\n### `DiscoverResult`\n\nOne discovered Next Best Action, plus this entity\'s interaction state for it.\n\n```ts\ntype DiscoverResult = {\n campaign_id: string // uuid\n nba: {\n category?: string\n icon?: {\n name: { ... }\n color?: { ... }\n }\n title: string\n body?: string\n priority?: "low" | "medium" | "high"\n is_dismissable?: boolean\n cta: {\n type: { ... }\n target: { ... }\n context_params?: { ... }\n }\n }\n status?: "seen" | "dismissed" | "clicked"\n status_updated_at?: string // date-time\n}\n```\n\n### `MatchTargetParams`\n\n```ts\ntype MatchTargetParams = {\n entity_refs: Array<{\n entity_id: string // uuid\n entity_schema: string\n }>\n target_ids: string // uuid[]\n}\n```\n\n### `GetTargetQueriesParams`\n\n```ts\ntype GetTargetQueriesParams = {\n target_ids: string // uuid[]\n}\n```\n\n### `TargetQueryResult`\n\n```ts\ntype TargetQueryResult = {\n target_id: string // uuid\n query: string\n error?: string\n}\n```\n\n### `AutomationStatus`\n\n```ts\ntype AutomationStatus = "pending" | "in_progress" | "success" | "failed" | "cancelled"\n```\n\n### `PortalStatus`\n\n```ts\ntype PortalStatus = "sent" | "seen" | "dismissed" | "clicked"\n```\n\n### `EntityUiStatus`\n\nLifecycle status of a Next Best Action on the Entity-UI channel. Unlike the portal\nchannel there is no `sent` state: an NBA recipient is born at `seen`, the moment the\naction is first rendered to an agent.\n\n\n```ts\ntype EntityUiStatus = "seen" | "dismissed" | "clicked"\n```\n\n### `EmailStatus`\n\nDelivery status of the email a campaign\'s automation sends to a recipient. Set to `sent`\nonce the automation hands the email off, then updated asynchronously as SES notifications\narrive (`bounced` / `complained`; an SES Reject maps to `bounced`). `failed` is a send-time\nfailure (the automation execu\n\n```ts\ntype EmailStatus = "sent" | "delivered" | "bounced" | "complained" | "failed"\n```\n\n### `EmailBounceType`\n\nSES bounce classification: `permanent` (hard) or `transient` (soft).\n\n```ts\ntype EmailBounceType = "permanent" | "transient"\n```\n\n### `Recipient`\n\n```ts\ntype Recipient = {\n entity_id?: string // uuid\n entity_schema?: string\n title?: string\n automation_status?: "pending" | "in_progress" | "success" | "failed" | "cancelled"\n automation_execution_id?: string\n portal_status?: "sent" | "seen" | "dismissed" | "clicked"\n portal_status_updated_at?: string // date-time\n portal_state?: Record<string, unknown>\n entity_ui_status?: "seen" | "dismissed" | "clicked"\n entity_ui_status_updated_at?: string // date-time\n entity_ui_status_before_dismiss?: "seen" | "dismissed" | "clicked"\n message_entity_id?: string\n email_status?: "sent" | "delivered" | "bounced" | "complained" | "failed"\n email_status_updated_at?: string // date-time\n email_bounce_type?: "permanent" | "transient"\n email_bounce_subtype?: string\n email_complaint_type?: string\n email_bounce_reason?: string\n email_send_error?: Record<string, unknown>\n email_unsubscribed_at?: string // date-time\n updated_at?: string // date-time\n}\n```\n\n### `BaseRecipientPayload`\n\n```ts\ntype BaseRecipientPayload = {\n entity_id: string // uuid\n entity_schema: string\n}\n```\n\n### `AutomationRecipientPayload`\n\n```ts\ntype AutomationRecipientPayload = {\n automation_status: "pending" | "in_progress" | "success" | "failed" | "cancelled"\n automation_execution_id: string\n}\n```\n\n### `PortalRecipientPayload`\n\n```ts\ntype PortalRecipientPayload = {\n portal_status: "sent" | "seen" | "dismissed" | "clicked"\n portal_state?: Record<string, unknown>\n}\n```\n\n### `CreateRecipientPayload`\n\n```ts\ntype CreateRecipientPayload = {\n entity_id: string // uuid\n entity_schema: string\n automation_status: "pending" | "in_progress" | "success" | "failed" | "cancelled"\n automation_execution_id: string\n} | {\n entity_id: string // uuid\n entity_schema: string\n portal_status: "sent" | "seen" | "dismissed" | "clicked"\n portal_state?: Record<string, unknown>\n} | {\n entity_id: string // uuid\n entity_schema: string\n automation_status: "pending" | "in_progress" | "success" | "failed" | "cancelled"\n automation_execution_id: string\n portal_status: "sent" | "seen" | "dismissed" | "clicked"\n portal_state?: Record<string, unknown>\n}\n```\n\n### `UpdateRecipientPayload`\n\n```ts\ntype UpdateRecipientPayload = {\n automation_status?: "pending" | "in_progress" | "success" | "failed" | "cancelled"\n automation_execution_id?: string\n portal_status?: "sent" | "seen" | "dismissed" | "clicked"\n portal_state?: Record<string, unknown>\n}\n```\n\n### `RetriggerAutomationsRequest`\n\n```ts\ntype RetriggerAutomationsRequest = {\n recipient_ids: string // uuid[]\n}\n```\n\n### `RetriggerAutomationsResult`\n\n```ts\ntype RetriggerAutomationsResult = {\n recipient_id: string // uuid\n result: "success" | "failure" | "not_found" | "invalid_status"\n execution_id?: string\n error?: string\n}\n```\n\n### `UpdatePortalStatusRequest`\n\n```ts\ntype UpdatePortalStatusRequest = {\n status: "sent" | "seen" | "dismissed" | "clicked"\n}\n```\n\n### `UpdateEntityUiStatusRequest`\n\n```ts\ntype UpdateEntityUiStatusRequest = {\n status: "seen" | "dismissed" | "clicked"\n entity_schema?: string\n}\n```\n\n### `SetupCampaignRequest`\n\nDiscriminated by `type`. Each campaign variant has its own request shape;\nnew variants are added by introducing a new schema and extending the `oneOf` list.\n\n\n```ts\ntype SetupCampaignRequest = {\n type: "tariff_change"\n product_recommendation: {\n name?: string\n source_product_id?: string // uuid\n source_price_id?: string // uuid\n offers?: Array<{\n target_id?: { ... }\n items: { ... }\n }>\n }\n campaign: {\n name: string\n goal?: string\n target_ids: string // uuid[]\n }\n journey?: {\n journey_id: string // uuid\n }\n channels?: {\n portal_widget?: {\n portal_id: { ... }\n block_id: { ... }\n }\n email?: {\n automation_id?: { ... }\n template_id?: { ... }\n }\n }\n}\n```\n\n### `SetupTariffChangeCampaignRequest`\n\n```ts\ntype SetupTariffChangeCampaignRequest = {\n type: "tariff_change"\n product_recommendation: {\n name?: string\n source_product_id?: string // uuid\n source_price_id?: string // uuid\n offers?: Array<{\n target_id?: { ... }\n items: { ... }\n }>\n }\n campaign: {\n name: string\n goal?: string\n target_ids: string // uuid[]\n }\n journey?: {\n journey_id: string // uuid\n }\n channels?: {\n portal_widget?: {\n portal_id: { ... }\n block_id: { ... }\n }\n email?: {\n automation_id?: { ... }\n template_id?: { ... }\n }\n }\n}\n```\n\n### `SetupTariffChangeCampaignResponse`\n\n```ts\ntype SetupTariffChangeCampaignResponse = {\n type: "tariff_change"\n product_recommendation_id: string // uuid\n campaign_id: string // uuid\n journey_id?: string // uuid\n portal_widget_id?: string // uuid\n}\n```\n';
|
|
5
|
+
export {
|
|
6
|
+
targeting_default as default
|
|
7
|
+
};
|
|
@@ -108,6 +108,10 @@ declare namespace Components {
|
|
|
108
108
|
bounced_soft: number;
|
|
109
109
|
complained: number;
|
|
110
110
|
failed: number;
|
|
111
|
+
/**
|
|
112
|
+
* Recipients who opted out of email marketing.
|
|
113
|
+
*/
|
|
114
|
+
unsubscribed: number;
|
|
111
115
|
}
|
|
112
116
|
export interface GetTargetQueriesResponse {
|
|
113
117
|
/**
|
|
@@ -1663,6 +1667,10 @@ declare namespace Components {
|
|
|
1663
1667
|
email_send_error?: {
|
|
1664
1668
|
[name: string]: any;
|
|
1665
1669
|
};
|
|
1670
|
+
/**
|
|
1671
|
+
* When the contact unsubscribed from email marketing (opted out). Server-managed.
|
|
1672
|
+
*/
|
|
1673
|
+
email_unsubscribed_at?: string; // date-time
|
|
1666
1674
|
updated_at?: string; // date-time
|
|
1667
1675
|
}
|
|
1668
1676
|
export interface RetriggerAutomationsRequest {
|