@fuul/sdk 3.3.1 → 3.3.3
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/HttpClient.d.ts.map +1 -1
- package/dist/core.d.ts +25 -4
- package/dist/core.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +471 -426
- package/dist/index.umd.js +3 -3
- package/dist/payouts/PayoutService.d.ts +14 -0
- package/dist/payouts/PayoutService.d.ts.map +1 -0
- package/dist/tracking.d.ts +1 -1
- package/dist/tracking.d.ts.map +1 -1
- package/dist/types/api.d.ts +34 -0
- package/dist/types/api.d.ts.map +1 -1
- package/package.json +3 -2
package/dist/HttpClient.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HttpClient.d.ts","sourceRoot":"","sources":["../../src/HttpClient.ts"],"names":[],"mappings":"AAAA,OAAc,EAAiB,aAAa,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"HttpClient.d.ts","sourceRoot":"","sources":["../../src/HttpClient.ts"],"names":[],"mappings":"AAAA,OAAc,EAAiB,aAAa,EAAE,MAAM,OAAO,CAAC;AAI5D,UAAU,iBAAiB;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACtC;AAED,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,qBAAa,UAAU;IACrB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAgB;IACvC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAS;gBAEzB,OAAO,EAAE,iBAAiB;IAWtC,OAAO,CAAC,gBAAgB;IAWlB,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,GAAG,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;IAI7D,IAAI,CAAC,CAAC,EACV,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE;QACJ,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;KACpB,GACA,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;IAItB,GAAG,CAAC,CAAC,EACT,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE;QACJ,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;KACpB,GACA,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;IAItB,MAAM,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;CAGzD"}
|
package/dist/core.d.ts
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import { Conversion } from './types/api';
|
|
1
|
+
import { Conversion, GetProjectPayoutsLeaderboardParams, GetUserPayoutsParams, ProjectPayoutsLeaderboardResponse, UserPayoutsResponse } from './types/api';
|
|
2
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
|
|
6
6
|
* @param {EventArgs} args Event arguments
|
|
7
|
-
* @param {UserMetadata} userMetadata User metadata
|
|
8
7
|
* @returns {Promise<void>}
|
|
9
8
|
* @example
|
|
10
9
|
* ```js
|
|
11
|
-
* sendEvent('my_event', { value: 10 }
|
|
10
|
+
* sendEvent('my_event', { value: 10 })
|
|
12
11
|
* ```
|
|
13
12
|
*/
|
|
14
|
-
export declare function sendEvent(name: string, args?: EventArgs
|
|
13
|
+
export declare function sendEvent(name: string, args?: EventArgs): Promise<void>;
|
|
15
14
|
/**
|
|
16
15
|
* @param {string} pageName Optional page name, default is document.location.pathname
|
|
17
16
|
* @see https://docs.fuul.xyz/technical-guide-for-projects/sending-events-through-the-fuul-sdk#pageview-event
|
|
@@ -95,6 +94,26 @@ export declare function isAffiliateCodeFree(code: string): Promise<boolean>;
|
|
|
95
94
|
* @see https://docs.fuul.xyz/technical-guide-for-projects/creating-partners-tracking-links-using-the-fuul-sdk
|
|
96
95
|
**/
|
|
97
96
|
export declare function generateTrackingLink(baseUrl: string, affiliateAddress: string, params?: AffiliateLinkParams): Promise<string>;
|
|
97
|
+
/**
|
|
98
|
+
* Gets the project payouts leaderboard
|
|
99
|
+
* @param {GetProjectPayoutsLeaderboardParams} params The search params
|
|
100
|
+
* @returns {ProjectPayoutsLeaderboardResponse} Project payouts leaderboard
|
|
101
|
+
* @example
|
|
102
|
+
* ```typescript
|
|
103
|
+
* const results = await Fuul.getProjectPayoutsLeaderboard({ currency_address: '0x12345' }});
|
|
104
|
+
* ```
|
|
105
|
+
**/
|
|
106
|
+
export declare function getProjectPayoutsLeaderboard(params: GetProjectPayoutsLeaderboardParams): Promise<ProjectPayoutsLeaderboardResponse>;
|
|
107
|
+
/**
|
|
108
|
+
* Gets the project payouts leaderboard
|
|
109
|
+
* @param {GetUserPayoutsParams} params The search params
|
|
110
|
+
* @returns {UserPayoutsResponse} Project payouts leaderboard
|
|
111
|
+
* @example
|
|
112
|
+
* ```typescript
|
|
113
|
+
* const results = await Fuul.getUserPayouts({ user_address: '0x12345' }});
|
|
114
|
+
* ```
|
|
115
|
+
**/
|
|
116
|
+
export declare function getUserPayouts(params: GetUserPayoutsParams): Promise<UserPayoutsResponse>;
|
|
98
117
|
export declare function getConversions(): Promise<Conversion[]>;
|
|
99
118
|
declare const _default: {
|
|
100
119
|
init: typeof init;
|
|
@@ -107,6 +126,8 @@ declare const _default: {
|
|
|
107
126
|
updateAffiliateCode: typeof updateAffiliateCode;
|
|
108
127
|
getAffiliateCode: typeof getAffiliateCode;
|
|
109
128
|
isAffiliateCodeFree: typeof isAffiliateCodeFree;
|
|
129
|
+
getUserPayouts: typeof getUserPayouts;
|
|
130
|
+
getProjectPayoutsLeaderboard: typeof getProjectPayoutsLeaderboard;
|
|
110
131
|
};
|
|
111
132
|
export default _default;
|
|
112
133
|
//# 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":"
|
|
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;AAED;;;;;;;;;;IAUI;AACJ,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAGxE;AAED;;;;;;;;;;;;IAYI;AACJ,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,MAAM,EACf,gBAAgB,EAAE,MAAM,EACxB,MAAM,CAAC,EAAE,mBAAmB,GAC3B,OAAO,CAAC,MAAM,CAAC,CAkBjB;AAED;;;;;;;;IAQI;AACJ,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,kCAAkC,GAAG,OAAO,CAAC,iCAAiC,CAAC,CAEnI;AAED;;;;;;;;IAQI;AACJ,wBAAgB,cAAc,CAAC,MAAM,EAAE,oBAAoB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAEzF;AAED,wBAAsB,cAAc,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC,CAG5D;;;;;;;;;;;;;;;AAuBD,wBAaE"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Fuul from './core';
|
|
2
|
+
export * from './affiliates/errors';
|
|
2
3
|
export type { Conversion } from './types/api';
|
|
3
4
|
export type { EventArgs, FuulSettings, UserMetadata } from './types/sdk';
|
|
4
|
-
export * from './affiliates/errors';
|
|
5
5
|
export { Fuul };
|
|
6
6
|
//# 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,YAAY,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC9C,YAAY,EAAE,SAAS,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEzE,
|
|
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,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC9C,YAAY,EAAE,SAAS,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEzE,OAAO,EAAE,IAAI,EAAE,CAAC"}
|