@epilot/document-client 0.12.0 → 0.13.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 +21 -0
- package/dist/definition.js +1 -1
- package/dist/openapi.d.ts +0 -23
- package/package.json +5 -5
- package/src/openapi.d.ts +23 -1
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.
|
package/dist/definition.js
CHANGED
|
@@ -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":"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"},"tags":[{"name":"Documents","description":"Document Generation"}],"security":[{"EpilotAuth":[]}],"paths":{"/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:\\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","schema":{"type":"string","enum":["partial_generation","full_generation"],"default":"full_generation"}}],"tags":["Documents"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentGenerationV2Request"}}}},"responses":{"200":{"description":"Generated document output","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentGenerationV2Response"}}}}}}},"/v2/documents:convert":{"post":{"operationId":"convertDocument","summary":"convertDocument","description":"Converts a document to a different format.\\n\\nSupported input document types:\\n- .docx\\n\\nSupported output document types:\\n- .pdf\\n","tags":["Documents"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConvertDocumentRequest"}}}},"responses":{"200":{"description":"Conversion job output","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConvertDocumentResponse"}}}}}}}},"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":{"$ref":"#/components/schemas/ErrorCode"},"error_details":{"anyOf":[{"$ref":"#/components/schemas/InvalidCustomVariableErrorDetails"},{"$ref":"#/components/schemas/InternalErrorDetails"},{"$ref":"#/components/schemas/DocxTemplaterErrorDetails"}]}}},"InvalidCustomVariableErrorDetails":{"description":"Error details for invalid custom variables. This error will appear under \'PARSE_ERROR\' error code.","type":"array","items":{"$ref":"#/components/schemas/InvalidCustomVariableErrorDetail"}},"InvalidCustomVariableErrorDetail":{"type":"object","additionalProperties":true,"properties":{"explanation":{"description":"Explanation for the error","type":"string"},"context":{"description":"Context for the error","type":"object","properties":{"invalid_variables":{"description":"List of invalid variables","type":"array","items":{"type":"object","description":"Invalid variable","properties":{"variable":{"description":"Variable name","type":"string"},"error":{"description":"Explanation for the error","type":"string"}}}}}}}},"InternalErrorDetails":{"description":"Error details for internal error. This error will appear under \'INTERNAL_ERROR\' error code.","type":"array","items":{"type":"object","properties":{"items":{"$ref":"#/components/schemas/InternalErrorDetail"}}}},"InternalErrorDetail":{"type":"object","description":"Internal error detail","properties":{"name":{"description":"Name of the error","type":"string"},"message":{"description":"Error message","type":"string"},"stack":{"description":"Stack trace","type":"string"},"cause":{"description":"Cause of the error","type":"string"}}},"DocxTemplaterErrorDetails":{"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","type":"array","items":{"$ref":"#/components/schemas/DocxTemplaterErrorDetail"}},"DocxTemplaterErrorDetail":{"type":"object","description":"DocxTemplater error detail","properties":{"id":{"description":"Id of the error","type":"string"},"context":{"description":"Context of the error","type":"string"},"explanation":{"description":"Explanation of the error","type":"string"}}},"ErrorCode":{"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","type":"string","enum":["PARSE_ERROR","DOC_TO_PDF_CONVERT_ERROR","INTERNAL_ERROR","INVALID_TEMPLATE_FORMAT"]},"TemplateSettings":{"type":"object","description":"Template Settings for document generation","properties":{"custom_margins":{"description":"Custom margins for the document","type":"object","properties":{"top":{"description":"Top margin in cm","type":"number","example":2.54},"bottom":{"description":"Bottom margin in cm","type":"number","example":2.54}}},"suggested_margins":{"description":"Suggested margins for the document","type":"object","properties":{"top":{"description":"Top margin in cm","type":"number","example":2.54},"bottom":{"description":"Bottom margin in cm","type":"number","example":2.54}}},"display_margin_guidelines":{"description":"Display margin guidelines (applicable to partial generation only)","type":"boolean","example":true},"enable_data_table_margin_autofix":{"description":"Enable data table margin autofix","type":"boolean","example":false},"template_with_datatable":{"description":"A flag that indicates whether the template has 1 or more data tables in it","type":"boolean","example":false},"enabled_template_settings_persistence":{"description":"Enables the persistance of template settings","type":"boolean","example":false},"misconfigured_margins":{"description":"An indication that the page margins are misconfigured","type":"boolean","example":false},"file_entity_id":{"description":"The file entity id, used when persisting a new template version with updated settings","type":"string","format":"uuid","example":"1a2b3c4d-5e6f-7g8h-9i0j-1k2l3m4n5o6p"}}},"DocumentGenerationV2Request":{"type":"object","properties":{"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","format":"uuid","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"}}},"context_data":{"description":"Custom values for variables in the template. Takes the higher precedence than others.","type":"object","properties":{"additionalProperties":{"type":"string"}}},"template_settings":{"$ref":"#/components/schemas/TemplateSettings"}},"required":["template_document"]},"DocumentGenerationV2Response":{"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"}}},"template_settings":{"$ref":"#/components/schemas/TemplateSettings"}}},"ConvertDocumentRequest":{"type":"object","properties":{"input_document":{"description":"Input document","type":"object","properties":{"s3ref":{"$ref":"#/components/schemas/S3Reference"}},"required":["s3ref"]},"output_format":{"description":"Output format of the document","type":"string","enum":["pdf"]},"output_filename":{"description":"Filename of the output document (optional)","type":"string","example":"converted.pdf"}},"required":["input_document","output_format"]},"ConvertDocumentResponse":{"type":"object","properties":{"output_document":{"type":"object","properties":{"preview_url":{"description":"Pre-signed URL for the converted document","type":"string","example":"https://document-api-prod.s3.eu-central-1.amazonaws.com/preview/converted.pdf"},"s3ref":{"$ref":"#/components/schemas/S3Reference"}}}}}}},"servers":[{"url":"https://document.sls.epilot.io"},{"url":"https://document.sls.epilot.io"}]}')}},t={},r=function r(o){var n=t[o];if(void 0!==n)return n.exports;var i=t[o]={exports:{}};return e[o].call(i.exports,i,i.exports,r),i.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,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":"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"},"tags":[{"name":"Documents","description":"Document Generation"}],"security":[{"EpilotAuth":[]}],"paths":{"/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:\\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","schema":{"type":"string","enum":["partial_generation","full_generation"],"default":"full_generation"}}],"tags":["Documents"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentGenerationV2Request"}}}},"responses":{"200":{"description":"Generated document output","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentGenerationV2Response"}}}}}}},"/v2/documents:convert":{"post":{"operationId":"convertDocument","summary":"convertDocument","description":"Converts a document to a different format.\\n\\nSupported input document types:\\n- .docx\\n\\nSupported output document types:\\n- .pdf\\n","tags":["Documents"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConvertDocumentRequest"}}}},"responses":{"200":{"description":"Conversion job output","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConvertDocumentResponse"}}}}}}}},"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":{"$ref":"#/components/schemas/ErrorCode"},"error_details":{"anyOf":[{"$ref":"#/components/schemas/InvalidCustomVariableErrorDetails"},{"$ref":"#/components/schemas/InternalErrorDetails"},{"$ref":"#/components/schemas/DocxTemplaterErrorDetails"}]}}},"InvalidCustomVariableErrorDetails":{"description":"Error details for invalid custom variables. This error will appear under \'PARSE_ERROR\' error code.","type":"array","items":{"$ref":"#/components/schemas/InvalidCustomVariableErrorDetail"}},"InvalidCustomVariableErrorDetail":{"type":"object","additionalProperties":true,"properties":{"explanation":{"description":"Explanation for the error","type":"string"},"context":{"description":"Context for the error","type":"object","properties":{"invalid_variables":{"description":"List of invalid variables","type":"array","items":{"type":"object","description":"Invalid variable","properties":{"variable":{"description":"Variable name","type":"string"},"error":{"description":"Explanation for the error","type":"string"}}}}}}}},"InternalErrorDetails":{"description":"Error details for internal error. This error will appear under \'INTERNAL_ERROR\' error code.","type":"array","items":{"type":"object","properties":{"items":{"$ref":"#/components/schemas/InternalErrorDetail"}}}},"InternalErrorDetail":{"type":"object","description":"Internal error detail","properties":{"name":{"description":"Name of the error","type":"string"},"message":{"description":"Error message","type":"string"},"stack":{"description":"Stack trace","type":"string"},"cause":{"description":"Cause of the error","type":"string"}}},"DocxTemplaterErrorDetails":{"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","type":"array","items":{"$ref":"#/components/schemas/DocxTemplaterErrorDetail"}},"DocxTemplaterErrorDetail":{"type":"object","description":"DocxTemplater error detail","properties":{"id":{"description":"Id of the error","type":"string"},"context":{"description":"Context of the error","type":"string"},"explanation":{"description":"Explanation of the error","type":"string"}}},"ErrorCode":{"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","type":"string","enum":["PARSE_ERROR","DOC_TO_PDF_CONVERT_ERROR","INTERNAL_ERROR","INVALID_TEMPLATE_FORMAT"]},"TemplateSettings":{"type":"object","description":"Template Settings for document generation","properties":{"custom_margins":{"description":"Custom margins for the document","type":"object","properties":{"top":{"description":"Top margin in cm","type":"number","example":2.54},"bottom":{"description":"Bottom margin in cm","type":"number","example":2.54}}},"display_margin_guidelines":{"description":"Display margin guidelines (applicable to partial generation only)","type":"boolean","example":true},"enable_data_table_margin_autofix":{"description":"Enable data table margin autofix","type":"boolean","example":false},"template_with_datatable":{"description":"A flag that indicates whether the template has 1 or more data tables in it","type":"boolean","example":false},"enabled_template_settings_persistence":{"description":"Enables the persistance of template settings","type":"boolean","example":false},"misconfigured_margins":{"description":"An indication that the page margins are misconfigured","type":"boolean","example":false},"file_entity_id":{"description":"The file entity id, used when persisting a new template version with updated settings","type":"string","format":"uuid","example":"1a2b3c4d-5e6f-7g8h-9i0j-1k2l3m4n5o6p"}}},"DocumentGenerationV2Request":{"type":"object","properties":{"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","format":"uuid","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"}}},"template_settings":{"$ref":"#/components/schemas/TemplateSettings"}},"required":["template_document"]},"DocumentGenerationV2Response":{"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"}}},"template_settings":{"$ref":"#/components/schemas/TemplateSettings"}}},"ConvertDocumentRequest":{"type":"object","properties":{"input_document":{"description":"Input document","type":"object","properties":{"s3ref":{"$ref":"#/components/schemas/S3Reference"}},"required":["s3ref"]},"output_format":{"description":"Output format of the document","type":"string","enum":["pdf"]},"output_filename":{"description":"Filename of the output document (optional)","type":"string","example":"converted.pdf"}},"required":["input_document","output_format"]},"ConvertDocumentResponse":{"type":"object","properties":{"output_document":{"type":"object","properties":{"preview_url":{"description":"Pre-signed URL for the converted document","type":"string","example":"https://document-api-prod.s3.eu-central-1.amazonaws.com/preview/converted.pdf"},"s3ref":{"$ref":"#/components/schemas/S3Reference"}}}}}}},"servers":[{"url":"https://document.sls.epilot.io"}]}')}},t={},r=function r(o){var n=t[o];if(void 0!==n)return n.exports;var i=t[o]={exports:{}};return e[o].call(i.exports,i,i.exports,r),i.exports}(914),o=exports;for(var n in r)o[n]=r[n];r.__esModule&&Object.defineProperty(o,"__esModule",{value:!0})})();
|
package/dist/openapi.d.ts
CHANGED
|
@@ -69,12 +69,6 @@ declare namespace Components {
|
|
|
69
69
|
variable_payload?: {
|
|
70
70
|
additionalProperties?: string;
|
|
71
71
|
};
|
|
72
|
-
/**
|
|
73
|
-
* Custom values for variables in the template. Takes the higher precedence than others.
|
|
74
|
-
*/
|
|
75
|
-
context_data?: {
|
|
76
|
-
additionalProperties?: string;
|
|
77
|
-
};
|
|
78
72
|
template_settings?: /* Template Settings for document generation */ TemplateSettings;
|
|
79
73
|
}
|
|
80
74
|
export interface DocumentGenerationV2Response {
|
|
@@ -290,23 +284,6 @@ declare namespace Components {
|
|
|
290
284
|
*/
|
|
291
285
|
bottom?: number;
|
|
292
286
|
};
|
|
293
|
-
/**
|
|
294
|
-
* Suggested margins for the document
|
|
295
|
-
*/
|
|
296
|
-
suggested_margins?: {
|
|
297
|
-
/**
|
|
298
|
-
* Top margin in cm
|
|
299
|
-
* example:
|
|
300
|
-
* 2.54
|
|
301
|
-
*/
|
|
302
|
-
top?: number;
|
|
303
|
-
/**
|
|
304
|
-
* Bottom margin in cm
|
|
305
|
-
* example:
|
|
306
|
-
* 2.54
|
|
307
|
-
*/
|
|
308
|
-
bottom?: number;
|
|
309
|
-
};
|
|
310
287
|
/**
|
|
311
288
|
* Display margin guidelines (applicable to partial generation only)
|
|
312
289
|
* example:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epilot/document-client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"description": "API Client for epilot document API",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -9,7 +9,7 @@
|
|
|
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
|
-
"typegen": "
|
|
12
|
+
"typegen": "openapi typegen src/openapi.json --client -b '/* eslint-disable */' > src/openapi.d.ts",
|
|
13
13
|
"build": "tsc && npm run bundle-definition",
|
|
14
14
|
"build:watch": "npm run build && tsc -w",
|
|
15
15
|
"release-alpha": "npm version prerelease --preid alpha",
|
|
@@ -46,13 +46,13 @@
|
|
|
46
46
|
"copy-webpack-plugin": "^7.0.0",
|
|
47
47
|
"jest": "^26.6.3",
|
|
48
48
|
"json-loader": "^0.5.7",
|
|
49
|
-
"
|
|
50
|
-
"openapicmd": "^2.1.0",
|
|
49
|
+
"openapicmd": "^2.6.0",
|
|
51
50
|
"ts-jest": "^26.5.0",
|
|
52
51
|
"ts-loader": "^8.0.14",
|
|
53
52
|
"ts-node": "^10.9.1",
|
|
54
53
|
"typescript": "^4.1.3",
|
|
55
54
|
"webpack": "^5.18.0",
|
|
56
55
|
"webpack-cli": "^4.4.0"
|
|
57
|
-
}
|
|
56
|
+
},
|
|
57
|
+
"gitHead": "6c12dc4aaf7ddf60ad11c6f596fb478559fa3052"
|
|
58
58
|
}
|
package/src/openapi.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
|
+
|
|
2
3
|
import type {
|
|
3
4
|
OpenAPIClient,
|
|
4
5
|
Parameters,
|
|
5
6
|
UnknownParamsObject,
|
|
6
7
|
OperationResponse,
|
|
7
8
|
AxiosRequestConfig,
|
|
8
|
-
} from 'openapi-client-axios';
|
|
9
|
+
} from 'openapi-client-axios';
|
|
9
10
|
|
|
10
11
|
declare namespace Components {
|
|
11
12
|
namespace Schemas {
|
|
@@ -63,6 +64,12 @@ declare namespace Components {
|
|
|
63
64
|
* 100321
|
|
64
65
|
*/
|
|
65
66
|
user_id?: string;
|
|
67
|
+
/**
|
|
68
|
+
* Language
|
|
69
|
+
* example:
|
|
70
|
+
* en
|
|
71
|
+
*/
|
|
72
|
+
language?: string;
|
|
66
73
|
/**
|
|
67
74
|
* Custom values for variables in the template. Takes the higher precedence than others.
|
|
68
75
|
*/
|
|
@@ -454,3 +461,18 @@ export interface PathsDictionary {
|
|
|
454
461
|
}
|
|
455
462
|
|
|
456
463
|
export type Client = OpenAPIClient<OperationMethods, PathsDictionary>
|
|
464
|
+
|
|
465
|
+
export type ConvertDocumentRequest = Components.Schemas.ConvertDocumentRequest;
|
|
466
|
+
export type ConvertDocumentResponse = Components.Schemas.ConvertDocumentResponse;
|
|
467
|
+
export type DocumentGenerationV2Request = Components.Schemas.DocumentGenerationV2Request;
|
|
468
|
+
export type DocumentGenerationV2Response = Components.Schemas.DocumentGenerationV2Response;
|
|
469
|
+
export type DocxTemplaterErrorDetail = Components.Schemas.DocxTemplaterErrorDetail;
|
|
470
|
+
export type DocxTemplaterErrorDetails = Components.Schemas.DocxTemplaterErrorDetails;
|
|
471
|
+
export type ErrorCode = Components.Schemas.ErrorCode;
|
|
472
|
+
export type ErrorOutput = Components.Schemas.ErrorOutput;
|
|
473
|
+
export type InternalErrorDetail = Components.Schemas.InternalErrorDetail;
|
|
474
|
+
export type InternalErrorDetails = Components.Schemas.InternalErrorDetails;
|
|
475
|
+
export type InvalidCustomVariableErrorDetail = Components.Schemas.InvalidCustomVariableErrorDetail;
|
|
476
|
+
export type InvalidCustomVariableErrorDetails = Components.Schemas.InvalidCustomVariableErrorDetails;
|
|
477
|
+
export type S3Reference = Components.Schemas.S3Reference;
|
|
478
|
+
export type TemplateSettings = Components.Schemas.TemplateSettings;
|