@randock/nameshift-api-client 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +45 -0
- package/.openapi-generator/VERSION +1 -0
- package/.openapi-generator-ignore +23 -0
- package/README.md +45 -0
- package/dist/apis/AccountsApi.d.ts +54 -0
- package/dist/apis/AccountsApi.js +254 -0
- package/dist/apis/AuthApi.d.ts +27 -0
- package/dist/apis/AuthApi.js +124 -0
- package/dist/apis/DomainsApi.d.ts +77 -0
- package/dist/apis/DomainsApi.js +374 -0
- package/dist/apis/LeadsApi.d.ts +27 -0
- package/dist/apis/LeadsApi.js +124 -0
- package/dist/apis/TestApi.d.ts +23 -0
- package/dist/apis/TestApi.js +116 -0
- package/dist/apis/index.d.ts +5 -0
- package/dist/apis/index.js +23 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +21 -0
- package/dist/models/AccountAddressDto.d.ts +68 -0
- package/dist/models/AccountAddressDto.js +71 -0
- package/dist/models/AccountAddressInput.d.ts +68 -0
- package/dist/models/AccountAddressInput.js +71 -0
- package/dist/models/AccountFinancialInput.d.ts +49 -0
- package/dist/models/AccountFinancialInput.js +59 -0
- package/dist/models/AccountSettingsInput.d.ts +32 -0
- package/dist/models/AccountSettingsInput.js +51 -0
- package/dist/models/BatchUpdate404Response.d.ts +43 -0
- package/dist/models/BatchUpdate404Response.js +56 -0
- package/dist/models/BatchUpdateDomainsInput.d.ts +38 -0
- package/dist/models/BatchUpdateDomainsInput.js +54 -0
- package/dist/models/CreateLeadInput.d.ts +61 -0
- package/dist/models/CreateLeadInput.js +65 -0
- package/dist/models/DomainDto.d.ts +62 -0
- package/dist/models/DomainDto.js +66 -0
- package/dist/models/ImportDomainsDto.d.ts +49 -0
- package/dist/models/ImportDomainsDto.js +59 -0
- package/dist/models/IntersectionAccountDtoWithAddressDto.d.ts +38 -0
- package/dist/models/IntersectionAccountDtoWithAddressDto.js +54 -0
- package/dist/models/IntersectionAccountDtoWithFinancialDto.d.ts +38 -0
- package/dist/models/IntersectionAccountDtoWithFinancialDto.js +54 -0
- package/dist/models/IntersectionAccountDtoWithFinancialDtoFinancial.d.ts +49 -0
- package/dist/models/IntersectionAccountDtoWithFinancialDtoFinancial.js +56 -0
- package/dist/models/IntersectionAccountDtoWithSettingsDto.d.ts +38 -0
- package/dist/models/IntersectionAccountDtoWithSettingsDto.js +54 -0
- package/dist/models/IntersectionAccountDtoWithSettingsDtoSettings.d.ts +32 -0
- package/dist/models/IntersectionAccountDtoWithSettingsDtoSettings.js +51 -0
- package/dist/models/LeadDto.d.ts +31 -0
- package/dist/models/LeadDto.js +50 -0
- package/dist/models/List200Response.d.ts +46 -0
- package/dist/models/List200Response.js +59 -0
- package/dist/models/List400Response.d.ts +43 -0
- package/dist/models/List400Response.js +56 -0
- package/dist/models/List401Response.d.ts +43 -0
- package/dist/models/List401Response.js +56 -0
- package/dist/models/List429Response.d.ts +43 -0
- package/dist/models/List429Response.js +56 -0
- package/dist/models/LoginInput.d.ts +37 -0
- package/dist/models/LoginInput.js +53 -0
- package/dist/models/MoneyDto.d.ts +37 -0
- package/dist/models/MoneyDto.js +53 -0
- package/dist/models/MoneyInput.d.ts +37 -0
- package/dist/models/MoneyInput.js +53 -0
- package/dist/models/PaginateResponse.d.ts +45 -0
- package/dist/models/PaginateResponse.js +58 -0
- package/dist/models/PaginateResponseLinks.d.ts +55 -0
- package/dist/models/PaginateResponseLinks.js +58 -0
- package/dist/models/PaginateResponseMeta.d.ts +67 -0
- package/dist/models/PaginateResponseMeta.js +62 -0
- package/dist/models/TokenDto.d.ts +31 -0
- package/dist/models/TokenDto.js +50 -0
- package/dist/models/UpdateDomainInput.d.ts +38 -0
- package/dist/models/UpdateDomainInput.js +53 -0
- package/dist/models/UpdateSettings401Response.d.ts +43 -0
- package/dist/models/UpdateSettings401Response.js +56 -0
- package/dist/models/UserAuthControllerLogin401Response.d.ts +43 -0
- package/dist/models/UserAuthControllerLogin401Response.js +56 -0
- package/dist/models/UserAuthControllerLogin429Response.d.ts +43 -0
- package/dist/models/UserAuthControllerLogin429Response.js +56 -0
- package/dist/models/index.d.ts +30 -0
- package/dist/models/index.js +48 -0
- package/dist/runtime.d.ts +182 -0
- package/dist/runtime.js +562 -0
- package/package.json +19 -0
- package/src/apis/AccountsApi.ts +201 -0
- package/src/apis/AuthApi.ts +74 -0
- package/src/apis/DomainsApi.ts +305 -0
- package/src/apis/LeadsApi.ts +71 -0
- package/src/apis/TestApi.ts +46 -0
- package/src/apis/index.ts +7 -0
- package/src/index.ts +5 -0
- package/src/models/AccountAddressDto.ts +120 -0
- package/src/models/AccountAddressInput.ts +120 -0
- package/src/models/AccountFinancialInput.ts +93 -0
- package/src/models/AccountSettingsInput.ts +72 -0
- package/src/models/BatchUpdate404Response.ts +83 -0
- package/src/models/BatchUpdateDomainsInput.ts +82 -0
- package/src/models/CreateLeadInput.ts +111 -0
- package/src/models/DomainDto.ts +118 -0
- package/src/models/ImportDomainsDto.ts +93 -0
- package/src/models/IntersectionAccountDtoWithAddressDto.ts +82 -0
- package/src/models/IntersectionAccountDtoWithFinancialDto.ts +82 -0
- package/src/models/IntersectionAccountDtoWithFinancialDtoFinancial.ts +89 -0
- package/src/models/IntersectionAccountDtoWithSettingsDto.ts +82 -0
- package/src/models/IntersectionAccountDtoWithSettingsDtoSettings.ts +72 -0
- package/src/models/LeadDto.ts +66 -0
- package/src/models/List200Response.ts +103 -0
- package/src/models/List400Response.ts +83 -0
- package/src/models/List401Response.ts +83 -0
- package/src/models/List429Response.ts +83 -0
- package/src/models/LoginInput.ts +75 -0
- package/src/models/MoneyDto.ts +75 -0
- package/src/models/MoneyInput.ts +75 -0
- package/src/models/PaginateResponse.ts +97 -0
- package/src/models/PaginateResponseLinks.ts +97 -0
- package/src/models/PaginateResponseMeta.ts +113 -0
- package/src/models/TokenDto.ts +66 -0
- package/src/models/UpdateDomainInput.ts +80 -0
- package/src/models/UpdateSettings401Response.ts +83 -0
- package/src/models/UserAuthControllerLogin401Response.ts +83 -0
- package/src/models/UserAuthControllerLogin429Response.ts +83 -0
- package/src/models/index.ts +32 -0
- package/src/runtime.ts +431 -0
- package/tsconfig.json +20 -0
|
@@ -0,0 +1,201 @@
|
|
|
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
|
+
AccountAddressInput,
|
|
19
|
+
AccountFinancialInput,
|
|
20
|
+
AccountSettingsInput,
|
|
21
|
+
IntersectionAccountDtoWithAddressDto,
|
|
22
|
+
IntersectionAccountDtoWithFinancialDto,
|
|
23
|
+
IntersectionAccountDtoWithSettingsDto,
|
|
24
|
+
List429Response,
|
|
25
|
+
UpdateSettings401Response,
|
|
26
|
+
} from '../models/index';
|
|
27
|
+
import {
|
|
28
|
+
AccountAddressInputFromJSON,
|
|
29
|
+
AccountAddressInputToJSON,
|
|
30
|
+
AccountFinancialInputFromJSON,
|
|
31
|
+
AccountFinancialInputToJSON,
|
|
32
|
+
AccountSettingsInputFromJSON,
|
|
33
|
+
AccountSettingsInputToJSON,
|
|
34
|
+
IntersectionAccountDtoWithAddressDtoFromJSON,
|
|
35
|
+
IntersectionAccountDtoWithAddressDtoToJSON,
|
|
36
|
+
IntersectionAccountDtoWithFinancialDtoFromJSON,
|
|
37
|
+
IntersectionAccountDtoWithFinancialDtoToJSON,
|
|
38
|
+
IntersectionAccountDtoWithSettingsDtoFromJSON,
|
|
39
|
+
IntersectionAccountDtoWithSettingsDtoToJSON,
|
|
40
|
+
List429ResponseFromJSON,
|
|
41
|
+
List429ResponseToJSON,
|
|
42
|
+
UpdateSettings401ResponseFromJSON,
|
|
43
|
+
UpdateSettings401ResponseToJSON,
|
|
44
|
+
} from '../models/index';
|
|
45
|
+
|
|
46
|
+
export interface UpdateAddressRequest {
|
|
47
|
+
accountId: string;
|
|
48
|
+
accountAddressInput: AccountAddressInput;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export interface UpdateFinancialRequest {
|
|
52
|
+
accountId: string;
|
|
53
|
+
accountFinancialInput: AccountFinancialInput;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export interface UpdateSettingsRequest {
|
|
57
|
+
accountId: string;
|
|
58
|
+
accountSettingsInput: AccountSettingsInput;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
*
|
|
63
|
+
*/
|
|
64
|
+
export class AccountsApi extends runtime.BaseAPI {
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
*
|
|
68
|
+
*/
|
|
69
|
+
async updateAddressRaw(requestParameters: UpdateAddressRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IntersectionAccountDtoWithAddressDto>> {
|
|
70
|
+
if (requestParameters.accountId === null || requestParameters.accountId === undefined) {
|
|
71
|
+
throw new runtime.RequiredError('accountId','Required parameter requestParameters.accountId was null or undefined when calling updateAddress.');
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
if (requestParameters.accountAddressInput === null || requestParameters.accountAddressInput === undefined) {
|
|
75
|
+
throw new runtime.RequiredError('accountAddressInput','Required parameter requestParameters.accountAddressInput was null or undefined when calling updateAddress.');
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
const queryParameters: any = {};
|
|
79
|
+
|
|
80
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
81
|
+
|
|
82
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
83
|
+
|
|
84
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
85
|
+
const token = this.configuration.accessToken;
|
|
86
|
+
const tokenString = await token("bearer", []);
|
|
87
|
+
|
|
88
|
+
if (tokenString) {
|
|
89
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
const response = await this.request({
|
|
93
|
+
path: `/accounts/{accountId}/addresses`.replace(`{${"accountId"}}`, encodeURIComponent(String(requestParameters.accountId))),
|
|
94
|
+
method: 'PUT',
|
|
95
|
+
headers: headerParameters,
|
|
96
|
+
query: queryParameters,
|
|
97
|
+
body: AccountAddressInputToJSON(requestParameters.accountAddressInput),
|
|
98
|
+
}, initOverrides);
|
|
99
|
+
|
|
100
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => IntersectionAccountDtoWithAddressDtoFromJSON(jsonValue));
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
*
|
|
105
|
+
*/
|
|
106
|
+
async updateAddress(requestParameters: UpdateAddressRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IntersectionAccountDtoWithAddressDto> {
|
|
107
|
+
const response = await this.updateAddressRaw(requestParameters, initOverrides);
|
|
108
|
+
return await response.value();
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
*
|
|
113
|
+
*/
|
|
114
|
+
async updateFinancialRaw(requestParameters: UpdateFinancialRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IntersectionAccountDtoWithFinancialDto>> {
|
|
115
|
+
if (requestParameters.accountId === null || requestParameters.accountId === undefined) {
|
|
116
|
+
throw new runtime.RequiredError('accountId','Required parameter requestParameters.accountId was null or undefined when calling updateFinancial.');
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
if (requestParameters.accountFinancialInput === null || requestParameters.accountFinancialInput === undefined) {
|
|
120
|
+
throw new runtime.RequiredError('accountFinancialInput','Required parameter requestParameters.accountFinancialInput was null or undefined when calling updateFinancial.');
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
const queryParameters: any = {};
|
|
124
|
+
|
|
125
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
126
|
+
|
|
127
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
128
|
+
|
|
129
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
130
|
+
const token = this.configuration.accessToken;
|
|
131
|
+
const tokenString = await token("bearer", []);
|
|
132
|
+
|
|
133
|
+
if (tokenString) {
|
|
134
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
const response = await this.request({
|
|
138
|
+
path: `/accounts/{accountId}/financial`.replace(`{${"accountId"}}`, encodeURIComponent(String(requestParameters.accountId))),
|
|
139
|
+
method: 'PUT',
|
|
140
|
+
headers: headerParameters,
|
|
141
|
+
query: queryParameters,
|
|
142
|
+
body: AccountFinancialInputToJSON(requestParameters.accountFinancialInput),
|
|
143
|
+
}, initOverrides);
|
|
144
|
+
|
|
145
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => IntersectionAccountDtoWithFinancialDtoFromJSON(jsonValue));
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
*
|
|
150
|
+
*/
|
|
151
|
+
async updateFinancial(requestParameters: UpdateFinancialRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IntersectionAccountDtoWithFinancialDto> {
|
|
152
|
+
const response = await this.updateFinancialRaw(requestParameters, initOverrides);
|
|
153
|
+
return await response.value();
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
*
|
|
158
|
+
*/
|
|
159
|
+
async updateSettingsRaw(requestParameters: UpdateSettingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IntersectionAccountDtoWithSettingsDto>> {
|
|
160
|
+
if (requestParameters.accountId === null || requestParameters.accountId === undefined) {
|
|
161
|
+
throw new runtime.RequiredError('accountId','Required parameter requestParameters.accountId was null or undefined when calling updateSettings.');
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
if (requestParameters.accountSettingsInput === null || requestParameters.accountSettingsInput === undefined) {
|
|
165
|
+
throw new runtime.RequiredError('accountSettingsInput','Required parameter requestParameters.accountSettingsInput was null or undefined when calling updateSettings.');
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
const queryParameters: any = {};
|
|
169
|
+
|
|
170
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
171
|
+
|
|
172
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
173
|
+
|
|
174
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
175
|
+
const token = this.configuration.accessToken;
|
|
176
|
+
const tokenString = await token("bearer", []);
|
|
177
|
+
|
|
178
|
+
if (tokenString) {
|
|
179
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
const response = await this.request({
|
|
183
|
+
path: `/accounts/{accountId}/settings`.replace(`{${"accountId"}}`, encodeURIComponent(String(requestParameters.accountId))),
|
|
184
|
+
method: 'PUT',
|
|
185
|
+
headers: headerParameters,
|
|
186
|
+
query: queryParameters,
|
|
187
|
+
body: AccountSettingsInputToJSON(requestParameters.accountSettingsInput),
|
|
188
|
+
}, initOverrides);
|
|
189
|
+
|
|
190
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => IntersectionAccountDtoWithSettingsDtoFromJSON(jsonValue));
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
*
|
|
195
|
+
*/
|
|
196
|
+
async updateSettings(requestParameters: UpdateSettingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IntersectionAccountDtoWithSettingsDto> {
|
|
197
|
+
const response = await this.updateSettingsRaw(requestParameters, initOverrides);
|
|
198
|
+
return await response.value();
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
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
|
+
LoginInput,
|
|
19
|
+
TokenDto,
|
|
20
|
+
UserAuthControllerLogin401Response,
|
|
21
|
+
UserAuthControllerLogin429Response,
|
|
22
|
+
} from '../models/index';
|
|
23
|
+
import {
|
|
24
|
+
LoginInputFromJSON,
|
|
25
|
+
LoginInputToJSON,
|
|
26
|
+
TokenDtoFromJSON,
|
|
27
|
+
TokenDtoToJSON,
|
|
28
|
+
UserAuthControllerLogin401ResponseFromJSON,
|
|
29
|
+
UserAuthControllerLogin401ResponseToJSON,
|
|
30
|
+
UserAuthControllerLogin429ResponseFromJSON,
|
|
31
|
+
UserAuthControllerLogin429ResponseToJSON,
|
|
32
|
+
} from '../models/index';
|
|
33
|
+
|
|
34
|
+
export interface UserAuthControllerLoginRequest {
|
|
35
|
+
loginInput: LoginInput;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
*
|
|
40
|
+
*/
|
|
41
|
+
export class AuthApi extends runtime.BaseAPI {
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
*/
|
|
45
|
+
async userAuthControllerLoginRaw(requestParameters: UserAuthControllerLoginRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TokenDto>> {
|
|
46
|
+
if (requestParameters.loginInput === null || requestParameters.loginInput === undefined) {
|
|
47
|
+
throw new runtime.RequiredError('loginInput','Required parameter requestParameters.loginInput was null or undefined when calling userAuthControllerLogin.');
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
const queryParameters: any = {};
|
|
51
|
+
|
|
52
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
53
|
+
|
|
54
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
55
|
+
|
|
56
|
+
const response = await this.request({
|
|
57
|
+
path: `/auth/login`,
|
|
58
|
+
method: 'POST',
|
|
59
|
+
headers: headerParameters,
|
|
60
|
+
query: queryParameters,
|
|
61
|
+
body: LoginInputToJSON(requestParameters.loginInput),
|
|
62
|
+
}, initOverrides);
|
|
63
|
+
|
|
64
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => TokenDtoFromJSON(jsonValue));
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
*/
|
|
69
|
+
async userAuthControllerLogin(requestParameters: UserAuthControllerLoginRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TokenDto> {
|
|
70
|
+
const response = await this.userAuthControllerLoginRaw(requestParameters, initOverrides);
|
|
71
|
+
return await response.value();
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
}
|
|
@@ -0,0 +1,305 @@
|
|
|
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
|
+
BatchUpdate404Response,
|
|
19
|
+
BatchUpdateDomainsInput,
|
|
20
|
+
DomainDto,
|
|
21
|
+
ImportDomainsDto,
|
|
22
|
+
List200Response,
|
|
23
|
+
List400Response,
|
|
24
|
+
List401Response,
|
|
25
|
+
List429Response,
|
|
26
|
+
UpdateDomainInput,
|
|
27
|
+
} from '../models/index';
|
|
28
|
+
import {
|
|
29
|
+
BatchUpdate404ResponseFromJSON,
|
|
30
|
+
BatchUpdate404ResponseToJSON,
|
|
31
|
+
BatchUpdateDomainsInputFromJSON,
|
|
32
|
+
BatchUpdateDomainsInputToJSON,
|
|
33
|
+
DomainDtoFromJSON,
|
|
34
|
+
DomainDtoToJSON,
|
|
35
|
+
ImportDomainsDtoFromJSON,
|
|
36
|
+
ImportDomainsDtoToJSON,
|
|
37
|
+
List200ResponseFromJSON,
|
|
38
|
+
List200ResponseToJSON,
|
|
39
|
+
List400ResponseFromJSON,
|
|
40
|
+
List400ResponseToJSON,
|
|
41
|
+
List401ResponseFromJSON,
|
|
42
|
+
List401ResponseToJSON,
|
|
43
|
+
List429ResponseFromJSON,
|
|
44
|
+
List429ResponseToJSON,
|
|
45
|
+
UpdateDomainInputFromJSON,
|
|
46
|
+
UpdateDomainInputToJSON,
|
|
47
|
+
} from '../models/index';
|
|
48
|
+
|
|
49
|
+
export interface ImportRequest {
|
|
50
|
+
file?: Blob | null;
|
|
51
|
+
domains?: Array<string>;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export interface BatchUpdateRequest {
|
|
55
|
+
batchUpdateDomainsInput: BatchUpdateDomainsInput;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export interface CheckDnsRequest {
|
|
59
|
+
domainId: string;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export interface ListRequest {
|
|
63
|
+
page?: number;
|
|
64
|
+
limit?: number;
|
|
65
|
+
sort?: Array<string>;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export interface UpdateRequest {
|
|
69
|
+
domainId: string;
|
|
70
|
+
updateDomainInput: UpdateDomainInput;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
*
|
|
75
|
+
*/
|
|
76
|
+
export class DomainsApi extends runtime.BaseAPI {
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
*
|
|
80
|
+
*/
|
|
81
|
+
async _importRaw(requestParameters: ImportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ImportDomainsDto>> {
|
|
82
|
+
const queryParameters: any = {};
|
|
83
|
+
|
|
84
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
85
|
+
|
|
86
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
87
|
+
const token = this.configuration.accessToken;
|
|
88
|
+
const tokenString = await token("bearer", []);
|
|
89
|
+
|
|
90
|
+
if (tokenString) {
|
|
91
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
const consumes: runtime.Consume[] = [
|
|
95
|
+
{ contentType: 'multipart/form-data' },
|
|
96
|
+
];
|
|
97
|
+
// @ts-ignore: canConsumeForm may be unused
|
|
98
|
+
const canConsumeForm = runtime.canConsumeForm(consumes);
|
|
99
|
+
|
|
100
|
+
let formParams: { append(param: string, value: any): any };
|
|
101
|
+
let useForm = false;
|
|
102
|
+
// use FormData to transmit files using content-type "multipart/form-data"
|
|
103
|
+
useForm = canConsumeForm;
|
|
104
|
+
if (useForm) {
|
|
105
|
+
formParams = new FormData();
|
|
106
|
+
} else {
|
|
107
|
+
formParams = new URLSearchParams();
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
if (requestParameters.file !== undefined) {
|
|
111
|
+
formParams.append('file', requestParameters.file as any);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
if (requestParameters.domains) {
|
|
115
|
+
formParams.append('domains', requestParameters.domains.join(runtime.COLLECTION_FORMATS["csv"]));
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
const response = await this.request({
|
|
119
|
+
path: `/domains`,
|
|
120
|
+
method: 'POST',
|
|
121
|
+
headers: headerParameters,
|
|
122
|
+
query: queryParameters,
|
|
123
|
+
body: formParams,
|
|
124
|
+
}, initOverrides);
|
|
125
|
+
|
|
126
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ImportDomainsDtoFromJSON(jsonValue));
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
*
|
|
131
|
+
*/
|
|
132
|
+
async _import(requestParameters: ImportRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ImportDomainsDto> {
|
|
133
|
+
const response = await this._importRaw(requestParameters, initOverrides);
|
|
134
|
+
return await response.value();
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
*
|
|
139
|
+
*/
|
|
140
|
+
async batchUpdateRaw(requestParameters: BatchUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
141
|
+
if (requestParameters.batchUpdateDomainsInput === null || requestParameters.batchUpdateDomainsInput === undefined) {
|
|
142
|
+
throw new runtime.RequiredError('batchUpdateDomainsInput','Required parameter requestParameters.batchUpdateDomainsInput was null or undefined when calling batchUpdate.');
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
const queryParameters: any = {};
|
|
146
|
+
|
|
147
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
148
|
+
|
|
149
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
150
|
+
|
|
151
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
152
|
+
const token = this.configuration.accessToken;
|
|
153
|
+
const tokenString = await token("bearer", []);
|
|
154
|
+
|
|
155
|
+
if (tokenString) {
|
|
156
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
const response = await this.request({
|
|
160
|
+
path: `/domains`,
|
|
161
|
+
method: 'PUT',
|
|
162
|
+
headers: headerParameters,
|
|
163
|
+
query: queryParameters,
|
|
164
|
+
body: BatchUpdateDomainsInputToJSON(requestParameters.batchUpdateDomainsInput),
|
|
165
|
+
}, initOverrides);
|
|
166
|
+
|
|
167
|
+
return new runtime.VoidApiResponse(response);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
*
|
|
172
|
+
*/
|
|
173
|
+
async batchUpdate(requestParameters: BatchUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
174
|
+
await this.batchUpdateRaw(requestParameters, initOverrides);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
*
|
|
179
|
+
*/
|
|
180
|
+
async checkDnsRaw(requestParameters: CheckDnsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
181
|
+
if (requestParameters.domainId === null || requestParameters.domainId === undefined) {
|
|
182
|
+
throw new runtime.RequiredError('domainId','Required parameter requestParameters.domainId was null or undefined when calling checkDns.');
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
const queryParameters: any = {};
|
|
186
|
+
|
|
187
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
188
|
+
|
|
189
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
190
|
+
const token = this.configuration.accessToken;
|
|
191
|
+
const tokenString = await token("bearer", []);
|
|
192
|
+
|
|
193
|
+
if (tokenString) {
|
|
194
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
const response = await this.request({
|
|
198
|
+
path: `/domains/{domainId}/check_ns`.replace(`{${"domainId"}}`, encodeURIComponent(String(requestParameters.domainId))),
|
|
199
|
+
method: 'POST',
|
|
200
|
+
headers: headerParameters,
|
|
201
|
+
query: queryParameters,
|
|
202
|
+
}, initOverrides);
|
|
203
|
+
|
|
204
|
+
return new runtime.VoidApiResponse(response);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
*
|
|
209
|
+
*/
|
|
210
|
+
async checkDns(requestParameters: CheckDnsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
211
|
+
await this.checkDnsRaw(requestParameters, initOverrides);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
*
|
|
216
|
+
*/
|
|
217
|
+
async listRaw(requestParameters: ListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<List200Response>> {
|
|
218
|
+
const queryParameters: any = {};
|
|
219
|
+
|
|
220
|
+
if (requestParameters.page !== undefined) {
|
|
221
|
+
queryParameters['page'] = requestParameters.page;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
if (requestParameters.limit !== undefined) {
|
|
225
|
+
queryParameters['limit'] = requestParameters.limit;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
if (requestParameters.sort) {
|
|
229
|
+
queryParameters['sort'] = requestParameters.sort;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
233
|
+
|
|
234
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
235
|
+
const token = this.configuration.accessToken;
|
|
236
|
+
const tokenString = await token("bearer", []);
|
|
237
|
+
|
|
238
|
+
if (tokenString) {
|
|
239
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
const response = await this.request({
|
|
243
|
+
path: `/domains`,
|
|
244
|
+
method: 'GET',
|
|
245
|
+
headers: headerParameters,
|
|
246
|
+
query: queryParameters,
|
|
247
|
+
}, initOverrides);
|
|
248
|
+
|
|
249
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => List200ResponseFromJSON(jsonValue));
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
*
|
|
254
|
+
*/
|
|
255
|
+
async list(requestParameters: ListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<List200Response> {
|
|
256
|
+
const response = await this.listRaw(requestParameters, initOverrides);
|
|
257
|
+
return await response.value();
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
*
|
|
262
|
+
*/
|
|
263
|
+
async updateRaw(requestParameters: UpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DomainDto>> {
|
|
264
|
+
if (requestParameters.domainId === null || requestParameters.domainId === undefined) {
|
|
265
|
+
throw new runtime.RequiredError('domainId','Required parameter requestParameters.domainId was null or undefined when calling update.');
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
if (requestParameters.updateDomainInput === null || requestParameters.updateDomainInput === undefined) {
|
|
269
|
+
throw new runtime.RequiredError('updateDomainInput','Required parameter requestParameters.updateDomainInput was null or undefined when calling update.');
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
const queryParameters: any = {};
|
|
273
|
+
|
|
274
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
275
|
+
|
|
276
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
277
|
+
|
|
278
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
279
|
+
const token = this.configuration.accessToken;
|
|
280
|
+
const tokenString = await token("bearer", []);
|
|
281
|
+
|
|
282
|
+
if (tokenString) {
|
|
283
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
const response = await this.request({
|
|
287
|
+
path: `/domains/{domainId}`.replace(`{${"domainId"}}`, encodeURIComponent(String(requestParameters.domainId))),
|
|
288
|
+
method: 'PUT',
|
|
289
|
+
headers: headerParameters,
|
|
290
|
+
query: queryParameters,
|
|
291
|
+
body: UpdateDomainInputToJSON(requestParameters.updateDomainInput),
|
|
292
|
+
}, initOverrides);
|
|
293
|
+
|
|
294
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => DomainDtoFromJSON(jsonValue));
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
/**
|
|
298
|
+
*
|
|
299
|
+
*/
|
|
300
|
+
async update(requestParameters: UpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DomainDto> {
|
|
301
|
+
const response = await this.updateRaw(requestParameters, initOverrides);
|
|
302
|
+
return await response.value();
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
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
|
+
BatchUpdate404Response,
|
|
19
|
+
CreateLeadInput,
|
|
20
|
+
LeadDto,
|
|
21
|
+
} from '../models/index';
|
|
22
|
+
import {
|
|
23
|
+
BatchUpdate404ResponseFromJSON,
|
|
24
|
+
BatchUpdate404ResponseToJSON,
|
|
25
|
+
CreateLeadInputFromJSON,
|
|
26
|
+
CreateLeadInputToJSON,
|
|
27
|
+
LeadDtoFromJSON,
|
|
28
|
+
LeadDtoToJSON,
|
|
29
|
+
} from '../models/index';
|
|
30
|
+
|
|
31
|
+
export interface LeadControllerPostLeadRequest {
|
|
32
|
+
createLeadInput: CreateLeadInput;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
*/
|
|
38
|
+
export class LeadsApi extends runtime.BaseAPI {
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
*/
|
|
42
|
+
async leadControllerPostLeadRaw(requestParameters: LeadControllerPostLeadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LeadDto>> {
|
|
43
|
+
if (requestParameters.createLeadInput === null || requestParameters.createLeadInput === undefined) {
|
|
44
|
+
throw new runtime.RequiredError('createLeadInput','Required parameter requestParameters.createLeadInput was null or undefined when calling leadControllerPostLead.');
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const queryParameters: any = {};
|
|
48
|
+
|
|
49
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
50
|
+
|
|
51
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
52
|
+
|
|
53
|
+
const response = await this.request({
|
|
54
|
+
path: `/leads`,
|
|
55
|
+
method: 'POST',
|
|
56
|
+
headers: headerParameters,
|
|
57
|
+
query: queryParameters,
|
|
58
|
+
body: CreateLeadInputToJSON(requestParameters.createLeadInput),
|
|
59
|
+
}, initOverrides);
|
|
60
|
+
|
|
61
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => LeadDtoFromJSON(jsonValue));
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
*/
|
|
66
|
+
async leadControllerPostLead(requestParameters: LeadControllerPostLeadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LeadDto> {
|
|
67
|
+
const response = await this.leadControllerPostLeadRaw(requestParameters, initOverrides);
|
|
68
|
+
return await response.value();
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
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
|
+
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
*/
|
|
21
|
+
export class TestApi extends runtime.BaseAPI {
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
*/
|
|
25
|
+
async testControllerTestRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
26
|
+
const queryParameters: any = {};
|
|
27
|
+
|
|
28
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
29
|
+
|
|
30
|
+
const response = await this.request({
|
|
31
|
+
path: `/testtesttest`,
|
|
32
|
+
method: 'GET',
|
|
33
|
+
headers: headerParameters,
|
|
34
|
+
query: queryParameters,
|
|
35
|
+
}, initOverrides);
|
|
36
|
+
|
|
37
|
+
return new runtime.VoidApiResponse(response);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
*/
|
|
42
|
+
async testControllerTest(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
43
|
+
await this.testControllerTestRaw(initOverrides);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
}
|