@emilgroup/document-sdk 1.2.0 → 1.5.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 +3 -0
- package/README.md +5 -22
- package/api/document-templates-api.ts +28 -18
- package/api/documents-api.ts +0 -4
- package/api/layouts-api.ts +0 -4
- package/api/product-documents-api.ts +112 -4
- package/api/search-keywords-api.ts +0 -4
- package/api/searchable-document-owners-api.ts +0 -4
- package/api/searchable-documents-api.ts +0 -4
- package/api.ts +0 -4
- package/base.ts +59 -93
- package/common.ts +0 -1
- package/configuration.ts +0 -8
- package/dist/api/document-templates-api.d.ts +20 -11
- package/dist/api/document-templates-api.js +23 -21
- package/dist/api/documents-api.js +7 -11
- package/dist/api/layouts-api.js +5 -9
- package/dist/api/product-documents-api.d.ts +61 -0
- package/dist/api/product-documents-api.js +98 -8
- package/dist/api/search-keywords-api.js +1 -5
- package/dist/api/searchable-document-owners-api.js +1 -5
- package/dist/api/searchable-documents-api.js +1 -5
- package/dist/base.d.ts +5 -9
- package/dist/base.js +40 -136
- package/dist/common.d.ts +0 -1
- package/dist/common.js +1 -2
- package/dist/configuration.d.ts +0 -7
- package/dist/models/create-doc-template-request-dto.d.ts +6 -0
- package/dist/models/doc-template-class.d.ts +6 -0
- package/dist/models/get-product-document-download-url-response-class.d.ts +24 -0
- package/dist/models/get-product-document-download-url-response-class.js +15 -0
- package/dist/models/grpc-create-doc-template-request-dto.d.ts +55 -0
- package/dist/models/grpc-create-doc-template-request-dto.js +15 -0
- package/dist/models/grpc-update-doc-template-request-dto.d.ts +61 -0
- package/dist/models/grpc-update-doc-template-request-dto.js +15 -0
- package/dist/models/index.d.ts +3 -0
- package/dist/models/index.js +3 -0
- package/dist/models/list-doc-template-request-dto.d.ts +6 -0
- package/dist/models/product-document-class.d.ts +17 -0
- package/dist/models/product-document-class.js +11 -1
- package/dist/models/update-doc-template-request-dto.d.ts +6 -0
- package/dist/models/upload-product-document-request-dto.d.ts +6 -0
- package/models/create-doc-template-request-dto.ts +6 -0
- package/models/doc-template-class.ts +6 -0
- package/models/get-product-document-download-url-response-class.ts +30 -0
- package/models/grpc-create-doc-template-request-dto.ts +61 -0
- package/models/grpc-update-doc-template-request-dto.ts +67 -0
- package/models/index.ts +3 -0
- package/models/list-doc-template-request-dto.ts +6 -0
- package/models/product-document-class.ts +18 -0
- package/models/update-doc-template-request-dto.ts +6 -0
- package/models/upload-product-document-request-dto.ts +6 -0
- package/package.json +2 -5
package/dist/base.js
CHANGED
|
@@ -38,29 +38,6 @@ var __assign = (this && this.__assign) || function () {
|
|
|
38
38
|
};
|
|
39
39
|
return __assign.apply(this, arguments);
|
|
40
40
|
};
|
|
41
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
42
|
-
if (k2 === undefined) k2 = k;
|
|
43
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
44
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
45
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
46
|
-
}
|
|
47
|
-
Object.defineProperty(o, k2, desc);
|
|
48
|
-
}) : (function(o, m, k, k2) {
|
|
49
|
-
if (k2 === undefined) k2 = k;
|
|
50
|
-
o[k2] = m[k];
|
|
51
|
-
}));
|
|
52
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
53
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
54
|
-
}) : function(o, v) {
|
|
55
|
-
o["default"] = v;
|
|
56
|
-
});
|
|
57
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
58
|
-
if (mod && mod.__esModule) return mod;
|
|
59
|
-
var result = {};
|
|
60
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
61
|
-
__setModuleDefault(result, mod);
|
|
62
|
-
return result;
|
|
63
|
-
};
|
|
64
41
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
65
42
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
66
43
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -103,18 +80,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
103
80
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
104
81
|
exports.RequiredError = exports.BaseAPI = exports.resetRetry = exports.Environment = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0;
|
|
105
82
|
var configuration_1 = require("./configuration");
|
|
83
|
+
var common_1 = require("./common");
|
|
106
84
|
// Some imports not used depending on template conditions
|
|
107
85
|
// @ts-ignore
|
|
108
86
|
var axios_1 = __importDefault(require("axios"));
|
|
109
|
-
var fs = __importStar(require("fs"));
|
|
110
|
-
var path = __importStar(require("path"));
|
|
111
|
-
var os = __importStar(require("os"));
|
|
112
87
|
exports.BASE_PATH = "https://apiv2.emil.de".replace(/\/+$/, "");
|
|
113
|
-
var CONFIG_DIRECTORY = '.emil';
|
|
114
|
-
var CONFIG_FILENAME = 'credentials';
|
|
115
|
-
var KEY_USERNAME = 'emil_username';
|
|
116
|
-
var KEY_PASSWORD = 'emil_password';
|
|
117
|
-
var filePath = os.homedir() + path.sep + CONFIG_DIRECTORY + path.sep + CONFIG_FILENAME;
|
|
118
88
|
/**
|
|
119
89
|
*
|
|
120
90
|
* @export
|
|
@@ -138,6 +108,7 @@ function resetRetry() {
|
|
|
138
108
|
}
|
|
139
109
|
exports.resetRetry = resetRetry;
|
|
140
110
|
var NETWORK_ERROR_MESSAGE = "Network Error";
|
|
111
|
+
var TOKEN_DATA = 'APP_TOKEN';
|
|
141
112
|
/**
|
|
142
113
|
*
|
|
143
114
|
* @export
|
|
@@ -149,101 +120,27 @@ var BaseAPI = /** @class */ (function () {
|
|
|
149
120
|
if (axios === void 0) { axios = axios_1.default; }
|
|
150
121
|
this.basePath = basePath;
|
|
151
122
|
this.axios = axios;
|
|
123
|
+
this.loadTokenData();
|
|
152
124
|
if (configuration) {
|
|
153
125
|
this.configuration = configuration;
|
|
154
126
|
this.basePath = configuration.basePath || this.basePath;
|
|
155
127
|
}
|
|
156
128
|
else {
|
|
129
|
+
var _a = this.tokenData, accessToken = _a.accessToken, username = _a.username;
|
|
157
130
|
this.configuration = new configuration_1.Configuration({
|
|
158
131
|
basePath: this.basePath,
|
|
132
|
+
accessToken: accessToken ? "Bearer ".concat(accessToken) : '',
|
|
133
|
+
username: username,
|
|
159
134
|
});
|
|
160
135
|
}
|
|
161
136
|
this.attachInterceptor(axios);
|
|
162
137
|
}
|
|
163
|
-
BaseAPI.prototype.initialize = function (env) {
|
|
164
|
-
if (env === void 0) { env = Environment.Production; }
|
|
165
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
166
|
-
return __generator(this, function (_a) {
|
|
167
|
-
switch (_a.label) {
|
|
168
|
-
case 0:
|
|
169
|
-
this.configuration.basePath = env;
|
|
170
|
-
return [4 /*yield*/, this.loadCredentials()];
|
|
171
|
-
case 1:
|
|
172
|
-
_a.sent();
|
|
173
|
-
if (!this.username) return [3 /*break*/, 3];
|
|
174
|
-
return [4 /*yield*/, this.authorize(this.username, this.password)];
|
|
175
|
-
case 2:
|
|
176
|
-
_a.sent();
|
|
177
|
-
this.password = null; // to avoid keeping password loaded in memory.
|
|
178
|
-
_a.label = 3;
|
|
179
|
-
case 3: return [2 /*return*/];
|
|
180
|
-
}
|
|
181
|
-
});
|
|
182
|
-
});
|
|
183
|
-
};
|
|
184
|
-
BaseAPI.prototype.loadCredentials = function () {
|
|
185
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
186
|
-
var error_1;
|
|
187
|
-
return __generator(this, function (_a) {
|
|
188
|
-
switch (_a.label) {
|
|
189
|
-
case 0:
|
|
190
|
-
_a.trys.push([0, 2, , 3]);
|
|
191
|
-
return [4 /*yield*/, this.readConfigFile()];
|
|
192
|
-
case 1:
|
|
193
|
-
_a.sent();
|
|
194
|
-
return [3 /*break*/, 3];
|
|
195
|
-
case 2:
|
|
196
|
-
error_1 = _a.sent();
|
|
197
|
-
console.warn("No credentials file found. Check that ".concat(filePath, " exists."));
|
|
198
|
-
return [3 /*break*/, 3];
|
|
199
|
-
case 3:
|
|
200
|
-
this.readEnvVariables();
|
|
201
|
-
if (!this.username) {
|
|
202
|
-
console.info("No credentials found in credentials file or environment variables. Either provide some or use \n authorize() function.");
|
|
203
|
-
}
|
|
204
|
-
return [2 /*return*/];
|
|
205
|
-
}
|
|
206
|
-
});
|
|
207
|
-
});
|
|
208
|
-
};
|
|
209
|
-
BaseAPI.prototype.readConfigFile = function () {
|
|
210
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
211
|
-
var file, lines;
|
|
212
|
-
var _this = this;
|
|
213
|
-
return __generator(this, function (_a) {
|
|
214
|
-
switch (_a.label) {
|
|
215
|
-
case 0: return [4 /*yield*/, fs.promises.readFile(filePath, 'utf-8')];
|
|
216
|
-
case 1:
|
|
217
|
-
file = _a.sent();
|
|
218
|
-
lines = file.split(os.EOL)
|
|
219
|
-
.filter(Boolean);
|
|
220
|
-
lines.forEach(function (line) {
|
|
221
|
-
if (line.startsWith(KEY_USERNAME)) {
|
|
222
|
-
_this.username = line.length > KEY_USERNAME.length + 1 ? line.substring(KEY_USERNAME.length + 1) : '';
|
|
223
|
-
}
|
|
224
|
-
else if (line.startsWith(KEY_PASSWORD)) {
|
|
225
|
-
_this.password = line.length > KEY_PASSWORD.length + 1 ? line.substring(KEY_PASSWORD.length + 1) : '';
|
|
226
|
-
}
|
|
227
|
-
});
|
|
228
|
-
return [2 /*return*/];
|
|
229
|
-
}
|
|
230
|
-
});
|
|
231
|
-
});
|
|
232
|
-
};
|
|
233
|
-
BaseAPI.prototype.readEnvVariables = function () {
|
|
234
|
-
if (process.env.EMIL_USERNAME) {
|
|
235
|
-
this.username = process.env.EMIL_USERNAME;
|
|
236
|
-
this.password = process.env.EMIL_PASSWORD || '';
|
|
237
|
-
return true;
|
|
238
|
-
}
|
|
239
|
-
return false;
|
|
240
|
-
};
|
|
241
138
|
BaseAPI.prototype.selectEnvironment = function (env) {
|
|
242
139
|
this.configuration.basePath = env;
|
|
243
140
|
};
|
|
244
141
|
BaseAPI.prototype.authorize = function (username, password) {
|
|
245
142
|
return __awaiter(this, void 0, void 0, function () {
|
|
246
|
-
var options, response, accessToken
|
|
143
|
+
var options, response, accessToken;
|
|
247
144
|
return __generator(this, function (_a) {
|
|
248
145
|
switch (_a.label) {
|
|
249
146
|
case 0:
|
|
@@ -263,8 +160,9 @@ var BaseAPI = /** @class */ (function () {
|
|
|
263
160
|
accessToken = response.data.accessToken;
|
|
264
161
|
this.configuration.username = username;
|
|
265
162
|
this.configuration.accessToken = "Bearer ".concat(accessToken);
|
|
266
|
-
|
|
267
|
-
this.
|
|
163
|
+
this.tokenData.username = username;
|
|
164
|
+
this.tokenData.accessToken = accessToken;
|
|
165
|
+
this.storeTokenData(__assign({}, this.tokenData));
|
|
268
166
|
return [2 /*return*/];
|
|
269
167
|
}
|
|
270
168
|
});
|
|
@@ -272,12 +170,12 @@ var BaseAPI = /** @class */ (function () {
|
|
|
272
170
|
};
|
|
273
171
|
BaseAPI.prototype.refreshTokenInternal = function () {
|
|
274
172
|
return __awaiter(this, void 0, void 0, function () {
|
|
275
|
-
var
|
|
276
|
-
return __generator(this, function (
|
|
277
|
-
switch (
|
|
173
|
+
var username, options, accessToken;
|
|
174
|
+
return __generator(this, function (_a) {
|
|
175
|
+
switch (_a.label) {
|
|
278
176
|
case 0:
|
|
279
|
-
|
|
280
|
-
if (!username
|
|
177
|
+
username = this.configuration.username;
|
|
178
|
+
if (!username) {
|
|
281
179
|
return [2 /*return*/, ''];
|
|
282
180
|
}
|
|
283
181
|
options = {
|
|
@@ -285,28 +183,33 @@ var BaseAPI = /** @class */ (function () {
|
|
|
285
183
|
url: "".concat(this.configuration.basePath, "/authservice/v1/refresh-token"),
|
|
286
184
|
headers: {
|
|
287
185
|
'Content-Type': 'application/json',
|
|
288
|
-
Cookie: refreshToken,
|
|
289
186
|
},
|
|
290
187
|
data: { username: username },
|
|
291
188
|
withCredentials: true,
|
|
292
189
|
};
|
|
293
190
|
return [4 /*yield*/, axios_1.default.request(options)];
|
|
294
191
|
case 1:
|
|
295
|
-
accessToken = (
|
|
192
|
+
accessToken = (_a.sent()).data.accessToken;
|
|
296
193
|
return [2 /*return*/, accessToken];
|
|
297
194
|
}
|
|
298
195
|
});
|
|
299
196
|
});
|
|
300
197
|
};
|
|
301
|
-
BaseAPI.prototype.
|
|
302
|
-
if (
|
|
303
|
-
|
|
304
|
-
return "".concat(response.headers['set-cookie'][0].split(';')[0], ";");
|
|
198
|
+
BaseAPI.prototype.storeTokenData = function (tokenData) {
|
|
199
|
+
if (typeof window !== 'undefined') {
|
|
200
|
+
(0, common_1.defaultStorage)().set(TOKEN_DATA, tokenData);
|
|
305
201
|
}
|
|
306
|
-
return '';
|
|
307
202
|
};
|
|
308
|
-
BaseAPI.prototype.
|
|
309
|
-
|
|
203
|
+
BaseAPI.prototype.loadTokenData = function () {
|
|
204
|
+
if (typeof window !== 'undefined') {
|
|
205
|
+
this.tokenData = (0, common_1.defaultStorage)().get(TOKEN_DATA) || {};
|
|
206
|
+
}
|
|
207
|
+
else {
|
|
208
|
+
this.tokenData = {};
|
|
209
|
+
}
|
|
210
|
+
};
|
|
211
|
+
BaseAPI.prototype.cleanTokenData = function () {
|
|
212
|
+
this.storeTokenData(null);
|
|
310
213
|
};
|
|
311
214
|
BaseAPI.prototype.attachInterceptor = function (axios) {
|
|
312
215
|
var _this = this;
|
|
@@ -318,8 +221,9 @@ var BaseAPI = /** @class */ (function () {
|
|
|
318
221
|
switch (_a.label) {
|
|
319
222
|
case 0:
|
|
320
223
|
originalConfig = err.config;
|
|
321
|
-
if (!err.response) return [3 /*break*/, 5];
|
|
322
|
-
if (!(err.response.status === 401
|
|
224
|
+
if (!(err.response && !(err.response instanceof XMLHttpRequest))) return [3 /*break*/, 5];
|
|
225
|
+
if (!((err.response.status === 401 || err.response.status === 403)
|
|
226
|
+
&& !originalConfig._retry)) return [3 /*break*/, 4];
|
|
323
227
|
originalConfig._retry = true;
|
|
324
228
|
_a.label = 1;
|
|
325
229
|
case 1:
|
|
@@ -328,23 +232,21 @@ var BaseAPI = /** @class */ (function () {
|
|
|
328
232
|
case 2:
|
|
329
233
|
tokenString = _a.sent();
|
|
330
234
|
accessToken = "Bearer ".concat(tokenString);
|
|
331
|
-
originalConfig.headers['Authorization']
|
|
235
|
+
delete originalConfig.headers['Authorization'];
|
|
236
|
+
originalConfig.headers['Authorization'] = accessToken;
|
|
332
237
|
this.configuration.accessToken = accessToken;
|
|
333
|
-
|
|
238
|
+
this.tokenData.accessToken = tokenString;
|
|
239
|
+
this.storeTokenData(this.tokenData);
|
|
240
|
+
return [2 /*return*/, axios(originalConfig)];
|
|
334
241
|
case 3:
|
|
335
242
|
_error_1 = _a.sent();
|
|
336
243
|
if (_error_1.response && _error_1.response.data) {
|
|
337
244
|
return [2 /*return*/, Promise.reject(_error_1.response.data)];
|
|
338
245
|
}
|
|
339
246
|
return [2 /*return*/, Promise.reject(_error_1)];
|
|
340
|
-
case 4:
|
|
341
|
-
if (err.response.status === 403 && err.response.data) {
|
|
342
|
-
return [2 /*return*/, Promise.reject(err.response.data)];
|
|
343
|
-
}
|
|
344
|
-
return [3 /*break*/, 9];
|
|
247
|
+
case 4: return [3 /*break*/, 9];
|
|
345
248
|
case 5:
|
|
346
249
|
if (!(err.message === NETWORK_ERROR_MESSAGE
|
|
347
|
-
&& err.isAxiosError
|
|
348
250
|
&& originalConfig.headers.hasOwnProperty('Authorization')
|
|
349
251
|
&& _retry_count < 4)) return [3 /*break*/, 9];
|
|
350
252
|
_retry_count++;
|
|
@@ -358,6 +260,8 @@ var BaseAPI = /** @class */ (function () {
|
|
|
358
260
|
_retry = true;
|
|
359
261
|
originalConfig.headers['Authorization'] = accessToken;
|
|
360
262
|
this.configuration.accessToken = accessToken;
|
|
263
|
+
this.tokenData.accessToken = tokenString;
|
|
264
|
+
this.storeTokenData(this.tokenData);
|
|
361
265
|
return [2 /*return*/, axios.request(__assign({}, originalConfig))];
|
|
362
266
|
case 8:
|
|
363
267
|
_error_2 = _a.sent();
|
package/dist/common.d.ts
CHANGED
package/dist/common.js
CHANGED
|
@@ -62,7 +62,6 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
62
62
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
63
63
|
exports.defaultStorage = exports.LocalStorage = exports.createRequestFunction = exports.toPathString = exports.serializeDataIfNeeded = exports.setSearchParams = exports.setOAuthToObject = exports.setBearerAuthToObject = exports.setBasicAuthToObject = exports.setApiKeyToObject = exports.assertParamExists = exports.DUMMY_BASE_URL = void 0;
|
|
64
64
|
var base_1 = require("./base");
|
|
65
|
-
var url_1 = require("url");
|
|
66
65
|
/**
|
|
67
66
|
*
|
|
68
67
|
* @export
|
|
@@ -188,7 +187,7 @@ var setSearchParams = function (url) {
|
|
|
188
187
|
for (var _i = 1; _i < arguments.length; _i++) {
|
|
189
188
|
objects[_i - 1] = arguments[_i];
|
|
190
189
|
}
|
|
191
|
-
var searchParams = new
|
|
190
|
+
var searchParams = new URLSearchParams(url.search);
|
|
192
191
|
for (var _a = 0, objects_1 = objects; _a < objects_1.length; _a++) {
|
|
193
192
|
var object = objects_1[_a];
|
|
194
193
|
for (var key in object) {
|
package/dist/configuration.d.ts
CHANGED
|
@@ -68,13 +68,6 @@ export declare class Configuration {
|
|
|
68
68
|
* @type {new () => FormData}
|
|
69
69
|
*/
|
|
70
70
|
formDataCtor?: new () => any;
|
|
71
|
-
/**
|
|
72
|
-
* parameter for automatically refreshing access token for oauth2 security
|
|
73
|
-
*
|
|
74
|
-
* @type {string}
|
|
75
|
-
* @memberof Configuration
|
|
76
|
-
*/
|
|
77
|
-
refreshToken?: string;
|
|
78
71
|
constructor(param?: ConfigurationParameters);
|
|
79
72
|
/**
|
|
80
73
|
* Check if the given MIME is a JSON MIME.
|
|
@@ -46,4 +46,10 @@ export interface CreateDocTemplateRequestDto {
|
|
|
46
46
|
* @memberof CreateDocTemplateRequestDto
|
|
47
47
|
*/
|
|
48
48
|
'productSlug'?: string;
|
|
49
|
+
/**
|
|
50
|
+
* The filename of the document template as it appears when sent to customers.
|
|
51
|
+
* @type {string}
|
|
52
|
+
* @memberof CreateDocTemplateRequestDto
|
|
53
|
+
*/
|
|
54
|
+
'label'?: string;
|
|
49
55
|
}
|
|
@@ -41,6 +41,12 @@ export interface DocTemplateClass {
|
|
|
41
41
|
* @memberof DocTemplateClass
|
|
42
42
|
*/
|
|
43
43
|
'slug': string;
|
|
44
|
+
/**
|
|
45
|
+
* The filename of the document template as it appears when sent to customers.
|
|
46
|
+
* @type {string}
|
|
47
|
+
* @memberof DocTemplateClass
|
|
48
|
+
*/
|
|
49
|
+
'label'?: string;
|
|
44
50
|
/**
|
|
45
51
|
* Unique identifier referencing the layout.
|
|
46
52
|
* @type {number}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* EMIL DocumentService
|
|
3
|
+
* The EMIL DocumentService API description
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0
|
|
6
|
+
* Contact: kontakt@emil.de
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface GetProductDocumentDownloadUrlResponseClass
|
|
16
|
+
*/
|
|
17
|
+
export interface GetProductDocumentDownloadUrlResponseClass {
|
|
18
|
+
/**
|
|
19
|
+
* Pre-signed url for downloading product documents.
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof GetProductDocumentDownloadUrlResponseClass
|
|
22
|
+
*/
|
|
23
|
+
'url': string;
|
|
24
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* EMIL DocumentService
|
|
3
|
+
* The EMIL DocumentService API description
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0
|
|
6
|
+
* Contact: kontakt@emil.de
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import { CreateHtmlTemplateDto } from './create-html-template-dto';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface GrpcCreateDocTemplateRequestDto
|
|
17
|
+
*/
|
|
18
|
+
export interface GrpcCreateDocTemplateRequestDto {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof GrpcCreateDocTemplateRequestDto
|
|
23
|
+
*/
|
|
24
|
+
'name': string;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof GrpcCreateDocTemplateRequestDto
|
|
29
|
+
*/
|
|
30
|
+
'slug': string;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {number}
|
|
34
|
+
* @memberof GrpcCreateDocTemplateRequestDto
|
|
35
|
+
*/
|
|
36
|
+
'layoutId': number;
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {CreateHtmlTemplateDto}
|
|
40
|
+
* @memberof GrpcCreateDocTemplateRequestDto
|
|
41
|
+
*/
|
|
42
|
+
'bodyTemplate': CreateHtmlTemplateDto;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {string}
|
|
46
|
+
* @memberof GrpcCreateDocTemplateRequestDto
|
|
47
|
+
*/
|
|
48
|
+
'productSlug'?: string;
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @type {string}
|
|
52
|
+
* @memberof GrpcCreateDocTemplateRequestDto
|
|
53
|
+
*/
|
|
54
|
+
'label'?: string;
|
|
55
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* EMIL DocumentService
|
|
3
|
+
* The EMIL DocumentService API description
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0
|
|
6
|
+
* Contact: kontakt@emil.de
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import { CreateHtmlTemplateDto } from './create-html-template-dto';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface GrpcUpdateDocTemplateRequestDto
|
|
17
|
+
*/
|
|
18
|
+
export interface GrpcUpdateDocTemplateRequestDto {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof GrpcUpdateDocTemplateRequestDto
|
|
23
|
+
*/
|
|
24
|
+
'name': string;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof GrpcUpdateDocTemplateRequestDto
|
|
29
|
+
*/
|
|
30
|
+
'slug': string;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {number}
|
|
34
|
+
* @memberof GrpcUpdateDocTemplateRequestDto
|
|
35
|
+
*/
|
|
36
|
+
'layoutId': number;
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {CreateHtmlTemplateDto}
|
|
40
|
+
* @memberof GrpcUpdateDocTemplateRequestDto
|
|
41
|
+
*/
|
|
42
|
+
'bodyTemplate': CreateHtmlTemplateDto;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {string}
|
|
46
|
+
* @memberof GrpcUpdateDocTemplateRequestDto
|
|
47
|
+
*/
|
|
48
|
+
'productSlug'?: string;
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @type {string}
|
|
52
|
+
* @memberof GrpcUpdateDocTemplateRequestDto
|
|
53
|
+
*/
|
|
54
|
+
'label'?: string;
|
|
55
|
+
/**
|
|
56
|
+
*
|
|
57
|
+
* @type {number}
|
|
58
|
+
* @memberof GrpcUpdateDocTemplateRequestDto
|
|
59
|
+
*/
|
|
60
|
+
'id': number;
|
|
61
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
package/dist/models/index.d.ts
CHANGED
|
@@ -19,8 +19,11 @@ export * from './get-doc-template-response-class';
|
|
|
19
19
|
export * from './get-document-download-url-response-class';
|
|
20
20
|
export * from './get-layout-request-dto';
|
|
21
21
|
export * from './get-layout-response-class';
|
|
22
|
+
export * from './get-product-document-download-url-response-class';
|
|
22
23
|
export * from './get-product-document-response-class';
|
|
23
24
|
export * from './get-signed-s3-key-url-response-class';
|
|
25
|
+
export * from './grpc-create-doc-template-request-dto';
|
|
26
|
+
export * from './grpc-update-doc-template-request-dto';
|
|
24
27
|
export * from './html-template-class';
|
|
25
28
|
export * from './layout-class';
|
|
26
29
|
export * from './list-doc-template-request-dto';
|
package/dist/models/index.js
CHANGED
|
@@ -35,8 +35,11 @@ __exportStar(require("./get-doc-template-response-class"), exports);
|
|
|
35
35
|
__exportStar(require("./get-document-download-url-response-class"), exports);
|
|
36
36
|
__exportStar(require("./get-layout-request-dto"), exports);
|
|
37
37
|
__exportStar(require("./get-layout-response-class"), exports);
|
|
38
|
+
__exportStar(require("./get-product-document-download-url-response-class"), exports);
|
|
38
39
|
__exportStar(require("./get-product-document-response-class"), exports);
|
|
39
40
|
__exportStar(require("./get-signed-s3-key-url-response-class"), exports);
|
|
41
|
+
__exportStar(require("./grpc-create-doc-template-request-dto"), exports);
|
|
42
|
+
__exportStar(require("./grpc-update-doc-template-request-dto"), exports);
|
|
40
43
|
__exportStar(require("./html-template-class"), exports);
|
|
41
44
|
__exportStar(require("./layout-class"), exports);
|
|
42
45
|
__exportStar(require("./list-doc-template-request-dto"), exports);
|
|
@@ -63,6 +63,12 @@ export interface ProductDocumentClass {
|
|
|
63
63
|
* @memberof ProductDocumentClass
|
|
64
64
|
*/
|
|
65
65
|
'contentType': ProductDocumentClassContentTypeEnum;
|
|
66
|
+
/**
|
|
67
|
+
* Product Document entity type.
|
|
68
|
+
* @type {string}
|
|
69
|
+
* @memberof ProductDocumentClass
|
|
70
|
+
*/
|
|
71
|
+
'entityType': ProductDocumentClassEntityTypeEnum;
|
|
66
72
|
/**
|
|
67
73
|
* A slug is a human-readable, unique identifier, used to identify a resource instead of a less human-readable identifier like an id.
|
|
68
74
|
* @type {string}
|
|
@@ -97,3 +103,14 @@ export declare const ProductDocumentClassContentTypeEnum: {
|
|
|
97
103
|
readonly Avi: "AVI";
|
|
98
104
|
};
|
|
99
105
|
export type ProductDocumentClassContentTypeEnum = typeof ProductDocumentClassContentTypeEnum[keyof typeof ProductDocumentClassContentTypeEnum];
|
|
106
|
+
export declare const ProductDocumentClassEntityTypeEnum: {
|
|
107
|
+
readonly PolicyApplication: "policy_application";
|
|
108
|
+
readonly PolicyContract: "policy_contract";
|
|
109
|
+
readonly PolicyAddendum: "policy_addendum";
|
|
110
|
+
readonly InitialInvoice: "initial_invoice";
|
|
111
|
+
readonly CorrectionInvoice: "correction_invoice";
|
|
112
|
+
readonly RecurringInvoice: "recurring_invoice";
|
|
113
|
+
readonly SepaMandate: "sepa_mandate";
|
|
114
|
+
readonly Static: "static";
|
|
115
|
+
};
|
|
116
|
+
export type ProductDocumentClassEntityTypeEnum = typeof ProductDocumentClassEntityTypeEnum[keyof typeof ProductDocumentClassEntityTypeEnum];
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* Do not edit the class manually.
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.ProductDocumentClassContentTypeEnum = void 0;
|
|
16
|
+
exports.ProductDocumentClassEntityTypeEnum = exports.ProductDocumentClassContentTypeEnum = void 0;
|
|
17
17
|
exports.ProductDocumentClassContentTypeEnum = {
|
|
18
18
|
Pdf: 'pdf',
|
|
19
19
|
Jpg: 'jpg',
|
|
@@ -34,3 +34,13 @@ exports.ProductDocumentClassContentTypeEnum = {
|
|
|
34
34
|
Wmv: 'WMV',
|
|
35
35
|
Avi: 'AVI'
|
|
36
36
|
};
|
|
37
|
+
exports.ProductDocumentClassEntityTypeEnum = {
|
|
38
|
+
PolicyApplication: 'policy_application',
|
|
39
|
+
PolicyContract: 'policy_contract',
|
|
40
|
+
PolicyAddendum: 'policy_addendum',
|
|
41
|
+
InitialInvoice: 'initial_invoice',
|
|
42
|
+
CorrectionInvoice: 'correction_invoice',
|
|
43
|
+
RecurringInvoice: 'recurring_invoice',
|
|
44
|
+
SepaMandate: 'sepa_mandate',
|
|
45
|
+
Static: 'static'
|
|
46
|
+
};
|
|
@@ -46,6 +46,12 @@ export interface UpdateDocTemplateRequestDto {
|
|
|
46
46
|
* @memberof UpdateDocTemplateRequestDto
|
|
47
47
|
*/
|
|
48
48
|
'productSlug'?: string;
|
|
49
|
+
/**
|
|
50
|
+
* The filename of the document template as it appears when sent to customers.
|
|
51
|
+
* @type {string}
|
|
52
|
+
* @memberof UpdateDocTemplateRequestDto
|
|
53
|
+
*/
|
|
54
|
+
'label'?: string;
|
|
49
55
|
/**
|
|
50
56
|
* Internal unique identifier for the object. You should not have to use this, use code instead.
|
|
51
57
|
* @type {number}
|
|
@@ -45,6 +45,12 @@ export interface UploadProductDocumentRequestDto {
|
|
|
45
45
|
* @memberof UploadProductDocumentRequestDto
|
|
46
46
|
*/
|
|
47
47
|
'type': string;
|
|
48
|
+
/**
|
|
49
|
+
* Entity type of the product document.
|
|
50
|
+
* @type {string}
|
|
51
|
+
* @memberof UploadProductDocumentRequestDto
|
|
52
|
+
*/
|
|
53
|
+
'entityType': string;
|
|
48
54
|
/**
|
|
49
55
|
* Id of the product version, and is optional. If not provided, the document will be attached to the latest version of the product.
|
|
50
56
|
* @type {number}
|