saasco-sdk 0.1.13 → 0.1.14
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 +6 -0
- package/index.cjs.js +111 -36
- package/index.esm.js +106 -37
- package/package.json +1 -1
- package/src/index.d.ts +2 -0
- package/src/lib/analytics.d.ts +1 -0
- package/src/lib/getBrowserContext.d.ts +2 -0
- package/src/lib/tracking/index.d.ts +1 -0
- package/src/lib/tracking/types.d.ts +2798 -0
- package/src/lib/types.d.ts +69 -0
package/src/lib/types.d.ts
CHANGED
|
@@ -1210,6 +1210,9 @@ export declare const reservedPropertiesSchema: z.ZodObject<{
|
|
|
1210
1210
|
website: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1211
1211
|
$id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1212
1212
|
$lastSeen: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1213
|
+
$stripeCustomerId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1214
|
+
$stripeTotalPayments: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodString]>>>;
|
|
1215
|
+
$stripeTotalSpent: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodString]>>>;
|
|
1213
1216
|
}, "strip", z.ZodTypeAny, {
|
|
1214
1217
|
name?: string | null | undefined;
|
|
1215
1218
|
id?: string | null | undefined;
|
|
@@ -1228,6 +1231,9 @@ export declare const reservedPropertiesSchema: z.ZodObject<{
|
|
|
1228
1231
|
website?: string | null | undefined;
|
|
1229
1232
|
$id?: string | null | undefined;
|
|
1230
1233
|
$lastSeen?: string | null | undefined;
|
|
1234
|
+
$stripeCustomerId?: string | null | undefined;
|
|
1235
|
+
$stripeTotalPayments?: string | number | null | undefined;
|
|
1236
|
+
$stripeTotalSpent?: string | number | null | undefined;
|
|
1231
1237
|
}, {
|
|
1232
1238
|
name?: string | null | undefined;
|
|
1233
1239
|
id?: string | null | undefined;
|
|
@@ -1246,6 +1252,9 @@ export declare const reservedPropertiesSchema: z.ZodObject<{
|
|
|
1246
1252
|
website?: string | null | undefined;
|
|
1247
1253
|
$id?: string | null | undefined;
|
|
1248
1254
|
$lastSeen?: string | null | undefined;
|
|
1255
|
+
$stripeCustomerId?: string | null | undefined;
|
|
1256
|
+
$stripeTotalPayments?: string | number | null | undefined;
|
|
1257
|
+
$stripeTotalSpent?: string | number | null | undefined;
|
|
1249
1258
|
}>;
|
|
1250
1259
|
export type ReservedProperties = z.infer<typeof reservedPropertiesSchema>;
|
|
1251
1260
|
export declare const contactPropertiesSchema: z.ZodIntersection<z.ZodOptional<z.ZodObject<{
|
|
@@ -1266,6 +1275,9 @@ export declare const contactPropertiesSchema: z.ZodIntersection<z.ZodOptional<z.
|
|
|
1266
1275
|
website: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1267
1276
|
$id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1268
1277
|
$lastSeen: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1278
|
+
$stripeCustomerId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1279
|
+
$stripeTotalPayments: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodString]>>>;
|
|
1280
|
+
$stripeTotalSpent: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodString]>>>;
|
|
1269
1281
|
}, "strip", z.ZodTypeAny, {
|
|
1270
1282
|
name?: string | null | undefined;
|
|
1271
1283
|
id?: string | null | undefined;
|
|
@@ -1284,6 +1296,9 @@ export declare const contactPropertiesSchema: z.ZodIntersection<z.ZodOptional<z.
|
|
|
1284
1296
|
website?: string | null | undefined;
|
|
1285
1297
|
$id?: string | null | undefined;
|
|
1286
1298
|
$lastSeen?: string | null | undefined;
|
|
1299
|
+
$stripeCustomerId?: string | null | undefined;
|
|
1300
|
+
$stripeTotalPayments?: string | number | null | undefined;
|
|
1301
|
+
$stripeTotalSpent?: string | number | null | undefined;
|
|
1287
1302
|
}, {
|
|
1288
1303
|
name?: string | null | undefined;
|
|
1289
1304
|
id?: string | null | undefined;
|
|
@@ -1302,6 +1317,9 @@ export declare const contactPropertiesSchema: z.ZodIntersection<z.ZodOptional<z.
|
|
|
1302
1317
|
website?: string | null | undefined;
|
|
1303
1318
|
$id?: string | null | undefined;
|
|
1304
1319
|
$lastSeen?: string | null | undefined;
|
|
1320
|
+
$stripeCustomerId?: string | null | undefined;
|
|
1321
|
+
$stripeTotalPayments?: string | number | null | undefined;
|
|
1322
|
+
$stripeTotalSpent?: string | number | null | undefined;
|
|
1305
1323
|
}>>, 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">]>>>;
|
|
1306
1324
|
export type ContactProperties = z.infer<typeof contactPropertiesSchema>;
|
|
1307
1325
|
export declare const analyticsUserRawSchema: z.ZodObject<{
|
|
@@ -1353,6 +1371,9 @@ export declare const analyticsUserSchema: z.ZodIntersection<z.ZodObject<Omit<{
|
|
|
1353
1371
|
website: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1354
1372
|
$id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1355
1373
|
$lastSeen: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1374
|
+
$stripeCustomerId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1375
|
+
$stripeTotalPayments: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodString]>>>;
|
|
1376
|
+
$stripeTotalSpent: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodString]>>>;
|
|
1356
1377
|
}, "strip", z.ZodTypeAny, {
|
|
1357
1378
|
name?: string | null | undefined;
|
|
1358
1379
|
id?: string | null | undefined;
|
|
@@ -1371,6 +1392,9 @@ export declare const analyticsUserSchema: z.ZodIntersection<z.ZodObject<Omit<{
|
|
|
1371
1392
|
website?: string | null | undefined;
|
|
1372
1393
|
$id?: string | null | undefined;
|
|
1373
1394
|
$lastSeen?: string | null | undefined;
|
|
1395
|
+
$stripeCustomerId?: string | null | undefined;
|
|
1396
|
+
$stripeTotalPayments?: string | number | null | undefined;
|
|
1397
|
+
$stripeTotalSpent?: string | number | null | undefined;
|
|
1374
1398
|
}, {
|
|
1375
1399
|
name?: string | null | undefined;
|
|
1376
1400
|
id?: string | null | undefined;
|
|
@@ -1389,6 +1413,9 @@ export declare const analyticsUserSchema: z.ZodIntersection<z.ZodObject<Omit<{
|
|
|
1389
1413
|
website?: string | null | undefined;
|
|
1390
1414
|
$id?: string | null | undefined;
|
|
1391
1415
|
$lastSeen?: string | null | undefined;
|
|
1416
|
+
$stripeCustomerId?: string | null | undefined;
|
|
1417
|
+
$stripeTotalPayments?: string | number | null | undefined;
|
|
1418
|
+
$stripeTotalSpent?: string | number | null | undefined;
|
|
1392
1419
|
}>>, 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">]>>>;
|
|
1393
1420
|
}, "strip", z.ZodTypeAny, {
|
|
1394
1421
|
properties: {
|
|
@@ -1409,6 +1436,9 @@ export declare const analyticsUserSchema: z.ZodIntersection<z.ZodObject<Omit<{
|
|
|
1409
1436
|
website?: string | null | undefined;
|
|
1410
1437
|
$id?: string | null | undefined;
|
|
1411
1438
|
$lastSeen?: string | null | undefined;
|
|
1439
|
+
$stripeCustomerId?: string | null | undefined;
|
|
1440
|
+
$stripeTotalPayments?: string | number | null | undefined;
|
|
1441
|
+
$stripeTotalSpent?: string | number | null | undefined;
|
|
1412
1442
|
} & Record<string, string | number | boolean | Date | (string | number | boolean | Date | null)[] | null>;
|
|
1413
1443
|
}, {
|
|
1414
1444
|
properties: {
|
|
@@ -1429,6 +1459,9 @@ export declare const analyticsUserSchema: z.ZodIntersection<z.ZodObject<Omit<{
|
|
|
1429
1459
|
website?: string | null | undefined;
|
|
1430
1460
|
$id?: string | null | undefined;
|
|
1431
1461
|
$lastSeen?: string | null | undefined;
|
|
1462
|
+
$stripeCustomerId?: string | null | undefined;
|
|
1463
|
+
$stripeTotalPayments?: string | number | null | undefined;
|
|
1464
|
+
$stripeTotalSpent?: string | number | null | undefined;
|
|
1432
1465
|
} & Record<string, string | number | boolean | Date | (string | number | boolean | Date | null)[] | null>;
|
|
1433
1466
|
}>>;
|
|
1434
1467
|
export type AnalyticsUser = z.infer<typeof analyticsUserSchema>;
|
|
@@ -1479,6 +1512,9 @@ export declare const idenfitySchema: z.ZodObject<{
|
|
|
1479
1512
|
website: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1480
1513
|
$id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1481
1514
|
$lastSeen: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1515
|
+
$stripeCustomerId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1516
|
+
$stripeTotalPayments: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodString]>>>;
|
|
1517
|
+
$stripeTotalSpent: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodString]>>>;
|
|
1482
1518
|
}, "strip", z.ZodTypeAny, {
|
|
1483
1519
|
name?: string | null | undefined;
|
|
1484
1520
|
id?: string | null | undefined;
|
|
@@ -1497,6 +1533,9 @@ export declare const idenfitySchema: z.ZodObject<{
|
|
|
1497
1533
|
website?: string | null | undefined;
|
|
1498
1534
|
$id?: string | null | undefined;
|
|
1499
1535
|
$lastSeen?: string | null | undefined;
|
|
1536
|
+
$stripeCustomerId?: string | null | undefined;
|
|
1537
|
+
$stripeTotalPayments?: string | number | null | undefined;
|
|
1538
|
+
$stripeTotalSpent?: string | number | null | undefined;
|
|
1500
1539
|
}, {
|
|
1501
1540
|
name?: string | null | undefined;
|
|
1502
1541
|
id?: string | null | undefined;
|
|
@@ -1515,6 +1554,9 @@ export declare const idenfitySchema: z.ZodObject<{
|
|
|
1515
1554
|
website?: string | null | undefined;
|
|
1516
1555
|
$id?: string | null | undefined;
|
|
1517
1556
|
$lastSeen?: string | null | undefined;
|
|
1557
|
+
$stripeCustomerId?: string | null | undefined;
|
|
1558
|
+
$stripeTotalPayments?: string | number | null | undefined;
|
|
1559
|
+
$stripeTotalSpent?: string | number | null | undefined;
|
|
1518
1560
|
}>>, 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">]>>>;
|
|
1519
1561
|
context: z.ZodOptional<z.ZodObject<{
|
|
1520
1562
|
active: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -1544,6 +1586,9 @@ export declare const idenfitySchema: z.ZodObject<{
|
|
|
1544
1586
|
website?: string | null | undefined;
|
|
1545
1587
|
$id?: string | null | undefined;
|
|
1546
1588
|
$lastSeen?: string | null | undefined;
|
|
1589
|
+
$stripeCustomerId?: string | null | undefined;
|
|
1590
|
+
$stripeTotalPayments?: string | number | null | undefined;
|
|
1591
|
+
$stripeTotalSpent?: string | number | null | undefined;
|
|
1547
1592
|
} & Record<string, string | number | boolean | Date | (string | number | boolean | Date | null)[] | null>;
|
|
1548
1593
|
timestamp: string;
|
|
1549
1594
|
anonymousId: string;
|
|
@@ -1573,6 +1618,9 @@ export declare const idenfitySchema: z.ZodObject<{
|
|
|
1573
1618
|
website?: string | null | undefined;
|
|
1574
1619
|
$id?: string | null | undefined;
|
|
1575
1620
|
$lastSeen?: string | null | undefined;
|
|
1621
|
+
$stripeCustomerId?: string | null | undefined;
|
|
1622
|
+
$stripeTotalPayments?: string | number | null | undefined;
|
|
1623
|
+
$stripeTotalSpent?: string | number | null | undefined;
|
|
1576
1624
|
} & Record<string, string | number | boolean | Date | (string | number | boolean | Date | null)[] | null>;
|
|
1577
1625
|
timestamp: string;
|
|
1578
1626
|
anonymousId: string;
|
|
@@ -1642,6 +1690,9 @@ export declare const latestIdentifiesResponseSchema: z.ZodObject<z.objectUtil.ex
|
|
|
1642
1690
|
website: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1643
1691
|
$id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1644
1692
|
$lastSeen: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1693
|
+
$stripeCustomerId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1694
|
+
$stripeTotalPayments: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodString]>>>;
|
|
1695
|
+
$stripeTotalSpent: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodNumber, z.ZodString]>>>;
|
|
1645
1696
|
}, "strip", z.ZodTypeAny, {
|
|
1646
1697
|
name?: string | null | undefined;
|
|
1647
1698
|
id?: string | null | undefined;
|
|
@@ -1660,6 +1711,9 @@ export declare const latestIdentifiesResponseSchema: z.ZodObject<z.objectUtil.ex
|
|
|
1660
1711
|
website?: string | null | undefined;
|
|
1661
1712
|
$id?: string | null | undefined;
|
|
1662
1713
|
$lastSeen?: string | null | undefined;
|
|
1714
|
+
$stripeCustomerId?: string | null | undefined;
|
|
1715
|
+
$stripeTotalPayments?: string | number | null | undefined;
|
|
1716
|
+
$stripeTotalSpent?: string | number | null | undefined;
|
|
1663
1717
|
}, {
|
|
1664
1718
|
name?: string | null | undefined;
|
|
1665
1719
|
id?: string | null | undefined;
|
|
@@ -1678,6 +1732,9 @@ export declare const latestIdentifiesResponseSchema: z.ZodObject<z.objectUtil.ex
|
|
|
1678
1732
|
website?: string | null | undefined;
|
|
1679
1733
|
$id?: string | null | undefined;
|
|
1680
1734
|
$lastSeen?: string | null | undefined;
|
|
1735
|
+
$stripeCustomerId?: string | null | undefined;
|
|
1736
|
+
$stripeTotalPayments?: string | number | null | undefined;
|
|
1737
|
+
$stripeTotalSpent?: string | number | null | undefined;
|
|
1681
1738
|
}>>, 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">]>>>;
|
|
1682
1739
|
}, "strip", z.ZodTypeAny, {
|
|
1683
1740
|
properties: {
|
|
@@ -1698,6 +1755,9 @@ export declare const latestIdentifiesResponseSchema: z.ZodObject<z.objectUtil.ex
|
|
|
1698
1755
|
website?: string | null | undefined;
|
|
1699
1756
|
$id?: string | null | undefined;
|
|
1700
1757
|
$lastSeen?: string | null | undefined;
|
|
1758
|
+
$stripeCustomerId?: string | null | undefined;
|
|
1759
|
+
$stripeTotalPayments?: string | number | null | undefined;
|
|
1760
|
+
$stripeTotalSpent?: string | number | null | undefined;
|
|
1701
1761
|
} & Record<string, string | number | boolean | Date | (string | number | boolean | Date | null)[] | null>;
|
|
1702
1762
|
}, {
|
|
1703
1763
|
properties: {
|
|
@@ -1718,6 +1778,9 @@ export declare const latestIdentifiesResponseSchema: z.ZodObject<z.objectUtil.ex
|
|
|
1718
1778
|
website?: string | null | undefined;
|
|
1719
1779
|
$id?: string | null | undefined;
|
|
1720
1780
|
$lastSeen?: string | null | undefined;
|
|
1781
|
+
$stripeCustomerId?: string | null | undefined;
|
|
1782
|
+
$stripeTotalPayments?: string | number | null | undefined;
|
|
1783
|
+
$stripeTotalSpent?: string | number | null | undefined;
|
|
1721
1784
|
} & Record<string, string | number | boolean | Date | (string | number | boolean | Date | null)[] | null>;
|
|
1722
1785
|
}>, "many">;
|
|
1723
1786
|
}>, "strip", z.ZodTypeAny, {
|
|
@@ -1750,6 +1813,9 @@ export declare const latestIdentifiesResponseSchema: z.ZodObject<z.objectUtil.ex
|
|
|
1750
1813
|
website?: string | null | undefined;
|
|
1751
1814
|
$id?: string | null | undefined;
|
|
1752
1815
|
$lastSeen?: string | null | undefined;
|
|
1816
|
+
$stripeCustomerId?: string | null | undefined;
|
|
1817
|
+
$stripeTotalPayments?: string | number | null | undefined;
|
|
1818
|
+
$stripeTotalSpent?: string | number | null | undefined;
|
|
1753
1819
|
} & Record<string, string | number | boolean | Date | (string | number | boolean | Date | null)[] | null>;
|
|
1754
1820
|
}[];
|
|
1755
1821
|
}, {
|
|
@@ -1782,6 +1848,9 @@ export declare const latestIdentifiesResponseSchema: z.ZodObject<z.objectUtil.ex
|
|
|
1782
1848
|
website?: string | null | undefined;
|
|
1783
1849
|
$id?: string | null | undefined;
|
|
1784
1850
|
$lastSeen?: string | null | undefined;
|
|
1851
|
+
$stripeCustomerId?: string | null | undefined;
|
|
1852
|
+
$stripeTotalPayments?: string | number | null | undefined;
|
|
1853
|
+
$stripeTotalSpent?: string | number | null | undefined;
|
|
1785
1854
|
} & Record<string, string | number | boolean | Date | (string | number | boolean | Date | null)[] | null>;
|
|
1786
1855
|
}[];
|
|
1787
1856
|
}>;
|