saasco-sdk 0.1.14 → 0.1.16
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 +22 -15
- package/index.cjs.js +47 -20
- package/index.esm.js +47 -20
- package/package.json +1 -1
- package/src/lib/analytics.d.ts +8 -2
- package/src/lib/types.d.ts +138 -47
package/README.md
CHANGED
|
@@ -33,19 +33,25 @@ import { Saasco } from 'saasco-sdk';
|
|
|
33
33
|
export const saasco = new Saasco({ projectId: 'YOUR-PROJECT-ID' });
|
|
34
34
|
```
|
|
35
35
|
|
|
36
|
-
##
|
|
37
|
-
|
|
38
|
-
When you initiate the lib Saasco will automatically start tracking all page views in your app.
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
36
|
+
## Automatic Page View Tracking
|
|
37
|
+
|
|
38
|
+
When you initiate the lib Saasco will automatically start tracking all page views in your app. By default, it tracks all URL changes, including query parameters and hash changes. You can customize this behavior using the `autoPageTracking` configuration object:
|
|
39
|
+
|
|
40
|
+
```typescript
|
|
41
|
+
const analytics = new Saasco({
|
|
42
|
+
projectId: 'your-project-id',
|
|
43
|
+
autoPageTracking: {
|
|
44
|
+
enabled: true, // Set to false to disable automatic page tracking
|
|
45
|
+
trackQueryParams: true, // Set to false to ignore URL query parameter changes
|
|
46
|
+
trackHash: true, // Set to false to ignore URL hash changes
|
|
47
|
+
},
|
|
48
|
+
});
|
|
44
49
|
|
|
45
|
-
|
|
46
|
-
saasco.init();
|
|
50
|
+
analytics.init();
|
|
47
51
|
```
|
|
48
52
|
|
|
53
|
+
You can also [manually track pages](https://www.notion.so/Manual-Page-Tracking-in-SPAs-2442fc7586dc4208ae8f669eb7561b1a?pvs=21) by disabling automatic page tracking (`enabled: false`). For most use cases you don't need to do this.
|
|
54
|
+
|
|
49
55
|
## Tracking Events
|
|
50
56
|
|
|
51
57
|
With events you can track custom actions users are taking on your site with event properties.
|
|
@@ -168,7 +174,7 @@ saasco.debug(true);
|
|
|
168
174
|
## Reserved Properties
|
|
169
175
|
|
|
170
176
|
Saasco has reserved some properties that have semantic meanings for contacts and, and will handle them in special ways.
|
|
171
|
-
For example, Saasco always expects email to be a string of the user
|
|
177
|
+
For example, Saasco always expects email to be a string of the user's email address, this is important for when sending emails using the marketing app.
|
|
172
178
|
The SDK will do its best to match these properties, eg (created_at will be mapped to createdAt), but if possible you should use the reserved properties.
|
|
173
179
|
|
|
174
180
|
### Reserved Contact Properties
|
|
@@ -177,8 +183,8 @@ The SDK will do its best to match these properties, eg (created_at will be mappe
|
|
|
177
183
|
| ----------- | ------ | ----------------------------------------------------------------------------------------------------------------- |
|
|
178
184
|
| age | Number | Age of a user |
|
|
179
185
|
| avatar | String | URL to an avatar image for the user |
|
|
180
|
-
| birthday | Date | User
|
|
181
|
-
| createdAt | Date | Date the user
|
|
186
|
+
| birthday | Date | User's birthday |
|
|
187
|
+
| createdAt | Date | Date the user's account was first created. We recomend recommend using ISO-8601 date strings. |
|
|
182
188
|
| description | String | Description of the user |
|
|
183
189
|
| email | String | Email address of a user |
|
|
184
190
|
| firstName | String | First name of a user |
|
|
@@ -187,8 +193,8 @@ The SDK will do its best to match these properties, eg (created_at will be mappe
|
|
|
187
193
|
| lastName | String | Last name of a user |
|
|
188
194
|
| name | String | Full name of a user. If you only pass a first and last name Segment automatically fills in the full name for you. |
|
|
189
195
|
| phone | String | Phone number of a user |
|
|
190
|
-
| title | String | Title of a user, usually related to their position at a specific company. Example:
|
|
191
|
-
| username | String | User
|
|
196
|
+
| title | String | Title of a user, usually related to their position at a specific company. Example: "VP of Engineering" |
|
|
197
|
+
| username | String | User's username. This should be unique to each user, like the usernames of Twitter or GitHub. |
|
|
192
198
|
| website | String | Website of a user |
|
|
193
199
|
|
|
194
200
|
### Default Contact Properties
|
|
@@ -227,6 +233,7 @@ Any property that starts with `$` is a property that has been generated by the S
|
|
|
227
233
|
| $initialUtmContent | Initial UTM Content | The initial UTM content tag from the URL a customer clicked to arrive at your domain. |
|
|
228
234
|
| $utmContent | Last Touch UTM Content | The UTM content tag from the URL a customer clicked during their last interaction. |
|
|
229
235
|
| $unsubscribed | Unsubscribed | Whether the user has unsubscribed from all notifications |
|
|
236
|
+
| $unsubscribeReason | Unsubscribe Reason | The reason the user was unsubscribed - eg complained, bounced, requested |
|
|
230
237
|
|
|
231
238
|
### Reserved Integration Properties
|
|
232
239
|
|
package/index.cjs.js
CHANGED
|
@@ -6,7 +6,7 @@ var tslib = require('tslib');
|
|
|
6
6
|
var uuid = require('@lukeed/uuid');
|
|
7
7
|
var zod = require('zod');
|
|
8
8
|
|
|
9
|
-
var version = "0.1.
|
|
9
|
+
var version = "0.1.16";
|
|
10
10
|
|
|
11
11
|
const timezones = {
|
|
12
12
|
'Asia/Barnaul': 'RU',
|
|
@@ -549,10 +549,12 @@ class Saasco {
|
|
|
549
549
|
* @param config.autoPageTracking Whether to automatically track page views. Default is false.
|
|
550
550
|
* @param config.enabled Whether analytics is enabled. Default is true. Set to false for development and staging envioronments. Will still allow debug mode to be true, just no events will be sent
|
|
551
551
|
* @param config.debug Whether to log debug information. Default is false.
|
|
552
|
+
* @param config.trackUrlParams Whether to track URL parameters. Default is true.
|
|
553
|
+
* @param config.trackHashChanges Whether to track hash changes. Default is true.
|
|
552
554
|
*/
|
|
553
555
|
constructor(config) {
|
|
554
556
|
this.config = config;
|
|
555
|
-
this.
|
|
557
|
+
this.lastPageViewPath = '';
|
|
556
558
|
this.isInitialized = false;
|
|
557
559
|
if (!config.projectId) {
|
|
558
560
|
this.error("Project ID is required but has not been provided. If you are using an env variable make sure it's set correctly.");
|
|
@@ -560,6 +562,12 @@ class Saasco {
|
|
|
560
562
|
}
|
|
561
563
|
// default enabled to true
|
|
562
564
|
this.config.enabled = this.config.enabled === undefined ? true : this.config.enabled;
|
|
565
|
+
// Set default auto page tracking config
|
|
566
|
+
this.config.autoPageTracking = Object.assign({
|
|
567
|
+
enabled: true,
|
|
568
|
+
trackQueryParams: true,
|
|
569
|
+
trackHash: true
|
|
570
|
+
}, this.config.autoPageTracking);
|
|
563
571
|
}
|
|
564
572
|
init() {
|
|
565
573
|
if (this.isInitialized) {
|
|
@@ -597,16 +605,6 @@ class Saasco {
|
|
|
597
605
|
if (!this.config.projectId) {
|
|
598
606
|
return this.error("Unable to track event. Project ID is required but has not been provided. If you are using an env variable make sure it's set correctly.");
|
|
599
607
|
}
|
|
600
|
-
// Prevent duplicate Page View tracking
|
|
601
|
-
if (name === 'Page View') {
|
|
602
|
-
if (!isBrowser) {
|
|
603
|
-
console.warn('Saasco page tracking is only available in the browser');
|
|
604
|
-
return;
|
|
605
|
-
}
|
|
606
|
-
const pageViewHref = window.location.href;
|
|
607
|
-
if (pageViewHref === this.lastPageViewHref) return;
|
|
608
|
-
this.lastPageViewHref = pageViewHref;
|
|
609
|
-
}
|
|
610
608
|
setSessionId();
|
|
611
609
|
setAnonmousId();
|
|
612
610
|
const browserContext = getBrowserContext();
|
|
@@ -633,6 +631,24 @@ class Saasco {
|
|
|
633
631
|
* Before implementing this make sure you have disabled the autoPageTracking in the config or you will get duplicate page views
|
|
634
632
|
*/
|
|
635
633
|
page() {
|
|
634
|
+
var _a, _b;
|
|
635
|
+
if (!isBrowser) {
|
|
636
|
+
console.warn('Saasco page tracking is only available in the browser');
|
|
637
|
+
return;
|
|
638
|
+
}
|
|
639
|
+
const url = new URL(window.location.href);
|
|
640
|
+
let pathToCompare = url.pathname;
|
|
641
|
+
// Include search params if configured
|
|
642
|
+
if ((_a = this.config.autoPageTracking) === null || _a === void 0 ? void 0 : _a.trackQueryParams) {
|
|
643
|
+
pathToCompare += url.search;
|
|
644
|
+
}
|
|
645
|
+
// Include hash if configured
|
|
646
|
+
if ((_b = this.config.autoPageTracking) === null || _b === void 0 ? void 0 : _b.trackHash) {
|
|
647
|
+
pathToCompare += url.hash;
|
|
648
|
+
}
|
|
649
|
+
// Only track if the path has changed
|
|
650
|
+
if (pathToCompare === this.lastPageViewPath) return;
|
|
651
|
+
this.lastPageViewPath = pathToCompare;
|
|
636
652
|
return this.track('Page View');
|
|
637
653
|
}
|
|
638
654
|
identify(distinctIdOrProperties, propertiesOrContext, contextOrNothing) {
|
|
@@ -730,9 +746,9 @@ class Saasco {
|
|
|
730
746
|
* @returns
|
|
731
747
|
*/
|
|
732
748
|
initiAutoPageTracking() {
|
|
749
|
+
var _a, _b;
|
|
733
750
|
// Disable auto page tracking if the config is set to false
|
|
734
|
-
|
|
735
|
-
if (this.config.autoPageTracking === false) return;
|
|
751
|
+
if (!((_a = this.config.autoPageTracking) === null || _a === void 0 ? void 0 : _a.enabled)) return;
|
|
736
752
|
// Prevent running on the server
|
|
737
753
|
if (!isBrowser) return console.warn('Saasco auto page tracking is only available in the browser');
|
|
738
754
|
// Prevent intitializing auto page tracking more than once
|
|
@@ -744,8 +760,10 @@ class Saasco {
|
|
|
744
760
|
this.log('Auto Page Tracking enabled');
|
|
745
761
|
// Track initial page load
|
|
746
762
|
this.page();
|
|
747
|
-
// Listen for hash changes
|
|
748
|
-
|
|
763
|
+
// Listen for hash changes if hash tracking is enabled
|
|
764
|
+
if ((_b = this.config.autoPageTracking) === null || _b === void 0 ? void 0 : _b.trackHash) {
|
|
765
|
+
window.addEventListener('hashchange', () => this.page());
|
|
766
|
+
}
|
|
749
767
|
// Listen to popstate for back and forward navigation
|
|
750
768
|
window.addEventListener('popstate', () => this.page());
|
|
751
769
|
// Wrap history push state to listen for URL changes
|
|
@@ -960,7 +978,9 @@ const TinybirdJobResponseSchema = zod.z.object({
|
|
|
960
978
|
const latestEventsRequestSchema = zod.z.object({
|
|
961
979
|
projectId: zod.z.string(),
|
|
962
980
|
limit: zod.z.number().optional(),
|
|
963
|
-
payload: zod.z.boolean().optional()
|
|
981
|
+
payload: zod.z.boolean().optional(),
|
|
982
|
+
distinctId: zod.z.string().optional(),
|
|
983
|
+
action: zod.z.string().optional()
|
|
964
984
|
});
|
|
965
985
|
const latestEventItemSchema = zod.z.object({
|
|
966
986
|
id: zod.z.string(),
|
|
@@ -971,7 +991,9 @@ const latestEventItemSchema = zod.z.object({
|
|
|
971
991
|
href: zod.z.string(),
|
|
972
992
|
device: zod.z.string(),
|
|
973
993
|
browser: zod.z.string(),
|
|
974
|
-
payload: zod.z.string().optional()
|
|
994
|
+
payload: zod.z.string().optional(),
|
|
995
|
+
distinctId: zod.z.string().optional(),
|
|
996
|
+
unique: zod.z.boolean().optional()
|
|
975
997
|
});
|
|
976
998
|
const latestEventsResponseSchema = tinyBirdBaseSchema.extend({
|
|
977
999
|
data: zod.z.array(latestEventItemSchema)
|
|
@@ -1083,7 +1105,7 @@ const currentUsersResponseSchema = tinyBirdBaseSchema.extend({
|
|
|
1083
1105
|
}))
|
|
1084
1106
|
});
|
|
1085
1107
|
const reservedPropertiesSchema = zod.z.object({
|
|
1086
|
-
age: zod.z.number().
|
|
1108
|
+
age: zod.z.number().nullish(),
|
|
1087
1109
|
avatar: zod.z.string().url().nullish(),
|
|
1088
1110
|
birthday: zod.z.string().nullish(),
|
|
1089
1111
|
createdAt: zod.z.string().nullish(),
|
|
@@ -1098,12 +1120,17 @@ const reservedPropertiesSchema = zod.z.object({
|
|
|
1098
1120
|
title: zod.z.string().nullish(),
|
|
1099
1121
|
username: zod.z.string().nullish(),
|
|
1100
1122
|
website: zod.z.string().nullish(),
|
|
1123
|
+
// Default Properties
|
|
1101
1124
|
$id: zod.z.string().nullish(),
|
|
1102
1125
|
$lastSeen: zod.z.string().nullish(),
|
|
1126
|
+
$unsubscribed: zod.z.boolean().nullish(),
|
|
1127
|
+
$unsubscribeReason: zod.z.enum(['manual', 'complained', 'bounced']).nullish(),
|
|
1103
1128
|
// Stripe Properties
|
|
1104
1129
|
$stripeCustomerId: zod.z.string().nullish(),
|
|
1105
1130
|
$stripeTotalPayments: zod.z.number().or(zod.z.string()).nullish(),
|
|
1106
|
-
$stripeTotalSpent: zod.z.number().or(zod.z.string()).nullish()
|
|
1131
|
+
$stripeTotalSpent: zod.z.number().or(zod.z.string()).nullish(),
|
|
1132
|
+
// Internal properties
|
|
1133
|
+
$_toDelete: zod.z.boolean().nullish()
|
|
1107
1134
|
});
|
|
1108
1135
|
const contactPropertiesSchema = reservedPropertiesSchema.optional().and(zod.z.record(zod.z.union([zod.z.string(), zod.z.number(), zod.z.boolean(), zod.z.date(), zod.z.null(), zod.z.array(zod.z.union([zod.z.string(), zod.z.number(), zod.z.boolean(), zod.z.date(), zod.z.null()]))])));
|
|
1109
1136
|
const analyticsUserRawSchema = zod.z.object({
|
package/index.esm.js
CHANGED
|
@@ -2,7 +2,7 @@ import { __awaiter } from 'tslib';
|
|
|
2
2
|
import { v4 } from '@lukeed/uuid';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
|
|
5
|
-
var version = "0.1.
|
|
5
|
+
var version = "0.1.16";
|
|
6
6
|
|
|
7
7
|
const timezones = {
|
|
8
8
|
'Asia/Barnaul': 'RU',
|
|
@@ -545,10 +545,12 @@ class Saasco {
|
|
|
545
545
|
* @param config.autoPageTracking Whether to automatically track page views. Default is false.
|
|
546
546
|
* @param config.enabled Whether analytics is enabled. Default is true. Set to false for development and staging envioronments. Will still allow debug mode to be true, just no events will be sent
|
|
547
547
|
* @param config.debug Whether to log debug information. Default is false.
|
|
548
|
+
* @param config.trackUrlParams Whether to track URL parameters. Default is true.
|
|
549
|
+
* @param config.trackHashChanges Whether to track hash changes. Default is true.
|
|
548
550
|
*/
|
|
549
551
|
constructor(config) {
|
|
550
552
|
this.config = config;
|
|
551
|
-
this.
|
|
553
|
+
this.lastPageViewPath = '';
|
|
552
554
|
this.isInitialized = false;
|
|
553
555
|
if (!config.projectId) {
|
|
554
556
|
this.error("Project ID is required but has not been provided. If you are using an env variable make sure it's set correctly.");
|
|
@@ -556,6 +558,12 @@ class Saasco {
|
|
|
556
558
|
}
|
|
557
559
|
// default enabled to true
|
|
558
560
|
this.config.enabled = this.config.enabled === undefined ? true : this.config.enabled;
|
|
561
|
+
// Set default auto page tracking config
|
|
562
|
+
this.config.autoPageTracking = Object.assign({
|
|
563
|
+
enabled: true,
|
|
564
|
+
trackQueryParams: true,
|
|
565
|
+
trackHash: true
|
|
566
|
+
}, this.config.autoPageTracking);
|
|
559
567
|
}
|
|
560
568
|
init() {
|
|
561
569
|
if (this.isInitialized) {
|
|
@@ -593,16 +601,6 @@ class Saasco {
|
|
|
593
601
|
if (!this.config.projectId) {
|
|
594
602
|
return this.error("Unable to track event. Project ID is required but has not been provided. If you are using an env variable make sure it's set correctly.");
|
|
595
603
|
}
|
|
596
|
-
// Prevent duplicate Page View tracking
|
|
597
|
-
if (name === 'Page View') {
|
|
598
|
-
if (!isBrowser) {
|
|
599
|
-
console.warn('Saasco page tracking is only available in the browser');
|
|
600
|
-
return;
|
|
601
|
-
}
|
|
602
|
-
const pageViewHref = window.location.href;
|
|
603
|
-
if (pageViewHref === this.lastPageViewHref) return;
|
|
604
|
-
this.lastPageViewHref = pageViewHref;
|
|
605
|
-
}
|
|
606
604
|
setSessionId();
|
|
607
605
|
setAnonmousId();
|
|
608
606
|
const browserContext = getBrowserContext();
|
|
@@ -629,6 +627,24 @@ class Saasco {
|
|
|
629
627
|
* Before implementing this make sure you have disabled the autoPageTracking in the config or you will get duplicate page views
|
|
630
628
|
*/
|
|
631
629
|
page() {
|
|
630
|
+
var _a, _b;
|
|
631
|
+
if (!isBrowser) {
|
|
632
|
+
console.warn('Saasco page tracking is only available in the browser');
|
|
633
|
+
return;
|
|
634
|
+
}
|
|
635
|
+
const url = new URL(window.location.href);
|
|
636
|
+
let pathToCompare = url.pathname;
|
|
637
|
+
// Include search params if configured
|
|
638
|
+
if ((_a = this.config.autoPageTracking) === null || _a === void 0 ? void 0 : _a.trackQueryParams) {
|
|
639
|
+
pathToCompare += url.search;
|
|
640
|
+
}
|
|
641
|
+
// Include hash if configured
|
|
642
|
+
if ((_b = this.config.autoPageTracking) === null || _b === void 0 ? void 0 : _b.trackHash) {
|
|
643
|
+
pathToCompare += url.hash;
|
|
644
|
+
}
|
|
645
|
+
// Only track if the path has changed
|
|
646
|
+
if (pathToCompare === this.lastPageViewPath) return;
|
|
647
|
+
this.lastPageViewPath = pathToCompare;
|
|
632
648
|
return this.track('Page View');
|
|
633
649
|
}
|
|
634
650
|
identify(distinctIdOrProperties, propertiesOrContext, contextOrNothing) {
|
|
@@ -726,9 +742,9 @@ class Saasco {
|
|
|
726
742
|
* @returns
|
|
727
743
|
*/
|
|
728
744
|
initiAutoPageTracking() {
|
|
745
|
+
var _a, _b;
|
|
729
746
|
// Disable auto page tracking if the config is set to false
|
|
730
|
-
|
|
731
|
-
if (this.config.autoPageTracking === false) return;
|
|
747
|
+
if (!((_a = this.config.autoPageTracking) === null || _a === void 0 ? void 0 : _a.enabled)) return;
|
|
732
748
|
// Prevent running on the server
|
|
733
749
|
if (!isBrowser) return console.warn('Saasco auto page tracking is only available in the browser');
|
|
734
750
|
// Prevent intitializing auto page tracking more than once
|
|
@@ -740,8 +756,10 @@ class Saasco {
|
|
|
740
756
|
this.log('Auto Page Tracking enabled');
|
|
741
757
|
// Track initial page load
|
|
742
758
|
this.page();
|
|
743
|
-
// Listen for hash changes
|
|
744
|
-
|
|
759
|
+
// Listen for hash changes if hash tracking is enabled
|
|
760
|
+
if ((_b = this.config.autoPageTracking) === null || _b === void 0 ? void 0 : _b.trackHash) {
|
|
761
|
+
window.addEventListener('hashchange', () => this.page());
|
|
762
|
+
}
|
|
745
763
|
// Listen to popstate for back and forward navigation
|
|
746
764
|
window.addEventListener('popstate', () => this.page());
|
|
747
765
|
// Wrap history push state to listen for URL changes
|
|
@@ -956,7 +974,9 @@ const TinybirdJobResponseSchema = z.object({
|
|
|
956
974
|
const latestEventsRequestSchema = z.object({
|
|
957
975
|
projectId: z.string(),
|
|
958
976
|
limit: z.number().optional(),
|
|
959
|
-
payload: z.boolean().optional()
|
|
977
|
+
payload: z.boolean().optional(),
|
|
978
|
+
distinctId: z.string().optional(),
|
|
979
|
+
action: z.string().optional()
|
|
960
980
|
});
|
|
961
981
|
const latestEventItemSchema = z.object({
|
|
962
982
|
id: z.string(),
|
|
@@ -967,7 +987,9 @@ const latestEventItemSchema = z.object({
|
|
|
967
987
|
href: z.string(),
|
|
968
988
|
device: z.string(),
|
|
969
989
|
browser: z.string(),
|
|
970
|
-
payload: z.string().optional()
|
|
990
|
+
payload: z.string().optional(),
|
|
991
|
+
distinctId: z.string().optional(),
|
|
992
|
+
unique: z.boolean().optional()
|
|
971
993
|
});
|
|
972
994
|
const latestEventsResponseSchema = tinyBirdBaseSchema.extend({
|
|
973
995
|
data: z.array(latestEventItemSchema)
|
|
@@ -1079,7 +1101,7 @@ const currentUsersResponseSchema = tinyBirdBaseSchema.extend({
|
|
|
1079
1101
|
}))
|
|
1080
1102
|
});
|
|
1081
1103
|
const reservedPropertiesSchema = z.object({
|
|
1082
|
-
age: z.number().
|
|
1104
|
+
age: z.number().nullish(),
|
|
1083
1105
|
avatar: z.string().url().nullish(),
|
|
1084
1106
|
birthday: z.string().nullish(),
|
|
1085
1107
|
createdAt: z.string().nullish(),
|
|
@@ -1094,12 +1116,17 @@ const reservedPropertiesSchema = z.object({
|
|
|
1094
1116
|
title: z.string().nullish(),
|
|
1095
1117
|
username: z.string().nullish(),
|
|
1096
1118
|
website: z.string().nullish(),
|
|
1119
|
+
// Default Properties
|
|
1097
1120
|
$id: z.string().nullish(),
|
|
1098
1121
|
$lastSeen: z.string().nullish(),
|
|
1122
|
+
$unsubscribed: z.boolean().nullish(),
|
|
1123
|
+
$unsubscribeReason: z.enum(['manual', 'complained', 'bounced']).nullish(),
|
|
1099
1124
|
// Stripe Properties
|
|
1100
1125
|
$stripeCustomerId: z.string().nullish(),
|
|
1101
1126
|
$stripeTotalPayments: z.number().or(z.string()).nullish(),
|
|
1102
|
-
$stripeTotalSpent: z.number().or(z.string()).nullish()
|
|
1127
|
+
$stripeTotalSpent: z.number().or(z.string()).nullish(),
|
|
1128
|
+
// Internal properties
|
|
1129
|
+
$_toDelete: z.boolean().nullish()
|
|
1103
1130
|
});
|
|
1104
1131
|
const contactPropertiesSchema = reservedPropertiesSchema.optional().and(z.record(z.union([z.string(), z.number(), z.boolean(), z.date(), z.null(), z.array(z.union([z.string(), z.number(), z.boolean(), z.date(), z.null()]))])));
|
|
1105
1132
|
const analyticsUserRawSchema = z.object({
|
package/package.json
CHANGED
package/src/lib/analytics.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ declare global {
|
|
|
6
6
|
}
|
|
7
7
|
export declare class Saasco {
|
|
8
8
|
private config;
|
|
9
|
-
private
|
|
9
|
+
private lastPageViewPath;
|
|
10
10
|
private isInitialized;
|
|
11
11
|
/**
|
|
12
12
|
* Creates an instance of Saasco SDK.
|
|
@@ -16,11 +16,17 @@ export declare class Saasco {
|
|
|
16
16
|
* @param config.autoPageTracking Whether to automatically track page views. Default is false.
|
|
17
17
|
* @param config.enabled Whether analytics is enabled. Default is true. Set to false for development and staging envioronments. Will still allow debug mode to be true, just no events will be sent
|
|
18
18
|
* @param config.debug Whether to log debug information. Default is false.
|
|
19
|
+
* @param config.trackUrlParams Whether to track URL parameters. Default is true.
|
|
20
|
+
* @param config.trackHashChanges Whether to track hash changes. Default is true.
|
|
19
21
|
*/
|
|
20
22
|
constructor(config: {
|
|
21
23
|
projectId: string;
|
|
22
24
|
proxy?: string;
|
|
23
|
-
autoPageTracking?:
|
|
25
|
+
autoPageTracking?: {
|
|
26
|
+
enabled: boolean;
|
|
27
|
+
trackQueryParams?: boolean;
|
|
28
|
+
trackHash?: boolean;
|
|
29
|
+
};
|
|
24
30
|
enabled?: boolean;
|
|
25
31
|
debug?: boolean;
|
|
26
32
|
});
|
package/src/lib/types.d.ts
CHANGED
|
@@ -156,14 +156,20 @@ export declare const latestEventsRequestSchema: z.ZodObject<{
|
|
|
156
156
|
projectId: z.ZodString;
|
|
157
157
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
158
158
|
payload: z.ZodOptional<z.ZodBoolean>;
|
|
159
|
+
distinctId: z.ZodOptional<z.ZodString>;
|
|
160
|
+
action: z.ZodOptional<z.ZodString>;
|
|
159
161
|
}, "strip", z.ZodTypeAny, {
|
|
160
162
|
projectId: string;
|
|
161
163
|
limit?: number | undefined;
|
|
162
164
|
payload?: boolean | undefined;
|
|
165
|
+
distinctId?: string | undefined;
|
|
166
|
+
action?: string | undefined;
|
|
163
167
|
}, {
|
|
164
168
|
projectId: string;
|
|
165
169
|
limit?: number | undefined;
|
|
166
170
|
payload?: boolean | undefined;
|
|
171
|
+
distinctId?: string | undefined;
|
|
172
|
+
action?: string | undefined;
|
|
167
173
|
}>;
|
|
168
174
|
export type LatestEventsRequest = z.infer<typeof latestEventsRequestSchema>;
|
|
169
175
|
export declare const latestEventItemSchema: z.ZodObject<{
|
|
@@ -176,26 +182,32 @@ export declare const latestEventItemSchema: z.ZodObject<{
|
|
|
176
182
|
device: z.ZodString;
|
|
177
183
|
browser: z.ZodString;
|
|
178
184
|
payload: z.ZodOptional<z.ZodString>;
|
|
185
|
+
distinctId: z.ZodOptional<z.ZodString>;
|
|
186
|
+
unique: z.ZodOptional<z.ZodBoolean>;
|
|
179
187
|
}, "strip", z.ZodTypeAny, {
|
|
180
188
|
id: string;
|
|
181
|
-
timestamp: string;
|
|
182
189
|
action: string;
|
|
190
|
+
timestamp: string;
|
|
183
191
|
location: string;
|
|
184
192
|
referrer: string;
|
|
185
193
|
href: string;
|
|
186
194
|
device: string;
|
|
187
195
|
browser: string;
|
|
188
196
|
payload?: string | undefined;
|
|
197
|
+
distinctId?: string | undefined;
|
|
198
|
+
unique?: boolean | undefined;
|
|
189
199
|
}, {
|
|
190
200
|
id: string;
|
|
191
|
-
timestamp: string;
|
|
192
201
|
action: string;
|
|
202
|
+
timestamp: string;
|
|
193
203
|
location: string;
|
|
194
204
|
referrer: string;
|
|
195
205
|
href: string;
|
|
196
206
|
device: string;
|
|
197
207
|
browser: string;
|
|
198
208
|
payload?: string | undefined;
|
|
209
|
+
distinctId?: string | undefined;
|
|
210
|
+
unique?: boolean | undefined;
|
|
199
211
|
}>;
|
|
200
212
|
export type LatestEventItem = z.infer<typeof latestEventItemSchema>;
|
|
201
213
|
export declare const latestEventsResponseSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
@@ -234,26 +246,32 @@ export declare const latestEventsResponseSchema: z.ZodObject<z.objectUtil.extend
|
|
|
234
246
|
device: z.ZodString;
|
|
235
247
|
browser: z.ZodString;
|
|
236
248
|
payload: z.ZodOptional<z.ZodString>;
|
|
249
|
+
distinctId: z.ZodOptional<z.ZodString>;
|
|
250
|
+
unique: z.ZodOptional<z.ZodBoolean>;
|
|
237
251
|
}, "strip", z.ZodTypeAny, {
|
|
238
252
|
id: string;
|
|
239
|
-
timestamp: string;
|
|
240
253
|
action: string;
|
|
254
|
+
timestamp: string;
|
|
241
255
|
location: string;
|
|
242
256
|
referrer: string;
|
|
243
257
|
href: string;
|
|
244
258
|
device: string;
|
|
245
259
|
browser: string;
|
|
246
260
|
payload?: string | undefined;
|
|
261
|
+
distinctId?: string | undefined;
|
|
262
|
+
unique?: boolean | undefined;
|
|
247
263
|
}, {
|
|
248
264
|
id: string;
|
|
249
|
-
timestamp: string;
|
|
250
265
|
action: string;
|
|
266
|
+
timestamp: string;
|
|
251
267
|
location: string;
|
|
252
268
|
referrer: string;
|
|
253
269
|
href: string;
|
|
254
270
|
device: string;
|
|
255
271
|
browser: string;
|
|
256
272
|
payload?: string | undefined;
|
|
273
|
+
distinctId?: string | undefined;
|
|
274
|
+
unique?: boolean | undefined;
|
|
257
275
|
}>, "many">;
|
|
258
276
|
}>, "strip", z.ZodTypeAny, {
|
|
259
277
|
meta: {
|
|
@@ -268,14 +286,16 @@ export declare const latestEventsResponseSchema: z.ZodObject<z.objectUtil.extend
|
|
|
268
286
|
rows: number;
|
|
269
287
|
data: {
|
|
270
288
|
id: string;
|
|
271
|
-
timestamp: string;
|
|
272
289
|
action: string;
|
|
290
|
+
timestamp: string;
|
|
273
291
|
location: string;
|
|
274
292
|
referrer: string;
|
|
275
293
|
href: string;
|
|
276
294
|
device: string;
|
|
277
295
|
browser: string;
|
|
278
296
|
payload?: string | undefined;
|
|
297
|
+
distinctId?: string | undefined;
|
|
298
|
+
unique?: boolean | undefined;
|
|
279
299
|
}[];
|
|
280
300
|
}, {
|
|
281
301
|
meta: {
|
|
@@ -290,14 +310,16 @@ export declare const latestEventsResponseSchema: z.ZodObject<z.objectUtil.extend
|
|
|
290
310
|
rows: number;
|
|
291
311
|
data: {
|
|
292
312
|
id: string;
|
|
293
|
-
timestamp: string;
|
|
294
313
|
action: string;
|
|
314
|
+
timestamp: string;
|
|
295
315
|
location: string;
|
|
296
316
|
referrer: string;
|
|
297
317
|
href: string;
|
|
298
318
|
device: string;
|
|
299
319
|
browser: string;
|
|
300
320
|
payload?: string | undefined;
|
|
321
|
+
distinctId?: string | undefined;
|
|
322
|
+
unique?: boolean | undefined;
|
|
301
323
|
}[];
|
|
302
324
|
}>;
|
|
303
325
|
export type LatestEventsResponse = z.infer<typeof latestEventsResponseSchema>;
|
|
@@ -991,21 +1013,21 @@ export declare const analyticsEventSchema: z.ZodObject<{
|
|
|
991
1013
|
id: string;
|
|
992
1014
|
projectId: string;
|
|
993
1015
|
payload: string;
|
|
994
|
-
|
|
1016
|
+
distinctId: string | null;
|
|
995
1017
|
action: string;
|
|
1018
|
+
timestamp: string;
|
|
996
1019
|
anonymousId: string;
|
|
997
1020
|
sessionId: string;
|
|
998
|
-
distinctId: string | null;
|
|
999
1021
|
version: string;
|
|
1000
1022
|
}, {
|
|
1001
1023
|
id: string;
|
|
1002
1024
|
projectId: string;
|
|
1003
1025
|
payload: string;
|
|
1004
|
-
|
|
1026
|
+
distinctId: string | null;
|
|
1005
1027
|
action: string;
|
|
1028
|
+
timestamp: string;
|
|
1006
1029
|
anonymousId: string;
|
|
1007
1030
|
sessionId: string;
|
|
1008
|
-
distinctId: string | null;
|
|
1009
1031
|
version: string;
|
|
1010
1032
|
}>;
|
|
1011
1033
|
export type AnalyticsEvent = z.infer<typeof analyticsEventSchema>;
|
|
@@ -1049,21 +1071,21 @@ export declare const userEventsResponseSchema: z.ZodObject<z.objectUtil.extendSh
|
|
|
1049
1071
|
id: string;
|
|
1050
1072
|
projectId: string;
|
|
1051
1073
|
payload: string;
|
|
1052
|
-
|
|
1074
|
+
distinctId: string | null;
|
|
1053
1075
|
action: string;
|
|
1076
|
+
timestamp: string;
|
|
1054
1077
|
anonymousId: string;
|
|
1055
1078
|
sessionId: string;
|
|
1056
|
-
distinctId: string | null;
|
|
1057
1079
|
version: string;
|
|
1058
1080
|
}, {
|
|
1059
1081
|
id: string;
|
|
1060
1082
|
projectId: string;
|
|
1061
1083
|
payload: string;
|
|
1062
|
-
|
|
1084
|
+
distinctId: string | null;
|
|
1063
1085
|
action: string;
|
|
1086
|
+
timestamp: string;
|
|
1064
1087
|
anonymousId: string;
|
|
1065
1088
|
sessionId: string;
|
|
1066
|
-
distinctId: string | null;
|
|
1067
1089
|
version: string;
|
|
1068
1090
|
}>, "many">;
|
|
1069
1091
|
}>, "strip", z.ZodTypeAny, {
|
|
@@ -1081,11 +1103,11 @@ export declare const userEventsResponseSchema: z.ZodObject<z.objectUtil.extendSh
|
|
|
1081
1103
|
id: string;
|
|
1082
1104
|
projectId: string;
|
|
1083
1105
|
payload: string;
|
|
1084
|
-
|
|
1106
|
+
distinctId: string | null;
|
|
1085
1107
|
action: string;
|
|
1108
|
+
timestamp: string;
|
|
1086
1109
|
anonymousId: string;
|
|
1087
1110
|
sessionId: string;
|
|
1088
|
-
distinctId: string | null;
|
|
1089
1111
|
version: string;
|
|
1090
1112
|
}[];
|
|
1091
1113
|
}, {
|
|
@@ -1103,11 +1125,11 @@ export declare const userEventsResponseSchema: z.ZodObject<z.objectUtil.extendSh
|
|
|
1103
1125
|
id: string;
|
|
1104
1126
|
projectId: string;
|
|
1105
1127
|
payload: string;
|
|
1106
|
-
|
|
1128
|
+
distinctId: string | null;
|
|
1107
1129
|
action: string;
|
|
1130
|
+
timestamp: string;
|
|
1108
1131
|
anonymousId: string;
|
|
1109
1132
|
sessionId: string;
|
|
1110
|
-
distinctId: string | null;
|
|
1111
1133
|
version: string;
|
|
1112
1134
|
}[];
|
|
1113
1135
|
}>;
|
|
@@ -1193,7 +1215,7 @@ export declare const currentUsersResponseSchema: z.ZodObject<z.objectUtil.extend
|
|
|
1193
1215
|
}>;
|
|
1194
1216
|
export type CurrentUsersResponse = z.infer<typeof currentUsersResponseSchema>;
|
|
1195
1217
|
export declare const reservedPropertiesSchema: z.ZodObject<{
|
|
1196
|
-
age: z.ZodOptional<z.ZodNullable<z.
|
|
1218
|
+
age: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1197
1219
|
avatar: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1198
1220
|
birthday: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1199
1221
|
createdAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -1210,13 +1232,16 @@ export declare const reservedPropertiesSchema: z.ZodObject<{
|
|
|
1210
1232
|
website: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1211
1233
|
$id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1212
1234
|
$lastSeen: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1235
|
+
$unsubscribed: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
1236
|
+
$unsubscribeReason: z.ZodOptional<z.ZodNullable<z.ZodEnum<["manual", "complained", "bounced"]>>>;
|
|
1213
1237
|
$stripeCustomerId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1214
1238
|
$stripeTotalPayments: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodString]>>>;
|
|
1215
1239
|
$stripeTotalSpent: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodString]>>>;
|
|
1240
|
+
$_toDelete: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
1216
1241
|
}, "strip", z.ZodTypeAny, {
|
|
1217
1242
|
name?: string | null | undefined;
|
|
1218
1243
|
id?: string | null | undefined;
|
|
1219
|
-
age?:
|
|
1244
|
+
age?: number | null | undefined;
|
|
1220
1245
|
avatar?: string | null | undefined;
|
|
1221
1246
|
birthday?: string | null | undefined;
|
|
1222
1247
|
createdAt?: string | null | undefined;
|
|
@@ -1231,13 +1256,16 @@ export declare const reservedPropertiesSchema: z.ZodObject<{
|
|
|
1231
1256
|
website?: string | null | undefined;
|
|
1232
1257
|
$id?: string | null | undefined;
|
|
1233
1258
|
$lastSeen?: string | null | undefined;
|
|
1259
|
+
$unsubscribed?: boolean | null | undefined;
|
|
1260
|
+
$unsubscribeReason?: "manual" | "complained" | "bounced" | null | undefined;
|
|
1234
1261
|
$stripeCustomerId?: string | null | undefined;
|
|
1235
1262
|
$stripeTotalPayments?: string | number | null | undefined;
|
|
1236
1263
|
$stripeTotalSpent?: string | number | null | undefined;
|
|
1264
|
+
$_toDelete?: boolean | null | undefined;
|
|
1237
1265
|
}, {
|
|
1238
1266
|
name?: string | null | undefined;
|
|
1239
1267
|
id?: string | null | undefined;
|
|
1240
|
-
age?:
|
|
1268
|
+
age?: number | null | undefined;
|
|
1241
1269
|
avatar?: string | null | undefined;
|
|
1242
1270
|
birthday?: string | null | undefined;
|
|
1243
1271
|
createdAt?: string | null | undefined;
|
|
@@ -1252,13 +1280,16 @@ export declare const reservedPropertiesSchema: z.ZodObject<{
|
|
|
1252
1280
|
website?: string | null | undefined;
|
|
1253
1281
|
$id?: string | null | undefined;
|
|
1254
1282
|
$lastSeen?: string | null | undefined;
|
|
1283
|
+
$unsubscribed?: boolean | null | undefined;
|
|
1284
|
+
$unsubscribeReason?: "manual" | "complained" | "bounced" | null | undefined;
|
|
1255
1285
|
$stripeCustomerId?: string | null | undefined;
|
|
1256
1286
|
$stripeTotalPayments?: string | number | null | undefined;
|
|
1257
1287
|
$stripeTotalSpent?: string | number | null | undefined;
|
|
1288
|
+
$_toDelete?: boolean | null | undefined;
|
|
1258
1289
|
}>;
|
|
1259
1290
|
export type ReservedProperties = z.infer<typeof reservedPropertiesSchema>;
|
|
1260
1291
|
export declare const contactPropertiesSchema: z.ZodIntersection<z.ZodOptional<z.ZodObject<{
|
|
1261
|
-
age: z.ZodOptional<z.ZodNullable<z.
|
|
1292
|
+
age: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1262
1293
|
avatar: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1263
1294
|
birthday: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1264
1295
|
createdAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -1275,13 +1306,16 @@ export declare const contactPropertiesSchema: z.ZodIntersection<z.ZodOptional<z.
|
|
|
1275
1306
|
website: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1276
1307
|
$id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1277
1308
|
$lastSeen: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1309
|
+
$unsubscribed: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
1310
|
+
$unsubscribeReason: z.ZodOptional<z.ZodNullable<z.ZodEnum<["manual", "complained", "bounced"]>>>;
|
|
1278
1311
|
$stripeCustomerId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1279
1312
|
$stripeTotalPayments: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodString]>>>;
|
|
1280
1313
|
$stripeTotalSpent: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodString]>>>;
|
|
1314
|
+
$_toDelete: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
1281
1315
|
}, "strip", z.ZodTypeAny, {
|
|
1282
1316
|
name?: string | null | undefined;
|
|
1283
1317
|
id?: string | null | undefined;
|
|
1284
|
-
age?:
|
|
1318
|
+
age?: number | null | undefined;
|
|
1285
1319
|
avatar?: string | null | undefined;
|
|
1286
1320
|
birthday?: string | null | undefined;
|
|
1287
1321
|
createdAt?: string | null | undefined;
|
|
@@ -1296,13 +1330,16 @@ export declare const contactPropertiesSchema: z.ZodIntersection<z.ZodOptional<z.
|
|
|
1296
1330
|
website?: string | null | undefined;
|
|
1297
1331
|
$id?: string | null | undefined;
|
|
1298
1332
|
$lastSeen?: string | null | undefined;
|
|
1333
|
+
$unsubscribed?: boolean | null | undefined;
|
|
1334
|
+
$unsubscribeReason?: "manual" | "complained" | "bounced" | null | undefined;
|
|
1299
1335
|
$stripeCustomerId?: string | null | undefined;
|
|
1300
1336
|
$stripeTotalPayments?: string | number | null | undefined;
|
|
1301
1337
|
$stripeTotalSpent?: string | number | null | undefined;
|
|
1338
|
+
$_toDelete?: boolean | null | undefined;
|
|
1302
1339
|
}, {
|
|
1303
1340
|
name?: string | null | undefined;
|
|
1304
1341
|
id?: string | null | undefined;
|
|
1305
|
-
age?:
|
|
1342
|
+
age?: number | null | undefined;
|
|
1306
1343
|
avatar?: string | null | undefined;
|
|
1307
1344
|
birthday?: string | null | undefined;
|
|
1308
1345
|
createdAt?: string | null | undefined;
|
|
@@ -1317,9 +1354,12 @@ export declare const contactPropertiesSchema: z.ZodIntersection<z.ZodOptional<z.
|
|
|
1317
1354
|
website?: string | null | undefined;
|
|
1318
1355
|
$id?: string | null | undefined;
|
|
1319
1356
|
$lastSeen?: string | null | undefined;
|
|
1357
|
+
$unsubscribed?: boolean | null | undefined;
|
|
1358
|
+
$unsubscribeReason?: "manual" | "complained" | "bounced" | null | undefined;
|
|
1320
1359
|
$stripeCustomerId?: string | null | undefined;
|
|
1321
1360
|
$stripeTotalPayments?: string | number | null | undefined;
|
|
1322
1361
|
$stripeTotalSpent?: string | number | null | undefined;
|
|
1362
|
+
$_toDelete?: boolean | null | undefined;
|
|
1323
1363
|
}>>, z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodDate, z.ZodNull, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodDate, z.ZodNull]>, "many">]>>>;
|
|
1324
1364
|
export type ContactProperties = z.infer<typeof contactPropertiesSchema>;
|
|
1325
1365
|
export declare const analyticsUserRawSchema: z.ZodObject<{
|
|
@@ -1330,13 +1370,13 @@ export declare const analyticsUserRawSchema: z.ZodObject<{
|
|
|
1330
1370
|
}, "strip", z.ZodTypeAny, {
|
|
1331
1371
|
projectId: string;
|
|
1332
1372
|
payload: string;
|
|
1333
|
-
timestamp: string;
|
|
1334
1373
|
distinctId: string;
|
|
1374
|
+
timestamp: string;
|
|
1335
1375
|
}, {
|
|
1336
1376
|
projectId: string;
|
|
1337
1377
|
payload: string;
|
|
1338
|
-
timestamp: string;
|
|
1339
1378
|
distinctId: string;
|
|
1379
|
+
timestamp: string;
|
|
1340
1380
|
}>;
|
|
1341
1381
|
export type AnalyticsUserRaw = z.infer<typeof analyticsUserRawSchema>;
|
|
1342
1382
|
export declare const analyticsUserSchema: z.ZodIntersection<z.ZodObject<Omit<{
|
|
@@ -1346,15 +1386,15 @@ export declare const analyticsUserSchema: z.ZodIntersection<z.ZodObject<Omit<{
|
|
|
1346
1386
|
payload: z.ZodString;
|
|
1347
1387
|
}, "payload">, "strip", z.ZodTypeAny, {
|
|
1348
1388
|
projectId: string;
|
|
1349
|
-
timestamp: string;
|
|
1350
1389
|
distinctId: string;
|
|
1390
|
+
timestamp: string;
|
|
1351
1391
|
}, {
|
|
1352
1392
|
projectId: string;
|
|
1353
|
-
timestamp: string;
|
|
1354
1393
|
distinctId: string;
|
|
1394
|
+
timestamp: string;
|
|
1355
1395
|
}>, z.ZodObject<{
|
|
1356
1396
|
properties: z.ZodIntersection<z.ZodOptional<z.ZodObject<{
|
|
1357
|
-
age: z.ZodOptional<z.ZodNullable<z.
|
|
1397
|
+
age: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1358
1398
|
avatar: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1359
1399
|
birthday: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1360
1400
|
createdAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -1371,13 +1411,16 @@ export declare const analyticsUserSchema: z.ZodIntersection<z.ZodObject<Omit<{
|
|
|
1371
1411
|
website: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1372
1412
|
$id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1373
1413
|
$lastSeen: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1414
|
+
$unsubscribed: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
1415
|
+
$unsubscribeReason: z.ZodOptional<z.ZodNullable<z.ZodEnum<["manual", "complained", "bounced"]>>>;
|
|
1374
1416
|
$stripeCustomerId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1375
1417
|
$stripeTotalPayments: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodString]>>>;
|
|
1376
1418
|
$stripeTotalSpent: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodString]>>>;
|
|
1419
|
+
$_toDelete: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
1377
1420
|
}, "strip", z.ZodTypeAny, {
|
|
1378
1421
|
name?: string | null | undefined;
|
|
1379
1422
|
id?: string | null | undefined;
|
|
1380
|
-
age?:
|
|
1423
|
+
age?: number | null | undefined;
|
|
1381
1424
|
avatar?: string | null | undefined;
|
|
1382
1425
|
birthday?: string | null | undefined;
|
|
1383
1426
|
createdAt?: string | null | undefined;
|
|
@@ -1392,13 +1435,16 @@ export declare const analyticsUserSchema: z.ZodIntersection<z.ZodObject<Omit<{
|
|
|
1392
1435
|
website?: string | null | undefined;
|
|
1393
1436
|
$id?: string | null | undefined;
|
|
1394
1437
|
$lastSeen?: string | null | undefined;
|
|
1438
|
+
$unsubscribed?: boolean | null | undefined;
|
|
1439
|
+
$unsubscribeReason?: "manual" | "complained" | "bounced" | null | undefined;
|
|
1395
1440
|
$stripeCustomerId?: string | null | undefined;
|
|
1396
1441
|
$stripeTotalPayments?: string | number | null | undefined;
|
|
1397
1442
|
$stripeTotalSpent?: string | number | null | undefined;
|
|
1443
|
+
$_toDelete?: boolean | null | undefined;
|
|
1398
1444
|
}, {
|
|
1399
1445
|
name?: string | null | undefined;
|
|
1400
1446
|
id?: string | null | undefined;
|
|
1401
|
-
age?:
|
|
1447
|
+
age?: number | null | undefined;
|
|
1402
1448
|
avatar?: string | null | undefined;
|
|
1403
1449
|
birthday?: string | null | undefined;
|
|
1404
1450
|
createdAt?: string | null | undefined;
|
|
@@ -1413,15 +1459,18 @@ export declare const analyticsUserSchema: z.ZodIntersection<z.ZodObject<Omit<{
|
|
|
1413
1459
|
website?: string | null | undefined;
|
|
1414
1460
|
$id?: string | null | undefined;
|
|
1415
1461
|
$lastSeen?: string | null | undefined;
|
|
1462
|
+
$unsubscribed?: boolean | null | undefined;
|
|
1463
|
+
$unsubscribeReason?: "manual" | "complained" | "bounced" | null | undefined;
|
|
1416
1464
|
$stripeCustomerId?: string | null | undefined;
|
|
1417
1465
|
$stripeTotalPayments?: string | number | null | undefined;
|
|
1418
1466
|
$stripeTotalSpent?: string | number | null | undefined;
|
|
1467
|
+
$_toDelete?: boolean | null | undefined;
|
|
1419
1468
|
}>>, z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodDate, z.ZodNull, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodDate, z.ZodNull]>, "many">]>>>;
|
|
1420
1469
|
}, "strip", z.ZodTypeAny, {
|
|
1421
1470
|
properties: {
|
|
1422
1471
|
name?: string | null | undefined;
|
|
1423
1472
|
id?: string | null | undefined;
|
|
1424
|
-
age?:
|
|
1473
|
+
age?: number | null | undefined;
|
|
1425
1474
|
avatar?: string | null | undefined;
|
|
1426
1475
|
birthday?: string | null | undefined;
|
|
1427
1476
|
createdAt?: string | null | undefined;
|
|
@@ -1436,15 +1485,18 @@ export declare const analyticsUserSchema: z.ZodIntersection<z.ZodObject<Omit<{
|
|
|
1436
1485
|
website?: string | null | undefined;
|
|
1437
1486
|
$id?: string | null | undefined;
|
|
1438
1487
|
$lastSeen?: string | null | undefined;
|
|
1488
|
+
$unsubscribed?: boolean | null | undefined;
|
|
1489
|
+
$unsubscribeReason?: "manual" | "complained" | "bounced" | null | undefined;
|
|
1439
1490
|
$stripeCustomerId?: string | null | undefined;
|
|
1440
1491
|
$stripeTotalPayments?: string | number | null | undefined;
|
|
1441
1492
|
$stripeTotalSpent?: string | number | null | undefined;
|
|
1493
|
+
$_toDelete?: boolean | null | undefined;
|
|
1442
1494
|
} & Record<string, string | number | boolean | Date | (string | number | boolean | Date | null)[] | null>;
|
|
1443
1495
|
}, {
|
|
1444
1496
|
properties: {
|
|
1445
1497
|
name?: string | null | undefined;
|
|
1446
1498
|
id?: string | null | undefined;
|
|
1447
|
-
age?:
|
|
1499
|
+
age?: number | null | undefined;
|
|
1448
1500
|
avatar?: string | null | undefined;
|
|
1449
1501
|
birthday?: string | null | undefined;
|
|
1450
1502
|
createdAt?: string | null | undefined;
|
|
@@ -1459,9 +1511,12 @@ export declare const analyticsUserSchema: z.ZodIntersection<z.ZodObject<Omit<{
|
|
|
1459
1511
|
website?: string | null | undefined;
|
|
1460
1512
|
$id?: string | null | undefined;
|
|
1461
1513
|
$lastSeen?: string | null | undefined;
|
|
1514
|
+
$unsubscribed?: boolean | null | undefined;
|
|
1515
|
+
$unsubscribeReason?: "manual" | "complained" | "bounced" | null | undefined;
|
|
1462
1516
|
$stripeCustomerId?: string | null | undefined;
|
|
1463
1517
|
$stripeTotalPayments?: string | number | null | undefined;
|
|
1464
1518
|
$stripeTotalSpent?: string | number | null | undefined;
|
|
1519
|
+
$_toDelete?: boolean | null | undefined;
|
|
1465
1520
|
} & Record<string, string | number | boolean | Date | (string | number | boolean | Date | null)[] | null>;
|
|
1466
1521
|
}>>;
|
|
1467
1522
|
export type AnalyticsUser = z.infer<typeof analyticsUserSchema>;
|
|
@@ -1495,7 +1550,7 @@ export declare const idenfitySchema: z.ZodObject<{
|
|
|
1495
1550
|
anonymousId: z.ZodString;
|
|
1496
1551
|
version: z.ZodString;
|
|
1497
1552
|
payload: z.ZodIntersection<z.ZodOptional<z.ZodObject<{
|
|
1498
|
-
age: z.ZodOptional<z.ZodNullable<z.
|
|
1553
|
+
age: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1499
1554
|
avatar: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1500
1555
|
birthday: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1501
1556
|
createdAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -1512,13 +1567,16 @@ export declare const idenfitySchema: z.ZodObject<{
|
|
|
1512
1567
|
website: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1513
1568
|
$id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1514
1569
|
$lastSeen: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1570
|
+
$unsubscribed: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
1571
|
+
$unsubscribeReason: z.ZodOptional<z.ZodNullable<z.ZodEnum<["manual", "complained", "bounced"]>>>;
|
|
1515
1572
|
$stripeCustomerId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1516
1573
|
$stripeTotalPayments: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodString]>>>;
|
|
1517
1574
|
$stripeTotalSpent: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodString]>>>;
|
|
1575
|
+
$_toDelete: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
1518
1576
|
}, "strip", z.ZodTypeAny, {
|
|
1519
1577
|
name?: string | null | undefined;
|
|
1520
1578
|
id?: string | null | undefined;
|
|
1521
|
-
age?:
|
|
1579
|
+
age?: number | null | undefined;
|
|
1522
1580
|
avatar?: string | null | undefined;
|
|
1523
1581
|
birthday?: string | null | undefined;
|
|
1524
1582
|
createdAt?: string | null | undefined;
|
|
@@ -1533,13 +1591,16 @@ export declare const idenfitySchema: z.ZodObject<{
|
|
|
1533
1591
|
website?: string | null | undefined;
|
|
1534
1592
|
$id?: string | null | undefined;
|
|
1535
1593
|
$lastSeen?: string | null | undefined;
|
|
1594
|
+
$unsubscribed?: boolean | null | undefined;
|
|
1595
|
+
$unsubscribeReason?: "manual" | "complained" | "bounced" | null | undefined;
|
|
1536
1596
|
$stripeCustomerId?: string | null | undefined;
|
|
1537
1597
|
$stripeTotalPayments?: string | number | null | undefined;
|
|
1538
1598
|
$stripeTotalSpent?: string | number | null | undefined;
|
|
1599
|
+
$_toDelete?: boolean | null | undefined;
|
|
1539
1600
|
}, {
|
|
1540
1601
|
name?: string | null | undefined;
|
|
1541
1602
|
id?: string | null | undefined;
|
|
1542
|
-
age?:
|
|
1603
|
+
age?: number | null | undefined;
|
|
1543
1604
|
avatar?: string | null | undefined;
|
|
1544
1605
|
birthday?: string | null | undefined;
|
|
1545
1606
|
createdAt?: string | null | undefined;
|
|
@@ -1554,9 +1615,12 @@ export declare const idenfitySchema: z.ZodObject<{
|
|
|
1554
1615
|
website?: string | null | undefined;
|
|
1555
1616
|
$id?: string | null | undefined;
|
|
1556
1617
|
$lastSeen?: string | null | undefined;
|
|
1618
|
+
$unsubscribed?: boolean | null | undefined;
|
|
1619
|
+
$unsubscribeReason?: "manual" | "complained" | "bounced" | null | undefined;
|
|
1557
1620
|
$stripeCustomerId?: string | null | undefined;
|
|
1558
1621
|
$stripeTotalPayments?: string | number | null | undefined;
|
|
1559
1622
|
$stripeTotalSpent?: string | number | null | undefined;
|
|
1623
|
+
$_toDelete?: boolean | null | undefined;
|
|
1560
1624
|
}>>, z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodDate, z.ZodNull, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodDate, z.ZodNull]>, "many">]>>>;
|
|
1561
1625
|
context: z.ZodOptional<z.ZodObject<{
|
|
1562
1626
|
active: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -1571,7 +1635,7 @@ export declare const idenfitySchema: z.ZodObject<{
|
|
|
1571
1635
|
payload: {
|
|
1572
1636
|
name?: string | null | undefined;
|
|
1573
1637
|
id?: string | null | undefined;
|
|
1574
|
-
age?:
|
|
1638
|
+
age?: number | null | undefined;
|
|
1575
1639
|
avatar?: string | null | undefined;
|
|
1576
1640
|
birthday?: string | null | undefined;
|
|
1577
1641
|
createdAt?: string | null | undefined;
|
|
@@ -1586,13 +1650,16 @@ export declare const idenfitySchema: z.ZodObject<{
|
|
|
1586
1650
|
website?: string | null | undefined;
|
|
1587
1651
|
$id?: string | null | undefined;
|
|
1588
1652
|
$lastSeen?: string | null | undefined;
|
|
1653
|
+
$unsubscribed?: boolean | null | undefined;
|
|
1654
|
+
$unsubscribeReason?: "manual" | "complained" | "bounced" | null | undefined;
|
|
1589
1655
|
$stripeCustomerId?: string | null | undefined;
|
|
1590
1656
|
$stripeTotalPayments?: string | number | null | undefined;
|
|
1591
1657
|
$stripeTotalSpent?: string | number | null | undefined;
|
|
1658
|
+
$_toDelete?: boolean | null | undefined;
|
|
1592
1659
|
} & Record<string, string | number | boolean | Date | (string | number | boolean | Date | null)[] | null>;
|
|
1660
|
+
distinctId: string;
|
|
1593
1661
|
timestamp: string;
|
|
1594
1662
|
anonymousId: string;
|
|
1595
|
-
distinctId: string;
|
|
1596
1663
|
version: string;
|
|
1597
1664
|
context?: {
|
|
1598
1665
|
active?: boolean | undefined;
|
|
@@ -1603,7 +1670,7 @@ export declare const idenfitySchema: z.ZodObject<{
|
|
|
1603
1670
|
payload: {
|
|
1604
1671
|
name?: string | null | undefined;
|
|
1605
1672
|
id?: string | null | undefined;
|
|
1606
|
-
age?:
|
|
1673
|
+
age?: number | null | undefined;
|
|
1607
1674
|
avatar?: string | null | undefined;
|
|
1608
1675
|
birthday?: string | null | undefined;
|
|
1609
1676
|
createdAt?: string | null | undefined;
|
|
@@ -1618,13 +1685,16 @@ export declare const idenfitySchema: z.ZodObject<{
|
|
|
1618
1685
|
website?: string | null | undefined;
|
|
1619
1686
|
$id?: string | null | undefined;
|
|
1620
1687
|
$lastSeen?: string | null | undefined;
|
|
1688
|
+
$unsubscribed?: boolean | null | undefined;
|
|
1689
|
+
$unsubscribeReason?: "manual" | "complained" | "bounced" | null | undefined;
|
|
1621
1690
|
$stripeCustomerId?: string | null | undefined;
|
|
1622
1691
|
$stripeTotalPayments?: string | number | null | undefined;
|
|
1623
1692
|
$stripeTotalSpent?: string | number | null | undefined;
|
|
1693
|
+
$_toDelete?: boolean | null | undefined;
|
|
1624
1694
|
} & Record<string, string | number | boolean | Date | (string | number | boolean | Date | null)[] | null>;
|
|
1695
|
+
distinctId: string;
|
|
1625
1696
|
timestamp: string;
|
|
1626
1697
|
anonymousId: string;
|
|
1627
|
-
distinctId: string;
|
|
1628
1698
|
version: string;
|
|
1629
1699
|
context?: {
|
|
1630
1700
|
active?: boolean | undefined;
|
|
@@ -1673,7 +1743,7 @@ export declare const latestIdentifiesResponseSchema: z.ZodObject<z.objectUtil.ex
|
|
|
1673
1743
|
}, {
|
|
1674
1744
|
data: z.ZodArray<z.ZodObject<{
|
|
1675
1745
|
properties: z.ZodIntersection<z.ZodOptional<z.ZodObject<{
|
|
1676
|
-
age: z.ZodOptional<z.ZodNullable<z.
|
|
1746
|
+
age: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1677
1747
|
avatar: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1678
1748
|
birthday: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1679
1749
|
createdAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -1690,13 +1760,16 @@ export declare const latestIdentifiesResponseSchema: z.ZodObject<z.objectUtil.ex
|
|
|
1690
1760
|
website: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1691
1761
|
$id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1692
1762
|
$lastSeen: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1763
|
+
$unsubscribed: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
1764
|
+
$unsubscribeReason: z.ZodOptional<z.ZodNullable<z.ZodEnum<["manual", "complained", "bounced"]>>>;
|
|
1693
1765
|
$stripeCustomerId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1694
1766
|
$stripeTotalPayments: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodString]>>>;
|
|
1695
1767
|
$stripeTotalSpent: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodString]>>>;
|
|
1768
|
+
$_toDelete: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
1696
1769
|
}, "strip", z.ZodTypeAny, {
|
|
1697
1770
|
name?: string | null | undefined;
|
|
1698
1771
|
id?: string | null | undefined;
|
|
1699
|
-
age?:
|
|
1772
|
+
age?: number | null | undefined;
|
|
1700
1773
|
avatar?: string | null | undefined;
|
|
1701
1774
|
birthday?: string | null | undefined;
|
|
1702
1775
|
createdAt?: string | null | undefined;
|
|
@@ -1711,13 +1784,16 @@ export declare const latestIdentifiesResponseSchema: z.ZodObject<z.objectUtil.ex
|
|
|
1711
1784
|
website?: string | null | undefined;
|
|
1712
1785
|
$id?: string | null | undefined;
|
|
1713
1786
|
$lastSeen?: string | null | undefined;
|
|
1787
|
+
$unsubscribed?: boolean | null | undefined;
|
|
1788
|
+
$unsubscribeReason?: "manual" | "complained" | "bounced" | null | undefined;
|
|
1714
1789
|
$stripeCustomerId?: string | null | undefined;
|
|
1715
1790
|
$stripeTotalPayments?: string | number | null | undefined;
|
|
1716
1791
|
$stripeTotalSpent?: string | number | null | undefined;
|
|
1792
|
+
$_toDelete?: boolean | null | undefined;
|
|
1717
1793
|
}, {
|
|
1718
1794
|
name?: string | null | undefined;
|
|
1719
1795
|
id?: string | null | undefined;
|
|
1720
|
-
age?:
|
|
1796
|
+
age?: number | null | undefined;
|
|
1721
1797
|
avatar?: string | null | undefined;
|
|
1722
1798
|
birthday?: string | null | undefined;
|
|
1723
1799
|
createdAt?: string | null | undefined;
|
|
@@ -1732,15 +1808,18 @@ export declare const latestIdentifiesResponseSchema: z.ZodObject<z.objectUtil.ex
|
|
|
1732
1808
|
website?: string | null | undefined;
|
|
1733
1809
|
$id?: string | null | undefined;
|
|
1734
1810
|
$lastSeen?: string | null | undefined;
|
|
1811
|
+
$unsubscribed?: boolean | null | undefined;
|
|
1812
|
+
$unsubscribeReason?: "manual" | "complained" | "bounced" | null | undefined;
|
|
1735
1813
|
$stripeCustomerId?: string | null | undefined;
|
|
1736
1814
|
$stripeTotalPayments?: string | number | null | undefined;
|
|
1737
1815
|
$stripeTotalSpent?: string | number | null | undefined;
|
|
1816
|
+
$_toDelete?: boolean | null | undefined;
|
|
1738
1817
|
}>>, z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodDate, z.ZodNull, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodDate, z.ZodNull]>, "many">]>>>;
|
|
1739
1818
|
}, "strip", z.ZodTypeAny, {
|
|
1740
1819
|
properties: {
|
|
1741
1820
|
name?: string | null | undefined;
|
|
1742
1821
|
id?: string | null | undefined;
|
|
1743
|
-
age?:
|
|
1822
|
+
age?: number | null | undefined;
|
|
1744
1823
|
avatar?: string | null | undefined;
|
|
1745
1824
|
birthday?: string | null | undefined;
|
|
1746
1825
|
createdAt?: string | null | undefined;
|
|
@@ -1755,15 +1834,18 @@ export declare const latestIdentifiesResponseSchema: z.ZodObject<z.objectUtil.ex
|
|
|
1755
1834
|
website?: string | null | undefined;
|
|
1756
1835
|
$id?: string | null | undefined;
|
|
1757
1836
|
$lastSeen?: string | null | undefined;
|
|
1837
|
+
$unsubscribed?: boolean | null | undefined;
|
|
1838
|
+
$unsubscribeReason?: "manual" | "complained" | "bounced" | null | undefined;
|
|
1758
1839
|
$stripeCustomerId?: string | null | undefined;
|
|
1759
1840
|
$stripeTotalPayments?: string | number | null | undefined;
|
|
1760
1841
|
$stripeTotalSpent?: string | number | null | undefined;
|
|
1842
|
+
$_toDelete?: boolean | null | undefined;
|
|
1761
1843
|
} & Record<string, string | number | boolean | Date | (string | number | boolean | Date | null)[] | null>;
|
|
1762
1844
|
}, {
|
|
1763
1845
|
properties: {
|
|
1764
1846
|
name?: string | null | undefined;
|
|
1765
1847
|
id?: string | null | undefined;
|
|
1766
|
-
age?:
|
|
1848
|
+
age?: number | null | undefined;
|
|
1767
1849
|
avatar?: string | null | undefined;
|
|
1768
1850
|
birthday?: string | null | undefined;
|
|
1769
1851
|
createdAt?: string | null | undefined;
|
|
@@ -1778,9 +1860,12 @@ export declare const latestIdentifiesResponseSchema: z.ZodObject<z.objectUtil.ex
|
|
|
1778
1860
|
website?: string | null | undefined;
|
|
1779
1861
|
$id?: string | null | undefined;
|
|
1780
1862
|
$lastSeen?: string | null | undefined;
|
|
1863
|
+
$unsubscribed?: boolean | null | undefined;
|
|
1864
|
+
$unsubscribeReason?: "manual" | "complained" | "bounced" | null | undefined;
|
|
1781
1865
|
$stripeCustomerId?: string | null | undefined;
|
|
1782
1866
|
$stripeTotalPayments?: string | number | null | undefined;
|
|
1783
1867
|
$stripeTotalSpent?: string | number | null | undefined;
|
|
1868
|
+
$_toDelete?: boolean | null | undefined;
|
|
1784
1869
|
} & Record<string, string | number | boolean | Date | (string | number | boolean | Date | null)[] | null>;
|
|
1785
1870
|
}>, "many">;
|
|
1786
1871
|
}>, "strip", z.ZodTypeAny, {
|
|
@@ -1798,7 +1883,7 @@ export declare const latestIdentifiesResponseSchema: z.ZodObject<z.objectUtil.ex
|
|
|
1798
1883
|
properties: {
|
|
1799
1884
|
name?: string | null | undefined;
|
|
1800
1885
|
id?: string | null | undefined;
|
|
1801
|
-
age?:
|
|
1886
|
+
age?: number | null | undefined;
|
|
1802
1887
|
avatar?: string | null | undefined;
|
|
1803
1888
|
birthday?: string | null | undefined;
|
|
1804
1889
|
createdAt?: string | null | undefined;
|
|
@@ -1813,9 +1898,12 @@ export declare const latestIdentifiesResponseSchema: z.ZodObject<z.objectUtil.ex
|
|
|
1813
1898
|
website?: string | null | undefined;
|
|
1814
1899
|
$id?: string | null | undefined;
|
|
1815
1900
|
$lastSeen?: string | null | undefined;
|
|
1901
|
+
$unsubscribed?: boolean | null | undefined;
|
|
1902
|
+
$unsubscribeReason?: "manual" | "complained" | "bounced" | null | undefined;
|
|
1816
1903
|
$stripeCustomerId?: string | null | undefined;
|
|
1817
1904
|
$stripeTotalPayments?: string | number | null | undefined;
|
|
1818
1905
|
$stripeTotalSpent?: string | number | null | undefined;
|
|
1906
|
+
$_toDelete?: boolean | null | undefined;
|
|
1819
1907
|
} & Record<string, string | number | boolean | Date | (string | number | boolean | Date | null)[] | null>;
|
|
1820
1908
|
}[];
|
|
1821
1909
|
}, {
|
|
@@ -1833,7 +1921,7 @@ export declare const latestIdentifiesResponseSchema: z.ZodObject<z.objectUtil.ex
|
|
|
1833
1921
|
properties: {
|
|
1834
1922
|
name?: string | null | undefined;
|
|
1835
1923
|
id?: string | null | undefined;
|
|
1836
|
-
age?:
|
|
1924
|
+
age?: number | null | undefined;
|
|
1837
1925
|
avatar?: string | null | undefined;
|
|
1838
1926
|
birthday?: string | null | undefined;
|
|
1839
1927
|
createdAt?: string | null | undefined;
|
|
@@ -1848,9 +1936,12 @@ export declare const latestIdentifiesResponseSchema: z.ZodObject<z.objectUtil.ex
|
|
|
1848
1936
|
website?: string | null | undefined;
|
|
1849
1937
|
$id?: string | null | undefined;
|
|
1850
1938
|
$lastSeen?: string | null | undefined;
|
|
1939
|
+
$unsubscribed?: boolean | null | undefined;
|
|
1940
|
+
$unsubscribeReason?: "manual" | "complained" | "bounced" | null | undefined;
|
|
1851
1941
|
$stripeCustomerId?: string | null | undefined;
|
|
1852
1942
|
$stripeTotalPayments?: string | number | null | undefined;
|
|
1853
1943
|
$stripeTotalSpent?: string | number | null | undefined;
|
|
1944
|
+
$_toDelete?: boolean | null | undefined;
|
|
1854
1945
|
} & Record<string, string | number | boolean | Date | (string | number | boolean | Date | null)[] | null>;
|
|
1855
1946
|
}[];
|
|
1856
1947
|
}>;
|