@epilot/sdk 2.7.5 → 2.7.6

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 (126) hide show
  1. package/definitions/targeting-runtime.json +1 -1
  2. package/definitions/targeting.json +201 -7
  3. package/dist/apis/access-token.cjs +6 -6
  4. package/dist/apis/access-token.js +1 -1
  5. package/dist/apis/address-suggestions.cjs +6 -6
  6. package/dist/apis/address-suggestions.js +1 -1
  7. package/dist/apis/address.cjs +6 -6
  8. package/dist/apis/address.js +1 -1
  9. package/dist/apis/ai-agents.cjs +6 -6
  10. package/dist/apis/ai-agents.js +1 -1
  11. package/dist/apis/app.cjs +6 -6
  12. package/dist/apis/app.js +1 -1
  13. package/dist/apis/audit-logs.cjs +6 -6
  14. package/dist/apis/audit-logs.js +1 -1
  15. package/dist/apis/automation.cjs +6 -6
  16. package/dist/apis/automation.js +1 -1
  17. package/dist/apis/billing.cjs +6 -6
  18. package/dist/apis/billing.js +1 -1
  19. package/dist/apis/blueprint-manifest.cjs +6 -6
  20. package/dist/apis/blueprint-manifest.js +1 -1
  21. package/dist/apis/calendar.cjs +6 -6
  22. package/dist/apis/calendar.js +1 -1
  23. package/dist/apis/configuration-hub.cjs +6 -6
  24. package/dist/apis/configuration-hub.js +1 -1
  25. package/dist/apis/consent.cjs +6 -6
  26. package/dist/apis/consent.js +1 -1
  27. package/dist/apis/customer-portal.cjs +6 -6
  28. package/dist/apis/customer-portal.js +1 -1
  29. package/dist/apis/dashboard.cjs +6 -6
  30. package/dist/apis/dashboard.js +1 -1
  31. package/dist/apis/data-governance.cjs +6 -6
  32. package/dist/apis/data-governance.js +1 -1
  33. package/dist/apis/deduplication.cjs +6 -6
  34. package/dist/apis/deduplication.js +1 -1
  35. package/dist/apis/design.cjs +6 -6
  36. package/dist/apis/design.js +1 -1
  37. package/dist/apis/document.cjs +6 -6
  38. package/dist/apis/document.js +1 -1
  39. package/dist/apis/email-settings.cjs +6 -6
  40. package/dist/apis/email-settings.js +1 -1
  41. package/dist/apis/email-template.cjs +6 -6
  42. package/dist/apis/email-template.js +1 -1
  43. package/dist/apis/entity-mapping.cjs +6 -6
  44. package/dist/apis/entity-mapping.js +1 -1
  45. package/dist/apis/entity.cjs +6 -6
  46. package/dist/apis/entity.js +1 -1
  47. package/dist/apis/environments.cjs +6 -6
  48. package/dist/apis/environments.js +1 -1
  49. package/dist/apis/event-catalog.cjs +6 -6
  50. package/dist/apis/event-catalog.js +1 -1
  51. package/dist/apis/file.cjs +6 -6
  52. package/dist/apis/file.js +1 -1
  53. package/dist/apis/iban.cjs +6 -6
  54. package/dist/apis/iban.js +1 -1
  55. package/dist/apis/integration-toolkit.cjs +6 -6
  56. package/dist/apis/integration-toolkit.js +1 -1
  57. package/dist/apis/journey.cjs +6 -6
  58. package/dist/apis/journey.js +1 -1
  59. package/dist/apis/kanban.cjs +6 -6
  60. package/dist/apis/kanban.js +1 -1
  61. package/dist/apis/message.cjs +6 -6
  62. package/dist/apis/message.js +1 -1
  63. package/dist/apis/metering.cjs +6 -6
  64. package/dist/apis/metering.js +1 -1
  65. package/dist/apis/notes.cjs +6 -6
  66. package/dist/apis/notes.js +1 -1
  67. package/dist/apis/notification.cjs +6 -6
  68. package/dist/apis/notification.js +1 -1
  69. package/dist/apis/organization.cjs +6 -6
  70. package/dist/apis/organization.js +1 -1
  71. package/dist/apis/partner-directory.cjs +6 -6
  72. package/dist/apis/partner-directory.js +1 -1
  73. package/dist/apis/permissions.cjs +6 -6
  74. package/dist/apis/permissions.js +1 -1
  75. package/dist/apis/pricing-tier.cjs +6 -6
  76. package/dist/apis/pricing-tier.js +1 -1
  77. package/dist/apis/pricing.cjs +6 -6
  78. package/dist/apis/pricing.js +1 -1
  79. package/dist/apis/purpose.cjs +6 -6
  80. package/dist/apis/purpose.js +1 -1
  81. package/dist/apis/query.cjs +6 -6
  82. package/dist/apis/query.js +1 -1
  83. package/dist/apis/sandbox.cjs +6 -6
  84. package/dist/apis/sandbox.js +1 -1
  85. package/dist/apis/sharing.cjs +6 -6
  86. package/dist/apis/sharing.js +1 -1
  87. package/dist/apis/submission.cjs +6 -6
  88. package/dist/apis/submission.js +1 -1
  89. package/dist/apis/target.cjs +6 -6
  90. package/dist/apis/target.js +1 -1
  91. package/dist/apis/targeting.cjs +8 -8
  92. package/dist/apis/targeting.d.cts +2 -2
  93. package/dist/apis/targeting.d.ts +2 -2
  94. package/dist/apis/targeting.js +2 -2
  95. package/dist/apis/template-variables.cjs +6 -6
  96. package/dist/apis/template-variables.js +1 -1
  97. package/dist/apis/user.cjs +6 -6
  98. package/dist/apis/user.js +1 -1
  99. package/dist/apis/validation-rules.cjs +6 -6
  100. package/dist/apis/validation-rules.js +1 -1
  101. package/dist/apis/webhooks.cjs +6 -6
  102. package/dist/apis/webhooks.js +1 -1
  103. package/dist/apis/workflow-definition.cjs +6 -6
  104. package/dist/apis/workflow-definition.js +1 -1
  105. package/dist/apis/workflow.cjs +6 -6
  106. package/dist/apis/workflow.js +1 -1
  107. package/dist/{chunk-QZON5VFY.cjs → chunk-2EZWTUN7.cjs} +2 -2
  108. package/dist/{chunk-JFMD3PPY.js → chunk-CSL5KKTW.js} +2 -2
  109. package/dist/chunk-LSPXLT3A.js +14 -0
  110. package/dist/chunk-MCK2QUSD.cjs +14 -0
  111. package/dist/index.cjs +10 -10
  112. package/dist/index.d.cts +1 -1
  113. package/dist/index.d.ts +1 -1
  114. package/dist/index.js +2 -2
  115. package/dist/targeting-67M7H7T7.cjs +7 -0
  116. package/dist/targeting-XHHZ2TK4.js +7 -0
  117. package/dist/{targeting-runtime-M2VSTKFT.js → targeting-runtime-D5YUPZQM.js} +1 -1
  118. package/dist/{targeting-runtime-6JFMP262.cjs → targeting-runtime-MLMOM7CK.cjs} +2 -2
  119. package/dist/{targeting.d-BNmcVsNS.d.cts → targeting.d-DkyEBdtZ.d.cts} +138 -3
  120. package/dist/{targeting.d-BNmcVsNS.d.ts → targeting.d-DkyEBdtZ.d.ts} +138 -3
  121. package/docs/targeting.md +114 -0
  122. package/package.json +1 -1
  123. package/dist/chunk-5WNEYQII.cjs +0 -14
  124. package/dist/chunk-BTTPWE2P.js +0 -14
  125. package/dist/targeting-EYGYZD6M.cjs +0 -7
  126. package/dist/targeting-GEJTJN5Z.js +0 -7
@@ -1,8 +1,6 @@
1
1
  import { OpenAPIClient, Parameters, AxiosRequestConfig, OperationResponse, UnknownParamsObject } from 'openapi-client-axios';
2
2
 
3
3
  /* Auto-copied from targeting-client */
4
- /* eslint-disable */
5
-
6
4
 
7
5
 
8
6
  declare namespace Components {
@@ -121,6 +119,7 @@ declare namespace Components {
121
119
  results: Schemas.RetriggerAutomationsResult[];
122
120
  }
123
121
  export type ServerErrorResponse = Schemas.ServerError;
122
+ export type SetupCampaignResponse = Schemas.SetupTariffChangeCampaignResponse;
124
123
  }
125
124
  namespace Schemas {
126
125
  export interface AutomationRecipientPayload {
@@ -1465,6 +1464,100 @@ declare namespace Components {
1465
1464
  error?: string;
1466
1465
  }
1467
1466
  export type ServerError = BaseError;
1467
+ /**
1468
+ * Discriminated by `type`. Each campaign variant has its own request shape;
1469
+ * new variants are added by introducing a new schema and extending the `oneOf` list.
1470
+ *
1471
+ */
1472
+ export type SetupCampaignRequest = /**
1473
+ * Discriminated by `type`. Each campaign variant has its own request shape;
1474
+ * new variants are added by introducing a new schema and extending the `oneOf` list.
1475
+ *
1476
+ */
1477
+ SetupTariffChangeCampaignRequest;
1478
+ export interface SetupTariffChangeCampaignRequest {
1479
+ type: "tariff_change";
1480
+ product_recommendation: {
1481
+ /**
1482
+ * Optional name of the product recommendation. Defaults to the campaign name.
1483
+ */
1484
+ name?: string;
1485
+ /**
1486
+ * Optional source product entity ID for the recommendation.
1487
+ * example:
1488
+ * b8c01433-5556-4e2b-aad4-6f5348d1df84
1489
+ */
1490
+ source_product_id?: string; // uuid
1491
+ /**
1492
+ * Optional source price entity ID for the recommendation.
1493
+ * example:
1494
+ * b8c01433-5556-4e2b-aad4-6f5348d1df84
1495
+ */
1496
+ source_price_id?: string; // uuid
1497
+ /**
1498
+ * Offer blocks for the product_recommendation entity.
1499
+ */
1500
+ offers?: {
1501
+ /**
1502
+ * Optional per-offer target entity ID.
1503
+ */
1504
+ target_id?: /**
1505
+ * example:
1506
+ * b8c01433-5556-4e2b-aad4-6f5348d1df84
1507
+ */
1508
+ BaseUUID /* uuid */;
1509
+ /**
1510
+ * Product/price pairs within this offer.
1511
+ */
1512
+ items: {
1513
+ product_id: /**
1514
+ * example:
1515
+ * b8c01433-5556-4e2b-aad4-6f5348d1df84
1516
+ */
1517
+ BaseUUID /* uuid */;
1518
+ price_id: /**
1519
+ * example:
1520
+ * b8c01433-5556-4e2b-aad4-6f5348d1df84
1521
+ */
1522
+ BaseUUID /* uuid */;
1523
+ /**
1524
+ * Opaque per-item highlight/comparison config persisted as-is on the entity.
1525
+ */
1526
+ highlight_config?: {
1527
+ [name: string]: any;
1528
+ };
1529
+ }[];
1530
+ }[];
1531
+ };
1532
+ campaign: {
1533
+ name: string;
1534
+ goal?: string;
1535
+ /**
1536
+ * List of target entity IDs to attach to the campaign. Today only a single
1537
+ * entry is supported (campaign.target is has_one) but the array shape is kept
1538
+ * for forward-compatibility — only `target_ids[0]` is used.
1539
+ *
1540
+ */
1541
+ target_ids: /**
1542
+ * example:
1543
+ * b8c01433-5556-4e2b-aad4-6f5348d1df84
1544
+ */
1545
+ BaseUUID /* uuid */[];
1546
+ };
1547
+ }
1548
+ export interface SetupTariffChangeCampaignResponse {
1549
+ type: "tariff_change";
1550
+ product_recommendation_id: /**
1551
+ * example:
1552
+ * b8c01433-5556-4e2b-aad4-6f5348d1df84
1553
+ */
1554
+ BaseUUID /* uuid */;
1555
+ campaign_id: /**
1556
+ * example:
1557
+ * b8c01433-5556-4e2b-aad4-6f5348d1df84
1558
+ */
1559
+ BaseUUID /* uuid */;
1560
+ }
1468
1561
  export interface Target {
1469
1562
  _id?: /**
1470
1563
  * example:
@@ -1665,6 +1758,19 @@ declare namespace Paths {
1665
1758
  export type $500 = Components.Responses.ServerErrorResponse;
1666
1759
  }
1667
1760
  }
1761
+ namespace SetupCampaign {
1762
+ export type RequestBody = /**
1763
+ * Discriminated by `type`. Each campaign variant has its own request shape;
1764
+ * new variants are added by introducing a new schema and extending the `oneOf` list.
1765
+ *
1766
+ */
1767
+ Components.Schemas.SetupCampaignRequest;
1768
+ namespace Responses {
1769
+ export type $201 = Components.Responses.SetupCampaignResponse;
1770
+ export type $400 = Components.Responses.ClientErrorResponse;
1771
+ export type $500 = Components.Responses.ServerErrorResponse;
1772
+ }
1773
+ }
1668
1774
  namespace UpdateRecipient {
1669
1775
  namespace Parameters {
1670
1776
  export type CampaignId = /**
@@ -1772,6 +1878,18 @@ interface OperationMethods {
1772
1878
  data?: Paths.RetriggerCampaignAutomations.RequestBody,
1773
1879
  config?: AxiosRequestConfig
1774
1880
  ): OperationResponse<Paths.RetriggerCampaignAutomations.Responses.$200>
1881
+ /**
1882
+ * setupCampaign - Set up a campaign with related entities and configurations
1883
+ *
1884
+ * Creates a `campaign` entity together with its related entities and configurations in a single call.
1885
+ * Used by the campaign wizard UI, but not restricted to it.
1886
+ *
1887
+ */
1888
+ 'setupCampaign'(
1889
+ parameters?: Parameters<UnknownParamsObject> | null,
1890
+ data?: Paths.SetupCampaign.RequestBody,
1891
+ config?: AxiosRequestConfig
1892
+ ): OperationResponse<Paths.SetupCampaign.Responses.$201>
1775
1893
  /**
1776
1894
  * matchCampaigns - Match campaigns
1777
1895
  *
@@ -1919,6 +2037,20 @@ interface PathsDictionary {
1919
2037
  config?: AxiosRequestConfig
1920
2038
  ): OperationResponse<Paths.RetriggerCampaignAutomations.Responses.$200>
1921
2039
  }
2040
+ ['/v1/campaign:setup']: {
2041
+ /**
2042
+ * setupCampaign - Set up a campaign with related entities and configurations
2043
+ *
2044
+ * Creates a `campaign` entity together with its related entities and configurations in a single call.
2045
+ * Used by the campaign wizard UI, but not restricted to it.
2046
+ *
2047
+ */
2048
+ 'post'(
2049
+ parameters?: Parameters<UnknownParamsObject> | null,
2050
+ data?: Paths.SetupCampaign.RequestBody,
2051
+ config?: AxiosRequestConfig
2052
+ ): OperationResponse<Paths.SetupCampaign.Responses.$201>
2053
+ }
1922
2054
  ['/v1/campaign:match']: {
1923
2055
  /**
1924
2056
  * matchCampaigns - Match campaigns
@@ -2049,9 +2181,12 @@ type Recipient = Components.Schemas.Recipient;
2049
2181
  type RetriggerAutomationsRequest = Components.Schemas.RetriggerAutomationsRequest;
2050
2182
  type RetriggerAutomationsResult = Components.Schemas.RetriggerAutomationsResult;
2051
2183
  type ServerError = Components.Schemas.ServerError;
2184
+ type SetupCampaignRequest = Components.Schemas.SetupCampaignRequest;
2185
+ type SetupTariffChangeCampaignRequest = Components.Schemas.SetupTariffChangeCampaignRequest;
2186
+ type SetupTariffChangeCampaignResponse = Components.Schemas.SetupTariffChangeCampaignResponse;
2052
2187
  type Target = Components.Schemas.Target;
2053
2188
  type TargetQueryResult = Components.Schemas.TargetQueryResult;
2054
2189
  type UpdatePortalStatusRequest = Components.Schemas.UpdatePortalStatusRequest;
2055
2190
  type UpdateRecipientPayload = Components.Schemas.UpdateRecipientPayload;
2056
2191
 
2057
- export { type AutomationRecipientPayload as A, type BaseEntityAcl as B, type Client as C, 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 TargetQueryResult as w, type UpdateRecipientPayload as x };
2192
+ 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 };
@@ -1,8 +1,6 @@
1
1
  import { OpenAPIClient, Parameters, AxiosRequestConfig, OperationResponse, UnknownParamsObject } from 'openapi-client-axios';
2
2
 
3
3
  /* Auto-copied from targeting-client */
4
- /* eslint-disable */
5
-
6
4
 
7
5
 
8
6
  declare namespace Components {
@@ -121,6 +119,7 @@ declare namespace Components {
121
119
  results: Schemas.RetriggerAutomationsResult[];
122
120
  }
123
121
  export type ServerErrorResponse = Schemas.ServerError;
122
+ export type SetupCampaignResponse = Schemas.SetupTariffChangeCampaignResponse;
124
123
  }
125
124
  namespace Schemas {
126
125
  export interface AutomationRecipientPayload {
@@ -1465,6 +1464,100 @@ declare namespace Components {
1465
1464
  error?: string;
1466
1465
  }
1467
1466
  export type ServerError = BaseError;
1467
+ /**
1468
+ * Discriminated by `type`. Each campaign variant has its own request shape;
1469
+ * new variants are added by introducing a new schema and extending the `oneOf` list.
1470
+ *
1471
+ */
1472
+ export type SetupCampaignRequest = /**
1473
+ * Discriminated by `type`. Each campaign variant has its own request shape;
1474
+ * new variants are added by introducing a new schema and extending the `oneOf` list.
1475
+ *
1476
+ */
1477
+ SetupTariffChangeCampaignRequest;
1478
+ export interface SetupTariffChangeCampaignRequest {
1479
+ type: "tariff_change";
1480
+ product_recommendation: {
1481
+ /**
1482
+ * Optional name of the product recommendation. Defaults to the campaign name.
1483
+ */
1484
+ name?: string;
1485
+ /**
1486
+ * Optional source product entity ID for the recommendation.
1487
+ * example:
1488
+ * b8c01433-5556-4e2b-aad4-6f5348d1df84
1489
+ */
1490
+ source_product_id?: string; // uuid
1491
+ /**
1492
+ * Optional source price entity ID for the recommendation.
1493
+ * example:
1494
+ * b8c01433-5556-4e2b-aad4-6f5348d1df84
1495
+ */
1496
+ source_price_id?: string; // uuid
1497
+ /**
1498
+ * Offer blocks for the product_recommendation entity.
1499
+ */
1500
+ offers?: {
1501
+ /**
1502
+ * Optional per-offer target entity ID.
1503
+ */
1504
+ target_id?: /**
1505
+ * example:
1506
+ * b8c01433-5556-4e2b-aad4-6f5348d1df84
1507
+ */
1508
+ BaseUUID /* uuid */;
1509
+ /**
1510
+ * Product/price pairs within this offer.
1511
+ */
1512
+ items: {
1513
+ product_id: /**
1514
+ * example:
1515
+ * b8c01433-5556-4e2b-aad4-6f5348d1df84
1516
+ */
1517
+ BaseUUID /* uuid */;
1518
+ price_id: /**
1519
+ * example:
1520
+ * b8c01433-5556-4e2b-aad4-6f5348d1df84
1521
+ */
1522
+ BaseUUID /* uuid */;
1523
+ /**
1524
+ * Opaque per-item highlight/comparison config persisted as-is on the entity.
1525
+ */
1526
+ highlight_config?: {
1527
+ [name: string]: any;
1528
+ };
1529
+ }[];
1530
+ }[];
1531
+ };
1532
+ campaign: {
1533
+ name: string;
1534
+ goal?: string;
1535
+ /**
1536
+ * List of target entity IDs to attach to the campaign. Today only a single
1537
+ * entry is supported (campaign.target is has_one) but the array shape is kept
1538
+ * for forward-compatibility — only `target_ids[0]` is used.
1539
+ *
1540
+ */
1541
+ target_ids: /**
1542
+ * example:
1543
+ * b8c01433-5556-4e2b-aad4-6f5348d1df84
1544
+ */
1545
+ BaseUUID /* uuid */[];
1546
+ };
1547
+ }
1548
+ export interface SetupTariffChangeCampaignResponse {
1549
+ type: "tariff_change";
1550
+ product_recommendation_id: /**
1551
+ * example:
1552
+ * b8c01433-5556-4e2b-aad4-6f5348d1df84
1553
+ */
1554
+ BaseUUID /* uuid */;
1555
+ campaign_id: /**
1556
+ * example:
1557
+ * b8c01433-5556-4e2b-aad4-6f5348d1df84
1558
+ */
1559
+ BaseUUID /* uuid */;
1560
+ }
1468
1561
  export interface Target {
1469
1562
  _id?: /**
1470
1563
  * example:
@@ -1665,6 +1758,19 @@ declare namespace Paths {
1665
1758
  export type $500 = Components.Responses.ServerErrorResponse;
1666
1759
  }
1667
1760
  }
1761
+ namespace SetupCampaign {
1762
+ export type RequestBody = /**
1763
+ * Discriminated by `type`. Each campaign variant has its own request shape;
1764
+ * new variants are added by introducing a new schema and extending the `oneOf` list.
1765
+ *
1766
+ */
1767
+ Components.Schemas.SetupCampaignRequest;
1768
+ namespace Responses {
1769
+ export type $201 = Components.Responses.SetupCampaignResponse;
1770
+ export type $400 = Components.Responses.ClientErrorResponse;
1771
+ export type $500 = Components.Responses.ServerErrorResponse;
1772
+ }
1773
+ }
1668
1774
  namespace UpdateRecipient {
1669
1775
  namespace Parameters {
1670
1776
  export type CampaignId = /**
@@ -1772,6 +1878,18 @@ interface OperationMethods {
1772
1878
  data?: Paths.RetriggerCampaignAutomations.RequestBody,
1773
1879
  config?: AxiosRequestConfig
1774
1880
  ): OperationResponse<Paths.RetriggerCampaignAutomations.Responses.$200>
1881
+ /**
1882
+ * setupCampaign - Set up a campaign with related entities and configurations
1883
+ *
1884
+ * Creates a `campaign` entity together with its related entities and configurations in a single call.
1885
+ * Used by the campaign wizard UI, but not restricted to it.
1886
+ *
1887
+ */
1888
+ 'setupCampaign'(
1889
+ parameters?: Parameters<UnknownParamsObject> | null,
1890
+ data?: Paths.SetupCampaign.RequestBody,
1891
+ config?: AxiosRequestConfig
1892
+ ): OperationResponse<Paths.SetupCampaign.Responses.$201>
1775
1893
  /**
1776
1894
  * matchCampaigns - Match campaigns
1777
1895
  *
@@ -1919,6 +2037,20 @@ interface PathsDictionary {
1919
2037
  config?: AxiosRequestConfig
1920
2038
  ): OperationResponse<Paths.RetriggerCampaignAutomations.Responses.$200>
1921
2039
  }
2040
+ ['/v1/campaign:setup']: {
2041
+ /**
2042
+ * setupCampaign - Set up a campaign with related entities and configurations
2043
+ *
2044
+ * Creates a `campaign` entity together with its related entities and configurations in a single call.
2045
+ * Used by the campaign wizard UI, but not restricted to it.
2046
+ *
2047
+ */
2048
+ 'post'(
2049
+ parameters?: Parameters<UnknownParamsObject> | null,
2050
+ data?: Paths.SetupCampaign.RequestBody,
2051
+ config?: AxiosRequestConfig
2052
+ ): OperationResponse<Paths.SetupCampaign.Responses.$201>
2053
+ }
1922
2054
  ['/v1/campaign:match']: {
1923
2055
  /**
1924
2056
  * matchCampaigns - Match campaigns
@@ -2049,9 +2181,12 @@ type Recipient = Components.Schemas.Recipient;
2049
2181
  type RetriggerAutomationsRequest = Components.Schemas.RetriggerAutomationsRequest;
2050
2182
  type RetriggerAutomationsResult = Components.Schemas.RetriggerAutomationsResult;
2051
2183
  type ServerError = Components.Schemas.ServerError;
2184
+ type SetupCampaignRequest = Components.Schemas.SetupCampaignRequest;
2185
+ type SetupTariffChangeCampaignRequest = Components.Schemas.SetupTariffChangeCampaignRequest;
2186
+ type SetupTariffChangeCampaignResponse = Components.Schemas.SetupTariffChangeCampaignResponse;
2052
2187
  type Target = Components.Schemas.Target;
2053
2188
  type TargetQueryResult = Components.Schemas.TargetQueryResult;
2054
2189
  type UpdatePortalStatusRequest = Components.Schemas.UpdatePortalStatusRequest;
2055
2190
  type UpdateRecipientPayload = Components.Schemas.UpdateRecipientPayload;
2056
2191
 
2057
- export { type AutomationRecipientPayload as A, type BaseEntityAcl as B, type Client as C, 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 TargetQueryResult as w, type UpdateRecipientPayload as x };
2192
+ 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 };
package/docs/targeting.md CHANGED
@@ -28,6 +28,7 @@ const { data } = await targetingClient.changeCampaignStatus(...)
28
28
  - [`changeCampaignStatus`](#changecampaignstatus)
29
29
  - [`getCampaignJobStatus`](#getcampaignjobstatus)
30
30
  - [`getCampaignPortals`](#getcampaignportals)
31
+ - [`setupCampaign`](#setupcampaign)
31
32
  - [`matchCampaigns`](#matchcampaigns)
32
33
 
33
34
  **Campaign Delivery**
@@ -76,6 +77,9 @@ const { data } = await targetingClient.changeCampaignStatus(...)
76
77
  - [`RetriggerAutomationsRequest`](#retriggerautomationsrequest)
77
78
  - [`RetriggerAutomationsResult`](#retriggerautomationsresult)
78
79
  - [`UpdatePortalStatusRequest`](#updateportalstatusrequest)
80
+ - [`SetupCampaignRequest`](#setupcampaignrequest)
81
+ - [`SetupTariffChangeCampaignRequest`](#setuptariffchangecampaignrequest)
82
+ - [`SetupTariffChangeCampaignResponse`](#setuptariffchangecampaignresponse)
79
83
 
80
84
  ### `changeCampaignStatus`
81
85
 
@@ -245,6 +249,58 @@ const { data } = await client.retriggerCampaignAutomations(
245
249
 
246
250
  ---
247
251
 
252
+ ### `setupCampaign`
253
+
254
+ Set up a campaign with related entities and configurations
255
+
256
+ `POST /v1/campaign:setup`
257
+
258
+ ```ts
259
+ const { data } = await client.setupCampaign(
260
+ null,
261
+ {
262
+ type: 'tariff_change',
263
+ product_recommendation: {
264
+ name: 'string',
265
+ source_product_id: 'b8c01433-5556-4e2b-aad4-6f5348d1df84',
266
+ source_price_id: 'b8c01433-5556-4e2b-aad4-6f5348d1df84',
267
+ offers: [
268
+ {
269
+ target_id: 'b8c01433-5556-4e2b-aad4-6f5348d1df84',
270
+ items: [
271
+ {
272
+ product_id: 'b8c01433-5556-4e2b-aad4-6f5348d1df84',
273
+ price_id: 'b8c01433-5556-4e2b-aad4-6f5348d1df84',
274
+ highlight_config: {}
275
+ }
276
+ ]
277
+ }
278
+ ]
279
+ },
280
+ campaign: {
281
+ name: 'string',
282
+ goal: 'string',
283
+ target_ids: ['b8c01433-5556-4e2b-aad4-6f5348d1df84']
284
+ }
285
+ },
286
+ )
287
+ ```
288
+
289
+ <details>
290
+ <summary>Response</summary>
291
+
292
+ ```json
293
+ {
294
+ "type": "tariff_change",
295
+ "product_recommendation_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",
296
+ "campaign_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84"
297
+ }
298
+ ```
299
+
300
+ </details>
301
+
302
+ ---
303
+
248
304
  ### `matchCampaigns`
249
305
 
250
306
  Match campaigns
@@ -957,3 +1013,61 @@ type UpdatePortalStatusRequest = {
957
1013
  status: "sent" | "seen" | "dismissed" | "clicked"
958
1014
  }
959
1015
  ```
1016
+
1017
+ ### `SetupCampaignRequest`
1018
+
1019
+ Discriminated by `type`. Each campaign variant has its own request shape;
1020
+ new variants are added by introducing a new schema and extending the `oneOf` list.
1021
+
1022
+
1023
+ ```ts
1024
+ type SetupCampaignRequest = {
1025
+ type: "tariff_change"
1026
+ product_recommendation: {
1027
+ name?: string
1028
+ source_product_id?: string // uuid
1029
+ source_price_id?: string // uuid
1030
+ offers?: Array<{
1031
+ target_id?: { ... }
1032
+ items: { ... }
1033
+ }>
1034
+ }
1035
+ campaign: {
1036
+ name: string
1037
+ goal?: string
1038
+ target_ids: string // uuid[]
1039
+ }
1040
+ }
1041
+ ```
1042
+
1043
+ ### `SetupTariffChangeCampaignRequest`
1044
+
1045
+ ```ts
1046
+ type SetupTariffChangeCampaignRequest = {
1047
+ type: "tariff_change"
1048
+ product_recommendation: {
1049
+ name?: string
1050
+ source_product_id?: string // uuid
1051
+ source_price_id?: string // uuid
1052
+ offers?: Array<{
1053
+ target_id?: { ... }
1054
+ items: { ... }
1055
+ }>
1056
+ }
1057
+ campaign: {
1058
+ name: string
1059
+ goal?: string
1060
+ target_ids: string // uuid[]
1061
+ }
1062
+ }
1063
+ ```
1064
+
1065
+ ### `SetupTariffChangeCampaignResponse`
1066
+
1067
+ ```ts
1068
+ type SetupTariffChangeCampaignResponse = {
1069
+ type: "tariff_change"
1070
+ product_recommendation_id: string // uuid
1071
+ campaign_id: string // uuid
1072
+ }
1073
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/sdk",
3
- "version": "2.7.5",
3
+ "version": "2.7.6",
4
4
  "description": "JavaScript/TypeScript SDK for epilot APIs",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -1,14 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
-
3
- var _chunkNJK5F5TFcjs = require('./chunk-NJK5F5TF.cjs');
4
-
5
- // src/definitions/targeting-runtime.json
6
- var require_targeting_runtime = _chunkNJK5F5TFcjs.__commonJS.call(void 0, {
7
- "src/definitions/targeting-runtime.json"(exports, module) {
8
- module.exports = { s: "https://targeting.sls.epilot.io", o: [["changeCampaignStatus", "post", "/v1/campaign/{campaign_id}/status", [["CampaignIdPathParam"]]], ["getCampaignJobStatus", "get", "/v1/campaign/{campaign_id}/job", [["CampaignIdPathParam"]]], ["getCampaignPortals", "get", "/v1/campaign/{campaign_id}/portals", [["CampaignIdPathParam"]]], ["retriggerCampaignAutomations", "post", "/v1/campaign/{campaign_id}/automations:retrigger", [["CampaignIdPathParam"]], 1], ["matchCampaigns", "post", "/v1/campaign:match", null, 1], ["matchTargets", "post", "/v1/target:match", null, 1], ["getTargetQueries", "post", "/v1/target/queries", null, 1], ["createRecipient", "post", "/v1/campaign/{campaign_id}/recipient", [["CampaignIdPathParam"]], 1], ["updateRecipient", "patch", "/v1/campaign/{campaign_id}/recipient/{recipient_id}", [["CampaignIdPathParam"], ["RecipientIdPathParam"]], 1], ["updateRecipientPortalStatus", "patch", "/v1/campaign/{campaign_id}/recipient/{recipient_id}/portal:status", [["CampaignIdPathParam"], ["RecipientIdPathParam"]], 1], ["getRecipients", "get", "/v1/campaign/{campaign_id}/recipients", [["CampaignIdPathParam"], ["limit", "q"], ["next", "q"], ["q", "q"], ["automation_status", "q"], ["portal_status", "q"]]]], v: "3.0.3", cp: { CampaignIdPathParam: ["campaign_id", "p", true], RecipientIdPathParam: ["recipient_id", "p", true] } };
9
- }
10
- });
11
-
12
-
13
-
14
- exports.require_targeting_runtime = require_targeting_runtime;
@@ -1,14 +0,0 @@
1
- import {
2
- __commonJS
3
- } from "./chunk-YPSWSI3M.js";
4
-
5
- // src/definitions/targeting-runtime.json
6
- var require_targeting_runtime = __commonJS({
7
- "src/definitions/targeting-runtime.json"(exports, module) {
8
- module.exports = { s: "https://targeting.sls.epilot.io", o: [["changeCampaignStatus", "post", "/v1/campaign/{campaign_id}/status", [["CampaignIdPathParam"]]], ["getCampaignJobStatus", "get", "/v1/campaign/{campaign_id}/job", [["CampaignIdPathParam"]]], ["getCampaignPortals", "get", "/v1/campaign/{campaign_id}/portals", [["CampaignIdPathParam"]]], ["retriggerCampaignAutomations", "post", "/v1/campaign/{campaign_id}/automations:retrigger", [["CampaignIdPathParam"]], 1], ["matchCampaigns", "post", "/v1/campaign:match", null, 1], ["matchTargets", "post", "/v1/target:match", null, 1], ["getTargetQueries", "post", "/v1/target/queries", null, 1], ["createRecipient", "post", "/v1/campaign/{campaign_id}/recipient", [["CampaignIdPathParam"]], 1], ["updateRecipient", "patch", "/v1/campaign/{campaign_id}/recipient/{recipient_id}", [["CampaignIdPathParam"], ["RecipientIdPathParam"]], 1], ["updateRecipientPortalStatus", "patch", "/v1/campaign/{campaign_id}/recipient/{recipient_id}/portal:status", [["CampaignIdPathParam"], ["RecipientIdPathParam"]], 1], ["getRecipients", "get", "/v1/campaign/{campaign_id}/recipients", [["CampaignIdPathParam"], ["limit", "q"], ["next", "q"], ["q", "q"], ["automation_status", "q"], ["portal_status", "q"]]]], v: "3.0.3", cp: { CampaignIdPathParam: ["campaign_id", "p", true], RecipientIdPathParam: ["recipient_id", "p", true] } };
9
- }
10
- });
11
-
12
- export {
13
- require_targeting_runtime
14
- };
@@ -1,7 +0,0 @@
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- [`matchCampaigns`](#matchcampaigns)\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- [`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- [`MatchTargetParams`](#matchtargetparams)\n- [`GetTargetQueriesParams`](#gettargetqueriesparams)\n- [`TargetQueryResult`](#targetqueryresult)\n- [`AutomationStatus`](#automationstatus)\n- [`PortalStatus`](#portalstatus)\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\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### `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### `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 "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 "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 "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: \'example\',\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 "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### `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### `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 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';
5
-
6
-
7
- exports.default = targeting_default;