@randock/nameshift-api-client 0.0.124 → 0.0.126

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.
@@ -10,6 +10,7 @@ src/apis/BuyersApi.ts
10
10
  src/apis/BuyersPublicApi.ts
11
11
  src/apis/DomainsApi.ts
12
12
  src/apis/DomainsPublicApi.ts
13
+ src/apis/InvoicesApi.ts
13
14
  src/apis/LeadsApi.ts
14
15
  src/apis/LeadsPublicApi.ts
15
16
  src/apis/OrdersPublicApi.ts
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## @randock/nameshift-api-client@0.0.124
1
+ ## @randock/nameshift-api-client@0.0.126
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.124 --save
39
+ npm install @randock/nameshift-api-client@0.0.126 --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
- ad017e1fb0b376fd159bfcc5c24c9d8ced25e1d23f15e57a2657676fc39f9a6442e814222b3fed41ca2fc2d80581cfc8
47
+ 31f117e69ff4c8e44d70234ef5b7435691bf9503c63c65dd7983955d919c7cc658f0d61d552a799697689e1d58b787e3
@@ -0,0 +1,43 @@
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 { GetBuyerInvoices200Response } from '../models/index';
14
+ export interface InvoicesApiDownloadInvoiceRequest {
15
+ invoiceId: string;
16
+ }
17
+ export interface InvoicesApiGetInvoicesRequest {
18
+ filter?: object;
19
+ page?: number;
20
+ limit?: number;
21
+ sortBy?: Array<string>;
22
+ }
23
+ /**
24
+ *
25
+ */
26
+ export declare class InvoicesApi extends runtime.BaseAPI {
27
+ /**
28
+ *
29
+ */
30
+ downloadInvoiceRaw(requestParameters: InvoicesApiDownloadInvoiceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Blob>>;
31
+ /**
32
+ *
33
+ */
34
+ downloadInvoice(requestParameters: InvoicesApiDownloadInvoiceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob>;
35
+ /**
36
+ *
37
+ */
38
+ getInvoicesRaw(requestParameters: InvoicesApiGetInvoicesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetBuyerInvoices200Response>>;
39
+ /**
40
+ *
41
+ */
42
+ getInvoices(requestParameters?: InvoicesApiGetInvoicesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetBuyerInvoices200Response>;
43
+ }
@@ -0,0 +1,196 @@
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 = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
41
+ return g.next = verb(0), g["throw"] = verb(1), g["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.InvoicesApi = void 0;
68
+ var runtime = require("../runtime");
69
+ var index_1 = require("../models/index");
70
+ /**
71
+ *
72
+ */
73
+ var InvoicesApi = /** @class */ (function (_super) {
74
+ __extends(InvoicesApi, _super);
75
+ function InvoicesApi() {
76
+ return _super !== null && _super.apply(this, arguments) || this;
77
+ }
78
+ /**
79
+ *
80
+ */
81
+ InvoicesApi.prototype.downloadInvoiceRaw = 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['invoiceId'] == null) {
88
+ throw new runtime.RequiredError('invoiceId', 'Required parameter "invoiceId" was null or undefined when calling downloadInvoice().');
89
+ }
90
+ queryParameters = {};
91
+ headerParameters = {};
92
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
93
+ token = this.configuration.accessToken;
94
+ return [4 /*yield*/, token("bearer", [])];
95
+ case 1:
96
+ tokenString = _a.sent();
97
+ if (tokenString) {
98
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
99
+ }
100
+ _a.label = 2;
101
+ case 2: return [4 /*yield*/, this.request({
102
+ path: "/private/invoices/{invoiceId}/download".replace("{".concat("invoiceId", "}"), encodeURIComponent(String(requestParameters['invoiceId']))),
103
+ method: 'GET',
104
+ headers: headerParameters,
105
+ query: queryParameters,
106
+ }, initOverrides)];
107
+ case 3:
108
+ response = _a.sent();
109
+ return [2 /*return*/, new runtime.BlobApiResponse(response)];
110
+ }
111
+ });
112
+ });
113
+ };
114
+ /**
115
+ *
116
+ */
117
+ InvoicesApi.prototype.downloadInvoice = function (requestParameters, initOverrides) {
118
+ return __awaiter(this, void 0, void 0, function () {
119
+ var response;
120
+ return __generator(this, function (_a) {
121
+ switch (_a.label) {
122
+ case 0: return [4 /*yield*/, this.downloadInvoiceRaw(requestParameters, initOverrides)];
123
+ case 1:
124
+ response = _a.sent();
125
+ return [4 /*yield*/, response.value()];
126
+ case 2: return [2 /*return*/, _a.sent()];
127
+ }
128
+ });
129
+ });
130
+ };
131
+ /**
132
+ *
133
+ */
134
+ InvoicesApi.prototype.getInvoicesRaw = function (requestParameters, initOverrides) {
135
+ return __awaiter(this, void 0, void 0, function () {
136
+ var queryParameters, headerParameters, token, tokenString, response;
137
+ return __generator(this, function (_a) {
138
+ switch (_a.label) {
139
+ case 0:
140
+ queryParameters = {};
141
+ if (requestParameters['filter'] != null) {
142
+ queryParameters['filter'] = requestParameters['filter'];
143
+ }
144
+ if (requestParameters['page'] != null) {
145
+ queryParameters['page'] = requestParameters['page'];
146
+ }
147
+ if (requestParameters['limit'] != null) {
148
+ queryParameters['limit'] = requestParameters['limit'];
149
+ }
150
+ if (requestParameters['sortBy'] != null) {
151
+ queryParameters['sortBy'] = requestParameters['sortBy'];
152
+ }
153
+ headerParameters = {};
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: "/private/invoices",
165
+ method: 'GET',
166
+ headers: headerParameters,
167
+ query: queryParameters,
168
+ }, initOverrides)];
169
+ case 3:
170
+ response = _a.sent();
171
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.GetBuyerInvoices200ResponseFromJSON)(jsonValue); })];
172
+ }
173
+ });
174
+ });
175
+ };
176
+ /**
177
+ *
178
+ */
179
+ InvoicesApi.prototype.getInvoices = function () {
180
+ return __awaiter(this, arguments, void 0, function (requestParameters, initOverrides) {
181
+ var response;
182
+ if (requestParameters === void 0) { requestParameters = {}; }
183
+ return __generator(this, function (_a) {
184
+ switch (_a.label) {
185
+ case 0: return [4 /*yield*/, this.getInvoicesRaw(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
+ return InvoicesApi;
195
+ }(runtime.BaseAPI));
196
+ exports.InvoicesApi = InvoicesApi;
@@ -5,6 +5,7 @@ export * from './BuyersApi';
5
5
  export * from './BuyersPublicApi';
6
6
  export * from './DomainsApi';
7
7
  export * from './DomainsPublicApi';
8
+ export * from './InvoicesApi';
8
9
  export * from './LeadsApi';
9
10
  export * from './LeadsPublicApi';
10
11
  export * from './OrdersPublicApi';
@@ -23,6 +23,7 @@ __exportStar(require("./BuyersApi"), exports);
23
23
  __exportStar(require("./BuyersPublicApi"), exports);
24
24
  __exportStar(require("./DomainsApi"), exports);
25
25
  __exportStar(require("./DomainsPublicApi"), exports);
26
+ __exportStar(require("./InvoicesApi"), exports);
26
27
  __exportStar(require("./LeadsApi"), exports);
27
28
  __exportStar(require("./LeadsPublicApi"), exports);
28
29
  __exportStar(require("./OrdersPublicApi"), exports);
@@ -22,6 +22,12 @@ export interface InvoiceDto {
22
22
  * @memberof InvoiceDto
23
23
  */
24
24
  id: object;
25
+ /**
26
+ *
27
+ * @type {string}
28
+ * @memberof InvoiceDto
29
+ */
30
+ invoiceNumber: string | null;
25
31
  /**
26
32
  *
27
33
  * @type {InvoiceDomainDto}
@@ -25,6 +25,8 @@ var InvoiceDomainDto_1 = require("./InvoiceDomainDto");
25
25
  function instanceOfInvoiceDto(value) {
26
26
  if (!('id' in value) || value['id'] === undefined)
27
27
  return false;
28
+ if (!('invoiceNumber' in value) || value['invoiceNumber'] === undefined)
29
+ return false;
28
30
  if (!('domain' in value) || value['domain'] === undefined)
29
31
  return false;
30
32
  if (!('date' in value) || value['date'] === undefined)
@@ -40,6 +42,7 @@ function InvoiceDtoFromJSONTyped(json, ignoreDiscriminator) {
40
42
  }
41
43
  return {
42
44
  'id': json['id'],
45
+ 'invoiceNumber': json['invoiceNumber'],
43
46
  'domain': (0, InvoiceDomainDto_1.InvoiceDomainDtoFromJSON)(json['domain']),
44
47
  'date': (new Date(json['date'])),
45
48
  };
@@ -54,6 +57,7 @@ function InvoiceDtoToJSONTyped(value, ignoreDiscriminator) {
54
57
  }
55
58
  return {
56
59
  'id': value['id'],
60
+ 'invoiceNumber': value['invoiceNumber'],
57
61
  'domain': (0, InvoiceDomainDto_1.InvoiceDomainDtoToJSON)(value['domain']),
58
62
  'date': ((value['date']).toISOString()),
59
63
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@randock/nameshift-api-client",
3
- "version": "0.0.124",
3
+ "version": "0.0.126",
4
4
  "description": "OpenAPI client for @randock/nameshift-api-client",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -0,0 +1,138 @@
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
+
16
+ import * as runtime from '../runtime';
17
+ import type {
18
+ GetBuyerInvoices200Response,
19
+ ThrottlerException,
20
+ ValidationException,
21
+ } from '../models/index';
22
+ import {
23
+ GetBuyerInvoices200ResponseFromJSON,
24
+ GetBuyerInvoices200ResponseToJSON,
25
+ ThrottlerExceptionFromJSON,
26
+ ThrottlerExceptionToJSON,
27
+ ValidationExceptionFromJSON,
28
+ ValidationExceptionToJSON,
29
+ } from '../models/index';
30
+
31
+ export interface InvoicesApiDownloadInvoiceRequest {
32
+ invoiceId: string;
33
+ }
34
+
35
+ export interface InvoicesApiGetInvoicesRequest {
36
+ filter?: object;
37
+ page?: number;
38
+ limit?: number;
39
+ sortBy?: Array<string>;
40
+ }
41
+
42
+ /**
43
+ *
44
+ */
45
+ export class InvoicesApi extends runtime.BaseAPI {
46
+
47
+ /**
48
+ *
49
+ */
50
+ async downloadInvoiceRaw(requestParameters: InvoicesApiDownloadInvoiceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Blob>> {
51
+ if (requestParameters['invoiceId'] == null) {
52
+ throw new runtime.RequiredError(
53
+ 'invoiceId',
54
+ 'Required parameter "invoiceId" was null or undefined when calling downloadInvoice().'
55
+ );
56
+ }
57
+
58
+ const queryParameters: any = {};
59
+
60
+ const headerParameters: runtime.HTTPHeaders = {};
61
+
62
+ if (this.configuration && this.configuration.accessToken) {
63
+ const token = this.configuration.accessToken;
64
+ const tokenString = await token("bearer", []);
65
+
66
+ if (tokenString) {
67
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
68
+ }
69
+ }
70
+ const response = await this.request({
71
+ path: `/private/invoices/{invoiceId}/download`.replace(`{${"invoiceId"}}`, encodeURIComponent(String(requestParameters['invoiceId']))),
72
+ method: 'GET',
73
+ headers: headerParameters,
74
+ query: queryParameters,
75
+ }, initOverrides);
76
+
77
+ return new runtime.BlobApiResponse(response);
78
+ }
79
+
80
+ /**
81
+ *
82
+ */
83
+ async downloadInvoice(requestParameters: InvoicesApiDownloadInvoiceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob> {
84
+ const response = await this.downloadInvoiceRaw(requestParameters, initOverrides);
85
+ return await response.value();
86
+ }
87
+
88
+ /**
89
+ *
90
+ */
91
+ async getInvoicesRaw(requestParameters: InvoicesApiGetInvoicesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetBuyerInvoices200Response>> {
92
+ const queryParameters: any = {};
93
+
94
+ if (requestParameters['filter'] != null) {
95
+ queryParameters['filter'] = requestParameters['filter'];
96
+ }
97
+
98
+ if (requestParameters['page'] != null) {
99
+ queryParameters['page'] = requestParameters['page'];
100
+ }
101
+
102
+ if (requestParameters['limit'] != null) {
103
+ queryParameters['limit'] = requestParameters['limit'];
104
+ }
105
+
106
+ if (requestParameters['sortBy'] != null) {
107
+ queryParameters['sortBy'] = requestParameters['sortBy'];
108
+ }
109
+
110
+ const headerParameters: runtime.HTTPHeaders = {};
111
+
112
+ if (this.configuration && this.configuration.accessToken) {
113
+ const token = this.configuration.accessToken;
114
+ const tokenString = await token("bearer", []);
115
+
116
+ if (tokenString) {
117
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
118
+ }
119
+ }
120
+ const response = await this.request({
121
+ path: `/private/invoices`,
122
+ method: 'GET',
123
+ headers: headerParameters,
124
+ query: queryParameters,
125
+ }, initOverrides);
126
+
127
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetBuyerInvoices200ResponseFromJSON(jsonValue));
128
+ }
129
+
130
+ /**
131
+ *
132
+ */
133
+ async getInvoices(requestParameters: InvoicesApiGetInvoicesRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetBuyerInvoices200Response> {
134
+ const response = await this.getInvoicesRaw(requestParameters, initOverrides);
135
+ return await response.value();
136
+ }
137
+
138
+ }
package/src/apis/index.ts CHANGED
@@ -7,6 +7,7 @@ export * from './BuyersApi';
7
7
  export * from './BuyersPublicApi';
8
8
  export * from './DomainsApi';
9
9
  export * from './DomainsPublicApi';
10
+ export * from './InvoicesApi';
10
11
  export * from './LeadsApi';
11
12
  export * from './LeadsPublicApi';
12
13
  export * from './OrdersPublicApi';
@@ -33,6 +33,12 @@ export interface InvoiceDto {
33
33
  * @memberof InvoiceDto
34
34
  */
35
35
  id: object;
36
+ /**
37
+ *
38
+ * @type {string}
39
+ * @memberof InvoiceDto
40
+ */
41
+ invoiceNumber: string | null;
36
42
  /**
37
43
  *
38
44
  * @type {InvoiceDomainDto}
@@ -52,6 +58,7 @@ export interface InvoiceDto {
52
58
  */
53
59
  export function instanceOfInvoiceDto(value: object): value is InvoiceDto {
54
60
  if (!('id' in value) || value['id'] === undefined) return false;
61
+ if (!('invoiceNumber' in value) || value['invoiceNumber'] === undefined) return false;
55
62
  if (!('domain' in value) || value['domain'] === undefined) return false;
56
63
  if (!('date' in value) || value['date'] === undefined) return false;
57
64
  return true;
@@ -68,6 +75,7 @@ export function InvoiceDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean)
68
75
  return {
69
76
 
70
77
  'id': json['id'],
78
+ 'invoiceNumber': json['invoiceNumber'],
71
79
  'domain': InvoiceDomainDtoFromJSON(json['domain']),
72
80
  'date': (new Date(json['date'])),
73
81
  };
@@ -85,6 +93,7 @@ export function InvoiceDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean)
85
93
  return {
86
94
 
87
95
  'id': value['id'],
96
+ 'invoiceNumber': value['invoiceNumber'],
88
97
  'domain': InvoiceDomainDtoToJSON(value['domain']),
89
98
  'date': ((value['date']).toISOString()),
90
99
  };