@emilgroup/customer-sdk-node 1.26.0 → 1.32.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/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 +174 -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 +120 -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 +105 -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 +120 -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/models/claim-class.ts +13 -1
- package/models/create-customer-claim-request-dto.ts +8 -2
- package/models/customer-document-class.ts +6 -0
- package/models/update-customer-claim-request-dto.ts +8 -2
- package/package.json +1 -1
|
@@ -0,0 +1,604 @@
|
|
|
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.AuthenticationApi = exports.AuthenticationApiFactory = exports.AuthenticationApiFp = exports.AuthenticationApiAxiosParamCreator = 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
|
+
* AuthenticationApi - axios parameter creator
|
|
94
|
+
* @export
|
|
95
|
+
*/
|
|
96
|
+
var AuthenticationApiAxiosParamCreator = function (configuration) {
|
|
97
|
+
var _this = this;
|
|
98
|
+
return {
|
|
99
|
+
/**
|
|
100
|
+
* Send a customer a reset-password token via email.
|
|
101
|
+
* @summary Forgot password by customer
|
|
102
|
+
* @param {ForgotPasswordRequestDto} forgotPasswordRequestDto
|
|
103
|
+
* @param {*} [options] Override http request option.
|
|
104
|
+
* @throws {RequiredError}
|
|
105
|
+
*/
|
|
106
|
+
forgotPassword: function (forgotPasswordRequestDto, options) {
|
|
107
|
+
if (options === void 0) { options = {}; }
|
|
108
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
109
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
110
|
+
return __generator(this, function (_a) {
|
|
111
|
+
// verify required parameter 'forgotPasswordRequestDto' is not null or undefined
|
|
112
|
+
(0, common_1.assertParamExists)('forgotPassword', 'forgotPasswordRequestDto', forgotPasswordRequestDto);
|
|
113
|
+
localVarPath = "/v1/customers/forgot-password";
|
|
114
|
+
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
115
|
+
if (configuration) {
|
|
116
|
+
baseOptions = configuration.baseOptions;
|
|
117
|
+
baseAccessToken = configuration.accessToken;
|
|
118
|
+
}
|
|
119
|
+
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
120
|
+
localVarHeaderParameter = {};
|
|
121
|
+
localVarQueryParameter = {};
|
|
122
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
123
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
124
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
125
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
126
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(forgotPasswordRequestDto, localVarRequestOptions, configuration);
|
|
127
|
+
return [2 /*return*/, {
|
|
128
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
129
|
+
options: localVarRequestOptions,
|
|
130
|
+
}];
|
|
131
|
+
});
|
|
132
|
+
});
|
|
133
|
+
},
|
|
134
|
+
/**
|
|
135
|
+
* Start auth process to get new access token, refresh token after successful login.
|
|
136
|
+
* @summary Initiate auth by customer
|
|
137
|
+
* @param {InitiateAuthRequestDto} initiateAuthRequestDto
|
|
138
|
+
* @param {*} [options] Override http request option.
|
|
139
|
+
* @throws {RequiredError}
|
|
140
|
+
*/
|
|
141
|
+
initiateAuth: function (initiateAuthRequestDto, options) {
|
|
142
|
+
if (options === void 0) { options = {}; }
|
|
143
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
144
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
145
|
+
return __generator(this, function (_a) {
|
|
146
|
+
// verify required parameter 'initiateAuthRequestDto' is not null or undefined
|
|
147
|
+
(0, common_1.assertParamExists)('initiateAuth', 'initiateAuthRequestDto', initiateAuthRequestDto);
|
|
148
|
+
localVarPath = "/v1/customers/auth/initiate";
|
|
149
|
+
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
150
|
+
if (configuration) {
|
|
151
|
+
baseOptions = configuration.baseOptions;
|
|
152
|
+
baseAccessToken = configuration.accessToken;
|
|
153
|
+
}
|
|
154
|
+
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
155
|
+
localVarHeaderParameter = {};
|
|
156
|
+
localVarQueryParameter = {};
|
|
157
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
158
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
159
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
160
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
161
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(initiateAuthRequestDto, localVarRequestOptions, configuration);
|
|
162
|
+
return [2 /*return*/, {
|
|
163
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
164
|
+
options: localVarRequestOptions,
|
|
165
|
+
}];
|
|
166
|
+
});
|
|
167
|
+
});
|
|
168
|
+
},
|
|
169
|
+
/**
|
|
170
|
+
* Get new access token, new refresh token.
|
|
171
|
+
* @summary Refresh token by customer
|
|
172
|
+
* @param {RefreshTokenDto} refreshTokenDto
|
|
173
|
+
* @param {string} [cookie] HTTP only cookie that was sent during login.
|
|
174
|
+
* @param {*} [options] Override http request option.
|
|
175
|
+
* @throws {RequiredError}
|
|
176
|
+
*/
|
|
177
|
+
refreshToken: function (refreshTokenDto, cookie, options) {
|
|
178
|
+
if (options === void 0) { options = {}; }
|
|
179
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
180
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
181
|
+
return __generator(this, function (_a) {
|
|
182
|
+
// verify required parameter 'refreshTokenDto' is not null or undefined
|
|
183
|
+
(0, common_1.assertParamExists)('refreshToken', 'refreshTokenDto', refreshTokenDto);
|
|
184
|
+
localVarPath = "/v1/customers/refresh-token";
|
|
185
|
+
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
186
|
+
if (configuration) {
|
|
187
|
+
baseOptions = configuration.baseOptions;
|
|
188
|
+
baseAccessToken = configuration.accessToken;
|
|
189
|
+
}
|
|
190
|
+
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
191
|
+
localVarHeaderParameter = {};
|
|
192
|
+
localVarQueryParameter = {};
|
|
193
|
+
if (cookie !== undefined && cookie !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
194
|
+
localVarHeaderParameter['Cookie'] = String(cookie ? cookie : baseAccessToken);
|
|
195
|
+
}
|
|
196
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
197
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
198
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
199
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
200
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(refreshTokenDto, localVarRequestOptions, configuration);
|
|
201
|
+
return [2 /*return*/, {
|
|
202
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
203
|
+
options: localVarRequestOptions,
|
|
204
|
+
}];
|
|
205
|
+
});
|
|
206
|
+
});
|
|
207
|
+
},
|
|
208
|
+
/**
|
|
209
|
+
* Change customer\'s password using the token provided by the reset password endpoint.
|
|
210
|
+
* @summary Change password by customer
|
|
211
|
+
* @param {ResetPasswordByCustomerRequestDto} resetPasswordByCustomerRequestDto
|
|
212
|
+
* @param {*} [options] Override http request option.
|
|
213
|
+
* @throws {RequiredError}
|
|
214
|
+
*/
|
|
215
|
+
resetPassword: function (resetPasswordByCustomerRequestDto, options) {
|
|
216
|
+
if (options === void 0) { options = {}; }
|
|
217
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
218
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
219
|
+
return __generator(this, function (_a) {
|
|
220
|
+
// verify required parameter 'resetPasswordByCustomerRequestDto' is not null or undefined
|
|
221
|
+
(0, common_1.assertParamExists)('resetPassword', 'resetPasswordByCustomerRequestDto', resetPasswordByCustomerRequestDto);
|
|
222
|
+
localVarPath = "/v1/customers/reset-password";
|
|
223
|
+
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
224
|
+
if (configuration) {
|
|
225
|
+
baseOptions = configuration.baseOptions;
|
|
226
|
+
baseAccessToken = configuration.accessToken;
|
|
227
|
+
}
|
|
228
|
+
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
229
|
+
localVarHeaderParameter = {};
|
|
230
|
+
localVarQueryParameter = {};
|
|
231
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
232
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
233
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
234
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
235
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(resetPasswordByCustomerRequestDto, localVarRequestOptions, configuration);
|
|
236
|
+
return [2 /*return*/, {
|
|
237
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
238
|
+
options: localVarRequestOptions,
|
|
239
|
+
}];
|
|
240
|
+
});
|
|
241
|
+
});
|
|
242
|
+
},
|
|
243
|
+
/**
|
|
244
|
+
* Respond to the auth challenge by customer to get new access token, refresh token after successful login.
|
|
245
|
+
* @summary Respond to auth challenge
|
|
246
|
+
* @param {RespondToAuthChallengeRequestDto} respondToAuthChallengeRequestDto
|
|
247
|
+
* @param {*} [options] Override http request option.
|
|
248
|
+
* @throws {RequiredError}
|
|
249
|
+
*/
|
|
250
|
+
respondToAuthChallenge: function (respondToAuthChallengeRequestDto, options) {
|
|
251
|
+
if (options === void 0) { options = {}; }
|
|
252
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
253
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
254
|
+
return __generator(this, function (_a) {
|
|
255
|
+
// verify required parameter 'respondToAuthChallengeRequestDto' is not null or undefined
|
|
256
|
+
(0, common_1.assertParamExists)('respondToAuthChallenge', 'respondToAuthChallengeRequestDto', respondToAuthChallengeRequestDto);
|
|
257
|
+
localVarPath = "/v1/customers/auth/respond";
|
|
258
|
+
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
259
|
+
if (configuration) {
|
|
260
|
+
baseOptions = configuration.baseOptions;
|
|
261
|
+
baseAccessToken = configuration.accessToken;
|
|
262
|
+
}
|
|
263
|
+
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
264
|
+
localVarHeaderParameter = {};
|
|
265
|
+
localVarQueryParameter = {};
|
|
266
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
267
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
268
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
269
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
270
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(respondToAuthChallengeRequestDto, localVarRequestOptions, configuration);
|
|
271
|
+
return [2 /*return*/, {
|
|
272
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
273
|
+
options: localVarRequestOptions,
|
|
274
|
+
}];
|
|
275
|
+
});
|
|
276
|
+
});
|
|
277
|
+
},
|
|
278
|
+
/**
|
|
279
|
+
* Verify the reset password token that is sent by calling the \'forgot password\' endpoint.
|
|
280
|
+
* @summary Verify a reset password token
|
|
281
|
+
* @param {string} resetToken reset password token
|
|
282
|
+
* @param {*} [options] Override http request option.
|
|
283
|
+
* @throws {RequiredError}
|
|
284
|
+
*/
|
|
285
|
+
verifyResetPasswordToken: function (resetToken, options) {
|
|
286
|
+
if (options === void 0) { options = {}; }
|
|
287
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
288
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
289
|
+
return __generator(this, function (_a) {
|
|
290
|
+
// verify required parameter 'resetToken' is not null or undefined
|
|
291
|
+
(0, common_1.assertParamExists)('verifyResetPasswordToken', 'resetToken', resetToken);
|
|
292
|
+
localVarPath = "/v1/customers/verify-reset-password";
|
|
293
|
+
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
294
|
+
if (configuration) {
|
|
295
|
+
baseOptions = configuration.baseOptions;
|
|
296
|
+
baseAccessToken = configuration.accessToken;
|
|
297
|
+
}
|
|
298
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
299
|
+
localVarHeaderParameter = {};
|
|
300
|
+
localVarQueryParameter = {};
|
|
301
|
+
if (resetToken !== undefined) {
|
|
302
|
+
localVarQueryParameter['resetToken'] = resetToken;
|
|
303
|
+
}
|
|
304
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
305
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
306
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
307
|
+
return [2 /*return*/, {
|
|
308
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
309
|
+
options: localVarRequestOptions,
|
|
310
|
+
}];
|
|
311
|
+
});
|
|
312
|
+
});
|
|
313
|
+
},
|
|
314
|
+
};
|
|
315
|
+
};
|
|
316
|
+
exports.AuthenticationApiAxiosParamCreator = AuthenticationApiAxiosParamCreator;
|
|
317
|
+
/**
|
|
318
|
+
* AuthenticationApi - functional programming interface
|
|
319
|
+
* @export
|
|
320
|
+
*/
|
|
321
|
+
var AuthenticationApiFp = function (configuration) {
|
|
322
|
+
var localVarAxiosParamCreator = (0, exports.AuthenticationApiAxiosParamCreator)(configuration);
|
|
323
|
+
return {
|
|
324
|
+
/**
|
|
325
|
+
* Send a customer a reset-password token via email.
|
|
326
|
+
* @summary Forgot password by customer
|
|
327
|
+
* @param {ForgotPasswordRequestDto} forgotPasswordRequestDto
|
|
328
|
+
* @param {*} [options] Override http request option.
|
|
329
|
+
* @throws {RequiredError}
|
|
330
|
+
*/
|
|
331
|
+
forgotPassword: function (forgotPasswordRequestDto, options) {
|
|
332
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
333
|
+
var localVarAxiosArgs;
|
|
334
|
+
return __generator(this, function (_a) {
|
|
335
|
+
switch (_a.label) {
|
|
336
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.forgotPassword(forgotPasswordRequestDto, options)];
|
|
337
|
+
case 1:
|
|
338
|
+
localVarAxiosArgs = _a.sent();
|
|
339
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
340
|
+
}
|
|
341
|
+
});
|
|
342
|
+
});
|
|
343
|
+
},
|
|
344
|
+
/**
|
|
345
|
+
* Start auth process to get new access token, refresh token after successful login.
|
|
346
|
+
* @summary Initiate auth by customer
|
|
347
|
+
* @param {InitiateAuthRequestDto} initiateAuthRequestDto
|
|
348
|
+
* @param {*} [options] Override http request option.
|
|
349
|
+
* @throws {RequiredError}
|
|
350
|
+
*/
|
|
351
|
+
initiateAuth: function (initiateAuthRequestDto, options) {
|
|
352
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
353
|
+
var localVarAxiosArgs;
|
|
354
|
+
return __generator(this, function (_a) {
|
|
355
|
+
switch (_a.label) {
|
|
356
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.initiateAuth(initiateAuthRequestDto, options)];
|
|
357
|
+
case 1:
|
|
358
|
+
localVarAxiosArgs = _a.sent();
|
|
359
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
360
|
+
}
|
|
361
|
+
});
|
|
362
|
+
});
|
|
363
|
+
},
|
|
364
|
+
/**
|
|
365
|
+
* Get new access token, new refresh token.
|
|
366
|
+
* @summary Refresh token by customer
|
|
367
|
+
* @param {RefreshTokenDto} refreshTokenDto
|
|
368
|
+
* @param {string} [cookie] HTTP only cookie that was sent during login.
|
|
369
|
+
* @param {*} [options] Override http request option.
|
|
370
|
+
* @throws {RequiredError}
|
|
371
|
+
*/
|
|
372
|
+
refreshToken: function (refreshTokenDto, cookie, options) {
|
|
373
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
374
|
+
var localVarAxiosArgs;
|
|
375
|
+
return __generator(this, function (_a) {
|
|
376
|
+
switch (_a.label) {
|
|
377
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.refreshToken(refreshTokenDto, cookie, options)];
|
|
378
|
+
case 1:
|
|
379
|
+
localVarAxiosArgs = _a.sent();
|
|
380
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
381
|
+
}
|
|
382
|
+
});
|
|
383
|
+
});
|
|
384
|
+
},
|
|
385
|
+
/**
|
|
386
|
+
* Change customer\'s password using the token provided by the reset password endpoint.
|
|
387
|
+
* @summary Change password by customer
|
|
388
|
+
* @param {ResetPasswordByCustomerRequestDto} resetPasswordByCustomerRequestDto
|
|
389
|
+
* @param {*} [options] Override http request option.
|
|
390
|
+
* @throws {RequiredError}
|
|
391
|
+
*/
|
|
392
|
+
resetPassword: function (resetPasswordByCustomerRequestDto, options) {
|
|
393
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
394
|
+
var localVarAxiosArgs;
|
|
395
|
+
return __generator(this, function (_a) {
|
|
396
|
+
switch (_a.label) {
|
|
397
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.resetPassword(resetPasswordByCustomerRequestDto, options)];
|
|
398
|
+
case 1:
|
|
399
|
+
localVarAxiosArgs = _a.sent();
|
|
400
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
401
|
+
}
|
|
402
|
+
});
|
|
403
|
+
});
|
|
404
|
+
},
|
|
405
|
+
/**
|
|
406
|
+
* Respond to the auth challenge by customer to get new access token, refresh token after successful login.
|
|
407
|
+
* @summary Respond to auth challenge
|
|
408
|
+
* @param {RespondToAuthChallengeRequestDto} respondToAuthChallengeRequestDto
|
|
409
|
+
* @param {*} [options] Override http request option.
|
|
410
|
+
* @throws {RequiredError}
|
|
411
|
+
*/
|
|
412
|
+
respondToAuthChallenge: function (respondToAuthChallengeRequestDto, options) {
|
|
413
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
414
|
+
var localVarAxiosArgs;
|
|
415
|
+
return __generator(this, function (_a) {
|
|
416
|
+
switch (_a.label) {
|
|
417
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.respondToAuthChallenge(respondToAuthChallengeRequestDto, options)];
|
|
418
|
+
case 1:
|
|
419
|
+
localVarAxiosArgs = _a.sent();
|
|
420
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
421
|
+
}
|
|
422
|
+
});
|
|
423
|
+
});
|
|
424
|
+
},
|
|
425
|
+
/**
|
|
426
|
+
* Verify the reset password token that is sent by calling the \'forgot password\' endpoint.
|
|
427
|
+
* @summary Verify a reset password token
|
|
428
|
+
* @param {string} resetToken reset password token
|
|
429
|
+
* @param {*} [options] Override http request option.
|
|
430
|
+
* @throws {RequiredError}
|
|
431
|
+
*/
|
|
432
|
+
verifyResetPasswordToken: function (resetToken, options) {
|
|
433
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
434
|
+
var localVarAxiosArgs;
|
|
435
|
+
return __generator(this, function (_a) {
|
|
436
|
+
switch (_a.label) {
|
|
437
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.verifyResetPasswordToken(resetToken, options)];
|
|
438
|
+
case 1:
|
|
439
|
+
localVarAxiosArgs = _a.sent();
|
|
440
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
441
|
+
}
|
|
442
|
+
});
|
|
443
|
+
});
|
|
444
|
+
},
|
|
445
|
+
};
|
|
446
|
+
};
|
|
447
|
+
exports.AuthenticationApiFp = AuthenticationApiFp;
|
|
448
|
+
/**
|
|
449
|
+
* AuthenticationApi - factory interface
|
|
450
|
+
* @export
|
|
451
|
+
*/
|
|
452
|
+
var AuthenticationApiFactory = function (configuration, basePath, axios) {
|
|
453
|
+
var localVarFp = (0, exports.AuthenticationApiFp)(configuration);
|
|
454
|
+
return {
|
|
455
|
+
/**
|
|
456
|
+
* Send a customer a reset-password token via email.
|
|
457
|
+
* @summary Forgot password by customer
|
|
458
|
+
* @param {ForgotPasswordRequestDto} forgotPasswordRequestDto
|
|
459
|
+
* @param {*} [options] Override http request option.
|
|
460
|
+
* @throws {RequiredError}
|
|
461
|
+
*/
|
|
462
|
+
forgotPassword: function (forgotPasswordRequestDto, options) {
|
|
463
|
+
return localVarFp.forgotPassword(forgotPasswordRequestDto, options).then(function (request) { return request(axios, basePath); });
|
|
464
|
+
},
|
|
465
|
+
/**
|
|
466
|
+
* Start auth process to get new access token, refresh token after successful login.
|
|
467
|
+
* @summary Initiate auth by customer
|
|
468
|
+
* @param {InitiateAuthRequestDto} initiateAuthRequestDto
|
|
469
|
+
* @param {*} [options] Override http request option.
|
|
470
|
+
* @throws {RequiredError}
|
|
471
|
+
*/
|
|
472
|
+
initiateAuth: function (initiateAuthRequestDto, options) {
|
|
473
|
+
return localVarFp.initiateAuth(initiateAuthRequestDto, options).then(function (request) { return request(axios, basePath); });
|
|
474
|
+
},
|
|
475
|
+
/**
|
|
476
|
+
* Get new access token, new refresh token.
|
|
477
|
+
* @summary Refresh token by customer
|
|
478
|
+
* @param {RefreshTokenDto} refreshTokenDto
|
|
479
|
+
* @param {string} [cookie] HTTP only cookie that was sent during login.
|
|
480
|
+
* @param {*} [options] Override http request option.
|
|
481
|
+
* @throws {RequiredError}
|
|
482
|
+
*/
|
|
483
|
+
refreshToken: function (refreshTokenDto, cookie, options) {
|
|
484
|
+
return localVarFp.refreshToken(refreshTokenDto, cookie, options).then(function (request) { return request(axios, basePath); });
|
|
485
|
+
},
|
|
486
|
+
/**
|
|
487
|
+
* Change customer\'s password using the token provided by the reset password endpoint.
|
|
488
|
+
* @summary Change password by customer
|
|
489
|
+
* @param {ResetPasswordByCustomerRequestDto} resetPasswordByCustomerRequestDto
|
|
490
|
+
* @param {*} [options] Override http request option.
|
|
491
|
+
* @throws {RequiredError}
|
|
492
|
+
*/
|
|
493
|
+
resetPassword: function (resetPasswordByCustomerRequestDto, options) {
|
|
494
|
+
return localVarFp.resetPassword(resetPasswordByCustomerRequestDto, options).then(function (request) { return request(axios, basePath); });
|
|
495
|
+
},
|
|
496
|
+
/**
|
|
497
|
+
* Respond to the auth challenge by customer to get new access token, refresh token after successful login.
|
|
498
|
+
* @summary Respond to auth challenge
|
|
499
|
+
* @param {RespondToAuthChallengeRequestDto} respondToAuthChallengeRequestDto
|
|
500
|
+
* @param {*} [options] Override http request option.
|
|
501
|
+
* @throws {RequiredError}
|
|
502
|
+
*/
|
|
503
|
+
respondToAuthChallenge: function (respondToAuthChallengeRequestDto, options) {
|
|
504
|
+
return localVarFp.respondToAuthChallenge(respondToAuthChallengeRequestDto, options).then(function (request) { return request(axios, basePath); });
|
|
505
|
+
},
|
|
506
|
+
/**
|
|
507
|
+
* Verify the reset password token that is sent by calling the \'forgot password\' endpoint.
|
|
508
|
+
* @summary Verify a reset password token
|
|
509
|
+
* @param {string} resetToken reset password token
|
|
510
|
+
* @param {*} [options] Override http request option.
|
|
511
|
+
* @throws {RequiredError}
|
|
512
|
+
*/
|
|
513
|
+
verifyResetPasswordToken: function (resetToken, options) {
|
|
514
|
+
return localVarFp.verifyResetPasswordToken(resetToken, options).then(function (request) { return request(axios, basePath); });
|
|
515
|
+
},
|
|
516
|
+
};
|
|
517
|
+
};
|
|
518
|
+
exports.AuthenticationApiFactory = AuthenticationApiFactory;
|
|
519
|
+
/**
|
|
520
|
+
* AuthenticationApi - object-oriented interface
|
|
521
|
+
* @export
|
|
522
|
+
* @class AuthenticationApi
|
|
523
|
+
* @extends {BaseAPI}
|
|
524
|
+
*/
|
|
525
|
+
var AuthenticationApi = /** @class */ (function (_super) {
|
|
526
|
+
__extends(AuthenticationApi, _super);
|
|
527
|
+
function AuthenticationApi() {
|
|
528
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
529
|
+
}
|
|
530
|
+
/**
|
|
531
|
+
* Send a customer a reset-password token via email.
|
|
532
|
+
* @summary Forgot password by customer
|
|
533
|
+
* @param {AuthenticationApiForgotPasswordRequest} requestParameters Request parameters.
|
|
534
|
+
* @param {*} [options] Override http request option.
|
|
535
|
+
* @throws {RequiredError}
|
|
536
|
+
* @memberof AuthenticationApi
|
|
537
|
+
*/
|
|
538
|
+
AuthenticationApi.prototype.forgotPassword = function (requestParameters, options) {
|
|
539
|
+
var _this = this;
|
|
540
|
+
return (0, exports.AuthenticationApiFp)(this.configuration).forgotPassword(requestParameters.forgotPasswordRequestDto, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
541
|
+
};
|
|
542
|
+
/**
|
|
543
|
+
* Start auth process to get new access token, refresh token after successful login.
|
|
544
|
+
* @summary Initiate auth by customer
|
|
545
|
+
* @param {AuthenticationApiInitiateAuthRequest} requestParameters Request parameters.
|
|
546
|
+
* @param {*} [options] Override http request option.
|
|
547
|
+
* @throws {RequiredError}
|
|
548
|
+
* @memberof AuthenticationApi
|
|
549
|
+
*/
|
|
550
|
+
AuthenticationApi.prototype.initiateAuth = function (requestParameters, options) {
|
|
551
|
+
var _this = this;
|
|
552
|
+
return (0, exports.AuthenticationApiFp)(this.configuration).initiateAuth(requestParameters.initiateAuthRequestDto, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
553
|
+
};
|
|
554
|
+
/**
|
|
555
|
+
* Get new access token, new refresh token.
|
|
556
|
+
* @summary Refresh token by customer
|
|
557
|
+
* @param {AuthenticationApiRefreshTokenRequest} requestParameters Request parameters.
|
|
558
|
+
* @param {*} [options] Override http request option.
|
|
559
|
+
* @throws {RequiredError}
|
|
560
|
+
* @memberof AuthenticationApi
|
|
561
|
+
*/
|
|
562
|
+
AuthenticationApi.prototype.refreshToken = function (requestParameters, options) {
|
|
563
|
+
var _this = this;
|
|
564
|
+
return (0, exports.AuthenticationApiFp)(this.configuration).refreshToken(requestParameters.refreshTokenDto, requestParameters.cookie, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
565
|
+
};
|
|
566
|
+
/**
|
|
567
|
+
* Change customer\'s password using the token provided by the reset password endpoint.
|
|
568
|
+
* @summary Change password by customer
|
|
569
|
+
* @param {AuthenticationApiResetPasswordRequest} requestParameters Request parameters.
|
|
570
|
+
* @param {*} [options] Override http request option.
|
|
571
|
+
* @throws {RequiredError}
|
|
572
|
+
* @memberof AuthenticationApi
|
|
573
|
+
*/
|
|
574
|
+
AuthenticationApi.prototype.resetPassword = function (requestParameters, options) {
|
|
575
|
+
var _this = this;
|
|
576
|
+
return (0, exports.AuthenticationApiFp)(this.configuration).resetPassword(requestParameters.resetPasswordByCustomerRequestDto, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
577
|
+
};
|
|
578
|
+
/**
|
|
579
|
+
* Respond to the auth challenge by customer to get new access token, refresh token after successful login.
|
|
580
|
+
* @summary Respond to auth challenge
|
|
581
|
+
* @param {AuthenticationApiRespondToAuthChallengeRequest} requestParameters Request parameters.
|
|
582
|
+
* @param {*} [options] Override http request option.
|
|
583
|
+
* @throws {RequiredError}
|
|
584
|
+
* @memberof AuthenticationApi
|
|
585
|
+
*/
|
|
586
|
+
AuthenticationApi.prototype.respondToAuthChallenge = function (requestParameters, options) {
|
|
587
|
+
var _this = this;
|
|
588
|
+
return (0, exports.AuthenticationApiFp)(this.configuration).respondToAuthChallenge(requestParameters.respondToAuthChallengeRequestDto, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
589
|
+
};
|
|
590
|
+
/**
|
|
591
|
+
* Verify the reset password token that is sent by calling the \'forgot password\' endpoint.
|
|
592
|
+
* @summary Verify a reset password token
|
|
593
|
+
* @param {AuthenticationApiVerifyResetPasswordTokenRequest} requestParameters Request parameters.
|
|
594
|
+
* @param {*} [options] Override http request option.
|
|
595
|
+
* @throws {RequiredError}
|
|
596
|
+
* @memberof AuthenticationApi
|
|
597
|
+
*/
|
|
598
|
+
AuthenticationApi.prototype.verifyResetPasswordToken = function (requestParameters, options) {
|
|
599
|
+
var _this = this;
|
|
600
|
+
return (0, exports.AuthenticationApiFp)(this.configuration).verifyResetPasswordToken(requestParameters.resetToken, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
601
|
+
};
|
|
602
|
+
return AuthenticationApi;
|
|
603
|
+
}(base_1.BaseAPI));
|
|
604
|
+
exports.AuthenticationApi = AuthenticationApi;
|