@randock/nameshift-api-client 0.0.210 → 0.0.212
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +8 -2
- package/README.md +3 -3
- package/dist/apis/AccountsApi.d.ts +15 -3
- package/dist/apis/AccountsApi.js +57 -1
- package/dist/apis/AdminApi.d.ts +12 -1
- package/dist/apis/AdminApi.js +53 -0
- package/dist/apis/BankAccountsApi.d.ts +78 -0
- package/dist/apis/BankAccountsApi.js +356 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/models/AccountBankAccountDto.d.ts +68 -0
- package/dist/models/AccountBankAccountDto.js +75 -0
- package/dist/models/AccountDto.d.ts +10 -3
- package/dist/models/AccountDto.js +9 -4
- package/dist/models/AccountOnboardingDto.d.ts +65 -0
- package/dist/models/AccountOnboardingDto.js +77 -0
- package/dist/models/AccountOnboardingSessionDto.d.ts +32 -0
- package/dist/models/AccountOnboardingSessionDto.js +51 -0
- package/dist/models/AccountPayoutDto.d.ts +46 -0
- package/dist/models/AccountPayoutDto.js +63 -0
- package/dist/models/AccountSettingsDto.d.ts +0 -6
- package/dist/models/AccountSettingsDto.js +0 -4
- package/dist/models/CreateBankAccountInput.d.ts +56 -0
- package/dist/models/CreateBankAccountInput.js +63 -0
- package/dist/models/IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDto.d.ts +11 -3
- package/dist/models/IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDto.js +11 -5
- package/dist/models/SetPayoutProviderInput.d.ts +40 -0
- package/dist/models/SetPayoutProviderInput.js +59 -0
- package/dist/models/UpdateBankAccountInput.d.ts +56 -0
- package/dist/models/UpdateBankAccountInput.js +63 -0
- package/dist/models/index.d.ts +7 -2
- package/dist/models/index.js +7 -2
- package/package.json +1 -1
- package/src/apis/AccountsApi.ts +64 -6
- package/src/apis/AdminApi.ts +48 -0
- package/src/apis/BankAccountsApi.ts +309 -0
- package/src/apis/index.ts +1 -0
- package/src/models/AccountBankAccountDto.ts +120 -0
- package/src/models/AccountDto.ts +27 -11
- package/src/models/AccountOnboardingDto.ts +112 -0
- package/src/models/AccountOnboardingSessionDto.ts +66 -0
- package/src/models/AccountPayoutDto.ts +86 -0
- package/src/models/AccountSettingsDto.ts +0 -9
- package/src/models/CreateBankAccountInput.ts +100 -0
- package/src/models/IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDto.ts +29 -12
- package/src/models/SetPayoutProviderInput.ts +77 -0
- package/src/models/UpdateBankAccountInput.ts +100 -0
- package/src/models/index.ts +7 -2
- package/dist/models/AccountPaymentProviderSessionDto.d.ts +0 -32
- package/dist/models/AccountPaymentProviderSessionDto.js +0 -51
- package/dist/models/PaymentProviderDto.d.ts +0 -52
- package/dist/models/PaymentProviderDto.js +0 -67
- package/src/models/AccountPaymentProviderSessionDto.ts +0 -66
- package/src/models/PaymentProviderDto.ts +0 -95
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Nameshift
|
|
6
|
+
* Nameshift API
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfUpdateBankAccountInput = instanceOfUpdateBankAccountInput;
|
|
17
|
+
exports.UpdateBankAccountInputFromJSON = UpdateBankAccountInputFromJSON;
|
|
18
|
+
exports.UpdateBankAccountInputFromJSONTyped = UpdateBankAccountInputFromJSONTyped;
|
|
19
|
+
exports.UpdateBankAccountInputToJSON = UpdateBankAccountInputToJSON;
|
|
20
|
+
exports.UpdateBankAccountInputToJSONTyped = UpdateBankAccountInputToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the UpdateBankAccountInput interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfUpdateBankAccountInput(value) {
|
|
25
|
+
if (!('currencyCode' in value) || value['currencyCode'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
if (!('countryCode' in value) || value['countryCode'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
if (!('bic' in value) || value['bic'] === undefined)
|
|
30
|
+
return false;
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
function UpdateBankAccountInputFromJSON(json) {
|
|
34
|
+
return UpdateBankAccountInputFromJSONTyped(json, false);
|
|
35
|
+
}
|
|
36
|
+
function UpdateBankAccountInputFromJSONTyped(json, ignoreDiscriminator) {
|
|
37
|
+
if (json == null) {
|
|
38
|
+
return json;
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
'currencyCode': json['currencyCode'],
|
|
42
|
+
'countryCode': json['countryCode'],
|
|
43
|
+
'bic': json['bic'],
|
|
44
|
+
'iban': json['iban'] == null ? undefined : json['iban'],
|
|
45
|
+
'bban': json['bban'] == null ? undefined : json['bban'],
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
function UpdateBankAccountInputToJSON(json) {
|
|
49
|
+
return UpdateBankAccountInputToJSONTyped(json, false);
|
|
50
|
+
}
|
|
51
|
+
function UpdateBankAccountInputToJSONTyped(value, ignoreDiscriminator) {
|
|
52
|
+
if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
|
|
53
|
+
if (value == null) {
|
|
54
|
+
return value;
|
|
55
|
+
}
|
|
56
|
+
return {
|
|
57
|
+
'currencyCode': value['currencyCode'],
|
|
58
|
+
'countryCode': value['countryCode'],
|
|
59
|
+
'bic': value['bic'],
|
|
60
|
+
'iban': value['iban'],
|
|
61
|
+
'bban': value['bban'],
|
|
62
|
+
};
|
|
63
|
+
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
export * from './AccountBankAccountDto';
|
|
1
2
|
export * from './AccountDto';
|
|
2
3
|
export * from './AccountMetricsDto';
|
|
3
4
|
export * from './AccountNotificationDto';
|
|
4
5
|
export * from './AccountNotificationReadStatusDto';
|
|
5
|
-
export * from './
|
|
6
|
+
export * from './AccountOnboardingDto';
|
|
7
|
+
export * from './AccountOnboardingSessionDto';
|
|
8
|
+
export * from './AccountPayoutDto';
|
|
6
9
|
export * from './AccountSettingsDto';
|
|
7
10
|
export * from './AccountSettingsInput';
|
|
8
11
|
export * from './AccountSettingsLeaseToOwnConfigurationDto';
|
|
@@ -36,6 +39,7 @@ export * from './CompanyInformationDto';
|
|
|
36
39
|
export * from './CompanyTaxIdDto';
|
|
37
40
|
export * from './ConcreteDomainTransferTaskData';
|
|
38
41
|
export * from './ConflictException';
|
|
42
|
+
export * from './CreateBankAccountInput';
|
|
39
43
|
export * from './CreateBuyerLeadMessageInput';
|
|
40
44
|
export * from './CreateLeadInput';
|
|
41
45
|
export * from './CreateLeadMessageInput';
|
|
@@ -135,7 +139,6 @@ export * from './PaginateResponse';
|
|
|
135
139
|
export * from './PaginateResponseLinks';
|
|
136
140
|
export * from './PaginateResponseMeta';
|
|
137
141
|
export * from './ParsedDomainDto';
|
|
138
|
-
export * from './PaymentProviderDto';
|
|
139
142
|
export * from './PublicDomainDto';
|
|
140
143
|
export * from './PublicDomainDtoSeo';
|
|
141
144
|
export * from './PublicDomainDtoSeoMoz';
|
|
@@ -158,6 +161,7 @@ export * from './SellerSubscriptionListItemDtoDomainInformation';
|
|
|
158
161
|
export * from './SeoMetricsDto';
|
|
159
162
|
export * from './SetDomainTransferConfirmationInput';
|
|
160
163
|
export * from './SetNewPasswordInput';
|
|
164
|
+
export * from './SetPayoutProviderInput';
|
|
161
165
|
export * from './StoreBuyerLocaleInput';
|
|
162
166
|
export * from './StoreUserLocaleInput';
|
|
163
167
|
export * from './SubscriptionBillingPeriodicityDto';
|
|
@@ -179,6 +183,7 @@ export * from './TaskListDomainTransferDto';
|
|
|
179
183
|
export * from './TaskListLeadDto';
|
|
180
184
|
export * from './ThrottlerException';
|
|
181
185
|
export * from './UpdateAccountBillingInformationInput';
|
|
186
|
+
export * from './UpdateBankAccountInput';
|
|
182
187
|
export * from './UpdateDomainInput';
|
|
183
188
|
export * from './UpdateDomainTransferAuthCodeInput';
|
|
184
189
|
export * from './UpdateLeadInput';
|
package/dist/models/index.js
CHANGED
|
@@ -16,11 +16,14 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
/* tslint:disable */
|
|
18
18
|
/* eslint-disable */
|
|
19
|
+
__exportStar(require("./AccountBankAccountDto"), exports);
|
|
19
20
|
__exportStar(require("./AccountDto"), exports);
|
|
20
21
|
__exportStar(require("./AccountMetricsDto"), exports);
|
|
21
22
|
__exportStar(require("./AccountNotificationDto"), exports);
|
|
22
23
|
__exportStar(require("./AccountNotificationReadStatusDto"), exports);
|
|
23
|
-
__exportStar(require("./
|
|
24
|
+
__exportStar(require("./AccountOnboardingDto"), exports);
|
|
25
|
+
__exportStar(require("./AccountOnboardingSessionDto"), exports);
|
|
26
|
+
__exportStar(require("./AccountPayoutDto"), exports);
|
|
24
27
|
__exportStar(require("./AccountSettingsDto"), exports);
|
|
25
28
|
__exportStar(require("./AccountSettingsInput"), exports);
|
|
26
29
|
__exportStar(require("./AccountSettingsLeaseToOwnConfigurationDto"), exports);
|
|
@@ -54,6 +57,7 @@ __exportStar(require("./CompanyInformationDto"), exports);
|
|
|
54
57
|
__exportStar(require("./CompanyTaxIdDto"), exports);
|
|
55
58
|
__exportStar(require("./ConcreteDomainTransferTaskData"), exports);
|
|
56
59
|
__exportStar(require("./ConflictException"), exports);
|
|
60
|
+
__exportStar(require("./CreateBankAccountInput"), exports);
|
|
57
61
|
__exportStar(require("./CreateBuyerLeadMessageInput"), exports);
|
|
58
62
|
__exportStar(require("./CreateLeadInput"), exports);
|
|
59
63
|
__exportStar(require("./CreateLeadMessageInput"), exports);
|
|
@@ -153,7 +157,6 @@ __exportStar(require("./PaginateResponse"), exports);
|
|
|
153
157
|
__exportStar(require("./PaginateResponseLinks"), exports);
|
|
154
158
|
__exportStar(require("./PaginateResponseMeta"), exports);
|
|
155
159
|
__exportStar(require("./ParsedDomainDto"), exports);
|
|
156
|
-
__exportStar(require("./PaymentProviderDto"), exports);
|
|
157
160
|
__exportStar(require("./PublicDomainDto"), exports);
|
|
158
161
|
__exportStar(require("./PublicDomainDtoSeo"), exports);
|
|
159
162
|
__exportStar(require("./PublicDomainDtoSeoMoz"), exports);
|
|
@@ -176,6 +179,7 @@ __exportStar(require("./SellerSubscriptionListItemDtoDomainInformation"), export
|
|
|
176
179
|
__exportStar(require("./SeoMetricsDto"), exports);
|
|
177
180
|
__exportStar(require("./SetDomainTransferConfirmationInput"), exports);
|
|
178
181
|
__exportStar(require("./SetNewPasswordInput"), exports);
|
|
182
|
+
__exportStar(require("./SetPayoutProviderInput"), exports);
|
|
179
183
|
__exportStar(require("./StoreBuyerLocaleInput"), exports);
|
|
180
184
|
__exportStar(require("./StoreUserLocaleInput"), exports);
|
|
181
185
|
__exportStar(require("./SubscriptionBillingPeriodicityDto"), exports);
|
|
@@ -197,6 +201,7 @@ __exportStar(require("./TaskListDomainTransferDto"), exports);
|
|
|
197
201
|
__exportStar(require("./TaskListLeadDto"), exports);
|
|
198
202
|
__exportStar(require("./ThrottlerException"), exports);
|
|
199
203
|
__exportStar(require("./UpdateAccountBillingInformationInput"), exports);
|
|
204
|
+
__exportStar(require("./UpdateBankAccountInput"), exports);
|
|
200
205
|
__exportStar(require("./UpdateDomainInput"), exports);
|
|
201
206
|
__exportStar(require("./UpdateDomainTransferAuthCodeInput"), exports);
|
|
202
207
|
__exportStar(require("./UpdateLeadInput"), exports);
|
package/package.json
CHANGED
package/src/apis/AccountsApi.ts
CHANGED
|
@@ -15,19 +15,20 @@
|
|
|
15
15
|
|
|
16
16
|
import * as runtime from '../runtime';
|
|
17
17
|
import type {
|
|
18
|
-
|
|
18
|
+
AccountOnboardingSessionDto,
|
|
19
19
|
AccountSettingsDto,
|
|
20
20
|
AccountSettingsInput,
|
|
21
21
|
BadRequestException,
|
|
22
22
|
IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDto,
|
|
23
23
|
NotFoundException,
|
|
24
|
+
SetPayoutProviderInput,
|
|
24
25
|
ThrottlerException,
|
|
25
26
|
UpdateAccountBillingInformationInput,
|
|
26
27
|
ValidationException,
|
|
27
28
|
} from '../models/index';
|
|
28
29
|
import {
|
|
29
|
-
|
|
30
|
-
|
|
30
|
+
AccountOnboardingSessionDtoFromJSON,
|
|
31
|
+
AccountOnboardingSessionDtoToJSON,
|
|
31
32
|
AccountSettingsDtoFromJSON,
|
|
32
33
|
AccountSettingsDtoToJSON,
|
|
33
34
|
AccountSettingsInputFromJSON,
|
|
@@ -38,6 +39,8 @@ import {
|
|
|
38
39
|
IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDtoToJSON,
|
|
39
40
|
NotFoundExceptionFromJSON,
|
|
40
41
|
NotFoundExceptionToJSON,
|
|
42
|
+
SetPayoutProviderInputFromJSON,
|
|
43
|
+
SetPayoutProviderInputToJSON,
|
|
41
44
|
ThrottlerExceptionFromJSON,
|
|
42
45
|
ThrottlerExceptionToJSON,
|
|
43
46
|
UpdateAccountBillingInformationInputFromJSON,
|
|
@@ -65,6 +68,11 @@ export interface AccountsApiPutAvatarRequest {
|
|
|
65
68
|
file?: Blob | null;
|
|
66
69
|
}
|
|
67
70
|
|
|
71
|
+
export interface AccountsApiSetPayoutProviderRequest {
|
|
72
|
+
accountId: string;
|
|
73
|
+
setPayoutProviderInput: SetPayoutProviderInput;
|
|
74
|
+
}
|
|
75
|
+
|
|
68
76
|
export interface AccountsApiUpdateSettingsRequest {
|
|
69
77
|
accountId: string;
|
|
70
78
|
accountSettingsInput: AccountSettingsInput;
|
|
@@ -78,7 +86,7 @@ export class AccountsApi extends runtime.BaseAPI {
|
|
|
78
86
|
/**
|
|
79
87
|
*
|
|
80
88
|
*/
|
|
81
|
-
async getAccountPaymentProviderSessionRaw(requestParameters: AccountsApiGetAccountPaymentProviderSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
89
|
+
async getAccountPaymentProviderSessionRaw(requestParameters: AccountsApiGetAccountPaymentProviderSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AccountOnboardingSessionDto>> {
|
|
82
90
|
if (requestParameters['accountId'] == null) {
|
|
83
91
|
throw new runtime.RequiredError(
|
|
84
92
|
'accountId',
|
|
@@ -105,13 +113,13 @@ export class AccountsApi extends runtime.BaseAPI {
|
|
|
105
113
|
query: queryParameters,
|
|
106
114
|
}, initOverrides);
|
|
107
115
|
|
|
108
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
116
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => AccountOnboardingSessionDtoFromJSON(jsonValue));
|
|
109
117
|
}
|
|
110
118
|
|
|
111
119
|
/**
|
|
112
120
|
*
|
|
113
121
|
*/
|
|
114
|
-
async getAccountPaymentProviderSession(requestParameters: AccountsApiGetAccountPaymentProviderSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
122
|
+
async getAccountPaymentProviderSession(requestParameters: AccountsApiGetAccountPaymentProviderSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccountOnboardingSessionDto> {
|
|
115
123
|
const response = await this.getAccountPaymentProviderSessionRaw(requestParameters, initOverrides);
|
|
116
124
|
return await response.value();
|
|
117
125
|
}
|
|
@@ -342,6 +350,56 @@ export class AccountsApi extends runtime.BaseAPI {
|
|
|
342
350
|
await this.putAvatarRaw(requestParameters, initOverrides);
|
|
343
351
|
}
|
|
344
352
|
|
|
353
|
+
/**
|
|
354
|
+
*
|
|
355
|
+
*/
|
|
356
|
+
async setPayoutProviderRaw(requestParameters: AccountsApiSetPayoutProviderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
357
|
+
if (requestParameters['accountId'] == null) {
|
|
358
|
+
throw new runtime.RequiredError(
|
|
359
|
+
'accountId',
|
|
360
|
+
'Required parameter "accountId" was null or undefined when calling setPayoutProvider().'
|
|
361
|
+
);
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
if (requestParameters['setPayoutProviderInput'] == null) {
|
|
365
|
+
throw new runtime.RequiredError(
|
|
366
|
+
'setPayoutProviderInput',
|
|
367
|
+
'Required parameter "setPayoutProviderInput" was null or undefined when calling setPayoutProvider().'
|
|
368
|
+
);
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
const queryParameters: any = {};
|
|
372
|
+
|
|
373
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
374
|
+
|
|
375
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
376
|
+
|
|
377
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
378
|
+
const token = this.configuration.accessToken;
|
|
379
|
+
const tokenString = await token("bearer", []);
|
|
380
|
+
|
|
381
|
+
if (tokenString) {
|
|
382
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
const response = await this.request({
|
|
386
|
+
path: `/private/accounts/{accountId}/payout-provider`.replace(`{${"accountId"}}`, encodeURIComponent(String(requestParameters['accountId']))),
|
|
387
|
+
method: 'POST',
|
|
388
|
+
headers: headerParameters,
|
|
389
|
+
query: queryParameters,
|
|
390
|
+
body: SetPayoutProviderInputToJSON(requestParameters['setPayoutProviderInput']),
|
|
391
|
+
}, initOverrides);
|
|
392
|
+
|
|
393
|
+
return new runtime.VoidApiResponse(response);
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
/**
|
|
397
|
+
*
|
|
398
|
+
*/
|
|
399
|
+
async setPayoutProvider(requestParameters: AccountsApiSetPayoutProviderRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
400
|
+
await this.setPayoutProviderRaw(requestParameters, initOverrides);
|
|
401
|
+
}
|
|
402
|
+
|
|
345
403
|
/**
|
|
346
404
|
*
|
|
347
405
|
*/
|
package/src/apis/AdminApi.ts
CHANGED
|
@@ -27,6 +27,7 @@ import type {
|
|
|
27
27
|
GetAllOrders200Response,
|
|
28
28
|
GetAllOwnedDomains200Response,
|
|
29
29
|
GetAllSubscriptions200Response,
|
|
30
|
+
IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDto,
|
|
30
31
|
ListAccounts200Response,
|
|
31
32
|
ListDomains200Response,
|
|
32
33
|
NotFoundException,
|
|
@@ -59,6 +60,8 @@ import {
|
|
|
59
60
|
GetAllOwnedDomains200ResponseToJSON,
|
|
60
61
|
GetAllSubscriptions200ResponseFromJSON,
|
|
61
62
|
GetAllSubscriptions200ResponseToJSON,
|
|
63
|
+
IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDtoFromJSON,
|
|
64
|
+
IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDtoToJSON,
|
|
62
65
|
ListAccounts200ResponseFromJSON,
|
|
63
66
|
ListAccounts200ResponseToJSON,
|
|
64
67
|
ListDomains200ResponseFromJSON,
|
|
@@ -94,6 +97,10 @@ export interface AdminApiDownloadInvoiceRequest {
|
|
|
94
97
|
invoiceId: string;
|
|
95
98
|
}
|
|
96
99
|
|
|
100
|
+
export interface AdminApiGetAccountMeRequest {
|
|
101
|
+
accountId: string;
|
|
102
|
+
}
|
|
103
|
+
|
|
97
104
|
export interface AdminApiGetAccountSettingsRequest {
|
|
98
105
|
accountId: string;
|
|
99
106
|
}
|
|
@@ -372,6 +379,47 @@ export class AdminApi extends runtime.BaseAPI {
|
|
|
372
379
|
return await response.value();
|
|
373
380
|
}
|
|
374
381
|
|
|
382
|
+
/**
|
|
383
|
+
*
|
|
384
|
+
*/
|
|
385
|
+
async getAccountMeRaw(requestParameters: AdminApiGetAccountMeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDto>> {
|
|
386
|
+
if (requestParameters['accountId'] == null) {
|
|
387
|
+
throw new runtime.RequiredError(
|
|
388
|
+
'accountId',
|
|
389
|
+
'Required parameter "accountId" was null or undefined when calling getAccountMe().'
|
|
390
|
+
);
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
const queryParameters: any = {};
|
|
394
|
+
|
|
395
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
396
|
+
|
|
397
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
398
|
+
const token = this.configuration.accessToken;
|
|
399
|
+
const tokenString = await token("bearer", []);
|
|
400
|
+
|
|
401
|
+
if (tokenString) {
|
|
402
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
const response = await this.request({
|
|
406
|
+
path: `/admin/accounts/{accountId}/me`.replace(`{${"accountId"}}`, encodeURIComponent(String(requestParameters['accountId']))),
|
|
407
|
+
method: 'GET',
|
|
408
|
+
headers: headerParameters,
|
|
409
|
+
query: queryParameters,
|
|
410
|
+
}, initOverrides);
|
|
411
|
+
|
|
412
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDtoFromJSON(jsonValue));
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
/**
|
|
416
|
+
*
|
|
417
|
+
*/
|
|
418
|
+
async getAccountMe(requestParameters: AdminApiGetAccountMeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDto> {
|
|
419
|
+
const response = await this.getAccountMeRaw(requestParameters, initOverrides);
|
|
420
|
+
return await response.value();
|
|
421
|
+
}
|
|
422
|
+
|
|
375
423
|
/**
|
|
376
424
|
*
|
|
377
425
|
*/
|
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Nameshift
|
|
5
|
+
* Nameshift API
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
import * as runtime from '../runtime';
|
|
17
|
+
import type {
|
|
18
|
+
AccountBankAccountDto,
|
|
19
|
+
CreateBankAccountInput,
|
|
20
|
+
ThrottlerException,
|
|
21
|
+
UpdateBankAccountInput,
|
|
22
|
+
ValidationException,
|
|
23
|
+
} from '../models/index';
|
|
24
|
+
import {
|
|
25
|
+
AccountBankAccountDtoFromJSON,
|
|
26
|
+
AccountBankAccountDtoToJSON,
|
|
27
|
+
CreateBankAccountInputFromJSON,
|
|
28
|
+
CreateBankAccountInputToJSON,
|
|
29
|
+
ThrottlerExceptionFromJSON,
|
|
30
|
+
ThrottlerExceptionToJSON,
|
|
31
|
+
UpdateBankAccountInputFromJSON,
|
|
32
|
+
UpdateBankAccountInputToJSON,
|
|
33
|
+
ValidationExceptionFromJSON,
|
|
34
|
+
ValidationExceptionToJSON,
|
|
35
|
+
} from '../models/index';
|
|
36
|
+
|
|
37
|
+
export interface BankAccountsApiCreateBankAccountRequest {
|
|
38
|
+
accountId: string;
|
|
39
|
+
createBankAccountInput: CreateBankAccountInput;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export interface BankAccountsApiDeleteBankAccountRequest {
|
|
43
|
+
accountId: string;
|
|
44
|
+
bankAccountId: string;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export interface BankAccountsApiListBankAccountsRequest {
|
|
48
|
+
accountId: string;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export interface BankAccountsApiMakeBankAccountPrimaryRequest {
|
|
52
|
+
accountId: string;
|
|
53
|
+
bankAccountId: string;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export interface BankAccountsApiUpdateBankAccountRequest {
|
|
57
|
+
accountId: string;
|
|
58
|
+
bankAccountId: string;
|
|
59
|
+
updateBankAccountInput: UpdateBankAccountInput;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
*
|
|
64
|
+
*/
|
|
65
|
+
export class BankAccountsApi extends runtime.BaseAPI {
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
*
|
|
69
|
+
*/
|
|
70
|
+
async createBankAccountRaw(requestParameters: BankAccountsApiCreateBankAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
71
|
+
if (requestParameters['accountId'] == null) {
|
|
72
|
+
throw new runtime.RequiredError(
|
|
73
|
+
'accountId',
|
|
74
|
+
'Required parameter "accountId" was null or undefined when calling createBankAccount().'
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
if (requestParameters['createBankAccountInput'] == null) {
|
|
79
|
+
throw new runtime.RequiredError(
|
|
80
|
+
'createBankAccountInput',
|
|
81
|
+
'Required parameter "createBankAccountInput" was null or undefined when calling createBankAccount().'
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
const queryParameters: any = {};
|
|
86
|
+
|
|
87
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
88
|
+
|
|
89
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
90
|
+
|
|
91
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
92
|
+
const token = this.configuration.accessToken;
|
|
93
|
+
const tokenString = await token("bearer", []);
|
|
94
|
+
|
|
95
|
+
if (tokenString) {
|
|
96
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
const response = await this.request({
|
|
100
|
+
path: `/private/accounts/{accountId}/bank-accounts`.replace(`{${"accountId"}}`, encodeURIComponent(String(requestParameters['accountId']))),
|
|
101
|
+
method: 'POST',
|
|
102
|
+
headers: headerParameters,
|
|
103
|
+
query: queryParameters,
|
|
104
|
+
body: CreateBankAccountInputToJSON(requestParameters['createBankAccountInput']),
|
|
105
|
+
}, initOverrides);
|
|
106
|
+
|
|
107
|
+
return new runtime.VoidApiResponse(response);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
*
|
|
112
|
+
*/
|
|
113
|
+
async createBankAccount(requestParameters: BankAccountsApiCreateBankAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
114
|
+
await this.createBankAccountRaw(requestParameters, initOverrides);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
*
|
|
119
|
+
*/
|
|
120
|
+
async deleteBankAccountRaw(requestParameters: BankAccountsApiDeleteBankAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
121
|
+
if (requestParameters['accountId'] == null) {
|
|
122
|
+
throw new runtime.RequiredError(
|
|
123
|
+
'accountId',
|
|
124
|
+
'Required parameter "accountId" was null or undefined when calling deleteBankAccount().'
|
|
125
|
+
);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
if (requestParameters['bankAccountId'] == null) {
|
|
129
|
+
throw new runtime.RequiredError(
|
|
130
|
+
'bankAccountId',
|
|
131
|
+
'Required parameter "bankAccountId" was null or undefined when calling deleteBankAccount().'
|
|
132
|
+
);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
const queryParameters: any = {};
|
|
136
|
+
|
|
137
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
138
|
+
|
|
139
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
140
|
+
const token = this.configuration.accessToken;
|
|
141
|
+
const tokenString = await token("bearer", []);
|
|
142
|
+
|
|
143
|
+
if (tokenString) {
|
|
144
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
const response = await this.request({
|
|
148
|
+
path: `/private/accounts/{accountId}/bank-accounts/{bankAccountId}`.replace(`{${"accountId"}}`, encodeURIComponent(String(requestParameters['accountId']))).replace(`{${"bankAccountId"}}`, encodeURIComponent(String(requestParameters['bankAccountId']))),
|
|
149
|
+
method: 'DELETE',
|
|
150
|
+
headers: headerParameters,
|
|
151
|
+
query: queryParameters,
|
|
152
|
+
}, initOverrides);
|
|
153
|
+
|
|
154
|
+
return new runtime.VoidApiResponse(response);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
*
|
|
159
|
+
*/
|
|
160
|
+
async deleteBankAccount(requestParameters: BankAccountsApiDeleteBankAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
161
|
+
await this.deleteBankAccountRaw(requestParameters, initOverrides);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
*
|
|
166
|
+
*/
|
|
167
|
+
async listBankAccountsRaw(requestParameters: BankAccountsApiListBankAccountsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<AccountBankAccountDto>>> {
|
|
168
|
+
if (requestParameters['accountId'] == null) {
|
|
169
|
+
throw new runtime.RequiredError(
|
|
170
|
+
'accountId',
|
|
171
|
+
'Required parameter "accountId" was null or undefined when calling listBankAccounts().'
|
|
172
|
+
);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
const queryParameters: any = {};
|
|
176
|
+
|
|
177
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
178
|
+
|
|
179
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
180
|
+
const token = this.configuration.accessToken;
|
|
181
|
+
const tokenString = await token("bearer", []);
|
|
182
|
+
|
|
183
|
+
if (tokenString) {
|
|
184
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
const response = await this.request({
|
|
188
|
+
path: `/private/accounts/{accountId}/bank-accounts`.replace(`{${"accountId"}}`, encodeURIComponent(String(requestParameters['accountId']))),
|
|
189
|
+
method: 'GET',
|
|
190
|
+
headers: headerParameters,
|
|
191
|
+
query: queryParameters,
|
|
192
|
+
}, initOverrides);
|
|
193
|
+
|
|
194
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(AccountBankAccountDtoFromJSON));
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
*
|
|
199
|
+
*/
|
|
200
|
+
async listBankAccounts(requestParameters: BankAccountsApiListBankAccountsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<AccountBankAccountDto>> {
|
|
201
|
+
const response = await this.listBankAccountsRaw(requestParameters, initOverrides);
|
|
202
|
+
return await response.value();
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
*
|
|
207
|
+
*/
|
|
208
|
+
async makeBankAccountPrimaryRaw(requestParameters: BankAccountsApiMakeBankAccountPrimaryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
209
|
+
if (requestParameters['accountId'] == null) {
|
|
210
|
+
throw new runtime.RequiredError(
|
|
211
|
+
'accountId',
|
|
212
|
+
'Required parameter "accountId" was null or undefined when calling makeBankAccountPrimary().'
|
|
213
|
+
);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
if (requestParameters['bankAccountId'] == null) {
|
|
217
|
+
throw new runtime.RequiredError(
|
|
218
|
+
'bankAccountId',
|
|
219
|
+
'Required parameter "bankAccountId" was null or undefined when calling makeBankAccountPrimary().'
|
|
220
|
+
);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
const queryParameters: any = {};
|
|
224
|
+
|
|
225
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
226
|
+
|
|
227
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
228
|
+
const token = this.configuration.accessToken;
|
|
229
|
+
const tokenString = await token("bearer", []);
|
|
230
|
+
|
|
231
|
+
if (tokenString) {
|
|
232
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
const response = await this.request({
|
|
236
|
+
path: `/private/accounts/{accountId}/bank-accounts/{bankAccountId}/make-primary`.replace(`{${"accountId"}}`, encodeURIComponent(String(requestParameters['accountId']))).replace(`{${"bankAccountId"}}`, encodeURIComponent(String(requestParameters['bankAccountId']))),
|
|
237
|
+
method: 'POST',
|
|
238
|
+
headers: headerParameters,
|
|
239
|
+
query: queryParameters,
|
|
240
|
+
}, initOverrides);
|
|
241
|
+
|
|
242
|
+
return new runtime.VoidApiResponse(response);
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
*
|
|
247
|
+
*/
|
|
248
|
+
async makeBankAccountPrimary(requestParameters: BankAccountsApiMakeBankAccountPrimaryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
249
|
+
await this.makeBankAccountPrimaryRaw(requestParameters, initOverrides);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
*
|
|
254
|
+
*/
|
|
255
|
+
async updateBankAccountRaw(requestParameters: BankAccountsApiUpdateBankAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
256
|
+
if (requestParameters['accountId'] == null) {
|
|
257
|
+
throw new runtime.RequiredError(
|
|
258
|
+
'accountId',
|
|
259
|
+
'Required parameter "accountId" was null or undefined when calling updateBankAccount().'
|
|
260
|
+
);
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
if (requestParameters['bankAccountId'] == null) {
|
|
264
|
+
throw new runtime.RequiredError(
|
|
265
|
+
'bankAccountId',
|
|
266
|
+
'Required parameter "bankAccountId" was null or undefined when calling updateBankAccount().'
|
|
267
|
+
);
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
if (requestParameters['updateBankAccountInput'] == null) {
|
|
271
|
+
throw new runtime.RequiredError(
|
|
272
|
+
'updateBankAccountInput',
|
|
273
|
+
'Required parameter "updateBankAccountInput" was null or undefined when calling updateBankAccount().'
|
|
274
|
+
);
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
const queryParameters: any = {};
|
|
278
|
+
|
|
279
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
280
|
+
|
|
281
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
282
|
+
|
|
283
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
284
|
+
const token = this.configuration.accessToken;
|
|
285
|
+
const tokenString = await token("bearer", []);
|
|
286
|
+
|
|
287
|
+
if (tokenString) {
|
|
288
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
const response = await this.request({
|
|
292
|
+
path: `/private/accounts/{accountId}/bank-accounts/{bankAccountId}`.replace(`{${"accountId"}}`, encodeURIComponent(String(requestParameters['accountId']))).replace(`{${"bankAccountId"}}`, encodeURIComponent(String(requestParameters['bankAccountId']))),
|
|
293
|
+
method: 'PATCH',
|
|
294
|
+
headers: headerParameters,
|
|
295
|
+
query: queryParameters,
|
|
296
|
+
body: UpdateBankAccountInputToJSON(requestParameters['updateBankAccountInput']),
|
|
297
|
+
}, initOverrides);
|
|
298
|
+
|
|
299
|
+
return new runtime.VoidApiResponse(response);
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
*
|
|
304
|
+
*/
|
|
305
|
+
async updateBankAccount(requestParameters: BankAccountsApiUpdateBankAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
306
|
+
await this.updateBankAccountRaw(requestParameters, initOverrides);
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
}
|
package/src/apis/index.ts
CHANGED