@epilot/sdk 2.9.5 → 2.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (176) hide show
  1. package/definitions/ai-agents-runtime.json +1 -1
  2. package/definitions/ai-agents.json +63 -936
  3. package/definitions/focus-pocus-runtime.json +1 -0
  4. package/definitions/focus-pocus.json +757 -0
  5. package/definitions/integration-toolkit-runtime.json +1 -1
  6. package/definitions/integration-toolkit.json +213 -2
  7. package/definitions/targeting-runtime.json +1 -1
  8. package/definitions/targeting.json +2 -7
  9. package/definitions/workflow-runtime.json +1 -1
  10. package/definitions/workflow.json +60 -445
  11. package/dist/ai-agents-IZWFEUSH.js +7 -0
  12. package/dist/ai-agents-PWHKNRCX.cjs +7 -0
  13. package/dist/{ai-agents-runtime-EA23HCCP.js → ai-agents-runtime-25YRUJHI.js} +1 -1
  14. package/dist/{targeting-runtime-X3DQ527N.cjs → ai-agents-runtime-TILIO3UM.cjs} +2 -2
  15. package/dist/{ai-agents.d-D-7bTH-9.d.cts → ai-agents.d-CC5IjXrs.d.cts} +5 -506
  16. package/dist/{ai-agents.d-D-7bTH-9.d.ts → ai-agents.d-CC5IjXrs.d.ts} +5 -506
  17. package/dist/apis/access-token.cjs +6 -6
  18. package/dist/apis/access-token.js +1 -1
  19. package/dist/apis/address-suggestions.cjs +6 -6
  20. package/dist/apis/address-suggestions.js +1 -1
  21. package/dist/apis/address.cjs +6 -6
  22. package/dist/apis/address.js +1 -1
  23. package/dist/apis/ai-agents.cjs +8 -8
  24. package/dist/apis/ai-agents.d.cts +2 -2
  25. package/dist/apis/ai-agents.d.ts +2 -2
  26. package/dist/apis/ai-agents.js +2 -2
  27. package/dist/apis/app.cjs +6 -6
  28. package/dist/apis/app.js +1 -1
  29. package/dist/apis/audit-logs.cjs +6 -6
  30. package/dist/apis/audit-logs.js +1 -1
  31. package/dist/apis/automation.cjs +6 -6
  32. package/dist/apis/automation.js +1 -1
  33. package/dist/apis/billing.cjs +6 -6
  34. package/dist/apis/billing.js +1 -1
  35. package/dist/apis/blueprint-manifest.cjs +6 -6
  36. package/dist/apis/blueprint-manifest.js +1 -1
  37. package/dist/apis/calendar.cjs +6 -6
  38. package/dist/apis/calendar.js +1 -1
  39. package/dist/apis/configuration-hub.cjs +6 -6
  40. package/dist/apis/configuration-hub.js +1 -1
  41. package/dist/apis/consent.cjs +6 -6
  42. package/dist/apis/consent.js +1 -1
  43. package/dist/apis/customer-portal.cjs +6 -6
  44. package/dist/apis/customer-portal.js +1 -1
  45. package/dist/apis/dashboard.cjs +6 -6
  46. package/dist/apis/dashboard.js +1 -1
  47. package/dist/apis/data-governance.cjs +6 -6
  48. package/dist/apis/data-governance.js +1 -1
  49. package/dist/apis/deduplication.cjs +6 -6
  50. package/dist/apis/deduplication.js +1 -1
  51. package/dist/apis/design.cjs +6 -6
  52. package/dist/apis/design.js +1 -1
  53. package/dist/apis/document.cjs +6 -6
  54. package/dist/apis/document.js +1 -1
  55. package/dist/apis/email-settings.cjs +6 -6
  56. package/dist/apis/email-settings.js +1 -1
  57. package/dist/apis/email-template.cjs +6 -6
  58. package/dist/apis/email-template.js +1 -1
  59. package/dist/apis/entity-mapping.cjs +6 -6
  60. package/dist/apis/entity-mapping.js +1 -1
  61. package/dist/apis/entity.cjs +6 -6
  62. package/dist/apis/entity.js +1 -1
  63. package/dist/apis/environments.cjs +6 -6
  64. package/dist/apis/environments.js +1 -1
  65. package/dist/apis/event-catalog.cjs +6 -6
  66. package/dist/apis/event-catalog.js +1 -1
  67. package/dist/apis/file.cjs +6 -6
  68. package/dist/apis/file.js +1 -1
  69. package/dist/apis/iban.cjs +6 -6
  70. package/dist/apis/iban.js +1 -1
  71. package/dist/apis/integration-toolkit.cjs +8 -8
  72. package/dist/apis/integration-toolkit.d.cts +2 -2
  73. package/dist/apis/integration-toolkit.d.ts +2 -2
  74. package/dist/apis/integration-toolkit.js +2 -2
  75. package/dist/apis/journey.cjs +6 -6
  76. package/dist/apis/journey.js +1 -1
  77. package/dist/apis/kanban.cjs +6 -6
  78. package/dist/apis/kanban.js +1 -1
  79. package/dist/apis/message.cjs +6 -6
  80. package/dist/apis/message.js +1 -1
  81. package/dist/apis/metering.cjs +6 -6
  82. package/dist/apis/metering.js +1 -1
  83. package/dist/apis/notes.cjs +6 -6
  84. package/dist/apis/notes.js +1 -1
  85. package/dist/apis/notification.cjs +6 -6
  86. package/dist/apis/notification.js +1 -1
  87. package/dist/apis/organization.cjs +6 -6
  88. package/dist/apis/organization.js +1 -1
  89. package/dist/apis/partner-directory.cjs +6 -6
  90. package/dist/apis/partner-directory.js +1 -1
  91. package/dist/apis/permissions.cjs +6 -6
  92. package/dist/apis/permissions.js +1 -1
  93. package/dist/apis/pricing-tier.cjs +6 -6
  94. package/dist/apis/pricing-tier.js +1 -1
  95. package/dist/apis/pricing.cjs +6 -6
  96. package/dist/apis/pricing.js +1 -1
  97. package/dist/apis/purpose.cjs +6 -6
  98. package/dist/apis/purpose.js +1 -1
  99. package/dist/apis/query.cjs +6 -6
  100. package/dist/apis/query.js +1 -1
  101. package/dist/apis/sandbox.cjs +6 -6
  102. package/dist/apis/sandbox.js +1 -1
  103. package/dist/apis/sharing.cjs +6 -6
  104. package/dist/apis/sharing.js +1 -1
  105. package/dist/apis/snapshot.cjs +6 -6
  106. package/dist/apis/snapshot.js +1 -1
  107. package/dist/apis/submission.cjs +6 -6
  108. package/dist/apis/submission.js +1 -1
  109. package/dist/apis/target.cjs +6 -6
  110. package/dist/apis/target.js +1 -1
  111. package/dist/apis/targeting.cjs +8 -8
  112. package/dist/apis/targeting.d.cts +2 -2
  113. package/dist/apis/targeting.d.ts +2 -2
  114. package/dist/apis/targeting.js +2 -2
  115. package/dist/apis/template-variables.cjs +6 -6
  116. package/dist/apis/template-variables.js +1 -1
  117. package/dist/apis/user.cjs +6 -6
  118. package/dist/apis/user.js +1 -1
  119. package/dist/apis/validation-rules.cjs +6 -6
  120. package/dist/apis/validation-rules.js +1 -1
  121. package/dist/apis/webhooks.cjs +6 -6
  122. package/dist/apis/webhooks.js +1 -1
  123. package/dist/apis/workflow-definition.cjs +6 -6
  124. package/dist/apis/workflow-definition.js +1 -1
  125. package/dist/apis/workflow.cjs +8 -8
  126. package/dist/apis/workflow.d.cts +2 -2
  127. package/dist/apis/workflow.d.ts +2 -2
  128. package/dist/apis/workflow.js +2 -2
  129. package/dist/chunk-7WGJSGWE.js +14 -0
  130. package/dist/chunk-FARDEGPH.cjs +14 -0
  131. package/dist/chunk-JENQHXFI.js +14 -0
  132. package/dist/{chunk-522LYPPW.js → chunk-KQKBSWGI.js} +1 -1
  133. package/dist/{chunk-H3NMCCSA.js → chunk-LSPXLT3A.js} +1 -1
  134. package/dist/{chunk-7ILTRJDQ.cjs → chunk-MCK2QUSD.cjs} +1 -1
  135. package/dist/{chunk-IIQYDQGR.cjs → chunk-OJGUX5TG.cjs} +8 -8
  136. package/dist/{chunk-PM25LLET.cjs → chunk-QNZPOA54.cjs} +1 -1
  137. package/dist/{chunk-DBRYXXXY.js → chunk-XH5F3S6Y.js} +8 -8
  138. package/dist/chunk-YISO22FS.cjs +14 -0
  139. package/dist/index.cjs +16 -16
  140. package/dist/index.d.cts +4 -4
  141. package/dist/index.d.ts +4 -4
  142. package/dist/index.js +5 -5
  143. package/dist/integration-toolkit-DUMRNE6A.cjs +7 -0
  144. package/dist/integration-toolkit-IK7KA76K.js +7 -0
  145. package/dist/{integration-toolkit-runtime-FR6RZS5O.cjs → integration-toolkit-runtime-4LHEPGGC.cjs} +2 -2
  146. package/dist/{integration-toolkit-runtime-I2O6QP5G.js → integration-toolkit-runtime-5K3AAC63.js} +1 -1
  147. package/dist/{integration-toolkit.d-DUZ_fiuf.d.cts → integration-toolkit.d-BVe_MBBi.d.cts} +162 -3
  148. package/dist/{integration-toolkit.d-DUZ_fiuf.d.ts → integration-toolkit.d-BVe_MBBi.d.ts} +162 -3
  149. package/dist/js-yaml-DLCVPJ7G.js +0 -0
  150. package/dist/{targeting-4YMBBPDW.cjs → targeting-WC62BBZN.cjs} +1 -1
  151. package/dist/{targeting-VCENULF6.js → targeting-X4Y2ODBT.js} +1 -1
  152. package/dist/{targeting-runtime-QI7322HB.js → targeting-runtime-D5YUPZQM.js} +1 -1
  153. package/dist/{ai-agents-runtime-WZ3EI3NH.cjs → targeting-runtime-MLMOM7CK.cjs} +2 -2
  154. package/dist/{targeting.d-Bq3onSes.d.ts → targeting.d-0rNF7ErD.d.cts} +1 -1
  155. package/dist/{targeting.d-Bq3onSes.d.cts → targeting.d-0rNF7ErD.d.ts} +1 -1
  156. package/dist/workflow-3WBD74WR.js +7 -0
  157. package/dist/workflow-WIUZ5TOX.cjs +7 -0
  158. package/dist/{workflow-runtime-L5HMFISV.js → workflow-runtime-DNTQDYPQ.js} +1 -1
  159. package/dist/{workflow-runtime-LMGACZP4.cjs → workflow-runtime-VKFESVFX.cjs} +2 -2
  160. package/dist/{workflow.d-eFv0ecBi.d.cts → workflow.d-CMSKt8oN.d.cts} +81 -745
  161. package/dist/{workflow.d-eFv0ecBi.d.ts → workflow.d-CMSKt8oN.d.ts} +81 -745
  162. package/docs/ai-agents.md +23 -641
  163. package/docs/integration-toolkit.md +133 -0
  164. package/docs/targeting.md +1 -1
  165. package/docs/workflow.md +47 -247
  166. package/package.json +12 -11
  167. package/dist/ai-agents-D6C5TXLD.cjs +0 -7
  168. package/dist/ai-agents-Y6PH53PH.js +0 -7
  169. package/dist/chunk-3CNCQJOJ.js +0 -14
  170. package/dist/chunk-BRWY3QHG.js +0 -14
  171. package/dist/chunk-ILIHCSNO.cjs +0 -14
  172. package/dist/chunk-YEBEA6XU.cjs +0 -14
  173. package/dist/integration-toolkit-TL3BQ6FJ.cjs +0 -7
  174. package/dist/integration-toolkit-X3Y4OFVW.js +0 -7
  175. package/dist/workflow-7OU2YEEI.cjs +0 -7
  176. package/dist/workflow-IVKCWS44.js +0 -7
@@ -2907,9 +2907,9 @@ declare namespace Components {
2907
2907
  rules: /* A single notification rule. Only the params relevant to a given type are set. The id is a server-minted ULID, preserved across edits. */ NotificationRule[];
2908
2908
  digest: /* Digest schedule and content configuration. */ NotificationDigestConfig;
2909
2909
  /**
2910
- * ISO instant; snooze all non-digest alerts until this time.
2910
+ * ISO instant; snooze all non-digest alerts until this time. `null` means not muted.
2911
2911
  */
2912
- muteUntil?: string; // date-time
2912
+ muteUntil?: string | null; // date-time
2913
2913
  }
2914
2914
  export interface IntegrationObjectV1 {
2915
2915
  /**
@@ -3675,6 +3675,71 @@ declare namespace Components {
3675
3675
  */
3676
3676
  quietPeriod?: string;
3677
3677
  }
3678
+ export interface NotificationRuleStatus {
3679
+ /**
3680
+ * The rule's stable id (matches the configured rule id).
3681
+ */
3682
+ rule_id: string;
3683
+ /**
3684
+ * The rule's live AlertState (defaults to `ok` when never evaluated).
3685
+ */
3686
+ state: "ok" | "alerting" | "recovered";
3687
+ /**
3688
+ * ISO instant the rule last entered ALERTING.
3689
+ */
3690
+ last_fired_at?: string | null; // date-time
3691
+ /**
3692
+ * ISO instant the rule last cleared back to OK.
3693
+ */
3694
+ last_cleared_at?: string | null; // date-time
3695
+ /**
3696
+ * Present only for enabled 'auto'-threshold rules; null otherwise.
3697
+ */
3698
+ baseline?: {
3699
+ /**
3700
+ * False during cold start; the sweeper uses the static fallbackThreshold until the baseline's history span is mature.
3701
+ *
3702
+ */
3703
+ is_mature: boolean;
3704
+ /**
3705
+ * ISO instant the baseline was last computed.
3706
+ */
3707
+ computed_at?: string | null; // date-time
3708
+ /**
3709
+ * Typical in-scope event volume for the current hour-of-week bucket.
3710
+ */
3711
+ median?: number | null;
3712
+ /**
3713
+ * Median absolute deviation for the current hour-of-week bucket.
3714
+ */
3715
+ mad?: number | null;
3716
+ /**
3717
+ * Dynamic alert threshold (median + k·MAD, k by sensitivity) for the current hour-of-week, or null when the bucket is uncovered.
3718
+ *
3719
+ */
3720
+ upper?: number | null;
3721
+ /**
3722
+ * Full 168-bucket series; only present when ?include=baseline_series.
3723
+ */
3724
+ buckets?: RuleBaselineBucket[] | null;
3725
+ } | null;
3726
+ }
3727
+ export interface NotificationStatusResponse {
3728
+ /**
3729
+ * Rolled-up live status: `muted` when muteUntil is in the future; else `alerting` if any rule is currently ALERTING; else `healthy`.
3730
+ *
3731
+ */
3732
+ health: "healthy" | "alerting" | "muted";
3733
+ /**
3734
+ * Most recent per-rule evaluation instant (max lastEvaluatedAt), or null when no rule has been evaluated. Updates on the 5-minute sweep tick.
3735
+ *
3736
+ */
3737
+ evaluated_at?: string | null; // date-time
3738
+ /**
3739
+ * Per-rule status, one entry per configured rule.
3740
+ */
3741
+ rules: NotificationRuleStatus[];
3742
+ }
3678
3743
  export interface OutboundConflict {
3679
3744
  /**
3680
3745
  * Type of conflict:
@@ -4866,6 +4931,46 @@ declare namespace Components {
4866
4931
  string?
4867
4932
  ];
4868
4933
  }
4934
+ export interface RuleBaselineBucket {
4935
+ /**
4936
+ * Day of week, 1=Monday … 7=Sunday.
4937
+ */
4938
+ dow: number;
4939
+ /**
4940
+ * Hour of day, 0 … 23 (UTC).
4941
+ */
4942
+ hour: number;
4943
+ median: number;
4944
+ mad: number;
4945
+ }
4946
+ export interface RuleBaselineStatus {
4947
+ /**
4948
+ * False during cold start; the sweeper uses the static fallbackThreshold until the baseline's history span is mature.
4949
+ *
4950
+ */
4951
+ is_mature: boolean;
4952
+ /**
4953
+ * ISO instant the baseline was last computed.
4954
+ */
4955
+ computed_at?: string | null; // date-time
4956
+ /**
4957
+ * Typical in-scope event volume for the current hour-of-week bucket.
4958
+ */
4959
+ median?: number | null;
4960
+ /**
4961
+ * Median absolute deviation for the current hour-of-week bucket.
4962
+ */
4963
+ mad?: number | null;
4964
+ /**
4965
+ * Dynamic alert threshold (median + k·MAD, k by sensitivity) for the current hour-of-week, or null when the bucket is uncovered.
4966
+ *
4967
+ */
4968
+ upper?: number | null;
4969
+ /**
4970
+ * Full 168-bucket series; only present when ?include=baseline_series.
4971
+ */
4972
+ buckets?: RuleBaselineBucket[] | null;
4973
+ }
4869
4974
  export interface SecureProxyRequest {
4870
4975
  /**
4871
4976
  * Integration ID that owns the secure_proxy use case
@@ -6020,6 +6125,26 @@ declare namespace Paths {
6020
6125
  export type $500 = Components.Responses.InternalServerError;
6021
6126
  }
6022
6127
  }
6128
+ namespace GetNotificationStatus {
6129
+ namespace Parameters {
6130
+ export type Include = "baseline_series";
6131
+ export type IntegrationId = string; // uuid
6132
+ }
6133
+ export interface PathParameters {
6134
+ integrationId: Parameters.IntegrationId /* uuid */;
6135
+ }
6136
+ export interface QueryParameters {
6137
+ include?: Parameters.Include;
6138
+ }
6139
+ namespace Responses {
6140
+ export type $200 = Components.Schemas.NotificationStatusResponse;
6141
+ export type $400 = Components.Responses.BadRequest;
6142
+ export type $401 = Components.Responses.Unauthorized;
6143
+ export type $403 = Components.Responses.Forbidden;
6144
+ export type $404 = Components.Responses.NotFound;
6145
+ export type $500 = Components.Responses.InternalServerError;
6146
+ }
6147
+ }
6023
6148
  namespace GetOutboundStatus {
6024
6149
  namespace Parameters {
6025
6150
  export type IntegrationId = string; // uuid
@@ -6931,6 +7056,20 @@ interface OperationMethods {
6931
7056
  data?: Paths.TestSendNotification.RequestBody,
6932
7057
  config?: AxiosRequestConfig
6933
7058
  ): OperationResponse<Paths.TestSendNotification.Responses.$202>
7059
+ /**
7060
+ * getNotificationStatus - getNotificationStatus
7061
+ *
7062
+ * Returns the live per-rule alert state and (for 'auto' rules) the current
7063
+ * hour-of-week baseline band for an integration's notification monitoring.
7064
+ * Reflects the latest 5-minute sweep — near-real-time, not live.
7065
+ * Requires the `integration:view` permission on the integration's organization.
7066
+ *
7067
+ */
7068
+ 'getNotificationStatus'(
7069
+ parameters?: Parameters<Paths.GetNotificationStatus.QueryParameters & Paths.GetNotificationStatus.PathParameters> | null,
7070
+ data?: any,
7071
+ config?: AxiosRequestConfig
7072
+ ): OperationResponse<Paths.GetNotificationStatus.Responses.$200>
6934
7073
  /**
6935
7074
  * getSecureProxyWhitelist - Get secure_proxy whitelist (admin portal only)
6936
7075
  *
@@ -7640,6 +7779,22 @@ interface PathsDictionary {
7640
7779
  config?: AxiosRequestConfig
7641
7780
  ): OperationResponse<Paths.TestSendNotification.Responses.$202>
7642
7781
  }
7782
+ ['/v2/integrations/{integrationId}/notifications/status']: {
7783
+ /**
7784
+ * getNotificationStatus - getNotificationStatus
7785
+ *
7786
+ * Returns the live per-rule alert state and (for 'auto' rules) the current
7787
+ * hour-of-week baseline band for an integration's notification monitoring.
7788
+ * Reflects the latest 5-minute sweep — near-real-time, not live.
7789
+ * Requires the `integration:view` permission on the integration's organization.
7790
+ *
7791
+ */
7792
+ 'get'(
7793
+ parameters?: Parameters<Paths.GetNotificationStatus.QueryParameters & Paths.GetNotificationStatus.PathParameters> | null,
7794
+ data?: any,
7795
+ config?: AxiosRequestConfig
7796
+ ): OperationResponse<Paths.GetNotificationStatus.Responses.$200>
7797
+ }
7643
7798
  ['/v2/integrations/{integrationId}/use-cases/{useCaseId}/secure-proxy-whitelist']: {
7644
7799
  /**
7645
7800
  * getSecureProxyWhitelist - Get secure_proxy whitelist (admin portal only)
@@ -8152,6 +8307,8 @@ type NotificationHistoryItem = Components.Schemas.NotificationHistoryItem;
8152
8307
  type NotificationHistoryResponse = Components.Schemas.NotificationHistoryResponse;
8153
8308
  type NotificationRecipient = Components.Schemas.NotificationRecipient;
8154
8309
  type NotificationRule = Components.Schemas.NotificationRule;
8310
+ type NotificationRuleStatus = Components.Schemas.NotificationRuleStatus;
8311
+ type NotificationStatusResponse = Components.Schemas.NotificationStatusResponse;
8155
8312
  type OutboundConflict = Components.Schemas.OutboundConflict;
8156
8313
  type OutboundDlqListResponse = Components.Schemas.OutboundDlqListResponse;
8157
8314
  type OutboundDlqMessage = Components.Schemas.OutboundDlqMessage;
@@ -8187,6 +8344,8 @@ type RelationRefsConfig = Components.Schemas.RelationRefsConfig;
8187
8344
  type RelationUniqueIdField = Components.Schemas.RelationUniqueIdField;
8188
8345
  type RepeatableFieldType = Components.Schemas.RepeatableFieldType;
8189
8346
  type ReplayEventsRequest = Components.Schemas.ReplayEventsRequest;
8347
+ type RuleBaselineBucket = Components.Schemas.RuleBaselineBucket;
8348
+ type RuleBaselineStatus = Components.Schemas.RuleBaselineStatus;
8190
8349
  type SecureProxyRequest = Components.Schemas.SecureProxyRequest;
8191
8350
  type SecureProxyResponse = Components.Schemas.SecureProxyResponse;
8192
8351
  type SecureProxySummary = Components.Schemas.SecureProxySummary;
@@ -8225,4 +8384,4 @@ type UseCaseTypePreview = Components.Schemas.UseCaseTypePreview;
8225
8384
  type WebhookDeliveryConfig = Components.Schemas.WebhookDeliveryConfig;
8226
8385
  type WebhookStatus = Components.Schemas.WebhookStatus;
8227
8386
 
8228
- export { type GetMonitoringStatsV2Request as $, type AccessLogEntry as A, type EnvironmentFieldConfig as B, type Client as C, type DeleteIntegrationAppMappingRequest as D, type EmbeddedFileProxyUseCaseRequest as E, type ErpEvent as F, type ErpEventV3 as G, type ErpUpdatesEventsV2Request as H, type ErpUpdatesEventsV3Request as I, type ErrorResponseBase as J, type FileProxyAuth as K, type FileProxyParam as L, type FileProxyResponseConfig as M, type FileProxySecureProxyAttachment as N, type OperationMethods as O, Paths as P, type FileProxyStep as Q, type FileProxyUrlConfig as R, type FileProxyUrlParam as S, type FileProxyUrlParams as T, type FileProxyUseCase as U, type FileProxyUseCaseConfiguration as V, type FileProxyUseCaseHistoryEntry as W, type GenerateTypesPreviewResponse as X, type GenerateTypesRequest as Y, type GenerateTypesResponse as Z, type GetMonitoringStatsRequest as _, Components as a, type QueryEventsRequest as a$, type GetMonitoringTimeSeriesRequest as a0, type GetMonitoringTimeSeriesV2Request as a1, type InboundIntegrationEventConfiguration as a2, type InboundMonitoringEvent as a3, type InboundUseCase as a4, type InboundUseCaseHistoryEntry as a5, type Integration as a6, type IntegrationAppMapping as a7, type IntegrationConfigurationV1 as a8, type IntegrationConfigurationV2 as a9, type MonitoringStatsV2 as aA, type NotificationChannelSet as aB, type NotificationDigestConfig as aC, type NotificationHistoryItem as aD, type NotificationHistoryResponse as aE, type NotificationRecipient as aF, type NotificationRule as aG, type OutboundConflict as aH, type OutboundDlqListResponse as aI, type OutboundDlqMessage as aJ, type OutboundIntegrationEventConfiguration as aK, type OutboundMapping as aL, type OutboundMessage as aM, type OutboundMonitoringEvent as aN, type OutboundPollStatus as aO, type OutboundStatusResponse as aP, type OutboundUseCase as aQ, type OutboundUseCaseHistoryEntry as aR, type OutboundUseCaseStatus as aS, type PollDeliveryConfig as aT, type PollOutboundMessagesRequest as aU, type PollOutboundMessagesResponse as aV, type PortalOrigin as aW, type PortalRefConfig as aX, type PortalRefFilter as aY, type PruneScopeConfig as aZ, type QueryAccessLogsRequest as a_, type IntegrationEditableFields as aa, type IntegrationEntity as ab, type IntegrationEntityField as ac, type IntegrationFieldV1 as ad, type IntegrationMeterReading as ae, type IntegrationNotificationConfig as af, type IntegrationObjectV1 as ag, type IntegrationSettings as ah, type IntegrationWithUseCases as ai, type ManagedCallAuth as aj, type ManagedCallErrorResponse as ak, type ManagedCallExecuteRequest as al, type ManagedCallExecuteResponse as am, type ManagedCallOperation as an, type ManagedCallOperationConfig as ao, type ManagedCallUseCase as ap, type ManagedCallUseCaseHistoryEntry as aq, type MappingSimulationRequest as ar, type MappingSimulationResponse as as, type MappingSimulationV2Request as at, type MappingSimulationWarning as au, type MeterReadingPruneScopeConfig as av, type MeterReadingUpdate as aw, type MeterUniqueIdsConfig as ax, type MonitoringEventV2 as ay, type MonitoringStats as az, type PathsDictionary as b, type QueryInboundMonitoringEventsRequest as b0, type QueryMonitoringEventsV2Request as b1, type QueryOutboundMonitoringEventsRequest as b2, type RedriveOutboundDlqRequest as b3, type RedriveOutboundDlqResponse as b4, type RedriveOutboundDlqResult as b5, type RelationConfig as b6, type RelationItemConfig as b7, type RelationRefItemConfig as b8, type RelationRefValueConfig as b9, type UpdateInboundUseCaseRequest as bA, type UpdateIntegrationRequest as bB, type UpdateManagedCallUseCaseRequest as bC, type UpdateOutboundUseCaseRequest as bD, type UpdateSecureProxyUseCaseRequest as bE, type UpdateUseCaseRequest as bF, type UpdateUseCaseRequestBase as bG, type UpsertIntegrationWithUseCasesRequest as bH, type UseCase as bI, type UseCaseBase as bJ, type UseCaseHistoryEntry as bK, type UseCaseHistoryEntryBase as bL, type UseCaseTypePreview as bM, type WebhookDeliveryConfig as bN, type WebhookStatus as bO, type RelationRefsConfig as ba, type RelationUniqueIdField as bb, type RepeatableFieldType as bc, type ReplayEventsRequest as bd, type SecureProxyRequest as be, type SecureProxyResponse as bf, type SecureProxySummary as bg, type SecureProxyUpstreamError as bh, type SecureProxyUseCase as bi, type SecureProxyUseCaseConfiguration as bj, type SecureProxyUseCaseHistoryEntry as bk, type SecureProxyWhitelist as bl, type SecureProxyWhitelistUpdate as bm, type SetIntegrationAppMappingRequest as bn, type TestNotificationRequest as bo, type TestNotificationResponse as bp, type TimeSeriesBreakdownItemV2 as bq, type TimeSeriesBucket as br, type TimeSeriesBucketV2 as bs, type TriggerErpActionRequest as bt, type TriggerWebhookResp as bu, type TypeAnnotations as bv, type TypeDescriptor as bw, type UnblockOutboundStreamRequest as bx, type UnblockOutboundStreamResponse as by, type UpdateFileProxyUseCaseRequest as bz, type AckOutboundMessagesRequest as c, type AckOutboundMessagesResponse as d, type AckResult as e, type AutoRefreshSettings as f, type CommitTypesRequest as g, type CommitTypesResponse as h, type ConnectorConfig as i, type CreateFileProxyUseCaseRequest as j, type CreateInboundUseCaseRequest as k, type CreateIntegrationRequest as l, type CreateManagedCallUseCaseRequest as m, type CreateOutboundUseCaseRequest as n, type CreateSecureProxyUseCaseRequest as o, type CreateUseCaseRequest as p, type CreateUseCaseRequestBase as q, type DeliveryConfig as r, type EmbeddedInboundUseCaseRequest as s, type EmbeddedManagedCallUseCaseRequest as t, type EmbeddedOutboundUseCaseRequest as u, type EmbeddedSecureProxyUseCaseRequest as v, type EmbeddedUseCaseRequest as w, type EmbeddedUseCaseRequestBase as x, type EntityUpdate as y, type EnvVarRefConfig as z };
8387
+ export { type GetMonitoringStatsV2Request as $, type AccessLogEntry as A, type EnvironmentFieldConfig as B, type Client as C, type DeleteIntegrationAppMappingRequest as D, type EmbeddedFileProxyUseCaseRequest as E, type ErpEvent as F, type ErpEventV3 as G, type ErpUpdatesEventsV2Request as H, type ErpUpdatesEventsV3Request as I, type ErrorResponseBase as J, type FileProxyAuth as K, type FileProxyParam as L, type FileProxyResponseConfig as M, type FileProxySecureProxyAttachment as N, type OperationMethods as O, Paths as P, type FileProxyStep as Q, type FileProxyUrlConfig as R, type FileProxyUrlParam as S, type FileProxyUrlParams as T, type FileProxyUseCase as U, type FileProxyUseCaseConfiguration as V, type FileProxyUseCaseHistoryEntry as W, type GenerateTypesPreviewResponse as X, type GenerateTypesRequest as Y, type GenerateTypesResponse as Z, type GetMonitoringStatsRequest as _, Components as a, type PruneScopeConfig as a$, type GetMonitoringTimeSeriesRequest as a0, type GetMonitoringTimeSeriesV2Request as a1, type InboundIntegrationEventConfiguration as a2, type InboundMonitoringEvent as a3, type InboundUseCase as a4, type InboundUseCaseHistoryEntry as a5, type Integration as a6, type IntegrationAppMapping as a7, type IntegrationConfigurationV1 as a8, type IntegrationConfigurationV2 as a9, type MonitoringStatsV2 as aA, type NotificationChannelSet as aB, type NotificationDigestConfig as aC, type NotificationHistoryItem as aD, type NotificationHistoryResponse as aE, type NotificationRecipient as aF, type NotificationRule as aG, type NotificationRuleStatus as aH, type NotificationStatusResponse as aI, type OutboundConflict as aJ, type OutboundDlqListResponse as aK, type OutboundDlqMessage as aL, type OutboundIntegrationEventConfiguration as aM, type OutboundMapping as aN, type OutboundMessage as aO, type OutboundMonitoringEvent as aP, type OutboundPollStatus as aQ, type OutboundStatusResponse as aR, type OutboundUseCase as aS, type OutboundUseCaseHistoryEntry as aT, type OutboundUseCaseStatus as aU, type PollDeliveryConfig as aV, type PollOutboundMessagesRequest as aW, type PollOutboundMessagesResponse as aX, type PortalOrigin as aY, type PortalRefConfig as aZ, type PortalRefFilter as a_, type IntegrationEditableFields as aa, type IntegrationEntity as ab, type IntegrationEntityField as ac, type IntegrationFieldV1 as ad, type IntegrationMeterReading as ae, type IntegrationNotificationConfig as af, type IntegrationObjectV1 as ag, type IntegrationSettings as ah, type IntegrationWithUseCases as ai, type ManagedCallAuth as aj, type ManagedCallErrorResponse as ak, type ManagedCallExecuteRequest as al, type ManagedCallExecuteResponse as am, type ManagedCallOperation as an, type ManagedCallOperationConfig as ao, type ManagedCallUseCase as ap, type ManagedCallUseCaseHistoryEntry as aq, type MappingSimulationRequest as ar, type MappingSimulationResponse as as, type MappingSimulationV2Request as at, type MappingSimulationWarning as au, type MeterReadingPruneScopeConfig as av, type MeterReadingUpdate as aw, type MeterUniqueIdsConfig as ax, type MonitoringEventV2 as ay, type MonitoringStats as az, type PathsDictionary as b, type QueryAccessLogsRequest as b0, type QueryEventsRequest as b1, type QueryInboundMonitoringEventsRequest as b2, type QueryMonitoringEventsV2Request as b3, type QueryOutboundMonitoringEventsRequest as b4, type RedriveOutboundDlqRequest as b5, type RedriveOutboundDlqResponse as b6, type RedriveOutboundDlqResult as b7, type RelationConfig as b8, type RelationItemConfig as b9, type TypeDescriptor as bA, type UnblockOutboundStreamRequest as bB, type UnblockOutboundStreamResponse as bC, type UpdateFileProxyUseCaseRequest as bD, type UpdateInboundUseCaseRequest as bE, type UpdateIntegrationRequest as bF, type UpdateManagedCallUseCaseRequest as bG, type UpdateOutboundUseCaseRequest as bH, type UpdateSecureProxyUseCaseRequest as bI, type UpdateUseCaseRequest as bJ, type UpdateUseCaseRequestBase as bK, type UpsertIntegrationWithUseCasesRequest as bL, type UseCase as bM, type UseCaseBase as bN, type UseCaseHistoryEntry as bO, type UseCaseHistoryEntryBase as bP, type UseCaseTypePreview as bQ, type WebhookDeliveryConfig as bR, type WebhookStatus as bS, type RelationRefItemConfig as ba, type RelationRefValueConfig as bb, type RelationRefsConfig as bc, type RelationUniqueIdField as bd, type RepeatableFieldType as be, type ReplayEventsRequest as bf, type RuleBaselineBucket as bg, type RuleBaselineStatus as bh, type SecureProxyRequest as bi, type SecureProxyResponse as bj, type SecureProxySummary as bk, type SecureProxyUpstreamError as bl, type SecureProxyUseCase as bm, type SecureProxyUseCaseConfiguration as bn, type SecureProxyUseCaseHistoryEntry as bo, type SecureProxyWhitelist as bp, type SecureProxyWhitelistUpdate as bq, type SetIntegrationAppMappingRequest as br, type TestNotificationRequest as bs, type TestNotificationResponse as bt, type TimeSeriesBreakdownItemV2 as bu, type TimeSeriesBucket as bv, type TimeSeriesBucketV2 as bw, type TriggerErpActionRequest as bx, type TriggerWebhookResp as by, type TypeAnnotations as bz, type AckOutboundMessagesRequest as c, type AckOutboundMessagesResponse as d, type AckResult as e, type AutoRefreshSettings as f, type CommitTypesRequest as g, type CommitTypesResponse as h, type ConnectorConfig as i, type CreateFileProxyUseCaseRequest as j, type CreateInboundUseCaseRequest as k, type CreateIntegrationRequest as l, type CreateManagedCallUseCaseRequest as m, type CreateOutboundUseCaseRequest as n, type CreateSecureProxyUseCaseRequest as o, type CreateUseCaseRequest as p, type CreateUseCaseRequestBase as q, type DeliveryConfig as r, type EmbeddedInboundUseCaseRequest as s, type EmbeddedManagedCallUseCaseRequest as t, type EmbeddedOutboundUseCaseRequest as u, type EmbeddedSecureProxyUseCaseRequest as v, type EmbeddedUseCaseRequest as w, type EmbeddedUseCaseRequestBase as x, type EntityUpdate as y, type EnvVarRefConfig as z };
@@ -2907,9 +2907,9 @@ declare namespace Components {
2907
2907
  rules: /* A single notification rule. Only the params relevant to a given type are set. The id is a server-minted ULID, preserved across edits. */ NotificationRule[];
2908
2908
  digest: /* Digest schedule and content configuration. */ NotificationDigestConfig;
2909
2909
  /**
2910
- * ISO instant; snooze all non-digest alerts until this time.
2910
+ * ISO instant; snooze all non-digest alerts until this time. `null` means not muted.
2911
2911
  */
2912
- muteUntil?: string; // date-time
2912
+ muteUntil?: string | null; // date-time
2913
2913
  }
2914
2914
  export interface IntegrationObjectV1 {
2915
2915
  /**
@@ -3675,6 +3675,71 @@ declare namespace Components {
3675
3675
  */
3676
3676
  quietPeriod?: string;
3677
3677
  }
3678
+ export interface NotificationRuleStatus {
3679
+ /**
3680
+ * The rule's stable id (matches the configured rule id).
3681
+ */
3682
+ rule_id: string;
3683
+ /**
3684
+ * The rule's live AlertState (defaults to `ok` when never evaluated).
3685
+ */
3686
+ state: "ok" | "alerting" | "recovered";
3687
+ /**
3688
+ * ISO instant the rule last entered ALERTING.
3689
+ */
3690
+ last_fired_at?: string | null; // date-time
3691
+ /**
3692
+ * ISO instant the rule last cleared back to OK.
3693
+ */
3694
+ last_cleared_at?: string | null; // date-time
3695
+ /**
3696
+ * Present only for enabled 'auto'-threshold rules; null otherwise.
3697
+ */
3698
+ baseline?: {
3699
+ /**
3700
+ * False during cold start; the sweeper uses the static fallbackThreshold until the baseline's history span is mature.
3701
+ *
3702
+ */
3703
+ is_mature: boolean;
3704
+ /**
3705
+ * ISO instant the baseline was last computed.
3706
+ */
3707
+ computed_at?: string | null; // date-time
3708
+ /**
3709
+ * Typical in-scope event volume for the current hour-of-week bucket.
3710
+ */
3711
+ median?: number | null;
3712
+ /**
3713
+ * Median absolute deviation for the current hour-of-week bucket.
3714
+ */
3715
+ mad?: number | null;
3716
+ /**
3717
+ * Dynamic alert threshold (median + k·MAD, k by sensitivity) for the current hour-of-week, or null when the bucket is uncovered.
3718
+ *
3719
+ */
3720
+ upper?: number | null;
3721
+ /**
3722
+ * Full 168-bucket series; only present when ?include=baseline_series.
3723
+ */
3724
+ buckets?: RuleBaselineBucket[] | null;
3725
+ } | null;
3726
+ }
3727
+ export interface NotificationStatusResponse {
3728
+ /**
3729
+ * Rolled-up live status: `muted` when muteUntil is in the future; else `alerting` if any rule is currently ALERTING; else `healthy`.
3730
+ *
3731
+ */
3732
+ health: "healthy" | "alerting" | "muted";
3733
+ /**
3734
+ * Most recent per-rule evaluation instant (max lastEvaluatedAt), or null when no rule has been evaluated. Updates on the 5-minute sweep tick.
3735
+ *
3736
+ */
3737
+ evaluated_at?: string | null; // date-time
3738
+ /**
3739
+ * Per-rule status, one entry per configured rule.
3740
+ */
3741
+ rules: NotificationRuleStatus[];
3742
+ }
3678
3743
  export interface OutboundConflict {
3679
3744
  /**
3680
3745
  * Type of conflict:
@@ -4866,6 +4931,46 @@ declare namespace Components {
4866
4931
  string?
4867
4932
  ];
4868
4933
  }
4934
+ export interface RuleBaselineBucket {
4935
+ /**
4936
+ * Day of week, 1=Monday … 7=Sunday.
4937
+ */
4938
+ dow: number;
4939
+ /**
4940
+ * Hour of day, 0 … 23 (UTC).
4941
+ */
4942
+ hour: number;
4943
+ median: number;
4944
+ mad: number;
4945
+ }
4946
+ export interface RuleBaselineStatus {
4947
+ /**
4948
+ * False during cold start; the sweeper uses the static fallbackThreshold until the baseline's history span is mature.
4949
+ *
4950
+ */
4951
+ is_mature: boolean;
4952
+ /**
4953
+ * ISO instant the baseline was last computed.
4954
+ */
4955
+ computed_at?: string | null; // date-time
4956
+ /**
4957
+ * Typical in-scope event volume for the current hour-of-week bucket.
4958
+ */
4959
+ median?: number | null;
4960
+ /**
4961
+ * Median absolute deviation for the current hour-of-week bucket.
4962
+ */
4963
+ mad?: number | null;
4964
+ /**
4965
+ * Dynamic alert threshold (median + k·MAD, k by sensitivity) for the current hour-of-week, or null when the bucket is uncovered.
4966
+ *
4967
+ */
4968
+ upper?: number | null;
4969
+ /**
4970
+ * Full 168-bucket series; only present when ?include=baseline_series.
4971
+ */
4972
+ buckets?: RuleBaselineBucket[] | null;
4973
+ }
4869
4974
  export interface SecureProxyRequest {
4870
4975
  /**
4871
4976
  * Integration ID that owns the secure_proxy use case
@@ -6020,6 +6125,26 @@ declare namespace Paths {
6020
6125
  export type $500 = Components.Responses.InternalServerError;
6021
6126
  }
6022
6127
  }
6128
+ namespace GetNotificationStatus {
6129
+ namespace Parameters {
6130
+ export type Include = "baseline_series";
6131
+ export type IntegrationId = string; // uuid
6132
+ }
6133
+ export interface PathParameters {
6134
+ integrationId: Parameters.IntegrationId /* uuid */;
6135
+ }
6136
+ export interface QueryParameters {
6137
+ include?: Parameters.Include;
6138
+ }
6139
+ namespace Responses {
6140
+ export type $200 = Components.Schemas.NotificationStatusResponse;
6141
+ export type $400 = Components.Responses.BadRequest;
6142
+ export type $401 = Components.Responses.Unauthorized;
6143
+ export type $403 = Components.Responses.Forbidden;
6144
+ export type $404 = Components.Responses.NotFound;
6145
+ export type $500 = Components.Responses.InternalServerError;
6146
+ }
6147
+ }
6023
6148
  namespace GetOutboundStatus {
6024
6149
  namespace Parameters {
6025
6150
  export type IntegrationId = string; // uuid
@@ -6931,6 +7056,20 @@ interface OperationMethods {
6931
7056
  data?: Paths.TestSendNotification.RequestBody,
6932
7057
  config?: AxiosRequestConfig
6933
7058
  ): OperationResponse<Paths.TestSendNotification.Responses.$202>
7059
+ /**
7060
+ * getNotificationStatus - getNotificationStatus
7061
+ *
7062
+ * Returns the live per-rule alert state and (for 'auto' rules) the current
7063
+ * hour-of-week baseline band for an integration's notification monitoring.
7064
+ * Reflects the latest 5-minute sweep — near-real-time, not live.
7065
+ * Requires the `integration:view` permission on the integration's organization.
7066
+ *
7067
+ */
7068
+ 'getNotificationStatus'(
7069
+ parameters?: Parameters<Paths.GetNotificationStatus.QueryParameters & Paths.GetNotificationStatus.PathParameters> | null,
7070
+ data?: any,
7071
+ config?: AxiosRequestConfig
7072
+ ): OperationResponse<Paths.GetNotificationStatus.Responses.$200>
6934
7073
  /**
6935
7074
  * getSecureProxyWhitelist - Get secure_proxy whitelist (admin portal only)
6936
7075
  *
@@ -7640,6 +7779,22 @@ interface PathsDictionary {
7640
7779
  config?: AxiosRequestConfig
7641
7780
  ): OperationResponse<Paths.TestSendNotification.Responses.$202>
7642
7781
  }
7782
+ ['/v2/integrations/{integrationId}/notifications/status']: {
7783
+ /**
7784
+ * getNotificationStatus - getNotificationStatus
7785
+ *
7786
+ * Returns the live per-rule alert state and (for 'auto' rules) the current
7787
+ * hour-of-week baseline band for an integration's notification monitoring.
7788
+ * Reflects the latest 5-minute sweep — near-real-time, not live.
7789
+ * Requires the `integration:view` permission on the integration's organization.
7790
+ *
7791
+ */
7792
+ 'get'(
7793
+ parameters?: Parameters<Paths.GetNotificationStatus.QueryParameters & Paths.GetNotificationStatus.PathParameters> | null,
7794
+ data?: any,
7795
+ config?: AxiosRequestConfig
7796
+ ): OperationResponse<Paths.GetNotificationStatus.Responses.$200>
7797
+ }
7643
7798
  ['/v2/integrations/{integrationId}/use-cases/{useCaseId}/secure-proxy-whitelist']: {
7644
7799
  /**
7645
7800
  * getSecureProxyWhitelist - Get secure_proxy whitelist (admin portal only)
@@ -8152,6 +8307,8 @@ type NotificationHistoryItem = Components.Schemas.NotificationHistoryItem;
8152
8307
  type NotificationHistoryResponse = Components.Schemas.NotificationHistoryResponse;
8153
8308
  type NotificationRecipient = Components.Schemas.NotificationRecipient;
8154
8309
  type NotificationRule = Components.Schemas.NotificationRule;
8310
+ type NotificationRuleStatus = Components.Schemas.NotificationRuleStatus;
8311
+ type NotificationStatusResponse = Components.Schemas.NotificationStatusResponse;
8155
8312
  type OutboundConflict = Components.Schemas.OutboundConflict;
8156
8313
  type OutboundDlqListResponse = Components.Schemas.OutboundDlqListResponse;
8157
8314
  type OutboundDlqMessage = Components.Schemas.OutboundDlqMessage;
@@ -8187,6 +8344,8 @@ type RelationRefsConfig = Components.Schemas.RelationRefsConfig;
8187
8344
  type RelationUniqueIdField = Components.Schemas.RelationUniqueIdField;
8188
8345
  type RepeatableFieldType = Components.Schemas.RepeatableFieldType;
8189
8346
  type ReplayEventsRequest = Components.Schemas.ReplayEventsRequest;
8347
+ type RuleBaselineBucket = Components.Schemas.RuleBaselineBucket;
8348
+ type RuleBaselineStatus = Components.Schemas.RuleBaselineStatus;
8190
8349
  type SecureProxyRequest = Components.Schemas.SecureProxyRequest;
8191
8350
  type SecureProxyResponse = Components.Schemas.SecureProxyResponse;
8192
8351
  type SecureProxySummary = Components.Schemas.SecureProxySummary;
@@ -8225,4 +8384,4 @@ type UseCaseTypePreview = Components.Schemas.UseCaseTypePreview;
8225
8384
  type WebhookDeliveryConfig = Components.Schemas.WebhookDeliveryConfig;
8226
8385
  type WebhookStatus = Components.Schemas.WebhookStatus;
8227
8386
 
8228
- export { type GetMonitoringStatsV2Request as $, type AccessLogEntry as A, type EnvironmentFieldConfig as B, type Client as C, type DeleteIntegrationAppMappingRequest as D, type EmbeddedFileProxyUseCaseRequest as E, type ErpEvent as F, type ErpEventV3 as G, type ErpUpdatesEventsV2Request as H, type ErpUpdatesEventsV3Request as I, type ErrorResponseBase as J, type FileProxyAuth as K, type FileProxyParam as L, type FileProxyResponseConfig as M, type FileProxySecureProxyAttachment as N, type OperationMethods as O, Paths as P, type FileProxyStep as Q, type FileProxyUrlConfig as R, type FileProxyUrlParam as S, type FileProxyUrlParams as T, type FileProxyUseCase as U, type FileProxyUseCaseConfiguration as V, type FileProxyUseCaseHistoryEntry as W, type GenerateTypesPreviewResponse as X, type GenerateTypesRequest as Y, type GenerateTypesResponse as Z, type GetMonitoringStatsRequest as _, Components as a, type QueryEventsRequest as a$, type GetMonitoringTimeSeriesRequest as a0, type GetMonitoringTimeSeriesV2Request as a1, type InboundIntegrationEventConfiguration as a2, type InboundMonitoringEvent as a3, type InboundUseCase as a4, type InboundUseCaseHistoryEntry as a5, type Integration as a6, type IntegrationAppMapping as a7, type IntegrationConfigurationV1 as a8, type IntegrationConfigurationV2 as a9, type MonitoringStatsV2 as aA, type NotificationChannelSet as aB, type NotificationDigestConfig as aC, type NotificationHistoryItem as aD, type NotificationHistoryResponse as aE, type NotificationRecipient as aF, type NotificationRule as aG, type OutboundConflict as aH, type OutboundDlqListResponse as aI, type OutboundDlqMessage as aJ, type OutboundIntegrationEventConfiguration as aK, type OutboundMapping as aL, type OutboundMessage as aM, type OutboundMonitoringEvent as aN, type OutboundPollStatus as aO, type OutboundStatusResponse as aP, type OutboundUseCase as aQ, type OutboundUseCaseHistoryEntry as aR, type OutboundUseCaseStatus as aS, type PollDeliveryConfig as aT, type PollOutboundMessagesRequest as aU, type PollOutboundMessagesResponse as aV, type PortalOrigin as aW, type PortalRefConfig as aX, type PortalRefFilter as aY, type PruneScopeConfig as aZ, type QueryAccessLogsRequest as a_, type IntegrationEditableFields as aa, type IntegrationEntity as ab, type IntegrationEntityField as ac, type IntegrationFieldV1 as ad, type IntegrationMeterReading as ae, type IntegrationNotificationConfig as af, type IntegrationObjectV1 as ag, type IntegrationSettings as ah, type IntegrationWithUseCases as ai, type ManagedCallAuth as aj, type ManagedCallErrorResponse as ak, type ManagedCallExecuteRequest as al, type ManagedCallExecuteResponse as am, type ManagedCallOperation as an, type ManagedCallOperationConfig as ao, type ManagedCallUseCase as ap, type ManagedCallUseCaseHistoryEntry as aq, type MappingSimulationRequest as ar, type MappingSimulationResponse as as, type MappingSimulationV2Request as at, type MappingSimulationWarning as au, type MeterReadingPruneScopeConfig as av, type MeterReadingUpdate as aw, type MeterUniqueIdsConfig as ax, type MonitoringEventV2 as ay, type MonitoringStats as az, type PathsDictionary as b, type QueryInboundMonitoringEventsRequest as b0, type QueryMonitoringEventsV2Request as b1, type QueryOutboundMonitoringEventsRequest as b2, type RedriveOutboundDlqRequest as b3, type RedriveOutboundDlqResponse as b4, type RedriveOutboundDlqResult as b5, type RelationConfig as b6, type RelationItemConfig as b7, type RelationRefItemConfig as b8, type RelationRefValueConfig as b9, type UpdateInboundUseCaseRequest as bA, type UpdateIntegrationRequest as bB, type UpdateManagedCallUseCaseRequest as bC, type UpdateOutboundUseCaseRequest as bD, type UpdateSecureProxyUseCaseRequest as bE, type UpdateUseCaseRequest as bF, type UpdateUseCaseRequestBase as bG, type UpsertIntegrationWithUseCasesRequest as bH, type UseCase as bI, type UseCaseBase as bJ, type UseCaseHistoryEntry as bK, type UseCaseHistoryEntryBase as bL, type UseCaseTypePreview as bM, type WebhookDeliveryConfig as bN, type WebhookStatus as bO, type RelationRefsConfig as ba, type RelationUniqueIdField as bb, type RepeatableFieldType as bc, type ReplayEventsRequest as bd, type SecureProxyRequest as be, type SecureProxyResponse as bf, type SecureProxySummary as bg, type SecureProxyUpstreamError as bh, type SecureProxyUseCase as bi, type SecureProxyUseCaseConfiguration as bj, type SecureProxyUseCaseHistoryEntry as bk, type SecureProxyWhitelist as bl, type SecureProxyWhitelistUpdate as bm, type SetIntegrationAppMappingRequest as bn, type TestNotificationRequest as bo, type TestNotificationResponse as bp, type TimeSeriesBreakdownItemV2 as bq, type TimeSeriesBucket as br, type TimeSeriesBucketV2 as bs, type TriggerErpActionRequest as bt, type TriggerWebhookResp as bu, type TypeAnnotations as bv, type TypeDescriptor as bw, type UnblockOutboundStreamRequest as bx, type UnblockOutboundStreamResponse as by, type UpdateFileProxyUseCaseRequest as bz, type AckOutboundMessagesRequest as c, type AckOutboundMessagesResponse as d, type AckResult as e, type AutoRefreshSettings as f, type CommitTypesRequest as g, type CommitTypesResponse as h, type ConnectorConfig as i, type CreateFileProxyUseCaseRequest as j, type CreateInboundUseCaseRequest as k, type CreateIntegrationRequest as l, type CreateManagedCallUseCaseRequest as m, type CreateOutboundUseCaseRequest as n, type CreateSecureProxyUseCaseRequest as o, type CreateUseCaseRequest as p, type CreateUseCaseRequestBase as q, type DeliveryConfig as r, type EmbeddedInboundUseCaseRequest as s, type EmbeddedManagedCallUseCaseRequest as t, type EmbeddedOutboundUseCaseRequest as u, type EmbeddedSecureProxyUseCaseRequest as v, type EmbeddedUseCaseRequest as w, type EmbeddedUseCaseRequestBase as x, type EntityUpdate as y, type EnvVarRefConfig as z };
8387
+ export { type GetMonitoringStatsV2Request as $, type AccessLogEntry as A, type EnvironmentFieldConfig as B, type Client as C, type DeleteIntegrationAppMappingRequest as D, type EmbeddedFileProxyUseCaseRequest as E, type ErpEvent as F, type ErpEventV3 as G, type ErpUpdatesEventsV2Request as H, type ErpUpdatesEventsV3Request as I, type ErrorResponseBase as J, type FileProxyAuth as K, type FileProxyParam as L, type FileProxyResponseConfig as M, type FileProxySecureProxyAttachment as N, type OperationMethods as O, Paths as P, type FileProxyStep as Q, type FileProxyUrlConfig as R, type FileProxyUrlParam as S, type FileProxyUrlParams as T, type FileProxyUseCase as U, type FileProxyUseCaseConfiguration as V, type FileProxyUseCaseHistoryEntry as W, type GenerateTypesPreviewResponse as X, type GenerateTypesRequest as Y, type GenerateTypesResponse as Z, type GetMonitoringStatsRequest as _, Components as a, type PruneScopeConfig as a$, type GetMonitoringTimeSeriesRequest as a0, type GetMonitoringTimeSeriesV2Request as a1, type InboundIntegrationEventConfiguration as a2, type InboundMonitoringEvent as a3, type InboundUseCase as a4, type InboundUseCaseHistoryEntry as a5, type Integration as a6, type IntegrationAppMapping as a7, type IntegrationConfigurationV1 as a8, type IntegrationConfigurationV2 as a9, type MonitoringStatsV2 as aA, type NotificationChannelSet as aB, type NotificationDigestConfig as aC, type NotificationHistoryItem as aD, type NotificationHistoryResponse as aE, type NotificationRecipient as aF, type NotificationRule as aG, type NotificationRuleStatus as aH, type NotificationStatusResponse as aI, type OutboundConflict as aJ, type OutboundDlqListResponse as aK, type OutboundDlqMessage as aL, type OutboundIntegrationEventConfiguration as aM, type OutboundMapping as aN, type OutboundMessage as aO, type OutboundMonitoringEvent as aP, type OutboundPollStatus as aQ, type OutboundStatusResponse as aR, type OutboundUseCase as aS, type OutboundUseCaseHistoryEntry as aT, type OutboundUseCaseStatus as aU, type PollDeliveryConfig as aV, type PollOutboundMessagesRequest as aW, type PollOutboundMessagesResponse as aX, type PortalOrigin as aY, type PortalRefConfig as aZ, type PortalRefFilter as a_, type IntegrationEditableFields as aa, type IntegrationEntity as ab, type IntegrationEntityField as ac, type IntegrationFieldV1 as ad, type IntegrationMeterReading as ae, type IntegrationNotificationConfig as af, type IntegrationObjectV1 as ag, type IntegrationSettings as ah, type IntegrationWithUseCases as ai, type ManagedCallAuth as aj, type ManagedCallErrorResponse as ak, type ManagedCallExecuteRequest as al, type ManagedCallExecuteResponse as am, type ManagedCallOperation as an, type ManagedCallOperationConfig as ao, type ManagedCallUseCase as ap, type ManagedCallUseCaseHistoryEntry as aq, type MappingSimulationRequest as ar, type MappingSimulationResponse as as, type MappingSimulationV2Request as at, type MappingSimulationWarning as au, type MeterReadingPruneScopeConfig as av, type MeterReadingUpdate as aw, type MeterUniqueIdsConfig as ax, type MonitoringEventV2 as ay, type MonitoringStats as az, type PathsDictionary as b, type QueryAccessLogsRequest as b0, type QueryEventsRequest as b1, type QueryInboundMonitoringEventsRequest as b2, type QueryMonitoringEventsV2Request as b3, type QueryOutboundMonitoringEventsRequest as b4, type RedriveOutboundDlqRequest as b5, type RedriveOutboundDlqResponse as b6, type RedriveOutboundDlqResult as b7, type RelationConfig as b8, type RelationItemConfig as b9, type TypeDescriptor as bA, type UnblockOutboundStreamRequest as bB, type UnblockOutboundStreamResponse as bC, type UpdateFileProxyUseCaseRequest as bD, type UpdateInboundUseCaseRequest as bE, type UpdateIntegrationRequest as bF, type UpdateManagedCallUseCaseRequest as bG, type UpdateOutboundUseCaseRequest as bH, type UpdateSecureProxyUseCaseRequest as bI, type UpdateUseCaseRequest as bJ, type UpdateUseCaseRequestBase as bK, type UpsertIntegrationWithUseCasesRequest as bL, type UseCase as bM, type UseCaseBase as bN, type UseCaseHistoryEntry as bO, type UseCaseHistoryEntryBase as bP, type UseCaseTypePreview as bQ, type WebhookDeliveryConfig as bR, type WebhookStatus as bS, type RelationRefItemConfig as ba, type RelationRefValueConfig as bb, type RelationRefsConfig as bc, type RelationUniqueIdField as bd, type RepeatableFieldType as be, type ReplayEventsRequest as bf, type RuleBaselineBucket as bg, type RuleBaselineStatus as bh, type SecureProxyRequest as bi, type SecureProxyResponse as bj, type SecureProxySummary as bk, type SecureProxyUpstreamError as bl, type SecureProxyUseCase as bm, type SecureProxyUseCaseConfiguration as bn, type SecureProxyUseCaseHistoryEntry as bo, type SecureProxyWhitelist as bp, type SecureProxyWhitelistUpdate as bq, type SetIntegrationAppMappingRequest as br, type TestNotificationRequest as bs, type TestNotificationResponse as bt, type TimeSeriesBreakdownItemV2 as bu, type TimeSeriesBucket as bv, type TimeSeriesBucketV2 as bw, type TriggerErpActionRequest as bx, type TriggerWebhookResp as by, type TypeAnnotations as bz, type AckOutboundMessagesRequest as c, type AckOutboundMessagesResponse as d, type AckResult as e, type AutoRefreshSettings as f, type CommitTypesRequest as g, type CommitTypesResponse as h, type ConnectorConfig as i, type CreateFileProxyUseCaseRequest as j, type CreateInboundUseCaseRequest as k, type CreateIntegrationRequest as l, type CreateManagedCallUseCaseRequest as m, type CreateOutboundUseCaseRequest as n, type CreateSecureProxyUseCaseRequest as o, type CreateUseCaseRequest as p, type CreateUseCaseRequestBase as q, type DeliveryConfig as r, type EmbeddedInboundUseCaseRequest as s, type EmbeddedManagedCallUseCaseRequest as t, type EmbeddedOutboundUseCaseRequest as u, type EmbeddedSecureProxyUseCaseRequest as v, type EmbeddedUseCaseRequest as w, type EmbeddedUseCaseRequestBase as x, type EntityUpdate as y, type EnvVarRefConfig as z };
File without changes
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-NJK5F5TF.cjs');
2
2
 
3
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\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- [`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### `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: [\'...\'],\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\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';
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\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- [`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### `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\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
5
 
6
6
 
7
7
  exports.default = targeting_default;