@fuul/sdk 3.4.1 → 4.0.0

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/core.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Conversion, GetProjectPayoutsLeaderboardParams, GetUserPayoutsParams, ProjectPayoutsLeaderboardResponse, UserPayoutsResponse } from './types/api';
1
+ import { Conversion, GetPayoutsLeaderboardParams, GetPointsLeaderboardParams, GetUserPayoutsByConversionParams, GetUserPointsByConversionParams, LeaderboardResponse, PayoutsLeaderboard, PointsLeaderboard, UserPayoutsByConversionResponse, UserPointsByConversionResponse } from './types/api';
2
2
  import { AffiliateLinkParams, EventArgs, FuulSettings, UserMetadata } from './types/sdk';
3
3
  export declare function init(settings: FuulSettings): void;
4
4
  /**
@@ -96,24 +96,44 @@ export declare function isAffiliateCodeFree(code: string): Promise<boolean>;
96
96
  export declare function generateTrackingLink(baseUrl: string, affiliateAddress: string, params?: AffiliateLinkParams): Promise<string>;
97
97
  /**
98
98
  * Gets the project payouts leaderboard
99
- * @param {GetProjectPayoutsLeaderboardParams} params The search params
100
- * @returns {ProjectPayoutsLeaderboardResponse} Project payouts leaderboard
99
+ * @param {GetPayoutsLeaderboardParams} params The search params
100
+ * @returns {LeaderboardResponse<PayoutsLeaderboard>} Payouts leaderboard response
101
101
  * @example
102
102
  * ```typescript
103
- * const results = await Fuul.getProjectPayoutsLeaderboard({ currency_address: '0x12345' }});
103
+ * const results = await Fuul.getPayoutsLeaderboard({ currency_address: '0x12345' }});
104
104
  * ```
105
105
  **/
106
- export declare function getProjectPayoutsLeaderboard(params: GetProjectPayoutsLeaderboardParams): Promise<ProjectPayoutsLeaderboardResponse>;
106
+ export declare function getPayoutsLeaderboard(params: GetPayoutsLeaderboardParams): Promise<LeaderboardResponse<PayoutsLeaderboard>>;
107
107
  /**
108
- * Gets the project payouts leaderboard
109
- * @param {GetUserPayoutsParams} params The search params
110
- * @returns {UserPayoutsResponse} Project payouts leaderboard
108
+ * Gets the project points leaderboard
109
+ * @param {GetPointsLeaderboardParams} params The search params
110
+ * @returns {LeaderboardResponse<PointsLeaderboard>} Points leaderboard response
111
+ * @example
112
+ * ```typescript
113
+ * const results = await Fuul.getPointsLeaderboard({ currency_address: '0x12345' }});
114
+ * ```
115
+ **/
116
+ export declare function getPointsLeaderboard(params: GetPointsLeaderboardParams): Promise<LeaderboardResponse<PointsLeaderboard>>;
117
+ /**
118
+ * Gets the user payouts by conversion
119
+ * @param {GetUserPayoutsByConversionParams} params The search params
120
+ * @returns {UserPayoutsByConversionResponse} User payouts by conversion
121
+ * @example
122
+ * ```typescript
123
+ * const results = await Fuul.getUserPayoutsByConversion({ user_address: '0x12345' }});
124
+ * ```
125
+ **/
126
+ export declare function getUserPayoutsByConversion(params: GetUserPayoutsByConversionParams): Promise<UserPayoutsByConversionResponse>;
127
+ /**
128
+ * Gets user points by conversion
129
+ * @param {GetUserPointsByConversionParams} params The search params
130
+ * @returns {UserPointsByConversionResponse} User points by conversion
111
131
  * @example
112
132
  * ```typescript
113
- * const results = await Fuul.getUserPayouts({ user_address: '0x12345' }});
133
+ * const results = await Fuul.getUserPointsByConversion({ user_address: '0x12345' }});
114
134
  * ```
115
135
  **/
116
- export declare function getUserPayouts(params: GetUserPayoutsParams): Promise<UserPayoutsResponse>;
136
+ export declare function getUserPointsByConversion(params: GetUserPointsByConversionParams): Promise<UserPointsByConversionResponse>;
117
137
  export declare function getConversions(): Promise<Conversion[]>;
118
138
  declare const _default: {
119
139
  init: typeof init;
@@ -126,8 +146,10 @@ declare const _default: {
126
146
  updateAffiliateCode: typeof updateAffiliateCode;
127
147
  getAffiliateCode: typeof getAffiliateCode;
128
148
  isAffiliateCodeFree: typeof isAffiliateCodeFree;
129
- getUserPayouts: typeof getUserPayouts;
130
- getProjectPayoutsLeaderboard: typeof getProjectPayoutsLeaderboard;
149
+ getPayoutsLeaderboard: typeof getPayoutsLeaderboard;
150
+ getPointsLeaderboard: typeof getPointsLeaderboard;
151
+ getUserPayoutsByConversion: typeof getUserPayoutsByConversion;
152
+ getUserPointsByConversion: typeof getUserPointsByConversion;
131
153
  };
132
154
  export default _default;
133
155
  //# sourceMappingURL=core.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../src/core.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,UAAU,EAAa,kCAAkC,EAAE,oBAAoB,EAAE,iCAAiC,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACtK,OAAO,EAAE,mBAAmB,EAAE,SAAS,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAazF,wBAAgB,IAAI,CAAC,QAAQ,EAAE,YAAY,QAsB1C;AAQD;;;;;;;;GAQG;AACH,wBAAsB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAa7E;AAED;;;;;;;;;GASG;AACH,wBAAsB,YAAY,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAuBnE;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,iBAAiB,CAAC,YAAY,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAsBjF;AAED;;;;;;;;;IASI;AACJ,wBAAsB,mBAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAGzG;AAED;;;;;;;;;IASI;AACJ,wBAAsB,mBAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAGzG;AAED;;;;;;;;IAQI;AACJ,wBAAsB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAG9E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