@emilgroup/customer-sdk-node 1.9.0-beta.0 → 1.9.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 -2
- package/README.md +2 -2
- package/api/customers-api.ts +85 -0
- package/api/policies-api.ts +128 -4
- package/api/products-api.ts +357 -0
- package/api.ts +2 -0
- package/dist/api/customers-api.d.ts +47 -0
- package/dist/api/customers-api.js +76 -0
- package/dist/api/policies-api.d.ts +77 -4
- package/dist/api/policies-api.js +97 -3
- package/dist/api/products-api.d.ts +215 -0
- package/dist/api/products-api.js +341 -0
- package/dist/api.d.ts +1 -0
- package/dist/api.js +1 -0
- package/dist/models/{shared-customer-product-class.d.ts → customer-product-class.d.ts} +8 -8
- package/dist/models/{shared-customer-product-class.js → customer-product-class.js} +0 -0
- package/dist/models/get-product-response-class.d.ts +25 -0
- package/dist/models/{to-grpc-customer-product-class.js → get-product-response-class.js} +0 -0
- package/dist/models/index.d.ts +2 -2
- package/dist/models/index.js +2 -2
- package/dist/models/list-policies-response-class.d.ts +4 -4
- package/dist/models/policy-class.d.ts +3 -3
- package/models/{shared-customer-product-class.ts → customer-product-class.ts} +8 -8
- package/models/get-product-response-class.ts +31 -0
- package/models/index.ts +2 -2
- package/models/list-policies-response-class.ts +4 -4
- package/models/policy-class.ts +3 -3
- package/package.json +1 -1
- package/dist/models/to-grpc-customer-product-class.d.ts +0 -54
- package/models/to-grpc-customer-product-class.ts +0 -60
|
@@ -0,0 +1,341 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* EMIL CustomerService
|
|
6
|
+
* The EMIL CustomerService 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.ProductsApi = exports.ProductsApiFactory = exports.ProductsApiFp = exports.ProductsApiAxiosParamCreator = 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
|
+
* ProductsApi - axios parameter creator
|
|
94
|
+
* @export
|
|
95
|
+
*/
|
|
96
|
+
var ProductsApiAxiosParamCreator = function (configuration) {
|
|
97
|
+
var _this = this;
|
|
98
|
+
return {
|
|
99
|
+
/**
|
|
100
|
+
* Get detailed product that a customer can insure; the details can be expanded using expand query parameter.
|
|
101
|
+
* @summary Get product details
|
|
102
|
+
* @param {string} productCode The product code.
|
|
103
|
+
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
|
|
104
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
105
|
+
* @param {*} [options] Override http request option.
|
|
106
|
+
* @throws {RequiredError}
|
|
107
|
+
*/
|
|
108
|
+
getProduct: function (productCode, customerCode, authorization, options) {
|
|
109
|
+
if (options === void 0) { options = {}; }
|
|
110
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
111
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
112
|
+
return __generator(this, function (_a) {
|
|
113
|
+
// verify required parameter 'productCode' is not null or undefined
|
|
114
|
+
(0, common_1.assertParamExists)('getProduct', 'productCode', productCode);
|
|
115
|
+
// verify required parameter 'customerCode' is not null or undefined
|
|
116
|
+
(0, common_1.assertParamExists)('getProduct', 'customerCode', customerCode);
|
|
117
|
+
localVarPath = "/v1/customers/{customerCode}/products/{productCode}"
|
|
118
|
+
.replace("{".concat("productCode", "}"), encodeURIComponent(String(productCode)))
|
|
119
|
+
.replace("{".concat("customerCode", "}"), encodeURIComponent(String(customerCode)));
|
|
120
|
+
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
121
|
+
if (configuration) {
|
|
122
|
+
baseOptions = configuration.baseOptions;
|
|
123
|
+
baseAccessToken = configuration.accessToken;
|
|
124
|
+
}
|
|
125
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
126
|
+
localVarHeaderParameter = {};
|
|
127
|
+
localVarQueryParameter = {};
|
|
128
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
129
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
130
|
+
}
|
|
131
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
132
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
133
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
134
|
+
return [2 /*return*/, {
|
|
135
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
136
|
+
options: localVarRequestOptions,
|
|
137
|
+
}];
|
|
138
|
+
});
|
|
139
|
+
});
|
|
140
|
+
},
|
|
141
|
+
/**
|
|
142
|
+
* List all the products that a customer can insure, the products can be filtered by product code, product number.
|
|
143
|
+
* @summary List products available to insure for a customer
|
|
144
|
+
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
|
|
145
|
+
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
|
|
146
|
+
* @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
147
|
+
* @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
148
|
+
* @param {any} [search] Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
|
|
149
|
+
* @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
|
|
150
|
+
* @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
|
|
151
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
152
|
+
* @param {*} [options] Override http request option.
|
|
153
|
+
* @throws {RequiredError}
|
|
154
|
+
*/
|
|
155
|
+
listProducts: function (customerCode, pageSize, pageToken, filter, search, order, expand, authorization, options) {
|
|
156
|
+
if (options === void 0) { options = {}; }
|
|
157
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
158
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
159
|
+
return __generator(this, function (_a) {
|
|
160
|
+
// verify required parameter 'customerCode' is not null or undefined
|
|
161
|
+
(0, common_1.assertParamExists)('listProducts', 'customerCode', customerCode);
|
|
162
|
+
localVarPath = "/v1/customers/{customerCode}/products"
|
|
163
|
+
.replace("{".concat("customerCode", "}"), encodeURIComponent(String(customerCode)));
|
|
164
|
+
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
165
|
+
if (configuration) {
|
|
166
|
+
baseOptions = configuration.baseOptions;
|
|
167
|
+
baseAccessToken = configuration.accessToken;
|
|
168
|
+
}
|
|
169
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
170
|
+
localVarHeaderParameter = {};
|
|
171
|
+
localVarQueryParameter = {};
|
|
172
|
+
if (pageSize !== undefined) {
|
|
173
|
+
localVarQueryParameter['pageSize'] = pageSize;
|
|
174
|
+
}
|
|
175
|
+
if (pageToken !== undefined) {
|
|
176
|
+
localVarQueryParameter['pageToken'] = pageToken;
|
|
177
|
+
}
|
|
178
|
+
if (filter !== undefined) {
|
|
179
|
+
localVarQueryParameter['filter'] = filter;
|
|
180
|
+
}
|
|
181
|
+
if (search !== undefined) {
|
|
182
|
+
localVarQueryParameter['search'] = search;
|
|
183
|
+
}
|
|
184
|
+
if (order !== undefined) {
|
|
185
|
+
localVarQueryParameter['order'] = order;
|
|
186
|
+
}
|
|
187
|
+
if (expand !== undefined) {
|
|
188
|
+
localVarQueryParameter['expand'] = expand;
|
|
189
|
+
}
|
|
190
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
191
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
192
|
+
}
|
|
193
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
194
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
195
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
196
|
+
return [2 /*return*/, {
|
|
197
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
198
|
+
options: localVarRequestOptions,
|
|
199
|
+
}];
|
|
200
|
+
});
|
|
201
|
+
});
|
|
202
|
+
},
|
|
203
|
+
};
|
|
204
|
+
};
|
|
205
|
+
exports.ProductsApiAxiosParamCreator = ProductsApiAxiosParamCreator;
|
|
206
|
+
/**
|
|
207
|
+
* ProductsApi - functional programming interface
|
|
208
|
+
* @export
|
|
209
|
+
*/
|
|
210
|
+
var ProductsApiFp = function (configuration) {
|
|
211
|
+
var localVarAxiosParamCreator = (0, exports.ProductsApiAxiosParamCreator)(configuration);
|
|
212
|
+
return {
|
|
213
|
+
/**
|
|
214
|
+
* Get detailed product that a customer can insure; the details can be expanded using expand query parameter.
|
|
215
|
+
* @summary Get product details
|
|
216
|
+
* @param {string} productCode The product code.
|
|
217
|
+
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
|
|
218
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
219
|
+
* @param {*} [options] Override http request option.
|
|
220
|
+
* @throws {RequiredError}
|
|
221
|
+
*/
|
|
222
|
+
getProduct: function (productCode, customerCode, authorization, options) {
|
|
223
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
224
|
+
var localVarAxiosArgs;
|
|
225
|
+
return __generator(this, function (_a) {
|
|
226
|
+
switch (_a.label) {
|
|
227
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.getProduct(productCode, customerCode, authorization, options)];
|
|
228
|
+
case 1:
|
|
229
|
+
localVarAxiosArgs = _a.sent();
|
|
230
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
231
|
+
}
|
|
232
|
+
});
|
|
233
|
+
});
|
|
234
|
+
},
|
|
235
|
+
/**
|
|
236
|
+
* List all the products that a customer can insure, the products can be filtered by product code, product number.
|
|
237
|
+
* @summary List products available to insure for a customer
|
|
238
|
+
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
|
|
239
|
+
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
|
|
240
|
+
* @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
241
|
+
* @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
242
|
+
* @param {any} [search] Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
|
|
243
|
+
* @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
|
|
244
|
+
* @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
|
|
245
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
246
|
+
* @param {*} [options] Override http request option.
|
|
247
|
+
* @throws {RequiredError}
|
|
248
|
+
*/
|
|
249
|
+
listProducts: function (customerCode, pageSize, pageToken, filter, search, order, expand, authorization, options) {
|
|
250
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
251
|
+
var localVarAxiosArgs;
|
|
252
|
+
return __generator(this, function (_a) {
|
|
253
|
+
switch (_a.label) {
|
|
254
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.listProducts(customerCode, pageSize, pageToken, filter, search, order, expand, authorization, options)];
|
|
255
|
+
case 1:
|
|
256
|
+
localVarAxiosArgs = _a.sent();
|
|
257
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
258
|
+
}
|
|
259
|
+
});
|
|
260
|
+
});
|
|
261
|
+
},
|
|
262
|
+
};
|
|
263
|
+
};
|
|
264
|
+
exports.ProductsApiFp = ProductsApiFp;
|
|
265
|
+
/**
|
|
266
|
+
* ProductsApi - factory interface
|
|
267
|
+
* @export
|
|
268
|
+
*/
|
|
269
|
+
var ProductsApiFactory = function (configuration, basePath, axios) {
|
|
270
|
+
var localVarFp = (0, exports.ProductsApiFp)(configuration);
|
|
271
|
+
return {
|
|
272
|
+
/**
|
|
273
|
+
* Get detailed product that a customer can insure; the details can be expanded using expand query parameter.
|
|
274
|
+
* @summary Get product details
|
|
275
|
+
* @param {string} productCode The product code.
|
|
276
|
+
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
|
|
277
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
278
|
+
* @param {*} [options] Override http request option.
|
|
279
|
+
* @throws {RequiredError}
|
|
280
|
+
*/
|
|
281
|
+
getProduct: function (productCode, customerCode, authorization, options) {
|
|
282
|
+
return localVarFp.getProduct(productCode, customerCode, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
283
|
+
},
|
|
284
|
+
/**
|
|
285
|
+
* List all the products that a customer can insure, the products can be filtered by product code, product number.
|
|
286
|
+
* @summary List products available to insure for a customer
|
|
287
|
+
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
|
|
288
|
+
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
|
|
289
|
+
* @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
290
|
+
* @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
291
|
+
* @param {any} [search] Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
|
|
292
|
+
* @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
|
|
293
|
+
* @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
|
|
294
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
295
|
+
* @param {*} [options] Override http request option.
|
|
296
|
+
* @throws {RequiredError}
|
|
297
|
+
*/
|
|
298
|
+
listProducts: function (customerCode, pageSize, pageToken, filter, search, order, expand, authorization, options) {
|
|
299
|
+
return localVarFp.listProducts(customerCode, pageSize, pageToken, filter, search, order, expand, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
300
|
+
},
|
|
301
|
+
};
|
|
302
|
+
};
|
|
303
|
+
exports.ProductsApiFactory = ProductsApiFactory;
|
|
304
|
+
/**
|
|
305
|
+
* ProductsApi - object-oriented interface
|
|
306
|
+
* @export
|
|
307
|
+
* @class ProductsApi
|
|
308
|
+
* @extends {BaseAPI}
|
|
309
|
+
*/
|
|
310
|
+
var ProductsApi = /** @class */ (function (_super) {
|
|
311
|
+
__extends(ProductsApi, _super);
|
|
312
|
+
function ProductsApi() {
|
|
313
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
314
|
+
}
|
|
315
|
+
/**
|
|
316
|
+
* Get detailed product that a customer can insure; the details can be expanded using expand query parameter.
|
|
317
|
+
* @summary Get product details
|
|
318
|
+
* @param {ProductsApiGetProductRequest} requestParameters Request parameters.
|
|
319
|
+
* @param {*} [options] Override http request option.
|
|
320
|
+
* @throws {RequiredError}
|
|
321
|
+
* @memberof ProductsApi
|
|
322
|
+
*/
|
|
323
|
+
ProductsApi.prototype.getProduct = function (requestParameters, options) {
|
|
324
|
+
var _this = this;
|
|
325
|
+
return (0, exports.ProductsApiFp)(this.configuration).getProduct(requestParameters.productCode, requestParameters.customerCode, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
326
|
+
};
|
|
327
|
+
/**
|
|
328
|
+
* List all the products that a customer can insure, the products can be filtered by product code, product number.
|
|
329
|
+
* @summary List products available to insure for a customer
|
|
330
|
+
* @param {ProductsApiListProductsRequest} requestParameters Request parameters.
|
|
331
|
+
* @param {*} [options] Override http request option.
|
|
332
|
+
* @throws {RequiredError}
|
|
333
|
+
* @memberof ProductsApi
|
|
334
|
+
*/
|
|
335
|
+
ProductsApi.prototype.listProducts = function (requestParameters, options) {
|
|
336
|
+
var _this = this;
|
|
337
|
+
return (0, exports.ProductsApiFp)(this.configuration).listProducts(requestParameters.customerCode, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
338
|
+
};
|
|
339
|
+
return ProductsApi;
|
|
340
|
+
}(base_1.BaseAPI));
|
|
341
|
+
exports.ProductsApi = ProductsApi;
|
package/dist/api.d.ts
CHANGED
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
export * from './api/claims-api';
|
|
13
13
|
export * from './api/customers-api';
|
|
14
14
|
export * from './api/policies-api';
|
|
15
|
+
export * from './api/products-api';
|
|
15
16
|
export declare enum Environment {
|
|
16
17
|
Production = "https://apiv2.emil.de",
|
|
17
18
|
Test = "https://apiv2-test.emil.de"
|
package/dist/api.js
CHANGED
|
@@ -31,6 +31,7 @@ exports.Environment = void 0;
|
|
|
31
31
|
__exportStar(require("./api/claims-api"), exports);
|
|
32
32
|
__exportStar(require("./api/customers-api"), exports);
|
|
33
33
|
__exportStar(require("./api/policies-api"), exports);
|
|
34
|
+
__exportStar(require("./api/products-api"), exports);
|
|
34
35
|
var Environment;
|
|
35
36
|
(function (Environment) {
|
|
36
37
|
Environment["Production"] = "https://apiv2.emil.de";
|
|
@@ -12,43 +12,43 @@
|
|
|
12
12
|
/**
|
|
13
13
|
*
|
|
14
14
|
* @export
|
|
15
|
-
* @interface
|
|
15
|
+
* @interface CustomerProductClass
|
|
16
16
|
*/
|
|
17
|
-
export interface
|
|
17
|
+
export interface CustomerProductClass {
|
|
18
18
|
/**
|
|
19
19
|
* Product code
|
|
20
20
|
* @type {string}
|
|
21
|
-
* @memberof
|
|
21
|
+
* @memberof CustomerProductClass
|
|
22
22
|
*/
|
|
23
23
|
'code': string;
|
|
24
24
|
/**
|
|
25
25
|
* Product\'s name
|
|
26
26
|
* @type {string}
|
|
27
|
-
* @memberof
|
|
27
|
+
* @memberof CustomerProductClass
|
|
28
28
|
*/
|
|
29
29
|
'name': string;
|
|
30
30
|
/**
|
|
31
31
|
* Product\'s slug
|
|
32
32
|
* @type {string}
|
|
33
|
-
* @memberof
|
|
33
|
+
* @memberof CustomerProductClass
|
|
34
34
|
*/
|
|
35
35
|
'slug': string;
|
|
36
36
|
/**
|
|
37
37
|
* Contract duration in days
|
|
38
38
|
* @type {number}
|
|
39
|
-
* @memberof
|
|
39
|
+
* @memberof CustomerProductClass
|
|
40
40
|
*/
|
|
41
41
|
'contractDurationDays': number;
|
|
42
42
|
/**
|
|
43
43
|
* Date created
|
|
44
44
|
* @type {string}
|
|
45
|
-
* @memberof
|
|
45
|
+
* @memberof CustomerProductClass
|
|
46
46
|
*/
|
|
47
47
|
'createdAt': string;
|
|
48
48
|
/**
|
|
49
49
|
* Date updated
|
|
50
50
|
* @type {string}
|
|
51
|
-
* @memberof
|
|
51
|
+
* @memberof CustomerProductClass
|
|
52
52
|
*/
|
|
53
53
|
'updatedAt': string;
|
|
54
54
|
}
|
|
File without changes
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* EMIL CustomerService
|
|
3
|
+
* The EMIL CustomerService 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 { CustomerProductClass } from './customer-product-class';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface GetProductResponseClass
|
|
17
|
+
*/
|
|
18
|
+
export interface GetProductResponseClass {
|
|
19
|
+
/**
|
|
20
|
+
* Product
|
|
21
|
+
* @type {CustomerProductClass}
|
|
22
|
+
* @memberof GetProductResponseClass
|
|
23
|
+
*/
|
|
24
|
+
'product': CustomerProductClass;
|
|
25
|
+
}
|
|
File without changes
|
package/dist/models/index.d.ts
CHANGED
|
@@ -12,10 +12,12 @@ export * from './create-customer-response-class';
|
|
|
12
12
|
export * from './create-presigned-post-response-class';
|
|
13
13
|
export * from './customer-class';
|
|
14
14
|
export * from './customer-document-class';
|
|
15
|
+
export * from './customer-product-class';
|
|
15
16
|
export * from './forgot-password-request-dto';
|
|
16
17
|
export * from './get-customer-document-download-url-response-class';
|
|
17
18
|
export * from './get-customer-response-class';
|
|
18
19
|
export * from './get-policy-response-class';
|
|
20
|
+
export * from './get-product-response-class';
|
|
19
21
|
export * from './initiate-auth-request-dto';
|
|
20
22
|
export * from './initiate-auth-response-class';
|
|
21
23
|
export * from './initiate-braintree-payment-setup-response-class';
|
|
@@ -41,12 +43,10 @@ export * from './reset-password-by-customer-request-dto';
|
|
|
41
43
|
export * from './respond-to-auth-challenge-class';
|
|
42
44
|
export * from './respond-to-auth-challenge-request-dto';
|
|
43
45
|
export * from './shared-customer-policy-object-request-dto';
|
|
44
|
-
export * from './shared-customer-product-class';
|
|
45
46
|
export * from './shared-invoice-item-class';
|
|
46
47
|
export * from './terminate-customer-policy-request-dto';
|
|
47
48
|
export * from './terminate-customer-policy-response-class';
|
|
48
49
|
export * from './timeslice-class';
|
|
49
|
-
export * from './to-grpc-customer-product-class';
|
|
50
50
|
export * from './update-account-request-dto';
|
|
51
51
|
export * from './update-customer-claim-request-dto';
|
|
52
52
|
export * from './update-customer-request-dto';
|
package/dist/models/index.js
CHANGED
|
@@ -28,10 +28,12 @@ __exportStar(require("./create-customer-response-class"), exports);
|
|
|
28
28
|
__exportStar(require("./create-presigned-post-response-class"), exports);
|
|
29
29
|
__exportStar(require("./customer-class"), exports);
|
|
30
30
|
__exportStar(require("./customer-document-class"), exports);
|
|
31
|
+
__exportStar(require("./customer-product-class"), exports);
|
|
31
32
|
__exportStar(require("./forgot-password-request-dto"), exports);
|
|
32
33
|
__exportStar(require("./get-customer-document-download-url-response-class"), exports);
|
|
33
34
|
__exportStar(require("./get-customer-response-class"), exports);
|
|
34
35
|
__exportStar(require("./get-policy-response-class"), exports);
|
|
36
|
+
__exportStar(require("./get-product-response-class"), exports);
|
|
35
37
|
__exportStar(require("./initiate-auth-request-dto"), exports);
|
|
36
38
|
__exportStar(require("./initiate-auth-response-class"), exports);
|
|
37
39
|
__exportStar(require("./initiate-braintree-payment-setup-response-class"), exports);
|
|
@@ -57,12 +59,10 @@ __exportStar(require("./reset-password-by-customer-request-dto"), exports);
|
|
|
57
59
|
__exportStar(require("./respond-to-auth-challenge-class"), exports);
|
|
58
60
|
__exportStar(require("./respond-to-auth-challenge-request-dto"), exports);
|
|
59
61
|
__exportStar(require("./shared-customer-policy-object-request-dto"), exports);
|
|
60
|
-
__exportStar(require("./shared-customer-product-class"), exports);
|
|
61
62
|
__exportStar(require("./shared-invoice-item-class"), exports);
|
|
62
63
|
__exportStar(require("./terminate-customer-policy-request-dto"), exports);
|
|
63
64
|
__exportStar(require("./terminate-customer-policy-response-class"), exports);
|
|
64
65
|
__exportStar(require("./timeslice-class"), exports);
|
|
65
|
-
__exportStar(require("./to-grpc-customer-product-class"), exports);
|
|
66
66
|
__exportStar(require("./update-account-request-dto"), exports);
|
|
67
67
|
__exportStar(require("./update-customer-claim-request-dto"), exports);
|
|
68
68
|
__exportStar(require("./update-customer-request-dto"), exports);
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import {
|
|
12
|
+
import { CustomerProductClass } from './customer-product-class';
|
|
13
13
|
/**
|
|
14
14
|
*
|
|
15
15
|
* @export
|
|
@@ -17,11 +17,11 @@ import { PolicyClass } from './policy-class';
|
|
|
17
17
|
*/
|
|
18
18
|
export interface ListPoliciesResponseClass {
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
21
|
-
* @type {Array<
|
|
20
|
+
* Products
|
|
21
|
+
* @type {Array<CustomerProductClass>}
|
|
22
22
|
* @memberof ListPoliciesResponseClass
|
|
23
23
|
*/
|
|
24
|
-
'items': Array<
|
|
24
|
+
'items': Array<CustomerProductClass>;
|
|
25
25
|
/**
|
|
26
26
|
* Next page token
|
|
27
27
|
* @type {string}
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
+
import { CustomerProductClass } from './customer-product-class';
|
|
12
13
|
import { PolicyVersionClass } from './policy-version-class';
|
|
13
|
-
import { ToGrpcCustomerProductClass } from './to-grpc-customer-product-class';
|
|
14
14
|
/**
|
|
15
15
|
*
|
|
16
16
|
* @export
|
|
@@ -43,10 +43,10 @@ export interface PolicyClass {
|
|
|
43
43
|
'versions': Array<PolicyVersionClass>;
|
|
44
44
|
/**
|
|
45
45
|
* Product details
|
|
46
|
-
* @type {
|
|
46
|
+
* @type {CustomerProductClass}
|
|
47
47
|
* @memberof PolicyClass
|
|
48
48
|
*/
|
|
49
|
-
'product'?:
|
|
49
|
+
'product'?: CustomerProductClass;
|
|
50
50
|
/**
|
|
51
51
|
* Date created
|
|
52
52
|
* @type {string}
|
|
@@ -17,43 +17,43 @@
|
|
|
17
17
|
/**
|
|
18
18
|
*
|
|
19
19
|
* @export
|
|
20
|
-
* @interface
|
|
20
|
+
* @interface CustomerProductClass
|
|
21
21
|
*/
|
|
22
|
-
export interface
|
|
22
|
+
export interface CustomerProductClass {
|
|
23
23
|
/**
|
|
24
24
|
* Product code
|
|
25
25
|
* @type {string}
|
|
26
|
-
* @memberof
|
|
26
|
+
* @memberof CustomerProductClass
|
|
27
27
|
*/
|
|
28
28
|
'code': string;
|
|
29
29
|
/**
|
|
30
30
|
* Product\'s name
|
|
31
31
|
* @type {string}
|
|
32
|
-
* @memberof
|
|
32
|
+
* @memberof CustomerProductClass
|
|
33
33
|
*/
|
|
34
34
|
'name': string;
|
|
35
35
|
/**
|
|
36
36
|
* Product\'s slug
|
|
37
37
|
* @type {string}
|
|
38
|
-
* @memberof
|
|
38
|
+
* @memberof CustomerProductClass
|
|
39
39
|
*/
|
|
40
40
|
'slug': string;
|
|
41
41
|
/**
|
|
42
42
|
* Contract duration in days
|
|
43
43
|
* @type {number}
|
|
44
|
-
* @memberof
|
|
44
|
+
* @memberof CustomerProductClass
|
|
45
45
|
*/
|
|
46
46
|
'contractDurationDays': number;
|
|
47
47
|
/**
|
|
48
48
|
* Date created
|
|
49
49
|
* @type {string}
|
|
50
|
-
* @memberof
|
|
50
|
+
* @memberof CustomerProductClass
|
|
51
51
|
*/
|
|
52
52
|
'createdAt': string;
|
|
53
53
|
/**
|
|
54
54
|
* Date updated
|
|
55
55
|
* @type {string}
|
|
56
|
-
* @memberof
|
|
56
|
+
* @memberof CustomerProductClass
|
|
57
57
|
*/
|
|
58
58
|
'updatedAt': string;
|
|
59
59
|
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* EMIL CustomerService
|
|
5
|
+
* The EMIL CustomerService API description
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0
|
|
8
|
+
* Contact: kontakt@emil.de
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
import { CustomerProductClass } from './customer-product-class';
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @export
|
|
21
|
+
* @interface GetProductResponseClass
|
|
22
|
+
*/
|
|
23
|
+
export interface GetProductResponseClass {
|
|
24
|
+
/**
|
|
25
|
+
* Product
|
|
26
|
+
* @type {CustomerProductClass}
|
|
27
|
+
* @memberof GetProductResponseClass
|
|
28
|
+
*/
|
|
29
|
+
'product': CustomerProductClass;
|
|
30
|
+
}
|
|
31
|
+
|
package/models/index.ts
CHANGED
|
@@ -12,10 +12,12 @@ export * from './create-customer-response-class';
|
|
|
12
12
|
export * from './create-presigned-post-response-class';
|
|
13
13
|
export * from './customer-class';
|
|
14
14
|
export * from './customer-document-class';
|
|
15
|
+
export * from './customer-product-class';
|
|
15
16
|
export * from './forgot-password-request-dto';
|
|
16
17
|
export * from './get-customer-document-download-url-response-class';
|
|
17
18
|
export * from './get-customer-response-class';
|
|
18
19
|
export * from './get-policy-response-class';
|
|
20
|
+
export * from './get-product-response-class';
|
|
19
21
|
export * from './initiate-auth-request-dto';
|
|
20
22
|
export * from './initiate-auth-response-class';
|
|
21
23
|
export * from './initiate-braintree-payment-setup-response-class';
|
|
@@ -41,12 +43,10 @@ export * from './reset-password-by-customer-request-dto';
|
|
|
41
43
|
export * from './respond-to-auth-challenge-class';
|
|
42
44
|
export * from './respond-to-auth-challenge-request-dto';
|
|
43
45
|
export * from './shared-customer-policy-object-request-dto';
|
|
44
|
-
export * from './shared-customer-product-class';
|
|
45
46
|
export * from './shared-invoice-item-class';
|
|
46
47
|
export * from './terminate-customer-policy-request-dto';
|
|
47
48
|
export * from './terminate-customer-policy-response-class';
|
|
48
49
|
export * from './timeslice-class';
|
|
49
|
-
export * from './to-grpc-customer-product-class';
|
|
50
50
|
export * from './update-account-request-dto';
|
|
51
51
|
export * from './update-customer-claim-request-dto';
|
|
52
52
|
export * from './update-customer-request-dto';
|