@randock/nameshift-api-client 0.0.342 → 0.0.344
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/AuctionsApi.d.ts +11 -0
- package/dist/apis/AuctionsApi.js +51 -0
- package/dist/models/DomainAuctionDto.d.ts +17 -0
- package/dist/models/DomainAuctionDto.js +15 -0
- package/package.json +1 -1
- package/src/apis/AuctionsApi.ts +50 -0
- package/src/models/DomainAuctionDto.ts +23 -0
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## @randock/nameshift-api-client@0.0.
|
|
1
|
+
## @randock/nameshift-api-client@0.0.344
|
|
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.344 --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
|
+
d875629868e0645a3d51d48960125a62b944fe36cc372cbad53cf5ad4e4d1ac3f9f236792b8d8deb59a6beab63cf32b1
|
|
@@ -11,6 +11,9 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
13
|
import type { GetAllAuctions200Response1 } from '../models/index';
|
|
14
|
+
export interface AuctionsApiDeleteAuctionRequest {
|
|
15
|
+
auctionId: string;
|
|
16
|
+
}
|
|
14
17
|
export interface AuctionsApiGetAllAuctionsRequest {
|
|
15
18
|
filter?: object;
|
|
16
19
|
page?: number;
|
|
@@ -21,6 +24,14 @@ export interface AuctionsApiGetAllAuctionsRequest {
|
|
|
21
24
|
*
|
|
22
25
|
*/
|
|
23
26
|
export declare class AuctionsApi extends runtime.BaseAPI {
|
|
27
|
+
/**
|
|
28
|
+
*
|
|
29
|
+
*/
|
|
30
|
+
deleteAuctionRaw(requestParameters: AuctionsApiDeleteAuctionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
*/
|
|
34
|
+
deleteAuction(requestParameters: AuctionsApiDeleteAuctionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
24
35
|
/**
|
|
25
36
|
*
|
|
26
37
|
*/
|
package/dist/apis/AuctionsApi.js
CHANGED
|
@@ -75,6 +75,57 @@ var AuctionsApi = /** @class */ (function (_super) {
|
|
|
75
75
|
function AuctionsApi() {
|
|
76
76
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
77
77
|
}
|
|
78
|
+
/**
|
|
79
|
+
*
|
|
80
|
+
*/
|
|
81
|
+
AuctionsApi.prototype.deleteAuctionRaw = function (requestParameters, initOverrides) {
|
|
82
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
83
|
+
var queryParameters, headerParameters, token, tokenString, response;
|
|
84
|
+
return __generator(this, function (_a) {
|
|
85
|
+
switch (_a.label) {
|
|
86
|
+
case 0:
|
|
87
|
+
if (requestParameters['auctionId'] == null) {
|
|
88
|
+
throw new runtime.RequiredError('auctionId', 'Required parameter "auctionId" was null or undefined when calling deleteAuction().');
|
|
89
|
+
}
|
|
90
|
+
queryParameters = {};
|
|
91
|
+
headerParameters = {};
|
|
92
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
93
|
+
token = this.configuration.accessToken;
|
|
94
|
+
return [4 /*yield*/, token("bearer", [])];
|
|
95
|
+
case 1:
|
|
96
|
+
tokenString = _a.sent();
|
|
97
|
+
if (tokenString) {
|
|
98
|
+
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
99
|
+
}
|
|
100
|
+
_a.label = 2;
|
|
101
|
+
case 2: return [4 /*yield*/, this.request({
|
|
102
|
+
path: "/private/auctions/{auctionId}".replace("{".concat("auctionId", "}"), encodeURIComponent(String(requestParameters['auctionId']))),
|
|
103
|
+
method: 'DELETE',
|
|
104
|
+
headers: headerParameters,
|
|
105
|
+
query: queryParameters,
|
|
106
|
+
}, initOverrides)];
|
|
107
|
+
case 3:
|
|
108
|
+
response = _a.sent();
|
|
109
|
+
return [2 /*return*/, new runtime.VoidApiResponse(response)];
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
});
|
|
113
|
+
};
|
|
114
|
+
/**
|
|
115
|
+
*
|
|
116
|
+
*/
|
|
117
|
+
AuctionsApi.prototype.deleteAuction = function (requestParameters, initOverrides) {
|
|
118
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
119
|
+
return __generator(this, function (_a) {
|
|
120
|
+
switch (_a.label) {
|
|
121
|
+
case 0: return [4 /*yield*/, this.deleteAuctionRaw(requestParameters, initOverrides)];
|
|
122
|
+
case 1:
|
|
123
|
+
_a.sent();
|
|
124
|
+
return [2 /*return*/];
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
});
|
|
128
|
+
};
|
|
78
129
|
/**
|
|
79
130
|
*
|
|
80
131
|
*/
|
|
@@ -52,7 +52,24 @@ export interface DomainAuctionDto {
|
|
|
52
52
|
* @memberof DomainAuctionDto
|
|
53
53
|
*/
|
|
54
54
|
highestBid: MoneyDto | null;
|
|
55
|
+
/**
|
|
56
|
+
* The auction status
|
|
57
|
+
* @type {string}
|
|
58
|
+
* @memberof DomainAuctionDto
|
|
59
|
+
*/
|
|
60
|
+
status: DomainAuctionDtoStatusEnum;
|
|
55
61
|
}
|
|
62
|
+
/**
|
|
63
|
+
* @export
|
|
64
|
+
*/
|
|
65
|
+
export declare const DomainAuctionDtoStatusEnum: {
|
|
66
|
+
readonly SCHEDULED: "scheduled";
|
|
67
|
+
readonly ACTIVE: "active";
|
|
68
|
+
readonly ENDED: "ended";
|
|
69
|
+
readonly PENDING_PAYMENT: "pending_payment";
|
|
70
|
+
readonly FINISHED: "finished";
|
|
71
|
+
};
|
|
72
|
+
export type DomainAuctionDtoStatusEnum = typeof DomainAuctionDtoStatusEnum[keyof typeof DomainAuctionDtoStatusEnum];
|
|
56
73
|
/**
|
|
57
74
|
* Check if a given object implements the DomainAuctionDto interface.
|
|
58
75
|
*/
|
|
@@ -13,12 +13,23 @@
|
|
|
13
13
|
* Do not edit the class manually.
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.DomainAuctionDtoStatusEnum = void 0;
|
|
16
17
|
exports.instanceOfDomainAuctionDto = instanceOfDomainAuctionDto;
|
|
17
18
|
exports.DomainAuctionDtoFromJSON = DomainAuctionDtoFromJSON;
|
|
18
19
|
exports.DomainAuctionDtoFromJSONTyped = DomainAuctionDtoFromJSONTyped;
|
|
19
20
|
exports.DomainAuctionDtoToJSON = DomainAuctionDtoToJSON;
|
|
20
21
|
exports.DomainAuctionDtoToJSONTyped = DomainAuctionDtoToJSONTyped;
|
|
21
22
|
var MoneyDto_1 = require("./MoneyDto");
|
|
23
|
+
/**
|
|
24
|
+
* @export
|
|
25
|
+
*/
|
|
26
|
+
exports.DomainAuctionDtoStatusEnum = {
|
|
27
|
+
SCHEDULED: 'scheduled',
|
|
28
|
+
ACTIVE: 'active',
|
|
29
|
+
ENDED: 'ended',
|
|
30
|
+
PENDING_PAYMENT: 'pending_payment',
|
|
31
|
+
FINISHED: 'finished'
|
|
32
|
+
};
|
|
22
33
|
/**
|
|
23
34
|
* Check if a given object implements the DomainAuctionDto interface.
|
|
24
35
|
*/
|
|
@@ -35,6 +46,8 @@ function instanceOfDomainAuctionDto(value) {
|
|
|
35
46
|
return false;
|
|
36
47
|
if (!('highestBid' in value) || value['highestBid'] === undefined)
|
|
37
48
|
return false;
|
|
49
|
+
if (!('status' in value) || value['status'] === undefined)
|
|
50
|
+
return false;
|
|
38
51
|
return true;
|
|
39
52
|
}
|
|
40
53
|
function DomainAuctionDtoFromJSON(json) {
|
|
@@ -51,6 +64,7 @@ function DomainAuctionDtoFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
51
64
|
'startDate': (new Date(json['startDate'])),
|
|
52
65
|
'endDate': (new Date(json['endDate'])),
|
|
53
66
|
'highestBid': (0, MoneyDto_1.MoneyDtoFromJSON)(json['highestBid']),
|
|
67
|
+
'status': json['status'],
|
|
54
68
|
};
|
|
55
69
|
}
|
|
56
70
|
function DomainAuctionDtoToJSON(json) {
|
|
@@ -68,5 +82,6 @@ function DomainAuctionDtoToJSONTyped(value, ignoreDiscriminator) {
|
|
|
68
82
|
'startDate': ((value['startDate']).toISOString()),
|
|
69
83
|
'endDate': ((value['endDate']).toISOString()),
|
|
70
84
|
'highestBid': (0, MoneyDto_1.MoneyDtoToJSON)(value['highestBid']),
|
|
85
|
+
'status': value['status'],
|
|
71
86
|
};
|
|
72
87
|
}
|
package/package.json
CHANGED
package/src/apis/AuctionsApi.ts
CHANGED
|
@@ -15,16 +15,26 @@
|
|
|
15
15
|
|
|
16
16
|
import * as runtime from '../runtime';
|
|
17
17
|
import type {
|
|
18
|
+
BadRequestException,
|
|
18
19
|
GetAllAuctions200Response1,
|
|
20
|
+
NotFoundException,
|
|
19
21
|
ValidationException,
|
|
20
22
|
} from '../models/index';
|
|
21
23
|
import {
|
|
24
|
+
BadRequestExceptionFromJSON,
|
|
25
|
+
BadRequestExceptionToJSON,
|
|
22
26
|
GetAllAuctions200Response1FromJSON,
|
|
23
27
|
GetAllAuctions200Response1ToJSON,
|
|
28
|
+
NotFoundExceptionFromJSON,
|
|
29
|
+
NotFoundExceptionToJSON,
|
|
24
30
|
ValidationExceptionFromJSON,
|
|
25
31
|
ValidationExceptionToJSON,
|
|
26
32
|
} from '../models/index';
|
|
27
33
|
|
|
34
|
+
export interface AuctionsApiDeleteAuctionRequest {
|
|
35
|
+
auctionId: string;
|
|
36
|
+
}
|
|
37
|
+
|
|
28
38
|
export interface AuctionsApiGetAllAuctionsRequest {
|
|
29
39
|
filter?: object;
|
|
30
40
|
page?: number;
|
|
@@ -37,6 +47,46 @@ export interface AuctionsApiGetAllAuctionsRequest {
|
|
|
37
47
|
*/
|
|
38
48
|
export class AuctionsApi extends runtime.BaseAPI {
|
|
39
49
|
|
|
50
|
+
/**
|
|
51
|
+
*
|
|
52
|
+
*/
|
|
53
|
+
async deleteAuctionRaw(requestParameters: AuctionsApiDeleteAuctionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
54
|
+
if (requestParameters['auctionId'] == null) {
|
|
55
|
+
throw new runtime.RequiredError(
|
|
56
|
+
'auctionId',
|
|
57
|
+
'Required parameter "auctionId" was null or undefined when calling deleteAuction().'
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const queryParameters: any = {};
|
|
62
|
+
|
|
63
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
64
|
+
|
|
65
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
66
|
+
const token = this.configuration.accessToken;
|
|
67
|
+
const tokenString = await token("bearer", []);
|
|
68
|
+
|
|
69
|
+
if (tokenString) {
|
|
70
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
const response = await this.request({
|
|
74
|
+
path: `/private/auctions/{auctionId}`.replace(`{${"auctionId"}}`, encodeURIComponent(String(requestParameters['auctionId']))),
|
|
75
|
+
method: 'DELETE',
|
|
76
|
+
headers: headerParameters,
|
|
77
|
+
query: queryParameters,
|
|
78
|
+
}, initOverrides);
|
|
79
|
+
|
|
80
|
+
return new runtime.VoidApiResponse(response);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
*
|
|
85
|
+
*/
|
|
86
|
+
async deleteAuction(requestParameters: AuctionsApiDeleteAuctionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
87
|
+
await this.deleteAuctionRaw(requestParameters, initOverrides);
|
|
88
|
+
}
|
|
89
|
+
|
|
40
90
|
/**
|
|
41
91
|
*
|
|
42
92
|
*/
|
|
@@ -63,8 +63,28 @@ export interface DomainAuctionDto {
|
|
|
63
63
|
* @memberof DomainAuctionDto
|
|
64
64
|
*/
|
|
65
65
|
highestBid: MoneyDto | null;
|
|
66
|
+
/**
|
|
67
|
+
* The auction status
|
|
68
|
+
* @type {string}
|
|
69
|
+
* @memberof DomainAuctionDto
|
|
70
|
+
*/
|
|
71
|
+
status: DomainAuctionDtoStatusEnum;
|
|
66
72
|
}
|
|
67
73
|
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* @export
|
|
77
|
+
*/
|
|
78
|
+
export const DomainAuctionDtoStatusEnum = {
|
|
79
|
+
SCHEDULED: 'scheduled',
|
|
80
|
+
ACTIVE: 'active',
|
|
81
|
+
ENDED: 'ended',
|
|
82
|
+
PENDING_PAYMENT: 'pending_payment',
|
|
83
|
+
FINISHED: 'finished'
|
|
84
|
+
} as const;
|
|
85
|
+
export type DomainAuctionDtoStatusEnum = typeof DomainAuctionDtoStatusEnum[keyof typeof DomainAuctionDtoStatusEnum];
|
|
86
|
+
|
|
87
|
+
|
|
68
88
|
/**
|
|
69
89
|
* Check if a given object implements the DomainAuctionDto interface.
|
|
70
90
|
*/
|
|
@@ -75,6 +95,7 @@ export function instanceOfDomainAuctionDto(value: object): value is DomainAuctio
|
|
|
75
95
|
if (!('startDate' in value) || value['startDate'] === undefined) return false;
|
|
76
96
|
if (!('endDate' in value) || value['endDate'] === undefined) return false;
|
|
77
97
|
if (!('highestBid' in value) || value['highestBid'] === undefined) return false;
|
|
98
|
+
if (!('status' in value) || value['status'] === undefined) return false;
|
|
78
99
|
return true;
|
|
79
100
|
}
|
|
80
101
|
|
|
@@ -94,6 +115,7 @@ export function DomainAuctionDtoFromJSONTyped(json: any, ignoreDiscriminator: bo
|
|
|
94
115
|
'startDate': (new Date(json['startDate'])),
|
|
95
116
|
'endDate': (new Date(json['endDate'])),
|
|
96
117
|
'highestBid': MoneyDtoFromJSON(json['highestBid']),
|
|
118
|
+
'status': json['status'],
|
|
97
119
|
};
|
|
98
120
|
}
|
|
99
121
|
|
|
@@ -114,6 +136,7 @@ export function DomainAuctionDtoToJSONTyped(value?: DomainAuctionDto | null, ign
|
|
|
114
136
|
'startDate': ((value['startDate']).toISOString()),
|
|
115
137
|
'endDate': ((value['endDate']).toISOString()),
|
|
116
138
|
'highestBid': MoneyDtoToJSON(value['highestBid']),
|
|
139
|
+
'status': value['status'],
|
|
117
140
|
};
|
|
118
141
|
}
|
|
119
142
|
|