@randock/nameshift-api-client 0.0.536 → 0.0.538

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## @randock/nameshift-api-client@0.0.536
1
+ ## @randock/nameshift-api-client@0.0.538
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.536 --save
39
+ npm install @randock/nameshift-api-client@0.0.538 --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
- f425fd61d0fcd03321b3696a88d73ab4b840add1991527221f49c5ac45e0162b1027178389c266bc6d48e54bf1e29997
47
+ 8f789cae6f9e9cbbaee8de7296d7e0dc708e553a2c5190bdb02ee67c9b4af7eda67603651f65a505b2107310a76b1f81
@@ -69,6 +69,9 @@ export interface AdminApiCreateNegativeInvoiceRequest {
69
69
  export interface AdminApiCreateNewsletterRequest {
70
70
  createNewsletterInput: CreateNewsletterInput;
71
71
  }
72
+ export interface AdminApiDeleteAccountRequest {
73
+ accountId: string;
74
+ }
72
75
  export interface AdminApiDeleteAccountNoteRequest {
73
76
  accountId: string;
74
77
  noteId: string;
@@ -619,6 +622,16 @@ export declare class AdminApi extends runtime.BaseAPI {
619
622
  * Start a newsletter
620
623
  */
621
624
  createNewsletter(requestParameters: AdminApiCreateNewsletterRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<NewsletterDto>;
625
+ /**
626
+ * Deletes the seller account with its users and unsold domains, as the seller deleting it would, without notifying the seller. Requires super admin role.
627
+ * Delete account
628
+ */
629
+ deleteAccountRaw(requestParameters: AdminApiDeleteAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
630
+ /**
631
+ * Deletes the seller account with its users and unsold domains, as the seller deleting it would, without notifying the seller. Requires super admin role.
632
+ * Delete account
633
+ */
634
+ deleteAccount(requestParameters: AdminApiDeleteAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
622
635
  /**
623
636
  * Soft-deletes a note. Only its author, or a super admin, may do so.
624
637
  * Delete account note
@@ -928,6 +928,59 @@ var AdminApi = /** @class */ (function (_super) {
928
928
  });
929
929
  });
930
930
  };
931
+ /**
932
+ * Deletes the seller account with its users and unsold domains, as the seller deleting it would, without notifying the seller. Requires super admin role.
933
+ * Delete account
934
+ */
935
+ AdminApi.prototype.deleteAccountRaw = function (requestParameters, initOverrides) {
936
+ return __awaiter(this, void 0, void 0, function () {
937
+ var queryParameters, headerParameters, token, tokenString, response;
938
+ return __generator(this, function (_a) {
939
+ switch (_a.label) {
940
+ case 0:
941
+ if (requestParameters['accountId'] == null) {
942
+ throw new runtime.RequiredError('accountId', 'Required parameter "accountId" was null or undefined when calling deleteAccount().');
943
+ }
944
+ queryParameters = {};
945
+ headerParameters = {};
946
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
947
+ token = this.configuration.accessToken;
948
+ return [4 /*yield*/, token("bearer", [])];
949
+ case 1:
950
+ tokenString = _a.sent();
951
+ if (tokenString) {
952
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
953
+ }
954
+ _a.label = 2;
955
+ case 2: return [4 /*yield*/, this.request({
956
+ path: "/admin/accounts/{accountId}".replace("{".concat("accountId", "}"), encodeURIComponent(String(requestParameters['accountId']))),
957
+ method: 'DELETE',
958
+ headers: headerParameters,
959
+ query: queryParameters,
960
+ }, initOverrides)];
961
+ case 3:
962
+ response = _a.sent();
963
+ return [2 /*return*/, new runtime.VoidApiResponse(response)];
964
+ }
965
+ });
966
+ });
967
+ };
968
+ /**
969
+ * Deletes the seller account with its users and unsold domains, as the seller deleting it would, without notifying the seller. Requires super admin role.
970
+ * Delete account
971
+ */
972
+ AdminApi.prototype.deleteAccount = function (requestParameters, initOverrides) {
973
+ return __awaiter(this, void 0, void 0, function () {
974
+ return __generator(this, function (_a) {
975
+ switch (_a.label) {
976
+ case 0: return [4 /*yield*/, this.deleteAccountRaw(requestParameters, initOverrides)];
977
+ case 1:
978
+ _a.sent();
979
+ return [2 /*return*/];
980
+ }
981
+ });
982
+ });
983
+ };
931
984
  /**
932
985
  * Soft-deletes a note. Only its author, or a super admin, may do so.
933
986
  * Delete account note
@@ -9,6 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import type { MoneyDto } from './MoneyDto';
12
13
  /**
13
14
  *
14
15
  * @export
@@ -33,6 +34,12 @@ export interface TaskListDomainDto {
33
34
  * @memberof TaskListDomainDto
34
35
  */
35
36
  currencyCode: string;
37
+ /**
38
+ * Minimum acceptable offer amount for the domain, or null when it takes any.
39
+ * @type {MoneyDto}
40
+ * @memberof TaskListDomainDto
41
+ */
42
+ minOffer: MoneyDto | null;
36
43
  }
37
44
  /**
38
45
  * Check if a given object implements the TaskListDomainDto interface.
@@ -18,6 +18,7 @@ exports.TaskListDomainDtoFromJSON = TaskListDomainDtoFromJSON;
18
18
  exports.TaskListDomainDtoFromJSONTyped = TaskListDomainDtoFromJSONTyped;
19
19
  exports.TaskListDomainDtoToJSON = TaskListDomainDtoToJSON;
20
20
  exports.TaskListDomainDtoToJSONTyped = TaskListDomainDtoToJSONTyped;
21
+ var MoneyDto_1 = require("./MoneyDto");
21
22
  /**
22
23
  * Check if a given object implements the TaskListDomainDto interface.
23
24
  */
@@ -28,6 +29,8 @@ function instanceOfTaskListDomainDto(value) {
28
29
  return false;
29
30
  if (!('currencyCode' in value) || value['currencyCode'] === undefined)
30
31
  return false;
32
+ if (!('minOffer' in value) || value['minOffer'] === undefined)
33
+ return false;
31
34
  return true;
32
35
  }
33
36
  function TaskListDomainDtoFromJSON(json) {
@@ -41,6 +44,7 @@ function TaskListDomainDtoFromJSONTyped(json, ignoreDiscriminator) {
41
44
  'id': json['id'],
42
45
  'displayName': json['displayName'],
43
46
  'currencyCode': json['currencyCode'],
47
+ 'minOffer': (0, MoneyDto_1.MoneyDtoFromJSON)(json['minOffer']),
44
48
  };
45
49
  }
46
50
  function TaskListDomainDtoToJSON(json) {
@@ -55,5 +59,6 @@ function TaskListDomainDtoToJSONTyped(value, ignoreDiscriminator) {
55
59
  'id': value['id'],
56
60
  'displayName': value['displayName'],
57
61
  'currencyCode': value['currencyCode'],
62
+ 'minOffer': (0, MoneyDto_1.MoneyDtoToJSON)(value['minOffer']),
58
63
  };
59
64
  }
@@ -80,6 +80,12 @@ export interface TaskListLeadDto {
80
80
  * @memberof TaskListLeadDto
81
81
  */
82
82
  leadOfferExpirationConfiguration: LeadOfferExpirationConfigurationDto;
83
+ /**
84
+ * Manual lead type, if the lead was created manually.
85
+ * @type {string}
86
+ * @memberof TaskListLeadDto
87
+ */
88
+ manualType: TaskListLeadDtoManualTypeEnum | null;
83
89
  }
84
90
  /**
85
91
  * @export
@@ -101,6 +107,16 @@ export declare const TaskListLeadDtoLastOfferTypeEnum: {
101
107
  readonly AUCTION: "auction";
102
108
  };
103
109
  export type TaskListLeadDtoLastOfferTypeEnum = typeof TaskListLeadDtoLastOfferTypeEnum[keyof typeof TaskListLeadDtoLastOfferTypeEnum];
110
+ /**
111
+ * @export
112
+ */
113
+ export declare const TaskListLeadDtoManualTypeEnum: {
114
+ readonly BUY_NOW: "buy_now";
115
+ readonly OFFER: "offer";
116
+ readonly LEASE_TO_OWN: "lease_to_own";
117
+ readonly RENT: "rent";
118
+ };
119
+ export type TaskListLeadDtoManualTypeEnum = typeof TaskListLeadDtoManualTypeEnum[keyof typeof TaskListLeadDtoManualTypeEnum];
104
120
  /**
105
121
  * Check if a given object implements the TaskListLeadDto interface.
106
122
  */
@@ -13,7 +13,7 @@
13
13
  * Do not edit the class manually.
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.TaskListLeadDtoLastOfferTypeEnum = exports.TaskListLeadDtoLastOfferByEnum = void 0;
16
+ exports.TaskListLeadDtoManualTypeEnum = exports.TaskListLeadDtoLastOfferTypeEnum = exports.TaskListLeadDtoLastOfferByEnum = void 0;
17
17
  exports.instanceOfTaskListLeadDto = instanceOfTaskListLeadDto;
18
18
  exports.TaskListLeadDtoFromJSON = TaskListLeadDtoFromJSON;
19
19
  exports.TaskListLeadDtoFromJSONTyped = TaskListLeadDtoFromJSONTyped;
@@ -42,6 +42,15 @@ exports.TaskListLeadDtoLastOfferTypeEnum = {
42
42
  RENT: 'rent',
43
43
  AUCTION: 'auction'
44
44
  };
45
+ /**
46
+ * @export
47
+ */
48
+ exports.TaskListLeadDtoManualTypeEnum = {
49
+ BUY_NOW: 'buy_now',
50
+ OFFER: 'offer',
51
+ LEASE_TO_OWN: 'lease_to_own',
52
+ RENT: 'rent'
53
+ };
45
54
  /**
46
55
  * Check if a given object implements the TaskListLeadDto interface.
47
56
  */
@@ -66,6 +75,8 @@ function instanceOfTaskListLeadDto(value) {
66
75
  return false;
67
76
  if (!('leadOfferExpirationConfiguration' in value) || value['leadOfferExpirationConfiguration'] === undefined)
68
77
  return false;
78
+ if (!('manualType' in value) || value['manualType'] === undefined)
79
+ return false;
69
80
  return true;
70
81
  }
71
82
  function TaskListLeadDtoFromJSON(json) {
@@ -86,6 +97,7 @@ function TaskListLeadDtoFromJSONTyped(json, ignoreDiscriminator) {
86
97
  'leaseToOwn': (0, TaskListLeadLeaseToOwnConfigurationDto_1.TaskListLeadLeaseToOwnConfigurationDtoFromJSON)(json['leaseToOwn']),
87
98
  'rent': (0, TaskListLeadRentConfigurationDto_1.TaskListLeadRentConfigurationDtoFromJSON)(json['rent']),
88
99
  'leadOfferExpirationConfiguration': (0, LeadOfferExpirationConfigurationDto_1.LeadOfferExpirationConfigurationDtoFromJSON)(json['leadOfferExpirationConfiguration']),
100
+ 'manualType': json['manualType'],
89
101
  };
90
102
  }
91
103
  function TaskListLeadDtoToJSON(json) {
@@ -107,5 +119,6 @@ function TaskListLeadDtoToJSONTyped(value, ignoreDiscriminator) {
107
119
  'leaseToOwn': (0, TaskListLeadLeaseToOwnConfigurationDto_1.TaskListLeadLeaseToOwnConfigurationDtoToJSON)(value['leaseToOwn']),
108
120
  'rent': (0, TaskListLeadRentConfigurationDto_1.TaskListLeadRentConfigurationDtoToJSON)(value['rent']),
109
121
  'leadOfferExpirationConfiguration': (0, LeadOfferExpirationConfigurationDto_1.LeadOfferExpirationConfigurationDtoToJSON)(value['leadOfferExpirationConfiguration']),
122
+ 'manualType': value['manualType'],
110
123
  };
111
124
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@randock/nameshift-api-client",
3
- "version": "0.0.536",
3
+ "version": "0.0.538",
4
4
  "description": "OpenAPI client for @randock/nameshift-api-client",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -339,6 +339,10 @@ export interface AdminApiCreateNewsletterRequest {
339
339
  createNewsletterInput: CreateNewsletterInput;
340
340
  }
341
341
 
342
+ export interface AdminApiDeleteAccountRequest {
343
+ accountId: string;
344
+ }
345
+
342
346
  export interface AdminApiDeleteAccountNoteRequest {
343
347
  accountId: string;
344
348
  noteId: string;
@@ -1511,6 +1515,48 @@ export class AdminApi extends runtime.BaseAPI {
1511
1515
  return await response.value();
1512
1516
  }
1513
1517
 
1518
+ /**
1519
+ * Deletes the seller account with its users and unsold domains, as the seller deleting it would, without notifying the seller. Requires super admin role.
1520
+ * Delete account
1521
+ */
1522
+ async deleteAccountRaw(requestParameters: AdminApiDeleteAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
1523
+ if (requestParameters['accountId'] == null) {
1524
+ throw new runtime.RequiredError(
1525
+ 'accountId',
1526
+ 'Required parameter "accountId" was null or undefined when calling deleteAccount().'
1527
+ );
1528
+ }
1529
+
1530
+ const queryParameters: any = {};
1531
+
1532
+ const headerParameters: runtime.HTTPHeaders = {};
1533
+
1534
+ if (this.configuration && this.configuration.accessToken) {
1535
+ const token = this.configuration.accessToken;
1536
+ const tokenString = await token("bearer", []);
1537
+
1538
+ if (tokenString) {
1539
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
1540
+ }
1541
+ }
1542
+ const response = await this.request({
1543
+ path: `/admin/accounts/{accountId}`.replace(`{${"accountId"}}`, encodeURIComponent(String(requestParameters['accountId']))),
1544
+ method: 'DELETE',
1545
+ headers: headerParameters,
1546
+ query: queryParameters,
1547
+ }, initOverrides);
1548
+
1549
+ return new runtime.VoidApiResponse(response);
1550
+ }
1551
+
1552
+ /**
1553
+ * Deletes the seller account with its users and unsold domains, as the seller deleting it would, without notifying the seller. Requires super admin role.
1554
+ * Delete account
1555
+ */
1556
+ async deleteAccount(requestParameters: AdminApiDeleteAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
1557
+ await this.deleteAccountRaw(requestParameters, initOverrides);
1558
+ }
1559
+
1514
1560
  /**
1515
1561
  * Soft-deletes a note. Only its author, or a super admin, may do so.
1516
1562
  * Delete account note
@@ -13,6 +13,14 @@
13
13
  */
14
14
 
15
15
  import { mapValues } from '../runtime';
16
+ import type { MoneyDto } from './MoneyDto';
17
+ import {
18
+ MoneyDtoFromJSON,
19
+ MoneyDtoFromJSONTyped,
20
+ MoneyDtoToJSON,
21
+ MoneyDtoToJSONTyped,
22
+ } from './MoneyDto';
23
+
16
24
  /**
17
25
  *
18
26
  * @export
@@ -37,6 +45,12 @@ export interface TaskListDomainDto {
37
45
  * @memberof TaskListDomainDto
38
46
  */
39
47
  currencyCode: string;
48
+ /**
49
+ * Minimum acceptable offer amount for the domain, or null when it takes any.
50
+ * @type {MoneyDto}
51
+ * @memberof TaskListDomainDto
52
+ */
53
+ minOffer: MoneyDto | null;
40
54
  }
41
55
 
42
56
  /**
@@ -46,6 +60,7 @@ export function instanceOfTaskListDomainDto(value: object): value is TaskListDom
46
60
  if (!('id' in value) || value['id'] === undefined) return false;
47
61
  if (!('displayName' in value) || value['displayName'] === undefined) return false;
48
62
  if (!('currencyCode' in value) || value['currencyCode'] === undefined) return false;
63
+ if (!('minOffer' in value) || value['minOffer'] === undefined) return false;
49
64
  return true;
50
65
  }
51
66
 
@@ -62,6 +77,7 @@ export function TaskListDomainDtoFromJSONTyped(json: any, ignoreDiscriminator: b
62
77
  'id': json['id'],
63
78
  'displayName': json['displayName'],
64
79
  'currencyCode': json['currencyCode'],
80
+ 'minOffer': MoneyDtoFromJSON(json['minOffer']),
65
81
  };
66
82
  }
67
83
 
@@ -79,6 +95,7 @@ export function TaskListDomainDtoToJSONTyped(value?: TaskListDomainDto | null, i
79
95
  'id': value['id'],
80
96
  'displayName': value['displayName'],
81
97
  'currencyCode': value['currencyCode'],
98
+ 'minOffer': MoneyDtoToJSON(value['minOffer']),
82
99
  };
83
100
  }
84
101
 
@@ -115,6 +115,12 @@ export interface TaskListLeadDto {
115
115
  * @memberof TaskListLeadDto
116
116
  */
117
117
  leadOfferExpirationConfiguration: LeadOfferExpirationConfigurationDto;
118
+ /**
119
+ * Manual lead type, if the lead was created manually.
120
+ * @type {string}
121
+ * @memberof TaskListLeadDto
122
+ */
123
+ manualType: TaskListLeadDtoManualTypeEnum | null;
118
124
  }
119
125
 
120
126
 
@@ -140,6 +146,17 @@ export const TaskListLeadDtoLastOfferTypeEnum = {
140
146
  } as const;
141
147
  export type TaskListLeadDtoLastOfferTypeEnum = typeof TaskListLeadDtoLastOfferTypeEnum[keyof typeof TaskListLeadDtoLastOfferTypeEnum];
142
148
 
149
+ /**
150
+ * @export
151
+ */
152
+ export const TaskListLeadDtoManualTypeEnum = {
153
+ BUY_NOW: 'buy_now',
154
+ OFFER: 'offer',
155
+ LEASE_TO_OWN: 'lease_to_own',
156
+ RENT: 'rent'
157
+ } as const;
158
+ export type TaskListLeadDtoManualTypeEnum = typeof TaskListLeadDtoManualTypeEnum[keyof typeof TaskListLeadDtoManualTypeEnum];
159
+
143
160
 
144
161
  /**
145
162
  * Check if a given object implements the TaskListLeadDto interface.
@@ -155,6 +172,7 @@ export function instanceOfTaskListLeadDto(value: object): value is TaskListLeadD
155
172
  if (!('leaseToOwn' in value) || value['leaseToOwn'] === undefined) return false;
156
173
  if (!('rent' in value) || value['rent'] === undefined) return false;
157
174
  if (!('leadOfferExpirationConfiguration' in value) || value['leadOfferExpirationConfiguration'] === undefined) return false;
175
+ if (!('manualType' in value) || value['manualType'] === undefined) return false;
158
176
  return true;
159
177
  }
160
178
 
@@ -178,6 +196,7 @@ export function TaskListLeadDtoFromJSONTyped(json: any, ignoreDiscriminator: boo
178
196
  'leaseToOwn': TaskListLeadLeaseToOwnConfigurationDtoFromJSON(json['leaseToOwn']),
179
197
  'rent': TaskListLeadRentConfigurationDtoFromJSON(json['rent']),
180
198
  'leadOfferExpirationConfiguration': LeadOfferExpirationConfigurationDtoFromJSON(json['leadOfferExpirationConfiguration']),
199
+ 'manualType': json['manualType'],
181
200
  };
182
201
  }
183
202
 
@@ -202,6 +221,7 @@ export function TaskListLeadDtoToJSONTyped(value?: TaskListLeadDto | null, ignor
202
221
  'leaseToOwn': TaskListLeadLeaseToOwnConfigurationDtoToJSON(value['leaseToOwn']),
203
222
  'rent': TaskListLeadRentConfigurationDtoToJSON(value['rent']),
204
223
  'leadOfferExpirationConfiguration': LeadOfferExpirationConfigurationDtoToJSON(value['leadOfferExpirationConfiguration']),
224
+ 'manualType': value['manualType'],
205
225
  };
206
226
  }
207
227