@epilot/sdk 2.20.25 → 2.20.27

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 (246) hide show
  1. package/definitions/access-token-runtime.json +1 -0
  2. package/definitions/access-token.json +1025 -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 +2863 -0
  9. package/definitions/app-runtime.json +1 -0
  10. package/definitions/app.json +5994 -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 +5979 -0
  15. package/definitions/billing-runtime.json +1 -0
  16. package/definitions/billing.json +2394 -0
  17. package/definitions/blueprint-manifest-runtime.json +1 -0
  18. package/definitions/blueprint-manifest.json +7817 -0
  19. package/definitions/calendar-runtime.json +1 -0
  20. package/definitions/calendar.json +2904 -0
  21. package/definitions/chat-runtime.json +1 -0
  22. package/definitions/chat.json +2909 -0
  23. package/definitions/configuration-hub-runtime.json +1 -0
  24. package/definitions/configuration-hub.json +2250 -0
  25. package/definitions/consent-runtime.json +1 -0
  26. package/definitions/consent.json +344 -0
  27. package/definitions/customer-portal-runtime.json +1 -0
  28. package/definitions/customer-portal.json +21181 -0
  29. package/definitions/dashboard-runtime.json +1 -0
  30. package/definitions/dashboard.json +1355 -0
  31. package/definitions/data-governance-runtime.json +1 -0
  32. package/definitions/data-governance.json +1126 -0
  33. package/definitions/deduplication-runtime.json +1 -0
  34. package/definitions/deduplication.json +782 -0
  35. package/definitions/design-runtime.json +1 -0
  36. package/definitions/design.json +1827 -0
  37. package/definitions/document-runtime.json +1 -0
  38. package/definitions/document.json +972 -0
  39. package/definitions/email-settings-runtime.json +1 -0
  40. package/definitions/email-settings.json +3736 -0
  41. package/definitions/email-template-runtime.json +1 -0
  42. package/definitions/email-template.json +1441 -0
  43. package/definitions/entity-mapping-runtime.json +1 -0
  44. package/definitions/entity-mapping.json +1852 -0
  45. package/definitions/entity-runtime.json +1 -0
  46. package/definitions/entity.json +11546 -0
  47. package/definitions/environments-runtime.json +1 -0
  48. package/definitions/environments.json +988 -0
  49. package/definitions/erp-integration-runtime.json +1 -0
  50. package/definitions/erp-integration.json +7936 -0
  51. package/definitions/event-catalog-runtime.json +1 -0
  52. package/definitions/event-catalog.json +2014 -0
  53. package/definitions/file-runtime.json +1 -0
  54. package/definitions/file.json +4298 -0
  55. package/definitions/iban-runtime.json +1 -0
  56. package/definitions/iban.json +132 -0
  57. package/definitions/integration-toolkit-runtime.json +1 -0
  58. package/definitions/integration-toolkit.json +13106 -0
  59. package/definitions/journey-runtime.json +1 -0
  60. package/definitions/journey.json +3663 -0
  61. package/definitions/kanban-runtime.json +1 -0
  62. package/definitions/kanban.json +1506 -0
  63. package/definitions/message-runtime.json +1 -0
  64. package/definitions/message.json +3667 -0
  65. package/definitions/metering-runtime.json +1 -0
  66. package/definitions/metering.json +3132 -0
  67. package/definitions/notes-runtime.json +1 -0
  68. package/definitions/notes.json +1698 -0
  69. package/definitions/notification-runtime.json +1 -0
  70. package/definitions/notification.json +1439 -0
  71. package/definitions/organization-runtime.json +1 -0
  72. package/definitions/organization.json +1192 -0
  73. package/definitions/partner-directory-runtime.json +1 -0
  74. package/definitions/partner-directory.json +2284 -0
  75. package/definitions/permissions-runtime.json +1 -0
  76. package/definitions/permissions.json +1598 -0
  77. package/definitions/pricing-runtime.json +1 -0
  78. package/definitions/pricing-tier-runtime.json +1 -0
  79. package/definitions/pricing-tier.json +105 -0
  80. package/definitions/pricing.json +14369 -0
  81. package/definitions/purpose-runtime.json +1 -0
  82. package/definitions/purpose.json +524 -0
  83. package/definitions/query-runtime.json +1 -0
  84. package/definitions/query.json +3178 -0
  85. package/definitions/sandbox-runtime.json +1 -0
  86. package/definitions/sandbox.json +453 -0
  87. package/definitions/sharing-runtime.json +1 -0
  88. package/definitions/sharing.json +956 -0
  89. package/definitions/snapshot-runtime.json +1 -0
  90. package/definitions/snapshot.json +1103 -0
  91. package/definitions/submission-runtime.json +1 -0
  92. package/definitions/submission.json +313 -0
  93. package/definitions/targeting-runtime.json +1 -0
  94. package/definitions/targeting.json +2285 -0
  95. package/definitions/template-variables-runtime.json +1 -0
  96. package/definitions/template-variables.json +1416 -0
  97. package/definitions/user-runtime.json +1 -0
  98. package/definitions/user.json +3051 -0
  99. package/definitions/validation-rules-runtime.json +1 -0
  100. package/definitions/validation-rules.json +2642 -0
  101. package/definitions/webhooks-runtime.json +1 -0
  102. package/definitions/webhooks.json +1875 -0
  103. package/definitions/workflow-definition-runtime.json +1 -0
  104. package/definitions/workflow-definition.json +3592 -0
  105. package/definitions/workflow-runtime.json +1 -0
  106. package/definitions/workflow.json +4669 -0
  107. package/dist/apis/access-token.cjs +6 -6
  108. package/dist/apis/access-token.js +1 -1
  109. package/dist/apis/address-suggestions.cjs +6 -6
  110. package/dist/apis/address-suggestions.js +1 -1
  111. package/dist/apis/address.cjs +6 -6
  112. package/dist/apis/address.js +1 -1
  113. package/dist/apis/ai-agents.cjs +6 -6
  114. package/dist/apis/ai-agents.js +1 -1
  115. package/dist/apis/app.cjs +6 -6
  116. package/dist/apis/app.js +1 -1
  117. package/dist/apis/audit-logs.cjs +6 -6
  118. package/dist/apis/audit-logs.js +1 -1
  119. package/dist/apis/automation.cjs +6 -6
  120. package/dist/apis/automation.js +1 -1
  121. package/dist/apis/billing.cjs +6 -6
  122. package/dist/apis/billing.js +1 -1
  123. package/dist/apis/blueprint-manifest.cjs +6 -6
  124. package/dist/apis/blueprint-manifest.js +1 -1
  125. package/dist/apis/calendar.cjs +6 -6
  126. package/dist/apis/calendar.js +1 -1
  127. package/dist/apis/chat.cjs +6 -6
  128. package/dist/apis/chat.js +1 -1
  129. package/dist/apis/configuration-hub.cjs +6 -6
  130. package/dist/apis/configuration-hub.d.cts +2 -2
  131. package/dist/apis/configuration-hub.d.ts +2 -2
  132. package/dist/apis/configuration-hub.js +1 -1
  133. package/dist/apis/consent.cjs +6 -6
  134. package/dist/apis/consent.js +1 -1
  135. package/dist/apis/customer-portal.cjs +6 -6
  136. package/dist/apis/customer-portal.js +1 -1
  137. package/dist/apis/dashboard.cjs +6 -6
  138. package/dist/apis/dashboard.js +1 -1
  139. package/dist/apis/data-governance.cjs +6 -6
  140. package/dist/apis/data-governance.js +1 -1
  141. package/dist/apis/deduplication.cjs +6 -6
  142. package/dist/apis/deduplication.js +1 -1
  143. package/dist/apis/design.cjs +6 -6
  144. package/dist/apis/design.js +1 -1
  145. package/dist/apis/document.cjs +8 -8
  146. package/dist/apis/document.d.cts +2 -2
  147. package/dist/apis/document.d.ts +2 -2
  148. package/dist/apis/document.js +2 -2
  149. package/dist/apis/email-settings.cjs +6 -6
  150. package/dist/apis/email-settings.js +1 -1
  151. package/dist/apis/email-template.cjs +6 -6
  152. package/dist/apis/email-template.js +1 -1
  153. package/dist/apis/entity-mapping.cjs +6 -6
  154. package/dist/apis/entity-mapping.js +1 -1
  155. package/dist/apis/entity.cjs +6 -6
  156. package/dist/apis/entity.js +1 -1
  157. package/dist/apis/environments.cjs +6 -6
  158. package/dist/apis/environments.js +1 -1
  159. package/dist/apis/event-catalog.cjs +6 -6
  160. package/dist/apis/event-catalog.js +1 -1
  161. package/dist/apis/file.cjs +6 -6
  162. package/dist/apis/file.js +1 -1
  163. package/dist/apis/iban.cjs +6 -6
  164. package/dist/apis/iban.js +1 -1
  165. package/dist/apis/integration-toolkit.cjs +6 -6
  166. package/dist/apis/integration-toolkit.js +1 -1
  167. package/dist/apis/journey.cjs +6 -6
  168. package/dist/apis/journey.d.cts +2 -2
  169. package/dist/apis/journey.d.ts +2 -2
  170. package/dist/apis/journey.js +1 -1
  171. package/dist/apis/kanban.cjs +6 -6
  172. package/dist/apis/kanban.js +1 -1
  173. package/dist/apis/message.cjs +6 -6
  174. package/dist/apis/message.js +1 -1
  175. package/dist/apis/metering.cjs +6 -6
  176. package/dist/apis/metering.js +1 -1
  177. package/dist/apis/notes.cjs +6 -6
  178. package/dist/apis/notes.js +1 -1
  179. package/dist/apis/notification.cjs +6 -6
  180. package/dist/apis/notification.js +1 -1
  181. package/dist/apis/organization.cjs +6 -6
  182. package/dist/apis/organization.js +1 -1
  183. package/dist/apis/partner-directory.cjs +6 -6
  184. package/dist/apis/partner-directory.js +1 -1
  185. package/dist/apis/permissions.cjs +6 -6
  186. package/dist/apis/permissions.js +1 -1
  187. package/dist/apis/pricing-tier.cjs +6 -6
  188. package/dist/apis/pricing-tier.js +1 -1
  189. package/dist/apis/pricing.cjs +6 -6
  190. package/dist/apis/pricing.js +1 -1
  191. package/dist/apis/purpose.cjs +6 -6
  192. package/dist/apis/purpose.js +1 -1
  193. package/dist/apis/query.cjs +6 -6
  194. package/dist/apis/query.js +1 -1
  195. package/dist/apis/sandbox.cjs +6 -6
  196. package/dist/apis/sandbox.js +1 -1
  197. package/dist/apis/sharing.cjs +6 -6
  198. package/dist/apis/sharing.js +1 -1
  199. package/dist/apis/snapshot.cjs +6 -6
  200. package/dist/apis/snapshot.js +1 -1
  201. package/dist/apis/submission.cjs +6 -6
  202. package/dist/apis/submission.js +1 -1
  203. package/dist/apis/target.cjs +6 -6
  204. package/dist/apis/target.js +1 -1
  205. package/dist/apis/targeting.cjs +6 -6
  206. package/dist/apis/targeting.js +1 -1
  207. package/dist/apis/template-variables.cjs +6 -6
  208. package/dist/apis/template-variables.js +1 -1
  209. package/dist/apis/user.cjs +6 -6
  210. package/dist/apis/user.js +1 -1
  211. package/dist/apis/validation-rules.cjs +6 -6
  212. package/dist/apis/validation-rules.js +1 -1
  213. package/dist/apis/webhooks.cjs +6 -6
  214. package/dist/apis/webhooks.js +1 -1
  215. package/dist/apis/workflow-definition.cjs +6 -6
  216. package/dist/apis/workflow-definition.js +1 -1
  217. package/dist/apis/workflow.cjs +6 -6
  218. package/dist/apis/workflow.js +1 -1
  219. package/dist/{chunk-M56QQHVA.cjs → chunk-E2EHXQRP.cjs} +1 -1
  220. package/dist/{chunk-75EI2Q64.js → chunk-LR7LGGRU.js} +1 -1
  221. package/dist/{chunk-PZ4TXAF5.cjs → chunk-UM53DB6T.cjs} +3 -3
  222. package/dist/{chunk-X742W7MI.js → chunk-W5PMKQO7.js} +3 -3
  223. package/dist/{configuration-hub.d-Dv41yC3b.d.cts → configuration-hub.d-DhPrjJkE.d.cts} +142 -142
  224. package/dist/{configuration-hub.d-Dv41yC3b.d.ts → configuration-hub.d-DhPrjJkE.d.ts} +142 -142
  225. package/dist/document-UGT6DAXC.cjs +7 -0
  226. package/dist/document-UR5WWZEA.js +7 -0
  227. package/dist/{document-runtime-GFEBGNMS.js → document-runtime-LFOBMSE4.js} +1 -1
  228. package/dist/{document-runtime-RG3F4R6O.cjs → document-runtime-QM4H7DLT.cjs} +2 -2
  229. package/dist/{document.d-DN37pjdx.d.cts → document.d-B0zC-R8x.d.cts} +235 -7
  230. package/dist/{document.d-DN37pjdx.d.ts → document.d-B0zC-R8x.d.ts} +235 -7
  231. package/dist/index.cjs +10 -10
  232. package/dist/index.d.cts +3 -3
  233. package/dist/index.d.ts +3 -3
  234. package/dist/index.js +2 -2
  235. package/dist/journey-IVIBYU5V.js +7 -0
  236. package/dist/journey-ZN46FFPM.cjs +7 -0
  237. package/dist/{journey.d-DvwLALwc.d.cts → journey.d-Dj93v-Lw.d.cts} +54 -5
  238. package/dist/{journey.d-DvwLALwc.d.ts → journey.d-Dj93v-Lw.d.ts} +54 -5
  239. package/dist/js-yaml-DLCVPJ7G.js +0 -0
  240. package/docs/document.md +145 -6
  241. package/docs/journey.md +47 -2
  242. package/package.json +12 -11
  243. package/dist/document-CY2A2OE7.js +0 -7
  244. package/dist/document-RYQ7MF6U.cjs +0 -7
  245. package/dist/journey-LIJDXSEC.js +0 -7
  246. package/dist/journey-LNA7JFP3.cjs +0 -7
@@ -0,0 +1,7 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-NJK5F5TF.cjs');
2
+
3
+ // src/docs/document.json
4
+ var document_default = '# Document API\n\n- **Base URL:** `https://document.sls.epilot.io`\n- **Full API Docs:** [https://docs.epilot.io/api/document](https://docs.epilot.io/api/document)\n\n## Usage\n\n```ts\nimport { epilot } from \'@epilot/sdk\'\n\nepilot.authorize(() => \'<token>\')\nconst { data } = await epilot.document.getTemplateMeta(...)\n```\n\n### Tree-shakeable import\n\n```ts\nimport { getClient, authorize } from \'@epilot/sdk/document\'\n\nconst documentClient = getClient()\nauthorize(documentClient, () => \'<token>\')\nconst { data } = await documentClient.getTemplateMeta(...)\n```\n\n## Operations\n\n**Documents**\n- [`getTemplateMeta`](#gettemplatemeta)\n- [`generateDocumentV2`](#generatedocumentv2)\n- [`convertDocument`](#convertdocument)\n- [`validateTemplate`](#validatetemplate)\n\n**Schemas**\n- [`S3Reference`](#s3reference)\n- [`ErrorOutput`](#erroroutput)\n- [`InvalidCustomVariableErrorDetails`](#invalidcustomvariableerrordetails)\n- [`InvalidCustomVariableErrorDetail`](#invalidcustomvariableerrordetail)\n- [`InternalErrorDetails`](#internalerrordetails)\n- [`InternalErrorDetail`](#internalerrordetail)\n- [`DocxTemplaterErrorDetails`](#docxtemplatererrordetails)\n- [`DocxTemplaterErrorDetail`](#docxtemplatererrordetail)\n- [`ErrorCode`](#errorcode)\n- [`TemplateValidationRequest`](#templatevalidationrequest)\n- [`TemplateValidationResponse`](#templatevalidationresponse)\n- [`TemplateIssue`](#templateissue)\n- [`TemplateSettings`](#templatesettings)\n- [`DocumentMetaRequest`](#documentmetarequest)\n- [`DocumentMetaResponse`](#documentmetaresponse)\n- [`DocumentGenerationV2Request`](#documentgenerationv2request)\n- [`DocumentGenerationV2Response`](#documentgenerationv2response)\n- [`ConvertDocumentRequest`](#convertdocumentrequest)\n- [`ConvertDocumentResponse`](#convertdocumentresponse)\n\n### `getTemplateMeta`\n\nGet metadata for a document template\n\n`POST /v2/documents:meta`\n\n```ts\nconst { data } = await client.getTemplateMeta(\n null,\n {\n template_document: {\n s3ref: {\n bucket: \'document-api-prod\',\n key: \'uploads/my-template.pdf\'\n }\n }\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "page_margins": {\n "top": 2.54,\n "bottom": 2.54,\n "left": 2.54,\n "right": 2.54,\n "header": 2.54,\n "footer": 2.54\n },\n "variables": ["order.billing_contact.0.salutation", "order.billing_contact.0.title", "order_table", "stayHardStatic", "opportunity[attribute_name]", "opportunity[\\"attribute_name\\"]", "opportunity.[attribute_name]", "attribute_name", "opportunities.0.attribute_name", "opportunities[0].attribute_name", "contact.opportunities[0].attribute_name", "opportunities[Primary].attribute_name"]\n}\n```\n\n</details>\n\n---\n\n### `generateDocumentV2`\n\nGenerates documents from templates with variables.\n\n`POST /v2/documents:generate`\n\n```ts\nconst { data } = await client.generateDocumentV2(\n {\n job_id: \'example\',\n mode: \'example\',\n preview_mode: \'example\',\n },\n {\n template_document: {\n filename: \'my-template-{{order.order_number}}.docx\',\n s3ref: {\n bucket: \'document-api-prod\',\n key: \'uploads/my-template.pdf\'\n }\n },\n context_entity_id: \'bcd0aab9-b544-42b0-8bfb-6d449d02eacc\',\n user_id: \'100321\',\n language: \'de\',\n variable_payload: {\n additionalProperties: \'string\'\n },\n context_data: {\n additionalProperties: \'string\'\n },\n template_settings: {\n custom_margins: {\n top: 2.54,\n bottom: 2.54\n },\n suggested_margins: {\n top: 2.54,\n bottom: 2.54\n },\n display_margin_guidelines: true,\n enable_data_table_margin_autofix: false,\n template_with_datatable: false,\n enabled_template_settings_persistence: false,\n misconfigured_margins: false,\n file_entity_id: \'123e4567-e89b-12d3-a456-426614174000\'\n }\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "job_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "job_status": "STARTED",\n "message": "string",\n "ics_output": {\n "output_document": {\n "s3ref": {\n "bucket": "document-api-preview-prod",\n "key": "preview/my-appointment.ics"\n }\n }\n },\n "pdf_output": {\n "preview_url": "https://document-api-prod.s3.eu-central-1.amazonaws.com/preview/my-template-OR-001.pdf",\n "output_document": {\n "s3ref": {\n "bucket": "document-api-preview-prod",\n "key": "preview/my-template.pdf"\n }\n }\n },\n "docx_output": {\n "preview_url": "https://document-api-prod.s3.eu-central-1.amazonaws.com/preview/my-template-OR-001.docx",\n "output_document": {\n "s3ref": {\n "bucket": "document-api-preview-prod",\n "key": "preview/my-template.docx"\n }\n }\n },\n "xlsx_output": {\n "preview_url": "https://document-api-prod.s3.eu-central-1.amazonaws.com/preview/my-template-OR-001.xlsx",\n "output_document": {\n "s3ref": {\n "bucket": "document-api-preview-prod",\n "key": "preview/my-template.xlsx"\n }\n }\n },\n "error_output": {\n "error_message": "string",\n "error_code": "PARSE_ERROR",\n "error_details": [\n {\n "explanation": "string",\n "context": {\n "invalid_variables": [\n {\n "variable": "string",\n "error": "string"\n }\n ]\n }\n }\n ]\n },\n "variable_payload": {\n "additionalProperties": "string"\n },\n "template_settings": {\n "custom_margins": {\n "top": 2.54,\n "bottom": 2.54\n },\n "suggested_margins": {\n "top": 2.54,\n "bottom": 2.54\n },\n "display_margin_guidelines": true,\n "enable_data_table_margin_autofix": false,\n "template_with_datatable": false,\n "enabled_template_settings_persistence": false,\n "misconfigured_margins": false,\n "file_entity_id": "123e4567-e89b-12d3-a456-426614174000"\n }\n}\n```\n\n</details>\n\n---\n\n### `convertDocument`\n\nConverts a document to a different format.\n\n`POST /v2/documents:convert`\n\n```ts\nconst { data } = await client.convertDocument(\n null,\n {\n language: \'de\',\n input_document: {\n s3ref: {\n bucket: \'document-api-prod\',\n key: \'uploads/my-template.pdf\'\n }\n },\n output_format: \'pdf\',\n output_filename: \'converted.pdf\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "output_document": {\n "preview_url": "https://document-api-prod.s3.eu-central-1.amazonaws.com/preview/converted.pdf",\n "s3ref": {\n "bucket": "document-api-prod",\n "key": "uploads/my-template.pdf"\n }\n }\n}\n```\n\n</details>\n\n---\n\n### `validateTemplate`\n\nValidates a document template\'s variable syntax and, optionally, proposes a hotfixed copy of it.\n\n`POST /v2/templates:validate`\n\n```ts\nconst { data } = await client.validateTemplate(\n null,\n {\n template_document: {\n filename: \'Umzugsmeldung.xlsx\',\n s3ref: {\n bucket: \'document-api-prod\',\n key: \'uploads/my-template.pdf\'\n }\n },\n fix: true,\n fix_level: \'safe\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "valid": false,\n "fixed": true,\n "issues": [\n {\n "id": "unopened_tag",\n "file": "xl/sharedStrings.xml",\n "location": "Tabelle1!N4",\n "context": "\u2026Datum: {system.date}} Unterschrift\u2026",\n "explanation": "The tag is missing an opening brace.",\n "fixable": true,\n "confidence": "high",\n "rule": "balance_opening_delimiter",\n "before": "{system.date}}",\n "after": "{{system.date}}"\n }\n ],\n "unresolved_errors": [\n {\n "id": "string",\n "context": "string",\n "explanation": "string"\n }\n ],\n "fixed_document": {\n "s3ref": {\n "bucket": "document-api-prod",\n "key": "uploads/my-template.pdf"\n },\n "filename": "Umzugsmeldung (fixed).xlsx",\n "preview_url": "https://example.com/path"\n }\n}\n```\n\n</details>\n\n---\n\n## Schemas\n\n### `S3Reference`\n\n```ts\ntype S3Reference = {\n bucket: string\n key: string\n}\n```\n\n### `ErrorOutput`\n\n```ts\ntype ErrorOutput = {\n error_message?: string\n error_code?: "PARSE_ERROR" | "DOC_TO_PDF_CONVERT_ERROR" | "INTERNAL_ERROR" | "INVALID_TEMPLATE_FORMAT" | "TEMPLATE_NOT_FOUND"\n error_details?: Array<{\n explanation?: string\n context?: {\n invalid_variables?: { ... }\n }\n }> | Array<{\n items?: {\n name?: { ... }\n message?: { ... }\n stack?: { ... }\n cause?: { ... }\n }\n }> | Array<{\n id?: string\n context?: string\n explanation?: string\n }>\n}\n```\n\n### `InvalidCustomVariableErrorDetails`\n\nError details for invalid custom variables. This error will appear under \'PARSE_ERROR\' error code.\n\n```ts\ntype InvalidCustomVariableErrorDetails = Array<{\n explanation?: string\n context?: {\n invalid_variables?: Array<{\n variable?: { ... }\n error?: { ... }\n }>\n }\n}>\n```\n\n### `InvalidCustomVariableErrorDetail`\n\n```ts\ntype InvalidCustomVariableErrorDetail = {\n explanation?: string\n context?: {\n invalid_variables?: Array<{\n variable?: { ... }\n error?: { ... }\n }>\n }\n}\n```\n\n### `InternalErrorDetails`\n\nError details for internal error. This error will appear under \'INTERNAL_ERROR\' error code.\n\n```ts\ntype InternalErrorDetails = Array<{\n items?: {\n name?: string\n message?: string\n stack?: string\n cause?: string\n }\n}>\n```\n\n### `InternalErrorDetail`\n\nInternal error detail\n\n```ts\ntype InternalErrorDetail = {\n name?: string\n message?: string\n stack?: string\n cause?: string\n}\n```\n\n### `DocxTemplaterErrorDetails`\n\nError details for DocxTemplater error. This error will appear under \'PARSE_ERROR\' error code.\nSee https://docxtemplater.com/docs/errors/#error-schema for more details.\n\n\n```ts\ntype DocxTemplaterErrorDetails = Array<{\n id?: string\n context?: string\n explanation?: string\n}>\n```\n\n### `DocxTemplaterErrorDetail`\n\nDocxTemplater error detail\n\n```ts\ntype DocxTemplaterErrorDetail = {\n id?: string\n context?: string\n explanation?: string\n}\n```\n\n### `ErrorCode`\n\nError codes for document generation:\n- PARSE_ERROR - Error while parsing the document. Normally related with a bad template using the wrong DocxTemplater syntax.\n- DOC_TO_PDF_CONVERT_ERROR - Error while converting the document to PDF. Normally related with a ConvertAPI failure.\n- INTERNAL_ERROR - In\n\n```ts\ntype ErrorCode = "PARSE_ERROR" | "DOC_TO_PDF_CONVERT_ERROR" | "INTERNAL_ERROR" | "INVALID_TEMPLATE_FORMAT" | "TEMPLATE_NOT_FOUND"\n```\n\n### `TemplateValidationRequest`\n\n```ts\ntype TemplateValidationRequest = {\n template_document: {\n filename?: string\n s3ref: {\n bucket: { ... }\n key: { ... }\n }\n }\n fix?: boolean\n fix_level?: "safe" | "aggressive"\n}\n```\n\n### `TemplateValidationResponse`\n\n```ts\ntype TemplateValidationResponse = {\n valid?: boolean\n fixed?: boolean\n issues?: Array<{\n id?: string\n file?: string\n location?: string\n context?: string\n explanation?: string\n fixable?: boolean\n confidence?: "high" | "medium" | "low"\n rule?: string\n before?: string\n after?: string\n }>\n unresolved_errors?: Array<{\n id?: string\n context?: string\n explanation?: string\n }>\n fixed_document?: {\n s3ref?: {\n bucket: { ... }\n key: { ... }\n }\n filename?: string\n preview_url?: string // uri\n }\n}\n```\n\n### `TemplateIssue`\n\nA single template syntax problem, and the repair proposed for it\n\n```ts\ntype TemplateIssue = {\n id?: string\n file?: string\n location?: string\n context?: string\n explanation?: string\n fixable?: boolean\n confidence?: "high" | "medium" | "low"\n rule?: string\n before?: string\n after?: string\n}\n```\n\n### `TemplateSettings`\n\nTemplate Settings for document generation\n\n```ts\ntype TemplateSettings = {\n custom_margins?: {\n top?: number\n bottom?: number\n }\n suggested_margins?: {\n top?: number\n bottom?: number\n }\n display_margin_guidelines?: boolean\n enable_data_table_margin_autofix?: boolean\n template_with_datatable?: boolean\n enabled_template_settings_persistence?: boolean\n misconfigured_margins?: boolean\n file_entity_id?: string // uuid\n}\n```\n\n### `DocumentMetaRequest`\n\n```ts\ntype DocumentMetaRequest = {\n template_document?: {\n s3ref?: {\n bucket: { ... }\n key: { ... }\n }\n }\n}\n```\n\n### `DocumentMetaResponse`\n\n```ts\ntype DocumentMetaResponse = {\n page_margins?: {\n top?: number\n bottom?: number\n left?: number\n right?: number\n header?: number\n footer?: number\n }\n variables?: string[]\n}\n```\n\n### `DocumentGenerationV2Request`\n\n```ts\ntype DocumentGenerationV2Request = {\n template_document: {\n filename?: string\n s3ref?: {\n bucket: { ... }\n key: { ... }\n }\n }\n context_entity_id?: string // uuid\n user_id?: string\n language?: string\n variable_payload?: {\n additionalProperties?: string\n }\n context_data?: {\n additionalProperties?: string\n }\n template_settings?: {\n custom_margins?: {\n top?: { ... }\n bottom?: { ... }\n }\n suggested_margins?: {\n top?: { ... }\n bottom?: { ... }\n }\n display_margin_guidelines?: boolean\n enable_data_table_margin_autofix?: boolean\n template_with_datatable?: boolean\n enabled_template_settings_persistence?: boolean\n misconfigured_margins?: boolean\n file_entity_id?: string // uuid\n }\n}\n```\n\n### `DocumentGenerationV2Response`\n\n```ts\ntype DocumentGenerationV2Response = {\n job_id?: string // uuid\n job_status?: "STARTED" | "PROCESSING" | "SUCCESS" | "FAILED"\n message?: string\n ics_output?: {\n output_document?: {\n filename?: { ... }\n s3ref?: { ... }\n }\n }\n pdf_output?: {\n preview_url?: string\n output_document?: {\n filename?: { ... }\n s3ref?: { ... }\n }\n }\n docx_output?: {\n preview_url?: string\n output_document?: {\n filename?: { ... }\n s3ref?: { ... }\n }\n }\n xlsx_output?: {\n preview_url?: string\n output_document?: {\n filename?: { ... }\n s3ref?: { ... }\n }\n }\n error_output?: {\n error_message?: string\n error_code?: "PARSE_ERROR" | "DOC_TO_PDF_CONVERT_ERROR" | "INTERNAL_ERROR" | "INVALID_TEMPLATE_FORMAT" | "TEMPLATE_NOT_FOUND"\n error_details?: Array<{\n explanation?: { ... }\n context?: { ... }\n }> | Array<{\n items?: { ... }\n }> | Array<{\n id?: { ... }\n context?: { ... }\n explanation?: { ... }\n }>\n }\n variable_payload?: {\n additionalProperties?: string\n }\n template_settings?: {\n custom_margins?: {\n top?: { ... }\n bottom?: { ... }\n }\n suggested_margins?: {\n top?: { ... }\n bottom?: { ... }\n }\n display_margin_guidelines?: boolean\n enable_data_table_margin_autofix?: boolean\n template_with_datatable?: boolean\n enabled_template_settings_persistence?: boolean\n misconfigured_margins?: boolean\n file_entity_id?: string // uuid\n }\n}\n```\n\n### `ConvertDocumentRequest`\n\n```ts\ntype ConvertDocumentRequest = {\n language?: string\n input_document: {\n s3ref: {\n bucket: { ... }\n key: { ... }\n }\n }\n output_format: "pdf"\n output_filename?: string\n}\n```\n\n### `ConvertDocumentResponse`\n\n```ts\ntype ConvertDocumentResponse = {\n output_document?: {\n preview_url?: string\n s3ref?: {\n bucket: { ... }\n key: { ... }\n }\n }\n}\n```\n';
5
+
6
+
7
+ exports.default = document_default;
@@ -0,0 +1,7 @@
1
+ import "./chunk-YPSWSI3M.js";
2
+
3
+ // src/docs/document.json
4
+ var document_default = '# Document API\n\n- **Base URL:** `https://document.sls.epilot.io`\n- **Full API Docs:** [https://docs.epilot.io/api/document](https://docs.epilot.io/api/document)\n\n## Usage\n\n```ts\nimport { epilot } from \'@epilot/sdk\'\n\nepilot.authorize(() => \'<token>\')\nconst { data } = await epilot.document.getTemplateMeta(...)\n```\n\n### Tree-shakeable import\n\n```ts\nimport { getClient, authorize } from \'@epilot/sdk/document\'\n\nconst documentClient = getClient()\nauthorize(documentClient, () => \'<token>\')\nconst { data } = await documentClient.getTemplateMeta(...)\n```\n\n## Operations\n\n**Documents**\n- [`getTemplateMeta`](#gettemplatemeta)\n- [`generateDocumentV2`](#generatedocumentv2)\n- [`convertDocument`](#convertdocument)\n- [`validateTemplate`](#validatetemplate)\n\n**Schemas**\n- [`S3Reference`](#s3reference)\n- [`ErrorOutput`](#erroroutput)\n- [`InvalidCustomVariableErrorDetails`](#invalidcustomvariableerrordetails)\n- [`InvalidCustomVariableErrorDetail`](#invalidcustomvariableerrordetail)\n- [`InternalErrorDetails`](#internalerrordetails)\n- [`InternalErrorDetail`](#internalerrordetail)\n- [`DocxTemplaterErrorDetails`](#docxtemplatererrordetails)\n- [`DocxTemplaterErrorDetail`](#docxtemplatererrordetail)\n- [`ErrorCode`](#errorcode)\n- [`TemplateValidationRequest`](#templatevalidationrequest)\n- [`TemplateValidationResponse`](#templatevalidationresponse)\n- [`TemplateIssue`](#templateissue)\n- [`TemplateSettings`](#templatesettings)\n- [`DocumentMetaRequest`](#documentmetarequest)\n- [`DocumentMetaResponse`](#documentmetaresponse)\n- [`DocumentGenerationV2Request`](#documentgenerationv2request)\n- [`DocumentGenerationV2Response`](#documentgenerationv2response)\n- [`ConvertDocumentRequest`](#convertdocumentrequest)\n- [`ConvertDocumentResponse`](#convertdocumentresponse)\n\n### `getTemplateMeta`\n\nGet metadata for a document template\n\n`POST /v2/documents:meta`\n\n```ts\nconst { data } = await client.getTemplateMeta(\n null,\n {\n template_document: {\n s3ref: {\n bucket: \'document-api-prod\',\n key: \'uploads/my-template.pdf\'\n }\n }\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "page_margins": {\n "top": 2.54,\n "bottom": 2.54,\n "left": 2.54,\n "right": 2.54,\n "header": 2.54,\n "footer": 2.54\n },\n "variables": ["order.billing_contact.0.salutation", "order.billing_contact.0.title", "order_table", "stayHardStatic", "opportunity[attribute_name]", "opportunity[\\"attribute_name\\"]", "opportunity.[attribute_name]", "attribute_name", "opportunities.0.attribute_name", "opportunities[0].attribute_name", "contact.opportunities[0].attribute_name", "opportunities[Primary].attribute_name"]\n}\n```\n\n</details>\n\n---\n\n### `generateDocumentV2`\n\nGenerates documents from templates with variables.\n\n`POST /v2/documents:generate`\n\n```ts\nconst { data } = await client.generateDocumentV2(\n {\n job_id: \'example\',\n mode: \'example\',\n preview_mode: \'example\',\n },\n {\n template_document: {\n filename: \'my-template-{{order.order_number}}.docx\',\n s3ref: {\n bucket: \'document-api-prod\',\n key: \'uploads/my-template.pdf\'\n }\n },\n context_entity_id: \'bcd0aab9-b544-42b0-8bfb-6d449d02eacc\',\n user_id: \'100321\',\n language: \'de\',\n variable_payload: {\n additionalProperties: \'string\'\n },\n context_data: {\n additionalProperties: \'string\'\n },\n template_settings: {\n custom_margins: {\n top: 2.54,\n bottom: 2.54\n },\n suggested_margins: {\n top: 2.54,\n bottom: 2.54\n },\n display_margin_guidelines: true,\n enable_data_table_margin_autofix: false,\n template_with_datatable: false,\n enabled_template_settings_persistence: false,\n misconfigured_margins: false,\n file_entity_id: \'123e4567-e89b-12d3-a456-426614174000\'\n }\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "job_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "job_status": "STARTED",\n "message": "string",\n "ics_output": {\n "output_document": {\n "s3ref": {\n "bucket": "document-api-preview-prod",\n "key": "preview/my-appointment.ics"\n }\n }\n },\n "pdf_output": {\n "preview_url": "https://document-api-prod.s3.eu-central-1.amazonaws.com/preview/my-template-OR-001.pdf",\n "output_document": {\n "s3ref": {\n "bucket": "document-api-preview-prod",\n "key": "preview/my-template.pdf"\n }\n }\n },\n "docx_output": {\n "preview_url": "https://document-api-prod.s3.eu-central-1.amazonaws.com/preview/my-template-OR-001.docx",\n "output_document": {\n "s3ref": {\n "bucket": "document-api-preview-prod",\n "key": "preview/my-template.docx"\n }\n }\n },\n "xlsx_output": {\n "preview_url": "https://document-api-prod.s3.eu-central-1.amazonaws.com/preview/my-template-OR-001.xlsx",\n "output_document": {\n "s3ref": {\n "bucket": "document-api-preview-prod",\n "key": "preview/my-template.xlsx"\n }\n }\n },\n "error_output": {\n "error_message": "string",\n "error_code": "PARSE_ERROR",\n "error_details": [\n {\n "explanation": "string",\n "context": {\n "invalid_variables": [\n {\n "variable": "string",\n "error": "string"\n }\n ]\n }\n }\n ]\n },\n "variable_payload": {\n "additionalProperties": "string"\n },\n "template_settings": {\n "custom_margins": {\n "top": 2.54,\n "bottom": 2.54\n },\n "suggested_margins": {\n "top": 2.54,\n "bottom": 2.54\n },\n "display_margin_guidelines": true,\n "enable_data_table_margin_autofix": false,\n "template_with_datatable": false,\n "enabled_template_settings_persistence": false,\n "misconfigured_margins": false,\n "file_entity_id": "123e4567-e89b-12d3-a456-426614174000"\n }\n}\n```\n\n</details>\n\n---\n\n### `convertDocument`\n\nConverts a document to a different format.\n\n`POST /v2/documents:convert`\n\n```ts\nconst { data } = await client.convertDocument(\n null,\n {\n language: \'de\',\n input_document: {\n s3ref: {\n bucket: \'document-api-prod\',\n key: \'uploads/my-template.pdf\'\n }\n },\n output_format: \'pdf\',\n output_filename: \'converted.pdf\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "output_document": {\n "preview_url": "https://document-api-prod.s3.eu-central-1.amazonaws.com/preview/converted.pdf",\n "s3ref": {\n "bucket": "document-api-prod",\n "key": "uploads/my-template.pdf"\n }\n }\n}\n```\n\n</details>\n\n---\n\n### `validateTemplate`\n\nValidates a document template\'s variable syntax and, optionally, proposes a hotfixed copy of it.\n\n`POST /v2/templates:validate`\n\n```ts\nconst { data } = await client.validateTemplate(\n null,\n {\n template_document: {\n filename: \'Umzugsmeldung.xlsx\',\n s3ref: {\n bucket: \'document-api-prod\',\n key: \'uploads/my-template.pdf\'\n }\n },\n fix: true,\n fix_level: \'safe\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "valid": false,\n "fixed": true,\n "issues": [\n {\n "id": "unopened_tag",\n "file": "xl/sharedStrings.xml",\n "location": "Tabelle1!N4",\n "context": "\u2026Datum: {system.date}} Unterschrift\u2026",\n "explanation": "The tag is missing an opening brace.",\n "fixable": true,\n "confidence": "high",\n "rule": "balance_opening_delimiter",\n "before": "{system.date}}",\n "after": "{{system.date}}"\n }\n ],\n "unresolved_errors": [\n {\n "id": "string",\n "context": "string",\n "explanation": "string"\n }\n ],\n "fixed_document": {\n "s3ref": {\n "bucket": "document-api-prod",\n "key": "uploads/my-template.pdf"\n },\n "filename": "Umzugsmeldung (fixed).xlsx",\n "preview_url": "https://example.com/path"\n }\n}\n```\n\n</details>\n\n---\n\n## Schemas\n\n### `S3Reference`\n\n```ts\ntype S3Reference = {\n bucket: string\n key: string\n}\n```\n\n### `ErrorOutput`\n\n```ts\ntype ErrorOutput = {\n error_message?: string\n error_code?: "PARSE_ERROR" | "DOC_TO_PDF_CONVERT_ERROR" | "INTERNAL_ERROR" | "INVALID_TEMPLATE_FORMAT" | "TEMPLATE_NOT_FOUND"\n error_details?: Array<{\n explanation?: string\n context?: {\n invalid_variables?: { ... }\n }\n }> | Array<{\n items?: {\n name?: { ... }\n message?: { ... }\n stack?: { ... }\n cause?: { ... }\n }\n }> | Array<{\n id?: string\n context?: string\n explanation?: string\n }>\n}\n```\n\n### `InvalidCustomVariableErrorDetails`\n\nError details for invalid custom variables. This error will appear under \'PARSE_ERROR\' error code.\n\n```ts\ntype InvalidCustomVariableErrorDetails = Array<{\n explanation?: string\n context?: {\n invalid_variables?: Array<{\n variable?: { ... }\n error?: { ... }\n }>\n }\n}>\n```\n\n### `InvalidCustomVariableErrorDetail`\n\n```ts\ntype InvalidCustomVariableErrorDetail = {\n explanation?: string\n context?: {\n invalid_variables?: Array<{\n variable?: { ... }\n error?: { ... }\n }>\n }\n}\n```\n\n### `InternalErrorDetails`\n\nError details for internal error. This error will appear under \'INTERNAL_ERROR\' error code.\n\n```ts\ntype InternalErrorDetails = Array<{\n items?: {\n name?: string\n message?: string\n stack?: string\n cause?: string\n }\n}>\n```\n\n### `InternalErrorDetail`\n\nInternal error detail\n\n```ts\ntype InternalErrorDetail = {\n name?: string\n message?: string\n stack?: string\n cause?: string\n}\n```\n\n### `DocxTemplaterErrorDetails`\n\nError details for DocxTemplater error. This error will appear under \'PARSE_ERROR\' error code.\nSee https://docxtemplater.com/docs/errors/#error-schema for more details.\n\n\n```ts\ntype DocxTemplaterErrorDetails = Array<{\n id?: string\n context?: string\n explanation?: string\n}>\n```\n\n### `DocxTemplaterErrorDetail`\n\nDocxTemplater error detail\n\n```ts\ntype DocxTemplaterErrorDetail = {\n id?: string\n context?: string\n explanation?: string\n}\n```\n\n### `ErrorCode`\n\nError codes for document generation:\n- PARSE_ERROR - Error while parsing the document. Normally related with a bad template using the wrong DocxTemplater syntax.\n- DOC_TO_PDF_CONVERT_ERROR - Error while converting the document to PDF. Normally related with a ConvertAPI failure.\n- INTERNAL_ERROR - In\n\n```ts\ntype ErrorCode = "PARSE_ERROR" | "DOC_TO_PDF_CONVERT_ERROR" | "INTERNAL_ERROR" | "INVALID_TEMPLATE_FORMAT" | "TEMPLATE_NOT_FOUND"\n```\n\n### `TemplateValidationRequest`\n\n```ts\ntype TemplateValidationRequest = {\n template_document: {\n filename?: string\n s3ref: {\n bucket: { ... }\n key: { ... }\n }\n }\n fix?: boolean\n fix_level?: "safe" | "aggressive"\n}\n```\n\n### `TemplateValidationResponse`\n\n```ts\ntype TemplateValidationResponse = {\n valid?: boolean\n fixed?: boolean\n issues?: Array<{\n id?: string\n file?: string\n location?: string\n context?: string\n explanation?: string\n fixable?: boolean\n confidence?: "high" | "medium" | "low"\n rule?: string\n before?: string\n after?: string\n }>\n unresolved_errors?: Array<{\n id?: string\n context?: string\n explanation?: string\n }>\n fixed_document?: {\n s3ref?: {\n bucket: { ... }\n key: { ... }\n }\n filename?: string\n preview_url?: string // uri\n }\n}\n```\n\n### `TemplateIssue`\n\nA single template syntax problem, and the repair proposed for it\n\n```ts\ntype TemplateIssue = {\n id?: string\n file?: string\n location?: string\n context?: string\n explanation?: string\n fixable?: boolean\n confidence?: "high" | "medium" | "low"\n rule?: string\n before?: string\n after?: string\n}\n```\n\n### `TemplateSettings`\n\nTemplate Settings for document generation\n\n```ts\ntype TemplateSettings = {\n custom_margins?: {\n top?: number\n bottom?: number\n }\n suggested_margins?: {\n top?: number\n bottom?: number\n }\n display_margin_guidelines?: boolean\n enable_data_table_margin_autofix?: boolean\n template_with_datatable?: boolean\n enabled_template_settings_persistence?: boolean\n misconfigured_margins?: boolean\n file_entity_id?: string // uuid\n}\n```\n\n### `DocumentMetaRequest`\n\n```ts\ntype DocumentMetaRequest = {\n template_document?: {\n s3ref?: {\n bucket: { ... }\n key: { ... }\n }\n }\n}\n```\n\n### `DocumentMetaResponse`\n\n```ts\ntype DocumentMetaResponse = {\n page_margins?: {\n top?: number\n bottom?: number\n left?: number\n right?: number\n header?: number\n footer?: number\n }\n variables?: string[]\n}\n```\n\n### `DocumentGenerationV2Request`\n\n```ts\ntype DocumentGenerationV2Request = {\n template_document: {\n filename?: string\n s3ref?: {\n bucket: { ... }\n key: { ... }\n }\n }\n context_entity_id?: string // uuid\n user_id?: string\n language?: string\n variable_payload?: {\n additionalProperties?: string\n }\n context_data?: {\n additionalProperties?: string\n }\n template_settings?: {\n custom_margins?: {\n top?: { ... }\n bottom?: { ... }\n }\n suggested_margins?: {\n top?: { ... }\n bottom?: { ... }\n }\n display_margin_guidelines?: boolean\n enable_data_table_margin_autofix?: boolean\n template_with_datatable?: boolean\n enabled_template_settings_persistence?: boolean\n misconfigured_margins?: boolean\n file_entity_id?: string // uuid\n }\n}\n```\n\n### `DocumentGenerationV2Response`\n\n```ts\ntype DocumentGenerationV2Response = {\n job_id?: string // uuid\n job_status?: "STARTED" | "PROCESSING" | "SUCCESS" | "FAILED"\n message?: string\n ics_output?: {\n output_document?: {\n filename?: { ... }\n s3ref?: { ... }\n }\n }\n pdf_output?: {\n preview_url?: string\n output_document?: {\n filename?: { ... }\n s3ref?: { ... }\n }\n }\n docx_output?: {\n preview_url?: string\n output_document?: {\n filename?: { ... }\n s3ref?: { ... }\n }\n }\n xlsx_output?: {\n preview_url?: string\n output_document?: {\n filename?: { ... }\n s3ref?: { ... }\n }\n }\n error_output?: {\n error_message?: string\n error_code?: "PARSE_ERROR" | "DOC_TO_PDF_CONVERT_ERROR" | "INTERNAL_ERROR" | "INVALID_TEMPLATE_FORMAT" | "TEMPLATE_NOT_FOUND"\n error_details?: Array<{\n explanation?: { ... }\n context?: { ... }\n }> | Array<{\n items?: { ... }\n }> | Array<{\n id?: { ... }\n context?: { ... }\n explanation?: { ... }\n }>\n }\n variable_payload?: {\n additionalProperties?: string\n }\n template_settings?: {\n custom_margins?: {\n top?: { ... }\n bottom?: { ... }\n }\n suggested_margins?: {\n top?: { ... }\n bottom?: { ... }\n }\n display_margin_guidelines?: boolean\n enable_data_table_margin_autofix?: boolean\n template_with_datatable?: boolean\n enabled_template_settings_persistence?: boolean\n misconfigured_margins?: boolean\n file_entity_id?: string // uuid\n }\n}\n```\n\n### `ConvertDocumentRequest`\n\n```ts\ntype ConvertDocumentRequest = {\n language?: string\n input_document: {\n s3ref: {\n bucket: { ... }\n key: { ... }\n }\n }\n output_format: "pdf"\n output_filename?: string\n}\n```\n\n### `ConvertDocumentResponse`\n\n```ts\ntype ConvertDocumentResponse = {\n output_document?: {\n preview_url?: string\n s3ref?: {\n bucket: { ... }\n key: { ... }\n }\n }\n}\n```\n';
5
+ export {
6
+ document_default as default
7
+ };
@@ -1,5 +1,5 @@
1
1
  import {
2
2
  require_document_runtime
3
- } from "./chunk-75EI2Q64.js";
3
+ } from "./chunk-LR7LGGRU.js";
4
4
  import "./chunk-YPSWSI3M.js";
5
5
  export default require_document_runtime();
@@ -1,5 +1,5 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkM56QQHVAcjs = require('./chunk-M56QQHVA.cjs');
3
+ var _chunkE2EHXQRPcjs = require('./chunk-E2EHXQRP.cjs');
4
4
  require('./chunk-NJK5F5TF.cjs');
5
- exports. default = _chunkM56QQHVAcjs.require_document_runtime.call(void 0, );
5
+ exports. default = _chunkE2EHXQRPcjs.require_document_runtime.call(void 0, );
@@ -1,8 +1,6 @@
1
1
  import { OpenAPIClient, Parameters, UnknownParamsObject, AxiosRequestConfig, OperationResponse } from 'openapi-client-axios';
2
2
 
3
3
  /* Auto-copied from document-client */
4
- /* eslint-disable */
5
-
6
4
 
7
5
 
8
6
  declare namespace Components {
@@ -303,9 +301,10 @@ declare namespace Components {
303
301
  * - DOC_TO_PDF_CONVERT_ERROR - Error while converting the document to PDF. Normally related with a ConvertAPI failure.
304
302
  * - INTERNAL_ERROR - Internal error. Please contact support.
305
303
  * - INVALID_TEMPLATE_FORMAT - Invalid template format (only .docx is supported). This can happen due to a bad word file or an unsupported file extension.
304
+ * - TEMPLATE_NOT_FOUND - Template file was not found in S3. This indicates the template was likely deleted.
306
305
  *
307
306
  */
308
- export type ErrorCode = "PARSE_ERROR" | "DOC_TO_PDF_CONVERT_ERROR" | "INTERNAL_ERROR" | "INVALID_TEMPLATE_FORMAT";
307
+ export type ErrorCode = "PARSE_ERROR" | "DOC_TO_PDF_CONVERT_ERROR" | "INTERNAL_ERROR" | "INVALID_TEMPLATE_FORMAT" | "TEMPLATE_NOT_FOUND";
309
308
  export interface ErrorOutput {
310
309
  /**
311
310
  * Error message
@@ -317,6 +316,7 @@ declare namespace Components {
317
316
  * - DOC_TO_PDF_CONVERT_ERROR - Error while converting the document to PDF. Normally related with a ConvertAPI failure.
318
317
  * - INTERNAL_ERROR - Internal error. Please contact support.
319
318
  * - INVALID_TEMPLATE_FORMAT - Invalid template format (only .docx is supported). This can happen due to a bad word file or an unsupported file extension.
319
+ * - TEMPLATE_NOT_FOUND - Template file was not found in S3. This indicates the template was likely deleted.
320
320
  *
321
321
  */
322
322
  ErrorCode;
@@ -395,6 +395,75 @@ declare namespace Components {
395
395
  */
396
396
  key: string;
397
397
  }
398
+ /**
399
+ * A single template syntax problem, and the repair proposed for it
400
+ */
401
+ export interface TemplateIssue {
402
+ /**
403
+ * Problem kind. Reuses docxtemplater's error vocabulary where one exists
404
+ * (`unopened_tag`, `unclosed_tag`, `duplicate_open_tag`, `duplicate_close_tag`), plus
405
+ * `malformed_tag` for single-brace placeholders and `typographic_characters` for
406
+ * editor-substituted characters inside an otherwise valid tag.
407
+ *
408
+ * example:
409
+ * unopened_tag
410
+ */
411
+ id?: string;
412
+ /**
413
+ * Zip part the problem was found in
414
+ * example:
415
+ * xl/sharedStrings.xml
416
+ */
417
+ file?: string;
418
+ /**
419
+ * Where the user can find it — a cell reference for spreadsheets, a part label
420
+ * (`Document body`, `Header 1`, `Slide 3`) otherwise.
421
+ *
422
+ * example:
423
+ * Tabelle1!N4
424
+ */
425
+ location?: string;
426
+ /**
427
+ * The offending text with surrounding context
428
+ * example:
429
+ * …Datum: {system.date}} Unterschrift…
430
+ */
431
+ context?: string;
432
+ /**
433
+ * Why the template parser rejects it
434
+ * example:
435
+ * The tag is missing an opening brace.
436
+ */
437
+ explanation?: string;
438
+ /**
439
+ * Whether the proposed repair was applied to the fixed copy
440
+ * example:
441
+ * true
442
+ */
443
+ fixable?: boolean;
444
+ /**
445
+ * How sure we are that the repair is what the author meant
446
+ */
447
+ confidence?: "high" | "medium" | "low";
448
+ /**
449
+ * The repair rule that produced `after`
450
+ * example:
451
+ * balance_opening_delimiter
452
+ */
453
+ rule?: string;
454
+ /**
455
+ * The text as it is in the template
456
+ * example:
457
+ * {system.date}}
458
+ */
459
+ before?: string;
460
+ /**
461
+ * The text as it would be in the fixed copy
462
+ * example:
463
+ * {{system.date}}
464
+ */
465
+ after?: string;
466
+ }
398
467
  /**
399
468
  * Template Settings for document generation
400
469
  */
@@ -466,10 +535,81 @@ declare namespace Components {
466
535
  /**
467
536
  * The file entity id, used when persisting a new template version with updated settings
468
537
  * example:
469
- * 1a2b3c4d-5e6f-7g8h-9i0j-1k2l3m4n5o6p
538
+ * 123e4567-e89b-12d3-a456-426614174000
470
539
  */
471
540
  file_entity_id?: string; // uuid
472
541
  }
542
+ export interface TemplateValidationRequest {
543
+ /**
544
+ * Input template document
545
+ */
546
+ template_document: {
547
+ /**
548
+ * Document original filename, used to name the fixed copy
549
+ * example:
550
+ * Umzugsmeldung.xlsx
551
+ */
552
+ filename?: string;
553
+ s3ref: S3Reference;
554
+ };
555
+ /**
556
+ * Attempt to produce a hotfixed copy of the template. When false, the template is only
557
+ * inspected and no file is written.
558
+ *
559
+ */
560
+ fix?: boolean;
561
+ /**
562
+ * How far the hotfix may go:
563
+ * - safe - only repairs where the author's intent is unambiguous from the syntax
564
+ * (unbalanced or duplicated braces, editor-substituted characters inside a tag).
565
+ * - aggressive - additionally promotes single-brace placeholders such as `{contact.name}`
566
+ * to `{{contact.name}}`. These are common in customer templates but indistinguishable
567
+ * from prose that uses braces, so they are reported with `confidence: low`.
568
+ *
569
+ */
570
+ fix_level?: "safe" | "aggressive";
571
+ }
572
+ export interface TemplateValidationResponse {
573
+ /**
574
+ * Whether the template compiled cleanly before any repair was attempted
575
+ * example:
576
+ * false
577
+ */
578
+ valid?: boolean;
579
+ /**
580
+ * Whether a corrected copy of the template could be produced
581
+ * example:
582
+ * true
583
+ */
584
+ fixed?: boolean;
585
+ /**
586
+ * Everything found in the template, whether or not it could be repaired
587
+ */
588
+ issues?: /* A single template syntax problem, and the repair proposed for it */ TemplateIssue[];
589
+ /**
590
+ * Parser errors that remain after the hotfix (or the original errors when nothing was
591
+ * fixed). Empty when the template is valid.
592
+ *
593
+ */
594
+ unresolved_errors?: /* DocxTemplater error detail */ DocxTemplaterErrorDetail[];
595
+ /**
596
+ * The corrected copy, for the user to review and accept. Absent when no repair was
597
+ * applied. The original template is left untouched.
598
+ *
599
+ */
600
+ fixed_document?: {
601
+ s3ref?: S3Reference;
602
+ /**
603
+ * example:
604
+ * Umzugsmeldung (fixed).xlsx
605
+ */
606
+ filename?: string;
607
+ /**
608
+ * Short-lived download link for the corrected copy
609
+ */
610
+ preview_url?: string; // uri
611
+ };
612
+ }
473
613
  }
474
614
  }
475
615
  declare namespace Paths {
@@ -482,13 +622,33 @@ declare namespace Paths {
482
622
  namespace GenerateDocumentV2 {
483
623
  namespace Parameters {
484
624
  export type JobId = string;
625
+ /**
626
+ * - partial_generation: Generates a partial document for user validation before final generation
627
+ * - full_generation: Completes the entire document generation process in one step
628
+ *
629
+ */
485
630
  export type Mode = "partial_generation" | "full_generation";
631
+ /**
632
+ * - open: Preview URL opens the file directly in browser
633
+ * - download: Preview URL triggers a download of the file
634
+ *
635
+ */
486
636
  export type PreviewMode = "open" | "download";
487
637
  }
488
638
  export interface QueryParameters {
489
639
  job_id?: Parameters.JobId;
490
- mode?: Parameters.Mode;
491
- preview_mode?: Parameters.PreviewMode;
640
+ mode?: /**
641
+ * - partial_generation: Generates a partial document for user validation before final generation
642
+ * - full_generation: Completes the entire document generation process in one step
643
+ *
644
+ */
645
+ Parameters.Mode;
646
+ preview_mode?: /**
647
+ * - open: Preview URL opens the file directly in browser
648
+ * - download: Preview URL triggers a download of the file
649
+ *
650
+ */
651
+ Parameters.PreviewMode;
492
652
  }
493
653
  export type RequestBody = Components.Schemas.DocumentGenerationV2Request;
494
654
  namespace Responses {
@@ -504,6 +664,15 @@ declare namespace Paths {
504
664
  export type $415 = Components.Schemas.ErrorOutput;
505
665
  }
506
666
  }
667
+ namespace ValidateTemplate {
668
+ export type RequestBody = Components.Schemas.TemplateValidationRequest;
669
+ namespace Responses {
670
+ export type $200 = Components.Schemas.TemplateValidationResponse;
671
+ export type $403 = Components.Schemas.ErrorOutput;
672
+ export type $413 = Components.Schemas.ErrorOutput;
673
+ export type $415 = Components.Schemas.ErrorOutput;
674
+ }
675
+ }
507
676
  }
508
677
 
509
678
 
@@ -561,6 +730,33 @@ interface OperationMethods {
561
730
  data?: Paths.ConvertDocument.RequestBody,
562
731
  config?: AxiosRequestConfig
563
732
  ): OperationResponse<Paths.ConvertDocument.Responses.$200>
733
+ /**
734
+ * validateTemplate - validateTemplate
735
+ *
736
+ * Validates a document template's variable syntax and, optionally, proposes a hotfixed copy of it.
737
+ *
738
+ * The endpoint compiles the template with docxtemplater's core parser (the xlsx module for
739
+ * spreadsheets), so a delimiter or tag error reported here is one generation would fail on.
740
+ * Failures specific to the image or HTML modules are not covered. Every problem it can repair
741
+ * unambiguously — a missing brace, an extra brace, a smart quote or a non-breaking space that
742
+ * Word substituted inside a tag — is applied to a **copy** of the template, which is uploaded
743
+ * and returned as `fixed_document`.
744
+ *
745
+ * The original template is never modified. Accepting the fix is an explicit, separate step:
746
+ * the caller shows the user `issues` (each with its `before`/`after`), lets them download
747
+ * `fixed_document.preview_url`, and only then replaces the template.
748
+ *
749
+ * Supported input document types:
750
+ * - .docx, .docm, .dotx
751
+ * - .xlsx, .xlsm
752
+ * - .pptx
753
+ *
754
+ */
755
+ 'validateTemplate'(
756
+ parameters?: Parameters<UnknownParamsObject> | null,
757
+ data?: Paths.ValidateTemplate.RequestBody,
758
+ config?: AxiosRequestConfig
759
+ ): OperationResponse<Paths.ValidateTemplate.Responses.$200>
564
760
  }
565
761
 
566
762
  interface PathsDictionary {
@@ -623,6 +819,35 @@ interface PathsDictionary {
623
819
  config?: AxiosRequestConfig
624
820
  ): OperationResponse<Paths.ConvertDocument.Responses.$200>
625
821
  }
822
+ ['/v2/templates:validate']: {
823
+ /**
824
+ * validateTemplate - validateTemplate
825
+ *
826
+ * Validates a document template's variable syntax and, optionally, proposes a hotfixed copy of it.
827
+ *
828
+ * The endpoint compiles the template with docxtemplater's core parser (the xlsx module for
829
+ * spreadsheets), so a delimiter or tag error reported here is one generation would fail on.
830
+ * Failures specific to the image or HTML modules are not covered. Every problem it can repair
831
+ * unambiguously — a missing brace, an extra brace, a smart quote or a non-breaking space that
832
+ * Word substituted inside a tag — is applied to a **copy** of the template, which is uploaded
833
+ * and returned as `fixed_document`.
834
+ *
835
+ * The original template is never modified. Accepting the fix is an explicit, separate step:
836
+ * the caller shows the user `issues` (each with its `before`/`after`), lets them download
837
+ * `fixed_document.preview_url`, and only then replaces the template.
838
+ *
839
+ * Supported input document types:
840
+ * - .docx, .docm, .dotx
841
+ * - .xlsx, .xlsm
842
+ * - .pptx
843
+ *
844
+ */
845
+ 'post'(
846
+ parameters?: Parameters<UnknownParamsObject> | null,
847
+ data?: Paths.ValidateTemplate.RequestBody,
848
+ config?: AxiosRequestConfig
849
+ ): OperationResponse<Paths.ValidateTemplate.Responses.$200>
850
+ }
626
851
  }
627
852
 
628
853
  type Client = OpenAPIClient<OperationMethods, PathsDictionary>
@@ -643,6 +868,9 @@ type InternalErrorDetails = Components.Schemas.InternalErrorDetails;
643
868
  type InvalidCustomVariableErrorDetail = Components.Schemas.InvalidCustomVariableErrorDetail;
644
869
  type InvalidCustomVariableErrorDetails = Components.Schemas.InvalidCustomVariableErrorDetails;
645
870
  type S3Reference = Components.Schemas.S3Reference;
871
+ type TemplateIssue = Components.Schemas.TemplateIssue;
646
872
  type TemplateSettings = Components.Schemas.TemplateSettings;
873
+ type TemplateValidationRequest = Components.Schemas.TemplateValidationRequest;
874
+ type TemplateValidationResponse = Components.Schemas.TemplateValidationResponse;
647
875
 
648
- export { type Client as C, type DocumentGenerationV2Request as D, type ErrorCode as E, type InternalErrorDetail as I, type OperationMethods as O, Paths as P, type S3Reference as S, type TemplateSettings as T, Components as a, type PathsDictionary as b, type ConvertDocumentRequest as c, type ConvertDocumentResponse as d, type DocumentGenerationV2Response as e, type DocumentMetaRequest as f, type DocumentMetaResponse as g, type DocxTemplaterErrorDetail as h, type DocxTemplaterErrorDetails as i, type ErrorOutput as j, type InternalErrorDetails as k, type InvalidCustomVariableErrorDetail as l, type InvalidCustomVariableErrorDetails as m };
876
+ export { type Client as C, type DocumentGenerationV2Request as D, type ErrorCode as E, type InternalErrorDetail as I, type OperationMethods as O, Paths as P, type S3Reference as S, type TemplateIssue as T, Components as a, type PathsDictionary as b, type ConvertDocumentRequest as c, type ConvertDocumentResponse as d, type DocumentGenerationV2Response as e, type DocumentMetaRequest as f, type DocumentMetaResponse as g, type DocxTemplaterErrorDetail as h, type DocxTemplaterErrorDetails as i, type ErrorOutput as j, type InternalErrorDetails as k, type InvalidCustomVariableErrorDetail as l, type InvalidCustomVariableErrorDetails as m, type TemplateSettings as n, type TemplateValidationRequest as o, type TemplateValidationResponse as p };