@epilot/sdk 2.6.0 → 2.7.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/customer-portal-runtime.json +1 -1
- package/definitions/customer-portal.json +492 -7
- package/definitions/email-settings-runtime.json +1 -1
- package/definitions/email-settings.json +86 -4
- package/definitions/event-catalog-runtime.json +1 -1
- package/definitions/event-catalog.json +256 -1
- package/definitions/file-runtime.json +1 -1
- package/definitions/file.json +262 -4
- package/definitions/webhooks.json +19 -4
- 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 +8 -8
- package/dist/apis/customer-portal.d.cts +2 -2
- package/dist/apis/customer-portal.d.ts +2 -2
- package/dist/apis/customer-portal.js +2 -2
- 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 +8 -8
- package/dist/apis/email-settings.d.cts +2 -2
- package/dist/apis/email-settings.d.ts +2 -2
- package/dist/apis/email-settings.js +2 -2
- 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 +8 -8
- package/dist/apis/event-catalog.d.cts +2 -2
- package/dist/apis/event-catalog.d.ts +2 -2
- package/dist/apis/event-catalog.js +2 -2
- package/dist/apis/file.cjs +8 -8
- package/dist/apis/file.d.cts +2 -2
- package/dist/apis/file.d.ts +2 -2
- package/dist/apis/file.js +2 -2
- 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 +6 -6
- package/dist/apis/message.js +1 -1
- 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/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/bin/cli.js +1 -1
- package/dist/chunk-3APTSPY4.js +14 -0
- package/dist/{chunk-BLNXQAMX.cjs → chunk-CBDKPGO5.cjs} +1 -1
- package/dist/chunk-KCPVNRDL.js +14 -0
- package/dist/chunk-KJPOUJBU.cjs +14 -0
- package/dist/{chunk-TME4YJNP.js → chunk-OCMIXJWC.js} +1 -1
- package/dist/chunk-OPXGJKZR.cjs +14 -0
- package/dist/chunk-PTEJYAYJ.js +14 -0
- package/dist/{chunk-SDIGGISZ.cjs → chunk-R7XDTILZ.cjs} +9 -9
- package/dist/{chunk-QNUU4TTU.js → chunk-SCMAZ73K.js} +9 -9
- package/dist/chunk-YI5YGTAH.cjs +14 -0
- package/dist/customer-portal-7HYSBH7H.cjs +7 -0
- package/dist/customer-portal-X4LJX6AU.js +7 -0
- package/dist/{customer-portal-runtime-OEXTSMSE.cjs → customer-portal-runtime-IYHJ3RME.cjs} +2 -2
- package/dist/{customer-portal-runtime-N4NWQ67M.js → customer-portal-runtime-ZYU3WIXY.js} +1 -1
- package/dist/{customer-portal.d-ChSEioI5.d.cts → customer-portal.d-C7ZCbjiY.d.cts} +605 -11
- package/dist/{customer-portal.d-ChSEioI5.d.ts → customer-portal.d-C7ZCbjiY.d.ts} +605 -11
- package/dist/email-settings-YJ4X5VFU.cjs +7 -0
- package/dist/email-settings-YUK3DXFJ.js +7 -0
- package/dist/{email-settings-runtime-EGIJ2AVQ.js → email-settings-runtime-BXRZV4M5.js} +1 -1
- package/dist/{email-settings-runtime-WGVLI7N6.cjs → email-settings-runtime-FWJQBQBK.cjs} +2 -2
- package/dist/{email-settings.d-B7Q_xT25.d.cts → email-settings.d-UJ0C3jPI.d.cts} +108 -9
- package/dist/{email-settings.d-B7Q_xT25.d.ts → email-settings.d-UJ0C3jPI.d.ts} +108 -9
- package/dist/event-catalog-37B6JC7G.js +7 -0
- package/dist/event-catalog-5JBHJJ2I.cjs +7 -0
- package/dist/{event-catalog-runtime-5HQSAJVX.cjs → event-catalog-runtime-B2BPKQVG.cjs} +2 -2
- package/dist/{event-catalog-runtime-6FA3SCRI.js → event-catalog-runtime-N262TQ3Y.js} +1 -1
- package/dist/{event-catalog.d-ENw6HO-w.d.cts → event-catalog.d-mQJLSYUo.d.cts} +351 -6
- package/dist/{event-catalog.d-ENw6HO-w.d.ts → event-catalog.d-mQJLSYUo.d.ts} +351 -6
- package/dist/file-P2FUUER2.js +7 -0
- package/dist/file-XTY74SIX.cjs +7 -0
- package/dist/file-runtime-24S3QPA7.cjs +5 -0
- package/dist/{file-runtime-B6AAGZQF.js → file-runtime-BIRMXYRH.js} +1 -1
- package/dist/{file.d-DcTJxjp7.d.cts → file.d-DTlrbI40.d.cts} +2336 -19
- package/dist/{file.d-DcTJxjp7.d.ts → file.d-DTlrbI40.d.ts} +2336 -19
- package/dist/index.cjs +16 -16
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +5 -5
- package/dist/{js-yaml-DLCVPJ7G.js → js-yaml-UPZKYVRY.js} +15 -17
- package/dist/{webhooks-XLBUXXCS.js → webhooks-NZHJBT64.js} +1 -1
- package/dist/{webhooks-NZ3TM3AY.cjs → webhooks-SK2STDKR.cjs} +1 -1
- package/dist/{webhooks.d-D79qib9f.d.cts → webhooks.d-ByePoUWs.d.cts} +40 -4
- package/dist/{webhooks.d-D79qib9f.d.ts → webhooks.d-ByePoUWs.d.ts} +40 -4
- package/docs/customer-portal.md +417 -51
- package/docs/email-settings.md +67 -3
- package/docs/event-catalog.md +247 -1
- package/docs/file.md +101 -2
- package/docs/webhooks.md +3 -1
- package/package.json +1 -1
- package/dist/chunk-4W22EIRF.cjs +0 -14
- package/dist/chunk-5OBMZHRL.cjs +0 -14
- package/dist/chunk-E2WMGOM5.js +0 -14
- package/dist/chunk-EFWPEVXI.js +0 -14
- package/dist/chunk-KEI3GHDY.cjs +0 -14
- package/dist/chunk-Z6HGUGXK.js +0 -14
- package/dist/customer-portal-5I7ZGQDU.cjs +0 -7
- package/dist/customer-portal-YL2YMPZL.js +0 -7
- package/dist/email-settings-CKFJU4WZ.js +0 -7
- package/dist/email-settings-NQJJKS2P.cjs +0 -7
- package/dist/event-catalog-C45ISVMP.cjs +0 -7
- package/dist/event-catalog-D7VJ7WRS.js +0 -7
- package/dist/file-UOWBTDIU.cjs +0 -7
- package/dist/file-XSN3NAVZ.js +0 -7
- package/dist/file-runtime-SFZIKODF.cjs +0 -5
package/dist/index.cjs
CHANGED
|
@@ -57,10 +57,10 @@ var _chunkKP7H52BFcjs = require('./chunk-KP7H52BF.cjs');
|
|
|
57
57
|
var _chunkWQBBB6BNcjs = require('./chunk-WQBBB6BN.cjs');
|
|
58
58
|
|
|
59
59
|
|
|
60
|
-
var
|
|
60
|
+
var _chunkCBDKPGO5cjs = require('./chunk-CBDKPGO5.cjs');
|
|
61
61
|
|
|
62
62
|
|
|
63
|
-
var
|
|
63
|
+
var _chunkOPXGJKZRcjs = require('./chunk-OPXGJKZR.cjs');
|
|
64
64
|
|
|
65
65
|
|
|
66
66
|
var _chunkYO4M3BZLcjs = require('./chunk-YO4M3BZL.cjs');
|
|
@@ -90,7 +90,7 @@ var _chunkEIIIKDOJcjs = require('./chunk-EIIIKDOJ.cjs');
|
|
|
90
90
|
var _chunkM56QQHVAcjs = require('./chunk-M56QQHVA.cjs');
|
|
91
91
|
|
|
92
92
|
|
|
93
|
-
var
|
|
93
|
+
var _chunkYI5YGTAHcjs = require('./chunk-YI5YGTAH.cjs');
|
|
94
94
|
|
|
95
95
|
|
|
96
96
|
var _chunkK2UZPY6Ucjs = require('./chunk-K2UZPY6U.cjs');
|
|
@@ -120,7 +120,7 @@ var _chunkZSONBZIFcjs = require('./chunk-ZSONBZIF.cjs');
|
|
|
120
120
|
var _chunkBM6NCHPLcjs = require('./chunk-BM6NCHPL.cjs');
|
|
121
121
|
|
|
122
122
|
|
|
123
|
-
var
|
|
123
|
+
var _chunkKJPOUJBUcjs = require('./chunk-KJPOUJBU.cjs');
|
|
124
124
|
|
|
125
125
|
|
|
126
126
|
var _chunkM2UDF7PYcjs = require('./chunk-M2UDF7PY.cjs');
|
|
@@ -155,7 +155,7 @@ var _chunkDVM27A7Ecjs = require('./chunk-DVM27A7E.cjs');
|
|
|
155
155
|
|
|
156
156
|
|
|
157
157
|
|
|
158
|
-
var
|
|
158
|
+
var _chunkR7XDTILZcjs = require('./chunk-R7XDTILZ.cjs');
|
|
159
159
|
|
|
160
160
|
|
|
161
161
|
var _chunkNJK5F5TFcjs = require('./chunk-NJK5F5TF.cjs');
|
|
@@ -222,7 +222,7 @@ var resolveClient = (params) => {
|
|
|
222
222
|
}
|
|
223
223
|
if (!entry.instance) {
|
|
224
224
|
const definition = entry.loader();
|
|
225
|
-
entry.instance =
|
|
225
|
+
entry.instance = _chunkR7XDTILZcjs.createApiClient.call(void 0, {
|
|
226
226
|
definition,
|
|
227
227
|
token: state.token,
|
|
228
228
|
headers: state.globalHeaders,
|
|
@@ -255,7 +255,7 @@ var resetAllClients = (registry) => {
|
|
|
255
255
|
};
|
|
256
256
|
|
|
257
257
|
// src/apis/_registry.ts
|
|
258
|
-
var expandDef = (mod) =>
|
|
258
|
+
var expandDef = (mod) => _chunkR7XDTILZcjs.expand.call(void 0, _nullishCoalesce(mod.default, () => ( mod)));
|
|
259
259
|
var registerBuiltinApis = (registry) => {
|
|
260
260
|
registerApi({
|
|
261
261
|
registry,
|
|
@@ -320,7 +320,7 @@ var registerBuiltinApis = (registry) => {
|
|
|
320
320
|
registerApi({
|
|
321
321
|
registry,
|
|
322
322
|
name: "customerPortal",
|
|
323
|
-
loader: () => expandDef(
|
|
323
|
+
loader: () => expandDef(_chunkKJPOUJBUcjs.require_customer_portal_runtime.call(void 0, ))
|
|
324
324
|
});
|
|
325
325
|
registerApi({
|
|
326
326
|
registry,
|
|
@@ -350,7 +350,7 @@ var registerBuiltinApis = (registry) => {
|
|
|
350
350
|
registerApi({
|
|
351
351
|
registry,
|
|
352
352
|
name: "emailSettings",
|
|
353
|
-
loader: () => expandDef(
|
|
353
|
+
loader: () => expandDef(_chunkYI5YGTAHcjs.require_email_settings_runtime.call(void 0, ))
|
|
354
354
|
});
|
|
355
355
|
registerApi({
|
|
356
356
|
registry,
|
|
@@ -375,12 +375,12 @@ var registerBuiltinApis = (registry) => {
|
|
|
375
375
|
registerApi({
|
|
376
376
|
registry,
|
|
377
377
|
name: "eventCatalog",
|
|
378
|
-
loader: () => expandDef(
|
|
378
|
+
loader: () => expandDef(_chunkCBDKPGO5cjs.require_event_catalog_runtime.call(void 0, ))
|
|
379
379
|
});
|
|
380
380
|
registerApi({
|
|
381
381
|
registry,
|
|
382
382
|
name: "file",
|
|
383
|
-
loader: () => expandDef(
|
|
383
|
+
loader: () => expandDef(_chunkOPXGJKZRcjs.require_file_runtime.call(void 0, ))
|
|
384
384
|
});
|
|
385
385
|
registerApi({
|
|
386
386
|
registry,
|
|
@@ -593,9 +593,9 @@ var createSDK = () => {
|
|
|
593
593
|
const available = [...registry.keys()].join(", ");
|
|
594
594
|
throw new Error(`Unknown API: "${name}". Available: ${available}`);
|
|
595
595
|
}
|
|
596
|
-
return
|
|
596
|
+
return _chunkR7XDTILZcjs.createApiHandle.call(void 0, {
|
|
597
597
|
resolveClient: () => resolveClient({ registry, name, state }),
|
|
598
|
-
createClient: () =>
|
|
598
|
+
createClient: () => _chunkR7XDTILZcjs.createApiClient.call(void 0, { definition: entry.loader(), apiName: name }),
|
|
599
599
|
apiName: name
|
|
600
600
|
});
|
|
601
601
|
};
|
|
@@ -643,9 +643,9 @@ var createSDK = () => {
|
|
|
643
643
|
return interceptorUse;
|
|
644
644
|
}
|
|
645
645
|
case "help":
|
|
646
|
-
return (apiName) =>
|
|
646
|
+
return (apiName) => _chunkR7XDTILZcjs.help.call(void 0, apiName);
|
|
647
647
|
case "openapi":
|
|
648
|
-
return (apiName) =>
|
|
648
|
+
return (apiName) => _chunkR7XDTILZcjs.openapi.call(void 0, apiName);
|
|
649
649
|
case "then":
|
|
650
650
|
case "catch":
|
|
651
651
|
case "finally":
|
|
@@ -675,4 +675,4 @@ var epilot = createSDK();
|
|
|
675
675
|
|
|
676
676
|
|
|
677
677
|
|
|
678
|
-
exports.applyLargeResponseInterceptor = applyLargeResponseInterceptor; exports.applyRetryInterceptor = applyRetryInterceptor; exports.authorize =
|
|
678
|
+
exports.applyLargeResponseInterceptor = applyLargeResponseInterceptor; exports.applyRetryInterceptor = applyRetryInterceptor; exports.authorize = _chunkR7XDTILZcjs.authorize; exports.createSDK = createSDK; exports.epilot = epilot; exports.help = _chunkR7XDTILZcjs.help; exports.openapi = _chunkR7XDTILZcjs.openapi;
|
package/dist/index.d.cts
CHANGED
|
@@ -15,19 +15,19 @@ import { C as Client$8 } from './blueprint-manifest.d-BPyzoR0X.cjs';
|
|
|
15
15
|
import { C as Client$9 } from './calendar.d-BEjLDagH.cjs';
|
|
16
16
|
import { C as Client$a } from './configuration-hub.d-Cqaq2F-W.cjs';
|
|
17
17
|
import { C as Client$b } from './consent.d-C2PROHhX.cjs';
|
|
18
|
-
import { C as Client$c } from './customer-portal.d-
|
|
18
|
+
import { C as Client$c } from './customer-portal.d-C7ZCbjiY.cjs';
|
|
19
19
|
import { C as Client$d } from './dashboard.d-CsGcA74I.cjs';
|
|
20
20
|
import { C as Client$e } from './data-governance.d-BbZ466j5.cjs';
|
|
21
21
|
import { C as Client$f } from './deduplication.d-D5GYddVu.cjs';
|
|
22
22
|
import { C as Client$g } from './design.d-BRre8iLg.cjs';
|
|
23
23
|
import { C as Client$h } from './document.d-DN37pjdx.cjs';
|
|
24
|
-
import { C as Client$i } from './email-settings.d-
|
|
24
|
+
import { C as Client$i } from './email-settings.d-UJ0C3jPI.cjs';
|
|
25
25
|
import { C as Client$j } from './email-template.d-gtQkdaXM.cjs';
|
|
26
26
|
import { C as Client$k } from './entity.d-fospShiN.cjs';
|
|
27
27
|
import { C as Client$l } from './entity-mapping.d-DKSW3sfy.cjs';
|
|
28
28
|
import { C as Client$m } from './environments.d-BvqvN-PD.cjs';
|
|
29
|
-
import { C as Client$n } from './event-catalog.d-
|
|
30
|
-
import { C as Client$o } from './file.d-
|
|
29
|
+
import { C as Client$n } from './event-catalog.d-mQJLSYUo.cjs';
|
|
30
|
+
import { C as Client$o } from './file.d-DTlrbI40.cjs';
|
|
31
31
|
import { C as Client$p } from './iban.d-BwdiGbxi.cjs';
|
|
32
32
|
import { C as Client$q } from './integration-toolkit.d-BstNqiJb.cjs';
|
|
33
33
|
import { C as Client$r } from './journey.d-ClXO0xK8.cjs';
|
|
@@ -50,7 +50,7 @@ import { C as Client$H } from './targeting.d-BNmcVsNS.cjs';
|
|
|
50
50
|
import { C as Client$I } from './template-variables.d-Ble9TSBa.cjs';
|
|
51
51
|
import { C as Client$J } from './user.d-D18fe97W.cjs';
|
|
52
52
|
import { C as Client$K } from './validation-rules.d-Db5c5zTf.cjs';
|
|
53
|
-
import { C as Client$L } from './webhooks.d-
|
|
53
|
+
import { C as Client$L } from './webhooks.d-ByePoUWs.cjs';
|
|
54
54
|
import { C as Client$M } from './workflow.d-CMSKt8oN.cjs';
|
|
55
55
|
import { C as Client$N } from './workflow-definition.d-DOeb0KVV.cjs';
|
|
56
56
|
|
package/dist/index.d.ts
CHANGED
|
@@ -15,19 +15,19 @@ import { C as Client$8 } from './blueprint-manifest.d-BPyzoR0X.js';
|
|
|
15
15
|
import { C as Client$9 } from './calendar.d-BEjLDagH.js';
|
|
16
16
|
import { C as Client$a } from './configuration-hub.d-Cqaq2F-W.js';
|
|
17
17
|
import { C as Client$b } from './consent.d-C2PROHhX.js';
|
|
18
|
-
import { C as Client$c } from './customer-portal.d-
|
|
18
|
+
import { C as Client$c } from './customer-portal.d-C7ZCbjiY.js';
|
|
19
19
|
import { C as Client$d } from './dashboard.d-CsGcA74I.js';
|
|
20
20
|
import { C as Client$e } from './data-governance.d-BbZ466j5.js';
|
|
21
21
|
import { C as Client$f } from './deduplication.d-D5GYddVu.js';
|
|
22
22
|
import { C as Client$g } from './design.d-BRre8iLg.js';
|
|
23
23
|
import { C as Client$h } from './document.d-DN37pjdx.js';
|
|
24
|
-
import { C as Client$i } from './email-settings.d-
|
|
24
|
+
import { C as Client$i } from './email-settings.d-UJ0C3jPI.js';
|
|
25
25
|
import { C as Client$j } from './email-template.d-gtQkdaXM.js';
|
|
26
26
|
import { C as Client$k } from './entity.d-fospShiN.js';
|
|
27
27
|
import { C as Client$l } from './entity-mapping.d-DKSW3sfy.js';
|
|
28
28
|
import { C as Client$m } from './environments.d-BvqvN-PD.js';
|
|
29
|
-
import { C as Client$n } from './event-catalog.d-
|
|
30
|
-
import { C as Client$o } from './file.d-
|
|
29
|
+
import { C as Client$n } from './event-catalog.d-mQJLSYUo.js';
|
|
30
|
+
import { C as Client$o } from './file.d-DTlrbI40.js';
|
|
31
31
|
import { C as Client$p } from './iban.d-BwdiGbxi.js';
|
|
32
32
|
import { C as Client$q } from './integration-toolkit.d-BstNqiJb.js';
|
|
33
33
|
import { C as Client$r } from './journey.d-ClXO0xK8.js';
|
|
@@ -50,7 +50,7 @@ import { C as Client$H } from './targeting.d-BNmcVsNS.js';
|
|
|
50
50
|
import { C as Client$I } from './template-variables.d-Ble9TSBa.js';
|
|
51
51
|
import { C as Client$J } from './user.d-D18fe97W.js';
|
|
52
52
|
import { C as Client$K } from './validation-rules.d-Db5c5zTf.js';
|
|
53
|
-
import { C as Client$L } from './webhooks.d-
|
|
53
|
+
import { C as Client$L } from './webhooks.d-ByePoUWs.js';
|
|
54
54
|
import { C as Client$M } from './workflow.d-CMSKt8oN.js';
|
|
55
55
|
import { C as Client$N } from './workflow-definition.d-DOeb0KVV.js';
|
|
56
56
|
|
package/dist/index.js
CHANGED
|
@@ -57,10 +57,10 @@ import {
|
|
|
57
57
|
} from "./chunk-D7Q4JGN7.js";
|
|
58
58
|
import {
|
|
59
59
|
require_event_catalog_runtime
|
|
60
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-OCMIXJWC.js";
|
|
61
61
|
import {
|
|
62
62
|
require_file_runtime
|
|
63
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-3APTSPY4.js";
|
|
64
64
|
import {
|
|
65
65
|
require_iban_runtime
|
|
66
66
|
} from "./chunk-5MFHAXBT.js";
|
|
@@ -90,7 +90,7 @@ import {
|
|
|
90
90
|
} from "./chunk-75EI2Q64.js";
|
|
91
91
|
import {
|
|
92
92
|
require_email_settings_runtime
|
|
93
|
-
} from "./chunk-
|
|
93
|
+
} from "./chunk-KCPVNRDL.js";
|
|
94
94
|
import {
|
|
95
95
|
require_email_template_runtime
|
|
96
96
|
} from "./chunk-JJWJLY42.js";
|
|
@@ -120,7 +120,7 @@ import {
|
|
|
120
120
|
} from "./chunk-2BPBDRRO.js";
|
|
121
121
|
import {
|
|
122
122
|
require_customer_portal_runtime
|
|
123
|
-
} from "./chunk-
|
|
123
|
+
} from "./chunk-PTEJYAYJ.js";
|
|
124
124
|
import {
|
|
125
125
|
require_dashboard_runtime
|
|
126
126
|
} from "./chunk-SZMCMLOQ.js";
|
|
@@ -155,7 +155,7 @@ import {
|
|
|
155
155
|
expand,
|
|
156
156
|
help,
|
|
157
157
|
openapi
|
|
158
|
-
} from "./chunk-
|
|
158
|
+
} from "./chunk-SCMAZ73K.js";
|
|
159
159
|
import {
|
|
160
160
|
__require
|
|
161
161
|
} from "./chunk-YPSWSI3M.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
// ../../node_modules
|
|
3
|
+
// ../../node_modules/js-yaml/dist/js-yaml.mjs
|
|
4
4
|
function isNothing(subject) {
|
|
5
5
|
return typeof subject === "undefined" || subject === null;
|
|
6
6
|
}
|
|
@@ -864,18 +864,6 @@ function charFromCodepoint(c) {
|
|
|
864
864
|
(c - 65536 & 1023) + 56320
|
|
865
865
|
);
|
|
866
866
|
}
|
|
867
|
-
function setProperty(object, key, value) {
|
|
868
|
-
if (key === "__proto__") {
|
|
869
|
-
Object.defineProperty(object, key, {
|
|
870
|
-
configurable: true,
|
|
871
|
-
enumerable: true,
|
|
872
|
-
writable: true,
|
|
873
|
-
value
|
|
874
|
-
});
|
|
875
|
-
} else {
|
|
876
|
-
object[key] = value;
|
|
877
|
-
}
|
|
878
|
-
}
|
|
879
867
|
var simpleEscapeCheck = new Array(256);
|
|
880
868
|
var simpleEscapeMap = new Array(256);
|
|
881
869
|
for (i = 0; i < 256; i++) {
|
|
@@ -995,7 +983,7 @@ function mergeMappings(state, destination, source, overridableKeys) {
|
|
|
995
983
|
for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) {
|
|
996
984
|
key = sourceKeys[index];
|
|
997
985
|
if (!_hasOwnProperty$1.call(destination, key)) {
|
|
998
|
-
|
|
986
|
+
destination[key] = source[key];
|
|
999
987
|
overridableKeys[key] = true;
|
|
1000
988
|
}
|
|
1001
989
|
}
|
|
@@ -1035,7 +1023,16 @@ function storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valu
|
|
|
1035
1023
|
state.position = startPos || state.position;
|
|
1036
1024
|
throwError(state, "duplicated mapping key");
|
|
1037
1025
|
}
|
|
1038
|
-
|
|
1026
|
+
if (keyNode === "__proto__") {
|
|
1027
|
+
Object.defineProperty(_result, keyNode, {
|
|
1028
|
+
configurable: true,
|
|
1029
|
+
enumerable: true,
|
|
1030
|
+
writable: true,
|
|
1031
|
+
value: valueNode
|
|
1032
|
+
});
|
|
1033
|
+
} else {
|
|
1034
|
+
_result[keyNode] = valueNode;
|
|
1035
|
+
}
|
|
1039
1036
|
delete overridableKeys[keyNode];
|
|
1040
1037
|
}
|
|
1041
1038
|
return _result;
|
|
@@ -2623,6 +2620,7 @@ var jsYaml = {
|
|
|
2623
2620
|
safeLoadAll,
|
|
2624
2621
|
safeDump
|
|
2625
2622
|
};
|
|
2623
|
+
var js_yaml_default = jsYaml;
|
|
2626
2624
|
export {
|
|
2627
2625
|
CORE_SCHEMA,
|
|
2628
2626
|
DEFAULT_SCHEMA,
|
|
@@ -2631,7 +2629,7 @@ export {
|
|
|
2631
2629
|
Schema,
|
|
2632
2630
|
Type,
|
|
2633
2631
|
YAMLException,
|
|
2634
|
-
|
|
2632
|
+
js_yaml_default as default,
|
|
2635
2633
|
dump,
|
|
2636
2634
|
load,
|
|
2637
2635
|
loadAll,
|
|
@@ -2643,5 +2641,5 @@ export {
|
|
|
2643
2641
|
/*! Bundled license information:
|
|
2644
2642
|
|
|
2645
2643
|
js-yaml/dist/js-yaml.mjs:
|
|
2646
|
-
(*! js-yaml 4.1.
|
|
2644
|
+
(*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT *)
|
|
2647
2645
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./chunk-YPSWSI3M.js";
|
|
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- [`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 },\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}\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 configId: \'example\',\n eventId: \'example\',\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 }\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 }>\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 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 metadataFieldName?: string\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}\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### `BatchReplayRequest`\n\n```ts\ntype BatchReplayRequest = {\n eventIds: string[]\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- [`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 },\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}\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 configId: \'example\',\n eventId: \'example\',\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 }\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 }>\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 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 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}\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### `BatchReplayRequest`\n\n```ts\ntype BatchReplayRequest = {\n eventIds: string[]\n}\n```\n';
|
|
5
5
|
export {
|
|
6
6
|
webhooks_default as default
|
|
7
7
|
};
|
|
@@ -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- [`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 },\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}\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 configId: \'example\',\n eventId: \'example\',\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 }\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 }>\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 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 metadataFieldName?: string\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}\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### `BatchReplayRequest`\n\n```ts\ntype BatchReplayRequest = {\n eventIds: string[]\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- [`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 },\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}\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 configId: \'example\',\n eventId: \'example\',\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 }\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 }>\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 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 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}\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### `BatchReplayRequest`\n\n```ts\ntype BatchReplayRequest = {\n eventIds: string[]\n}\n```\n';
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
exports.default = webhooks_default;
|
|
@@ -566,17 +566,53 @@ declare namespace Components {
|
|
|
566
566
|
*/
|
|
567
567
|
deliveryMode?: "json_base64" | "binary_multipart";
|
|
568
568
|
/**
|
|
569
|
-
* Configuration for binary_multipart delivery mode.
|
|
569
|
+
* Configuration for `binary_multipart` delivery mode. Describes the
|
|
570
|
+
* shape of the multipart/form-data body the receiver expects — pick
|
|
571
|
+
* the attachment(s) via a JSONata expression and add scalar form
|
|
572
|
+
* parts on the side.
|
|
573
|
+
*
|
|
570
574
|
*/
|
|
571
575
|
multipartConfig?: {
|
|
572
576
|
/**
|
|
573
|
-
*
|
|
577
|
+
* Name of the binary form part(s). Default `"file"`. The same
|
|
578
|
+
* name is reused when `fileFieldStrategy="multi"` produces
|
|
579
|
+
* multiple file parts.
|
|
580
|
+
*
|
|
574
581
|
*/
|
|
575
582
|
fileFieldName?: string;
|
|
576
583
|
/**
|
|
577
|
-
*
|
|
584
|
+
* Assertion on the picker result. `single` (default) fails the
|
|
585
|
+
* delivery when `fileSource` resolves to more than one
|
|
586
|
+
* attachment. `multi` accepts any non-empty count.
|
|
587
|
+
*
|
|
588
|
+
*/
|
|
589
|
+
fileFieldStrategy?: "single" | "multi";
|
|
590
|
+
/**
|
|
591
|
+
* JSONata expression evaluated against the event payload that
|
|
592
|
+
* picks the attachment(s) to send. Default `"event_attachments"`
|
|
593
|
+
* (all attachments). When the result is `undefined`, `null`, or
|
|
594
|
+
* an empty array, the event is silently skipped (no HTTP
|
|
595
|
+
* request, no error notification). Validated for syntax at
|
|
596
|
+
* config-save time.
|
|
597
|
+
*
|
|
578
598
|
*/
|
|
579
|
-
|
|
599
|
+
fileSource?: string;
|
|
600
|
+
/**
|
|
601
|
+
* Map of `formFieldName → JSONata expression`. Each value is
|
|
602
|
+
* evaluated against the event payload, then passed through
|
|
603
|
+
* env-resolution (same as `custom_headers`). Static literals
|
|
604
|
+
* must be JSONata-quoted: a bare `"business_partner"` is
|
|
605
|
+
* treated as a path lookup and yields `undefined`; for a
|
|
606
|
+
* literal value, single-quote inside the JSON string:
|
|
607
|
+
* `"'business_partner'"`. Expressions yielding `undefined` or
|
|
608
|
+
* `null` silently omit the field. Object/array results are
|
|
609
|
+
* JSON-stringified before being appended. Values are not part
|
|
610
|
+
* of the signed payload.
|
|
611
|
+
*
|
|
612
|
+
*/
|
|
613
|
+
extraFields?: {
|
|
614
|
+
[name: string]: string;
|
|
615
|
+
};
|
|
580
616
|
};
|
|
581
617
|
filterConditions?: /* A group of conditions with a logical operator. Multiple conditions are AND-ed by default. */ WebhookConditionGroup;
|
|
582
618
|
/**
|