@emilgroup/customer-sdk-node 1.26.0 → 1.26.1
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/README.md +2 -2
- package/dist/api/authentication-api.d.ts +332 -0
- package/dist/api/authentication-api.js +604 -0
- package/dist/api/claims-api.d.ts +431 -0
- package/dist/api/claims-api.js +670 -0
- package/dist/api/customers-api.d.ts +271 -0
- package/dist/api/customers-api.js +425 -0
- package/dist/api/default-api.d.ts +66 -0
- package/dist/api/default-api.js +200 -0
- package/dist/api/documents-api.d.ts +262 -0
- package/dist/api/documents-api.js +417 -0
- package/dist/api/invites-api.d.ts +249 -0
- package/dist/api/invites-api.js +456 -0
- package/dist/api/invoices-api.d.ts +150 -0
- package/dist/api/invoices-api.js +253 -0
- package/dist/api/leads-api.d.ts +365 -0
- package/dist/api/leads-api.js +571 -0
- package/dist/api/payments-api.d.ts +162 -0
- package/dist/api/payments-api.js +306 -0
- package/dist/api/policies-api.d.ts +578 -0
- package/dist/api/policies-api.js +808 -0
- package/dist/api/products-api.d.ts +215 -0
- package/dist/api/products-api.js +341 -0
- package/dist/api.d.ts +22 -0
- package/dist/api.js +40 -0
- package/dist/base.d.ts +82 -0
- package/dist/base.js +502 -0
- package/dist/common.d.ts +66 -0
- package/dist/common.js +244 -0
- package/dist/configuration.d.ts +98 -0
- package/dist/configuration.js +45 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +36 -0
- package/dist/models/account-class.d.ts +169 -0
- package/dist/models/account-class.js +26 -0
- package/dist/models/account-policy-class.d.ts +30 -0
- package/dist/models/account-policy-class.js +15 -0
- package/dist/models/authentication-result-class.d.ts +30 -0
- package/dist/models/authentication-result-class.js +15 -0
- package/dist/models/claim-class.d.ts +162 -0
- package/dist/models/claim-class.js +15 -0
- package/dist/models/complete-braintree-payment-setup-request-dto.d.ts +48 -0
- package/dist/models/complete-braintree-payment-setup-request-dto.js +15 -0
- package/dist/models/complete-payment-setup-psp-request.d.ts +32 -0
- package/dist/models/complete-payment-setup-psp-request.js +15 -0
- package/dist/models/complete-payment-setup-response-class.d.ts +24 -0
- package/dist/models/complete-payment-setup-response-class.js +15 -0
- package/dist/models/complete-stripe-payment-setup-request-dto.d.ts +60 -0
- package/dist/models/complete-stripe-payment-setup-request-dto.js +15 -0
- package/dist/models/create-account-request-dto.d.ts +132 -0
- package/dist/models/create-account-request-dto.js +31 -0
- package/dist/models/create-bank-account-request-dto.d.ts +30 -0
- package/dist/models/create-bank-account-request-dto.js +15 -0
- package/dist/models/create-customer-claim-request-dto.d.ts +114 -0
- package/dist/models/create-customer-claim-request-dto.js +15 -0
- package/dist/models/create-customer-claim-response-class.d.ts +25 -0
- package/dist/models/create-customer-claim-response-class.js +15 -0
- package/dist/models/create-customer-request-dto.d.ts +43 -0
- package/dist/models/create-customer-request-dto.js +15 -0
- package/dist/models/create-customer-response-class.d.ts +25 -0
- package/dist/models/create-customer-response-class.js +15 -0
- package/dist/models/create-lead-request-dto.d.ts +83 -0
- package/dist/models/create-lead-request-dto.js +15 -0
- package/dist/models/create-lead-response-class.d.ts +25 -0
- package/dist/models/create-lead-response-class.js +15 -0
- package/dist/models/create-payment-method-request-dto.d.ts +31 -0
- package/dist/models/create-payment-method-request-dto.js +15 -0
- package/dist/models/create-policy-request-dto.d.ts +56 -0
- package/dist/models/create-policy-request-dto.js +15 -0
- package/dist/models/create-presigned-post-response-class.d.ts +30 -0
- package/dist/models/create-presigned-post-response-class.js +15 -0
- package/dist/models/customer-class.d.ts +73 -0
- package/dist/models/customer-class.js +15 -0
- package/dist/models/customer-document-class.d.ts +99 -0
- package/dist/models/customer-document-class.js +36 -0
- package/dist/models/customer-product-class.d.ts +54 -0
- package/dist/models/customer-product-class.js +15 -0
- package/dist/models/forgot-password-request-dto.d.ts +30 -0
- package/dist/models/forgot-password-request-dto.js +15 -0
- package/dist/models/get-customer-claim-response-class.d.ts +25 -0
- package/dist/models/get-customer-claim-response-class.js +15 -0
- package/dist/models/get-customer-document-download-url-response-class.d.ts +24 -0
- package/dist/models/get-customer-document-download-url-response-class.js +15 -0
- package/dist/models/get-customer-response-class.d.ts +25 -0
- package/dist/models/get-customer-response-class.js +15 -0
- package/dist/models/get-lead-response-class.d.ts +25 -0
- package/dist/models/get-lead-response-class.js +15 -0
- package/dist/models/get-policy-response-class.d.ts +25 -0
- package/dist/models/get-policy-response-class.js +15 -0
- package/dist/models/get-product-response-class.d.ts +25 -0
- package/dist/models/get-product-response-class.js +15 -0
- package/dist/models/grpc-update-lead-request-dto.d.ts +50 -0
- package/dist/models/grpc-update-lead-request-dto.js +15 -0
- package/dist/models/index.d.ts +85 -0
- package/dist/models/index.js +101 -0
- package/dist/models/initiate-auth-request-dto.d.ts +36 -0
- package/dist/models/initiate-auth-request-dto.js +15 -0
- package/dist/models/initiate-auth-response-class.d.ts +43 -0
- package/dist/models/initiate-auth-response-class.js +15 -0
- package/dist/models/initiate-braintree-payment-setup-response-class.d.ts +24 -0
- package/dist/models/initiate-braintree-payment-setup-response-class.js +15 -0
- package/dist/models/initiate-payment-setup-response-class.d.ts +32 -0
- package/dist/models/initiate-payment-setup-response-class.js +15 -0
- package/dist/models/initiate-stripe-payment-setup-response-class.d.ts +30 -0
- package/dist/models/initiate-stripe-payment-setup-response-class.js +15 -0
- package/dist/models/inline-response200.d.ts +54 -0
- package/dist/models/inline-response200.js +15 -0
- package/dist/models/inline-response503.d.ts +54 -0
- package/dist/models/inline-response503.js +15 -0
- package/dist/models/invite-by-customer-request-dto.d.ts +30 -0
- package/dist/models/invite-by-customer-request-dto.js +15 -0
- package/dist/models/invite-by-customer-response-class.d.ts +25 -0
- package/dist/models/invite-by-customer-response-class.js +15 -0
- package/dist/models/invite-by-tenant-request-dto.d.ts +24 -0
- package/dist/models/invite-by-tenant-request-dto.js +15 -0
- package/dist/models/invite-by-tenant-response-class.d.ts +25 -0
- package/dist/models/invite-by-tenant-response-class.js +15 -0
- package/dist/models/invite-class.d.ts +54 -0
- package/dist/models/invite-class.js +15 -0
- package/dist/models/invoice-class.d.ts +148 -0
- package/dist/models/invoice-class.js +28 -0
- package/dist/models/lead-bank-account-class.d.ts +30 -0
- package/dist/models/lead-bank-account-class.js +15 -0
- package/dist/models/lead-class.d.ts +127 -0
- package/dist/models/lead-class.js +15 -0
- package/dist/models/list-customer-claims-response-class.d.ts +31 -0
- package/dist/models/list-customer-claims-response-class.js +15 -0
- package/dist/models/list-documents-response-class.d.ts +31 -0
- package/dist/models/list-documents-response-class.js +15 -0
- package/dist/models/list-invoices-response-class.d.ts +31 -0
- package/dist/models/list-invoices-response-class.js +15 -0
- package/dist/models/list-leads-response-class.d.ts +43 -0
- package/dist/models/list-leads-response-class.js +15 -0
- package/dist/models/list-policies-response-class.d.ts +43 -0
- package/dist/models/list-policies-response-class.js +15 -0
- package/dist/models/list-products-response-class.d.ts +31 -0
- package/dist/models/list-products-response-class.js +15 -0
- package/dist/models/policy-class.d.ts +80 -0
- package/dist/models/policy-class.js +15 -0
- package/dist/models/policy-object-class.d.ts +54 -0
- package/dist/models/policy-object-class.js +15 -0
- package/dist/models/policy-object-dto.d.ts +42 -0
- package/dist/models/policy-object-dto.js +15 -0
- package/dist/models/policy-premium-class.d.ts +43 -0
- package/dist/models/policy-premium-class.js +15 -0
- package/dist/models/policy-premium-item-class.d.ts +36 -0
- package/dist/models/policy-premium-item-class.js +15 -0
- package/dist/models/policy-version-class.d.ts +49 -0
- package/dist/models/policy-version-class.js +15 -0
- package/dist/models/premium-override-dto.d.ts +55 -0
- package/dist/models/premium-override-dto.js +27 -0
- package/dist/models/premium-override-request-class.d.ts +25 -0
- package/dist/models/premium-override-request-class.js +15 -0
- package/dist/models/premium-override-request-dto.d.ts +25 -0
- package/dist/models/premium-override-request-dto.js +15 -0
- package/dist/models/refresh-token-dto.d.ts +30 -0
- package/dist/models/refresh-token-dto.js +15 -0
- package/dist/models/request-policy-update-request-dto.d.ts +43 -0
- package/dist/models/request-policy-update-request-dto.js +15 -0
- package/dist/models/request-policy-update-response-class.d.ts +25 -0
- package/dist/models/request-policy-update-response-class.js +15 -0
- package/dist/models/reset-password-by-customer-request-dto.d.ts +36 -0
- package/dist/models/reset-password-by-customer-request-dto.js +15 -0
- package/dist/models/respond-to-auth-challenge-class.d.ts +43 -0
- package/dist/models/respond-to-auth-challenge-class.js +15 -0
- package/dist/models/respond-to-auth-challenge-request-dto.d.ts +42 -0
- package/dist/models/respond-to-auth-challenge-request-dto.js +15 -0
- package/dist/models/sepa-dto.d.ts +30 -0
- package/dist/models/sepa-dto.js +15 -0
- package/dist/models/shared-customer-policy-object-request-dto.d.ts +36 -0
- package/dist/models/shared-customer-policy-object-request-dto.js +15 -0
- package/dist/models/shared-invoice-item-class.d.ts +129 -0
- package/dist/models/shared-invoice-item-class.js +24 -0
- package/dist/models/shared-invoice-status-class.d.ts +47 -0
- package/dist/models/shared-invoice-status-class.js +20 -0
- package/dist/models/terminate-customer-policy-request-dto.d.ts +24 -0
- package/dist/models/terminate-customer-policy-request-dto.js +15 -0
- package/dist/models/terminate-customer-policy-response-class.d.ts +25 -0
- package/dist/models/terminate-customer-policy-response-class.js +15 -0
- package/dist/models/timeslice-class.d.ts +56 -0
- package/dist/models/timeslice-class.js +15 -0
- package/dist/models/update-account-request-dto.d.ts +113 -0
- package/dist/models/update-account-request-dto.js +25 -0
- package/dist/models/update-customer-claim-request-dto.d.ts +114 -0
- package/dist/models/update-customer-claim-request-dto.js +15 -0
- package/dist/models/update-customer-claim-response-class.d.ts +25 -0
- package/dist/models/update-customer-claim-response-class.js +15 -0
- package/dist/models/update-customer-request-dto.d.ts +31 -0
- package/dist/models/update-customer-request-dto.js +15 -0
- package/dist/models/update-customer-response-class.d.ts +25 -0
- package/dist/models/update-customer-response-class.js +15 -0
- package/dist/models/update-lead-request-dto.d.ts +44 -0
- package/dist/models/update-lead-request-dto.js +15 -0
- package/dist/models/update-lead-response-class.d.ts +25 -0
- package/dist/models/update-lead-response-class.js +15 -0
- package/dist/models/upload-customer-claim-documents-request-dto.d.ts +36 -0
- package/dist/models/upload-customer-claim-documents-request-dto.js +15 -0
- package/dist/models/upload-customer-policy-documents-request-dto.d.ts +47 -0
- package/dist/models/upload-customer-policy-documents-request-dto.js +20 -0
- package/dist/models/uploaded-document-dto.d.ts +24 -0
- package/dist/models/uploaded-document-dto.js +15 -0
- package/dist/models/verify-customer-invite-response-class.d.ts +36 -0
- package/dist/models/verify-customer-invite-response-class.js +15 -0
- package/dist/models/withdraw-customer-policy-response-class.d.ts +25 -0
- package/dist/models/withdraw-customer-policy-response-class.js +15 -0
- package/package.json +1 -1
|
@@ -0,0 +1,425 @@
|
|
|
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.CustomersApi = exports.CustomersApiFactory = exports.CustomersApiFp = exports.CustomersApiAxiosParamCreator = 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
|
+
* CustomersApi - axios parameter creator
|
|
94
|
+
* @export
|
|
95
|
+
*/
|
|
96
|
+
var CustomersApiAxiosParamCreator = function (configuration) {
|
|
97
|
+
var _this = this;
|
|
98
|
+
return {
|
|
99
|
+
/**
|
|
100
|
+
* Get customer details.
|
|
101
|
+
* @summary Get customer details
|
|
102
|
+
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
|
|
103
|
+
* @param {string} [expand] Fields to expand response by - [account]
|
|
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
|
+
getCustomer: function (customerCode, expand, 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 'customerCode' is not null or undefined
|
|
114
|
+
(0, common_1.assertParamExists)('getCustomer', 'customerCode', customerCode);
|
|
115
|
+
localVarPath = "/v1/customers/{customerCode}"
|
|
116
|
+
.replace("{".concat("customerCode", "}"), encodeURIComponent(String(customerCode)));
|
|
117
|
+
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
118
|
+
if (configuration) {
|
|
119
|
+
baseOptions = configuration.baseOptions;
|
|
120
|
+
baseAccessToken = configuration.accessToken;
|
|
121
|
+
}
|
|
122
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
123
|
+
localVarHeaderParameter = {};
|
|
124
|
+
localVarQueryParameter = {};
|
|
125
|
+
if (expand !== undefined) {
|
|
126
|
+
localVarQueryParameter['expand'] = expand;
|
|
127
|
+
}
|
|
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
|
+
* Get customer list.
|
|
143
|
+
* @summary Get customers list
|
|
144
|
+
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
|
|
145
|
+
* @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.
|
|
146
|
+
* @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
147
|
+
* @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.
|
|
148
|
+
* @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.
|
|
149
|
+
* @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.
|
|
150
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
151
|
+
* @param {*} [options] Override http request option.
|
|
152
|
+
* @throws {RequiredError}
|
|
153
|
+
*/
|
|
154
|
+
listCustomers: function (pageSize, pageToken, filter, search, order, expand, authorization, options) {
|
|
155
|
+
if (options === void 0) { options = {}; }
|
|
156
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
157
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
158
|
+
return __generator(this, function (_a) {
|
|
159
|
+
localVarPath = "/v1/customers";
|
|
160
|
+
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
161
|
+
if (configuration) {
|
|
162
|
+
baseOptions = configuration.baseOptions;
|
|
163
|
+
baseAccessToken = configuration.accessToken;
|
|
164
|
+
}
|
|
165
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
166
|
+
localVarHeaderParameter = {};
|
|
167
|
+
localVarQueryParameter = {};
|
|
168
|
+
if (pageSize !== undefined) {
|
|
169
|
+
localVarQueryParameter['pageSize'] = pageSize;
|
|
170
|
+
}
|
|
171
|
+
if (pageToken !== undefined) {
|
|
172
|
+
localVarQueryParameter['pageToken'] = pageToken;
|
|
173
|
+
}
|
|
174
|
+
if (filter !== undefined) {
|
|
175
|
+
localVarQueryParameter['filter'] = filter;
|
|
176
|
+
}
|
|
177
|
+
if (search !== undefined) {
|
|
178
|
+
localVarQueryParameter['search'] = search;
|
|
179
|
+
}
|
|
180
|
+
if (order !== undefined) {
|
|
181
|
+
localVarQueryParameter['order'] = order;
|
|
182
|
+
}
|
|
183
|
+
if (expand !== undefined) {
|
|
184
|
+
localVarQueryParameter['expand'] = expand;
|
|
185
|
+
}
|
|
186
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
187
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
188
|
+
}
|
|
189
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
190
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
191
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
192
|
+
return [2 /*return*/, {
|
|
193
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
194
|
+
options: localVarRequestOptions,
|
|
195
|
+
}];
|
|
196
|
+
});
|
|
197
|
+
});
|
|
198
|
+
},
|
|
199
|
+
/**
|
|
200
|
+
* Update customer details like phone, email, names, addresses etc.
|
|
201
|
+
* @summary Update customer details
|
|
202
|
+
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
|
|
203
|
+
* @param {UpdateCustomerRequestDto} updateCustomerRequestDto
|
|
204
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
205
|
+
* @param {*} [options] Override http request option.
|
|
206
|
+
* @throws {RequiredError}
|
|
207
|
+
*/
|
|
208
|
+
updateCustomer: function (customerCode, updateCustomerRequestDto, authorization, options) {
|
|
209
|
+
if (options === void 0) { options = {}; }
|
|
210
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
211
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
212
|
+
return __generator(this, function (_a) {
|
|
213
|
+
// verify required parameter 'customerCode' is not null or undefined
|
|
214
|
+
(0, common_1.assertParamExists)('updateCustomer', 'customerCode', customerCode);
|
|
215
|
+
// verify required parameter 'updateCustomerRequestDto' is not null or undefined
|
|
216
|
+
(0, common_1.assertParamExists)('updateCustomer', 'updateCustomerRequestDto', updateCustomerRequestDto);
|
|
217
|
+
localVarPath = "/v1/customers/{customerCode}"
|
|
218
|
+
.replace("{".concat("customerCode", "}"), encodeURIComponent(String(customerCode)));
|
|
219
|
+
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
220
|
+
if (configuration) {
|
|
221
|
+
baseOptions = configuration.baseOptions;
|
|
222
|
+
baseAccessToken = configuration.accessToken;
|
|
223
|
+
}
|
|
224
|
+
localVarRequestOptions = __assign(__assign({ method: 'PUT' }, baseOptions), options);
|
|
225
|
+
localVarHeaderParameter = {};
|
|
226
|
+
localVarQueryParameter = {};
|
|
227
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
228
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
229
|
+
}
|
|
230
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
231
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
232
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
233
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
234
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateCustomerRequestDto, localVarRequestOptions, configuration);
|
|
235
|
+
return [2 /*return*/, {
|
|
236
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
237
|
+
options: localVarRequestOptions,
|
|
238
|
+
}];
|
|
239
|
+
});
|
|
240
|
+
});
|
|
241
|
+
},
|
|
242
|
+
};
|
|
243
|
+
};
|
|
244
|
+
exports.CustomersApiAxiosParamCreator = CustomersApiAxiosParamCreator;
|
|
245
|
+
/**
|
|
246
|
+
* CustomersApi - functional programming interface
|
|
247
|
+
* @export
|
|
248
|
+
*/
|
|
249
|
+
var CustomersApiFp = function (configuration) {
|
|
250
|
+
var localVarAxiosParamCreator = (0, exports.CustomersApiAxiosParamCreator)(configuration);
|
|
251
|
+
return {
|
|
252
|
+
/**
|
|
253
|
+
* Get customer details.
|
|
254
|
+
* @summary Get customer details
|
|
255
|
+
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
|
|
256
|
+
* @param {string} [expand] Fields to expand response by - [account]
|
|
257
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
258
|
+
* @param {*} [options] Override http request option.
|
|
259
|
+
* @throws {RequiredError}
|
|
260
|
+
*/
|
|
261
|
+
getCustomer: function (customerCode, expand, authorization, options) {
|
|
262
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
263
|
+
var localVarAxiosArgs;
|
|
264
|
+
return __generator(this, function (_a) {
|
|
265
|
+
switch (_a.label) {
|
|
266
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.getCustomer(customerCode, expand, authorization, options)];
|
|
267
|
+
case 1:
|
|
268
|
+
localVarAxiosArgs = _a.sent();
|
|
269
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
270
|
+
}
|
|
271
|
+
});
|
|
272
|
+
});
|
|
273
|
+
},
|
|
274
|
+
/**
|
|
275
|
+
* Get customer list.
|
|
276
|
+
* @summary Get customers list
|
|
277
|
+
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
|
|
278
|
+
* @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.
|
|
279
|
+
* @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
280
|
+
* @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.
|
|
281
|
+
* @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.
|
|
282
|
+
* @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.
|
|
283
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
284
|
+
* @param {*} [options] Override http request option.
|
|
285
|
+
* @throws {RequiredError}
|
|
286
|
+
*/
|
|
287
|
+
listCustomers: function (pageSize, pageToken, filter, search, order, expand, authorization, options) {
|
|
288
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
289
|
+
var localVarAxiosArgs;
|
|
290
|
+
return __generator(this, function (_a) {
|
|
291
|
+
switch (_a.label) {
|
|
292
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.listCustomers(pageSize, pageToken, filter, search, order, expand, authorization, options)];
|
|
293
|
+
case 1:
|
|
294
|
+
localVarAxiosArgs = _a.sent();
|
|
295
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
296
|
+
}
|
|
297
|
+
});
|
|
298
|
+
});
|
|
299
|
+
},
|
|
300
|
+
/**
|
|
301
|
+
* Update customer details like phone, email, names, addresses etc.
|
|
302
|
+
* @summary Update customer details
|
|
303
|
+
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
|
|
304
|
+
* @param {UpdateCustomerRequestDto} updateCustomerRequestDto
|
|
305
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
306
|
+
* @param {*} [options] Override http request option.
|
|
307
|
+
* @throws {RequiredError}
|
|
308
|
+
*/
|
|
309
|
+
updateCustomer: function (customerCode, updateCustomerRequestDto, authorization, options) {
|
|
310
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
311
|
+
var localVarAxiosArgs;
|
|
312
|
+
return __generator(this, function (_a) {
|
|
313
|
+
switch (_a.label) {
|
|
314
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.updateCustomer(customerCode, updateCustomerRequestDto, authorization, options)];
|
|
315
|
+
case 1:
|
|
316
|
+
localVarAxiosArgs = _a.sent();
|
|
317
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
318
|
+
}
|
|
319
|
+
});
|
|
320
|
+
});
|
|
321
|
+
},
|
|
322
|
+
};
|
|
323
|
+
};
|
|
324
|
+
exports.CustomersApiFp = CustomersApiFp;
|
|
325
|
+
/**
|
|
326
|
+
* CustomersApi - factory interface
|
|
327
|
+
* @export
|
|
328
|
+
*/
|
|
329
|
+
var CustomersApiFactory = function (configuration, basePath, axios) {
|
|
330
|
+
var localVarFp = (0, exports.CustomersApiFp)(configuration);
|
|
331
|
+
return {
|
|
332
|
+
/**
|
|
333
|
+
* Get customer details.
|
|
334
|
+
* @summary Get customer details
|
|
335
|
+
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
|
|
336
|
+
* @param {string} [expand] Fields to expand response by - [account]
|
|
337
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
338
|
+
* @param {*} [options] Override http request option.
|
|
339
|
+
* @throws {RequiredError}
|
|
340
|
+
*/
|
|
341
|
+
getCustomer: function (customerCode, expand, authorization, options) {
|
|
342
|
+
return localVarFp.getCustomer(customerCode, expand, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
343
|
+
},
|
|
344
|
+
/**
|
|
345
|
+
* Get customer list.
|
|
346
|
+
* @summary Get customers list
|
|
347
|
+
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
|
|
348
|
+
* @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.
|
|
349
|
+
* @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
350
|
+
* @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.
|
|
351
|
+
* @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.
|
|
352
|
+
* @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.
|
|
353
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
354
|
+
* @param {*} [options] Override http request option.
|
|
355
|
+
* @throws {RequiredError}
|
|
356
|
+
*/
|
|
357
|
+
listCustomers: function (pageSize, pageToken, filter, search, order, expand, authorization, options) {
|
|
358
|
+
return localVarFp.listCustomers(pageSize, pageToken, filter, search, order, expand, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
359
|
+
},
|
|
360
|
+
/**
|
|
361
|
+
* Update customer details like phone, email, names, addresses etc.
|
|
362
|
+
* @summary Update customer details
|
|
363
|
+
* @param {string} customerCode The customer code or \"me\" for the currently logged in customer.
|
|
364
|
+
* @param {UpdateCustomerRequestDto} updateCustomerRequestDto
|
|
365
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
366
|
+
* @param {*} [options] Override http request option.
|
|
367
|
+
* @throws {RequiredError}
|
|
368
|
+
*/
|
|
369
|
+
updateCustomer: function (customerCode, updateCustomerRequestDto, authorization, options) {
|
|
370
|
+
return localVarFp.updateCustomer(customerCode, updateCustomerRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
371
|
+
},
|
|
372
|
+
};
|
|
373
|
+
};
|
|
374
|
+
exports.CustomersApiFactory = CustomersApiFactory;
|
|
375
|
+
/**
|
|
376
|
+
* CustomersApi - object-oriented interface
|
|
377
|
+
* @export
|
|
378
|
+
* @class CustomersApi
|
|
379
|
+
* @extends {BaseAPI}
|
|
380
|
+
*/
|
|
381
|
+
var CustomersApi = /** @class */ (function (_super) {
|
|
382
|
+
__extends(CustomersApi, _super);
|
|
383
|
+
function CustomersApi() {
|
|
384
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
385
|
+
}
|
|
386
|
+
/**
|
|
387
|
+
* Get customer details.
|
|
388
|
+
* @summary Get customer details
|
|
389
|
+
* @param {CustomersApiGetCustomerRequest} requestParameters Request parameters.
|
|
390
|
+
* @param {*} [options] Override http request option.
|
|
391
|
+
* @throws {RequiredError}
|
|
392
|
+
* @memberof CustomersApi
|
|
393
|
+
*/
|
|
394
|
+
CustomersApi.prototype.getCustomer = function (requestParameters, options) {
|
|
395
|
+
var _this = this;
|
|
396
|
+
return (0, exports.CustomersApiFp)(this.configuration).getCustomer(requestParameters.customerCode, requestParameters.expand, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
397
|
+
};
|
|
398
|
+
/**
|
|
399
|
+
* Get customer list.
|
|
400
|
+
* @summary Get customers list
|
|
401
|
+
* @param {CustomersApiListCustomersRequest} requestParameters Request parameters.
|
|
402
|
+
* @param {*} [options] Override http request option.
|
|
403
|
+
* @throws {RequiredError}
|
|
404
|
+
* @memberof CustomersApi
|
|
405
|
+
*/
|
|
406
|
+
CustomersApi.prototype.listCustomers = function (requestParameters, options) {
|
|
407
|
+
var _this = this;
|
|
408
|
+
if (requestParameters === void 0) { requestParameters = {}; }
|
|
409
|
+
return (0, exports.CustomersApiFp)(this.configuration).listCustomers(requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
410
|
+
};
|
|
411
|
+
/**
|
|
412
|
+
* Update customer details like phone, email, names, addresses etc.
|
|
413
|
+
* @summary Update customer details
|
|
414
|
+
* @param {CustomersApiUpdateCustomerRequest} requestParameters Request parameters.
|
|
415
|
+
* @param {*} [options] Override http request option.
|
|
416
|
+
* @throws {RequiredError}
|
|
417
|
+
* @memberof CustomersApi
|
|
418
|
+
*/
|
|
419
|
+
CustomersApi.prototype.updateCustomer = function (requestParameters, options) {
|
|
420
|
+
var _this = this;
|
|
421
|
+
return (0, exports.CustomersApiFp)(this.configuration).updateCustomer(requestParameters.customerCode, requestParameters.updateCustomerRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
422
|
+
};
|
|
423
|
+
return CustomersApi;
|
|
424
|
+
}(base_1.BaseAPI));
|
|
425
|
+
exports.CustomersApi = CustomersApi;
|
|
@@ -0,0 +1,66 @@
|
|
|
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 { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
13
|
+
import { Configuration } from '../configuration';
|
|
14
|
+
import { RequestArgs, BaseAPI } from '../base';
|
|
15
|
+
import { InlineResponse200 } from '../models';
|
|
16
|
+
/**
|
|
17
|
+
* DefaultApi - axios parameter creator
|
|
18
|
+
* @export
|
|
19
|
+
*/
|
|
20
|
+
export declare const DefaultApiAxiosParamCreator: (configuration?: Configuration) => {
|
|
21
|
+
/**
|
|
22
|
+
*
|
|
23
|
+
* @param {*} [options] Override http request option.
|
|
24
|
+
* @throws {RequiredError}
|
|
25
|
+
*/
|
|
26
|
+
check: (options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* DefaultApi - functional programming interface
|
|
30
|
+
* @export
|
|
31
|
+
*/
|
|
32
|
+
export declare const DefaultApiFp: (configuration?: Configuration) => {
|
|
33
|
+
/**
|
|
34
|
+
*
|
|
35
|
+
* @param {*} [options] Override http request option.
|
|
36
|
+
* @throws {RequiredError}
|
|
37
|
+
*/
|
|
38
|
+
check(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<InlineResponse200>>;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* DefaultApi - factory interface
|
|
42
|
+
* @export
|
|
43
|
+
*/
|
|
44
|
+
export declare const DefaultApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
|
|
45
|
+
/**
|
|
46
|
+
*
|
|
47
|
+
* @param {*} [options] Override http request option.
|
|
48
|
+
* @throws {RequiredError}
|
|
49
|
+
*/
|
|
50
|
+
check(options?: any): AxiosPromise<InlineResponse200>;
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* DefaultApi - object-oriented interface
|
|
54
|
+
* @export
|
|
55
|
+
* @class DefaultApi
|
|
56
|
+
* @extends {BaseAPI}
|
|
57
|
+
*/
|
|
58
|
+
export declare class DefaultApi extends BaseAPI {
|
|
59
|
+
/**
|
|
60
|
+
*
|
|
61
|
+
* @param {*} [options] Override http request option.
|
|
62
|
+
* @throws {RequiredError}
|
|
63
|
+
* @memberof DefaultApi
|
|
64
|
+
*/
|
|
65
|
+
check(options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<InlineResponse200, any>>;
|
|
66
|
+
}
|