@epilot/sdk 2.3.0 → 2.3.2

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 (228) hide show
  1. package/definitions/access-token-runtime.json +1 -0
  2. package/definitions/access-token.json +663 -0
  3. package/definitions/address-runtime.json +1 -0
  4. package/definitions/address-suggestions-runtime.json +1 -0
  5. package/definitions/address-suggestions.json +582 -0
  6. package/definitions/address.json +578 -0
  7. package/definitions/ai-agents-runtime.json +1 -0
  8. package/definitions/ai-agents.json +1711 -0
  9. package/definitions/app-runtime.json +1 -0
  10. package/definitions/app.json +4493 -0
  11. package/definitions/audit-logs-runtime.json +1 -0
  12. package/definitions/audit-logs.json +305 -0
  13. package/definitions/automation-runtime.json +1 -0
  14. package/definitions/automation.json +5028 -0
  15. package/definitions/billing-runtime.json +1 -0
  16. package/definitions/billing.json +837 -0
  17. package/definitions/blueprint-manifest-runtime.json +1 -0
  18. package/definitions/blueprint-manifest.json +4619 -0
  19. package/definitions/consent-runtime.json +1 -0
  20. package/definitions/consent.json +344 -0
  21. package/definitions/customer-portal-runtime.json +1 -0
  22. package/definitions/customer-portal.json +15676 -0
  23. package/definitions/dashboard-runtime.json +1 -0
  24. package/definitions/dashboard.json +484 -0
  25. package/definitions/data-governance-runtime.json +1 -0
  26. package/definitions/data-governance.json +1126 -0
  27. package/definitions/deduplication-runtime.json +1 -0
  28. package/definitions/deduplication.json +314 -0
  29. package/definitions/design-runtime.json +1 -0
  30. package/definitions/design.json +1469 -0
  31. package/definitions/document-runtime.json +1 -0
  32. package/definitions/document.json +758 -0
  33. package/definitions/email-settings-runtime.json +1 -0
  34. package/definitions/email-settings.json +2777 -0
  35. package/definitions/email-template-runtime.json +1 -0
  36. package/definitions/email-template.json +1441 -0
  37. package/definitions/entity-mapping-runtime.json +1 -0
  38. package/definitions/entity-mapping.json +1642 -0
  39. package/definitions/entity-runtime.json +1 -0
  40. package/definitions/entity.json +10474 -0
  41. package/definitions/environments-runtime.json +1 -0
  42. package/definitions/environments.json +539 -0
  43. package/definitions/event-catalog-runtime.json +1 -0
  44. package/definitions/event-catalog.json +1051 -0
  45. package/definitions/file-runtime.json +1 -0
  46. package/definitions/file.json +2842 -0
  47. package/definitions/iban-runtime.json +1 -0
  48. package/definitions/iban.json +132 -0
  49. package/definitions/integration-toolkit-runtime.json +1 -0
  50. package/definitions/integration-toolkit.json +7998 -0
  51. package/definitions/journey-runtime.json +1 -0
  52. package/definitions/journey.json +2603 -0
  53. package/definitions/kanban-runtime.json +1 -0
  54. package/definitions/kanban.json +1505 -0
  55. package/definitions/message-runtime.json +1 -0
  56. package/definitions/message.json +2862 -0
  57. package/definitions/metering-runtime.json +1 -0
  58. package/definitions/metering.json +2321 -0
  59. package/definitions/notes-runtime.json +1 -0
  60. package/definitions/notes.json +1531 -0
  61. package/definitions/notification-runtime.json +1 -0
  62. package/definitions/notification.json +1425 -0
  63. package/definitions/organization-runtime.json +1 -0
  64. package/definitions/organization.json +1192 -0
  65. package/definitions/partner-directory-runtime.json +1 -0
  66. package/definitions/partner-directory.json +2284 -0
  67. package/definitions/permissions-runtime.json +1 -0
  68. package/definitions/permissions.json +1515 -0
  69. package/definitions/pricing-runtime.json +1 -0
  70. package/definitions/pricing-tier-runtime.json +1 -0
  71. package/definitions/pricing-tier.json +105 -0
  72. package/definitions/pricing.json +9884 -0
  73. package/definitions/purpose-runtime.json +1 -0
  74. package/definitions/purpose.json +524 -0
  75. package/definitions/sandbox-runtime.json +1 -0
  76. package/definitions/sandbox.json +453 -0
  77. package/definitions/sharing-runtime.json +1 -0
  78. package/definitions/sharing.json +956 -0
  79. package/definitions/submission-runtime.json +1 -0
  80. package/definitions/submission.json +313 -0
  81. package/definitions/targeting-runtime.json +1 -0
  82. package/definitions/targeting.json +1474 -0
  83. package/definitions/template-variables-runtime.json +1 -0
  84. package/definitions/template-variables.json +1416 -0
  85. package/definitions/user-runtime.json +1 -0
  86. package/definitions/user.json +2460 -0
  87. package/definitions/validation-rules-runtime.json +1 -0
  88. package/definitions/validation-rules.json +1491 -0
  89. package/definitions/webhooks-runtime.json +1 -0
  90. package/definitions/webhooks.json +1634 -0
  91. package/definitions/workflow-definition-runtime.json +1 -0
  92. package/definitions/workflow-definition.json +3302 -0
  93. package/definitions/workflow-runtime.json +1 -0
  94. package/definitions/workflow.json +4248 -0
  95. package/dist/README-KX4XC2HB.js +7 -0
  96. package/dist/README-PTYV6PQI.cjs +7 -0
  97. package/dist/apis/access-token.cjs +6 -6
  98. package/dist/apis/access-token.js +1 -1
  99. package/dist/apis/address-suggestions.cjs +6 -6
  100. package/dist/apis/address-suggestions.js +1 -1
  101. package/dist/apis/address.cjs +6 -6
  102. package/dist/apis/address.js +1 -1
  103. package/dist/apis/ai-agents.cjs +6 -6
  104. package/dist/apis/ai-agents.js +1 -1
  105. package/dist/apis/app.cjs +6 -6
  106. package/dist/apis/app.js +1 -1
  107. package/dist/apis/audit-logs.cjs +6 -6
  108. package/dist/apis/audit-logs.js +1 -1
  109. package/dist/apis/automation.cjs +6 -6
  110. package/dist/apis/automation.js +1 -1
  111. package/dist/apis/billing.cjs +6 -6
  112. package/dist/apis/billing.js +1 -1
  113. package/dist/apis/blueprint-manifest.cjs +6 -6
  114. package/dist/apis/blueprint-manifest.js +1 -1
  115. package/dist/apis/consent.cjs +6 -6
  116. package/dist/apis/consent.js +1 -1
  117. package/dist/apis/customer-portal.cjs +6 -6
  118. package/dist/apis/customer-portal.js +1 -1
  119. package/dist/apis/dashboard.cjs +6 -6
  120. package/dist/apis/dashboard.js +1 -1
  121. package/dist/apis/data-governance.cjs +6 -6
  122. package/dist/apis/data-governance.js +1 -1
  123. package/dist/apis/deduplication.cjs +6 -6
  124. package/dist/apis/deduplication.js +1 -1
  125. package/dist/apis/design.cjs +6 -6
  126. package/dist/apis/design.js +1 -1
  127. package/dist/apis/document.cjs +6 -6
  128. package/dist/apis/document.js +1 -1
  129. package/dist/apis/email-settings.cjs +6 -6
  130. package/dist/apis/email-settings.js +1 -1
  131. package/dist/apis/email-template.cjs +6 -6
  132. package/dist/apis/email-template.js +1 -1
  133. package/dist/apis/entity-mapping.cjs +6 -6
  134. package/dist/apis/entity-mapping.js +1 -1
  135. package/dist/apis/entity.cjs +6 -6
  136. package/dist/apis/entity.js +1 -1
  137. package/dist/apis/environments.cjs +8 -8
  138. package/dist/apis/environments.js +2 -2
  139. package/dist/apis/event-catalog.cjs +6 -6
  140. package/dist/apis/event-catalog.js +1 -1
  141. package/dist/apis/file.cjs +6 -6
  142. package/dist/apis/file.js +1 -1
  143. package/dist/apis/iban.cjs +6 -6
  144. package/dist/apis/iban.js +1 -1
  145. package/dist/apis/integration-toolkit.cjs +6 -6
  146. package/dist/apis/integration-toolkit.js +1 -1
  147. package/dist/apis/journey.cjs +6 -6
  148. package/dist/apis/journey.js +1 -1
  149. package/dist/apis/kanban.cjs +6 -6
  150. package/dist/apis/kanban.js +1 -1
  151. package/dist/apis/message.cjs +6 -6
  152. package/dist/apis/message.js +1 -1
  153. package/dist/apis/metering.cjs +6 -6
  154. package/dist/apis/metering.js +1 -1
  155. package/dist/apis/notes.cjs +6 -6
  156. package/dist/apis/notes.js +1 -1
  157. package/dist/apis/notification.cjs +6 -6
  158. package/dist/apis/notification.js +1 -1
  159. package/dist/apis/organization.cjs +6 -6
  160. package/dist/apis/organization.js +1 -1
  161. package/dist/apis/partner-directory.cjs +6 -6
  162. package/dist/apis/partner-directory.js +1 -1
  163. package/dist/apis/permissions.cjs +6 -6
  164. package/dist/apis/permissions.js +1 -1
  165. package/dist/apis/pricing-tier.cjs +6 -6
  166. package/dist/apis/pricing-tier.js +1 -1
  167. package/dist/apis/pricing.cjs +6 -6
  168. package/dist/apis/pricing.js +1 -1
  169. package/dist/apis/purpose.cjs +6 -6
  170. package/dist/apis/purpose.js +1 -1
  171. package/dist/apis/sandbox.cjs +6 -6
  172. package/dist/apis/sandbox.js +1 -1
  173. package/dist/apis/sharing.cjs +6 -6
  174. package/dist/apis/sharing.js +1 -1
  175. package/dist/apis/submission.cjs +6 -6
  176. package/dist/apis/submission.js +1 -1
  177. package/dist/apis/targeting.cjs +6 -6
  178. package/dist/apis/targeting.js +1 -1
  179. package/dist/apis/template-variables.cjs +6 -6
  180. package/dist/apis/template-variables.js +1 -1
  181. package/dist/apis/user.cjs +6 -6
  182. package/dist/apis/user.d.cts +2 -2
  183. package/dist/apis/user.d.ts +2 -2
  184. package/dist/apis/user.js +1 -1
  185. package/dist/apis/validation-rules.cjs +6 -6
  186. package/dist/apis/validation-rules.js +1 -1
  187. package/dist/apis/webhooks.cjs +6 -6
  188. package/dist/apis/webhooks.js +1 -1
  189. package/dist/apis/workflow-definition.cjs +6 -6
  190. package/dist/apis/workflow-definition.js +1 -1
  191. package/dist/apis/workflow.cjs +6 -6
  192. package/dist/apis/workflow.js +1 -1
  193. package/dist/{chunk-6AO46HG5.js → chunk-5JN243WJ.js} +5 -5
  194. package/dist/chunk-6IMAKHA4.js +14 -0
  195. package/dist/{chunk-TXDVGTQD.cjs → chunk-BDKLBHIN.cjs} +1 -1
  196. package/dist/{chunk-MHXQX7FS.cjs → chunk-VTJQTEQX.cjs} +5 -5
  197. package/dist/environments-I6RWPVHA.js +7 -0
  198. package/dist/environments-TZYXLYXA.cjs +7 -0
  199. package/dist/{environments-runtime-L6TJCVW6.cjs → environments-runtime-5DVTRV2Z.cjs} +2 -2
  200. package/dist/{environments-runtime-BPR47PW7.js → environments-runtime-FMSNJF5S.js} +1 -1
  201. package/dist/erp-integration-runtime-JGVGQ22V.js +13 -0
  202. package/dist/erp-integration-runtime-OZ4YSTQX.cjs +13 -0
  203. package/dist/index.cjs +18 -18
  204. package/dist/index.d.cts +1 -1
  205. package/dist/index.d.ts +1 -1
  206. package/dist/index.js +12 -12
  207. package/dist/user-7ZN2XO7G.cjs +7 -0
  208. package/dist/user-ZK7BK6VY.js +7 -0
  209. package/dist/{user.d-CXqM751M.d.cts → user.d-D18fe97W.d.cts} +75 -3
  210. package/dist/{user.d-CXqM751M.d.ts → user.d-D18fe97W.d.ts} +75 -3
  211. package/docs/environments.md +129 -3
  212. package/docs/user.md +62 -8
  213. package/package.json +1 -1
  214. package/dist/README-7R2JR652.js +0 -7
  215. package/dist/README-Z5AKTGJA.cjs +0 -7
  216. package/dist/apis/erp-integration.cjs +0 -38
  217. package/dist/apis/erp-integration.d.cts +0 -5770
  218. package/dist/apis/erp-integration.d.ts +0 -5770
  219. package/dist/apis/erp-integration.js +0 -38
  220. package/dist/chunk-6OYECNL2.js +0 -14
  221. package/dist/chunk-MUNMUGB5.js +0 -14
  222. package/dist/chunk-TLH6XOTL.cjs +0 -14
  223. package/dist/environments-E3X6NYGX.js +0 -7
  224. package/dist/environments-P2JS4F5N.cjs +0 -7
  225. package/dist/erp-integration-runtime-BHHWMG4O.js +0 -5
  226. package/dist/erp-integration-runtime-Y6VWGQ3L.cjs +0 -5
  227. package/dist/user-EIEOI3OG.js +0 -7
  228. package/dist/user-NJJ7XVKB.cjs +0 -7
package/docs/user.md CHANGED
@@ -91,6 +91,7 @@ const { data } = await userClient.signUpUser(...)
91
91
  - [`UserV2`](#userv2)
92
92
  - [`User`](#user)
93
93
  - [`LoginParameters`](#loginparameters)
94
+ - [`GroupImageUri`](#groupimageuri)
94
95
  - [`CreateGroupReq`](#creategroupreq)
95
96
  - [`UpdateGroupReq`](#updategroupreq)
96
97
  - [`Group`](#group)
@@ -832,7 +833,10 @@ const { data } = await client.getGroupsForUser({
832
833
  },
833
834
  "users": [
834
835
  {}
835
- ]
836
+ ],
837
+ "image_uri": {
838
+ "gradient_colors": ["#0588f0", "#3358d4"]
839
+ }
836
840
  }
837
841
  ]
838
842
  ```
@@ -871,7 +875,8 @@ const { data } = await client.getGroups({
871
875
  "updated_at": "2024-02-08T04:44:32.246Z",
872
876
  "created_by": "123",
873
877
  "crt_assignee": {},
874
- "users": []
878
+ "users": [],
879
+ "image_uri": {}
875
880
  }
876
881
  ]
877
882
  }
@@ -892,7 +897,10 @@ const { data } = await client.createGroup(
892
897
  null,
893
898
  {
894
899
  name: 'Finance',
895
- user_ids: ['123', '456']
900
+ user_ids: ['123', '456'],
901
+ image_uri: {
902
+ gradient_colors: ['#0588f0', '#3358d4']
903
+ }
896
904
  },
897
905
  )
898
906
  ```
@@ -987,7 +995,10 @@ const { data } = await client.createGroup(
987
995
  "email_notification_setting": {},
988
996
  "properties": []
989
997
  }
990
- ]
998
+ ],
999
+ "image_uri": {
1000
+ "gradient_colors": ["#0588f0", "#3358d4"]
1001
+ }
991
1002
  }
992
1003
  ```
993
1004
 
@@ -1098,7 +1109,10 @@ const { data } = await client.getGroup({
1098
1109
  "email_notification_setting": {},
1099
1110
  "properties": []
1100
1111
  }
1101
- ]
1112
+ ],
1113
+ "image_uri": {
1114
+ "gradient_colors": ["#0588f0", "#3358d4"]
1115
+ }
1102
1116
  }
1103
1117
  ```
1104
1118
 
@@ -1119,7 +1133,10 @@ const { data } = await client.updateGroup(
1119
1133
  },
1120
1134
  {
1121
1135
  name: 'Finance',
1122
- user_ids: ['123', '456']
1136
+ user_ids: ['123', '456'],
1137
+ image_uri: {
1138
+ gradient_colors: ['#0588f0', '#3358d4']
1139
+ }
1123
1140
  },
1124
1141
  )
1125
1142
  ```
@@ -1214,7 +1231,10 @@ const { data } = await client.updateGroup(
1214
1231
  "email_notification_setting": {},
1215
1232
  "properties": []
1216
1233
  }
1217
- ]
1234
+ ],
1235
+ "image_uri": {
1236
+ "gradient_colors": ["#0588f0", "#3358d4"]
1237
+ }
1218
1238
  }
1219
1239
  ```
1220
1240
 
@@ -1338,7 +1358,10 @@ const { data } = await client.advanceUserAssignment({
1338
1358
  "email_notification_setting": {},
1339
1359
  "properties": []
1340
1360
  }
1341
- ]
1361
+ ],
1362
+ "image_uri": {
1363
+ "gradient_colors": ["#0588f0", "#3358d4"]
1364
+ }
1342
1365
  }
1343
1366
  ```
1344
1367
 
@@ -2303,12 +2326,31 @@ type LoginParameters = {
2303
2326
  }
2304
2327
  ```
2305
2328
 
2329
+ ### `GroupImageUri`
2330
+
2331
+ Group's profile image or gradient colors. Supports uploaded image URLs and generated gradient avatars.
2332
+
2333
+ ```ts
2334
+ type GroupImageUri = {
2335
+ original?: string // uri
2336
+ thumbnail_32?: string // uri
2337
+ thumbnail_64?: string // uri
2338
+ gradient_colors?: string[]
2339
+ }
2340
+ ```
2341
+
2306
2342
  ### `CreateGroupReq`
2307
2343
 
2308
2344
  ```ts
2309
2345
  type CreateGroupReq = {
2310
2346
  name: string
2311
2347
  user_ids?: string[]
2348
+ image_uri?: {
2349
+ original?: string // uri
2350
+ thumbnail_32?: string // uri
2351
+ thumbnail_64?: string // uri
2352
+ gradient_colors?: string[]
2353
+ }
2312
2354
  }
2313
2355
  ```
2314
2356
 
@@ -2318,6 +2360,12 @@ type CreateGroupReq = {
2318
2360
  type UpdateGroupReq = {
2319
2361
  name?: string
2320
2362
  user_ids?: string[]
2363
+ image_uri?: {
2364
+ original?: string // uri
2365
+ thumbnail_32?: string // uri
2366
+ thumbnail_64?: string // uri
2367
+ gradient_colors?: string[]
2368
+ }
2321
2369
  }
2322
2370
  ```
2323
2371
 
@@ -2398,6 +2446,12 @@ type Group = {
2398
2446
  value: { ... }
2399
2447
  }>
2400
2448
  }>
2449
+ image_uri?: {
2450
+ original?: string // uri
2451
+ thumbnail_32?: string // uri
2452
+ thumbnail_64?: string // uri
2453
+ gradient_colors?: string[]
2454
+ }
2401
2455
  }
2402
2456
  ```
2403
2457
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/sdk",
3
- "version": "2.3.0",
3
+ "version": "2.3.2",
4
4
  "description": "JavaScript/TypeScript SDK for epilot APIs",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -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.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.erpIntegration` | `@epilot/sdk/erp-integration` | [docs](./docs/erp-integration.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.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.sandbox` | `@epilot/sdk/sandbox` | [docs](./docs/sandbox.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
- };
@@ -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.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.erpIntegration` | `@epilot/sdk/erp-integration` | [docs](./docs/erp-integration.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.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.sandbox` | `@epilot/sdk/sandbox` | [docs](./docs/sandbox.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;
@@ -1,38 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
2
-
3
- var _chunkTLH6XOTLcjs = require('../chunk-TLH6XOTL.cjs');
4
-
5
-
6
-
7
-
8
-
9
- var _chunkMHXQX7FScjs = require('../chunk-MHXQX7FS.cjs');
10
- require('../chunk-NJK5F5TF.cjs');
11
-
12
- // src/apis/erp-integration.ts
13
- var loadDefinition = () => {
14
- const mod = _chunkTLH6XOTLcjs.require_erp_integration_runtime.call(void 0, );
15
- return _chunkMHXQX7FScjs.expand.call(void 0, _nullishCoalesce(mod.default, () => ( mod)));
16
- };
17
- var _instance = null;
18
- var resolve = () => {
19
- if (!_instance) {
20
- const def = loadDefinition();
21
- _instance = _chunkMHXQX7FScjs.createApiClient.call(void 0, { definition: def, apiName: "erpIntegration" });
22
- }
23
- return _instance;
24
- };
25
- var _handle = _chunkMHXQX7FScjs.createApiHandle.call(void 0, {
26
- resolveClient: resolve,
27
- createClient: () => _chunkMHXQX7FScjs.createApiClient.call(void 0, { definition: loadDefinition(), apiName: "erpIntegration" }),
28
- apiName: "erpIntegration"
29
- });
30
- var getClient = _handle.getClient;
31
- var createClient = _handle.createClient;
32
- var erpIntegration = _handle;
33
-
34
-
35
-
36
-
37
-
38
- exports.authorize = _chunkMHXQX7FScjs.authorize; exports.createClient = createClient; exports.erpIntegration = erpIntegration; exports.getClient = getClient;