@epilot/sdk 2.20.22 → 2.20.23
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/automation-runtime.json +1 -1
- package/definitions/automation.json +207 -2
- package/dist/README-7F36AG5O.js +7 -0
- package/dist/README-I7JMAFA4.cjs +7 -0
- 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 +8 -8
- package/dist/apis/automation.d.cts +2 -2
- package/dist/apis/automation.d.ts +2 -2
- package/dist/apis/automation.js +2 -2
- 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/chat.cjs +6 -6
- package/dist/apis/chat.js +1 -1
- package/dist/apis/configuration-hub.cjs +6 -6
- package/dist/apis/configuration-hub.js +1 -1
- package/dist/apis/consent.cjs +6 -6
- package/dist/apis/consent.js +1 -1
- package/dist/apis/customer-portal.cjs +6 -6
- package/dist/apis/customer-portal.js +1 -1
- package/dist/apis/dashboard.cjs +6 -6
- package/dist/apis/dashboard.js +1 -1
- package/dist/apis/data-governance.cjs +6 -6
- package/dist/apis/data-governance.js +1 -1
- package/dist/apis/deduplication.cjs +6 -6
- package/dist/apis/deduplication.js +1 -1
- package/dist/apis/design.cjs +6 -6
- package/dist/apis/design.js +1 -1
- package/dist/apis/document.cjs +6 -6
- package/dist/apis/document.js +1 -1
- package/dist/apis/email-settings.cjs +6 -6
- package/dist/apis/email-settings.js +1 -1
- package/dist/apis/email-template.cjs +6 -6
- package/dist/apis/email-template.js +1 -1
- package/dist/apis/entity-mapping.cjs +6 -6
- package/dist/apis/entity-mapping.js +1 -1
- package/dist/apis/entity.cjs +6 -6
- package/dist/apis/entity.js +1 -1
- package/dist/apis/environments.cjs +6 -6
- package/dist/apis/environments.js +1 -1
- package/dist/apis/event-catalog.cjs +6 -6
- package/dist/apis/event-catalog.js +1 -1
- package/dist/apis/file.cjs +6 -6
- package/dist/apis/file.js +1 -1
- package/dist/apis/iban.cjs +6 -6
- package/dist/apis/iban.js +1 -1
- package/dist/apis/integration-toolkit.cjs +6 -6
- package/dist/apis/integration-toolkit.js +1 -1
- package/dist/apis/journey.cjs +6 -6
- package/dist/apis/journey.js +1 -1
- package/dist/apis/kanban.cjs +6 -6
- package/dist/apis/kanban.js +1 -1
- package/dist/apis/message.cjs +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/snapshot.cjs +6 -6
- package/dist/apis/snapshot.js +1 -1
- package/dist/apis/submission.cjs +6 -6
- package/dist/apis/submission.js +1 -1
- package/dist/apis/target.cjs +6 -6
- package/dist/apis/target.js +1 -1
- package/dist/apis/targeting.cjs +6 -6
- package/dist/apis/targeting.js +1 -1
- package/dist/apis/template-variables.cjs +6 -6
- package/dist/apis/template-variables.js +1 -1
- package/dist/apis/user.cjs +6 -6
- package/dist/apis/user.js +1 -1
- package/dist/apis/validation-rules.cjs +6 -6
- package/dist/apis/validation-rules.js +1 -1
- package/dist/apis/webhooks.cjs +6 -6
- package/dist/apis/webhooks.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/automation-CDMOEYVP.cjs +7 -0
- package/dist/automation-XFMSH7Y3.js +7 -0
- package/dist/{automation-runtime-RM5EOZH2.cjs → automation-runtime-KLCXZKEC.cjs} +2 -2
- package/dist/{automation-runtime-ORW5BVCD.js → automation-runtime-Y52HM57N.js} +1 -1
- package/dist/{automation.d-Bp45eKlU.d.cts → automation.d-2biAmiMc.d.cts} +214 -6
- package/dist/{automation.d-Bp45eKlU.d.ts → automation.d-2biAmiMc.d.ts} +214 -6
- package/dist/{chunk-R6RAUX3Z.js → chunk-KZXOYL5D.js} +3 -3
- package/dist/chunk-QW3ROE6H.js +14 -0
- package/dist/chunk-WOUASZJW.cjs +14 -0
- package/dist/{chunk-4GR5MDWN.cjs → chunk-YCTBOY3T.cjs} +3 -3
- package/dist/index.cjs +10 -10
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/docs/automation.md +99 -17
- package/package.json +1 -1
- package/dist/README-NBWAQWQS.js +0 -7
- package/dist/README-XCIDDEAE.cjs +0 -7
- package/dist/automation-FTFGFHT7.cjs +0 -7
- package/dist/automation-HJGT6QK5.js +0 -7
- package/dist/chunk-ADSWGLIV.cjs +0 -14
- package/dist/chunk-LCE7N4ZL.js +0 -14
|
@@ -27,7 +27,7 @@ var authorize = (client, token) => {
|
|
|
27
27
|
|
|
28
28
|
// import("./docs/**/*") in src/help.ts
|
|
29
29
|
var globImport_docs = __glob({
|
|
30
|
-
"./docs/README.json": () => import("./README-
|
|
30
|
+
"./docs/README.json": () => import("./README-7F36AG5O.js"),
|
|
31
31
|
"./docs/_index.json": () => import("./_index-6FK4PV6Y.js"),
|
|
32
32
|
"./docs/access-token.json": () => import("./access-token-ADVHFJ63.js"),
|
|
33
33
|
"./docs/address-suggestions.json": () => import("./address-suggestions-74244BAJ.js"),
|
|
@@ -35,7 +35,7 @@ var globImport_docs = __glob({
|
|
|
35
35
|
"./docs/ai-agents.json": () => import("./ai-agents-MY4QE4CP.js"),
|
|
36
36
|
"./docs/app.json": () => import("./app-B3TAEVS4.js"),
|
|
37
37
|
"./docs/audit-logs.json": () => import("./audit-logs-5VXHOQ7S.js"),
|
|
38
|
-
"./docs/automation.json": () => import("./automation-
|
|
38
|
+
"./docs/automation.json": () => import("./automation-XFMSH7Y3.js"),
|
|
39
39
|
"./docs/billing.json": () => import("./billing-UJ6I7FPG.js"),
|
|
40
40
|
"./docs/blueprint-manifest.json": () => import("./blueprint-manifest-YU2UZLHV.js"),
|
|
41
41
|
"./docs/calendar.json": () => import("./calendar-2H4RGMV3.js"),
|
|
@@ -113,7 +113,7 @@ var globImport_definitions_json = __glob({
|
|
|
113
113
|
"./definitions/app.json": () => import("./app-VJW2KKWE.js"),
|
|
114
114
|
"./definitions/audit-logs-runtime.json": () => import("./audit-logs-runtime-76R6WRAB.js"),
|
|
115
115
|
"./definitions/audit-logs.json": () => import("./audit-logs-F2NHDISQ.js"),
|
|
116
|
-
"./definitions/automation-runtime.json": () => import("./automation-runtime-
|
|
116
|
+
"./definitions/automation-runtime.json": () => import("./automation-runtime-Y52HM57N.js"),
|
|
117
117
|
"./definitions/automation.json": () => import("./automation-WEVRW77F.js"),
|
|
118
118
|
"./definitions/billing-runtime.json": () => import("./billing-runtime-OSGDEA63.js"),
|
|
119
119
|
"./definitions/billing.json": () => import("./billing-ASWY7HC3.js"),
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__commonJS
|
|
3
|
+
} from "./chunk-YPSWSI3M.js";
|
|
4
|
+
|
|
5
|
+
// src/definitions/automation-runtime.json
|
|
6
|
+
var require_automation_runtime = __commonJS({
|
|
7
|
+
"src/definitions/automation-runtime.json"(exports, module) {
|
|
8
|
+
module.exports = { s: "https://automation.sls.epilot.io", o: [["searchFlows", "get", "/v1/automation/flows", [["schema", "q"], ["size", "q"], ["from", "q"], ["trigger_source_id", "q"], ["target_workflow", "q"], ["trigger_event_name", "q"], ["include_flows", "q"]]], ["createFlow", "post", "/v1/automation/flows", null, 1], ["batchGetFlows", "post", "/v1/automation/flows:batchGet", null, 1], ["getFlow", "get", "/v1/automation/flows/{flow_id}", [["flow_id", "p", true]]], ["putFlow", "put", "/v1/automation/flows/{flow_id}", [["flow_id", "p", true]], 1], ["deleteFlow", "delete", "/v1/automation/flows/{flow_id}", [["flow_id", "p", true]]], ["getExecutions", "get", "/v1/automation/executions", [["entity_id", "q"], ["size", "q"], ["from", "q"], ["include_flows", "q"]]], ["startExecution", "post", "/v1/automation/executions", null, 1], ["searchExecutions", "post", "/v1/automation/executions:search", null, 1], ["bulkTriggerExecutions", "post", "/v1/automation/executions/bulk-jobs", null, 1], ["getBulkJob", "get", "/v1/automation/executions/bulk-jobs/{job_id}", [["job_id", "p", true]]], ["patchBulkJob", "patch", "/v1/automation/executions/bulk-jobs/{job_id}", [["job_id", "p", true]], 1], ["getExecution", "get", "/v1/automation/executions/{execution_id}", [["execution_id", "p", true]]], ["cancelExecution", "delete", "/v1/automation/executions/{execution_id}", [["execution_id", "p", true]]], ["retriggerAction", "post", "/v1/automation/executions/{execution_id}/{action_id}/retrigger", [["execution_id", "p", true], ["action_id", "p", true]], 1], ["resumeExecutionWithToken", "post", "/v1/automation/public/executions:resume", null, 1], ["cancelSchedule", "delete", "/v1/automation/executions/{execution_id}/schedules/{schedule_id}", [["execution_id", "p", true], ["schedule_id", "p", true]]]], v: "3.0.3" };
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
export {
|
|
13
|
+
require_automation_runtime
|
|
14
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkNJK5F5TFcjs = require('./chunk-NJK5F5TF.cjs');
|
|
4
|
+
|
|
5
|
+
// src/definitions/automation-runtime.json
|
|
6
|
+
var require_automation_runtime = _chunkNJK5F5TFcjs.__commonJS.call(void 0, {
|
|
7
|
+
"src/definitions/automation-runtime.json"(exports, module) {
|
|
8
|
+
module.exports = { s: "https://automation.sls.epilot.io", o: [["searchFlows", "get", "/v1/automation/flows", [["schema", "q"], ["size", "q"], ["from", "q"], ["trigger_source_id", "q"], ["target_workflow", "q"], ["trigger_event_name", "q"], ["include_flows", "q"]]], ["createFlow", "post", "/v1/automation/flows", null, 1], ["batchGetFlows", "post", "/v1/automation/flows:batchGet", null, 1], ["getFlow", "get", "/v1/automation/flows/{flow_id}", [["flow_id", "p", true]]], ["putFlow", "put", "/v1/automation/flows/{flow_id}", [["flow_id", "p", true]], 1], ["deleteFlow", "delete", "/v1/automation/flows/{flow_id}", [["flow_id", "p", true]]], ["getExecutions", "get", "/v1/automation/executions", [["entity_id", "q"], ["size", "q"], ["from", "q"], ["include_flows", "q"]]], ["startExecution", "post", "/v1/automation/executions", null, 1], ["searchExecutions", "post", "/v1/automation/executions:search", null, 1], ["bulkTriggerExecutions", "post", "/v1/automation/executions/bulk-jobs", null, 1], ["getBulkJob", "get", "/v1/automation/executions/bulk-jobs/{job_id}", [["job_id", "p", true]]], ["patchBulkJob", "patch", "/v1/automation/executions/bulk-jobs/{job_id}", [["job_id", "p", true]], 1], ["getExecution", "get", "/v1/automation/executions/{execution_id}", [["execution_id", "p", true]]], ["cancelExecution", "delete", "/v1/automation/executions/{execution_id}", [["execution_id", "p", true]]], ["retriggerAction", "post", "/v1/automation/executions/{execution_id}/{action_id}/retrigger", [["execution_id", "p", true], ["action_id", "p", true]], 1], ["resumeExecutionWithToken", "post", "/v1/automation/public/executions:resume", null, 1], ["cancelSchedule", "delete", "/v1/automation/executions/{execution_id}/schedules/{schedule_id}", [["execution_id", "p", true], ["schedule_id", "p", true]]]], v: "3.0.3" };
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
exports.require_automation_runtime = require_automation_runtime;
|
|
@@ -27,7 +27,7 @@ var authorize = (client, token) => {
|
|
|
27
27
|
|
|
28
28
|
// import("./docs/**/*") in src/help.ts
|
|
29
29
|
var globImport_docs = _chunkNJK5F5TFcjs.__glob.call(void 0, {
|
|
30
|
-
"./docs/README.json": () => Promise.resolve().then(() => _interopRequireWildcard(require("./README-
|
|
30
|
+
"./docs/README.json": () => Promise.resolve().then(() => _interopRequireWildcard(require("./README-I7JMAFA4.cjs"))),
|
|
31
31
|
"./docs/_index.json": () => Promise.resolve().then(() => _interopRequireWildcard(require("./_index-655GNTWT.cjs"))),
|
|
32
32
|
"./docs/access-token.json": () => Promise.resolve().then(() => _interopRequireWildcard(require("./access-token-CQMYWZIG.cjs"))),
|
|
33
33
|
"./docs/address-suggestions.json": () => Promise.resolve().then(() => _interopRequireWildcard(require("./address-suggestions-IUQMYF27.cjs"))),
|
|
@@ -35,7 +35,7 @@ var globImport_docs = _chunkNJK5F5TFcjs.__glob.call(void 0, {
|
|
|
35
35
|
"./docs/ai-agents.json": () => Promise.resolve().then(() => _interopRequireWildcard(require("./ai-agents-ME5VRKMY.cjs"))),
|
|
36
36
|
"./docs/app.json": () => Promise.resolve().then(() => _interopRequireWildcard(require("./app-C5H6RLZ5.cjs"))),
|
|
37
37
|
"./docs/audit-logs.json": () => Promise.resolve().then(() => _interopRequireWildcard(require("./audit-logs-D2LFUA2R.cjs"))),
|
|
38
|
-
"./docs/automation.json": () => Promise.resolve().then(() => _interopRequireWildcard(require("./automation-
|
|
38
|
+
"./docs/automation.json": () => Promise.resolve().then(() => _interopRequireWildcard(require("./automation-CDMOEYVP.cjs"))),
|
|
39
39
|
"./docs/billing.json": () => Promise.resolve().then(() => _interopRequireWildcard(require("./billing-CKCFSK6K.cjs"))),
|
|
40
40
|
"./docs/blueprint-manifest.json": () => Promise.resolve().then(() => _interopRequireWildcard(require("./blueprint-manifest-SXG3M6B4.cjs"))),
|
|
41
41
|
"./docs/calendar.json": () => Promise.resolve().then(() => _interopRequireWildcard(require("./calendar-UADWQX7G.cjs"))),
|
|
@@ -113,7 +113,7 @@ var globImport_definitions_json = _chunkNJK5F5TFcjs.__glob.call(void 0, {
|
|
|
113
113
|
"./definitions/app.json": () => Promise.resolve().then(() => _interopRequireWildcard(require("./app-5VPBDFW2.cjs"))),
|
|
114
114
|
"./definitions/audit-logs-runtime.json": () => Promise.resolve().then(() => _interopRequireWildcard(require("./audit-logs-runtime-4WMHPWNX.cjs"))),
|
|
115
115
|
"./definitions/audit-logs.json": () => Promise.resolve().then(() => _interopRequireWildcard(require("./audit-logs-RFEMBILB.cjs"))),
|
|
116
|
-
"./definitions/automation-runtime.json": () => Promise.resolve().then(() => _interopRequireWildcard(require("./automation-runtime-
|
|
116
|
+
"./definitions/automation-runtime.json": () => Promise.resolve().then(() => _interopRequireWildcard(require("./automation-runtime-KLCXZKEC.cjs"))),
|
|
117
117
|
"./definitions/automation.json": () => Promise.resolve().then(() => _interopRequireWildcard(require("./automation-HZASSUCS.cjs"))),
|
|
118
118
|
"./definitions/billing-runtime.json": () => Promise.resolve().then(() => _interopRequireWildcard(require("./billing-runtime-YZEHKRAZ.cjs"))),
|
|
119
119
|
"./definitions/billing.json": () => Promise.resolve().then(() => _interopRequireWildcard(require("./billing-3VZPNG6M.cjs"))),
|
package/dist/index.cjs
CHANGED
|
@@ -153,7 +153,7 @@ var _chunkN2P6RELZcjs = require('./chunk-N2P6RELZ.cjs');
|
|
|
153
153
|
var _chunkRUZRPIHWcjs = require('./chunk-RUZRPIHW.cjs');
|
|
154
154
|
|
|
155
155
|
|
|
156
|
-
var
|
|
156
|
+
var _chunkWOUASZJWcjs = require('./chunk-WOUASZJW.cjs');
|
|
157
157
|
|
|
158
158
|
|
|
159
159
|
|
|
@@ -161,7 +161,7 @@ var _chunkADSWGLIVcjs = require('./chunk-ADSWGLIV.cjs');
|
|
|
161
161
|
|
|
162
162
|
|
|
163
163
|
|
|
164
|
-
var
|
|
164
|
+
var _chunkYCTBOY3Tcjs = require('./chunk-YCTBOY3T.cjs');
|
|
165
165
|
|
|
166
166
|
|
|
167
167
|
var _chunkNJK5F5TFcjs = require('./chunk-NJK5F5TF.cjs');
|
|
@@ -228,7 +228,7 @@ var resolveClient = (params) => {
|
|
|
228
228
|
}
|
|
229
229
|
if (!entry.instance) {
|
|
230
230
|
const definition = entry.loader();
|
|
231
|
-
entry.instance =
|
|
231
|
+
entry.instance = _chunkYCTBOY3Tcjs.createApiClient.call(void 0, {
|
|
232
232
|
definition,
|
|
233
233
|
token: state.token,
|
|
234
234
|
headers: state.globalHeaders,
|
|
@@ -261,7 +261,7 @@ var resetAllClients = (registry) => {
|
|
|
261
261
|
};
|
|
262
262
|
|
|
263
263
|
// src/apis/_registry.ts
|
|
264
|
-
var expandDef = (mod) =>
|
|
264
|
+
var expandDef = (mod) => _chunkYCTBOY3Tcjs.expand.call(void 0, _nullishCoalesce(mod.default, () => ( mod)));
|
|
265
265
|
var registerBuiltinApis = (registry) => {
|
|
266
266
|
registerApi({
|
|
267
267
|
registry,
|
|
@@ -296,7 +296,7 @@ var registerBuiltinApis = (registry) => {
|
|
|
296
296
|
registerApi({
|
|
297
297
|
registry,
|
|
298
298
|
name: "automation",
|
|
299
|
-
loader: () => expandDef(
|
|
299
|
+
loader: () => expandDef(_chunkWOUASZJWcjs.require_automation_runtime.call(void 0, ))
|
|
300
300
|
});
|
|
301
301
|
registerApi({
|
|
302
302
|
registry,
|
|
@@ -609,9 +609,9 @@ var createSDK = () => {
|
|
|
609
609
|
const available = [...registry.keys()].join(", ");
|
|
610
610
|
throw new Error(`Unknown API: "${name}". Available: ${available}`);
|
|
611
611
|
}
|
|
612
|
-
return
|
|
612
|
+
return _chunkYCTBOY3Tcjs.createApiHandle.call(void 0, {
|
|
613
613
|
resolveClient: () => resolveClient({ registry, name, state }),
|
|
614
|
-
createClient: () =>
|
|
614
|
+
createClient: () => _chunkYCTBOY3Tcjs.createApiClient.call(void 0, { definition: entry.loader(), apiName: name }),
|
|
615
615
|
apiName: name
|
|
616
616
|
});
|
|
617
617
|
};
|
|
@@ -659,9 +659,9 @@ var createSDK = () => {
|
|
|
659
659
|
return interceptorUse;
|
|
660
660
|
}
|
|
661
661
|
case "help":
|
|
662
|
-
return (apiName) =>
|
|
662
|
+
return (apiName) => _chunkYCTBOY3Tcjs.help.call(void 0, apiName);
|
|
663
663
|
case "openapi":
|
|
664
|
-
return (apiName) =>
|
|
664
|
+
return (apiName) => _chunkYCTBOY3Tcjs.openapi.call(void 0, apiName);
|
|
665
665
|
case "then":
|
|
666
666
|
case "catch":
|
|
667
667
|
case "finally":
|
|
@@ -691,4 +691,4 @@ var epilot = createSDK();
|
|
|
691
691
|
|
|
692
692
|
|
|
693
693
|
|
|
694
|
-
exports.applyLargeResponseInterceptor = applyLargeResponseInterceptor; exports.applyRetryInterceptor = applyRetryInterceptor; exports.authorize =
|
|
694
|
+
exports.applyLargeResponseInterceptor = applyLargeResponseInterceptor; exports.applyRetryInterceptor = applyRetryInterceptor; exports.authorize = _chunkYCTBOY3Tcjs.authorize; exports.createSDK = createSDK; exports.epilot = epilot; exports.help = _chunkYCTBOY3Tcjs.help; exports.openapi = _chunkYCTBOY3Tcjs.openapi;
|
package/dist/index.d.cts
CHANGED
|
@@ -9,7 +9,7 @@ import { C as Client$2 } from './address-suggestions.d-_YwTOR-9.cjs';
|
|
|
9
9
|
import { C as Client$3 } from './ai-agents.d-B3TkP4mo.cjs';
|
|
10
10
|
import { C as Client$4 } from './app.d-CqXqNLxq.cjs';
|
|
11
11
|
import { C as Client$5 } from './audit-logs.d-BRToFqeX.cjs';
|
|
12
|
-
import { C as Client$6 } from './automation.d-
|
|
12
|
+
import { C as Client$6 } from './automation.d-2biAmiMc.cjs';
|
|
13
13
|
import { C as Client$7 } from './billing.d-DA3sViEF.cjs';
|
|
14
14
|
import { C as Client$8 } from './blueprint-manifest.d-B8YKYzSJ.cjs';
|
|
15
15
|
import { C as Client$9 } from './calendar.d-mk-ltGpk.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ import { C as Client$2 } from './address-suggestions.d-_YwTOR-9.js';
|
|
|
9
9
|
import { C as Client$3 } from './ai-agents.d-B3TkP4mo.js';
|
|
10
10
|
import { C as Client$4 } from './app.d-CqXqNLxq.js';
|
|
11
11
|
import { C as Client$5 } from './audit-logs.d-BRToFqeX.js';
|
|
12
|
-
import { C as Client$6 } from './automation.d-
|
|
12
|
+
import { C as Client$6 } from './automation.d-2biAmiMc.js';
|
|
13
13
|
import { C as Client$7 } from './billing.d-DA3sViEF.js';
|
|
14
14
|
import { C as Client$8 } from './blueprint-manifest.d-B8YKYzSJ.js';
|
|
15
15
|
import { C as Client$9 } from './calendar.d-mk-ltGpk.js';
|
package/dist/index.js
CHANGED
|
@@ -153,7 +153,7 @@ import {
|
|
|
153
153
|
} from "./chunk-RELUU5QZ.js";
|
|
154
154
|
import {
|
|
155
155
|
require_automation_runtime
|
|
156
|
-
} from "./chunk-
|
|
156
|
+
} from "./chunk-QW3ROE6H.js";
|
|
157
157
|
import {
|
|
158
158
|
authorize,
|
|
159
159
|
createApiClient,
|
|
@@ -161,7 +161,7 @@ import {
|
|
|
161
161
|
expand,
|
|
162
162
|
help,
|
|
163
163
|
openapi
|
|
164
|
-
} from "./chunk-
|
|
164
|
+
} from "./chunk-KZXOYL5D.js";
|
|
165
165
|
import {
|
|
166
166
|
__require
|
|
167
167
|
} from "./chunk-YPSWSI3M.js";
|
package/docs/automation.md
CHANGED
|
@@ -146,6 +146,8 @@ const { data } = await automationClient.searchFlows(...)
|
|
|
146
146
|
- [`TriggerEventEntityActivity`](#triggerevententityactivity)
|
|
147
147
|
- [`TriggerEventMessaging`](#triggereventmessaging)
|
|
148
148
|
- [`TriggerEventEntityOperation`](#triggerevententityoperation)
|
|
149
|
+
- [`TriggerEventEventCatalog`](#triggereventeventcatalog)
|
|
150
|
+
- [`TriggerEventPayloadRef`](#triggereventpayloadref)
|
|
149
151
|
- [`ApiCallerContext`](#apicallercontext)
|
|
150
152
|
- [`ExecutionStatus`](#executionstatus)
|
|
151
153
|
- [`GetExecutionsResp`](#getexecutionsresp)
|
|
@@ -175,6 +177,7 @@ const { data } = await automationClient.searchFlows(...)
|
|
|
175
177
|
- [`EntitySearchFilter`](#entitysearchfilter)
|
|
176
178
|
- [`EntitySearchFilterValue`](#entitysearchfiltervalue)
|
|
177
179
|
- [`EntityManualTrigger`](#entitymanualtrigger)
|
|
180
|
+
- [`EventCatalogTrigger`](#eventcatalogtrigger)
|
|
178
181
|
- [`TriggerCondition`](#triggercondition)
|
|
179
182
|
- [`Comparison`](#comparison)
|
|
180
183
|
- [`FilterConditionOnEvent`](#filterconditiononevent)
|
|
@@ -210,6 +213,7 @@ const { data } = await client.searchFlows({
|
|
|
210
213
|
from: 1,
|
|
211
214
|
trigger_source_id: 'example',
|
|
212
215
|
target_workflow: 'example',
|
|
216
|
+
trigger_event_name: 'example',
|
|
213
217
|
include_flows: true,
|
|
214
218
|
})
|
|
215
219
|
```
|
|
@@ -506,6 +510,7 @@ const { data } = await client.startExecution(
|
|
|
506
510
|
"id": "loop_contracts",
|
|
507
511
|
"source_path": "submission.steps[0]['Contracts']",
|
|
508
512
|
"source_type": "journey-multi-select",
|
|
513
|
+
"filter_tags": ["_hidden_ 2a4b1c3d-0000-4000-8000-000000000000 - Dokumente"],
|
|
509
514
|
"length": 0
|
|
510
515
|
}
|
|
511
516
|
],
|
|
@@ -879,6 +884,7 @@ const { data } = await client.getExecution({
|
|
|
879
884
|
"id": "loop_contracts",
|
|
880
885
|
"source_path": "submission.steps[0]['Contracts']",
|
|
881
886
|
"source_type": "journey-multi-select",
|
|
887
|
+
"filter_tags": ["_hidden_ 2a4b1c3d-0000-4000-8000-000000000000 - Dokumente"],
|
|
882
888
|
"length": 0
|
|
883
889
|
}
|
|
884
890
|
],
|
|
@@ -1030,6 +1036,7 @@ const { data } = await client.cancelExecution({
|
|
|
1030
1036
|
"id": "loop_contracts",
|
|
1031
1037
|
"source_path": "submission.steps[0]['Contracts']",
|
|
1032
1038
|
"source_type": "journey-multi-select",
|
|
1039
|
+
"filter_tags": ["_hidden_ 2a4b1c3d-0000-4000-8000-000000000000 - Dokumente"],
|
|
1033
1040
|
"length": 0
|
|
1034
1041
|
}
|
|
1035
1042
|
],
|
|
@@ -1316,6 +1323,16 @@ type AutomationFlow = {
|
|
|
1316
1323
|
configuration?: {
|
|
1317
1324
|
journey_id?: { ... }
|
|
1318
1325
|
}
|
|
1326
|
+
} | {
|
|
1327
|
+
id?: string // uuid
|
|
1328
|
+
type: "event_catalog"
|
|
1329
|
+
configuration: {
|
|
1330
|
+
event_name: { ... }
|
|
1331
|
+
event_version: { ... }
|
|
1332
|
+
entity_node_id: { ... }
|
|
1333
|
+
entity_schema: { ... }
|
|
1334
|
+
ignore_automation_triggered?: { ... }
|
|
1335
|
+
}
|
|
1319
1336
|
}>
|
|
1320
1337
|
trigger_conditions?: Array<{
|
|
1321
1338
|
source: string
|
|
@@ -1336,16 +1353,6 @@ type AutomationFlow = {
|
|
|
1336
1353
|
allow_failure?: boolean
|
|
1337
1354
|
statements?: Array<{
|
|
1338
1355
|
id?: { ... }
|
|
1339
|
-
source?: { ... }
|
|
1340
|
-
operation?: { ... }
|
|
1341
|
-
values?: { ... }
|
|
1342
|
-
}>
|
|
1343
|
-
}>
|
|
1344
|
-
schedules?: Array<{
|
|
1345
|
-
id: string
|
|
1346
|
-
scheduleApiId?: string
|
|
1347
|
-
numberOfUnits?: number
|
|
1348
|
-
timePeriod?: "minutes" | "hours" | "days" | "weeks" | "months"
|
|
1349
1356
|
// ...
|
|
1350
1357
|
}
|
|
1351
1358
|
```
|
|
@@ -1408,6 +1415,10 @@ type SearchAutomationsResp = {
|
|
|
1408
1415
|
id?: { ... }
|
|
1409
1416
|
type: { ... }
|
|
1410
1417
|
configuration?: { ... }
|
|
1418
|
+
} | {
|
|
1419
|
+
id?: { ... }
|
|
1420
|
+
type: { ... }
|
|
1421
|
+
configuration: { ... }
|
|
1411
1422
|
}>
|
|
1412
1423
|
trigger_conditions?: Array<{
|
|
1413
1424
|
source: { ... }
|
|
@@ -1436,6 +1447,7 @@ type SearchAutomationsResp = {
|
|
|
1436
1447
|
id: { ... }
|
|
1437
1448
|
source_path: { ... }
|
|
1438
1449
|
source_type?: { ... }
|
|
1450
|
+
filter_tags?: { ... }
|
|
1439
1451
|
length?: { ... }
|
|
1440
1452
|
}>
|
|
1441
1453
|
actions: Array<{
|
|
@@ -1456,11 +1468,6 @@ type SearchAutomationsResp = {
|
|
|
1456
1468
|
} | {
|
|
1457
1469
|
type?: { ... }
|
|
1458
1470
|
config?: { ... }
|
|
1459
|
-
} | {
|
|
1460
|
-
type?: { ... }
|
|
1461
|
-
config?: { ... }
|
|
1462
|
-
} | {
|
|
1463
|
-
type?: { ... }
|
|
1464
1471
|
// ...
|
|
1465
1472
|
}
|
|
1466
1473
|
```
|
|
@@ -1536,6 +1543,16 @@ type AnyTrigger = {
|
|
|
1536
1543
|
configuration?: {
|
|
1537
1544
|
journey_id?: string // uuid
|
|
1538
1545
|
}
|
|
1546
|
+
} | {
|
|
1547
|
+
id?: string // uuid
|
|
1548
|
+
type: "event_catalog"
|
|
1549
|
+
configuration: {
|
|
1550
|
+
event_name: string
|
|
1551
|
+
event_version: string
|
|
1552
|
+
entity_node_id: string
|
|
1553
|
+
entity_schema: string
|
|
1554
|
+
ignore_automation_triggered?: boolean
|
|
1555
|
+
}
|
|
1539
1556
|
}
|
|
1540
1557
|
```
|
|
1541
1558
|
|
|
@@ -1783,7 +1800,8 @@ A loop scope on an automation flow.
|
|
|
1783
1800
|
type AutomationLoop = {
|
|
1784
1801
|
id: string
|
|
1785
1802
|
source_path: string
|
|
1786
|
-
source_type?: "journey-multi-select" | "previous-action-outputs" | "entity-relation"
|
|
1803
|
+
source_type?: "journey-multi-select" | "journey-file-upload" | "previous-action-outputs" | "entity-relation"
|
|
1804
|
+
filter_tags?: string[]
|
|
1787
1805
|
length?: number
|
|
1788
1806
|
}
|
|
1789
1807
|
```
|
|
@@ -2598,6 +2616,9 @@ type AssignEntityConfig = {
|
|
|
2598
2616
|
attribute?: string
|
|
2599
2617
|
values?: string[]
|
|
2600
2618
|
}
|
|
2619
|
+
match_user_skills?: boolean
|
|
2620
|
+
required_skill_categories?: string[]
|
|
2621
|
+
skill_match_mode?: "require_all" | "prefer"
|
|
2601
2622
|
fallback?: "leave_unassigned" | "assign_to_fallback"
|
|
2602
2623
|
fallback_assignees?: Array<{
|
|
2603
2624
|
type: "user" | "partner_user" | "partner_organization" | "group"
|
|
@@ -2651,6 +2672,9 @@ type AssignEntityActionConfig = {
|
|
|
2651
2672
|
attribute?: { ... }
|
|
2652
2673
|
values?: { ... }
|
|
2653
2674
|
}
|
|
2675
|
+
match_user_skills?: boolean
|
|
2676
|
+
required_skill_categories?: string[]
|
|
2677
|
+
skill_match_mode?: "require_all" | "prefer"
|
|
2654
2678
|
fallback?: "leave_unassigned" | "assign_to_fallback"
|
|
2655
2679
|
fallback_assignees?: Array<{
|
|
2656
2680
|
type: { ... }
|
|
@@ -2712,6 +2736,9 @@ type AssignEntityAction = {
|
|
|
2712
2736
|
attribute?: { ... }
|
|
2713
2737
|
values?: { ... }
|
|
2714
2738
|
}
|
|
2739
|
+
match_user_skills?: boolean
|
|
2740
|
+
required_skill_categories?: string[]
|
|
2741
|
+
skill_match_mode?: "require_all" | "prefer"
|
|
2715
2742
|
fallback?: "leave_unassigned" | "assign_to_fallback"
|
|
2716
2743
|
fallback_assignees?: Array<{
|
|
2717
2744
|
type: { ... }
|
|
@@ -3395,7 +3422,7 @@ type ConditionStatement = {
|
|
|
3395
3422
|
source?: {
|
|
3396
3423
|
id?: string
|
|
3397
3424
|
origin?: "trigger" | "action"
|
|
3398
|
-
originType?: "entity" | "workflow" | "journey_block"
|
|
3425
|
+
originType?: "entity" | "workflow" | "journey_block" | "event"
|
|
3399
3426
|
schema?: string
|
|
3400
3427
|
attribute?: string
|
|
3401
3428
|
attributeType?: "string" | "text" | "number" | "boolean" | "date" | "datetime" | "tags" | "country" | "email" | "phone" | "product" | "price" | "status" | "relation" | "multiselect" | "select" | "radio" | "relation_user" | "purpose" | "label" | "payment" | "relation_payment_method"
|
|
@@ -3717,6 +3744,42 @@ type TriggerEventEntityOperation = {
|
|
|
3717
3744
|
}
|
|
3718
3745
|
```
|
|
3719
3746
|
|
|
3747
|
+
### `TriggerEventEventCatalog`
|
|
3748
|
+
|
|
3749
|
+
Set on executions started by an Event Catalog event (see EventCatalogTrigger). The full event payload is not stored inline (it may be up to 256 KB) but by reference in `payload_ref`; automation workers hydrate it before every action.
|
|
3750
|
+
|
|
3751
|
+
|
|
3752
|
+
```ts
|
|
3753
|
+
type TriggerEventEventCatalog = {
|
|
3754
|
+
type: "event_catalog"
|
|
3755
|
+
org_id: string
|
|
3756
|
+
entity_id: string
|
|
3757
|
+
entity_node_id: string
|
|
3758
|
+
event_id: string
|
|
3759
|
+
event_name: string
|
|
3760
|
+
event_version: string
|
|
3761
|
+
published_version?: string
|
|
3762
|
+
event_time?: string // date-time
|
|
3763
|
+
trigger_source_type?: string
|
|
3764
|
+
trigger_source?: string
|
|
3765
|
+
payload_ref?: {
|
|
3766
|
+
bucket: string
|
|
3767
|
+
key: string
|
|
3768
|
+
}
|
|
3769
|
+
}
|
|
3770
|
+
```
|
|
3771
|
+
|
|
3772
|
+
### `TriggerEventPayloadRef`
|
|
3773
|
+
|
|
3774
|
+
S3 reference to the stored trigger event payload (`_downgrades` stripped, downgraded to the pinned version)
|
|
3775
|
+
|
|
3776
|
+
```ts
|
|
3777
|
+
type TriggerEventPayloadRef = {
|
|
3778
|
+
bucket: string
|
|
3779
|
+
key: string
|
|
3780
|
+
}
|
|
3781
|
+
```
|
|
3782
|
+
|
|
3720
3783
|
### `ApiCallerContext`
|
|
3721
3784
|
|
|
3722
3785
|
```ts
|
|
@@ -4438,6 +4501,25 @@ type EntityManualTrigger = {
|
|
|
4438
4501
|
}
|
|
4439
4502
|
```
|
|
4440
4503
|
|
|
4504
|
+
### `EventCatalogTrigger`
|
|
4505
|
+
|
|
4506
|
+
Starts the flow when an Event Catalog event is published for the organization. The execution runs in the context of one entity from the event's entity graph (`entity_node_id`), and the event payload is available to conditions and actions as the `event` variable context.
|
|
4507
|
+
|
|
4508
|
+
|
|
4509
|
+
```ts
|
|
4510
|
+
type EventCatalogTrigger = {
|
|
4511
|
+
id?: string // uuid
|
|
4512
|
+
type: "event_catalog"
|
|
4513
|
+
configuration: {
|
|
4514
|
+
event_name: string
|
|
4515
|
+
event_version: string
|
|
4516
|
+
entity_node_id: string
|
|
4517
|
+
entity_schema: string
|
|
4518
|
+
ignore_automation_triggered?: boolean
|
|
4519
|
+
}
|
|
4520
|
+
}
|
|
4521
|
+
```
|
|
4522
|
+
|
|
4441
4523
|
### `TriggerCondition`
|
|
4442
4524
|
|
|
4443
4525
|
```ts
|
package/package.json
CHANGED
package/dist/README-NBWAQWQS.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import "./chunk-YPSWSI3M.js";
|
|
2
|
-
|
|
3
|
-
// src/docs/README.json
|
|
4
|
-
var README_default = "<h1 align=\"center\"><img alt=\"epilot\" src=\"https://raw.githubusercontent.com/epilot-dev/sdk-js/main/logo.png\" width=\"200\"><br>@epilot/sdk</h1>\n\n<p align=\"center\">\n <a href=\"https://github.com/epilot-dev/sdk-js/actions?query=workflow%3ACI\"><img src=\"https://github.com/epilot-dev/sdk-js/workflows/CI/badge.svg\" alt=\"CI\"></a>\n <a href=\"https://www.npmjs.com/package/@epilot/sdk\"><img src=\"https://img.shields.io/npm/v/@epilot/sdk.svg\" alt=\"npm version\"></a>\n <a href=\"https://github.com/epilot-dev/sdk-js/blob/main/\"><img src=\"http://img.shields.io/:license-mit-blue.svg\" alt=\"License\"></a>\n</p>\n\n<p align=\"center\">JavaScript/TypeScript SDK for epilot APIs. Full types, tree-shakeable imports, and lazy-loaded OpenAPI specs.</p>\n\n## Install\n\n```bash\nnpm i @epilot/sdk axios openapi-client-axios\n```\n\n## Quick Start\n\n```ts\nimport { epilot } from '@epilot/sdk'\n\nepilot.authorize(() => '<my-bearer-token>')\n\nconst { data: entity } = await epilot.entity.createEntity(\n { slug: 'contact' },\n { first_name: 'John', last_name: 'Doe' },\n)\n\nconst { data: file } = await epilot.file.getFile({ id: 'file-123' })\n\nconst { data: executions } = await epilot.workflow.getExecutions()\n```\n\nAPI clients are built on [openapi-client-axios](https://openapistack.co/docs/openapi-client-axios/intro/), which generates fully typed operation methods on top of regular [axios](https://axios-http.com/docs/intro) instances. All standard axios features (interceptors, defaults, config) work as expected. Each operation is forwarded to a lazy singleton \u2014 the spec is loaded and the client initialized on first use, then cached.\n\nFull API documentation: [https://docs.epilot.io/api](https://docs.epilot.io/api)\n\n## API Reference\n\n<!-- api-reference-table -->\n| API | Import | Docs |\n| --- | ------ | ---- |\n| `epilot.accessToken` | `@epilot/sdk/access-token` | [docs](./docs/access-token.md) |\n| `epilot.address` | `@epilot/sdk/address` | [docs](./docs/address.md) |\n| `epilot.addressSuggestions` | `@epilot/sdk/address-suggestions` | [docs](./docs/address-suggestions.md) |\n| `epilot.aiAgents` | `@epilot/sdk/ai-agents` | [docs](./docs/ai-agents.md) |\n| `epilot.app` | `@epilot/sdk/app` | [docs](./docs/app.md) |\n| `epilot.auditLogs` | `@epilot/sdk/audit-logs` | [docs](./docs/audit-logs.md) |\n| `epilot.automation` | `@epilot/sdk/automation` | [docs](./docs/automation.md) |\n| `epilot.billing` | `@epilot/sdk/billing` | [docs](./docs/billing.md) |\n| `epilot.blueprintManifest` | `@epilot/sdk/blueprint-manifest` | [docs](./docs/blueprint-manifest.md) |\n| `epilot.calendar` | `@epilot/sdk/calendar` | [docs](./docs/calendar.md) |\n| `epilot.configurationHub` | `@epilot/sdk/configuration-hub` | [docs](./docs/configuration-hub.md) |\n| `epilot.consent` | `@epilot/sdk/consent` | [docs](./docs/consent.md) |\n| `epilot.customerPortal` | `@epilot/sdk/customer-portal` | [docs](./docs/customer-portal.md) |\n| `epilot.dashboard` | `@epilot/sdk/dashboard` | [docs](./docs/dashboard.md) |\n| `epilot.dataGovernance` | `@epilot/sdk/data-governance` | [docs](./docs/data-governance.md) |\n| `epilot.deduplication` | `@epilot/sdk/deduplication` | [docs](./docs/deduplication.md) |\n| `epilot.design` | `@epilot/sdk/design` | [docs](./docs/design.md) |\n| `epilot.document` | `@epilot/sdk/document` | [docs](./docs/document.md) |\n| `epilot.emailSettings` | `@epilot/sdk/email-settings` | [docs](./docs/email-settings.md) |\n| `epilot.emailTemplate` | `@epilot/sdk/email-template` | [docs](./docs/email-template.md) |\n| `epilot.entity` | `@epilot/sdk/entity` | [docs](./docs/entity.md) |\n| `epilot.entityMapping` | `@epilot/sdk/entity-mapping` | [docs](./docs/entity-mapping.md) |\n| `epilot.environments` | `@epilot/sdk/environments` | [docs](./docs/environments.md) |\n| `epilot.eventCatalog` | `@epilot/sdk/event-catalog` | [docs](./docs/event-catalog.md) |\n| `epilot.file` | `@epilot/sdk/file` | [docs](./docs/file.md) |\n| `epilot.iban` | `@epilot/sdk/iban` | [docs](./docs/iban.md) |\n| `epilot.integrationToolkit` | `@epilot/sdk/integration-toolkit` | [docs](./docs/integration-toolkit.md) |\n| `epilot.journey` | `@epilot/sdk/journey` | [docs](./docs/journey.md) |\n| `epilot.kanban` | `@epilot/sdk/kanban` | [docs](./docs/kanban.md) |\n| `epilot.message` | `@epilot/sdk/message` | [docs](./docs/message.md) |\n| `epilot.metering` | `@epilot/sdk/metering` | [docs](./docs/metering.md) |\n| `epilot.notes` | `@epilot/sdk/notes` | [docs](./docs/notes.md) |\n| `epilot.notification` | `@epilot/sdk/notification` | [docs](./docs/notification.md) |\n| `epilot.organization` | `@epilot/sdk/organization` | [docs](./docs/organization.md) |\n| `epilot.partnerDirectory` | `@epilot/sdk/partner-directory` | [docs](./docs/partner-directory.md) |\n| `epilot.permissions` | `@epilot/sdk/permissions` | [docs](./docs/permissions.md) |\n| `epilot.pricing` | `@epilot/sdk/pricing` | [docs](./docs/pricing.md) |\n| `epilot.pricingTier` | `@epilot/sdk/pricing-tier` | [docs](./docs/pricing-tier.md) |\n| `epilot.purpose` | `@epilot/sdk/purpose` | [docs](./docs/purpose.md) |\n| `epilot.query` | `@epilot/sdk/query` | [docs](./docs/query.md) |\n| `epilot.sandbox` | `@epilot/sdk/sandbox` | [docs](./docs/sandbox.md) |\n| `epilot.sharing` | `@epilot/sdk/sharing` | [docs](./docs/sharing.md) |\n| `epilot.snapshot` | `@epilot/sdk/snapshot` | [docs](./docs/snapshot.md) |\n| `epilot.submission` | `@epilot/sdk/submission` | [docs](./docs/submission.md) |\n| `epilot.targeting` | `@epilot/sdk/targeting` | [docs](./docs/targeting.md) |\n| `epilot.templateVariables` | `@epilot/sdk/template-variables` | [docs](./docs/template-variables.md) |\n| `epilot.user` | `@epilot/sdk/user` | [docs](./docs/user.md) |\n| `epilot.validationRules` | `@epilot/sdk/validation-rules` | [docs](./docs/validation-rules.md) |\n| `epilot.webhooks` | `@epilot/sdk/webhooks` | [docs](./docs/webhooks.md) |\n| `epilot.workflow` | `@epilot/sdk/workflow` | [docs](./docs/workflow.md) |\n| `epilot.workflowDefinition` | `@epilot/sdk/workflow-definition` | [docs](./docs/workflow-definition.md) |\n<!-- /api-reference-table -->\n\n## OpenAPI Spec\n\nRetrieve the full OpenAPI specification for any API at runtime. The spec is lazy-loaded on first call and cached.\n\n```ts\nimport { epilot } from '@epilot/sdk'\n\n// Via API handle\nconst entitySpec = await epilot.entity.openapi()\nconsole.log(entitySpec.info.title) // \"Entity API\"\nconsole.log(entitySpec.paths) // all paths with full schemas\n\n// Via top-level method\nconst spec = await epilot.openapi('entity')\n```\n\nFor tree-shakeable imports:\n\n```ts\nimport { openapi } from '@epilot/sdk/entity'\n\nconst spec = await openapi()\n```\n\n## Explicit Client Access\n\n```ts\nimport { epilot } from '@epilot/sdk'\n\nepilot.authorize(() => '<my-token>')\n\n// Get the cached singleton client\nconst entityClient = epilot.entity.getClient()\nconst { data } = await entityClient.getEntity({ slug: 'contact', id: '123' })\n\n// Create a fresh (non-singleton) client instance\nconst freshClient = epilot.entity.createClient()\nauthorize(freshClient, () => '<my-token>')\n```\n\n## Tree-Shakeable Imports\n\nImport only what you need. Other APIs never touch your bundle.\n\n```ts\nimport { getClient, authorize } from '@epilot/sdk/entity'\n\nconst entityClient = getClient()\nauthorize(entityClient, () => '<my-token>')\n\nconst { data } = await entityClient.getEntity({ slug: 'contact', id: '123' })\n\n// Or use the handle for direct operation forwarding\nimport { entity } from '@epilot/sdk/entity'\nconst { data } = await entity.getEntity({ slug: 'contact', id: '123' })\n```\n\n## Types\n\nEach API subpath re-exports all schema types generated from the OpenAPI spec. Import them directly:\n\n```ts\nimport type { Entity, EntitySchema, RelationAttribute } from '@epilot/sdk/entity'\nimport type { FileItem } from '@epilot/sdk/file'\nimport type { AutomationFlow } from '@epilot/sdk/automation'\n```\n\nThe `Client`, `OperationMethods`, and `PathsDictionary` types are also available for typing client instances:\n\n```ts\nimport type { Client } from '@epilot/sdk/entity'\n\nconst entityClient: Client = epilot.entity.getClient()\n```\n\n## Headers\n\n### Global Headers\n\nSet default headers applied to all clients. Useful for `x-epilot-org-id`, `x-epilot-user-id`, etc.\n\n```ts\nimport { epilot } from '@epilot/sdk'\n\nepilot.authorize(() => '<my-token>')\nepilot.headers({\n 'x-epilot-org-id': 'org-123',\n 'x-epilot-user-id': 'user-456',\n})\n\nconst { data } = await epilot.entity.searchEntities(...)\n```\n\n### Standard Axios Headers\n\nUse standard axios `defaults.headers.common` on individual clients:\n\n```ts\nconst entityClient = epilot.entity.getClient()\nentityClient.defaults.headers.common['x-epilot-org-id'] = 'org-123'\n```\n\n## Auth Patterns\n\n`authorize()` accepts a string or a function. The function form is preferred \u2014 it is called on every request, so tokens stay fresh.\n\n```ts\nimport { authorize } from '@epilot/sdk'\nimport { getClient } from '@epilot/sdk/entity'\n\n// Per-client \u2014 function predicate (recommended)\nconst entityClient = getClient()\nauthorize(entityClient, () => '<my-token>')\n\n// Per-client \u2014 async function (e.g. OAuth / session)\nauthorize(entityClient, async () => {\n return await getTokenFromSession()\n})\n\n// Per-client \u2014 static string (sets default header once)\nauthorize(entityClient, 'my-static-api-token')\n```\n\n```ts\n// Global \u2014 applies to all clients resolved from the SDK\nimport { epilot } from '@epilot/sdk'\n\nepilot.authorize(() => '<my-token>')\nepilot.authorize(async () => await getTokenFromSession())\nepilot.authorize('my-static-api-token')\n```\n\n## Fresh Client Instance\n\n```ts\nimport { createClient, authorize } from '@epilot/sdk/entity'\n\nconst entityClient = createClient()\nauthorize(entityClient, () => '<my-token>')\nentityClient.defaults.headers.common['x-epilot-org-id'] = 'org-123'\n```\n\n## Multiple SDK Instances\n\n```ts\nimport { createSDK } from '@epilot/sdk'\n\nconst sdk1 = createSDK()\nsdk1.authorize(() => '<token-for-org-1>')\nsdk1.headers({ 'x-epilot-org-id': 'org-1' })\n\nconst sdk2 = createSDK()\nsdk2.authorize(() => '<token-for-org-2>')\nsdk2.headers({ 'x-epilot-org-id': 'org-2' })\n```\n\n\n## Interceptors\n\nUse axios interceptors for custom request/response processing. Since clients are axios instances, you can use `client.interceptors` directly:\n\n```ts\nentityClient.interceptors.response.use((response) => {\n console.debug(`${response.config.method?.toUpperCase()} ${response.config.url}`, {\n status: response.status,\n data: response.data,\n })\n return response\n})\n```\n\nOr register global interceptors applied to all clients:\n\n```ts\nepilot.interceptors.request((config) => {\n config.headers['x-correlation-id'] = generateTraceId()\n return config\n})\n```\n\n## Auto-Retry (429 Too Many Requests)\n\nThe SDK automatically retries requests that receive a `429 Too Many Requests` response. It respects the `Retry-After` header (in seconds) to determine how long to wait before retrying.\n\nEnabled by default with up to 3 retries.\n\n```ts\nimport { epilot } from '@epilot/sdk'\n\n// Customize retry behavior\nepilot.retry({ maxRetries: 5, defaultDelayMs: 2000 })\n\n// Disable retries\nepilot.retry({ maxRetries: 0 })\n```\n\n| Option | Default | Description |\n| --- | --- | --- |\n| `maxRetries` | `3` | Maximum number of retries. Set to `0` to disable. |\n| `defaultDelayMs` | `1000` | Fallback delay in ms when `Retry-After` header is missing. |\n\nFor individually imported clients (tree-shakeable imports), apply the interceptor manually:\n\n```ts\nimport { getClient, authorize } from '@epilot/sdk/entity'\nimport { applyRetryInterceptor } from '@epilot/sdk'\n\nconst entityClient = getClient()\nauthorize(entityClient, () => '<my-token>')\napplyRetryInterceptor({ client: entityClient, config: { maxRetries: 3 } })\n```\n\n## Large Response Handling (413 Payload Too Large)\n\nepilot APIs use a [large response middleware](https://github.com/epilot-dev/aws-lambda-utility-middlewares) to work around the AWS Lambda 6MB response limit. When a response exceeds ~5.1MB, the API uploads the payload to S3 and returns a presigned URL instead.\n\nThe SDK handles this transparently \u2014 it sends the opt-in `Accept` header and automatically fetches the full payload from S3 when a large response URL is returned. Enabled by default.\n\n```ts\nimport { epilot } from '@epilot/sdk'\n\n// Disable large response handling\nepilot.largeResponse({ enabled: false })\n```\n\nFor individually imported clients (tree-shakeable imports), apply the interceptor manually:\n\n```ts\nimport { getClient, authorize } from '@epilot/sdk/entity'\nimport { applyLargeResponseInterceptor } from '@epilot/sdk'\n\nconst entityClient = getClient()\nauthorize(entityClient, () => '<my-token>')\napplyLargeResponseInterceptor({ client: entityClient, config: { enabled: true } })\n```\n\n## Overrides & Custom APIs\n\nOverride built-in API specs or register custom APIs via `.epilot/sdk-overrides.json`. This is useful for testing new versions of an API spec or getting the latest types without waiting for an SDK release.\n\n```json\n{\n \"entity\": \"./specs/entity-openapi.json\",\n \"myNewApi\": \"./specs/my-new-api-openapi.json\"\n}\n```\n\n```ts\n// Built-in API with overridden spec\nconst { data } = await epilot.entity.getEntity({ slug: 'contact', id: '123' })\n```\n\n### Override Commands\n\n```bash\n# Apply all overrides from .epilot/sdk-overrides.json\nnpx epilot-sdk override\n\n# Override a single API\nnpx epilot-sdk override entity ./my-local-entity-spec.yaml\n\n# Regenerate types after spec changes\nnpx epilot-sdk typegen\n```\n\n<details>\n<summary>Migration from <code>@epilot/*-client</code></summary>\n\nDrop-in replacement \u2014 just change the import path:\n\n```ts\n// Before\nimport { getClient, createClient, authorize } from '@epilot/entity-client'\nimport type { Client, Entity } from '@epilot/entity-client'\n\n// After\nimport { getClient, createClient, authorize } from '@epilot/sdk/entity'\nimport type { Client, Entity } from '@epilot/sdk/entity'\n```\n\n</details>\n\n<details>\n<summary>Client Lifecycle</summary>\n\nWhen you call `authorize()`, `headers()`, `retry()`, `largeResponse()`, or `interceptors`, the SDK invalidates all cached client instances. The next operation call creates a fresh client with the updated configuration.\n\n**Operation methods are always up to date** \u2014 calls like `epilot.entity.getEntity(...)` re-resolve the client on every invocation, so they always use the latest config.\n\n**Direct `getClient()` references can go stale** \u2014 if you hold a reference and then change config, your reference still points to the old client:\n\n```ts\nconst entityClient = epilot.entity.getClient()\n\nepilot.authorize('new-token') // invalidates all cached clients\n\n// entityClient still has the old token\n// epilot.entity.getEntity(...) will use a new client with the new token\n```\n\nIf you need a long-lived reference that survives config changes, call `getClient()` again after changing config, or use operation methods directly.\n\n</details>\n";
|
|
5
|
-
export {
|
|
6
|
-
README_default as default
|
|
7
|
-
};
|
package/dist/README-XCIDDEAE.cjs
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-NJK5F5TF.cjs');
|
|
2
|
-
|
|
3
|
-
// src/docs/README.json
|
|
4
|
-
var README_default = "<h1 align=\"center\"><img alt=\"epilot\" src=\"https://raw.githubusercontent.com/epilot-dev/sdk-js/main/logo.png\" width=\"200\"><br>@epilot/sdk</h1>\n\n<p align=\"center\">\n <a href=\"https://github.com/epilot-dev/sdk-js/actions?query=workflow%3ACI\"><img src=\"https://github.com/epilot-dev/sdk-js/workflows/CI/badge.svg\" alt=\"CI\"></a>\n <a href=\"https://www.npmjs.com/package/@epilot/sdk\"><img src=\"https://img.shields.io/npm/v/@epilot/sdk.svg\" alt=\"npm version\"></a>\n <a href=\"https://github.com/epilot-dev/sdk-js/blob/main/\"><img src=\"http://img.shields.io/:license-mit-blue.svg\" alt=\"License\"></a>\n</p>\n\n<p align=\"center\">JavaScript/TypeScript SDK for epilot APIs. Full types, tree-shakeable imports, and lazy-loaded OpenAPI specs.</p>\n\n## Install\n\n```bash\nnpm i @epilot/sdk axios openapi-client-axios\n```\n\n## Quick Start\n\n```ts\nimport { epilot } from '@epilot/sdk'\n\nepilot.authorize(() => '<my-bearer-token>')\n\nconst { data: entity } = await epilot.entity.createEntity(\n { slug: 'contact' },\n { first_name: 'John', last_name: 'Doe' },\n)\n\nconst { data: file } = await epilot.file.getFile({ id: 'file-123' })\n\nconst { data: executions } = await epilot.workflow.getExecutions()\n```\n\nAPI clients are built on [openapi-client-axios](https://openapistack.co/docs/openapi-client-axios/intro/), which generates fully typed operation methods on top of regular [axios](https://axios-http.com/docs/intro) instances. All standard axios features (interceptors, defaults, config) work as expected. Each operation is forwarded to a lazy singleton \u2014 the spec is loaded and the client initialized on first use, then cached.\n\nFull API documentation: [https://docs.epilot.io/api](https://docs.epilot.io/api)\n\n## API Reference\n\n<!-- api-reference-table -->\n| API | Import | Docs |\n| --- | ------ | ---- |\n| `epilot.accessToken` | `@epilot/sdk/access-token` | [docs](./docs/access-token.md) |\n| `epilot.address` | `@epilot/sdk/address` | [docs](./docs/address.md) |\n| `epilot.addressSuggestions` | `@epilot/sdk/address-suggestions` | [docs](./docs/address-suggestions.md) |\n| `epilot.aiAgents` | `@epilot/sdk/ai-agents` | [docs](./docs/ai-agents.md) |\n| `epilot.app` | `@epilot/sdk/app` | [docs](./docs/app.md) |\n| `epilot.auditLogs` | `@epilot/sdk/audit-logs` | [docs](./docs/audit-logs.md) |\n| `epilot.automation` | `@epilot/sdk/automation` | [docs](./docs/automation.md) |\n| `epilot.billing` | `@epilot/sdk/billing` | [docs](./docs/billing.md) |\n| `epilot.blueprintManifest` | `@epilot/sdk/blueprint-manifest` | [docs](./docs/blueprint-manifest.md) |\n| `epilot.calendar` | `@epilot/sdk/calendar` | [docs](./docs/calendar.md) |\n| `epilot.configurationHub` | `@epilot/sdk/configuration-hub` | [docs](./docs/configuration-hub.md) |\n| `epilot.consent` | `@epilot/sdk/consent` | [docs](./docs/consent.md) |\n| `epilot.customerPortal` | `@epilot/sdk/customer-portal` | [docs](./docs/customer-portal.md) |\n| `epilot.dashboard` | `@epilot/sdk/dashboard` | [docs](./docs/dashboard.md) |\n| `epilot.dataGovernance` | `@epilot/sdk/data-governance` | [docs](./docs/data-governance.md) |\n| `epilot.deduplication` | `@epilot/sdk/deduplication` | [docs](./docs/deduplication.md) |\n| `epilot.design` | `@epilot/sdk/design` | [docs](./docs/design.md) |\n| `epilot.document` | `@epilot/sdk/document` | [docs](./docs/document.md) |\n| `epilot.emailSettings` | `@epilot/sdk/email-settings` | [docs](./docs/email-settings.md) |\n| `epilot.emailTemplate` | `@epilot/sdk/email-template` | [docs](./docs/email-template.md) |\n| `epilot.entity` | `@epilot/sdk/entity` | [docs](./docs/entity.md) |\n| `epilot.entityMapping` | `@epilot/sdk/entity-mapping` | [docs](./docs/entity-mapping.md) |\n| `epilot.environments` | `@epilot/sdk/environments` | [docs](./docs/environments.md) |\n| `epilot.eventCatalog` | `@epilot/sdk/event-catalog` | [docs](./docs/event-catalog.md) |\n| `epilot.file` | `@epilot/sdk/file` | [docs](./docs/file.md) |\n| `epilot.iban` | `@epilot/sdk/iban` | [docs](./docs/iban.md) |\n| `epilot.integrationToolkit` | `@epilot/sdk/integration-toolkit` | [docs](./docs/integration-toolkit.md) |\n| `epilot.journey` | `@epilot/sdk/journey` | [docs](./docs/journey.md) |\n| `epilot.kanban` | `@epilot/sdk/kanban` | [docs](./docs/kanban.md) |\n| `epilot.message` | `@epilot/sdk/message` | [docs](./docs/message.md) |\n| `epilot.metering` | `@epilot/sdk/metering` | [docs](./docs/metering.md) |\n| `epilot.notes` | `@epilot/sdk/notes` | [docs](./docs/notes.md) |\n| `epilot.notification` | `@epilot/sdk/notification` | [docs](./docs/notification.md) |\n| `epilot.organization` | `@epilot/sdk/organization` | [docs](./docs/organization.md) |\n| `epilot.partnerDirectory` | `@epilot/sdk/partner-directory` | [docs](./docs/partner-directory.md) |\n| `epilot.permissions` | `@epilot/sdk/permissions` | [docs](./docs/permissions.md) |\n| `epilot.pricing` | `@epilot/sdk/pricing` | [docs](./docs/pricing.md) |\n| `epilot.pricingTier` | `@epilot/sdk/pricing-tier` | [docs](./docs/pricing-tier.md) |\n| `epilot.purpose` | `@epilot/sdk/purpose` | [docs](./docs/purpose.md) |\n| `epilot.query` | `@epilot/sdk/query` | [docs](./docs/query.md) |\n| `epilot.sandbox` | `@epilot/sdk/sandbox` | [docs](./docs/sandbox.md) |\n| `epilot.sharing` | `@epilot/sdk/sharing` | [docs](./docs/sharing.md) |\n| `epilot.snapshot` | `@epilot/sdk/snapshot` | [docs](./docs/snapshot.md) |\n| `epilot.submission` | `@epilot/sdk/submission` | [docs](./docs/submission.md) |\n| `epilot.targeting` | `@epilot/sdk/targeting` | [docs](./docs/targeting.md) |\n| `epilot.templateVariables` | `@epilot/sdk/template-variables` | [docs](./docs/template-variables.md) |\n| `epilot.user` | `@epilot/sdk/user` | [docs](./docs/user.md) |\n| `epilot.validationRules` | `@epilot/sdk/validation-rules` | [docs](./docs/validation-rules.md) |\n| `epilot.webhooks` | `@epilot/sdk/webhooks` | [docs](./docs/webhooks.md) |\n| `epilot.workflow` | `@epilot/sdk/workflow` | [docs](./docs/workflow.md) |\n| `epilot.workflowDefinition` | `@epilot/sdk/workflow-definition` | [docs](./docs/workflow-definition.md) |\n<!-- /api-reference-table -->\n\n## OpenAPI Spec\n\nRetrieve the full OpenAPI specification for any API at runtime. The spec is lazy-loaded on first call and cached.\n\n```ts\nimport { epilot } from '@epilot/sdk'\n\n// Via API handle\nconst entitySpec = await epilot.entity.openapi()\nconsole.log(entitySpec.info.title) // \"Entity API\"\nconsole.log(entitySpec.paths) // all paths with full schemas\n\n// Via top-level method\nconst spec = await epilot.openapi('entity')\n```\n\nFor tree-shakeable imports:\n\n```ts\nimport { openapi } from '@epilot/sdk/entity'\n\nconst spec = await openapi()\n```\n\n## Explicit Client Access\n\n```ts\nimport { epilot } from '@epilot/sdk'\n\nepilot.authorize(() => '<my-token>')\n\n// Get the cached singleton client\nconst entityClient = epilot.entity.getClient()\nconst { data } = await entityClient.getEntity({ slug: 'contact', id: '123' })\n\n// Create a fresh (non-singleton) client instance\nconst freshClient = epilot.entity.createClient()\nauthorize(freshClient, () => '<my-token>')\n```\n\n## Tree-Shakeable Imports\n\nImport only what you need. Other APIs never touch your bundle.\n\n```ts\nimport { getClient, authorize } from '@epilot/sdk/entity'\n\nconst entityClient = getClient()\nauthorize(entityClient, () => '<my-token>')\n\nconst { data } = await entityClient.getEntity({ slug: 'contact', id: '123' })\n\n// Or use the handle for direct operation forwarding\nimport { entity } from '@epilot/sdk/entity'\nconst { data } = await entity.getEntity({ slug: 'contact', id: '123' })\n```\n\n## Types\n\nEach API subpath re-exports all schema types generated from the OpenAPI spec. Import them directly:\n\n```ts\nimport type { Entity, EntitySchema, RelationAttribute } from '@epilot/sdk/entity'\nimport type { FileItem } from '@epilot/sdk/file'\nimport type { AutomationFlow } from '@epilot/sdk/automation'\n```\n\nThe `Client`, `OperationMethods`, and `PathsDictionary` types are also available for typing client instances:\n\n```ts\nimport type { Client } from '@epilot/sdk/entity'\n\nconst entityClient: Client = epilot.entity.getClient()\n```\n\n## Headers\n\n### Global Headers\n\nSet default headers applied to all clients. Useful for `x-epilot-org-id`, `x-epilot-user-id`, etc.\n\n```ts\nimport { epilot } from '@epilot/sdk'\n\nepilot.authorize(() => '<my-token>')\nepilot.headers({\n 'x-epilot-org-id': 'org-123',\n 'x-epilot-user-id': 'user-456',\n})\n\nconst { data } = await epilot.entity.searchEntities(...)\n```\n\n### Standard Axios Headers\n\nUse standard axios `defaults.headers.common` on individual clients:\n\n```ts\nconst entityClient = epilot.entity.getClient()\nentityClient.defaults.headers.common['x-epilot-org-id'] = 'org-123'\n```\n\n## Auth Patterns\n\n`authorize()` accepts a string or a function. The function form is preferred \u2014 it is called on every request, so tokens stay fresh.\n\n```ts\nimport { authorize } from '@epilot/sdk'\nimport { getClient } from '@epilot/sdk/entity'\n\n// Per-client \u2014 function predicate (recommended)\nconst entityClient = getClient()\nauthorize(entityClient, () => '<my-token>')\n\n// Per-client \u2014 async function (e.g. OAuth / session)\nauthorize(entityClient, async () => {\n return await getTokenFromSession()\n})\n\n// Per-client \u2014 static string (sets default header once)\nauthorize(entityClient, 'my-static-api-token')\n```\n\n```ts\n// Global \u2014 applies to all clients resolved from the SDK\nimport { epilot } from '@epilot/sdk'\n\nepilot.authorize(() => '<my-token>')\nepilot.authorize(async () => await getTokenFromSession())\nepilot.authorize('my-static-api-token')\n```\n\n## Fresh Client Instance\n\n```ts\nimport { createClient, authorize } from '@epilot/sdk/entity'\n\nconst entityClient = createClient()\nauthorize(entityClient, () => '<my-token>')\nentityClient.defaults.headers.common['x-epilot-org-id'] = 'org-123'\n```\n\n## Multiple SDK Instances\n\n```ts\nimport { createSDK } from '@epilot/sdk'\n\nconst sdk1 = createSDK()\nsdk1.authorize(() => '<token-for-org-1>')\nsdk1.headers({ 'x-epilot-org-id': 'org-1' })\n\nconst sdk2 = createSDK()\nsdk2.authorize(() => '<token-for-org-2>')\nsdk2.headers({ 'x-epilot-org-id': 'org-2' })\n```\n\n\n## Interceptors\n\nUse axios interceptors for custom request/response processing. Since clients are axios instances, you can use `client.interceptors` directly:\n\n```ts\nentityClient.interceptors.response.use((response) => {\n console.debug(`${response.config.method?.toUpperCase()} ${response.config.url}`, {\n status: response.status,\n data: response.data,\n })\n return response\n})\n```\n\nOr register global interceptors applied to all clients:\n\n```ts\nepilot.interceptors.request((config) => {\n config.headers['x-correlation-id'] = generateTraceId()\n return config\n})\n```\n\n## Auto-Retry (429 Too Many Requests)\n\nThe SDK automatically retries requests that receive a `429 Too Many Requests` response. It respects the `Retry-After` header (in seconds) to determine how long to wait before retrying.\n\nEnabled by default with up to 3 retries.\n\n```ts\nimport { epilot } from '@epilot/sdk'\n\n// Customize retry behavior\nepilot.retry({ maxRetries: 5, defaultDelayMs: 2000 })\n\n// Disable retries\nepilot.retry({ maxRetries: 0 })\n```\n\n| Option | Default | Description |\n| --- | --- | --- |\n| `maxRetries` | `3` | Maximum number of retries. Set to `0` to disable. |\n| `defaultDelayMs` | `1000` | Fallback delay in ms when `Retry-After` header is missing. |\n\nFor individually imported clients (tree-shakeable imports), apply the interceptor manually:\n\n```ts\nimport { getClient, authorize } from '@epilot/sdk/entity'\nimport { applyRetryInterceptor } from '@epilot/sdk'\n\nconst entityClient = getClient()\nauthorize(entityClient, () => '<my-token>')\napplyRetryInterceptor({ client: entityClient, config: { maxRetries: 3 } })\n```\n\n## Large Response Handling (413 Payload Too Large)\n\nepilot APIs use a [large response middleware](https://github.com/epilot-dev/aws-lambda-utility-middlewares) to work around the AWS Lambda 6MB response limit. When a response exceeds ~5.1MB, the API uploads the payload to S3 and returns a presigned URL instead.\n\nThe SDK handles this transparently \u2014 it sends the opt-in `Accept` header and automatically fetches the full payload from S3 when a large response URL is returned. Enabled by default.\n\n```ts\nimport { epilot } from '@epilot/sdk'\n\n// Disable large response handling\nepilot.largeResponse({ enabled: false })\n```\n\nFor individually imported clients (tree-shakeable imports), apply the interceptor manually:\n\n```ts\nimport { getClient, authorize } from '@epilot/sdk/entity'\nimport { applyLargeResponseInterceptor } from '@epilot/sdk'\n\nconst entityClient = getClient()\nauthorize(entityClient, () => '<my-token>')\napplyLargeResponseInterceptor({ client: entityClient, config: { enabled: true } })\n```\n\n## Overrides & Custom APIs\n\nOverride built-in API specs or register custom APIs via `.epilot/sdk-overrides.json`. This is useful for testing new versions of an API spec or getting the latest types without waiting for an SDK release.\n\n```json\n{\n \"entity\": \"./specs/entity-openapi.json\",\n \"myNewApi\": \"./specs/my-new-api-openapi.json\"\n}\n```\n\n```ts\n// Built-in API with overridden spec\nconst { data } = await epilot.entity.getEntity({ slug: 'contact', id: '123' })\n```\n\n### Override Commands\n\n```bash\n# Apply all overrides from .epilot/sdk-overrides.json\nnpx epilot-sdk override\n\n# Override a single API\nnpx epilot-sdk override entity ./my-local-entity-spec.yaml\n\n# Regenerate types after spec changes\nnpx epilot-sdk typegen\n```\n\n<details>\n<summary>Migration from <code>@epilot/*-client</code></summary>\n\nDrop-in replacement \u2014 just change the import path:\n\n```ts\n// Before\nimport { getClient, createClient, authorize } from '@epilot/entity-client'\nimport type { Client, Entity } from '@epilot/entity-client'\n\n// After\nimport { getClient, createClient, authorize } from '@epilot/sdk/entity'\nimport type { Client, Entity } from '@epilot/sdk/entity'\n```\n\n</details>\n\n<details>\n<summary>Client Lifecycle</summary>\n\nWhen you call `authorize()`, `headers()`, `retry()`, `largeResponse()`, or `interceptors`, the SDK invalidates all cached client instances. The next operation call creates a fresh client with the updated configuration.\n\n**Operation methods are always up to date** \u2014 calls like `epilot.entity.getEntity(...)` re-resolve the client on every invocation, so they always use the latest config.\n\n**Direct `getClient()` references can go stale** \u2014 if you hold a reference and then change config, your reference still points to the old client:\n\n```ts\nconst entityClient = epilot.entity.getClient()\n\nepilot.authorize('new-token') // invalidates all cached clients\n\n// entityClient still has the old token\n// epilot.entity.getEntity(...) will use a new client with the new token\n```\n\nIf you need a long-lived reference that survives config changes, call `getClient()` again after changing config, or use operation methods directly.\n\n</details>\n";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
exports.default = README_default;
|