@randock/nameshift-api-client 0.0.528 → 0.0.530

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.
Files changed (39) hide show
  1. package/.openapi-generator/FILES +3 -1
  2. package/README.md +3 -3
  3. package/dist/apis/AdminApi.d.ts +73 -8
  4. package/dist/apis/AdminApi.js +289 -9
  5. package/dist/models/AccountsStatsDto.d.ts +21 -0
  6. package/dist/models/AccountsStatsDto.js +15 -0
  7. package/dist/models/AffiliatesStatsDto.d.ts +6 -0
  8. package/dist/models/AffiliatesStatsDto.js +4 -0
  9. package/dist/models/AuctionsStatsDto.d.ts +6 -0
  10. package/dist/models/AuctionsStatsDto.js +4 -0
  11. package/dist/models/CreateNewsletterInput.d.ts +4 -21
  12. package/dist/models/CreateNewsletterInput.js +3 -8
  13. package/dist/models/NewsletterDto.d.ts +4 -21
  14. package/dist/models/NewsletterDto.js +4 -15
  15. package/dist/models/NewsletterEventDto.d.ts +68 -0
  16. package/dist/models/NewsletterEventDto.js +75 -0
  17. package/dist/models/NewsletterEventInput.d.ts +68 -0
  18. package/dist/models/NewsletterEventInput.js +75 -0
  19. package/dist/models/SalesStatsDto.d.ts +38 -0
  20. package/dist/models/SalesStatsDto.js +55 -0
  21. package/dist/models/UpdateNewsletterInput.d.ts +4 -21
  22. package/dist/models/UpdateNewsletterInput.js +3 -8
  23. package/dist/models/index.d.ts +3 -1
  24. package/dist/models/index.js +3 -1
  25. package/package.json +1 -1
  26. package/src/apis/AdminApi.ts +248 -13
  27. package/src/models/AccountsStatsDto.ts +49 -0
  28. package/src/models/AffiliatesStatsDto.ts +9 -0
  29. package/src/models/AuctionsStatsDto.ts +9 -0
  30. package/src/models/CreateNewsletterInput.ts +12 -29
  31. package/src/models/NewsletterDto.ts +13 -33
  32. package/src/models/NewsletterEventDto.ts +120 -0
  33. package/src/models/NewsletterEventInput.ts +120 -0
  34. package/src/models/SalesStatsDto.ts +75 -0
  35. package/src/models/UpdateNewsletterInput.ts +12 -29
  36. package/src/models/index.ts +3 -1
  37. package/dist/models/AdminDashboardStatsDto.d.ts +0 -94
  38. package/dist/models/AdminDashboardStatsDto.js +0 -95
  39. package/src/models/AdminDashboardStatsDto.ts +0 -204
@@ -109,7 +109,6 @@ src/models/AdminChallengeListDto.ts
109
109
  src/models/AdminChallengeListItemDto.ts
110
110
  src/models/AdminCompanyStatsDto.ts
111
111
  src/models/AdminCompanyStatsLedger.ts
112
- src/models/AdminDashboardStatsDto.ts
113
112
  src/models/AdminDomainAppraisalRequestListItemDto.ts
114
113
  src/models/AdminDomainListItemDto.ts
115
114
  src/models/AdminGetAllDomainTransfers200Response.ts
@@ -478,6 +477,8 @@ src/models/MoneyInput.ts
478
477
  src/models/MozMetrics.ts
479
478
  src/models/NewsStoryDto.ts
480
479
  src/models/NewsletterDto.ts
480
+ src/models/NewsletterEventDto.ts
481
+ src/models/NewsletterEventInput.ts
481
482
  src/models/NewsletterPreviewDto.ts
482
483
  src/models/NewsletterSecondaryStoryDto.ts
483
484
  src/models/NewsletterSecondaryStoryInput.ts
@@ -561,6 +562,7 @@ src/models/SalesCountCommissionPayloadDto.ts
561
562
  src/models/SalesCountCommissionPayloadInput.ts
562
563
  src/models/SalesCountCommissionPayloadSimulationInput.ts
563
564
  src/models/SalesCountCommissionReasonPayloadDto.ts
565
+ src/models/SalesStatsDto.ts
564
566
  src/models/SearchBankAccountInstitutionsInput.ts
565
567
  src/models/SecondFactorMethod.ts
566
568
  src/models/SellerAccountReferralListItemDto.ts
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## @randock/nameshift-api-client@0.0.528
1
+ ## @randock/nameshift-api-client@0.0.530
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.528 --save
39
+ npm install @randock/nameshift-api-client@0.0.530 --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
- ce8c8d6a13f181e365f48408f5f13da679c2efadf19932a7d5f97a30e024c3a3049554d18ed5d934a87f397344eb61db
47
+ bc8be612c6d5a701ec657ffc0a4e597afb899be42318cdc7f20715001830528ad7a5b4b8407b20b1ea14e7b7e09e581c
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { AccountNameshiftCommissionByTypeDto, AccountNoteListDto, AccountPaymentMethodProfileDto, AccountSettingsDto, AdminAccountLoginDto, AdminAccountSettingsInput, AdminBuyerLoginDto, AdminChallengeListDto, AdminCompanyStatsDto, AdminDashboardStatsDto, AdminGetAllDomainTransfers200Response, AdminLandingDesignStatsDto, AdminMarketplaceDto, AdminUserNewsletterInput, AdminUserSecurityDto, BulkCommissionActionsInput, ChangeInvoiceStatusInput, ChangeOrderStatusInput, ChangeSubscriptionStatusInput, CommissionListDto, CommissionSimulationResultDto, CreateAccountNoteInput, CreateChallengeInput, CreateNewsletterInput, DomainLockDto, DomainStatsDto, DomainTldsDto, DomainTransferDetailsDto, GetAccountChallengeRewardUsagesListDto, GetAdminDomainAppraisalRequests200Response, GetAllAuctions200Response, GetAllFeatureFlags200Response, GetAllInvoices200Response, GetAllOrders200Response, GetAllOwnedDomains200Response, GetAllSubscriptions200Response, IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDto, LeadEnrichmentDto, LeadMessageDto, LedgerMutationsDto, LinkBankDepositToBankAccountInput, LinkBankDepositToInvoiceInput, ListAccounts200Response, ListAdminLandingDesignAccounts200Response, ListAdminRelatedLeads200Response, ListBankAccounts200Response, ListBankDeposits200Response, ListBuyers200Response, ListDomains200Response, ListLeadMessagesDto, ListLeads200Response, ListUserLoginAttempts200Response, NewsStoryDto, NewsletterDto, NewsletterPreviewDto, ObjectId, PaySellerInvoicesInput, SellerLeadDetails, SellerPayoutPreviewDto, SellerSalesByTldStatsItemDto, SellerSalesCountStatsItemDto, SendAdminLeadAiPriceNegotiatorAgentChatMessageInput, SendNewsletterPreviewInput, SimulateCommissionInput, StatsFilterInputDateRange, SubscriptionDetailsDto, UpdateAccountChallengeRewardBalanceInput, UpdateAccountNoteInput, UpdateAdminDomainTransferBuyerCompanyInfoInput, UpdateAdminDomainTransferBuyerInfoInput, UpdateChallengeInput, UpdateFeatureFlagInput, UpdateMarketplaceInput, UpdateNewsletterInput, UpdateSubscriptionBuyerInformationInput } from '../models/index';
13
+ import type { AccountNameshiftCommissionByTypeDto, AccountNoteListDto, AccountPaymentMethodProfileDto, AccountSettingsDto, AccountsStatsDto, AdminAccountLoginDto, AdminAccountSettingsInput, AdminBuyerLoginDto, AdminChallengeListDto, AdminCompanyStatsDto, AdminGetAllDomainTransfers200Response, AdminLandingDesignStatsDto, AdminMarketplaceDto, AdminUserNewsletterInput, AdminUserSecurityDto, AffiliatesStatsDto, AuctionsStatsDto, BulkCommissionActionsInput, ChangeInvoiceStatusInput, ChangeOrderStatusInput, ChangeSubscriptionStatusInput, CommissionListDto, CommissionSimulationResultDto, CommissionsStatsDto, CreateAccountNoteInput, CreateChallengeInput, CreateNewsletterInput, DomainLockDto, DomainStatsDto, DomainTldsDto, DomainTransferDetailsDto, GetAccountChallengeRewardUsagesListDto, GetAdminDomainAppraisalRequests200Response, GetAllAuctions200Response, GetAllFeatureFlags200Response, GetAllInvoices200Response, GetAllOrders200Response, GetAllOwnedDomains200Response, GetAllSubscriptions200Response, IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDto, LeadEnrichmentDto, LeadMessageDto, LedgerMutationsDto, LinkBankDepositToBankAccountInput, LinkBankDepositToInvoiceInput, ListAccounts200Response, ListAdminLandingDesignAccounts200Response, ListAdminRelatedLeads200Response, ListBankAccounts200Response, ListBankDeposits200Response, ListBuyers200Response, ListDomains200Response, ListLeadMessagesDto, ListLeads200Response, ListUserLoginAttempts200Response, NewsStoryDto, NewsletterDto, NewsletterPreviewDto, ObjectId, PaySellerInvoicesInput, PaymentMethodsStatsDto, SalesStatsDto, SellerLeadDetails, SellerPayoutPreviewDto, SellerSalesByTldStatsItemDto, SellerSalesCountStatsItemDto, SendAdminLeadAiPriceNegotiatorAgentChatMessageInput, SendNewsletterPreviewInput, SimulateCommissionInput, StatsFilterInputDateRange, SubscriptionDetailsDto, UpdateAccountChallengeRewardBalanceInput, UpdateAccountNoteInput, UpdateAdminDomainTransferBuyerCompanyInfoInput, UpdateAdminDomainTransferBuyerInfoInput, UpdateChallengeInput, UpdateFeatureFlagInput, UpdateMarketplaceInput, UpdateNewsletterInput, UpdateSubscriptionBuyerInformationInput } from '../models/index';
14
14
  export interface AdminApiAdminDeleteAuctionRequest {
15
15
  auctionId: string;
16
16
  }
@@ -101,7 +101,22 @@ export interface AdminApiGetAccountPaymentMethodProfilesRequest {
101
101
  export interface AdminApiGetAccountSettingsRequest {
102
102
  accountId: string;
103
103
  }
104
- export interface AdminApiGetAdminDashboardStatsRequest {
104
+ export interface AdminApiGetAdminDashboardAccountsStatsRequest {
105
+ dateRange?: StatsFilterInputDateRange | null;
106
+ }
107
+ export interface AdminApiGetAdminDashboardAffiliatesStatsRequest {
108
+ dateRange?: StatsFilterInputDateRange | null;
109
+ }
110
+ export interface AdminApiGetAdminDashboardAuctionsStatsRequest {
111
+ dateRange?: StatsFilterInputDateRange | null;
112
+ }
113
+ export interface AdminApiGetAdminDashboardCommissionsStatsRequest {
114
+ dateRange?: StatsFilterInputDateRange | null;
115
+ }
116
+ export interface AdminApiGetAdminDashboardPaymentMethodsStatsRequest {
117
+ dateRange?: StatsFilterInputDateRange | null;
118
+ }
119
+ export interface AdminApiGetAdminDashboardSalesStatsRequest {
105
120
  dateRange?: StatsFilterInputDateRange | null;
106
121
  }
107
122
  export interface AdminApiGetAdminDomainAppraisalRequestsRequest {
@@ -705,15 +720,65 @@ export declare class AdminApi extends runtime.BaseAPI {
705
720
  */
706
721
  getAccountSettings(requestParameters: AdminApiGetAccountSettingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccountSettingsDto>;
707
722
  /**
708
- * Returns aggregated statistics for the admin dashboard, optionally filtered by date range.
709
- * Get admin dashboard stats
723
+ * Returns the accounts statistics of the admin dashboard, with the top sellers, top affiliate sellers and accounts per country, optionally filtered by date range.
724
+ * Get admin dashboard accounts stats
725
+ */
726
+ getAdminDashboardAccountsStatsRaw(requestParameters: AdminApiGetAdminDashboardAccountsStatsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AccountsStatsDto>>;
727
+ /**
728
+ * Returns the accounts statistics of the admin dashboard, with the top sellers, top affiliate sellers and accounts per country, optionally filtered by date range.
729
+ * Get admin dashboard accounts stats
730
+ */
731
+ getAdminDashboardAccountsStats(requestParameters?: AdminApiGetAdminDashboardAccountsStatsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccountsStatsDto>;
732
+ /**
733
+ * Returns the affiliates statistics of the admin dashboard, optionally filtered by date range.
734
+ * Get admin dashboard affiliates stats
735
+ */
736
+ getAdminDashboardAffiliatesStatsRaw(requestParameters: AdminApiGetAdminDashboardAffiliatesStatsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AffiliatesStatsDto>>;
737
+ /**
738
+ * Returns the affiliates statistics of the admin dashboard, optionally filtered by date range.
739
+ * Get admin dashboard affiliates stats
740
+ */
741
+ getAdminDashboardAffiliatesStats(requestParameters?: AdminApiGetAdminDashboardAffiliatesStatsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AffiliatesStatsDto>;
742
+ /**
743
+ * Returns the auctions statistics of the admin dashboard, optionally filtered by date range.
744
+ * Get admin dashboard auctions stats
745
+ */
746
+ getAdminDashboardAuctionsStatsRaw(requestParameters: AdminApiGetAdminDashboardAuctionsStatsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AuctionsStatsDto>>;
747
+ /**
748
+ * Returns the auctions statistics of the admin dashboard, optionally filtered by date range.
749
+ * Get admin dashboard auctions stats
750
+ */
751
+ getAdminDashboardAuctionsStats(requestParameters?: AdminApiGetAdminDashboardAuctionsStatsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AuctionsStatsDto>;
752
+ /**
753
+ * Returns the commissions statistics of the admin dashboard, optionally filtered by date range.
754
+ * Get admin dashboard commissions stats
755
+ */
756
+ getAdminDashboardCommissionsStatsRaw(requestParameters: AdminApiGetAdminDashboardCommissionsStatsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CommissionsStatsDto>>;
757
+ /**
758
+ * Returns the commissions statistics of the admin dashboard, optionally filtered by date range.
759
+ * Get admin dashboard commissions stats
760
+ */
761
+ getAdminDashboardCommissionsStats(requestParameters?: AdminApiGetAdminDashboardCommissionsStatsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CommissionsStatsDto>;
762
+ /**
763
+ * Returns the number of sales by payment method of the admin dashboard, optionally filtered by date range.
764
+ * Get admin dashboard payment methods stats
765
+ */
766
+ getAdminDashboardPaymentMethodsStatsRaw(requestParameters: AdminApiGetAdminDashboardPaymentMethodsStatsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaymentMethodsStatsDto>>;
767
+ /**
768
+ * Returns the number of sales by payment method of the admin dashboard, optionally filtered by date range.
769
+ * Get admin dashboard payment methods stats
770
+ */
771
+ getAdminDashboardPaymentMethodsStats(requestParameters?: AdminApiGetAdminDashboardPaymentMethodsStatsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaymentMethodsStatsDto>;
772
+ /**
773
+ * Returns the sales statistics of the admin dashboard, optionally filtered by date range.
774
+ * Get admin dashboard sales stats
710
775
  */
711
- getAdminDashboardStatsRaw(requestParameters: AdminApiGetAdminDashboardStatsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminDashboardStatsDto>>;
776
+ getAdminDashboardSalesStatsRaw(requestParameters: AdminApiGetAdminDashboardSalesStatsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SalesStatsDto>>;
712
777
  /**
713
- * Returns aggregated statistics for the admin dashboard, optionally filtered by date range.
714
- * Get admin dashboard stats
778
+ * Returns the sales statistics of the admin dashboard, optionally filtered by date range.
779
+ * Get admin dashboard sales stats
715
780
  */
716
- getAdminDashboardStats(requestParameters?: AdminApiGetAdminDashboardStatsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminDashboardStatsDto>;
781
+ getAdminDashboardSalesStats(requestParameters?: AdminApiGetAdminDashboardSalesStatsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SalesStatsDto>;
717
782
  /**
718
783
  * Lists every domain appraisal bought by buyers and sellers, with its state in the domain appraisals API.
719
784
  * List domain appraisal requests
@@ -1479,10 +1479,10 @@ var AdminApi = /** @class */ (function (_super) {
1479
1479
  });
1480
1480
  };
1481
1481
  /**
1482
- * Returns aggregated statistics for the admin dashboard, optionally filtered by date range.
1483
- * Get admin dashboard stats
1482
+ * Returns the accounts statistics of the admin dashboard, with the top sellers, top affiliate sellers and accounts per country, optionally filtered by date range.
1483
+ * Get admin dashboard accounts stats
1484
1484
  */
1485
- AdminApi.prototype.getAdminDashboardStatsRaw = function (requestParameters, initOverrides) {
1485
+ AdminApi.prototype.getAdminDashboardAccountsStatsRaw = function (requestParameters, initOverrides) {
1486
1486
  return __awaiter(this, void 0, void 0, function () {
1487
1487
  var queryParameters, headerParameters, token, tokenString, response;
1488
1488
  return __generator(this, function (_a) {
@@ -1503,29 +1503,309 @@ var AdminApi = /** @class */ (function (_super) {
1503
1503
  }
1504
1504
  _a.label = 2;
1505
1505
  case 2: return [4 /*yield*/, this.request({
1506
- path: "/admin/stats/dashboard",
1506
+ path: "/admin/stats/dashboard/accounts",
1507
1507
  method: 'GET',
1508
1508
  headers: headerParameters,
1509
1509
  query: queryParameters,
1510
1510
  }, initOverrides)];
1511
1511
  case 3:
1512
1512
  response = _a.sent();
1513
- return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.AdminDashboardStatsDtoFromJSON)(jsonValue); })];
1513
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.AccountsStatsDtoFromJSON)(jsonValue); })];
1514
1514
  }
1515
1515
  });
1516
1516
  });
1517
1517
  };
1518
1518
  /**
1519
- * Returns aggregated statistics for the admin dashboard, optionally filtered by date range.
1520
- * Get admin dashboard stats
1519
+ * Returns the accounts statistics of the admin dashboard, with the top sellers, top affiliate sellers and accounts per country, optionally filtered by date range.
1520
+ * Get admin dashboard accounts stats
1521
1521
  */
1522
- AdminApi.prototype.getAdminDashboardStats = function () {
1522
+ AdminApi.prototype.getAdminDashboardAccountsStats = function () {
1523
1523
  return __awaiter(this, arguments, void 0, function (requestParameters, initOverrides) {
1524
1524
  var response;
1525
1525
  if (requestParameters === void 0) { requestParameters = {}; }
1526
1526
  return __generator(this, function (_a) {
1527
1527
  switch (_a.label) {
1528
- case 0: return [4 /*yield*/, this.getAdminDashboardStatsRaw(requestParameters, initOverrides)];
1528
+ case 0: return [4 /*yield*/, this.getAdminDashboardAccountsStatsRaw(requestParameters, initOverrides)];
1529
+ case 1:
1530
+ response = _a.sent();
1531
+ return [4 /*yield*/, response.value()];
1532
+ case 2: return [2 /*return*/, _a.sent()];
1533
+ }
1534
+ });
1535
+ });
1536
+ };
1537
+ /**
1538
+ * Returns the affiliates statistics of the admin dashboard, optionally filtered by date range.
1539
+ * Get admin dashboard affiliates stats
1540
+ */
1541
+ AdminApi.prototype.getAdminDashboardAffiliatesStatsRaw = function (requestParameters, initOverrides) {
1542
+ return __awaiter(this, void 0, void 0, function () {
1543
+ var queryParameters, headerParameters, token, tokenString, response;
1544
+ return __generator(this, function (_a) {
1545
+ switch (_a.label) {
1546
+ case 0:
1547
+ queryParameters = {};
1548
+ if (requestParameters['dateRange'] != null) {
1549
+ queryParameters['dateRange'] = requestParameters['dateRange'];
1550
+ }
1551
+ headerParameters = {};
1552
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
1553
+ token = this.configuration.accessToken;
1554
+ return [4 /*yield*/, token("bearer", [])];
1555
+ case 1:
1556
+ tokenString = _a.sent();
1557
+ if (tokenString) {
1558
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
1559
+ }
1560
+ _a.label = 2;
1561
+ case 2: return [4 /*yield*/, this.request({
1562
+ path: "/admin/stats/dashboard/affiliates",
1563
+ method: 'GET',
1564
+ headers: headerParameters,
1565
+ query: queryParameters,
1566
+ }, initOverrides)];
1567
+ case 3:
1568
+ response = _a.sent();
1569
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.AffiliatesStatsDtoFromJSON)(jsonValue); })];
1570
+ }
1571
+ });
1572
+ });
1573
+ };
1574
+ /**
1575
+ * Returns the affiliates statistics of the admin dashboard, optionally filtered by date range.
1576
+ * Get admin dashboard affiliates stats
1577
+ */
1578
+ AdminApi.prototype.getAdminDashboardAffiliatesStats = function () {
1579
+ return __awaiter(this, arguments, void 0, function (requestParameters, initOverrides) {
1580
+ var response;
1581
+ if (requestParameters === void 0) { requestParameters = {}; }
1582
+ return __generator(this, function (_a) {
1583
+ switch (_a.label) {
1584
+ case 0: return [4 /*yield*/, this.getAdminDashboardAffiliatesStatsRaw(requestParameters, initOverrides)];
1585
+ case 1:
1586
+ response = _a.sent();
1587
+ return [4 /*yield*/, response.value()];
1588
+ case 2: return [2 /*return*/, _a.sent()];
1589
+ }
1590
+ });
1591
+ });
1592
+ };
1593
+ /**
1594
+ * Returns the auctions statistics of the admin dashboard, optionally filtered by date range.
1595
+ * Get admin dashboard auctions stats
1596
+ */
1597
+ AdminApi.prototype.getAdminDashboardAuctionsStatsRaw = function (requestParameters, initOverrides) {
1598
+ return __awaiter(this, void 0, void 0, function () {
1599
+ var queryParameters, headerParameters, token, tokenString, response;
1600
+ return __generator(this, function (_a) {
1601
+ switch (_a.label) {
1602
+ case 0:
1603
+ queryParameters = {};
1604
+ if (requestParameters['dateRange'] != null) {
1605
+ queryParameters['dateRange'] = requestParameters['dateRange'];
1606
+ }
1607
+ headerParameters = {};
1608
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
1609
+ token = this.configuration.accessToken;
1610
+ return [4 /*yield*/, token("bearer", [])];
1611
+ case 1:
1612
+ tokenString = _a.sent();
1613
+ if (tokenString) {
1614
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
1615
+ }
1616
+ _a.label = 2;
1617
+ case 2: return [4 /*yield*/, this.request({
1618
+ path: "/admin/stats/dashboard/auctions",
1619
+ method: 'GET',
1620
+ headers: headerParameters,
1621
+ query: queryParameters,
1622
+ }, initOverrides)];
1623
+ case 3:
1624
+ response = _a.sent();
1625
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.AuctionsStatsDtoFromJSON)(jsonValue); })];
1626
+ }
1627
+ });
1628
+ });
1629
+ };
1630
+ /**
1631
+ * Returns the auctions statistics of the admin dashboard, optionally filtered by date range.
1632
+ * Get admin dashboard auctions stats
1633
+ */
1634
+ AdminApi.prototype.getAdminDashboardAuctionsStats = function () {
1635
+ return __awaiter(this, arguments, void 0, function (requestParameters, initOverrides) {
1636
+ var response;
1637
+ if (requestParameters === void 0) { requestParameters = {}; }
1638
+ return __generator(this, function (_a) {
1639
+ switch (_a.label) {
1640
+ case 0: return [4 /*yield*/, this.getAdminDashboardAuctionsStatsRaw(requestParameters, initOverrides)];
1641
+ case 1:
1642
+ response = _a.sent();
1643
+ return [4 /*yield*/, response.value()];
1644
+ case 2: return [2 /*return*/, _a.sent()];
1645
+ }
1646
+ });
1647
+ });
1648
+ };
1649
+ /**
1650
+ * Returns the commissions statistics of the admin dashboard, optionally filtered by date range.
1651
+ * Get admin dashboard commissions stats
1652
+ */
1653
+ AdminApi.prototype.getAdminDashboardCommissionsStatsRaw = function (requestParameters, initOverrides) {
1654
+ return __awaiter(this, void 0, void 0, function () {
1655
+ var queryParameters, headerParameters, token, tokenString, response;
1656
+ return __generator(this, function (_a) {
1657
+ switch (_a.label) {
1658
+ case 0:
1659
+ queryParameters = {};
1660
+ if (requestParameters['dateRange'] != null) {
1661
+ queryParameters['dateRange'] = requestParameters['dateRange'];
1662
+ }
1663
+ headerParameters = {};
1664
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
1665
+ token = this.configuration.accessToken;
1666
+ return [4 /*yield*/, token("bearer", [])];
1667
+ case 1:
1668
+ tokenString = _a.sent();
1669
+ if (tokenString) {
1670
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
1671
+ }
1672
+ _a.label = 2;
1673
+ case 2: return [4 /*yield*/, this.request({
1674
+ path: "/admin/stats/dashboard/commissions",
1675
+ method: 'GET',
1676
+ headers: headerParameters,
1677
+ query: queryParameters,
1678
+ }, initOverrides)];
1679
+ case 3:
1680
+ response = _a.sent();
1681
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.CommissionsStatsDtoFromJSON)(jsonValue); })];
1682
+ }
1683
+ });
1684
+ });
1685
+ };
1686
+ /**
1687
+ * Returns the commissions statistics of the admin dashboard, optionally filtered by date range.
1688
+ * Get admin dashboard commissions stats
1689
+ */
1690
+ AdminApi.prototype.getAdminDashboardCommissionsStats = function () {
1691
+ return __awaiter(this, arguments, void 0, function (requestParameters, initOverrides) {
1692
+ var response;
1693
+ if (requestParameters === void 0) { requestParameters = {}; }
1694
+ return __generator(this, function (_a) {
1695
+ switch (_a.label) {
1696
+ case 0: return [4 /*yield*/, this.getAdminDashboardCommissionsStatsRaw(requestParameters, initOverrides)];
1697
+ case 1:
1698
+ response = _a.sent();
1699
+ return [4 /*yield*/, response.value()];
1700
+ case 2: return [2 /*return*/, _a.sent()];
1701
+ }
1702
+ });
1703
+ });
1704
+ };
1705
+ /**
1706
+ * Returns the number of sales by payment method of the admin dashboard, optionally filtered by date range.
1707
+ * Get admin dashboard payment methods stats
1708
+ */
1709
+ AdminApi.prototype.getAdminDashboardPaymentMethodsStatsRaw = function (requestParameters, initOverrides) {
1710
+ return __awaiter(this, void 0, void 0, function () {
1711
+ var queryParameters, headerParameters, token, tokenString, response;
1712
+ return __generator(this, function (_a) {
1713
+ switch (_a.label) {
1714
+ case 0:
1715
+ queryParameters = {};
1716
+ if (requestParameters['dateRange'] != null) {
1717
+ queryParameters['dateRange'] = requestParameters['dateRange'];
1718
+ }
1719
+ headerParameters = {};
1720
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
1721
+ token = this.configuration.accessToken;
1722
+ return [4 /*yield*/, token("bearer", [])];
1723
+ case 1:
1724
+ tokenString = _a.sent();
1725
+ if (tokenString) {
1726
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
1727
+ }
1728
+ _a.label = 2;
1729
+ case 2: return [4 /*yield*/, this.request({
1730
+ path: "/admin/stats/dashboard/payment-methods",
1731
+ method: 'GET',
1732
+ headers: headerParameters,
1733
+ query: queryParameters,
1734
+ }, initOverrides)];
1735
+ case 3:
1736
+ response = _a.sent();
1737
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.PaymentMethodsStatsDtoFromJSON)(jsonValue); })];
1738
+ }
1739
+ });
1740
+ });
1741
+ };
1742
+ /**
1743
+ * Returns the number of sales by payment method of the admin dashboard, optionally filtered by date range.
1744
+ * Get admin dashboard payment methods stats
1745
+ */
1746
+ AdminApi.prototype.getAdminDashboardPaymentMethodsStats = function () {
1747
+ return __awaiter(this, arguments, void 0, function (requestParameters, initOverrides) {
1748
+ var response;
1749
+ if (requestParameters === void 0) { requestParameters = {}; }
1750
+ return __generator(this, function (_a) {
1751
+ switch (_a.label) {
1752
+ case 0: return [4 /*yield*/, this.getAdminDashboardPaymentMethodsStatsRaw(requestParameters, initOverrides)];
1753
+ case 1:
1754
+ response = _a.sent();
1755
+ return [4 /*yield*/, response.value()];
1756
+ case 2: return [2 /*return*/, _a.sent()];
1757
+ }
1758
+ });
1759
+ });
1760
+ };
1761
+ /**
1762
+ * Returns the sales statistics of the admin dashboard, optionally filtered by date range.
1763
+ * Get admin dashboard sales stats
1764
+ */
1765
+ AdminApi.prototype.getAdminDashboardSalesStatsRaw = function (requestParameters, initOverrides) {
1766
+ return __awaiter(this, void 0, void 0, function () {
1767
+ var queryParameters, headerParameters, token, tokenString, response;
1768
+ return __generator(this, function (_a) {
1769
+ switch (_a.label) {
1770
+ case 0:
1771
+ queryParameters = {};
1772
+ if (requestParameters['dateRange'] != null) {
1773
+ queryParameters['dateRange'] = requestParameters['dateRange'];
1774
+ }
1775
+ headerParameters = {};
1776
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
1777
+ token = this.configuration.accessToken;
1778
+ return [4 /*yield*/, token("bearer", [])];
1779
+ case 1:
1780
+ tokenString = _a.sent();
1781
+ if (tokenString) {
1782
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
1783
+ }
1784
+ _a.label = 2;
1785
+ case 2: return [4 /*yield*/, this.request({
1786
+ path: "/admin/stats/dashboard/sales",
1787
+ method: 'GET',
1788
+ headers: headerParameters,
1789
+ query: queryParameters,
1790
+ }, initOverrides)];
1791
+ case 3:
1792
+ response = _a.sent();
1793
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.SalesStatsDtoFromJSON)(jsonValue); })];
1794
+ }
1795
+ });
1796
+ });
1797
+ };
1798
+ /**
1799
+ * Returns the sales statistics of the admin dashboard, optionally filtered by date range.
1800
+ * Get admin dashboard sales stats
1801
+ */
1802
+ AdminApi.prototype.getAdminDashboardSalesStats = function () {
1803
+ return __awaiter(this, arguments, void 0, function (requestParameters, initOverrides) {
1804
+ var response;
1805
+ if (requestParameters === void 0) { requestParameters = {}; }
1806
+ return __generator(this, function (_a) {
1807
+ switch (_a.label) {
1808
+ case 0: return [4 /*yield*/, this.getAdminDashboardSalesStatsRaw(requestParameters, initOverrides)];
1529
1809
  case 1:
1530
1810
  response = _a.sent();
1531
1811
  return [4 /*yield*/, response.value()];
@@ -9,6 +9,9 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import type { TopAffiliateSellerDto } from './TopAffiliateSellerDto';
13
+ import type { AccountCountryStatsDto } from './AccountCountryStatsDto';
14
+ import type { TopSellerAccountDto } from './TopSellerAccountDto';
12
15
  /**
13
16
  *
14
17
  * @export
@@ -45,6 +48,24 @@ export interface AccountsStatsDto {
45
48
  * @memberof AccountsStatsDto
46
49
  */
47
50
  withDomainsVerified: number;
51
+ /**
52
+ * Number of accounts per billing country
53
+ * @type {Array<AccountCountryStatsDto>}
54
+ * @memberof AccountsStatsDto
55
+ */
56
+ countries: Array<AccountCountryStatsDto>;
57
+ /**
58
+ * Accounts with the most sold domains
59
+ * @type {Array<TopSellerAccountDto>}
60
+ * @memberof AccountsStatsDto
61
+ */
62
+ topSellers: Array<TopSellerAccountDto>;
63
+ /**
64
+ * Accounts with the most paid buyer sales that used their affiliate code
65
+ * @type {Array<TopAffiliateSellerDto>}
66
+ * @memberof AccountsStatsDto
67
+ */
68
+ topAffiliateSellers: Array<TopAffiliateSellerDto>;
48
69
  }
49
70
  /**
50
71
  * Check if a given object implements the AccountsStatsDto interface.
@@ -18,6 +18,9 @@ exports.AccountsStatsDtoFromJSON = AccountsStatsDtoFromJSON;
18
18
  exports.AccountsStatsDtoFromJSONTyped = AccountsStatsDtoFromJSONTyped;
19
19
  exports.AccountsStatsDtoToJSON = AccountsStatsDtoToJSON;
20
20
  exports.AccountsStatsDtoToJSONTyped = AccountsStatsDtoToJSONTyped;
21
+ var TopAffiliateSellerDto_1 = require("./TopAffiliateSellerDto");
22
+ var AccountCountryStatsDto_1 = require("./AccountCountryStatsDto");
23
+ var TopSellerAccountDto_1 = require("./TopSellerAccountDto");
21
24
  /**
22
25
  * Check if a given object implements the AccountsStatsDto interface.
23
26
  */
@@ -32,6 +35,12 @@ function instanceOfAccountsStatsDto(value) {
32
35
  return false;
33
36
  if (!('withDomainsVerified' in value) || value['withDomainsVerified'] === undefined)
34
37
  return false;
38
+ if (!('countries' in value) || value['countries'] === undefined)
39
+ return false;
40
+ if (!('topSellers' in value) || value['topSellers'] === undefined)
41
+ return false;
42
+ if (!('topAffiliateSellers' in value) || value['topAffiliateSellers'] === undefined)
43
+ return false;
35
44
  return true;
36
45
  }
37
46
  function AccountsStatsDtoFromJSON(json) {
@@ -47,6 +56,9 @@ function AccountsStatsDtoFromJSONTyped(json, ignoreDiscriminator) {
47
56
  'withDomains': json['withDomains'],
48
57
  'withDomainsPointingDns': json['withDomainsPointingDns'],
49
58
  'withDomainsVerified': json['withDomainsVerified'],
59
+ 'countries': (json['countries'].map(AccountCountryStatsDto_1.AccountCountryStatsDtoFromJSON)),
60
+ 'topSellers': (json['topSellers'].map(TopSellerAccountDto_1.TopSellerAccountDtoFromJSON)),
61
+ 'topAffiliateSellers': (json['topAffiliateSellers'].map(TopAffiliateSellerDto_1.TopAffiliateSellerDtoFromJSON)),
50
62
  };
51
63
  }
52
64
  function AccountsStatsDtoToJSON(json) {
@@ -63,5 +75,8 @@ function AccountsStatsDtoToJSONTyped(value, ignoreDiscriminator) {
63
75
  'withDomains': value['withDomains'],
64
76
  'withDomainsPointingDns': value['withDomainsPointingDns'],
65
77
  'withDomainsVerified': value['withDomainsVerified'],
78
+ 'countries': (value['countries'].map(AccountCountryStatsDto_1.AccountCountryStatsDtoToJSON)),
79
+ 'topSellers': (value['topSellers'].map(TopSellerAccountDto_1.TopSellerAccountDtoToJSON)),
80
+ 'topAffiliateSellers': (value['topAffiliateSellers'].map(TopAffiliateSellerDto_1.TopAffiliateSellerDtoToJSON)),
66
81
  };
67
82
  }
@@ -21,6 +21,12 @@ export interface AffiliatesStatsDto {
21
21
  * @memberof AffiliatesStatsDto
22
22
  */
23
23
  accountsWithAffiliates: number;
24
+ /**
25
+ * Total number of accounts
26
+ * @type {number}
27
+ * @memberof AffiliatesStatsDto
28
+ */
29
+ totalAccounts: number;
24
30
  }
25
31
  /**
26
32
  * Check if a given object implements the AffiliatesStatsDto interface.
@@ -24,6 +24,8 @@ exports.AffiliatesStatsDtoToJSONTyped = AffiliatesStatsDtoToJSONTyped;
24
24
  function instanceOfAffiliatesStatsDto(value) {
25
25
  if (!('accountsWithAffiliates' in value) || value['accountsWithAffiliates'] === undefined)
26
26
  return false;
27
+ if (!('totalAccounts' in value) || value['totalAccounts'] === undefined)
28
+ return false;
27
29
  return true;
28
30
  }
29
31
  function AffiliatesStatsDtoFromJSON(json) {
@@ -35,6 +37,7 @@ function AffiliatesStatsDtoFromJSONTyped(json, ignoreDiscriminator) {
35
37
  }
36
38
  return {
37
39
  'accountsWithAffiliates': json['accountsWithAffiliates'],
40
+ 'totalAccounts': json['totalAccounts'],
38
41
  };
39
42
  }
40
43
  function AffiliatesStatsDtoToJSON(json) {
@@ -47,5 +50,6 @@ function AffiliatesStatsDtoToJSONTyped(value, ignoreDiscriminator) {
47
50
  }
48
51
  return {
49
52
  'accountsWithAffiliates': value['accountsWithAffiliates'],
53
+ 'totalAccounts': value['totalAccounts'],
50
54
  };
51
55
  }
@@ -33,6 +33,12 @@ export interface AuctionsStatsDto {
33
33
  * @memberof AuctionsStatsDto
34
34
  */
35
35
  accountsUsingPaidAuctionsCount: number;
36
+ /**
37
+ * Total number of accounts
38
+ * @type {number}
39
+ * @memberof AuctionsStatsDto
40
+ */
41
+ totalAccounts: number;
36
42
  }
37
43
  /**
38
44
  * Check if a given object implements the AuctionsStatsDto interface.
@@ -28,6 +28,8 @@ function instanceOfAuctionsStatsDto(value) {
28
28
  return false;
29
29
  if (!('accountsUsingPaidAuctionsCount' in value) || value['accountsUsingPaidAuctionsCount'] === undefined)
30
30
  return false;
31
+ if (!('totalAccounts' in value) || value['totalAccounts'] === undefined)
32
+ return false;
31
33
  return true;
32
34
  }
33
35
  function AuctionsStatsDtoFromJSON(json) {
@@ -41,6 +43,7 @@ function AuctionsStatsDtoFromJSONTyped(json, ignoreDiscriminator) {
41
43
  'paidAuctionsCount': json['paidAuctionsCount'],
42
44
  'totalAuctionsCount': json['totalAuctionsCount'],
43
45
  'accountsUsingPaidAuctionsCount': json['accountsUsingPaidAuctionsCount'],
46
+ 'totalAccounts': json['totalAccounts'],
44
47
  };
45
48
  }
46
49
  function AuctionsStatsDtoToJSON(json) {
@@ -55,5 +58,6 @@ function AuctionsStatsDtoToJSONTyped(value, ignoreDiscriminator) {
55
58
  'paidAuctionsCount': value['paidAuctionsCount'],
56
59
  'totalAuctionsCount': value['totalAuctionsCount'],
57
60
  'accountsUsingPaidAuctionsCount': value['accountsUsingPaidAuctionsCount'],
61
+ 'totalAccounts': value['totalAccounts'],
58
62
  };
59
63
  }