@emilgroup/document-sdk 1.6.0 → 1.7.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/.openapi-generator/FILES +6 -0
- package/README.md +2 -2
- package/api/default-api.ts +120 -0
- package/api/docx-templates-api.ts +554 -0
- package/api.ts +4 -0
- package/dist/api/default-api.d.ts +66 -0
- package/dist/api/default-api.js +196 -0
- package/dist/api/docx-templates-api.d.ts +316 -0
- package/dist/api/docx-templates-api.js +538 -0
- package/dist/api.d.ts +2 -0
- package/dist/api.js +2 -0
- package/dist/models/create-document-request-dto.d.ts +17 -0
- package/dist/models/create-document-request-dto.js +5 -1
- package/dist/models/create-presigned-post-request-dto.d.ts +6 -0
- package/dist/models/index.d.ts +4 -0
- package/dist/models/index.js +4 -0
- package/dist/models/inline-response200.d.ts +54 -0
- package/dist/models/inline-response200.js +15 -0
- package/dist/models/inline-response503.d.ts +54 -0
- package/dist/models/inline-response503.js +15 -0
- package/dist/models/shared-update-docx-template-request-dto.d.ts +36 -0
- package/dist/models/shared-update-docx-template-request-dto.js +15 -0
- package/dist/models/upload-docx-template-request-dto.d.ts +54 -0
- package/dist/models/upload-docx-template-request-dto.js +15 -0
- package/models/create-document-request-dto.ts +18 -0
- package/models/create-presigned-post-request-dto.ts +6 -0
- package/models/index.ts +4 -0
- package/models/inline-response200.ts +48 -0
- package/models/inline-response503.ts +48 -0
- package/models/shared-update-docx-template-request-dto.ts +42 -0
- package/models/upload-docx-template-request-dto.ts +60 -0
- package/package.json +1 -1
|
@@ -0,0 +1,538 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* EMIL DocumentService
|
|
6
|
+
* The EMIL DocumentService API description
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0
|
|
9
|
+
* Contact: kontakt@emil.de
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
var __extends = (this && this.__extends) || (function () {
|
|
16
|
+
var extendStatics = function (d, b) {
|
|
17
|
+
extendStatics = Object.setPrototypeOf ||
|
|
18
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
19
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
20
|
+
return extendStatics(d, b);
|
|
21
|
+
};
|
|
22
|
+
return function (d, b) {
|
|
23
|
+
if (typeof b !== "function" && b !== null)
|
|
24
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
25
|
+
extendStatics(d, b);
|
|
26
|
+
function __() { this.constructor = d; }
|
|
27
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
28
|
+
};
|
|
29
|
+
})();
|
|
30
|
+
var __assign = (this && this.__assign) || function () {
|
|
31
|
+
__assign = Object.assign || function(t) {
|
|
32
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
33
|
+
s = arguments[i];
|
|
34
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
35
|
+
t[p] = s[p];
|
|
36
|
+
}
|
|
37
|
+
return t;
|
|
38
|
+
};
|
|
39
|
+
return __assign.apply(this, arguments);
|
|
40
|
+
};
|
|
41
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
42
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
43
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
44
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
45
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
46
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
47
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
51
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
52
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
53
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
54
|
+
function step(op) {
|
|
55
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
56
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
57
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
58
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
59
|
+
switch (op[0]) {
|
|
60
|
+
case 0: case 1: t = op; break;
|
|
61
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
62
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
63
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
64
|
+
default:
|
|
65
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
66
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
67
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
68
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
69
|
+
if (t[2]) _.ops.pop();
|
|
70
|
+
_.trys.pop(); continue;
|
|
71
|
+
}
|
|
72
|
+
op = body.call(thisArg, _);
|
|
73
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
74
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
78
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
79
|
+
};
|
|
80
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
81
|
+
exports.DocxTemplatesApi = exports.DocxTemplatesApiFactory = exports.DocxTemplatesApiFp = exports.DocxTemplatesApiAxiosParamCreator = void 0;
|
|
82
|
+
var axios_1 = __importDefault(require("axios"));
|
|
83
|
+
// Some imports not used depending on template conditions
|
|
84
|
+
// @ts-ignore
|
|
85
|
+
var common_1 = require("../common");
|
|
86
|
+
// @ts-ignore
|
|
87
|
+
var base_1 = require("../base");
|
|
88
|
+
/**
|
|
89
|
+
* DocxTemplatesApi - axios parameter creator
|
|
90
|
+
* @export
|
|
91
|
+
*/
|
|
92
|
+
var DocxTemplatesApiAxiosParamCreator = function (configuration) {
|
|
93
|
+
var _this = this;
|
|
94
|
+
return {
|
|
95
|
+
/**
|
|
96
|
+
* Get a docx template.
|
|
97
|
+
* @summary Retrieve the docx template
|
|
98
|
+
* @param {string} code
|
|
99
|
+
* @param {string} [authorization] Bearer Token
|
|
100
|
+
* @param {*} [options] Override http request option.
|
|
101
|
+
* @throws {RequiredError}
|
|
102
|
+
*/
|
|
103
|
+
getDocxTemplate: function (code, authorization, options) {
|
|
104
|
+
if (options === void 0) { options = {}; }
|
|
105
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
106
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
107
|
+
return __generator(this, function (_a) {
|
|
108
|
+
switch (_a.label) {
|
|
109
|
+
case 0:
|
|
110
|
+
// verify required parameter 'code' is not null or undefined
|
|
111
|
+
(0, common_1.assertParamExists)('getDocxTemplate', 'code', code);
|
|
112
|
+
localVarPath = "/documentservice/v1/docx-templates/{code}"
|
|
113
|
+
.replace("{".concat("code", "}"), encodeURIComponent(String(code)));
|
|
114
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
115
|
+
if (configuration) {
|
|
116
|
+
baseOptions = configuration.baseOptions;
|
|
117
|
+
baseAccessToken = configuration.accessToken;
|
|
118
|
+
}
|
|
119
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
120
|
+
localVarHeaderParameter = {};
|
|
121
|
+
localVarQueryParameter = {};
|
|
122
|
+
// authentication bearer required
|
|
123
|
+
// http bearer authentication required
|
|
124
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
125
|
+
case 1:
|
|
126
|
+
// authentication bearer required
|
|
127
|
+
// http bearer authentication required
|
|
128
|
+
_a.sent();
|
|
129
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
130
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
131
|
+
}
|
|
132
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
133
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
134
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
135
|
+
return [2 /*return*/, {
|
|
136
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
137
|
+
options: localVarRequestOptions,
|
|
138
|
+
}];
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
});
|
|
142
|
+
},
|
|
143
|
+
/**
|
|
144
|
+
* Returns a list of docx templates you have previously created. The docx templates are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
145
|
+
* @summary List docx templates
|
|
146
|
+
* @param {string} [authorization] Bearer Token
|
|
147
|
+
* @param {number} [pageSize] Page size
|
|
148
|
+
* @param {string} [pageToken] Page token
|
|
149
|
+
* @param {string} [filter] List filter
|
|
150
|
+
* @param {string} [search] Search query
|
|
151
|
+
* @param {string} [order] Ordering criteria
|
|
152
|
+
* @param {string} [expand] Extra fields to fetch
|
|
153
|
+
* @param {*} [options] Override http request option.
|
|
154
|
+
* @throws {RequiredError}
|
|
155
|
+
*/
|
|
156
|
+
listDocxTemplates: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
|
|
157
|
+
if (options === void 0) { options = {}; }
|
|
158
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
159
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
160
|
+
return __generator(this, function (_a) {
|
|
161
|
+
switch (_a.label) {
|
|
162
|
+
case 0:
|
|
163
|
+
localVarPath = "/documentservice/v1/docx-templates";
|
|
164
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
165
|
+
if (configuration) {
|
|
166
|
+
baseOptions = configuration.baseOptions;
|
|
167
|
+
baseAccessToken = configuration.accessToken;
|
|
168
|
+
}
|
|
169
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
170
|
+
localVarHeaderParameter = {};
|
|
171
|
+
localVarQueryParameter = {};
|
|
172
|
+
// authentication bearer required
|
|
173
|
+
// http bearer authentication required
|
|
174
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
175
|
+
case 1:
|
|
176
|
+
// authentication bearer required
|
|
177
|
+
// http bearer authentication required
|
|
178
|
+
_a.sent();
|
|
179
|
+
if (pageSize !== undefined) {
|
|
180
|
+
localVarQueryParameter['pageSize'] = pageSize;
|
|
181
|
+
}
|
|
182
|
+
if (pageToken !== undefined) {
|
|
183
|
+
localVarQueryParameter['pageToken'] = pageToken;
|
|
184
|
+
}
|
|
185
|
+
if (filter !== undefined) {
|
|
186
|
+
localVarQueryParameter['filter'] = filter;
|
|
187
|
+
}
|
|
188
|
+
if (search !== undefined) {
|
|
189
|
+
localVarQueryParameter['search'] = search;
|
|
190
|
+
}
|
|
191
|
+
if (order !== undefined) {
|
|
192
|
+
localVarQueryParameter['order'] = order;
|
|
193
|
+
}
|
|
194
|
+
if (expand !== undefined) {
|
|
195
|
+
localVarQueryParameter['expand'] = expand;
|
|
196
|
+
}
|
|
197
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
198
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
199
|
+
}
|
|
200
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
201
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
202
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
203
|
+
return [2 /*return*/, {
|
|
204
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
205
|
+
options: localVarRequestOptions,
|
|
206
|
+
}];
|
|
207
|
+
}
|
|
208
|
+
});
|
|
209
|
+
});
|
|
210
|
+
},
|
|
211
|
+
/**
|
|
212
|
+
* Updates a docx template metadata.
|
|
213
|
+
* @summary Update the docx template
|
|
214
|
+
* @param {string} code
|
|
215
|
+
* @param {SharedUpdateDocxTemplateRequestDto} sharedUpdateDocxTemplateRequestDto
|
|
216
|
+
* @param {string} [authorization] Bearer Token
|
|
217
|
+
* @param {*} [options] Override http request option.
|
|
218
|
+
* @throws {RequiredError}
|
|
219
|
+
*/
|
|
220
|
+
updateDocxTemplate: function (code, sharedUpdateDocxTemplateRequestDto, authorization, options) {
|
|
221
|
+
if (options === void 0) { options = {}; }
|
|
222
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
223
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
224
|
+
return __generator(this, function (_a) {
|
|
225
|
+
switch (_a.label) {
|
|
226
|
+
case 0:
|
|
227
|
+
// verify required parameter 'code' is not null or undefined
|
|
228
|
+
(0, common_1.assertParamExists)('updateDocxTemplate', 'code', code);
|
|
229
|
+
// verify required parameter 'sharedUpdateDocxTemplateRequestDto' is not null or undefined
|
|
230
|
+
(0, common_1.assertParamExists)('updateDocxTemplate', 'sharedUpdateDocxTemplateRequestDto', sharedUpdateDocxTemplateRequestDto);
|
|
231
|
+
localVarPath = "/documentservice/v1/docx-templates/{code}"
|
|
232
|
+
.replace("{".concat("code", "}"), encodeURIComponent(String(code)));
|
|
233
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
234
|
+
if (configuration) {
|
|
235
|
+
baseOptions = configuration.baseOptions;
|
|
236
|
+
baseAccessToken = configuration.accessToken;
|
|
237
|
+
}
|
|
238
|
+
localVarRequestOptions = __assign(__assign({ method: 'PUT' }, baseOptions), options);
|
|
239
|
+
localVarHeaderParameter = {};
|
|
240
|
+
localVarQueryParameter = {};
|
|
241
|
+
// authentication bearer required
|
|
242
|
+
// http bearer authentication required
|
|
243
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
244
|
+
case 1:
|
|
245
|
+
// authentication bearer required
|
|
246
|
+
// http bearer authentication required
|
|
247
|
+
_a.sent();
|
|
248
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
249
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
250
|
+
}
|
|
251
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
252
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
253
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
254
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
255
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(sharedUpdateDocxTemplateRequestDto, localVarRequestOptions, configuration);
|
|
256
|
+
return [2 /*return*/, {
|
|
257
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
258
|
+
options: localVarRequestOptions,
|
|
259
|
+
}];
|
|
260
|
+
}
|
|
261
|
+
});
|
|
262
|
+
});
|
|
263
|
+
},
|
|
264
|
+
/**
|
|
265
|
+
* Upload a docx template via a presigned Url.
|
|
266
|
+
* @summary Upload a docx template.
|
|
267
|
+
* @param {UploadDocxTemplateRequestDto} uploadDocxTemplateRequestDto
|
|
268
|
+
* @param {string} [authorization] Bearer Token
|
|
269
|
+
* @param {*} [options] Override http request option.
|
|
270
|
+
* @throws {RequiredError}
|
|
271
|
+
*/
|
|
272
|
+
uploadDocxTemplate: function (uploadDocxTemplateRequestDto, authorization, options) {
|
|
273
|
+
if (options === void 0) { options = {}; }
|
|
274
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
275
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
276
|
+
return __generator(this, function (_a) {
|
|
277
|
+
switch (_a.label) {
|
|
278
|
+
case 0:
|
|
279
|
+
// verify required parameter 'uploadDocxTemplateRequestDto' is not null or undefined
|
|
280
|
+
(0, common_1.assertParamExists)('uploadDocxTemplate', 'uploadDocxTemplateRequestDto', uploadDocxTemplateRequestDto);
|
|
281
|
+
localVarPath = "/documentservice/v1/docx-templates";
|
|
282
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
283
|
+
if (configuration) {
|
|
284
|
+
baseOptions = configuration.baseOptions;
|
|
285
|
+
baseAccessToken = configuration.accessToken;
|
|
286
|
+
}
|
|
287
|
+
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
288
|
+
localVarHeaderParameter = {};
|
|
289
|
+
localVarQueryParameter = {};
|
|
290
|
+
// authentication bearer required
|
|
291
|
+
// http bearer authentication required
|
|
292
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
293
|
+
case 1:
|
|
294
|
+
// authentication bearer required
|
|
295
|
+
// http bearer authentication required
|
|
296
|
+
_a.sent();
|
|
297
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
298
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
299
|
+
}
|
|
300
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
301
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
302
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
303
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
304
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(uploadDocxTemplateRequestDto, localVarRequestOptions, configuration);
|
|
305
|
+
return [2 /*return*/, {
|
|
306
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
307
|
+
options: localVarRequestOptions,
|
|
308
|
+
}];
|
|
309
|
+
}
|
|
310
|
+
});
|
|
311
|
+
});
|
|
312
|
+
},
|
|
313
|
+
};
|
|
314
|
+
};
|
|
315
|
+
exports.DocxTemplatesApiAxiosParamCreator = DocxTemplatesApiAxiosParamCreator;
|
|
316
|
+
/**
|
|
317
|
+
* DocxTemplatesApi - functional programming interface
|
|
318
|
+
* @export
|
|
319
|
+
*/
|
|
320
|
+
var DocxTemplatesApiFp = function (configuration) {
|
|
321
|
+
var localVarAxiosParamCreator = (0, exports.DocxTemplatesApiAxiosParamCreator)(configuration);
|
|
322
|
+
return {
|
|
323
|
+
/**
|
|
324
|
+
* Get a docx template.
|
|
325
|
+
* @summary Retrieve the docx template
|
|
326
|
+
* @param {string} code
|
|
327
|
+
* @param {string} [authorization] Bearer Token
|
|
328
|
+
* @param {*} [options] Override http request option.
|
|
329
|
+
* @throws {RequiredError}
|
|
330
|
+
*/
|
|
331
|
+
getDocxTemplate: function (code, authorization, options) {
|
|
332
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
333
|
+
var localVarAxiosArgs;
|
|
334
|
+
return __generator(this, function (_a) {
|
|
335
|
+
switch (_a.label) {
|
|
336
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.getDocxTemplate(code, authorization, options)];
|
|
337
|
+
case 1:
|
|
338
|
+
localVarAxiosArgs = _a.sent();
|
|
339
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
340
|
+
}
|
|
341
|
+
});
|
|
342
|
+
});
|
|
343
|
+
},
|
|
344
|
+
/**
|
|
345
|
+
* Returns a list of docx templates you have previously created. The docx templates are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
346
|
+
* @summary List docx templates
|
|
347
|
+
* @param {string} [authorization] Bearer Token
|
|
348
|
+
* @param {number} [pageSize] Page size
|
|
349
|
+
* @param {string} [pageToken] Page token
|
|
350
|
+
* @param {string} [filter] List filter
|
|
351
|
+
* @param {string} [search] Search query
|
|
352
|
+
* @param {string} [order] Ordering criteria
|
|
353
|
+
* @param {string} [expand] Extra fields to fetch
|
|
354
|
+
* @param {*} [options] Override http request option.
|
|
355
|
+
* @throws {RequiredError}
|
|
356
|
+
*/
|
|
357
|
+
listDocxTemplates: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
|
|
358
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
359
|
+
var localVarAxiosArgs;
|
|
360
|
+
return __generator(this, function (_a) {
|
|
361
|
+
switch (_a.label) {
|
|
362
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.listDocxTemplates(authorization, pageSize, pageToken, filter, search, order, expand, options)];
|
|
363
|
+
case 1:
|
|
364
|
+
localVarAxiosArgs = _a.sent();
|
|
365
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
366
|
+
}
|
|
367
|
+
});
|
|
368
|
+
});
|
|
369
|
+
},
|
|
370
|
+
/**
|
|
371
|
+
* Updates a docx template metadata.
|
|
372
|
+
* @summary Update the docx template
|
|
373
|
+
* @param {string} code
|
|
374
|
+
* @param {SharedUpdateDocxTemplateRequestDto} sharedUpdateDocxTemplateRequestDto
|
|
375
|
+
* @param {string} [authorization] Bearer Token
|
|
376
|
+
* @param {*} [options] Override http request option.
|
|
377
|
+
* @throws {RequiredError}
|
|
378
|
+
*/
|
|
379
|
+
updateDocxTemplate: function (code, sharedUpdateDocxTemplateRequestDto, authorization, options) {
|
|
380
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
381
|
+
var localVarAxiosArgs;
|
|
382
|
+
return __generator(this, function (_a) {
|
|
383
|
+
switch (_a.label) {
|
|
384
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.updateDocxTemplate(code, sharedUpdateDocxTemplateRequestDto, authorization, options)];
|
|
385
|
+
case 1:
|
|
386
|
+
localVarAxiosArgs = _a.sent();
|
|
387
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
388
|
+
}
|
|
389
|
+
});
|
|
390
|
+
});
|
|
391
|
+
},
|
|
392
|
+
/**
|
|
393
|
+
* Upload a docx template via a presigned Url.
|
|
394
|
+
* @summary Upload a docx template.
|
|
395
|
+
* @param {UploadDocxTemplateRequestDto} uploadDocxTemplateRequestDto
|
|
396
|
+
* @param {string} [authorization] Bearer Token
|
|
397
|
+
* @param {*} [options] Override http request option.
|
|
398
|
+
* @throws {RequiredError}
|
|
399
|
+
*/
|
|
400
|
+
uploadDocxTemplate: function (uploadDocxTemplateRequestDto, authorization, options) {
|
|
401
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
402
|
+
var localVarAxiosArgs;
|
|
403
|
+
return __generator(this, function (_a) {
|
|
404
|
+
switch (_a.label) {
|
|
405
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.uploadDocxTemplate(uploadDocxTemplateRequestDto, authorization, options)];
|
|
406
|
+
case 1:
|
|
407
|
+
localVarAxiosArgs = _a.sent();
|
|
408
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
409
|
+
}
|
|
410
|
+
});
|
|
411
|
+
});
|
|
412
|
+
},
|
|
413
|
+
};
|
|
414
|
+
};
|
|
415
|
+
exports.DocxTemplatesApiFp = DocxTemplatesApiFp;
|
|
416
|
+
/**
|
|
417
|
+
* DocxTemplatesApi - factory interface
|
|
418
|
+
* @export
|
|
419
|
+
*/
|
|
420
|
+
var DocxTemplatesApiFactory = function (configuration, basePath, axios) {
|
|
421
|
+
var localVarFp = (0, exports.DocxTemplatesApiFp)(configuration);
|
|
422
|
+
return {
|
|
423
|
+
/**
|
|
424
|
+
* Get a docx template.
|
|
425
|
+
* @summary Retrieve the docx template
|
|
426
|
+
* @param {string} code
|
|
427
|
+
* @param {string} [authorization] Bearer Token
|
|
428
|
+
* @param {*} [options] Override http request option.
|
|
429
|
+
* @throws {RequiredError}
|
|
430
|
+
*/
|
|
431
|
+
getDocxTemplate: function (code, authorization, options) {
|
|
432
|
+
return localVarFp.getDocxTemplate(code, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
433
|
+
},
|
|
434
|
+
/**
|
|
435
|
+
* Returns a list of docx templates you have previously created. The docx templates are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
436
|
+
* @summary List docx templates
|
|
437
|
+
* @param {string} [authorization] Bearer Token
|
|
438
|
+
* @param {number} [pageSize] Page size
|
|
439
|
+
* @param {string} [pageToken] Page token
|
|
440
|
+
* @param {string} [filter] List filter
|
|
441
|
+
* @param {string} [search] Search query
|
|
442
|
+
* @param {string} [order] Ordering criteria
|
|
443
|
+
* @param {string} [expand] Extra fields to fetch
|
|
444
|
+
* @param {*} [options] Override http request option.
|
|
445
|
+
* @throws {RequiredError}
|
|
446
|
+
*/
|
|
447
|
+
listDocxTemplates: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
|
|
448
|
+
return localVarFp.listDocxTemplates(authorization, pageSize, pageToken, filter, search, order, expand, options).then(function (request) { return request(axios, basePath); });
|
|
449
|
+
},
|
|
450
|
+
/**
|
|
451
|
+
* Updates a docx template metadata.
|
|
452
|
+
* @summary Update the docx template
|
|
453
|
+
* @param {string} code
|
|
454
|
+
* @param {SharedUpdateDocxTemplateRequestDto} sharedUpdateDocxTemplateRequestDto
|
|
455
|
+
* @param {string} [authorization] Bearer Token
|
|
456
|
+
* @param {*} [options] Override http request option.
|
|
457
|
+
* @throws {RequiredError}
|
|
458
|
+
*/
|
|
459
|
+
updateDocxTemplate: function (code, sharedUpdateDocxTemplateRequestDto, authorization, options) {
|
|
460
|
+
return localVarFp.updateDocxTemplate(code, sharedUpdateDocxTemplateRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
461
|
+
},
|
|
462
|
+
/**
|
|
463
|
+
* Upload a docx template via a presigned Url.
|
|
464
|
+
* @summary Upload a docx template.
|
|
465
|
+
* @param {UploadDocxTemplateRequestDto} uploadDocxTemplateRequestDto
|
|
466
|
+
* @param {string} [authorization] Bearer Token
|
|
467
|
+
* @param {*} [options] Override http request option.
|
|
468
|
+
* @throws {RequiredError}
|
|
469
|
+
*/
|
|
470
|
+
uploadDocxTemplate: function (uploadDocxTemplateRequestDto, authorization, options) {
|
|
471
|
+
return localVarFp.uploadDocxTemplate(uploadDocxTemplateRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
472
|
+
},
|
|
473
|
+
};
|
|
474
|
+
};
|
|
475
|
+
exports.DocxTemplatesApiFactory = DocxTemplatesApiFactory;
|
|
476
|
+
/**
|
|
477
|
+
* DocxTemplatesApi - object-oriented interface
|
|
478
|
+
* @export
|
|
479
|
+
* @class DocxTemplatesApi
|
|
480
|
+
* @extends {BaseAPI}
|
|
481
|
+
*/
|
|
482
|
+
var DocxTemplatesApi = /** @class */ (function (_super) {
|
|
483
|
+
__extends(DocxTemplatesApi, _super);
|
|
484
|
+
function DocxTemplatesApi() {
|
|
485
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
486
|
+
}
|
|
487
|
+
/**
|
|
488
|
+
* Get a docx template.
|
|
489
|
+
* @summary Retrieve the docx template
|
|
490
|
+
* @param {DocxTemplatesApiGetDocxTemplateRequest} requestParameters Request parameters.
|
|
491
|
+
* @param {*} [options] Override http request option.
|
|
492
|
+
* @throws {RequiredError}
|
|
493
|
+
* @memberof DocxTemplatesApi
|
|
494
|
+
*/
|
|
495
|
+
DocxTemplatesApi.prototype.getDocxTemplate = function (requestParameters, options) {
|
|
496
|
+
var _this = this;
|
|
497
|
+
return (0, exports.DocxTemplatesApiFp)(this.configuration).getDocxTemplate(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
498
|
+
};
|
|
499
|
+
/**
|
|
500
|
+
* Returns a list of docx templates you have previously created. The docx templates are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
501
|
+
* @summary List docx templates
|
|
502
|
+
* @param {DocxTemplatesApiListDocxTemplatesRequest} requestParameters Request parameters.
|
|
503
|
+
* @param {*} [options] Override http request option.
|
|
504
|
+
* @throws {RequiredError}
|
|
505
|
+
* @memberof DocxTemplatesApi
|
|
506
|
+
*/
|
|
507
|
+
DocxTemplatesApi.prototype.listDocxTemplates = function (requestParameters, options) {
|
|
508
|
+
var _this = this;
|
|
509
|
+
if (requestParameters === void 0) { requestParameters = {}; }
|
|
510
|
+
return (0, exports.DocxTemplatesApiFp)(this.configuration).listDocxTemplates(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
511
|
+
};
|
|
512
|
+
/**
|
|
513
|
+
* Updates a docx template metadata.
|
|
514
|
+
* @summary Update the docx template
|
|
515
|
+
* @param {DocxTemplatesApiUpdateDocxTemplateRequest} requestParameters Request parameters.
|
|
516
|
+
* @param {*} [options] Override http request option.
|
|
517
|
+
* @throws {RequiredError}
|
|
518
|
+
* @memberof DocxTemplatesApi
|
|
519
|
+
*/
|
|
520
|
+
DocxTemplatesApi.prototype.updateDocxTemplate = function (requestParameters, options) {
|
|
521
|
+
var _this = this;
|
|
522
|
+
return (0, exports.DocxTemplatesApiFp)(this.configuration).updateDocxTemplate(requestParameters.code, requestParameters.sharedUpdateDocxTemplateRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
523
|
+
};
|
|
524
|
+
/**
|
|
525
|
+
* Upload a docx template via a presigned Url.
|
|
526
|
+
* @summary Upload a docx template.
|
|
527
|
+
* @param {DocxTemplatesApiUploadDocxTemplateRequest} requestParameters Request parameters.
|
|
528
|
+
* @param {*} [options] Override http request option.
|
|
529
|
+
* @throws {RequiredError}
|
|
530
|
+
* @memberof DocxTemplatesApi
|
|
531
|
+
*/
|
|
532
|
+
DocxTemplatesApi.prototype.uploadDocxTemplate = function (requestParameters, options) {
|
|
533
|
+
var _this = this;
|
|
534
|
+
return (0, exports.DocxTemplatesApiFp)(this.configuration).uploadDocxTemplate(requestParameters.uploadDocxTemplateRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
535
|
+
};
|
|
536
|
+
return DocxTemplatesApi;
|
|
537
|
+
}(base_1.BaseAPI));
|
|
538
|
+
exports.DocxTemplatesApi = DocxTemplatesApi;
|
package/dist/api.d.ts
CHANGED
|
@@ -9,8 +9,10 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
+
export * from './api/default-api';
|
|
12
13
|
export * from './api/document-templates-api';
|
|
13
14
|
export * from './api/documents-api';
|
|
15
|
+
export * from './api/docx-templates-api';
|
|
14
16
|
export * from './api/layouts-api';
|
|
15
17
|
export * from './api/product-documents-api';
|
|
16
18
|
export * from './api/search-keywords-api';
|
package/dist/api.js
CHANGED
|
@@ -27,8 +27,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
27
27
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
28
28
|
};
|
|
29
29
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
+
__exportStar(require("./api/default-api"), exports);
|
|
30
31
|
__exportStar(require("./api/document-templates-api"), exports);
|
|
31
32
|
__exportStar(require("./api/documents-api"), exports);
|
|
33
|
+
__exportStar(require("./api/docx-templates-api"), exports);
|
|
32
34
|
__exportStar(require("./api/layouts-api"), exports);
|
|
33
35
|
__exportStar(require("./api/product-documents-api"), exports);
|
|
34
36
|
__exportStar(require("./api/search-keywords-api"), exports);
|
|
@@ -99,6 +99,18 @@ export interface CreateDocumentRequestDto {
|
|
|
99
99
|
* @memberof CreateDocumentRequestDto
|
|
100
100
|
*/
|
|
101
101
|
'productSlug'?: string;
|
|
102
|
+
/**
|
|
103
|
+
* If true, the default margins will be skipped when generating the document.
|
|
104
|
+
* @type {boolean}
|
|
105
|
+
* @memberof CreateDocumentRequestDto
|
|
106
|
+
*/
|
|
107
|
+
'shouldSkipDefaultMargins'?: boolean;
|
|
108
|
+
/**
|
|
109
|
+
* Type of the document engine to use to generate the document. Defaults to HTML.
|
|
110
|
+
* @type {string}
|
|
111
|
+
* @memberof CreateDocumentRequestDto
|
|
112
|
+
*/
|
|
113
|
+
'engine'?: CreateDocumentRequestDtoEngineEnum;
|
|
102
114
|
}
|
|
103
115
|
export declare const CreateDocumentRequestDtoEntityTypeEnum: {
|
|
104
116
|
readonly PolicyApplication: "policy_application";
|
|
@@ -154,3 +166,8 @@ export declare const CreateDocumentRequestDtoContentTypeEnum: {
|
|
|
154
166
|
readonly Avi: "AVI";
|
|
155
167
|
};
|
|
156
168
|
export type CreateDocumentRequestDtoContentTypeEnum = typeof CreateDocumentRequestDtoContentTypeEnum[keyof typeof CreateDocumentRequestDtoContentTypeEnum];
|
|
169
|
+
export declare const CreateDocumentRequestDtoEngineEnum: {
|
|
170
|
+
readonly Docx: "docx";
|
|
171
|
+
readonly Html: "html";
|
|
172
|
+
};
|
|
173
|
+
export type CreateDocumentRequestDtoEngineEnum = typeof CreateDocumentRequestDtoEngineEnum[keyof typeof CreateDocumentRequestDtoEngineEnum];
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* Do not edit the class manually.
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.CreateDocumentRequestDtoContentTypeEnum = exports.CreateDocumentRequestDtoRequesterEnum = exports.CreateDocumentRequestDtoStrategyEnum = exports.CreateDocumentRequestDtoEntityTypeEnum = void 0;
|
|
16
|
+
exports.CreateDocumentRequestDtoEngineEnum = exports.CreateDocumentRequestDtoContentTypeEnum = exports.CreateDocumentRequestDtoRequesterEnum = exports.CreateDocumentRequestDtoStrategyEnum = exports.CreateDocumentRequestDtoEntityTypeEnum = void 0;
|
|
17
17
|
exports.CreateDocumentRequestDtoEntityTypeEnum = {
|
|
18
18
|
PolicyApplication: 'policy_application',
|
|
19
19
|
PolicyContract: 'policy_contract',
|
|
@@ -64,3 +64,7 @@ exports.CreateDocumentRequestDtoContentTypeEnum = {
|
|
|
64
64
|
Wmv: 'WMV',
|
|
65
65
|
Avi: 'AVI'
|
|
66
66
|
};
|
|
67
|
+
exports.CreateDocumentRequestDtoEngineEnum = {
|
|
68
|
+
Docx: 'docx',
|
|
69
|
+
Html: 'html'
|
|
70
|
+
};
|
|
@@ -87,6 +87,12 @@ export interface CreatePresignedPostRequestDto {
|
|
|
87
87
|
* @memberof CreatePresignedPostRequestDto
|
|
88
88
|
*/
|
|
89
89
|
'productSlug'?: string;
|
|
90
|
+
/**
|
|
91
|
+
* ERN under which the document will be uploaded. This is useful when uploading documents on behalf of a child organization
|
|
92
|
+
* @type {string}
|
|
93
|
+
* @memberof CreatePresignedPostRequestDto
|
|
94
|
+
*/
|
|
95
|
+
'ern'?: string;
|
|
90
96
|
}
|
|
91
97
|
export declare const CreatePresignedPostRequestDtoRequesterEnum: {
|
|
92
98
|
readonly Accountservice: "accountservice";
|
package/dist/models/index.d.ts
CHANGED
|
@@ -25,6 +25,8 @@ export * from './get-signed-s3-key-url-response-class';
|
|
|
25
25
|
export * from './grpc-create-doc-template-request-dto';
|
|
26
26
|
export * from './grpc-update-doc-template-request-dto';
|
|
27
27
|
export * from './html-template-class';
|
|
28
|
+
export * from './inline-response200';
|
|
29
|
+
export * from './inline-response503';
|
|
28
30
|
export * from './layout-class';
|
|
29
31
|
export * from './list-doc-template-request-dto';
|
|
30
32
|
export * from './list-doc-templates-response-class';
|
|
@@ -41,6 +43,7 @@ export * from './list-searchable-documents-response-class';
|
|
|
41
43
|
export * from './product-document-class';
|
|
42
44
|
export * from './searchable-document-class';
|
|
43
45
|
export * from './searchable-document-owner-class';
|
|
46
|
+
export * from './shared-update-docx-template-request-dto';
|
|
44
47
|
export * from './update-doc-template-request-dto';
|
|
45
48
|
export * from './update-doc-template-response-class';
|
|
46
49
|
export * from './update-document-request-dto';
|
|
@@ -48,4 +51,5 @@ export * from './update-document-response-class';
|
|
|
48
51
|
export * from './update-html-template-dto';
|
|
49
52
|
export * from './update-layout-request-dto';
|
|
50
53
|
export * from './update-layout-response-class';
|
|
54
|
+
export * from './upload-docx-template-request-dto';
|
|
51
55
|
export * from './upload-product-document-request-dto';
|