@randock/nameshift-api-client 0.0.412 → 0.0.413
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 +2 -0
- package/README.md +3 -3
- package/dist/apis/AddressPublicApi.d.ts +30 -0
- package/dist/apis/AddressPublicApi.js +133 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/models/StateDto.d.ts +44 -0
- package/dist/models/StateDto.js +59 -0
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +1 -0
- package/package.json +1 -1
- package/src/apis/AddressPublicApi.ts +86 -0
- package/src/apis/index.ts +1 -0
- package/src/models/StateDto.ts +84 -0
- package/src/models/index.ts +1 -0
package/.openapi-generator/FILES
CHANGED
|
@@ -5,6 +5,7 @@ README.md
|
|
|
5
5
|
package.json
|
|
6
6
|
src/apis/AccountsApi.ts
|
|
7
7
|
src/apis/AccountsPublicApi.ts
|
|
8
|
+
src/apis/AddressPublicApi.ts
|
|
8
9
|
src/apis/AdminApi.ts
|
|
9
10
|
src/apis/AuctionsApi.ts
|
|
10
11
|
src/apis/AuctionsPublicApi.ts
|
|
@@ -427,6 +428,7 @@ src/models/SetNewPasswordInput.ts
|
|
|
427
428
|
src/models/SetPayoutProviderInput.ts
|
|
428
429
|
src/models/SortDto.ts
|
|
429
430
|
src/models/StartAuctionInput.ts
|
|
431
|
+
src/models/StateDto.ts
|
|
430
432
|
src/models/StatsFilterInputDateRange.ts
|
|
431
433
|
src/models/StoreBuyerLocaleInput.ts
|
|
432
434
|
src/models/StoreUserLocaleInput.ts
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## @randock/nameshift-api-client@0.0.
|
|
1
|
+
## @randock/nameshift-api-client@0.0.413
|
|
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.413 --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
|
+
5189e8d46597a379383d219633f542cf14c9e47540c6144a6b7a7e65b808bd382599a1b5297221b78bcd9af21fb367fe
|
|
@@ -0,0 +1,30 @@
|
|
|
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
|
+
import * as runtime from '../runtime';
|
|
13
|
+
import type { StateDto } from '../models/index';
|
|
14
|
+
export interface AddressPublicApiListStatesByCountryRequest {
|
|
15
|
+
countryCode: string;
|
|
16
|
+
locale: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
*/
|
|
21
|
+
export declare class AddressPublicApi extends runtime.BaseAPI {
|
|
22
|
+
/**
|
|
23
|
+
* List states by country code
|
|
24
|
+
*/
|
|
25
|
+
listStatesByCountryRaw(requestParameters: AddressPublicApiListStatesByCountryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<StateDto>>>;
|
|
26
|
+
/**
|
|
27
|
+
* List states by country code
|
|
28
|
+
*/
|
|
29
|
+
listStatesByCountry(requestParameters: AddressPublicApiListStatesByCountryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<StateDto>>;
|
|
30
|
+
}
|
|
@@ -0,0 +1,133 @@
|
|
|
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
|
+
var __extends = (this && this.__extends) || (function () {
|
|
16
|
+
var extendStatics = function (d, b) {
|
|
17
|
+
extendStatics = Object.setPrototypeOf ||
|
|
18
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
19
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
20
|
+
return extendStatics(d, b);
|
|
21
|
+
};
|
|
22
|
+
return function (d, b) {
|
|
23
|
+
if (typeof b !== "function" && b !== null)
|
|
24
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
25
|
+
extendStatics(d, b);
|
|
26
|
+
function __() { this.constructor = d; }
|
|
27
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
28
|
+
};
|
|
29
|
+
})();
|
|
30
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
31
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
32
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
33
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
34
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
35
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
36
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
40
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
41
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
42
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
43
|
+
function step(op) {
|
|
44
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
45
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
46
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
47
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
48
|
+
switch (op[0]) {
|
|
49
|
+
case 0: case 1: t = op; break;
|
|
50
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
51
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
52
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
53
|
+
default:
|
|
54
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
55
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
56
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
57
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
58
|
+
if (t[2]) _.ops.pop();
|
|
59
|
+
_.trys.pop(); continue;
|
|
60
|
+
}
|
|
61
|
+
op = body.call(thisArg, _);
|
|
62
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
63
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
67
|
+
exports.AddressPublicApi = void 0;
|
|
68
|
+
var runtime = require("../runtime");
|
|
69
|
+
var index_1 = require("../models/index");
|
|
70
|
+
/**
|
|
71
|
+
*
|
|
72
|
+
*/
|
|
73
|
+
var AddressPublicApi = /** @class */ (function (_super) {
|
|
74
|
+
__extends(AddressPublicApi, _super);
|
|
75
|
+
function AddressPublicApi() {
|
|
76
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* List states by country code
|
|
80
|
+
*/
|
|
81
|
+
AddressPublicApi.prototype.listStatesByCountryRaw = function (requestParameters, initOverrides) {
|
|
82
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
83
|
+
var queryParameters, headerParameters, response;
|
|
84
|
+
return __generator(this, function (_a) {
|
|
85
|
+
switch (_a.label) {
|
|
86
|
+
case 0:
|
|
87
|
+
if (requestParameters['countryCode'] == null) {
|
|
88
|
+
throw new runtime.RequiredError('countryCode', 'Required parameter "countryCode" was null or undefined when calling listStatesByCountry().');
|
|
89
|
+
}
|
|
90
|
+
if (requestParameters['locale'] == null) {
|
|
91
|
+
throw new runtime.RequiredError('locale', 'Required parameter "locale" was null or undefined when calling listStatesByCountry().');
|
|
92
|
+
}
|
|
93
|
+
queryParameters = {};
|
|
94
|
+
if (requestParameters['countryCode'] != null) {
|
|
95
|
+
queryParameters['countryCode'] = requestParameters['countryCode'];
|
|
96
|
+
}
|
|
97
|
+
if (requestParameters['locale'] != null) {
|
|
98
|
+
queryParameters['locale'] = requestParameters['locale'];
|
|
99
|
+
}
|
|
100
|
+
headerParameters = {};
|
|
101
|
+
return [4 /*yield*/, this.request({
|
|
102
|
+
path: "/address/states",
|
|
103
|
+
method: 'GET',
|
|
104
|
+
headers: headerParameters,
|
|
105
|
+
query: queryParameters,
|
|
106
|
+
}, initOverrides)];
|
|
107
|
+
case 1:
|
|
108
|
+
response = _a.sent();
|
|
109
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return jsonValue.map(index_1.StateDtoFromJSON); })];
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
});
|
|
113
|
+
};
|
|
114
|
+
/**
|
|
115
|
+
* List states by country code
|
|
116
|
+
*/
|
|
117
|
+
AddressPublicApi.prototype.listStatesByCountry = function (requestParameters, initOverrides) {
|
|
118
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
119
|
+
var response;
|
|
120
|
+
return __generator(this, function (_a) {
|
|
121
|
+
switch (_a.label) {
|
|
122
|
+
case 0: return [4 /*yield*/, this.listStatesByCountryRaw(requestParameters, initOverrides)];
|
|
123
|
+
case 1:
|
|
124
|
+
response = _a.sent();
|
|
125
|
+
return [4 /*yield*/, response.value()];
|
|
126
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
});
|
|
130
|
+
};
|
|
131
|
+
return AddressPublicApi;
|
|
132
|
+
}(runtime.BaseAPI));
|
|
133
|
+
exports.AddressPublicApi = AddressPublicApi;
|
package/dist/apis/index.d.ts
CHANGED
package/dist/apis/index.js
CHANGED
|
@@ -18,6 +18,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
18
18
|
/* eslint-disable */
|
|
19
19
|
__exportStar(require("./AccountsApi"), exports);
|
|
20
20
|
__exportStar(require("./AccountsPublicApi"), exports);
|
|
21
|
+
__exportStar(require("./AddressPublicApi"), exports);
|
|
21
22
|
__exportStar(require("./AdminApi"), exports);
|
|
22
23
|
__exportStar(require("./AuctionsApi"), exports);
|
|
23
24
|
__exportStar(require("./AuctionsPublicApi"), exports);
|
|
@@ -0,0 +1,44 @@
|
|
|
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 StateDto
|
|
16
|
+
*/
|
|
17
|
+
export interface StateDto {
|
|
18
|
+
/**
|
|
19
|
+
* Display name for the requested locale (translation or fallback to stored name)
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof StateDto
|
|
22
|
+
*/
|
|
23
|
+
name: string;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof StateDto
|
|
28
|
+
*/
|
|
29
|
+
iso2: string;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof StateDto
|
|
34
|
+
*/
|
|
35
|
+
countryCode: string;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Check if a given object implements the StateDto interface.
|
|
39
|
+
*/
|
|
40
|
+
export declare function instanceOfStateDto(value: object): value is StateDto;
|
|
41
|
+
export declare function StateDtoFromJSON(json: any): StateDto;
|
|
42
|
+
export declare function StateDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): StateDto;
|
|
43
|
+
export declare function StateDtoToJSON(json: any): StateDto;
|
|
44
|
+
export declare function StateDtoToJSONTyped(value?: StateDto | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,59 @@
|
|
|
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.instanceOfStateDto = instanceOfStateDto;
|
|
17
|
+
exports.StateDtoFromJSON = StateDtoFromJSON;
|
|
18
|
+
exports.StateDtoFromJSONTyped = StateDtoFromJSONTyped;
|
|
19
|
+
exports.StateDtoToJSON = StateDtoToJSON;
|
|
20
|
+
exports.StateDtoToJSONTyped = StateDtoToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the StateDto interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfStateDto(value) {
|
|
25
|
+
if (!('name' in value) || value['name'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
if (!('iso2' in value) || value['iso2'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
if (!('countryCode' in value) || value['countryCode'] === undefined)
|
|
30
|
+
return false;
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
function StateDtoFromJSON(json) {
|
|
34
|
+
return StateDtoFromJSONTyped(json, false);
|
|
35
|
+
}
|
|
36
|
+
function StateDtoFromJSONTyped(json, ignoreDiscriminator) {
|
|
37
|
+
if (json == null) {
|
|
38
|
+
return json;
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
'name': json['name'],
|
|
42
|
+
'iso2': json['iso2'],
|
|
43
|
+
'countryCode': json['countryCode'],
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
function StateDtoToJSON(json) {
|
|
47
|
+
return StateDtoToJSONTyped(json, false);
|
|
48
|
+
}
|
|
49
|
+
function StateDtoToJSONTyped(value, ignoreDiscriminator) {
|
|
50
|
+
if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
|
|
51
|
+
if (value == null) {
|
|
52
|
+
return value;
|
|
53
|
+
}
|
|
54
|
+
return {
|
|
55
|
+
'name': value['name'],
|
|
56
|
+
'iso2': value['iso2'],
|
|
57
|
+
'countryCode': value['countryCode'],
|
|
58
|
+
};
|
|
59
|
+
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -391,6 +391,7 @@ export * from './SetNewPasswordInput';
|
|
|
391
391
|
export * from './SetPayoutProviderInput';
|
|
392
392
|
export * from './SortDto';
|
|
393
393
|
export * from './StartAuctionInput';
|
|
394
|
+
export * from './StateDto';
|
|
394
395
|
export * from './StatsFilterInputDateRange';
|
|
395
396
|
export * from './StoreBuyerLocaleInput';
|
|
396
397
|
export * from './StoreUserLocaleInput';
|
package/dist/models/index.js
CHANGED
|
@@ -409,6 +409,7 @@ __exportStar(require("./SetNewPasswordInput"), exports);
|
|
|
409
409
|
__exportStar(require("./SetPayoutProviderInput"), exports);
|
|
410
410
|
__exportStar(require("./SortDto"), exports);
|
|
411
411
|
__exportStar(require("./StartAuctionInput"), exports);
|
|
412
|
+
__exportStar(require("./StateDto"), exports);
|
|
412
413
|
__exportStar(require("./StatsFilterInputDateRange"), exports);
|
|
413
414
|
__exportStar(require("./StoreBuyerLocaleInput"), exports);
|
|
414
415
|
__exportStar(require("./StoreUserLocaleInput"), exports);
|
package/package.json
CHANGED
|
@@ -0,0 +1,86 @@
|
|
|
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
|
+
|
|
16
|
+
import * as runtime from '../runtime';
|
|
17
|
+
import type {
|
|
18
|
+
StateDto,
|
|
19
|
+
ValidationException,
|
|
20
|
+
} from '../models/index';
|
|
21
|
+
import {
|
|
22
|
+
StateDtoFromJSON,
|
|
23
|
+
StateDtoToJSON,
|
|
24
|
+
ValidationExceptionFromJSON,
|
|
25
|
+
ValidationExceptionToJSON,
|
|
26
|
+
} from '../models/index';
|
|
27
|
+
|
|
28
|
+
export interface AddressPublicApiListStatesByCountryRequest {
|
|
29
|
+
countryCode: string;
|
|
30
|
+
locale: string;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
*
|
|
35
|
+
*/
|
|
36
|
+
export class AddressPublicApi extends runtime.BaseAPI {
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* List states by country code
|
|
40
|
+
*/
|
|
41
|
+
async listStatesByCountryRaw(requestParameters: AddressPublicApiListStatesByCountryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<StateDto>>> {
|
|
42
|
+
if (requestParameters['countryCode'] == null) {
|
|
43
|
+
throw new runtime.RequiredError(
|
|
44
|
+
'countryCode',
|
|
45
|
+
'Required parameter "countryCode" was null or undefined when calling listStatesByCountry().'
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
if (requestParameters['locale'] == null) {
|
|
50
|
+
throw new runtime.RequiredError(
|
|
51
|
+
'locale',
|
|
52
|
+
'Required parameter "locale" was null or undefined when calling listStatesByCountry().'
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const queryParameters: any = {};
|
|
57
|
+
|
|
58
|
+
if (requestParameters['countryCode'] != null) {
|
|
59
|
+
queryParameters['countryCode'] = requestParameters['countryCode'];
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
if (requestParameters['locale'] != null) {
|
|
63
|
+
queryParameters['locale'] = requestParameters['locale'];
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
67
|
+
|
|
68
|
+
const response = await this.request({
|
|
69
|
+
path: `/address/states`,
|
|
70
|
+
method: 'GET',
|
|
71
|
+
headers: headerParameters,
|
|
72
|
+
query: queryParameters,
|
|
73
|
+
}, initOverrides);
|
|
74
|
+
|
|
75
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(StateDtoFromJSON));
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* List states by country code
|
|
80
|
+
*/
|
|
81
|
+
async listStatesByCountry(requestParameters: AddressPublicApiListStatesByCountryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<StateDto>> {
|
|
82
|
+
const response = await this.listStatesByCountryRaw(requestParameters, initOverrides);
|
|
83
|
+
return await response.value();
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
}
|
package/src/apis/index.ts
CHANGED
|
@@ -0,0 +1,84 @@
|
|
|
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 StateDto
|
|
20
|
+
*/
|
|
21
|
+
export interface StateDto {
|
|
22
|
+
/**
|
|
23
|
+
* Display name for the requested locale (translation or fallback to stored name)
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof StateDto
|
|
26
|
+
*/
|
|
27
|
+
name: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof StateDto
|
|
32
|
+
*/
|
|
33
|
+
iso2: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof StateDto
|
|
38
|
+
*/
|
|
39
|
+
countryCode: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Check if a given object implements the StateDto interface.
|
|
44
|
+
*/
|
|
45
|
+
export function instanceOfStateDto(value: object): value is StateDto {
|
|
46
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
47
|
+
if (!('iso2' in value) || value['iso2'] === undefined) return false;
|
|
48
|
+
if (!('countryCode' in value) || value['countryCode'] === undefined) return false;
|
|
49
|
+
return true;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function StateDtoFromJSON(json: any): StateDto {
|
|
53
|
+
return StateDtoFromJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function StateDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): StateDto {
|
|
57
|
+
if (json == null) {
|
|
58
|
+
return json;
|
|
59
|
+
}
|
|
60
|
+
return {
|
|
61
|
+
|
|
62
|
+
'name': json['name'],
|
|
63
|
+
'iso2': json['iso2'],
|
|
64
|
+
'countryCode': json['countryCode'],
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function StateDtoToJSON(json: any): StateDto {
|
|
69
|
+
return StateDtoToJSONTyped(json, false);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function StateDtoToJSONTyped(value?: StateDto | null, ignoreDiscriminator: boolean = false): any {
|
|
73
|
+
if (value == null) {
|
|
74
|
+
return value;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
return {
|
|
78
|
+
|
|
79
|
+
'name': value['name'],
|
|
80
|
+
'iso2': value['iso2'],
|
|
81
|
+
'countryCode': value['countryCode'],
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
|
package/src/models/index.ts
CHANGED
|
@@ -393,6 +393,7 @@ export * from './SetNewPasswordInput';
|
|
|
393
393
|
export * from './SetPayoutProviderInput';
|
|
394
394
|
export * from './SortDto';
|
|
395
395
|
export * from './StartAuctionInput';
|
|
396
|
+
export * from './StateDto';
|
|
396
397
|
export * from './StatsFilterInputDateRange';
|
|
397
398
|
export * from './StoreBuyerLocaleInput';
|
|
398
399
|
export * from './StoreUserLocaleInput';
|