@randock/nameshift-api-client 0.0.400 → 0.0.402
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/PartnerApi.d.ts +13 -1
- package/dist/apis/PartnerApi.js +54 -0
- package/dist/models/DomainPricesChangeDto.d.ts +12 -0
- package/dist/models/DomainPricesChangeDto.js +8 -0
- package/package.json +1 -1
- package/src/apis/PartnerApi.ts +49 -0
- package/src/models/DomainPricesChangeDto.ts +18 -0
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## @randock/nameshift-api-client@0.0.
|
|
1
|
+
## @randock/nameshift-api-client@0.0.402
|
|
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.402 --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
|
+
df2789f3c43308947bc631d85dd21c823afdf9f9d81763cdbbb2bc8411a5009aa384af363ce8bde6ee3a71d25d1cc1f6
|
|
@@ -10,7 +10,11 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { ListAuctions200Response, ListDomainsWithUpdatedPricing200Response } from '../models/index';
|
|
13
|
+
import type { DomainPricesChangeDto, ListAuctions200Response, ListDomainsWithUpdatedPricing200Response } from '../models/index';
|
|
14
|
+
export interface PartnerApiDomainsFindRequest {
|
|
15
|
+
rootName: string;
|
|
16
|
+
tld?: string;
|
|
17
|
+
}
|
|
14
18
|
export interface PartnerApiListAuctionsRequest {
|
|
15
19
|
limit?: number;
|
|
16
20
|
cursor?: string;
|
|
@@ -24,6 +28,14 @@ export interface PartnerApiListDomainsWithUpdatedPricingRequest {
|
|
|
24
28
|
*
|
|
25
29
|
*/
|
|
26
30
|
export declare class PartnerApi extends runtime.BaseAPI {
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
*/
|
|
34
|
+
domainsFindRaw(requestParameters: PartnerApiDomainsFindRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<DomainPricesChangeDto>>>;
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
*/
|
|
38
|
+
domainsFind(requestParameters: PartnerApiDomainsFindRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<DomainPricesChangeDto>>;
|
|
27
39
|
/**
|
|
28
40
|
*
|
|
29
41
|
*/
|
package/dist/apis/PartnerApi.js
CHANGED
|
@@ -75,6 +75,60 @@ var PartnerApi = /** @class */ (function (_super) {
|
|
|
75
75
|
function PartnerApi() {
|
|
76
76
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
77
77
|
}
|
|
78
|
+
/**
|
|
79
|
+
*
|
|
80
|
+
*/
|
|
81
|
+
PartnerApi.prototype.domainsFindRaw = function (requestParameters, initOverrides) {
|
|
82
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
83
|
+
var queryParameters, headerParameters, _a, _b, response;
|
|
84
|
+
return __generator(this, function (_c) {
|
|
85
|
+
switch (_c.label) {
|
|
86
|
+
case 0:
|
|
87
|
+
if (requestParameters['rootName'] == null) {
|
|
88
|
+
throw new runtime.RequiredError('rootName', 'Required parameter "rootName" was null or undefined when calling domainsFind().');
|
|
89
|
+
}
|
|
90
|
+
queryParameters = {};
|
|
91
|
+
if (requestParameters['tld'] != null) {
|
|
92
|
+
queryParameters['tld'] = requestParameters['tld'];
|
|
93
|
+
}
|
|
94
|
+
headerParameters = {};
|
|
95
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
96
|
+
_a = headerParameters;
|
|
97
|
+
_b = "apikey";
|
|
98
|
+
return [4 /*yield*/, this.configuration.apiKey("apikey")];
|
|
99
|
+
case 1:
|
|
100
|
+
_a[_b] = _c.sent(); // api_key authentication
|
|
101
|
+
_c.label = 2;
|
|
102
|
+
case 2: return [4 /*yield*/, this.request({
|
|
103
|
+
path: "/partner/domains/find/{rootName}".replace("{".concat("rootName", "}"), encodeURIComponent(String(requestParameters['rootName']))),
|
|
104
|
+
method: 'GET',
|
|
105
|
+
headers: headerParameters,
|
|
106
|
+
query: queryParameters,
|
|
107
|
+
}, initOverrides)];
|
|
108
|
+
case 3:
|
|
109
|
+
response = _c.sent();
|
|
110
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return jsonValue.map(index_1.DomainPricesChangeDtoFromJSON); })];
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
});
|
|
114
|
+
};
|
|
115
|
+
/**
|
|
116
|
+
*
|
|
117
|
+
*/
|
|
118
|
+
PartnerApi.prototype.domainsFind = function (requestParameters, initOverrides) {
|
|
119
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
120
|
+
var response;
|
|
121
|
+
return __generator(this, function (_a) {
|
|
122
|
+
switch (_a.label) {
|
|
123
|
+
case 0: return [4 /*yield*/, this.domainsFindRaw(requestParameters, initOverrides)];
|
|
124
|
+
case 1:
|
|
125
|
+
response = _a.sent();
|
|
126
|
+
return [4 /*yield*/, response.value()];
|
|
127
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
});
|
|
131
|
+
};
|
|
78
132
|
/**
|
|
79
133
|
*
|
|
80
134
|
*/
|
|
@@ -23,6 +23,18 @@ export interface DomainPricesChangeDto {
|
|
|
23
23
|
* @memberof DomainPricesChangeDto
|
|
24
24
|
*/
|
|
25
25
|
id: string;
|
|
26
|
+
/**
|
|
27
|
+
* The root domain name without TLD
|
|
28
|
+
* @type {string}
|
|
29
|
+
* @memberof DomainPricesChangeDto
|
|
30
|
+
*/
|
|
31
|
+
rootName: string;
|
|
32
|
+
/**
|
|
33
|
+
* The domain TLD
|
|
34
|
+
* @type {string}
|
|
35
|
+
* @memberof DomainPricesChangeDto
|
|
36
|
+
*/
|
|
37
|
+
tld: string;
|
|
26
38
|
/**
|
|
27
39
|
* Categories of the domain (parent + subcategory)
|
|
28
40
|
* @type {Array<DomainCategoryItemDto>}
|
|
@@ -26,6 +26,10 @@ var DomainCategoryItemDto_1 = require("./DomainCategoryItemDto");
|
|
|
26
26
|
function instanceOfDomainPricesChangeDto(value) {
|
|
27
27
|
if (!('id' in value) || value['id'] === undefined)
|
|
28
28
|
return false;
|
|
29
|
+
if (!('rootName' in value) || value['rootName'] === undefined)
|
|
30
|
+
return false;
|
|
31
|
+
if (!('tld' in value) || value['tld'] === undefined)
|
|
32
|
+
return false;
|
|
29
33
|
if (!('categories' in value) || value['categories'] === undefined)
|
|
30
34
|
return false;
|
|
31
35
|
if (!('name' in value) || value['name'] === undefined)
|
|
@@ -51,6 +55,8 @@ function DomainPricesChangeDtoFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
51
55
|
}
|
|
52
56
|
return {
|
|
53
57
|
'id': json['id'],
|
|
58
|
+
'rootName': json['rootName'],
|
|
59
|
+
'tld': json['tld'],
|
|
54
60
|
'categories': (json['categories'].map(DomainCategoryItemDto_1.DomainCategoryItemDtoFromJSON)),
|
|
55
61
|
'name': json['name'],
|
|
56
62
|
'displayName': json['displayName'],
|
|
@@ -70,6 +76,8 @@ function DomainPricesChangeDtoToJSONTyped(value, ignoreDiscriminator) {
|
|
|
70
76
|
}
|
|
71
77
|
return {
|
|
72
78
|
'id': value['id'],
|
|
79
|
+
'rootName': value['rootName'],
|
|
80
|
+
'tld': value['tld'],
|
|
73
81
|
'categories': (value['categories'].map(DomainCategoryItemDto_1.DomainCategoryItemDtoToJSON)),
|
|
74
82
|
'name': value['name'],
|
|
75
83
|
'displayName': value['displayName'],
|
package/package.json
CHANGED
package/src/apis/PartnerApi.ts
CHANGED
|
@@ -15,11 +15,14 @@
|
|
|
15
15
|
|
|
16
16
|
import * as runtime from '../runtime';
|
|
17
17
|
import type {
|
|
18
|
+
DomainPricesChangeDto,
|
|
18
19
|
ListAuctions200Response,
|
|
19
20
|
ListDomainsWithUpdatedPricing200Response,
|
|
20
21
|
ValidationException,
|
|
21
22
|
} from '../models/index';
|
|
22
23
|
import {
|
|
24
|
+
DomainPricesChangeDtoFromJSON,
|
|
25
|
+
DomainPricesChangeDtoToJSON,
|
|
23
26
|
ListAuctions200ResponseFromJSON,
|
|
24
27
|
ListAuctions200ResponseToJSON,
|
|
25
28
|
ListDomainsWithUpdatedPricing200ResponseFromJSON,
|
|
@@ -28,6 +31,11 @@ import {
|
|
|
28
31
|
ValidationExceptionToJSON,
|
|
29
32
|
} from '../models/index';
|
|
30
33
|
|
|
34
|
+
export interface PartnerApiDomainsFindRequest {
|
|
35
|
+
rootName: string;
|
|
36
|
+
tld?: string;
|
|
37
|
+
}
|
|
38
|
+
|
|
31
39
|
export interface PartnerApiListAuctionsRequest {
|
|
32
40
|
limit?: number;
|
|
33
41
|
cursor?: string;
|
|
@@ -44,6 +52,47 @@ export interface PartnerApiListDomainsWithUpdatedPricingRequest {
|
|
|
44
52
|
*/
|
|
45
53
|
export class PartnerApi extends runtime.BaseAPI {
|
|
46
54
|
|
|
55
|
+
/**
|
|
56
|
+
*
|
|
57
|
+
*/
|
|
58
|
+
async domainsFindRaw(requestParameters: PartnerApiDomainsFindRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<DomainPricesChangeDto>>> {
|
|
59
|
+
if (requestParameters['rootName'] == null) {
|
|
60
|
+
throw new runtime.RequiredError(
|
|
61
|
+
'rootName',
|
|
62
|
+
'Required parameter "rootName" was null or undefined when calling domainsFind().'
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
const queryParameters: any = {};
|
|
67
|
+
|
|
68
|
+
if (requestParameters['tld'] != null) {
|
|
69
|
+
queryParameters['tld'] = requestParameters['tld'];
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
73
|
+
|
|
74
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
75
|
+
headerParameters["apikey"] = await this.configuration.apiKey("apikey"); // api_key authentication
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
const response = await this.request({
|
|
79
|
+
path: `/partner/domains/find/{rootName}`.replace(`{${"rootName"}}`, encodeURIComponent(String(requestParameters['rootName']))),
|
|
80
|
+
method: 'GET',
|
|
81
|
+
headers: headerParameters,
|
|
82
|
+
query: queryParameters,
|
|
83
|
+
}, initOverrides);
|
|
84
|
+
|
|
85
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(DomainPricesChangeDtoFromJSON));
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
*
|
|
90
|
+
*/
|
|
91
|
+
async domainsFind(requestParameters: PartnerApiDomainsFindRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<DomainPricesChangeDto>> {
|
|
92
|
+
const response = await this.domainsFindRaw(requestParameters, initOverrides);
|
|
93
|
+
return await response.value();
|
|
94
|
+
}
|
|
95
|
+
|
|
47
96
|
/**
|
|
48
97
|
*
|
|
49
98
|
*/
|
|
@@ -40,6 +40,18 @@ export interface DomainPricesChangeDto {
|
|
|
40
40
|
* @memberof DomainPricesChangeDto
|
|
41
41
|
*/
|
|
42
42
|
id: string;
|
|
43
|
+
/**
|
|
44
|
+
* The root domain name without TLD
|
|
45
|
+
* @type {string}
|
|
46
|
+
* @memberof DomainPricesChangeDto
|
|
47
|
+
*/
|
|
48
|
+
rootName: string;
|
|
49
|
+
/**
|
|
50
|
+
* The domain TLD
|
|
51
|
+
* @type {string}
|
|
52
|
+
* @memberof DomainPricesChangeDto
|
|
53
|
+
*/
|
|
54
|
+
tld: string;
|
|
43
55
|
/**
|
|
44
56
|
* Categories of the domain (parent + subcategory)
|
|
45
57
|
* @type {Array<DomainCategoryItemDto>}
|
|
@@ -89,6 +101,8 @@ export interface DomainPricesChangeDto {
|
|
|
89
101
|
*/
|
|
90
102
|
export function instanceOfDomainPricesChangeDto(value: object): value is DomainPricesChangeDto {
|
|
91
103
|
if (!('id' in value) || value['id'] === undefined) return false;
|
|
104
|
+
if (!('rootName' in value) || value['rootName'] === undefined) return false;
|
|
105
|
+
if (!('tld' in value) || value['tld'] === undefined) return false;
|
|
92
106
|
if (!('categories' in value) || value['categories'] === undefined) return false;
|
|
93
107
|
if (!('name' in value) || value['name'] === undefined) return false;
|
|
94
108
|
if (!('displayName' in value) || value['displayName'] === undefined) return false;
|
|
@@ -110,6 +124,8 @@ export function DomainPricesChangeDtoFromJSONTyped(json: any, ignoreDiscriminato
|
|
|
110
124
|
return {
|
|
111
125
|
|
|
112
126
|
'id': json['id'],
|
|
127
|
+
'rootName': json['rootName'],
|
|
128
|
+
'tld': json['tld'],
|
|
113
129
|
'categories': ((json['categories'] as Array<any>).map(DomainCategoryItemDtoFromJSON)),
|
|
114
130
|
'name': json['name'],
|
|
115
131
|
'displayName': json['displayName'],
|
|
@@ -132,6 +148,8 @@ export function DomainPricesChangeDtoToJSONTyped(value?: DomainPricesChangeDto |
|
|
|
132
148
|
return {
|
|
133
149
|
|
|
134
150
|
'id': value['id'],
|
|
151
|
+
'rootName': value['rootName'],
|
|
152
|
+
'tld': value['tld'],
|
|
135
153
|
'categories': ((value['categories'] as Array<any>).map(DomainCategoryItemDtoToJSON)),
|
|
136
154
|
'name': value['name'],
|
|
137
155
|
'displayName': value['displayName'],
|