@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.
@@ -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;
@@ -1 +1 @@
1
- {"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../src/core.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,UAAU,EAAa,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAWpE,wBAAgB,IAAI,CAAC,QAAQ,EAAE,YAAY,QAoB1C;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;;;;;;;;;;;IAWI;AACJ,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,GAAG,MAAM,CAEtF;AAED,wBAAsB,cAAc,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC,CAG5D;;;;;;;;;AAuBD,wBAOE"}
1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