@epilot/document-client 0.1.0 → 0.2.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/dist/definition.js +1 -1
- package/dist/openapi.d.ts +27 -5
- package/package.json +2 -2
- package/src/openapi.d.ts +27 -5
package/dist/definition.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){for(var o in t)e[o]=t[o];t.__esModule&&Object.defineProperty(e,"__esModule",{value:!0})}(exports,(()=>{"use strict";var e={914:function(e,t,o){var
|
|
1
|
+
!function(e,t){for(var o in t)e[o]=t[o];t.__esModule&&Object.defineProperty(e,"__esModule",{value:!0})}(exports,(()=>{"use strict";var e={914:function(e,t,o){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=n(o(279));t.default=r.default},279: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":{"s3ref":{"$ref":"#/components/schemas/S3Reference"}}},"context_entity_id":{"type":"string","description":"Entity to use for variable context","example":"bcd0aab9-b544-42b0-8bfb-6d449d02eacc"}},"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.pdf"},"output_document":{"type":"object","properties":{"s3ref":{"$ref":"#/components/schemas/S3Reference"}},"example":{"s3ref":{"bucket":"document-api-preview-prod","key":"preview/my-template.pdf"}}}}}}}}}}}},"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"]}}}}')}},t={};return function o(n){if(t[n])return t[n].exports;var r=t[n]={exports:{}};return e[n].call(r.exports,r,r.exports,o),r.exports}(914)})());
|
package/dist/openapi.d.ts
CHANGED
|
@@ -26,10 +26,20 @@ declare namespace Components {
|
|
|
26
26
|
declare namespace Paths {
|
|
27
27
|
namespace GenerateDocument {
|
|
28
28
|
export interface RequestBody {
|
|
29
|
-
|
|
29
|
+
/**
|
|
30
|
+
* Language to use
|
|
31
|
+
* example:
|
|
32
|
+
* de
|
|
33
|
+
*/
|
|
34
|
+
language?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Input template document
|
|
37
|
+
*/
|
|
38
|
+
template_document: {
|
|
30
39
|
s3ref?: Components.Schemas.S3Reference;
|
|
31
40
|
};
|
|
32
41
|
/**
|
|
42
|
+
* Entity to use for variable context
|
|
33
43
|
* example:
|
|
34
44
|
* bcd0aab9-b544-42b0-8bfb-6d449d02eacc
|
|
35
45
|
*/
|
|
@@ -64,9 +74,15 @@ export interface OperationMethods {
|
|
|
64
74
|
/**
|
|
65
75
|
* generateDocument - generateDocument
|
|
66
76
|
*
|
|
67
|
-
*
|
|
77
|
+
* Builds document generated from input document with variables.
|
|
68
78
|
*
|
|
69
|
-
*
|
|
79
|
+
* Supported input document types:
|
|
80
|
+
* - .docx
|
|
81
|
+
*
|
|
82
|
+
* Supported output document types:
|
|
83
|
+
* - .pdf
|
|
84
|
+
*
|
|
85
|
+
* Uses [Template Variables API](https://docs.epilot.io/api/template-variables) to replace variables in the document.
|
|
70
86
|
*
|
|
71
87
|
*/
|
|
72
88
|
'generateDocument'(
|
|
@@ -81,9 +97,15 @@ export interface PathsDictionary {
|
|
|
81
97
|
/**
|
|
82
98
|
* generateDocument - generateDocument
|
|
83
99
|
*
|
|
84
|
-
*
|
|
100
|
+
* Builds document generated from input document with variables.
|
|
101
|
+
*
|
|
102
|
+
* Supported input document types:
|
|
103
|
+
* - .docx
|
|
104
|
+
*
|
|
105
|
+
* Supported output document types:
|
|
106
|
+
* - .pdf
|
|
85
107
|
*
|
|
86
|
-
* Uses [Template
|
|
108
|
+
* Uses [Template Variables API](https://docs.epilot.io/api/template-variables) to replace variables in the document.
|
|
87
109
|
*
|
|
88
110
|
*/
|
|
89
111
|
'post'(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epilot/document-client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "API Client for epilot document API",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"author": "epilot GmbH",
|
|
30
30
|
"license": "UNLICENSED",
|
|
31
31
|
"peerDependencies": {
|
|
32
|
-
"axios": "^0.
|
|
32
|
+
"axios": "^0.25.0"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"buffer": "^6.0.3",
|
package/src/openapi.d.ts
CHANGED
|
@@ -26,10 +26,20 @@ declare namespace Components {
|
|
|
26
26
|
declare namespace Paths {
|
|
27
27
|
namespace GenerateDocument {
|
|
28
28
|
export interface RequestBody {
|
|
29
|
-
|
|
29
|
+
/**
|
|
30
|
+
* Language to use
|
|
31
|
+
* example:
|
|
32
|
+
* de
|
|
33
|
+
*/
|
|
34
|
+
language?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Input template document
|
|
37
|
+
*/
|
|
38
|
+
template_document: {
|
|
30
39
|
s3ref?: Components.Schemas.S3Reference;
|
|
31
40
|
};
|
|
32
41
|
/**
|
|
42
|
+
* Entity to use for variable context
|
|
33
43
|
* example:
|
|
34
44
|
* bcd0aab9-b544-42b0-8bfb-6d449d02eacc
|
|
35
45
|
*/
|
|
@@ -64,9 +74,15 @@ export interface OperationMethods {
|
|
|
64
74
|
/**
|
|
65
75
|
* generateDocument - generateDocument
|
|
66
76
|
*
|
|
67
|
-
*
|
|
77
|
+
* Builds document generated from input document with variables.
|
|
68
78
|
*
|
|
69
|
-
*
|
|
79
|
+
* Supported input document types:
|
|
80
|
+
* - .docx
|
|
81
|
+
*
|
|
82
|
+
* Supported output document types:
|
|
83
|
+
* - .pdf
|
|
84
|
+
*
|
|
85
|
+
* Uses [Template Variables API](https://docs.epilot.io/api/template-variables) to replace variables in the document.
|
|
70
86
|
*
|
|
71
87
|
*/
|
|
72
88
|
'generateDocument'(
|
|
@@ -81,9 +97,15 @@ export interface PathsDictionary {
|
|
|
81
97
|
/**
|
|
82
98
|
* generateDocument - generateDocument
|
|
83
99
|
*
|
|
84
|
-
*
|
|
100
|
+
* Builds document generated from input document with variables.
|
|
101
|
+
*
|
|
102
|
+
* Supported input document types:
|
|
103
|
+
* - .docx
|
|
104
|
+
*
|
|
105
|
+
* Supported output document types:
|
|
106
|
+
* - .pdf
|
|
85
107
|
*
|
|
86
|
-
* Uses [Template
|
|
108
|
+
* Uses [Template Variables API](https://docs.epilot.io/api/template-variables) to replace variables in the document.
|
|
87
109
|
*
|
|
88
110
|
*/
|
|
89
111
|
'post'(
|