@randock/nameshift-api-client 0.0.5 → 0.0.6

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.
@@ -5,8 +5,8 @@ package.json
5
5
  src/apis/AccountsApi.ts
6
6
  src/apis/AuthApi.ts
7
7
  src/apis/DomainsApi.ts
8
- src/apis/LeadsApi.ts
9
- src/apis/TestApi.ts
8
+ src/apis/DomainsPublicApi.ts
9
+ src/apis/LeadsPublicApi.ts
10
10
  src/apis/index.ts
11
11
  src/index.ts
12
12
  src/models/AccountAddressDto.ts
@@ -29,7 +29,6 @@ src/models/LeadDto.ts
29
29
  src/models/List200Response.ts
30
30
  src/models/List400Response.ts
31
31
  src/models/List401Response.ts
32
- src/models/List429Response.ts
33
32
  src/models/Login401Response.ts
34
33
  src/models/Login429Response.ts
35
34
  src/models/LoginInput.ts
@@ -38,9 +37,11 @@ src/models/MoneyInput.ts
38
37
  src/models/PaginateResponse.ts
39
38
  src/models/PaginateResponseLinks.ts
40
39
  src/models/PaginateResponseMeta.ts
40
+ src/models/PublicDomainControllerGetDomainIdentifier404Response.ts
41
41
  src/models/TokenDto.ts
42
42
  src/models/UpdateDomainInput.ts
43
43
  src/models/UpdateSettings401Response.ts
44
+ src/models/UpdateSettings429Response.ts
44
45
  src/models/index.ts
45
46
  src/runtime.ts
46
47
  tsconfig.json
@@ -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
+ export interface PublicDomainControllerGetDomainIdentifierRequest {
14
+ domainName: string;
15
+ }
16
+ /**
17
+ *
18
+ */
19
+ export declare class DomainsPublicApi extends runtime.BaseAPI {
20
+ /**
21
+ */
22
+ publicDomainControllerGetDomainIdentifierRaw(requestParameters: PublicDomainControllerGetDomainIdentifierRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<object>>;
23
+ /**
24
+ */
25
+ publicDomainControllerGetDomainIdentifier(requestParameters: PublicDomainControllerGetDomainIdentifierRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<object>;
26
+ }
@@ -0,0 +1,121 @@
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.DomainsPublicApi = void 0;
68
+ var runtime = require("../runtime");
69
+ /**
70
+ *
71
+ */
72
+ var DomainsPublicApi = /** @class */ (function (_super) {
73
+ __extends(DomainsPublicApi, _super);
74
+ function DomainsPublicApi() {
75
+ return _super !== null && _super.apply(this, arguments) || this;
76
+ }
77
+ /**
78
+ */
79
+ DomainsPublicApi.prototype.publicDomainControllerGetDomainIdentifierRaw = function (requestParameters, initOverrides) {
80
+ return __awaiter(this, void 0, void 0, function () {
81
+ var queryParameters, headerParameters, response;
82
+ return __generator(this, function (_a) {
83
+ switch (_a.label) {
84
+ case 0:
85
+ if (requestParameters.domainName === null || requestParameters.domainName === undefined) {
86
+ throw new runtime.RequiredError('domainName', 'Required parameter requestParameters.domainName was null or undefined when calling publicDomainControllerGetDomainIdentifier.');
87
+ }
88
+ queryParameters = {};
89
+ headerParameters = {};
90
+ return [4 /*yield*/, this.request({
91
+ path: "/domains/by-name/{domainName}/identifier".replace("{".concat("domainName", "}"), encodeURIComponent(String(requestParameters.domainName))),
92
+ method: 'GET',
93
+ headers: headerParameters,
94
+ query: queryParameters,
95
+ }, initOverrides)];
96
+ case 1:
97
+ response = _a.sent();
98
+ return [2 /*return*/, new runtime.JSONApiResponse(response)];
99
+ }
100
+ });
101
+ });
102
+ };
103
+ /**
104
+ */
105
+ DomainsPublicApi.prototype.publicDomainControllerGetDomainIdentifier = function (requestParameters, initOverrides) {
106
+ return __awaiter(this, void 0, void 0, function () {
107
+ var response;
108
+ return __generator(this, function (_a) {
109
+ switch (_a.label) {
110
+ case 0: return [4 /*yield*/, this.publicDomainControllerGetDomainIdentifierRaw(requestParameters, initOverrides)];
111
+ case 1:
112
+ response = _a.sent();
113
+ return [4 /*yield*/, response.value()];
114
+ case 2: return [2 /*return*/, _a.sent()];
115
+ }
116
+ });
117
+ });
118
+ };
119
+ return DomainsPublicApi;
120
+ }(runtime.BaseAPI));
121
+ exports.DomainsPublicApi = DomainsPublicApi;
@@ -0,0 +1,27 @@
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 { CreateLeadInput, LeadDto } from '../models/index';
14
+ export interface PublicLeadControllerPostLeadRequest {
15
+ createLeadInput: CreateLeadInput;
16
+ }
17
+ /**
18
+ *
19
+ */
20
+ export declare class LeadsPublicApi extends runtime.BaseAPI {
21
+ /**
22
+ */
23
+ publicLeadControllerPostLeadRaw(requestParameters: PublicLeadControllerPostLeadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LeadDto>>;
24
+ /**
25
+ */
26
+ publicLeadControllerPostLead(requestParameters: PublicLeadControllerPostLeadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LeadDto>;
27
+ }
@@ -0,0 +1,124 @@
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.LeadsPublicApi = void 0;
68
+ var runtime = require("../runtime");
69
+ var index_1 = require("../models/index");
70
+ /**
71
+ *
72
+ */
73
+ var LeadsPublicApi = /** @class */ (function (_super) {
74
+ __extends(LeadsPublicApi, _super);
75
+ function LeadsPublicApi() {
76
+ return _super !== null && _super.apply(this, arguments) || this;
77
+ }
78
+ /**
79
+ */
80
+ LeadsPublicApi.prototype.publicLeadControllerPostLeadRaw = function (requestParameters, initOverrides) {
81
+ return __awaiter(this, void 0, void 0, function () {
82
+ var queryParameters, headerParameters, response;
83
+ return __generator(this, function (_a) {
84
+ switch (_a.label) {
85
+ case 0:
86
+ if (requestParameters.createLeadInput === null || requestParameters.createLeadInput === undefined) {
87
+ throw new runtime.RequiredError('createLeadInput', 'Required parameter requestParameters.createLeadInput was null or undefined when calling publicLeadControllerPostLead.');
88
+ }
89
+ queryParameters = {};
90
+ headerParameters = {};
91
+ headerParameters['Content-Type'] = 'application/json';
92
+ return [4 /*yield*/, this.request({
93
+ path: "/leads",
94
+ method: 'POST',
95
+ headers: headerParameters,
96
+ query: queryParameters,
97
+ body: (0, index_1.CreateLeadInputToJSON)(requestParameters.createLeadInput),
98
+ }, initOverrides)];
99
+ case 1:
100
+ response = _a.sent();
101
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.LeadDtoFromJSON)(jsonValue); })];
102
+ }
103
+ });
104
+ });
105
+ };
106
+ /**
107
+ */
108
+ LeadsPublicApi.prototype.publicLeadControllerPostLead = function (requestParameters, initOverrides) {
109
+ return __awaiter(this, void 0, void 0, function () {
110
+ var response;
111
+ return __generator(this, function (_a) {
112
+ switch (_a.label) {
113
+ case 0: return [4 /*yield*/, this.publicLeadControllerPostLeadRaw(requestParameters, initOverrides)];
114
+ case 1:
115
+ response = _a.sent();
116
+ return [4 /*yield*/, response.value()];
117
+ case 2: return [2 /*return*/, _a.sent()];
118
+ }
119
+ });
120
+ });
121
+ };
122
+ return LeadsPublicApi;
123
+ }(runtime.BaseAPI));
124
+ exports.LeadsPublicApi = LeadsPublicApi;
@@ -1,5 +1,5 @@
1
1
  export * from './AccountsApi';
2
2
  export * from './AuthApi';
3
3
  export * from './DomainsApi';
4
- export * from './LeadsApi';
5
- export * from './TestApi';
4
+ export * from './DomainsPublicApi';
5
+ export * from './LeadsPublicApi';
@@ -19,5 +19,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
19
19
  __exportStar(require("./AccountsApi"), exports);
20
20
  __exportStar(require("./AuthApi"), exports);
21
21
  __exportStar(require("./DomainsApi"), exports);
22
- __exportStar(require("./LeadsApi"), exports);
23
- __exportStar(require("./TestApi"), exports);
22
+ __exportStar(require("./DomainsPublicApi"), exports);
23
+ __exportStar(require("./LeadsPublicApi"), exports);
@@ -22,6 +22,12 @@ export interface DomainDto {
22
22
  * @memberof DomainDto
23
23
  */
24
24
  id: string;
25
+ /**
26
+ * The TLD for this domain.
27
+ * @type {string}
28
+ * @memberof DomainDto
29
+ */
30
+ tld: string;
25
31
  /**
26
32
  * Whether this domain is verified by the owner (ns3, txt) or not.
27
33
  * @type {boolean}
@@ -21,6 +21,7 @@ var MoneyDto_1 = require("./MoneyDto");
21
21
  function instanceOfDomainDto(value) {
22
22
  var isInstance = true;
23
23
  isInstance = isInstance && "id" in value;
24
+ isInstance = isInstance && "tld" in value;
24
25
  isInstance = isInstance && "verified" in value;
25
26
  isInstance = isInstance && "nameservers" in value;
26
27
  isInstance = isInstance && "name" in value;
@@ -39,6 +40,7 @@ function DomainDtoFromJSONTyped(json, ignoreDiscriminator) {
39
40
  }
40
41
  return {
41
42
  'id': json['id'],
43
+ 'tld': json['tld'],
42
44
  'verified': json['verified'],
43
45
  'nameservers': json['nameservers'],
44
46
  'name': json['name'],
@@ -56,6 +58,7 @@ function DomainDtoToJSON(value) {
56
58
  }
57
59
  return {
58
60
  'id': value.id,
61
+ 'tld': value.tld,
59
62
  'verified': value.verified,
60
63
  'nameservers': value.nameservers,
61
64
  'name': value.name,
@@ -0,0 +1,43 @@
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
+ * Thrown if domain is not found.
14
+ * @export
15
+ * @interface PublicDomainControllerGetDomainIdentifier404Response
16
+ */
17
+ export interface PublicDomainControllerGetDomainIdentifier404Response {
18
+ /**
19
+ *
20
+ * @type {number}
21
+ * @memberof PublicDomainControllerGetDomainIdentifier404Response
22
+ */
23
+ statusCode: number;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof PublicDomainControllerGetDomainIdentifier404Response
28
+ */
29
+ message: string;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof PublicDomainControllerGetDomainIdentifier404Response
34
+ */
35
+ error?: string;
36
+ }
37
+ /**
38
+ * Check if a given object implements the PublicDomainControllerGetDomainIdentifier404Response interface.
39
+ */
40
+ export declare function instanceOfPublicDomainControllerGetDomainIdentifier404Response(value: object): boolean;
41
+ export declare function PublicDomainControllerGetDomainIdentifier404ResponseFromJSON(json: any): PublicDomainControllerGetDomainIdentifier404Response;
42
+ export declare function PublicDomainControllerGetDomainIdentifier404ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PublicDomainControllerGetDomainIdentifier404Response;
43
+ export declare function PublicDomainControllerGetDomainIdentifier404ResponseToJSON(value?: PublicDomainControllerGetDomainIdentifier404Response | null): any;
@@ -0,0 +1,56 @@
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.PublicDomainControllerGetDomainIdentifier404ResponseToJSON = exports.PublicDomainControllerGetDomainIdentifier404ResponseFromJSONTyped = exports.PublicDomainControllerGetDomainIdentifier404ResponseFromJSON = exports.instanceOfPublicDomainControllerGetDomainIdentifier404Response = void 0;
17
+ var runtime_1 = require("../runtime");
18
+ /**
19
+ * Check if a given object implements the PublicDomainControllerGetDomainIdentifier404Response interface.
20
+ */
21
+ function instanceOfPublicDomainControllerGetDomainIdentifier404Response(value) {
22
+ var isInstance = true;
23
+ isInstance = isInstance && "statusCode" in value;
24
+ isInstance = isInstance && "message" in value;
25
+ return isInstance;
26
+ }
27
+ exports.instanceOfPublicDomainControllerGetDomainIdentifier404Response = instanceOfPublicDomainControllerGetDomainIdentifier404Response;
28
+ function PublicDomainControllerGetDomainIdentifier404ResponseFromJSON(json) {
29
+ return PublicDomainControllerGetDomainIdentifier404ResponseFromJSONTyped(json, false);
30
+ }
31
+ exports.PublicDomainControllerGetDomainIdentifier404ResponseFromJSON = PublicDomainControllerGetDomainIdentifier404ResponseFromJSON;
32
+ function PublicDomainControllerGetDomainIdentifier404ResponseFromJSONTyped(json, ignoreDiscriminator) {
33
+ if ((json === undefined) || (json === null)) {
34
+ return json;
35
+ }
36
+ return {
37
+ 'statusCode': json['statusCode'],
38
+ 'message': json['message'],
39
+ 'error': !(0, runtime_1.exists)(json, 'error') ? undefined : json['error'],
40
+ };
41
+ }
42
+ exports.PublicDomainControllerGetDomainIdentifier404ResponseFromJSONTyped = PublicDomainControllerGetDomainIdentifier404ResponseFromJSONTyped;
43
+ function PublicDomainControllerGetDomainIdentifier404ResponseToJSON(value) {
44
+ if (value === undefined) {
45
+ return undefined;
46
+ }
47
+ if (value === null) {
48
+ return null;
49
+ }
50
+ return {
51
+ 'statusCode': value.statusCode,
52
+ 'message': value.message,
53
+ 'error': value.error,
54
+ };
55
+ }
56
+ exports.PublicDomainControllerGetDomainIdentifier404ResponseToJSON = PublicDomainControllerGetDomainIdentifier404ResponseToJSON;
@@ -0,0 +1,43 @@
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
+ * Returned if more than 300 requests are made per minute.
14
+ * @export
15
+ * @interface UpdateSettings429Response
16
+ */
17
+ export interface UpdateSettings429Response {
18
+ /**
19
+ *
20
+ * @type {number}
21
+ * @memberof UpdateSettings429Response
22
+ */
23
+ statusCode: number;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof UpdateSettings429Response
28
+ */
29
+ message: string;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof UpdateSettings429Response
34
+ */
35
+ error?: string;
36
+ }
37
+ /**
38
+ * Check if a given object implements the UpdateSettings429Response interface.
39
+ */
40
+ export declare function instanceOfUpdateSettings429Response(value: object): boolean;
41
+ export declare function UpdateSettings429ResponseFromJSON(json: any): UpdateSettings429Response;
42
+ export declare function UpdateSettings429ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateSettings429Response;
43
+ export declare function UpdateSettings429ResponseToJSON(value?: UpdateSettings429Response | null): any;
@@ -0,0 +1,56 @@
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.UpdateSettings429ResponseToJSON = exports.UpdateSettings429ResponseFromJSONTyped = exports.UpdateSettings429ResponseFromJSON = exports.instanceOfUpdateSettings429Response = void 0;
17
+ var runtime_1 = require("../runtime");
18
+ /**
19
+ * Check if a given object implements the UpdateSettings429Response interface.
20
+ */
21
+ function instanceOfUpdateSettings429Response(value) {
22
+ var isInstance = true;
23
+ isInstance = isInstance && "statusCode" in value;
24
+ isInstance = isInstance && "message" in value;
25
+ return isInstance;
26
+ }
27
+ exports.instanceOfUpdateSettings429Response = instanceOfUpdateSettings429Response;
28
+ function UpdateSettings429ResponseFromJSON(json) {
29
+ return UpdateSettings429ResponseFromJSONTyped(json, false);
30
+ }
31
+ exports.UpdateSettings429ResponseFromJSON = UpdateSettings429ResponseFromJSON;
32
+ function UpdateSettings429ResponseFromJSONTyped(json, ignoreDiscriminator) {
33
+ if ((json === undefined) || (json === null)) {
34
+ return json;
35
+ }
36
+ return {
37
+ 'statusCode': json['statusCode'],
38
+ 'message': json['message'],
39
+ 'error': !(0, runtime_1.exists)(json, 'error') ? undefined : json['error'],
40
+ };
41
+ }
42
+ exports.UpdateSettings429ResponseFromJSONTyped = UpdateSettings429ResponseFromJSONTyped;
43
+ function UpdateSettings429ResponseToJSON(value) {
44
+ if (value === undefined) {
45
+ return undefined;
46
+ }
47
+ if (value === null) {
48
+ return null;
49
+ }
50
+ return {
51
+ 'statusCode': value.statusCode,
52
+ 'message': value.message,
53
+ 'error': value.error,
54
+ };
55
+ }
56
+ exports.UpdateSettings429ResponseToJSON = UpdateSettings429ResponseToJSON;
@@ -18,7 +18,6 @@ export * from './LeadDto';
18
18
  export * from './List200Response';
19
19
  export * from './List400Response';
20
20
  export * from './List401Response';
21
- export * from './List429Response';
22
21
  export * from './Login401Response';
23
22
  export * from './Login429Response';
24
23
  export * from './LoginInput';
@@ -27,6 +26,8 @@ export * from './MoneyInput';
27
26
  export * from './PaginateResponse';
28
27
  export * from './PaginateResponseLinks';
29
28
  export * from './PaginateResponseMeta';
29
+ export * from './PublicDomainControllerGetDomainIdentifier404Response';
30
30
  export * from './TokenDto';
31
31
  export * from './UpdateDomainInput';
32
32
  export * from './UpdateSettings401Response';
33
+ export * from './UpdateSettings429Response';
@@ -36,7 +36,6 @@ __exportStar(require("./LeadDto"), exports);
36
36
  __exportStar(require("./List200Response"), exports);
37
37
  __exportStar(require("./List400Response"), exports);
38
38
  __exportStar(require("./List401Response"), exports);
39
- __exportStar(require("./List429Response"), exports);
40
39
  __exportStar(require("./Login401Response"), exports);
41
40
  __exportStar(require("./Login429Response"), exports);
42
41
  __exportStar(require("./LoginInput"), exports);
@@ -45,6 +44,8 @@ __exportStar(require("./MoneyInput"), exports);
45
44
  __exportStar(require("./PaginateResponse"), exports);
46
45
  __exportStar(require("./PaginateResponseLinks"), exports);
47
46
  __exportStar(require("./PaginateResponseMeta"), exports);
47
+ __exportStar(require("./PublicDomainControllerGetDomainIdentifier404Response"), exports);
48
48
  __exportStar(require("./TokenDto"), exports);
49
49
  __exportStar(require("./UpdateDomainInput"), exports);
50
50
  __exportStar(require("./UpdateSettings401Response"), exports);
51
+ __exportStar(require("./UpdateSettings429Response"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@randock/nameshift-api-client",
3
- "version": "0.0.5",
3
+ "version": "0.0.6",
4
4
  "description": "OpenAPI client for @randock/nameshift-api-client",
5
5
  "author": "OpenAPI-Generator",
6
6
  "main": "./dist/index.js",
@@ -22,8 +22,8 @@ import type {
22
22
  IntersectionAccountDtoWithAddressDto,
23
23
  IntersectionAccountDtoWithFinancialDto,
24
24
  IntersectionAccountDtoWithSettingsDto,
25
- List429Response,
26
25
  UpdateSettings401Response,
26
+ UpdateSettings429Response,
27
27
  } from '../models/index';
28
28
  import {
29
29
  AccountAddressInputFromJSON,
@@ -40,10 +40,10 @@ import {
40
40
  IntersectionAccountDtoWithFinancialDtoToJSON,
41
41
  IntersectionAccountDtoWithSettingsDtoFromJSON,
42
42
  IntersectionAccountDtoWithSettingsDtoToJSON,
43
- List429ResponseFromJSON,
44
- List429ResponseToJSON,
45
43
  UpdateSettings401ResponseFromJSON,
46
44
  UpdateSettings401ResponseToJSON,
45
+ UpdateSettings429ResponseFromJSON,
46
+ UpdateSettings429ResponseToJSON,
47
47
  } from '../models/index';
48
48
 
49
49
  export interface UpdateAddressRequest {
@@ -23,8 +23,8 @@ import type {
23
23
  List200Response,
24
24
  List400Response,
25
25
  List401Response,
26
- List429Response,
27
26
  UpdateDomainInput,
27
+ UpdateSettings429Response,
28
28
  } from '../models/index';
29
29
  import {
30
30
  BatchUpdate404ResponseFromJSON,
@@ -43,10 +43,10 @@ import {
43
43
  List400ResponseToJSON,
44
44
  List401ResponseFromJSON,
45
45
  List401ResponseToJSON,
46
- List429ResponseFromJSON,
47
- List429ResponseToJSON,
48
46
  UpdateDomainInputFromJSON,
49
47
  UpdateDomainInputToJSON,
48
+ UpdateSettings429ResponseFromJSON,
49
+ UpdateSettings429ResponseToJSON,
50
50
  } from '../models/index';
51
51
 
52
52
  export interface BatchImportRequest {
@@ -0,0 +1,62 @@
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
+ PublicDomainControllerGetDomainIdentifier404Response,
19
+ } from '../models/index';
20
+ import {
21
+ PublicDomainControllerGetDomainIdentifier404ResponseFromJSON,
22
+ PublicDomainControllerGetDomainIdentifier404ResponseToJSON,
23
+ } from '../models/index';
24
+
25
+ export interface PublicDomainControllerGetDomainIdentifierRequest {
26
+ domainName: string;
27
+ }
28
+
29
+ /**
30
+ *
31
+ */
32
+ export class DomainsPublicApi extends runtime.BaseAPI {
33
+
34
+ /**
35
+ */
36
+ async publicDomainControllerGetDomainIdentifierRaw(requestParameters: PublicDomainControllerGetDomainIdentifierRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<object>> {
37
+ if (requestParameters.domainName === null || requestParameters.domainName === undefined) {
38
+ throw new runtime.RequiredError('domainName','Required parameter requestParameters.domainName was null or undefined when calling publicDomainControllerGetDomainIdentifier.');
39
+ }
40
+
41
+ const queryParameters: any = {};
42
+
43
+ const headerParameters: runtime.HTTPHeaders = {};
44
+
45
+ const response = await this.request({
46
+ path: `/domains/by-name/{domainName}/identifier`.replace(`{${"domainName"}}`, encodeURIComponent(String(requestParameters.domainName))),
47
+ method: 'GET',
48
+ headers: headerParameters,
49
+ query: queryParameters,
50
+ }, initOverrides);
51
+
52
+ return new runtime.JSONApiResponse<any>(response);
53
+ }
54
+
55
+ /**
56
+ */
57
+ async publicDomainControllerGetDomainIdentifier(requestParameters: PublicDomainControllerGetDomainIdentifierRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<object> {
58
+ const response = await this.publicDomainControllerGetDomainIdentifierRaw(requestParameters, initOverrides);
59
+ return await response.value();
60
+ }
61
+
62
+ }
@@ -0,0 +1,71 @@
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
+ BatchUpdate404Response,
19
+ CreateLeadInput,
20
+ LeadDto,
21
+ } from '../models/index';
22
+ import {
23
+ BatchUpdate404ResponseFromJSON,
24
+ BatchUpdate404ResponseToJSON,
25
+ CreateLeadInputFromJSON,
26
+ CreateLeadInputToJSON,
27
+ LeadDtoFromJSON,
28
+ LeadDtoToJSON,
29
+ } from '../models/index';
30
+
31
+ export interface PublicLeadControllerPostLeadRequest {
32
+ createLeadInput: CreateLeadInput;
33
+ }
34
+
35
+ /**
36
+ *
37
+ */
38
+ export class LeadsPublicApi extends runtime.BaseAPI {
39
+
40
+ /**
41
+ */
42
+ async publicLeadControllerPostLeadRaw(requestParameters: PublicLeadControllerPostLeadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LeadDto>> {
43
+ if (requestParameters.createLeadInput === null || requestParameters.createLeadInput === undefined) {
44
+ throw new runtime.RequiredError('createLeadInput','Required parameter requestParameters.createLeadInput was null or undefined when calling publicLeadControllerPostLead.');
45
+ }
46
+
47
+ const queryParameters: any = {};
48
+
49
+ const headerParameters: runtime.HTTPHeaders = {};
50
+
51
+ headerParameters['Content-Type'] = 'application/json';
52
+
53
+ const response = await this.request({
54
+ path: `/leads`,
55
+ method: 'POST',
56
+ headers: headerParameters,
57
+ query: queryParameters,
58
+ body: CreateLeadInputToJSON(requestParameters.createLeadInput),
59
+ }, initOverrides);
60
+
61
+ return new runtime.JSONApiResponse(response, (jsonValue) => LeadDtoFromJSON(jsonValue));
62
+ }
63
+
64
+ /**
65
+ */
66
+ async publicLeadControllerPostLead(requestParameters: PublicLeadControllerPostLeadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LeadDto> {
67
+ const response = await this.publicLeadControllerPostLeadRaw(requestParameters, initOverrides);
68
+ return await response.value();
69
+ }
70
+
71
+ }
package/src/apis/index.ts CHANGED
@@ -3,5 +3,5 @@
3
3
  export * from './AccountsApi';
4
4
  export * from './AuthApi';
5
5
  export * from './DomainsApi';
6
- export * from './LeadsApi';
7
- export * from './TestApi';
6
+ export * from './DomainsPublicApi';
7
+ export * from './LeadsPublicApi';
@@ -32,6 +32,12 @@ export interface DomainDto {
32
32
  * @memberof DomainDto
33
33
  */
34
34
  id: string;
35
+ /**
36
+ * The TLD for this domain.
37
+ * @type {string}
38
+ * @memberof DomainDto
39
+ */
40
+ tld: string;
35
41
  /**
36
42
  * Whether this domain is verified by the owner (ns3, txt) or not.
37
43
  * @type {boolean}
@@ -70,6 +76,7 @@ export interface DomainDto {
70
76
  export function instanceOfDomainDto(value: object): boolean {
71
77
  let isInstance = true;
72
78
  isInstance = isInstance && "id" in value;
79
+ isInstance = isInstance && "tld" in value;
73
80
  isInstance = isInstance && "verified" in value;
74
81
  isInstance = isInstance && "nameservers" in value;
75
82
  isInstance = isInstance && "name" in value;
@@ -90,6 +97,7 @@ export function DomainDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean):
90
97
  return {
91
98
 
92
99
  'id': json['id'],
100
+ 'tld': json['tld'],
93
101
  'verified': json['verified'],
94
102
  'nameservers': json['nameservers'],
95
103
  'name': json['name'],
@@ -108,6 +116,7 @@ export function DomainDtoToJSON(value?: DomainDto | null): any {
108
116
  return {
109
117
 
110
118
  'id': value.id,
119
+ 'tld': value.tld,
111
120
  'verified': value.verified,
112
121
  'nameservers': value.nameservers,
113
122
  'name': value.name,
@@ -0,0 +1,83 @@
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 { exists, mapValues } from '../runtime';
16
+ /**
17
+ * Thrown if domain is not found.
18
+ * @export
19
+ * @interface PublicDomainControllerGetDomainIdentifier404Response
20
+ */
21
+ export interface PublicDomainControllerGetDomainIdentifier404Response {
22
+ /**
23
+ *
24
+ * @type {number}
25
+ * @memberof PublicDomainControllerGetDomainIdentifier404Response
26
+ */
27
+ statusCode: number;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof PublicDomainControllerGetDomainIdentifier404Response
32
+ */
33
+ message: string;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof PublicDomainControllerGetDomainIdentifier404Response
38
+ */
39
+ error?: string;
40
+ }
41
+
42
+ /**
43
+ * Check if a given object implements the PublicDomainControllerGetDomainIdentifier404Response interface.
44
+ */
45
+ export function instanceOfPublicDomainControllerGetDomainIdentifier404Response(value: object): boolean {
46
+ let isInstance = true;
47
+ isInstance = isInstance && "statusCode" in value;
48
+ isInstance = isInstance && "message" in value;
49
+
50
+ return isInstance;
51
+ }
52
+
53
+ export function PublicDomainControllerGetDomainIdentifier404ResponseFromJSON(json: any): PublicDomainControllerGetDomainIdentifier404Response {
54
+ return PublicDomainControllerGetDomainIdentifier404ResponseFromJSONTyped(json, false);
55
+ }
56
+
57
+ export function PublicDomainControllerGetDomainIdentifier404ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PublicDomainControllerGetDomainIdentifier404Response {
58
+ if ((json === undefined) || (json === null)) {
59
+ return json;
60
+ }
61
+ return {
62
+
63
+ 'statusCode': json['statusCode'],
64
+ 'message': json['message'],
65
+ 'error': !exists(json, 'error') ? undefined : json['error'],
66
+ };
67
+ }
68
+
69
+ export function PublicDomainControllerGetDomainIdentifier404ResponseToJSON(value?: PublicDomainControllerGetDomainIdentifier404Response | null): any {
70
+ if (value === undefined) {
71
+ return undefined;
72
+ }
73
+ if (value === null) {
74
+ return null;
75
+ }
76
+ return {
77
+
78
+ 'statusCode': value.statusCode,
79
+ 'message': value.message,
80
+ 'error': value.error,
81
+ };
82
+ }
83
+
@@ -0,0 +1,83 @@
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 { exists, mapValues } from '../runtime';
16
+ /**
17
+ * Returned if more than 300 requests are made per minute.
18
+ * @export
19
+ * @interface UpdateSettings429Response
20
+ */
21
+ export interface UpdateSettings429Response {
22
+ /**
23
+ *
24
+ * @type {number}
25
+ * @memberof UpdateSettings429Response
26
+ */
27
+ statusCode: number;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof UpdateSettings429Response
32
+ */
33
+ message: string;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof UpdateSettings429Response
38
+ */
39
+ error?: string;
40
+ }
41
+
42
+ /**
43
+ * Check if a given object implements the UpdateSettings429Response interface.
44
+ */
45
+ export function instanceOfUpdateSettings429Response(value: object): boolean {
46
+ let isInstance = true;
47
+ isInstance = isInstance && "statusCode" in value;
48
+ isInstance = isInstance && "message" in value;
49
+
50
+ return isInstance;
51
+ }
52
+
53
+ export function UpdateSettings429ResponseFromJSON(json: any): UpdateSettings429Response {
54
+ return UpdateSettings429ResponseFromJSONTyped(json, false);
55
+ }
56
+
57
+ export function UpdateSettings429ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateSettings429Response {
58
+ if ((json === undefined) || (json === null)) {
59
+ return json;
60
+ }
61
+ return {
62
+
63
+ 'statusCode': json['statusCode'],
64
+ 'message': json['message'],
65
+ 'error': !exists(json, 'error') ? undefined : json['error'],
66
+ };
67
+ }
68
+
69
+ export function UpdateSettings429ResponseToJSON(value?: UpdateSettings429Response | null): any {
70
+ if (value === undefined) {
71
+ return undefined;
72
+ }
73
+ if (value === null) {
74
+ return null;
75
+ }
76
+ return {
77
+
78
+ 'statusCode': value.statusCode,
79
+ 'message': value.message,
80
+ 'error': value.error,
81
+ };
82
+ }
83
+
@@ -20,7 +20,6 @@ export * from './LeadDto';
20
20
  export * from './List200Response';
21
21
  export * from './List400Response';
22
22
  export * from './List401Response';
23
- export * from './List429Response';
24
23
  export * from './Login401Response';
25
24
  export * from './Login429Response';
26
25
  export * from './LoginInput';
@@ -29,6 +28,8 @@ export * from './MoneyInput';
29
28
  export * from './PaginateResponse';
30
29
  export * from './PaginateResponseLinks';
31
30
  export * from './PaginateResponseMeta';
31
+ export * from './PublicDomainControllerGetDomainIdentifier404Response';
32
32
  export * from './TokenDto';
33
33
  export * from './UpdateDomainInput';
34
34
  export * from './UpdateSettings401Response';
35
+ export * from './UpdateSettings429Response';