@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.
- package/definitions/access-token-runtime.json +1 -0
- package/definitions/access-token.json +1025 -0
- package/definitions/address-runtime.json +1 -0
- package/definitions/address-suggestions-runtime.json +1 -0
- package/definitions/address-suggestions.json +582 -0
- package/definitions/address.json +578 -0
- package/definitions/ai-agents-runtime.json +1 -0
- package/definitions/ai-agents.json +2863 -0
- package/definitions/app-runtime.json +1 -0
- package/definitions/app.json +5994 -0
- package/definitions/audit-logs-runtime.json +1 -0
- package/definitions/audit-logs.json +305 -0
- package/definitions/automation-runtime.json +1 -0
- package/definitions/automation.json +5979 -0
- package/definitions/billing-runtime.json +1 -0
- package/definitions/billing.json +2394 -0
- package/definitions/blueprint-manifest-runtime.json +1 -0
- package/definitions/blueprint-manifest.json +7817 -0
- package/definitions/calendar-runtime.json +1 -0
- package/definitions/calendar.json +2904 -0
- package/definitions/chat-runtime.json +1 -0
- package/definitions/chat.json +2909 -0
- package/definitions/configuration-hub-runtime.json +1 -0
- package/definitions/configuration-hub.json +2250 -0
- package/definitions/consent-runtime.json +1 -0
- package/definitions/consent.json +344 -0
- package/definitions/customer-portal-runtime.json +1 -0
- package/definitions/customer-portal.json +21181 -0
- package/definitions/dashboard-runtime.json +1 -0
- package/definitions/dashboard.json +1355 -0
- package/definitions/data-governance-runtime.json +1 -0
- package/definitions/data-governance.json +1126 -0
- package/definitions/deduplication-runtime.json +1 -0
- package/definitions/deduplication.json +782 -0
- package/definitions/design-runtime.json +1 -0
- package/definitions/design.json +1827 -0
- package/definitions/document-runtime.json +1 -0
- package/definitions/document.json +972 -0
- package/definitions/email-settings-runtime.json +1 -0
- package/definitions/email-settings.json +3736 -0
- package/definitions/email-template-runtime.json +1 -0
- package/definitions/email-template.json +1441 -0
- package/definitions/entity-mapping-runtime.json +1 -0
- package/definitions/entity-mapping.json +1852 -0
- package/definitions/entity-runtime.json +1 -0
- package/definitions/entity.json +11546 -0
- package/definitions/environments-runtime.json +1 -0
- package/definitions/environments.json +988 -0
- package/definitions/erp-integration-runtime.json +1 -0
- package/definitions/erp-integration.json +7936 -0
- package/definitions/event-catalog-runtime.json +1 -0
- package/definitions/event-catalog.json +2014 -0
- package/definitions/file-runtime.json +1 -0
- package/definitions/file.json +4298 -0
- package/definitions/iban-runtime.json +1 -0
- package/definitions/iban.json +132 -0
- package/definitions/integration-toolkit-runtime.json +1 -0
- package/definitions/integration-toolkit.json +13106 -0
- package/definitions/journey-runtime.json +1 -0
- package/definitions/journey.json +3663 -0
- package/definitions/kanban-runtime.json +1 -0
- package/definitions/kanban.json +1506 -0
- package/definitions/message-runtime.json +1 -0
- package/definitions/message.json +3667 -0
- package/definitions/metering-runtime.json +1 -0
- package/definitions/metering.json +3132 -0
- package/definitions/notes-runtime.json +1 -0
- package/definitions/notes.json +1698 -0
- package/definitions/notification-runtime.json +1 -0
- package/definitions/notification.json +1439 -0
- package/definitions/organization-runtime.json +1 -0
- package/definitions/organization.json +1192 -0
- package/definitions/partner-directory-runtime.json +1 -0
- package/definitions/partner-directory.json +2284 -0
- package/definitions/permissions-runtime.json +1 -0
- package/definitions/permissions.json +1598 -0
- package/definitions/pricing-runtime.json +1 -0
- package/definitions/pricing-tier-runtime.json +1 -0
- package/definitions/pricing-tier.json +105 -0
- package/definitions/pricing.json +14369 -0
- package/definitions/purpose-runtime.json +1 -0
- package/definitions/purpose.json +524 -0
- package/definitions/query-runtime.json +1 -0
- package/definitions/query.json +3178 -0
- package/definitions/sandbox-runtime.json +1 -0
- package/definitions/sandbox.json +453 -0
- package/definitions/sharing-runtime.json +1 -0
- package/definitions/sharing.json +956 -0
- package/definitions/snapshot-runtime.json +1 -0
- package/definitions/snapshot.json +1103 -0
- package/definitions/submission-runtime.json +1 -0
- package/definitions/submission.json +313 -0
- package/definitions/targeting-runtime.json +1 -0
- package/definitions/targeting.json +2285 -0
- package/definitions/template-variables-runtime.json +1 -0
- package/definitions/template-variables.json +1416 -0
- package/definitions/user-runtime.json +1 -0
- package/definitions/user.json +3051 -0
- package/definitions/validation-rules-runtime.json +1 -0
- package/definitions/validation-rules.json +2642 -0
- package/definitions/webhooks-runtime.json +1 -0
- package/definitions/webhooks.json +1875 -0
- package/definitions/workflow-definition-runtime.json +1 -0
- package/definitions/workflow-definition.json +3592 -0
- package/definitions/workflow-runtime.json +1 -0
- package/definitions/workflow.json +4669 -0
- package/dist/apis/access-token.cjs +6 -6
- package/dist/apis/access-token.js +1 -1
- package/dist/apis/address-suggestions.cjs +6 -6
- package/dist/apis/address-suggestions.js +1 -1
- package/dist/apis/address.cjs +6 -6
- package/dist/apis/address.js +1 -1
- package/dist/apis/ai-agents.cjs +6 -6
- package/dist/apis/ai-agents.js +1 -1
- package/dist/apis/app.cjs +6 -6
- package/dist/apis/app.js +1 -1
- package/dist/apis/audit-logs.cjs +6 -6
- package/dist/apis/audit-logs.js +1 -1
- package/dist/apis/automation.cjs +6 -6
- package/dist/apis/automation.js +1 -1
- package/dist/apis/billing.cjs +6 -6
- package/dist/apis/billing.js +1 -1
- package/dist/apis/blueprint-manifest.cjs +6 -6
- package/dist/apis/blueprint-manifest.js +1 -1
- package/dist/apis/calendar.cjs +6 -6
- package/dist/apis/calendar.js +1 -1
- package/dist/apis/chat.cjs +6 -6
- package/dist/apis/chat.js +1 -1
- package/dist/apis/configuration-hub.cjs +6 -6
- package/dist/apis/configuration-hub.d.cts +2 -2
- package/dist/apis/configuration-hub.d.ts +2 -2
- package/dist/apis/configuration-hub.js +1 -1
- package/dist/apis/consent.cjs +6 -6
- package/dist/apis/consent.js +1 -1
- package/dist/apis/customer-portal.cjs +6 -6
- package/dist/apis/customer-portal.js +1 -1
- package/dist/apis/dashboard.cjs +6 -6
- package/dist/apis/dashboard.js +1 -1
- package/dist/apis/data-governance.cjs +6 -6
- package/dist/apis/data-governance.js +1 -1
- package/dist/apis/deduplication.cjs +6 -6
- package/dist/apis/deduplication.js +1 -1
- package/dist/apis/design.cjs +6 -6
- package/dist/apis/design.js +1 -1
- package/dist/apis/document.cjs +8 -8
- package/dist/apis/document.d.cts +2 -2
- package/dist/apis/document.d.ts +2 -2
- package/dist/apis/document.js +2 -2
- package/dist/apis/email-settings.cjs +6 -6
- package/dist/apis/email-settings.js +1 -1
- package/dist/apis/email-template.cjs +6 -6
- package/dist/apis/email-template.js +1 -1
- package/dist/apis/entity-mapping.cjs +6 -6
- package/dist/apis/entity-mapping.js +1 -1
- package/dist/apis/entity.cjs +6 -6
- package/dist/apis/entity.js +1 -1
- package/dist/apis/environments.cjs +6 -6
- package/dist/apis/environments.js +1 -1
- package/dist/apis/event-catalog.cjs +6 -6
- package/dist/apis/event-catalog.js +1 -1
- package/dist/apis/file.cjs +6 -6
- package/dist/apis/file.js +1 -1
- package/dist/apis/iban.cjs +6 -6
- package/dist/apis/iban.js +1 -1
- package/dist/apis/integration-toolkit.cjs +6 -6
- package/dist/apis/integration-toolkit.js +1 -1
- package/dist/apis/journey.cjs +6 -6
- package/dist/apis/journey.d.cts +2 -2
- package/dist/apis/journey.d.ts +2 -2
- package/dist/apis/journey.js +1 -1
- package/dist/apis/kanban.cjs +6 -6
- package/dist/apis/kanban.js +1 -1
- package/dist/apis/message.cjs +6 -6
- package/dist/apis/message.js +1 -1
- package/dist/apis/metering.cjs +6 -6
- package/dist/apis/metering.js +1 -1
- package/dist/apis/notes.cjs +6 -6
- package/dist/apis/notes.js +1 -1
- package/dist/apis/notification.cjs +6 -6
- package/dist/apis/notification.js +1 -1
- package/dist/apis/organization.cjs +6 -6
- package/dist/apis/organization.js +1 -1
- package/dist/apis/partner-directory.cjs +6 -6
- package/dist/apis/partner-directory.js +1 -1
- package/dist/apis/permissions.cjs +6 -6
- package/dist/apis/permissions.js +1 -1
- package/dist/apis/pricing-tier.cjs +6 -6
- package/dist/apis/pricing-tier.js +1 -1
- package/dist/apis/pricing.cjs +6 -6
- package/dist/apis/pricing.js +1 -1
- package/dist/apis/purpose.cjs +6 -6
- package/dist/apis/purpose.js +1 -1
- package/dist/apis/query.cjs +6 -6
- package/dist/apis/query.js +1 -1
- package/dist/apis/sandbox.cjs +6 -6
- package/dist/apis/sandbox.js +1 -1
- package/dist/apis/sharing.cjs +6 -6
- package/dist/apis/sharing.js +1 -1
- package/dist/apis/snapshot.cjs +6 -6
- package/dist/apis/snapshot.js +1 -1
- package/dist/apis/submission.cjs +6 -6
- package/dist/apis/submission.js +1 -1
- package/dist/apis/target.cjs +6 -6
- package/dist/apis/target.js +1 -1
- package/dist/apis/targeting.cjs +6 -6
- package/dist/apis/targeting.js +1 -1
- package/dist/apis/template-variables.cjs +6 -6
- package/dist/apis/template-variables.js +1 -1
- package/dist/apis/user.cjs +6 -6
- package/dist/apis/user.js +1 -1
- package/dist/apis/validation-rules.cjs +6 -6
- package/dist/apis/validation-rules.js +1 -1
- package/dist/apis/webhooks.cjs +6 -6
- package/dist/apis/webhooks.js +1 -1
- package/dist/apis/workflow-definition.cjs +6 -6
- package/dist/apis/workflow-definition.js +1 -1
- package/dist/apis/workflow.cjs +6 -6
- package/dist/apis/workflow.js +1 -1
- package/dist/{chunk-M56QQHVA.cjs → chunk-E2EHXQRP.cjs} +1 -1
- package/dist/{chunk-75EI2Q64.js → chunk-LR7LGGRU.js} +1 -1
- package/dist/{chunk-PZ4TXAF5.cjs → chunk-UM53DB6T.cjs} +3 -3
- package/dist/{chunk-X742W7MI.js → chunk-W5PMKQO7.js} +3 -3
- package/dist/{configuration-hub.d-Dv41yC3b.d.cts → configuration-hub.d-DhPrjJkE.d.cts} +142 -142
- package/dist/{configuration-hub.d-Dv41yC3b.d.ts → configuration-hub.d-DhPrjJkE.d.ts} +142 -142
- package/dist/document-UGT6DAXC.cjs +7 -0
- package/dist/document-UR5WWZEA.js +7 -0
- package/dist/{document-runtime-GFEBGNMS.js → document-runtime-LFOBMSE4.js} +1 -1
- package/dist/{document-runtime-RG3F4R6O.cjs → document-runtime-QM4H7DLT.cjs} +2 -2
- package/dist/{document.d-DN37pjdx.d.cts → document.d-B0zC-R8x.d.cts} +235 -7
- package/dist/{document.d-DN37pjdx.d.ts → document.d-B0zC-R8x.d.ts} +235 -7
- package/dist/index.cjs +10 -10
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +2 -2
- package/dist/journey-IVIBYU5V.js +7 -0
- package/dist/journey-ZN46FFPM.cjs +7 -0
- package/dist/{journey.d-DvwLALwc.d.cts → journey.d-Dj93v-Lw.d.cts} +54 -5
- package/dist/{journey.d-DvwLALwc.d.ts → journey.d-Dj93v-Lw.d.ts} +54 -5
- package/dist/js-yaml-DLCVPJ7G.js +0 -0
- package/docs/document.md +145 -6
- package/docs/journey.md +47 -2
- package/package.json +12 -11
- package/dist/document-CY2A2OE7.js +0 -7
- package/dist/document-RYQ7MF6U.cjs +0 -7
- package/dist/journey-LIJDXSEC.js +0 -7
- package/dist/journey-LNA7JFP3.cjs +0 -7
|
@@ -0,0 +1,972 @@
|
|
|
1
|
+
{
|
|
2
|
+
"openapi": "3.0.2",
|
|
3
|
+
"info": {
|
|
4
|
+
"title": "Document API",
|
|
5
|
+
"version": "1.0.0",
|
|
6
|
+
"description": "A document generation API that allows you to generate documents from templates with variables.\n\n[Feature Documentation](https://docs.epilot.io/docs/files/document-generation)\n"
|
|
7
|
+
},
|
|
8
|
+
"tags": [
|
|
9
|
+
{
|
|
10
|
+
"name": "Documents",
|
|
11
|
+
"description": "Document Generation"
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"security": [
|
|
15
|
+
{
|
|
16
|
+
"EpilotAuth": []
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"paths": {
|
|
20
|
+
"/v2/documents:meta": {
|
|
21
|
+
"post": {
|
|
22
|
+
"operationId": "getTemplateMeta",
|
|
23
|
+
"summary": "getTemplateMeta",
|
|
24
|
+
"description": "Get metadata for a document template\n\nSupported input document types:\n- .docx\n",
|
|
25
|
+
"tags": [
|
|
26
|
+
"Documents"
|
|
27
|
+
],
|
|
28
|
+
"requestBody": {
|
|
29
|
+
"required": true,
|
|
30
|
+
"content": {
|
|
31
|
+
"application/json": {
|
|
32
|
+
"schema": {
|
|
33
|
+
"$ref": "#/components/schemas/DocumentMetaRequest"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"responses": {
|
|
39
|
+
"200": {
|
|
40
|
+
"description": "Document metadata",
|
|
41
|
+
"content": {
|
|
42
|
+
"application/json": {
|
|
43
|
+
"schema": {
|
|
44
|
+
"$ref": "#/components/schemas/DocumentMetaResponse"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"400": {
|
|
50
|
+
"description": "Bad request",
|
|
51
|
+
"content": {
|
|
52
|
+
"application/json": {
|
|
53
|
+
"schema": {
|
|
54
|
+
"$ref": "#/components/schemas/ErrorOutput"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"403": {
|
|
60
|
+
"description": "Forbidden",
|
|
61
|
+
"content": {
|
|
62
|
+
"application/json": {
|
|
63
|
+
"schema": {
|
|
64
|
+
"$ref": "#/components/schemas/ErrorOutput"
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"415": {
|
|
70
|
+
"description": "Unsupported media type",
|
|
71
|
+
"content": {
|
|
72
|
+
"application/json": {
|
|
73
|
+
"schema": {
|
|
74
|
+
"$ref": "#/components/schemas/ErrorOutput"
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"/v2/documents:generate": {
|
|
83
|
+
"post": {
|
|
84
|
+
"operationId": "generateDocumentV2",
|
|
85
|
+
"summary": "generateDocumentV2",
|
|
86
|
+
"description": "Generates documents from templates with variables.\n\nSupported document types as input:\n- .docx\n- .ics\n\nSupported document types as output:\n- .pdf\n- .docx but limited to only text based variables\n- .ics\n\nUses [Template Variables API](https://docs.epilot.io/api/template-variables) to replace variables in the input document.\n",
|
|
87
|
+
"parameters": [
|
|
88
|
+
{
|
|
89
|
+
"in": "query",
|
|
90
|
+
"name": "job_id",
|
|
91
|
+
"description": "Job ID for tracking the status of document generation action",
|
|
92
|
+
"schema": {
|
|
93
|
+
"type": "string"
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"in": "query",
|
|
98
|
+
"name": "mode",
|
|
99
|
+
"description": "Type of mode used for document generation flow:\n- partial_generation will have a intermediate step for users to validate and replace the variable values before generating the final document.\n- full_generation, goes through all the steps for the full generation of final document\n",
|
|
100
|
+
"schema": {
|
|
101
|
+
"type": "string",
|
|
102
|
+
"enum": [
|
|
103
|
+
"partial_generation",
|
|
104
|
+
"full_generation"
|
|
105
|
+
],
|
|
106
|
+
"description": "- partial_generation: Generates a partial document for user validation before final generation\n- full_generation: Completes the entire document generation process in one step\n",
|
|
107
|
+
"default": "full_generation"
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"in": "query",
|
|
112
|
+
"name": "preview_mode",
|
|
113
|
+
"description": "Type of mode used for document generation preview:\n- open - preview_url provides a link to open the file in a browser\n- download - preview_url provides a link to download the file\n",
|
|
114
|
+
"schema": {
|
|
115
|
+
"type": "string",
|
|
116
|
+
"enum": [
|
|
117
|
+
"open",
|
|
118
|
+
"download"
|
|
119
|
+
],
|
|
120
|
+
"description": "- open: Preview URL opens the file directly in browser\n- download: Preview URL triggers a download of the file\n",
|
|
121
|
+
"default": "open"
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
],
|
|
125
|
+
"tags": [
|
|
126
|
+
"Documents"
|
|
127
|
+
],
|
|
128
|
+
"requestBody": {
|
|
129
|
+
"required": true,
|
|
130
|
+
"content": {
|
|
131
|
+
"application/json": {
|
|
132
|
+
"schema": {
|
|
133
|
+
"$ref": "#/components/schemas/DocumentGenerationV2Request"
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
"responses": {
|
|
139
|
+
"200": {
|
|
140
|
+
"description": "Generated document output",
|
|
141
|
+
"content": {
|
|
142
|
+
"application/json": {
|
|
143
|
+
"schema": {
|
|
144
|
+
"$ref": "#/components/schemas/DocumentGenerationV2Response"
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
"/v2/documents:convert": {
|
|
153
|
+
"post": {
|
|
154
|
+
"operationId": "convertDocument",
|
|
155
|
+
"summary": "convertDocument",
|
|
156
|
+
"description": "Converts a document to a different format.\n\nSupported input document types:\n- .docx\n\nSupported output document types:\n- .pdf\n",
|
|
157
|
+
"tags": [
|
|
158
|
+
"Documents"
|
|
159
|
+
],
|
|
160
|
+
"requestBody": {
|
|
161
|
+
"required": true,
|
|
162
|
+
"content": {
|
|
163
|
+
"application/json": {
|
|
164
|
+
"schema": {
|
|
165
|
+
"$ref": "#/components/schemas/ConvertDocumentRequest"
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
"responses": {
|
|
171
|
+
"200": {
|
|
172
|
+
"description": "Conversion job output",
|
|
173
|
+
"content": {
|
|
174
|
+
"application/json": {
|
|
175
|
+
"schema": {
|
|
176
|
+
"$ref": "#/components/schemas/ConvertDocumentResponse"
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
"/v2/templates:validate": {
|
|
185
|
+
"post": {
|
|
186
|
+
"operationId": "validateTemplate",
|
|
187
|
+
"summary": "validateTemplate",
|
|
188
|
+
"description": "Validates a document template's variable syntax and, optionally, proposes a hotfixed copy of it.\n\nThe endpoint compiles the template with docxtemplater's core parser (the xlsx module for\nspreadsheets), so a delimiter or tag error reported here is one generation would fail on.\nFailures specific to the image or HTML modules are not covered. Every problem it can repair\nunambiguously — a missing brace, an extra brace, a smart quote or a non-breaking space that\nWord substituted inside a tag — is applied to a **copy** of the template, which is uploaded\nand returned as `fixed_document`.\n\nThe original template is never modified. Accepting the fix is an explicit, separate step:\nthe caller shows the user `issues` (each with its `before`/`after`), lets them download\n`fixed_document.preview_url`, and only then replaces the template.\n\nSupported input document types:\n- .docx, .docm, .dotx\n- .xlsx, .xlsm\n- .pptx\n",
|
|
189
|
+
"tags": [
|
|
190
|
+
"Documents"
|
|
191
|
+
],
|
|
192
|
+
"requestBody": {
|
|
193
|
+
"required": true,
|
|
194
|
+
"content": {
|
|
195
|
+
"application/json": {
|
|
196
|
+
"schema": {
|
|
197
|
+
"$ref": "#/components/schemas/TemplateValidationRequest"
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
"responses": {
|
|
203
|
+
"200": {
|
|
204
|
+
"description": "Validation result, with the hotfixed template when one could be produced",
|
|
205
|
+
"content": {
|
|
206
|
+
"application/json": {
|
|
207
|
+
"schema": {
|
|
208
|
+
"$ref": "#/components/schemas/TemplateValidationResponse"
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
"403": {
|
|
214
|
+
"description": "Forbidden",
|
|
215
|
+
"content": {
|
|
216
|
+
"application/json": {
|
|
217
|
+
"schema": {
|
|
218
|
+
"$ref": "#/components/schemas/ErrorOutput"
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
},
|
|
223
|
+
"413": {
|
|
224
|
+
"description": "Template larger than the validator accepts (25 MB)",
|
|
225
|
+
"content": {
|
|
226
|
+
"application/json": {
|
|
227
|
+
"schema": {
|
|
228
|
+
"$ref": "#/components/schemas/ErrorOutput"
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
},
|
|
233
|
+
"415": {
|
|
234
|
+
"description": "Unsupported media type",
|
|
235
|
+
"content": {
|
|
236
|
+
"application/json": {
|
|
237
|
+
"schema": {
|
|
238
|
+
"$ref": "#/components/schemas/ErrorOutput"
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
},
|
|
247
|
+
"components": {
|
|
248
|
+
"securitySchemes": {
|
|
249
|
+
"EpilotAuth": {
|
|
250
|
+
"type": "http",
|
|
251
|
+
"scheme": "bearer",
|
|
252
|
+
"description": "Authorization header with epilot OAuth2 bearer token",
|
|
253
|
+
"bearerFormat": "JWT"
|
|
254
|
+
}
|
|
255
|
+
},
|
|
256
|
+
"schemas": {
|
|
257
|
+
"S3Reference": {
|
|
258
|
+
"type": "object",
|
|
259
|
+
"properties": {
|
|
260
|
+
"bucket": {
|
|
261
|
+
"type": "string",
|
|
262
|
+
"example": "document-api-prod"
|
|
263
|
+
},
|
|
264
|
+
"key": {
|
|
265
|
+
"type": "string",
|
|
266
|
+
"example": "uploads/my-template.pdf"
|
|
267
|
+
}
|
|
268
|
+
},
|
|
269
|
+
"required": [
|
|
270
|
+
"bucket",
|
|
271
|
+
"key"
|
|
272
|
+
]
|
|
273
|
+
},
|
|
274
|
+
"ErrorOutput": {
|
|
275
|
+
"type": "object",
|
|
276
|
+
"properties": {
|
|
277
|
+
"error_message": {
|
|
278
|
+
"description": "Error message",
|
|
279
|
+
"type": "string"
|
|
280
|
+
},
|
|
281
|
+
"error_code": {
|
|
282
|
+
"$ref": "#/components/schemas/ErrorCode"
|
|
283
|
+
},
|
|
284
|
+
"error_details": {
|
|
285
|
+
"anyOf": [
|
|
286
|
+
{
|
|
287
|
+
"$ref": "#/components/schemas/InvalidCustomVariableErrorDetails"
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
"$ref": "#/components/schemas/InternalErrorDetails"
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
"$ref": "#/components/schemas/DocxTemplaterErrorDetails"
|
|
294
|
+
}
|
|
295
|
+
]
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
},
|
|
299
|
+
"InvalidCustomVariableErrorDetails": {
|
|
300
|
+
"description": "Error details for invalid custom variables. This error will appear under 'PARSE_ERROR' error code.",
|
|
301
|
+
"type": "array",
|
|
302
|
+
"items": {
|
|
303
|
+
"$ref": "#/components/schemas/InvalidCustomVariableErrorDetail"
|
|
304
|
+
}
|
|
305
|
+
},
|
|
306
|
+
"InvalidCustomVariableErrorDetail": {
|
|
307
|
+
"type": "object",
|
|
308
|
+
"additionalProperties": true,
|
|
309
|
+
"properties": {
|
|
310
|
+
"explanation": {
|
|
311
|
+
"description": "Explanation for the error",
|
|
312
|
+
"type": "string"
|
|
313
|
+
},
|
|
314
|
+
"context": {
|
|
315
|
+
"description": "Context for the error",
|
|
316
|
+
"type": "object",
|
|
317
|
+
"properties": {
|
|
318
|
+
"invalid_variables": {
|
|
319
|
+
"description": "List of invalid variables",
|
|
320
|
+
"type": "array",
|
|
321
|
+
"items": {
|
|
322
|
+
"type": "object",
|
|
323
|
+
"description": "Invalid variable",
|
|
324
|
+
"properties": {
|
|
325
|
+
"variable": {
|
|
326
|
+
"description": "Variable name",
|
|
327
|
+
"type": "string"
|
|
328
|
+
},
|
|
329
|
+
"error": {
|
|
330
|
+
"description": "Explanation for the error",
|
|
331
|
+
"type": "string"
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
},
|
|
340
|
+
"InternalErrorDetails": {
|
|
341
|
+
"description": "Error details for internal error. This error will appear under 'INTERNAL_ERROR' error code.",
|
|
342
|
+
"type": "array",
|
|
343
|
+
"items": {
|
|
344
|
+
"type": "object",
|
|
345
|
+
"properties": {
|
|
346
|
+
"items": {
|
|
347
|
+
"$ref": "#/components/schemas/InternalErrorDetail"
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
},
|
|
352
|
+
"InternalErrorDetail": {
|
|
353
|
+
"type": "object",
|
|
354
|
+
"description": "Internal error detail",
|
|
355
|
+
"properties": {
|
|
356
|
+
"name": {
|
|
357
|
+
"description": "Name of the error",
|
|
358
|
+
"type": "string"
|
|
359
|
+
},
|
|
360
|
+
"message": {
|
|
361
|
+
"description": "Error message",
|
|
362
|
+
"type": "string"
|
|
363
|
+
},
|
|
364
|
+
"stack": {
|
|
365
|
+
"description": "Stack trace",
|
|
366
|
+
"type": "string"
|
|
367
|
+
},
|
|
368
|
+
"cause": {
|
|
369
|
+
"description": "Cause of the error",
|
|
370
|
+
"type": "string"
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
},
|
|
374
|
+
"DocxTemplaterErrorDetails": {
|
|
375
|
+
"description": "Error 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",
|
|
376
|
+
"type": "array",
|
|
377
|
+
"items": {
|
|
378
|
+
"$ref": "#/components/schemas/DocxTemplaterErrorDetail"
|
|
379
|
+
}
|
|
380
|
+
},
|
|
381
|
+
"DocxTemplaterErrorDetail": {
|
|
382
|
+
"type": "object",
|
|
383
|
+
"description": "DocxTemplater error detail",
|
|
384
|
+
"properties": {
|
|
385
|
+
"id": {
|
|
386
|
+
"description": "Id of the error",
|
|
387
|
+
"type": "string"
|
|
388
|
+
},
|
|
389
|
+
"context": {
|
|
390
|
+
"description": "Context of the error",
|
|
391
|
+
"type": "string"
|
|
392
|
+
},
|
|
393
|
+
"explanation": {
|
|
394
|
+
"description": "Explanation of the error",
|
|
395
|
+
"type": "string"
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
},
|
|
399
|
+
"ErrorCode": {
|
|
400
|
+
"description": "Error 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 - Internal error. Please contact support.\n- INVALID_TEMPLATE_FORMAT - Invalid template format (only .docx is supported). This can happen due to a bad word file or an unsupported file extension.\n- TEMPLATE_NOT_FOUND - Template file was not found in S3. This indicates the template was likely deleted.\n",
|
|
401
|
+
"type": "string",
|
|
402
|
+
"enum": [
|
|
403
|
+
"PARSE_ERROR",
|
|
404
|
+
"DOC_TO_PDF_CONVERT_ERROR",
|
|
405
|
+
"INTERNAL_ERROR",
|
|
406
|
+
"INVALID_TEMPLATE_FORMAT",
|
|
407
|
+
"TEMPLATE_NOT_FOUND"
|
|
408
|
+
]
|
|
409
|
+
},
|
|
410
|
+
"TemplateValidationRequest": {
|
|
411
|
+
"type": "object",
|
|
412
|
+
"required": [
|
|
413
|
+
"template_document"
|
|
414
|
+
],
|
|
415
|
+
"properties": {
|
|
416
|
+
"template_document": {
|
|
417
|
+
"description": "Input template document",
|
|
418
|
+
"type": "object",
|
|
419
|
+
"required": [
|
|
420
|
+
"s3ref"
|
|
421
|
+
],
|
|
422
|
+
"properties": {
|
|
423
|
+
"filename": {
|
|
424
|
+
"type": "string",
|
|
425
|
+
"description": "Document original filename, used to name the fixed copy",
|
|
426
|
+
"example": "Umzugsmeldung.xlsx"
|
|
427
|
+
},
|
|
428
|
+
"s3ref": {
|
|
429
|
+
"$ref": "#/components/schemas/S3Reference"
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
},
|
|
433
|
+
"fix": {
|
|
434
|
+
"description": "Attempt to produce a hotfixed copy of the template. When false, the template is only\ninspected and no file is written.\n",
|
|
435
|
+
"type": "boolean",
|
|
436
|
+
"default": true
|
|
437
|
+
},
|
|
438
|
+
"fix_level": {
|
|
439
|
+
"description": "How far the hotfix may go:\n- safe - only repairs where the author's intent is unambiguous from the syntax\n (unbalanced or duplicated braces, editor-substituted characters inside a tag).\n- aggressive - additionally promotes single-brace placeholders such as `{contact.name}`\n to `{{contact.name}}`. These are common in customer templates but indistinguishable\n from prose that uses braces, so they are reported with `confidence: low`.\n",
|
|
440
|
+
"type": "string",
|
|
441
|
+
"enum": [
|
|
442
|
+
"safe",
|
|
443
|
+
"aggressive"
|
|
444
|
+
],
|
|
445
|
+
"default": "safe"
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
},
|
|
449
|
+
"TemplateValidationResponse": {
|
|
450
|
+
"type": "object",
|
|
451
|
+
"properties": {
|
|
452
|
+
"valid": {
|
|
453
|
+
"description": "Whether the template compiled cleanly before any repair was attempted",
|
|
454
|
+
"type": "boolean",
|
|
455
|
+
"example": false
|
|
456
|
+
},
|
|
457
|
+
"fixed": {
|
|
458
|
+
"description": "Whether a corrected copy of the template could be produced",
|
|
459
|
+
"type": "boolean",
|
|
460
|
+
"example": true
|
|
461
|
+
},
|
|
462
|
+
"issues": {
|
|
463
|
+
"description": "Everything found in the template, whether or not it could be repaired",
|
|
464
|
+
"type": "array",
|
|
465
|
+
"items": {
|
|
466
|
+
"$ref": "#/components/schemas/TemplateIssue"
|
|
467
|
+
}
|
|
468
|
+
},
|
|
469
|
+
"unresolved_errors": {
|
|
470
|
+
"description": "Parser errors that remain after the hotfix (or the original errors when nothing was\nfixed). Empty when the template is valid.\n",
|
|
471
|
+
"type": "array",
|
|
472
|
+
"items": {
|
|
473
|
+
"$ref": "#/components/schemas/DocxTemplaterErrorDetail"
|
|
474
|
+
}
|
|
475
|
+
},
|
|
476
|
+
"fixed_document": {
|
|
477
|
+
"description": "The corrected copy, for the user to review and accept. Absent when no repair was\napplied. The original template is left untouched.\n",
|
|
478
|
+
"type": "object",
|
|
479
|
+
"properties": {
|
|
480
|
+
"s3ref": {
|
|
481
|
+
"$ref": "#/components/schemas/S3Reference"
|
|
482
|
+
},
|
|
483
|
+
"filename": {
|
|
484
|
+
"type": "string",
|
|
485
|
+
"example": "Umzugsmeldung (fixed).xlsx"
|
|
486
|
+
},
|
|
487
|
+
"preview_url": {
|
|
488
|
+
"description": "Short-lived download link for the corrected copy",
|
|
489
|
+
"type": "string",
|
|
490
|
+
"format": "uri"
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
},
|
|
496
|
+
"TemplateIssue": {
|
|
497
|
+
"type": "object",
|
|
498
|
+
"description": "A single template syntax problem, and the repair proposed for it",
|
|
499
|
+
"properties": {
|
|
500
|
+
"id": {
|
|
501
|
+
"description": "Problem kind. Reuses docxtemplater's error vocabulary where one exists\n(`unopened_tag`, `unclosed_tag`, `duplicate_open_tag`, `duplicate_close_tag`), plus\n`malformed_tag` for single-brace placeholders and `typographic_characters` for\neditor-substituted characters inside an otherwise valid tag.\n",
|
|
502
|
+
"type": "string",
|
|
503
|
+
"example": "unopened_tag"
|
|
504
|
+
},
|
|
505
|
+
"file": {
|
|
506
|
+
"description": "Zip part the problem was found in",
|
|
507
|
+
"type": "string",
|
|
508
|
+
"example": "xl/sharedStrings.xml"
|
|
509
|
+
},
|
|
510
|
+
"location": {
|
|
511
|
+
"description": "Where the user can find it — a cell reference for spreadsheets, a part label\n(`Document body`, `Header 1`, `Slide 3`) otherwise.\n",
|
|
512
|
+
"type": "string",
|
|
513
|
+
"example": "Tabelle1!N4"
|
|
514
|
+
},
|
|
515
|
+
"context": {
|
|
516
|
+
"description": "The offending text with surrounding context",
|
|
517
|
+
"type": "string",
|
|
518
|
+
"example": "…Datum: {system.date}} Unterschrift…"
|
|
519
|
+
},
|
|
520
|
+
"explanation": {
|
|
521
|
+
"description": "Why the template parser rejects it",
|
|
522
|
+
"type": "string",
|
|
523
|
+
"example": "The tag is missing an opening brace."
|
|
524
|
+
},
|
|
525
|
+
"fixable": {
|
|
526
|
+
"description": "Whether the proposed repair was applied to the fixed copy",
|
|
527
|
+
"type": "boolean",
|
|
528
|
+
"example": true
|
|
529
|
+
},
|
|
530
|
+
"confidence": {
|
|
531
|
+
"description": "How sure we are that the repair is what the author meant",
|
|
532
|
+
"type": "string",
|
|
533
|
+
"enum": [
|
|
534
|
+
"high",
|
|
535
|
+
"medium",
|
|
536
|
+
"low"
|
|
537
|
+
]
|
|
538
|
+
},
|
|
539
|
+
"rule": {
|
|
540
|
+
"description": "The repair rule that produced `after`",
|
|
541
|
+
"type": "string",
|
|
542
|
+
"example": "balance_opening_delimiter"
|
|
543
|
+
},
|
|
544
|
+
"before": {
|
|
545
|
+
"description": "The text as it is in the template",
|
|
546
|
+
"type": "string",
|
|
547
|
+
"example": "{system.date}}"
|
|
548
|
+
},
|
|
549
|
+
"after": {
|
|
550
|
+
"description": "The text as it would be in the fixed copy",
|
|
551
|
+
"type": "string",
|
|
552
|
+
"example": "{{system.date}}"
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
},
|
|
556
|
+
"TemplateSettings": {
|
|
557
|
+
"type": "object",
|
|
558
|
+
"description": "Template Settings for document generation",
|
|
559
|
+
"properties": {
|
|
560
|
+
"custom_margins": {
|
|
561
|
+
"description": "Custom margins for the document",
|
|
562
|
+
"type": "object",
|
|
563
|
+
"properties": {
|
|
564
|
+
"top": {
|
|
565
|
+
"description": "Top margin in cm",
|
|
566
|
+
"type": "number",
|
|
567
|
+
"example": 2.54
|
|
568
|
+
},
|
|
569
|
+
"bottom": {
|
|
570
|
+
"description": "Bottom margin in cm",
|
|
571
|
+
"type": "number",
|
|
572
|
+
"example": 2.54
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
},
|
|
576
|
+
"suggested_margins": {
|
|
577
|
+
"description": "Suggested margins for the document",
|
|
578
|
+
"type": "object",
|
|
579
|
+
"properties": {
|
|
580
|
+
"top": {
|
|
581
|
+
"description": "Top margin in cm",
|
|
582
|
+
"type": "number",
|
|
583
|
+
"example": 2.54
|
|
584
|
+
},
|
|
585
|
+
"bottom": {
|
|
586
|
+
"description": "Bottom margin in cm",
|
|
587
|
+
"type": "number",
|
|
588
|
+
"example": 2.54
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
},
|
|
592
|
+
"display_margin_guidelines": {
|
|
593
|
+
"description": "Display margin guidelines (applicable to partial generation only)",
|
|
594
|
+
"type": "boolean",
|
|
595
|
+
"example": true
|
|
596
|
+
},
|
|
597
|
+
"enable_data_table_margin_autofix": {
|
|
598
|
+
"description": "Enable data table margin autofix",
|
|
599
|
+
"type": "boolean",
|
|
600
|
+
"example": false
|
|
601
|
+
},
|
|
602
|
+
"template_with_datatable": {
|
|
603
|
+
"description": "A flag that indicates whether the template has 1 or more data tables in it",
|
|
604
|
+
"type": "boolean",
|
|
605
|
+
"example": false
|
|
606
|
+
},
|
|
607
|
+
"enabled_template_settings_persistence": {
|
|
608
|
+
"description": "Enables the persistance of template settings",
|
|
609
|
+
"type": "boolean",
|
|
610
|
+
"example": false
|
|
611
|
+
},
|
|
612
|
+
"misconfigured_margins": {
|
|
613
|
+
"description": "An indication that the page margins are misconfigured",
|
|
614
|
+
"type": "boolean",
|
|
615
|
+
"example": false
|
|
616
|
+
},
|
|
617
|
+
"file_entity_id": {
|
|
618
|
+
"description": "The file entity id, used when persisting a new template version with updated settings",
|
|
619
|
+
"type": "string",
|
|
620
|
+
"format": "uuid",
|
|
621
|
+
"example": "123e4567-e89b-12d3-a456-426614174000"
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
},
|
|
625
|
+
"DocumentMetaRequest": {
|
|
626
|
+
"type": "object",
|
|
627
|
+
"properties": {
|
|
628
|
+
"template_document": {
|
|
629
|
+
"description": "Input template document",
|
|
630
|
+
"type": "object",
|
|
631
|
+
"properties": {
|
|
632
|
+
"s3ref": {
|
|
633
|
+
"$ref": "#/components/schemas/S3Reference"
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
},
|
|
639
|
+
"DocumentMetaResponse": {
|
|
640
|
+
"type": "object",
|
|
641
|
+
"properties": {
|
|
642
|
+
"page_margins": {
|
|
643
|
+
"description": "Page margins for the document",
|
|
644
|
+
"type": "object",
|
|
645
|
+
"properties": {
|
|
646
|
+
"top": {
|
|
647
|
+
"description": "Top margin in cm",
|
|
648
|
+
"type": "number",
|
|
649
|
+
"example": 2.54
|
|
650
|
+
},
|
|
651
|
+
"bottom": {
|
|
652
|
+
"description": "Bottom margin in cm",
|
|
653
|
+
"type": "number",
|
|
654
|
+
"example": 2.54
|
|
655
|
+
},
|
|
656
|
+
"left": {
|
|
657
|
+
"description": "Left margin in cm",
|
|
658
|
+
"type": "number",
|
|
659
|
+
"example": 2.54
|
|
660
|
+
},
|
|
661
|
+
"right": {
|
|
662
|
+
"description": "Right margin in cm",
|
|
663
|
+
"type": "number",
|
|
664
|
+
"example": 2.54
|
|
665
|
+
},
|
|
666
|
+
"header": {
|
|
667
|
+
"description": "Header margin in cm",
|
|
668
|
+
"type": "number",
|
|
669
|
+
"example": 2.54
|
|
670
|
+
},
|
|
671
|
+
"footer": {
|
|
672
|
+
"description": "Footer margin in cm",
|
|
673
|
+
"type": "number",
|
|
674
|
+
"example": 2.54
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
},
|
|
678
|
+
"variables": {
|
|
679
|
+
"description": "List of variables in the document",
|
|
680
|
+
"type": "array",
|
|
681
|
+
"items": {
|
|
682
|
+
"type": "string"
|
|
683
|
+
},
|
|
684
|
+
"example": [
|
|
685
|
+
"order.billing_contact.0.salutation",
|
|
686
|
+
"order.billing_contact.0.title",
|
|
687
|
+
"order_table",
|
|
688
|
+
"stayHardStatic",
|
|
689
|
+
"opportunity[attribute_name]",
|
|
690
|
+
"opportunity[\"attribute_name\"]",
|
|
691
|
+
"opportunity.[attribute_name]",
|
|
692
|
+
"attribute_name",
|
|
693
|
+
"opportunities.0.attribute_name",
|
|
694
|
+
"opportunities[0].attribute_name",
|
|
695
|
+
"contact.opportunities[0].attribute_name",
|
|
696
|
+
"opportunities[Primary].attribute_name"
|
|
697
|
+
]
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
},
|
|
701
|
+
"DocumentGenerationV2Request": {
|
|
702
|
+
"type": "object",
|
|
703
|
+
"properties": {
|
|
704
|
+
"template_document": {
|
|
705
|
+
"description": "Input template document",
|
|
706
|
+
"type": "object",
|
|
707
|
+
"properties": {
|
|
708
|
+
"filename": {
|
|
709
|
+
"type": "string",
|
|
710
|
+
"description": "Document original filename",
|
|
711
|
+
"example": "my-template-{{order.order_number}}.docx"
|
|
712
|
+
},
|
|
713
|
+
"s3ref": {
|
|
714
|
+
"$ref": "#/components/schemas/S3Reference"
|
|
715
|
+
}
|
|
716
|
+
}
|
|
717
|
+
},
|
|
718
|
+
"context_entity_id": {
|
|
719
|
+
"type": "string",
|
|
720
|
+
"format": "uuid",
|
|
721
|
+
"description": "Entity to use for variable context",
|
|
722
|
+
"example": "bcd0aab9-b544-42b0-8bfb-6d449d02eacc"
|
|
723
|
+
},
|
|
724
|
+
"user_id": {
|
|
725
|
+
"type": "string",
|
|
726
|
+
"description": "User Id for variable context",
|
|
727
|
+
"example": "100321"
|
|
728
|
+
},
|
|
729
|
+
"language": {
|
|
730
|
+
"type": "string",
|
|
731
|
+
"description": "Language",
|
|
732
|
+
"example": "de"
|
|
733
|
+
},
|
|
734
|
+
"variable_payload": {
|
|
735
|
+
"description": "Custom values for variables in the template. Takes the higher precedence than others.",
|
|
736
|
+
"type": "object",
|
|
737
|
+
"properties": {
|
|
738
|
+
"additionalProperties": {
|
|
739
|
+
"type": "string"
|
|
740
|
+
}
|
|
741
|
+
}
|
|
742
|
+
},
|
|
743
|
+
"context_data": {
|
|
744
|
+
"description": "Custom values for variables in the template. Takes the higher precedence than others.",
|
|
745
|
+
"type": "object",
|
|
746
|
+
"properties": {
|
|
747
|
+
"additionalProperties": {
|
|
748
|
+
"type": "string"
|
|
749
|
+
}
|
|
750
|
+
}
|
|
751
|
+
},
|
|
752
|
+
"template_settings": {
|
|
753
|
+
"$ref": "#/components/schemas/TemplateSettings"
|
|
754
|
+
}
|
|
755
|
+
},
|
|
756
|
+
"required": [
|
|
757
|
+
"template_document"
|
|
758
|
+
]
|
|
759
|
+
},
|
|
760
|
+
"DocumentGenerationV2Response": {
|
|
761
|
+
"type": "object",
|
|
762
|
+
"properties": {
|
|
763
|
+
"job_id": {
|
|
764
|
+
"type": "string",
|
|
765
|
+
"format": "uuid"
|
|
766
|
+
},
|
|
767
|
+
"job_status": {
|
|
768
|
+
"description": "Status of the job",
|
|
769
|
+
"type": "string",
|
|
770
|
+
"enum": [
|
|
771
|
+
"STARTED",
|
|
772
|
+
"PROCESSING",
|
|
773
|
+
"SUCCESS",
|
|
774
|
+
"FAILED"
|
|
775
|
+
]
|
|
776
|
+
},
|
|
777
|
+
"message": {
|
|
778
|
+
"description": "A message explaining the progress",
|
|
779
|
+
"type": "string"
|
|
780
|
+
},
|
|
781
|
+
"ics_output": {
|
|
782
|
+
"type": "object",
|
|
783
|
+
"properties": {
|
|
784
|
+
"output_document": {
|
|
785
|
+
"type": "object",
|
|
786
|
+
"properties": {
|
|
787
|
+
"filename": {
|
|
788
|
+
"description": "Generated document filename for ICS",
|
|
789
|
+
"type": "string",
|
|
790
|
+
"example": "my-appointment-OR-001.ics"
|
|
791
|
+
},
|
|
792
|
+
"s3ref": {
|
|
793
|
+
"$ref": "#/components/schemas/S3Reference"
|
|
794
|
+
}
|
|
795
|
+
},
|
|
796
|
+
"example": {
|
|
797
|
+
"s3ref": {
|
|
798
|
+
"bucket": "document-api-preview-prod",
|
|
799
|
+
"key": "preview/my-appointment.ics"
|
|
800
|
+
}
|
|
801
|
+
}
|
|
802
|
+
}
|
|
803
|
+
}
|
|
804
|
+
},
|
|
805
|
+
"pdf_output": {
|
|
806
|
+
"type": "object",
|
|
807
|
+
"properties": {
|
|
808
|
+
"preview_url": {
|
|
809
|
+
"description": "Pre-signed S3 GET URL for PDF preview",
|
|
810
|
+
"type": "string",
|
|
811
|
+
"example": "https://document-api-prod.s3.eu-central-1.amazonaws.com/preview/my-template-OR-001.pdf"
|
|
812
|
+
},
|
|
813
|
+
"output_document": {
|
|
814
|
+
"type": "object",
|
|
815
|
+
"properties": {
|
|
816
|
+
"filename": {
|
|
817
|
+
"description": "Generated document filename for PDF",
|
|
818
|
+
"type": "string",
|
|
819
|
+
"example": "my-template-OR-001.pdf"
|
|
820
|
+
},
|
|
821
|
+
"s3ref": {
|
|
822
|
+
"$ref": "#/components/schemas/S3Reference"
|
|
823
|
+
}
|
|
824
|
+
},
|
|
825
|
+
"example": {
|
|
826
|
+
"s3ref": {
|
|
827
|
+
"bucket": "document-api-preview-prod",
|
|
828
|
+
"key": "preview/my-template.pdf"
|
|
829
|
+
}
|
|
830
|
+
}
|
|
831
|
+
}
|
|
832
|
+
}
|
|
833
|
+
},
|
|
834
|
+
"docx_output": {
|
|
835
|
+
"type": "object",
|
|
836
|
+
"properties": {
|
|
837
|
+
"preview_url": {
|
|
838
|
+
"description": "Pre-signed S3 GET URL for DOCX preview",
|
|
839
|
+
"type": "string",
|
|
840
|
+
"example": "https://document-api-prod.s3.eu-central-1.amazonaws.com/preview/my-template-OR-001.docx"
|
|
841
|
+
},
|
|
842
|
+
"output_document": {
|
|
843
|
+
"type": "object",
|
|
844
|
+
"properties": {
|
|
845
|
+
"filename": {
|
|
846
|
+
"description": "Generated document filename for DOCX",
|
|
847
|
+
"type": "string",
|
|
848
|
+
"example": "my-template-OR-001.docx"
|
|
849
|
+
},
|
|
850
|
+
"s3ref": {
|
|
851
|
+
"$ref": "#/components/schemas/S3Reference"
|
|
852
|
+
}
|
|
853
|
+
},
|
|
854
|
+
"example": {
|
|
855
|
+
"s3ref": {
|
|
856
|
+
"bucket": "document-api-preview-prod",
|
|
857
|
+
"key": "preview/my-template.docx"
|
|
858
|
+
}
|
|
859
|
+
}
|
|
860
|
+
}
|
|
861
|
+
}
|
|
862
|
+
},
|
|
863
|
+
"xlsx_output": {
|
|
864
|
+
"type": "object",
|
|
865
|
+
"properties": {
|
|
866
|
+
"preview_url": {
|
|
867
|
+
"description": "Pre-signed S3 GET URL for XLSX preview",
|
|
868
|
+
"type": "string",
|
|
869
|
+
"example": "https://document-api-prod.s3.eu-central-1.amazonaws.com/preview/my-template-OR-001.xlsx"
|
|
870
|
+
},
|
|
871
|
+
"output_document": {
|
|
872
|
+
"type": "object",
|
|
873
|
+
"properties": {
|
|
874
|
+
"filename": {
|
|
875
|
+
"description": "Generated document filename for XLSX",
|
|
876
|
+
"type": "string",
|
|
877
|
+
"example": "my-template-OR-001.xlsx"
|
|
878
|
+
},
|
|
879
|
+
"s3ref": {
|
|
880
|
+
"$ref": "#/components/schemas/S3Reference"
|
|
881
|
+
}
|
|
882
|
+
},
|
|
883
|
+
"example": {
|
|
884
|
+
"s3ref": {
|
|
885
|
+
"bucket": "document-api-preview-prod",
|
|
886
|
+
"key": "preview/my-template.xlsx"
|
|
887
|
+
}
|
|
888
|
+
}
|
|
889
|
+
}
|
|
890
|
+
}
|
|
891
|
+
},
|
|
892
|
+
"error_output": {
|
|
893
|
+
"$ref": "#/components/schemas/ErrorOutput"
|
|
894
|
+
},
|
|
895
|
+
"variable_payload": {
|
|
896
|
+
"description": "List of variables and its corresponding replaced values from the document template",
|
|
897
|
+
"type": "object",
|
|
898
|
+
"properties": {
|
|
899
|
+
"additionalProperties": {
|
|
900
|
+
"type": "string"
|
|
901
|
+
}
|
|
902
|
+
}
|
|
903
|
+
},
|
|
904
|
+
"template_settings": {
|
|
905
|
+
"$ref": "#/components/schemas/TemplateSettings"
|
|
906
|
+
}
|
|
907
|
+
}
|
|
908
|
+
},
|
|
909
|
+
"ConvertDocumentRequest": {
|
|
910
|
+
"type": "object",
|
|
911
|
+
"properties": {
|
|
912
|
+
"language": {
|
|
913
|
+
"type": "string",
|
|
914
|
+
"description": "Language",
|
|
915
|
+
"example": "de"
|
|
916
|
+
},
|
|
917
|
+
"input_document": {
|
|
918
|
+
"description": "Input document",
|
|
919
|
+
"type": "object",
|
|
920
|
+
"properties": {
|
|
921
|
+
"s3ref": {
|
|
922
|
+
"$ref": "#/components/schemas/S3Reference"
|
|
923
|
+
}
|
|
924
|
+
},
|
|
925
|
+
"required": [
|
|
926
|
+
"s3ref"
|
|
927
|
+
]
|
|
928
|
+
},
|
|
929
|
+
"output_format": {
|
|
930
|
+
"description": "Output format of the document",
|
|
931
|
+
"type": "string",
|
|
932
|
+
"enum": [
|
|
933
|
+
"pdf"
|
|
934
|
+
]
|
|
935
|
+
},
|
|
936
|
+
"output_filename": {
|
|
937
|
+
"description": "Filename of the output document (optional)",
|
|
938
|
+
"type": "string",
|
|
939
|
+
"example": "converted.pdf"
|
|
940
|
+
}
|
|
941
|
+
},
|
|
942
|
+
"required": [
|
|
943
|
+
"input_document",
|
|
944
|
+
"output_format"
|
|
945
|
+
]
|
|
946
|
+
},
|
|
947
|
+
"ConvertDocumentResponse": {
|
|
948
|
+
"type": "object",
|
|
949
|
+
"properties": {
|
|
950
|
+
"output_document": {
|
|
951
|
+
"type": "object",
|
|
952
|
+
"properties": {
|
|
953
|
+
"preview_url": {
|
|
954
|
+
"description": "Pre-signed URL for the converted document",
|
|
955
|
+
"type": "string",
|
|
956
|
+
"example": "https://document-api-prod.s3.eu-central-1.amazonaws.com/preview/converted.pdf"
|
|
957
|
+
},
|
|
958
|
+
"s3ref": {
|
|
959
|
+
"$ref": "#/components/schemas/S3Reference"
|
|
960
|
+
}
|
|
961
|
+
}
|
|
962
|
+
}
|
|
963
|
+
}
|
|
964
|
+
}
|
|
965
|
+
}
|
|
966
|
+
},
|
|
967
|
+
"servers": [
|
|
968
|
+
{
|
|
969
|
+
"url": "https://document.sls.epilot.io"
|
|
970
|
+
}
|
|
971
|
+
]
|
|
972
|
+
}
|