@epilot/document-client 0.7.1-alpha1 → 0.8.0

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2022 epilot GmbH
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -1 +1 @@
1
- (()=>{"use strict";var e={914:function(e,t,r){var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var n=o(r(534));t.default=n.default},534:e=>{e.exports=JSON.parse('{"openapi":"3.0.2","info":{"title":"Document API","version":"1.0.0","description":"Generate documents with epilot data\\n\\n[Feature Documentation](https://docs.epilot.io/docs/files/document-generation)\\n"},"tags":[{"name":"Documents","description":"Document Generation"}],"security":[{"EpilotAuth":[]}],"paths":{"/v1/documents:generate":{"post":{"operationId":"generateDocument","summary":"generateDocument","description":"Builds document generated from input document with variables.\\n\\nSupported input document types:\\n- .docx\\n\\nSupported output document types:\\n- .pdf\\n\\nUses [Template Variables API](https://docs.epilot.io/api/template-variables) to replace variables in the document.\\n","tags":["Documents"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"language":{"type":"string","default":"en","example":"de","description":"Language to use"},"template_document":{"description":"Input template document","type":"object","properties":{"filename":{"type":"string","description":"Document original filename","example":"my-template-{{order.order_number}}.docx"},"s3ref":{"$ref":"#/components/schemas/S3Reference"}}},"context_entity_id":{"type":"string","description":"Entity to use for variable context","example":"bcd0aab9-b544-42b0-8bfb-6d449d02eacc"},"user_id":{"type":"string","description":"User Id for variable context","example":100321}},"required":["template_document"]}}}},"responses":{"200":{"description":"Generated document output","content":{"application/json":{"schema":{"type":"object","properties":{"preview_url":{"description":"Pre-signed S3 GET URL for preview","type":"string","example":"https://document-api-prod.s3.eu-central-1.amazonaws.com/preview/my-template-OR-001.pdf"},"output_document":{"type":"object","properties":{"filename":{"description":"Generated document filename","type":"string","example":"my-template-OR-001.pdf"},"s3ref":{"$ref":"#/components/schemas/S3Reference"}},"example":{"s3ref":{"bucket":"document-api-preview-prod","key":"preview/my-template.pdf"}}}}}}}}}}},"/v2/documents:generate":{"post":{"operationId":"generateDocumentV2","summary":"generateDocumentV2","description":"Builds document generated from input document with variables.\\n\\nSupported input document types:\\n- .docx\\n\\nSupported output document types:\\n- .pdf\\n- .docx but limited to only text based variables\\n\\nUses [Template Variables API](https://docs.epilot.io/api/template-variables) to replace variables in the document.\\n","parameters":[{"in":"query","name":"job_id","description":"Job ID for tracking the status of document generation action","schema":{"type":"string"}},{"in":"query","name":"mode","description":"Type of mode used for document generation flow.\\nPartial - Will have a intermediate step for users to validate and replace the variable values before generating the final document.\\nFull - Goes through all the steps for the full generation of final document\\n","schema":{"type":"string","enum":["partial_generation","full_generation"],"default":"automatic"}}],"tags":["Documents"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"language":{"type":"string","default":"de","description":"Language to use for variables"},"template_document":{"description":"Input template document","type":"object","properties":{"filename":{"type":"string","description":"Document original filename","example":"my-template-{{order.order_number}}.docx"},"s3ref":{"$ref":"#/components/schemas/S3Reference"}}},"context_entity_id":{"type":"string","description":"Entity to use for variable context","example":"bcd0aab9-b544-42b0-8bfb-6d449d02eacc"},"user_id":{"type":"string","description":"User Id for variable context","example":100321},"variable_payload":{"description":"Custom values for variables in the template. Takes the higher precedence than others.","type":"object","properties":{"additionalProperties":{"type":"string"}}}},"required":["template_document"]}}}},"responses":{"200":{"description":"Generated document output","content":{"application/json":{"schema":{"type":"object","properties":{"job_id":{"type":"string","format":"uuid"},"job_status":{"description":"Status of the job","type":"string","enum":["STARTED","PROCESSING","SUCCESS","FAILED"]},"message":{"description":"A message explaining the progress","type":"string"},"pdf_output":{"type":"object","properties":{"preview_url":{"description":"Pre-signed S3 GET URL for PDF preview","type":"string","example":"https://document-api-prod.s3.eu-central-1.amazonaws.com/preview/my-template-OR-001.pdf"},"output_document":{"type":"object","properties":{"filename":{"description":"Generated document filename for PDF","type":"string","example":"my-template-OR-001.pdf"},"s3ref":{"$ref":"#/components/schemas/S3Reference"}},"example":{"s3ref":{"bucket":"document-api-preview-prod","key":"preview/my-template.pdf"}}}}},"docx_output":{"type":"object","properties":{"preview_url":{"description":"Pre-signed S3 GET URL for DOCX preview","type":"string","example":"https://document-api-prod.s3.eu-central-1.amazonaws.com/preview/my-template-OR-001.docx"},"output_document":{"type":"object","properties":{"filename":{"description":"Generated document filename for DOCX","type":"string","example":"my-template-OR-001.docx"},"s3ref":{"$ref":"#/components/schemas/S3Reference"}},"example":{"s3ref":{"bucket":"document-api-preview-prod","key":"preview/my-template.docx"}}}}},"error_output":{"$ref":"#/components/schemas/ErrorOutput"},"variable_payload":{"description":"List of variables and its corresponding replaced values from the document template","type":"object","properties":{"additionalProperties":{"type":"string"}}}}}}}}}}}},"components":{"securitySchemes":{"EpilotAuth":{"type":"http","scheme":"bearer","description":"Authorization header with epilot OAuth2 bearer token","bearerFormat":"JWT"}},"schemas":{"S3Reference":{"type":"object","properties":{"bucket":{"type":"string","example":"document-api-prod"},"key":{"type":"string","example":"uploads/my-template.pdf"}},"required":["bucket","key"]},"ErrorOutput":{"type":"object","properties":{"error_message":{"description":"Error message","type":"string"},"error_code":{"description":"Error code","type":"string","enum":["PARSE_ERROR","DOC_TO_PDF_CONVERT_ERROR","INTERNAL_ERROR"]},"error_details":{"description":"Error details","type":"array","items":{"type":"object","additionalProperties":true}}}}}},"servers":[{"url":"https://document.sls.epilot.io"}]}')}},t={},r=function r(o){var n=t[o];if(void 0!==n)return n.exports;var p=t[o]={exports:{}};return e[o].call(p.exports,p,p.exports,r),p.exports}(914),o=exports;for(var n in r)o[n]=r[n];r.__esModule&&Object.defineProperty(o,"__esModule",{value:!0})})();
1
+ (()=>{"use strict";var e={914:function(e,t,o){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var n=r(o(534));t.default=n.default},534:e=>{e.exports=JSON.parse('{"openapi":"3.0.3","info":{"title":"Document API","version":"1.0.0","description":"Generate documents with epilot data\\n\\n[Feature Documentation](https://docs.epilot.io/docs/files/document-generation)\\n"},"tags":[{"name":"Documents","description":"Document Generation"}],"security":[{"EpilotAuth":[]}],"paths":{"/v1/documents:generate":{"post":{"operationId":"generateDocument","summary":"generateDocument","description":"Builds document generated from input document with variables.\\n\\nSupported input document types:\\n- .docx\\n\\nSupported output document types:\\n- .pdf\\n\\nUses [Template Variables API](https://docs.epilot.io/api/template-variables) to replace variables in the document.\\n","tags":["Documents"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"language":{"type":"string","default":"en","example":"de","description":"Language to use"},"template_document":{"description":"Input template document","type":"object","properties":{"filename":{"type":"string","description":"Document original filename","example":"my-template-{{order.order_number}}.docx"},"s3ref":{"$ref":"#/components/schemas/S3Reference"}}},"context_entity_id":{"type":"string","description":"Entity to use for variable context","example":"bcd0aab9-b544-42b0-8bfb-6d449d02eacc"},"user_id":{"type":"string","description":"User Id for variable context","example":100321}},"required":["template_document"]}}}},"responses":{"200":{"description":"Generated document output","content":{"application/json":{"schema":{"type":"object","properties":{"preview_url":{"description":"Pre-signed S3 GET URL for preview","type":"string","example":"https://document-api-prod.s3.eu-central-1.amazonaws.com/preview/my-template-OR-001.pdf"},"output_document":{"type":"object","properties":{"filename":{"description":"Generated document filename","type":"string","example":"my-template-OR-001.pdf"},"s3ref":{"$ref":"#/components/schemas/S3Reference"}},"example":{"s3ref":{"bucket":"document-api-preview-prod","key":"preview/my-template.pdf"}}}}}}}}}}},"/v2/documents:generate":{"post":{"operationId":"generateDocumentV2","summary":"generateDocumentV2","description":"Builds document generated from input document with variables.\\n\\nSupported input document types:\\n- .docx\\n\\nSupported output document types:\\n- .pdf\\n- .docx but limited to only text based variables\\n\\nUses [Template Variables API](https://docs.epilot.io/api/template-variables) to replace variables in the document.\\n","parameters":[{"in":"query","name":"job_id","description":"Job ID for tracking the status of document generation action","schema":{"type":"string"}},{"in":"query","name":"mode","description":"Type of mode used for document generation flow.\\nPartial - Will have a intermediate step for users to validate and replace the variable values before generating the final document.\\nFull - Goes through all the steps for the full generation of final document\\n","schema":{"type":"string","enum":["partial_generation","full_generation"],"default":"automatic"}}],"tags":["Documents"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"language":{"type":"string","default":"de","description":"Language to use for variables"},"template_document":{"description":"Input template document","type":"object","properties":{"filename":{"type":"string","description":"Document original filename","example":"my-template-{{order.order_number}}.docx"},"s3ref":{"$ref":"#/components/schemas/S3Reference"}}},"context_entity_id":{"type":"string","description":"Entity to use for variable context","example":"bcd0aab9-b544-42b0-8bfb-6d449d02eacc"},"user_id":{"type":"string","description":"User Id for variable context","example":100321},"variable_payload":{"description":"Custom values for variables in the template. Takes the higher precedence than others.","type":"object","properties":{"additionalProperties":{"type":"string"}}}},"required":["template_document"]}}}},"responses":{"200":{"description":"Generated document output","content":{"application/json":{"schema":{"type":"object","properties":{"job_id":{"type":"string","format":"uuid"},"job_status":{"description":"Status of the job","type":"string","enum":["STARTED","PROCESSING","SUCCESS","FAILED"]},"message":{"description":"A message explaining the progress","type":"string"},"pdf_output":{"type":"object","properties":{"preview_url":{"description":"Pre-signed S3 GET URL for PDF preview","type":"string","example":"https://document-api-prod.s3.eu-central-1.amazonaws.com/preview/my-template-OR-001.pdf"},"output_document":{"type":"object","properties":{"filename":{"description":"Generated document filename for PDF","type":"string","example":"my-template-OR-001.pdf"},"s3ref":{"$ref":"#/components/schemas/S3Reference"}},"example":{"s3ref":{"bucket":"document-api-preview-prod","key":"preview/my-template.pdf"}}}}},"docx_output":{"type":"object","properties":{"preview_url":{"description":"Pre-signed S3 GET URL for DOCX preview","type":"string","example":"https://document-api-prod.s3.eu-central-1.amazonaws.com/preview/my-template-OR-001.docx"},"output_document":{"type":"object","properties":{"filename":{"description":"Generated document filename for DOCX","type":"string","example":"my-template-OR-001.docx"},"s3ref":{"$ref":"#/components/schemas/S3Reference"}},"example":{"s3ref":{"bucket":"document-api-preview-prod","key":"preview/my-template.docx"}}}}},"variable_payload":{"description":"List of variables and its corresponding replaced values from the document template","type":"object","properties":{"additionalProperties":{"type":"string"}}}}}}}}}}}},"components":{"securitySchemes":{"EpilotAuth":{"type":"http","scheme":"bearer","description":"Authorization header with epilot OAuth2 bearer token","bearerFormat":"JWT"}},"schemas":{"S3Reference":{"type":"object","properties":{"bucket":{"type":"string","example":"document-api-prod"},"key":{"type":"string","example":"uploads/my-template.pdf"}},"required":["bucket","key"]}}},"servers":[{"url":"https://document.sls.epilot.io"},{"url":"https://document.sls.epilot.io"}]}')}},t={},o=function o(r){var n=t[r];if(void 0!==n)return n.exports;var p=t[r]={exports:{}};return e[r].call(p.exports,p,p.exports,o),p.exports}(914),r=exports;for(var n in o)r[n]=o[n];o.__esModule&&Object.defineProperty(r,"__esModule",{value:!0})})();
package/dist/openapi.d.ts CHANGED
@@ -9,22 +9,6 @@ import type {
9
9
 
10
10
  declare namespace Components {
11
11
  namespace Schemas {
12
- export interface ErrorOutput {
13
- /**
14
- * Error message
15
- */
16
- error_message?: string;
17
- /**
18
- * Error code
19
- */
20
- error_code?: "PARSE_ERROR" | "DOC_TO_PDF_CONVERT_ERROR" | "INTERNAL_ERROR";
21
- /**
22
- * Error details
23
- */
24
- error_details?: {
25
- [name: string]: any;
26
- }[];
27
- }
28
12
  export interface S3Reference {
29
13
  /**
30
14
  * example:
@@ -210,7 +194,6 @@ declare namespace Paths {
210
194
  s3ref?: Components.Schemas.S3Reference;
211
195
  };
212
196
  };
213
- error_output?: Components.Schemas.ErrorOutput;
214
197
  /**
215
198
  * List of variables and its corresponding replaced values from the document template
216
199
  */
package/package.json CHANGED
@@ -1,18 +1,19 @@
1
1
  {
2
2
  "name": "@epilot/document-client",
3
- "version": "0.7.1-alpha1",
3
+ "version": "0.8.0",
4
4
  "description": "API Client for epilot document API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "scripts": {
8
- "test": "jest --passWithNoTests",
8
+ "test": "jest",
9
9
  "typescript": "tsc",
10
10
  "bundle-definition": "webpack",
11
11
  "openapi": "node ../../scripts/update-openapi.js https://docs.api.epilot.io/document.yaml",
12
12
  "typegen": "echo '/* eslint-disable */' > src/openapi.d.ts && typegen ./src/openapi.json >> src/openapi.d.ts",
13
- "build": "npm run typegen && npm run typescript && npm run bundle-definition",
14
- "lint": "../../node_modules/eslint/bin/eslint.js src",
15
- "prepublishOnly": "npm run build"
13
+ "build": "tsc && npm run bundle-definition",
14
+ "build:watch": "npm run build && tsc -w",
15
+ "release-alpha": "npm version prerelease --preid alpha",
16
+ "lint": "../../node_modules/eslint/bin/eslint.js src"
16
17
  },
17
18
  "files": [
18
19
  "*.js",
@@ -29,28 +30,30 @@
29
30
  "author": "epilot GmbH",
30
31
  "license": "UNLICENSED",
31
32
  "peerDependencies": {
32
- "axios": "^0.25.0"
33
+ "axios": "^1.6.2"
33
34
  },
34
35
  "dependencies": {
35
36
  "buffer": "^6.0.3",
36
37
  "https-browserify": "^1.0.0",
37
- "openapi-client-axios": "^6.0.0",
38
+ "openapi-client-axios": "^7.5.1",
38
39
  "stream-http": "^3.1.1",
39
40
  "url": "^0.11.0",
40
41
  "util": "^0.12.3"
41
42
  },
42
43
  "devDependencies": {
43
44
  "@types/jest": "^26.0.20",
45
+ "axios": "^1.6.2",
44
46
  "copy-webpack-plugin": "^7.0.0",
45
47
  "jest": "^26.6.3",
46
48
  "json-loader": "^0.5.7",
47
49
  "openapi-client-axios-typegen": "^7.4.1",
48
- "openapicmd": "^1.6.2",
50
+ "openapicmd": "^1.16.2",
49
51
  "ts-jest": "^26.5.0",
50
52
  "ts-loader": "^8.0.14",
51
- "ts-node": "^10.8.2",
52
- "typescript": "^4.7.4",
53
+ "ts-node": "^10.9.1",
54
+ "typescript": "^4.1.3",
53
55
  "webpack": "^5.18.0",
54
56
  "webpack-cli": "^4.4.0"
55
- }
57
+ },
58
+ "gitHead": "87e13b737363092db3b30c32df8e0507f7348697"
56
59
  }
@@ -0,0 +1,296 @@
1
+ /* eslint-disable */
2
+ import type {
3
+ OpenAPIClient,
4
+ Parameters,
5
+ UnknownParamsObject,
6
+ OperationResponse,
7
+ AxiosRequestConfig,
8
+ } from 'openapi-client-axios';
9
+
10
+ declare namespace Components {
11
+ namespace Schemas {
12
+ export interface S3Reference {
13
+ /**
14
+ * example:
15
+ * document-api-prod
16
+ */
17
+ bucket: string;
18
+ /**
19
+ * example:
20
+ * uploads/my-template.pdf
21
+ */
22
+ key: string;
23
+ }
24
+ }
25
+ }
26
+ declare namespace Paths {
27
+ namespace GenerateDocument {
28
+ export interface RequestBody {
29
+ /**
30
+ * Language to use
31
+ * example:
32
+ * de
33
+ */
34
+ language?: string;
35
+ /**
36
+ * Input template document
37
+ */
38
+ template_document: {
39
+ /**
40
+ * Document original filename
41
+ * example:
42
+ * my-template-{{order.order_number}}.docx
43
+ */
44
+ filename?: string;
45
+ s3ref?: Components.Schemas.S3Reference;
46
+ };
47
+ /**
48
+ * Entity to use for variable context
49
+ * example:
50
+ * bcd0aab9-b544-42b0-8bfb-6d449d02eacc
51
+ */
52
+ context_entity_id?: string;
53
+ /**
54
+ * User Id for variable context
55
+ * example:
56
+ * 100321
57
+ */
58
+ user_id?: string;
59
+ }
60
+ namespace Responses {
61
+ export interface $200 {
62
+ /**
63
+ * Pre-signed S3 GET URL for preview
64
+ * example:
65
+ * https://document-api-prod.s3.eu-central-1.amazonaws.com/preview/my-template-OR-001.pdf
66
+ */
67
+ preview_url?: string;
68
+ /**
69
+ * example:
70
+ * {
71
+ * "s3ref": {
72
+ * "bucket": "document-api-preview-prod",
73
+ * "key": "preview/my-template.pdf"
74
+ * }
75
+ * }
76
+ */
77
+ output_document?: {
78
+ /**
79
+ * Generated document filename
80
+ * example:
81
+ * my-template-OR-001.pdf
82
+ */
83
+ filename?: string;
84
+ s3ref?: Components.Schemas.S3Reference;
85
+ };
86
+ }
87
+ }
88
+ }
89
+ namespace GenerateDocumentV2 {
90
+ namespace Parameters {
91
+ export type JobId = string;
92
+ export type Mode = "partial_generation" | "full_generation";
93
+ }
94
+ export interface QueryParameters {
95
+ job_id?: Parameters.JobId;
96
+ mode?: Parameters.Mode;
97
+ }
98
+ export interface RequestBody {
99
+ /**
100
+ * Language to use for variables
101
+ */
102
+ language?: string;
103
+ /**
104
+ * Input template document
105
+ */
106
+ template_document: {
107
+ /**
108
+ * Document original filename
109
+ * example:
110
+ * my-template-{{order.order_number}}.docx
111
+ */
112
+ filename?: string;
113
+ s3ref?: Components.Schemas.S3Reference;
114
+ };
115
+ /**
116
+ * Entity to use for variable context
117
+ * example:
118
+ * bcd0aab9-b544-42b0-8bfb-6d449d02eacc
119
+ */
120
+ context_entity_id?: string;
121
+ /**
122
+ * User Id for variable context
123
+ * example:
124
+ * 100321
125
+ */
126
+ user_id?: string;
127
+ /**
128
+ * Custom values for variables in the template. Takes the higher precedence than others.
129
+ */
130
+ variable_payload?: {
131
+ additionalProperties?: string;
132
+ };
133
+ }
134
+ namespace Responses {
135
+ export interface $200 {
136
+ job_id?: string; // uuid
137
+ /**
138
+ * Status of the job
139
+ */
140
+ job_status?: "STARTED" | "PROCESSING" | "SUCCESS" | "FAILED";
141
+ /**
142
+ * A message explaining the progress
143
+ */
144
+ message?: string;
145
+ pdf_output?: {
146
+ /**
147
+ * Pre-signed S3 GET URL for PDF preview
148
+ * example:
149
+ * https://document-api-prod.s3.eu-central-1.amazonaws.com/preview/my-template-OR-001.pdf
150
+ */
151
+ preview_url?: string;
152
+ /**
153
+ * example:
154
+ * {
155
+ * "s3ref": {
156
+ * "bucket": "document-api-preview-prod",
157
+ * "key": "preview/my-template.pdf"
158
+ * }
159
+ * }
160
+ */
161
+ output_document?: {
162
+ /**
163
+ * Generated document filename for PDF
164
+ * example:
165
+ * my-template-OR-001.pdf
166
+ */
167
+ filename?: string;
168
+ s3ref?: Components.Schemas.S3Reference;
169
+ };
170
+ };
171
+ docx_output?: {
172
+ /**
173
+ * Pre-signed S3 GET URL for DOCX preview
174
+ * example:
175
+ * https://document-api-prod.s3.eu-central-1.amazonaws.com/preview/my-template-OR-001.docx
176
+ */
177
+ preview_url?: string;
178
+ /**
179
+ * example:
180
+ * {
181
+ * "s3ref": {
182
+ * "bucket": "document-api-preview-prod",
183
+ * "key": "preview/my-template.docx"
184
+ * }
185
+ * }
186
+ */
187
+ output_document?: {
188
+ /**
189
+ * Generated document filename for DOCX
190
+ * example:
191
+ * my-template-OR-001.docx
192
+ */
193
+ filename?: string;
194
+ s3ref?: Components.Schemas.S3Reference;
195
+ };
196
+ };
197
+ /**
198
+ * List of variables and its corresponding replaced values from the document template
199
+ */
200
+ variable_payload?: {
201
+ additionalProperties?: string;
202
+ };
203
+ }
204
+ }
205
+ }
206
+ }
207
+
208
+ export interface OperationMethods {
209
+ /**
210
+ * generateDocument - generateDocument
211
+ *
212
+ * Builds document generated from input document with variables.
213
+ *
214
+ * Supported input document types:
215
+ * - .docx
216
+ *
217
+ * Supported output document types:
218
+ * - .pdf
219
+ *
220
+ * Uses [Template Variables API](https://docs.epilot.io/api/template-variables) to replace variables in the document.
221
+ *
222
+ */
223
+ 'generateDocument'(
224
+ parameters?: Parameters<UnknownParamsObject> | null,
225
+ data?: Paths.GenerateDocument.RequestBody,
226
+ config?: AxiosRequestConfig
227
+ ): OperationResponse<Paths.GenerateDocument.Responses.$200>
228
+ /**
229
+ * generateDocumentV2 - generateDocumentV2
230
+ *
231
+ * Builds document generated from input document with variables.
232
+ *
233
+ * Supported input document types:
234
+ * - .docx
235
+ *
236
+ * Supported output document types:
237
+ * - .pdf
238
+ * - .docx but limited to only text based variables
239
+ *
240
+ * Uses [Template Variables API](https://docs.epilot.io/api/template-variables) to replace variables in the document.
241
+ *
242
+ */
243
+ 'generateDocumentV2'(
244
+ parameters?: Parameters<Paths.GenerateDocumentV2.QueryParameters> | null,
245
+ data?: Paths.GenerateDocumentV2.RequestBody,
246
+ config?: AxiosRequestConfig
247
+ ): OperationResponse<Paths.GenerateDocumentV2.Responses.$200>
248
+ }
249
+
250
+ export interface PathsDictionary {
251
+ ['/v1/documents:generate']: {
252
+ /**
253
+ * generateDocument - generateDocument
254
+ *
255
+ * Builds document generated from input document with variables.
256
+ *
257
+ * Supported input document types:
258
+ * - .docx
259
+ *
260
+ * Supported output document types:
261
+ * - .pdf
262
+ *
263
+ * Uses [Template Variables API](https://docs.epilot.io/api/template-variables) to replace variables in the document.
264
+ *
265
+ */
266
+ 'post'(
267
+ parameters?: Parameters<UnknownParamsObject> | null,
268
+ data?: Paths.GenerateDocument.RequestBody,
269
+ config?: AxiosRequestConfig
270
+ ): OperationResponse<Paths.GenerateDocument.Responses.$200>
271
+ }
272
+ ['/v2/documents:generate']: {
273
+ /**
274
+ * generateDocumentV2 - generateDocumentV2
275
+ *
276
+ * Builds document generated from input document with variables.
277
+ *
278
+ * Supported input document types:
279
+ * - .docx
280
+ *
281
+ * Supported output document types:
282
+ * - .pdf
283
+ * - .docx but limited to only text based variables
284
+ *
285
+ * Uses [Template Variables API](https://docs.epilot.io/api/template-variables) to replace variables in the document.
286
+ *
287
+ */
288
+ 'post'(
289
+ parameters?: Parameters<Paths.GenerateDocumentV2.QueryParameters> | null,
290
+ data?: Paths.GenerateDocumentV2.RequestBody,
291
+ config?: AxiosRequestConfig
292
+ ): OperationResponse<Paths.GenerateDocumentV2.Responses.$200>
293
+ }
294
+ }
295
+
296
+ export type Client = OpenAPIClient<OperationMethods, PathsDictionary>