@randock/nameshift-api-client 0.0.34 → 0.0.35
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 +1 -0
- package/README.md +3 -3
- package/dist/apis/AdminApi.d.ts +13 -1
- package/dist/apis/AdminApi.js +56 -0
- package/dist/models/ChangeOrderStatusInput.d.ts +39 -0
- package/dist/models/ChangeOrderStatusInput.js +54 -0
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +1 -0
- package/package.json +1 -1
- package/src/apis/AdminApi.ts +61 -0
- package/src/models/ChangeOrderStatusInput.ts +72 -0
- package/src/models/index.ts +1 -0
package/.openapi-generator/FILES
CHANGED
|
@@ -20,6 +20,7 @@ src/models/AccountFinancialInput.ts
|
|
|
20
20
|
src/models/AccountSettingsInput.ts
|
|
21
21
|
src/models/BatchUpdateDomainsInput.ts
|
|
22
22
|
src/models/BuyDomainInput.ts
|
|
23
|
+
src/models/ChangeOrderStatusInput.ts
|
|
23
24
|
src/models/ConflictException.ts
|
|
24
25
|
src/models/CreateLeadInput.ts
|
|
25
26
|
src/models/CreateLeadMessageInput.ts
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## @randock/nameshift-api-client@0.0.
|
|
1
|
+
## @randock/nameshift-api-client@0.0.35
|
|
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.35 --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
|
+
203adaf482fb41daf8b207e16089094cf87bbd0ecde166aef34d2742b98500fc941944ad7a84413237d7ed07bd59681c
|
package/dist/apis/AdminApi.d.ts
CHANGED
|
@@ -10,7 +10,11 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { ListAccounts200Response, ListTransfers200Response } from '../models/index';
|
|
13
|
+
import type { ChangeOrderStatusInput, ListAccounts200Response, ListTransfers200Response } from '../models/index';
|
|
14
|
+
export interface AdminApiChangeOrderStatusRequest {
|
|
15
|
+
orderId: string;
|
|
16
|
+
changeOrderStatusInput: ChangeOrderStatusInput;
|
|
17
|
+
}
|
|
14
18
|
export interface AdminApiListAccountsRequest {
|
|
15
19
|
filter?: object;
|
|
16
20
|
page?: number;
|
|
@@ -27,6 +31,14 @@ export interface AdminApiListTransfersRequest {
|
|
|
27
31
|
*
|
|
28
32
|
*/
|
|
29
33
|
export declare class AdminApi extends runtime.BaseAPI {
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
*/
|
|
37
|
+
changeOrderStatusRaw(requestParameters: AdminApiChangeOrderStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
38
|
+
/**
|
|
39
|
+
*
|
|
40
|
+
*/
|
|
41
|
+
changeOrderStatus(requestParameters: AdminApiChangeOrderStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
30
42
|
/**
|
|
31
43
|
*
|
|
32
44
|
*/
|
package/dist/apis/AdminApi.js
CHANGED
|
@@ -75,6 +75,62 @@ var AdminApi = /** @class */ (function (_super) {
|
|
|
75
75
|
function AdminApi() {
|
|
76
76
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
77
77
|
}
|
|
78
|
+
/**
|
|
79
|
+
*
|
|
80
|
+
*/
|
|
81
|
+
AdminApi.prototype.changeOrderStatusRaw = 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['orderId'] == null) {
|
|
88
|
+
throw new runtime.RequiredError('orderId', 'Required parameter "orderId" was null or undefined when calling changeOrderStatus().');
|
|
89
|
+
}
|
|
90
|
+
if (requestParameters['changeOrderStatusInput'] == null) {
|
|
91
|
+
throw new runtime.RequiredError('changeOrderStatusInput', 'Required parameter "changeOrderStatusInput" was null or undefined when calling changeOrderStatus().');
|
|
92
|
+
}
|
|
93
|
+
queryParameters = {};
|
|
94
|
+
headerParameters = {};
|
|
95
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
96
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
97
|
+
token = this.configuration.accessToken;
|
|
98
|
+
return [4 /*yield*/, token("bearer", [])];
|
|
99
|
+
case 1:
|
|
100
|
+
tokenString = _a.sent();
|
|
101
|
+
if (tokenString) {
|
|
102
|
+
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
103
|
+
}
|
|
104
|
+
_a.label = 2;
|
|
105
|
+
case 2: return [4 /*yield*/, this.request({
|
|
106
|
+
path: "/admin/orders/{orderId}/status".replace("{".concat("orderId", "}"), encodeURIComponent(String(requestParameters['orderId']))),
|
|
107
|
+
method: 'PATCH',
|
|
108
|
+
headers: headerParameters,
|
|
109
|
+
query: queryParameters,
|
|
110
|
+
body: (0, index_1.ChangeOrderStatusInputToJSON)(requestParameters['changeOrderStatusInput']),
|
|
111
|
+
}, initOverrides)];
|
|
112
|
+
case 3:
|
|
113
|
+
response = _a.sent();
|
|
114
|
+
return [2 /*return*/, new runtime.VoidApiResponse(response)];
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
});
|
|
118
|
+
};
|
|
119
|
+
/**
|
|
120
|
+
*
|
|
121
|
+
*/
|
|
122
|
+
AdminApi.prototype.changeOrderStatus = function (requestParameters, initOverrides) {
|
|
123
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
124
|
+
return __generator(this, function (_a) {
|
|
125
|
+
switch (_a.label) {
|
|
126
|
+
case 0: return [4 /*yield*/, this.changeOrderStatusRaw(requestParameters, initOverrides)];
|
|
127
|
+
case 1:
|
|
128
|
+
_a.sent();
|
|
129
|
+
return [2 /*return*/];
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
});
|
|
133
|
+
};
|
|
78
134
|
/**
|
|
79
135
|
*
|
|
80
136
|
*/
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Nameshift
|
|
3
|
+
* Nameshift API
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface ChangeOrderStatusInput
|
|
16
|
+
*/
|
|
17
|
+
export interface ChangeOrderStatusInput {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof ChangeOrderStatusInput
|
|
22
|
+
*/
|
|
23
|
+
status: ChangeOrderStatusInputStatusEnum;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* @export
|
|
27
|
+
*/
|
|
28
|
+
export declare const ChangeOrderStatusInputStatusEnum: {
|
|
29
|
+
readonly OPEN: "open";
|
|
30
|
+
readonly PAID: "paid";
|
|
31
|
+
};
|
|
32
|
+
export type ChangeOrderStatusInputStatusEnum = typeof ChangeOrderStatusInputStatusEnum[keyof typeof ChangeOrderStatusInputStatusEnum];
|
|
33
|
+
/**
|
|
34
|
+
* Check if a given object implements the ChangeOrderStatusInput interface.
|
|
35
|
+
*/
|
|
36
|
+
export declare function instanceOfChangeOrderStatusInput(value: object): boolean;
|
|
37
|
+
export declare function ChangeOrderStatusInputFromJSON(json: any): ChangeOrderStatusInput;
|
|
38
|
+
export declare function ChangeOrderStatusInputFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChangeOrderStatusInput;
|
|
39
|
+
export declare function ChangeOrderStatusInputToJSON(value?: ChangeOrderStatusInput | null): any;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Nameshift
|
|
6
|
+
* Nameshift API
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.ChangeOrderStatusInputToJSON = exports.ChangeOrderStatusInputFromJSONTyped = exports.ChangeOrderStatusInputFromJSON = exports.instanceOfChangeOrderStatusInput = exports.ChangeOrderStatusInputStatusEnum = void 0;
|
|
17
|
+
/**
|
|
18
|
+
* @export
|
|
19
|
+
*/
|
|
20
|
+
exports.ChangeOrderStatusInputStatusEnum = {
|
|
21
|
+
OPEN: 'open',
|
|
22
|
+
PAID: 'paid'
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Check if a given object implements the ChangeOrderStatusInput interface.
|
|
26
|
+
*/
|
|
27
|
+
function instanceOfChangeOrderStatusInput(value) {
|
|
28
|
+
if (!('status' in value))
|
|
29
|
+
return false;
|
|
30
|
+
return true;
|
|
31
|
+
}
|
|
32
|
+
exports.instanceOfChangeOrderStatusInput = instanceOfChangeOrderStatusInput;
|
|
33
|
+
function ChangeOrderStatusInputFromJSON(json) {
|
|
34
|
+
return ChangeOrderStatusInputFromJSONTyped(json, false);
|
|
35
|
+
}
|
|
36
|
+
exports.ChangeOrderStatusInputFromJSON = ChangeOrderStatusInputFromJSON;
|
|
37
|
+
function ChangeOrderStatusInputFromJSONTyped(json, ignoreDiscriminator) {
|
|
38
|
+
if (json == null) {
|
|
39
|
+
return json;
|
|
40
|
+
}
|
|
41
|
+
return {
|
|
42
|
+
'status': json['status'],
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
exports.ChangeOrderStatusInputFromJSONTyped = ChangeOrderStatusInputFromJSONTyped;
|
|
46
|
+
function ChangeOrderStatusInputToJSON(value) {
|
|
47
|
+
if (value == null) {
|
|
48
|
+
return value;
|
|
49
|
+
}
|
|
50
|
+
return {
|
|
51
|
+
'status': value['status'],
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
exports.ChangeOrderStatusInputToJSON = ChangeOrderStatusInputToJSON;
|
package/dist/models/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export * from './AccountFinancialInput';
|
|
|
5
5
|
export * from './AccountSettingsInput';
|
|
6
6
|
export * from './BatchUpdateDomainsInput';
|
|
7
7
|
export * from './BuyDomainInput';
|
|
8
|
+
export * from './ChangeOrderStatusInput';
|
|
8
9
|
export * from './ConflictException';
|
|
9
10
|
export * from './CreateLeadInput';
|
|
10
11
|
export * from './CreateLeadMessageInput';
|
package/dist/models/index.js
CHANGED
|
@@ -23,6 +23,7 @@ __exportStar(require("./AccountFinancialInput"), exports);
|
|
|
23
23
|
__exportStar(require("./AccountSettingsInput"), exports);
|
|
24
24
|
__exportStar(require("./BatchUpdateDomainsInput"), exports);
|
|
25
25
|
__exportStar(require("./BuyDomainInput"), exports);
|
|
26
|
+
__exportStar(require("./ChangeOrderStatusInput"), exports);
|
|
26
27
|
__exportStar(require("./ConflictException"), exports);
|
|
27
28
|
__exportStar(require("./CreateLeadInput"), exports);
|
|
28
29
|
__exportStar(require("./CreateLeadMessageInput"), exports);
|
package/package.json
CHANGED
package/src/apis/AdminApi.ts
CHANGED
|
@@ -15,22 +15,33 @@
|
|
|
15
15
|
|
|
16
16
|
import * as runtime from '../runtime';
|
|
17
17
|
import type {
|
|
18
|
+
ChangeOrderStatusInput,
|
|
18
19
|
ListAccounts200Response,
|
|
19
20
|
ListTransfers200Response,
|
|
21
|
+
NotFoundException,
|
|
20
22
|
ThrottlerException,
|
|
21
23
|
ValidationException,
|
|
22
24
|
} from '../models/index';
|
|
23
25
|
import {
|
|
26
|
+
ChangeOrderStatusInputFromJSON,
|
|
27
|
+
ChangeOrderStatusInputToJSON,
|
|
24
28
|
ListAccounts200ResponseFromJSON,
|
|
25
29
|
ListAccounts200ResponseToJSON,
|
|
26
30
|
ListTransfers200ResponseFromJSON,
|
|
27
31
|
ListTransfers200ResponseToJSON,
|
|
32
|
+
NotFoundExceptionFromJSON,
|
|
33
|
+
NotFoundExceptionToJSON,
|
|
28
34
|
ThrottlerExceptionFromJSON,
|
|
29
35
|
ThrottlerExceptionToJSON,
|
|
30
36
|
ValidationExceptionFromJSON,
|
|
31
37
|
ValidationExceptionToJSON,
|
|
32
38
|
} from '../models/index';
|
|
33
39
|
|
|
40
|
+
export interface AdminApiChangeOrderStatusRequest {
|
|
41
|
+
orderId: string;
|
|
42
|
+
changeOrderStatusInput: ChangeOrderStatusInput;
|
|
43
|
+
}
|
|
44
|
+
|
|
34
45
|
export interface AdminApiListAccountsRequest {
|
|
35
46
|
filter?: object;
|
|
36
47
|
page?: number;
|
|
@@ -50,6 +61,56 @@ export interface AdminApiListTransfersRequest {
|
|
|
50
61
|
*/
|
|
51
62
|
export class AdminApi extends runtime.BaseAPI {
|
|
52
63
|
|
|
64
|
+
/**
|
|
65
|
+
*
|
|
66
|
+
*/
|
|
67
|
+
async changeOrderStatusRaw(requestParameters: AdminApiChangeOrderStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
68
|
+
if (requestParameters['orderId'] == null) {
|
|
69
|
+
throw new runtime.RequiredError(
|
|
70
|
+
'orderId',
|
|
71
|
+
'Required parameter "orderId" was null or undefined when calling changeOrderStatus().'
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
if (requestParameters['changeOrderStatusInput'] == null) {
|
|
76
|
+
throw new runtime.RequiredError(
|
|
77
|
+
'changeOrderStatusInput',
|
|
78
|
+
'Required parameter "changeOrderStatusInput" was null or undefined when calling changeOrderStatus().'
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const queryParameters: any = {};
|
|
83
|
+
|
|
84
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
85
|
+
|
|
86
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
87
|
+
|
|
88
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
89
|
+
const token = this.configuration.accessToken;
|
|
90
|
+
const tokenString = await token("bearer", []);
|
|
91
|
+
|
|
92
|
+
if (tokenString) {
|
|
93
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
const response = await this.request({
|
|
97
|
+
path: `/admin/orders/{orderId}/status`.replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId']))),
|
|
98
|
+
method: 'PATCH',
|
|
99
|
+
headers: headerParameters,
|
|
100
|
+
query: queryParameters,
|
|
101
|
+
body: ChangeOrderStatusInputToJSON(requestParameters['changeOrderStatusInput']),
|
|
102
|
+
}, initOverrides);
|
|
103
|
+
|
|
104
|
+
return new runtime.VoidApiResponse(response);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
*
|
|
109
|
+
*/
|
|
110
|
+
async changeOrderStatus(requestParameters: AdminApiChangeOrderStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
111
|
+
await this.changeOrderStatusRaw(requestParameters, initOverrides);
|
|
112
|
+
}
|
|
113
|
+
|
|
53
114
|
/**
|
|
54
115
|
*
|
|
55
116
|
*/
|
|
@@ -0,0 +1,72 @@
|
|
|
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
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface ChangeOrderStatusInput
|
|
20
|
+
*/
|
|
21
|
+
export interface ChangeOrderStatusInput {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof ChangeOrderStatusInput
|
|
26
|
+
*/
|
|
27
|
+
status: ChangeOrderStatusInputStatusEnum;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* @export
|
|
33
|
+
*/
|
|
34
|
+
export const ChangeOrderStatusInputStatusEnum = {
|
|
35
|
+
OPEN: 'open',
|
|
36
|
+
PAID: 'paid'
|
|
37
|
+
} as const;
|
|
38
|
+
export type ChangeOrderStatusInputStatusEnum = typeof ChangeOrderStatusInputStatusEnum[keyof typeof ChangeOrderStatusInputStatusEnum];
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Check if a given object implements the ChangeOrderStatusInput interface.
|
|
43
|
+
*/
|
|
44
|
+
export function instanceOfChangeOrderStatusInput(value: object): boolean {
|
|
45
|
+
if (!('status' in value)) return false;
|
|
46
|
+
return true;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function ChangeOrderStatusInputFromJSON(json: any): ChangeOrderStatusInput {
|
|
50
|
+
return ChangeOrderStatusInputFromJSONTyped(json, false);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function ChangeOrderStatusInputFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChangeOrderStatusInput {
|
|
54
|
+
if (json == null) {
|
|
55
|
+
return json;
|
|
56
|
+
}
|
|
57
|
+
return {
|
|
58
|
+
|
|
59
|
+
'status': json['status'],
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function ChangeOrderStatusInputToJSON(value?: ChangeOrderStatusInput | null): any {
|
|
64
|
+
if (value == null) {
|
|
65
|
+
return value;
|
|
66
|
+
}
|
|
67
|
+
return {
|
|
68
|
+
|
|
69
|
+
'status': value['status'],
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
|
package/src/models/index.ts
CHANGED
|
@@ -7,6 +7,7 @@ export * from './AccountFinancialInput';
|
|
|
7
7
|
export * from './AccountSettingsInput';
|
|
8
8
|
export * from './BatchUpdateDomainsInput';
|
|
9
9
|
export * from './BuyDomainInput';
|
|
10
|
+
export * from './ChangeOrderStatusInput';
|
|
10
11
|
export * from './ConflictException';
|
|
11
12
|
export * from './CreateLeadInput';
|
|
12
13
|
export * from './CreateLeadMessageInput';
|