@fuul/sdk 0.13.0 → 0.13.1
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/README.md +35 -45
- package/lib/cjs/constants.js +2 -1
- package/lib/cjs/index.js +22 -13
- package/lib/cjs/types/constants.d.ts +1 -0
- package/lib/cjs/types/constants.d.ts.map +1 -1
- package/lib/cjs/types/index.d.ts.map +1 -1
- package/lib/cjs/types/types/types.d.ts +1 -0
- package/lib/cjs/types/types/types.d.ts.map +1 -1
- package/lib/esm/constants.js +1 -0
- package/lib/esm/index.mjs +23 -14
- package/lib/esm/types/constants.d.ts +1 -0
- package/lib/esm/types/constants.d.ts.map +1 -1
- package/lib/esm/types/index.d.ts.map +1 -1
- package/lib/esm/types/types/types.d.ts +1 -0
- package/lib/esm/types/types/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/lib/cjs/types/utils/date.d.ts +0 -2
- package/lib/cjs/types/utils/date.d.ts.map +0 -1
- package/lib/cjs/utils/date.js +0 -7
- package/lib/esm/types/utils/date.d.ts +0 -2
- package/lib/esm/types/utils/date.d.ts.map +0 -1
- package/lib/esm/utils/date.js +0 -3
package/README.md
CHANGED
|
@@ -20,80 +20,70 @@ yarn add @fuul/sdk
|
|
|
20
20
|
|
|
21
21
|
## 2. Set up the Fuul SDK
|
|
22
22
|
|
|
23
|
-
In order to authenticate to
|
|
23
|
+
In order to authenticate to Fuul with your project, you must execute the following in the root file of your app.
|
|
24
24
|
|
|
25
|
-
```
|
|
25
|
+
```
|
|
26
26
|
// App.tsx
|
|
27
27
|
|
|
28
28
|
// Settings config object
|
|
29
29
|
const settings = {
|
|
30
|
-
|
|
30
|
+
apiKey: "your-fuul-api-key"
|
|
31
31
|
};
|
|
32
32
|
|
|
33
33
|
const fuul = new Fuul(settings);
|
|
34
34
|
```
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
- Please note that `projectId` is not required when you initialize Fuul sdk, but it is mandatory in order to send a `“connect_wallet”` event. But don’t worry, you can send it later as an argument using the `Fuul.sendEvent()` method if needed (please refer to section 3 of this guide)
|
|
36
|
+
Now you’ll be able to use Fuul as a global object in any of your files, so you don’t have to create a new instance every time.
|
|
39
37
|
|
|
40
|
-
## 3.
|
|
38
|
+
## 3. Test your integration
|
|
41
39
|
|
|
42
|
-
|
|
40
|
+
Test your integration with the following method:
|
|
43
41
|
|
|
44
|
-
```tsx
|
|
45
|
-
Fuul.verifyConnection()
|
|
46
42
|
```
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
43
|
+
function main() {
|
|
44
|
+
fuul.verifyConnection();
|
|
45
|
+
}
|
|
46
|
+
main();
|
|
47
|
+
```
|
|
51
48
|
|
|
52
49
|
## 4. Sending events
|
|
53
50
|
|
|
54
|
-
|
|
51
|
+
For Fuul to attribute conversion events to your visitors, you'll need to report the connect_wallet event.
|
|
55
52
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
await Fuul.sendEvent("pageview");
|
|
60
|
-
}
|
|
53
|
+
### Connect wallet event
|
|
54
|
+
Projects must send this event every time users connect a wallet to their website (both when connecting a wallet for the first time and when changing wallets during the session).
|
|
55
|
+
For this type of event, projects must send the user address that is being connected to the website as an argument.
|
|
61
56
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}
|
|
57
|
+
```
|
|
58
|
+
await Fuul.sendEvent("connect_wallet", {
|
|
59
|
+
address: <address>,
|
|
60
|
+
signing_message: <message>,
|
|
61
|
+
signature: <signature>
|
|
62
|
+
});
|
|
63
|
+
```
|
|
70
64
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
await Fuul.sendEvent("connect_wallet", {
|
|
74
|
-
address: "0x3Ec0590BC79c74B0145f94C0bE1C5d63E491569f"
|
|
75
|
-
});
|
|
76
|
-
}
|
|
65
|
+
### Sending custom events (optional)
|
|
66
|
+
Apart from the necessary `connect wallet` event, we allow projects to send any custom event to track as pleased.
|
|
77
67
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
}
|
|
68
|
+
```
|
|
69
|
+
await fuul.sendEvent("myCustomEvent", {
|
|
70
|
+
foo,
|
|
71
|
+
bar,
|
|
72
|
+
...myWonderfulArguments
|
|
73
|
+
});
|
|
84
74
|
```
|
|
85
75
|
|
|
86
76
|
## 5. Generating tracking links
|
|
87
77
|
|
|
88
|
-
You can also generate the tracking link for a given wallet `address` and `
|
|
78
|
+
You can also generate the tracking link for a given wallet `address` and `project id`
|
|
89
79
|
|
|
90
80
|
```tsx
|
|
91
81
|
// Let's assume you are testing in localhost:3000
|
|
92
82
|
|
|
93
83
|
const myWonderfulReferrerAddress: string = "0xE8BF39dCd16CF20d39006ba3C722A02e701bf0eE"
|
|
94
|
-
const
|
|
84
|
+
const projectId: string = "79e72760-c730-4422-9e7b-3b730e8800dc"
|
|
95
85
|
|
|
96
|
-
const myTrackingId: string = Fuul.generateTrackingLink(myWonderfulReferrerAddress,
|
|
86
|
+
const myTrackingId: string = Fuul.generateTrackingLink(myWonderfulReferrerAddress, projectId);
|
|
97
87
|
|
|
98
|
-
console.log(myTrackingId) // http://localhost:3000?
|
|
99
|
-
```
|
|
88
|
+
console.log(myTrackingId) // http://localhost:3000?p=79e72760-c730-4422-9e7b-3b730e8800dc&origin=fuul&r=0xE8BF39dCd16CF20d39006ba3C722A02e701bf0eE
|
|
89
|
+
```
|
package/lib/cjs/constants.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SENT_EVENT_ID_KEY = exports.REFERRER_ID_KEY = exports.PROJECT_ID_KEY = exports.TRACKING_ID_KEY = exports.SESSION_ID_KEY = void 0;
|
|
3
|
+
exports.SENT_EVENT_VALIDITY_PERIOD_MS = exports.SENT_EVENT_ID_KEY = exports.REFERRER_ID_KEY = exports.PROJECT_ID_KEY = exports.TRACKING_ID_KEY = exports.SESSION_ID_KEY = void 0;
|
|
4
4
|
exports.SESSION_ID_KEY = "fuul.session_id";
|
|
5
5
|
exports.TRACKING_ID_KEY = "fuul.tracking_id";
|
|
6
6
|
exports.PROJECT_ID_KEY = "fuul.project_id";
|
|
7
7
|
exports.REFERRER_ID_KEY = "fuul.referrer_id";
|
|
8
8
|
exports.SENT_EVENT_ID_KEY = "fuul.sent";
|
|
9
|
+
exports.SENT_EVENT_VALIDITY_PERIOD_MS = 60000;
|
package/lib/cjs/index.js
CHANGED
|
@@ -11,7 +11,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.Fuul = void 0;
|
|
13
13
|
const nanoid_1 = require("nanoid");
|
|
14
|
-
const date_js_1 = require("./utils/date.js");
|
|
15
14
|
const localStorage_js_1 = require("./utils/localStorage.js");
|
|
16
15
|
const constants_js_1 = require("./constants.js");
|
|
17
16
|
const HttpClient_js_1 = require("./infrastructure/http/HttpClient.js");
|
|
@@ -22,22 +21,30 @@ const saveSentEvent = (eventName, params) => {
|
|
|
22
21
|
const eventParams = Object.assign(Object.assign({}, params), { timestamp });
|
|
23
22
|
localStorage.setItem(SENT_EVENT_KEY, JSON.stringify(eventParams));
|
|
24
23
|
};
|
|
25
|
-
const
|
|
24
|
+
const shouldEventBeSent = (eventName, params) => {
|
|
26
25
|
const SENT_EVENT_KEY = `${constants_js_1.SENT_EVENT_ID_KEY}_${eventName}`;
|
|
27
|
-
const
|
|
28
|
-
if (!
|
|
29
|
-
return
|
|
30
|
-
|
|
31
|
-
const
|
|
26
|
+
const sentEvent = localStorage.getItem(SENT_EVENT_KEY);
|
|
27
|
+
if (!sentEvent) {
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
30
|
+
const parsedEvent = JSON.parse(sentEvent);
|
|
31
|
+
const nowTimestamp = Date.now();
|
|
32
|
+
const timespanMillis = nowTimestamp - parsedEvent.timestamp;
|
|
33
|
+
const sentEventExpired = timespanMillis > constants_js_1.SENT_EVENT_VALIDITY_PERIOD_MS;
|
|
34
|
+
if (sentEventExpired) {
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
let eventArgsMatch = false;
|
|
32
38
|
if (eventName === "connect_wallet") {
|
|
33
|
-
|
|
39
|
+
eventArgsMatch = (parsedEvent["tracking_id"] === params.tracking_id &&
|
|
40
|
+
parsedEvent["address"] === params.address);
|
|
34
41
|
}
|
|
35
42
|
else {
|
|
36
|
-
|
|
43
|
+
eventArgsMatch = (parsedEvent["tracking_id"] === params.tracking_id &&
|
|
37
44
|
parsedEvent["project_id"] === params.project_id &&
|
|
38
|
-
parsedEvent["referrer_id"] === params.referrer_id
|
|
39
|
-
isSameDay);
|
|
45
|
+
parsedEvent["referrer_id"] === params.referrer_id);
|
|
40
46
|
}
|
|
47
|
+
return !eventArgsMatch;
|
|
41
48
|
};
|
|
42
49
|
const generateRandomId = () => (0, nanoid_1.nanoid)();
|
|
43
50
|
const saveSessionId = () => {
|
|
@@ -121,10 +128,11 @@ class Fuul {
|
|
|
121
128
|
};
|
|
122
129
|
let reqBody = {};
|
|
123
130
|
if (name === "connect_wallet") {
|
|
131
|
+
params = Object.assign(Object.assign({}, params), { address: args === null || args === void 0 ? void 0 : args.address });
|
|
124
132
|
reqBody = {
|
|
125
133
|
name,
|
|
126
134
|
session_id,
|
|
127
|
-
event_args: Object.assign(Object.assign({}, args), { tracking_id })
|
|
135
|
+
event_args: Object.assign(Object.assign({}, args), { tracking_id })
|
|
128
136
|
};
|
|
129
137
|
}
|
|
130
138
|
else {
|
|
@@ -137,8 +145,9 @@ class Fuul {
|
|
|
137
145
|
event_args: Object.assign(Object.assign({}, args), { referrer: referrer_id, tracking_id }),
|
|
138
146
|
};
|
|
139
147
|
}
|
|
140
|
-
if (
|
|
148
|
+
if (!shouldEventBeSent(name, params)) {
|
|
141
149
|
return;
|
|
150
|
+
}
|
|
142
151
|
try {
|
|
143
152
|
yield this.httpClient.post("events", reqBody);
|
|
144
153
|
saveSentEvent(name, params);
|
|
@@ -3,4 +3,5 @@ export declare const TRACKING_ID_KEY = "fuul.tracking_id";
|
|
|
3
3
|
export declare const PROJECT_ID_KEY = "fuul.project_id";
|
|
4
4
|
export declare const REFERRER_ID_KEY = "fuul.referrer_id";
|
|
5
5
|
export declare const SENT_EVENT_ID_KEY = "fuul.sent";
|
|
6
|
+
export declare const SENT_EVENT_VALIDITY_PERIOD_MS = 60000;
|
|
6
7
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,oBAAoB,CAAC;AAChD,eAAO,MAAM,eAAe,qBAAqB,CAAC;AAClD,eAAO,MAAM,cAAc,oBAAoB,CAAC;AAChD,eAAO,MAAM,eAAe,qBAAqB,CAAC;AAClD,eAAO,MAAM,iBAAiB,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,oBAAoB,CAAC;AAChD,eAAO,MAAM,eAAe,qBAAqB,CAAC;AAClD,eAAO,MAAM,cAAc,oBAAoB,CAAC;AAChD,eAAO,MAAM,eAAe,qBAAqB,CAAC;AAClD,eAAO,MAAM,iBAAiB,cAAc,CAAC;AAC7C,eAAO,MAAM,6BAA6B,QAAQ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAgBA,OAAO,EACL,aAAa,EACb,SAAS,EACT,YAAY,EACZ,qBAAqB,EAEtB,MAAM,kBAAkB,CAAC;AAI1B,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAgBA,OAAO,EACL,aAAa,EACb,SAAS,EACT,YAAY,EACZ,qBAAqB,EAEtB,MAAM,kBAAkB,CAAC;AAI1B,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAkFjE,qBAAa,IAAI;IACf,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;IAChC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAA0C;IACvE,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAa;IACxC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAe;IAExC,OAAO,CAAC,gBAAgB,CAAmB;gBAE/B,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAE,YAAiB;IAuBjD,IAAI;IAQV,WAAW,IAAI,IAAI;IAMnB;;;;;;;;;;;;;;;OAeG;IACG,SAAS,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,GAAG,CAAC;IA4DpE,gBAAgB,IAAI,IAAI;IAMxB;;;;;;OAMG;IACH,oBAAoB,CAAC,EACnB,OAAO,EACP,GAAG,EACH,OAAO,GACR,EAAE,qBAAqB,GAAG,MAAM;IAO3B,eAAe,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC;CAGhD;;;;AAMD,wBAEE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/types/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,SAAS,CAAC;IAChB,IAAI,CAAC,EAAE,aAAa,CAAC;CACtB;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAChD,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,gBAAgB,GAAG,UAAU,CAAC;AAEtD,MAAM,WAAW,eAAe;IAC9B,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/types/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,SAAS,CAAC;IAChB,IAAI,CAAC,EAAE,aAAa,CAAC;CACtB;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAChD,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,gBAAgB,GAAG,UAAU,CAAC;AAEtD,MAAM,WAAW,eAAe;IAC9B,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB"}
|
package/lib/esm/constants.js
CHANGED
package/lib/esm/index.mjs
CHANGED
|
@@ -8,9 +8,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import { nanoid } from "nanoid";
|
|
11
|
-
import { datesAreOnSameDay } from "./utils/date.js";
|
|
12
11
|
import { getReferrerId, getSessionId, getTrackingId, } from "./utils/localStorage.js";
|
|
13
|
-
import { REFERRER_ID_KEY, SENT_EVENT_ID_KEY, SESSION_ID_KEY, TRACKING_ID_KEY, } from "./constants.js";
|
|
12
|
+
import { REFERRER_ID_KEY, SENT_EVENT_ID_KEY, SESSION_ID_KEY, TRACKING_ID_KEY, SENT_EVENT_VALIDITY_PERIOD_MS } from "./constants.js";
|
|
14
13
|
import { HttpClient } from "./infrastructure/http/HttpClient.js";
|
|
15
14
|
import { CampaignsService } from "./infrastructure/campaigns/campaignsService.js";
|
|
16
15
|
const saveSentEvent = (eventName, params) => {
|
|
@@ -19,22 +18,30 @@ const saveSentEvent = (eventName, params) => {
|
|
|
19
18
|
const eventParams = Object.assign(Object.assign({}, params), { timestamp });
|
|
20
19
|
localStorage.setItem(SENT_EVENT_KEY, JSON.stringify(eventParams));
|
|
21
20
|
};
|
|
22
|
-
const
|
|
21
|
+
const shouldEventBeSent = (eventName, params) => {
|
|
23
22
|
const SENT_EVENT_KEY = `${SENT_EVENT_ID_KEY}_${eventName}`;
|
|
24
|
-
const
|
|
25
|
-
if (!
|
|
26
|
-
return
|
|
27
|
-
|
|
28
|
-
const
|
|
23
|
+
const sentEvent = localStorage.getItem(SENT_EVENT_KEY);
|
|
24
|
+
if (!sentEvent) {
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
const parsedEvent = JSON.parse(sentEvent);
|
|
28
|
+
const nowTimestamp = Date.now();
|
|
29
|
+
const timespanMillis = nowTimestamp - parsedEvent.timestamp;
|
|
30
|
+
const sentEventExpired = timespanMillis > SENT_EVENT_VALIDITY_PERIOD_MS;
|
|
31
|
+
if (sentEventExpired) {
|
|
32
|
+
return true;
|
|
33
|
+
}
|
|
34
|
+
let eventArgsMatch = false;
|
|
29
35
|
if (eventName === "connect_wallet") {
|
|
30
|
-
|
|
36
|
+
eventArgsMatch = (parsedEvent["tracking_id"] === params.tracking_id &&
|
|
37
|
+
parsedEvent["address"] === params.address);
|
|
31
38
|
}
|
|
32
39
|
else {
|
|
33
|
-
|
|
40
|
+
eventArgsMatch = (parsedEvent["tracking_id"] === params.tracking_id &&
|
|
34
41
|
parsedEvent["project_id"] === params.project_id &&
|
|
35
|
-
parsedEvent["referrer_id"] === params.referrer_id
|
|
36
|
-
isSameDay);
|
|
42
|
+
parsedEvent["referrer_id"] === params.referrer_id);
|
|
37
43
|
}
|
|
44
|
+
return !eventArgsMatch;
|
|
38
45
|
};
|
|
39
46
|
const generateRandomId = () => nanoid();
|
|
40
47
|
const saveSessionId = () => {
|
|
@@ -118,10 +125,11 @@ export class Fuul {
|
|
|
118
125
|
};
|
|
119
126
|
let reqBody = {};
|
|
120
127
|
if (name === "connect_wallet") {
|
|
128
|
+
params = Object.assign(Object.assign({}, params), { address: args === null || args === void 0 ? void 0 : args.address });
|
|
121
129
|
reqBody = {
|
|
122
130
|
name,
|
|
123
131
|
session_id,
|
|
124
|
-
event_args: Object.assign(Object.assign({}, args), { tracking_id })
|
|
132
|
+
event_args: Object.assign(Object.assign({}, args), { tracking_id })
|
|
125
133
|
};
|
|
126
134
|
}
|
|
127
135
|
else {
|
|
@@ -134,8 +142,9 @@ export class Fuul {
|
|
|
134
142
|
event_args: Object.assign(Object.assign({}, args), { referrer: referrer_id, tracking_id }),
|
|
135
143
|
};
|
|
136
144
|
}
|
|
137
|
-
if (
|
|
145
|
+
if (!shouldEventBeSent(name, params)) {
|
|
138
146
|
return;
|
|
147
|
+
}
|
|
139
148
|
try {
|
|
140
149
|
yield this.httpClient.post("events", reqBody);
|
|
141
150
|
saveSentEvent(name, params);
|
|
@@ -3,4 +3,5 @@ export declare const TRACKING_ID_KEY = "fuul.tracking_id";
|
|
|
3
3
|
export declare const PROJECT_ID_KEY = "fuul.project_id";
|
|
4
4
|
export declare const REFERRER_ID_KEY = "fuul.referrer_id";
|
|
5
5
|
export declare const SENT_EVENT_ID_KEY = "fuul.sent";
|
|
6
|
+
export declare const SENT_EVENT_VALIDITY_PERIOD_MS = 60000;
|
|
6
7
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,oBAAoB,CAAC;AAChD,eAAO,MAAM,eAAe,qBAAqB,CAAC;AAClD,eAAO,MAAM,cAAc,oBAAoB,CAAC;AAChD,eAAO,MAAM,eAAe,qBAAqB,CAAC;AAClD,eAAO,MAAM,iBAAiB,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,oBAAoB,CAAC;AAChD,eAAO,MAAM,eAAe,qBAAqB,CAAC;AAClD,eAAO,MAAM,cAAc,oBAAoB,CAAC;AAChD,eAAO,MAAM,eAAe,qBAAqB,CAAC;AAClD,eAAO,MAAM,iBAAiB,cAAc,CAAC;AAC7C,eAAO,MAAM,6BAA6B,QAAQ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAgBA,OAAO,EACL,aAAa,EACb,SAAS,EACT,YAAY,EACZ,qBAAqB,EAEtB,MAAM,kBAAkB,CAAC;AAI1B,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAgBA,OAAO,EACL,aAAa,EACb,SAAS,EACT,YAAY,EACZ,qBAAqB,EAEtB,MAAM,kBAAkB,CAAC;AAI1B,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAkFjE,qBAAa,IAAI;IACf,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;IAChC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAA0C;IACvE,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAa;IACxC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAe;IAExC,OAAO,CAAC,gBAAgB,CAAmB;gBAE/B,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAE,YAAiB;IAuBjD,IAAI;IAQV,WAAW,IAAI,IAAI;IAMnB;;;;;;;;;;;;;;;OAeG;IACG,SAAS,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,GAAG,CAAC;IA4DpE,gBAAgB,IAAI,IAAI;IAMxB;;;;;;OAMG;IACH,oBAAoB,CAAC,EACnB,OAAO,EACP,GAAG,EACH,OAAO,GACR,EAAE,qBAAqB,GAAG,MAAM;IAO3B,eAAe,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC;CAGhD;;;;AAMD,wBAEE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/types/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,SAAS,CAAC;IAChB,IAAI,CAAC,EAAE,aAAa,CAAC;CACtB;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAChD,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,gBAAgB,GAAG,UAAU,CAAC;AAEtD,MAAM,WAAW,eAAe;IAC9B,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/types/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,SAAS,CAAC;IAChB,IAAI,CAAC,EAAE,aAAa,CAAC;CACtB;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAChD,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,gBAAgB,GAAG,UAAU,CAAC;AAEtD,MAAM,WAAW,eAAe;IAC9B,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB"}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"date.d.ts","sourceRoot":"","sources":["../../../../src/utils/date.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,UAAW,IAAI,UAAU,IAAI,YAGrB,CAAC"}
|
package/lib/cjs/utils/date.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.datesAreOnSameDay = void 0;
|
|
4
|
-
const datesAreOnSameDay = (first, second) => first.getFullYear() === second.getFullYear() &&
|
|
5
|
-
first.getMonth() === second.getMonth() &&
|
|
6
|
-
first.getDate() === second.getDate();
|
|
7
|
-
exports.datesAreOnSameDay = datesAreOnSameDay;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"date.d.ts","sourceRoot":"","sources":["../../../../src/utils/date.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,UAAW,IAAI,UAAU,IAAI,YAGrB,CAAC"}
|
package/lib/esm/utils/date.js
DELETED