@emilgroup/document-sdk-node 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.
Files changed (32) hide show
  1. package/.openapi-generator/FILES +6 -0
  2. package/README.md +2 -2
  3. package/api/default-api.ts +124 -0
  4. package/api/docx-templates-api.ts +558 -0
  5. package/api.ts +4 -0
  6. package/dist/api/default-api.d.ts +66 -0
  7. package/dist/api/default-api.js +200 -0
  8. package/dist/api/docx-templates-api.d.ts +316 -0
  9. package/dist/api/docx-templates-api.js +542 -0
  10. package/dist/api.d.ts +2 -0
  11. package/dist/api.js +2 -0
  12. package/dist/models/create-document-request-dto.d.ts +17 -0
  13. package/dist/models/create-document-request-dto.js +5 -1
  14. package/dist/models/create-presigned-post-request-dto.d.ts +6 -0
  15. package/dist/models/index.d.ts +4 -0
  16. package/dist/models/index.js +4 -0
  17. package/dist/models/inline-response200.d.ts +54 -0
  18. package/dist/models/inline-response200.js +15 -0
  19. package/dist/models/inline-response503.d.ts +54 -0
  20. package/dist/models/inline-response503.js +15 -0
  21. package/dist/models/shared-update-docx-template-request-dto.d.ts +36 -0
  22. package/dist/models/shared-update-docx-template-request-dto.js +15 -0
  23. package/dist/models/upload-docx-template-request-dto.d.ts +54 -0
  24. package/dist/models/upload-docx-template-request-dto.js +15 -0
  25. package/models/create-document-request-dto.ts +18 -0
  26. package/models/create-presigned-post-request-dto.ts +6 -0
  27. package/models/index.ts +4 -0
  28. package/models/inline-response200.ts +48 -0
  29. package/models/inline-response503.ts +48 -0
  30. package/models/shared-update-docx-template-request-dto.ts +42 -0
  31. package/models/upload-docx-template-request-dto.ts +60 -0
  32. package/package.json +1 -1
@@ -0,0 +1,542 @@
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
+ // URLSearchParams not necessarily used
89
+ // @ts-ignore
90
+ var url_1 = require("url");
91
+ var FormData = require('form-data');
92
+ /**
93
+ * DocxTemplatesApi - axios parameter creator
94
+ * @export
95
+ */
96
+ var DocxTemplatesApiAxiosParamCreator = function (configuration) {
97
+ var _this = this;
98
+ return {
99
+ /**
100
+ * Get a docx template.
101
+ * @summary Retrieve the docx template
102
+ * @param {string} code
103
+ * @param {string} [authorization] Bearer Token
104
+ * @param {*} [options] Override http request option.
105
+ * @throws {RequiredError}
106
+ */
107
+ getDocxTemplate: function (code, authorization, options) {
108
+ if (options === void 0) { options = {}; }
109
+ return __awaiter(_this, void 0, void 0, function () {
110
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
111
+ return __generator(this, function (_a) {
112
+ switch (_a.label) {
113
+ case 0:
114
+ // verify required parameter 'code' is not null or undefined
115
+ (0, common_1.assertParamExists)('getDocxTemplate', 'code', code);
116
+ localVarPath = "/documentservice/v1/docx-templates/{code}"
117
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
118
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
119
+ if (configuration) {
120
+ baseOptions = configuration.baseOptions;
121
+ baseAccessToken = configuration.accessToken;
122
+ }
123
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
124
+ localVarHeaderParameter = {};
125
+ localVarQueryParameter = {};
126
+ // authentication bearer required
127
+ // http bearer authentication required
128
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
129
+ case 1:
130
+ // authentication bearer required
131
+ // http bearer authentication required
132
+ _a.sent();
133
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
134
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
135
+ }
136
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
137
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
138
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
139
+ return [2 /*return*/, {
140
+ url: (0, common_1.toPathString)(localVarUrlObj),
141
+ options: localVarRequestOptions,
142
+ }];
143
+ }
144
+ });
145
+ });
146
+ },
147
+ /**
148
+ * 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.
149
+ * @summary List docx templates
150
+ * @param {string} [authorization] Bearer Token
151
+ * @param {number} [pageSize] Page size
152
+ * @param {string} [pageToken] Page token
153
+ * @param {string} [filter] List filter
154
+ * @param {string} [search] Search query
155
+ * @param {string} [order] Ordering criteria
156
+ * @param {string} [expand] Extra fields to fetch
157
+ * @param {*} [options] Override http request option.
158
+ * @throws {RequiredError}
159
+ */
160
+ listDocxTemplates: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
161
+ if (options === void 0) { options = {}; }
162
+ return __awaiter(_this, void 0, void 0, function () {
163
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
164
+ return __generator(this, function (_a) {
165
+ switch (_a.label) {
166
+ case 0:
167
+ localVarPath = "/documentservice/v1/docx-templates";
168
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
169
+ if (configuration) {
170
+ baseOptions = configuration.baseOptions;
171
+ baseAccessToken = configuration.accessToken;
172
+ }
173
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
174
+ localVarHeaderParameter = {};
175
+ localVarQueryParameter = {};
176
+ // authentication bearer required
177
+ // http bearer authentication required
178
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
179
+ case 1:
180
+ // authentication bearer required
181
+ // http bearer authentication required
182
+ _a.sent();
183
+ if (pageSize !== undefined) {
184
+ localVarQueryParameter['pageSize'] = pageSize;
185
+ }
186
+ if (pageToken !== undefined) {
187
+ localVarQueryParameter['pageToken'] = pageToken;
188
+ }
189
+ if (filter !== undefined) {
190
+ localVarQueryParameter['filter'] = filter;
191
+ }
192
+ if (search !== undefined) {
193
+ localVarQueryParameter['search'] = search;
194
+ }
195
+ if (order !== undefined) {
196
+ localVarQueryParameter['order'] = order;
197
+ }
198
+ if (expand !== undefined) {
199
+ localVarQueryParameter['expand'] = expand;
200
+ }
201
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
202
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
203
+ }
204
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
205
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
206
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
207
+ return [2 /*return*/, {
208
+ url: (0, common_1.toPathString)(localVarUrlObj),
209
+ options: localVarRequestOptions,
210
+ }];
211
+ }
212
+ });
213
+ });
214
+ },
215
+ /**
216
+ * Updates a docx template metadata.
217
+ * @summary Update the docx template
218
+ * @param {string} code
219
+ * @param {SharedUpdateDocxTemplateRequestDto} sharedUpdateDocxTemplateRequestDto
220
+ * @param {string} [authorization] Bearer Token
221
+ * @param {*} [options] Override http request option.
222
+ * @throws {RequiredError}
223
+ */
224
+ updateDocxTemplate: function (code, sharedUpdateDocxTemplateRequestDto, authorization, options) {
225
+ if (options === void 0) { options = {}; }
226
+ return __awaiter(_this, void 0, void 0, function () {
227
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
228
+ return __generator(this, function (_a) {
229
+ switch (_a.label) {
230
+ case 0:
231
+ // verify required parameter 'code' is not null or undefined
232
+ (0, common_1.assertParamExists)('updateDocxTemplate', 'code', code);
233
+ // verify required parameter 'sharedUpdateDocxTemplateRequestDto' is not null or undefined
234
+ (0, common_1.assertParamExists)('updateDocxTemplate', 'sharedUpdateDocxTemplateRequestDto', sharedUpdateDocxTemplateRequestDto);
235
+ localVarPath = "/documentservice/v1/docx-templates/{code}"
236
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
237
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
238
+ if (configuration) {
239
+ baseOptions = configuration.baseOptions;
240
+ baseAccessToken = configuration.accessToken;
241
+ }
242
+ localVarRequestOptions = __assign(__assign({ method: 'PUT' }, baseOptions), options);
243
+ localVarHeaderParameter = {};
244
+ localVarQueryParameter = {};
245
+ // authentication bearer required
246
+ // http bearer authentication required
247
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
248
+ case 1:
249
+ // authentication bearer required
250
+ // http bearer authentication required
251
+ _a.sent();
252
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
253
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
254
+ }
255
+ localVarHeaderParameter['Content-Type'] = 'application/json';
256
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
257
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
258
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
259
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(sharedUpdateDocxTemplateRequestDto, localVarRequestOptions, configuration);
260
+ return [2 /*return*/, {
261
+ url: (0, common_1.toPathString)(localVarUrlObj),
262
+ options: localVarRequestOptions,
263
+ }];
264
+ }
265
+ });
266
+ });
267
+ },
268
+ /**
269
+ * Upload a docx template via a presigned Url.
270
+ * @summary Upload a docx template.
271
+ * @param {UploadDocxTemplateRequestDto} uploadDocxTemplateRequestDto
272
+ * @param {string} [authorization] Bearer Token
273
+ * @param {*} [options] Override http request option.
274
+ * @throws {RequiredError}
275
+ */
276
+ uploadDocxTemplate: function (uploadDocxTemplateRequestDto, authorization, options) {
277
+ if (options === void 0) { options = {}; }
278
+ return __awaiter(_this, void 0, void 0, function () {
279
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
280
+ return __generator(this, function (_a) {
281
+ switch (_a.label) {
282
+ case 0:
283
+ // verify required parameter 'uploadDocxTemplateRequestDto' is not null or undefined
284
+ (0, common_1.assertParamExists)('uploadDocxTemplate', 'uploadDocxTemplateRequestDto', uploadDocxTemplateRequestDto);
285
+ localVarPath = "/documentservice/v1/docx-templates";
286
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
287
+ if (configuration) {
288
+ baseOptions = configuration.baseOptions;
289
+ baseAccessToken = configuration.accessToken;
290
+ }
291
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
292
+ localVarHeaderParameter = {};
293
+ localVarQueryParameter = {};
294
+ // authentication bearer required
295
+ // http bearer authentication required
296
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
297
+ case 1:
298
+ // authentication bearer required
299
+ // http bearer authentication required
300
+ _a.sent();
301
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
302
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
303
+ }
304
+ localVarHeaderParameter['Content-Type'] = 'application/json';
305
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
306
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
307
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
308
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(uploadDocxTemplateRequestDto, localVarRequestOptions, configuration);
309
+ return [2 /*return*/, {
310
+ url: (0, common_1.toPathString)(localVarUrlObj),
311
+ options: localVarRequestOptions,
312
+ }];
313
+ }
314
+ });
315
+ });
316
+ },
317
+ };
318
+ };
319
+ exports.DocxTemplatesApiAxiosParamCreator = DocxTemplatesApiAxiosParamCreator;
320
+ /**
321
+ * DocxTemplatesApi - functional programming interface
322
+ * @export
323
+ */
324
+ var DocxTemplatesApiFp = function (configuration) {
325
+ var localVarAxiosParamCreator = (0, exports.DocxTemplatesApiAxiosParamCreator)(configuration);
326
+ return {
327
+ /**
328
+ * Get a docx template.
329
+ * @summary Retrieve the docx template
330
+ * @param {string} code
331
+ * @param {string} [authorization] Bearer Token
332
+ * @param {*} [options] Override http request option.
333
+ * @throws {RequiredError}
334
+ */
335
+ getDocxTemplate: function (code, authorization, options) {
336
+ return __awaiter(this, void 0, void 0, function () {
337
+ var localVarAxiosArgs;
338
+ return __generator(this, function (_a) {
339
+ switch (_a.label) {
340
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getDocxTemplate(code, authorization, options)];
341
+ case 1:
342
+ localVarAxiosArgs = _a.sent();
343
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
344
+ }
345
+ });
346
+ });
347
+ },
348
+ /**
349
+ * 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.
350
+ * @summary List docx templates
351
+ * @param {string} [authorization] Bearer Token
352
+ * @param {number} [pageSize] Page size
353
+ * @param {string} [pageToken] Page token
354
+ * @param {string} [filter] List filter
355
+ * @param {string} [search] Search query
356
+ * @param {string} [order] Ordering criteria
357
+ * @param {string} [expand] Extra fields to fetch
358
+ * @param {*} [options] Override http request option.
359
+ * @throws {RequiredError}
360
+ */
361
+ listDocxTemplates: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
362
+ return __awaiter(this, void 0, void 0, function () {
363
+ var localVarAxiosArgs;
364
+ return __generator(this, function (_a) {
365
+ switch (_a.label) {
366
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.listDocxTemplates(authorization, pageSize, pageToken, filter, search, order, expand, options)];
367
+ case 1:
368
+ localVarAxiosArgs = _a.sent();
369
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
370
+ }
371
+ });
372
+ });
373
+ },
374
+ /**
375
+ * Updates a docx template metadata.
376
+ * @summary Update the docx template
377
+ * @param {string} code
378
+ * @param {SharedUpdateDocxTemplateRequestDto} sharedUpdateDocxTemplateRequestDto
379
+ * @param {string} [authorization] Bearer Token
380
+ * @param {*} [options] Override http request option.
381
+ * @throws {RequiredError}
382
+ */
383
+ updateDocxTemplate: function (code, sharedUpdateDocxTemplateRequestDto, authorization, options) {
384
+ return __awaiter(this, void 0, void 0, function () {
385
+ var localVarAxiosArgs;
386
+ return __generator(this, function (_a) {
387
+ switch (_a.label) {
388
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.updateDocxTemplate(code, sharedUpdateDocxTemplateRequestDto, authorization, options)];
389
+ case 1:
390
+ localVarAxiosArgs = _a.sent();
391
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
392
+ }
393
+ });
394
+ });
395
+ },
396
+ /**
397
+ * Upload a docx template via a presigned Url.
398
+ * @summary Upload a docx template.
399
+ * @param {UploadDocxTemplateRequestDto} uploadDocxTemplateRequestDto
400
+ * @param {string} [authorization] Bearer Token
401
+ * @param {*} [options] Override http request option.
402
+ * @throws {RequiredError}
403
+ */
404
+ uploadDocxTemplate: function (uploadDocxTemplateRequestDto, authorization, options) {
405
+ return __awaiter(this, void 0, void 0, function () {
406
+ var localVarAxiosArgs;
407
+ return __generator(this, function (_a) {
408
+ switch (_a.label) {
409
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.uploadDocxTemplate(uploadDocxTemplateRequestDto, authorization, options)];
410
+ case 1:
411
+ localVarAxiosArgs = _a.sent();
412
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
413
+ }
414
+ });
415
+ });
416
+ },
417
+ };
418
+ };
419
+ exports.DocxTemplatesApiFp = DocxTemplatesApiFp;
420
+ /**
421
+ * DocxTemplatesApi - factory interface
422
+ * @export
423
+ */
424
+ var DocxTemplatesApiFactory = function (configuration, basePath, axios) {
425
+ var localVarFp = (0, exports.DocxTemplatesApiFp)(configuration);
426
+ return {
427
+ /**
428
+ * Get a docx template.
429
+ * @summary Retrieve the docx template
430
+ * @param {string} code
431
+ * @param {string} [authorization] Bearer Token
432
+ * @param {*} [options] Override http request option.
433
+ * @throws {RequiredError}
434
+ */
435
+ getDocxTemplate: function (code, authorization, options) {
436
+ return localVarFp.getDocxTemplate(code, authorization, options).then(function (request) { return request(axios, basePath); });
437
+ },
438
+ /**
439
+ * 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.
440
+ * @summary List docx templates
441
+ * @param {string} [authorization] Bearer Token
442
+ * @param {number} [pageSize] Page size
443
+ * @param {string} [pageToken] Page token
444
+ * @param {string} [filter] List filter
445
+ * @param {string} [search] Search query
446
+ * @param {string} [order] Ordering criteria
447
+ * @param {string} [expand] Extra fields to fetch
448
+ * @param {*} [options] Override http request option.
449
+ * @throws {RequiredError}
450
+ */
451
+ listDocxTemplates: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
452
+ return localVarFp.listDocxTemplates(authorization, pageSize, pageToken, filter, search, order, expand, options).then(function (request) { return request(axios, basePath); });
453
+ },
454
+ /**
455
+ * Updates a docx template metadata.
456
+ * @summary Update the docx template
457
+ * @param {string} code
458
+ * @param {SharedUpdateDocxTemplateRequestDto} sharedUpdateDocxTemplateRequestDto
459
+ * @param {string} [authorization] Bearer Token
460
+ * @param {*} [options] Override http request option.
461
+ * @throws {RequiredError}
462
+ */
463
+ updateDocxTemplate: function (code, sharedUpdateDocxTemplateRequestDto, authorization, options) {
464
+ return localVarFp.updateDocxTemplate(code, sharedUpdateDocxTemplateRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
465
+ },
466
+ /**
467
+ * Upload a docx template via a presigned Url.
468
+ * @summary Upload a docx template.
469
+ * @param {UploadDocxTemplateRequestDto} uploadDocxTemplateRequestDto
470
+ * @param {string} [authorization] Bearer Token
471
+ * @param {*} [options] Override http request option.
472
+ * @throws {RequiredError}
473
+ */
474
+ uploadDocxTemplate: function (uploadDocxTemplateRequestDto, authorization, options) {
475
+ return localVarFp.uploadDocxTemplate(uploadDocxTemplateRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
476
+ },
477
+ };
478
+ };
479
+ exports.DocxTemplatesApiFactory = DocxTemplatesApiFactory;
480
+ /**
481
+ * DocxTemplatesApi - object-oriented interface
482
+ * @export
483
+ * @class DocxTemplatesApi
484
+ * @extends {BaseAPI}
485
+ */
486
+ var DocxTemplatesApi = /** @class */ (function (_super) {
487
+ __extends(DocxTemplatesApi, _super);
488
+ function DocxTemplatesApi() {
489
+ return _super !== null && _super.apply(this, arguments) || this;
490
+ }
491
+ /**
492
+ * Get a docx template.
493
+ * @summary Retrieve the docx template
494
+ * @param {DocxTemplatesApiGetDocxTemplateRequest} requestParameters Request parameters.
495
+ * @param {*} [options] Override http request option.
496
+ * @throws {RequiredError}
497
+ * @memberof DocxTemplatesApi
498
+ */
499
+ DocxTemplatesApi.prototype.getDocxTemplate = function (requestParameters, options) {
500
+ var _this = this;
501
+ return (0, exports.DocxTemplatesApiFp)(this.configuration).getDocxTemplate(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
502
+ };
503
+ /**
504
+ * 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.
505
+ * @summary List docx templates
506
+ * @param {DocxTemplatesApiListDocxTemplatesRequest} requestParameters Request parameters.
507
+ * @param {*} [options] Override http request option.
508
+ * @throws {RequiredError}
509
+ * @memberof DocxTemplatesApi
510
+ */
511
+ DocxTemplatesApi.prototype.listDocxTemplates = function (requestParameters, options) {
512
+ var _this = this;
513
+ if (requestParameters === void 0) { requestParameters = {}; }
514
+ 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); });
515
+ };
516
+ /**
517
+ * Updates a docx template metadata.
518
+ * @summary Update the docx template
519
+ * @param {DocxTemplatesApiUpdateDocxTemplateRequest} requestParameters Request parameters.
520
+ * @param {*} [options] Override http request option.
521
+ * @throws {RequiredError}
522
+ * @memberof DocxTemplatesApi
523
+ */
524
+ DocxTemplatesApi.prototype.updateDocxTemplate = function (requestParameters, options) {
525
+ var _this = this;
526
+ return (0, exports.DocxTemplatesApiFp)(this.configuration).updateDocxTemplate(requestParameters.code, requestParameters.sharedUpdateDocxTemplateRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
527
+ };
528
+ /**
529
+ * Upload a docx template via a presigned Url.
530
+ * @summary Upload a docx template.
531
+ * @param {DocxTemplatesApiUploadDocxTemplateRequest} requestParameters Request parameters.
532
+ * @param {*} [options] Override http request option.
533
+ * @throws {RequiredError}
534
+ * @memberof DocxTemplatesApi
535
+ */
536
+ DocxTemplatesApi.prototype.uploadDocxTemplate = function (requestParameters, options) {
537
+ var _this = this;
538
+ return (0, exports.DocxTemplatesApiFp)(this.configuration).uploadDocxTemplate(requestParameters.uploadDocxTemplateRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
539
+ };
540
+ return DocxTemplatesApi;
541
+ }(base_1.BaseAPI));
542
+ 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";
@@ -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';