@epilot/document-client 0.4.0 → 0.5.1

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.
@@ -1 +1 @@
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":{"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.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={},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})})();
1
+ (()=>{"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(534));t.default=r.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"}}}}}}}}}}}},"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={},o=function o(n){var r=t[n];if(void 0!==r)return r.exports;var p=t[n]={exports:{}};return e[n].call(p.exports,p,p.exports,o),p.exports}(914),n=exports;for(var r in o)n[r]=o[r];o.__esModule&&Object.defineProperty(n,"__esModule",{value:!0})})();
package/dist/openapi.d.ts CHANGED
@@ -36,6 +36,12 @@ declare namespace Paths {
36
36
  * Input template document
37
37
  */
38
38
  template_document: {
39
+ /**
40
+ * Document original filename
41
+ * example:
42
+ * my-template-{{order.order_number}}.docx
43
+ */
44
+ filename?: string;
39
45
  s3ref?: Components.Schemas.S3Reference;
40
46
  };
41
47
  /**
@@ -56,7 +62,7 @@ declare namespace Paths {
56
62
  /**
57
63
  * Pre-signed S3 GET URL for preview
58
64
  * example:
59
- * https://document-api-prod.s3.eu-central-1.amazonaws.com/preview/my-template.pdf
65
+ * https://document-api-prod.s3.eu-central-1.amazonaws.com/preview/my-template-OR-001.pdf
60
66
  */
61
67
  preview_url?: string;
62
68
  /**
@@ -69,6 +75,12 @@ declare namespace Paths {
69
75
  * }
70
76
  */
71
77
  output_document?: {
78
+ /**
79
+ * Generated document filename
80
+ * example:
81
+ * my-template-OR-001.pdf
82
+ */
83
+ filename?: string;
72
84
  s3ref?: Components.Schemas.S3Reference;
73
85
  };
74
86
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/document-client",
3
- "version": "0.4.0",
3
+ "version": "0.5.1",
4
4
  "description": "API Client for epilot document API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -34,7 +34,7 @@
34
34
  "dependencies": {
35
35
  "buffer": "^6.0.3",
36
36
  "https-browserify": "^1.0.0",
37
- "openapi-client-axios": "^5.1.2",
37
+ "openapi-client-axios": "^6.0.0",
38
38
  "stream-http": "^3.1.1",
39
39
  "url": "^0.11.0",
40
40
  "util": "^0.12.3"
@@ -45,7 +45,7 @@
45
45
  "copy-webpack-plugin": "^7.0.0",
46
46
  "jest": "^26.6.3",
47
47
  "json-loader": "^0.5.7",
48
- "openapi-client-axios-typegen": "^5.0.2",
48
+ "openapi-client-axios-typegen": "^6.0.0",
49
49
  "openapicmd": "^1.6.2",
50
50
  "ts-jest": "^26.5.0",
51
51
  "ts-loader": "^8.0.14",