@randock/nameshift-api-client 0.0.279 → 0.0.281

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.279
1
+ ## @randock/nameshift-api-client@0.0.281
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.279 --save
39
+ npm install @randock/nameshift-api-client@0.0.281 --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
- 1c224dbb8a4c47c0ef62976234c7cbe3e025656fb57a2623dd51b313708677447630424a481ebfe0a797a92661296dd6
47
+ cfd2ce5aa7910076c2a05751cc24b218409036647f2a970b86392f2c813d97cab71159ca649b4640fd5d5c334e9d1e77
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { AccountSettingsDto, AdminAccountLoginDto, AdminAccountSettingsInput, AdminCompanyStatsDto, AdminGetAllDomainTransfers200Response, ChangeOrderStatusInput, ChangeSubscriptionStatusInput, DomainTransferDetailsDto, GetAllInvoices200Response, GetAllOrders200Response, GetAllOwnedDomains200Response, GetAllSubscriptions200Response, IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDto, LeadMessageDto, LedgerMutationsDto, ListAccounts200Response, ListBankAccounts200Response, ListDomains200Response, SendAdminLeadAiPriceNegotiatorAgentChatMessageInput, SubscriptionDetailsDto } from '../models/index';
13
+ import type { AccountSettingsDto, AdminAccountLoginDto, AdminAccountSettingsInput, AdminCompanyStatsDto, AdminGetAllDomainTransfers200Response, ChangeOrderStatusInput, ChangeSubscriptionStatusInput, DomainTransferDetailsDto, GetAllInvoices200Response, GetAllOrders200Response, GetAllOwnedDomains200Response, GetAllSubscriptions200Response, IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDto, LeadMessageDto, LedgerMutationsDto, ListAccounts200Response, ListBankAccounts200Response, ListDomains200Response, ObjectId, SendAdminLeadAiPriceNegotiatorAgentChatMessageInput, SubscriptionDetailsDto } from '../models/index';
14
14
  export interface AdminApiAdminGetAllDomainTransfersRequest {
15
15
  filter?: object;
16
16
  page?: number;
@@ -25,6 +25,9 @@ export interface AdminApiChangeSubscriptionStatusRequest {
25
25
  subscriptionId: string;
26
26
  changeSubscriptionStatusInput: ChangeSubscriptionStatusInput;
27
27
  }
28
+ export interface AdminApiCreateNegativeInvoiceRequest {
29
+ invoiceId: string;
30
+ }
28
31
  export interface AdminApiDownloadInvoiceRequest {
29
32
  invoiceId: string;
30
33
  }
@@ -152,6 +155,14 @@ export declare class AdminApi extends runtime.BaseAPI {
152
155
  *
153
156
  */
154
157
  changeSubscriptionStatus(requestParameters: AdminApiChangeSubscriptionStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
158
+ /**
159
+ *
160
+ */
161
+ createNegativeInvoiceRaw(requestParameters: AdminApiCreateNegativeInvoiceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ObjectId>>;
162
+ /**
163
+ *
164
+ */
165
+ createNegativeInvoice(requestParameters: AdminApiCreateNegativeInvoiceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ObjectId>;
155
166
  /**
156
167
  *
157
168
  */
@@ -250,6 +250,59 @@ var AdminApi = /** @class */ (function (_super) {
250
250
  });
251
251
  });
252
252
  };
253
+ /**
254
+ *
255
+ */
256
+ AdminApi.prototype.createNegativeInvoiceRaw = function (requestParameters, initOverrides) {
257
+ return __awaiter(this, void 0, void 0, function () {
258
+ var queryParameters, headerParameters, token, tokenString, response;
259
+ return __generator(this, function (_a) {
260
+ switch (_a.label) {
261
+ case 0:
262
+ if (requestParameters['invoiceId'] == null) {
263
+ throw new runtime.RequiredError('invoiceId', 'Required parameter "invoiceId" was null or undefined when calling createNegativeInvoice().');
264
+ }
265
+ queryParameters = {};
266
+ headerParameters = {};
267
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
268
+ token = this.configuration.accessToken;
269
+ return [4 /*yield*/, token("bearer", [])];
270
+ case 1:
271
+ tokenString = _a.sent();
272
+ if (tokenString) {
273
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
274
+ }
275
+ _a.label = 2;
276
+ case 2: return [4 /*yield*/, this.request({
277
+ path: "/admin/invoices/{invoiceId}/negative".replace("{".concat("invoiceId", "}"), encodeURIComponent(String(requestParameters['invoiceId']))),
278
+ method: 'POST',
279
+ headers: headerParameters,
280
+ query: queryParameters,
281
+ }, initOverrides)];
282
+ case 3:
283
+ response = _a.sent();
284
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ObjectIdFromJSON)(jsonValue); })];
285
+ }
286
+ });
287
+ });
288
+ };
289
+ /**
290
+ *
291
+ */
292
+ AdminApi.prototype.createNegativeInvoice = function (requestParameters, initOverrides) {
293
+ return __awaiter(this, void 0, void 0, function () {
294
+ var response;
295
+ return __generator(this, function (_a) {
296
+ switch (_a.label) {
297
+ case 0: return [4 /*yield*/, this.createNegativeInvoiceRaw(requestParameters, initOverrides)];
298
+ case 1:
299
+ response = _a.sent();
300
+ return [4 /*yield*/, response.value()];
301
+ case 2: return [2 /*return*/, _a.sent()];
302
+ }
303
+ });
304
+ });
305
+ };
253
306
  /**
254
307
  *
255
308
  */
@@ -66,6 +66,18 @@ export interface InvoiceDto {
66
66
  * @memberof InvoiceDto
67
67
  */
68
68
  sellerAccount: InvoiceSellerAccountDto;
69
+ /**
70
+ *
71
+ * @type {object}
72
+ * @memberof InvoiceDto
73
+ */
74
+ parent: object | null;
75
+ /**
76
+ *
77
+ * @type {boolean}
78
+ * @memberof InvoiceDto
79
+ */
80
+ hasChildren: boolean;
69
81
  }
70
82
  /**
71
83
  * @export
@@ -58,6 +58,10 @@ function instanceOfInvoiceDto(value) {
58
58
  return false;
59
59
  if (!('sellerAccount' in value) || value['sellerAccount'] === undefined)
60
60
  return false;
61
+ if (!('parent' in value) || value['parent'] === undefined)
62
+ return false;
63
+ if (!('hasChildren' in value) || value['hasChildren'] === undefined)
64
+ return false;
61
65
  return true;
62
66
  }
63
67
  function InvoiceDtoFromJSON(json) {
@@ -76,6 +80,8 @@ function InvoiceDtoFromJSONTyped(json, ignoreDiscriminator) {
76
80
  'totalPrice': (0, MoneyDto_1.MoneyDtoFromJSON)(json['totalPrice']),
77
81
  'target': json['target'],
78
82
  'sellerAccount': (0, InvoiceSellerAccountDto_1.InvoiceSellerAccountDtoFromJSON)(json['sellerAccount']),
83
+ 'parent': json['parent'],
84
+ 'hasChildren': json['hasChildren'],
79
85
  };
80
86
  }
81
87
  function InvoiceDtoToJSON(json) {
@@ -95,5 +101,7 @@ function InvoiceDtoToJSONTyped(value, ignoreDiscriminator) {
95
101
  'totalPrice': (0, MoneyDto_1.MoneyDtoToJSON)(value['totalPrice']),
96
102
  'target': value['target'],
97
103
  'sellerAccount': (0, InvoiceSellerAccountDto_1.InvoiceSellerAccountDtoToJSON)(value['sellerAccount']),
104
+ 'parent': value['parent'],
105
+ 'hasChildren': value['hasChildren'],
98
106
  };
99
107
  }
@@ -203,6 +203,18 @@ export interface SubscriptionDetailsDto {
203
203
  * @memberof SubscriptionDetailsDto
204
204
  */
205
205
  renewStatusReason: SubscriptionDetailsDtoRenewStatusReasonEnum | null;
206
+ /**
207
+ *
208
+ * @type {Date}
209
+ * @memberof SubscriptionDetailsDto
210
+ */
211
+ scheduledCancellationAt: Date | null;
212
+ /**
213
+ *
214
+ * @type {string}
215
+ * @memberof SubscriptionDetailsDto
216
+ */
217
+ scheduledCancellationReason: string | null;
206
218
  }
207
219
  /**
208
220
  * @export
@@ -123,6 +123,10 @@ function instanceOfSubscriptionDetailsDto(value) {
123
123
  return false;
124
124
  if (!('renewStatusReason' in value) || value['renewStatusReason'] === undefined)
125
125
  return false;
126
+ if (!('scheduledCancellationAt' in value) || value['scheduledCancellationAt'] === undefined)
127
+ return false;
128
+ if (!('scheduledCancellationReason' in value) || value['scheduledCancellationReason'] === undefined)
129
+ return false;
126
130
  return true;
127
131
  }
128
132
  function SubscriptionDetailsDtoFromJSON(json) {
@@ -163,6 +167,8 @@ function SubscriptionDetailsDtoFromJSONTyped(json, ignoreDiscriminator) {
163
167
  'renewRetryAt': (json['renewRetryAt'] == null ? null : new Date(json['renewRetryAt'])),
164
168
  'renewStatus': json['renewStatus'],
165
169
  'renewStatusReason': json['renewStatusReason'],
170
+ 'scheduledCancellationAt': (json['scheduledCancellationAt'] == null ? null : new Date(json['scheduledCancellationAt'])),
171
+ 'scheduledCancellationReason': json['scheduledCancellationReason'],
166
172
  };
167
173
  }
168
174
  function SubscriptionDetailsDtoToJSON(json) {
@@ -204,5 +210,7 @@ function SubscriptionDetailsDtoToJSONTyped(value, ignoreDiscriminator) {
204
210
  'renewRetryAt': (value['renewRetryAt'] == null ? null : value['renewRetryAt'].toISOString()),
205
211
  'renewStatus': value['renewStatus'],
206
212
  'renewStatusReason': value['renewStatusReason'],
213
+ 'scheduledCancellationAt': (value['scheduledCancellationAt'] == null ? null : value['scheduledCancellationAt'].toISOString()),
214
+ 'scheduledCancellationReason': value['scheduledCancellationReason'],
207
215
  };
208
216
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@randock/nameshift-api-client",
3
- "version": "0.0.279",
3
+ "version": "0.0.281",
4
4
  "description": "OpenAPI client for @randock/nameshift-api-client",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -35,6 +35,7 @@ import type {
35
35
  ListBankAccounts200Response,
36
36
  ListDomains200Response,
37
37
  NotFoundException,
38
+ ObjectId,
38
39
  SendAdminLeadAiPriceNegotiatorAgentChatMessageInput,
39
40
  SubscriptionDetailsDto,
40
41
  ThrottlerException,
@@ -81,6 +82,8 @@ import {
81
82
  ListDomains200ResponseToJSON,
82
83
  NotFoundExceptionFromJSON,
83
84
  NotFoundExceptionToJSON,
85
+ ObjectIdFromJSON,
86
+ ObjectIdToJSON,
84
87
  SendAdminLeadAiPriceNegotiatorAgentChatMessageInputFromJSON,
85
88
  SendAdminLeadAiPriceNegotiatorAgentChatMessageInputToJSON,
86
89
  SubscriptionDetailsDtoFromJSON,
@@ -108,6 +111,10 @@ export interface AdminApiChangeSubscriptionStatusRequest {
108
111
  changeSubscriptionStatusInput: ChangeSubscriptionStatusInput;
109
112
  }
110
113
 
114
+ export interface AdminApiCreateNegativeInvoiceRequest {
115
+ invoiceId: string;
116
+ }
117
+
111
118
  export interface AdminApiDownloadInvoiceRequest {
112
119
  invoiceId: string;
113
120
  }
@@ -385,6 +392,47 @@ export class AdminApi extends runtime.BaseAPI {
385
392
  await this.changeSubscriptionStatusRaw(requestParameters, initOverrides);
386
393
  }
387
394
 
395
+ /**
396
+ *
397
+ */
398
+ async createNegativeInvoiceRaw(requestParameters: AdminApiCreateNegativeInvoiceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ObjectId>> {
399
+ if (requestParameters['invoiceId'] == null) {
400
+ throw new runtime.RequiredError(
401
+ 'invoiceId',
402
+ 'Required parameter "invoiceId" was null or undefined when calling createNegativeInvoice().'
403
+ );
404
+ }
405
+
406
+ const queryParameters: any = {};
407
+
408
+ const headerParameters: runtime.HTTPHeaders = {};
409
+
410
+ if (this.configuration && this.configuration.accessToken) {
411
+ const token = this.configuration.accessToken;
412
+ const tokenString = await token("bearer", []);
413
+
414
+ if (tokenString) {
415
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
416
+ }
417
+ }
418
+ const response = await this.request({
419
+ path: `/admin/invoices/{invoiceId}/negative`.replace(`{${"invoiceId"}}`, encodeURIComponent(String(requestParameters['invoiceId']))),
420
+ method: 'POST',
421
+ headers: headerParameters,
422
+ query: queryParameters,
423
+ }, initOverrides);
424
+
425
+ return new runtime.JSONApiResponse(response, (jsonValue) => ObjectIdFromJSON(jsonValue));
426
+ }
427
+
428
+ /**
429
+ *
430
+ */
431
+ async createNegativeInvoice(requestParameters: AdminApiCreateNegativeInvoiceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ObjectId> {
432
+ const response = await this.createNegativeInvoiceRaw(requestParameters, initOverrides);
433
+ return await response.value();
434
+ }
435
+
388
436
  /**
389
437
  *
390
438
  */
@@ -89,6 +89,18 @@ export interface InvoiceDto {
89
89
  * @memberof InvoiceDto
90
90
  */
91
91
  sellerAccount: InvoiceSellerAccountDto;
92
+ /**
93
+ *
94
+ * @type {object}
95
+ * @memberof InvoiceDto
96
+ */
97
+ parent: object | null;
98
+ /**
99
+ *
100
+ * @type {boolean}
101
+ * @memberof InvoiceDto
102
+ */
103
+ hasChildren: boolean;
92
104
  }
93
105
 
94
106
 
@@ -125,6 +137,8 @@ export function instanceOfInvoiceDto(value: object): value is InvoiceDto {
125
137
  if (!('totalPrice' in value) || value['totalPrice'] === undefined) return false;
126
138
  if (!('target' in value) || value['target'] === undefined) return false;
127
139
  if (!('sellerAccount' in value) || value['sellerAccount'] === undefined) return false;
140
+ if (!('parent' in value) || value['parent'] === undefined) return false;
141
+ if (!('hasChildren' in value) || value['hasChildren'] === undefined) return false;
128
142
  return true;
129
143
  }
130
144
 
@@ -146,6 +160,8 @@ export function InvoiceDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean)
146
160
  'totalPrice': MoneyDtoFromJSON(json['totalPrice']),
147
161
  'target': json['target'],
148
162
  'sellerAccount': InvoiceSellerAccountDtoFromJSON(json['sellerAccount']),
163
+ 'parent': json['parent'],
164
+ 'hasChildren': json['hasChildren'],
149
165
  };
150
166
  }
151
167
 
@@ -168,6 +184,8 @@ export function InvoiceDtoToJSONTyped(value?: InvoiceDto | null, ignoreDiscrimin
168
184
  'totalPrice': MoneyDtoToJSON(value['totalPrice']),
169
185
  'target': value['target'],
170
186
  'sellerAccount': InvoiceSellerAccountDtoToJSON(value['sellerAccount']),
187
+ 'parent': value['parent'],
188
+ 'hasChildren': value['hasChildren'],
171
189
  };
172
190
  }
173
191
 
@@ -256,6 +256,18 @@ export interface SubscriptionDetailsDto {
256
256
  * @memberof SubscriptionDetailsDto
257
257
  */
258
258
  renewStatusReason: SubscriptionDetailsDtoRenewStatusReasonEnum | null;
259
+ /**
260
+ *
261
+ * @type {Date}
262
+ * @memberof SubscriptionDetailsDto
263
+ */
264
+ scheduledCancellationAt: Date | null;
265
+ /**
266
+ *
267
+ * @type {string}
268
+ * @memberof SubscriptionDetailsDto
269
+ */
270
+ scheduledCancellationReason: string | null;
259
271
  }
260
272
 
261
273
 
@@ -334,6 +346,8 @@ export function instanceOfSubscriptionDetailsDto(value: object): value is Subscr
334
346
  if (!('renewRetryAt' in value) || value['renewRetryAt'] === undefined) return false;
335
347
  if (!('renewStatus' in value) || value['renewStatus'] === undefined) return false;
336
348
  if (!('renewStatusReason' in value) || value['renewStatusReason'] === undefined) return false;
349
+ if (!('scheduledCancellationAt' in value) || value['scheduledCancellationAt'] === undefined) return false;
350
+ if (!('scheduledCancellationReason' in value) || value['scheduledCancellationReason'] === undefined) return false;
337
351
  return true;
338
352
  }
339
353
 
@@ -377,6 +391,8 @@ export function SubscriptionDetailsDtoFromJSONTyped(json: any, ignoreDiscriminat
377
391
  'renewRetryAt': (json['renewRetryAt'] == null ? null : new Date(json['renewRetryAt'])),
378
392
  'renewStatus': json['renewStatus'],
379
393
  'renewStatusReason': json['renewStatusReason'],
394
+ 'scheduledCancellationAt': (json['scheduledCancellationAt'] == null ? null : new Date(json['scheduledCancellationAt'])),
395
+ 'scheduledCancellationReason': json['scheduledCancellationReason'],
380
396
  };
381
397
  }
382
398
 
@@ -421,6 +437,8 @@ export function SubscriptionDetailsDtoToJSONTyped(value?: SubscriptionDetailsDto
421
437
  'renewRetryAt': (value['renewRetryAt'] == null ? null : (value['renewRetryAt'] as any).toISOString()),
422
438
  'renewStatus': value['renewStatus'],
423
439
  'renewStatusReason': value['renewStatusReason'],
440
+ 'scheduledCancellationAt': (value['scheduledCancellationAt'] == null ? null : (value['scheduledCancellationAt'] as any).toISOString()),
441
+ 'scheduledCancellationReason': value['scheduledCancellationReason'],
424
442
  };
425
443
  }
426
444