@randock/nameshift-api-client 0.0.1

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.
Files changed (123) hide show
  1. package/.openapi-generator/FILES +45 -0
  2. package/.openapi-generator/VERSION +1 -0
  3. package/.openapi-generator-ignore +23 -0
  4. package/README.md +45 -0
  5. package/dist/apis/AccountsApi.d.ts +54 -0
  6. package/dist/apis/AccountsApi.js +254 -0
  7. package/dist/apis/AuthApi.d.ts +27 -0
  8. package/dist/apis/AuthApi.js +124 -0
  9. package/dist/apis/DomainsApi.d.ts +77 -0
  10. package/dist/apis/DomainsApi.js +374 -0
  11. package/dist/apis/LeadsApi.d.ts +27 -0
  12. package/dist/apis/LeadsApi.js +124 -0
  13. package/dist/apis/TestApi.d.ts +23 -0
  14. package/dist/apis/TestApi.js +116 -0
  15. package/dist/apis/index.d.ts +5 -0
  16. package/dist/apis/index.js +23 -0
  17. package/dist/index.d.ts +3 -0
  18. package/dist/index.js +21 -0
  19. package/dist/models/AccountAddressDto.d.ts +68 -0
  20. package/dist/models/AccountAddressDto.js +71 -0
  21. package/dist/models/AccountAddressInput.d.ts +68 -0
  22. package/dist/models/AccountAddressInput.js +71 -0
  23. package/dist/models/AccountFinancialInput.d.ts +49 -0
  24. package/dist/models/AccountFinancialInput.js +59 -0
  25. package/dist/models/AccountSettingsInput.d.ts +32 -0
  26. package/dist/models/AccountSettingsInput.js +51 -0
  27. package/dist/models/BatchUpdate404Response.d.ts +43 -0
  28. package/dist/models/BatchUpdate404Response.js +56 -0
  29. package/dist/models/BatchUpdateDomainsInput.d.ts +38 -0
  30. package/dist/models/BatchUpdateDomainsInput.js +54 -0
  31. package/dist/models/CreateLeadInput.d.ts +61 -0
  32. package/dist/models/CreateLeadInput.js +65 -0
  33. package/dist/models/DomainDto.d.ts +62 -0
  34. package/dist/models/DomainDto.js +66 -0
  35. package/dist/models/ImportDomainsDto.d.ts +49 -0
  36. package/dist/models/ImportDomainsDto.js +59 -0
  37. package/dist/models/IntersectionAccountDtoWithAddressDto.d.ts +38 -0
  38. package/dist/models/IntersectionAccountDtoWithAddressDto.js +54 -0
  39. package/dist/models/IntersectionAccountDtoWithFinancialDto.d.ts +38 -0
  40. package/dist/models/IntersectionAccountDtoWithFinancialDto.js +54 -0
  41. package/dist/models/IntersectionAccountDtoWithFinancialDtoFinancial.d.ts +49 -0
  42. package/dist/models/IntersectionAccountDtoWithFinancialDtoFinancial.js +56 -0
  43. package/dist/models/IntersectionAccountDtoWithSettingsDto.d.ts +38 -0
  44. package/dist/models/IntersectionAccountDtoWithSettingsDto.js +54 -0
  45. package/dist/models/IntersectionAccountDtoWithSettingsDtoSettings.d.ts +32 -0
  46. package/dist/models/IntersectionAccountDtoWithSettingsDtoSettings.js +51 -0
  47. package/dist/models/LeadDto.d.ts +31 -0
  48. package/dist/models/LeadDto.js +50 -0
  49. package/dist/models/List200Response.d.ts +46 -0
  50. package/dist/models/List200Response.js +59 -0
  51. package/dist/models/List400Response.d.ts +43 -0
  52. package/dist/models/List400Response.js +56 -0
  53. package/dist/models/List401Response.d.ts +43 -0
  54. package/dist/models/List401Response.js +56 -0
  55. package/dist/models/List429Response.d.ts +43 -0
  56. package/dist/models/List429Response.js +56 -0
  57. package/dist/models/LoginInput.d.ts +37 -0
  58. package/dist/models/LoginInput.js +53 -0
  59. package/dist/models/MoneyDto.d.ts +37 -0
  60. package/dist/models/MoneyDto.js +53 -0
  61. package/dist/models/MoneyInput.d.ts +37 -0
  62. package/dist/models/MoneyInput.js +53 -0
  63. package/dist/models/PaginateResponse.d.ts +45 -0
  64. package/dist/models/PaginateResponse.js +58 -0
  65. package/dist/models/PaginateResponseLinks.d.ts +55 -0
  66. package/dist/models/PaginateResponseLinks.js +58 -0
  67. package/dist/models/PaginateResponseMeta.d.ts +67 -0
  68. package/dist/models/PaginateResponseMeta.js +62 -0
  69. package/dist/models/TokenDto.d.ts +31 -0
  70. package/dist/models/TokenDto.js +50 -0
  71. package/dist/models/UpdateDomainInput.d.ts +38 -0
  72. package/dist/models/UpdateDomainInput.js +53 -0
  73. package/dist/models/UpdateSettings401Response.d.ts +43 -0
  74. package/dist/models/UpdateSettings401Response.js +56 -0
  75. package/dist/models/UserAuthControllerLogin401Response.d.ts +43 -0
  76. package/dist/models/UserAuthControllerLogin401Response.js +56 -0
  77. package/dist/models/UserAuthControllerLogin429Response.d.ts +43 -0
  78. package/dist/models/UserAuthControllerLogin429Response.js +56 -0
  79. package/dist/models/index.d.ts +30 -0
  80. package/dist/models/index.js +48 -0
  81. package/dist/runtime.d.ts +182 -0
  82. package/dist/runtime.js +562 -0
  83. package/package.json +19 -0
  84. package/src/apis/AccountsApi.ts +201 -0
  85. package/src/apis/AuthApi.ts +74 -0
  86. package/src/apis/DomainsApi.ts +305 -0
  87. package/src/apis/LeadsApi.ts +71 -0
  88. package/src/apis/TestApi.ts +46 -0
  89. package/src/apis/index.ts +7 -0
  90. package/src/index.ts +5 -0
  91. package/src/models/AccountAddressDto.ts +120 -0
  92. package/src/models/AccountAddressInput.ts +120 -0
  93. package/src/models/AccountFinancialInput.ts +93 -0
  94. package/src/models/AccountSettingsInput.ts +72 -0
  95. package/src/models/BatchUpdate404Response.ts +83 -0
  96. package/src/models/BatchUpdateDomainsInput.ts +82 -0
  97. package/src/models/CreateLeadInput.ts +111 -0
  98. package/src/models/DomainDto.ts +118 -0
  99. package/src/models/ImportDomainsDto.ts +93 -0
  100. package/src/models/IntersectionAccountDtoWithAddressDto.ts +82 -0
  101. package/src/models/IntersectionAccountDtoWithFinancialDto.ts +82 -0
  102. package/src/models/IntersectionAccountDtoWithFinancialDtoFinancial.ts +89 -0
  103. package/src/models/IntersectionAccountDtoWithSettingsDto.ts +82 -0
  104. package/src/models/IntersectionAccountDtoWithSettingsDtoSettings.ts +72 -0
  105. package/src/models/LeadDto.ts +66 -0
  106. package/src/models/List200Response.ts +103 -0
  107. package/src/models/List400Response.ts +83 -0
  108. package/src/models/List401Response.ts +83 -0
  109. package/src/models/List429Response.ts +83 -0
  110. package/src/models/LoginInput.ts +75 -0
  111. package/src/models/MoneyDto.ts +75 -0
  112. package/src/models/MoneyInput.ts +75 -0
  113. package/src/models/PaginateResponse.ts +97 -0
  114. package/src/models/PaginateResponseLinks.ts +97 -0
  115. package/src/models/PaginateResponseMeta.ts +113 -0
  116. package/src/models/TokenDto.ts +66 -0
  117. package/src/models/UpdateDomainInput.ts +80 -0
  118. package/src/models/UpdateSettings401Response.ts +83 -0
  119. package/src/models/UserAuthControllerLogin401Response.ts +83 -0
  120. package/src/models/UserAuthControllerLogin429Response.ts +83 -0
  121. package/src/models/index.ts +32 -0
  122. package/src/runtime.ts +431 -0
  123. package/tsconfig.json +20 -0
@@ -0,0 +1,45 @@
1
+ .gitignore
2
+ .npmignore
3
+ .openapi-generator-ignore
4
+ README.md
5
+ package.json
6
+ src/apis/AccountsApi.ts
7
+ src/apis/AuthApi.ts
8
+ src/apis/DomainsApi.ts
9
+ src/apis/LeadsApi.ts
10
+ src/apis/TestApi.ts
11
+ src/apis/index.ts
12
+ src/index.ts
13
+ src/models/AccountAddressDto.ts
14
+ src/models/AccountAddressInput.ts
15
+ src/models/AccountFinancialInput.ts
16
+ src/models/AccountSettingsInput.ts
17
+ src/models/BatchUpdate404Response.ts
18
+ src/models/BatchUpdateDomainsInput.ts
19
+ src/models/CreateLeadInput.ts
20
+ src/models/DomainDto.ts
21
+ src/models/ImportDomainsDto.ts
22
+ src/models/IntersectionAccountDtoWithAddressDto.ts
23
+ src/models/IntersectionAccountDtoWithFinancialDto.ts
24
+ src/models/IntersectionAccountDtoWithFinancialDtoFinancial.ts
25
+ src/models/IntersectionAccountDtoWithSettingsDto.ts
26
+ src/models/IntersectionAccountDtoWithSettingsDtoSettings.ts
27
+ src/models/LeadDto.ts
28
+ src/models/List200Response.ts
29
+ src/models/List400Response.ts
30
+ src/models/List401Response.ts
31
+ src/models/List429Response.ts
32
+ src/models/LoginInput.ts
33
+ src/models/MoneyDto.ts
34
+ src/models/MoneyInput.ts
35
+ src/models/PaginateResponse.ts
36
+ src/models/PaginateResponseLinks.ts
37
+ src/models/PaginateResponseMeta.ts
38
+ src/models/TokenDto.ts
39
+ src/models/UpdateDomainInput.ts
40
+ src/models/UpdateSettings401Response.ts
41
+ src/models/UserAuthControllerLogin401Response.ts
42
+ src/models/UserAuthControllerLogin429Response.ts
43
+ src/models/index.ts
44
+ src/runtime.ts
45
+ tsconfig.json
@@ -0,0 +1 @@
1
+ 7.2.0-SNAPSHOT
@@ -0,0 +1,23 @@
1
+ # OpenAPI Generator Ignore
2
+ # Generated by openapi-generator https://github.com/openapitools/openapi-generator
3
+
4
+ # Use this file to prevent files from being overwritten by the generator.
5
+ # The patterns follow closely to .gitignore or .dockerignore.
6
+
7
+ # As an example, the C# client generator defines ApiClient.cs.
8
+ # You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
9
+ #ApiClient.cs
10
+
11
+ # You can match any string of characters against a directory, file or extension with a single asterisk (*):
12
+ #foo/*/qux
13
+ # The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
14
+
15
+ # You can recursively match patterns against a directory, file or extension with a double asterisk (**):
16
+ #foo/**/qux
17
+ # This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
18
+
19
+ # You can also negate patterns with an exclamation (!).
20
+ # For example, you can ignore all files in a docs folder with the file extension .md:
21
+ #docs/*.md
22
+ # Then explicitly reverse the ignore rule for a single file:
23
+ #!docs/README.md
package/README.md ADDED
@@ -0,0 +1,45 @@
1
+ ## @randock/nameshift-api-client@1.0
2
+
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
+
5
+ Environment
6
+ * Node.js
7
+ * Webpack
8
+ * Browserify
9
+
10
+ Language level
11
+ * ES5 - you must have a Promises/A+ library installed
12
+ * ES6
13
+
14
+ Module system
15
+ * CommonJS
16
+ * ES6 module system
17
+
18
+ It can be used in both TypeScript and JavaScript. In TypeScript, the definition should be automatically resolved via `package.json`. ([Reference](http://www.typescriptlang.org/docs/handbook/typings-for-npm-packages.html))
19
+
20
+ ### Building
21
+
22
+ To build and compile the typescript sources to javascript use:
23
+ ```
24
+ npm install
25
+ npm run build
26
+ ```
27
+
28
+ ### Publishing
29
+
30
+ First build the package then run ```npm publish```
31
+
32
+ ### Consuming
33
+
34
+ navigate to the folder of your consuming project and run one of the following commands.
35
+
36
+ _published:_
37
+
38
+ ```
39
+ npm install @randock/nameshift-api-client@1.0 --save
40
+ ```
41
+
42
+ _unPublished (not recommended):_
43
+
44
+ ```
45
+ npm install PATH_TO_GENERATED_PACKAGE --save
@@ -0,0 +1,54 @@
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 { AccountAddressInput, AccountFinancialInput, AccountSettingsInput, IntersectionAccountDtoWithAddressDto, IntersectionAccountDtoWithFinancialDto, IntersectionAccountDtoWithSettingsDto } from '../models/index';
14
+ export interface UpdateAddressRequest {
15
+ accountId: string;
16
+ accountAddressInput: AccountAddressInput;
17
+ }
18
+ export interface UpdateFinancialRequest {
19
+ accountId: string;
20
+ accountFinancialInput: AccountFinancialInput;
21
+ }
22
+ export interface UpdateSettingsRequest {
23
+ accountId: string;
24
+ accountSettingsInput: AccountSettingsInput;
25
+ }
26
+ /**
27
+ *
28
+ */
29
+ export declare class AccountsApi extends runtime.BaseAPI {
30
+ /**
31
+ *
32
+ */
33
+ updateAddressRaw(requestParameters: UpdateAddressRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IntersectionAccountDtoWithAddressDto>>;
34
+ /**
35
+ *
36
+ */
37
+ updateAddress(requestParameters: UpdateAddressRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IntersectionAccountDtoWithAddressDto>;
38
+ /**
39
+ *
40
+ */
41
+ updateFinancialRaw(requestParameters: UpdateFinancialRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IntersectionAccountDtoWithFinancialDto>>;
42
+ /**
43
+ *
44
+ */
45
+ updateFinancial(requestParameters: UpdateFinancialRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IntersectionAccountDtoWithFinancialDto>;
46
+ /**
47
+ *
48
+ */
49
+ updateSettingsRaw(requestParameters: UpdateSettingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IntersectionAccountDtoWithSettingsDto>>;
50
+ /**
51
+ *
52
+ */
53
+ updateSettings(requestParameters: UpdateSettingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IntersectionAccountDtoWithSettingsDto>;
54
+ }
@@ -0,0 +1,254 @@
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.AccountsApi = void 0;
68
+ var runtime = require("../runtime");
69
+ var index_1 = require("../models/index");
70
+ /**
71
+ *
72
+ */
73
+ var AccountsApi = /** @class */ (function (_super) {
74
+ __extends(AccountsApi, _super);
75
+ function AccountsApi() {
76
+ return _super !== null && _super.apply(this, arguments) || this;
77
+ }
78
+ /**
79
+ *
80
+ */
81
+ AccountsApi.prototype.updateAddressRaw = 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.accountId === null || requestParameters.accountId === undefined) {
88
+ throw new runtime.RequiredError('accountId', 'Required parameter requestParameters.accountId was null or undefined when calling updateAddress.');
89
+ }
90
+ if (requestParameters.accountAddressInput === null || requestParameters.accountAddressInput === undefined) {
91
+ throw new runtime.RequiredError('accountAddressInput', 'Required parameter requestParameters.accountAddressInput was null or undefined when calling updateAddress.');
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: "/accounts/{accountId}/addresses".replace("{".concat("accountId", "}"), encodeURIComponent(String(requestParameters.accountId))),
107
+ method: 'PUT',
108
+ headers: headerParameters,
109
+ query: queryParameters,
110
+ body: (0, index_1.AccountAddressInputToJSON)(requestParameters.accountAddressInput),
111
+ }, initOverrides)];
112
+ case 3:
113
+ response = _a.sent();
114
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.IntersectionAccountDtoWithAddressDtoFromJSON)(jsonValue); })];
115
+ }
116
+ });
117
+ });
118
+ };
119
+ /**
120
+ *
121
+ */
122
+ AccountsApi.prototype.updateAddress = function (requestParameters, initOverrides) {
123
+ return __awaiter(this, void 0, void 0, function () {
124
+ var response;
125
+ return __generator(this, function (_a) {
126
+ switch (_a.label) {
127
+ case 0: return [4 /*yield*/, this.updateAddressRaw(requestParameters, initOverrides)];
128
+ case 1:
129
+ response = _a.sent();
130
+ return [4 /*yield*/, response.value()];
131
+ case 2: return [2 /*return*/, _a.sent()];
132
+ }
133
+ });
134
+ });
135
+ };
136
+ /**
137
+ *
138
+ */
139
+ AccountsApi.prototype.updateFinancialRaw = function (requestParameters, initOverrides) {
140
+ return __awaiter(this, void 0, void 0, function () {
141
+ var queryParameters, headerParameters, token, tokenString, response;
142
+ return __generator(this, function (_a) {
143
+ switch (_a.label) {
144
+ case 0:
145
+ if (requestParameters.accountId === null || requestParameters.accountId === undefined) {
146
+ throw new runtime.RequiredError('accountId', 'Required parameter requestParameters.accountId was null or undefined when calling updateFinancial.');
147
+ }
148
+ if (requestParameters.accountFinancialInput === null || requestParameters.accountFinancialInput === undefined) {
149
+ throw new runtime.RequiredError('accountFinancialInput', 'Required parameter requestParameters.accountFinancialInput was null or undefined when calling updateFinancial.');
150
+ }
151
+ queryParameters = {};
152
+ headerParameters = {};
153
+ headerParameters['Content-Type'] = 'application/json';
154
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
155
+ token = this.configuration.accessToken;
156
+ return [4 /*yield*/, token("bearer", [])];
157
+ case 1:
158
+ tokenString = _a.sent();
159
+ if (tokenString) {
160
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
161
+ }
162
+ _a.label = 2;
163
+ case 2: return [4 /*yield*/, this.request({
164
+ path: "/accounts/{accountId}/financial".replace("{".concat("accountId", "}"), encodeURIComponent(String(requestParameters.accountId))),
165
+ method: 'PUT',
166
+ headers: headerParameters,
167
+ query: queryParameters,
168
+ body: (0, index_1.AccountFinancialInputToJSON)(requestParameters.accountFinancialInput),
169
+ }, initOverrides)];
170
+ case 3:
171
+ response = _a.sent();
172
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.IntersectionAccountDtoWithFinancialDtoFromJSON)(jsonValue); })];
173
+ }
174
+ });
175
+ });
176
+ };
177
+ /**
178
+ *
179
+ */
180
+ AccountsApi.prototype.updateFinancial = function (requestParameters, initOverrides) {
181
+ return __awaiter(this, void 0, void 0, function () {
182
+ var response;
183
+ return __generator(this, function (_a) {
184
+ switch (_a.label) {
185
+ case 0: return [4 /*yield*/, this.updateFinancialRaw(requestParameters, initOverrides)];
186
+ case 1:
187
+ response = _a.sent();
188
+ return [4 /*yield*/, response.value()];
189
+ case 2: return [2 /*return*/, _a.sent()];
190
+ }
191
+ });
192
+ });
193
+ };
194
+ /**
195
+ *
196
+ */
197
+ AccountsApi.prototype.updateSettingsRaw = function (requestParameters, initOverrides) {
198
+ return __awaiter(this, void 0, void 0, function () {
199
+ var queryParameters, headerParameters, token, tokenString, response;
200
+ return __generator(this, function (_a) {
201
+ switch (_a.label) {
202
+ case 0:
203
+ if (requestParameters.accountId === null || requestParameters.accountId === undefined) {
204
+ throw new runtime.RequiredError('accountId', 'Required parameter requestParameters.accountId was null or undefined when calling updateSettings.');
205
+ }
206
+ if (requestParameters.accountSettingsInput === null || requestParameters.accountSettingsInput === undefined) {
207
+ throw new runtime.RequiredError('accountSettingsInput', 'Required parameter requestParameters.accountSettingsInput was null or undefined when calling updateSettings.');
208
+ }
209
+ queryParameters = {};
210
+ headerParameters = {};
211
+ headerParameters['Content-Type'] = 'application/json';
212
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
213
+ token = this.configuration.accessToken;
214
+ return [4 /*yield*/, token("bearer", [])];
215
+ case 1:
216
+ tokenString = _a.sent();
217
+ if (tokenString) {
218
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
219
+ }
220
+ _a.label = 2;
221
+ case 2: return [4 /*yield*/, this.request({
222
+ path: "/accounts/{accountId}/settings".replace("{".concat("accountId", "}"), encodeURIComponent(String(requestParameters.accountId))),
223
+ method: 'PUT',
224
+ headers: headerParameters,
225
+ query: queryParameters,
226
+ body: (0, index_1.AccountSettingsInputToJSON)(requestParameters.accountSettingsInput),
227
+ }, initOverrides)];
228
+ case 3:
229
+ response = _a.sent();
230
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.IntersectionAccountDtoWithSettingsDtoFromJSON)(jsonValue); })];
231
+ }
232
+ });
233
+ });
234
+ };
235
+ /**
236
+ *
237
+ */
238
+ AccountsApi.prototype.updateSettings = function (requestParameters, initOverrides) {
239
+ return __awaiter(this, void 0, void 0, function () {
240
+ var response;
241
+ return __generator(this, function (_a) {
242
+ switch (_a.label) {
243
+ case 0: return [4 /*yield*/, this.updateSettingsRaw(requestParameters, initOverrides)];
244
+ case 1:
245
+ response = _a.sent();
246
+ return [4 /*yield*/, response.value()];
247
+ case 2: return [2 /*return*/, _a.sent()];
248
+ }
249
+ });
250
+ });
251
+ };
252
+ return AccountsApi;
253
+ }(runtime.BaseAPI));
254
+ exports.AccountsApi = AccountsApi;
@@ -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 { LoginInput, TokenDto } from '../models/index';
14
+ export interface UserAuthControllerLoginRequest {
15
+ loginInput: LoginInput;
16
+ }
17
+ /**
18
+ *
19
+ */
20
+ export declare class AuthApi extends runtime.BaseAPI {
21
+ /**
22
+ */
23
+ userAuthControllerLoginRaw(requestParameters: UserAuthControllerLoginRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TokenDto>>;
24
+ /**
25
+ */
26
+ userAuthControllerLogin(requestParameters: UserAuthControllerLoginRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TokenDto>;
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.AuthApi = void 0;
68
+ var runtime = require("../runtime");
69
+ var index_1 = require("../models/index");
70
+ /**
71
+ *
72
+ */
73
+ var AuthApi = /** @class */ (function (_super) {
74
+ __extends(AuthApi, _super);
75
+ function AuthApi() {
76
+ return _super !== null && _super.apply(this, arguments) || this;
77
+ }
78
+ /**
79
+ */
80
+ AuthApi.prototype.userAuthControllerLoginRaw = 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.loginInput === null || requestParameters.loginInput === undefined) {
87
+ throw new runtime.RequiredError('loginInput', 'Required parameter requestParameters.loginInput was null or undefined when calling userAuthControllerLogin.');
88
+ }
89
+ queryParameters = {};
90
+ headerParameters = {};
91
+ headerParameters['Content-Type'] = 'application/json';
92
+ return [4 /*yield*/, this.request({
93
+ path: "/auth/login",
94
+ method: 'POST',
95
+ headers: headerParameters,
96
+ query: queryParameters,
97
+ body: (0, index_1.LoginInputToJSON)(requestParameters.loginInput),
98
+ }, initOverrides)];
99
+ case 1:
100
+ response = _a.sent();
101
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.TokenDtoFromJSON)(jsonValue); })];
102
+ }
103
+ });
104
+ });
105
+ };
106
+ /**
107
+ */
108
+ AuthApi.prototype.userAuthControllerLogin = 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.userAuthControllerLoginRaw(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 AuthApi;
123
+ }(runtime.BaseAPI));
124
+ exports.AuthApi = AuthApi;
@@ -0,0 +1,77 @@
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 { BatchUpdateDomainsInput, DomainDto, ImportDomainsDto, List200Response, UpdateDomainInput } from '../models/index';
14
+ export interface ImportRequest {
15
+ file?: Blob | null;
16
+ domains?: Array<string>;
17
+ }
18
+ export interface BatchUpdateRequest {
19
+ batchUpdateDomainsInput: BatchUpdateDomainsInput;
20
+ }
21
+ export interface CheckDnsRequest {
22
+ domainId: string;
23
+ }
24
+ export interface ListRequest {
25
+ page?: number;
26
+ limit?: number;
27
+ sort?: Array<string>;
28
+ }
29
+ export interface UpdateRequest {
30
+ domainId: string;
31
+ updateDomainInput: UpdateDomainInput;
32
+ }
33
+ /**
34
+ *
35
+ */
36
+ export declare class DomainsApi extends runtime.BaseAPI {
37
+ /**
38
+ *
39
+ */
40
+ _importRaw(requestParameters: ImportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ImportDomainsDto>>;
41
+ /**
42
+ *
43
+ */
44
+ _import(requestParameters?: ImportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ImportDomainsDto>;
45
+ /**
46
+ *
47
+ */
48
+ batchUpdateRaw(requestParameters: BatchUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
49
+ /**
50
+ *
51
+ */
52
+ batchUpdate(requestParameters: BatchUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
53
+ /**
54
+ *
55
+ */
56
+ checkDnsRaw(requestParameters: CheckDnsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
57
+ /**
58
+ *
59
+ */
60
+ checkDns(requestParameters: CheckDnsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
61
+ /**
62
+ *
63
+ */
64
+ listRaw(requestParameters: ListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<List200Response>>;
65
+ /**
66
+ *
67
+ */
68
+ list(requestParameters?: ListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<List200Response>;
69
+ /**
70
+ *
71
+ */
72
+ updateRaw(requestParameters: UpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DomainDto>>;
73
+ /**
74
+ *
75
+ */
76
+ update(requestParameters: UpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DomainDto>;
77
+ }