@randock/nameshift-api-client 0.0.22 → 0.0.23

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.
@@ -6,6 +6,7 @@ package.json
6
6
  src/apis/AccountsApi.ts
7
7
  src/apis/AdminApi.ts
8
8
  src/apis/AuthApi.ts
9
+ src/apis/DashboardApi.ts
9
10
  src/apis/DomainsApi.ts
10
11
  src/apis/DomainsPublicApi.ts
11
12
  src/apis/LeadsApi.ts
@@ -21,6 +22,7 @@ src/models/BatchUpdate404Response.ts
21
22
  src/models/BatchUpdateDomainsInput.ts
22
23
  src/models/CreateLeadInput.ts
23
24
  src/models/CreateLeadMessageInput.ts
25
+ src/models/DashboardStatsDto.ts
24
26
  src/models/DeleteDomainsInput.ts
25
27
  src/models/DomainDto.ts
26
28
  src/models/DomainSalesInformationDto.ts
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## @randock/nameshift-api-client@0.0.22
1
+ ## @randock/nameshift-api-client@0.0.23
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.22 --save
39
+ npm install @randock/nameshift-api-client@0.0.23 --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
- 880a4211a2b79de85cf58b2819c91e32411338c62a527b19d4ce79fa9a0768b701dd82b355b73adb063932fca6c66f12
47
+ 435ed382baac40796cb073264b1d9675be955b662d65434fcdf5b3a9e36350682fac2a3da9648f7411b8908839ff3f7d
@@ -0,0 +1,26 @@
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 { DashboardStatsDto } from '../models/index';
14
+ /**
15
+ *
16
+ */
17
+ export declare class DashboardApi extends runtime.BaseAPI {
18
+ /**
19
+ *
20
+ */
21
+ statsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DashboardStatsDto>>;
22
+ /**
23
+ *
24
+ */
25
+ stats(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DashboardStatsDto>;
26
+ }
@@ -0,0 +1,130 @@
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;
41
+ return g = { next: verb(0), "throw": verb(1), "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.DashboardApi = void 0;
68
+ var runtime = require("../runtime");
69
+ var index_1 = require("../models/index");
70
+ /**
71
+ *
72
+ */
73
+ var DashboardApi = /** @class */ (function (_super) {
74
+ __extends(DashboardApi, _super);
75
+ function DashboardApi() {
76
+ return _super !== null && _super.apply(this, arguments) || this;
77
+ }
78
+ /**
79
+ *
80
+ */
81
+ DashboardApi.prototype.statsRaw = function (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
+ queryParameters = {};
88
+ headerParameters = {};
89
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
90
+ token = this.configuration.accessToken;
91
+ return [4 /*yield*/, token("bearer", [])];
92
+ case 1:
93
+ tokenString = _a.sent();
94
+ if (tokenString) {
95
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
96
+ }
97
+ _a.label = 2;
98
+ case 2: return [4 /*yield*/, this.request({
99
+ path: "/dashboard/stats",
100
+ method: 'GET',
101
+ headers: headerParameters,
102
+ query: queryParameters,
103
+ }, initOverrides)];
104
+ case 3:
105
+ response = _a.sent();
106
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.DashboardStatsDtoFromJSON)(jsonValue); })];
107
+ }
108
+ });
109
+ });
110
+ };
111
+ /**
112
+ *
113
+ */
114
+ DashboardApi.prototype.stats = function (initOverrides) {
115
+ return __awaiter(this, void 0, void 0, function () {
116
+ var response;
117
+ return __generator(this, function (_a) {
118
+ switch (_a.label) {
119
+ case 0: return [4 /*yield*/, this.statsRaw(initOverrides)];
120
+ case 1:
121
+ response = _a.sent();
122
+ return [4 /*yield*/, response.value()];
123
+ case 2: return [2 /*return*/, _a.sent()];
124
+ }
125
+ });
126
+ });
127
+ };
128
+ return DashboardApi;
129
+ }(runtime.BaseAPI));
130
+ exports.DashboardApi = DashboardApi;
@@ -1,6 +1,7 @@
1
1
  export * from './AccountsApi';
2
2
  export * from './AdminApi';
3
3
  export * from './AuthApi';
4
+ export * from './DashboardApi';
4
5
  export * from './DomainsApi';
5
6
  export * from './DomainsPublicApi';
6
7
  export * from './LeadsApi';
@@ -19,6 +19,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
19
19
  __exportStar(require("./AccountsApi"), exports);
20
20
  __exportStar(require("./AdminApi"), exports);
21
21
  __exportStar(require("./AuthApi"), exports);
22
+ __exportStar(require("./DashboardApi"), exports);
22
23
  __exportStar(require("./DomainsApi"), exports);
23
24
  __exportStar(require("./DomainsPublicApi"), exports);
24
25
  __exportStar(require("./LeadsApi"), exports);
@@ -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
+ /**
13
+ *
14
+ * @export
15
+ * @interface DashboardStatsDto
16
+ */
17
+ export interface DashboardStatsDto {
18
+ /**
19
+ *
20
+ * @type {number}
21
+ * @memberof DashboardStatsDto
22
+ */
23
+ domains: number;
24
+ /**
25
+ *
26
+ * @type {number}
27
+ * @memberof DashboardStatsDto
28
+ */
29
+ leads: number;
30
+ /**
31
+ *
32
+ * @type {number}
33
+ * @memberof DashboardStatsDto
34
+ */
35
+ transactions: number;
36
+ }
37
+ /**
38
+ * Check if a given object implements the DashboardStatsDto interface.
39
+ */
40
+ export declare function instanceOfDashboardStatsDto(value: object): boolean;
41
+ export declare function DashboardStatsDtoFromJSON(json: any): DashboardStatsDto;
42
+ export declare function DashboardStatsDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): DashboardStatsDto;
43
+ export declare function DashboardStatsDtoToJSON(value?: DashboardStatsDto | 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.DashboardStatsDtoToJSON = exports.DashboardStatsDtoFromJSONTyped = exports.DashboardStatsDtoFromJSON = exports.instanceOfDashboardStatsDto = void 0;
17
+ /**
18
+ * Check if a given object implements the DashboardStatsDto interface.
19
+ */
20
+ function instanceOfDashboardStatsDto(value) {
21
+ if (!('domains' in value))
22
+ return false;
23
+ if (!('leads' in value))
24
+ return false;
25
+ if (!('transactions' in value))
26
+ return false;
27
+ return true;
28
+ }
29
+ exports.instanceOfDashboardStatsDto = instanceOfDashboardStatsDto;
30
+ function DashboardStatsDtoFromJSON(json) {
31
+ return DashboardStatsDtoFromJSONTyped(json, false);
32
+ }
33
+ exports.DashboardStatsDtoFromJSON = DashboardStatsDtoFromJSON;
34
+ function DashboardStatsDtoFromJSONTyped(json, ignoreDiscriminator) {
35
+ if (json == null) {
36
+ return json;
37
+ }
38
+ return {
39
+ 'domains': json['domains'],
40
+ 'leads': json['leads'],
41
+ 'transactions': json['transactions'],
42
+ };
43
+ }
44
+ exports.DashboardStatsDtoFromJSONTyped = DashboardStatsDtoFromJSONTyped;
45
+ function DashboardStatsDtoToJSON(value) {
46
+ if (value == null) {
47
+ return value;
48
+ }
49
+ return {
50
+ 'domains': value['domains'],
51
+ 'leads': value['leads'],
52
+ 'transactions': value['transactions'],
53
+ };
54
+ }
55
+ exports.DashboardStatsDtoToJSON = DashboardStatsDtoToJSON;
@@ -7,6 +7,7 @@ export * from './BatchUpdate404Response';
7
7
  export * from './BatchUpdateDomainsInput';
8
8
  export * from './CreateLeadInput';
9
9
  export * from './CreateLeadMessageInput';
10
+ export * from './DashboardStatsDto';
10
11
  export * from './DeleteDomainsInput';
11
12
  export * from './DomainDto';
12
13
  export * from './DomainSalesInformationDto';
@@ -25,6 +25,7 @@ __exportStar(require("./BatchUpdate404Response"), exports);
25
25
  __exportStar(require("./BatchUpdateDomainsInput"), exports);
26
26
  __exportStar(require("./CreateLeadInput"), exports);
27
27
  __exportStar(require("./CreateLeadMessageInput"), exports);
28
+ __exportStar(require("./DashboardStatsDto"), exports);
28
29
  __exportStar(require("./DeleteDomainsInput"), exports);
29
30
  __exportStar(require("./DomainDto"), exports);
30
31
  __exportStar(require("./DomainSalesInformationDto"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@randock/nameshift-api-client",
3
- "version": "0.0.22",
3
+ "version": "0.0.23",
4
4
  "description": "OpenAPI client for @randock/nameshift-api-client",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -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
+
16
+ import * as runtime from '../runtime';
17
+ import type {
18
+ DashboardStatsDto,
19
+ ListAccounts400Response,
20
+ ListAccounts429Response,
21
+ } from '../models/index';
22
+ import {
23
+ DashboardStatsDtoFromJSON,
24
+ DashboardStatsDtoToJSON,
25
+ ListAccounts400ResponseFromJSON,
26
+ ListAccounts400ResponseToJSON,
27
+ ListAccounts429ResponseFromJSON,
28
+ ListAccounts429ResponseToJSON,
29
+ } from '../models/index';
30
+
31
+ /**
32
+ *
33
+ */
34
+ export class DashboardApi extends runtime.BaseAPI {
35
+
36
+ /**
37
+ *
38
+ */
39
+ async statsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DashboardStatsDto>> {
40
+ const queryParameters: any = {};
41
+
42
+ const headerParameters: runtime.HTTPHeaders = {};
43
+
44
+ if (this.configuration && this.configuration.accessToken) {
45
+ const token = this.configuration.accessToken;
46
+ const tokenString = await token("bearer", []);
47
+
48
+ if (tokenString) {
49
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
50
+ }
51
+ }
52
+ const response = await this.request({
53
+ path: `/dashboard/stats`,
54
+ method: 'GET',
55
+ headers: headerParameters,
56
+ query: queryParameters,
57
+ }, initOverrides);
58
+
59
+ return new runtime.JSONApiResponse(response, (jsonValue) => DashboardStatsDtoFromJSON(jsonValue));
60
+ }
61
+
62
+ /**
63
+ *
64
+ */
65
+ async stats(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DashboardStatsDto> {
66
+ const response = await this.statsRaw(initOverrides);
67
+ return await response.value();
68
+ }
69
+
70
+ }
package/src/apis/index.ts CHANGED
@@ -3,6 +3,7 @@
3
3
  export * from './AccountsApi';
4
4
  export * from './AdminApi';
5
5
  export * from './AuthApi';
6
+ export * from './DashboardApi';
6
7
  export * from './DomainsApi';
7
8
  export * from './DomainsPublicApi';
8
9
  export * from './LeadsApi';
@@ -0,0 +1,79 @@
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 DashboardStatsDto
20
+ */
21
+ export interface DashboardStatsDto {
22
+ /**
23
+ *
24
+ * @type {number}
25
+ * @memberof DashboardStatsDto
26
+ */
27
+ domains: number;
28
+ /**
29
+ *
30
+ * @type {number}
31
+ * @memberof DashboardStatsDto
32
+ */
33
+ leads: number;
34
+ /**
35
+ *
36
+ * @type {number}
37
+ * @memberof DashboardStatsDto
38
+ */
39
+ transactions: number;
40
+ }
41
+
42
+ /**
43
+ * Check if a given object implements the DashboardStatsDto interface.
44
+ */
45
+ export function instanceOfDashboardStatsDto(value: object): boolean {
46
+ if (!('domains' in value)) return false;
47
+ if (!('leads' in value)) return false;
48
+ if (!('transactions' in value)) return false;
49
+ return true;
50
+ }
51
+
52
+ export function DashboardStatsDtoFromJSON(json: any): DashboardStatsDto {
53
+ return DashboardStatsDtoFromJSONTyped(json, false);
54
+ }
55
+
56
+ export function DashboardStatsDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): DashboardStatsDto {
57
+ if (json == null) {
58
+ return json;
59
+ }
60
+ return {
61
+
62
+ 'domains': json['domains'],
63
+ 'leads': json['leads'],
64
+ 'transactions': json['transactions'],
65
+ };
66
+ }
67
+
68
+ export function DashboardStatsDtoToJSON(value?: DashboardStatsDto | null): any {
69
+ if (value == null) {
70
+ return value;
71
+ }
72
+ return {
73
+
74
+ 'domains': value['domains'],
75
+ 'leads': value['leads'],
76
+ 'transactions': value['transactions'],
77
+ };
78
+ }
79
+
@@ -9,6 +9,7 @@ export * from './BatchUpdate404Response';
9
9
  export * from './BatchUpdateDomainsInput';
10
10
  export * from './CreateLeadInput';
11
11
  export * from './CreateLeadMessageInput';
12
+ export * from './DashboardStatsDto';
12
13
  export * from './DeleteDomainsInput';
13
14
  export * from './DomainDto';
14
15
  export * from './DomainSalesInformationDto';