@bluefin-exchange/pro-sdk 0.1.45 → 0.1.48
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.
- package/dist/example.js +1 -1
- package/dist/src/api.d.ts +40 -24
- package/dist/src/api.js +68 -52
- package/example.ts +6 -2
- package/package.json +1 -1
- package/src/api.ts +74 -60
- package/src/docs/RewardsApi.md +32 -12
package/dist/example.js
CHANGED
|
@@ -105,7 +105,7 @@ function main() {
|
|
|
105
105
|
// Get market data
|
|
106
106
|
const candleStick = (yield client.exchangeDataApi.getCandlestickData(symbol, index_1.KlineInterval._1m, index_1.CandlePriceType.Oracle)).data;
|
|
107
107
|
logger.info(`Candle stick: ${JSON.stringify(candleStick)}`);
|
|
108
|
-
const rewards = (yield client.rewardsDataApi.getCampaignRewards("TRADE_AND_EARN")).data;
|
|
108
|
+
const rewards = (yield client.rewardsDataApi.getCampaignRewards("TRADE_AND_EARN", suiWallet.toSuiAddress())).data;
|
|
109
109
|
logger.info(`Rewards: ${JSON.stringify(rewards)}`);
|
|
110
110
|
const depth = (yield client.exchangeDataApi.getOrderbookDepth(symbol)).data;
|
|
111
111
|
logger.info(`Depth: ${JSON.stringify(depth)}`);
|
package/dist/src/api.d.ts
CHANGED
|
@@ -5326,7 +5326,7 @@ export declare const RewardsApiAxiosParamCreator: (configuration?: Configuration
|
|
|
5326
5326
|
/**
|
|
5327
5327
|
* Returns rankings and earnings for affiliates, sorted by the specified category
|
|
5328
5328
|
* @summary Get affiliate rankings and earnings
|
|
5329
|
-
* @param {GetAffiliateLeaderDashboardSortByEnum} sortBy The category to sort rankings by
|
|
5329
|
+
* @param {GetAffiliateLeaderDashboardSortByEnum} [sortBy] The category to sort rankings by
|
|
5330
5330
|
* @param {GetAffiliateLeaderDashboardSortOrderEnum} [sortOrder] The order to sort rankings by
|
|
5331
5331
|
* @param {number} [page] The page number to retrieve in a paginated response
|
|
5332
5332
|
* @param {number} [limit] The page size for pagination
|
|
@@ -5334,17 +5334,19 @@ export declare const RewardsApiAxiosParamCreator: (configuration?: Configuration
|
|
|
5334
5334
|
* @param {*} [options] Override http request option.
|
|
5335
5335
|
* @throws {RequiredError}
|
|
5336
5336
|
*/
|
|
5337
|
-
getAffiliateLeaderDashboard: (sortBy
|
|
5337
|
+
getAffiliateLeaderDashboard: (sortBy?: GetAffiliateLeaderDashboardSortByEnum, sortOrder?: GetAffiliateLeaderDashboardSortOrderEnum, page?: number, limit?: number, search?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
5338
5338
|
/**
|
|
5339
5339
|
* Returns the affiliate metadata
|
|
5340
5340
|
* @summary Get affiliate metadata
|
|
5341
|
+
* @param {string} userAddress Specify wallet address.
|
|
5341
5342
|
* @param {*} [options] Override http request option.
|
|
5342
5343
|
* @throws {RequiredError}
|
|
5343
5344
|
*/
|
|
5344
|
-
getAffiliateMetadata: (options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
5345
|
+
getAffiliateMetadata: (userAddress: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
5345
5346
|
/**
|
|
5346
5347
|
* Returns detailed earnings breakdown for an affiliate users earnings (including perps, spot LP, lending), referral earnings, and total earnings
|
|
5347
5348
|
* @summary Get detailed affiliate earnings overview
|
|
5349
|
+
* @param {string} userAddress Specify wallet address.
|
|
5348
5350
|
* @param {number} [page] The page number to retrieve in a paginated response
|
|
5349
5351
|
* @param {number} [limit] The page size for pagination
|
|
5350
5352
|
* @param {GetAffiliateOverviewSortByEnum} [sortBy] The category to sort earnings by
|
|
@@ -5353,23 +5355,25 @@ export declare const RewardsApiAxiosParamCreator: (configuration?: Configuration
|
|
|
5353
5355
|
* @param {*} [options] Override http request option.
|
|
5354
5356
|
* @throws {RequiredError}
|
|
5355
5357
|
*/
|
|
5356
|
-
getAffiliateOverview: (page?: number, limit?: number, sortBy?: GetAffiliateOverviewSortByEnum, sortOrder?: GetAffiliateOverviewSortOrderEnum, search?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
5358
|
+
getAffiliateOverview: (userAddress: string, page?: number, limit?: number, sortBy?: GetAffiliateOverviewSortByEnum, sortOrder?: GetAffiliateOverviewSortOrderEnum, search?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
5357
5359
|
/**
|
|
5358
5360
|
* Returns performance summary for an affiliate including total referrals, earnings, and rankings
|
|
5359
5361
|
* @summary Get affiliate performance summary
|
|
5362
|
+
* @param {string} userAddress Specify wallet address.
|
|
5360
5363
|
* @param {*} [options] Override http request option.
|
|
5361
5364
|
* @throws {RequiredError}
|
|
5362
5365
|
*/
|
|
5363
|
-
getAffiliateSummary: (options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
5366
|
+
getAffiliateSummary: (userAddress: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
5364
5367
|
/**
|
|
5365
5368
|
* Returns the rewards earned by users for a specific campaign
|
|
5366
5369
|
* @summary Get rewards information for a specific campaign
|
|
5367
5370
|
* @param {string} campaignName Specify the campaign name
|
|
5371
|
+
* @param {string} userAddress Specify wallet address.
|
|
5368
5372
|
* @param {number} [epochNumber] Optionally specify epoch number.
|
|
5369
5373
|
* @param {*} [options] Override http request option.
|
|
5370
5374
|
* @throws {RequiredError}
|
|
5371
5375
|
*/
|
|
5372
|
-
getCampaignRewards: (campaignName: string, epochNumber?: number, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
5376
|
+
getCampaignRewards: (campaignName: string, userAddress: string, epochNumber?: number, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
5373
5377
|
/**
|
|
5374
5378
|
* Returns the rewards earned by users for the intervals .
|
|
5375
5379
|
* @summary Get rewards information for the intervals
|
|
@@ -5461,7 +5465,7 @@ export declare const RewardsApiFp: (configuration?: Configuration) => {
|
|
|
5461
5465
|
/**
|
|
5462
5466
|
* Returns rankings and earnings for affiliates, sorted by the specified category
|
|
5463
5467
|
* @summary Get affiliate rankings and earnings
|
|
5464
|
-
* @param {GetAffiliateLeaderDashboardSortByEnum} sortBy The category to sort rankings by
|
|
5468
|
+
* @param {GetAffiliateLeaderDashboardSortByEnum} [sortBy] The category to sort rankings by
|
|
5465
5469
|
* @param {GetAffiliateLeaderDashboardSortOrderEnum} [sortOrder] The order to sort rankings by
|
|
5466
5470
|
* @param {number} [page] The page number to retrieve in a paginated response
|
|
5467
5471
|
* @param {number} [limit] The page size for pagination
|
|
@@ -5469,17 +5473,19 @@ export declare const RewardsApiFp: (configuration?: Configuration) => {
|
|
|
5469
5473
|
* @param {*} [options] Override http request option.
|
|
5470
5474
|
* @throws {RequiredError}
|
|
5471
5475
|
*/
|
|
5472
|
-
getAffiliateLeaderDashboard(sortBy
|
|
5476
|
+
getAffiliateLeaderDashboard(sortBy?: GetAffiliateLeaderDashboardSortByEnum, sortOrder?: GetAffiliateLeaderDashboardSortOrderEnum, page?: number, limit?: number, search?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetAffiliateLeaderDashboard200Response>>;
|
|
5473
5477
|
/**
|
|
5474
5478
|
* Returns the affiliate metadata
|
|
5475
5479
|
* @summary Get affiliate metadata
|
|
5480
|
+
* @param {string} userAddress Specify wallet address.
|
|
5476
5481
|
* @param {*} [options] Override http request option.
|
|
5477
5482
|
* @throws {RequiredError}
|
|
5478
5483
|
*/
|
|
5479
|
-
getAffiliateMetadata(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AffiliateMetadata>>;
|
|
5484
|
+
getAffiliateMetadata(userAddress: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AffiliateMetadata>>;
|
|
5480
5485
|
/**
|
|
5481
5486
|
* Returns detailed earnings breakdown for an affiliate users earnings (including perps, spot LP, lending), referral earnings, and total earnings
|
|
5482
5487
|
* @summary Get detailed affiliate earnings overview
|
|
5488
|
+
* @param {string} userAddress Specify wallet address.
|
|
5483
5489
|
* @param {number} [page] The page number to retrieve in a paginated response
|
|
5484
5490
|
* @param {number} [limit] The page size for pagination
|
|
5485
5491
|
* @param {GetAffiliateOverviewSortByEnum} [sortBy] The category to sort earnings by
|
|
@@ -5488,23 +5494,25 @@ export declare const RewardsApiFp: (configuration?: Configuration) => {
|
|
|
5488
5494
|
* @param {*} [options] Override http request option.
|
|
5489
5495
|
* @throws {RequiredError}
|
|
5490
5496
|
*/
|
|
5491
|
-
getAffiliateOverview(page?: number, limit?: number, sortBy?: GetAffiliateOverviewSortByEnum, sortOrder?: GetAffiliateOverviewSortOrderEnum, search?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetAffiliateOverview200Response>>;
|
|
5497
|
+
getAffiliateOverview(userAddress: string, page?: number, limit?: number, sortBy?: GetAffiliateOverviewSortByEnum, sortOrder?: GetAffiliateOverviewSortOrderEnum, search?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetAffiliateOverview200Response>>;
|
|
5492
5498
|
/**
|
|
5493
5499
|
* Returns performance summary for an affiliate including total referrals, earnings, and rankings
|
|
5494
5500
|
* @summary Get affiliate performance summary
|
|
5501
|
+
* @param {string} userAddress Specify wallet address.
|
|
5495
5502
|
* @param {*} [options] Override http request option.
|
|
5496
5503
|
* @throws {RequiredError}
|
|
5497
5504
|
*/
|
|
5498
|
-
getAffiliateSummary(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AffiliateSummary>>;
|
|
5505
|
+
getAffiliateSummary(userAddress: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AffiliateSummary>>;
|
|
5499
5506
|
/**
|
|
5500
5507
|
* Returns the rewards earned by users for a specific campaign
|
|
5501
5508
|
* @summary Get rewards information for a specific campaign
|
|
5502
5509
|
* @param {string} campaignName Specify the campaign name
|
|
5510
|
+
* @param {string} userAddress Specify wallet address.
|
|
5503
5511
|
* @param {number} [epochNumber] Optionally specify epoch number.
|
|
5504
5512
|
* @param {*} [options] Override http request option.
|
|
5505
5513
|
* @throws {RequiredError}
|
|
5506
5514
|
*/
|
|
5507
|
-
getCampaignRewards(campaignName: string, epochNumber?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<UserCampaignRewards>>>;
|
|
5515
|
+
getCampaignRewards(campaignName: string, userAddress: string, epochNumber?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<UserCampaignRewards>>>;
|
|
5508
5516
|
/**
|
|
5509
5517
|
* Returns the rewards earned by users for the intervals .
|
|
5510
5518
|
* @summary Get rewards information for the intervals
|
|
@@ -5596,7 +5604,7 @@ export declare const RewardsApiFactory: (configuration?: Configuration, basePath
|
|
|
5596
5604
|
/**
|
|
5597
5605
|
* Returns rankings and earnings for affiliates, sorted by the specified category
|
|
5598
5606
|
* @summary Get affiliate rankings and earnings
|
|
5599
|
-
* @param {GetAffiliateLeaderDashboardSortByEnum} sortBy The category to sort rankings by
|
|
5607
|
+
* @param {GetAffiliateLeaderDashboardSortByEnum} [sortBy] The category to sort rankings by
|
|
5600
5608
|
* @param {GetAffiliateLeaderDashboardSortOrderEnum} [sortOrder] The order to sort rankings by
|
|
5601
5609
|
* @param {number} [page] The page number to retrieve in a paginated response
|
|
5602
5610
|
* @param {number} [limit] The page size for pagination
|
|
@@ -5604,17 +5612,19 @@ export declare const RewardsApiFactory: (configuration?: Configuration, basePath
|
|
|
5604
5612
|
* @param {*} [options] Override http request option.
|
|
5605
5613
|
* @throws {RequiredError}
|
|
5606
5614
|
*/
|
|
5607
|
-
getAffiliateLeaderDashboard(sortBy
|
|
5615
|
+
getAffiliateLeaderDashboard(sortBy?: GetAffiliateLeaderDashboardSortByEnum, sortOrder?: GetAffiliateLeaderDashboardSortOrderEnum, page?: number, limit?: number, search?: string, options?: RawAxiosRequestConfig): AxiosPromise<GetAffiliateLeaderDashboard200Response>;
|
|
5608
5616
|
/**
|
|
5609
5617
|
* Returns the affiliate metadata
|
|
5610
5618
|
* @summary Get affiliate metadata
|
|
5619
|
+
* @param {string} userAddress Specify wallet address.
|
|
5611
5620
|
* @param {*} [options] Override http request option.
|
|
5612
5621
|
* @throws {RequiredError}
|
|
5613
5622
|
*/
|
|
5614
|
-
getAffiliateMetadata(options?: RawAxiosRequestConfig): AxiosPromise<AffiliateMetadata>;
|
|
5623
|
+
getAffiliateMetadata(userAddress: string, options?: RawAxiosRequestConfig): AxiosPromise<AffiliateMetadata>;
|
|
5615
5624
|
/**
|
|
5616
5625
|
* Returns detailed earnings breakdown for an affiliate users earnings (including perps, spot LP, lending), referral earnings, and total earnings
|
|
5617
5626
|
* @summary Get detailed affiliate earnings overview
|
|
5627
|
+
* @param {string} userAddress Specify wallet address.
|
|
5618
5628
|
* @param {number} [page] The page number to retrieve in a paginated response
|
|
5619
5629
|
* @param {number} [limit] The page size for pagination
|
|
5620
5630
|
* @param {GetAffiliateOverviewSortByEnum} [sortBy] The category to sort earnings by
|
|
@@ -5623,23 +5633,25 @@ export declare const RewardsApiFactory: (configuration?: Configuration, basePath
|
|
|
5623
5633
|
* @param {*} [options] Override http request option.
|
|
5624
5634
|
* @throws {RequiredError}
|
|
5625
5635
|
*/
|
|
5626
|
-
getAffiliateOverview(page?: number, limit?: number, sortBy?: GetAffiliateOverviewSortByEnum, sortOrder?: GetAffiliateOverviewSortOrderEnum, search?: string, options?: RawAxiosRequestConfig): AxiosPromise<GetAffiliateOverview200Response>;
|
|
5636
|
+
getAffiliateOverview(userAddress: string, page?: number, limit?: number, sortBy?: GetAffiliateOverviewSortByEnum, sortOrder?: GetAffiliateOverviewSortOrderEnum, search?: string, options?: RawAxiosRequestConfig): AxiosPromise<GetAffiliateOverview200Response>;
|
|
5627
5637
|
/**
|
|
5628
5638
|
* Returns performance summary for an affiliate including total referrals, earnings, and rankings
|
|
5629
5639
|
* @summary Get affiliate performance summary
|
|
5640
|
+
* @param {string} userAddress Specify wallet address.
|
|
5630
5641
|
* @param {*} [options] Override http request option.
|
|
5631
5642
|
* @throws {RequiredError}
|
|
5632
5643
|
*/
|
|
5633
|
-
getAffiliateSummary(options?: RawAxiosRequestConfig): AxiosPromise<AffiliateSummary>;
|
|
5644
|
+
getAffiliateSummary(userAddress: string, options?: RawAxiosRequestConfig): AxiosPromise<AffiliateSummary>;
|
|
5634
5645
|
/**
|
|
5635
5646
|
* Returns the rewards earned by users for a specific campaign
|
|
5636
5647
|
* @summary Get rewards information for a specific campaign
|
|
5637
5648
|
* @param {string} campaignName Specify the campaign name
|
|
5649
|
+
* @param {string} userAddress Specify wallet address.
|
|
5638
5650
|
* @param {number} [epochNumber] Optionally specify epoch number.
|
|
5639
5651
|
* @param {*} [options] Override http request option.
|
|
5640
5652
|
* @throws {RequiredError}
|
|
5641
5653
|
*/
|
|
5642
|
-
getCampaignRewards(campaignName: string, epochNumber?: number, options?: RawAxiosRequestConfig): AxiosPromise<Array<UserCampaignRewards>>;
|
|
5654
|
+
getCampaignRewards(campaignName: string, userAddress: string, epochNumber?: number, options?: RawAxiosRequestConfig): AxiosPromise<Array<UserCampaignRewards>>;
|
|
5643
5655
|
/**
|
|
5644
5656
|
* Returns the rewards earned by users for the intervals .
|
|
5645
5657
|
* @summary Get rewards information for the intervals
|
|
@@ -5734,7 +5746,7 @@ export declare class RewardsApi extends BaseAPI {
|
|
|
5734
5746
|
/**
|
|
5735
5747
|
* Returns rankings and earnings for affiliates, sorted by the specified category
|
|
5736
5748
|
* @summary Get affiliate rankings and earnings
|
|
5737
|
-
* @param {GetAffiliateLeaderDashboardSortByEnum} sortBy The category to sort rankings by
|
|
5749
|
+
* @param {GetAffiliateLeaderDashboardSortByEnum} [sortBy] The category to sort rankings by
|
|
5738
5750
|
* @param {GetAffiliateLeaderDashboardSortOrderEnum} [sortOrder] The order to sort rankings by
|
|
5739
5751
|
* @param {number} [page] The page number to retrieve in a paginated response
|
|
5740
5752
|
* @param {number} [limit] The page size for pagination
|
|
@@ -5743,18 +5755,20 @@ export declare class RewardsApi extends BaseAPI {
|
|
|
5743
5755
|
* @throws {RequiredError}
|
|
5744
5756
|
* @memberof RewardsApi
|
|
5745
5757
|
*/
|
|
5746
|
-
getAffiliateLeaderDashboard(sortBy
|
|
5758
|
+
getAffiliateLeaderDashboard(sortBy?: GetAffiliateLeaderDashboardSortByEnum, sortOrder?: GetAffiliateLeaderDashboardSortOrderEnum, page?: number, limit?: number, search?: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<GetAffiliateLeaderDashboard200Response, any>>;
|
|
5747
5759
|
/**
|
|
5748
5760
|
* Returns the affiliate metadata
|
|
5749
5761
|
* @summary Get affiliate metadata
|
|
5762
|
+
* @param {string} userAddress Specify wallet address.
|
|
5750
5763
|
* @param {*} [options] Override http request option.
|
|
5751
5764
|
* @throws {RequiredError}
|
|
5752
5765
|
* @memberof RewardsApi
|
|
5753
5766
|
*/
|
|
5754
|
-
getAffiliateMetadata(options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<AffiliateMetadata, any>>;
|
|
5767
|
+
getAffiliateMetadata(userAddress: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<AffiliateMetadata, any>>;
|
|
5755
5768
|
/**
|
|
5756
5769
|
* Returns detailed earnings breakdown for an affiliate users earnings (including perps, spot LP, lending), referral earnings, and total earnings
|
|
5757
5770
|
* @summary Get detailed affiliate earnings overview
|
|
5771
|
+
* @param {string} userAddress Specify wallet address.
|
|
5758
5772
|
* @param {number} [page] The page number to retrieve in a paginated response
|
|
5759
5773
|
* @param {number} [limit] The page size for pagination
|
|
5760
5774
|
* @param {GetAffiliateOverviewSortByEnum} [sortBy] The category to sort earnings by
|
|
@@ -5764,25 +5778,27 @@ export declare class RewardsApi extends BaseAPI {
|
|
|
5764
5778
|
* @throws {RequiredError}
|
|
5765
5779
|
* @memberof RewardsApi
|
|
5766
5780
|
*/
|
|
5767
|
-
getAffiliateOverview(page?: number, limit?: number, sortBy?: GetAffiliateOverviewSortByEnum, sortOrder?: GetAffiliateOverviewSortOrderEnum, search?: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<GetAffiliateOverview200Response, any>>;
|
|
5781
|
+
getAffiliateOverview(userAddress: string, page?: number, limit?: number, sortBy?: GetAffiliateOverviewSortByEnum, sortOrder?: GetAffiliateOverviewSortOrderEnum, search?: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<GetAffiliateOverview200Response, any>>;
|
|
5768
5782
|
/**
|
|
5769
5783
|
* Returns performance summary for an affiliate including total referrals, earnings, and rankings
|
|
5770
5784
|
* @summary Get affiliate performance summary
|
|
5785
|
+
* @param {string} userAddress Specify wallet address.
|
|
5771
5786
|
* @param {*} [options] Override http request option.
|
|
5772
5787
|
* @throws {RequiredError}
|
|
5773
5788
|
* @memberof RewardsApi
|
|
5774
5789
|
*/
|
|
5775
|
-
getAffiliateSummary(options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<AffiliateSummary, any>>;
|
|
5790
|
+
getAffiliateSummary(userAddress: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<AffiliateSummary, any>>;
|
|
5776
5791
|
/**
|
|
5777
5792
|
* Returns the rewards earned by users for a specific campaign
|
|
5778
5793
|
* @summary Get rewards information for a specific campaign
|
|
5779
5794
|
* @param {string} campaignName Specify the campaign name
|
|
5795
|
+
* @param {string} userAddress Specify wallet address.
|
|
5780
5796
|
* @param {number} [epochNumber] Optionally specify epoch number.
|
|
5781
5797
|
* @param {*} [options] Override http request option.
|
|
5782
5798
|
* @throws {RequiredError}
|
|
5783
5799
|
* @memberof RewardsApi
|
|
5784
5800
|
*/
|
|
5785
|
-
getCampaignRewards(campaignName: string, epochNumber?: number, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<UserCampaignRewards[], any>>;
|
|
5801
|
+
getCampaignRewards(campaignName: string, userAddress: string, epochNumber?: number, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<UserCampaignRewards[], any>>;
|
|
5786
5802
|
/**
|
|
5787
5803
|
* Returns the rewards earned by users for the intervals .
|
|
5788
5804
|
* @summary Get rewards information for the intervals
|
package/dist/src/api.js
CHANGED
|
@@ -1965,9 +1965,6 @@ const RewardsApiAxiosParamCreator = function (configuration) {
|
|
|
1965
1965
|
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1966
1966
|
const localVarHeaderParameter = {};
|
|
1967
1967
|
const localVarQueryParameter = {};
|
|
1968
|
-
// authentication bearerAuth required
|
|
1969
|
-
// http bearer authentication required
|
|
1970
|
-
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
1971
1968
|
if (userAddress !== undefined) {
|
|
1972
1969
|
localVarQueryParameter['userAddress'] = userAddress;
|
|
1973
1970
|
}
|
|
@@ -1988,7 +1985,7 @@ const RewardsApiAxiosParamCreator = function (configuration) {
|
|
|
1988
1985
|
/**
|
|
1989
1986
|
* Returns rankings and earnings for affiliates, sorted by the specified category
|
|
1990
1987
|
* @summary Get affiliate rankings and earnings
|
|
1991
|
-
* @param {GetAffiliateLeaderDashboardSortByEnum} sortBy The category to sort rankings by
|
|
1988
|
+
* @param {GetAffiliateLeaderDashboardSortByEnum} [sortBy] The category to sort rankings by
|
|
1992
1989
|
* @param {GetAffiliateLeaderDashboardSortOrderEnum} [sortOrder] The order to sort rankings by
|
|
1993
1990
|
* @param {number} [page] The page number to retrieve in a paginated response
|
|
1994
1991
|
* @param {number} [limit] The page size for pagination
|
|
@@ -1997,8 +1994,6 @@ const RewardsApiAxiosParamCreator = function (configuration) {
|
|
|
1997
1994
|
* @throws {RequiredError}
|
|
1998
1995
|
*/
|
|
1999
1996
|
getAffiliateLeaderDashboard: (sortBy_1, sortOrder_1, page_1, limit_1, search_1, ...args_1) => __awaiter(this, [sortBy_1, sortOrder_1, page_1, limit_1, search_1, ...args_1], void 0, function* (sortBy, sortOrder, page, limit, search, options = {}) {
|
|
2000
|
-
// verify required parameter 'sortBy' is not null or undefined
|
|
2001
|
-
(0, common_1.assertParamExists)('getAffiliateLeaderDashboard', 'sortBy', sortBy);
|
|
2002
1997
|
const localVarPath = `/v1/rewards/affiliate/leaderDashboard`;
|
|
2003
1998
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2004
1999
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
@@ -2009,9 +2004,6 @@ const RewardsApiAxiosParamCreator = function (configuration) {
|
|
|
2009
2004
|
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
2010
2005
|
const localVarHeaderParameter = {};
|
|
2011
2006
|
const localVarQueryParameter = {};
|
|
2012
|
-
// authentication bearerAuth required
|
|
2013
|
-
// http bearer authentication required
|
|
2014
|
-
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
2015
2007
|
if (sortBy !== undefined) {
|
|
2016
2008
|
localVarQueryParameter['sortBy'] = sortBy;
|
|
2017
2009
|
}
|
|
@@ -2038,10 +2030,13 @@ const RewardsApiAxiosParamCreator = function (configuration) {
|
|
|
2038
2030
|
/**
|
|
2039
2031
|
* Returns the affiliate metadata
|
|
2040
2032
|
* @summary Get affiliate metadata
|
|
2033
|
+
* @param {string} userAddress Specify wallet address.
|
|
2041
2034
|
* @param {*} [options] Override http request option.
|
|
2042
2035
|
* @throws {RequiredError}
|
|
2043
2036
|
*/
|
|
2044
|
-
getAffiliateMetadata: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
|
|
2037
|
+
getAffiliateMetadata: (userAddress_1, ...args_1) => __awaiter(this, [userAddress_1, ...args_1], void 0, function* (userAddress, options = {}) {
|
|
2038
|
+
// verify required parameter 'userAddress' is not null or undefined
|
|
2039
|
+
(0, common_1.assertParamExists)('getAffiliateMetadata', 'userAddress', userAddress);
|
|
2045
2040
|
const localVarPath = `/v1/rewards/affiliate`;
|
|
2046
2041
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2047
2042
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
@@ -2052,9 +2047,9 @@ const RewardsApiAxiosParamCreator = function (configuration) {
|
|
|
2052
2047
|
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
2053
2048
|
const localVarHeaderParameter = {};
|
|
2054
2049
|
const localVarQueryParameter = {};
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2050
|
+
if (userAddress !== undefined) {
|
|
2051
|
+
localVarQueryParameter['userAddress'] = userAddress;
|
|
2052
|
+
}
|
|
2058
2053
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2059
2054
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2060
2055
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
@@ -2066,6 +2061,7 @@ const RewardsApiAxiosParamCreator = function (configuration) {
|
|
|
2066
2061
|
/**
|
|
2067
2062
|
* Returns detailed earnings breakdown for an affiliate users earnings (including perps, spot LP, lending), referral earnings, and total earnings
|
|
2068
2063
|
* @summary Get detailed affiliate earnings overview
|
|
2064
|
+
* @param {string} userAddress Specify wallet address.
|
|
2069
2065
|
* @param {number} [page] The page number to retrieve in a paginated response
|
|
2070
2066
|
* @param {number} [limit] The page size for pagination
|
|
2071
2067
|
* @param {GetAffiliateOverviewSortByEnum} [sortBy] The category to sort earnings by
|
|
@@ -2074,7 +2070,9 @@ const RewardsApiAxiosParamCreator = function (configuration) {
|
|
|
2074
2070
|
* @param {*} [options] Override http request option.
|
|
2075
2071
|
* @throws {RequiredError}
|
|
2076
2072
|
*/
|
|
2077
|
-
getAffiliateOverview: (page_1, limit_1, sortBy_1, sortOrder_1, search_1, ...args_1) => __awaiter(this, [page_1, limit_1, sortBy_1, sortOrder_1, search_1, ...args_1], void 0, function* (page, limit, sortBy, sortOrder, search, options = {}) {
|
|
2073
|
+
getAffiliateOverview: (userAddress_1, page_1, limit_1, sortBy_1, sortOrder_1, search_1, ...args_1) => __awaiter(this, [userAddress_1, page_1, limit_1, sortBy_1, sortOrder_1, search_1, ...args_1], void 0, function* (userAddress, page, limit, sortBy, sortOrder, search, options = {}) {
|
|
2074
|
+
// verify required parameter 'userAddress' is not null or undefined
|
|
2075
|
+
(0, common_1.assertParamExists)('getAffiliateOverview', 'userAddress', userAddress);
|
|
2078
2076
|
const localVarPath = `/v1/rewards/affiliate/overview`;
|
|
2079
2077
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2080
2078
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
@@ -2085,9 +2083,6 @@ const RewardsApiAxiosParamCreator = function (configuration) {
|
|
|
2085
2083
|
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
2086
2084
|
const localVarHeaderParameter = {};
|
|
2087
2085
|
const localVarQueryParameter = {};
|
|
2088
|
-
// authentication bearerAuth required
|
|
2089
|
-
// http bearer authentication required
|
|
2090
|
-
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
2091
2086
|
if (page !== undefined) {
|
|
2092
2087
|
localVarQueryParameter['page'] = page;
|
|
2093
2088
|
}
|
|
@@ -2103,6 +2098,9 @@ const RewardsApiAxiosParamCreator = function (configuration) {
|
|
|
2103
2098
|
if (search !== undefined) {
|
|
2104
2099
|
localVarQueryParameter['search'] = search;
|
|
2105
2100
|
}
|
|
2101
|
+
if (userAddress !== undefined) {
|
|
2102
|
+
localVarQueryParameter['userAddress'] = userAddress;
|
|
2103
|
+
}
|
|
2106
2104
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2107
2105
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2108
2106
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
@@ -2114,10 +2112,13 @@ const RewardsApiAxiosParamCreator = function (configuration) {
|
|
|
2114
2112
|
/**
|
|
2115
2113
|
* Returns performance summary for an affiliate including total referrals, earnings, and rankings
|
|
2116
2114
|
* @summary Get affiliate performance summary
|
|
2115
|
+
* @param {string} userAddress Specify wallet address.
|
|
2117
2116
|
* @param {*} [options] Override http request option.
|
|
2118
2117
|
* @throws {RequiredError}
|
|
2119
2118
|
*/
|
|
2120
|
-
getAffiliateSummary: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
|
|
2119
|
+
getAffiliateSummary: (userAddress_1, ...args_1) => __awaiter(this, [userAddress_1, ...args_1], void 0, function* (userAddress, options = {}) {
|
|
2120
|
+
// verify required parameter 'userAddress' is not null or undefined
|
|
2121
|
+
(0, common_1.assertParamExists)('getAffiliateSummary', 'userAddress', userAddress);
|
|
2121
2122
|
const localVarPath = `/v1/rewards/affiliate/summary`;
|
|
2122
2123
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2123
2124
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
@@ -2128,9 +2129,9 @@ const RewardsApiAxiosParamCreator = function (configuration) {
|
|
|
2128
2129
|
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
2129
2130
|
const localVarHeaderParameter = {};
|
|
2130
2131
|
const localVarQueryParameter = {};
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2132
|
+
if (userAddress !== undefined) {
|
|
2133
|
+
localVarQueryParameter['userAddress'] = userAddress;
|
|
2134
|
+
}
|
|
2134
2135
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2135
2136
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2136
2137
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
@@ -2143,13 +2144,16 @@ const RewardsApiAxiosParamCreator = function (configuration) {
|
|
|
2143
2144
|
* Returns the rewards earned by users for a specific campaign
|
|
2144
2145
|
* @summary Get rewards information for a specific campaign
|
|
2145
2146
|
* @param {string} campaignName Specify the campaign name
|
|
2147
|
+
* @param {string} userAddress Specify wallet address.
|
|
2146
2148
|
* @param {number} [epochNumber] Optionally specify epoch number.
|
|
2147
2149
|
* @param {*} [options] Override http request option.
|
|
2148
2150
|
* @throws {RequiredError}
|
|
2149
2151
|
*/
|
|
2150
|
-
getCampaignRewards: (campaignName_1, epochNumber_1, ...args_1) => __awaiter(this, [campaignName_1, epochNumber_1, ...args_1], void 0, function* (campaignName, epochNumber, options = {}) {
|
|
2152
|
+
getCampaignRewards: (campaignName_1, userAddress_1, epochNumber_1, ...args_1) => __awaiter(this, [campaignName_1, userAddress_1, epochNumber_1, ...args_1], void 0, function* (campaignName, userAddress, epochNumber, options = {}) {
|
|
2151
2153
|
// verify required parameter 'campaignName' is not null or undefined
|
|
2152
2154
|
(0, common_1.assertParamExists)('getCampaignRewards', 'campaignName', campaignName);
|
|
2155
|
+
// verify required parameter 'userAddress' is not null or undefined
|
|
2156
|
+
(0, common_1.assertParamExists)('getCampaignRewards', 'userAddress', userAddress);
|
|
2153
2157
|
const localVarPath = `/v1/rewards/campaign`;
|
|
2154
2158
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2155
2159
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
@@ -2160,15 +2164,15 @@ const RewardsApiAxiosParamCreator = function (configuration) {
|
|
|
2160
2164
|
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
2161
2165
|
const localVarHeaderParameter = {};
|
|
2162
2166
|
const localVarQueryParameter = {};
|
|
2163
|
-
// authentication bearerAuth required
|
|
2164
|
-
// http bearer authentication required
|
|
2165
|
-
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
2166
2167
|
if (campaignName !== undefined) {
|
|
2167
2168
|
localVarQueryParameter['campaignName'] = campaignName;
|
|
2168
2169
|
}
|
|
2169
2170
|
if (epochNumber !== undefined) {
|
|
2170
2171
|
localVarQueryParameter['epochNumber'] = epochNumber;
|
|
2171
2172
|
}
|
|
2173
|
+
if (userAddress !== undefined) {
|
|
2174
|
+
localVarQueryParameter['userAddress'] = userAddress;
|
|
2175
|
+
}
|
|
2172
2176
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2173
2177
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2174
2178
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
@@ -2487,7 +2491,7 @@ const RewardsApiFp = function (configuration) {
|
|
|
2487
2491
|
/**
|
|
2488
2492
|
* Returns rankings and earnings for affiliates, sorted by the specified category
|
|
2489
2493
|
* @summary Get affiliate rankings and earnings
|
|
2490
|
-
* @param {GetAffiliateLeaderDashboardSortByEnum} sortBy The category to sort rankings by
|
|
2494
|
+
* @param {GetAffiliateLeaderDashboardSortByEnum} [sortBy] The category to sort rankings by
|
|
2491
2495
|
* @param {GetAffiliateLeaderDashboardSortOrderEnum} [sortOrder] The order to sort rankings by
|
|
2492
2496
|
* @param {number} [page] The page number to retrieve in a paginated response
|
|
2493
2497
|
* @param {number} [limit] The page size for pagination
|
|
@@ -2507,13 +2511,14 @@ const RewardsApiFp = function (configuration) {
|
|
|
2507
2511
|
/**
|
|
2508
2512
|
* Returns the affiliate metadata
|
|
2509
2513
|
* @summary Get affiliate metadata
|
|
2514
|
+
* @param {string} userAddress Specify wallet address.
|
|
2510
2515
|
* @param {*} [options] Override http request option.
|
|
2511
2516
|
* @throws {RequiredError}
|
|
2512
2517
|
*/
|
|
2513
|
-
getAffiliateMetadata(options) {
|
|
2518
|
+
getAffiliateMetadata(userAddress, options) {
|
|
2514
2519
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2515
2520
|
var _a, _b, _c;
|
|
2516
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.getAffiliateMetadata(options);
|
|
2521
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getAffiliateMetadata(userAddress, options);
|
|
2517
2522
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2518
2523
|
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['RewardsApi.getAffiliateMetadata']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2519
2524
|
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
@@ -2522,6 +2527,7 @@ const RewardsApiFp = function (configuration) {
|
|
|
2522
2527
|
/**
|
|
2523
2528
|
* Returns detailed earnings breakdown for an affiliate users earnings (including perps, spot LP, lending), referral earnings, and total earnings
|
|
2524
2529
|
* @summary Get detailed affiliate earnings overview
|
|
2530
|
+
* @param {string} userAddress Specify wallet address.
|
|
2525
2531
|
* @param {number} [page] The page number to retrieve in a paginated response
|
|
2526
2532
|
* @param {number} [limit] The page size for pagination
|
|
2527
2533
|
* @param {GetAffiliateOverviewSortByEnum} [sortBy] The category to sort earnings by
|
|
@@ -2530,10 +2536,10 @@ const RewardsApiFp = function (configuration) {
|
|
|
2530
2536
|
* @param {*} [options] Override http request option.
|
|
2531
2537
|
* @throws {RequiredError}
|
|
2532
2538
|
*/
|
|
2533
|
-
getAffiliateOverview(page, limit, sortBy, sortOrder, search, options) {
|
|
2539
|
+
getAffiliateOverview(userAddress, page, limit, sortBy, sortOrder, search, options) {
|
|
2534
2540
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2535
2541
|
var _a, _b, _c;
|
|
2536
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.getAffiliateOverview(page, limit, sortBy, sortOrder, search, options);
|
|
2542
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getAffiliateOverview(userAddress, page, limit, sortBy, sortOrder, search, options);
|
|
2537
2543
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2538
2544
|
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['RewardsApi.getAffiliateOverview']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2539
2545
|
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
@@ -2542,13 +2548,14 @@ const RewardsApiFp = function (configuration) {
|
|
|
2542
2548
|
/**
|
|
2543
2549
|
* Returns performance summary for an affiliate including total referrals, earnings, and rankings
|
|
2544
2550
|
* @summary Get affiliate performance summary
|
|
2551
|
+
* @param {string} userAddress Specify wallet address.
|
|
2545
2552
|
* @param {*} [options] Override http request option.
|
|
2546
2553
|
* @throws {RequiredError}
|
|
2547
2554
|
*/
|
|
2548
|
-
getAffiliateSummary(options) {
|
|
2555
|
+
getAffiliateSummary(userAddress, options) {
|
|
2549
2556
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2550
2557
|
var _a, _b, _c;
|
|
2551
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.getAffiliateSummary(options);
|
|
2558
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getAffiliateSummary(userAddress, options);
|
|
2552
2559
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2553
2560
|
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['RewardsApi.getAffiliateSummary']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2554
2561
|
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
@@ -2558,14 +2565,15 @@ const RewardsApiFp = function (configuration) {
|
|
|
2558
2565
|
* Returns the rewards earned by users for a specific campaign
|
|
2559
2566
|
* @summary Get rewards information for a specific campaign
|
|
2560
2567
|
* @param {string} campaignName Specify the campaign name
|
|
2568
|
+
* @param {string} userAddress Specify wallet address.
|
|
2561
2569
|
* @param {number} [epochNumber] Optionally specify epoch number.
|
|
2562
2570
|
* @param {*} [options] Override http request option.
|
|
2563
2571
|
* @throws {RequiredError}
|
|
2564
2572
|
*/
|
|
2565
|
-
getCampaignRewards(campaignName, epochNumber, options) {
|
|
2573
|
+
getCampaignRewards(campaignName, userAddress, epochNumber, options) {
|
|
2566
2574
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2567
2575
|
var _a, _b, _c;
|
|
2568
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.getCampaignRewards(campaignName, epochNumber, options);
|
|
2576
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getCampaignRewards(campaignName, userAddress, epochNumber, options);
|
|
2569
2577
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2570
2578
|
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['RewardsApi.getCampaignRewards']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2571
2579
|
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
@@ -2740,7 +2748,7 @@ const RewardsApiFactory = function (configuration, basePath, axios) {
|
|
|
2740
2748
|
/**
|
|
2741
2749
|
* Returns rankings and earnings for affiliates, sorted by the specified category
|
|
2742
2750
|
* @summary Get affiliate rankings and earnings
|
|
2743
|
-
* @param {GetAffiliateLeaderDashboardSortByEnum} sortBy The category to sort rankings by
|
|
2751
|
+
* @param {GetAffiliateLeaderDashboardSortByEnum} [sortBy] The category to sort rankings by
|
|
2744
2752
|
* @param {GetAffiliateLeaderDashboardSortOrderEnum} [sortOrder] The order to sort rankings by
|
|
2745
2753
|
* @param {number} [page] The page number to retrieve in a paginated response
|
|
2746
2754
|
* @param {number} [limit] The page size for pagination
|
|
@@ -2754,15 +2762,17 @@ const RewardsApiFactory = function (configuration, basePath, axios) {
|
|
|
2754
2762
|
/**
|
|
2755
2763
|
* Returns the affiliate metadata
|
|
2756
2764
|
* @summary Get affiliate metadata
|
|
2765
|
+
* @param {string} userAddress Specify wallet address.
|
|
2757
2766
|
* @param {*} [options] Override http request option.
|
|
2758
2767
|
* @throws {RequiredError}
|
|
2759
2768
|
*/
|
|
2760
|
-
getAffiliateMetadata(options) {
|
|
2761
|
-
return localVarFp.getAffiliateMetadata(options).then((request) => request(axios, basePath));
|
|
2769
|
+
getAffiliateMetadata(userAddress, options) {
|
|
2770
|
+
return localVarFp.getAffiliateMetadata(userAddress, options).then((request) => request(axios, basePath));
|
|
2762
2771
|
},
|
|
2763
2772
|
/**
|
|
2764
2773
|
* Returns detailed earnings breakdown for an affiliate users earnings (including perps, spot LP, lending), referral earnings, and total earnings
|
|
2765
2774
|
* @summary Get detailed affiliate earnings overview
|
|
2775
|
+
* @param {string} userAddress Specify wallet address.
|
|
2766
2776
|
* @param {number} [page] The page number to retrieve in a paginated response
|
|
2767
2777
|
* @param {number} [limit] The page size for pagination
|
|
2768
2778
|
* @param {GetAffiliateOverviewSortByEnum} [sortBy] The category to sort earnings by
|
|
@@ -2771,28 +2781,30 @@ const RewardsApiFactory = function (configuration, basePath, axios) {
|
|
|
2771
2781
|
* @param {*} [options] Override http request option.
|
|
2772
2782
|
* @throws {RequiredError}
|
|
2773
2783
|
*/
|
|
2774
|
-
getAffiliateOverview(page, limit, sortBy, sortOrder, search, options) {
|
|
2775
|
-
return localVarFp.getAffiliateOverview(page, limit, sortBy, sortOrder, search, options).then((request) => request(axios, basePath));
|
|
2784
|
+
getAffiliateOverview(userAddress, page, limit, sortBy, sortOrder, search, options) {
|
|
2785
|
+
return localVarFp.getAffiliateOverview(userAddress, page, limit, sortBy, sortOrder, search, options).then((request) => request(axios, basePath));
|
|
2776
2786
|
},
|
|
2777
2787
|
/**
|
|
2778
2788
|
* Returns performance summary for an affiliate including total referrals, earnings, and rankings
|
|
2779
2789
|
* @summary Get affiliate performance summary
|
|
2790
|
+
* @param {string} userAddress Specify wallet address.
|
|
2780
2791
|
* @param {*} [options] Override http request option.
|
|
2781
2792
|
* @throws {RequiredError}
|
|
2782
2793
|
*/
|
|
2783
|
-
getAffiliateSummary(options) {
|
|
2784
|
-
return localVarFp.getAffiliateSummary(options).then((request) => request(axios, basePath));
|
|
2794
|
+
getAffiliateSummary(userAddress, options) {
|
|
2795
|
+
return localVarFp.getAffiliateSummary(userAddress, options).then((request) => request(axios, basePath));
|
|
2785
2796
|
},
|
|
2786
2797
|
/**
|
|
2787
2798
|
* Returns the rewards earned by users for a specific campaign
|
|
2788
2799
|
* @summary Get rewards information for a specific campaign
|
|
2789
2800
|
* @param {string} campaignName Specify the campaign name
|
|
2801
|
+
* @param {string} userAddress Specify wallet address.
|
|
2790
2802
|
* @param {number} [epochNumber] Optionally specify epoch number.
|
|
2791
2803
|
* @param {*} [options] Override http request option.
|
|
2792
2804
|
* @throws {RequiredError}
|
|
2793
2805
|
*/
|
|
2794
|
-
getCampaignRewards(campaignName, epochNumber, options) {
|
|
2795
|
-
return localVarFp.getCampaignRewards(campaignName, epochNumber, options).then((request) => request(axios, basePath));
|
|
2806
|
+
getCampaignRewards(campaignName, userAddress, epochNumber, options) {
|
|
2807
|
+
return localVarFp.getCampaignRewards(campaignName, userAddress, epochNumber, options).then((request) => request(axios, basePath));
|
|
2796
2808
|
},
|
|
2797
2809
|
/**
|
|
2798
2810
|
* Returns the rewards earned by users for the intervals .
|
|
@@ -2910,7 +2922,7 @@ class RewardsApi extends base_1.BaseAPI {
|
|
|
2910
2922
|
/**
|
|
2911
2923
|
* Returns rankings and earnings for affiliates, sorted by the specified category
|
|
2912
2924
|
* @summary Get affiliate rankings and earnings
|
|
2913
|
-
* @param {GetAffiliateLeaderDashboardSortByEnum} sortBy The category to sort rankings by
|
|
2925
|
+
* @param {GetAffiliateLeaderDashboardSortByEnum} [sortBy] The category to sort rankings by
|
|
2914
2926
|
* @param {GetAffiliateLeaderDashboardSortOrderEnum} [sortOrder] The order to sort rankings by
|
|
2915
2927
|
* @param {number} [page] The page number to retrieve in a paginated response
|
|
2916
2928
|
* @param {number} [limit] The page size for pagination
|
|
@@ -2925,16 +2937,18 @@ class RewardsApi extends base_1.BaseAPI {
|
|
|
2925
2937
|
/**
|
|
2926
2938
|
* Returns the affiliate metadata
|
|
2927
2939
|
* @summary Get affiliate metadata
|
|
2940
|
+
* @param {string} userAddress Specify wallet address.
|
|
2928
2941
|
* @param {*} [options] Override http request option.
|
|
2929
2942
|
* @throws {RequiredError}
|
|
2930
2943
|
* @memberof RewardsApi
|
|
2931
2944
|
*/
|
|
2932
|
-
getAffiliateMetadata(options) {
|
|
2933
|
-
return (0, exports.RewardsApiFp)(this.configuration).getAffiliateMetadata(options).then((request) => request(this.axios, this.basePath));
|
|
2945
|
+
getAffiliateMetadata(userAddress, options) {
|
|
2946
|
+
return (0, exports.RewardsApiFp)(this.configuration).getAffiliateMetadata(userAddress, options).then((request) => request(this.axios, this.basePath));
|
|
2934
2947
|
}
|
|
2935
2948
|
/**
|
|
2936
2949
|
* Returns detailed earnings breakdown for an affiliate users earnings (including perps, spot LP, lending), referral earnings, and total earnings
|
|
2937
2950
|
* @summary Get detailed affiliate earnings overview
|
|
2951
|
+
* @param {string} userAddress Specify wallet address.
|
|
2938
2952
|
* @param {number} [page] The page number to retrieve in a paginated response
|
|
2939
2953
|
* @param {number} [limit] The page size for pagination
|
|
2940
2954
|
* @param {GetAffiliateOverviewSortByEnum} [sortBy] The category to sort earnings by
|
|
@@ -2944,30 +2958,32 @@ class RewardsApi extends base_1.BaseAPI {
|
|
|
2944
2958
|
* @throws {RequiredError}
|
|
2945
2959
|
* @memberof RewardsApi
|
|
2946
2960
|
*/
|
|
2947
|
-
getAffiliateOverview(page, limit, sortBy, sortOrder, search, options) {
|
|
2948
|
-
return (0, exports.RewardsApiFp)(this.configuration).getAffiliateOverview(page, limit, sortBy, sortOrder, search, options).then((request) => request(this.axios, this.basePath));
|
|
2961
|
+
getAffiliateOverview(userAddress, page, limit, sortBy, sortOrder, search, options) {
|
|
2962
|
+
return (0, exports.RewardsApiFp)(this.configuration).getAffiliateOverview(userAddress, page, limit, sortBy, sortOrder, search, options).then((request) => request(this.axios, this.basePath));
|
|
2949
2963
|
}
|
|
2950
2964
|
/**
|
|
2951
2965
|
* Returns performance summary for an affiliate including total referrals, earnings, and rankings
|
|
2952
2966
|
* @summary Get affiliate performance summary
|
|
2967
|
+
* @param {string} userAddress Specify wallet address.
|
|
2953
2968
|
* @param {*} [options] Override http request option.
|
|
2954
2969
|
* @throws {RequiredError}
|
|
2955
2970
|
* @memberof RewardsApi
|
|
2956
2971
|
*/
|
|
2957
|
-
getAffiliateSummary(options) {
|
|
2958
|
-
return (0, exports.RewardsApiFp)(this.configuration).getAffiliateSummary(options).then((request) => request(this.axios, this.basePath));
|
|
2972
|
+
getAffiliateSummary(userAddress, options) {
|
|
2973
|
+
return (0, exports.RewardsApiFp)(this.configuration).getAffiliateSummary(userAddress, options).then((request) => request(this.axios, this.basePath));
|
|
2959
2974
|
}
|
|
2960
2975
|
/**
|
|
2961
2976
|
* Returns the rewards earned by users for a specific campaign
|
|
2962
2977
|
* @summary Get rewards information for a specific campaign
|
|
2963
2978
|
* @param {string} campaignName Specify the campaign name
|
|
2979
|
+
* @param {string} userAddress Specify wallet address.
|
|
2964
2980
|
* @param {number} [epochNumber] Optionally specify epoch number.
|
|
2965
2981
|
* @param {*} [options] Override http request option.
|
|
2966
2982
|
* @throws {RequiredError}
|
|
2967
2983
|
* @memberof RewardsApi
|
|
2968
2984
|
*/
|
|
2969
|
-
getCampaignRewards(campaignName, epochNumber, options) {
|
|
2970
|
-
return (0, exports.RewardsApiFp)(this.configuration).getCampaignRewards(campaignName, epochNumber, options).then((request) => request(this.axios, this.basePath));
|
|
2985
|
+
getCampaignRewards(campaignName, userAddress, epochNumber, options) {
|
|
2986
|
+
return (0, exports.RewardsApiFp)(this.configuration).getCampaignRewards(campaignName, userAddress, epochNumber, options).then((request) => request(this.axios, this.basePath));
|
|
2971
2987
|
}
|
|
2972
2988
|
/**
|
|
2973
2989
|
* Returns the rewards earned by users for the intervals .
|
package/example.ts
CHANGED
|
@@ -144,8 +144,12 @@ async function main() {
|
|
|
144
144
|
).data;
|
|
145
145
|
logger.info(`Candle stick: ${JSON.stringify(candleStick)}`);
|
|
146
146
|
|
|
147
|
-
|
|
148
|
-
|
|
147
|
+
const rewards = (
|
|
148
|
+
await client.rewardsDataApi.getCampaignRewards(
|
|
149
|
+
"TRADE_AND_EARN",
|
|
150
|
+
suiWallet.toSuiAddress(),
|
|
151
|
+
)
|
|
152
|
+
).data;
|
|
149
153
|
logger.info(`Rewards: ${JSON.stringify(rewards)}`);
|
|
150
154
|
|
|
151
155
|
const depth = (await client.exchangeDataApi.getOrderbookDepth(symbol)).data;
|
package/package.json
CHANGED
package/src/api.ts
CHANGED
|
@@ -6335,10 +6335,6 @@ export const RewardsApiAxiosParamCreator = function (configuration?: Configurati
|
|
|
6335
6335
|
const localVarHeaderParameter = {} as any;
|
|
6336
6336
|
const localVarQueryParameter = {} as any;
|
|
6337
6337
|
|
|
6338
|
-
// authentication bearerAuth required
|
|
6339
|
-
// http bearer authentication required
|
|
6340
|
-
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
6341
|
-
|
|
6342
6338
|
if (userAddress !== undefined) {
|
|
6343
6339
|
localVarQueryParameter['userAddress'] = userAddress;
|
|
6344
6340
|
}
|
|
@@ -6365,7 +6361,7 @@ export const RewardsApiAxiosParamCreator = function (configuration?: Configurati
|
|
|
6365
6361
|
/**
|
|
6366
6362
|
* Returns rankings and earnings for affiliates, sorted by the specified category
|
|
6367
6363
|
* @summary Get affiliate rankings and earnings
|
|
6368
|
-
* @param {GetAffiliateLeaderDashboardSortByEnum} sortBy The category to sort rankings by
|
|
6364
|
+
* @param {GetAffiliateLeaderDashboardSortByEnum} [sortBy] The category to sort rankings by
|
|
6369
6365
|
* @param {GetAffiliateLeaderDashboardSortOrderEnum} [sortOrder] The order to sort rankings by
|
|
6370
6366
|
* @param {number} [page] The page number to retrieve in a paginated response
|
|
6371
6367
|
* @param {number} [limit] The page size for pagination
|
|
@@ -6373,9 +6369,7 @@ export const RewardsApiAxiosParamCreator = function (configuration?: Configurati
|
|
|
6373
6369
|
* @param {*} [options] Override http request option.
|
|
6374
6370
|
* @throws {RequiredError}
|
|
6375
6371
|
*/
|
|
6376
|
-
getAffiliateLeaderDashboard: async (sortBy
|
|
6377
|
-
// verify required parameter 'sortBy' is not null or undefined
|
|
6378
|
-
assertParamExists('getAffiliateLeaderDashboard', 'sortBy', sortBy)
|
|
6372
|
+
getAffiliateLeaderDashboard: async (sortBy?: GetAffiliateLeaderDashboardSortByEnum, sortOrder?: GetAffiliateLeaderDashboardSortOrderEnum, page?: number, limit?: number, search?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
6379
6373
|
const localVarPath = `/v1/rewards/affiliate/leaderDashboard`;
|
|
6380
6374
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
6381
6375
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -6388,10 +6382,6 @@ export const RewardsApiAxiosParamCreator = function (configuration?: Configurati
|
|
|
6388
6382
|
const localVarHeaderParameter = {} as any;
|
|
6389
6383
|
const localVarQueryParameter = {} as any;
|
|
6390
6384
|
|
|
6391
|
-
// authentication bearerAuth required
|
|
6392
|
-
// http bearer authentication required
|
|
6393
|
-
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
6394
|
-
|
|
6395
6385
|
if (sortBy !== undefined) {
|
|
6396
6386
|
localVarQueryParameter['sortBy'] = sortBy;
|
|
6397
6387
|
}
|
|
@@ -6426,10 +6416,13 @@ export const RewardsApiAxiosParamCreator = function (configuration?: Configurati
|
|
|
6426
6416
|
/**
|
|
6427
6417
|
* Returns the affiliate metadata
|
|
6428
6418
|
* @summary Get affiliate metadata
|
|
6419
|
+
* @param {string} userAddress Specify wallet address.
|
|
6429
6420
|
* @param {*} [options] Override http request option.
|
|
6430
6421
|
* @throws {RequiredError}
|
|
6431
6422
|
*/
|
|
6432
|
-
getAffiliateMetadata: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
6423
|
+
getAffiliateMetadata: async (userAddress: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
6424
|
+
// verify required parameter 'userAddress' is not null or undefined
|
|
6425
|
+
assertParamExists('getAffiliateMetadata', 'userAddress', userAddress)
|
|
6433
6426
|
const localVarPath = `/v1/rewards/affiliate`;
|
|
6434
6427
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
6435
6428
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -6442,9 +6435,9 @@ export const RewardsApiAxiosParamCreator = function (configuration?: Configurati
|
|
|
6442
6435
|
const localVarHeaderParameter = {} as any;
|
|
6443
6436
|
const localVarQueryParameter = {} as any;
|
|
6444
6437
|
|
|
6445
|
-
|
|
6446
|
-
|
|
6447
|
-
|
|
6438
|
+
if (userAddress !== undefined) {
|
|
6439
|
+
localVarQueryParameter['userAddress'] = userAddress;
|
|
6440
|
+
}
|
|
6448
6441
|
|
|
6449
6442
|
|
|
6450
6443
|
|
|
@@ -6460,6 +6453,7 @@ export const RewardsApiAxiosParamCreator = function (configuration?: Configurati
|
|
|
6460
6453
|
/**
|
|
6461
6454
|
* Returns detailed earnings breakdown for an affiliate users earnings (including perps, spot LP, lending), referral earnings, and total earnings
|
|
6462
6455
|
* @summary Get detailed affiliate earnings overview
|
|
6456
|
+
* @param {string} userAddress Specify wallet address.
|
|
6463
6457
|
* @param {number} [page] The page number to retrieve in a paginated response
|
|
6464
6458
|
* @param {number} [limit] The page size for pagination
|
|
6465
6459
|
* @param {GetAffiliateOverviewSortByEnum} [sortBy] The category to sort earnings by
|
|
@@ -6468,7 +6462,9 @@ export const RewardsApiAxiosParamCreator = function (configuration?: Configurati
|
|
|
6468
6462
|
* @param {*} [options] Override http request option.
|
|
6469
6463
|
* @throws {RequiredError}
|
|
6470
6464
|
*/
|
|
6471
|
-
getAffiliateOverview: async (page?: number, limit?: number, sortBy?: GetAffiliateOverviewSortByEnum, sortOrder?: GetAffiliateOverviewSortOrderEnum, search?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
6465
|
+
getAffiliateOverview: async (userAddress: string, page?: number, limit?: number, sortBy?: GetAffiliateOverviewSortByEnum, sortOrder?: GetAffiliateOverviewSortOrderEnum, search?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
6466
|
+
// verify required parameter 'userAddress' is not null or undefined
|
|
6467
|
+
assertParamExists('getAffiliateOverview', 'userAddress', userAddress)
|
|
6472
6468
|
const localVarPath = `/v1/rewards/affiliate/overview`;
|
|
6473
6469
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
6474
6470
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -6481,10 +6477,6 @@ export const RewardsApiAxiosParamCreator = function (configuration?: Configurati
|
|
|
6481
6477
|
const localVarHeaderParameter = {} as any;
|
|
6482
6478
|
const localVarQueryParameter = {} as any;
|
|
6483
6479
|
|
|
6484
|
-
// authentication bearerAuth required
|
|
6485
|
-
// http bearer authentication required
|
|
6486
|
-
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
6487
|
-
|
|
6488
6480
|
if (page !== undefined) {
|
|
6489
6481
|
localVarQueryParameter['page'] = page;
|
|
6490
6482
|
}
|
|
@@ -6505,6 +6497,10 @@ export const RewardsApiAxiosParamCreator = function (configuration?: Configurati
|
|
|
6505
6497
|
localVarQueryParameter['search'] = search;
|
|
6506
6498
|
}
|
|
6507
6499
|
|
|
6500
|
+
if (userAddress !== undefined) {
|
|
6501
|
+
localVarQueryParameter['userAddress'] = userAddress;
|
|
6502
|
+
}
|
|
6503
|
+
|
|
6508
6504
|
|
|
6509
6505
|
|
|
6510
6506
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
@@ -6519,10 +6515,13 @@ export const RewardsApiAxiosParamCreator = function (configuration?: Configurati
|
|
|
6519
6515
|
/**
|
|
6520
6516
|
* Returns performance summary for an affiliate including total referrals, earnings, and rankings
|
|
6521
6517
|
* @summary Get affiliate performance summary
|
|
6518
|
+
* @param {string} userAddress Specify wallet address.
|
|
6522
6519
|
* @param {*} [options] Override http request option.
|
|
6523
6520
|
* @throws {RequiredError}
|
|
6524
6521
|
*/
|
|
6525
|
-
getAffiliateSummary: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
6522
|
+
getAffiliateSummary: async (userAddress: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
6523
|
+
// verify required parameter 'userAddress' is not null or undefined
|
|
6524
|
+
assertParamExists('getAffiliateSummary', 'userAddress', userAddress)
|
|
6526
6525
|
const localVarPath = `/v1/rewards/affiliate/summary`;
|
|
6527
6526
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
6528
6527
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -6535,9 +6534,9 @@ export const RewardsApiAxiosParamCreator = function (configuration?: Configurati
|
|
|
6535
6534
|
const localVarHeaderParameter = {} as any;
|
|
6536
6535
|
const localVarQueryParameter = {} as any;
|
|
6537
6536
|
|
|
6538
|
-
|
|
6539
|
-
|
|
6540
|
-
|
|
6537
|
+
if (userAddress !== undefined) {
|
|
6538
|
+
localVarQueryParameter['userAddress'] = userAddress;
|
|
6539
|
+
}
|
|
6541
6540
|
|
|
6542
6541
|
|
|
6543
6542
|
|
|
@@ -6554,13 +6553,16 @@ export const RewardsApiAxiosParamCreator = function (configuration?: Configurati
|
|
|
6554
6553
|
* Returns the rewards earned by users for a specific campaign
|
|
6555
6554
|
* @summary Get rewards information for a specific campaign
|
|
6556
6555
|
* @param {string} campaignName Specify the campaign name
|
|
6556
|
+
* @param {string} userAddress Specify wallet address.
|
|
6557
6557
|
* @param {number} [epochNumber] Optionally specify epoch number.
|
|
6558
6558
|
* @param {*} [options] Override http request option.
|
|
6559
6559
|
* @throws {RequiredError}
|
|
6560
6560
|
*/
|
|
6561
|
-
getCampaignRewards: async (campaignName: string, epochNumber?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
6561
|
+
getCampaignRewards: async (campaignName: string, userAddress: string, epochNumber?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
6562
6562
|
// verify required parameter 'campaignName' is not null or undefined
|
|
6563
6563
|
assertParamExists('getCampaignRewards', 'campaignName', campaignName)
|
|
6564
|
+
// verify required parameter 'userAddress' is not null or undefined
|
|
6565
|
+
assertParamExists('getCampaignRewards', 'userAddress', userAddress)
|
|
6564
6566
|
const localVarPath = `/v1/rewards/campaign`;
|
|
6565
6567
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
6566
6568
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -6573,10 +6575,6 @@ export const RewardsApiAxiosParamCreator = function (configuration?: Configurati
|
|
|
6573
6575
|
const localVarHeaderParameter = {} as any;
|
|
6574
6576
|
const localVarQueryParameter = {} as any;
|
|
6575
6577
|
|
|
6576
|
-
// authentication bearerAuth required
|
|
6577
|
-
// http bearer authentication required
|
|
6578
|
-
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
6579
|
-
|
|
6580
6578
|
if (campaignName !== undefined) {
|
|
6581
6579
|
localVarQueryParameter['campaignName'] = campaignName;
|
|
6582
6580
|
}
|
|
@@ -6585,6 +6583,10 @@ export const RewardsApiAxiosParamCreator = function (configuration?: Configurati
|
|
|
6585
6583
|
localVarQueryParameter['epochNumber'] = epochNumber;
|
|
6586
6584
|
}
|
|
6587
6585
|
|
|
6586
|
+
if (userAddress !== undefined) {
|
|
6587
|
+
localVarQueryParameter['userAddress'] = userAddress;
|
|
6588
|
+
}
|
|
6589
|
+
|
|
6588
6590
|
|
|
6589
6591
|
|
|
6590
6592
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
@@ -6962,7 +6964,7 @@ export const RewardsApiFp = function(configuration?: Configuration) {
|
|
|
6962
6964
|
/**
|
|
6963
6965
|
* Returns rankings and earnings for affiliates, sorted by the specified category
|
|
6964
6966
|
* @summary Get affiliate rankings and earnings
|
|
6965
|
-
* @param {GetAffiliateLeaderDashboardSortByEnum} sortBy The category to sort rankings by
|
|
6967
|
+
* @param {GetAffiliateLeaderDashboardSortByEnum} [sortBy] The category to sort rankings by
|
|
6966
6968
|
* @param {GetAffiliateLeaderDashboardSortOrderEnum} [sortOrder] The order to sort rankings by
|
|
6967
6969
|
* @param {number} [page] The page number to retrieve in a paginated response
|
|
6968
6970
|
* @param {number} [limit] The page size for pagination
|
|
@@ -6970,7 +6972,7 @@ export const RewardsApiFp = function(configuration?: Configuration) {
|
|
|
6970
6972
|
* @param {*} [options] Override http request option.
|
|
6971
6973
|
* @throws {RequiredError}
|
|
6972
6974
|
*/
|
|
6973
|
-
async getAffiliateLeaderDashboard(sortBy
|
|
6975
|
+
async getAffiliateLeaderDashboard(sortBy?: GetAffiliateLeaderDashboardSortByEnum, sortOrder?: GetAffiliateLeaderDashboardSortOrderEnum, page?: number, limit?: number, search?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetAffiliateLeaderDashboard200Response>> {
|
|
6974
6976
|
const localVarAxiosArgs = await localVarAxiosParamCreator.getAffiliateLeaderDashboard(sortBy, sortOrder, page, limit, search, options);
|
|
6975
6977
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
6976
6978
|
const localVarOperationServerBasePath = operationServerMap['RewardsApi.getAffiliateLeaderDashboard']?.[localVarOperationServerIndex]?.url;
|
|
@@ -6979,11 +6981,12 @@ export const RewardsApiFp = function(configuration?: Configuration) {
|
|
|
6979
6981
|
/**
|
|
6980
6982
|
* Returns the affiliate metadata
|
|
6981
6983
|
* @summary Get affiliate metadata
|
|
6984
|
+
* @param {string} userAddress Specify wallet address.
|
|
6982
6985
|
* @param {*} [options] Override http request option.
|
|
6983
6986
|
* @throws {RequiredError}
|
|
6984
6987
|
*/
|
|
6985
|
-
async getAffiliateMetadata(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AffiliateMetadata>> {
|
|
6986
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.getAffiliateMetadata(options);
|
|
6988
|
+
async getAffiliateMetadata(userAddress: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AffiliateMetadata>> {
|
|
6989
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getAffiliateMetadata(userAddress, options);
|
|
6987
6990
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
6988
6991
|
const localVarOperationServerBasePath = operationServerMap['RewardsApi.getAffiliateMetadata']?.[localVarOperationServerIndex]?.url;
|
|
6989
6992
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
@@ -6991,6 +6994,7 @@ export const RewardsApiFp = function(configuration?: Configuration) {
|
|
|
6991
6994
|
/**
|
|
6992
6995
|
* Returns detailed earnings breakdown for an affiliate users earnings (including perps, spot LP, lending), referral earnings, and total earnings
|
|
6993
6996
|
* @summary Get detailed affiliate earnings overview
|
|
6997
|
+
* @param {string} userAddress Specify wallet address.
|
|
6994
6998
|
* @param {number} [page] The page number to retrieve in a paginated response
|
|
6995
6999
|
* @param {number} [limit] The page size for pagination
|
|
6996
7000
|
* @param {GetAffiliateOverviewSortByEnum} [sortBy] The category to sort earnings by
|
|
@@ -6999,8 +7003,8 @@ export const RewardsApiFp = function(configuration?: Configuration) {
|
|
|
6999
7003
|
* @param {*} [options] Override http request option.
|
|
7000
7004
|
* @throws {RequiredError}
|
|
7001
7005
|
*/
|
|
7002
|
-
async getAffiliateOverview(page?: number, limit?: number, sortBy?: GetAffiliateOverviewSortByEnum, sortOrder?: GetAffiliateOverviewSortOrderEnum, search?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetAffiliateOverview200Response>> {
|
|
7003
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.getAffiliateOverview(page, limit, sortBy, sortOrder, search, options);
|
|
7006
|
+
async getAffiliateOverview(userAddress: string, page?: number, limit?: number, sortBy?: GetAffiliateOverviewSortByEnum, sortOrder?: GetAffiliateOverviewSortOrderEnum, search?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetAffiliateOverview200Response>> {
|
|
7007
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getAffiliateOverview(userAddress, page, limit, sortBy, sortOrder, search, options);
|
|
7004
7008
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
7005
7009
|
const localVarOperationServerBasePath = operationServerMap['RewardsApi.getAffiliateOverview']?.[localVarOperationServerIndex]?.url;
|
|
7006
7010
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
@@ -7008,11 +7012,12 @@ export const RewardsApiFp = function(configuration?: Configuration) {
|
|
|
7008
7012
|
/**
|
|
7009
7013
|
* Returns performance summary for an affiliate including total referrals, earnings, and rankings
|
|
7010
7014
|
* @summary Get affiliate performance summary
|
|
7015
|
+
* @param {string} userAddress Specify wallet address.
|
|
7011
7016
|
* @param {*} [options] Override http request option.
|
|
7012
7017
|
* @throws {RequiredError}
|
|
7013
7018
|
*/
|
|
7014
|
-
async getAffiliateSummary(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AffiliateSummary>> {
|
|
7015
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.getAffiliateSummary(options);
|
|
7019
|
+
async getAffiliateSummary(userAddress: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AffiliateSummary>> {
|
|
7020
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getAffiliateSummary(userAddress, options);
|
|
7016
7021
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
7017
7022
|
const localVarOperationServerBasePath = operationServerMap['RewardsApi.getAffiliateSummary']?.[localVarOperationServerIndex]?.url;
|
|
7018
7023
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
@@ -7021,12 +7026,13 @@ export const RewardsApiFp = function(configuration?: Configuration) {
|
|
|
7021
7026
|
* Returns the rewards earned by users for a specific campaign
|
|
7022
7027
|
* @summary Get rewards information for a specific campaign
|
|
7023
7028
|
* @param {string} campaignName Specify the campaign name
|
|
7029
|
+
* @param {string} userAddress Specify wallet address.
|
|
7024
7030
|
* @param {number} [epochNumber] Optionally specify epoch number.
|
|
7025
7031
|
* @param {*} [options] Override http request option.
|
|
7026
7032
|
* @throws {RequiredError}
|
|
7027
7033
|
*/
|
|
7028
|
-
async getCampaignRewards(campaignName: string, epochNumber?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<UserCampaignRewards>>> {
|
|
7029
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.getCampaignRewards(campaignName, epochNumber, options);
|
|
7034
|
+
async getCampaignRewards(campaignName: string, userAddress: string, epochNumber?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<UserCampaignRewards>>> {
|
|
7035
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getCampaignRewards(campaignName, userAddress, epochNumber, options);
|
|
7030
7036
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
7031
7037
|
const localVarOperationServerBasePath = operationServerMap['RewardsApi.getCampaignRewards']?.[localVarOperationServerIndex]?.url;
|
|
7032
7038
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
@@ -7173,7 +7179,7 @@ export const RewardsApiFactory = function (configuration?: Configuration, basePa
|
|
|
7173
7179
|
/**
|
|
7174
7180
|
* Returns rankings and earnings for affiliates, sorted by the specified category
|
|
7175
7181
|
* @summary Get affiliate rankings and earnings
|
|
7176
|
-
* @param {GetAffiliateLeaderDashboardSortByEnum} sortBy The category to sort rankings by
|
|
7182
|
+
* @param {GetAffiliateLeaderDashboardSortByEnum} [sortBy] The category to sort rankings by
|
|
7177
7183
|
* @param {GetAffiliateLeaderDashboardSortOrderEnum} [sortOrder] The order to sort rankings by
|
|
7178
7184
|
* @param {number} [page] The page number to retrieve in a paginated response
|
|
7179
7185
|
* @param {number} [limit] The page size for pagination
|
|
@@ -7181,21 +7187,23 @@ export const RewardsApiFactory = function (configuration?: Configuration, basePa
|
|
|
7181
7187
|
* @param {*} [options] Override http request option.
|
|
7182
7188
|
* @throws {RequiredError}
|
|
7183
7189
|
*/
|
|
7184
|
-
getAffiliateLeaderDashboard(sortBy
|
|
7190
|
+
getAffiliateLeaderDashboard(sortBy?: GetAffiliateLeaderDashboardSortByEnum, sortOrder?: GetAffiliateLeaderDashboardSortOrderEnum, page?: number, limit?: number, search?: string, options?: RawAxiosRequestConfig): AxiosPromise<GetAffiliateLeaderDashboard200Response> {
|
|
7185
7191
|
return localVarFp.getAffiliateLeaderDashboard(sortBy, sortOrder, page, limit, search, options).then((request) => request(axios, basePath));
|
|
7186
7192
|
},
|
|
7187
7193
|
/**
|
|
7188
7194
|
* Returns the affiliate metadata
|
|
7189
7195
|
* @summary Get affiliate metadata
|
|
7196
|
+
* @param {string} userAddress Specify wallet address.
|
|
7190
7197
|
* @param {*} [options] Override http request option.
|
|
7191
7198
|
* @throws {RequiredError}
|
|
7192
7199
|
*/
|
|
7193
|
-
getAffiliateMetadata(options?: RawAxiosRequestConfig): AxiosPromise<AffiliateMetadata> {
|
|
7194
|
-
return localVarFp.getAffiliateMetadata(options).then((request) => request(axios, basePath));
|
|
7200
|
+
getAffiliateMetadata(userAddress: string, options?: RawAxiosRequestConfig): AxiosPromise<AffiliateMetadata> {
|
|
7201
|
+
return localVarFp.getAffiliateMetadata(userAddress, options).then((request) => request(axios, basePath));
|
|
7195
7202
|
},
|
|
7196
7203
|
/**
|
|
7197
7204
|
* Returns detailed earnings breakdown for an affiliate users earnings (including perps, spot LP, lending), referral earnings, and total earnings
|
|
7198
7205
|
* @summary Get detailed affiliate earnings overview
|
|
7206
|
+
* @param {string} userAddress Specify wallet address.
|
|
7199
7207
|
* @param {number} [page] The page number to retrieve in a paginated response
|
|
7200
7208
|
* @param {number} [limit] The page size for pagination
|
|
7201
7209
|
* @param {GetAffiliateOverviewSortByEnum} [sortBy] The category to sort earnings by
|
|
@@ -7204,28 +7212,30 @@ export const RewardsApiFactory = function (configuration?: Configuration, basePa
|
|
|
7204
7212
|
* @param {*} [options] Override http request option.
|
|
7205
7213
|
* @throws {RequiredError}
|
|
7206
7214
|
*/
|
|
7207
|
-
getAffiliateOverview(page?: number, limit?: number, sortBy?: GetAffiliateOverviewSortByEnum, sortOrder?: GetAffiliateOverviewSortOrderEnum, search?: string, options?: RawAxiosRequestConfig): AxiosPromise<GetAffiliateOverview200Response> {
|
|
7208
|
-
return localVarFp.getAffiliateOverview(page, limit, sortBy, sortOrder, search, options).then((request) => request(axios, basePath));
|
|
7215
|
+
getAffiliateOverview(userAddress: string, page?: number, limit?: number, sortBy?: GetAffiliateOverviewSortByEnum, sortOrder?: GetAffiliateOverviewSortOrderEnum, search?: string, options?: RawAxiosRequestConfig): AxiosPromise<GetAffiliateOverview200Response> {
|
|
7216
|
+
return localVarFp.getAffiliateOverview(userAddress, page, limit, sortBy, sortOrder, search, options).then((request) => request(axios, basePath));
|
|
7209
7217
|
},
|
|
7210
7218
|
/**
|
|
7211
7219
|
* Returns performance summary for an affiliate including total referrals, earnings, and rankings
|
|
7212
7220
|
* @summary Get affiliate performance summary
|
|
7221
|
+
* @param {string} userAddress Specify wallet address.
|
|
7213
7222
|
* @param {*} [options] Override http request option.
|
|
7214
7223
|
* @throws {RequiredError}
|
|
7215
7224
|
*/
|
|
7216
|
-
getAffiliateSummary(options?: RawAxiosRequestConfig): AxiosPromise<AffiliateSummary> {
|
|
7217
|
-
return localVarFp.getAffiliateSummary(options).then((request) => request(axios, basePath));
|
|
7225
|
+
getAffiliateSummary(userAddress: string, options?: RawAxiosRequestConfig): AxiosPromise<AffiliateSummary> {
|
|
7226
|
+
return localVarFp.getAffiliateSummary(userAddress, options).then((request) => request(axios, basePath));
|
|
7218
7227
|
},
|
|
7219
7228
|
/**
|
|
7220
7229
|
* Returns the rewards earned by users for a specific campaign
|
|
7221
7230
|
* @summary Get rewards information for a specific campaign
|
|
7222
7231
|
* @param {string} campaignName Specify the campaign name
|
|
7232
|
+
* @param {string} userAddress Specify wallet address.
|
|
7223
7233
|
* @param {number} [epochNumber] Optionally specify epoch number.
|
|
7224
7234
|
* @param {*} [options] Override http request option.
|
|
7225
7235
|
* @throws {RequiredError}
|
|
7226
7236
|
*/
|
|
7227
|
-
getCampaignRewards(campaignName: string, epochNumber?: number, options?: RawAxiosRequestConfig): AxiosPromise<Array<UserCampaignRewards>> {
|
|
7228
|
-
return localVarFp.getCampaignRewards(campaignName, epochNumber, options).then((request) => request(axios, basePath));
|
|
7237
|
+
getCampaignRewards(campaignName: string, userAddress: string, epochNumber?: number, options?: RawAxiosRequestConfig): AxiosPromise<Array<UserCampaignRewards>> {
|
|
7238
|
+
return localVarFp.getCampaignRewards(campaignName, userAddress, epochNumber, options).then((request) => request(axios, basePath));
|
|
7229
7239
|
},
|
|
7230
7240
|
/**
|
|
7231
7241
|
* Returns the rewards earned by users for the intervals .
|
|
@@ -7344,7 +7354,7 @@ export class RewardsApi extends BaseAPI {
|
|
|
7344
7354
|
/**
|
|
7345
7355
|
* Returns rankings and earnings for affiliates, sorted by the specified category
|
|
7346
7356
|
* @summary Get affiliate rankings and earnings
|
|
7347
|
-
* @param {GetAffiliateLeaderDashboardSortByEnum} sortBy The category to sort rankings by
|
|
7357
|
+
* @param {GetAffiliateLeaderDashboardSortByEnum} [sortBy] The category to sort rankings by
|
|
7348
7358
|
* @param {GetAffiliateLeaderDashboardSortOrderEnum} [sortOrder] The order to sort rankings by
|
|
7349
7359
|
* @param {number} [page] The page number to retrieve in a paginated response
|
|
7350
7360
|
* @param {number} [limit] The page size for pagination
|
|
@@ -7353,24 +7363,26 @@ export class RewardsApi extends BaseAPI {
|
|
|
7353
7363
|
* @throws {RequiredError}
|
|
7354
7364
|
* @memberof RewardsApi
|
|
7355
7365
|
*/
|
|
7356
|
-
public getAffiliateLeaderDashboard(sortBy
|
|
7366
|
+
public getAffiliateLeaderDashboard(sortBy?: GetAffiliateLeaderDashboardSortByEnum, sortOrder?: GetAffiliateLeaderDashboardSortOrderEnum, page?: number, limit?: number, search?: string, options?: RawAxiosRequestConfig) {
|
|
7357
7367
|
return RewardsApiFp(this.configuration).getAffiliateLeaderDashboard(sortBy, sortOrder, page, limit, search, options).then((request) => request(this.axios, this.basePath));
|
|
7358
7368
|
}
|
|
7359
7369
|
|
|
7360
7370
|
/**
|
|
7361
7371
|
* Returns the affiliate metadata
|
|
7362
7372
|
* @summary Get affiliate metadata
|
|
7373
|
+
* @param {string} userAddress Specify wallet address.
|
|
7363
7374
|
* @param {*} [options] Override http request option.
|
|
7364
7375
|
* @throws {RequiredError}
|
|
7365
7376
|
* @memberof RewardsApi
|
|
7366
7377
|
*/
|
|
7367
|
-
public getAffiliateMetadata(options?: RawAxiosRequestConfig) {
|
|
7368
|
-
return RewardsApiFp(this.configuration).getAffiliateMetadata(options).then((request) => request(this.axios, this.basePath));
|
|
7378
|
+
public getAffiliateMetadata(userAddress: string, options?: RawAxiosRequestConfig) {
|
|
7379
|
+
return RewardsApiFp(this.configuration).getAffiliateMetadata(userAddress, options).then((request) => request(this.axios, this.basePath));
|
|
7369
7380
|
}
|
|
7370
7381
|
|
|
7371
7382
|
/**
|
|
7372
7383
|
* Returns detailed earnings breakdown for an affiliate users earnings (including perps, spot LP, lending), referral earnings, and total earnings
|
|
7373
7384
|
* @summary Get detailed affiliate earnings overview
|
|
7385
|
+
* @param {string} userAddress Specify wallet address.
|
|
7374
7386
|
* @param {number} [page] The page number to retrieve in a paginated response
|
|
7375
7387
|
* @param {number} [limit] The page size for pagination
|
|
7376
7388
|
* @param {GetAffiliateOverviewSortByEnum} [sortBy] The category to sort earnings by
|
|
@@ -7380,32 +7392,34 @@ export class RewardsApi extends BaseAPI {
|
|
|
7380
7392
|
* @throws {RequiredError}
|
|
7381
7393
|
* @memberof RewardsApi
|
|
7382
7394
|
*/
|
|
7383
|
-
public getAffiliateOverview(page?: number, limit?: number, sortBy?: GetAffiliateOverviewSortByEnum, sortOrder?: GetAffiliateOverviewSortOrderEnum, search?: string, options?: RawAxiosRequestConfig) {
|
|
7384
|
-
return RewardsApiFp(this.configuration).getAffiliateOverview(page, limit, sortBy, sortOrder, search, options).then((request) => request(this.axios, this.basePath));
|
|
7395
|
+
public getAffiliateOverview(userAddress: string, page?: number, limit?: number, sortBy?: GetAffiliateOverviewSortByEnum, sortOrder?: GetAffiliateOverviewSortOrderEnum, search?: string, options?: RawAxiosRequestConfig) {
|
|
7396
|
+
return RewardsApiFp(this.configuration).getAffiliateOverview(userAddress, page, limit, sortBy, sortOrder, search, options).then((request) => request(this.axios, this.basePath));
|
|
7385
7397
|
}
|
|
7386
7398
|
|
|
7387
7399
|
/**
|
|
7388
7400
|
* Returns performance summary for an affiliate including total referrals, earnings, and rankings
|
|
7389
7401
|
* @summary Get affiliate performance summary
|
|
7402
|
+
* @param {string} userAddress Specify wallet address.
|
|
7390
7403
|
* @param {*} [options] Override http request option.
|
|
7391
7404
|
* @throws {RequiredError}
|
|
7392
7405
|
* @memberof RewardsApi
|
|
7393
7406
|
*/
|
|
7394
|
-
public getAffiliateSummary(options?: RawAxiosRequestConfig) {
|
|
7395
|
-
return RewardsApiFp(this.configuration).getAffiliateSummary(options).then((request) => request(this.axios, this.basePath));
|
|
7407
|
+
public getAffiliateSummary(userAddress: string, options?: RawAxiosRequestConfig) {
|
|
7408
|
+
return RewardsApiFp(this.configuration).getAffiliateSummary(userAddress, options).then((request) => request(this.axios, this.basePath));
|
|
7396
7409
|
}
|
|
7397
7410
|
|
|
7398
7411
|
/**
|
|
7399
7412
|
* Returns the rewards earned by users for a specific campaign
|
|
7400
7413
|
* @summary Get rewards information for a specific campaign
|
|
7401
7414
|
* @param {string} campaignName Specify the campaign name
|
|
7415
|
+
* @param {string} userAddress Specify wallet address.
|
|
7402
7416
|
* @param {number} [epochNumber] Optionally specify epoch number.
|
|
7403
7417
|
* @param {*} [options] Override http request option.
|
|
7404
7418
|
* @throws {RequiredError}
|
|
7405
7419
|
* @memberof RewardsApi
|
|
7406
7420
|
*/
|
|
7407
|
-
public getCampaignRewards(campaignName: string, epochNumber?: number, options?: RawAxiosRequestConfig) {
|
|
7408
|
-
return RewardsApiFp(this.configuration).getCampaignRewards(campaignName, epochNumber, options).then((request) => request(this.axios, this.basePath));
|
|
7421
|
+
public getCampaignRewards(campaignName: string, userAddress: string, epochNumber?: number, options?: RawAxiosRequestConfig) {
|
|
7422
|
+
return RewardsApiFp(this.configuration).getCampaignRewards(campaignName, userAddress, epochNumber, options).then((request) => request(this.axios, this.basePath));
|
|
7409
7423
|
}
|
|
7410
7424
|
|
|
7411
7425
|
/**
|
package/src/docs/RewardsApi.md
CHANGED
|
@@ -62,7 +62,7 @@ const { status, data } = await apiInstance.getAffiliateIntervalOverview(
|
|
|
62
62
|
|
|
63
63
|
### Authorization
|
|
64
64
|
|
|
65
|
-
|
|
65
|
+
No authorization required
|
|
66
66
|
|
|
67
67
|
### HTTP request headers
|
|
68
68
|
|
|
@@ -96,7 +96,7 @@ import {
|
|
|
96
96
|
const configuration = new Configuration();
|
|
97
97
|
const apiInstance = new RewardsApi(configuration);
|
|
98
98
|
|
|
99
|
-
let sortBy: 'perpsRank' | 'lendingRank' | 'spotRank'; //The category to sort rankings by (default to 'perpsRank')
|
|
99
|
+
let sortBy: 'perpsRank' | 'lendingRank' | 'spotRank'; //The category to sort rankings by (optional) (default to 'perpsRank')
|
|
100
100
|
let sortOrder: 'asc' | 'desc'; //The order to sort rankings by (optional) (default to undefined)
|
|
101
101
|
let page: number; //The page number to retrieve in a paginated response (optional) (default to 1)
|
|
102
102
|
let limit: number; //The page size for pagination (optional) (default to 500)
|
|
@@ -115,7 +115,7 @@ const { status, data } = await apiInstance.getAffiliateLeaderDashboard(
|
|
|
115
115
|
|
|
116
116
|
|Name | Type | Description | Notes|
|
|
117
117
|
|------------- | ------------- | ------------- | -------------|
|
|
118
|
-
| **sortBy** | [**'perpsRank' | 'lendingRank' | 'spotRank'**]**Array<'perpsRank' | 'lendingRank' | 'spotRank'>** | The category to sort rankings by | defaults to 'perpsRank'|
|
|
118
|
+
| **sortBy** | [**'perpsRank' | 'lendingRank' | 'spotRank'**]**Array<'perpsRank' | 'lendingRank' | 'spotRank'>** | The category to sort rankings by | (optional) defaults to 'perpsRank'|
|
|
119
119
|
| **sortOrder** | [**'asc' | 'desc'**]**Array<'asc' | 'desc'>** | The order to sort rankings by | (optional) defaults to undefined|
|
|
120
120
|
| **page** | [**number**] | The page number to retrieve in a paginated response | (optional) defaults to 1|
|
|
121
121
|
| **limit** | [**number**] | The page size for pagination | (optional) defaults to 500|
|
|
@@ -128,7 +128,7 @@ const { status, data } = await apiInstance.getAffiliateLeaderDashboard(
|
|
|
128
128
|
|
|
129
129
|
### Authorization
|
|
130
130
|
|
|
131
|
-
|
|
131
|
+
No authorization required
|
|
132
132
|
|
|
133
133
|
### HTTP request headers
|
|
134
134
|
|
|
@@ -162,11 +162,18 @@ import {
|
|
|
162
162
|
const configuration = new Configuration();
|
|
163
163
|
const apiInstance = new RewardsApi(configuration);
|
|
164
164
|
|
|
165
|
-
|
|
165
|
+
let userAddress: string; //Specify wallet address. (default to undefined)
|
|
166
|
+
|
|
167
|
+
const { status, data } = await apiInstance.getAffiliateMetadata(
|
|
168
|
+
userAddress
|
|
169
|
+
);
|
|
166
170
|
```
|
|
167
171
|
|
|
168
172
|
### Parameters
|
|
169
|
-
|
|
173
|
+
|
|
174
|
+
|Name | Type | Description | Notes|
|
|
175
|
+
|------------- | ------------- | ------------- | -------------|
|
|
176
|
+
| **userAddress** | [**string**] | Specify wallet address. | defaults to undefined|
|
|
170
177
|
|
|
171
178
|
|
|
172
179
|
### Return type
|
|
@@ -175,7 +182,7 @@ This endpoint does not have any parameters.
|
|
|
175
182
|
|
|
176
183
|
### Authorization
|
|
177
184
|
|
|
178
|
-
|
|
185
|
+
No authorization required
|
|
179
186
|
|
|
180
187
|
### HTTP request headers
|
|
181
188
|
|
|
@@ -209,6 +216,7 @@ import {
|
|
|
209
216
|
const configuration = new Configuration();
|
|
210
217
|
const apiInstance = new RewardsApi(configuration);
|
|
211
218
|
|
|
219
|
+
let userAddress: string; //Specify wallet address. (default to undefined)
|
|
212
220
|
let page: number; //The page number to retrieve in a paginated response (optional) (default to 1)
|
|
213
221
|
let limit: number; //The page size for pagination (optional) (default to 500)
|
|
214
222
|
let sortBy: 'refreeEarnings' | 'referralEarnings' | 'totalEarnings'; //The category to sort earnings by (optional) (default to 'totalEarnings')
|
|
@@ -216,6 +224,7 @@ let sortOrder: 'asc' | 'desc'; //The order to sort earnings by (optional) (defau
|
|
|
216
224
|
let search: string; //The name/address of the user to filter by (optional) (default to undefined)
|
|
217
225
|
|
|
218
226
|
const { status, data } = await apiInstance.getAffiliateOverview(
|
|
227
|
+
userAddress,
|
|
219
228
|
page,
|
|
220
229
|
limit,
|
|
221
230
|
sortBy,
|
|
@@ -228,6 +237,7 @@ const { status, data } = await apiInstance.getAffiliateOverview(
|
|
|
228
237
|
|
|
229
238
|
|Name | Type | Description | Notes|
|
|
230
239
|
|------------- | ------------- | ------------- | -------------|
|
|
240
|
+
| **userAddress** | [**string**] | Specify wallet address. | defaults to undefined|
|
|
231
241
|
| **page** | [**number**] | The page number to retrieve in a paginated response | (optional) defaults to 1|
|
|
232
242
|
| **limit** | [**number**] | The page size for pagination | (optional) defaults to 500|
|
|
233
243
|
| **sortBy** | [**'refreeEarnings' | 'referralEarnings' | 'totalEarnings'**]**Array<'refreeEarnings' | 'referralEarnings' | 'totalEarnings'>** | The category to sort earnings by | (optional) defaults to 'totalEarnings'|
|
|
@@ -241,7 +251,7 @@ const { status, data } = await apiInstance.getAffiliateOverview(
|
|
|
241
251
|
|
|
242
252
|
### Authorization
|
|
243
253
|
|
|
244
|
-
|
|
254
|
+
No authorization required
|
|
245
255
|
|
|
246
256
|
### HTTP request headers
|
|
247
257
|
|
|
@@ -275,11 +285,18 @@ import {
|
|
|
275
285
|
const configuration = new Configuration();
|
|
276
286
|
const apiInstance = new RewardsApi(configuration);
|
|
277
287
|
|
|
278
|
-
|
|
288
|
+
let userAddress: string; //Specify wallet address. (default to undefined)
|
|
289
|
+
|
|
290
|
+
const { status, data } = await apiInstance.getAffiliateSummary(
|
|
291
|
+
userAddress
|
|
292
|
+
);
|
|
279
293
|
```
|
|
280
294
|
|
|
281
295
|
### Parameters
|
|
282
|
-
|
|
296
|
+
|
|
297
|
+
|Name | Type | Description | Notes|
|
|
298
|
+
|------------- | ------------- | ------------- | -------------|
|
|
299
|
+
| **userAddress** | [**string**] | Specify wallet address. | defaults to undefined|
|
|
283
300
|
|
|
284
301
|
|
|
285
302
|
### Return type
|
|
@@ -288,7 +305,7 @@ This endpoint does not have any parameters.
|
|
|
288
305
|
|
|
289
306
|
### Authorization
|
|
290
307
|
|
|
291
|
-
|
|
308
|
+
No authorization required
|
|
292
309
|
|
|
293
310
|
### HTTP request headers
|
|
294
311
|
|
|
@@ -323,10 +340,12 @@ const configuration = new Configuration();
|
|
|
323
340
|
const apiInstance = new RewardsApi(configuration);
|
|
324
341
|
|
|
325
342
|
let campaignName: string; //Specify the campaign name (default to undefined)
|
|
343
|
+
let userAddress: string; //Specify wallet address. (default to undefined)
|
|
326
344
|
let epochNumber: number; //Optionally specify epoch number. (optional) (default to undefined)
|
|
327
345
|
|
|
328
346
|
const { status, data } = await apiInstance.getCampaignRewards(
|
|
329
347
|
campaignName,
|
|
348
|
+
userAddress,
|
|
330
349
|
epochNumber
|
|
331
350
|
);
|
|
332
351
|
```
|
|
@@ -336,6 +355,7 @@ const { status, data } = await apiInstance.getCampaignRewards(
|
|
|
336
355
|
|Name | Type | Description | Notes|
|
|
337
356
|
|------------- | ------------- | ------------- | -------------|
|
|
338
357
|
| **campaignName** | [**string**] | Specify the campaign name | defaults to undefined|
|
|
358
|
+
| **userAddress** | [**string**] | Specify wallet address. | defaults to undefined|
|
|
339
359
|
| **epochNumber** | [**number**] | Optionally specify epoch number. | (optional) defaults to undefined|
|
|
340
360
|
|
|
341
361
|
|
|
@@ -345,7 +365,7 @@ const { status, data } = await apiInstance.getCampaignRewards(
|
|
|
345
365
|
|
|
346
366
|
### Authorization
|
|
347
367
|
|
|
348
|
-
|
|
368
|
+
No authorization required
|
|
349
369
|
|
|
350
370
|
### HTTP request headers
|
|
351
371
|
|