@fuul/sdk 7.6.0 → 7.7.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/affiliates/AffiliateService.d.ts +2 -1
- package/dist/affiliates/AffiliateService.d.ts.map +1 -1
- package/dist/core.d.ts +6 -6
- package/dist/core.d.ts.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +261 -261
- package/dist/index.umd.js +6 -6
- package/dist/release.json.d.ts +1 -1
- package/dist/types/api.d.ts +11 -0
- package/dist/types/api.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { UserIdentifierType } from '..';
|
|
2
2
|
import { HttpClient } from '../HttpClient';
|
|
3
|
+
import { Affiliate } from '../types/api';
|
|
3
4
|
export type AffiliateServiceSettings = {
|
|
4
5
|
httpClient: HttpClient;
|
|
5
6
|
debug?: boolean;
|
|
@@ -11,6 +12,6 @@ export declare class AffiliateService {
|
|
|
11
12
|
create(address: string, identifier_type: UserIdentifierType, code: string, signature: string, signaturePublicKey?: string, accountChainId?: number, userSplitPercentage?: number): Promise<void>;
|
|
12
13
|
update(user_identifier: string, identifier_type: UserIdentifierType, code: string, signature: string, signaturePublicKey?: string, accountChainId?: number): Promise<void>;
|
|
13
14
|
isCodeFree(code: string): Promise<boolean>;
|
|
14
|
-
getCode(address: string, identifier_type: UserIdentifierType): Promise<
|
|
15
|
+
getCode(address: string, identifier_type: UserIdentifierType): Promise<Affiliate | null>;
|
|
15
16
|
}
|
|
16
17
|
//# sourceMappingURL=AffiliateService.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AffiliateService.d.ts","sourceRoot":"","sources":["../../src/affiliates/AffiliateService.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,IAAI,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"AffiliateService.d.ts","sourceRoot":"","sources":["../../src/affiliates/AffiliateService.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,IAAI,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,SAAS,EAA0C,MAAM,cAAc,CAAC;AAGjF,MAAM,MAAM,wBAAwB,GAAG;IACrC,UAAU,EAAE,UAAU,CAAC;IACvB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAa;IACxC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAsB;gBAEjC,QAAQ,EAAE,wBAAwB;IAKjC,MAAM,CACjB,OAAO,EAAE,MAAM,EACf,eAAe,EAAE,kBAAkB,EACnC,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,EACjB,kBAAkB,CAAC,EAAE,MAAM,EAC3B,cAAc,CAAC,EAAE,MAAM,EACvB,mBAAmB,CAAC,EAAE,MAAM,GAC3B,OAAO,CAAC,IAAI,CAAC;IAuCH,MAAM,CACjB,eAAe,EAAE,MAAM,EACvB,eAAe,EAAE,kBAAkB,EACnC,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,EACjB,kBAAkB,CAAC,EAAE,MAAM,EAC3B,cAAc,CAAC,EAAE,MAAM,GACtB,OAAO,CAAC,IAAI,CAAC;IAqCH,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAU1C,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,kBAAkB,GAAG,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC;CActG"}
|
package/dist/core.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { UserIdentifierType } from '.';
|
|
2
|
-
import {
|
|
2
|
+
import { GetAffiliateStatsParams, GetAffiliateStatsResponse, GetNewTradersParams, NewTraderResponse } from './affiliate-portal/types';
|
|
3
|
+
import { Affiliate, 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
4
|
import { AffiliateCodeParams, AffiliateLinkParams, EventArgs, FuulSettings, IdentifyUserParams } from './types/sdk';
|
|
4
5
|
import { GetUserReferrerParams, GetUserReferrerResponse } from './user/types';
|
|
5
|
-
import { GetAffiliateStatsParams, GetAffiliateStatsResponse, GetNewTradersParams, NewTraderResponse } from './affiliate-portal/types';
|
|
6
6
|
export declare function init(settings: FuulSettings): void;
|
|
7
7
|
/**
|
|
8
8
|
* @param {string} name Event name
|
|
@@ -95,16 +95,16 @@ export declare function createAffiliateCode(params: AffiliateCodeParams): Promis
|
|
|
95
95
|
**/
|
|
96
96
|
export declare function updateAffiliateCode(params: AffiliateCodeParams): Promise<void>;
|
|
97
97
|
/**
|
|
98
|
-
* Gets the code
|
|
98
|
+
* Gets the affiliate code for a given identifier
|
|
99
99
|
* @param {string} userIdentifier Affiliate identifier
|
|
100
100
|
* @param {UserIdentifierType} identifierType Affiliate identifier type
|
|
101
|
-
* @returns {
|
|
101
|
+
* @returns {Affiliate | null} Affiliate code data
|
|
102
102
|
* @example
|
|
103
103
|
* ```typescript
|
|
104
|
-
* const
|
|
104
|
+
* const affiliateCode = await Fuul.getAffiliateCode('0x12345', UserIdentifierType.EvmAddress);
|
|
105
105
|
* ```
|
|
106
106
|
**/
|
|
107
|
-
export declare function getAffiliateCode(userIdentifier: string, identifierType: UserIdentifierType): Promise<
|
|
107
|
+
export declare function getAffiliateCode(userIdentifier: string, identifierType: UserIdentifierType): Promise<Affiliate | null>;
|
|
108
108
|
/**
|
|
109
109
|
* Checks if an affiliate code is free to use
|
|
110
110
|
* @param {string} code Affiliate code to check
|
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;AAEvC,OAAO,EAAE,uBAAuB,EAAE,yBAAyB,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAUtI,OAAO,EACL,SAAS,EACT,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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AAiB,EAAE,CAAC,CAGtG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BD,wBA8BE"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { default as Fuul } from './core';
|
|
2
|
+
export type { AffiliateEarning, GetAffiliateStatsParams, GetAffiliateStatsResponse, GetNewTradersParams, NewTraderResponse, } from './affiliate-portal/types';
|
|
2
3
|
export * from './affiliates/errors';
|
|
3
|
-
export type { Conversion, EarningItem, GenerateReferralCodesParams, GenerateReferralCodesResponse, GetPayoutsByReferrerParams, GetReferralCodeParams, GetReferralCodeResponse, GetReferralStatusParams, GetReferralStatusResponse, ListUserReferralCodesParams, ListUserReferralCodesResponse, PayoutsByReferrerResponse, ReferrerPayoutData, UpdateReferralCodeParams, UseReferralCodeParams, UserReferralCode, } from './types/api';
|
|
4
|
+
export type { Affiliate, Conversion, EarningItem, GenerateReferralCodesParams, GenerateReferralCodesResponse, GetPayoutsByReferrerParams, GetReferralCodeParams, GetReferralCodeResponse, GetReferralStatusParams, GetReferralStatusResponse, ListUserReferralCodesParams, ListUserReferralCodesResponse, PayoutsByReferrerResponse, ReferrerPayoutData, UpdateReferralCodeParams, UseReferralCodeParams, UserReferralCode, } from './types/api';
|
|
4
5
|
export type { EventArgs, FuulSettings, IdentifyUserParams } from './types/sdk';
|
|
5
6
|
export { UserIdentifierType } from './types/user';
|
|
6
7
|
export type { GetUserReferrerParams, GetUserReferrerResponse } from './user/types';
|
|
7
|
-
export type { AffiliateEarning, GetAffiliateStatsParams, GetAffiliateStatsResponse, GetNewTradersParams, NewTraderResponse, } from './affiliate-portal/types';
|
|
8
8
|
export { Fuul };
|
|
9
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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