@randock/nameshift-api-client 0.0.401 → 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 -3
- package/dist/apis/PartnerApi.js +54 -6
- package/package.json +1 -1
- package/src/apis/PartnerApi.ts +49 -10
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,15 +10,17 @@
|
|
|
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;
|
|
17
21
|
}
|
|
18
22
|
export interface PartnerApiListDomainsWithUpdatedPricingRequest {
|
|
19
23
|
dateFrom: string;
|
|
20
|
-
rootName?: string;
|
|
21
|
-
tld?: string;
|
|
22
24
|
limit?: number;
|
|
23
25
|
cursor?: string;
|
|
24
26
|
}
|
|
@@ -26,6 +28,14 @@ export interface PartnerApiListDomainsWithUpdatedPricingRequest {
|
|
|
26
28
|
*
|
|
27
29
|
*/
|
|
28
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>>;
|
|
29
39
|
/**
|
|
30
40
|
*
|
|
31
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
|
*/
|
|
@@ -146,12 +200,6 @@ var PartnerApi = /** @class */ (function (_super) {
|
|
|
146
200
|
if (requestParameters['dateFrom'] != null) {
|
|
147
201
|
queryParameters['dateFrom'] = requestParameters['dateFrom'];
|
|
148
202
|
}
|
|
149
|
-
if (requestParameters['rootName'] != null) {
|
|
150
|
-
queryParameters['rootName'] = requestParameters['rootName'];
|
|
151
|
-
}
|
|
152
|
-
if (requestParameters['tld'] != null) {
|
|
153
|
-
queryParameters['tld'] = requestParameters['tld'];
|
|
154
|
-
}
|
|
155
203
|
if (requestParameters['limit'] != null) {
|
|
156
204
|
queryParameters['limit'] = requestParameters['limit'];
|
|
157
205
|
}
|
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;
|
|
@@ -35,8 +43,6 @@ export interface PartnerApiListAuctionsRequest {
|
|
|
35
43
|
|
|
36
44
|
export interface PartnerApiListDomainsWithUpdatedPricingRequest {
|
|
37
45
|
dateFrom: string;
|
|
38
|
-
rootName?: string;
|
|
39
|
-
tld?: string;
|
|
40
46
|
limit?: number;
|
|
41
47
|
cursor?: string;
|
|
42
48
|
}
|
|
@@ -46,6 +52,47 @@ export interface PartnerApiListDomainsWithUpdatedPricingRequest {
|
|
|
46
52
|
*/
|
|
47
53
|
export class PartnerApi extends runtime.BaseAPI {
|
|
48
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
|
+
|
|
49
96
|
/**
|
|
50
97
|
*
|
|
51
98
|
*/
|
|
@@ -101,14 +148,6 @@ export class PartnerApi extends runtime.BaseAPI {
|
|
|
101
148
|
queryParameters['dateFrom'] = requestParameters['dateFrom'];
|
|
102
149
|
}
|
|
103
150
|
|
|
104
|
-
if (requestParameters['rootName'] != null) {
|
|
105
|
-
queryParameters['rootName'] = requestParameters['rootName'];
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
if (requestParameters['tld'] != null) {
|
|
109
|
-
queryParameters['tld'] = requestParameters['tld'];
|
|
110
|
-
}
|
|
111
|
-
|
|
112
151
|
if (requestParameters['limit'] != null) {
|
|
113
152
|
queryParameters['limit'] = requestParameters['limit'];
|
|
114
153
|
}
|