@randock/nameshift-api-client 0.0.304 → 0.0.305

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.
@@ -249,6 +249,7 @@ src/models/SellerInvoiceDomainDto.ts
249
249
  src/models/SellerInvoiceDto.ts
250
250
  src/models/SellerInvoiceSellerAccountDto.ts
251
251
  src/models/SellerPendingPayoutsByCurrencyStatsItemDto.ts
252
+ src/models/SellerRemainingAndTotalLeaseToOwnByCurrencyStatsItemDto.ts
252
253
  src/models/SellerSalesCountStatsItemDto.ts
253
254
  src/models/SellerSecurityUserAccountDto.ts
254
255
  src/models/SellerSecurityUserDto.ts
@@ -256,6 +257,7 @@ src/models/SellerSubscriptionListItemDto.ts
256
257
  src/models/SellerSubscriptionListItemDtoDomainInformation.ts
257
258
  src/models/SellerTotalEarningsByCurrencyOverTimeStatsItemDto.ts
258
259
  src/models/SellerTotalEarningsByCurrencyStatsItemDto.ts
260
+ src/models/SellerTotalRentMonthlyIncomeByCurrencyStatsItemDto.ts
259
261
  src/models/SendAdminLeadAiPriceNegotiatorAgentChatMessageInput.ts
260
262
  src/models/SendAdminLeadAiPriceNegotiatorAgentChatMessageInputAiModel.ts
261
263
  src/models/SeoMetricsDto.ts
@@ -264,6 +266,7 @@ src/models/SetDomainTransferConfirmationInput.ts
264
266
  src/models/SetNewPasswordInput.ts
265
267
  src/models/SetPayoutProviderInput.ts
266
268
  src/models/SortDto.ts
269
+ src/models/StatsFilterInputDateRange.ts
267
270
  src/models/StoreBuyerLocaleInput.ts
268
271
  src/models/StoreUserLocaleInput.ts
269
272
  src/models/SubscriptionBillingPeriodicityDto.ts
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## @randock/nameshift-api-client@0.0.304
1
+ ## @randock/nameshift-api-client@0.0.305
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.304 --save
39
+ npm install @randock/nameshift-api-client@0.0.305 --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
- 242943c1d12d8bf8992766764607ae4209e3f1c7971c4e5c2a2e3634fad00f44bedc6229bdc97790b094ebdfc50c2848
47
+ 7be38143a61b2cd647ddd83a96830df50fa28469e9fab8b71021ff3e960fa96ef738a9939a86d9d9508053255e950557
@@ -10,14 +10,15 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { SellerPendingPayoutsByCurrencyStatsItemDto, SellerSalesCountStatsItemDto, SellerTotalEarningsByCurrencyOverTimeStatsItemDto, SellerTotalEarningsByCurrencyStatsItemDto } from '../models/index';
13
+ import type { SellerPendingPayoutsByCurrencyStatsItemDto, SellerRemainingAndTotalLeaseToOwnByCurrencyStatsItemDto, SellerSalesCountStatsItemDto, SellerTotalEarningsByCurrencyOverTimeStatsItemDto, SellerTotalEarningsByCurrencyStatsItemDto, SellerTotalRentMonthlyIncomeByCurrencyStatsItemDto } from '../models/index';
14
14
  export interface StatsApiGetSalesCountRequest {
15
- startDate: Date;
16
- endDate: Date;
15
+ dateRange?: any | null;
16
+ }
17
+ export interface StatsApiGetTotalEarningsByCurrencyRequest {
18
+ dateRange?: any | null;
17
19
  }
18
20
  export interface StatsApiGetTotalEarningsByCurrencyOverTimeRequest {
19
- startDate: Date;
20
- endDate: Date;
21
+ dateRange?: any | null;
21
22
  }
22
23
  /**
23
24
  *
@@ -31,6 +32,14 @@ export declare class StatsApi extends runtime.BaseAPI {
31
32
  *
32
33
  */
33
34
  getPendingPayoutsByCurrency(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<SellerPendingPayoutsByCurrencyStatsItemDto>>;
35
+ /**
36
+ *
37
+ */
38
+ getRemainingVsTotalLeaseToOwnByCurrencyRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<SellerRemainingAndTotalLeaseToOwnByCurrencyStatsItemDto>>>;
39
+ /**
40
+ *
41
+ */
42
+ getRemainingVsTotalLeaseToOwnByCurrency(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<SellerRemainingAndTotalLeaseToOwnByCurrencyStatsItemDto>>;
34
43
  /**
35
44
  *
36
45
  */
@@ -38,15 +47,15 @@ export declare class StatsApi extends runtime.BaseAPI {
38
47
  /**
39
48
  *
40
49
  */
41
- getSalesCount(requestParameters: StatsApiGetSalesCountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<SellerSalesCountStatsItemDto>>;
50
+ getSalesCount(requestParameters?: StatsApiGetSalesCountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<SellerSalesCountStatsItemDto>>;
42
51
  /**
43
52
  *
44
53
  */
45
- getTotalEarningsByCurrencyRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<SellerTotalEarningsByCurrencyStatsItemDto>>>;
54
+ getTotalEarningsByCurrencyRaw(requestParameters: StatsApiGetTotalEarningsByCurrencyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<SellerTotalEarningsByCurrencyStatsItemDto>>>;
46
55
  /**
47
56
  *
48
57
  */
49
- getTotalEarningsByCurrency(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<SellerTotalEarningsByCurrencyStatsItemDto>>;
58
+ getTotalEarningsByCurrency(requestParameters?: StatsApiGetTotalEarningsByCurrencyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<SellerTotalEarningsByCurrencyStatsItemDto>>;
50
59
  /**
51
60
  *
52
61
  */
@@ -54,5 +63,13 @@ export declare class StatsApi extends runtime.BaseAPI {
54
63
  /**
55
64
  *
56
65
  */
57
- getTotalEarningsByCurrencyOverTime(requestParameters: StatsApiGetTotalEarningsByCurrencyOverTimeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<SellerTotalEarningsByCurrencyOverTimeStatsItemDto>>;
66
+ getTotalEarningsByCurrencyOverTime(requestParameters?: StatsApiGetTotalEarningsByCurrencyOverTimeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<SellerTotalEarningsByCurrencyOverTimeStatsItemDto>>;
67
+ /**
68
+ *
69
+ */
70
+ getTotalMonthlyRentIncomeByCurrencyRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<SellerTotalRentMonthlyIncomeByCurrencyStatsItemDto>>>;
71
+ /**
72
+ *
73
+ */
74
+ getTotalMonthlyRentIncomeByCurrency(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<SellerTotalRentMonthlyIncomeByCurrencyStatsItemDto>>;
58
75
  }
@@ -128,24 +128,65 @@ var StatsApi = /** @class */ (function (_super) {
128
128
  /**
129
129
  *
130
130
  */
131
- StatsApi.prototype.getSalesCountRaw = function (requestParameters, initOverrides) {
131
+ StatsApi.prototype.getRemainingVsTotalLeaseToOwnByCurrencyRaw = function (initOverrides) {
132
132
  return __awaiter(this, void 0, void 0, function () {
133
133
  var queryParameters, headerParameters, token, tokenString, response;
134
134
  return __generator(this, function (_a) {
135
135
  switch (_a.label) {
136
136
  case 0:
137
- if (requestParameters['startDate'] == null) {
138
- throw new runtime.RequiredError('startDate', 'Required parameter "startDate" was null or undefined when calling getSalesCount().');
139
- }
140
- if (requestParameters['endDate'] == null) {
141
- throw new runtime.RequiredError('endDate', 'Required parameter "endDate" was null or undefined when calling getSalesCount().');
142
- }
143
137
  queryParameters = {};
144
- if (requestParameters['startDate'] != null) {
145
- queryParameters['startDate'] = requestParameters['startDate'].toISOString();
138
+ headerParameters = {};
139
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
140
+ token = this.configuration.accessToken;
141
+ return [4 /*yield*/, token("bearer", [])];
142
+ case 1:
143
+ tokenString = _a.sent();
144
+ if (tokenString) {
145
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
146
146
  }
147
- if (requestParameters['endDate'] != null) {
148
- queryParameters['endDate'] = requestParameters['endDate'].toISOString();
147
+ _a.label = 2;
148
+ case 2: return [4 /*yield*/, this.request({
149
+ path: "/private/stats/remaining-vs-total-lease-to-own-by-currency",
150
+ method: 'GET',
151
+ headers: headerParameters,
152
+ query: queryParameters,
153
+ }, initOverrides)];
154
+ case 3:
155
+ response = _a.sent();
156
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return jsonValue.map(index_1.SellerRemainingAndTotalLeaseToOwnByCurrencyStatsItemDtoFromJSON); })];
157
+ }
158
+ });
159
+ });
160
+ };
161
+ /**
162
+ *
163
+ */
164
+ StatsApi.prototype.getRemainingVsTotalLeaseToOwnByCurrency = function (initOverrides) {
165
+ return __awaiter(this, void 0, void 0, function () {
166
+ var response;
167
+ return __generator(this, function (_a) {
168
+ switch (_a.label) {
169
+ case 0: return [4 /*yield*/, this.getRemainingVsTotalLeaseToOwnByCurrencyRaw(initOverrides)];
170
+ case 1:
171
+ response = _a.sent();
172
+ return [4 /*yield*/, response.value()];
173
+ case 2: return [2 /*return*/, _a.sent()];
174
+ }
175
+ });
176
+ });
177
+ };
178
+ /**
179
+ *
180
+ */
181
+ StatsApi.prototype.getSalesCountRaw = function (requestParameters, initOverrides) {
182
+ return __awaiter(this, void 0, void 0, function () {
183
+ var queryParameters, headerParameters, token, tokenString, response;
184
+ return __generator(this, function (_a) {
185
+ switch (_a.label) {
186
+ case 0:
187
+ queryParameters = {};
188
+ if (requestParameters['dateRange'] != null) {
189
+ queryParameters['dateRange'] = requestParameters['dateRange'];
149
190
  }
150
191
  headerParameters = {};
151
192
  if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
@@ -173,9 +214,10 @@ var StatsApi = /** @class */ (function (_super) {
173
214
  /**
174
215
  *
175
216
  */
176
- StatsApi.prototype.getSalesCount = function (requestParameters, initOverrides) {
177
- return __awaiter(this, void 0, void 0, function () {
217
+ StatsApi.prototype.getSalesCount = function () {
218
+ return __awaiter(this, arguments, void 0, function (requestParameters, initOverrides) {
178
219
  var response;
220
+ if (requestParameters === void 0) { requestParameters = {}; }
179
221
  return __generator(this, function (_a) {
180
222
  switch (_a.label) {
181
223
  case 0: return [4 /*yield*/, this.getSalesCountRaw(requestParameters, initOverrides)];
@@ -190,13 +232,16 @@ var StatsApi = /** @class */ (function (_super) {
190
232
  /**
191
233
  *
192
234
  */
193
- StatsApi.prototype.getTotalEarningsByCurrencyRaw = function (initOverrides) {
235
+ StatsApi.prototype.getTotalEarningsByCurrencyRaw = function (requestParameters, initOverrides) {
194
236
  return __awaiter(this, void 0, void 0, function () {
195
237
  var queryParameters, headerParameters, token, tokenString, response;
196
238
  return __generator(this, function (_a) {
197
239
  switch (_a.label) {
198
240
  case 0:
199
241
  queryParameters = {};
242
+ if (requestParameters['dateRange'] != null) {
243
+ queryParameters['dateRange'] = requestParameters['dateRange'];
244
+ }
200
245
  headerParameters = {};
201
246
  if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
202
247
  token = this.configuration.accessToken;
@@ -223,12 +268,13 @@ var StatsApi = /** @class */ (function (_super) {
223
268
  /**
224
269
  *
225
270
  */
226
- StatsApi.prototype.getTotalEarningsByCurrency = function (initOverrides) {
227
- return __awaiter(this, void 0, void 0, function () {
271
+ StatsApi.prototype.getTotalEarningsByCurrency = function () {
272
+ return __awaiter(this, arguments, void 0, function (requestParameters, initOverrides) {
228
273
  var response;
274
+ if (requestParameters === void 0) { requestParameters = {}; }
229
275
  return __generator(this, function (_a) {
230
276
  switch (_a.label) {
231
- case 0: return [4 /*yield*/, this.getTotalEarningsByCurrencyRaw(initOverrides)];
277
+ case 0: return [4 /*yield*/, this.getTotalEarningsByCurrencyRaw(requestParameters, initOverrides)];
232
278
  case 1:
233
279
  response = _a.sent();
234
280
  return [4 /*yield*/, response.value()];
@@ -246,18 +292,9 @@ var StatsApi = /** @class */ (function (_super) {
246
292
  return __generator(this, function (_a) {
247
293
  switch (_a.label) {
248
294
  case 0:
249
- if (requestParameters['startDate'] == null) {
250
- throw new runtime.RequiredError('startDate', 'Required parameter "startDate" was null or undefined when calling getTotalEarningsByCurrencyOverTime().');
251
- }
252
- if (requestParameters['endDate'] == null) {
253
- throw new runtime.RequiredError('endDate', 'Required parameter "endDate" was null or undefined when calling getTotalEarningsByCurrencyOverTime().');
254
- }
255
295
  queryParameters = {};
256
- if (requestParameters['startDate'] != null) {
257
- queryParameters['startDate'] = requestParameters['startDate'].toISOString();
258
- }
259
- if (requestParameters['endDate'] != null) {
260
- queryParameters['endDate'] = requestParameters['endDate'].toISOString();
296
+ if (requestParameters['dateRange'] != null) {
297
+ queryParameters['dateRange'] = requestParameters['dateRange'];
261
298
  }
262
299
  headerParameters = {};
263
300
  if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
@@ -285,9 +322,10 @@ var StatsApi = /** @class */ (function (_super) {
285
322
  /**
286
323
  *
287
324
  */
288
- StatsApi.prototype.getTotalEarningsByCurrencyOverTime = function (requestParameters, initOverrides) {
289
- return __awaiter(this, void 0, void 0, function () {
325
+ StatsApi.prototype.getTotalEarningsByCurrencyOverTime = function () {
326
+ return __awaiter(this, arguments, void 0, function (requestParameters, initOverrides) {
290
327
  var response;
328
+ if (requestParameters === void 0) { requestParameters = {}; }
291
329
  return __generator(this, function (_a) {
292
330
  switch (_a.label) {
293
331
  case 0: return [4 /*yield*/, this.getTotalEarningsByCurrencyOverTimeRaw(requestParameters, initOverrides)];
@@ -299,6 +337,56 @@ var StatsApi = /** @class */ (function (_super) {
299
337
  });
300
338
  });
301
339
  };
340
+ /**
341
+ *
342
+ */
343
+ StatsApi.prototype.getTotalMonthlyRentIncomeByCurrencyRaw = function (initOverrides) {
344
+ return __awaiter(this, void 0, void 0, function () {
345
+ var queryParameters, headerParameters, token, tokenString, response;
346
+ return __generator(this, function (_a) {
347
+ switch (_a.label) {
348
+ case 0:
349
+ queryParameters = {};
350
+ headerParameters = {};
351
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
352
+ token = this.configuration.accessToken;
353
+ return [4 /*yield*/, token("bearer", [])];
354
+ case 1:
355
+ tokenString = _a.sent();
356
+ if (tokenString) {
357
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
358
+ }
359
+ _a.label = 2;
360
+ case 2: return [4 /*yield*/, this.request({
361
+ path: "/private/stats/total-monthly-rent-income-by-currency",
362
+ method: 'GET',
363
+ headers: headerParameters,
364
+ query: queryParameters,
365
+ }, initOverrides)];
366
+ case 3:
367
+ response = _a.sent();
368
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return jsonValue.map(index_1.SellerTotalRentMonthlyIncomeByCurrencyStatsItemDtoFromJSON); })];
369
+ }
370
+ });
371
+ });
372
+ };
373
+ /**
374
+ *
375
+ */
376
+ StatsApi.prototype.getTotalMonthlyRentIncomeByCurrency = function (initOverrides) {
377
+ return __awaiter(this, void 0, void 0, function () {
378
+ var response;
379
+ return __generator(this, function (_a) {
380
+ switch (_a.label) {
381
+ case 0: return [4 /*yield*/, this.getTotalMonthlyRentIncomeByCurrencyRaw(initOverrides)];
382
+ case 1:
383
+ response = _a.sent();
384
+ return [4 /*yield*/, response.value()];
385
+ case 2: return [2 /*return*/, _a.sent()];
386
+ }
387
+ });
388
+ });
389
+ };
302
390
  return StatsApi;
303
391
  }(runtime.BaseAPI));
304
392
  exports.StatsApi = StatsApi;
@@ -0,0 +1,50 @@
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 SellerRemainingAndTotalLeaseToOwnByCurrencyStatsItemDto
16
+ */
17
+ export interface SellerRemainingAndTotalLeaseToOwnByCurrencyStatsItemDto {
18
+ /**
19
+ *
20
+ * @type {number}
21
+ * @memberof SellerRemainingAndTotalLeaseToOwnByCurrencyStatsItemDto
22
+ */
23
+ total: number;
24
+ /**
25
+ *
26
+ * @type {number}
27
+ * @memberof SellerRemainingAndTotalLeaseToOwnByCurrencyStatsItemDto
28
+ */
29
+ remaining: number;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof SellerRemainingAndTotalLeaseToOwnByCurrencyStatsItemDto
34
+ */
35
+ currency: string;
36
+ /**
37
+ *
38
+ * @type {number}
39
+ * @memberof SellerRemainingAndTotalLeaseToOwnByCurrencyStatsItemDto
40
+ */
41
+ count: number;
42
+ }
43
+ /**
44
+ * Check if a given object implements the SellerRemainingAndTotalLeaseToOwnByCurrencyStatsItemDto interface.
45
+ */
46
+ export declare function instanceOfSellerRemainingAndTotalLeaseToOwnByCurrencyStatsItemDto(value: object): value is SellerRemainingAndTotalLeaseToOwnByCurrencyStatsItemDto;
47
+ export declare function SellerRemainingAndTotalLeaseToOwnByCurrencyStatsItemDtoFromJSON(json: any): SellerRemainingAndTotalLeaseToOwnByCurrencyStatsItemDto;
48
+ export declare function SellerRemainingAndTotalLeaseToOwnByCurrencyStatsItemDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): SellerRemainingAndTotalLeaseToOwnByCurrencyStatsItemDto;
49
+ export declare function SellerRemainingAndTotalLeaseToOwnByCurrencyStatsItemDtoToJSON(json: any): SellerRemainingAndTotalLeaseToOwnByCurrencyStatsItemDto;
50
+ export declare function SellerRemainingAndTotalLeaseToOwnByCurrencyStatsItemDtoToJSONTyped(value?: SellerRemainingAndTotalLeaseToOwnByCurrencyStatsItemDto | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,63 @@
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.instanceOfSellerRemainingAndTotalLeaseToOwnByCurrencyStatsItemDto = instanceOfSellerRemainingAndTotalLeaseToOwnByCurrencyStatsItemDto;
17
+ exports.SellerRemainingAndTotalLeaseToOwnByCurrencyStatsItemDtoFromJSON = SellerRemainingAndTotalLeaseToOwnByCurrencyStatsItemDtoFromJSON;
18
+ exports.SellerRemainingAndTotalLeaseToOwnByCurrencyStatsItemDtoFromJSONTyped = SellerRemainingAndTotalLeaseToOwnByCurrencyStatsItemDtoFromJSONTyped;
19
+ exports.SellerRemainingAndTotalLeaseToOwnByCurrencyStatsItemDtoToJSON = SellerRemainingAndTotalLeaseToOwnByCurrencyStatsItemDtoToJSON;
20
+ exports.SellerRemainingAndTotalLeaseToOwnByCurrencyStatsItemDtoToJSONTyped = SellerRemainingAndTotalLeaseToOwnByCurrencyStatsItemDtoToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the SellerRemainingAndTotalLeaseToOwnByCurrencyStatsItemDto interface.
23
+ */
24
+ function instanceOfSellerRemainingAndTotalLeaseToOwnByCurrencyStatsItemDto(value) {
25
+ if (!('total' in value) || value['total'] === undefined)
26
+ return false;
27
+ if (!('remaining' in value) || value['remaining'] === undefined)
28
+ return false;
29
+ if (!('currency' in value) || value['currency'] === undefined)
30
+ return false;
31
+ if (!('count' in value) || value['count'] === undefined)
32
+ return false;
33
+ return true;
34
+ }
35
+ function SellerRemainingAndTotalLeaseToOwnByCurrencyStatsItemDtoFromJSON(json) {
36
+ return SellerRemainingAndTotalLeaseToOwnByCurrencyStatsItemDtoFromJSONTyped(json, false);
37
+ }
38
+ function SellerRemainingAndTotalLeaseToOwnByCurrencyStatsItemDtoFromJSONTyped(json, ignoreDiscriminator) {
39
+ if (json == null) {
40
+ return json;
41
+ }
42
+ return {
43
+ 'total': json['total'],
44
+ 'remaining': json['remaining'],
45
+ 'currency': json['currency'],
46
+ 'count': json['count'],
47
+ };
48
+ }
49
+ function SellerRemainingAndTotalLeaseToOwnByCurrencyStatsItemDtoToJSON(json) {
50
+ return SellerRemainingAndTotalLeaseToOwnByCurrencyStatsItemDtoToJSONTyped(json, false);
51
+ }
52
+ function SellerRemainingAndTotalLeaseToOwnByCurrencyStatsItemDtoToJSONTyped(value, ignoreDiscriminator) {
53
+ if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
54
+ if (value == null) {
55
+ return value;
56
+ }
57
+ return {
58
+ 'total': value['total'],
59
+ 'remaining': value['remaining'],
60
+ 'currency': value['currency'],
61
+ 'count': value['count'],
62
+ };
63
+ }
@@ -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
+ /**
13
+ *
14
+ * @export
15
+ * @interface SellerTotalRentMonthlyIncomeByCurrencyStatsItemDto
16
+ */
17
+ export interface SellerTotalRentMonthlyIncomeByCurrencyStatsItemDto {
18
+ /**
19
+ *
20
+ * @type {number}
21
+ * @memberof SellerTotalRentMonthlyIncomeByCurrencyStatsItemDto
22
+ */
23
+ total: number;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof SellerTotalRentMonthlyIncomeByCurrencyStatsItemDto
28
+ */
29
+ currency: string;
30
+ /**
31
+ *
32
+ * @type {number}
33
+ * @memberof SellerTotalRentMonthlyIncomeByCurrencyStatsItemDto
34
+ */
35
+ count: number;
36
+ }
37
+ /**
38
+ * Check if a given object implements the SellerTotalRentMonthlyIncomeByCurrencyStatsItemDto interface.
39
+ */
40
+ export declare function instanceOfSellerTotalRentMonthlyIncomeByCurrencyStatsItemDto(value: object): value is SellerTotalRentMonthlyIncomeByCurrencyStatsItemDto;
41
+ export declare function SellerTotalRentMonthlyIncomeByCurrencyStatsItemDtoFromJSON(json: any): SellerTotalRentMonthlyIncomeByCurrencyStatsItemDto;
42
+ export declare function SellerTotalRentMonthlyIncomeByCurrencyStatsItemDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): SellerTotalRentMonthlyIncomeByCurrencyStatsItemDto;
43
+ export declare function SellerTotalRentMonthlyIncomeByCurrencyStatsItemDtoToJSON(json: any): SellerTotalRentMonthlyIncomeByCurrencyStatsItemDto;
44
+ export declare function SellerTotalRentMonthlyIncomeByCurrencyStatsItemDtoToJSONTyped(value?: SellerTotalRentMonthlyIncomeByCurrencyStatsItemDto | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,59 @@
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.instanceOfSellerTotalRentMonthlyIncomeByCurrencyStatsItemDto = instanceOfSellerTotalRentMonthlyIncomeByCurrencyStatsItemDto;
17
+ exports.SellerTotalRentMonthlyIncomeByCurrencyStatsItemDtoFromJSON = SellerTotalRentMonthlyIncomeByCurrencyStatsItemDtoFromJSON;
18
+ exports.SellerTotalRentMonthlyIncomeByCurrencyStatsItemDtoFromJSONTyped = SellerTotalRentMonthlyIncomeByCurrencyStatsItemDtoFromJSONTyped;
19
+ exports.SellerTotalRentMonthlyIncomeByCurrencyStatsItemDtoToJSON = SellerTotalRentMonthlyIncomeByCurrencyStatsItemDtoToJSON;
20
+ exports.SellerTotalRentMonthlyIncomeByCurrencyStatsItemDtoToJSONTyped = SellerTotalRentMonthlyIncomeByCurrencyStatsItemDtoToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the SellerTotalRentMonthlyIncomeByCurrencyStatsItemDto interface.
23
+ */
24
+ function instanceOfSellerTotalRentMonthlyIncomeByCurrencyStatsItemDto(value) {
25
+ if (!('total' in value) || value['total'] === undefined)
26
+ return false;
27
+ if (!('currency' in value) || value['currency'] === undefined)
28
+ return false;
29
+ if (!('count' in value) || value['count'] === undefined)
30
+ return false;
31
+ return true;
32
+ }
33
+ function SellerTotalRentMonthlyIncomeByCurrencyStatsItemDtoFromJSON(json) {
34
+ return SellerTotalRentMonthlyIncomeByCurrencyStatsItemDtoFromJSONTyped(json, false);
35
+ }
36
+ function SellerTotalRentMonthlyIncomeByCurrencyStatsItemDtoFromJSONTyped(json, ignoreDiscriminator) {
37
+ if (json == null) {
38
+ return json;
39
+ }
40
+ return {
41
+ 'total': json['total'],
42
+ 'currency': json['currency'],
43
+ 'count': json['count'],
44
+ };
45
+ }
46
+ function SellerTotalRentMonthlyIncomeByCurrencyStatsItemDtoToJSON(json) {
47
+ return SellerTotalRentMonthlyIncomeByCurrencyStatsItemDtoToJSONTyped(json, false);
48
+ }
49
+ function SellerTotalRentMonthlyIncomeByCurrencyStatsItemDtoToJSONTyped(value, ignoreDiscriminator) {
50
+ if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
51
+ if (value == null) {
52
+ return value;
53
+ }
54
+ return {
55
+ 'total': value['total'],
56
+ 'currency': value['currency'],
57
+ 'count': value['count'],
58
+ };
59
+ }
@@ -0,0 +1,38 @@
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 StatsFilterInputDateRange
16
+ */
17
+ export interface StatsFilterInputDateRange {
18
+ /**
19
+ *
20
+ * @type {Date}
21
+ * @memberof StatsFilterInputDateRange
22
+ */
23
+ startDate: Date;
24
+ /**
25
+ *
26
+ * @type {Date}
27
+ * @memberof StatsFilterInputDateRange
28
+ */
29
+ endDate: Date;
30
+ }
31
+ /**
32
+ * Check if a given object implements the StatsFilterInputDateRange interface.
33
+ */
34
+ export declare function instanceOfStatsFilterInputDateRange(value: object): value is StatsFilterInputDateRange;
35
+ export declare function StatsFilterInputDateRangeFromJSON(json: any): StatsFilterInputDateRange;
36
+ export declare function StatsFilterInputDateRangeFromJSONTyped(json: any, ignoreDiscriminator: boolean): StatsFilterInputDateRange;
37
+ export declare function StatsFilterInputDateRangeToJSON(json: any): StatsFilterInputDateRange;
38
+ export declare function StatsFilterInputDateRangeToJSONTyped(value?: StatsFilterInputDateRange | null, ignoreDiscriminator?: boolean): 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.instanceOfStatsFilterInputDateRange = instanceOfStatsFilterInputDateRange;
17
+ exports.StatsFilterInputDateRangeFromJSON = StatsFilterInputDateRangeFromJSON;
18
+ exports.StatsFilterInputDateRangeFromJSONTyped = StatsFilterInputDateRangeFromJSONTyped;
19
+ exports.StatsFilterInputDateRangeToJSON = StatsFilterInputDateRangeToJSON;
20
+ exports.StatsFilterInputDateRangeToJSONTyped = StatsFilterInputDateRangeToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the StatsFilterInputDateRange interface.
23
+ */
24
+ function instanceOfStatsFilterInputDateRange(value) {
25
+ if (!('startDate' in value) || value['startDate'] === undefined)
26
+ return false;
27
+ if (!('endDate' in value) || value['endDate'] === undefined)
28
+ return false;
29
+ return true;
30
+ }
31
+ function StatsFilterInputDateRangeFromJSON(json) {
32
+ return StatsFilterInputDateRangeFromJSONTyped(json, false);
33
+ }
34
+ function StatsFilterInputDateRangeFromJSONTyped(json, ignoreDiscriminator) {
35
+ if (json == null) {
36
+ return json;
37
+ }
38
+ return {
39
+ 'startDate': (new Date(json['startDate'])),
40
+ 'endDate': (new Date(json['endDate'])),
41
+ };
42
+ }
43
+ function StatsFilterInputDateRangeToJSON(json) {
44
+ return StatsFilterInputDateRangeToJSONTyped(json, false);
45
+ }
46
+ function StatsFilterInputDateRangeToJSONTyped(value, ignoreDiscriminator) {
47
+ if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
48
+ if (value == null) {
49
+ return value;
50
+ }
51
+ return {
52
+ 'startDate': ((value['startDate']).toISOString()),
53
+ 'endDate': ((value['endDate']).toISOString()),
54
+ };
55
+ }
@@ -220,6 +220,7 @@ export * from './SellerInvoiceDomainDto';
220
220
  export * from './SellerInvoiceDto';
221
221
  export * from './SellerInvoiceSellerAccountDto';
222
222
  export * from './SellerPendingPayoutsByCurrencyStatsItemDto';
223
+ export * from './SellerRemainingAndTotalLeaseToOwnByCurrencyStatsItemDto';
223
224
  export * from './SellerSalesCountStatsItemDto';
224
225
  export * from './SellerSecurityUserAccountDto';
225
226
  export * from './SellerSecurityUserDto';
@@ -227,6 +228,7 @@ export * from './SellerSubscriptionListItemDto';
227
228
  export * from './SellerSubscriptionListItemDtoDomainInformation';
228
229
  export * from './SellerTotalEarningsByCurrencyOverTimeStatsItemDto';
229
230
  export * from './SellerTotalEarningsByCurrencyStatsItemDto';
231
+ export * from './SellerTotalRentMonthlyIncomeByCurrencyStatsItemDto';
230
232
  export * from './SendAdminLeadAiPriceNegotiatorAgentChatMessageInput';
231
233
  export * from './SendAdminLeadAiPriceNegotiatorAgentChatMessageInputAiModel';
232
234
  export * from './SeoMetricsDto';
@@ -235,6 +237,7 @@ export * from './SetDomainTransferConfirmationInput';
235
237
  export * from './SetNewPasswordInput';
236
238
  export * from './SetPayoutProviderInput';
237
239
  export * from './SortDto';
240
+ export * from './StatsFilterInputDateRange';
238
241
  export * from './StoreBuyerLocaleInput';
239
242
  export * from './StoreUserLocaleInput';
240
243
  export * from './SubscriptionBillingPeriodicityDto';
@@ -238,6 +238,7 @@ __exportStar(require("./SellerInvoiceDomainDto"), exports);
238
238
  __exportStar(require("./SellerInvoiceDto"), exports);
239
239
  __exportStar(require("./SellerInvoiceSellerAccountDto"), exports);
240
240
  __exportStar(require("./SellerPendingPayoutsByCurrencyStatsItemDto"), exports);
241
+ __exportStar(require("./SellerRemainingAndTotalLeaseToOwnByCurrencyStatsItemDto"), exports);
241
242
  __exportStar(require("./SellerSalesCountStatsItemDto"), exports);
242
243
  __exportStar(require("./SellerSecurityUserAccountDto"), exports);
243
244
  __exportStar(require("./SellerSecurityUserDto"), exports);
@@ -245,6 +246,7 @@ __exportStar(require("./SellerSubscriptionListItemDto"), exports);
245
246
  __exportStar(require("./SellerSubscriptionListItemDtoDomainInformation"), exports);
246
247
  __exportStar(require("./SellerTotalEarningsByCurrencyOverTimeStatsItemDto"), exports);
247
248
  __exportStar(require("./SellerTotalEarningsByCurrencyStatsItemDto"), exports);
249
+ __exportStar(require("./SellerTotalRentMonthlyIncomeByCurrencyStatsItemDto"), exports);
248
250
  __exportStar(require("./SendAdminLeadAiPriceNegotiatorAgentChatMessageInput"), exports);
249
251
  __exportStar(require("./SendAdminLeadAiPriceNegotiatorAgentChatMessageInputAiModel"), exports);
250
252
  __exportStar(require("./SeoMetricsDto"), exports);
@@ -253,6 +255,7 @@ __exportStar(require("./SetDomainTransferConfirmationInput"), exports);
253
255
  __exportStar(require("./SetNewPasswordInput"), exports);
254
256
  __exportStar(require("./SetPayoutProviderInput"), exports);
255
257
  __exportStar(require("./SortDto"), exports);
258
+ __exportStar(require("./StatsFilterInputDateRange"), exports);
256
259
  __exportStar(require("./StoreBuyerLocaleInput"), exports);
257
260
  __exportStar(require("./StoreUserLocaleInput"), exports);
258
261
  __exportStar(require("./SubscriptionBillingPeriodicityDto"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@randock/nameshift-api-client",
3
- "version": "0.0.304",
3
+ "version": "0.0.305",
4
4
  "description": "OpenAPI client for @randock/nameshift-api-client",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -16,21 +16,27 @@
16
16
  import * as runtime from '../runtime';
17
17
  import type {
18
18
  SellerPendingPayoutsByCurrencyStatsItemDto,
19
+ SellerRemainingAndTotalLeaseToOwnByCurrencyStatsItemDto,
19
20
  SellerSalesCountStatsItemDto,
20
21
  SellerTotalEarningsByCurrencyOverTimeStatsItemDto,
21
22
  SellerTotalEarningsByCurrencyStatsItemDto,
23
+ SellerTotalRentMonthlyIncomeByCurrencyStatsItemDto,
22
24
  ThrottlerException,
23
25
  ValidationException,
24
26
  } from '../models/index';
25
27
  import {
26
28
  SellerPendingPayoutsByCurrencyStatsItemDtoFromJSON,
27
29
  SellerPendingPayoutsByCurrencyStatsItemDtoToJSON,
30
+ SellerRemainingAndTotalLeaseToOwnByCurrencyStatsItemDtoFromJSON,
31
+ SellerRemainingAndTotalLeaseToOwnByCurrencyStatsItemDtoToJSON,
28
32
  SellerSalesCountStatsItemDtoFromJSON,
29
33
  SellerSalesCountStatsItemDtoToJSON,
30
34
  SellerTotalEarningsByCurrencyOverTimeStatsItemDtoFromJSON,
31
35
  SellerTotalEarningsByCurrencyOverTimeStatsItemDtoToJSON,
32
36
  SellerTotalEarningsByCurrencyStatsItemDtoFromJSON,
33
37
  SellerTotalEarningsByCurrencyStatsItemDtoToJSON,
38
+ SellerTotalRentMonthlyIncomeByCurrencyStatsItemDtoFromJSON,
39
+ SellerTotalRentMonthlyIncomeByCurrencyStatsItemDtoToJSON,
34
40
  ThrottlerExceptionFromJSON,
35
41
  ThrottlerExceptionToJSON,
36
42
  ValidationExceptionFromJSON,
@@ -38,13 +44,15 @@ import {
38
44
  } from '../models/index';
39
45
 
40
46
  export interface StatsApiGetSalesCountRequest {
41
- startDate: Date;
42
- endDate: Date;
47
+ dateRange?: any | null;
48
+ }
49
+
50
+ export interface StatsApiGetTotalEarningsByCurrencyRequest {
51
+ dateRange?: any | null;
43
52
  }
44
53
 
45
54
  export interface StatsApiGetTotalEarningsByCurrencyOverTimeRequest {
46
- startDate: Date;
47
- endDate: Date;
55
+ dateRange?: any | null;
48
56
  }
49
57
 
50
58
  /**
@@ -89,29 +97,45 @@ export class StatsApi extends runtime.BaseAPI {
89
97
  /**
90
98
  *
91
99
  */
92
- async getSalesCountRaw(requestParameters: StatsApiGetSalesCountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<SellerSalesCountStatsItemDto>>> {
93
- if (requestParameters['startDate'] == null) {
94
- throw new runtime.RequiredError(
95
- 'startDate',
96
- 'Required parameter "startDate" was null or undefined when calling getSalesCount().'
97
- );
98
- }
100
+ async getRemainingVsTotalLeaseToOwnByCurrencyRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<SellerRemainingAndTotalLeaseToOwnByCurrencyStatsItemDto>>> {
101
+ const queryParameters: any = {};
99
102
 
100
- if (requestParameters['endDate'] == null) {
101
- throw new runtime.RequiredError(
102
- 'endDate',
103
- 'Required parameter "endDate" was null or undefined when calling getSalesCount().'
104
- );
105
- }
103
+ const headerParameters: runtime.HTTPHeaders = {};
106
104
 
107
- const queryParameters: any = {};
105
+ if (this.configuration && this.configuration.accessToken) {
106
+ const token = this.configuration.accessToken;
107
+ const tokenString = await token("bearer", []);
108
108
 
109
- if (requestParameters['startDate'] != null) {
110
- queryParameters['startDate'] = (requestParameters['startDate'] as any).toISOString();
109
+ if (tokenString) {
110
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
111
+ }
111
112
  }
113
+ const response = await this.request({
114
+ path: `/private/stats/remaining-vs-total-lease-to-own-by-currency`,
115
+ method: 'GET',
116
+ headers: headerParameters,
117
+ query: queryParameters,
118
+ }, initOverrides);
119
+
120
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(SellerRemainingAndTotalLeaseToOwnByCurrencyStatsItemDtoFromJSON));
121
+ }
122
+
123
+ /**
124
+ *
125
+ */
126
+ async getRemainingVsTotalLeaseToOwnByCurrency(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<SellerRemainingAndTotalLeaseToOwnByCurrencyStatsItemDto>> {
127
+ const response = await this.getRemainingVsTotalLeaseToOwnByCurrencyRaw(initOverrides);
128
+ return await response.value();
129
+ }
112
130
 
113
- if (requestParameters['endDate'] != null) {
114
- queryParameters['endDate'] = (requestParameters['endDate'] as any).toISOString();
131
+ /**
132
+ *
133
+ */
134
+ async getSalesCountRaw(requestParameters: StatsApiGetSalesCountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<SellerSalesCountStatsItemDto>>> {
135
+ const queryParameters: any = {};
136
+
137
+ if (requestParameters['dateRange'] != null) {
138
+ queryParameters['dateRange'] = requestParameters['dateRange'];
115
139
  }
116
140
 
117
141
  const headerParameters: runtime.HTTPHeaders = {};
@@ -137,7 +161,7 @@ export class StatsApi extends runtime.BaseAPI {
137
161
  /**
138
162
  *
139
163
  */
140
- async getSalesCount(requestParameters: StatsApiGetSalesCountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<SellerSalesCountStatsItemDto>> {
164
+ async getSalesCount(requestParameters: StatsApiGetSalesCountRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<SellerSalesCountStatsItemDto>> {
141
165
  const response = await this.getSalesCountRaw(requestParameters, initOverrides);
142
166
  return await response.value();
143
167
  }
@@ -145,9 +169,13 @@ export class StatsApi extends runtime.BaseAPI {
145
169
  /**
146
170
  *
147
171
  */
148
- async getTotalEarningsByCurrencyRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<SellerTotalEarningsByCurrencyStatsItemDto>>> {
172
+ async getTotalEarningsByCurrencyRaw(requestParameters: StatsApiGetTotalEarningsByCurrencyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<SellerTotalEarningsByCurrencyStatsItemDto>>> {
149
173
  const queryParameters: any = {};
150
174
 
175
+ if (requestParameters['dateRange'] != null) {
176
+ queryParameters['dateRange'] = requestParameters['dateRange'];
177
+ }
178
+
151
179
  const headerParameters: runtime.HTTPHeaders = {};
152
180
 
153
181
  if (this.configuration && this.configuration.accessToken) {
@@ -171,8 +199,8 @@ export class StatsApi extends runtime.BaseAPI {
171
199
  /**
172
200
  *
173
201
  */
174
- async getTotalEarningsByCurrency(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<SellerTotalEarningsByCurrencyStatsItemDto>> {
175
- const response = await this.getTotalEarningsByCurrencyRaw(initOverrides);
202
+ async getTotalEarningsByCurrency(requestParameters: StatsApiGetTotalEarningsByCurrencyRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<SellerTotalEarningsByCurrencyStatsItemDto>> {
203
+ const response = await this.getTotalEarningsByCurrencyRaw(requestParameters, initOverrides);
176
204
  return await response.value();
177
205
  }
178
206
 
@@ -180,28 +208,10 @@ export class StatsApi extends runtime.BaseAPI {
180
208
  *
181
209
  */
182
210
  async getTotalEarningsByCurrencyOverTimeRaw(requestParameters: StatsApiGetTotalEarningsByCurrencyOverTimeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<SellerTotalEarningsByCurrencyOverTimeStatsItemDto>>> {
183
- if (requestParameters['startDate'] == null) {
184
- throw new runtime.RequiredError(
185
- 'startDate',
186
- 'Required parameter "startDate" was null or undefined when calling getTotalEarningsByCurrencyOverTime().'
187
- );
188
- }
189
-
190
- if (requestParameters['endDate'] == null) {
191
- throw new runtime.RequiredError(
192
- 'endDate',
193
- 'Required parameter "endDate" was null or undefined when calling getTotalEarningsByCurrencyOverTime().'
194
- );
195
- }
196
-
197
211
  const queryParameters: any = {};
198
212
 
199
- if (requestParameters['startDate'] != null) {
200
- queryParameters['startDate'] = (requestParameters['startDate'] as any).toISOString();
201
- }
202
-
203
- if (requestParameters['endDate'] != null) {
204
- queryParameters['endDate'] = (requestParameters['endDate'] as any).toISOString();
213
+ if (requestParameters['dateRange'] != null) {
214
+ queryParameters['dateRange'] = requestParameters['dateRange'];
205
215
  }
206
216
 
207
217
  const headerParameters: runtime.HTTPHeaders = {};
@@ -227,9 +237,43 @@ export class StatsApi extends runtime.BaseAPI {
227
237
  /**
228
238
  *
229
239
  */
230
- async getTotalEarningsByCurrencyOverTime(requestParameters: StatsApiGetTotalEarningsByCurrencyOverTimeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<SellerTotalEarningsByCurrencyOverTimeStatsItemDto>> {
240
+ async getTotalEarningsByCurrencyOverTime(requestParameters: StatsApiGetTotalEarningsByCurrencyOverTimeRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<SellerTotalEarningsByCurrencyOverTimeStatsItemDto>> {
231
241
  const response = await this.getTotalEarningsByCurrencyOverTimeRaw(requestParameters, initOverrides);
232
242
  return await response.value();
233
243
  }
234
244
 
245
+ /**
246
+ *
247
+ */
248
+ async getTotalMonthlyRentIncomeByCurrencyRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<SellerTotalRentMonthlyIncomeByCurrencyStatsItemDto>>> {
249
+ const queryParameters: any = {};
250
+
251
+ const headerParameters: runtime.HTTPHeaders = {};
252
+
253
+ if (this.configuration && this.configuration.accessToken) {
254
+ const token = this.configuration.accessToken;
255
+ const tokenString = await token("bearer", []);
256
+
257
+ if (tokenString) {
258
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
259
+ }
260
+ }
261
+ const response = await this.request({
262
+ path: `/private/stats/total-monthly-rent-income-by-currency`,
263
+ method: 'GET',
264
+ headers: headerParameters,
265
+ query: queryParameters,
266
+ }, initOverrides);
267
+
268
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(SellerTotalRentMonthlyIncomeByCurrencyStatsItemDtoFromJSON));
269
+ }
270
+
271
+ /**
272
+ *
273
+ */
274
+ async getTotalMonthlyRentIncomeByCurrency(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<SellerTotalRentMonthlyIncomeByCurrencyStatsItemDto>> {
275
+ const response = await this.getTotalMonthlyRentIncomeByCurrencyRaw(initOverrides);
276
+ return await response.value();
277
+ }
278
+
235
279
  }
@@ -0,0 +1,93 @@
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 SellerRemainingAndTotalLeaseToOwnByCurrencyStatsItemDto
20
+ */
21
+ export interface SellerRemainingAndTotalLeaseToOwnByCurrencyStatsItemDto {
22
+ /**
23
+ *
24
+ * @type {number}
25
+ * @memberof SellerRemainingAndTotalLeaseToOwnByCurrencyStatsItemDto
26
+ */
27
+ total: number;
28
+ /**
29
+ *
30
+ * @type {number}
31
+ * @memberof SellerRemainingAndTotalLeaseToOwnByCurrencyStatsItemDto
32
+ */
33
+ remaining: number;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof SellerRemainingAndTotalLeaseToOwnByCurrencyStatsItemDto
38
+ */
39
+ currency: string;
40
+ /**
41
+ *
42
+ * @type {number}
43
+ * @memberof SellerRemainingAndTotalLeaseToOwnByCurrencyStatsItemDto
44
+ */
45
+ count: number;
46
+ }
47
+
48
+ /**
49
+ * Check if a given object implements the SellerRemainingAndTotalLeaseToOwnByCurrencyStatsItemDto interface.
50
+ */
51
+ export function instanceOfSellerRemainingAndTotalLeaseToOwnByCurrencyStatsItemDto(value: object): value is SellerRemainingAndTotalLeaseToOwnByCurrencyStatsItemDto {
52
+ if (!('total' in value) || value['total'] === undefined) return false;
53
+ if (!('remaining' in value) || value['remaining'] === undefined) return false;
54
+ if (!('currency' in value) || value['currency'] === undefined) return false;
55
+ if (!('count' in value) || value['count'] === undefined) return false;
56
+ return true;
57
+ }
58
+
59
+ export function SellerRemainingAndTotalLeaseToOwnByCurrencyStatsItemDtoFromJSON(json: any): SellerRemainingAndTotalLeaseToOwnByCurrencyStatsItemDto {
60
+ return SellerRemainingAndTotalLeaseToOwnByCurrencyStatsItemDtoFromJSONTyped(json, false);
61
+ }
62
+
63
+ export function SellerRemainingAndTotalLeaseToOwnByCurrencyStatsItemDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): SellerRemainingAndTotalLeaseToOwnByCurrencyStatsItemDto {
64
+ if (json == null) {
65
+ return json;
66
+ }
67
+ return {
68
+
69
+ 'total': json['total'],
70
+ 'remaining': json['remaining'],
71
+ 'currency': json['currency'],
72
+ 'count': json['count'],
73
+ };
74
+ }
75
+
76
+ export function SellerRemainingAndTotalLeaseToOwnByCurrencyStatsItemDtoToJSON(json: any): SellerRemainingAndTotalLeaseToOwnByCurrencyStatsItemDto {
77
+ return SellerRemainingAndTotalLeaseToOwnByCurrencyStatsItemDtoToJSONTyped(json, false);
78
+ }
79
+
80
+ export function SellerRemainingAndTotalLeaseToOwnByCurrencyStatsItemDtoToJSONTyped(value?: SellerRemainingAndTotalLeaseToOwnByCurrencyStatsItemDto | null, ignoreDiscriminator: boolean = false): any {
81
+ if (value == null) {
82
+ return value;
83
+ }
84
+
85
+ return {
86
+
87
+ 'total': value['total'],
88
+ 'remaining': value['remaining'],
89
+ 'currency': value['currency'],
90
+ 'count': value['count'],
91
+ };
92
+ }
93
+
@@ -0,0 +1,84 @@
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 SellerTotalRentMonthlyIncomeByCurrencyStatsItemDto
20
+ */
21
+ export interface SellerTotalRentMonthlyIncomeByCurrencyStatsItemDto {
22
+ /**
23
+ *
24
+ * @type {number}
25
+ * @memberof SellerTotalRentMonthlyIncomeByCurrencyStatsItemDto
26
+ */
27
+ total: number;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof SellerTotalRentMonthlyIncomeByCurrencyStatsItemDto
32
+ */
33
+ currency: string;
34
+ /**
35
+ *
36
+ * @type {number}
37
+ * @memberof SellerTotalRentMonthlyIncomeByCurrencyStatsItemDto
38
+ */
39
+ count: number;
40
+ }
41
+
42
+ /**
43
+ * Check if a given object implements the SellerTotalRentMonthlyIncomeByCurrencyStatsItemDto interface.
44
+ */
45
+ export function instanceOfSellerTotalRentMonthlyIncomeByCurrencyStatsItemDto(value: object): value is SellerTotalRentMonthlyIncomeByCurrencyStatsItemDto {
46
+ if (!('total' in value) || value['total'] === undefined) return false;
47
+ if (!('currency' in value) || value['currency'] === undefined) return false;
48
+ if (!('count' in value) || value['count'] === undefined) return false;
49
+ return true;
50
+ }
51
+
52
+ export function SellerTotalRentMonthlyIncomeByCurrencyStatsItemDtoFromJSON(json: any): SellerTotalRentMonthlyIncomeByCurrencyStatsItemDto {
53
+ return SellerTotalRentMonthlyIncomeByCurrencyStatsItemDtoFromJSONTyped(json, false);
54
+ }
55
+
56
+ export function SellerTotalRentMonthlyIncomeByCurrencyStatsItemDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): SellerTotalRentMonthlyIncomeByCurrencyStatsItemDto {
57
+ if (json == null) {
58
+ return json;
59
+ }
60
+ return {
61
+
62
+ 'total': json['total'],
63
+ 'currency': json['currency'],
64
+ 'count': json['count'],
65
+ };
66
+ }
67
+
68
+ export function SellerTotalRentMonthlyIncomeByCurrencyStatsItemDtoToJSON(json: any): SellerTotalRentMonthlyIncomeByCurrencyStatsItemDto {
69
+ return SellerTotalRentMonthlyIncomeByCurrencyStatsItemDtoToJSONTyped(json, false);
70
+ }
71
+
72
+ export function SellerTotalRentMonthlyIncomeByCurrencyStatsItemDtoToJSONTyped(value?: SellerTotalRentMonthlyIncomeByCurrencyStatsItemDto | null, ignoreDiscriminator: boolean = false): any {
73
+ if (value == null) {
74
+ return value;
75
+ }
76
+
77
+ return {
78
+
79
+ 'total': value['total'],
80
+ 'currency': value['currency'],
81
+ 'count': value['count'],
82
+ };
83
+ }
84
+
@@ -0,0 +1,75 @@
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 StatsFilterInputDateRange
20
+ */
21
+ export interface StatsFilterInputDateRange {
22
+ /**
23
+ *
24
+ * @type {Date}
25
+ * @memberof StatsFilterInputDateRange
26
+ */
27
+ startDate: Date;
28
+ /**
29
+ *
30
+ * @type {Date}
31
+ * @memberof StatsFilterInputDateRange
32
+ */
33
+ endDate: Date;
34
+ }
35
+
36
+ /**
37
+ * Check if a given object implements the StatsFilterInputDateRange interface.
38
+ */
39
+ export function instanceOfStatsFilterInputDateRange(value: object): value is StatsFilterInputDateRange {
40
+ if (!('startDate' in value) || value['startDate'] === undefined) return false;
41
+ if (!('endDate' in value) || value['endDate'] === undefined) return false;
42
+ return true;
43
+ }
44
+
45
+ export function StatsFilterInputDateRangeFromJSON(json: any): StatsFilterInputDateRange {
46
+ return StatsFilterInputDateRangeFromJSONTyped(json, false);
47
+ }
48
+
49
+ export function StatsFilterInputDateRangeFromJSONTyped(json: any, ignoreDiscriminator: boolean): StatsFilterInputDateRange {
50
+ if (json == null) {
51
+ return json;
52
+ }
53
+ return {
54
+
55
+ 'startDate': (new Date(json['startDate'])),
56
+ 'endDate': (new Date(json['endDate'])),
57
+ };
58
+ }
59
+
60
+ export function StatsFilterInputDateRangeToJSON(json: any): StatsFilterInputDateRange {
61
+ return StatsFilterInputDateRangeToJSONTyped(json, false);
62
+ }
63
+
64
+ export function StatsFilterInputDateRangeToJSONTyped(value?: StatsFilterInputDateRange | null, ignoreDiscriminator: boolean = false): any {
65
+ if (value == null) {
66
+ return value;
67
+ }
68
+
69
+ return {
70
+
71
+ 'startDate': ((value['startDate']).toISOString()),
72
+ 'endDate': ((value['endDate']).toISOString()),
73
+ };
74
+ }
75
+
@@ -222,6 +222,7 @@ export * from './SellerInvoiceDomainDto';
222
222
  export * from './SellerInvoiceDto';
223
223
  export * from './SellerInvoiceSellerAccountDto';
224
224
  export * from './SellerPendingPayoutsByCurrencyStatsItemDto';
225
+ export * from './SellerRemainingAndTotalLeaseToOwnByCurrencyStatsItemDto';
225
226
  export * from './SellerSalesCountStatsItemDto';
226
227
  export * from './SellerSecurityUserAccountDto';
227
228
  export * from './SellerSecurityUserDto';
@@ -229,6 +230,7 @@ export * from './SellerSubscriptionListItemDto';
229
230
  export * from './SellerSubscriptionListItemDtoDomainInformation';
230
231
  export * from './SellerTotalEarningsByCurrencyOverTimeStatsItemDto';
231
232
  export * from './SellerTotalEarningsByCurrencyStatsItemDto';
233
+ export * from './SellerTotalRentMonthlyIncomeByCurrencyStatsItemDto';
232
234
  export * from './SendAdminLeadAiPriceNegotiatorAgentChatMessageInput';
233
235
  export * from './SendAdminLeadAiPriceNegotiatorAgentChatMessageInputAiModel';
234
236
  export * from './SeoMetricsDto';
@@ -237,6 +239,7 @@ export * from './SetDomainTransferConfirmationInput';
237
239
  export * from './SetNewPasswordInput';
238
240
  export * from './SetPayoutProviderInput';
239
241
  export * from './SortDto';
242
+ export * from './StatsFilterInputDateRange';
240
243
  export * from './StoreBuyerLocaleInput';
241
244
  export * from './StoreUserLocaleInput';
242
245
  export * from './SubscriptionBillingPeriodicityDto';