@fuul/sdk 7.4.2 → 7.5.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/affiliate-portal/AffiliatePortalService.d.ts +11 -0
- package/dist/affiliate-portal/AffiliatePortalService.d.ts.map +1 -0
- package/dist/affiliate-portal/types/index.d.ts +18 -0
- package/dist/affiliate-portal/types/index.d.ts.map +1 -0
- package/dist/core.d.ts +15 -0
- package/dist/core.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +464 -445
- package/dist/index.umd.js +6 -6
- package/dist/release.json.d.ts +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { HttpClient } from '../HttpClient';
|
|
2
|
+
import { GetAffiliateStatsParams, GetAffiliateStatsResponse } from './types';
|
|
3
|
+
export type AffiliatePortalServiceSettings = {
|
|
4
|
+
httpClient: HttpClient;
|
|
5
|
+
};
|
|
6
|
+
export declare class AffiliatePortalService {
|
|
7
|
+
private readonly httpClient;
|
|
8
|
+
constructor(settings: AffiliatePortalServiceSettings);
|
|
9
|
+
getAffiliateStats(params: GetAffiliateStatsParams): Promise<GetAffiliateStatsResponse>;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=AffiliatePortalService.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AffiliatePortalService.d.ts","sourceRoot":"","sources":["../../src/affiliate-portal/AffiliatePortalService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,uBAAuB,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC;AAE7E,MAAM,MAAM,8BAA8B,GAAG;IAC3C,UAAU,EAAE,UAAU,CAAC;CACxB,CAAC;AAIF,qBAAa,sBAAsB;IACjC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAa;gBAE5B,QAAQ,EAAE,8BAA8B;IAIvC,iBAAiB,CAAC,MAAM,EAAE,uBAAuB,GAAG,OAAO,CAAC,yBAAyB,CAAC;CASpG"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { UserIdentifierType } from '../../types/user';
|
|
2
|
+
export interface GetAffiliateStatsParams {
|
|
3
|
+
user_identifier: string;
|
|
4
|
+
user_identifier_type: UserIdentifierType;
|
|
5
|
+
}
|
|
6
|
+
export interface AffiliateEarning {
|
|
7
|
+
amount: number;
|
|
8
|
+
currency: string;
|
|
9
|
+
}
|
|
10
|
+
export interface GetAffiliateStatsResponse {
|
|
11
|
+
user_identifier: string;
|
|
12
|
+
user_identifier_type: UserIdentifierType;
|
|
13
|
+
total_earnings: AffiliateEarning[];
|
|
14
|
+
referred_volume: number;
|
|
15
|
+
referred_revenue: number;
|
|
16
|
+
referred_users: number;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/affiliate-portal/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAEtD,MAAM,WAAW,uBAAuB;IACtC,eAAe,EAAE,MAAM,CAAC;IACxB,oBAAoB,EAAE,kBAAkB,CAAC;CAC1C;AAED,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,yBAAyB;IACxC,eAAe,EAAE,MAAM,CAAC;IACxB,oBAAoB,EAAE,kBAAkB,CAAC;IACzC,cAAc,EAAE,gBAAgB,EAAE,CAAC;IACnC,eAAe,EAAE,MAAM,CAAC;IACxB,gBAAgB,EAAE,MAAM,CAAC;IACzB,cAAc,EAAE,MAAM,CAAC;CACxB"}
|
package/dist/core.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { UserIdentifierType } from '.';
|
|
|
2
2
|
import { Conversion, GenerateReferralCodesParams, GenerateReferralCodesResponse, GetConversionsParams, GetPayoutsByReferrerParams, GetPayoutsLeaderboardParams, GetPointsLeaderboardParams, GetReferralCodeParams, GetReferralCodeResponse, GetReferralStatusParams, GetReferralStatusResponse, GetReferredUsersLeaderboardParams, GetUserAudiencesParams, GetUserAudiencesResponse, GetUserPayoutMovementsParams, GetUserPayoutsByConversionParams, GetUserPointsByConversionParams, GetUserPointsMovementsParams, GetVolumeLeaderboardParams, LeaderboardResponse, ListUserReferralCodesParams, ListUserReferralCodesResponse, PayoutsByReferrerResponse, PayoutsLeaderboard, PointsLeaderboard, ReferredUsersLeaderboard, UpdateReferralCodeParams, UseReferralCodeParams, UserPayoutMovementsResponse, UserPayoutsByConversionResponse, UserPointsByConversionResponse, UserPointsMovementsResponse, VolumeLeaderboard } from './types/api';
|
|
3
3
|
import { AffiliateCodeParams, AffiliateLinkParams, EventArgs, FuulSettings, IdentifyUserParams } from './types/sdk';
|
|
4
4
|
import { GetUserReferrerParams, GetUserReferrerResponse } from './user/types';
|
|
5
|
+
import { GetAffiliateStatsParams, GetAffiliateStatsResponse } from './affiliate-portal/types';
|
|
5
6
|
export declare function init(settings: FuulSettings): void;
|
|
6
7
|
/**
|
|
7
8
|
* @param {string} name Event name
|
|
@@ -357,6 +358,19 @@ export declare function useReferralCode(params: UseReferralCodeParams): Promise<
|
|
|
357
358
|
* ```
|
|
358
359
|
*/
|
|
359
360
|
export declare function updateReferralCode(params: UpdateReferralCodeParams): Promise<void>;
|
|
361
|
+
/**
|
|
362
|
+
* Gets affiliate statistics including earnings, volume, revenue and referred users
|
|
363
|
+
* @param {GetAffiliateStatsParams} params Get affiliate stats parameters
|
|
364
|
+
* @returns {Promise<GetAffiliateStatsResponse>} Affiliate statistics
|
|
365
|
+
* @example
|
|
366
|
+
* ```typescript
|
|
367
|
+
* const stats = await Fuul.getAffiliateStats({
|
|
368
|
+
* user_identifier: '0x12345',
|
|
369
|
+
* user_identifier_type: UserIdentifierType.EvmAddress
|
|
370
|
+
* });
|
|
371
|
+
* ```
|
|
372
|
+
*/
|
|
373
|
+
export declare function getAffiliateStats(params: GetAffiliateStatsParams): Promise<GetAffiliateStatsResponse>;
|
|
360
374
|
declare const _default: {
|
|
361
375
|
init: typeof init;
|
|
362
376
|
sendEvent: typeof sendEvent;
|
|
@@ -385,6 +399,7 @@ declare const _default: {
|
|
|
385
399
|
getReferralCode: typeof getReferralCode;
|
|
386
400
|
useReferralCode: typeof useReferralCode;
|
|
387
401
|
updateReferralCode: typeof updateReferralCode;
|
|
402
|
+
getAffiliateStats: typeof getAffiliateStats;
|
|
388
403
|
};
|
|
389
404
|
export default _default;
|
|
390
405
|
//# sourceMappingURL=core.d.ts.map
|
package/dist/core.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,GAAG,CAAC;
|
|
1
|
+
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,GAAG,CAAC;AAWvC,OAAO,EACL,UAAU,EAEV,2BAA2B,EAC3B,6BAA6B,EAC7B,oBAAoB,EACpB,0BAA0B,EAC1B,2BAA2B,EAC3B,0BAA0B,EAC1B,qBAAqB,EACrB,uBAAuB,EACvB,uBAAuB,EACvB,yBAAyB,EACzB,iCAAiC,EACjC,sBAAsB,EACtB,wBAAwB,EACxB,4BAA4B,EAC5B,gCAAgC,EAChC,+BAA+B,EAC/B,4BAA4B,EAC5B,0BAA0B,EAC1B,mBAAmB,EACnB,2BAA2B,EAC3B,6BAA6B,EAC7B,yBAAyB,EACzB,kBAAkB,EAClB,iBAAiB,EACjB,wBAAwB,EACxB,wBAAwB,EACxB,qBAAqB,EACrB,2BAA2B,EAC3B,+BAA+B,EA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;;;;;AA6BD,wBA6BE"}
|
package/dist/index.d.ts
CHANGED
|
@@ -4,5 +4,6 @@ export type { Conversion, EarningItem, GenerateReferralCodesParams, GenerateRefe
|
|
|
4
4
|
export type { EventArgs, FuulSettings, IdentifyUserParams } from './types/sdk';
|
|
5
5
|
export { UserIdentifierType } from './types/user';
|
|
6
6
|
export type { GetUserReferrerParams, GetUserReferrerResponse } from './user/types';
|
|
7
|
+
export type { AffiliateEarning, GetAffiliateStatsParams, GetAffiliateStatsResponse } from './affiliate-portal/types';
|
|
7
8
|
export { Fuul };
|
|
8
9
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,QAAQ,CAAC;AAE1B,cAAc,qBAAqB,CAAC;AACpC,YAAY,EACV,UAAU,EACV,WAAW,EACX,2BAA2B,EAC3B,6BAA6B,EAC7B,0BAA0B,EAC1B,qBAAqB,EACrB,uBAAuB,EACvB,uBAAuB,EACvB,yBAAyB,EACzB,2BAA2B,EAC3B,6BAA6B,EAC7B,yBAAyB,EACzB,kBAAkB,EAClB,wBAAwB,EACxB,qBAAqB,EACrB,gBAAgB,GACjB,MAAM,aAAa,CAAC;AACrB,YAAY,EAAE,SAAS,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAC/E,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAClD,YAAY,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,QAAQ,CAAC;AAE1B,cAAc,qBAAqB,CAAC;AACpC,YAAY,EACV,UAAU,EACV,WAAW,EACX,2BAA2B,EAC3B,6BAA6B,EAC7B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