@emilgroup/account-sdk 1.49.1-beta.20 → 1.49.1-beta.21
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/api/accounts-api.ts +48 -18
- package/api/health-api.ts +1 -1
- package/base.ts +239 -43
- package/common.ts +3 -2
- package/configuration.ts +20 -0
- package/dist/api/accounts-api.d.ts +6 -6
- package/dist/api/accounts-api.js +78 -45
- package/dist/api/health-api.d.ts +1 -1
- package/dist/api/health-api.js +1 -1
- package/dist/base.d.ts +26 -0
- package/dist/base.js +243 -60
- package/dist/common.d.ts +1 -1
- package/dist/common.js +1 -0
- package/dist/configuration.d.ts +17 -0
- package/dist/configuration.js +2 -0
- package/package.json +2 -2
|
@@ -408,7 +408,7 @@ export declare class AccountsApi extends BaseAPI {
|
|
|
408
408
|
* @throws {RequiredError}
|
|
409
409
|
* @memberof AccountsApi
|
|
410
410
|
*/
|
|
411
|
-
createAccount(requestParameters: AccountsApiCreateAccountRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateAccountResponseClass, any, {}>>;
|
|
411
|
+
createAccount(requestParameters: AccountsApiCreateAccountRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateAccountResponseClass, any, {}, any>>;
|
|
412
412
|
/**
|
|
413
413
|
* Permanently deletes the account. Supply the unique code that was returned when you created the account and this will delete it. **Required Permissions** \"partner-management.partners.delete\"
|
|
414
414
|
* @summary Delete the account
|
|
@@ -417,7 +417,7 @@ export declare class AccountsApi extends BaseAPI {
|
|
|
417
417
|
* @throws {RequiredError}
|
|
418
418
|
* @memberof AccountsApi
|
|
419
419
|
*/
|
|
420
|
-
deleteAccount(requestParameters: AccountsApiDeleteAccountRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}>>;
|
|
420
|
+
deleteAccount(requestParameters: AccountsApiDeleteAccountRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}, any>>;
|
|
421
421
|
/**
|
|
422
422
|
* Retrieves the details of the account that was previously created. Supply the unique account code that was returned when you created it and Emil Api will return the corresponding account information. **Required Permissions** \"partner-management.partners.view\"
|
|
423
423
|
* @summary Retrieve the account
|
|
@@ -426,7 +426,7 @@ export declare class AccountsApi extends BaseAPI {
|
|
|
426
426
|
* @throws {RequiredError}
|
|
427
427
|
* @memberof AccountsApi
|
|
428
428
|
*/
|
|
429
|
-
getAccount(requestParameters: AccountsApiGetAccountRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetAccountResponseClass, any, {}>>;
|
|
429
|
+
getAccount(requestParameters: AccountsApiGetAccountRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetAccountResponseClass, any, {}, any>>;
|
|
430
430
|
/**
|
|
431
431
|
* Retrieves the details of the account that was previously created. Supply the email that was returned when you created it and Emil Api will return the corresponding account information. Email matching is case-insensitive. **Required Permissions** \"partner-management.partners.view\"
|
|
432
432
|
* @summary Retrieve the account
|
|
@@ -435,7 +435,7 @@ export declare class AccountsApi extends BaseAPI {
|
|
|
435
435
|
* @throws {RequiredError}
|
|
436
436
|
* @memberof AccountsApi
|
|
437
437
|
*/
|
|
438
|
-
getAccountByEmail(requestParameters: AccountsApiGetAccountByEmailRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetAccountResponseClass, any, {}>>;
|
|
438
|
+
getAccountByEmail(requestParameters: AccountsApiGetAccountByEmailRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetAccountResponseClass, any, {}, any>>;
|
|
439
439
|
/**
|
|
440
440
|
* Returns a list of accounts you have previously created. The accounts are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation. **Required Permissions** \"partner-management.partners.view\"
|
|
441
441
|
* @summary List accounts
|
|
@@ -444,7 +444,7 @@ export declare class AccountsApi extends BaseAPI {
|
|
|
444
444
|
* @throws {RequiredError}
|
|
445
445
|
* @memberof AccountsApi
|
|
446
446
|
*/
|
|
447
|
-
listAccounts(requestParameters?: AccountsApiListAccountsRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListAccountsResponseClass, any, {}>>;
|
|
447
|
+
listAccounts(requestParameters?: AccountsApiListAccountsRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListAccountsResponseClass, any, {}, any>>;
|
|
448
448
|
/**
|
|
449
449
|
* Updates the specified account by setting the values of the parameters passed. Any parameters not provided will be left unchanged. **Required Permissions** \"partner-management.partners.update\"
|
|
450
450
|
* @summary Update the account
|
|
@@ -453,5 +453,5 @@ export declare class AccountsApi extends BaseAPI {
|
|
|
453
453
|
* @throws {RequiredError}
|
|
454
454
|
* @memberof AccountsApi
|
|
455
455
|
*/
|
|
456
|
-
updateAccount(requestParameters: AccountsApiUpdateAccountRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<UpdateAccountResponseClass, any, {}>>;
|
|
456
|
+
updateAccount(requestParameters: AccountsApiUpdateAccountRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<UpdateAccountResponseClass, any, {}, any>>;
|
|
457
457
|
}
|
package/dist/api/accounts-api.js
CHANGED
|
@@ -103,9 +103,10 @@ var AccountsApiAxiosParamCreator = function (configuration) {
|
|
|
103
103
|
createAccount: function (createAccountRequestDto, authorization, options) {
|
|
104
104
|
if (options === void 0) { options = {}; }
|
|
105
105
|
return __awaiter(_this, void 0, void 0, function () {
|
|
106
|
-
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
107
|
-
|
|
108
|
-
|
|
106
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
|
|
107
|
+
var _a;
|
|
108
|
+
return __generator(this, function (_b) {
|
|
109
|
+
switch (_b.label) {
|
|
109
110
|
case 0:
|
|
110
111
|
// verify required parameter 'createAccountRequestDto' is not null or undefined
|
|
111
112
|
(0, common_1.assertParamExists)('createAccount', 'createAccountRequestDto', createAccountRequestDto);
|
|
@@ -120,13 +121,19 @@ var AccountsApiAxiosParamCreator = function (configuration) {
|
|
|
120
121
|
localVarQueryParameter = {};
|
|
121
122
|
// authentication bearer required
|
|
122
123
|
// http bearer authentication required
|
|
123
|
-
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
|
|
124
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
|
|
125
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
126
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
127
|
+
];
|
|
124
128
|
case 1:
|
|
125
129
|
// authentication bearer required
|
|
126
130
|
// http bearer authentication required
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
131
|
+
_b.sent();
|
|
132
|
+
authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
133
|
+
authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
134
|
+
authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
|
|
135
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
136
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
130
137
|
}
|
|
131
138
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
132
139
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
@@ -152,9 +159,10 @@ var AccountsApiAxiosParamCreator = function (configuration) {
|
|
|
152
159
|
deleteAccount: function (code, authorization, options) {
|
|
153
160
|
if (options === void 0) { options = {}; }
|
|
154
161
|
return __awaiter(_this, void 0, void 0, function () {
|
|
155
|
-
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
156
|
-
|
|
157
|
-
|
|
162
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
|
|
163
|
+
var _a;
|
|
164
|
+
return __generator(this, function (_b) {
|
|
165
|
+
switch (_b.label) {
|
|
158
166
|
case 0:
|
|
159
167
|
// verify required parameter 'code' is not null or undefined
|
|
160
168
|
(0, common_1.assertParamExists)('deleteAccount', 'code', code);
|
|
@@ -170,13 +178,19 @@ var AccountsApiAxiosParamCreator = function (configuration) {
|
|
|
170
178
|
localVarQueryParameter = {};
|
|
171
179
|
// authentication bearer required
|
|
172
180
|
// http bearer authentication required
|
|
173
|
-
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
|
|
181
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
|
|
182
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
183
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
184
|
+
];
|
|
174
185
|
case 1:
|
|
175
186
|
// authentication bearer required
|
|
176
187
|
// http bearer authentication required
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
188
|
+
_b.sent();
|
|
189
|
+
authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
190
|
+
authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
191
|
+
authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
|
|
192
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
193
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
180
194
|
}
|
|
181
195
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
182
196
|
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
@@ -201,9 +215,10 @@ var AccountsApiAxiosParamCreator = function (configuration) {
|
|
|
201
215
|
getAccount: function (code, authorization, expand, options) {
|
|
202
216
|
if (options === void 0) { options = {}; }
|
|
203
217
|
return __awaiter(_this, void 0, void 0, function () {
|
|
204
|
-
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
205
|
-
|
|
206
|
-
|
|
218
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
|
|
219
|
+
var _a;
|
|
220
|
+
return __generator(this, function (_b) {
|
|
221
|
+
switch (_b.label) {
|
|
207
222
|
case 0:
|
|
208
223
|
// verify required parameter 'code' is not null or undefined
|
|
209
224
|
(0, common_1.assertParamExists)('getAccount', 'code', code);
|
|
@@ -223,12 +238,15 @@ var AccountsApiAxiosParamCreator = function (configuration) {
|
|
|
223
238
|
case 1:
|
|
224
239
|
// authentication bearer required
|
|
225
240
|
// http bearer authentication required
|
|
226
|
-
|
|
241
|
+
_b.sent();
|
|
227
242
|
if (expand !== undefined) {
|
|
228
243
|
localVarQueryParameter['expand'] = expand;
|
|
229
244
|
}
|
|
230
|
-
|
|
231
|
-
|
|
245
|
+
authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
246
|
+
authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
247
|
+
authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
|
|
248
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
249
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
232
250
|
}
|
|
233
251
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
234
252
|
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
@@ -253,9 +271,10 @@ var AccountsApiAxiosParamCreator = function (configuration) {
|
|
|
253
271
|
getAccountByEmail: function (email, authorization, expand, options) {
|
|
254
272
|
if (options === void 0) { options = {}; }
|
|
255
273
|
return __awaiter(_this, void 0, void 0, function () {
|
|
256
|
-
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
257
|
-
|
|
258
|
-
|
|
274
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
|
|
275
|
+
var _a;
|
|
276
|
+
return __generator(this, function (_b) {
|
|
277
|
+
switch (_b.label) {
|
|
259
278
|
case 0:
|
|
260
279
|
// verify required parameter 'email' is not null or undefined
|
|
261
280
|
(0, common_1.assertParamExists)('getAccountByEmail', 'email', email);
|
|
@@ -275,12 +294,15 @@ var AccountsApiAxiosParamCreator = function (configuration) {
|
|
|
275
294
|
case 1:
|
|
276
295
|
// authentication bearer required
|
|
277
296
|
// http bearer authentication required
|
|
278
|
-
|
|
297
|
+
_b.sent();
|
|
279
298
|
if (expand !== undefined) {
|
|
280
299
|
localVarQueryParameter['expand'] = expand;
|
|
281
300
|
}
|
|
282
|
-
|
|
283
|
-
|
|
301
|
+
authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
302
|
+
authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
303
|
+
authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
|
|
304
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
305
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
284
306
|
}
|
|
285
307
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
286
308
|
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
@@ -310,9 +332,10 @@ var AccountsApiAxiosParamCreator = function (configuration) {
|
|
|
310
332
|
listAccounts: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
|
|
311
333
|
if (options === void 0) { options = {}; }
|
|
312
334
|
return __awaiter(_this, void 0, void 0, function () {
|
|
313
|
-
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
314
|
-
|
|
315
|
-
|
|
335
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
|
|
336
|
+
var _a;
|
|
337
|
+
return __generator(this, function (_b) {
|
|
338
|
+
switch (_b.label) {
|
|
316
339
|
case 0:
|
|
317
340
|
localVarPath = "/accountservice/v1/accounts";
|
|
318
341
|
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
@@ -329,7 +352,7 @@ var AccountsApiAxiosParamCreator = function (configuration) {
|
|
|
329
352
|
case 1:
|
|
330
353
|
// authentication bearer required
|
|
331
354
|
// http bearer authentication required
|
|
332
|
-
|
|
355
|
+
_b.sent();
|
|
333
356
|
if (pageSize !== undefined) {
|
|
334
357
|
localVarQueryParameter['pageSize'] = pageSize;
|
|
335
358
|
}
|
|
@@ -351,8 +374,11 @@ var AccountsApiAxiosParamCreator = function (configuration) {
|
|
|
351
374
|
if (filters !== undefined) {
|
|
352
375
|
localVarQueryParameter['filters'] = filters;
|
|
353
376
|
}
|
|
354
|
-
|
|
355
|
-
|
|
377
|
+
authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
378
|
+
authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
379
|
+
authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
|
|
380
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
381
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
356
382
|
}
|
|
357
383
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
358
384
|
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
@@ -377,9 +403,10 @@ var AccountsApiAxiosParamCreator = function (configuration) {
|
|
|
377
403
|
updateAccount: function (code, updateAccountRequestDto, authorization, options) {
|
|
378
404
|
if (options === void 0) { options = {}; }
|
|
379
405
|
return __awaiter(_this, void 0, void 0, function () {
|
|
380
|
-
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
381
|
-
|
|
382
|
-
|
|
406
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
|
|
407
|
+
var _a;
|
|
408
|
+
return __generator(this, function (_b) {
|
|
409
|
+
switch (_b.label) {
|
|
383
410
|
case 0:
|
|
384
411
|
// verify required parameter 'code' is not null or undefined
|
|
385
412
|
(0, common_1.assertParamExists)('updateAccount', 'code', code);
|
|
@@ -397,13 +424,19 @@ var AccountsApiAxiosParamCreator = function (configuration) {
|
|
|
397
424
|
localVarQueryParameter = {};
|
|
398
425
|
// authentication bearer required
|
|
399
426
|
// http bearer authentication required
|
|
400
|
-
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
|
|
427
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
|
|
428
|
+
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
429
|
+
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
430
|
+
];
|
|
401
431
|
case 1:
|
|
402
432
|
// authentication bearer required
|
|
403
433
|
// http bearer authentication required
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
434
|
+
_b.sent();
|
|
435
|
+
authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
436
|
+
authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
437
|
+
authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
|
|
438
|
+
if (authorizationValue || authorizationKeepEmpty) {
|
|
439
|
+
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
407
440
|
}
|
|
408
441
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
409
442
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
@@ -672,7 +705,7 @@ var AccountsApi = /** @class */ (function (_super) {
|
|
|
672
705
|
*/
|
|
673
706
|
AccountsApi.prototype.createAccount = function (requestParameters, options) {
|
|
674
707
|
var _this = this;
|
|
675
|
-
return (0, exports.AccountsApiFp)(this.configuration).createAccount(requestParameters.createAccountRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
708
|
+
return (0, exports.AccountsApiFp)(this.configuration).createAccount(requestParameters.createAccountRequestDto, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
676
709
|
};
|
|
677
710
|
/**
|
|
678
711
|
* Permanently deletes the account. Supply the unique code that was returned when you created the account and this will delete it. **Required Permissions** \"partner-management.partners.delete\"
|
|
@@ -684,7 +717,7 @@ var AccountsApi = /** @class */ (function (_super) {
|
|
|
684
717
|
*/
|
|
685
718
|
AccountsApi.prototype.deleteAccount = function (requestParameters, options) {
|
|
686
719
|
var _this = this;
|
|
687
|
-
return (0, exports.AccountsApiFp)(this.configuration).deleteAccount(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
720
|
+
return (0, exports.AccountsApiFp)(this.configuration).deleteAccount(requestParameters.code, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
688
721
|
};
|
|
689
722
|
/**
|
|
690
723
|
* Retrieves the details of the account that was previously created. Supply the unique account code that was returned when you created it and Emil Api will return the corresponding account information. **Required Permissions** \"partner-management.partners.view\"
|
|
@@ -696,7 +729,7 @@ var AccountsApi = /** @class */ (function (_super) {
|
|
|
696
729
|
*/
|
|
697
730
|
AccountsApi.prototype.getAccount = function (requestParameters, options) {
|
|
698
731
|
var _this = this;
|
|
699
|
-
return (0, exports.AccountsApiFp)(this.configuration).getAccount(requestParameters.code, requestParameters.authorization, requestParameters.expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
732
|
+
return (0, exports.AccountsApiFp)(this.configuration).getAccount(requestParameters.code, requestParameters.authorization, requestParameters.expand, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
700
733
|
};
|
|
701
734
|
/**
|
|
702
735
|
* Retrieves the details of the account that was previously created. Supply the email that was returned when you created it and Emil Api will return the corresponding account information. Email matching is case-insensitive. **Required Permissions** \"partner-management.partners.view\"
|
|
@@ -708,7 +741,7 @@ var AccountsApi = /** @class */ (function (_super) {
|
|
|
708
741
|
*/
|
|
709
742
|
AccountsApi.prototype.getAccountByEmail = function (requestParameters, options) {
|
|
710
743
|
var _this = this;
|
|
711
|
-
return (0, exports.AccountsApiFp)(this.configuration).getAccountByEmail(requestParameters.email, requestParameters.authorization, requestParameters.expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
744
|
+
return (0, exports.AccountsApiFp)(this.configuration).getAccountByEmail(requestParameters.email, requestParameters.authorization, requestParameters.expand, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
712
745
|
};
|
|
713
746
|
/**
|
|
714
747
|
* Returns a list of accounts you have previously created. The accounts are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation. **Required Permissions** \"partner-management.partners.view\"
|
|
@@ -721,7 +754,7 @@ var AccountsApi = /** @class */ (function (_super) {
|
|
|
721
754
|
AccountsApi.prototype.listAccounts = function (requestParameters, options) {
|
|
722
755
|
var _this = this;
|
|
723
756
|
if (requestParameters === void 0) { requestParameters = {}; }
|
|
724
|
-
return (0, exports.AccountsApiFp)(this.configuration).listAccounts(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
757
|
+
return (0, exports.AccountsApiFp)(this.configuration).listAccounts(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
725
758
|
};
|
|
726
759
|
/**
|
|
727
760
|
* Updates the specified account by setting the values of the parameters passed. Any parameters not provided will be left unchanged. **Required Permissions** \"partner-management.partners.update\"
|
|
@@ -733,7 +766,7 @@ var AccountsApi = /** @class */ (function (_super) {
|
|
|
733
766
|
*/
|
|
734
767
|
AccountsApi.prototype.updateAccount = function (requestParameters, options) {
|
|
735
768
|
var _this = this;
|
|
736
|
-
return (0, exports.AccountsApiFp)(this.configuration).updateAccount(requestParameters.code, requestParameters.updateAccountRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
769
|
+
return (0, exports.AccountsApiFp)(this.configuration).updateAccount(requestParameters.code, requestParameters.updateAccountRequestDto, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
737
770
|
};
|
|
738
771
|
return AccountsApi;
|
|
739
772
|
}(base_1.BaseAPI));
|
package/dist/api/health-api.d.ts
CHANGED
|
@@ -66,5 +66,5 @@ export declare class HealthApi extends BaseAPI {
|
|
|
66
66
|
* @throws {RequiredError}
|
|
67
67
|
* @memberof HealthApi
|
|
68
68
|
*/
|
|
69
|
-
check(options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<InlineResponse200, any, {}>>;
|
|
69
|
+
check(options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<InlineResponse200, any, {}, any>>;
|
|
70
70
|
}
|
package/dist/api/health-api.js
CHANGED
|
@@ -193,7 +193,7 @@ var HealthApi = /** @class */ (function (_super) {
|
|
|
193
193
|
*/
|
|
194
194
|
HealthApi.prototype.check = function (options) {
|
|
195
195
|
var _this = this;
|
|
196
|
-
return (0, exports.HealthApiFp)(this.configuration).check(options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
196
|
+
return (0, exports.HealthApiFp)(this.configuration).check(this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
197
197
|
};
|
|
198
198
|
return HealthApi;
|
|
199
199
|
}(base_1.BaseAPI));
|
package/dist/base.d.ts
CHANGED
|
@@ -22,9 +22,19 @@ export declare const COLLECTION_FORMATS: {
|
|
|
22
22
|
tsv: string;
|
|
23
23
|
pipes: string;
|
|
24
24
|
};
|
|
25
|
+
export interface SessionClass {
|
|
26
|
+
sub: string;
|
|
27
|
+
username?: string;
|
|
28
|
+
email?: string;
|
|
29
|
+
tenantSlug?: string;
|
|
30
|
+
permissions?: string;
|
|
31
|
+
expiresAt?: number;
|
|
32
|
+
}
|
|
25
33
|
export interface LoginClass {
|
|
26
34
|
accessToken: string;
|
|
27
35
|
permissions: string;
|
|
36
|
+
authMode?: string;
|
|
37
|
+
session?: SessionClass;
|
|
28
38
|
}
|
|
29
39
|
export interface SwitchWorkspaceRequest {
|
|
30
40
|
username: string;
|
|
@@ -33,6 +43,8 @@ export interface SwitchWorkspaceRequest {
|
|
|
33
43
|
export interface SwitchWorkspaceResponseClass {
|
|
34
44
|
accessToken: string;
|
|
35
45
|
permissions: string;
|
|
46
|
+
authMode?: string;
|
|
47
|
+
session?: SessionClass;
|
|
36
48
|
}
|
|
37
49
|
export declare enum Environment {
|
|
38
50
|
Production = "https://apiv2.emil.de",
|
|
@@ -63,6 +75,18 @@ export declare class BaseAPI {
|
|
|
63
75
|
protected configuration: Configuration | undefined;
|
|
64
76
|
private tokenData?;
|
|
65
77
|
constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
|
|
78
|
+
private sessionAccount;
|
|
79
|
+
private authBasePath;
|
|
80
|
+
private usesSession;
|
|
81
|
+
private useSessionAuth;
|
|
82
|
+
private useHeaderAuth;
|
|
83
|
+
private applyTokenReply;
|
|
84
|
+
private sessionHeaders;
|
|
85
|
+
private withCurrentAuth;
|
|
86
|
+
private canRetryWithToken;
|
|
87
|
+
private canResend;
|
|
88
|
+
private switchToToken;
|
|
89
|
+
private retryWithToken;
|
|
66
90
|
selectEnvironment(env: Environment): void;
|
|
67
91
|
selectBasePath(path: string): void;
|
|
68
92
|
getPermissions(): Array<string>;
|
|
@@ -72,6 +96,8 @@ export declare class BaseAPI {
|
|
|
72
96
|
private storeTokenData;
|
|
73
97
|
loadTokenData(): void;
|
|
74
98
|
cleanTokenData(): void;
|
|
99
|
+
private ownAccount;
|
|
100
|
+
protected withOwner(options?: AxiosRequestConfig): AxiosRequestConfig;
|
|
75
101
|
private attachInterceptor;
|
|
76
102
|
}
|
|
77
103
|
/**
|