@epilot/sdk 2.14.0 → 2.14.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (167) hide show
  1. package/definitions/access-token.json +18 -0
  2. package/definitions/customer-portal-runtime.json +1 -1
  3. package/definitions/customer-portal.json +119 -0
  4. package/definitions/targeting-runtime.json +1 -1
  5. package/definitions/targeting.json +291 -0
  6. package/definitions/workflow-definition-runtime.json +1 -1
  7. package/definitions/workflow-definition.json +6 -2
  8. package/dist/access-token-7Y2MDFZH.cjs +7 -0
  9. package/dist/access-token-NWN7UBUP.js +7 -0
  10. package/dist/{access-token.d-CegaQmrK.d.cts → access-token.d-BhRUc8I-.d.cts} +38 -1
  11. package/dist/{access-token.d-CegaQmrK.d.ts → access-token.d-BhRUc8I-.d.ts} +38 -1
  12. package/dist/apis/access-token.cjs +6 -6
  13. package/dist/apis/access-token.d.cts +2 -2
  14. package/dist/apis/access-token.d.ts +2 -2
  15. package/dist/apis/access-token.js +1 -1
  16. package/dist/apis/address-suggestions.cjs +6 -6
  17. package/dist/apis/address-suggestions.js +1 -1
  18. package/dist/apis/address.cjs +6 -6
  19. package/dist/apis/address.js +1 -1
  20. package/dist/apis/ai-agents.cjs +6 -6
  21. package/dist/apis/ai-agents.js +1 -1
  22. package/dist/apis/app.cjs +6 -6
  23. package/dist/apis/app.js +1 -1
  24. package/dist/apis/audit-logs.cjs +6 -6
  25. package/dist/apis/audit-logs.js +1 -1
  26. package/dist/apis/automation.cjs +6 -6
  27. package/dist/apis/automation.js +1 -1
  28. package/dist/apis/billing.cjs +6 -6
  29. package/dist/apis/billing.js +1 -1
  30. package/dist/apis/blueprint-manifest.cjs +6 -6
  31. package/dist/apis/blueprint-manifest.js +1 -1
  32. package/dist/apis/calendar.cjs +6 -6
  33. package/dist/apis/calendar.js +1 -1
  34. package/dist/apis/configuration-hub.cjs +6 -6
  35. package/dist/apis/configuration-hub.js +1 -1
  36. package/dist/apis/consent.cjs +6 -6
  37. package/dist/apis/consent.js +1 -1
  38. package/dist/apis/customer-portal.cjs +8 -8
  39. package/dist/apis/customer-portal.d.cts +2 -2
  40. package/dist/apis/customer-portal.d.ts +2 -2
  41. package/dist/apis/customer-portal.js +2 -2
  42. package/dist/apis/dashboard.cjs +6 -6
  43. package/dist/apis/dashboard.js +1 -1
  44. package/dist/apis/data-governance.cjs +6 -6
  45. package/dist/apis/data-governance.js +1 -1
  46. package/dist/apis/deduplication.cjs +6 -6
  47. package/dist/apis/deduplication.js +1 -1
  48. package/dist/apis/design.cjs +6 -6
  49. package/dist/apis/design.js +1 -1
  50. package/dist/apis/document.cjs +6 -6
  51. package/dist/apis/document.js +1 -1
  52. package/dist/apis/email-settings.cjs +6 -6
  53. package/dist/apis/email-settings.js +1 -1
  54. package/dist/apis/email-template.cjs +6 -6
  55. package/dist/apis/email-template.js +1 -1
  56. package/dist/apis/entity-mapping.cjs +6 -6
  57. package/dist/apis/entity-mapping.js +1 -1
  58. package/dist/apis/entity.cjs +6 -6
  59. package/dist/apis/entity.js +1 -1
  60. package/dist/apis/environments.cjs +6 -6
  61. package/dist/apis/environments.js +1 -1
  62. package/dist/apis/event-catalog.cjs +6 -6
  63. package/dist/apis/event-catalog.js +1 -1
  64. package/dist/apis/file.cjs +6 -6
  65. package/dist/apis/file.js +1 -1
  66. package/dist/apis/iban.cjs +6 -6
  67. package/dist/apis/iban.js +1 -1
  68. package/dist/apis/integration-toolkit.cjs +6 -6
  69. package/dist/apis/integration-toolkit.js +1 -1
  70. package/dist/apis/journey.cjs +6 -6
  71. package/dist/apis/journey.js +1 -1
  72. package/dist/apis/kanban.cjs +6 -6
  73. package/dist/apis/kanban.js +1 -1
  74. package/dist/apis/message.cjs +6 -6
  75. package/dist/apis/message.js +1 -1
  76. package/dist/apis/metering.cjs +6 -6
  77. package/dist/apis/metering.js +1 -1
  78. package/dist/apis/notes.cjs +6 -6
  79. package/dist/apis/notes.js +1 -1
  80. package/dist/apis/notification.cjs +6 -6
  81. package/dist/apis/notification.js +1 -1
  82. package/dist/apis/organization.cjs +6 -6
  83. package/dist/apis/organization.js +1 -1
  84. package/dist/apis/partner-directory.cjs +6 -6
  85. package/dist/apis/partner-directory.js +1 -1
  86. package/dist/apis/permissions.cjs +6 -6
  87. package/dist/apis/permissions.js +1 -1
  88. package/dist/apis/pricing-tier.cjs +6 -6
  89. package/dist/apis/pricing-tier.js +1 -1
  90. package/dist/apis/pricing.cjs +6 -6
  91. package/dist/apis/pricing.js +1 -1
  92. package/dist/apis/purpose.cjs +6 -6
  93. package/dist/apis/purpose.js +1 -1
  94. package/dist/apis/query.cjs +6 -6
  95. package/dist/apis/query.js +1 -1
  96. package/dist/apis/sandbox.cjs +6 -6
  97. package/dist/apis/sandbox.js +1 -1
  98. package/dist/apis/sharing.cjs +6 -6
  99. package/dist/apis/sharing.js +1 -1
  100. package/dist/apis/snapshot.cjs +6 -6
  101. package/dist/apis/snapshot.js +1 -1
  102. package/dist/apis/submission.cjs +6 -6
  103. package/dist/apis/submission.js +1 -1
  104. package/dist/apis/target.cjs +6 -6
  105. package/dist/apis/target.js +1 -1
  106. package/dist/apis/targeting.cjs +8 -8
  107. package/dist/apis/targeting.d.cts +2 -2
  108. package/dist/apis/targeting.d.ts +2 -2
  109. package/dist/apis/targeting.js +2 -2
  110. package/dist/apis/template-variables.cjs +6 -6
  111. package/dist/apis/template-variables.js +1 -1
  112. package/dist/apis/user.cjs +6 -6
  113. package/dist/apis/user.js +1 -1
  114. package/dist/apis/validation-rules.cjs +6 -6
  115. package/dist/apis/validation-rules.js +1 -1
  116. package/dist/apis/webhooks.cjs +6 -6
  117. package/dist/apis/webhooks.js +1 -1
  118. package/dist/apis/workflow-definition.cjs +8 -8
  119. package/dist/apis/workflow-definition.js +2 -2
  120. package/dist/apis/workflow.cjs +6 -6
  121. package/dist/apis/workflow.js +1 -1
  122. package/dist/{chunk-2FBNQV76.cjs → chunk-A3ILIWGC.cjs} +7 -7
  123. package/dist/chunk-ADX7IYB3.cjs +14 -0
  124. package/dist/{chunk-BFMY2X2J.cjs → chunk-DGLXRPNZ.cjs} +1 -1
  125. package/dist/{chunk-NUUEJRUH.js → chunk-PK76O2WO.js} +7 -7
  126. package/dist/chunk-TTU24M3D.js +14 -0
  127. package/dist/chunk-UH24GU2Z.js +14 -0
  128. package/dist/chunk-W3SPZ6V5.cjs +14 -0
  129. package/dist/{chunk-6HJ2Y7DZ.js → chunk-Y5YIU6PG.js} +1 -1
  130. package/dist/{customer-portal-PTVGKDUH.js → customer-portal-6WYH4LMT.js} +1 -1
  131. package/dist/{customer-portal-6I3G44I4.cjs → customer-portal-JZMXGNRO.cjs} +1 -1
  132. package/dist/{customer-portal-runtime-4ACQGDNY.cjs → customer-portal-runtime-H7XSAQ6G.cjs} +2 -2
  133. package/dist/{customer-portal-runtime-E4RI7NYM.js → customer-portal-runtime-JDDF3NWW.js} +1 -1
  134. package/dist/{customer-portal.d-Bpc-wk9K.d.cts → customer-portal.d-SlKyKhCa.d.cts} +197 -0
  135. package/dist/{customer-portal.d-Bpc-wk9K.d.ts → customer-portal.d-SlKyKhCa.d.ts} +197 -0
  136. package/dist/index.cjs +14 -14
  137. package/dist/index.d.cts +3 -3
  138. package/dist/index.d.ts +3 -3
  139. package/dist/index.js +4 -4
  140. package/dist/js-yaml-DLCVPJ7G.js +0 -0
  141. package/dist/targeting-A2X6X7BF.js +7 -0
  142. package/dist/targeting-CSGKITGV.cjs +7 -0
  143. package/dist/{targeting-runtime-X3DQ527N.cjs → targeting-runtime-HWL6PLJF.cjs} +2 -2
  144. package/dist/{targeting-runtime-QI7322HB.js → targeting-runtime-L5RGDNSH.js} +1 -1
  145. package/dist/{targeting.d-Bq3onSes.d.cts → targeting.d-DaK3kwZg.d.cts} +286 -1
  146. package/dist/{targeting.d-Bq3onSes.d.ts → targeting.d-DaK3kwZg.d.ts} +286 -1
  147. package/dist/workflow-definition-MSO4JDA3.js +7 -0
  148. package/dist/workflow-definition-XTWO4RMY.cjs +7 -0
  149. package/dist/{workflow-definition-runtime-2HQS3RPK.cjs → workflow-definition-runtime-DYKGFYQE.cjs} +2 -2
  150. package/dist/{workflow-definition-runtime-JUPATIKU.js → workflow-definition-runtime-GYDTSAJL.js} +1 -1
  151. package/docs/access-token.md +21 -1
  152. package/docs/customer-portal.md +139 -0
  153. package/docs/targeting.md +192 -0
  154. package/docs/workflow-definition.md +1 -0
  155. package/package.json +11 -12
  156. package/definitions/focus-pocus-runtime.json +0 -1
  157. package/definitions/focus-pocus.json +0 -757
  158. package/dist/access-token-GD6REL4U.js +0 -7
  159. package/dist/access-token-NQ5BLMOW.cjs +0 -7
  160. package/dist/chunk-7ILTRJDQ.cjs +0 -14
  161. package/dist/chunk-H3NMCCSA.js +0 -14
  162. package/dist/chunk-OSPTVXY4.js +0 -14
  163. package/dist/chunk-QNSMYDKG.cjs +0 -14
  164. package/dist/targeting-4YMBBPDW.cjs +0 -7
  165. package/dist/targeting-VCENULF6.js +0 -7
  166. package/dist/workflow-definition-5P3PDJKU.cjs +0 -7
  167. package/dist/workflow-definition-XSSOSEGF.js +0 -7
@@ -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- [`getRecipients`](#getrecipients)\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- [`MatchTargetParams`](#matchtargetparams)\n- [`GetTargetQueriesParams`](#gettargetqueriesparams)\n- [`TargetQueryResult`](#targetqueryresult)\n- [`AutomationStatus`](#automationstatus)\n- [`PortalStatus`](#portalstatus)\n- [`EntityUiStatus`](#entityuistatus)\n- [`Resolution`](#resolution)\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\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 portals usage info for a campaign\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 automations for campaign recipients\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\nSet up a campaign with related entities and configurations\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\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\nDiscover Entity-UI Next Best Actions for an entity\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 "label": "string",\n "context_params": [\n {\n "key": "string",\n "value": "string"\n }\n ]\n }\n },\n "status": "seen"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `matchTargets`\n\nMatch targets\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\nGet target queries\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\nCreate a 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 "resolution": "accepted",\n "updated_at": "1970-01-01T00:00:00.000Z"\n}\n```\n\n</details>\n\n---\n\n### `updateRecipient`\n\nUpdate a recipient\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 "resolution": "accepted",\n "updated_at": "1970-01-01T00:00:00.000Z"\n}\n```\n\n</details>\n\n---\n\n### `updateRecipientPortalStatus`\n\nUpdate portal status for a campaign recipient\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 "resolution": "accepted",\n "updated_at": "1970-01-01T00:00:00.000Z"\n}\n```\n\n</details>\n\n---\n\n### `updateRecipientEntityUiStatus`\n\nUpdate Entity-UI (Next Best Action) status for a campaign recipient\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 "resolution": "accepted",\n "updated_at": "1970-01-01T00:00:00.000Z"\n}\n```\n\n</details>\n\n---\n\n### `getRecipients`\n\nGet campaign recipients\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})\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 "resolution": "accepted",\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## 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" | "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" | "url"\n target: string\n label?: 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### `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### `Resolution`\n\nCross-channel resolution of a campaign for a recipient. Unlike the per-channel `*_status`\nfields (where `dismissed` is channel-local), a resolution suppresses the campaign on EVERY\nchannel \u2014 the 360 Entity-UI card and the portal teaser alike. Server-managed and read-only:\nnever sent by a client. Abs\n\n```ts\ntype Resolution = "accepted"\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 resolution?: "accepted"\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
+ };
@@ -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- [`getRecipients`](#getrecipients)\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- [`MatchTargetParams`](#matchtargetparams)\n- [`GetTargetQueriesParams`](#gettargetqueriesparams)\n- [`TargetQueryResult`](#targetqueryresult)\n- [`AutomationStatus`](#automationstatus)\n- [`PortalStatus`](#portalstatus)\n- [`EntityUiStatus`](#entityuistatus)\n- [`Resolution`](#resolution)\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\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 portals usage info for a campaign\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 automations for campaign recipients\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\nSet up a campaign with related entities and configurations\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\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\nDiscover Entity-UI Next Best Actions for an entity\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 "label": "string",\n "context_params": [\n {\n "key": "string",\n "value": "string"\n }\n ]\n }\n },\n "status": "seen"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `matchTargets`\n\nMatch targets\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\nGet target queries\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\nCreate a 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 "resolution": "accepted",\n "updated_at": "1970-01-01T00:00:00.000Z"\n}\n```\n\n</details>\n\n---\n\n### `updateRecipient`\n\nUpdate a recipient\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 "resolution": "accepted",\n "updated_at": "1970-01-01T00:00:00.000Z"\n}\n```\n\n</details>\n\n---\n\n### `updateRecipientPortalStatus`\n\nUpdate portal status for a campaign recipient\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 "resolution": "accepted",\n "updated_at": "1970-01-01T00:00:00.000Z"\n}\n```\n\n</details>\n\n---\n\n### `updateRecipientEntityUiStatus`\n\nUpdate Entity-UI (Next Best Action) status for a campaign recipient\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 "resolution": "accepted",\n "updated_at": "1970-01-01T00:00:00.000Z"\n}\n```\n\n</details>\n\n---\n\n### `getRecipients`\n\nGet campaign recipients\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})\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 "resolution": "accepted",\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## 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" | "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" | "url"\n target: string\n label?: 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### `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### `Resolution`\n\nCross-channel resolution of a campaign for a recipient. Unlike the per-channel `*_status`\nfields (where `dismissed` is channel-local), a resolution suppresses the campaign on EVERY\nchannel \u2014 the 360 Entity-UI card and the portal teaser alike. Server-managed and read-only:\nnever sent by a client. Abs\n\n```ts\ntype Resolution = "accepted"\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 resolution?: "accepted"\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;
@@ -1,5 +1,5 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunk7ILTRJDQcjs = require('./chunk-7ILTRJDQ.cjs');
3
+ var _chunkW3SPZ6V5cjs = require('./chunk-W3SPZ6V5.cjs');
4
4
  require('./chunk-NJK5F5TF.cjs');
5
- exports. default = _chunk7ILTRJDQcjs.require_targeting_runtime.call(void 0, );
5
+ exports. default = _chunkW3SPZ6V5cjs.require_targeting_runtime.call(void 0, );
@@ -1,5 +1,5 @@
1
1
  import {
2
2
  require_targeting_runtime
3
- } from "./chunk-H3NMCCSA.js";
3
+ } from "./chunk-UH24GU2Z.js";
4
4
  import "./chunk-YPSWSI3M.js";
5
5
  export default require_targeting_runtime();
@@ -65,6 +65,38 @@ declare namespace Components {
65
65
  *
66
66
  */
67
67
  Schemas.ClientError;
68
+ export interface DiscoverCampaignsResponse {
69
+ /**
70
+ * Number of matching NBAs.
71
+ */
72
+ hits: number;
73
+ /**
74
+ * Matching NBAs, sorted by priority (desc); one entry per campaign.
75
+ */
76
+ results: {
77
+ campaign_id: /**
78
+ * example:
79
+ * b8c01433-5556-4e2b-aad4-6f5348d1df84
80
+ */
81
+ Schemas.BaseUUID /* uuid */;
82
+ nba: /**
83
+ * A Next Best Action configured on a campaign's Entity-UI channel.
84
+ * This is the canonical NBA contract shared by discovery (this API), authoring, and rendering.
85
+ * NBA content is single-language in v1; text fields may contain `{{placeholders}}` resolved at render time.
86
+ *
87
+ */
88
+ Schemas.NextBestAction;
89
+ /**
90
+ * The recipient's current Entity-UI status for this campaign, present only
91
+ * when a recipient record already exists (i.e. the entity has previously seen
92
+ * or clicked this NBA). Absent when the entity has not yet interacted with it.
93
+ * Dismissed NBAs are filtered out server-side, so this is only ever `seen` or
94
+ * `clicked`. Lets the client skip a redundant `seen` call for NBAs already seen.
95
+ *
96
+ */
97
+ status?: "seen" | "dismissed" | "clicked";
98
+ }[];
99
+ }
68
100
  export interface GetTargetQueriesResponse {
69
101
  /**
70
102
  * List of target query results.
@@ -339,6 +371,24 @@ declare namespace Components {
339
371
  [name: string]: any;
340
372
  };
341
373
  };
374
+ export interface DiscoverCampaignsParams {
375
+ entity_id: /**
376
+ * example:
377
+ * b8c01433-5556-4e2b-aad4-6f5348d1df84
378
+ */
379
+ BaseUUID /* uuid */;
380
+ /**
381
+ * The schema slug of the entity (e.g. "contact" or "account").
382
+ */
383
+ entity_schema: string;
384
+ }
385
+ /**
386
+ * Lifecycle status of a Next Best Action on the Entity-UI channel. Unlike the portal
387
+ * channel there is no `sent` state: an NBA recipient is born at `seen`, the moment the
388
+ * action is first rendered to an agent.
389
+ *
390
+ */
391
+ export type EntityUiStatus = "seen" | "dismissed" | "clicked";
342
392
  export interface ExecutionSummaryItem {
343
393
  execution_id?: string;
344
394
  execution_status?: string;
@@ -1415,6 +1465,71 @@ declare namespace Components {
1415
1465
  BaseUUID /* uuid */?
1416
1466
  ];
1417
1467
  }
1468
+ /**
1469
+ * A Next Best Action configured on a campaign's Entity-UI channel.
1470
+ * This is the canonical NBA contract shared by discovery (this API), authoring, and rendering.
1471
+ * NBA content is single-language in v1; text fields may contain `{{placeholders}}` resolved at render time.
1472
+ *
1473
+ */
1474
+ export interface NextBestAction {
1475
+ /**
1476
+ * Light category label shown above the title. Free-form text.
1477
+ */
1478
+ category?: string;
1479
+ /**
1480
+ * Curated icon for the NBA.
1481
+ */
1482
+ icon?: {
1483
+ /**
1484
+ * Icon name from "@epilot360/icons".
1485
+ */
1486
+ name: string;
1487
+ /**
1488
+ * Optional icon color.
1489
+ */
1490
+ color?: string;
1491
+ };
1492
+ /**
1493
+ * Bold action title. Required. Supports `{{placeholders}}`.
1494
+ */
1495
+ title: string;
1496
+ /**
1497
+ * Optional description. Supports `{{placeholders}}` (incl. relative dates).
1498
+ */
1499
+ body?: string;
1500
+ /**
1501
+ * Display priority. NBAs are shown highest-priority first.
1502
+ */
1503
+ priority?: "low" | "medium" | "high";
1504
+ /**
1505
+ * Whether the agent can dismiss the NBA.
1506
+ */
1507
+ is_dismissable?: boolean;
1508
+ /**
1509
+ * The NBA's single call-to-action.
1510
+ */
1511
+ cta: {
1512
+ type: "journey" | "workflow" | "url";
1513
+ /**
1514
+ * Journey id, workflow definition id, or URL, depending on `type`.
1515
+ */
1516
+ target: string;
1517
+ /**
1518
+ * Optional CTA button label.
1519
+ */
1520
+ label?: string;
1521
+ /**
1522
+ * Journey context parameters (journey CTA only). Maps the journey's declared
1523
+ * context parameters so the journey knows which entity it is about. Discovery
1524
+ * returns them verbatim; they are passed to the journey when it launches.
1525
+ *
1526
+ */
1527
+ context_params?: {
1528
+ key: string;
1529
+ value: string;
1530
+ }[];
1531
+ };
1532
+ }
1418
1533
  export interface PortalRecipientPayload {
1419
1534
  portal_status: PortalStatus;
1420
1535
  portal_state?: {
@@ -1437,8 +1552,32 @@ declare namespace Components {
1437
1552
  portal_state?: {
1438
1553
  [name: string]: any;
1439
1554
  };
1555
+ entity_ui_status?: /**
1556
+ * Lifecycle status of a Next Best Action on the Entity-UI channel. Unlike the portal
1557
+ * channel there is no `sent` state: an NBA recipient is born at `seen`, the moment the
1558
+ * action is first rendered to an agent.
1559
+ *
1560
+ */
1561
+ EntityUiStatus;
1562
+ entity_ui_status_updated_at?: string; // date-time
1563
+ resolution?: /**
1564
+ * Cross-channel resolution of a campaign for a recipient. Unlike the per-channel `*_status`
1565
+ * fields (where `dismissed` is channel-local), a resolution suppresses the campaign on EVERY
1566
+ * channel — the 360 Entity-UI card and the portal teaser alike. Server-managed and read-only:
1567
+ * never sent by a client. Absence means unresolved.
1568
+ *
1569
+ */
1570
+ Resolution;
1440
1571
  updated_at?: string; // date-time
1441
1572
  }
1573
+ /**
1574
+ * Cross-channel resolution of a campaign for a recipient. Unlike the per-channel `*_status`
1575
+ * fields (where `dismissed` is channel-local), a resolution suppresses the campaign on EVERY
1576
+ * channel — the 360 Entity-UI card and the portal teaser alike. Server-managed and read-only:
1577
+ * never sent by a client. Absence means unresolved.
1578
+ *
1579
+ */
1580
+ export type Resolution = "accepted";
1442
1581
  export interface RetriggerAutomationsRequest {
1443
1582
  /**
1444
1583
  * List of recipient IDs to retrigger automations for
@@ -1669,6 +1808,21 @@ declare namespace Components {
1669
1808
  */
1670
1809
  error?: string;
1671
1810
  }
1811
+ export interface UpdateEntityUiStatusRequest {
1812
+ status: /**
1813
+ * Lifecycle status of a Next Best Action on the Entity-UI channel. Unlike the portal
1814
+ * channel there is no `sent` state: an NBA recipient is born at `seen`, the moment the
1815
+ * action is first rendered to an agent.
1816
+ *
1817
+ */
1818
+ EntityUiStatus;
1819
+ /**
1820
+ * Schema slug of the recipient entity (e.g. "contact"). Required when recording the
1821
+ * first `seen`, which lazily creates the recipient record; ignored on later transitions.
1822
+ *
1823
+ */
1824
+ entity_schema?: string;
1825
+ }
1672
1826
  export interface UpdatePortalStatusRequest {
1673
1827
  status: PortalStatus;
1674
1828
  }
@@ -1718,6 +1872,14 @@ declare namespace Paths {
1718
1872
  export type $500 = Components.Responses.ServerErrorResponse;
1719
1873
  }
1720
1874
  }
1875
+ namespace DiscoverCampaigns {
1876
+ export type RequestBody = Components.Schemas.DiscoverCampaignsParams;
1877
+ namespace Responses {
1878
+ export type $200 = Components.Responses.DiscoverCampaignsResponse;
1879
+ export type $400 = Components.Responses.ClientErrorResponse;
1880
+ export type $500 = Components.Responses.ServerErrorResponse;
1881
+ }
1882
+ }
1721
1883
  namespace GetCampaignJobStatus {
1722
1884
  namespace Parameters {
1723
1885
  export type CampaignId = /**
@@ -1861,6 +2023,32 @@ declare namespace Paths {
1861
2023
  export type $500 = Components.Responses.ServerErrorResponse;
1862
2024
  }
1863
2025
  }
2026
+ namespace UpdateRecipientEntityUiStatus {
2027
+ namespace Parameters {
2028
+ export type CampaignId = /**
2029
+ * example:
2030
+ * b8c01433-5556-4e2b-aad4-6f5348d1df84
2031
+ */
2032
+ Components.Schemas.BaseUUID /* uuid */;
2033
+ export type RecipientId = /**
2034
+ * example:
2035
+ * b8c01433-5556-4e2b-aad4-6f5348d1df84
2036
+ */
2037
+ Components.Schemas.BaseUUID /* uuid */;
2038
+ }
2039
+ export interface PathParameters {
2040
+ campaign_id: Parameters.CampaignId;
2041
+ recipient_id: Parameters.RecipientId;
2042
+ }
2043
+ export type RequestBody = Components.Schemas.UpdateEntityUiStatusRequest;
2044
+ namespace Responses {
2045
+ export type $200 = Components.Responses.RecipientResponse;
2046
+ export type $400 = Components.Responses.ClientErrorResponse;
2047
+ export type $404 = Components.Responses.ClientErrorResponse;
2048
+ export type $409 = Components.Responses.ClientErrorResponse;
2049
+ export type $500 = Components.Responses.ServerErrorResponse;
2050
+ }
2051
+ }
1864
2052
  namespace UpdateRecipientPortalStatus {
1865
2053
  namespace Parameters {
1866
2054
  export type CampaignId = /**
@@ -1969,6 +2157,24 @@ interface OperationMethods {
1969
2157
  data?: Paths.MatchCampaigns.RequestBody,
1970
2158
  config?: AxiosRequestConfig
1971
2159
  ): OperationResponse<Paths.MatchCampaigns.Responses.$200>
2160
+ /**
2161
+ * discoverCampaigns - Discover Entity-UI Next Best Actions for an entity
2162
+ *
2163
+ * Given an entity, returns the Next Best Actions it should see on the Entity-UI channel.
2164
+ *
2165
+ * Enumerates the organization's **active** campaigns that carry a valid Entity-UI Next Best
2166
+ * Action, live-matches each against the entity using the existing match engine, and returns
2167
+ * the matching NBAs priority-sorted (one per campaign).
2168
+ *
2169
+ * This is a pure read: it writes nothing. An entity that matches no campaigns returns an
2170
+ * empty list, not an error.
2171
+ *
2172
+ */
2173
+ 'discoverCampaigns'(
2174
+ parameters?: Parameters<UnknownParamsObject> | null,
2175
+ data?: Paths.DiscoverCampaigns.RequestBody,
2176
+ config?: AxiosRequestConfig
2177
+ ): OperationResponse<Paths.DiscoverCampaigns.Responses.$200>
1972
2178
  /**
1973
2179
  * matchTargets - Match targets
1974
2180
  *
@@ -2029,6 +2235,32 @@ interface OperationMethods {
2029
2235
  data?: Paths.UpdateRecipientPortalStatus.RequestBody,
2030
2236
  config?: AxiosRequestConfig
2031
2237
  ): OperationResponse<Paths.UpdateRecipientPortalStatus.Responses.$200>
2238
+ /**
2239
+ * updateRecipientEntityUiStatus - Update Entity-UI (Next Best Action) status for a campaign recipient
2240
+ *
2241
+ * Records a Next Best Action interaction for a recipient on the Entity-UI channel.
2242
+ *
2243
+ * Unlike the portal channel, an NBA recipient is created lazily: the first `seen` creates
2244
+ * the recipient record (and requires `entity_schema`). `seen` is idempotent — re-viewing an
2245
+ * NBA that is already seen/clicked/dismissed is a no-op success and never regresses the status.
2246
+ *
2247
+ * Status transition rules:
2248
+ * - `seen`: lazily creates the recipient; a no-op success if a status already exists
2249
+ * - From `seen`: can change to `clicked` or `dismissed`
2250
+ * - From `clicked`: can change to `dismissed`
2251
+ * - From `dismissed`: cannot be changed (final state)
2252
+ *
2253
+ * `dismissed` and `clicked` require an existing recipient (404 otherwise, since an NBA is
2254
+ * born at `seen`) and reject invalid transitions (409).
2255
+ *
2256
+ * The entity_ui_status_updated_at timestamp is automatically set when the status changes.
2257
+ *
2258
+ */
2259
+ 'updateRecipientEntityUiStatus'(
2260
+ parameters?: Parameters<Paths.UpdateRecipientEntityUiStatus.PathParameters> | null,
2261
+ data?: Paths.UpdateRecipientEntityUiStatus.RequestBody,
2262
+ config?: AxiosRequestConfig
2263
+ ): OperationResponse<Paths.UpdateRecipientEntityUiStatus.Responses.$200>
2032
2264
  /**
2033
2265
  * getRecipients - Get campaign recipients
2034
2266
  *
@@ -2132,6 +2364,26 @@ interface PathsDictionary {
2132
2364
  config?: AxiosRequestConfig
2133
2365
  ): OperationResponse<Paths.MatchCampaigns.Responses.$200>
2134
2366
  }
2367
+ ['/v1/campaign:discover']: {
2368
+ /**
2369
+ * discoverCampaigns - Discover Entity-UI Next Best Actions for an entity
2370
+ *
2371
+ * Given an entity, returns the Next Best Actions it should see on the Entity-UI channel.
2372
+ *
2373
+ * Enumerates the organization's **active** campaigns that carry a valid Entity-UI Next Best
2374
+ * Action, live-matches each against the entity using the existing match engine, and returns
2375
+ * the matching NBAs priority-sorted (one per campaign).
2376
+ *
2377
+ * This is a pure read: it writes nothing. An entity that matches no campaigns returns an
2378
+ * empty list, not an error.
2379
+ *
2380
+ */
2381
+ 'post'(
2382
+ parameters?: Parameters<UnknownParamsObject> | null,
2383
+ data?: Paths.DiscoverCampaigns.RequestBody,
2384
+ config?: AxiosRequestConfig
2385
+ ): OperationResponse<Paths.DiscoverCampaigns.Responses.$200>
2386
+ }
2135
2387
  ['/v1/target:match']: {
2136
2388
  /**
2137
2389
  * matchTargets - Match targets
@@ -2202,6 +2454,34 @@ interface PathsDictionary {
2202
2454
  config?: AxiosRequestConfig
2203
2455
  ): OperationResponse<Paths.UpdateRecipientPortalStatus.Responses.$200>
2204
2456
  }
2457
+ ['/v1/campaign/{campaign_id}/recipient/{recipient_id}/entity_ui:status']: {
2458
+ /**
2459
+ * updateRecipientEntityUiStatus - Update Entity-UI (Next Best Action) status for a campaign recipient
2460
+ *
2461
+ * Records a Next Best Action interaction for a recipient on the Entity-UI channel.
2462
+ *
2463
+ * Unlike the portal channel, an NBA recipient is created lazily: the first `seen` creates
2464
+ * the recipient record (and requires `entity_schema`). `seen` is idempotent — re-viewing an
2465
+ * NBA that is already seen/clicked/dismissed is a no-op success and never regresses the status.
2466
+ *
2467
+ * Status transition rules:
2468
+ * - `seen`: lazily creates the recipient; a no-op success if a status already exists
2469
+ * - From `seen`: can change to `clicked` or `dismissed`
2470
+ * - From `clicked`: can change to `dismissed`
2471
+ * - From `dismissed`: cannot be changed (final state)
2472
+ *
2473
+ * `dismissed` and `clicked` require an existing recipient (404 otherwise, since an NBA is
2474
+ * born at `seen`) and reject invalid transitions (409).
2475
+ *
2476
+ * The entity_ui_status_updated_at timestamp is automatically set when the status changes.
2477
+ *
2478
+ */
2479
+ 'patch'(
2480
+ parameters?: Parameters<Paths.UpdateRecipientEntityUiStatus.PathParameters> | null,
2481
+ data?: Paths.UpdateRecipientEntityUiStatus.RequestBody,
2482
+ config?: AxiosRequestConfig
2483
+ ): OperationResponse<Paths.UpdateRecipientEntityUiStatus.Responses.$200>
2484
+ }
2205
2485
  ['/v1/campaign/{campaign_id}/recipients']: {
2206
2486
  /**
2207
2487
  * getRecipients - Get campaign recipients
@@ -2236,14 +2516,18 @@ type Campaign = Components.Schemas.Campaign;
2236
2516
  type CampaignStatus = Components.Schemas.CampaignStatus;
2237
2517
  type ClientError = Components.Schemas.ClientError;
2238
2518
  type CreateRecipientPayload = Components.Schemas.CreateRecipientPayload;
2519
+ type DiscoverCampaignsParams = Components.Schemas.DiscoverCampaignsParams;
2520
+ type EntityUiStatus = Components.Schemas.EntityUiStatus;
2239
2521
  type ExecutionSummaryItem = Components.Schemas.ExecutionSummaryItem;
2240
2522
  type GetTargetQueriesParams = Components.Schemas.GetTargetQueriesParams;
2241
2523
  type JobStatus = Components.Schemas.JobStatus;
2242
2524
  type MatchCampaignParams = Components.Schemas.MatchCampaignParams;
2243
2525
  type MatchTargetParams = Components.Schemas.MatchTargetParams;
2526
+ type NextBestAction = Components.Schemas.NextBestAction;
2244
2527
  type PortalRecipientPayload = Components.Schemas.PortalRecipientPayload;
2245
2528
  type PortalStatus = Components.Schemas.PortalStatus;
2246
2529
  type Recipient = Components.Schemas.Recipient;
2530
+ type Resolution = Components.Schemas.Resolution;
2247
2531
  type RetriggerAutomationsRequest = Components.Schemas.RetriggerAutomationsRequest;
2248
2532
  type RetriggerAutomationsResult = Components.Schemas.RetriggerAutomationsResult;
2249
2533
  type ServerError = Components.Schemas.ServerError;
@@ -2252,7 +2536,8 @@ type SetupTariffChangeCampaignRequest = Components.Schemas.SetupTariffChangeCamp
2252
2536
  type SetupTariffChangeCampaignResponse = Components.Schemas.SetupTariffChangeCampaignResponse;
2253
2537
  type Target = Components.Schemas.Target;
2254
2538
  type TargetQueryResult = Components.Schemas.TargetQueryResult;
2539
+ type UpdateEntityUiStatusRequest = Components.Schemas.UpdateEntityUiStatusRequest;
2255
2540
  type UpdatePortalStatusRequest = Components.Schemas.UpdatePortalStatusRequest;
2256
2541
  type UpdateRecipientPayload = Components.Schemas.UpdateRecipientPayload;
2257
2542
 
2258
- export { type AutomationRecipientPayload as A, type BaseEntityAcl as B, type Client as C, type UpdateRecipientPayload as D, type ExecutionSummaryItem as E, type GetTargetQueriesParams as G, type JobStatus as J, type MatchCampaignParams as M, type OperationMethods as O, Paths as P, type Recipient as R, type ServerError as S, type Target as T, type UpdatePortalStatusRequest as U, Components as a, type PathsDictionary as b, type AutomationStatus as c, type BaseEntityOwner as d, type BaseError as e, type BaseNanoID as f, type BaseRecipientPayload as g, type BaseRelation as h, type BaseSystemFields as i, type BaseSystemFieldsRequired as j, type BaseSystemId as k, type BaseTags as l, type BaseUUID as m, type Campaign as n, type CampaignStatus as o, type ClientError as p, type CreateRecipientPayload as q, type MatchTargetParams as r, type PortalRecipientPayload as s, type PortalStatus as t, type RetriggerAutomationsRequest as u, type RetriggerAutomationsResult as v, type SetupCampaignRequest as w, type SetupTariffChangeCampaignRequest as x, type SetupTariffChangeCampaignResponse as y, type TargetQueryResult as z };
2543
+ export { type AutomationRecipientPayload as A, type BaseEntityAcl as B, type Client as C, type DiscoverCampaignsParams as D, type EntityUiStatus as E, type SetupTariffChangeCampaignResponse as F, type GetTargetQueriesParams as G, type TargetQueryResult as H, type UpdatePortalStatusRequest as I, type JobStatus as J, type UpdateRecipientPayload as K, type MatchCampaignParams as M, type NextBestAction as N, type OperationMethods as O, Paths as P, type Recipient as R, type ServerError as S, type Target as T, type UpdateEntityUiStatusRequest as U, Components as a, type PathsDictionary as b, type AutomationStatus as c, type BaseEntityOwner as d, type BaseError as e, type BaseNanoID as f, type BaseRecipientPayload as g, type BaseRelation as h, type BaseSystemFields as i, type BaseSystemFieldsRequired as j, type BaseSystemId as k, type BaseTags as l, type BaseUUID as m, type Campaign as n, type CampaignStatus as o, type ClientError as p, type CreateRecipientPayload as q, type ExecutionSummaryItem as r, type MatchTargetParams as s, type PortalRecipientPayload as t, type PortalStatus as u, type Resolution as v, type RetriggerAutomationsRequest as w, type RetriggerAutomationsResult as x, type SetupCampaignRequest as y, type SetupTariffChangeCampaignRequest as z };