@epilot/sdk 2.0.4 → 2.1.0-rc.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.
Files changed (201) hide show
  1. package/dist/apis/access-token.cjs +3 -8
  2. package/dist/apis/access-token.js +3 -8
  3. package/dist/apis/address-suggestions.cjs +3 -8
  4. package/dist/apis/address-suggestions.js +3 -8
  5. package/dist/apis/address.cjs +3 -8
  6. package/dist/apis/address.js +3 -8
  7. package/dist/apis/ai-agents.cjs +3 -8
  8. package/dist/apis/ai-agents.js +3 -8
  9. package/dist/apis/app.cjs +3 -8
  10. package/dist/apis/app.d.cts +2 -2
  11. package/dist/apis/app.d.ts +2 -2
  12. package/dist/apis/app.js +3 -8
  13. package/dist/apis/audit-logs.cjs +3 -8
  14. package/dist/apis/audit-logs.js +3 -8
  15. package/dist/apis/automation.cjs +3 -8
  16. package/dist/apis/automation.js +3 -8
  17. package/dist/apis/billing.cjs +3 -8
  18. package/dist/apis/billing.js +3 -8
  19. package/dist/apis/blueprint-manifest.cjs +3 -8
  20. package/dist/apis/blueprint-manifest.d.cts +2 -2
  21. package/dist/apis/blueprint-manifest.d.ts +2 -2
  22. package/dist/apis/blueprint-manifest.js +3 -8
  23. package/dist/apis/consent.cjs +3 -8
  24. package/dist/apis/consent.js +3 -8
  25. package/dist/apis/customer-portal.cjs +3 -8
  26. package/dist/apis/customer-portal.js +3 -8
  27. package/dist/apis/dashboard.cjs +3 -8
  28. package/dist/apis/dashboard.js +3 -8
  29. package/dist/apis/data-management.cjs +3 -8
  30. package/dist/apis/data-management.js +3 -8
  31. package/dist/apis/deduplication.cjs +3 -8
  32. package/dist/apis/deduplication.js +3 -8
  33. package/dist/apis/design.cjs +3 -8
  34. package/dist/apis/design.js +3 -8
  35. package/dist/apis/document.cjs +3 -8
  36. package/dist/apis/document.js +3 -8
  37. package/dist/apis/email-settings.cjs +3 -8
  38. package/dist/apis/email-settings.js +3 -8
  39. package/dist/apis/email-template.cjs +3 -8
  40. package/dist/apis/email-template.d.cts +2 -2
  41. package/dist/apis/email-template.d.ts +2 -2
  42. package/dist/apis/email-template.js +3 -8
  43. package/dist/apis/entity-mapping.cjs +3 -8
  44. package/dist/apis/entity-mapping.js +3 -8
  45. package/dist/apis/entity.cjs +3 -8
  46. package/dist/apis/entity.js +3 -8
  47. package/dist/apis/environments.cjs +3 -8
  48. package/dist/apis/environments.js +3 -8
  49. package/dist/apis/erp-integration.cjs +3 -8
  50. package/dist/apis/erp-integration.js +3 -8
  51. package/dist/apis/event-catalog.cjs +3 -8
  52. package/dist/apis/event-catalog.js +3 -8
  53. package/dist/apis/file.cjs +3 -8
  54. package/dist/apis/file.js +3 -8
  55. package/dist/apis/iban.cjs +3 -8
  56. package/dist/apis/iban.js +3 -8
  57. package/dist/apis/journey.cjs +3 -8
  58. package/dist/apis/journey.js +3 -8
  59. package/dist/apis/kanban.cjs +3 -8
  60. package/dist/apis/kanban.js +3 -8
  61. package/dist/apis/message.cjs +3 -8
  62. package/dist/apis/message.js +3 -8
  63. package/dist/apis/metering.cjs +3 -8
  64. package/dist/apis/metering.js +3 -8
  65. package/dist/apis/notes.cjs +3 -8
  66. package/dist/apis/notes.js +3 -8
  67. package/dist/apis/notification.cjs +3 -8
  68. package/dist/apis/notification.js +3 -8
  69. package/dist/apis/organization.cjs +3 -8
  70. package/dist/apis/organization.js +3 -8
  71. package/dist/apis/partner-directory.cjs +3 -8
  72. package/dist/apis/partner-directory.js +3 -8
  73. package/dist/apis/permissions.cjs +3 -8
  74. package/dist/apis/permissions.js +3 -8
  75. package/dist/apis/pricing-tier.cjs +3 -8
  76. package/dist/apis/pricing-tier.js +3 -8
  77. package/dist/apis/pricing.cjs +3 -8
  78. package/dist/apis/pricing.js +3 -8
  79. package/dist/apis/purpose.cjs +3 -8
  80. package/dist/apis/purpose.js +3 -8
  81. package/dist/apis/sandbox.cjs +3 -8
  82. package/dist/apis/sandbox.js +3 -8
  83. package/dist/apis/submission.cjs +3 -8
  84. package/dist/apis/submission.js +3 -8
  85. package/dist/apis/targeting.cjs +3 -8
  86. package/dist/apis/targeting.js +3 -8
  87. package/dist/apis/template-variables.cjs +3 -8
  88. package/dist/apis/template-variables.js +3 -8
  89. package/dist/apis/user.cjs +3 -8
  90. package/dist/apis/user.js +3 -8
  91. package/dist/apis/validation-rules.cjs +3 -8
  92. package/dist/apis/validation-rules.js +3 -8
  93. package/dist/apis/webhooks.cjs +3 -8
  94. package/dist/apis/webhooks.js +3 -8
  95. package/dist/apis/workflow-definition.cjs +3 -8
  96. package/dist/apis/workflow-definition.js +3 -8
  97. package/dist/apis/workflow.cjs +3 -8
  98. package/dist/apis/workflow.js +3 -8
  99. package/dist/{app.d-Dr03n4J4.d.cts → app.d-BXy_QUym.d.cts} +21 -3
  100. package/dist/{app.d-Dr03n4J4.d.ts → app.d-BXy_QUym.d.ts} +21 -3
  101. package/dist/{blueprint-manifest.d-CEWRdF3i.d.cts → blueprint-manifest.d-DECw6HdM.d.cts} +110 -2
  102. package/dist/{blueprint-manifest.d-CEWRdF3i.d.ts → blueprint-manifest.d-DECw6HdM.d.ts} +110 -2
  103. package/dist/chunk-33TQRYMY.js +14 -0
  104. package/dist/chunk-4JPVFLVU.js +14 -0
  105. package/dist/chunk-4K3MX2J6.js +14 -0
  106. package/dist/chunk-4MO4WLKA.cjs +14 -0
  107. package/dist/chunk-5RXE7X63.js +14 -0
  108. package/dist/chunk-5WN2YXNU.cjs +14 -0
  109. package/dist/chunk-5Y2KLUU6.cjs +14 -0
  110. package/dist/chunk-5YVVQBA2.js +14 -0
  111. package/dist/chunk-6ADJEPMJ.js +14 -0
  112. package/dist/chunk-6BERHKDQ.cjs +14 -0
  113. package/dist/chunk-6J7CIOKR.js +14 -0
  114. package/dist/chunk-7BPPP4M2.js +14 -0
  115. package/dist/chunk-7KFKA3AH.cjs +14 -0
  116. package/dist/chunk-BB7WFIE2.cjs +14 -0
  117. package/dist/chunk-BDIJHJOG.js +14 -0
  118. package/dist/chunk-CBRWUULQ.js +14 -0
  119. package/dist/chunk-CFGXI3FX.js +14 -0
  120. package/dist/chunk-CK36RZXR.js +14 -0
  121. package/dist/chunk-CLMZ2EXW.js +14 -0
  122. package/dist/chunk-CVSQT5PV.cjs +14 -0
  123. package/dist/chunk-CX3KG7D2.cjs +14 -0
  124. package/dist/chunk-D5FJ26GG.js +14 -0
  125. package/dist/chunk-DBNEZWK2.cjs +14 -0
  126. package/dist/chunk-DIP442PL.js +14 -0
  127. package/dist/chunk-E4IFBCNM.cjs +14 -0
  128. package/dist/chunk-EIILOQ6X.js +14 -0
  129. package/dist/chunk-FCLW3FLF.js +14 -0
  130. package/dist/chunk-GGBSLAVO.cjs +14 -0
  131. package/dist/chunk-GMBRXWMD.cjs +14 -0
  132. package/dist/chunk-HBPCJRZX.cjs +14 -0
  133. package/dist/chunk-HKZQ56AS.cjs +14 -0
  134. package/dist/chunk-HO7KACZZ.cjs +14 -0
  135. package/dist/chunk-HSGQSTVK.js +14 -0
  136. package/dist/chunk-ID6BXIOZ.js +14 -0
  137. package/dist/chunk-IPDIEZBN.cjs +14 -0
  138. package/dist/chunk-IPFHV2FV.cjs +14 -0
  139. package/dist/chunk-IXRDP4VP.js +14 -0
  140. package/dist/chunk-JM6HKPSC.cjs +14 -0
  141. package/dist/chunk-JX45ME2Z.js +14 -0
  142. package/dist/chunk-KEJRWMXR.cjs +14 -0
  143. package/dist/chunk-KU2XF4TS.cjs +14 -0
  144. package/dist/chunk-L43U5IO3.js +14 -0
  145. package/dist/chunk-LXAJ722U.js +14 -0
  146. package/dist/chunk-MK4ZGXVE.cjs +14 -0
  147. package/dist/chunk-MKZGM4A6.js +14 -0
  148. package/dist/chunk-N2P26AAD.js +14 -0
  149. package/dist/chunk-NSOHW3R6.js +14 -0
  150. package/dist/chunk-O3R6C3WW.js +14 -0
  151. package/dist/chunk-OBQIS3KU.js +14 -0
  152. package/dist/chunk-OI2M6FSB.js +14 -0
  153. package/dist/chunk-ONN5COYQ.cjs +14 -0
  154. package/dist/chunk-PBNPZ7UX.js +14 -0
  155. package/dist/chunk-PLBIQ2Y7.cjs +14 -0
  156. package/dist/chunk-Q5TESEDZ.cjs +14 -0
  157. package/dist/chunk-R6WNZVTA.cjs +14 -0
  158. package/dist/chunk-RNBO3DEN.js +14 -0
  159. package/dist/chunk-RNKZDJOY.js +14 -0
  160. package/dist/chunk-RQKN4WTW.cjs +14 -0
  161. package/dist/chunk-S2QF6HG2.cjs +14 -0
  162. package/dist/chunk-SHPXCOTN.cjs +14 -0
  163. package/dist/chunk-SPZSDRM6.cjs +14 -0
  164. package/dist/chunk-TBBLLEB2.cjs +14 -0
  165. package/dist/chunk-TIJGLQKO.js +14 -0
  166. package/dist/chunk-TUAAE3UC.cjs +14 -0
  167. package/dist/chunk-U4BMKRG6.js +14 -0
  168. package/dist/chunk-U52A2DMK.cjs +14 -0
  169. package/dist/chunk-UDO4JYVU.cjs +14 -0
  170. package/dist/chunk-UE4XPL43.js +14 -0
  171. package/dist/chunk-UNHWLNE4.js +14 -0
  172. package/dist/chunk-URRL33D5.cjs +14 -0
  173. package/dist/chunk-UTQY2DSM.js +14 -0
  174. package/dist/chunk-UX2IZQNM.cjs +14 -0
  175. package/dist/chunk-UXVV3BSC.cjs +14 -0
  176. package/dist/chunk-V56ZCL54.js +14 -0
  177. package/dist/chunk-VD5TBK2T.cjs +14 -0
  178. package/dist/chunk-W3MM2BSK.cjs +14 -0
  179. package/dist/chunk-WAKSLH7V.cjs +14 -0
  180. package/dist/chunk-WOOKHE7Y.cjs +14 -0
  181. package/dist/chunk-XD6XML3Z.cjs +14 -0
  182. package/dist/chunk-XIB2G42L.cjs +14 -0
  183. package/dist/chunk-XLOXC52O.js +14 -0
  184. package/dist/chunk-Y4YQEDR3.js +14 -0
  185. package/dist/chunk-Y4ZMNMYI.js +14 -0
  186. package/dist/chunk-YFHQYQII.js +14 -0
  187. package/dist/chunk-YGULLD73.js +14 -0
  188. package/dist/chunk-YNPRF4BX.js +14 -0
  189. package/dist/chunk-YXPUCBVK.cjs +14 -0
  190. package/dist/chunk-Z5LLUUFD.cjs +14 -0
  191. package/dist/chunk-ZAPA4RPI.js +14 -0
  192. package/dist/chunk-ZAXYMQ2B.cjs +14 -0
  193. package/dist/chunk-ZDJ3J6Z6.cjs +14 -0
  194. package/dist/chunk-ZPCMZO2O.js +14 -0
  195. package/dist/{email-template.d-BeqkDHtk.d.cts → email-template.d-gtQkdaXM.d.cts} +17 -3
  196. package/dist/{email-template.d-BeqkDHtk.d.ts → email-template.d-gtQkdaXM.d.ts} +17 -3
  197. package/dist/index.cjs +195 -61
  198. package/dist/index.d.cts +3 -3
  199. package/dist/index.d.ts +3 -3
  200. package/dist/index.js +194 -60
  201. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -5,11 +5,11 @@ import { C as Client } from './access-token.d-CnmUTOlq.js';
5
5
  import { C as Client$1 } from './address.d-CwAPOVxa.js';
6
6
  import { C as Client$2 } from './address-suggestions.d-_YwTOR-9.js';
7
7
  import { C as Client$3 } from './ai-agents.d-OkXfr2bz.js';
8
- import { C as Client$4 } from './app.d-Dr03n4J4.js';
8
+ import { C as Client$4 } from './app.d-BXy_QUym.js';
9
9
  import { C as Client$5 } from './audit-logs.d-BRToFqeX.js';
10
10
  import { C as Client$6 } from './automation.d-KOiZ6ru5.js';
11
11
  import { C as Client$7 } from './billing.d-Bs8Ku9qE.js';
12
- import { C as Client$8 } from './blueprint-manifest.d-CEWRdF3i.js';
12
+ import { C as Client$8 } from './blueprint-manifest.d-DECw6HdM.js';
13
13
  import { C as Client$9 } from './consent.d-C2PROHhX.js';
14
14
  import { C as Client$a } from './customer-portal.d-Bh9NF8cY.js';
15
15
  import { C as Client$b } from './dashboard.d-CsGcA74I.js';
@@ -18,7 +18,7 @@ import { C as Client$d } from './deduplication.d-w_2aJD5f.js';
18
18
  import { C as Client$e } from './design.d-eA-irKEX.js';
19
19
  import { C as Client$f } from './document.d-DN37pjdx.js';
20
20
  import { C as Client$g } from './email-settings.d-BXxYjVDr.js';
21
- import { C as Client$h } from './email-template.d-BeqkDHtk.js';
21
+ import { C as Client$h } from './email-template.d-gtQkdaXM.js';
22
22
  import { C as Client$i } from './entity.d-DtiajmaY.js';
23
23
  import { C as Client$j } from './entity-mapping.d-DKSW3sfy.js';
24
24
  import { C as Client$k } from './environments.d-H3LK_KuH.js';
package/dist/index.js CHANGED
@@ -1,3 +1,141 @@
1
+ import {
2
+ require_targeting_runtime
3
+ } from "./chunk-Y4YQEDR3.js";
4
+ import {
5
+ require_template_variables_runtime
6
+ } from "./chunk-7BPPP4M2.js";
7
+ import {
8
+ require_user_runtime
9
+ } from "./chunk-ZAPA4RPI.js";
10
+ import {
11
+ require_validation_rules_runtime
12
+ } from "./chunk-LXAJ722U.js";
13
+ import {
14
+ require_webhooks_runtime
15
+ } from "./chunk-5YVVQBA2.js";
16
+ import {
17
+ require_workflow_definition_runtime
18
+ } from "./chunk-YNPRF4BX.js";
19
+ import {
20
+ require_workflow_runtime
21
+ } from "./chunk-U4BMKRG6.js";
22
+ import {
23
+ require_organization_runtime
24
+ } from "./chunk-5RXE7X63.js";
25
+ import {
26
+ require_partner_directory_runtime
27
+ } from "./chunk-MKZGM4A6.js";
28
+ import {
29
+ require_permissions_runtime
30
+ } from "./chunk-JX45ME2Z.js";
31
+ import {
32
+ require_pricing_tier_runtime
33
+ } from "./chunk-UE4XPL43.js";
34
+ import {
35
+ require_pricing_runtime
36
+ } from "./chunk-PBNPZ7UX.js";
37
+ import {
38
+ require_purpose_runtime
39
+ } from "./chunk-Y4ZMNMYI.js";
40
+ import {
41
+ require_sandbox_runtime
42
+ } from "./chunk-CBRWUULQ.js";
43
+ import {
44
+ require_submission_runtime
45
+ } from "./chunk-IXRDP4VP.js";
46
+ import {
47
+ require_file_runtime
48
+ } from "./chunk-CLMZ2EXW.js";
49
+ import {
50
+ require_iban_runtime
51
+ } from "./chunk-FCLW3FLF.js";
52
+ import {
53
+ require_journey_runtime
54
+ } from "./chunk-V56ZCL54.js";
55
+ import {
56
+ require_kanban_runtime
57
+ } from "./chunk-OI2M6FSB.js";
58
+ import {
59
+ require_message_runtime
60
+ } from "./chunk-D5FJ26GG.js";
61
+ import {
62
+ require_metering_runtime
63
+ } from "./chunk-4JPVFLVU.js";
64
+ import {
65
+ require_notes_runtime
66
+ } from "./chunk-O3R6C3WW.js";
67
+ import {
68
+ require_notification_runtime
69
+ } from "./chunk-UTQY2DSM.js";
70
+ import {
71
+ require_document_runtime
72
+ } from "./chunk-HSGQSTVK.js";
73
+ import {
74
+ require_email_settings_runtime
75
+ } from "./chunk-4K3MX2J6.js";
76
+ import {
77
+ require_email_template_runtime
78
+ } from "./chunk-RNKZDJOY.js";
79
+ import {
80
+ require_entity_mapping_runtime
81
+ } from "./chunk-YGULLD73.js";
82
+ import {
83
+ require_entity_runtime
84
+ } from "./chunk-ZPCMZO2O.js";
85
+ import {
86
+ require_environments_runtime
87
+ } from "./chunk-L43U5IO3.js";
88
+ import {
89
+ require_erp_integration_runtime
90
+ } from "./chunk-N2P26AAD.js";
91
+ import {
92
+ require_event_catalog_runtime
93
+ } from "./chunk-33TQRYMY.js";
94
+ import {
95
+ require_billing_runtime
96
+ } from "./chunk-YFHQYQII.js";
97
+ import {
98
+ require_blueprint_manifest_runtime
99
+ } from "./chunk-DIP442PL.js";
100
+ import {
101
+ require_consent_runtime
102
+ } from "./chunk-NSOHW3R6.js";
103
+ import {
104
+ require_customer_portal_runtime
105
+ } from "./chunk-OBQIS3KU.js";
106
+ import {
107
+ require_dashboard_runtime
108
+ } from "./chunk-TIJGLQKO.js";
109
+ import {
110
+ require_data_management_runtime
111
+ } from "./chunk-RNBO3DEN.js";
112
+ import {
113
+ require_deduplication_runtime
114
+ } from "./chunk-CFGXI3FX.js";
115
+ import {
116
+ require_design_runtime
117
+ } from "./chunk-CK36RZXR.js";
118
+ import {
119
+ require_access_token_runtime
120
+ } from "./chunk-UNHWLNE4.js";
121
+ import {
122
+ require_address_suggestions_runtime
123
+ } from "./chunk-BDIJHJOG.js";
124
+ import {
125
+ require_address_runtime
126
+ } from "./chunk-XLOXC52O.js";
127
+ import {
128
+ require_ai_agents_runtime
129
+ } from "./chunk-6ADJEPMJ.js";
130
+ import {
131
+ require_app_runtime
132
+ } from "./chunk-EIILOQ6X.js";
133
+ import {
134
+ require_audit_logs_runtime
135
+ } from "./chunk-ID6BXIOZ.js";
136
+ import {
137
+ require_automation_runtime
138
+ } from "./chunk-6J7CIOKR.js";
1
139
  import {
2
140
  __require,
3
141
  authorize,
@@ -32,7 +170,7 @@ var applyLargeResponseInterceptor = (params) => {
32
170
  // src/retry.ts
33
171
  var DEFAULT_MAX_RETRIES = 3;
34
172
  var DEFAULT_DELAY_MS = 1e3;
35
- var sleep = (ms) => new Promise((resolve2) => setTimeout(resolve2, ms));
173
+ var sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
36
174
  var RETRY_COUNT_HEADER = "x-epilot-sdk-retry-count";
37
175
  var applyRetryInterceptor = (params) => {
38
176
  const { client, config } = params;
@@ -100,265 +238,261 @@ var resetAllClients = (registry) => {
100
238
  };
101
239
 
102
240
  // src/apis/_registry.ts
103
- var base = "../definitions/";
104
- var loadDef = (name) => {
105
- const mod = __require(base + name + "-runtime.json");
106
- return expand(mod.default ?? mod);
107
- };
241
+ var expandDef = (mod) => expand(mod.default ?? mod);
108
242
  var registerBuiltinApis = (registry) => {
109
243
  registerApi({
110
244
  registry,
111
245
  name: "accessToken",
112
- loader: () => loadDef("access-token")
246
+ loader: () => expandDef(require_access_token_runtime())
113
247
  });
114
248
  registerApi({
115
249
  registry,
116
250
  name: "address",
117
- loader: () => loadDef("address")
251
+ loader: () => expandDef(require_address_runtime())
118
252
  });
119
253
  registerApi({
120
254
  registry,
121
255
  name: "addressSuggestions",
122
- loader: () => loadDef("address-suggestions")
256
+ loader: () => expandDef(require_address_suggestions_runtime())
123
257
  });
124
258
  registerApi({
125
259
  registry,
126
260
  name: "aiAgents",
127
- loader: () => loadDef("ai-agents")
261
+ loader: () => expandDef(require_ai_agents_runtime())
128
262
  });
129
263
  registerApi({
130
264
  registry,
131
265
  name: "app",
132
- loader: () => loadDef("app")
266
+ loader: () => expandDef(require_app_runtime())
133
267
  });
134
268
  registerApi({
135
269
  registry,
136
270
  name: "auditLogs",
137
- loader: () => loadDef("audit-logs")
271
+ loader: () => expandDef(require_audit_logs_runtime())
138
272
  });
139
273
  registerApi({
140
274
  registry,
141
275
  name: "automation",
142
- loader: () => loadDef("automation")
276
+ loader: () => expandDef(require_automation_runtime())
143
277
  });
144
278
  registerApi({
145
279
  registry,
146
280
  name: "billing",
147
- loader: () => loadDef("billing")
281
+ loader: () => expandDef(require_billing_runtime())
148
282
  });
149
283
  registerApi({
150
284
  registry,
151
285
  name: "blueprintManifest",
152
- loader: () => loadDef("blueprint-manifest")
286
+ loader: () => expandDef(require_blueprint_manifest_runtime())
153
287
  });
154
288
  registerApi({
155
289
  registry,
156
290
  name: "consent",
157
- loader: () => loadDef("consent")
291
+ loader: () => expandDef(require_consent_runtime())
158
292
  });
159
293
  registerApi({
160
294
  registry,
161
295
  name: "customerPortal",
162
- loader: () => loadDef("customer-portal")
296
+ loader: () => expandDef(require_customer_portal_runtime())
163
297
  });
164
298
  registerApi({
165
299
  registry,
166
300
  name: "dashboard",
167
- loader: () => loadDef("dashboard")
301
+ loader: () => expandDef(require_dashboard_runtime())
168
302
  });
169
303
  registerApi({
170
304
  registry,
171
305
  name: "dataManagement",
172
- loader: () => loadDef("data-management")
306
+ loader: () => expandDef(require_data_management_runtime())
173
307
  });
174
308
  registerApi({
175
309
  registry,
176
310
  name: "deduplication",
177
- loader: () => loadDef("deduplication")
311
+ loader: () => expandDef(require_deduplication_runtime())
178
312
  });
179
313
  registerApi({
180
314
  registry,
181
315
  name: "design",
182
- loader: () => loadDef("design")
316
+ loader: () => expandDef(require_design_runtime())
183
317
  });
184
318
  registerApi({
185
319
  registry,
186
320
  name: "document",
187
- loader: () => loadDef("document")
321
+ loader: () => expandDef(require_document_runtime())
188
322
  });
189
323
  registerApi({
190
324
  registry,
191
325
  name: "emailSettings",
192
- loader: () => loadDef("email-settings")
326
+ loader: () => expandDef(require_email_settings_runtime())
193
327
  });
194
328
  registerApi({
195
329
  registry,
196
330
  name: "emailTemplate",
197
- loader: () => loadDef("email-template")
331
+ loader: () => expandDef(require_email_template_runtime())
198
332
  });
199
333
  registerApi({
200
334
  registry,
201
335
  name: "entity",
202
- loader: () => loadDef("entity")
336
+ loader: () => expandDef(require_entity_runtime())
203
337
  });
204
338
  registerApi({
205
339
  registry,
206
340
  name: "entityMapping",
207
- loader: () => loadDef("entity-mapping")
341
+ loader: () => expandDef(require_entity_mapping_runtime())
208
342
  });
209
343
  registerApi({
210
344
  registry,
211
345
  name: "environments",
212
- loader: () => loadDef("environments")
346
+ loader: () => expandDef(require_environments_runtime())
213
347
  });
214
348
  registerApi({
215
349
  registry,
216
350
  name: "erpIntegration",
217
- loader: () => loadDef("erp-integration")
351
+ loader: () => expandDef(require_erp_integration_runtime())
218
352
  });
219
353
  registerApi({
220
354
  registry,
221
355
  name: "eventCatalog",
222
- loader: () => loadDef("event-catalog")
356
+ loader: () => expandDef(require_event_catalog_runtime())
223
357
  });
224
358
  registerApi({
225
359
  registry,
226
360
  name: "file",
227
- loader: () => loadDef("file")
361
+ loader: () => expandDef(require_file_runtime())
228
362
  });
229
363
  registerApi({
230
364
  registry,
231
365
  name: "iban",
232
- loader: () => loadDef("iban")
366
+ loader: () => expandDef(require_iban_runtime())
233
367
  });
234
368
  registerApi({
235
369
  registry,
236
370
  name: "journey",
237
- loader: () => loadDef("journey")
371
+ loader: () => expandDef(require_journey_runtime())
238
372
  });
239
373
  registerApi({
240
374
  registry,
241
375
  name: "kanban",
242
- loader: () => loadDef("kanban")
376
+ loader: () => expandDef(require_kanban_runtime())
243
377
  });
244
378
  registerApi({
245
379
  registry,
246
380
  name: "message",
247
- loader: () => loadDef("message")
381
+ loader: () => expandDef(require_message_runtime())
248
382
  });
249
383
  registerApi({
250
384
  registry,
251
385
  name: "metering",
252
- loader: () => loadDef("metering")
386
+ loader: () => expandDef(require_metering_runtime())
253
387
  });
254
388
  registerApi({
255
389
  registry,
256
390
  name: "notes",
257
- loader: () => loadDef("notes")
391
+ loader: () => expandDef(require_notes_runtime())
258
392
  });
259
393
  registerApi({
260
394
  registry,
261
395
  name: "notification",
262
- loader: () => loadDef("notification")
396
+ loader: () => expandDef(require_notification_runtime())
263
397
  });
264
398
  registerApi({
265
399
  registry,
266
400
  name: "organization",
267
- loader: () => loadDef("organization")
401
+ loader: () => expandDef(require_organization_runtime())
268
402
  });
269
403
  registerApi({
270
404
  registry,
271
405
  name: "partnerDirectory",
272
- loader: () => loadDef("partner-directory")
406
+ loader: () => expandDef(require_partner_directory_runtime())
273
407
  });
274
408
  registerApi({
275
409
  registry,
276
410
  name: "permissions",
277
- loader: () => loadDef("permissions")
411
+ loader: () => expandDef(require_permissions_runtime())
278
412
  });
279
413
  registerApi({
280
414
  registry,
281
415
  name: "pricing",
282
- loader: () => loadDef("pricing")
416
+ loader: () => expandDef(require_pricing_runtime())
283
417
  });
284
418
  registerApi({
285
419
  registry,
286
420
  name: "pricingTier",
287
- loader: () => loadDef("pricing-tier")
421
+ loader: () => expandDef(require_pricing_tier_runtime())
288
422
  });
289
423
  registerApi({
290
424
  registry,
291
425
  name: "purpose",
292
- loader: () => loadDef("purpose")
426
+ loader: () => expandDef(require_purpose_runtime())
293
427
  });
294
428
  registerApi({
295
429
  registry,
296
430
  name: "sandbox",
297
- loader: () => loadDef("sandbox")
431
+ loader: () => expandDef(require_sandbox_runtime())
298
432
  });
299
433
  registerApi({
300
434
  registry,
301
435
  name: "submission",
302
- loader: () => loadDef("submission")
436
+ loader: () => expandDef(require_submission_runtime())
303
437
  });
304
438
  registerApi({
305
439
  registry,
306
440
  name: "targeting",
307
- loader: () => loadDef("targeting")
441
+ loader: () => expandDef(require_targeting_runtime())
308
442
  });
309
443
  registerApi({
310
444
  registry,
311
445
  name: "templateVariables",
312
- loader: () => loadDef("template-variables")
446
+ loader: () => expandDef(require_template_variables_runtime())
313
447
  });
314
448
  registerApi({
315
449
  registry,
316
450
  name: "user",
317
- loader: () => loadDef("user")
451
+ loader: () => expandDef(require_user_runtime())
318
452
  });
319
453
  registerApi({
320
454
  registry,
321
455
  name: "validationRules",
322
- loader: () => loadDef("validation-rules")
456
+ loader: () => expandDef(require_validation_rules_runtime())
323
457
  });
324
458
  registerApi({
325
459
  registry,
326
460
  name: "webhooks",
327
- loader: () => loadDef("webhooks")
461
+ loader: () => expandDef(require_webhooks_runtime())
328
462
  });
329
463
  registerApi({
330
464
  registry,
331
465
  name: "workflow",
332
- loader: () => loadDef("workflow")
466
+ loader: () => expandDef(require_workflow_runtime())
333
467
  });
334
468
  registerApi({
335
469
  registry,
336
470
  name: "workflowDefinition",
337
- loader: () => loadDef("workflow-definition")
471
+ loader: () => expandDef(require_workflow_definition_runtime())
338
472
  });
339
473
  };
340
474
 
341
475
  // src/overrides.ts
342
- import * as fs from "fs";
343
- import * as path from "path";
344
476
  var OVERRIDES_PATH = ".epilot/sdk-overrides.json";
345
477
  var _loaded = false;
346
- var createSpecLoader = (specPath, baseDir) => {
478
+ var createSpecLoader = (specPath, baseDir, fsModule, pathModule) => {
347
479
  let cached = null;
348
480
  return () => {
349
481
  if (cached) return cached;
350
- const absolutePath = path.resolve(baseDir, specPath);
351
- const content = fs.readFileSync(absolutePath, "utf-8");
482
+ const absolutePath = pathModule.resolve(baseDir, specPath);
483
+ const content = fsModule.readFileSync(absolutePath, "utf-8");
352
484
  cached = JSON.parse(content);
353
485
  return cached;
354
486
  };
355
487
  };
356
- var loadOverrides = (registry) => {
488
+ var loadOverrides = (registry, cwd) => {
357
489
  if (_loaded) return;
358
490
  _loaded = true;
359
491
  try {
360
492
  if (typeof process === "undefined" || typeof process.cwd !== "function") return;
361
- let dir = process.cwd();
493
+ const fs = __require("fs");
494
+ const path = __require("path");
495
+ let dir = cwd ?? process.cwd();
362
496
  let overridesFile = null;
363
497
  while (true) {
364
498
  const candidate = path.resolve(dir, OVERRIDES_PATH);
@@ -374,7 +508,7 @@ var loadOverrides = (registry) => {
374
508
  const baseDir = path.dirname(overridesFile);
375
509
  const overrides = JSON.parse(fs.readFileSync(overridesFile, "utf-8"));
376
510
  for (const [name, specPath] of Object.entries(overrides)) {
377
- const loader = createSpecLoader(specPath, baseDir);
511
+ const loader = createSpecLoader(specPath, baseDir, fs, path);
378
512
  const existing = registry.get(name);
379
513
  if (existing) {
380
514
  existing.loader = loader;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/sdk",
3
- "version": "2.0.4",
3
+ "version": "2.1.0-rc.1",
4
4
  "description": "JavaScript/TypeScript SDK for epilot APIs",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",