@randock/nameshift-api-client 0.0.313 → 0.0.314
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 +3 -3
- package/dist/apis/DomainsPublicApi.d.ts +12 -2
- package/dist/apis/DomainsPublicApi.js +44 -3
- package/dist/models/DomainSalesInformationDto.d.ts +3 -4
- package/dist/models/DomainSalesInformationDto.js +3 -4
- package/package.json +1 -1
- package/src/apis/DomainsPublicApi.ts +40 -5
- package/src/models/DomainSalesInformationDto.ts +6 -13
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## @randock/nameshift-api-client@0.0.
|
|
1
|
+
## @randock/nameshift-api-client@0.0.314
|
|
2
2
|
|
|
3
3
|
This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments:
|
|
4
4
|
|
|
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
|
|
|
36
36
|
_published:_
|
|
37
37
|
|
|
38
38
|
```
|
|
39
|
-
npm install @randock/nameshift-api-client@0.0.
|
|
39
|
+
npm install @randock/nameshift-api-client@0.0.314 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
|
@@ -44,4 +44,4 @@ _unPublished (not recommended):_
|
|
|
44
44
|
```
|
|
45
45
|
npm install PATH_TO_GENERATED_PACKAGE --save
|
|
46
46
|
```
|
|
47
|
-
|
|
47
|
+
7da53d0568629a609e0f92d1a20990bc02c7d98108da7ee82e4cc5cb105ae74060ceedbbc11cfacdbbe8e2c5a122cf91
|
|
@@ -10,16 +10,18 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { DomainSalesInformationDto, DomainTldsDto, List200Response3, SortDto } from '../models/index';
|
|
13
|
+
import type { DomainSalesInformationDto, DomainStatsDto, DomainTldsDto, List200Response3, SortDto } from '../models/index';
|
|
14
14
|
export interface DomainsPublicApiGetAllTldsRequest {
|
|
15
15
|
seller?: string;
|
|
16
16
|
}
|
|
17
17
|
export interface DomainsPublicApiGetDomainSalesInformationRequest {
|
|
18
18
|
domainName: string;
|
|
19
|
-
includeStats?: boolean;
|
|
20
19
|
preview?: boolean;
|
|
21
20
|
installments?: number;
|
|
22
21
|
}
|
|
22
|
+
export interface DomainsPublicApiGetDomainStatsRequest {
|
|
23
|
+
domainName: string;
|
|
24
|
+
}
|
|
23
25
|
export interface DomainsPublicApiListRequest {
|
|
24
26
|
fuzzy: boolean;
|
|
25
27
|
limit?: number;
|
|
@@ -48,6 +50,14 @@ export declare class DomainsPublicApi extends runtime.BaseAPI {
|
|
|
48
50
|
*
|
|
49
51
|
*/
|
|
50
52
|
getDomainSalesInformation(requestParameters: DomainsPublicApiGetDomainSalesInformationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DomainSalesInformationDto>;
|
|
53
|
+
/**
|
|
54
|
+
*
|
|
55
|
+
*/
|
|
56
|
+
getDomainStatsRaw(requestParameters: DomainsPublicApiGetDomainStatsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DomainStatsDto>>;
|
|
57
|
+
/**
|
|
58
|
+
*
|
|
59
|
+
*/
|
|
60
|
+
getDomainStats(requestParameters: DomainsPublicApiGetDomainStatsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DomainStatsDto>;
|
|
51
61
|
/**
|
|
52
62
|
*
|
|
53
63
|
*/
|
|
@@ -133,9 +133,6 @@ var DomainsPublicApi = /** @class */ (function (_super) {
|
|
|
133
133
|
throw new runtime.RequiredError('domainName', 'Required parameter "domainName" was null or undefined when calling getDomainSalesInformation().');
|
|
134
134
|
}
|
|
135
135
|
queryParameters = {};
|
|
136
|
-
if (requestParameters['includeStats'] != null) {
|
|
137
|
-
queryParameters['includeStats'] = requestParameters['includeStats'];
|
|
138
|
-
}
|
|
139
136
|
if (requestParameters['preview'] != null) {
|
|
140
137
|
queryParameters['preview'] = requestParameters['preview'];
|
|
141
138
|
}
|
|
@@ -173,6 +170,50 @@ var DomainsPublicApi = /** @class */ (function (_super) {
|
|
|
173
170
|
});
|
|
174
171
|
});
|
|
175
172
|
};
|
|
173
|
+
/**
|
|
174
|
+
*
|
|
175
|
+
*/
|
|
176
|
+
DomainsPublicApi.prototype.getDomainStatsRaw = function (requestParameters, initOverrides) {
|
|
177
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
178
|
+
var queryParameters, headerParameters, response;
|
|
179
|
+
return __generator(this, function (_a) {
|
|
180
|
+
switch (_a.label) {
|
|
181
|
+
case 0:
|
|
182
|
+
if (requestParameters['domainName'] == null) {
|
|
183
|
+
throw new runtime.RequiredError('domainName', 'Required parameter "domainName" was null or undefined when calling getDomainStats().');
|
|
184
|
+
}
|
|
185
|
+
queryParameters = {};
|
|
186
|
+
headerParameters = {};
|
|
187
|
+
return [4 /*yield*/, this.request({
|
|
188
|
+
path: "/domains/by-name/{domainName}/stats".replace("{".concat("domainName", "}"), encodeURIComponent(String(requestParameters['domainName']))),
|
|
189
|
+
method: 'GET',
|
|
190
|
+
headers: headerParameters,
|
|
191
|
+
query: queryParameters,
|
|
192
|
+
}, initOverrides)];
|
|
193
|
+
case 1:
|
|
194
|
+
response = _a.sent();
|
|
195
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.DomainStatsDtoFromJSON)(jsonValue); })];
|
|
196
|
+
}
|
|
197
|
+
});
|
|
198
|
+
});
|
|
199
|
+
};
|
|
200
|
+
/**
|
|
201
|
+
*
|
|
202
|
+
*/
|
|
203
|
+
DomainsPublicApi.prototype.getDomainStats = function (requestParameters, initOverrides) {
|
|
204
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
205
|
+
var response;
|
|
206
|
+
return __generator(this, function (_a) {
|
|
207
|
+
switch (_a.label) {
|
|
208
|
+
case 0: return [4 /*yield*/, this.getDomainStatsRaw(requestParameters, initOverrides)];
|
|
209
|
+
case 1:
|
|
210
|
+
response = _a.sent();
|
|
211
|
+
return [4 /*yield*/, response.value()];
|
|
212
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
213
|
+
}
|
|
214
|
+
});
|
|
215
|
+
});
|
|
216
|
+
};
|
|
176
217
|
/**
|
|
177
218
|
*
|
|
178
219
|
*/
|
|
@@ -13,7 +13,6 @@ import type { DomainSellerDto } from './DomainSellerDto';
|
|
|
13
13
|
import type { LeadBuyerConfigDto } from './LeadBuyerConfigDto';
|
|
14
14
|
import type { MoneyDto } from './MoneyDto';
|
|
15
15
|
import type { DomainSalesInformationRentConfigurationDto } from './DomainSalesInformationRentConfigurationDto';
|
|
16
|
-
import type { DomainStatsDto } from './DomainStatsDto';
|
|
17
16
|
import type { DomainSalesInformationLeaseToOwnConfigurationDto } from './DomainSalesInformationLeaseToOwnConfigurationDto';
|
|
18
17
|
import type { SeoMetricsDto } from './SeoMetricsDto';
|
|
19
18
|
/**
|
|
@@ -83,11 +82,11 @@ export interface DomainSalesInformationDto {
|
|
|
83
82
|
*/
|
|
84
83
|
seo: SeoMetricsDto | null;
|
|
85
84
|
/**
|
|
86
|
-
*
|
|
87
|
-
* @type {
|
|
85
|
+
* Stats enabled
|
|
86
|
+
* @type {boolean}
|
|
88
87
|
* @memberof DomainSalesInformationDto
|
|
89
88
|
*/
|
|
90
|
-
|
|
89
|
+
statsEnabled: boolean;
|
|
91
90
|
/**
|
|
92
91
|
* Lead buyer settings
|
|
93
92
|
* @type {LeadBuyerConfigDto}
|
|
@@ -22,7 +22,6 @@ var DomainSellerDto_1 = require("./DomainSellerDto");
|
|
|
22
22
|
var LeadBuyerConfigDto_1 = require("./LeadBuyerConfigDto");
|
|
23
23
|
var MoneyDto_1 = require("./MoneyDto");
|
|
24
24
|
var DomainSalesInformationRentConfigurationDto_1 = require("./DomainSalesInformationRentConfigurationDto");
|
|
25
|
-
var DomainStatsDto_1 = require("./DomainStatsDto");
|
|
26
25
|
var DomainSalesInformationLeaseToOwnConfigurationDto_1 = require("./DomainSalesInformationLeaseToOwnConfigurationDto");
|
|
27
26
|
var SeoMetricsDto_1 = require("./SeoMetricsDto");
|
|
28
27
|
/**
|
|
@@ -49,7 +48,7 @@ function instanceOfDomainSalesInformationDto(value) {
|
|
|
49
48
|
return false;
|
|
50
49
|
if (!('seo' in value) || value['seo'] === undefined)
|
|
51
50
|
return false;
|
|
52
|
-
if (!('
|
|
51
|
+
if (!('statsEnabled' in value) || value['statsEnabled'] === undefined)
|
|
53
52
|
return false;
|
|
54
53
|
if (!('leadBuyerSettings' in value) || value['leadBuyerSettings'] === undefined)
|
|
55
54
|
return false;
|
|
@@ -73,7 +72,7 @@ function DomainSalesInformationDtoFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
73
72
|
'sold': json['sold'],
|
|
74
73
|
'isPurchaseable': json['isPurchaseable'],
|
|
75
74
|
'seo': (0, SeoMetricsDto_1.SeoMetricsDtoFromJSON)(json['seo']),
|
|
76
|
-
'
|
|
75
|
+
'statsEnabled': json['statsEnabled'],
|
|
77
76
|
'leadBuyerSettings': (0, LeadBuyerConfigDto_1.LeadBuyerConfigDtoFromJSON)(json['leadBuyerSettings']),
|
|
78
77
|
};
|
|
79
78
|
}
|
|
@@ -96,7 +95,7 @@ function DomainSalesInformationDtoToJSONTyped(value, ignoreDiscriminator) {
|
|
|
96
95
|
'sold': value['sold'],
|
|
97
96
|
'isPurchaseable': value['isPurchaseable'],
|
|
98
97
|
'seo': (0, SeoMetricsDto_1.SeoMetricsDtoToJSON)(value['seo']),
|
|
99
|
-
'
|
|
98
|
+
'statsEnabled': value['statsEnabled'],
|
|
100
99
|
'leadBuyerSettings': (0, LeadBuyerConfigDto_1.LeadBuyerConfigDtoToJSON)(value['leadBuyerSettings']),
|
|
101
100
|
};
|
|
102
101
|
}
|
package/package.json
CHANGED
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
import * as runtime from '../runtime';
|
|
17
17
|
import type {
|
|
18
18
|
DomainSalesInformationDto,
|
|
19
|
+
DomainStatsDto,
|
|
19
20
|
DomainTldsDto,
|
|
20
21
|
List200Response3,
|
|
21
22
|
NotFoundException,
|
|
@@ -26,6 +27,8 @@ import type {
|
|
|
26
27
|
import {
|
|
27
28
|
DomainSalesInformationDtoFromJSON,
|
|
28
29
|
DomainSalesInformationDtoToJSON,
|
|
30
|
+
DomainStatsDtoFromJSON,
|
|
31
|
+
DomainStatsDtoToJSON,
|
|
29
32
|
DomainTldsDtoFromJSON,
|
|
30
33
|
DomainTldsDtoToJSON,
|
|
31
34
|
List200Response3FromJSON,
|
|
@@ -46,11 +49,14 @@ export interface DomainsPublicApiGetAllTldsRequest {
|
|
|
46
49
|
|
|
47
50
|
export interface DomainsPublicApiGetDomainSalesInformationRequest {
|
|
48
51
|
domainName: string;
|
|
49
|
-
includeStats?: boolean;
|
|
50
52
|
preview?: boolean;
|
|
51
53
|
installments?: number;
|
|
52
54
|
}
|
|
53
55
|
|
|
56
|
+
export interface DomainsPublicApiGetDomainStatsRequest {
|
|
57
|
+
domainName: string;
|
|
58
|
+
}
|
|
59
|
+
|
|
54
60
|
export interface DomainsPublicApiListRequest {
|
|
55
61
|
fuzzy: boolean;
|
|
56
62
|
limit?: number;
|
|
@@ -108,10 +114,6 @@ export class DomainsPublicApi extends runtime.BaseAPI {
|
|
|
108
114
|
|
|
109
115
|
const queryParameters: any = {};
|
|
110
116
|
|
|
111
|
-
if (requestParameters['includeStats'] != null) {
|
|
112
|
-
queryParameters['includeStats'] = requestParameters['includeStats'];
|
|
113
|
-
}
|
|
114
|
-
|
|
115
117
|
if (requestParameters['preview'] != null) {
|
|
116
118
|
queryParameters['preview'] = requestParameters['preview'];
|
|
117
119
|
}
|
|
@@ -140,6 +142,39 @@ export class DomainsPublicApi extends runtime.BaseAPI {
|
|
|
140
142
|
return await response.value();
|
|
141
143
|
}
|
|
142
144
|
|
|
145
|
+
/**
|
|
146
|
+
*
|
|
147
|
+
*/
|
|
148
|
+
async getDomainStatsRaw(requestParameters: DomainsPublicApiGetDomainStatsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DomainStatsDto>> {
|
|
149
|
+
if (requestParameters['domainName'] == null) {
|
|
150
|
+
throw new runtime.RequiredError(
|
|
151
|
+
'domainName',
|
|
152
|
+
'Required parameter "domainName" was null or undefined when calling getDomainStats().'
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
const queryParameters: any = {};
|
|
157
|
+
|
|
158
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
159
|
+
|
|
160
|
+
const response = await this.request({
|
|
161
|
+
path: `/domains/by-name/{domainName}/stats`.replace(`{${"domainName"}}`, encodeURIComponent(String(requestParameters['domainName']))),
|
|
162
|
+
method: 'GET',
|
|
163
|
+
headers: headerParameters,
|
|
164
|
+
query: queryParameters,
|
|
165
|
+
}, initOverrides);
|
|
166
|
+
|
|
167
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => DomainStatsDtoFromJSON(jsonValue));
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
*
|
|
172
|
+
*/
|
|
173
|
+
async getDomainStats(requestParameters: DomainsPublicApiGetDomainStatsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DomainStatsDto> {
|
|
174
|
+
const response = await this.getDomainStatsRaw(requestParameters, initOverrides);
|
|
175
|
+
return await response.value();
|
|
176
|
+
}
|
|
177
|
+
|
|
143
178
|
/**
|
|
144
179
|
*
|
|
145
180
|
*/
|
|
@@ -41,13 +41,6 @@ import {
|
|
|
41
41
|
DomainSalesInformationRentConfigurationDtoToJSON,
|
|
42
42
|
DomainSalesInformationRentConfigurationDtoToJSONTyped,
|
|
43
43
|
} from './DomainSalesInformationRentConfigurationDto';
|
|
44
|
-
import type { DomainStatsDto } from './DomainStatsDto';
|
|
45
|
-
import {
|
|
46
|
-
DomainStatsDtoFromJSON,
|
|
47
|
-
DomainStatsDtoFromJSONTyped,
|
|
48
|
-
DomainStatsDtoToJSON,
|
|
49
|
-
DomainStatsDtoToJSONTyped,
|
|
50
|
-
} from './DomainStatsDto';
|
|
51
44
|
import type { DomainSalesInformationLeaseToOwnConfigurationDto } from './DomainSalesInformationLeaseToOwnConfigurationDto';
|
|
52
45
|
import {
|
|
53
46
|
DomainSalesInformationLeaseToOwnConfigurationDtoFromJSON,
|
|
@@ -130,11 +123,11 @@ export interface DomainSalesInformationDto {
|
|
|
130
123
|
*/
|
|
131
124
|
seo: SeoMetricsDto | null;
|
|
132
125
|
/**
|
|
133
|
-
*
|
|
134
|
-
* @type {
|
|
126
|
+
* Stats enabled
|
|
127
|
+
* @type {boolean}
|
|
135
128
|
* @memberof DomainSalesInformationDto
|
|
136
129
|
*/
|
|
137
|
-
|
|
130
|
+
statsEnabled: boolean;
|
|
138
131
|
/**
|
|
139
132
|
* Lead buyer settings
|
|
140
133
|
* @type {LeadBuyerConfigDto}
|
|
@@ -157,7 +150,7 @@ export function instanceOfDomainSalesInformationDto(value: object): value is Dom
|
|
|
157
150
|
if (!('sold' in value) || value['sold'] === undefined) return false;
|
|
158
151
|
if (!('isPurchaseable' in value) || value['isPurchaseable'] === undefined) return false;
|
|
159
152
|
if (!('seo' in value) || value['seo'] === undefined) return false;
|
|
160
|
-
if (!('
|
|
153
|
+
if (!('statsEnabled' in value) || value['statsEnabled'] === undefined) return false;
|
|
161
154
|
if (!('leadBuyerSettings' in value) || value['leadBuyerSettings'] === undefined) return false;
|
|
162
155
|
return true;
|
|
163
156
|
}
|
|
@@ -182,7 +175,7 @@ export function DomainSalesInformationDtoFromJSONTyped(json: any, ignoreDiscrimi
|
|
|
182
175
|
'sold': json['sold'],
|
|
183
176
|
'isPurchaseable': json['isPurchaseable'],
|
|
184
177
|
'seo': SeoMetricsDtoFromJSON(json['seo']),
|
|
185
|
-
'
|
|
178
|
+
'statsEnabled': json['statsEnabled'],
|
|
186
179
|
'leadBuyerSettings': LeadBuyerConfigDtoFromJSON(json['leadBuyerSettings']),
|
|
187
180
|
};
|
|
188
181
|
}
|
|
@@ -208,7 +201,7 @@ export function DomainSalesInformationDtoToJSONTyped(value?: DomainSalesInformat
|
|
|
208
201
|
'sold': value['sold'],
|
|
209
202
|
'isPurchaseable': value['isPurchaseable'],
|
|
210
203
|
'seo': SeoMetricsDtoToJSON(value['seo']),
|
|
211
|
-
'
|
|
204
|
+
'statsEnabled': value['statsEnabled'],
|
|
212
205
|
'leadBuyerSettings': LeadBuyerConfigDtoToJSON(value['leadBuyerSettings']),
|
|
213
206
|
};
|
|
214
207
|
}
|