@randock/nameshift-api-client 0.0.104 → 0.0.105

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.
@@ -63,6 +63,7 @@ src/models/DomainTransferOrderDto.ts
63
63
  src/models/ForgotPasswordRequestInput.ts
64
64
  src/models/GetAllDomainTransfers200Response.ts
65
65
  src/models/GetAllOrders200Response.ts
66
+ src/models/GetBuyerInvoices200Response.ts
66
67
  src/models/GetBuyerLeads200Response.ts
67
68
  src/models/GetBuyerTransfers200Response.ts
68
69
  src/models/HttpException.ts
@@ -73,6 +74,8 @@ src/models/IntersectionDomainDtoWithHijackerDtoWithAccountDto.ts
73
74
  src/models/IntersectionDomainSalesInformationDtoWithDomainStatsDto.ts
74
75
  src/models/IntersectionLeadDtoWithLeadDetailsDto.ts
75
76
  src/models/IntersectionLeadDtoWithListFieldsDto.ts
77
+ src/models/InvoiceDomainDto.ts
78
+ src/models/InvoiceDto.ts
76
79
  src/models/LeadDomainDto.ts
77
80
  src/models/LeadDto.ts
78
81
  src/models/LeadMessageData.ts
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## @randock/nameshift-api-client@0.0.104
1
+ ## @randock/nameshift-api-client@0.0.105
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.104 --save
39
+ npm install @randock/nameshift-api-client@0.0.105 --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
- 38b060a751ac96384cd9327eb1b1e36a21fdb71114be07434c0cc7bf63f6e1da274edebfe76f65fbd51ad2f14898b95b
47
+ b041fe43ddb0576af663c54c77fd961eccbbe52ef5a847864fcb805a3af6b599b7c1233dfe0796c550906ec4c797ee69
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { BatchReadBuyerLeadMessageInput, BuyerDomainTransferAuthCodeDto, BuyerUserDto, CreateBuyerLeadMessageInput, GetBuyerLeads200Response, GetBuyerTransfers200Response, LeadDto, LeadMessageDto, ObjectId, PutBuyerLeadOfferInput, SetDomainTransferConfirmationInput, StoreBuyerLocaleInput } from '../models/index';
13
+ import type { BatchReadBuyerLeadMessageInput, BuyerDomainTransferAuthCodeDto, BuyerUserDto, CreateBuyerLeadMessageInput, GetBuyerInvoices200Response, GetBuyerLeads200Response, GetBuyerTransfers200Response, LeadDto, LeadMessageDto, ObjectId, PutBuyerLeadOfferInput, SetDomainTransferConfirmationInput, StoreBuyerLocaleInput } from '../models/index';
14
14
  export interface BuyersApiAcceptBuyerLeadOfferRequest {
15
15
  leadId: string;
16
16
  }
@@ -22,6 +22,15 @@ export interface BuyersApiCreateBuyerLeadMessageRequest {
22
22
  leadId: string;
23
23
  createBuyerLeadMessageInput: CreateBuyerLeadMessageInput;
24
24
  }
25
+ export interface BuyersApiDownloadBuyerInvoiceRequest {
26
+ invoiceId: string;
27
+ }
28
+ export interface BuyersApiGetBuyerInvoicesRequest {
29
+ filter?: object;
30
+ page?: number;
31
+ limit?: number;
32
+ sortBy?: Array<string>;
33
+ }
25
34
  export interface BuyersApiGetBuyerLeadRequest {
26
35
  leadId: string;
27
36
  }
@@ -90,6 +99,22 @@ export declare class BuyersApi extends runtime.BaseAPI {
90
99
  *
91
100
  */
92
101
  createBuyerLeadMessage(requestParameters: BuyersApiCreateBuyerLeadMessageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ObjectId>;
102
+ /**
103
+ *
104
+ */
105
+ downloadBuyerInvoiceRaw(requestParameters: BuyersApiDownloadBuyerInvoiceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Blob>>;
106
+ /**
107
+ *
108
+ */
109
+ downloadBuyerInvoice(requestParameters: BuyersApiDownloadBuyerInvoiceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob>;
110
+ /**
111
+ *
112
+ */
113
+ getBuyerInvoicesRaw(requestParameters: BuyersApiGetBuyerInvoicesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetBuyerInvoices200Response>>;
114
+ /**
115
+ *
116
+ */
117
+ getBuyerInvoices(requestParameters?: BuyersApiGetBuyerInvoicesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetBuyerInvoices200Response>;
93
118
  /**
94
119
  *
95
120
  */
@@ -290,6 +290,122 @@ var BuyersApi = /** @class */ (function (_super) {
290
290
  });
291
291
  });
292
292
  };
293
+ /**
294
+ *
295
+ */
296
+ BuyersApi.prototype.downloadBuyerInvoiceRaw = function (requestParameters, initOverrides) {
297
+ return __awaiter(this, void 0, void 0, function () {
298
+ var queryParameters, headerParameters, token, tokenString, response;
299
+ return __generator(this, function (_a) {
300
+ switch (_a.label) {
301
+ case 0:
302
+ if (requestParameters['invoiceId'] == null) {
303
+ throw new runtime.RequiredError('invoiceId', 'Required parameter "invoiceId" was null or undefined when calling downloadBuyerInvoice().');
304
+ }
305
+ queryParameters = {};
306
+ headerParameters = {};
307
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
308
+ token = this.configuration.accessToken;
309
+ return [4 /*yield*/, token("bearer", [])];
310
+ case 1:
311
+ tokenString = _a.sent();
312
+ if (tokenString) {
313
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
314
+ }
315
+ _a.label = 2;
316
+ case 2: return [4 /*yield*/, this.request({
317
+ path: "/buyers/private/invoices/{invoiceId}/download".replace("{".concat("invoiceId", "}"), encodeURIComponent(String(requestParameters['invoiceId']))),
318
+ method: 'GET',
319
+ headers: headerParameters,
320
+ query: queryParameters,
321
+ }, initOverrides)];
322
+ case 3:
323
+ response = _a.sent();
324
+ return [2 /*return*/, new runtime.BlobApiResponse(response)];
325
+ }
326
+ });
327
+ });
328
+ };
329
+ /**
330
+ *
331
+ */
332
+ BuyersApi.prototype.downloadBuyerInvoice = function (requestParameters, initOverrides) {
333
+ return __awaiter(this, void 0, void 0, function () {
334
+ var response;
335
+ return __generator(this, function (_a) {
336
+ switch (_a.label) {
337
+ case 0: return [4 /*yield*/, this.downloadBuyerInvoiceRaw(requestParameters, initOverrides)];
338
+ case 1:
339
+ response = _a.sent();
340
+ return [4 /*yield*/, response.value()];
341
+ case 2: return [2 /*return*/, _a.sent()];
342
+ }
343
+ });
344
+ });
345
+ };
346
+ /**
347
+ *
348
+ */
349
+ BuyersApi.prototype.getBuyerInvoicesRaw = function (requestParameters, initOverrides) {
350
+ return __awaiter(this, void 0, void 0, function () {
351
+ var queryParameters, headerParameters, token, tokenString, response;
352
+ return __generator(this, function (_a) {
353
+ switch (_a.label) {
354
+ case 0:
355
+ queryParameters = {};
356
+ if (requestParameters['filter'] != null) {
357
+ queryParameters['filter'] = requestParameters['filter'];
358
+ }
359
+ if (requestParameters['page'] != null) {
360
+ queryParameters['page'] = requestParameters['page'];
361
+ }
362
+ if (requestParameters['limit'] != null) {
363
+ queryParameters['limit'] = requestParameters['limit'];
364
+ }
365
+ if (requestParameters['sortBy'] != null) {
366
+ queryParameters['sortBy'] = requestParameters['sortBy'];
367
+ }
368
+ headerParameters = {};
369
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
370
+ token = this.configuration.accessToken;
371
+ return [4 /*yield*/, token("bearer", [])];
372
+ case 1:
373
+ tokenString = _a.sent();
374
+ if (tokenString) {
375
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
376
+ }
377
+ _a.label = 2;
378
+ case 2: return [4 /*yield*/, this.request({
379
+ path: "/buyers/private/invoices",
380
+ method: 'GET',
381
+ headers: headerParameters,
382
+ query: queryParameters,
383
+ }, initOverrides)];
384
+ case 3:
385
+ response = _a.sent();
386
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.GetBuyerInvoices200ResponseFromJSON)(jsonValue); })];
387
+ }
388
+ });
389
+ });
390
+ };
391
+ /**
392
+ *
393
+ */
394
+ BuyersApi.prototype.getBuyerInvoices = function () {
395
+ return __awaiter(this, arguments, void 0, function (requestParameters, initOverrides) {
396
+ var response;
397
+ if (requestParameters === void 0) { requestParameters = {}; }
398
+ return __generator(this, function (_a) {
399
+ switch (_a.label) {
400
+ case 0: return [4 /*yield*/, this.getBuyerInvoicesRaw(requestParameters, initOverrides)];
401
+ case 1:
402
+ response = _a.sent();
403
+ return [4 /*yield*/, response.value()];
404
+ case 2: return [2 /*return*/, _a.sent()];
405
+ }
406
+ });
407
+ });
408
+ };
293
409
  /**
294
410
  *
295
411
  */
@@ -0,0 +1,46 @@
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 type { PaginateResponseLinks } from './PaginateResponseLinks';
13
+ import type { InvoiceDto } from './InvoiceDto';
14
+ import type { PaginateResponseMeta } from './PaginateResponseMeta';
15
+ /**
16
+ *
17
+ * @export
18
+ * @interface GetBuyerInvoices200Response
19
+ */
20
+ export interface GetBuyerInvoices200Response {
21
+ /**
22
+ *
23
+ * @type {Array<InvoiceDto>}
24
+ * @memberof GetBuyerInvoices200Response
25
+ */
26
+ data: Array<InvoiceDto>;
27
+ /**
28
+ *
29
+ * @type {PaginateResponseMeta}
30
+ * @memberof GetBuyerInvoices200Response
31
+ */
32
+ meta: PaginateResponseMeta;
33
+ /**
34
+ *
35
+ * @type {PaginateResponseLinks}
36
+ * @memberof GetBuyerInvoices200Response
37
+ */
38
+ links: PaginateResponseLinks;
39
+ }
40
+ /**
41
+ * Check if a given object implements the GetBuyerInvoices200Response interface.
42
+ */
43
+ export declare function instanceOfGetBuyerInvoices200Response(value: object): value is GetBuyerInvoices200Response;
44
+ export declare function GetBuyerInvoices200ResponseFromJSON(json: any): GetBuyerInvoices200Response;
45
+ export declare function GetBuyerInvoices200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetBuyerInvoices200Response;
46
+ export declare function GetBuyerInvoices200ResponseToJSON(value?: GetBuyerInvoices200Response | null): any;
@@ -0,0 +1,57 @@
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.instanceOfGetBuyerInvoices200Response = instanceOfGetBuyerInvoices200Response;
17
+ exports.GetBuyerInvoices200ResponseFromJSON = GetBuyerInvoices200ResponseFromJSON;
18
+ exports.GetBuyerInvoices200ResponseFromJSONTyped = GetBuyerInvoices200ResponseFromJSONTyped;
19
+ exports.GetBuyerInvoices200ResponseToJSON = GetBuyerInvoices200ResponseToJSON;
20
+ var PaginateResponseLinks_1 = require("./PaginateResponseLinks");
21
+ var InvoiceDto_1 = require("./InvoiceDto");
22
+ var PaginateResponseMeta_1 = require("./PaginateResponseMeta");
23
+ /**
24
+ * Check if a given object implements the GetBuyerInvoices200Response interface.
25
+ */
26
+ function instanceOfGetBuyerInvoices200Response(value) {
27
+ if (!('data' in value) || value['data'] === undefined)
28
+ return false;
29
+ if (!('meta' in value) || value['meta'] === undefined)
30
+ return false;
31
+ if (!('links' in value) || value['links'] === undefined)
32
+ return false;
33
+ return true;
34
+ }
35
+ function GetBuyerInvoices200ResponseFromJSON(json) {
36
+ return GetBuyerInvoices200ResponseFromJSONTyped(json, false);
37
+ }
38
+ function GetBuyerInvoices200ResponseFromJSONTyped(json, ignoreDiscriminator) {
39
+ if (json == null) {
40
+ return json;
41
+ }
42
+ return {
43
+ 'data': (json['data'].map(InvoiceDto_1.InvoiceDtoFromJSON)),
44
+ 'meta': (0, PaginateResponseMeta_1.PaginateResponseMetaFromJSON)(json['meta']),
45
+ 'links': (0, PaginateResponseLinks_1.PaginateResponseLinksFromJSON)(json['links']),
46
+ };
47
+ }
48
+ function GetBuyerInvoices200ResponseToJSON(value) {
49
+ if (value == null) {
50
+ return value;
51
+ }
52
+ return {
53
+ 'data': (value['data'].map(InvoiceDto_1.InvoiceDtoToJSON)),
54
+ 'meta': (0, PaginateResponseMeta_1.PaginateResponseMetaToJSON)(value['meta']),
55
+ 'links': (0, PaginateResponseLinks_1.PaginateResponseLinksToJSON)(value['links']),
56
+ };
57
+ }
@@ -0,0 +1,37 @@
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 InvoiceDomainDto
16
+ */
17
+ export interface InvoiceDomainDto {
18
+ /**
19
+ *
20
+ * @type {object}
21
+ * @memberof InvoiceDomainDto
22
+ */
23
+ id: object;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof InvoiceDomainDto
28
+ */
29
+ name: string;
30
+ }
31
+ /**
32
+ * Check if a given object implements the InvoiceDomainDto interface.
33
+ */
34
+ export declare function instanceOfInvoiceDomainDto(value: object): value is InvoiceDomainDto;
35
+ export declare function InvoiceDomainDtoFromJSON(json: any): InvoiceDomainDto;
36
+ export declare function InvoiceDomainDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): InvoiceDomainDto;
37
+ export declare function InvoiceDomainDtoToJSON(value?: InvoiceDomainDto | 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.instanceOfInvoiceDomainDto = instanceOfInvoiceDomainDto;
17
+ exports.InvoiceDomainDtoFromJSON = InvoiceDomainDtoFromJSON;
18
+ exports.InvoiceDomainDtoFromJSONTyped = InvoiceDomainDtoFromJSONTyped;
19
+ exports.InvoiceDomainDtoToJSON = InvoiceDomainDtoToJSON;
20
+ /**
21
+ * Check if a given object implements the InvoiceDomainDto interface.
22
+ */
23
+ function instanceOfInvoiceDomainDto(value) {
24
+ if (!('id' in value) || value['id'] === undefined)
25
+ return false;
26
+ if (!('name' in value) || value['name'] === undefined)
27
+ return false;
28
+ return true;
29
+ }
30
+ function InvoiceDomainDtoFromJSON(json) {
31
+ return InvoiceDomainDtoFromJSONTyped(json, false);
32
+ }
33
+ function InvoiceDomainDtoFromJSONTyped(json, ignoreDiscriminator) {
34
+ if (json == null) {
35
+ return json;
36
+ }
37
+ return {
38
+ 'id': json['id'],
39
+ 'name': json['name'],
40
+ };
41
+ }
42
+ function InvoiceDomainDtoToJSON(value) {
43
+ if (value == null) {
44
+ return value;
45
+ }
46
+ return {
47
+ 'id': value['id'],
48
+ 'name': value['name'],
49
+ };
50
+ }
@@ -0,0 +1,44 @@
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 type { InvoiceDomainDto } from './InvoiceDomainDto';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface InvoiceDto
17
+ */
18
+ export interface InvoiceDto {
19
+ /**
20
+ *
21
+ * @type {object}
22
+ * @memberof InvoiceDto
23
+ */
24
+ id: object;
25
+ /**
26
+ *
27
+ * @type {InvoiceDomainDto}
28
+ * @memberof InvoiceDto
29
+ */
30
+ domain: InvoiceDomainDto;
31
+ /**
32
+ *
33
+ * @type {Date}
34
+ * @memberof InvoiceDto
35
+ */
36
+ date: Date;
37
+ }
38
+ /**
39
+ * Check if a given object implements the InvoiceDto interface.
40
+ */
41
+ export declare function instanceOfInvoiceDto(value: object): value is InvoiceDto;
42
+ export declare function InvoiceDtoFromJSON(json: any): InvoiceDto;
43
+ export declare function InvoiceDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): InvoiceDto;
44
+ export declare function InvoiceDtoToJSON(value?: InvoiceDto | null): any;
@@ -0,0 +1,55 @@
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.instanceOfInvoiceDto = instanceOfInvoiceDto;
17
+ exports.InvoiceDtoFromJSON = InvoiceDtoFromJSON;
18
+ exports.InvoiceDtoFromJSONTyped = InvoiceDtoFromJSONTyped;
19
+ exports.InvoiceDtoToJSON = InvoiceDtoToJSON;
20
+ var InvoiceDomainDto_1 = require("./InvoiceDomainDto");
21
+ /**
22
+ * Check if a given object implements the InvoiceDto interface.
23
+ */
24
+ function instanceOfInvoiceDto(value) {
25
+ if (!('id' in value) || value['id'] === undefined)
26
+ return false;
27
+ if (!('domain' in value) || value['domain'] === undefined)
28
+ return false;
29
+ if (!('date' in value) || value['date'] === undefined)
30
+ return false;
31
+ return true;
32
+ }
33
+ function InvoiceDtoFromJSON(json) {
34
+ return InvoiceDtoFromJSONTyped(json, false);
35
+ }
36
+ function InvoiceDtoFromJSONTyped(json, ignoreDiscriminator) {
37
+ if (json == null) {
38
+ return json;
39
+ }
40
+ return {
41
+ 'id': json['id'],
42
+ 'domain': (0, InvoiceDomainDto_1.InvoiceDomainDtoFromJSON)(json['domain']),
43
+ 'date': (new Date(json['date'])),
44
+ };
45
+ }
46
+ function InvoiceDtoToJSON(value) {
47
+ if (value == null) {
48
+ return value;
49
+ }
50
+ return {
51
+ 'id': value['id'],
52
+ 'domain': (0, InvoiceDomainDto_1.InvoiceDomainDtoToJSON)(value['domain']),
53
+ 'date': ((value['date']).toISOString()),
54
+ };
55
+ }
@@ -43,6 +43,7 @@ export * from './DomainTransferOrderDto';
43
43
  export * from './ForgotPasswordRequestInput';
44
44
  export * from './GetAllDomainTransfers200Response';
45
45
  export * from './GetAllOrders200Response';
46
+ export * from './GetBuyerInvoices200Response';
46
47
  export * from './GetBuyerLeads200Response';
47
48
  export * from './GetBuyerTransfers200Response';
48
49
  export * from './HttpException';
@@ -53,6 +54,8 @@ export * from './IntersectionDomainDtoWithHijackerDtoWithAccountDto';
53
54
  export * from './IntersectionDomainSalesInformationDtoWithDomainStatsDto';
54
55
  export * from './IntersectionLeadDtoWithLeadDetailsDto';
55
56
  export * from './IntersectionLeadDtoWithListFieldsDto';
57
+ export * from './InvoiceDomainDto';
58
+ export * from './InvoiceDto';
56
59
  export * from './LeadDomainDto';
57
60
  export * from './LeadDto';
58
61
  export * from './LeadMessageData';
@@ -61,6 +61,7 @@ __exportStar(require("./DomainTransferOrderDto"), exports);
61
61
  __exportStar(require("./ForgotPasswordRequestInput"), exports);
62
62
  __exportStar(require("./GetAllDomainTransfers200Response"), exports);
63
63
  __exportStar(require("./GetAllOrders200Response"), exports);
64
+ __exportStar(require("./GetBuyerInvoices200Response"), exports);
64
65
  __exportStar(require("./GetBuyerLeads200Response"), exports);
65
66
  __exportStar(require("./GetBuyerTransfers200Response"), exports);
66
67
  __exportStar(require("./HttpException"), exports);
@@ -71,6 +72,8 @@ __exportStar(require("./IntersectionDomainDtoWithHijackerDtoWithAccountDto"), ex
71
72
  __exportStar(require("./IntersectionDomainSalesInformationDtoWithDomainStatsDto"), exports);
72
73
  __exportStar(require("./IntersectionLeadDtoWithLeadDetailsDto"), exports);
73
74
  __exportStar(require("./IntersectionLeadDtoWithListFieldsDto"), exports);
75
+ __exportStar(require("./InvoiceDomainDto"), exports);
76
+ __exportStar(require("./InvoiceDto"), exports);
74
77
  __exportStar(require("./LeadDomainDto"), exports);
75
78
  __exportStar(require("./LeadDto"), exports);
76
79
  __exportStar(require("./LeadMessageData"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@randock/nameshift-api-client",
3
- "version": "0.0.104",
3
+ "version": "0.0.105",
4
4
  "description": "OpenAPI client for @randock/nameshift-api-client",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -20,6 +20,7 @@ import type {
20
20
  BuyerDomainTransferAuthCodeDto,
21
21
  BuyerUserDto,
22
22
  CreateBuyerLeadMessageInput,
23
+ GetBuyerInvoices200Response,
23
24
  GetBuyerLeads200Response,
24
25
  GetBuyerTransfers200Response,
25
26
  LeadDto,
@@ -42,6 +43,8 @@ import {
42
43
  BuyerUserDtoToJSON,
43
44
  CreateBuyerLeadMessageInputFromJSON,
44
45
  CreateBuyerLeadMessageInputToJSON,
46
+ GetBuyerInvoices200ResponseFromJSON,
47
+ GetBuyerInvoices200ResponseToJSON,
45
48
  GetBuyerLeads200ResponseFromJSON,
46
49
  GetBuyerLeads200ResponseToJSON,
47
50
  GetBuyerTransfers200ResponseFromJSON,
@@ -78,6 +81,17 @@ export interface BuyersApiCreateBuyerLeadMessageRequest {
78
81
  createBuyerLeadMessageInput: CreateBuyerLeadMessageInput;
79
82
  }
80
83
 
84
+ export interface BuyersApiDownloadBuyerInvoiceRequest {
85
+ invoiceId: string;
86
+ }
87
+
88
+ export interface BuyersApiGetBuyerInvoicesRequest {
89
+ filter?: object;
90
+ page?: number;
91
+ limit?: number;
92
+ sortBy?: Array<string>;
93
+ }
94
+
81
95
  export interface BuyersApiGetBuyerLeadRequest {
82
96
  leadId: string;
83
97
  }
@@ -298,6 +312,97 @@ export class BuyersApi extends runtime.BaseAPI {
298
312
  return await response.value();
299
313
  }
300
314
 
315
+ /**
316
+ *
317
+ */
318
+ async downloadBuyerInvoiceRaw(requestParameters: BuyersApiDownloadBuyerInvoiceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Blob>> {
319
+ if (requestParameters['invoiceId'] == null) {
320
+ throw new runtime.RequiredError(
321
+ 'invoiceId',
322
+ 'Required parameter "invoiceId" was null or undefined when calling downloadBuyerInvoice().'
323
+ );
324
+ }
325
+
326
+ const queryParameters: any = {};
327
+
328
+ const headerParameters: runtime.HTTPHeaders = {};
329
+
330
+ if (this.configuration && this.configuration.accessToken) {
331
+ const token = this.configuration.accessToken;
332
+ const tokenString = await token("bearer", []);
333
+
334
+ if (tokenString) {
335
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
336
+ }
337
+ }
338
+ const response = await this.request({
339
+ path: `/buyers/private/invoices/{invoiceId}/download`.replace(`{${"invoiceId"}}`, encodeURIComponent(String(requestParameters['invoiceId']))),
340
+ method: 'GET',
341
+ headers: headerParameters,
342
+ query: queryParameters,
343
+ }, initOverrides);
344
+
345
+ return new runtime.BlobApiResponse(response);
346
+ }
347
+
348
+ /**
349
+ *
350
+ */
351
+ async downloadBuyerInvoice(requestParameters: BuyersApiDownloadBuyerInvoiceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob> {
352
+ const response = await this.downloadBuyerInvoiceRaw(requestParameters, initOverrides);
353
+ return await response.value();
354
+ }
355
+
356
+ /**
357
+ *
358
+ */
359
+ async getBuyerInvoicesRaw(requestParameters: BuyersApiGetBuyerInvoicesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetBuyerInvoices200Response>> {
360
+ const queryParameters: any = {};
361
+
362
+ if (requestParameters['filter'] != null) {
363
+ queryParameters['filter'] = requestParameters['filter'];
364
+ }
365
+
366
+ if (requestParameters['page'] != null) {
367
+ queryParameters['page'] = requestParameters['page'];
368
+ }
369
+
370
+ if (requestParameters['limit'] != null) {
371
+ queryParameters['limit'] = requestParameters['limit'];
372
+ }
373
+
374
+ if (requestParameters['sortBy'] != null) {
375
+ queryParameters['sortBy'] = requestParameters['sortBy'];
376
+ }
377
+
378
+ const headerParameters: runtime.HTTPHeaders = {};
379
+
380
+ if (this.configuration && this.configuration.accessToken) {
381
+ const token = this.configuration.accessToken;
382
+ const tokenString = await token("bearer", []);
383
+
384
+ if (tokenString) {
385
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
386
+ }
387
+ }
388
+ const response = await this.request({
389
+ path: `/buyers/private/invoices`,
390
+ method: 'GET',
391
+ headers: headerParameters,
392
+ query: queryParameters,
393
+ }, initOverrides);
394
+
395
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetBuyerInvoices200ResponseFromJSON(jsonValue));
396
+ }
397
+
398
+ /**
399
+ *
400
+ */
401
+ async getBuyerInvoices(requestParameters: BuyersApiGetBuyerInvoicesRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetBuyerInvoices200Response> {
402
+ const response = await this.getBuyerInvoicesRaw(requestParameters, initOverrides);
403
+ return await response.value();
404
+ }
405
+
301
406
  /**
302
407
  *
303
408
  */
@@ -0,0 +1,98 @@
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 { mapValues } from '../runtime';
16
+ import type { PaginateResponseLinks } from './PaginateResponseLinks';
17
+ import {
18
+ PaginateResponseLinksFromJSON,
19
+ PaginateResponseLinksFromJSONTyped,
20
+ PaginateResponseLinksToJSON,
21
+ } from './PaginateResponseLinks';
22
+ import type { InvoiceDto } from './InvoiceDto';
23
+ import {
24
+ InvoiceDtoFromJSON,
25
+ InvoiceDtoFromJSONTyped,
26
+ InvoiceDtoToJSON,
27
+ } from './InvoiceDto';
28
+ import type { PaginateResponseMeta } from './PaginateResponseMeta';
29
+ import {
30
+ PaginateResponseMetaFromJSON,
31
+ PaginateResponseMetaFromJSONTyped,
32
+ PaginateResponseMetaToJSON,
33
+ } from './PaginateResponseMeta';
34
+
35
+ /**
36
+ *
37
+ * @export
38
+ * @interface GetBuyerInvoices200Response
39
+ */
40
+ export interface GetBuyerInvoices200Response {
41
+ /**
42
+ *
43
+ * @type {Array<InvoiceDto>}
44
+ * @memberof GetBuyerInvoices200Response
45
+ */
46
+ data: Array<InvoiceDto>;
47
+ /**
48
+ *
49
+ * @type {PaginateResponseMeta}
50
+ * @memberof GetBuyerInvoices200Response
51
+ */
52
+ meta: PaginateResponseMeta;
53
+ /**
54
+ *
55
+ * @type {PaginateResponseLinks}
56
+ * @memberof GetBuyerInvoices200Response
57
+ */
58
+ links: PaginateResponseLinks;
59
+ }
60
+
61
+ /**
62
+ * Check if a given object implements the GetBuyerInvoices200Response interface.
63
+ */
64
+ export function instanceOfGetBuyerInvoices200Response(value: object): value is GetBuyerInvoices200Response {
65
+ if (!('data' in value) || value['data'] === undefined) return false;
66
+ if (!('meta' in value) || value['meta'] === undefined) return false;
67
+ if (!('links' in value) || value['links'] === undefined) return false;
68
+ return true;
69
+ }
70
+
71
+ export function GetBuyerInvoices200ResponseFromJSON(json: any): GetBuyerInvoices200Response {
72
+ return GetBuyerInvoices200ResponseFromJSONTyped(json, false);
73
+ }
74
+
75
+ export function GetBuyerInvoices200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetBuyerInvoices200Response {
76
+ if (json == null) {
77
+ return json;
78
+ }
79
+ return {
80
+
81
+ 'data': ((json['data'] as Array<any>).map(InvoiceDtoFromJSON)),
82
+ 'meta': PaginateResponseMetaFromJSON(json['meta']),
83
+ 'links': PaginateResponseLinksFromJSON(json['links']),
84
+ };
85
+ }
86
+
87
+ export function GetBuyerInvoices200ResponseToJSON(value?: GetBuyerInvoices200Response | null): any {
88
+ if (value == null) {
89
+ return value;
90
+ }
91
+ return {
92
+
93
+ 'data': ((value['data'] as Array<any>).map(InvoiceDtoToJSON)),
94
+ 'meta': PaginateResponseMetaToJSON(value['meta']),
95
+ 'links': PaginateResponseLinksToJSON(value['links']),
96
+ };
97
+ }
98
+
@@ -0,0 +1,70 @@
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 { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface InvoiceDomainDto
20
+ */
21
+ export interface InvoiceDomainDto {
22
+ /**
23
+ *
24
+ * @type {object}
25
+ * @memberof InvoiceDomainDto
26
+ */
27
+ id: object;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof InvoiceDomainDto
32
+ */
33
+ name: string;
34
+ }
35
+
36
+ /**
37
+ * Check if a given object implements the InvoiceDomainDto interface.
38
+ */
39
+ export function instanceOfInvoiceDomainDto(value: object): value is InvoiceDomainDto {
40
+ if (!('id' in value) || value['id'] === undefined) return false;
41
+ if (!('name' in value) || value['name'] === undefined) return false;
42
+ return true;
43
+ }
44
+
45
+ export function InvoiceDomainDtoFromJSON(json: any): InvoiceDomainDto {
46
+ return InvoiceDomainDtoFromJSONTyped(json, false);
47
+ }
48
+
49
+ export function InvoiceDomainDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): InvoiceDomainDto {
50
+ if (json == null) {
51
+ return json;
52
+ }
53
+ return {
54
+
55
+ 'id': json['id'],
56
+ 'name': json['name'],
57
+ };
58
+ }
59
+
60
+ export function InvoiceDomainDtoToJSON(value?: InvoiceDomainDto | null): any {
61
+ if (value == null) {
62
+ return value;
63
+ }
64
+ return {
65
+
66
+ 'id': value['id'],
67
+ 'name': value['name'],
68
+ };
69
+ }
70
+
@@ -0,0 +1,86 @@
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 { mapValues } from '../runtime';
16
+ import type { InvoiceDomainDto } from './InvoiceDomainDto';
17
+ import {
18
+ InvoiceDomainDtoFromJSON,
19
+ InvoiceDomainDtoFromJSONTyped,
20
+ InvoiceDomainDtoToJSON,
21
+ } from './InvoiceDomainDto';
22
+
23
+ /**
24
+ *
25
+ * @export
26
+ * @interface InvoiceDto
27
+ */
28
+ export interface InvoiceDto {
29
+ /**
30
+ *
31
+ * @type {object}
32
+ * @memberof InvoiceDto
33
+ */
34
+ id: object;
35
+ /**
36
+ *
37
+ * @type {InvoiceDomainDto}
38
+ * @memberof InvoiceDto
39
+ */
40
+ domain: InvoiceDomainDto;
41
+ /**
42
+ *
43
+ * @type {Date}
44
+ * @memberof InvoiceDto
45
+ */
46
+ date: Date;
47
+ }
48
+
49
+ /**
50
+ * Check if a given object implements the InvoiceDto interface.
51
+ */
52
+ export function instanceOfInvoiceDto(value: object): value is InvoiceDto {
53
+ if (!('id' in value) || value['id'] === undefined) return false;
54
+ if (!('domain' in value) || value['domain'] === undefined) return false;
55
+ if (!('date' in value) || value['date'] === undefined) return false;
56
+ return true;
57
+ }
58
+
59
+ export function InvoiceDtoFromJSON(json: any): InvoiceDto {
60
+ return InvoiceDtoFromJSONTyped(json, false);
61
+ }
62
+
63
+ export function InvoiceDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): InvoiceDto {
64
+ if (json == null) {
65
+ return json;
66
+ }
67
+ return {
68
+
69
+ 'id': json['id'],
70
+ 'domain': InvoiceDomainDtoFromJSON(json['domain']),
71
+ 'date': (new Date(json['date'])),
72
+ };
73
+ }
74
+
75
+ export function InvoiceDtoToJSON(value?: InvoiceDto | null): any {
76
+ if (value == null) {
77
+ return value;
78
+ }
79
+ return {
80
+
81
+ 'id': value['id'],
82
+ 'domain': InvoiceDomainDtoToJSON(value['domain']),
83
+ 'date': ((value['date']).toISOString()),
84
+ };
85
+ }
86
+
@@ -45,6 +45,7 @@ export * from './DomainTransferOrderDto';
45
45
  export * from './ForgotPasswordRequestInput';
46
46
  export * from './GetAllDomainTransfers200Response';
47
47
  export * from './GetAllOrders200Response';
48
+ export * from './GetBuyerInvoices200Response';
48
49
  export * from './GetBuyerLeads200Response';
49
50
  export * from './GetBuyerTransfers200Response';
50
51
  export * from './HttpException';
@@ -55,6 +56,8 @@ export * from './IntersectionDomainDtoWithHijackerDtoWithAccountDto';
55
56
  export * from './IntersectionDomainSalesInformationDtoWithDomainStatsDto';
56
57
  export * from './IntersectionLeadDtoWithLeadDetailsDto';
57
58
  export * from './IntersectionLeadDtoWithListFieldsDto';
59
+ export * from './InvoiceDomainDto';
60
+ export * from './InvoiceDto';
58
61
  export * from './LeadDomainDto';
59
62
  export * from './LeadDto';
60
63
  export * from './LeadMessageData';