@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.
Files changed (134) hide show
  1. package/definitions/automation-runtime.json +1 -1
  2. package/definitions/automation.json +207 -2
  3. package/dist/README-7F36AG5O.js +7 -0
  4. package/dist/README-I7JMAFA4.cjs +7 -0
  5. package/dist/apis/access-token.cjs +6 -6
  6. package/dist/apis/access-token.js +1 -1
  7. package/dist/apis/address-suggestions.cjs +6 -6
  8. package/dist/apis/address-suggestions.js +1 -1
  9. package/dist/apis/address.cjs +6 -6
  10. package/dist/apis/address.js +1 -1
  11. package/dist/apis/ai-agents.cjs +6 -6
  12. package/dist/apis/ai-agents.js +1 -1
  13. package/dist/apis/app.cjs +6 -6
  14. package/dist/apis/app.js +1 -1
  15. package/dist/apis/audit-logs.cjs +6 -6
  16. package/dist/apis/audit-logs.js +1 -1
  17. package/dist/apis/automation.cjs +8 -8
  18. package/dist/apis/automation.d.cts +2 -2
  19. package/dist/apis/automation.d.ts +2 -2
  20. package/dist/apis/automation.js +2 -2
  21. package/dist/apis/billing.cjs +6 -6
  22. package/dist/apis/billing.js +1 -1
  23. package/dist/apis/blueprint-manifest.cjs +6 -6
  24. package/dist/apis/blueprint-manifest.js +1 -1
  25. package/dist/apis/calendar.cjs +6 -6
  26. package/dist/apis/calendar.js +1 -1
  27. package/dist/apis/chat.cjs +6 -6
  28. package/dist/apis/chat.js +1 -1
  29. package/dist/apis/configuration-hub.cjs +6 -6
  30. package/dist/apis/configuration-hub.js +1 -1
  31. package/dist/apis/consent.cjs +6 -6
  32. package/dist/apis/consent.js +1 -1
  33. package/dist/apis/customer-portal.cjs +6 -6
  34. package/dist/apis/customer-portal.js +1 -1
  35. package/dist/apis/dashboard.cjs +6 -6
  36. package/dist/apis/dashboard.js +1 -1
  37. package/dist/apis/data-governance.cjs +6 -6
  38. package/dist/apis/data-governance.js +1 -1
  39. package/dist/apis/deduplication.cjs +6 -6
  40. package/dist/apis/deduplication.js +1 -1
  41. package/dist/apis/design.cjs +6 -6
  42. package/dist/apis/design.js +1 -1
  43. package/dist/apis/document.cjs +6 -6
  44. package/dist/apis/document.js +1 -1
  45. package/dist/apis/email-settings.cjs +6 -6
  46. package/dist/apis/email-settings.js +1 -1
  47. package/dist/apis/email-template.cjs +6 -6
  48. package/dist/apis/email-template.js +1 -1
  49. package/dist/apis/entity-mapping.cjs +6 -6
  50. package/dist/apis/entity-mapping.js +1 -1
  51. package/dist/apis/entity.cjs +6 -6
  52. package/dist/apis/entity.js +1 -1
  53. package/dist/apis/environments.cjs +6 -6
  54. package/dist/apis/environments.js +1 -1
  55. package/dist/apis/event-catalog.cjs +6 -6
  56. package/dist/apis/event-catalog.js +1 -1
  57. package/dist/apis/file.cjs +6 -6
  58. package/dist/apis/file.js +1 -1
  59. package/dist/apis/iban.cjs +6 -6
  60. package/dist/apis/iban.js +1 -1
  61. package/dist/apis/integration-toolkit.cjs +6 -6
  62. package/dist/apis/integration-toolkit.js +1 -1
  63. package/dist/apis/journey.cjs +6 -6
  64. package/dist/apis/journey.js +1 -1
  65. package/dist/apis/kanban.cjs +6 -6
  66. package/dist/apis/kanban.js +1 -1
  67. package/dist/apis/message.cjs +6 -6
  68. package/dist/apis/message.js +1 -1
  69. package/dist/apis/metering.cjs +6 -6
  70. package/dist/apis/metering.js +1 -1
  71. package/dist/apis/notes.cjs +6 -6
  72. package/dist/apis/notes.js +1 -1
  73. package/dist/apis/notification.cjs +6 -6
  74. package/dist/apis/notification.js +1 -1
  75. package/dist/apis/organization.cjs +6 -6
  76. package/dist/apis/organization.js +1 -1
  77. package/dist/apis/partner-directory.cjs +6 -6
  78. package/dist/apis/partner-directory.js +1 -1
  79. package/dist/apis/permissions.cjs +6 -6
  80. package/dist/apis/permissions.js +1 -1
  81. package/dist/apis/pricing-tier.cjs +6 -6
  82. package/dist/apis/pricing-tier.js +1 -1
  83. package/dist/apis/pricing.cjs +6 -6
  84. package/dist/apis/pricing.js +1 -1
  85. package/dist/apis/purpose.cjs +6 -6
  86. package/dist/apis/purpose.js +1 -1
  87. package/dist/apis/query.cjs +6 -6
  88. package/dist/apis/query.js +1 -1
  89. package/dist/apis/sandbox.cjs +6 -6
  90. package/dist/apis/sandbox.js +1 -1
  91. package/dist/apis/sharing.cjs +6 -6
  92. package/dist/apis/sharing.js +1 -1
  93. package/dist/apis/snapshot.cjs +6 -6
  94. package/dist/apis/snapshot.js +1 -1
  95. package/dist/apis/submission.cjs +6 -6
  96. package/dist/apis/submission.js +1 -1
  97. package/dist/apis/target.cjs +6 -6
  98. package/dist/apis/target.js +1 -1
  99. package/dist/apis/targeting.cjs +6 -6
  100. package/dist/apis/targeting.js +1 -1
  101. package/dist/apis/template-variables.cjs +6 -6
  102. package/dist/apis/template-variables.js +1 -1
  103. package/dist/apis/user.cjs +6 -6
  104. package/dist/apis/user.js +1 -1
  105. package/dist/apis/validation-rules.cjs +6 -6
  106. package/dist/apis/validation-rules.js +1 -1
  107. package/dist/apis/webhooks.cjs +6 -6
  108. package/dist/apis/webhooks.js +1 -1
  109. package/dist/apis/workflow-definition.cjs +6 -6
  110. package/dist/apis/workflow-definition.js +1 -1
  111. package/dist/apis/workflow.cjs +6 -6
  112. package/dist/apis/workflow.js +1 -1
  113. package/dist/automation-CDMOEYVP.cjs +7 -0
  114. package/dist/automation-XFMSH7Y3.js +7 -0
  115. package/dist/{automation-runtime-RM5EOZH2.cjs → automation-runtime-KLCXZKEC.cjs} +2 -2
  116. package/dist/{automation-runtime-ORW5BVCD.js → automation-runtime-Y52HM57N.js} +1 -1
  117. package/dist/{automation.d-Bp45eKlU.d.cts → automation.d-2biAmiMc.d.cts} +214 -6
  118. package/dist/{automation.d-Bp45eKlU.d.ts → automation.d-2biAmiMc.d.ts} +214 -6
  119. package/dist/{chunk-R6RAUX3Z.js → chunk-KZXOYL5D.js} +3 -3
  120. package/dist/chunk-QW3ROE6H.js +14 -0
  121. package/dist/chunk-WOUASZJW.cjs +14 -0
  122. package/dist/{chunk-4GR5MDWN.cjs → chunk-YCTBOY3T.cjs} +3 -3
  123. package/dist/index.cjs +10 -10
  124. package/dist/index.d.cts +1 -1
  125. package/dist/index.d.ts +1 -1
  126. package/dist/index.js +2 -2
  127. package/docs/automation.md +99 -17
  128. package/package.json +1 -1
  129. package/dist/README-NBWAQWQS.js +0 -7
  130. package/dist/README-XCIDDEAE.cjs +0 -7
  131. package/dist/automation-FTFGFHT7.cjs +0 -7
  132. package/dist/automation-HJGT6QK5.js +0 -7
  133. package/dist/chunk-ADSWGLIV.cjs +0 -14
  134. package/dist/chunk-LCE7N4ZL.js +0 -14
@@ -1 +1 @@
1
- {"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"],["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"}
1
+ {"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"}
@@ -79,6 +79,15 @@
79
79
  "example": "wfABCDEFGH"
80
80
  }
81
81
  },
82
+ {
83
+ "name": "trigger_event_name",
84
+ "in": "query",
85
+ "description": "Filter by Event Catalog event name. Returns only automations that have an event_catalog trigger for this event.",
86
+ "schema": {
87
+ "type": "string",
88
+ "example": "CustomerRequestSubmitted"
89
+ }
90
+ },
82
91
  {
83
92
  "name": "include_flows",
84
93
  "in": "query",
@@ -1249,6 +1258,9 @@
1249
1258
  },
1250
1259
  {
1251
1260
  "$ref": "#/components/schemas/FlowsTrigger"
1261
+ },
1262
+ {
1263
+ "$ref": "#/components/schemas/EventCatalogTrigger"
1252
1264
  }
1253
1265
  ]
1254
1266
  },
@@ -1426,14 +1438,25 @@
1426
1438
  },
1427
1439
  "source_type": {
1428
1440
  "type": "string",
1429
- "description": "How source_path is interpreted. 'journey-multi-select' is the v1 source type (journey card block with multi-select). Future source types (e.g. 'previous-action-outputs', 'entity-relation') will be added here.\n",
1441
+ "description": "How source_path is interpreted. 'journey-multi-select' is the v1 source type (journey card block with multi-select). 'journey-file-upload' iterates the files uploaded in a journey file upload block: source_path points at the submission's `_files.$relation` array, `filter_tags` narrows it down to the block's files and every item is treated as a `file` entity reference. Future source types (e.g. 'previous-action-outputs', 'entity-relation') will be added here.\n",
1430
1442
  "enum": [
1431
1443
  "journey-multi-select",
1444
+ "journey-file-upload",
1432
1445
  "previous-action-outputs",
1433
1446
  "entity-relation"
1434
1447
  ],
1435
1448
  "default": "journey-multi-select"
1436
1449
  },
1450
+ "filter_tags": {
1451
+ "type": "array",
1452
+ "description": "Only iterate items of the resolved array whose `_tags` contain every listed tag. Meant for relation arrays such as `submission._files.$relation`, where the journey tags each file relation with the upload block it came from.\n",
1453
+ "items": {
1454
+ "type": "string"
1455
+ },
1456
+ "example": [
1457
+ "_hidden_ 2a4b1c3d-0000-4000-8000-000000000000 - Dokumente"
1458
+ ]
1459
+ },
1437
1460
  "length": {
1438
1461
  "type": "integer",
1439
1462
  "description": "Maximum number of iterations. 0 / omitted = iterate the full resolved array.\n",
@@ -2568,6 +2591,27 @@
2568
2591
  }
2569
2592
  }
2570
2593
  },
2594
+ "match_user_skills": {
2595
+ "type": "boolean",
2596
+ "description": "Candidate condition for `sequential` and `even_distribution`: when true,\nonly assign to users whose skills (tags) match a label on the entity\nbeing assigned. Opt-in; defaults to false. An entity carrying no\nnamespaced label matches nobody, so the fallback applies.\n",
2597
+ "default": false
2598
+ },
2599
+ "required_skill_categories": {
2600
+ "type": "array",
2601
+ "description": "Candidate condition (with match_user_skills): label families\n(taxonomy slugs) that must match. Only categories the entity actually\ncarries a label in are scored: a user qualifies if it shares a label with\nthe entity within each of those. A required category the entity has no\nlabel in is a free pass and gates nobody — so when the entity has no label\nin any required category, every candidate passes this filter. Note this\nis the opposite of an entity carrying no namespaced label at all, which\nmatches nobody — see `match_user_skills`. Leave empty to match on any\nlabel (flat OR across all categories).\n",
2602
+ "items": {
2603
+ "type": "string"
2604
+ }
2605
+ },
2606
+ "skill_match_mode": {
2607
+ "type": "string",
2608
+ "description": "How strictly required skill categories are matched (applies with\nmatch_user_skills and required skill categories set).\n- require_all: hard match (default) — a user must match every required\n category the entity has a label in.\n- prefer: soft match — prefer the best-matching users, relaxing to\n fewer categories only when no better match exists; a user matching\n no category is never eligible (the fallback then applies).\n",
2609
+ "enum": [
2610
+ "require_all",
2611
+ "prefer"
2612
+ ],
2613
+ "default": "require_all"
2614
+ },
2571
2615
  "fallback": {
2572
2616
  "type": "string",
2573
2617
  "description": "What to do when no assignable principal resolves, e.g. an empty or\nfully ineligible `candidate_group`.\n- leave_unassigned: write nothing at all, leaving the attribute as it\n was. Not the same as writing an empty array, which would clear an\n existing assignment.\n- assign_to_fallback: write `fallback_assignees` instead.\n",
@@ -3711,10 +3755,12 @@
3711
3755
  },
3712
3756
  "originType": {
3713
3757
  "type": "string",
3758
+ "description": "`event` reads the operand from the trigger's Event Catalog payload instead of an entity: `attribute` is then a dot path into the payload (e.g. `ticket.subject`). Only valid with `origin: trigger` on flows started by an EventCatalogTrigger.\n",
3714
3759
  "enum": [
3715
3760
  "entity",
3716
3761
  "workflow",
3717
- "journey_block"
3762
+ "journey_block",
3763
+ "event"
3718
3764
  ]
3719
3765
  },
3720
3766
  "schema": {
@@ -4004,6 +4050,9 @@
4004
4050
  },
4005
4051
  {
4006
4052
  "$ref": "#/components/schemas/TriggerEventMessaging"
4053
+ },
4054
+ {
4055
+ "$ref": "#/components/schemas/TriggerEventEventCatalog"
4007
4056
  }
4008
4057
  ]
4009
4058
  },
@@ -4300,6 +4349,92 @@
4300
4349
  "operation_type"
4301
4350
  ]
4302
4351
  },
4352
+ "TriggerEventEventCatalog": {
4353
+ "type": "object",
4354
+ "description": "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.\n",
4355
+ "properties": {
4356
+ "type": {
4357
+ "type": "string",
4358
+ "enum": [
4359
+ "event_catalog"
4360
+ ]
4361
+ },
4362
+ "org_id": {
4363
+ "type": "string",
4364
+ "example": "123"
4365
+ },
4366
+ "entity_id": {
4367
+ "$ref": "#/components/schemas/EntityId"
4368
+ },
4369
+ "entity_node_id": {
4370
+ "type": "string",
4371
+ "description": "Node id of the event's entity graph that was resolved to `entity_id`",
4372
+ "example": "ticket"
4373
+ },
4374
+ "event_id": {
4375
+ "type": "string",
4376
+ "description": "Event Catalog event id (ULID) of the published event",
4377
+ "example": "01K3ZK8QZ7Y7Q2M8W1V3N4X5P6"
4378
+ },
4379
+ "event_name": {
4380
+ "type": "string",
4381
+ "example": "CustomerRequestSubmitted"
4382
+ },
4383
+ "event_version": {
4384
+ "type": "string",
4385
+ "description": "Version the payload was delivered in (the version pinned on the trigger)",
4386
+ "example": "1.1"
4387
+ },
4388
+ "published_version": {
4389
+ "type": "string",
4390
+ "description": "Version the event was originally published with, before downgrading to `event_version`",
4391
+ "example": "1.2"
4392
+ },
4393
+ "event_time": {
4394
+ "type": "string",
4395
+ "format": "date-time"
4396
+ },
4397
+ "trigger_source_type": {
4398
+ "type": "string",
4399
+ "description": "How the event was triggered in the catalog (api | automation | operation | portal_user)",
4400
+ "example": "operation"
4401
+ },
4402
+ "trigger_source": {
4403
+ "type": "string",
4404
+ "description": "Opaque source reference from the catalog (e.g. activity id, automation execution id)"
4405
+ },
4406
+ "payload_ref": {
4407
+ "$ref": "#/components/schemas/TriggerEventPayloadRef"
4408
+ }
4409
+ },
4410
+ "required": [
4411
+ "type",
4412
+ "org_id",
4413
+ "entity_id",
4414
+ "entity_node_id",
4415
+ "event_id",
4416
+ "event_name",
4417
+ "event_version"
4418
+ ]
4419
+ },
4420
+ "TriggerEventPayloadRef": {
4421
+ "type": "object",
4422
+ "description": "S3 reference to the stored trigger event payload (`_downgrades` stripped, downgraded to the pinned version)",
4423
+ "properties": {
4424
+ "bucket": {
4425
+ "type": "string",
4426
+ "example": "automation-trigger-payloads-prod"
4427
+ },
4428
+ "key": {
4429
+ "type": "string",
4430
+ "example": "trigger-payloads/123/6c8e5d9a-7f1b-4c2e-9d3a-0b1c2d3e4f5a.json"
4431
+ }
4432
+ },
4433
+ "required": [
4434
+ "bucket",
4435
+ "key"
4436
+ ]
4437
+ },
4303
4438
  "ApiCallerContext": {
4304
4439
  "type": "object",
4305
4440
  "additionalProperties": true,
@@ -5422,6 +5557,76 @@
5422
5557
  }
5423
5558
  ]
5424
5559
  },
5560
+ "EventCatalogTrigger": {
5561
+ "description": "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.\n",
5562
+ "allOf": [
5563
+ {
5564
+ "$ref": "#/components/schemas/AutomationTrigger"
5565
+ },
5566
+ {
5567
+ "type": "object",
5568
+ "properties": {
5569
+ "type": {
5570
+ "type": "string",
5571
+ "enum": [
5572
+ "event_catalog"
5573
+ ]
5574
+ },
5575
+ "configuration": {
5576
+ "type": "object",
5577
+ "properties": {
5578
+ "event_name": {
5579
+ "type": "string",
5580
+ "description": "Name of the Event Catalog event that starts this flow",
5581
+ "example": "CustomerRequestSubmitted"
5582
+ },
5583
+ "event_version": {
5584
+ "type": "string",
5585
+ "description": "Event version (MAJOR.MINOR) this trigger is pinned to. Payloads published in a newer version are downgraded to this version before the flow runs, so field references in conditions and actions stay stable.\n",
5586
+ "example": "1.1"
5587
+ },
5588
+ "entity_node_id": {
5589
+ "type": "string",
5590
+ "description": "Id of the cardinality-one node in the event's entity graph whose entity becomes the execution's main entity (the entity actions operate on).\n",
5591
+ "example": "ticket"
5592
+ },
5593
+ "entity_schema": {
5594
+ "type": "string",
5595
+ "description": "Schema of the entity behind `entity_node_id`, denormalized from the event definition at configuration time",
5596
+ "example": "ticket"
5597
+ },
5598
+ "ignore_automation_triggered": {
5599
+ "type": "boolean",
5600
+ "default": true,
5601
+ "description": "When true (default), events that were emitted by an automation (`_trigger_source_type: automation`) do not start this flow. This prevents automation → event → automation chains unless explicitly enabled.\n"
5602
+ }
5603
+ },
5604
+ "required": [
5605
+ "event_name",
5606
+ "event_version",
5607
+ "entity_node_id",
5608
+ "entity_schema"
5609
+ ]
5610
+ }
5611
+ },
5612
+ "required": [
5613
+ "type",
5614
+ "configuration"
5615
+ ]
5616
+ }
5617
+ ],
5618
+ "example": {
5619
+ "id": "12d4f45a-1883-4841-a94c-5928cb338a94",
5620
+ "type": "event_catalog",
5621
+ "configuration": {
5622
+ "event_name": "CustomerRequestSubmitted",
5623
+ "event_version": "1.1",
5624
+ "entity_node_id": "ticket",
5625
+ "entity_schema": "ticket",
5626
+ "ignore_automation_triggered": true
5627
+ }
5628
+ }
5629
+ },
5425
5630
  "TriggerCondition": {
5426
5631
  "type": "object",
5427
5632
  "properties": {
@@ -0,0 +1,7 @@
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.chat` | `@epilot/sdk/chat` | [docs](./docs/chat.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
+ };
@@ -0,0 +1,7 @@
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.chat` | `@epilot/sdk/chat` | [docs](./docs/chat.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;
@@ -6,25 +6,25 @@ var _chunkZMBA3WV4cjs = require('../chunk-ZMBA3WV4.cjs');
6
6
 
7
7
 
8
8
 
9
- var _chunk4GR5MDWNcjs = require('../chunk-4GR5MDWN.cjs');
9
+ var _chunkYCTBOY3Tcjs = require('../chunk-YCTBOY3T.cjs');
10
10
  require('../chunk-NJK5F5TF.cjs');
11
11
 
12
12
  // src/apis/access-token.ts
13
13
  var loadDefinition = () => {
14
14
  const mod = _chunkZMBA3WV4cjs.require_access_token_runtime.call(void 0, );
15
- return _chunk4GR5MDWNcjs.expand.call(void 0, _nullishCoalesce(mod.default, () => ( mod)));
15
+ return _chunkYCTBOY3Tcjs.expand.call(void 0, _nullishCoalesce(mod.default, () => ( mod)));
16
16
  };
17
17
  var _instance = null;
18
18
  var resolve = () => {
19
19
  if (!_instance) {
20
20
  const def = loadDefinition();
21
- _instance = _chunk4GR5MDWNcjs.createApiClient.call(void 0, { definition: def, apiName: "accessToken" });
21
+ _instance = _chunkYCTBOY3Tcjs.createApiClient.call(void 0, { definition: def, apiName: "accessToken" });
22
22
  }
23
23
  return _instance;
24
24
  };
25
- var _handle = _chunk4GR5MDWNcjs.createApiHandle.call(void 0, {
25
+ var _handle = _chunkYCTBOY3Tcjs.createApiHandle.call(void 0, {
26
26
  resolveClient: resolve,
27
- createClient: () => _chunk4GR5MDWNcjs.createApiClient.call(void 0, { definition: loadDefinition(), apiName: "accessToken" }),
27
+ createClient: () => _chunkYCTBOY3Tcjs.createApiClient.call(void 0, { definition: loadDefinition(), apiName: "accessToken" }),
28
28
  apiName: "accessToken"
29
29
  });
30
30
  var getClient = _handle.getClient;
@@ -35,4 +35,4 @@ var accessToken = _handle;
35
35
 
36
36
 
37
37
 
38
- exports.accessToken = accessToken; exports.authorize = _chunk4GR5MDWNcjs.authorize; exports.createClient = createClient; exports.getClient = getClient;
38
+ exports.accessToken = accessToken; exports.authorize = _chunkYCTBOY3Tcjs.authorize; exports.createClient = createClient; exports.getClient = getClient;
@@ -6,7 +6,7 @@ import {
6
6
  createApiClient,
7
7
  createApiHandle,
8
8
  expand
9
- } from "../chunk-R6RAUX3Z.js";
9
+ } from "../chunk-KZXOYL5D.js";
10
10
  import "../chunk-YPSWSI3M.js";
11
11
 
12
12
  // src/apis/access-token.ts
@@ -6,25 +6,25 @@ var _chunkLKRBFBFNcjs = require('../chunk-LKRBFBFN.cjs');
6
6
 
7
7
 
8
8
 
9
- var _chunk4GR5MDWNcjs = require('../chunk-4GR5MDWN.cjs');
9
+ var _chunkYCTBOY3Tcjs = require('../chunk-YCTBOY3T.cjs');
10
10
  require('../chunk-NJK5F5TF.cjs');
11
11
 
12
12
  // src/apis/address-suggestions.ts
13
13
  var loadDefinition = () => {
14
14
  const mod = _chunkLKRBFBFNcjs.require_address_suggestions_runtime.call(void 0, );
15
- return _chunk4GR5MDWNcjs.expand.call(void 0, _nullishCoalesce(mod.default, () => ( mod)));
15
+ return _chunkYCTBOY3Tcjs.expand.call(void 0, _nullishCoalesce(mod.default, () => ( mod)));
16
16
  };
17
17
  var _instance = null;
18
18
  var resolve = () => {
19
19
  if (!_instance) {
20
20
  const def = loadDefinition();
21
- _instance = _chunk4GR5MDWNcjs.createApiClient.call(void 0, { definition: def, apiName: "addressSuggestions" });
21
+ _instance = _chunkYCTBOY3Tcjs.createApiClient.call(void 0, { definition: def, apiName: "addressSuggestions" });
22
22
  }
23
23
  return _instance;
24
24
  };
25
- var _handle = _chunk4GR5MDWNcjs.createApiHandle.call(void 0, {
25
+ var _handle = _chunkYCTBOY3Tcjs.createApiHandle.call(void 0, {
26
26
  resolveClient: resolve,
27
- createClient: () => _chunk4GR5MDWNcjs.createApiClient.call(void 0, { definition: loadDefinition(), apiName: "addressSuggestions" }),
27
+ createClient: () => _chunkYCTBOY3Tcjs.createApiClient.call(void 0, { definition: loadDefinition(), apiName: "addressSuggestions" }),
28
28
  apiName: "addressSuggestions"
29
29
  });
30
30
  var getClient = _handle.getClient;
@@ -35,4 +35,4 @@ var addressSuggestions = _handle;
35
35
 
36
36
 
37
37
 
38
- exports.addressSuggestions = addressSuggestions; exports.authorize = _chunk4GR5MDWNcjs.authorize; exports.createClient = createClient; exports.getClient = getClient;
38
+ exports.addressSuggestions = addressSuggestions; exports.authorize = _chunkYCTBOY3Tcjs.authorize; exports.createClient = createClient; exports.getClient = getClient;
@@ -6,7 +6,7 @@ import {
6
6
  createApiClient,
7
7
  createApiHandle,
8
8
  expand
9
- } from "../chunk-R6RAUX3Z.js";
9
+ } from "../chunk-KZXOYL5D.js";
10
10
  import "../chunk-YPSWSI3M.js";
11
11
 
12
12
  // src/apis/address-suggestions.ts
@@ -6,25 +6,25 @@ var _chunkT67ZXTVGcjs = require('../chunk-T67ZXTVG.cjs');
6
6
 
7
7
 
8
8
 
9
- var _chunk4GR5MDWNcjs = require('../chunk-4GR5MDWN.cjs');
9
+ var _chunkYCTBOY3Tcjs = require('../chunk-YCTBOY3T.cjs');
10
10
  require('../chunk-NJK5F5TF.cjs');
11
11
 
12
12
  // src/apis/address.ts
13
13
  var loadDefinition = () => {
14
14
  const mod = _chunkT67ZXTVGcjs.require_address_runtime.call(void 0, );
15
- return _chunk4GR5MDWNcjs.expand.call(void 0, _nullishCoalesce(mod.default, () => ( mod)));
15
+ return _chunkYCTBOY3Tcjs.expand.call(void 0, _nullishCoalesce(mod.default, () => ( mod)));
16
16
  };
17
17
  var _instance = null;
18
18
  var resolve = () => {
19
19
  if (!_instance) {
20
20
  const def = loadDefinition();
21
- _instance = _chunk4GR5MDWNcjs.createApiClient.call(void 0, { definition: def, apiName: "address" });
21
+ _instance = _chunkYCTBOY3Tcjs.createApiClient.call(void 0, { definition: def, apiName: "address" });
22
22
  }
23
23
  return _instance;
24
24
  };
25
- var _handle = _chunk4GR5MDWNcjs.createApiHandle.call(void 0, {
25
+ var _handle = _chunkYCTBOY3Tcjs.createApiHandle.call(void 0, {
26
26
  resolveClient: resolve,
27
- createClient: () => _chunk4GR5MDWNcjs.createApiClient.call(void 0, { definition: loadDefinition(), apiName: "address" }),
27
+ createClient: () => _chunkYCTBOY3Tcjs.createApiClient.call(void 0, { definition: loadDefinition(), apiName: "address" }),
28
28
  apiName: "address"
29
29
  });
30
30
  var getClient = _handle.getClient;
@@ -35,4 +35,4 @@ var address = _handle;
35
35
 
36
36
 
37
37
 
38
- exports.address = address; exports.authorize = _chunk4GR5MDWNcjs.authorize; exports.createClient = createClient; exports.getClient = getClient;
38
+ exports.address = address; exports.authorize = _chunkYCTBOY3Tcjs.authorize; exports.createClient = createClient; exports.getClient = getClient;
@@ -6,7 +6,7 @@ import {
6
6
  createApiClient,
7
7
  createApiHandle,
8
8
  expand
9
- } from "../chunk-R6RAUX3Z.js";
9
+ } from "../chunk-KZXOYL5D.js";
10
10
  import "../chunk-YPSWSI3M.js";
11
11
 
12
12
  // src/apis/address.ts
@@ -6,25 +6,25 @@ var _chunkGD6KHA54cjs = require('../chunk-GD6KHA54.cjs');
6
6
 
7
7
 
8
8
 
9
- var _chunk4GR5MDWNcjs = require('../chunk-4GR5MDWN.cjs');
9
+ var _chunkYCTBOY3Tcjs = require('../chunk-YCTBOY3T.cjs');
10
10
  require('../chunk-NJK5F5TF.cjs');
11
11
 
12
12
  // src/apis/ai-agents.ts
13
13
  var loadDefinition = () => {
14
14
  const mod = _chunkGD6KHA54cjs.require_ai_agents_runtime.call(void 0, );
15
- return _chunk4GR5MDWNcjs.expand.call(void 0, _nullishCoalesce(mod.default, () => ( mod)));
15
+ return _chunkYCTBOY3Tcjs.expand.call(void 0, _nullishCoalesce(mod.default, () => ( mod)));
16
16
  };
17
17
  var _instance = null;
18
18
  var resolve = () => {
19
19
  if (!_instance) {
20
20
  const def = loadDefinition();
21
- _instance = _chunk4GR5MDWNcjs.createApiClient.call(void 0, { definition: def, apiName: "aiAgents" });
21
+ _instance = _chunkYCTBOY3Tcjs.createApiClient.call(void 0, { definition: def, apiName: "aiAgents" });
22
22
  }
23
23
  return _instance;
24
24
  };
25
- var _handle = _chunk4GR5MDWNcjs.createApiHandle.call(void 0, {
25
+ var _handle = _chunkYCTBOY3Tcjs.createApiHandle.call(void 0, {
26
26
  resolveClient: resolve,
27
- createClient: () => _chunk4GR5MDWNcjs.createApiClient.call(void 0, { definition: loadDefinition(), apiName: "aiAgents" }),
27
+ createClient: () => _chunkYCTBOY3Tcjs.createApiClient.call(void 0, { definition: loadDefinition(), apiName: "aiAgents" }),
28
28
  apiName: "aiAgents"
29
29
  });
30
30
  var getClient = _handle.getClient;
@@ -35,4 +35,4 @@ var aiAgents = _handle;
35
35
 
36
36
 
37
37
 
38
- exports.aiAgents = aiAgents; exports.authorize = _chunk4GR5MDWNcjs.authorize; exports.createClient = createClient; exports.getClient = getClient;
38
+ exports.aiAgents = aiAgents; exports.authorize = _chunkYCTBOY3Tcjs.authorize; exports.createClient = createClient; exports.getClient = getClient;
@@ -6,7 +6,7 @@ import {
6
6
  createApiClient,
7
7
  createApiHandle,
8
8
  expand
9
- } from "../chunk-R6RAUX3Z.js";
9
+ } from "../chunk-KZXOYL5D.js";
10
10
  import "../chunk-YPSWSI3M.js";
11
11
 
12
12
  // src/apis/ai-agents.ts
package/dist/apis/app.cjs CHANGED
@@ -6,25 +6,25 @@ var _chunkN2P6RELZcjs = require('../chunk-N2P6RELZ.cjs');
6
6
 
7
7
 
8
8
 
9
- var _chunk4GR5MDWNcjs = require('../chunk-4GR5MDWN.cjs');
9
+ var _chunkYCTBOY3Tcjs = require('../chunk-YCTBOY3T.cjs');
10
10
  require('../chunk-NJK5F5TF.cjs');
11
11
 
12
12
  // src/apis/app.ts
13
13
  var loadDefinition = () => {
14
14
  const mod = _chunkN2P6RELZcjs.require_app_runtime.call(void 0, );
15
- return _chunk4GR5MDWNcjs.expand.call(void 0, _nullishCoalesce(mod.default, () => ( mod)));
15
+ return _chunkYCTBOY3Tcjs.expand.call(void 0, _nullishCoalesce(mod.default, () => ( mod)));
16
16
  };
17
17
  var _instance = null;
18
18
  var resolve = () => {
19
19
  if (!_instance) {
20
20
  const def = loadDefinition();
21
- _instance = _chunk4GR5MDWNcjs.createApiClient.call(void 0, { definition: def, apiName: "app" });
21
+ _instance = _chunkYCTBOY3Tcjs.createApiClient.call(void 0, { definition: def, apiName: "app" });
22
22
  }
23
23
  return _instance;
24
24
  };
25
- var _handle = _chunk4GR5MDWNcjs.createApiHandle.call(void 0, {
25
+ var _handle = _chunkYCTBOY3Tcjs.createApiHandle.call(void 0, {
26
26
  resolveClient: resolve,
27
- createClient: () => _chunk4GR5MDWNcjs.createApiClient.call(void 0, { definition: loadDefinition(), apiName: "app" }),
27
+ createClient: () => _chunkYCTBOY3Tcjs.createApiClient.call(void 0, { definition: loadDefinition(), apiName: "app" }),
28
28
  apiName: "app"
29
29
  });
30
30
  var getClient = _handle.getClient;
@@ -35,4 +35,4 @@ var app = _handle;
35
35
 
36
36
 
37
37
 
38
- exports.app = app; exports.authorize = _chunk4GR5MDWNcjs.authorize; exports.createClient = createClient; exports.getClient = getClient;
38
+ exports.app = app; exports.authorize = _chunkYCTBOY3Tcjs.authorize; exports.createClient = createClient; exports.getClient = getClient;
package/dist/apis/app.js CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  createApiClient,
7
7
  createApiHandle,
8
8
  expand
9
- } from "../chunk-R6RAUX3Z.js";
9
+ } from "../chunk-KZXOYL5D.js";
10
10
  import "../chunk-YPSWSI3M.js";
11
11
 
12
12
  // src/apis/app.ts