@epilot/sdk 2.13.1 → 2.14.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.
- package/definitions/message-runtime.json +1 -1
- package/definitions/message.json +146 -1
- package/definitions/webhooks.json +16 -8
- 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 +6 -6
- package/dist/apis/targeting.js +1 -1
- package/dist/apis/template-variables.cjs +6 -6
- package/dist/apis/template-variables.js +1 -1
- package/dist/apis/user.cjs +6 -6
- package/dist/apis/user.js +1 -1
- package/dist/apis/validation-rules.cjs +6 -6
- package/dist/apis/validation-rules.js +1 -1
- package/dist/apis/webhooks.cjs +6 -6
- package/dist/apis/webhooks.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-74EM6ZXK.cjs → chunk-2FBNQV76.cjs} +3 -3
- package/dist/chunk-JM63KEFZ.cjs +14 -0
- package/dist/{chunk-UAND7NKG.js → chunk-NUUEJRUH.js} +3 -3
- package/dist/index.cjs +10 -10
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- 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/{webhooks-KHP3MEVQ.cjs → webhooks-PNLMQFE2.cjs} +1 -1
- package/dist/{webhooks-HMU5AUDZ.js → webhooks-QYVT2NUP.js} +1 -1
- package/dist/{webhooks.d-Bs6-AkzY.d.cts → webhooks.d-DqOEzFsp.d.cts} +21 -14
- package/dist/{webhooks.d-Bs6-AkzY.d.ts → webhooks.d-DqOEzFsp.d.ts} +21 -14
- package/docs/message.md +97 -9
- package/docs/webhooks.md +10 -7
- package/package.json +1 -1
- package/dist/chunk-DUHAG5CO.cjs +0 -14
- package/dist/chunk-FAZ63FEX.js +0 -14
- package/dist/message-6IFCB7GH.js +0 -7
- package/dist/message-7LNAFKKV.cjs +0 -7
|
@@ -43,6 +43,40 @@ declare namespace Components {
|
|
|
43
43
|
[key: string]: any;
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
|
+
export interface AssigneeWorkload {
|
|
47
|
+
/**
|
|
48
|
+
* The user id.
|
|
49
|
+
* example:
|
|
50
|
+
* 11000902
|
|
51
|
+
*/
|
|
52
|
+
user_id: string;
|
|
53
|
+
/**
|
|
54
|
+
* Number of open threads assigned directly to the user.
|
|
55
|
+
* example:
|
|
56
|
+
* 2
|
|
57
|
+
*/
|
|
58
|
+
open_threads: number;
|
|
59
|
+
}
|
|
60
|
+
export interface AssigneeWorkloadParams {
|
|
61
|
+
/**
|
|
62
|
+
* User ids to compute the open-thread workload for. At most 100 per request; larger requests are rejected with 422.
|
|
63
|
+
* example:
|
|
64
|
+
* [
|
|
65
|
+
* "11000902",
|
|
66
|
+
* "11001053"
|
|
67
|
+
* ]
|
|
68
|
+
*/
|
|
69
|
+
user_ids: [
|
|
70
|
+
string,
|
|
71
|
+
...string[]
|
|
72
|
+
];
|
|
73
|
+
}
|
|
74
|
+
export interface AssigneeWorkloadResults {
|
|
75
|
+
/**
|
|
76
|
+
* Open-thread workload per requested user id, in request order.
|
|
77
|
+
*/
|
|
78
|
+
workloads: AssigneeWorkload[];
|
|
79
|
+
}
|
|
46
80
|
/**
|
|
47
81
|
* Message attachments
|
|
48
82
|
*/
|
|
@@ -199,6 +233,11 @@ declare namespace Components {
|
|
|
199
233
|
*
|
|
200
234
|
*/
|
|
201
235
|
send_as_link?: boolean;
|
|
236
|
+
/**
|
|
237
|
+
* If false, this file relation is kept on the message (e.g. for CID/inline rendering) but is NOT propagated to the entity the email is sent from. Used for inline images such as logos, signatures and social icons. Defaults to true.
|
|
238
|
+
*
|
|
239
|
+
*/
|
|
240
|
+
save_to_entity?: boolean;
|
|
202
241
|
}
|
|
203
242
|
export interface Message {
|
|
204
243
|
/**
|
|
@@ -213,6 +252,12 @@ declare namespace Components {
|
|
|
213
252
|
* 206801
|
|
214
253
|
*/
|
|
215
254
|
sender?: string;
|
|
255
|
+
/**
|
|
256
|
+
* User ID of the user who last updated (edited) the message. Set for drafts on each save.
|
|
257
|
+
* example:
|
|
258
|
+
* 206801
|
|
259
|
+
*/
|
|
260
|
+
updated_by?: string;
|
|
216
261
|
/**
|
|
217
262
|
* Subject
|
|
218
263
|
* example:
|
|
@@ -300,6 +345,14 @@ declare namespace Components {
|
|
|
300
345
|
* Whether the thread is marked as Done immediately after sending the message
|
|
301
346
|
*/
|
|
302
347
|
complete_thread?: boolean;
|
|
348
|
+
/**
|
|
349
|
+
* Whether to mark the thread as read by the sender's org/user after sending a reply.
|
|
350
|
+
* Only applies when `parent_id` is set. When false, the thread's `org_read_message` and
|
|
351
|
+
* `user_read_message` arrays are left unchanged, so the thread remains unread for anyone
|
|
352
|
+
* who had it unread before. Defaults to true for backward compatibility.
|
|
353
|
+
*
|
|
354
|
+
*/
|
|
355
|
+
mark_thread_as_read?: boolean;
|
|
303
356
|
/**
|
|
304
357
|
* Open new thread when sending the very first message in conversation. Thread should contains context related to all messages in it (eg. topic, brand_id, opportunity_id, assigned_to,...). Thread properties depend on API caller as it's not pre-defined. We do recommend having at least `topic` property for categorizing. `thread` or `parent_id` must be provided either.
|
|
305
358
|
*
|
|
@@ -369,6 +422,17 @@ declare namespace Components {
|
|
|
369
422
|
* 3f34ce73-089c-4d45-a5ee-c161234e41c3
|
|
370
423
|
*/
|
|
371
424
|
template_id?: string;
|
|
425
|
+
/**
|
|
426
|
+
* Identifies who triggered the send so server-side policy can branch on it.
|
|
427
|
+
* For `manual` sends, the caller's curated `_tags` are trusted as-is and no
|
|
428
|
+
* server-side enrichment from the referenced `template_id` (e.g. merging the
|
|
429
|
+
* template's `email_tags`) is performed. Any non-manual value (or omitting the
|
|
430
|
+
* field) opts into template-derived enrichment.
|
|
431
|
+
*
|
|
432
|
+
* example:
|
|
433
|
+
* manual
|
|
434
|
+
*/
|
|
435
|
+
source?: "manual" | "automation" | "workflow" | "partner" | "bulk" | "system";
|
|
372
436
|
}
|
|
373
437
|
export interface MessageV2 {
|
|
374
438
|
/**
|
|
@@ -426,6 +490,12 @@ declare namespace Components {
|
|
|
426
490
|
* 206801
|
|
427
491
|
*/
|
|
428
492
|
sender?: string;
|
|
493
|
+
/**
|
|
494
|
+
* User ID of the user who last updated (edited) the message. Set for drafts on each save.
|
|
495
|
+
* example:
|
|
496
|
+
* 206801
|
|
497
|
+
*/
|
|
498
|
+
updated_by?: string;
|
|
429
499
|
/**
|
|
430
500
|
* Subject
|
|
431
501
|
* example:
|
|
@@ -673,7 +743,7 @@ declare namespace Components {
|
|
|
673
743
|
/**
|
|
674
744
|
* Timestamp of the event
|
|
675
745
|
* example:
|
|
676
|
-
* 2024-01-01T00:00:
|
|
746
|
+
* 2024-01-01T00:00:00.000Z
|
|
677
747
|
*/
|
|
678
748
|
timestamp: string;
|
|
679
749
|
}
|
|
@@ -848,6 +918,12 @@ declare namespace Paths {
|
|
|
848
918
|
* 206801
|
|
849
919
|
*/
|
|
850
920
|
sender?: string;
|
|
921
|
+
/**
|
|
922
|
+
* User ID of the user who last updated (edited) the message. Set for drafts on each save.
|
|
923
|
+
* example:
|
|
924
|
+
* 206801
|
|
925
|
+
*/
|
|
926
|
+
updated_by?: string;
|
|
851
927
|
/**
|
|
852
928
|
* Subject
|
|
853
929
|
* example:
|
|
@@ -961,6 +1037,14 @@ declare namespace Paths {
|
|
|
961
1037
|
}
|
|
962
1038
|
}
|
|
963
1039
|
}
|
|
1040
|
+
namespace GetAssigneeWorkload {
|
|
1041
|
+
export type RequestBody = Components.Schemas.AssigneeWorkloadParams;
|
|
1042
|
+
namespace Responses {
|
|
1043
|
+
export type $200 = Components.Schemas.AssigneeWorkloadResults;
|
|
1044
|
+
export interface $403 {
|
|
1045
|
+
}
|
|
1046
|
+
}
|
|
1047
|
+
}
|
|
964
1048
|
namespace GetMessage {
|
|
965
1049
|
namespace Parameters {
|
|
966
1050
|
/**
|
|
@@ -1033,6 +1117,12 @@ declare namespace Paths {
|
|
|
1033
1117
|
* 206801
|
|
1034
1118
|
*/
|
|
1035
1119
|
sender?: string;
|
|
1120
|
+
/**
|
|
1121
|
+
* User ID of the user who last updated (edited) the message. Set for drafts on each save.
|
|
1122
|
+
* example:
|
|
1123
|
+
* 206801
|
|
1124
|
+
*/
|
|
1125
|
+
updated_by?: string;
|
|
1036
1126
|
/**
|
|
1037
1127
|
* Subject
|
|
1038
1128
|
* example:
|
|
@@ -1216,6 +1306,12 @@ declare namespace Paths {
|
|
|
1216
1306
|
* 206801
|
|
1217
1307
|
*/
|
|
1218
1308
|
sender?: string;
|
|
1309
|
+
/**
|
|
1310
|
+
* User ID of the user who last updated (edited) the message. Set for drafts on each save.
|
|
1311
|
+
* example:
|
|
1312
|
+
* 206801
|
|
1313
|
+
*/
|
|
1314
|
+
updated_by?: string;
|
|
1219
1315
|
/**
|
|
1220
1316
|
* Subject
|
|
1221
1317
|
* example:
|
|
@@ -1642,6 +1738,12 @@ declare namespace Paths {
|
|
|
1642
1738
|
* 206801
|
|
1643
1739
|
*/
|
|
1644
1740
|
sender?: string;
|
|
1741
|
+
/**
|
|
1742
|
+
* User ID of the user who last updated (edited) the message. Set for drafts on each save.
|
|
1743
|
+
* example:
|
|
1744
|
+
* 206801
|
|
1745
|
+
*/
|
|
1746
|
+
updated_by?: string;
|
|
1645
1747
|
/**
|
|
1646
1748
|
* Subject
|
|
1647
1749
|
* example:
|
|
@@ -1988,6 +2090,12 @@ declare namespace Paths {
|
|
|
1988
2090
|
* 206801
|
|
1989
2091
|
*/
|
|
1990
2092
|
sender?: string;
|
|
2093
|
+
/**
|
|
2094
|
+
* User ID of the user who last updated (edited) the message. Set for drafts on each save.
|
|
2095
|
+
* example:
|
|
2096
|
+
* 206801
|
|
2097
|
+
*/
|
|
2098
|
+
updated_by?: string;
|
|
1991
2099
|
/**
|
|
1992
2100
|
* Subject
|
|
1993
2101
|
* example:
|
|
@@ -2401,6 +2509,12 @@ declare namespace Paths {
|
|
|
2401
2509
|
* 206801
|
|
2402
2510
|
*/
|
|
2403
2511
|
sender?: string;
|
|
2512
|
+
/**
|
|
2513
|
+
* User ID of the user who last updated (edited) the message. Set for drafts on each save.
|
|
2514
|
+
* example:
|
|
2515
|
+
* 206801
|
|
2516
|
+
*/
|
|
2517
|
+
updated_by?: string;
|
|
2404
2518
|
/**
|
|
2405
2519
|
* Subject
|
|
2406
2520
|
* example:
|
|
@@ -2484,6 +2598,160 @@ declare namespace Paths {
|
|
|
2484
2598
|
}
|
|
2485
2599
|
export interface $403 {
|
|
2486
2600
|
}
|
|
2601
|
+
export interface $409 {
|
|
2602
|
+
/**
|
|
2603
|
+
* Human-readable conflict message
|
|
2604
|
+
* example:
|
|
2605
|
+
* This draft was edited by someone else. Please reload and try again.
|
|
2606
|
+
*/
|
|
2607
|
+
error?: string;
|
|
2608
|
+
/**
|
|
2609
|
+
* The current server version of the message (includes updated_by / _updated_at)
|
|
2610
|
+
*/
|
|
2611
|
+
current_message?: {
|
|
2612
|
+
/**
|
|
2613
|
+
* Entity ID
|
|
2614
|
+
* example:
|
|
2615
|
+
* 3fa85f64-5717-4562-b3fc-2c963f66afa6
|
|
2616
|
+
*/
|
|
2617
|
+
_id: string;
|
|
2618
|
+
/**
|
|
2619
|
+
* Entity title
|
|
2620
|
+
*/
|
|
2621
|
+
_title: string;
|
|
2622
|
+
/**
|
|
2623
|
+
* Organization ID the entity belongs to
|
|
2624
|
+
* example:
|
|
2625
|
+
* 206801
|
|
2626
|
+
*/
|
|
2627
|
+
_org: string;
|
|
2628
|
+
/**
|
|
2629
|
+
* URL-friendly identifier for the entity schema
|
|
2630
|
+
* example:
|
|
2631
|
+
* message
|
|
2632
|
+
*/
|
|
2633
|
+
_schema: string;
|
|
2634
|
+
/**
|
|
2635
|
+
* Entity tags
|
|
2636
|
+
* example:
|
|
2637
|
+
* [
|
|
2638
|
+
* "pricing",
|
|
2639
|
+
* "INBOX"
|
|
2640
|
+
* ]
|
|
2641
|
+
*/
|
|
2642
|
+
_tags?: string[];
|
|
2643
|
+
/**
|
|
2644
|
+
* Created date
|
|
2645
|
+
* example:
|
|
2646
|
+
* 2021-02-09T12:41:43.662Z
|
|
2647
|
+
*/
|
|
2648
|
+
_created_at: string; // date-time
|
|
2649
|
+
/**
|
|
2650
|
+
* Updated date
|
|
2651
|
+
* example:
|
|
2652
|
+
* 2021-02-10T09:14:31.990Z
|
|
2653
|
+
*/
|
|
2654
|
+
_updated_at: string; // date-time
|
|
2655
|
+
/**
|
|
2656
|
+
* Message ID which is from email provider. If you provide `message-id`, API overrides by its own value.
|
|
2657
|
+
* example:
|
|
2658
|
+
* <0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com>
|
|
2659
|
+
*/
|
|
2660
|
+
message_id?: string;
|
|
2661
|
+
/**
|
|
2662
|
+
* User ID of user sends the message.
|
|
2663
|
+
* example:
|
|
2664
|
+
* 206801
|
|
2665
|
+
*/
|
|
2666
|
+
sender?: string;
|
|
2667
|
+
/**
|
|
2668
|
+
* User ID of the user who last updated (edited) the message. Set for drafts on each save.
|
|
2669
|
+
* example:
|
|
2670
|
+
* 206801
|
|
2671
|
+
*/
|
|
2672
|
+
updated_by?: string;
|
|
2673
|
+
/**
|
|
2674
|
+
* Subject
|
|
2675
|
+
* example:
|
|
2676
|
+
* Request for solar panel price
|
|
2677
|
+
*/
|
|
2678
|
+
subject: string;
|
|
2679
|
+
/**
|
|
2680
|
+
* HTML body
|
|
2681
|
+
* example:
|
|
2682
|
+
* <div>We at ABC GmbH would like to request a price quote for the solar panel.</div>
|
|
2683
|
+
*/
|
|
2684
|
+
html?: string;
|
|
2685
|
+
/**
|
|
2686
|
+
* Text body
|
|
2687
|
+
* example:
|
|
2688
|
+
* We at ABC GmbH would like to request a price quote for the solar panel.
|
|
2689
|
+
*/
|
|
2690
|
+
text?: string;
|
|
2691
|
+
from: Components.Schemas.Address;
|
|
2692
|
+
reply_to?: Components.Schemas.Address;
|
|
2693
|
+
/**
|
|
2694
|
+
* To email addresses
|
|
2695
|
+
*/
|
|
2696
|
+
to?: Components.Schemas.Address[];
|
|
2697
|
+
/**
|
|
2698
|
+
* Cc email addresses
|
|
2699
|
+
*/
|
|
2700
|
+
cc?: Components.Schemas.Address[];
|
|
2701
|
+
/**
|
|
2702
|
+
* Bcc email addresses
|
|
2703
|
+
*/
|
|
2704
|
+
bcc?: Components.Schemas.Address[];
|
|
2705
|
+
file?: /* Message attachments */ Components.Schemas.AttachmentsRelation;
|
|
2706
|
+
/**
|
|
2707
|
+
* References header. Value is the series of `message_id` which is reparated by space to indicate that message has parent. The last message ID in references identifies the parent. The first message ID in references identifies the first message in the thread. The basic idea is that sender should copy `references` from the parent and append the parent's `message_id` when replying.
|
|
2708
|
+
*
|
|
2709
|
+
* example:
|
|
2710
|
+
* <0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com> <CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>
|
|
2711
|
+
*/
|
|
2712
|
+
references?: string;
|
|
2713
|
+
/**
|
|
2714
|
+
* In-Reply-To header. Value is the `message_id` of parent message.
|
|
2715
|
+
*
|
|
2716
|
+
* example:
|
|
2717
|
+
* <CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>
|
|
2718
|
+
*/
|
|
2719
|
+
in_reply_to?: string;
|
|
2720
|
+
/**
|
|
2721
|
+
* User ID of user read the message.
|
|
2722
|
+
* example:
|
|
2723
|
+
* [
|
|
2724
|
+
* "206801",
|
|
2725
|
+
* "200109"
|
|
2726
|
+
* ]
|
|
2727
|
+
*/
|
|
2728
|
+
user_read_message?: string[];
|
|
2729
|
+
/**
|
|
2730
|
+
* Organization ID of organization read the message.
|
|
2731
|
+
* example:
|
|
2732
|
+
* [
|
|
2733
|
+
* "789372",
|
|
2734
|
+
* "210291"
|
|
2735
|
+
* ]
|
|
2736
|
+
*/
|
|
2737
|
+
org_read_message?: string[];
|
|
2738
|
+
/**
|
|
2739
|
+
* Sent message status. The array contains sending message status corresponding to all recipients. For more detail, check `send_status` of each recipient in `to`, `cc`, `bcc` Reference at <https://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html>
|
|
2740
|
+
*
|
|
2741
|
+
*/
|
|
2742
|
+
send_status?: ("SEND" | "DELIVERY" | "REJECT" | "COMPLAINT" | "BOUNCE" | "ERROR")[];
|
|
2743
|
+
/**
|
|
2744
|
+
* Message type
|
|
2745
|
+
*/
|
|
2746
|
+
type?: "SENT" | "RECEIVED";
|
|
2747
|
+
/**
|
|
2748
|
+
* Template ID used for sending message.
|
|
2749
|
+
* example:
|
|
2750
|
+
* 3f34ce73-089c-4d45-a5ee-c161234e41c3
|
|
2751
|
+
*/
|
|
2752
|
+
template_id?: string;
|
|
2753
|
+
};
|
|
2754
|
+
}
|
|
2487
2755
|
}
|
|
2488
2756
|
}
|
|
2489
2757
|
namespace UpdateThread {
|
|
@@ -2580,7 +2848,6 @@ declare namespace Paths {
|
|
|
2580
2848
|
}
|
|
2581
2849
|
}
|
|
2582
2850
|
|
|
2583
|
-
|
|
2584
2851
|
interface OperationMethods {
|
|
2585
2852
|
/**
|
|
2586
2853
|
* updateMessage - updateMessage
|
|
@@ -2757,6 +3024,27 @@ interface OperationMethods {
|
|
|
2757
3024
|
data?: Paths.SearchIds.RequestBody,
|
|
2758
3025
|
config?: AxiosRequestConfig
|
|
2759
3026
|
): OperationResponse<Paths.SearchIds.Responses.$200>
|
|
3027
|
+
/**
|
|
3028
|
+
* getAssigneeWorkload - getAssigneeWorkload
|
|
3029
|
+
*
|
|
3030
|
+
* Return the open-thread workload for a set of user ids.
|
|
3031
|
+
*
|
|
3032
|
+
* For each requested user id, returns the number of *open* threads assigned
|
|
3033
|
+
* directly to that user — matching what the user sees in their central-inbox
|
|
3034
|
+
* open view: in inbox, not trashed, not done, and excluding notification-only
|
|
3035
|
+
* and spam threads.
|
|
3036
|
+
*
|
|
3037
|
+
* Only threads assigned directly to a user are counted; threads assigned to a
|
|
3038
|
+
* group the user belongs to are not. Intended for assignment load-balancing
|
|
3039
|
+
* (e.g. even-distribution automations) that need a consistent, inbox-aligned
|
|
3040
|
+
* workload per user.
|
|
3041
|
+
*
|
|
3042
|
+
*/
|
|
3043
|
+
'getAssigneeWorkload'(
|
|
3044
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
3045
|
+
data?: Paths.GetAssigneeWorkload.RequestBody,
|
|
3046
|
+
config?: AxiosRequestConfig
|
|
3047
|
+
): OperationResponse<Paths.GetAssigneeWorkload.Responses.$200>
|
|
2760
3048
|
/**
|
|
2761
3049
|
* updateThread - updateThread
|
|
2762
3050
|
*
|
|
@@ -3336,6 +3624,29 @@ interface PathsDictionary {
|
|
|
3336
3624
|
config?: AxiosRequestConfig
|
|
3337
3625
|
): OperationResponse<Paths.SearchIds.Responses.$200>
|
|
3338
3626
|
}
|
|
3627
|
+
['/v2/message/threads:workload']: {
|
|
3628
|
+
/**
|
|
3629
|
+
* getAssigneeWorkload - getAssigneeWorkload
|
|
3630
|
+
*
|
|
3631
|
+
* Return the open-thread workload for a set of user ids.
|
|
3632
|
+
*
|
|
3633
|
+
* For each requested user id, returns the number of *open* threads assigned
|
|
3634
|
+
* directly to that user — matching what the user sees in their central-inbox
|
|
3635
|
+
* open view: in inbox, not trashed, not done, and excluding notification-only
|
|
3636
|
+
* and spam threads.
|
|
3637
|
+
*
|
|
3638
|
+
* Only threads assigned directly to a user are counted; threads assigned to a
|
|
3639
|
+
* group the user belongs to are not. Intended for assignment load-balancing
|
|
3640
|
+
* (e.g. even-distribution automations) that need a consistent, inbox-aligned
|
|
3641
|
+
* workload per user.
|
|
3642
|
+
*
|
|
3643
|
+
*/
|
|
3644
|
+
'post'(
|
|
3645
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
3646
|
+
data?: Paths.GetAssigneeWorkload.RequestBody,
|
|
3647
|
+
config?: AxiosRequestConfig
|
|
3648
|
+
): OperationResponse<Paths.GetAssigneeWorkload.Responses.$200>
|
|
3649
|
+
}
|
|
3339
3650
|
['/v1/message/threads']: {
|
|
3340
3651
|
/**
|
|
3341
3652
|
* updateThread - updateThread
|
|
@@ -3783,8 +4094,10 @@ interface PathsDictionary {
|
|
|
3783
4094
|
|
|
3784
4095
|
type Client = OpenAPIClient<OperationMethods, PathsDictionary>
|
|
3785
4096
|
|
|
3786
|
-
|
|
3787
4097
|
type Address = Components.Schemas.Address;
|
|
4098
|
+
type AssigneeWorkload = Components.Schemas.AssigneeWorkload;
|
|
4099
|
+
type AssigneeWorkloadParams = Components.Schemas.AssigneeWorkloadParams;
|
|
4100
|
+
type AssigneeWorkloadResults = Components.Schemas.AssigneeWorkloadResults;
|
|
3788
4101
|
type AttachmentsRelation = Components.Schemas.AttachmentsRelation;
|
|
3789
4102
|
type BaseEntity = Components.Schemas.BaseEntity;
|
|
3790
4103
|
type BulkActionsPayload = Components.Schemas.BulkActionsPayload;
|
|
@@ -3808,4 +4121,4 @@ type ThreadTimeline = Components.Schemas.ThreadTimeline;
|
|
|
3808
4121
|
type TimelineEvent = Components.Schemas.TimelineEvent;
|
|
3809
4122
|
type TimelineEventData = Components.Schemas.TimelineEventData;
|
|
3810
4123
|
|
|
3811
|
-
export { type Address as A, type BaseEntity as B, type Client as C, type ErrorResponse as E, type FieldsParam as F, type Message as M, type OperationMethods as O, Paths as P, type ReadMessagePayload as R, type SearchIDParams as S, type Thread as T, Components as a, type PathsDictionary as b, type
|
|
4124
|
+
export { type Address as A, type BaseEntity as B, type Client as C, type ErrorResponse as E, type FieldsParam as F, type Message as M, type OperationMethods as O, Paths as P, type ReadMessagePayload as R, type SearchIDParams as S, type Thread as T, Components as a, type PathsDictionary as b, type AssigneeWorkload as c, type AssigneeWorkloadParams as d, type AssigneeWorkloadResults as e, type AttachmentsRelation as f, type BulkActionsPayload as g, type BulkActionsPayloadWithScopes as h, type File as i, type MessageRequestParams as j, type MessageV2 as k, type MoveThreadPayload as l, type ReadingScope as m, type SearchParams as n, type SearchParamsV2 as o, type ThreadDoneEvent as p, type ThreadOpenEvent as q, type ThreadTimeline as r, type TimelineEvent as s, type TimelineEventData as t };
|
|
@@ -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"\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"\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;
|