@epilot/sdk 2.13.2 → 2.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/definitions/message-runtime.json +1 -1
- package/definitions/message.json +146 -1
- package/definitions/targeting-runtime.json +1 -1
- package/definitions/targeting.json +291 -0
- package/definitions/webhooks.json +8 -7
- package/dist/apis/access-token.cjs +6 -6
- package/dist/apis/access-token.js +1 -1
- package/dist/apis/address-suggestions.cjs +6 -6
- package/dist/apis/address-suggestions.js +1 -1
- package/dist/apis/address.cjs +6 -6
- package/dist/apis/address.js +1 -1
- package/dist/apis/ai-agents.cjs +6 -6
- package/dist/apis/ai-agents.js +1 -1
- package/dist/apis/app.cjs +6 -6
- package/dist/apis/app.js +1 -1
- package/dist/apis/audit-logs.cjs +6 -6
- package/dist/apis/audit-logs.js +1 -1
- package/dist/apis/automation.cjs +6 -6
- package/dist/apis/automation.js +1 -1
- package/dist/apis/billing.cjs +6 -6
- package/dist/apis/billing.js +1 -1
- package/dist/apis/blueprint-manifest.cjs +6 -6
- package/dist/apis/blueprint-manifest.js +1 -1
- package/dist/apis/calendar.cjs +6 -6
- package/dist/apis/calendar.js +1 -1
- package/dist/apis/configuration-hub.cjs +6 -6
- package/dist/apis/configuration-hub.js +1 -1
- package/dist/apis/consent.cjs +6 -6
- package/dist/apis/consent.js +1 -1
- package/dist/apis/customer-portal.cjs +6 -6
- package/dist/apis/customer-portal.js +1 -1
- package/dist/apis/dashboard.cjs +6 -6
- package/dist/apis/dashboard.js +1 -1
- package/dist/apis/data-governance.cjs +6 -6
- package/dist/apis/data-governance.js +1 -1
- package/dist/apis/deduplication.cjs +6 -6
- package/dist/apis/deduplication.js +1 -1
- package/dist/apis/design.cjs +6 -6
- package/dist/apis/design.js +1 -1
- package/dist/apis/document.cjs +6 -6
- package/dist/apis/document.js +1 -1
- package/dist/apis/email-settings.cjs +6 -6
- package/dist/apis/email-settings.js +1 -1
- package/dist/apis/email-template.cjs +6 -6
- package/dist/apis/email-template.js +1 -1
- package/dist/apis/entity-mapping.cjs +6 -6
- package/dist/apis/entity-mapping.js +1 -1
- package/dist/apis/entity.cjs +6 -6
- package/dist/apis/entity.js +1 -1
- package/dist/apis/environments.cjs +6 -6
- package/dist/apis/environments.js +1 -1
- package/dist/apis/event-catalog.cjs +6 -6
- package/dist/apis/event-catalog.js +1 -1
- package/dist/apis/file.cjs +6 -6
- package/dist/apis/file.js +1 -1
- package/dist/apis/iban.cjs +6 -6
- package/dist/apis/iban.js +1 -1
- package/dist/apis/integration-toolkit.cjs +6 -6
- package/dist/apis/integration-toolkit.js +1 -1
- package/dist/apis/journey.cjs +6 -6
- package/dist/apis/journey.js +1 -1
- package/dist/apis/kanban.cjs +6 -6
- package/dist/apis/kanban.js +1 -1
- package/dist/apis/message.cjs +8 -8
- package/dist/apis/message.d.cts +2 -2
- package/dist/apis/message.d.ts +2 -2
- package/dist/apis/message.js +2 -2
- package/dist/apis/metering.cjs +6 -6
- package/dist/apis/metering.js +1 -1
- package/dist/apis/notes.cjs +6 -6
- package/dist/apis/notes.js +1 -1
- package/dist/apis/notification.cjs +6 -6
- package/dist/apis/notification.js +1 -1
- package/dist/apis/organization.cjs +6 -6
- package/dist/apis/organization.js +1 -1
- package/dist/apis/partner-directory.cjs +6 -6
- package/dist/apis/partner-directory.js +1 -1
- package/dist/apis/permissions.cjs +6 -6
- package/dist/apis/permissions.js +1 -1
- package/dist/apis/pricing-tier.cjs +6 -6
- package/dist/apis/pricing-tier.js +1 -1
- package/dist/apis/pricing.cjs +6 -6
- package/dist/apis/pricing.js +1 -1
- package/dist/apis/purpose.cjs +6 -6
- package/dist/apis/purpose.js +1 -1
- package/dist/apis/query.cjs +6 -6
- package/dist/apis/query.js +1 -1
- package/dist/apis/sandbox.cjs +6 -6
- package/dist/apis/sandbox.js +1 -1
- package/dist/apis/sharing.cjs +6 -6
- package/dist/apis/sharing.js +1 -1
- package/dist/apis/snapshot.cjs +6 -6
- package/dist/apis/snapshot.js +1 -1
- package/dist/apis/submission.cjs +6 -6
- package/dist/apis/submission.js +1 -1
- package/dist/apis/target.cjs +6 -6
- package/dist/apis/target.js +1 -1
- package/dist/apis/targeting.cjs +8 -8
- package/dist/apis/targeting.d.cts +2 -2
- package/dist/apis/targeting.d.ts +2 -2
- package/dist/apis/targeting.js +2 -2
- package/dist/apis/template-variables.cjs +6 -6
- package/dist/apis/template-variables.js +1 -1
- package/dist/apis/user.cjs +6 -6
- package/dist/apis/user.js +1 -1
- package/dist/apis/validation-rules.cjs +6 -6
- package/dist/apis/validation-rules.js +1 -1
- package/dist/apis/webhooks.cjs +6 -6
- package/dist/apis/webhooks.d.cts +2 -2
- package/dist/apis/webhooks.d.ts +2 -2
- package/dist/apis/webhooks.js +1 -1
- package/dist/apis/workflow-definition.cjs +6 -6
- package/dist/apis/workflow-definition.js +1 -1
- package/dist/apis/workflow.cjs +6 -6
- package/dist/apis/workflow.js +1 -1
- package/dist/chunk-2ESIGECW.js +14 -0
- package/dist/chunk-JM63KEFZ.cjs +14 -0
- package/dist/{chunk-CRUXTTHI.js → chunk-OJLX6U66.js} +5 -5
- package/dist/{chunk-GHPSNA2U.cjs → chunk-SNERI3PK.cjs} +5 -5
- package/dist/chunk-UH24GU2Z.js +14 -0
- package/dist/chunk-W3SPZ6V5.cjs +14 -0
- package/dist/index.cjs +12 -12
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -3
- package/dist/js-yaml-DLCVPJ7G.js +0 -0
- package/dist/message-663RPFCZ.js +7 -0
- package/dist/message-CEJ6VDZ6.cjs +7 -0
- package/dist/{message-runtime-XOQ5EJN6.js → message-runtime-5AUGENW3.js} +1 -1
- package/dist/{message-runtime-JSZCNCNU.cjs → message-runtime-5Z3POFZV.cjs} +2 -2
- package/dist/{message.d-B5UuSqgw.d.cts → message.d-VMmPsZVq.d.cts} +317 -4
- package/dist/{message.d-B5UuSqgw.d.ts → message.d-VMmPsZVq.d.ts} +317 -4
- package/dist/targeting-A2X6X7BF.js +7 -0
- package/dist/targeting-CSGKITGV.cjs +7 -0
- package/dist/{targeting-runtime-X3DQ527N.cjs → targeting-runtime-HWL6PLJF.cjs} +2 -2
- package/dist/{targeting-runtime-QI7322HB.js → targeting-runtime-L5RGDNSH.js} +1 -1
- package/dist/{targeting.d-Bq3onSes.d.cts → targeting.d-DaK3kwZg.d.cts} +286 -1
- package/dist/{targeting.d-Bq3onSes.d.ts → targeting.d-DaK3kwZg.d.ts} +286 -1
- package/dist/{webhooks-762WMLN2.cjs → webhooks-PNLMQFE2.cjs} +1 -1
- package/dist/{webhooks-5VDXUDDB.js → webhooks-QYVT2NUP.js} +1 -1
- package/dist/{webhooks.d-B6v_xmSD.d.ts → webhooks.d-DqOEzFsp.d.cts} +18 -14
- package/dist/{webhooks.d-B6v_xmSD.d.cts → webhooks.d-DqOEzFsp.d.ts} +18 -14
- package/docs/message.md +97 -9
- package/docs/targeting.md +192 -0
- package/docs/webhooks.md +10 -7
- package/package.json +11 -12
- package/definitions/focus-pocus-runtime.json +0 -1
- package/definitions/focus-pocus.json +0 -757
- package/dist/chunk-7ILTRJDQ.cjs +0 -14
- package/dist/chunk-DUHAG5CO.cjs +0 -14
- package/dist/chunk-FAZ63FEX.js +0 -14
- package/dist/chunk-H3NMCCSA.js +0 -14
- package/dist/message-6IFCB7GH.js +0 -7
- package/dist/message-7LNAFKKV.cjs +0 -7
- package/dist/targeting-4YMBBPDW.cjs +0 -7
- package/dist/targeting-VCENULF6.js +0 -7
|
@@ -65,6 +65,38 @@ declare namespace Components {
|
|
|
65
65
|
*
|
|
66
66
|
*/
|
|
67
67
|
Schemas.ClientError;
|
|
68
|
+
export interface DiscoverCampaignsResponse {
|
|
69
|
+
/**
|
|
70
|
+
* Number of matching NBAs.
|
|
71
|
+
*/
|
|
72
|
+
hits: number;
|
|
73
|
+
/**
|
|
74
|
+
* Matching NBAs, sorted by priority (desc); one entry per campaign.
|
|
75
|
+
*/
|
|
76
|
+
results: {
|
|
77
|
+
campaign_id: /**
|
|
78
|
+
* example:
|
|
79
|
+
* b8c01433-5556-4e2b-aad4-6f5348d1df84
|
|
80
|
+
*/
|
|
81
|
+
Schemas.BaseUUID /* uuid */;
|
|
82
|
+
nba: /**
|
|
83
|
+
* A Next Best Action configured on a campaign's Entity-UI channel.
|
|
84
|
+
* This is the canonical NBA contract shared by discovery (this API), authoring, and rendering.
|
|
85
|
+
* NBA content is single-language in v1; text fields may contain `{{placeholders}}` resolved at render time.
|
|
86
|
+
*
|
|
87
|
+
*/
|
|
88
|
+
Schemas.NextBestAction;
|
|
89
|
+
/**
|
|
90
|
+
* The recipient's current Entity-UI status for this campaign, present only
|
|
91
|
+
* when a recipient record already exists (i.e. the entity has previously seen
|
|
92
|
+
* or clicked this NBA). Absent when the entity has not yet interacted with it.
|
|
93
|
+
* Dismissed NBAs are filtered out server-side, so this is only ever `seen` or
|
|
94
|
+
* `clicked`. Lets the client skip a redundant `seen` call for NBAs already seen.
|
|
95
|
+
*
|
|
96
|
+
*/
|
|
97
|
+
status?: "seen" | "dismissed" | "clicked";
|
|
98
|
+
}[];
|
|
99
|
+
}
|
|
68
100
|
export interface GetTargetQueriesResponse {
|
|
69
101
|
/**
|
|
70
102
|
* List of target query results.
|
|
@@ -339,6 +371,24 @@ declare namespace Components {
|
|
|
339
371
|
[name: string]: any;
|
|
340
372
|
};
|
|
341
373
|
};
|
|
374
|
+
export interface DiscoverCampaignsParams {
|
|
375
|
+
entity_id: /**
|
|
376
|
+
* example:
|
|
377
|
+
* b8c01433-5556-4e2b-aad4-6f5348d1df84
|
|
378
|
+
*/
|
|
379
|
+
BaseUUID /* uuid */;
|
|
380
|
+
/**
|
|
381
|
+
* The schema slug of the entity (e.g. "contact" or "account").
|
|
382
|
+
*/
|
|
383
|
+
entity_schema: string;
|
|
384
|
+
}
|
|
385
|
+
/**
|
|
386
|
+
* Lifecycle status of a Next Best Action on the Entity-UI channel. Unlike the portal
|
|
387
|
+
* channel there is no `sent` state: an NBA recipient is born at `seen`, the moment the
|
|
388
|
+
* action is first rendered to an agent.
|
|
389
|
+
*
|
|
390
|
+
*/
|
|
391
|
+
export type EntityUiStatus = "seen" | "dismissed" | "clicked";
|
|
342
392
|
export interface ExecutionSummaryItem {
|
|
343
393
|
execution_id?: string;
|
|
344
394
|
execution_status?: string;
|
|
@@ -1415,6 +1465,71 @@ declare namespace Components {
|
|
|
1415
1465
|
BaseUUID /* uuid */?
|
|
1416
1466
|
];
|
|
1417
1467
|
}
|
|
1468
|
+
/**
|
|
1469
|
+
* A Next Best Action configured on a campaign's Entity-UI channel.
|
|
1470
|
+
* This is the canonical NBA contract shared by discovery (this API), authoring, and rendering.
|
|
1471
|
+
* NBA content is single-language in v1; text fields may contain `{{placeholders}}` resolved at render time.
|
|
1472
|
+
*
|
|
1473
|
+
*/
|
|
1474
|
+
export interface NextBestAction {
|
|
1475
|
+
/**
|
|
1476
|
+
* Light category label shown above the title. Free-form text.
|
|
1477
|
+
*/
|
|
1478
|
+
category?: string;
|
|
1479
|
+
/**
|
|
1480
|
+
* Curated icon for the NBA.
|
|
1481
|
+
*/
|
|
1482
|
+
icon?: {
|
|
1483
|
+
/**
|
|
1484
|
+
* Icon name from "@epilot360/icons".
|
|
1485
|
+
*/
|
|
1486
|
+
name: string;
|
|
1487
|
+
/**
|
|
1488
|
+
* Optional icon color.
|
|
1489
|
+
*/
|
|
1490
|
+
color?: string;
|
|
1491
|
+
};
|
|
1492
|
+
/**
|
|
1493
|
+
* Bold action title. Required. Supports `{{placeholders}}`.
|
|
1494
|
+
*/
|
|
1495
|
+
title: string;
|
|
1496
|
+
/**
|
|
1497
|
+
* Optional description. Supports `{{placeholders}}` (incl. relative dates).
|
|
1498
|
+
*/
|
|
1499
|
+
body?: string;
|
|
1500
|
+
/**
|
|
1501
|
+
* Display priority. NBAs are shown highest-priority first.
|
|
1502
|
+
*/
|
|
1503
|
+
priority?: "low" | "medium" | "high";
|
|
1504
|
+
/**
|
|
1505
|
+
* Whether the agent can dismiss the NBA.
|
|
1506
|
+
*/
|
|
1507
|
+
is_dismissable?: boolean;
|
|
1508
|
+
/**
|
|
1509
|
+
* The NBA's single call-to-action.
|
|
1510
|
+
*/
|
|
1511
|
+
cta: {
|
|
1512
|
+
type: "journey" | "workflow" | "url";
|
|
1513
|
+
/**
|
|
1514
|
+
* Journey id, workflow definition id, or URL, depending on `type`.
|
|
1515
|
+
*/
|
|
1516
|
+
target: string;
|
|
1517
|
+
/**
|
|
1518
|
+
* Optional CTA button label.
|
|
1519
|
+
*/
|
|
1520
|
+
label?: string;
|
|
1521
|
+
/**
|
|
1522
|
+
* Journey context parameters (journey CTA only). Maps the journey's declared
|
|
1523
|
+
* context parameters so the journey knows which entity it is about. Discovery
|
|
1524
|
+
* returns them verbatim; they are passed to the journey when it launches.
|
|
1525
|
+
*
|
|
1526
|
+
*/
|
|
1527
|
+
context_params?: {
|
|
1528
|
+
key: string;
|
|
1529
|
+
value: string;
|
|
1530
|
+
}[];
|
|
1531
|
+
};
|
|
1532
|
+
}
|
|
1418
1533
|
export interface PortalRecipientPayload {
|
|
1419
1534
|
portal_status: PortalStatus;
|
|
1420
1535
|
portal_state?: {
|
|
@@ -1437,8 +1552,32 @@ declare namespace Components {
|
|
|
1437
1552
|
portal_state?: {
|
|
1438
1553
|
[name: string]: any;
|
|
1439
1554
|
};
|
|
1555
|
+
entity_ui_status?: /**
|
|
1556
|
+
* Lifecycle status of a Next Best Action on the Entity-UI channel. Unlike the portal
|
|
1557
|
+
* channel there is no `sent` state: an NBA recipient is born at `seen`, the moment the
|
|
1558
|
+
* action is first rendered to an agent.
|
|
1559
|
+
*
|
|
1560
|
+
*/
|
|
1561
|
+
EntityUiStatus;
|
|
1562
|
+
entity_ui_status_updated_at?: string; // date-time
|
|
1563
|
+
resolution?: /**
|
|
1564
|
+
* Cross-channel resolution of a campaign for a recipient. Unlike the per-channel `*_status`
|
|
1565
|
+
* fields (where `dismissed` is channel-local), a resolution suppresses the campaign on EVERY
|
|
1566
|
+
* channel — the 360 Entity-UI card and the portal teaser alike. Server-managed and read-only:
|
|
1567
|
+
* never sent by a client. Absence means unresolved.
|
|
1568
|
+
*
|
|
1569
|
+
*/
|
|
1570
|
+
Resolution;
|
|
1440
1571
|
updated_at?: string; // date-time
|
|
1441
1572
|
}
|
|
1573
|
+
/**
|
|
1574
|
+
* Cross-channel resolution of a campaign for a recipient. Unlike the per-channel `*_status`
|
|
1575
|
+
* fields (where `dismissed` is channel-local), a resolution suppresses the campaign on EVERY
|
|
1576
|
+
* channel — the 360 Entity-UI card and the portal teaser alike. Server-managed and read-only:
|
|
1577
|
+
* never sent by a client. Absence means unresolved.
|
|
1578
|
+
*
|
|
1579
|
+
*/
|
|
1580
|
+
export type Resolution = "accepted";
|
|
1442
1581
|
export interface RetriggerAutomationsRequest {
|
|
1443
1582
|
/**
|
|
1444
1583
|
* List of recipient IDs to retrigger automations for
|
|
@@ -1669,6 +1808,21 @@ declare namespace Components {
|
|
|
1669
1808
|
*/
|
|
1670
1809
|
error?: string;
|
|
1671
1810
|
}
|
|
1811
|
+
export interface UpdateEntityUiStatusRequest {
|
|
1812
|
+
status: /**
|
|
1813
|
+
* Lifecycle status of a Next Best Action on the Entity-UI channel. Unlike the portal
|
|
1814
|
+
* channel there is no `sent` state: an NBA recipient is born at `seen`, the moment the
|
|
1815
|
+
* action is first rendered to an agent.
|
|
1816
|
+
*
|
|
1817
|
+
*/
|
|
1818
|
+
EntityUiStatus;
|
|
1819
|
+
/**
|
|
1820
|
+
* Schema slug of the recipient entity (e.g. "contact"). Required when recording the
|
|
1821
|
+
* first `seen`, which lazily creates the recipient record; ignored on later transitions.
|
|
1822
|
+
*
|
|
1823
|
+
*/
|
|
1824
|
+
entity_schema?: string;
|
|
1825
|
+
}
|
|
1672
1826
|
export interface UpdatePortalStatusRequest {
|
|
1673
1827
|
status: PortalStatus;
|
|
1674
1828
|
}
|
|
@@ -1718,6 +1872,14 @@ declare namespace Paths {
|
|
|
1718
1872
|
export type $500 = Components.Responses.ServerErrorResponse;
|
|
1719
1873
|
}
|
|
1720
1874
|
}
|
|
1875
|
+
namespace DiscoverCampaigns {
|
|
1876
|
+
export type RequestBody = Components.Schemas.DiscoverCampaignsParams;
|
|
1877
|
+
namespace Responses {
|
|
1878
|
+
export type $200 = Components.Responses.DiscoverCampaignsResponse;
|
|
1879
|
+
export type $400 = Components.Responses.ClientErrorResponse;
|
|
1880
|
+
export type $500 = Components.Responses.ServerErrorResponse;
|
|
1881
|
+
}
|
|
1882
|
+
}
|
|
1721
1883
|
namespace GetCampaignJobStatus {
|
|
1722
1884
|
namespace Parameters {
|
|
1723
1885
|
export type CampaignId = /**
|
|
@@ -1861,6 +2023,32 @@ declare namespace Paths {
|
|
|
1861
2023
|
export type $500 = Components.Responses.ServerErrorResponse;
|
|
1862
2024
|
}
|
|
1863
2025
|
}
|
|
2026
|
+
namespace UpdateRecipientEntityUiStatus {
|
|
2027
|
+
namespace Parameters {
|
|
2028
|
+
export type CampaignId = /**
|
|
2029
|
+
* example:
|
|
2030
|
+
* b8c01433-5556-4e2b-aad4-6f5348d1df84
|
|
2031
|
+
*/
|
|
2032
|
+
Components.Schemas.BaseUUID /* uuid */;
|
|
2033
|
+
export type RecipientId = /**
|
|
2034
|
+
* example:
|
|
2035
|
+
* b8c01433-5556-4e2b-aad4-6f5348d1df84
|
|
2036
|
+
*/
|
|
2037
|
+
Components.Schemas.BaseUUID /* uuid */;
|
|
2038
|
+
}
|
|
2039
|
+
export interface PathParameters {
|
|
2040
|
+
campaign_id: Parameters.CampaignId;
|
|
2041
|
+
recipient_id: Parameters.RecipientId;
|
|
2042
|
+
}
|
|
2043
|
+
export type RequestBody = Components.Schemas.UpdateEntityUiStatusRequest;
|
|
2044
|
+
namespace Responses {
|
|
2045
|
+
export type $200 = Components.Responses.RecipientResponse;
|
|
2046
|
+
export type $400 = Components.Responses.ClientErrorResponse;
|
|
2047
|
+
export type $404 = Components.Responses.ClientErrorResponse;
|
|
2048
|
+
export type $409 = Components.Responses.ClientErrorResponse;
|
|
2049
|
+
export type $500 = Components.Responses.ServerErrorResponse;
|
|
2050
|
+
}
|
|
2051
|
+
}
|
|
1864
2052
|
namespace UpdateRecipientPortalStatus {
|
|
1865
2053
|
namespace Parameters {
|
|
1866
2054
|
export type CampaignId = /**
|
|
@@ -1969,6 +2157,24 @@ interface OperationMethods {
|
|
|
1969
2157
|
data?: Paths.MatchCampaigns.RequestBody,
|
|
1970
2158
|
config?: AxiosRequestConfig
|
|
1971
2159
|
): OperationResponse<Paths.MatchCampaigns.Responses.$200>
|
|
2160
|
+
/**
|
|
2161
|
+
* discoverCampaigns - Discover Entity-UI Next Best Actions for an entity
|
|
2162
|
+
*
|
|
2163
|
+
* Given an entity, returns the Next Best Actions it should see on the Entity-UI channel.
|
|
2164
|
+
*
|
|
2165
|
+
* Enumerates the organization's **active** campaigns that carry a valid Entity-UI Next Best
|
|
2166
|
+
* Action, live-matches each against the entity using the existing match engine, and returns
|
|
2167
|
+
* the matching NBAs priority-sorted (one per campaign).
|
|
2168
|
+
*
|
|
2169
|
+
* This is a pure read: it writes nothing. An entity that matches no campaigns returns an
|
|
2170
|
+
* empty list, not an error.
|
|
2171
|
+
*
|
|
2172
|
+
*/
|
|
2173
|
+
'discoverCampaigns'(
|
|
2174
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
2175
|
+
data?: Paths.DiscoverCampaigns.RequestBody,
|
|
2176
|
+
config?: AxiosRequestConfig
|
|
2177
|
+
): OperationResponse<Paths.DiscoverCampaigns.Responses.$200>
|
|
1972
2178
|
/**
|
|
1973
2179
|
* matchTargets - Match targets
|
|
1974
2180
|
*
|
|
@@ -2029,6 +2235,32 @@ interface OperationMethods {
|
|
|
2029
2235
|
data?: Paths.UpdateRecipientPortalStatus.RequestBody,
|
|
2030
2236
|
config?: AxiosRequestConfig
|
|
2031
2237
|
): OperationResponse<Paths.UpdateRecipientPortalStatus.Responses.$200>
|
|
2238
|
+
/**
|
|
2239
|
+
* updateRecipientEntityUiStatus - Update Entity-UI (Next Best Action) status for a campaign recipient
|
|
2240
|
+
*
|
|
2241
|
+
* Records a Next Best Action interaction for a recipient on the Entity-UI channel.
|
|
2242
|
+
*
|
|
2243
|
+
* Unlike the portal channel, an NBA recipient is created lazily: the first `seen` creates
|
|
2244
|
+
* the recipient record (and requires `entity_schema`). `seen` is idempotent — re-viewing an
|
|
2245
|
+
* NBA that is already seen/clicked/dismissed is a no-op success and never regresses the status.
|
|
2246
|
+
*
|
|
2247
|
+
* Status transition rules:
|
|
2248
|
+
* - `seen`: lazily creates the recipient; a no-op success if a status already exists
|
|
2249
|
+
* - From `seen`: can change to `clicked` or `dismissed`
|
|
2250
|
+
* - From `clicked`: can change to `dismissed`
|
|
2251
|
+
* - From `dismissed`: cannot be changed (final state)
|
|
2252
|
+
*
|
|
2253
|
+
* `dismissed` and `clicked` require an existing recipient (404 otherwise, since an NBA is
|
|
2254
|
+
* born at `seen`) and reject invalid transitions (409).
|
|
2255
|
+
*
|
|
2256
|
+
* The entity_ui_status_updated_at timestamp is automatically set when the status changes.
|
|
2257
|
+
*
|
|
2258
|
+
*/
|
|
2259
|
+
'updateRecipientEntityUiStatus'(
|
|
2260
|
+
parameters?: Parameters<Paths.UpdateRecipientEntityUiStatus.PathParameters> | null,
|
|
2261
|
+
data?: Paths.UpdateRecipientEntityUiStatus.RequestBody,
|
|
2262
|
+
config?: AxiosRequestConfig
|
|
2263
|
+
): OperationResponse<Paths.UpdateRecipientEntityUiStatus.Responses.$200>
|
|
2032
2264
|
/**
|
|
2033
2265
|
* getRecipients - Get campaign recipients
|
|
2034
2266
|
*
|
|
@@ -2132,6 +2364,26 @@ interface PathsDictionary {
|
|
|
2132
2364
|
config?: AxiosRequestConfig
|
|
2133
2365
|
): OperationResponse<Paths.MatchCampaigns.Responses.$200>
|
|
2134
2366
|
}
|
|
2367
|
+
['/v1/campaign:discover']: {
|
|
2368
|
+
/**
|
|
2369
|
+
* discoverCampaigns - Discover Entity-UI Next Best Actions for an entity
|
|
2370
|
+
*
|
|
2371
|
+
* Given an entity, returns the Next Best Actions it should see on the Entity-UI channel.
|
|
2372
|
+
*
|
|
2373
|
+
* Enumerates the organization's **active** campaigns that carry a valid Entity-UI Next Best
|
|
2374
|
+
* Action, live-matches each against the entity using the existing match engine, and returns
|
|
2375
|
+
* the matching NBAs priority-sorted (one per campaign).
|
|
2376
|
+
*
|
|
2377
|
+
* This is a pure read: it writes nothing. An entity that matches no campaigns returns an
|
|
2378
|
+
* empty list, not an error.
|
|
2379
|
+
*
|
|
2380
|
+
*/
|
|
2381
|
+
'post'(
|
|
2382
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
2383
|
+
data?: Paths.DiscoverCampaigns.RequestBody,
|
|
2384
|
+
config?: AxiosRequestConfig
|
|
2385
|
+
): OperationResponse<Paths.DiscoverCampaigns.Responses.$200>
|
|
2386
|
+
}
|
|
2135
2387
|
['/v1/target:match']: {
|
|
2136
2388
|
/**
|
|
2137
2389
|
* matchTargets - Match targets
|
|
@@ -2202,6 +2454,34 @@ interface PathsDictionary {
|
|
|
2202
2454
|
config?: AxiosRequestConfig
|
|
2203
2455
|
): OperationResponse<Paths.UpdateRecipientPortalStatus.Responses.$200>
|
|
2204
2456
|
}
|
|
2457
|
+
['/v1/campaign/{campaign_id}/recipient/{recipient_id}/entity_ui:status']: {
|
|
2458
|
+
/**
|
|
2459
|
+
* updateRecipientEntityUiStatus - Update Entity-UI (Next Best Action) status for a campaign recipient
|
|
2460
|
+
*
|
|
2461
|
+
* Records a Next Best Action interaction for a recipient on the Entity-UI channel.
|
|
2462
|
+
*
|
|
2463
|
+
* Unlike the portal channel, an NBA recipient is created lazily: the first `seen` creates
|
|
2464
|
+
* the recipient record (and requires `entity_schema`). `seen` is idempotent — re-viewing an
|
|
2465
|
+
* NBA that is already seen/clicked/dismissed is a no-op success and never regresses the status.
|
|
2466
|
+
*
|
|
2467
|
+
* Status transition rules:
|
|
2468
|
+
* - `seen`: lazily creates the recipient; a no-op success if a status already exists
|
|
2469
|
+
* - From `seen`: can change to `clicked` or `dismissed`
|
|
2470
|
+
* - From `clicked`: can change to `dismissed`
|
|
2471
|
+
* - From `dismissed`: cannot be changed (final state)
|
|
2472
|
+
*
|
|
2473
|
+
* `dismissed` and `clicked` require an existing recipient (404 otherwise, since an NBA is
|
|
2474
|
+
* born at `seen`) and reject invalid transitions (409).
|
|
2475
|
+
*
|
|
2476
|
+
* The entity_ui_status_updated_at timestamp is automatically set when the status changes.
|
|
2477
|
+
*
|
|
2478
|
+
*/
|
|
2479
|
+
'patch'(
|
|
2480
|
+
parameters?: Parameters<Paths.UpdateRecipientEntityUiStatus.PathParameters> | null,
|
|
2481
|
+
data?: Paths.UpdateRecipientEntityUiStatus.RequestBody,
|
|
2482
|
+
config?: AxiosRequestConfig
|
|
2483
|
+
): OperationResponse<Paths.UpdateRecipientEntityUiStatus.Responses.$200>
|
|
2484
|
+
}
|
|
2205
2485
|
['/v1/campaign/{campaign_id}/recipients']: {
|
|
2206
2486
|
/**
|
|
2207
2487
|
* getRecipients - Get campaign recipients
|
|
@@ -2236,14 +2516,18 @@ type Campaign = Components.Schemas.Campaign;
|
|
|
2236
2516
|
type CampaignStatus = Components.Schemas.CampaignStatus;
|
|
2237
2517
|
type ClientError = Components.Schemas.ClientError;
|
|
2238
2518
|
type CreateRecipientPayload = Components.Schemas.CreateRecipientPayload;
|
|
2519
|
+
type DiscoverCampaignsParams = Components.Schemas.DiscoverCampaignsParams;
|
|
2520
|
+
type EntityUiStatus = Components.Schemas.EntityUiStatus;
|
|
2239
2521
|
type ExecutionSummaryItem = Components.Schemas.ExecutionSummaryItem;
|
|
2240
2522
|
type GetTargetQueriesParams = Components.Schemas.GetTargetQueriesParams;
|
|
2241
2523
|
type JobStatus = Components.Schemas.JobStatus;
|
|
2242
2524
|
type MatchCampaignParams = Components.Schemas.MatchCampaignParams;
|
|
2243
2525
|
type MatchTargetParams = Components.Schemas.MatchTargetParams;
|
|
2526
|
+
type NextBestAction = Components.Schemas.NextBestAction;
|
|
2244
2527
|
type PortalRecipientPayload = Components.Schemas.PortalRecipientPayload;
|
|
2245
2528
|
type PortalStatus = Components.Schemas.PortalStatus;
|
|
2246
2529
|
type Recipient = Components.Schemas.Recipient;
|
|
2530
|
+
type Resolution = Components.Schemas.Resolution;
|
|
2247
2531
|
type RetriggerAutomationsRequest = Components.Schemas.RetriggerAutomationsRequest;
|
|
2248
2532
|
type RetriggerAutomationsResult = Components.Schemas.RetriggerAutomationsResult;
|
|
2249
2533
|
type ServerError = Components.Schemas.ServerError;
|
|
@@ -2252,7 +2536,8 @@ type SetupTariffChangeCampaignRequest = Components.Schemas.SetupTariffChangeCamp
|
|
|
2252
2536
|
type SetupTariffChangeCampaignResponse = Components.Schemas.SetupTariffChangeCampaignResponse;
|
|
2253
2537
|
type Target = Components.Schemas.Target;
|
|
2254
2538
|
type TargetQueryResult = Components.Schemas.TargetQueryResult;
|
|
2539
|
+
type UpdateEntityUiStatusRequest = Components.Schemas.UpdateEntityUiStatusRequest;
|
|
2255
2540
|
type UpdatePortalStatusRequest = Components.Schemas.UpdatePortalStatusRequest;
|
|
2256
2541
|
type UpdateRecipientPayload = Components.Schemas.UpdateRecipientPayload;
|
|
2257
2542
|
|
|
2258
|
-
export { type AutomationRecipientPayload as A, type BaseEntityAcl as B, type Client as C, type
|
|
2543
|
+
export { type AutomationRecipientPayload as A, type BaseEntityAcl as B, type Client as C, type DiscoverCampaignsParams as D, type EntityUiStatus as E, type SetupTariffChangeCampaignResponse as F, type GetTargetQueriesParams as G, type TargetQueryResult as H, type UpdatePortalStatusRequest as I, type JobStatus as J, type UpdateRecipientPayload as K, type MatchCampaignParams as M, type NextBestAction as N, type OperationMethods as O, Paths as P, type Recipient as R, type ServerError as S, type Target as T, type UpdateEntityUiStatusRequest as U, Components as a, type PathsDictionary as b, type AutomationStatus as c, type BaseEntityOwner as d, type BaseError as e, type BaseNanoID as f, type BaseRecipientPayload as g, type BaseRelation as h, type BaseSystemFields as i, type BaseSystemFieldsRequired as j, type BaseSystemId as k, type BaseTags as l, type BaseUUID as m, type Campaign as n, type CampaignStatus as o, type ClientError as p, type CreateRecipientPayload as q, type ExecutionSummaryItem as r, type MatchTargetParams as s, type PortalRecipientPayload as t, type PortalStatus as u, type Resolution as v, type RetriggerAutomationsRequest as w, type RetriggerAutomationsResult as x, type SetupCampaignRequest as y, type SetupTariffChangeCampaignRequest as z };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-NJK5F5TF.cjs');
|
|
2
2
|
|
|
3
3
|
// src/docs/webhooks.json
|
|
4
|
-
var webhooks_default = '# Webhooks\n\n- **Base URL:** `https://webhooks.sls.epilot.io`\n- **Full API Docs:** [https://docs.epilot.io/api/webhooks](https://docs.epilot.io/api/webhooks)\n\n## Usage\n\n```ts\nimport { epilot } from \'@epilot/sdk\'\n\nepilot.authorize(() => \'<token>\')\nconst { data } = await epilot.webhooks.getPublicKey(...)\n```\n\n### Tree-shakeable import\n\n```ts\nimport { getClient, authorize } from \'@epilot/sdk/webhooks\'\n\nconst webhooksClient = getClient()\nauthorize(webhooksClient, () => \'<token>\')\nconst { data } = await webhooksClient.getPublicKey(...)\n```\n\n## Operations\n\n**webhooks**\n- [`getPublicKey`](#getpublickey)\n- [`getConfiguredEvents`](#getconfiguredevents)\n- [`getConfigs`](#getconfigs)\n- [`createConfig`](#createconfig)\n- [`getConfig`](#getconfig)\n- [`updateConfig`](#updateconfig)\n- [`deleteConfig`](#deleteconfig)\n- [`testOAuth`](#testoauth)\n- [`triggerWebhook`](#triggerwebhook)\n- [`batchReplayEvents`](#batchreplayevents)\n- [`getEventById`](#geteventbyid)\n- [`replayEvent`](#replayevent)\n- [`getWebhookExample`](#getwebhookexample)\n\n**Events**\n- [`getWebhookEventsV2`](#getwebhookeventsv2)\n\n**Schemas**\n- [`PublicKeyResponse`](#publickeyresponse)\n- [`SearchOptions`](#searchoptions)\n- [`EventListResponse`](#eventlistresponse)\n- [`HttpMethod`](#httpmethod)\n- [`AuthType`](#authtype)\n- [`Filter`](#filter)\n- [`WebhookCondition`](#webhookcondition)\n- [`WebhookConditionGroup`](#webhookconditiongroup)\n- [`Auth`](#auth)\n- [`BasicAuthConfig`](#basicauthconfig)\n- [`OAuthConfig`](#oauthconfig)\n- [`ApiKeyConfig`](#apikeyconfig)\n- [`WebhookConfig`](#webhookconfig)\n- [`EventConfigResp`](#eventconfigresp)\n- [`EventConfigEntry`](#eventconfigentry)\n- [`ErrorResp`](#errorresp)\n- [`TriggerWebhookResp`](#triggerwebhookresp)\n- [`PayloadConfiguration`](#payloadconfiguration)\n- [`CustomHeader`](#customheader)\n- [`CustomOAuthParameter`](#customoauthparameter)\n- [`Metadata`](#metadata)\n- [`ExecutionPayload`](#executionpayload)\n- [`WebhookEvent`](#webhookevent)\n- [`ExampleRequest`](#examplerequest)\n- [`ExampleResponse`](#exampleresponse)\n- [`TestOAuthResponse`](#testoauthresponse)\n- [`ReplayRequest`](#replayrequest)\n- [`BatchReplayRequest`](#batchreplayrequest)\n\n### `getPublicKey`\n\nReturns the platform-level Ed25519 public key used to verify\nasymmetric (v1a) webhook signatures. This endpoint is unauthenticated since the public key is not a secret, but the orgId parameter is requ\n\n`GET /v1/webhooks/.well-known/public-key`\n\n```ts\nconst { data } = await client.getPublicKey({\n orgId: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "public_key": "-----BEGIN PUBLIC KEY-----\\nMCowBQYDK2VwAyEA...\\n-----END PUBLIC KEY-----\\n",\n "algorithm": "ed25519",\n "issuer": "epilot"\n}\n```\n\n</details>\n\n---\n\n### `getConfiguredEvents`\n\nRetrieve events that can trigger webhooks\n\n`GET /v1/webhooks/configured-events`\n\n```ts\nconst { data } = await client.getConfiguredEvents()\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n[\n {\n "eventName": "customer_request_created",\n "eventLabel": "Customer Request Created"\n }\n]\n```\n\n</details>\n\n---\n\n### `getConfigs`\n\nSearch Webhook Client Configs\n\n`GET /v1/webhooks/configs`\n\n```ts\nconst { data } = await client.getConfigs({\n eventName: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n[\n {\n "eventName": "CustomerRequest_Created",\n "url": "https://my-partner-service.api.com",\n "httpMethod": "POST",\n "enabled": true,\n "auth": {\n "authType": "BASIC",\n "basicAuthConfig": {\n "username": "secretUsername",\n "password": "secret7825@!"\n }\n },\n "filter": {\n "keyToFilter": "customer_request.productId",\n "supportedValues": ["2324245", "5253642"]\n }\n }\n]\n```\n\n</details>\n\n---\n\n### `createConfig`\n\nCreate Webhook Client Config\n\n`POST /v1/webhooks/configs`\n\n```ts\nconst { data } = await client.createConfig(\n null,\n {\n eventName: \'CustomerRequest_Created\',\n url: \'https://my-partner-service.api.com\',\n httpMethod: \'POST\',\n enabled: true,\n auth: {\n authType: \'BASIC\',\n basicAuthConfig: {\n username: \'secretUsername\',\n password: \'secret7825@!\'\n }\n },\n filter: {\n keyToFilter: \'customer_request.productId\',\n supportedValues: [\'2324245\', \'5253642\']\n }\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "eventName": "CustomerRequest_Created",\n "url": "https://my-partner-service.api.com",\n "httpMethod": "POST",\n "enabled": true,\n "auth": {\n "authType": "BASIC",\n "basicAuthConfig": {\n "username": "secretUsername",\n "password": "secret7825@!"\n }\n },\n "filter": {\n "keyToFilter": "customer_request.productId",\n "supportedValues": ["2324245", "5253642"]\n }\n}\n```\n\n</details>\n\n---\n\n### `getConfig`\n\nGet webhook config by id\n\n`GET /v1/webhooks/configs/{configId}`\n\n```ts\nconst { data } = await client.getConfig({\n configId: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "eventName": "CustomerRequest_Created",\n "url": "https://my-partner-service.api.com",\n "httpMethod": "POST",\n "enabled": true,\n "auth": {\n "authType": "BASIC",\n "basicAuthConfig": {\n "username": "secretUsername",\n "password": "secret7825@!"\n }\n },\n "filter": {\n "keyToFilter": "customer_request.productId",\n "supportedValues": ["2324245", "5253642"]\n }\n}\n```\n\n</details>\n\n---\n\n### `updateConfig`\n\nUpdate Webhook Client Config\n\n`PUT /v1/webhooks/configs/{configId}`\n\n```ts\nconst { data } = await client.updateConfig(\n {\n configId: \'example\',\n },\n {\n eventName: \'CustomerRequest_Created\',\n url: \'https://my-partner-service.api.com\',\n httpMethod: \'POST\',\n enabled: true,\n auth: {\n authType: \'BASIC\',\n basicAuthConfig: {\n username: \'secretUsername\',\n password: \'secret7825@!\'\n }\n },\n filter: {\n keyToFilter: \'customer_request.productId\',\n supportedValues: [\'2324245\', \'5253642\']\n }\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "eventName": "CustomerRequest_Created",\n "url": "https://my-partner-service.api.com",\n "httpMethod": "POST",\n "enabled": true,\n "auth": {\n "authType": "BASIC",\n "basicAuthConfig": {\n "username": "secretUsername",\n "password": "secret7825@!"\n }\n },\n "filter": {\n "keyToFilter": "customer_request.productId",\n "supportedValues": ["2324245", "5253642"]\n }\n}\n```\n\n</details>\n\n---\n\n### `deleteConfig`\n\nDelete Webhook Client Config\n\n`DELETE /v1/webhooks/configs/{configId}`\n\n```ts\nconst { data } = await client.deleteConfig({\n configId: \'example\',\n})\n```\n\n---\n\n### `testOAuth`\n\nTest OAuth connection\n\n`POST /v1/webhooks/configs/{configId}/test-oauth`\n\n```ts\nconst { data } = await client.testOAuth({\n configId: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "success": true,\n "expires_in": 3600,\n "token_type": "Bearer",\n "message": "OAuth token exchange successful"\n}\n```\n\n</details>\n\n---\n\n### `triggerWebhook`\n\ntriggers a webhook event either async or sync\n\n`POST /v1/webhooks/configs/{configId}/trigger`\n\n```ts\nconst { data } = await client.triggerWebhook(\n {\n sync: true,\n configId: \'example\',\n },\n {\n metadata: {\n action: \'Manual triggered by user with id 123456\',\n origin: \'string\',\n creation_timestamp: \'string\',\n webhook_id: \'string\',\n webhook_name: \'string\',\n automation_name: \'string\',\n organization_id: \'string\',\n user_id: \'string\',\n correlation_id: \'string\',\n execution_id: \'string\',\n action_id: \'string\'\n }\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "status_code": "string",\n "message": "string",\n "body": {},\n "code": "string",\n "status": "succeeded",\n "start_date": "string",\n "end_date": "string",\n "event_id": "string"\n}\n```\n\n</details>\n\n---\n\n### `batchReplayEvents`\n\nReplay a batch of webhook events\n\n`POST /v1/webhooks/configs/{configId}/events/replay-batch`\n\n```ts\nconst { data } = await client.batchReplayEvents(\n {\n configId: \'example\',\n },\n {\n eventIds: [\'2f1b7cf8-ff55-4359-966f-e56f39a52c94\', \'48c984bf-466b-470b-b743-d07cea168243\'],\n reapply_transform: false\n },\n)\n```\n\n---\n\n### `getEventById`\n\nGet a webhook event by its id\n\n`GET /v1/webhooks/configs/{configId}/events/{eventId}`\n\n```ts\nconst { data } = await client.getEventById({\n configId: \'example\',\n eventId: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "event_id": "string",\n "org_id": "string",\n "webhook_config_id": "string",\n "url": "string",\n "created_at": "2021-04-27T12:01:13.000Z",\n "event_name": "string",\n "http_response": {\n "status_code": 0,\n "message": "string",\n "body": {},\n "code": "string"\n },\n "metadata": {\n "action": "Manual triggered by user with id 123456",\n "origin": "string",\n "creation_timestamp": "string",\n "webhook_id": "string",\n "webhook_name": "string",\n "automation_name": "string",\n "organization_id": "string",\n "user_id": "string",\n "correlation_id": "string",\n "execution_id": "string",\n "action_id": "string"\n },\n "status": "succeeded",\n "http_method": "GET",\n "payload": "string",\n "original_payload": "string",\n "retry_attempt": 0,\n "can_reapply_transform": true,\n "can_reapply_transform_reason": "available"\n}\n```\n\n</details>\n\n---\n\n### `replayEvent`\n\nReplay a webhook event\n\n`POST /v1/webhooks/configs/{configId}/events/{eventId}/replay`\n\n```ts\nconst { data } = await client.replayEvent(\n {\n configId: \'example\',\n eventId: \'example\',\n },\n {\n reapply_transform: false\n },\n)\n```\n\n---\n\n### `getWebhookExample`\n\nGenerate an example payload for a webhook configuration based on trigger type\n\n`POST /v1/webhooks/configs/{configId}/example`\n\n```ts\nconst { data } = await client.getWebhookExample(\n {\n configId: \'example\',\n },\n {\n automation_id: \'automation_123\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "metadata": {\n "action": "Manual triggered by user with id 123456",\n "origin": "string",\n "creation_timestamp": "string",\n "webhook_id": "string",\n "webhook_name": "string",\n "automation_name": "string",\n "organization_id": "string",\n "user_id": "string",\n "correlation_id": "string",\n "execution_id": "string",\n "action_id": "string"\n },\n "entity": {},\n "relations": [\n {}\n ]\n}\n```\n\n</details>\n\n---\n\n### `getWebhookEventsV2`\n\nList webhook events and filter them by status, timestamp, etc.\n\n`POST /v2/webhooks/configs/{configId}/events`\n\n```ts\nconst { data } = await client.getWebhookEventsV2(\n {\n configId: \'example\',\n },\n {\n limit: 25,\n cursor: {\n created_at: \'2025-10-31T12:34:56Z\',\n event_id: \'evt_1234567890abcdef\'\n },\n timestamp: {\n from: \'2025-10-01T00:00:00Z\',\n to: \'2025-10-31T23:59:59Z\'\n },\n event_id: \'evt_1234567890abcdef\',\n status: \'succeeded\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "data": [\n {\n "event_id": "string",\n "org_id": "string",\n "webhook_config_id": "string",\n "url": "string",\n "created_at": "2021-04-27T12:01:13.000Z",\n "event_name": "string",\n "http_response": {\n "status_code": 0,\n "message": "string",\n "body": {},\n "code": "string"\n },\n "metadata": {\n "action": "Manual triggered by user with id 123456",\n "origin": "string",\n "creation_timestamp": "string",\n "webhook_id": "string",\n "webhook_name": "string",\n "automation_name": "string",\n "organization_id": "string",\n "user_id": "string",\n "correlation_id": "string",\n "execution_id": "string",\n "action_id": "string"\n },\n "status": "succeeded",\n "http_method": "GET",\n "payload": "string",\n "original_payload": "string",\n "retry_attempt": 0,\n "can_reapply_transform": true,\n "can_reapply_transform_reason": "available"\n }\n ],\n "next_cursor": {\n "created_at": "2025-10-31T12:34:56Z",\n "event_id": "evt_1234567890abcdef"\n },\n "has_more": true\n}\n```\n\n</details>\n\n---\n\n## Schemas\n\n### `PublicKeyResponse`\n\n```ts\ntype PublicKeyResponse = {\n public_key: string\n algorithm: string\n issuer?: string\n}\n```\n\n### `SearchOptions`\n\n```ts\ntype SearchOptions = {\n limit?: number\n cursor?: {\n created_at?: string // date-time\n event_id?: string\n }\n timestamp?: {\n from?: string // date-time\n to?: string // date-time\n }\n event_id?: string\n status?: "succeeded" | "failed" | "skipped"\n}\n```\n\n### `EventListResponse`\n\n```ts\ntype EventListResponse = {\n data?: Array<{\n event_id: string\n org_id: string\n webhook_config_id: string\n url?: string\n created_at?: string\n event_name?: string\n http_response?: {\n status_code?: { ... }\n message?: { ... }\n body?: { ... }\n code?: { ... }\n }\n metadata?: {\n action?: { ... }\n origin?: { ... }\n creation_timestamp?: { ... }\n webhook_id?: { ... }\n webhook_name?: { ... }\n automation_name?: { ... }\n organization_id: { ... }\n user_id?: { ... }\n correlation_id?: { ... }\n execution_id?: { ... }\n action_id?: { ... }\n }\n status?: "succeeded" | "failed" | "in_progress" | "skipped"\n http_method?: "GET" | "POST" | "PUT"\n payload?: string\n original_payload?: string\n retry_attempt?: number\n can_reapply_transform?: boolean\n can_reapply_transform_reason?: "available" | "no_transform_configured" | "no_original_source"\n }>\n next_cursor?: {\n created_at?: string // date-time\n event_id?: string\n }\n has_more?: boolean\n}\n```\n\n### `HttpMethod`\n\n```ts\ntype HttpMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS" | "HEAD"\n```\n\n### `AuthType`\n\n```ts\ntype AuthType = "BASIC" | "OAUTH_CLIENT_CREDENTIALS" | "API_KEY" | "NONE"\n```\n\n### `Filter`\n\n```ts\ntype Filter = {\n keyToFilter: string\n supportedValues: string[]\n}\n```\n\n### `WebhookCondition`\n\nA condition that must be met for the webhook to fire.\n\n```ts\ntype WebhookCondition = {\n field: string\n operation: "equals" | "not_equals" | "any_of" | "none_of" | "contains" | "not_contains" | "starts_with" | "ends_with" | "greater_than" | "less_than" | "greater_than_or_equals" | "less_than_or_equals" | "is_empty" | "is_not_empty" | "length_equals" | "length_not_equals" | "length_greater_than" | "length_less_than" | "length_greater_than_or_equals" | "length_less_than_or_equals"\n values?: string[]\n field_type?: "string" | "number" | "boolean" | "date" | "datetime"\n is_array_field?: boolean\n repeatable_item_op?: boolean\n}\n```\n\n### `WebhookConditionGroup`\n\nA group of conditions with a logical operator. Multiple conditions are AND-ed by default.\n\n```ts\ntype WebhookConditionGroup = {\n conditions?: Array<{\n field: string\n operation: "equals" | "not_equals" | "any_of" | "none_of" | "contains" | "not_contains" | "starts_with" | "ends_with" | "greater_than" | "less_than" | "greater_than_or_equals" | "less_than_or_equals" | "is_empty" | "is_not_empty" | "length_equals" | "length_not_equals" | "length_greater_than" | "length_less_than" | "length_greater_than_or_equals" | "length_less_than_or_equals"\n values?: string[]\n field_type?: "string" | "number" | "boolean" | "date" | "datetime"\n is_array_field?: boolean\n repeatable_item_op?: boolean\n }>\n logical_operator?: "AND" | "OR"\n}\n```\n\n### `Auth`\n\n```ts\ntype Auth = {\n authType: "BASIC" | "OAUTH_CLIENT_CREDENTIALS" | "API_KEY" | "NONE"\n basicAuthConfig?: {\n username: string\n password?: string\n passwordIsEnvVar?: boolean\n }\n oauthConfig?: {\n clientId: string\n clientSecret?: string\n clientSecretIsEnvVar?: boolean\n endpoint: string\n httpMethod: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS" | "HEAD"\n customParameterList?: Array<{\n type: { ... }\n key: { ... }\n value: { ... }\n }>\n }\n apiKeyConfig?: {\n keyName: string\n keyValue?: string\n keyValueIsEnvVar?: boolean\n }\n}\n```\n\n### `BasicAuthConfig`\n\nTo be sent only if authType is BASIC\n\n```ts\ntype BasicAuthConfig = {\n username: string\n password?: string\n passwordIsEnvVar?: boolean\n}\n```\n\n### `OAuthConfig`\n\nTo be sent only if authType is OAUTH_CLIENT_CREDENTIALS\n\n```ts\ntype OAuthConfig = {\n clientId: string\n clientSecret?: string\n clientSecretIsEnvVar?: boolean\n endpoint: string\n httpMethod: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS" | "HEAD"\n customParameterList?: Array<{\n type: "body" | "query" | "header"\n key: string\n value: string\n }>\n}\n```\n\n### `ApiKeyConfig`\n\nTo be sent only if authType is API_KEY\n\n```ts\ntype ApiKeyConfig = {\n keyName: string\n keyValue?: string\n keyValueIsEnvVar?: boolean\n}\n```\n\n### `WebhookConfig`\n\n```ts\ntype WebhookConfig = {\n id?: string\n name: string\n eventName: string\n eventVersion?: string\n url?: string\n creationTime?: string\n updatedTime?: string\n httpMethod?: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS" | "HEAD"\n enabled?: boolean\n auth?: {\n authType: "BASIC" | "OAUTH_CLIENT_CREDENTIALS" | "API_KEY" | "NONE"\n basicAuthConfig?: {\n username: { ... }\n password?: { ... }\n passwordIsEnvVar?: { ... }\n }\n oauthConfig?: {\n clientId: { ... }\n clientSecret?: { ... }\n clientSecretIsEnvVar?: { ... }\n endpoint: { ... }\n httpMethod: { ... }\n customParameterList?: { ... }\n }\n apiKeyConfig?: {\n keyName: { ... }\n keyValue?: { ... }\n keyValueIsEnvVar?: { ... }\n }\n }\n filter?: {\n keyToFilter: string\n supportedValues: string[]\n }\n payloadConfiguration?: {\n hydrate_entity?: boolean\n include_relations?: boolean\n include_activity?: boolean\n include_changed_attributes?: boolean\n apply_changesets?: boolean\n custom_headers?: Record<string, string>\n }\n enableStaticIP?: boolean\n protected?: boolean\n secureProxy?: {\n integration_id: string // uuid\n use_case_slug: string\n }\n status?: "active" | "inactive" | "incomplete"\n jsonataExpression?: string\n deliveryMode?: "json_base64" | "binary_multipart"\n multipartConfig?: {\n fileFieldName?: string\n fileFieldStrategy?: "single" | "multi"\n fileSource?: string\n extraFields?: Record<string, string>\n }\n retryPolicy?: {\n enabled: boolean\n maxAttempts?: number\n }\n filterConditions?: {\n conditions?: Array<{\n field: { ... }\n operation: { ... }\n values?: { ... }\n field_type?: { ... }\n is_array_field?: { ... }\n repeatable_item_op?: { ... }\n }>\n logical_operator?: "AND" | "OR"\n }\n _manifest?: string // uuid[]\n signingSecret?: string\n}\n```\n\n### `EventConfigResp`\n\n```ts\ntype EventConfigResp = Array<{\n eventName?: string\n eventLabel?: string\n}>\n```\n\n### `EventConfigEntry`\n\n```ts\ntype EventConfigEntry = {\n eventName?: string\n eventLabel?: string\n}\n```\n\n### `ErrorResp`\n\n```ts\ntype ErrorResp = {\n message?: string\n}\n```\n\n### `TriggerWebhookResp`\n\n```ts\ntype TriggerWebhookResp = {\n status_code?: string\n message?: string\n body?: object\n code?: string\n status?: "succeeded" | "failed"\n start_date?: string\n end_date?: string\n event_id: string\n}\n```\n\n### `PayloadConfiguration`\n\nConfiguration for the webhook payload\n\n```ts\ntype PayloadConfiguration = {\n hydrate_entity?: boolean\n include_relations?: boolean\n include_activity?: boolean\n include_changed_attributes?: boolean\n apply_changesets?: boolean\n custom_headers?: Record<string, string>\n}\n```\n\n### `CustomHeader`\n\nObject representing custom headers as key-value pairs.\n\n```ts\ntype CustomHeader = Record<string, string>\n```\n\n### `CustomOAuthParameter`\n\nCustom key/value pair of either type body, query or header\n\n```ts\ntype CustomOAuthParameter = {\n type: "body" | "query" | "header"\n key: string\n value: string\n}\n```\n\n### `Metadata`\n\nContains the metadata about the configured event\n\n```ts\ntype Metadata = {\n action?: string\n origin?: string\n creation_timestamp?: string\n webhook_id?: string\n webhook_name?: string\n automation_name?: string\n organization_id: string\n user_id?: string\n correlation_id?: string\n execution_id?: string\n action_id?: string\n}\n```\n\n### `ExecutionPayload`\n\nPayload for triggering a webhook\n\n```ts\ntype ExecutionPayload = {\n metadata: {\n action?: string\n origin?: string\n creation_timestamp?: string\n webhook_id?: string\n webhook_name?: string\n automation_name?: string\n organization_id: string\n user_id?: string\n correlation_id?: string\n execution_id?: string\n action_id?: string\n }\n}\n```\n\n### `WebhookEvent`\n\n```ts\ntype WebhookEvent = {\n event_id: string\n org_id: string\n webhook_config_id: string\n url?: string\n created_at?: string\n event_name?: string\n http_response?: {\n status_code?: number\n message?: string\n body?: object\n code?: string\n }\n metadata?: {\n action?: string\n origin?: string\n creation_timestamp?: string\n webhook_id?: string\n webhook_name?: string\n automation_name?: string\n organization_id: string\n user_id?: string\n correlation_id?: string\n execution_id?: string\n action_id?: string\n }\n status?: "succeeded" | "failed" | "in_progress" | "skipped"\n http_method?: "GET" | "POST" | "PUT"\n payload?: string\n original_payload?: string\n retry_attempt?: number\n can_reapply_transform?: boolean\n can_reapply_transform_reason?: "available" | "no_transform_configured" | "no_original_source"\n}\n```\n\n### `ExampleRequest`\n\n```ts\ntype ExampleRequest = {\n automation_id?: string\n}\n```\n\n### `ExampleResponse`\n\n```ts\ntype ExampleResponse = {\n metadata?: {\n action?: string\n origin?: string\n creation_timestamp?: string\n webhook_id?: string\n webhook_name?: string\n automation_name?: string\n organization_id: string\n user_id?: string\n correlation_id?: string\n execution_id?: string\n action_id?: string\n }\n entity?: Record<string, unknown>\n relations?: Record<string, unknown>[]\n}\n```\n\n### `TestOAuthResponse`\n\n```ts\ntype TestOAuthResponse = {\n success: boolean\n expires_in?: number\n token_type?: string\n message: string\n}\n```\n\n### `ReplayRequest`\n\n```ts\ntype ReplayRequest = {\n reapply_transform?: boolean\n}\n```\n\n### `BatchReplayRequest`\n\n```ts\ntype BatchReplayRequest = {\n eventIds: string[]\n reapply_transform?: boolean\n}\n```\n';
|
|
4
|
+
var webhooks_default = '# Webhooks\n\n- **Base URL:** `https://webhooks.sls.epilot.io`\n- **Full API Docs:** [https://docs.epilot.io/api/webhooks](https://docs.epilot.io/api/webhooks)\n\n## Usage\n\n```ts\nimport { epilot } from \'@epilot/sdk\'\n\nepilot.authorize(() => \'<token>\')\nconst { data } = await epilot.webhooks.getPublicKey(...)\n```\n\n### Tree-shakeable import\n\n```ts\nimport { getClient, authorize } from \'@epilot/sdk/webhooks\'\n\nconst webhooksClient = getClient()\nauthorize(webhooksClient, () => \'<token>\')\nconst { data } = await webhooksClient.getPublicKey(...)\n```\n\n## Operations\n\n**webhooks**\n- [`getPublicKey`](#getpublickey)\n- [`getConfiguredEvents`](#getconfiguredevents)\n- [`getConfigs`](#getconfigs)\n- [`createConfig`](#createconfig)\n- [`getConfig`](#getconfig)\n- [`updateConfig`](#updateconfig)\n- [`deleteConfig`](#deleteconfig)\n- [`testOAuth`](#testoauth)\n- [`triggerWebhook`](#triggerwebhook)\n- [`batchReplayEvents`](#batchreplayevents)\n- [`getEventById`](#geteventbyid)\n- [`replayEvent`](#replayevent)\n- [`getWebhookExample`](#getwebhookexample)\n\n**Events**\n- [`getWebhookEventsV2`](#getwebhookeventsv2)\n\n**Schemas**\n- [`PublicKeyResponse`](#publickeyresponse)\n- [`SearchOptions`](#searchoptions)\n- [`EventListResponse`](#eventlistresponse)\n- [`HttpMethod`](#httpmethod)\n- [`AuthType`](#authtype)\n- [`Filter`](#filter)\n- [`WebhookCondition`](#webhookcondition)\n- [`WebhookConditionGroup`](#webhookconditiongroup)\n- [`Auth`](#auth)\n- [`BasicAuthConfig`](#basicauthconfig)\n- [`OAuthConfig`](#oauthconfig)\n- [`ApiKeyConfig`](#apikeyconfig)\n- [`WebhookConfig`](#webhookconfig)\n- [`EventConfigResp`](#eventconfigresp)\n- [`EventConfigEntry`](#eventconfigentry)\n- [`ErrorResp`](#errorresp)\n- [`TriggerWebhookResp`](#triggerwebhookresp)\n- [`PayloadConfiguration`](#payloadconfiguration)\n- [`CustomHeader`](#customheader)\n- [`CustomOAuthParameter`](#customoauthparameter)\n- [`Metadata`](#metadata)\n- [`ExecutionPayload`](#executionpayload)\n- [`WebhookEvent`](#webhookevent)\n- [`ExampleRequest`](#examplerequest)\n- [`ExampleResponse`](#exampleresponse)\n- [`TestOAuthResponse`](#testoauthresponse)\n- [`ReplayRequest`](#replayrequest)\n- [`BatchReplayRequest`](#batchreplayrequest)\n\n### `getPublicKey`\n\nReturns the platform-level Ed25519 public key used to verify\nasymmetric (v1a) webhook signatures. This endpoint is unauthenticated since the public key is not a secret, but the orgId parameter is requ\n\n`GET /v1/webhooks/.well-known/public-key`\n\n```ts\nconst { data } = await client.getPublicKey({\n orgId: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "public_key": "-----BEGIN PUBLIC KEY-----\\nMCowBQYDK2VwAyEA...\\n-----END PUBLIC KEY-----\\n",\n "algorithm": "ed25519",\n "issuer": "epilot"\n}\n```\n\n</details>\n\n---\n\n### `getConfiguredEvents`\n\nRetrieve events that can trigger webhooks\n\n`GET /v1/webhooks/configured-events`\n\n```ts\nconst { data } = await client.getConfiguredEvents()\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n[\n {\n "eventName": "customer_request_created",\n "eventLabel": "Customer Request Created"\n }\n]\n```\n\n</details>\n\n---\n\n### `getConfigs`\n\nSearch Webhook Client Configs\n\n`GET /v1/webhooks/configs`\n\n```ts\nconst { data } = await client.getConfigs({\n eventName: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n[\n {\n "eventName": "CustomerRequest_Created",\n "url": "https://my-partner-service.api.com",\n "httpMethod": "POST",\n "enabled": true,\n "auth": {\n "authType": "BASIC",\n "basicAuthConfig": {\n "username": "secretUsername",\n "password": "secret7825@!"\n }\n },\n "filter": {\n "keyToFilter": "customer_request.productId",\n "supportedValues": ["2324245", "5253642"]\n }\n }\n]\n```\n\n</details>\n\n---\n\n### `createConfig`\n\nCreate Webhook Client Config\n\n`POST /v1/webhooks/configs`\n\n```ts\nconst { data } = await client.createConfig(\n null,\n {\n eventName: \'CustomerRequest_Created\',\n url: \'https://my-partner-service.api.com\',\n httpMethod: \'POST\',\n enabled: true,\n auth: {\n authType: \'BASIC\',\n basicAuthConfig: {\n username: \'secretUsername\',\n password: \'secret7825@!\'\n }\n },\n filter: {\n keyToFilter: \'customer_request.productId\',\n supportedValues: [\'2324245\', \'5253642\']\n }\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "eventName": "CustomerRequest_Created",\n "url": "https://my-partner-service.api.com",\n "httpMethod": "POST",\n "enabled": true,\n "auth": {\n "authType": "BASIC",\n "basicAuthConfig": {\n "username": "secretUsername",\n "password": "secret7825@!"\n }\n },\n "filter": {\n "keyToFilter": "customer_request.productId",\n "supportedValues": ["2324245", "5253642"]\n }\n}\n```\n\n</details>\n\n---\n\n### `getConfig`\n\nGet webhook config by id\n\n`GET /v1/webhooks/configs/{configId}`\n\n```ts\nconst { data } = await client.getConfig({\n configId: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "eventName": "CustomerRequest_Created",\n "url": "https://my-partner-service.api.com",\n "httpMethod": "POST",\n "enabled": true,\n "auth": {\n "authType": "BASIC",\n "basicAuthConfig": {\n "username": "secretUsername",\n "password": "secret7825@!"\n }\n },\n "filter": {\n "keyToFilter": "customer_request.productId",\n "supportedValues": ["2324245", "5253642"]\n }\n}\n```\n\n</details>\n\n---\n\n### `updateConfig`\n\nUpdate Webhook Client Config\n\n`PUT /v1/webhooks/configs/{configId}`\n\n```ts\nconst { data } = await client.updateConfig(\n {\n configId: \'example\',\n },\n {\n eventName: \'CustomerRequest_Created\',\n url: \'https://my-partner-service.api.com\',\n httpMethod: \'POST\',\n enabled: true,\n auth: {\n authType: \'BASIC\',\n basicAuthConfig: {\n username: \'secretUsername\',\n password: \'secret7825@!\'\n }\n },\n filter: {\n keyToFilter: \'customer_request.productId\',\n supportedValues: [\'2324245\', \'5253642\']\n }\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "eventName": "CustomerRequest_Created",\n "url": "https://my-partner-service.api.com",\n "httpMethod": "POST",\n "enabled": true,\n "auth": {\n "authType": "BASIC",\n "basicAuthConfig": {\n "username": "secretUsername",\n "password": "secret7825@!"\n }\n },\n "filter": {\n "keyToFilter": "customer_request.productId",\n "supportedValues": ["2324245", "5253642"]\n }\n}\n```\n\n</details>\n\n---\n\n### `deleteConfig`\n\nDelete Webhook Client Config\n\n`DELETE /v1/webhooks/configs/{configId}`\n\n```ts\nconst { data } = await client.deleteConfig({\n configId: \'example\',\n})\n```\n\n---\n\n### `testOAuth`\n\nTest OAuth connection\n\n`POST /v1/webhooks/configs/{configId}/test-oauth`\n\n```ts\nconst { data } = await client.testOAuth({\n configId: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "success": true,\n "expires_in": 3600,\n "token_type": "Bearer",\n "message": "OAuth token exchange successful"\n}\n```\n\n</details>\n\n---\n\n### `triggerWebhook`\n\ntriggers a webhook event either async or sync\n\n`POST /v1/webhooks/configs/{configId}/trigger`\n\n```ts\nconst { data } = await client.triggerWebhook(\n {\n sync: true,\n configId: \'example\',\n },\n {\n metadata: {\n action: \'Manual triggered by user with id 123456\',\n origin: \'string\',\n creation_timestamp: \'string\',\n webhook_id: \'string\',\n webhook_name: \'string\',\n automation_name: \'string\',\n organization_id: \'string\',\n user_id: \'string\',\n correlation_id: \'string\',\n execution_id: \'string\',\n action_id: \'string\'\n }\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "status_code": "string",\n "message": "string",\n "body": {},\n "code": "string",\n "status": "succeeded",\n "start_date": "string",\n "end_date": "string",\n "event_id": "string"\n}\n```\n\n</details>\n\n---\n\n### `batchReplayEvents`\n\nReplay a batch of webhook events\n\n`POST /v1/webhooks/configs/{configId}/events/replay-batch`\n\n```ts\nconst { data } = await client.batchReplayEvents(\n {\n configId: \'example\',\n },\n {\n eventIds: [\'2f1b7cf8-ff55-4359-966f-e56f39a52c94\', \'48c984bf-466b-470b-b743-d07cea168243\'],\n reapply_transform: false\n },\n)\n```\n\n---\n\n### `getEventById`\n\nGet a webhook event by its id\n\n`GET /v1/webhooks/configs/{configId}/events/{eventId}`\n\n```ts\nconst { data } = await client.getEventById({\n configId: \'example\',\n eventId: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "event_id": "string",\n "org_id": "string",\n "webhook_config_id": "string",\n "url": "string",\n "created_at": "2021-04-27T12:01:13.000Z",\n "event_name": "string",\n "http_response": {\n "status_code": 0,\n "message": "string",\n "body": {},\n "code": "string"\n },\n "metadata": {\n "action": "Manual triggered by user with id 123456",\n "origin": "string",\n "creation_timestamp": "string",\n "webhook_id": "string",\n "webhook_name": "string",\n "automation_name": "string",\n "organization_id": "string",\n "user_id": "string",\n "correlation_id": "string",\n "execution_id": "string",\n "action_id": "string"\n },\n "status": "succeeded",\n "http_method": "GET",\n "payload": "string",\n "original_payload": "string",\n "retry_attempt": 0,\n "can_reapply_transform": true,\n "can_reapply_transform_reason": "available"\n}\n```\n\n</details>\n\n---\n\n### `replayEvent`\n\nReplay a webhook event\n\n`POST /v1/webhooks/configs/{configId}/events/{eventId}/replay`\n\n```ts\nconst { data } = await client.replayEvent(\n {\n configId: \'example\',\n eventId: \'example\',\n },\n {\n reapply_transform: false\n },\n)\n```\n\n---\n\n### `getWebhookExample`\n\nGenerate an example payload for a webhook configuration based on trigger type\n\n`POST /v1/webhooks/configs/{configId}/example`\n\n```ts\nconst { data } = await client.getWebhookExample(\n {\n configId: \'example\',\n },\n {\n automation_id: \'automation_123\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "metadata": {\n "action": "Manual triggered by user with id 123456",\n "origin": "string",\n "creation_timestamp": "string",\n "webhook_id": "string",\n "webhook_name": "string",\n "automation_name": "string",\n "organization_id": "string",\n "user_id": "string",\n "correlation_id": "string",\n "execution_id": "string",\n "action_id": "string"\n },\n "entity": {},\n "relations": [\n {}\n ]\n}\n```\n\n</details>\n\n---\n\n### `getWebhookEventsV2`\n\nList webhook events and filter them by status, timestamp, etc.\n\n`POST /v2/webhooks/configs/{configId}/events`\n\n```ts\nconst { data } = await client.getWebhookEventsV2(\n {\n configId: \'example\',\n },\n {\n limit: 25,\n cursor: {\n created_at: \'2025-10-31T12:34:56Z\',\n event_id: \'evt_1234567890abcdef\'\n },\n timestamp: {\n from: \'2025-10-01T00:00:00Z\',\n to: \'2025-10-31T23:59:59Z\'\n },\n event_id: \'evt_1234567890abcdef\',\n status: \'succeeded\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "data": [\n {\n "event_id": "string",\n "org_id": "string",\n "webhook_config_id": "string",\n "url": "string",\n "created_at": "2021-04-27T12:01:13.000Z",\n "event_name": "string",\n "http_response": {\n "status_code": 0,\n "message": "string",\n "body": {},\n "code": "string"\n },\n "metadata": {\n "action": "Manual triggered by user with id 123456",\n "origin": "string",\n "creation_timestamp": "string",\n "webhook_id": "string",\n "webhook_name": "string",\n "automation_name": "string",\n "organization_id": "string",\n "user_id": "string",\n "correlation_id": "string",\n "execution_id": "string",\n "action_id": "string"\n },\n "status": "succeeded",\n "http_method": "GET",\n "payload": "string",\n "original_payload": "string",\n "retry_attempt": 0,\n "can_reapply_transform": true,\n "can_reapply_transform_reason": "available"\n }\n ],\n "next_cursor": {\n "created_at": "2025-10-31T12:34:56Z",\n "event_id": "evt_1234567890abcdef"\n },\n "has_more": true\n}\n```\n\n</details>\n\n---\n\n## Schemas\n\n### `PublicKeyResponse`\n\n```ts\ntype PublicKeyResponse = {\n public_key: string\n algorithm: string\n issuer?: string\n}\n```\n\n### `SearchOptions`\n\n```ts\ntype SearchOptions = {\n limit?: number\n cursor?: {\n created_at?: string // date-time\n event_id?: string\n }\n timestamp?: {\n from?: string // date-time\n to?: string // date-time\n }\n event_id?: string\n status?: "succeeded" | "failed" | "skipped"\n}\n```\n\n### `EventListResponse`\n\n```ts\ntype EventListResponse = {\n data?: Array<{\n event_id: string\n org_id: string\n webhook_config_id: string\n url?: string\n created_at?: string\n event_name?: string\n http_response?: {\n status_code?: { ... }\n message?: { ... }\n body?: { ... }\n code?: { ... }\n }\n metadata?: {\n action?: { ... }\n origin?: { ... }\n creation_timestamp?: { ... }\n webhook_id?: { ... }\n webhook_name?: { ... }\n automation_name?: { ... }\n organization_id: { ... }\n user_id?: { ... }\n correlation_id?: { ... }\n execution_id?: { ... }\n action_id?: { ... }\n }\n status?: "succeeded" | "failed" | "in_progress" | "skipped"\n http_method?: "GET" | "POST" | "PUT"\n payload?: string\n original_payload?: string\n retry_attempt?: number\n can_reapply_transform?: boolean\n can_reapply_transform_reason?: "available" | "no_transform_configured" | "no_original_source"\n }>\n next_cursor?: {\n created_at?: string // date-time\n event_id?: string\n }\n has_more?: boolean\n}\n```\n\n### `HttpMethod`\n\n```ts\ntype HttpMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS" | "HEAD"\n```\n\n### `AuthType`\n\n```ts\ntype AuthType = "BASIC" | "OAUTH_CLIENT_CREDENTIALS" | "API_KEY" | "NONE"\n```\n\n### `Filter`\n\n```ts\ntype Filter = {\n keyToFilter: string\n supportedValues: string[]\n}\n```\n\n### `WebhookCondition`\n\nA condition that must be met for the webhook to fire. A condition is EITHER a classic field + operation comparison OR a single jsonata_expression evaluated against the event payload \u2014 the two forms are mutually exclusive.\n\n```ts\ntype WebhookCondition = {\n field?: string\n operation?: "equals" | "not_equals" | "any_of" | "none_of" | "contains" | "not_contains" | "starts_with" | "ends_with" | "greater_than" | "less_than" | "greater_than_or_equals" | "less_than_or_equals" | "is_empty" | "is_not_empty" | "length_equals" | "length_not_equals" | "length_greater_than" | "length_less_than" | "length_greater_than_or_equals" | "length_less_than_or_equals"\n values?: string[]\n field_type?: "string" | "number" | "boolean" | "date" | "datetime"\n is_array_field?: boolean\n repeatable_item_op?: boolean\n jsonata_expression?: string\n}\n```\n\n### `WebhookConditionGroup`\n\nA group of conditions with a logical operator. Multiple conditions are AND-ed by default.\n\n```ts\ntype WebhookConditionGroup = {\n conditions?: Array<{\n field?: string\n operation?: "equals" | "not_equals" | "any_of" | "none_of" | "contains" | "not_contains" | "starts_with" | "ends_with" | "greater_than" | "less_than" | "greater_than_or_equals" | "less_than_or_equals" | "is_empty" | "is_not_empty" | "length_equals" | "length_not_equals" | "length_greater_than" | "length_less_than" | "length_greater_than_or_equals" | "length_less_than_or_equals"\n values?: string[]\n field_type?: "string" | "number" | "boolean" | "date" | "datetime"\n is_array_field?: boolean\n repeatable_item_op?: boolean\n jsonata_expression?: string\n }>\n logical_operator?: "AND" | "OR"\n}\n```\n\n### `Auth`\n\n```ts\ntype Auth = {\n authType: "BASIC" | "OAUTH_CLIENT_CREDENTIALS" | "API_KEY" | "NONE"\n basicAuthConfig?: {\n username: string\n password?: string\n passwordIsEnvVar?: boolean\n }\n oauthConfig?: {\n clientId: string\n clientSecret?: string\n clientSecretIsEnvVar?: boolean\n endpoint: string\n httpMethod: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS" | "HEAD"\n customParameterList?: Array<{\n type: { ... }\n key: { ... }\n value: { ... }\n }>\n }\n apiKeyConfig?: {\n keyName: string\n keyValue?: string\n keyValueIsEnvVar?: boolean\n }\n}\n```\n\n### `BasicAuthConfig`\n\nTo be sent only if authType is BASIC\n\n```ts\ntype BasicAuthConfig = {\n username: string\n password?: string\n passwordIsEnvVar?: boolean\n}\n```\n\n### `OAuthConfig`\n\nTo be sent only if authType is OAUTH_CLIENT_CREDENTIALS\n\n```ts\ntype OAuthConfig = {\n clientId: string\n clientSecret?: string\n clientSecretIsEnvVar?: boolean\n endpoint: string\n httpMethod: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS" | "HEAD"\n customParameterList?: Array<{\n type: "body" | "query" | "header"\n key: string\n value: string\n }>\n}\n```\n\n### `ApiKeyConfig`\n\nTo be sent only if authType is API_KEY\n\n```ts\ntype ApiKeyConfig = {\n keyName: string\n keyValue?: string\n keyValueIsEnvVar?: boolean\n}\n```\n\n### `WebhookConfig`\n\n```ts\ntype WebhookConfig = {\n id?: string\n name: string\n eventName: string\n eventVersion?: string\n url?: string\n creationTime?: string\n updatedTime?: string\n httpMethod?: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS" | "HEAD"\n enabled?: boolean\n auth?: {\n authType: "BASIC" | "OAUTH_CLIENT_CREDENTIALS" | "API_KEY" | "NONE"\n basicAuthConfig?: {\n username: { ... }\n password?: { ... }\n passwordIsEnvVar?: { ... }\n }\n oauthConfig?: {\n clientId: { ... }\n clientSecret?: { ... }\n clientSecretIsEnvVar?: { ... }\n endpoint: { ... }\n httpMethod: { ... }\n customParameterList?: { ... }\n }\n apiKeyConfig?: {\n keyName: { ... }\n keyValue?: { ... }\n keyValueIsEnvVar?: { ... }\n }\n }\n filter?: {\n keyToFilter: string\n supportedValues: string[]\n }\n payloadConfiguration?: {\n hydrate_entity?: boolean\n include_relations?: boolean\n include_activity?: boolean\n include_changed_attributes?: boolean\n apply_changesets?: boolean\n custom_headers?: Record<string, string>\n }\n enableStaticIP?: boolean\n protected?: boolean\n secureProxy?: {\n integration_id: string // uuid\n use_case_slug: string\n }\n status?: "active" | "inactive" | "incomplete"\n jsonataExpression?: string\n deliveryMode?: "json_base64" | "binary_multipart"\n multipartConfig?: {\n fileFieldName?: string\n fileFieldStrategy?: "single" | "multi"\n fileSource?: string\n extraFields?: Record<string, string>\n }\n retryPolicy?: {\n enabled: boolean\n maxAttempts?: number\n }\n filterConditions?: {\n conditions?: Array<{\n field?: { ... }\n operation?: { ... }\n values?: { ... }\n field_type?: { ... }\n is_array_field?: { ... }\n repeatable_item_op?: { ... }\n jsonata_expression?: { ... }\n }>\n logical_operator?: "AND" | "OR"\n }\n _manifest?: string // uuid[]\n signingSecret?: string\n}\n```\n\n### `EventConfigResp`\n\n```ts\ntype EventConfigResp = Array<{\n eventName?: string\n eventLabel?: string\n}>\n```\n\n### `EventConfigEntry`\n\n```ts\ntype EventConfigEntry = {\n eventName?: string\n eventLabel?: string\n}\n```\n\n### `ErrorResp`\n\n```ts\ntype ErrorResp = {\n message?: string\n}\n```\n\n### `TriggerWebhookResp`\n\n```ts\ntype TriggerWebhookResp = {\n status_code?: string\n message?: string\n body?: object\n code?: string\n status?: "succeeded" | "failed"\n start_date?: string\n end_date?: string\n event_id: string\n}\n```\n\n### `PayloadConfiguration`\n\nConfiguration for the webhook payload\n\n```ts\ntype PayloadConfiguration = {\n hydrate_entity?: boolean\n include_relations?: boolean\n include_activity?: boolean\n include_changed_attributes?: boolean\n apply_changesets?: boolean\n custom_headers?: Record<string, string>\n}\n```\n\n### `CustomHeader`\n\nObject representing custom headers as key-value pairs.\n\n```ts\ntype CustomHeader = Record<string, string>\n```\n\n### `CustomOAuthParameter`\n\nCustom key/value pair of either type body, query or header\n\n```ts\ntype CustomOAuthParameter = {\n type: "body" | "query" | "header"\n key: string\n value: string\n}\n```\n\n### `Metadata`\n\nContains the metadata about the configured event\n\n```ts\ntype Metadata = {\n action?: string\n origin?: string\n creation_timestamp?: string\n webhook_id?: string\n webhook_name?: string\n automation_name?: string\n organization_id: string\n user_id?: string\n correlation_id?: string\n execution_id?: string\n action_id?: string\n}\n```\n\n### `ExecutionPayload`\n\nPayload for triggering a webhook\n\n```ts\ntype ExecutionPayload = {\n metadata: {\n action?: string\n origin?: string\n creation_timestamp?: string\n webhook_id?: string\n webhook_name?: string\n automation_name?: string\n organization_id: string\n user_id?: string\n correlation_id?: string\n execution_id?: string\n action_id?: string\n }\n}\n```\n\n### `WebhookEvent`\n\n```ts\ntype WebhookEvent = {\n event_id: string\n org_id: string\n webhook_config_id: string\n url?: string\n created_at?: string\n event_name?: string\n http_response?: {\n status_code?: number\n message?: string\n body?: object\n code?: string\n }\n metadata?: {\n action?: string\n origin?: string\n creation_timestamp?: string\n webhook_id?: string\n webhook_name?: string\n automation_name?: string\n organization_id: string\n user_id?: string\n correlation_id?: string\n execution_id?: string\n action_id?: string\n }\n status?: "succeeded" | "failed" | "in_progress" | "skipped"\n http_method?: "GET" | "POST" | "PUT"\n payload?: string\n original_payload?: string\n retry_attempt?: number\n can_reapply_transform?: boolean\n can_reapply_transform_reason?: "available" | "no_transform_configured" | "no_original_source"\n}\n```\n\n### `ExampleRequest`\n\n```ts\ntype ExampleRequest = {\n automation_id?: string\n}\n```\n\n### `ExampleResponse`\n\n```ts\ntype ExampleResponse = {\n metadata?: {\n action?: string\n origin?: string\n creation_timestamp?: string\n webhook_id?: string\n webhook_name?: string\n automation_name?: string\n organization_id: string\n user_id?: string\n correlation_id?: string\n execution_id?: string\n action_id?: string\n }\n entity?: Record<string, unknown>\n relations?: Record<string, unknown>[]\n}\n```\n\n### `TestOAuthResponse`\n\n```ts\ntype TestOAuthResponse = {\n success: boolean\n expires_in?: number\n token_type?: string\n message: string\n}\n```\n\n### `ReplayRequest`\n\n```ts\ntype ReplayRequest = {\n reapply_transform?: boolean\n}\n```\n\n### `BatchReplayRequest`\n\n```ts\ntype BatchReplayRequest = {\n eventIds: string[]\n reapply_transform?: boolean\n}\n```\n';
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
exports.default = webhooks_default;
|