@epilot/document-client 0.1.0 → 0.1.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
- !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 r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var n=r(o(279));t.default=n.default},279:e=>{e.exports=JSON.parse('{"openapi":"3.0.3","info":{"title":"Document API","version":"0.1.0"},"tags":[{"name":"documents","description":"Documents"}],"security":[{"EpilotAuth":[]}],"paths":{"/v1/documents:generate":{"post":{"operationId":"generateDocument","summary":"generateDocument","description":"Generates document using given context entity and document template.\\n\\nUses [Template Variable API](https://docs.api.staging.epilot.io/template-variables) to replace variables in the document\\n","tags":["documents"],"requestBody":{"description":"Document template and context entity","content":{"application/json":{"schema":{"type":"object","properties":{"template_document":{"type":"object","properties":{"s3ref":{"$ref":"#/components/schemas/S3Reference"}}},"context_entity_id":{"type":"string","example":"bcd0aab9-b544-42b0-8bfb-6d449d02eacc"}}}}}},"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":"Epilot Bearer Token"}},"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(r){if(t[r])return t[r].exports;var n=t[r]={exports:{}};return e[r].call(n.exports,n,n.exports,o),n.exports}(914)})());
1
+ !function(e,t){for(var n in t)e[n]=t[n];t.__esModule&&Object.defineProperty(e,"__esModule",{value:!0})}(exports,(()=>{"use strict";var e={914:function(e,t,n){var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var p=o(n(279));t.default=p.default},279:e=>{e.exports=JSON.parse('{"openapi":"3.0.3","info":{"title":"Document API","version":"0.1.0"},"tags":[{"name":"documents","description":"Documents"}],"security":[{"EpilotAuth":[]}],"paths":{"/v1/documents:generate":{"post":{"operationId":"generateDocument","summary":"generateDocument","description":"Generates document using given context entity and document template.\\n\\nUses [Template Variable API](https://docs.api.staging.epilot.io/template-variables) to replace variables in the document\\n","tags":["documents"],"requestBody":{"description":"Document template and context entity","content":{"application/json":{"schema":{"type":"object","properties":{"template_document":{"type":"object","properties":{"s3ref":{"$ref":"#/components/schemas/S3Reference"}}},"context_entity_id":{"type":"string","example":"bcd0aab9-b544-42b0-8bfb-6d449d02eacc"},"language":{"type":"string","enum":["en","de"],"example":"en"}}}}}},"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":"Epilot Bearer Token"}},"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 n(o){if(t[o])return t[o].exports;var p=t[o]={exports:{}};return e[o].call(p.exports,p,p.exports,n),p.exports}(914)})());
package/dist/openapi.d.ts CHANGED
@@ -34,6 +34,11 @@ declare namespace Paths {
34
34
  * bcd0aab9-b544-42b0-8bfb-6d449d02eacc
35
35
  */
36
36
  context_entity_id?: string;
37
+ /**
38
+ * example:
39
+ * en
40
+ */
41
+ language?: "en" | "de";
37
42
  }
38
43
  namespace Responses {
39
44
  export interface $200 {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/document-client",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "API Client for epilot document API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/openapi.d.ts DELETED
@@ -1,97 +0,0 @@
1
- /* eslint-disable */
2
- import {
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
- template_document?: {
30
- s3ref?: Components.Schemas.S3Reference;
31
- };
32
- /**
33
- * example:
34
- * bcd0aab9-b544-42b0-8bfb-6d449d02eacc
35
- */
36
- context_entity_id?: string;
37
- }
38
- namespace Responses {
39
- export interface $200 {
40
- /**
41
- * Pre-signed S3 GET URL for preview
42
- * example:
43
- * https://document-api-prod.s3.eu-central-1.amazonaws.com/preview/my-template.pdf
44
- */
45
- preview_url?: string;
46
- /**
47
- * example:
48
- * {
49
- * "s3ref": {
50
- * "bucket": "document-api-preview-prod",
51
- * "key": "preview/my-template.pdf"
52
- * }
53
- * }
54
- */
55
- output_document?: {
56
- s3ref?: Components.Schemas.S3Reference;
57
- };
58
- }
59
- }
60
- }
61
- }
62
-
63
- export interface OperationMethods {
64
- /**
65
- * generateDocument - generateDocument
66
- *
67
- * Generates document using given context entity and document template.
68
- *
69
- * Uses [Template Variable API](https://docs.api.staging.epilot.io/template-variables) to replace variables in the document
70
- *
71
- */
72
- 'generateDocument'(
73
- parameters?: Parameters<UnknownParamsObject> | null,
74
- data?: Paths.GenerateDocument.RequestBody,
75
- config?: AxiosRequestConfig
76
- ): OperationResponse<Paths.GenerateDocument.Responses.$200>
77
- }
78
-
79
- export interface PathsDictionary {
80
- ['/v1/documents:generate']: {
81
- /**
82
- * generateDocument - generateDocument
83
- *
84
- * Generates document using given context entity and document template.
85
- *
86
- * Uses [Template Variable API](https://docs.api.staging.epilot.io/template-variables) to replace variables in the document
87
- *
88
- */
89
- 'post'(
90
- parameters?: Parameters<UnknownParamsObject> | null,
91
- data?: Paths.GenerateDocument.RequestBody,
92
- config?: AxiosRequestConfig
93
- ): OperationResponse<Paths.GenerateDocument.Responses.$200>
94
- }
95
- }
96
-
97
- export type Client = OpenAPIClient<OperationMethods, PathsDictionary>