@randock/nameshift-api-client 0.0.3 → 0.0.4

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.
@@ -1,6 +1,5 @@
1
1
  .gitignore
2
2
  .npmignore
3
- .openapi-generator-ignore
4
3
  README.md
5
4
  package.json
6
5
  src/apis/AccountsApi.ts
@@ -17,6 +16,7 @@ src/models/AccountSettingsInput.ts
17
16
  src/models/BatchUpdate404Response.ts
18
17
  src/models/BatchUpdateDomainsInput.ts
19
18
  src/models/CreateLeadInput.ts
19
+ src/models/DeleteDomainsInput.ts
20
20
  src/models/DomainDto.ts
21
21
  src/models/ImportDomainsDto.ts
22
22
  src/models/IntersectionAccountDtoWithAddressDto.ts
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { BatchUpdateDomainsInput, DomainDto, ImportDomainsDto, List200Response, UpdateDomainInput } from '../models/index';
13
+ import type { BatchUpdateDomainsInput, DeleteDomainsInput, DomainDto, ImportDomainsDto, List200Response, UpdateDomainInput } from '../models/index';
14
14
  export interface BatchImportRequest {
15
15
  file?: Blob | null;
16
16
  domains?: Array<string>;
@@ -21,6 +21,9 @@ export interface BatchUpdateRequest {
21
21
  export interface CheckDnsRequest {
22
22
  domainId: string;
23
23
  }
24
+ export interface DeleteDomainsRequest {
25
+ deleteDomainsInput: DeleteDomainsInput;
26
+ }
24
27
  export interface ListRequest {
25
28
  filter?: object;
26
29
  page?: number;
@@ -59,6 +62,14 @@ export declare class DomainsApi extends runtime.BaseAPI {
59
62
  *
60
63
  */
61
64
  checkDns(requestParameters: CheckDnsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
65
+ /**
66
+ *
67
+ */
68
+ deleteDomainsRaw(requestParameters: DeleteDomainsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
69
+ /**
70
+ *
71
+ */
72
+ deleteDomains(requestParameters: DeleteDomainsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
62
73
  /**
63
74
  *
64
75
  */
@@ -251,6 +251,59 @@ var DomainsApi = /** @class */ (function (_super) {
251
251
  });
252
252
  });
253
253
  };
254
+ /**
255
+ *
256
+ */
257
+ DomainsApi.prototype.deleteDomainsRaw = function (requestParameters, initOverrides) {
258
+ return __awaiter(this, void 0, void 0, function () {
259
+ var queryParameters, headerParameters, token, tokenString, response;
260
+ return __generator(this, function (_a) {
261
+ switch (_a.label) {
262
+ case 0:
263
+ if (requestParameters.deleteDomainsInput === null || requestParameters.deleteDomainsInput === undefined) {
264
+ throw new runtime.RequiredError('deleteDomainsInput', 'Required parameter requestParameters.deleteDomainsInput was null or undefined when calling deleteDomains.');
265
+ }
266
+ queryParameters = {};
267
+ headerParameters = {};
268
+ headerParameters['Content-Type'] = 'application/json';
269
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
270
+ token = this.configuration.accessToken;
271
+ return [4 /*yield*/, token("bearer", [])];
272
+ case 1:
273
+ tokenString = _a.sent();
274
+ if (tokenString) {
275
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
276
+ }
277
+ _a.label = 2;
278
+ case 2: return [4 /*yield*/, this.request({
279
+ path: "/domains",
280
+ method: 'DELETE',
281
+ headers: headerParameters,
282
+ query: queryParameters,
283
+ body: (0, index_1.DeleteDomainsInputToJSON)(requestParameters.deleteDomainsInput),
284
+ }, initOverrides)];
285
+ case 3:
286
+ response = _a.sent();
287
+ return [2 /*return*/, new runtime.VoidApiResponse(response)];
288
+ }
289
+ });
290
+ });
291
+ };
292
+ /**
293
+ *
294
+ */
295
+ DomainsApi.prototype.deleteDomains = function (requestParameters, initOverrides) {
296
+ return __awaiter(this, void 0, void 0, function () {
297
+ return __generator(this, function (_a) {
298
+ switch (_a.label) {
299
+ case 0: return [4 /*yield*/, this.deleteDomainsRaw(requestParameters, initOverrides)];
300
+ case 1:
301
+ _a.sent();
302
+ return [2 /*return*/];
303
+ }
304
+ });
305
+ });
306
+ };
254
307
  /**
255
308
  *
256
309
  */
@@ -0,0 +1,31 @@
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 DeleteDomainsInput
16
+ */
17
+ export interface DeleteDomainsInput {
18
+ /**
19
+ *
20
+ * @type {Array<string>}
21
+ * @memberof DeleteDomainsInput
22
+ */
23
+ domainIds: Array<string>;
24
+ }
25
+ /**
26
+ * Check if a given object implements the DeleteDomainsInput interface.
27
+ */
28
+ export declare function instanceOfDeleteDomainsInput(value: object): boolean;
29
+ export declare function DeleteDomainsInputFromJSON(json: any): DeleteDomainsInput;
30
+ export declare function DeleteDomainsInputFromJSONTyped(json: any, ignoreDiscriminator: boolean): DeleteDomainsInput;
31
+ export declare function DeleteDomainsInputToJSON(value?: DeleteDomainsInput | null): any;
@@ -0,0 +1,50 @@
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.DeleteDomainsInputToJSON = exports.DeleteDomainsInputFromJSONTyped = exports.DeleteDomainsInputFromJSON = exports.instanceOfDeleteDomainsInput = void 0;
17
+ /**
18
+ * Check if a given object implements the DeleteDomainsInput interface.
19
+ */
20
+ function instanceOfDeleteDomainsInput(value) {
21
+ var isInstance = true;
22
+ isInstance = isInstance && "domainIds" in value;
23
+ return isInstance;
24
+ }
25
+ exports.instanceOfDeleteDomainsInput = instanceOfDeleteDomainsInput;
26
+ function DeleteDomainsInputFromJSON(json) {
27
+ return DeleteDomainsInputFromJSONTyped(json, false);
28
+ }
29
+ exports.DeleteDomainsInputFromJSON = DeleteDomainsInputFromJSON;
30
+ function DeleteDomainsInputFromJSONTyped(json, ignoreDiscriminator) {
31
+ if ((json === undefined) || (json === null)) {
32
+ return json;
33
+ }
34
+ return {
35
+ 'domainIds': json['domainIds'],
36
+ };
37
+ }
38
+ exports.DeleteDomainsInputFromJSONTyped = DeleteDomainsInputFromJSONTyped;
39
+ function DeleteDomainsInputToJSON(value) {
40
+ if (value === undefined) {
41
+ return undefined;
42
+ }
43
+ if (value === null) {
44
+ return null;
45
+ }
46
+ return {
47
+ 'domainIds': value.domainIds,
48
+ };
49
+ }
50
+ exports.DeleteDomainsInputToJSON = DeleteDomainsInputToJSON;
@@ -5,6 +5,7 @@ export * from './AccountSettingsInput';
5
5
  export * from './BatchUpdate404Response';
6
6
  export * from './BatchUpdateDomainsInput';
7
7
  export * from './CreateLeadInput';
8
+ export * from './DeleteDomainsInput';
8
9
  export * from './DomainDto';
9
10
  export * from './ImportDomainsDto';
10
11
  export * from './IntersectionAccountDtoWithAddressDto';
@@ -23,6 +23,7 @@ __exportStar(require("./AccountSettingsInput"), exports);
23
23
  __exportStar(require("./BatchUpdate404Response"), exports);
24
24
  __exportStar(require("./BatchUpdateDomainsInput"), exports);
25
25
  __exportStar(require("./CreateLeadInput"), exports);
26
+ __exportStar(require("./DeleteDomainsInput"), exports);
26
27
  __exportStar(require("./DomainDto"), exports);
27
28
  __exportStar(require("./ImportDomainsDto"), exports);
28
29
  __exportStar(require("./IntersectionAccountDtoWithAddressDto"), exports);
package/package.json CHANGED
@@ -1,12 +1,8 @@
1
1
  {
2
2
  "name": "@randock/nameshift-api-client",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "description": "OpenAPI client for @randock/nameshift-api-client",
5
5
  "author": "OpenAPI-Generator",
6
- "repository": {
7
- "type": "git",
8
- "url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git"
9
- },
10
6
  "main": "./dist/index.js",
11
7
  "typings": "./dist/index.d.ts",
12
8
  "scripts": {
@@ -17,6 +17,7 @@ import * as runtime from '../runtime';
17
17
  import type {
18
18
  BatchUpdate404Response,
19
19
  BatchUpdateDomainsInput,
20
+ DeleteDomainsInput,
20
21
  DomainDto,
21
22
  ImportDomainsDto,
22
23
  List200Response,
@@ -30,6 +31,8 @@ import {
30
31
  BatchUpdate404ResponseToJSON,
31
32
  BatchUpdateDomainsInputFromJSON,
32
33
  BatchUpdateDomainsInputToJSON,
34
+ DeleteDomainsInputFromJSON,
35
+ DeleteDomainsInputToJSON,
33
36
  DomainDtoFromJSON,
34
37
  DomainDtoToJSON,
35
38
  ImportDomainsDtoFromJSON,
@@ -59,6 +62,10 @@ export interface CheckDnsRequest {
59
62
  domainId: string;
60
63
  }
61
64
 
65
+ export interface DeleteDomainsRequest {
66
+ deleteDomainsInput: DeleteDomainsInput;
67
+ }
68
+
62
69
  export interface ListRequest {
63
70
  filter?: object;
64
71
  page?: number;
@@ -212,6 +219,46 @@ export class DomainsApi extends runtime.BaseAPI {
212
219
  await this.checkDnsRaw(requestParameters, initOverrides);
213
220
  }
214
221
 
222
+ /**
223
+ *
224
+ */
225
+ async deleteDomainsRaw(requestParameters: DeleteDomainsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
226
+ if (requestParameters.deleteDomainsInput === null || requestParameters.deleteDomainsInput === undefined) {
227
+ throw new runtime.RequiredError('deleteDomainsInput','Required parameter requestParameters.deleteDomainsInput was null or undefined when calling deleteDomains.');
228
+ }
229
+
230
+ const queryParameters: any = {};
231
+
232
+ const headerParameters: runtime.HTTPHeaders = {};
233
+
234
+ headerParameters['Content-Type'] = 'application/json';
235
+
236
+ if (this.configuration && this.configuration.accessToken) {
237
+ const token = this.configuration.accessToken;
238
+ const tokenString = await token("bearer", []);
239
+
240
+ if (tokenString) {
241
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
242
+ }
243
+ }
244
+ const response = await this.request({
245
+ path: `/domains`,
246
+ method: 'DELETE',
247
+ headers: headerParameters,
248
+ query: queryParameters,
249
+ body: DeleteDomainsInputToJSON(requestParameters.deleteDomainsInput),
250
+ }, initOverrides);
251
+
252
+ return new runtime.VoidApiResponse(response);
253
+ }
254
+
255
+ /**
256
+ *
257
+ */
258
+ async deleteDomains(requestParameters: DeleteDomainsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
259
+ await this.deleteDomainsRaw(requestParameters, initOverrides);
260
+ }
261
+
215
262
  /**
216
263
  *
217
264
  */
@@ -0,0 +1,66 @@
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
+ *
18
+ * @export
19
+ * @interface DeleteDomainsInput
20
+ */
21
+ export interface DeleteDomainsInput {
22
+ /**
23
+ *
24
+ * @type {Array<string>}
25
+ * @memberof DeleteDomainsInput
26
+ */
27
+ domainIds: Array<string>;
28
+ }
29
+
30
+ /**
31
+ * Check if a given object implements the DeleteDomainsInput interface.
32
+ */
33
+ export function instanceOfDeleteDomainsInput(value: object): boolean {
34
+ let isInstance = true;
35
+ isInstance = isInstance && "domainIds" in value;
36
+
37
+ return isInstance;
38
+ }
39
+
40
+ export function DeleteDomainsInputFromJSON(json: any): DeleteDomainsInput {
41
+ return DeleteDomainsInputFromJSONTyped(json, false);
42
+ }
43
+
44
+ export function DeleteDomainsInputFromJSONTyped(json: any, ignoreDiscriminator: boolean): DeleteDomainsInput {
45
+ if ((json === undefined) || (json === null)) {
46
+ return json;
47
+ }
48
+ return {
49
+
50
+ 'domainIds': json['domainIds'],
51
+ };
52
+ }
53
+
54
+ export function DeleteDomainsInputToJSON(value?: DeleteDomainsInput | null): any {
55
+ if (value === undefined) {
56
+ return undefined;
57
+ }
58
+ if (value === null) {
59
+ return null;
60
+ }
61
+ return {
62
+
63
+ 'domainIds': value.domainIds,
64
+ };
65
+ }
66
+
@@ -7,6 +7,7 @@ export * from './AccountSettingsInput';
7
7
  export * from './BatchUpdate404Response';
8
8
  export * from './BatchUpdateDomainsInput';
9
9
  export * from './CreateLeadInput';
10
+ export * from './DeleteDomainsInput';
10
11
  export * from './DomainDto';
11
12
  export * from './ImportDomainsDto';
12
13
  export * from './IntersectionAccountDtoWithAddressDto';