@randock/nameshift-api-client 0.0.56 → 0.0.58

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.
@@ -6,6 +6,8 @@ package.json
6
6
  src/apis/AccountsApi.ts
7
7
  src/apis/AccountsPublicApi.ts
8
8
  src/apis/AdminApi.ts
9
+ src/apis/BuyersApi.ts
10
+ src/apis/BuyersPublicApi.ts
9
11
  src/apis/DashboardApi.ts
10
12
  src/apis/DomainsApi.ts
11
13
  src/apis/DomainsPublicApi.ts
@@ -23,6 +25,7 @@ src/models/AccountSettingsInput.ts
23
25
  src/models/AdminGetAllDomainTransfers200Response.ts
24
26
  src/models/BatchUpdateDomainsInput.ts
25
27
  src/models/BuyDomainInput.ts
28
+ src/models/BuyerUserDto.ts
26
29
  src/models/ChangeOrderStatusInput.ts
27
30
  src/models/ConflictException.ts
28
31
  src/models/CreateLeadInput.ts
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## @randock/nameshift-api-client@0.0.56
1
+ ## @randock/nameshift-api-client@0.0.58
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.56 --save
39
+ npm install @randock/nameshift-api-client@0.0.58 --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
- 0f24a8bb1fb90d1e3257a1a4775fdced5ed3e37e5b524088d8bd4d8c057a5c24ff9613d5588f340572c59d0015da4b48
47
+ 374b6e0d25599dbc01b7428e73709eec78fffa1fcb9f64cc25145ba2f13cefb352226feb87b7bb18d4ebd22abdbb0261
@@ -0,0 +1,26 @@
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 { BuyerUserDto } from '../models/index';
14
+ /**
15
+ *
16
+ */
17
+ export declare class BuyersApi extends runtime.BaseAPI {
18
+ /**
19
+ *
20
+ */
21
+ buyerMeRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BuyerUserDto>>;
22
+ /**
23
+ *
24
+ */
25
+ buyerMe(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BuyerUserDto>;
26
+ }
@@ -0,0 +1,130 @@
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;
41
+ return g = { next: verb(0), "throw": verb(1), "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.BuyersApi = void 0;
68
+ var runtime = require("../runtime");
69
+ var index_1 = require("../models/index");
70
+ /**
71
+ *
72
+ */
73
+ var BuyersApi = /** @class */ (function (_super) {
74
+ __extends(BuyersApi, _super);
75
+ function BuyersApi() {
76
+ return _super !== null && _super.apply(this, arguments) || this;
77
+ }
78
+ /**
79
+ *
80
+ */
81
+ BuyersApi.prototype.buyerMeRaw = function (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
+ queryParameters = {};
88
+ headerParameters = {};
89
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
90
+ token = this.configuration.accessToken;
91
+ return [4 /*yield*/, token("bearer", [])];
92
+ case 1:
93
+ tokenString = _a.sent();
94
+ if (tokenString) {
95
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
96
+ }
97
+ _a.label = 2;
98
+ case 2: return [4 /*yield*/, this.request({
99
+ path: "/buyers/private/me",
100
+ method: 'GET',
101
+ headers: headerParameters,
102
+ query: queryParameters,
103
+ }, initOverrides)];
104
+ case 3:
105
+ response = _a.sent();
106
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.BuyerUserDtoFromJSON)(jsonValue); })];
107
+ }
108
+ });
109
+ });
110
+ };
111
+ /**
112
+ *
113
+ */
114
+ BuyersApi.prototype.buyerMe = function (initOverrides) {
115
+ return __awaiter(this, void 0, void 0, function () {
116
+ var response;
117
+ return __generator(this, function (_a) {
118
+ switch (_a.label) {
119
+ case 0: return [4 /*yield*/, this.buyerMeRaw(initOverrides)];
120
+ case 1:
121
+ response = _a.sent();
122
+ return [4 /*yield*/, response.value()];
123
+ case 2: return [2 /*return*/, _a.sent()];
124
+ }
125
+ });
126
+ });
127
+ };
128
+ return BuyersApi;
129
+ }(runtime.BaseAPI));
130
+ exports.BuyersApi = BuyersApi;
@@ -0,0 +1,29 @@
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 { LoginDto, LoginInput } from '../models/index';
14
+ export interface BuyersPublicApiBuyerLoginRequest {
15
+ loginInput: LoginInput;
16
+ }
17
+ /**
18
+ *
19
+ */
20
+ export declare class BuyersPublicApi extends runtime.BaseAPI {
21
+ /**
22
+ *
23
+ */
24
+ buyerLoginRaw(requestParameters: BuyersPublicApiBuyerLoginRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LoginDto>>;
25
+ /**
26
+ *
27
+ */
28
+ buyerLogin(requestParameters: BuyersPublicApiBuyerLoginRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LoginDto>;
29
+ }
@@ -0,0 +1,126 @@
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;
41
+ return g = { next: verb(0), "throw": verb(1), "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.BuyersPublicApi = void 0;
68
+ var runtime = require("../runtime");
69
+ var index_1 = require("../models/index");
70
+ /**
71
+ *
72
+ */
73
+ var BuyersPublicApi = /** @class */ (function (_super) {
74
+ __extends(BuyersPublicApi, _super);
75
+ function BuyersPublicApi() {
76
+ return _super !== null && _super.apply(this, arguments) || this;
77
+ }
78
+ /**
79
+ *
80
+ */
81
+ BuyersPublicApi.prototype.buyerLoginRaw = 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['loginInput'] == null) {
88
+ throw new runtime.RequiredError('loginInput', 'Required parameter "loginInput" was null or undefined when calling buyerLogin().');
89
+ }
90
+ queryParameters = {};
91
+ headerParameters = {};
92
+ headerParameters['Content-Type'] = 'application/json';
93
+ return [4 /*yield*/, this.request({
94
+ path: "/buyers/login",
95
+ method: 'POST',
96
+ headers: headerParameters,
97
+ query: queryParameters,
98
+ body: (0, index_1.LoginInputToJSON)(requestParameters['loginInput']),
99
+ }, initOverrides)];
100
+ case 1:
101
+ response = _a.sent();
102
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.LoginDtoFromJSON)(jsonValue); })];
103
+ }
104
+ });
105
+ });
106
+ };
107
+ /**
108
+ *
109
+ */
110
+ BuyersPublicApi.prototype.buyerLogin = function (requestParameters, initOverrides) {
111
+ return __awaiter(this, void 0, void 0, function () {
112
+ var response;
113
+ return __generator(this, function (_a) {
114
+ switch (_a.label) {
115
+ case 0: return [4 /*yield*/, this.buyerLoginRaw(requestParameters, initOverrides)];
116
+ case 1:
117
+ response = _a.sent();
118
+ return [4 /*yield*/, response.value()];
119
+ case 2: return [2 /*return*/, _a.sent()];
120
+ }
121
+ });
122
+ });
123
+ };
124
+ return BuyersPublicApi;
125
+ }(runtime.BaseAPI));
126
+ exports.BuyersPublicApi = BuyersPublicApi;
@@ -1,6 +1,8 @@
1
1
  export * from './AccountsApi';
2
2
  export * from './AccountsPublicApi';
3
3
  export * from './AdminApi';
4
+ export * from './BuyersApi';
5
+ export * from './BuyersPublicApi';
4
6
  export * from './DashboardApi';
5
7
  export * from './DomainsApi';
6
8
  export * from './DomainsPublicApi';
@@ -19,6 +19,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
19
19
  __exportStar(require("./AccountsApi"), exports);
20
20
  __exportStar(require("./AccountsPublicApi"), exports);
21
21
  __exportStar(require("./AdminApi"), exports);
22
+ __exportStar(require("./BuyersApi"), exports);
23
+ __exportStar(require("./BuyersPublicApi"), exports);
22
24
  __exportStar(require("./DashboardApi"), exports);
23
25
  __exportStar(require("./DomainsApi"), exports);
24
26
  __exportStar(require("./DomainsPublicApi"), exports);
@@ -0,0 +1,55 @@
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 BuyerUserDto
16
+ */
17
+ export interface BuyerUserDto {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof BuyerUserDto
22
+ */
23
+ id: string;
24
+ /**
25
+ * Buyer user locale
26
+ * @type {string}
27
+ * @memberof BuyerUserDto
28
+ */
29
+ locale: string;
30
+ /**
31
+ * Buyer user email address
32
+ * @type {string}
33
+ * @memberof BuyerUserDto
34
+ */
35
+ email: string;
36
+ /**
37
+ * Buyer user firstname
38
+ * @type {string}
39
+ * @memberof BuyerUserDto
40
+ */
41
+ firstname: string;
42
+ /**
43
+ * Buyer user lastname
44
+ * @type {string}
45
+ * @memberof BuyerUserDto
46
+ */
47
+ lastname: string;
48
+ }
49
+ /**
50
+ * Check if a given object implements the BuyerUserDto interface.
51
+ */
52
+ export declare function instanceOfBuyerUserDto(value: object): value is BuyerUserDto;
53
+ export declare function BuyerUserDtoFromJSON(json: any): BuyerUserDto;
54
+ export declare function BuyerUserDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): BuyerUserDto;
55
+ export declare function BuyerUserDtoToJSON(value?: BuyerUserDto | null): any;
@@ -0,0 +1,63 @@
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.BuyerUserDtoToJSON = exports.BuyerUserDtoFromJSONTyped = exports.BuyerUserDtoFromJSON = exports.instanceOfBuyerUserDto = void 0;
17
+ /**
18
+ * Check if a given object implements the BuyerUserDto interface.
19
+ */
20
+ function instanceOfBuyerUserDto(value) {
21
+ if (!('id' in value) || value['id'] === undefined)
22
+ return false;
23
+ if (!('locale' in value) || value['locale'] === undefined)
24
+ return false;
25
+ if (!('email' in value) || value['email'] === undefined)
26
+ return false;
27
+ if (!('firstname' in value) || value['firstname'] === undefined)
28
+ return false;
29
+ if (!('lastname' in value) || value['lastname'] === undefined)
30
+ return false;
31
+ return true;
32
+ }
33
+ exports.instanceOfBuyerUserDto = instanceOfBuyerUserDto;
34
+ function BuyerUserDtoFromJSON(json) {
35
+ return BuyerUserDtoFromJSONTyped(json, false);
36
+ }
37
+ exports.BuyerUserDtoFromJSON = BuyerUserDtoFromJSON;
38
+ function BuyerUserDtoFromJSONTyped(json, ignoreDiscriminator) {
39
+ if (json == null) {
40
+ return json;
41
+ }
42
+ return {
43
+ 'id': json['id'],
44
+ 'locale': json['locale'],
45
+ 'email': json['email'],
46
+ 'firstname': json['firstname'],
47
+ 'lastname': json['lastname'],
48
+ };
49
+ }
50
+ exports.BuyerUserDtoFromJSONTyped = BuyerUserDtoFromJSONTyped;
51
+ function BuyerUserDtoToJSON(value) {
52
+ if (value == null) {
53
+ return value;
54
+ }
55
+ return {
56
+ 'id': value['id'],
57
+ 'locale': value['locale'],
58
+ 'email': value['email'],
59
+ 'firstname': value['firstname'],
60
+ 'lastname': value['lastname'],
61
+ };
62
+ }
63
+ exports.BuyerUserDtoToJSON = BuyerUserDtoToJSON;
@@ -6,6 +6,7 @@ export * from './AccountSettingsInput';
6
6
  export * from './AdminGetAllDomainTransfers200Response';
7
7
  export * from './BatchUpdateDomainsInput';
8
8
  export * from './BuyDomainInput';
9
+ export * from './BuyerUserDto';
9
10
  export * from './ChangeOrderStatusInput';
10
11
  export * from './ConflictException';
11
12
  export * from './CreateLeadInput';
@@ -24,6 +24,7 @@ __exportStar(require("./AccountSettingsInput"), exports);
24
24
  __exportStar(require("./AdminGetAllDomainTransfers200Response"), exports);
25
25
  __exportStar(require("./BatchUpdateDomainsInput"), exports);
26
26
  __exportStar(require("./BuyDomainInput"), exports);
27
+ __exportStar(require("./BuyerUserDto"), exports);
27
28
  __exportStar(require("./ChangeOrderStatusInput"), exports);
28
29
  __exportStar(require("./ConflictException"), exports);
29
30
  __exportStar(require("./CreateLeadInput"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@randock/nameshift-api-client",
3
- "version": "0.0.56",
3
+ "version": "0.0.58",
4
4
  "description": "OpenAPI client for @randock/nameshift-api-client",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -0,0 +1,70 @@
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
+ BuyerUserDto,
19
+ ThrottlerException,
20
+ ValidationException,
21
+ } from '../models/index';
22
+ import {
23
+ BuyerUserDtoFromJSON,
24
+ BuyerUserDtoToJSON,
25
+ ThrottlerExceptionFromJSON,
26
+ ThrottlerExceptionToJSON,
27
+ ValidationExceptionFromJSON,
28
+ ValidationExceptionToJSON,
29
+ } from '../models/index';
30
+
31
+ /**
32
+ *
33
+ */
34
+ export class BuyersApi extends runtime.BaseAPI {
35
+
36
+ /**
37
+ *
38
+ */
39
+ async buyerMeRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BuyerUserDto>> {
40
+ const queryParameters: any = {};
41
+
42
+ const headerParameters: runtime.HTTPHeaders = {};
43
+
44
+ if (this.configuration && this.configuration.accessToken) {
45
+ const token = this.configuration.accessToken;
46
+ const tokenString = await token("bearer", []);
47
+
48
+ if (tokenString) {
49
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
50
+ }
51
+ }
52
+ const response = await this.request({
53
+ path: `/buyers/private/me`,
54
+ method: 'GET',
55
+ headers: headerParameters,
56
+ query: queryParameters,
57
+ }, initOverrides);
58
+
59
+ return new runtime.JSONApiResponse(response, (jsonValue) => BuyerUserDtoFromJSON(jsonValue));
60
+ }
61
+
62
+ /**
63
+ *
64
+ */
65
+ async buyerMe(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BuyerUserDto> {
66
+ const response = await this.buyerMeRaw(initOverrides);
67
+ return await response.value();
68
+ }
69
+
70
+ }
@@ -0,0 +1,79 @@
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
+ LoginDto,
19
+ LoginInput,
20
+ ThrottlerException,
21
+ ValidationException,
22
+ } from '../models/index';
23
+ import {
24
+ LoginDtoFromJSON,
25
+ LoginDtoToJSON,
26
+ LoginInputFromJSON,
27
+ LoginInputToJSON,
28
+ ThrottlerExceptionFromJSON,
29
+ ThrottlerExceptionToJSON,
30
+ ValidationExceptionFromJSON,
31
+ ValidationExceptionToJSON,
32
+ } from '../models/index';
33
+
34
+ export interface BuyersPublicApiBuyerLoginRequest {
35
+ loginInput: LoginInput;
36
+ }
37
+
38
+ /**
39
+ *
40
+ */
41
+ export class BuyersPublicApi extends runtime.BaseAPI {
42
+
43
+ /**
44
+ *
45
+ */
46
+ async buyerLoginRaw(requestParameters: BuyersPublicApiBuyerLoginRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LoginDto>> {
47
+ if (requestParameters['loginInput'] == null) {
48
+ throw new runtime.RequiredError(
49
+ 'loginInput',
50
+ 'Required parameter "loginInput" was null or undefined when calling buyerLogin().'
51
+ );
52
+ }
53
+
54
+ const queryParameters: any = {};
55
+
56
+ const headerParameters: runtime.HTTPHeaders = {};
57
+
58
+ headerParameters['Content-Type'] = 'application/json';
59
+
60
+ const response = await this.request({
61
+ path: `/buyers/login`,
62
+ method: 'POST',
63
+ headers: headerParameters,
64
+ query: queryParameters,
65
+ body: LoginInputToJSON(requestParameters['loginInput']),
66
+ }, initOverrides);
67
+
68
+ return new runtime.JSONApiResponse(response, (jsonValue) => LoginDtoFromJSON(jsonValue));
69
+ }
70
+
71
+ /**
72
+ *
73
+ */
74
+ async buyerLogin(requestParameters: BuyersPublicApiBuyerLoginRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LoginDto> {
75
+ const response = await this.buyerLoginRaw(requestParameters, initOverrides);
76
+ return await response.value();
77
+ }
78
+
79
+ }
package/src/apis/index.ts CHANGED
@@ -3,6 +3,8 @@
3
3
  export * from './AccountsApi';
4
4
  export * from './AccountsPublicApi';
5
5
  export * from './AdminApi';
6
+ export * from './BuyersApi';
7
+ export * from './BuyersPublicApi';
6
8
  export * from './DashboardApi';
7
9
  export * from './DomainsApi';
8
10
  export * from './DomainsPublicApi';
@@ -0,0 +1,97 @@
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 BuyerUserDto
20
+ */
21
+ export interface BuyerUserDto {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof BuyerUserDto
26
+ */
27
+ id: string;
28
+ /**
29
+ * Buyer user locale
30
+ * @type {string}
31
+ * @memberof BuyerUserDto
32
+ */
33
+ locale: string;
34
+ /**
35
+ * Buyer user email address
36
+ * @type {string}
37
+ * @memberof BuyerUserDto
38
+ */
39
+ email: string;
40
+ /**
41
+ * Buyer user firstname
42
+ * @type {string}
43
+ * @memberof BuyerUserDto
44
+ */
45
+ firstname: string;
46
+ /**
47
+ * Buyer user lastname
48
+ * @type {string}
49
+ * @memberof BuyerUserDto
50
+ */
51
+ lastname: string;
52
+ }
53
+
54
+ /**
55
+ * Check if a given object implements the BuyerUserDto interface.
56
+ */
57
+ export function instanceOfBuyerUserDto(value: object): value is BuyerUserDto {
58
+ if (!('id' in value) || value['id'] === undefined) return false;
59
+ if (!('locale' in value) || value['locale'] === undefined) return false;
60
+ if (!('email' in value) || value['email'] === undefined) return false;
61
+ if (!('firstname' in value) || value['firstname'] === undefined) return false;
62
+ if (!('lastname' in value) || value['lastname'] === undefined) return false;
63
+ return true;
64
+ }
65
+
66
+ export function BuyerUserDtoFromJSON(json: any): BuyerUserDto {
67
+ return BuyerUserDtoFromJSONTyped(json, false);
68
+ }
69
+
70
+ export function BuyerUserDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): BuyerUserDto {
71
+ if (json == null) {
72
+ return json;
73
+ }
74
+ return {
75
+
76
+ 'id': json['id'],
77
+ 'locale': json['locale'],
78
+ 'email': json['email'],
79
+ 'firstname': json['firstname'],
80
+ 'lastname': json['lastname'],
81
+ };
82
+ }
83
+
84
+ export function BuyerUserDtoToJSON(value?: BuyerUserDto | null): any {
85
+ if (value == null) {
86
+ return value;
87
+ }
88
+ return {
89
+
90
+ 'id': value['id'],
91
+ 'locale': value['locale'],
92
+ 'email': value['email'],
93
+ 'firstname': value['firstname'],
94
+ 'lastname': value['lastname'],
95
+ };
96
+ }
97
+
@@ -8,6 +8,7 @@ export * from './AccountSettingsInput';
8
8
  export * from './AdminGetAllDomainTransfers200Response';
9
9
  export * from './BatchUpdateDomainsInput';
10
10
  export * from './BuyDomainInput';
11
+ export * from './BuyerUserDto';
11
12
  export * from './ChangeOrderStatusInput';
12
13
  export * from './ConflictException';
13
14
  export * from './CreateLeadInput';