@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.
- package/dist/definition.js +1 -1
- package/dist/openapi.d.ts +5 -0
- package/package.json +1 -1
- package/src/openapi.d.ts +0 -97
package/dist/definition.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){for(var
|
|
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
package/package.json
CHANGED
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>
|