@fuul/sdk 2.1.1 → 3.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/AffiliateService.d.ts +12 -0
- package/dist/AffiliateService.d.ts.map +1 -0
- package/dist/core.d.ts +3 -2
- package/dist/core.d.ts.map +1 -1
- package/dist/index.mjs +263 -245
- package/dist/index.umd.js +3 -3
- package/dist/types/api.d.ts +3 -0
- package/dist/types/api.d.ts.map +1 -1
- package/dist/types/sdk.d.ts +5 -0
- package/dist/types/sdk.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { HttpClient } from './HttpClient';
|
|
2
|
+
export type AffiliateServiceSettings = {
|
|
3
|
+
httpClient: HttpClient;
|
|
4
|
+
debug?: boolean;
|
|
5
|
+
};
|
|
6
|
+
export declare class AffiliateService {
|
|
7
|
+
private readonly httpClient;
|
|
8
|
+
private readonly _debug;
|
|
9
|
+
constructor(settings: AffiliateServiceSettings);
|
|
10
|
+
getCode(address: string): Promise<string | null>;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=AffiliateService.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AffiliateService.d.ts","sourceRoot":"","sources":["../../src/AffiliateService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,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,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;CAa9D"}
|
package/dist/core.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Conversion } from './types/api';
|
|
2
|
-
import { EventArgs, FuulSettings, UserMetadata } from './types/sdk';
|
|
2
|
+
import { AffiliateLinkParams, EventArgs, FuulSettings, UserMetadata } from './types/sdk';
|
|
3
3
|
export declare function init(settings: FuulSettings): void;
|
|
4
4
|
/**
|
|
5
5
|
* @param {string} name Event name
|
|
@@ -41,6 +41,7 @@ export declare function sendConnectWallet(userMetadata: UserMetadata): Promise<v
|
|
|
41
41
|
* Generates a tracking link for an affiliate
|
|
42
42
|
* @param {string} baseUrl - Base url of the project
|
|
43
43
|
* @param {string} affiliateAddress - Affiliate wallet address
|
|
44
|
+
* @param {AffiliateLinkParams} params - Optional tracking parameters
|
|
44
45
|
* @returns {string} Tracking link
|
|
45
46
|
* @example
|
|
46
47
|
* ```typescript
|
|
@@ -49,7 +50,7 @@ export declare function sendConnectWallet(userMetadata: UserMetadata): Promise<v
|
|
|
49
50
|
* ```
|
|
50
51
|
* @see https://docs.fuul.xyz/technical-guide-for-projects/creating-partners-tracking-links-using-the-fuul-sdk
|
|
51
52
|
**/
|
|
52
|
-
export declare function generateTrackingLink(baseUrl: string, affiliateAddress: string): string
|
|
53
|
+
export declare function generateTrackingLink(baseUrl: string, affiliateAddress: string, params?: AffiliateLinkParams): Promise<string>;
|
|
53
54
|
export declare function getConversions(): Promise<Conversion[]>;
|
|
54
55
|
declare const _default: {
|
|
55
56
|
init: typeof init;
|
package/dist/core.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../src/core.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../src/core.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,UAAU,EAAa,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,SAAS,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAYzF,wBAAgB,IAAI,CAAC,QAAQ,EAAE,YAAY,QAqB1C;AAQD;;;;;;;;;GASG;AACH,wBAAsB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,SAAS,EAAE,YAAY,CAAC,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAuD1G;AAED;;;;;;;;;GASG;AACH,wBAAsB,YAAY,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAKnE;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,iBAAiB,CAAC,YAAY,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAEjF;AAED;;;;;;;;;;;;IAYI;AACJ,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,MAAM,EACf,gBAAgB,EAAE,MAAM,EACxB,MAAM,CAAC,EAAE,mBAAmB,GAC3B,OAAO,CAAC,MAAM,CAAC,CAiBjB;AAED,wBAAsB,cAAc,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC,CAG5D;;;;;;;;;AAuBD,wBAOE"}
|