@emilgroup/document-sdk 1.40.1-beta.1 → 1.40.1-beta.3
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 +2 -2
- package/api/documents-api.ts +124 -4
- package/base.ts +45 -1
- package/dist/api/default-api.js +5 -18
- package/dist/api/document-templates-api.js +17 -46
- package/dist/api/documents-api.d.ts +76 -10
- package/dist/api/documents-api.js +129 -71
- package/dist/api/docx-templates-api.js +20 -53
- package/dist/api/layouts-api.js +17 -46
- package/dist/api/product-documents-api.d.ts +3 -3
- package/dist/api/product-documents-api.js +17 -46
- package/dist/api/search-keywords-api.js +5 -18
- package/dist/api/searchable-document-owners-api.js +5 -18
- package/dist/api/searchable-documents-api.d.ts +3 -3
- package/dist/api/searchable-documents-api.js +5 -18
- package/dist/base.d.ts +10 -1
- package/dist/base.js +46 -6
- package/dist/common.d.ts +1 -1
- package/dist/common.js +2 -2
- package/dist/models/base64-metadata-class.d.ts +48 -0
- package/dist/models/base64-metadata-class.js +15 -0
- package/dist/models/convert-to-base64-request-dto.d.ts +30 -0
- package/dist/models/convert-to-base64-request-dto.js +15 -0
- package/dist/models/convert-to-base64-response-class.d.ts +37 -0
- package/dist/models/convert-to-base64-response-class.js +15 -0
- package/dist/models/index.d.ts +3 -0
- package/dist/models/index.js +3 -0
- package/models/base64-metadata-class.ts +54 -0
- package/models/convert-to-base64-request-dto.ts +36 -0
- package/models/convert-to-base64-response-class.ts +43 -0
- package/models/index.ts +3 -0
- package/package.json +3 -3
|
@@ -48,8 +48,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
48
48
|
});
|
|
49
49
|
};
|
|
50
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
|
|
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
53
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
54
54
|
function step(op) {
|
|
55
55
|
if (f) throw new TypeError("Generator is already executing.");
|
|
@@ -74,15 +74,6 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
74
74
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
75
75
|
}
|
|
76
76
|
};
|
|
77
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
78
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
79
|
-
if (ar || !(i in from)) {
|
|
80
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
81
|
-
ar[i] = from[i];
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
85
|
-
};
|
|
86
77
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
87
78
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
88
79
|
};
|
|
@@ -110,14 +101,10 @@ var ProductDocumentsApiAxiosParamCreator = function (configuration) {
|
|
|
110
101
|
* @param {*} [options] Override http request option.
|
|
111
102
|
* @throws {RequiredError}
|
|
112
103
|
*/
|
|
113
|
-
deleteProductDocument: function (
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
args_1[_i - 3] = arguments[_i];
|
|
117
|
-
}
|
|
118
|
-
return __awaiter(_this, __spreadArray([code_1, productSlug_1, authorization_1], args_1, true), void 0, function (code, productSlug, authorization, options) {
|
|
104
|
+
deleteProductDocument: function (code, productSlug, authorization, options) {
|
|
105
|
+
if (options === void 0) { options = {}; }
|
|
106
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
119
107
|
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
120
|
-
if (options === void 0) { options = {}; }
|
|
121
108
|
return __generator(this, function (_a) {
|
|
122
109
|
switch (_a.label) {
|
|
123
110
|
case 0:
|
|
@@ -167,14 +154,10 @@ var ProductDocumentsApiAxiosParamCreator = function (configuration) {
|
|
|
167
154
|
* @param {*} [options] Override http request option.
|
|
168
155
|
* @throws {RequiredError}
|
|
169
156
|
*/
|
|
170
|
-
downloadProductDocument: function (
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
args_1[_i - 4] = arguments[_i];
|
|
174
|
-
}
|
|
175
|
-
return __awaiter(_this, __spreadArray([productSlug_1, code_1, authorization_1, contentDisposition_1], args_1, true), void 0, function (productSlug, code, authorization, contentDisposition, options) {
|
|
157
|
+
downloadProductDocument: function (productSlug, code, authorization, contentDisposition, options) {
|
|
158
|
+
if (options === void 0) { options = {}; }
|
|
159
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
176
160
|
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
177
|
-
if (options === void 0) { options = {}; }
|
|
178
161
|
return __generator(this, function (_a) {
|
|
179
162
|
switch (_a.label) {
|
|
180
163
|
case 0:
|
|
@@ -226,14 +209,10 @@ var ProductDocumentsApiAxiosParamCreator = function (configuration) {
|
|
|
226
209
|
* @param {*} [options] Override http request option.
|
|
227
210
|
* @throws {RequiredError}
|
|
228
211
|
*/
|
|
229
|
-
getProductDocument: function (
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
args_1[_i - 3] = arguments[_i];
|
|
233
|
-
}
|
|
234
|
-
return __awaiter(_this, __spreadArray([productSlug_1, code_1, authorization_1], args_1, true), void 0, function (productSlug, code, authorization, options) {
|
|
212
|
+
getProductDocument: function (productSlug, code, authorization, options) {
|
|
213
|
+
if (options === void 0) { options = {}; }
|
|
214
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
235
215
|
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
236
|
-
if (options === void 0) { options = {}; }
|
|
237
216
|
return __generator(this, function (_a) {
|
|
238
217
|
switch (_a.label) {
|
|
239
218
|
case 0:
|
|
@@ -288,14 +267,10 @@ var ProductDocumentsApiAxiosParamCreator = function (configuration) {
|
|
|
288
267
|
* @param {*} [options] Override http request option.
|
|
289
268
|
* @throws {RequiredError}
|
|
290
269
|
*/
|
|
291
|
-
listProductDocuments: function (
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
args_1[_i - 9] = arguments[_i];
|
|
295
|
-
}
|
|
296
|
-
return __awaiter(_this, __spreadArray([productSlug_1, authorization_1, pageSize_1, pageToken_1, filter_1, search_1, order_1, expand_1, filters_1], args_1, true), void 0, function (productSlug, authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
|
|
270
|
+
listProductDocuments: function (productSlug, authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
|
|
271
|
+
if (options === void 0) { options = {}; }
|
|
272
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
297
273
|
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
298
|
-
if (options === void 0) { options = {}; }
|
|
299
274
|
return __generator(this, function (_a) {
|
|
300
275
|
switch (_a.label) {
|
|
301
276
|
case 0:
|
|
@@ -362,14 +337,10 @@ var ProductDocumentsApiAxiosParamCreator = function (configuration) {
|
|
|
362
337
|
* @param {*} [options] Override http request option.
|
|
363
338
|
* @throws {RequiredError}
|
|
364
339
|
*/
|
|
365
|
-
uploadProductDocument: function (
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
args_1[_i - 3] = arguments[_i];
|
|
369
|
-
}
|
|
370
|
-
return __awaiter(_this, __spreadArray([productSlug_1, uploadProductDocumentRequestDto_1, authorization_1], args_1, true), void 0, function (productSlug, uploadProductDocumentRequestDto, authorization, options) {
|
|
340
|
+
uploadProductDocument: function (productSlug, uploadProductDocumentRequestDto, authorization, options) {
|
|
341
|
+
if (options === void 0) { options = {}; }
|
|
342
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
371
343
|
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
372
|
-
if (options === void 0) { options = {}; }
|
|
373
344
|
return __generator(this, function (_a) {
|
|
374
345
|
switch (_a.label) {
|
|
375
346
|
case 0:
|
|
@@ -48,8 +48,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
48
48
|
});
|
|
49
49
|
};
|
|
50
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
|
|
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
53
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
54
54
|
function step(op) {
|
|
55
55
|
if (f) throw new TypeError("Generator is already executing.");
|
|
@@ -74,15 +74,6 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
74
74
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
75
75
|
}
|
|
76
76
|
};
|
|
77
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
78
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
79
|
-
if (ar || !(i in from)) {
|
|
80
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
81
|
-
ar[i] = from[i];
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
85
|
-
};
|
|
86
77
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
87
78
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
88
79
|
};
|
|
@@ -109,14 +100,10 @@ var SearchKeywordsApiAxiosParamCreator = function (configuration) {
|
|
|
109
100
|
* @param {*} [options] Override http request option.
|
|
110
101
|
* @throws {RequiredError}
|
|
111
102
|
*/
|
|
112
|
-
listSearchKeywords: function (
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
args_1[_i - 2] = arguments[_i];
|
|
116
|
-
}
|
|
117
|
-
return __awaiter(_this, __spreadArray([searchText_1, authorization_1], args_1, true), void 0, function (searchText, authorization, options) {
|
|
103
|
+
listSearchKeywords: function (searchText, authorization, options) {
|
|
104
|
+
if (options === void 0) { options = {}; }
|
|
105
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
118
106
|
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
119
|
-
if (options === void 0) { options = {}; }
|
|
120
107
|
return __generator(this, function (_a) {
|
|
121
108
|
switch (_a.label) {
|
|
122
109
|
case 0:
|
|
@@ -48,8 +48,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
48
48
|
});
|
|
49
49
|
};
|
|
50
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
|
|
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
53
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
54
54
|
function step(op) {
|
|
55
55
|
if (f) throw new TypeError("Generator is already executing.");
|
|
@@ -74,15 +74,6 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
74
74
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
75
75
|
}
|
|
76
76
|
};
|
|
77
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
78
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
79
|
-
if (ar || !(i in from)) {
|
|
80
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
81
|
-
ar[i] = from[i];
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
85
|
-
};
|
|
86
77
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
87
78
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
88
79
|
};
|
|
@@ -115,14 +106,10 @@ var SearchableDocumentOwnersApiAxiosParamCreator = function (configuration) {
|
|
|
115
106
|
* @param {*} [options] Override http request option.
|
|
116
107
|
* @throws {RequiredError}
|
|
117
108
|
*/
|
|
118
|
-
listSearchableDocumentOwners: function (
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
args_1[_i - 8] = arguments[_i];
|
|
122
|
-
}
|
|
123
|
-
return __awaiter(_this, __spreadArray([authorization_1, pageSize_1, pageToken_1, filter_1, search_1, order_1, expand_1, filters_1], args_1, true), void 0, function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
|
|
109
|
+
listSearchableDocumentOwners: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
|
|
110
|
+
if (options === void 0) { options = {}; }
|
|
111
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
124
112
|
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
125
|
-
if (options === void 0) { options = {}; }
|
|
126
113
|
return __generator(this, function (_a) {
|
|
127
114
|
switch (_a.label) {
|
|
128
115
|
case 0:
|
|
@@ -28,7 +28,7 @@ export declare const SearchableDocumentsApiAxiosParamCreator: (configuration?: C
|
|
|
28
28
|
* @param {*} [options] Override http request option.
|
|
29
29
|
* @throws {RequiredError}
|
|
30
30
|
*/
|
|
31
|
-
listSearchableDocuments: (searchText: string, ownerIds: string, authorization?: string, product?:
|
|
31
|
+
listSearchableDocuments: (searchText: string, ownerIds: string, authorization?: string, product?: 'car' | 'homeowner' | 'household' | 'privateLiability', options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
32
32
|
};
|
|
33
33
|
/**
|
|
34
34
|
* SearchableDocumentsApi - functional programming interface
|
|
@@ -45,7 +45,7 @@ export declare const SearchableDocumentsApiFp: (configuration?: Configuration) =
|
|
|
45
45
|
* @param {*} [options] Override http request option.
|
|
46
46
|
* @throws {RequiredError}
|
|
47
47
|
*/
|
|
48
|
-
listSearchableDocuments(searchText: string, ownerIds: string, authorization?: string, product?:
|
|
48
|
+
listSearchableDocuments(searchText: string, ownerIds: string, authorization?: string, product?: 'car' | 'homeowner' | 'household' | 'privateLiability', options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListSearchableDocumentsResponseClass>>;
|
|
49
49
|
};
|
|
50
50
|
/**
|
|
51
51
|
* SearchableDocumentsApi - factory interface
|
|
@@ -62,7 +62,7 @@ export declare const SearchableDocumentsApiFactory: (configuration?: Configurati
|
|
|
62
62
|
* @param {*} [options] Override http request option.
|
|
63
63
|
* @throws {RequiredError}
|
|
64
64
|
*/
|
|
65
|
-
listSearchableDocuments(searchText: string, ownerIds: string, authorization?: string, product?:
|
|
65
|
+
listSearchableDocuments(searchText: string, ownerIds: string, authorization?: string, product?: 'car' | 'homeowner' | 'household' | 'privateLiability', options?: any): AxiosPromise<ListSearchableDocumentsResponseClass>;
|
|
66
66
|
};
|
|
67
67
|
/**
|
|
68
68
|
* Request parameters for listSearchableDocuments operation in SearchableDocumentsApi.
|
|
@@ -48,8 +48,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
48
48
|
});
|
|
49
49
|
};
|
|
50
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
|
|
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
53
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
54
54
|
function step(op) {
|
|
55
55
|
if (f) throw new TypeError("Generator is already executing.");
|
|
@@ -74,15 +74,6 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
74
74
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
75
75
|
}
|
|
76
76
|
};
|
|
77
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
78
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
79
|
-
if (ar || !(i in from)) {
|
|
80
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
81
|
-
ar[i] = from[i];
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
85
|
-
};
|
|
86
77
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
87
78
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
88
79
|
};
|
|
@@ -111,14 +102,10 @@ var SearchableDocumentsApiAxiosParamCreator = function (configuration) {
|
|
|
111
102
|
* @param {*} [options] Override http request option.
|
|
112
103
|
* @throws {RequiredError}
|
|
113
104
|
*/
|
|
114
|
-
listSearchableDocuments: function (
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
args_1[_i - 4] = arguments[_i];
|
|
118
|
-
}
|
|
119
|
-
return __awaiter(_this, __spreadArray([searchText_1, ownerIds_1, authorization_1, product_1], args_1, true), void 0, function (searchText, ownerIds, authorization, product, options) {
|
|
105
|
+
listSearchableDocuments: function (searchText, ownerIds, authorization, product, options) {
|
|
106
|
+
if (options === void 0) { options = {}; }
|
|
107
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
120
108
|
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
121
|
-
if (options === void 0) { options = {}; }
|
|
122
109
|
return __generator(this, function (_a) {
|
|
123
110
|
switch (_a.label) {
|
|
124
111
|
case 0:
|
package/dist/base.d.ts
CHANGED
|
@@ -26,6 +26,14 @@ export interface LoginClass {
|
|
|
26
26
|
accessToken: string;
|
|
27
27
|
permissions: string;
|
|
28
28
|
}
|
|
29
|
+
export interface SwitchWorkspaceRequest {
|
|
30
|
+
username: string;
|
|
31
|
+
targetWorkspace: string;
|
|
32
|
+
}
|
|
33
|
+
export interface SwitchWorkspaceResponseClass {
|
|
34
|
+
accessToken: string;
|
|
35
|
+
permissions: string;
|
|
36
|
+
}
|
|
29
37
|
export declare enum Environment {
|
|
30
38
|
Production = "https://apiv2.emil.de",
|
|
31
39
|
Test = "https://apiv2-test.emil.de",
|
|
@@ -57,7 +65,8 @@ export declare class BaseAPI {
|
|
|
57
65
|
selectEnvironment(env: Environment): void;
|
|
58
66
|
selectBasePath(path: string): void;
|
|
59
67
|
getPermissions(): Array<string>;
|
|
60
|
-
authorize(username: string, password: string): Promise<void>;
|
|
68
|
+
authorize(username: string, password: string, targetWorkspace?: string): Promise<void>;
|
|
69
|
+
switchWorkspace(targetWorkspace: string): Promise<void>;
|
|
61
70
|
refreshTokenInternal(): Promise<LoginClass>;
|
|
62
71
|
private storeTokenData;
|
|
63
72
|
loadTokenData(): void;
|
package/dist/base.js
CHANGED
|
@@ -48,8 +48,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
48
48
|
});
|
|
49
49
|
};
|
|
50
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
|
|
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
53
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
54
54
|
function step(op) {
|
|
55
55
|
if (f) throw new TypeError("Generator is already executing.");
|
|
@@ -78,8 +78,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
78
78
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
79
79
|
};
|
|
80
80
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
81
|
-
exports.RequiredError = exports.BaseAPI = exports.Environment = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0;
|
|
82
|
-
exports.resetRetry = resetRetry;
|
|
81
|
+
exports.RequiredError = exports.BaseAPI = exports.resetRetry = exports.Environment = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0;
|
|
83
82
|
var configuration_1 = require("./configuration");
|
|
84
83
|
var common_1 = require("./common");
|
|
85
84
|
// Some imports not used depending on template conditions
|
|
@@ -103,12 +102,13 @@ var Environment;
|
|
|
103
102
|
Environment["Staging"] = "https://apiv2-staging.emil.de";
|
|
104
103
|
Environment["Development"] = "https://apiv2-dev.emil.de";
|
|
105
104
|
Environment["ProductionZurich"] = "https://eu-central-2.apiv2.emil.de";
|
|
106
|
-
})(Environment
|
|
105
|
+
})(Environment = exports.Environment || (exports.Environment = {}));
|
|
107
106
|
var _retry_count = 0;
|
|
108
107
|
var _retry = null;
|
|
109
108
|
function resetRetry() {
|
|
110
109
|
_retry_count = 0;
|
|
111
110
|
}
|
|
111
|
+
exports.resetRetry = resetRetry;
|
|
112
112
|
var NETWORK_ERROR_MESSAGE = "Network Error";
|
|
113
113
|
var TOKEN_DATA = 'APP_TOKEN';
|
|
114
114
|
/**
|
|
@@ -151,7 +151,7 @@ var BaseAPI = /** @class */ (function () {
|
|
|
151
151
|
}
|
|
152
152
|
return this.tokenData.permissions.split(',');
|
|
153
153
|
};
|
|
154
|
-
BaseAPI.prototype.authorize = function (username, password) {
|
|
154
|
+
BaseAPI.prototype.authorize = function (username, password, targetWorkspace) {
|
|
155
155
|
return __awaiter(this, void 0, void 0, function () {
|
|
156
156
|
var options, response, _a, accessToken, permissions;
|
|
157
157
|
return __generator(this, function (_b) {
|
|
@@ -176,6 +176,46 @@ var BaseAPI = /** @class */ (function () {
|
|
|
176
176
|
this.tokenData.username = username;
|
|
177
177
|
this.tokenData.accessToken = accessToken;
|
|
178
178
|
this.tokenData.permissions = permissions;
|
|
179
|
+
if (!targetWorkspace) return [3 /*break*/, 3];
|
|
180
|
+
return [4 /*yield*/, this.switchWorkspace(targetWorkspace)];
|
|
181
|
+
case 2:
|
|
182
|
+
_b.sent();
|
|
183
|
+
return [3 /*break*/, 4];
|
|
184
|
+
case 3:
|
|
185
|
+
// Only store if no workspace switch (since switchWorkspace will store after switching)
|
|
186
|
+
this.storeTokenData(__assign({}, this.tokenData));
|
|
187
|
+
_b.label = 4;
|
|
188
|
+
case 4: return [2 /*return*/];
|
|
189
|
+
}
|
|
190
|
+
});
|
|
191
|
+
});
|
|
192
|
+
};
|
|
193
|
+
BaseAPI.prototype.switchWorkspace = function (targetWorkspace) {
|
|
194
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
195
|
+
var options, response, _a, accessToken, permissions;
|
|
196
|
+
return __generator(this, function (_b) {
|
|
197
|
+
switch (_b.label) {
|
|
198
|
+
case 0:
|
|
199
|
+
options = {
|
|
200
|
+
method: 'POST',
|
|
201
|
+
url: "".concat(this.configuration.basePath, "/authservice/v1/workspaces/switch"),
|
|
202
|
+
headers: {
|
|
203
|
+
'Content-Type': 'application/json',
|
|
204
|
+
'Authorization': "Bearer ".concat(this.configuration.accessToken),
|
|
205
|
+
},
|
|
206
|
+
data: {
|
|
207
|
+
username: this.configuration.username,
|
|
208
|
+
targetWorkspace: targetWorkspace,
|
|
209
|
+
},
|
|
210
|
+
withCredentials: true,
|
|
211
|
+
};
|
|
212
|
+
return [4 /*yield*/, axios_1.default.request(options)];
|
|
213
|
+
case 1:
|
|
214
|
+
response = _b.sent();
|
|
215
|
+
_a = response.data, accessToken = _a.accessToken, permissions = _a.permissions;
|
|
216
|
+
this.configuration.accessToken = "Bearer ".concat(accessToken);
|
|
217
|
+
this.tokenData.accessToken = accessToken;
|
|
218
|
+
this.tokenData.permissions = permissions;
|
|
179
219
|
this.storeTokenData(__assign({}, this.tokenData));
|
|
180
220
|
return [2 /*return*/];
|
|
181
221
|
}
|
package/dist/common.d.ts
CHANGED
|
@@ -62,7 +62,7 @@ export declare const toPathString: (url: URL) => string;
|
|
|
62
62
|
*
|
|
63
63
|
* @export
|
|
64
64
|
*/
|
|
65
|
-
export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) => <T = unknown, R = AxiosResponse<T>>(axios?: AxiosInstance, basePath?: string) => Promise<R>;
|
|
65
|
+
export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) => <T = unknown, R = AxiosResponse<T, any>>(axios?: AxiosInstance, basePath?: string) => Promise<R>;
|
|
66
66
|
/**
|
|
67
67
|
* EMIL DocumentService
|
|
68
68
|
* The EMIL DocumentService API description
|
package/dist/common.js
CHANGED
|
@@ -33,8 +33,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
33
33
|
});
|
|
34
34
|
};
|
|
35
35
|
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
36
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g
|
|
37
|
-
return g
|
|
36
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
37
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
38
38
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
39
39
|
function step(op) {
|
|
40
40
|
if (f) throw new TypeError("Generator is already executing.");
|
|
@@ -0,0 +1,48 @@
|
|
|
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 Base64MetadataClass
|
|
16
|
+
*/
|
|
17
|
+
export interface Base64MetadataClass {
|
|
18
|
+
/**
|
|
19
|
+
* Original file size in bytes
|
|
20
|
+
* @type {number}
|
|
21
|
+
* @memberof Base64MetadataClass
|
|
22
|
+
*/
|
|
23
|
+
'originalSize': number;
|
|
24
|
+
/**
|
|
25
|
+
* Compressed file size in bytes (if compression was applied)
|
|
26
|
+
* @type {number}
|
|
27
|
+
* @memberof Base64MetadataClass
|
|
28
|
+
*/
|
|
29
|
+
'compressedSize': number;
|
|
30
|
+
/**
|
|
31
|
+
* Encoding type applied
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof Base64MetadataClass
|
|
34
|
+
*/
|
|
35
|
+
'encoding': string;
|
|
36
|
+
/**
|
|
37
|
+
* MIME type of the original document
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof Base64MetadataClass
|
|
40
|
+
*/
|
|
41
|
+
'mimeType': string;
|
|
42
|
+
/**
|
|
43
|
+
* Whether compression was applied
|
|
44
|
+
* @type {boolean}
|
|
45
|
+
* @memberof Base64MetadataClass
|
|
46
|
+
*/
|
|
47
|
+
'compressed': boolean;
|
|
48
|
+
}
|
|
@@ -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,30 @@
|
|
|
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 ConvertToBase64RequestDto
|
|
16
|
+
*/
|
|
17
|
+
export interface ConvertToBase64RequestDto {
|
|
18
|
+
/**
|
|
19
|
+
* Whether to compress the document before base64 encoding
|
|
20
|
+
* @type {boolean}
|
|
21
|
+
* @memberof ConvertToBase64RequestDto
|
|
22
|
+
*/
|
|
23
|
+
'compress'?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Whether to use streaming base64 encoding (memory efficient for large files)
|
|
26
|
+
* @type {boolean}
|
|
27
|
+
* @memberof ConvertToBase64RequestDto
|
|
28
|
+
*/
|
|
29
|
+
'stream'?: boolean;
|
|
30
|
+
}
|
|
@@ -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,37 @@
|
|
|
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 { Base64MetadataClass } from './base64-metadata-class';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface ConvertToBase64ResponseClass
|
|
17
|
+
*/
|
|
18
|
+
export interface ConvertToBase64ResponseClass {
|
|
19
|
+
/**
|
|
20
|
+
* Unique document code
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof ConvertToBase64ResponseClass
|
|
23
|
+
*/
|
|
24
|
+
'documentCode': string;
|
|
25
|
+
/**
|
|
26
|
+
* Base64 encoded content of the document
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof ConvertToBase64ResponseClass
|
|
29
|
+
*/
|
|
30
|
+
'base64Content': string;
|
|
31
|
+
/**
|
|
32
|
+
* Metadata about the conversion
|
|
33
|
+
* @type {Base64MetadataClass}
|
|
34
|
+
* @memberof ConvertToBase64ResponseClass
|
|
35
|
+
*/
|
|
36
|
+
'metadata': Base64MetadataClass;
|
|
37
|
+
}
|
|
@@ -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
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
export * from './base64-metadata-class';
|
|
2
|
+
export * from './convert-to-base64-request-dto';
|
|
3
|
+
export * from './convert-to-base64-response-class';
|
|
1
4
|
export * from './create-doc-template-request-dto';
|
|
2
5
|
export * from './create-doc-template-response-class';
|
|
3
6
|
export * from './create-document-request-dto';
|
package/dist/models/index.js
CHANGED
|
@@ -14,6 +14,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./base64-metadata-class"), exports);
|
|
18
|
+
__exportStar(require("./convert-to-base64-request-dto"), exports);
|
|
19
|
+
__exportStar(require("./convert-to-base64-response-class"), exports);
|
|
17
20
|
__exportStar(require("./create-doc-template-request-dto"), exports);
|
|
18
21
|
__exportStar(require("./create-doc-template-response-class"), exports);
|
|
19
22
|
__exportStar(require("./create-document-request-dto"), exports);
|