@strimz/shared-types 0.18.0 → 0.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/events.d.ts CHANGED
@@ -728,6 +728,7 @@ declare const subscriptionCreatedEventSchema: z.ZodObject<{
728
728
  nextChargeAt: z.ZodNullable<z.ZodString>;
729
729
  gracePeriodHours: z.ZodNumber;
730
730
  cancelledAt: z.ZodNullable<z.ZodString>;
731
+ cancelledBy: z.ZodOptional<z.ZodNullable<z.ZodEnum<["payer", "merchant", "strimz"]>>>;
731
732
  metadata: z.ZodDefault<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, Record<string, string | number | boolean | null>, Record<string, string | number | boolean | null>>>;
732
733
  createdAt: z.ZodString;
733
734
  updatedAt: z.ZodString;
@@ -752,6 +753,7 @@ declare const subscriptionCreatedEventSchema: z.ZodObject<{
752
753
  nextChargeAt: string | null;
753
754
  gracePeriodHours: number;
754
755
  cancelledAt: string | null;
756
+ cancelledBy?: "payer" | "merchant" | "strimz" | null | undefined;
755
757
  }, {
756
758
  status: "cancelled" | "trialing" | "active" | "at_risk" | "paused" | "lapsed";
757
759
  amount: string;
@@ -773,6 +775,7 @@ declare const subscriptionCreatedEventSchema: z.ZodObject<{
773
775
  gracePeriodHours: number;
774
776
  cancelledAt: string | null;
775
777
  metadata?: Record<string, string | number | boolean | null> | undefined;
778
+ cancelledBy?: "payer" | "merchant" | "strimz" | null | undefined;
776
779
  }>;
777
780
  }, "strip", z.ZodTypeAny, {
778
781
  type: "subscription.created";
@@ -798,6 +801,7 @@ declare const subscriptionCreatedEventSchema: z.ZodObject<{
798
801
  nextChargeAt: string | null;
799
802
  gracePeriodHours: number;
800
803
  cancelledAt: string | null;
804
+ cancelledBy?: "payer" | "merchant" | "strimz" | null | undefined;
801
805
  };
802
806
  id: string;
803
807
  createdAt: string;
@@ -826,6 +830,7 @@ declare const subscriptionCreatedEventSchema: z.ZodObject<{
826
830
  gracePeriodHours: number;
827
831
  cancelledAt: string | null;
828
832
  metadata?: Record<string, string | number | boolean | null> | undefined;
833
+ cancelledBy?: "payer" | "merchant" | "strimz" | null | undefined;
829
834
  };
830
835
  id: string;
831
836
  createdAt: string;
@@ -856,6 +861,7 @@ declare const subscriptionChargedEventSchema: z.ZodObject<{
856
861
  nextChargeAt: z.ZodNullable<z.ZodString>;
857
862
  gracePeriodHours: z.ZodNumber;
858
863
  cancelledAt: z.ZodNullable<z.ZodString>;
864
+ cancelledBy: z.ZodOptional<z.ZodNullable<z.ZodEnum<["payer", "merchant", "strimz"]>>>;
859
865
  metadata: z.ZodDefault<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, Record<string, string | number | boolean | null>, Record<string, string | number | boolean | null>>>;
860
866
  createdAt: z.ZodString;
861
867
  updatedAt: z.ZodString;
@@ -880,6 +886,7 @@ declare const subscriptionChargedEventSchema: z.ZodObject<{
880
886
  nextChargeAt: string | null;
881
887
  gracePeriodHours: number;
882
888
  cancelledAt: string | null;
889
+ cancelledBy?: "payer" | "merchant" | "strimz" | null | undefined;
883
890
  }, {
884
891
  status: "cancelled" | "trialing" | "active" | "at_risk" | "paused" | "lapsed";
885
892
  amount: string;
@@ -901,6 +908,7 @@ declare const subscriptionChargedEventSchema: z.ZodObject<{
901
908
  gracePeriodHours: number;
902
909
  cancelledAt: string | null;
903
910
  metadata?: Record<string, string | number | boolean | null> | undefined;
911
+ cancelledBy?: "payer" | "merchant" | "strimz" | null | undefined;
904
912
  }>;
905
913
  charge: z.ZodObject<{
906
914
  id: z.ZodString;
@@ -1061,6 +1069,7 @@ declare const subscriptionChargedEventSchema: z.ZodObject<{
1061
1069
  nextChargeAt: string | null;
1062
1070
  gracePeriodHours: number;
1063
1071
  cancelledAt: string | null;
1072
+ cancelledBy?: "payer" | "merchant" | "strimz" | null | undefined;
1064
1073
  };
1065
1074
  charge: {
1066
1075
  status: "failed" | "pending" | "in_flight" | "succeeded" | "retrying" | "abandoned";
@@ -1124,6 +1133,7 @@ declare const subscriptionChargedEventSchema: z.ZodObject<{
1124
1133
  gracePeriodHours: number;
1125
1134
  cancelledAt: string | null;
1126
1135
  metadata?: Record<string, string | number | boolean | null> | undefined;
1136
+ cancelledBy?: "payer" | "merchant" | "strimz" | null | undefined;
1127
1137
  };
1128
1138
  charge: {
1129
1139
  status: "failed" | "pending" | "in_flight" | "succeeded" | "retrying" | "abandoned";
@@ -1191,6 +1201,7 @@ declare const subscriptionChargedEventSchema: z.ZodObject<{
1191
1201
  nextChargeAt: string | null;
1192
1202
  gracePeriodHours: number;
1193
1203
  cancelledAt: string | null;
1204
+ cancelledBy?: "payer" | "merchant" | "strimz" | null | undefined;
1194
1205
  };
1195
1206
  charge: {
1196
1207
  status: "failed" | "pending" | "in_flight" | "succeeded" | "retrying" | "abandoned";
@@ -1261,6 +1272,7 @@ declare const subscriptionChargedEventSchema: z.ZodObject<{
1261
1272
  gracePeriodHours: number;
1262
1273
  cancelledAt: string | null;
1263
1274
  metadata?: Record<string, string | number | boolean | null> | undefined;
1275
+ cancelledBy?: "payer" | "merchant" | "strimz" | null | undefined;
1264
1276
  };
1265
1277
  charge: {
1266
1278
  status: "failed" | "pending" | "in_flight" | "succeeded" | "retrying" | "abandoned";
@@ -1311,6 +1323,7 @@ declare const subscriptionChargeFailedEventSchema: z.ZodObject<{
1311
1323
  nextChargeAt: z.ZodNullable<z.ZodString>;
1312
1324
  gracePeriodHours: z.ZodNumber;
1313
1325
  cancelledAt: z.ZodNullable<z.ZodString>;
1326
+ cancelledBy: z.ZodOptional<z.ZodNullable<z.ZodEnum<["payer", "merchant", "strimz"]>>>;
1314
1327
  metadata: z.ZodDefault<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, Record<string, string | number | boolean | null>, Record<string, string | number | boolean | null>>>;
1315
1328
  createdAt: z.ZodString;
1316
1329
  updatedAt: z.ZodString;
@@ -1335,6 +1348,7 @@ declare const subscriptionChargeFailedEventSchema: z.ZodObject<{
1335
1348
  nextChargeAt: string | null;
1336
1349
  gracePeriodHours: number;
1337
1350
  cancelledAt: string | null;
1351
+ cancelledBy?: "payer" | "merchant" | "strimz" | null | undefined;
1338
1352
  }, {
1339
1353
  status: "cancelled" | "trialing" | "active" | "at_risk" | "paused" | "lapsed";
1340
1354
  amount: string;
@@ -1356,6 +1370,7 @@ declare const subscriptionChargeFailedEventSchema: z.ZodObject<{
1356
1370
  gracePeriodHours: number;
1357
1371
  cancelledAt: string | null;
1358
1372
  metadata?: Record<string, string | number | boolean | null> | undefined;
1373
+ cancelledBy?: "payer" | "merchant" | "strimz" | null | undefined;
1359
1374
  }>;
1360
1375
  charge: z.ZodObject<{
1361
1376
  id: z.ZodString;
@@ -1434,6 +1449,7 @@ declare const subscriptionChargeFailedEventSchema: z.ZodObject<{
1434
1449
  nextChargeAt: string | null;
1435
1450
  gracePeriodHours: number;
1436
1451
  cancelledAt: string | null;
1452
+ cancelledBy?: "payer" | "merchant" | "strimz" | null | undefined;
1437
1453
  };
1438
1454
  charge: {
1439
1455
  status: "failed" | "pending" | "in_flight" | "succeeded" | "retrying" | "abandoned";
@@ -1476,6 +1492,7 @@ declare const subscriptionChargeFailedEventSchema: z.ZodObject<{
1476
1492
  gracePeriodHours: number;
1477
1493
  cancelledAt: string | null;
1478
1494
  metadata?: Record<string, string | number | boolean | null> | undefined;
1495
+ cancelledBy?: "payer" | "merchant" | "strimz" | null | undefined;
1479
1496
  };
1480
1497
  charge: {
1481
1498
  status: "failed" | "pending" | "in_flight" | "succeeded" | "retrying" | "abandoned";
@@ -1522,6 +1539,7 @@ declare const subscriptionChargeFailedEventSchema: z.ZodObject<{
1522
1539
  nextChargeAt: string | null;
1523
1540
  gracePeriodHours: number;
1524
1541
  cancelledAt: string | null;
1542
+ cancelledBy?: "payer" | "merchant" | "strimz" | null | undefined;
1525
1543
  };
1526
1544
  charge: {
1527
1545
  status: "failed" | "pending" | "in_flight" | "succeeded" | "retrying" | "abandoned";
@@ -1571,6 +1589,7 @@ declare const subscriptionChargeFailedEventSchema: z.ZodObject<{
1571
1589
  gracePeriodHours: number;
1572
1590
  cancelledAt: string | null;
1573
1591
  metadata?: Record<string, string | number | boolean | null> | undefined;
1592
+ cancelledBy?: "payer" | "merchant" | "strimz" | null | undefined;
1574
1593
  };
1575
1594
  charge: {
1576
1595
  status: "failed" | "pending" | "in_flight" | "succeeded" | "retrying" | "abandoned";
@@ -1621,6 +1640,7 @@ declare const subscriptionRecoveryAttemptEventSchema: z.ZodObject<{
1621
1640
  nextChargeAt: z.ZodNullable<z.ZodString>;
1622
1641
  gracePeriodHours: z.ZodNumber;
1623
1642
  cancelledAt: z.ZodNullable<z.ZodString>;
1643
+ cancelledBy: z.ZodOptional<z.ZodNullable<z.ZodEnum<["payer", "merchant", "strimz"]>>>;
1624
1644
  metadata: z.ZodDefault<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, Record<string, string | number | boolean | null>, Record<string, string | number | boolean | null>>>;
1625
1645
  createdAt: z.ZodString;
1626
1646
  updatedAt: z.ZodString;
@@ -1645,6 +1665,7 @@ declare const subscriptionRecoveryAttemptEventSchema: z.ZodObject<{
1645
1665
  nextChargeAt: string | null;
1646
1666
  gracePeriodHours: number;
1647
1667
  cancelledAt: string | null;
1668
+ cancelledBy?: "payer" | "merchant" | "strimz" | null | undefined;
1648
1669
  }, {
1649
1670
  status: "cancelled" | "trialing" | "active" | "at_risk" | "paused" | "lapsed";
1650
1671
  amount: string;
@@ -1666,6 +1687,7 @@ declare const subscriptionRecoveryAttemptEventSchema: z.ZodObject<{
1666
1687
  gracePeriodHours: number;
1667
1688
  cancelledAt: string | null;
1668
1689
  metadata?: Record<string, string | number | boolean | null> | undefined;
1690
+ cancelledBy?: "payer" | "merchant" | "strimz" | null | undefined;
1669
1691
  }>;
1670
1692
  attemptNumber: z.ZodNumber;
1671
1693
  }, "strip", z.ZodTypeAny, {
@@ -1691,6 +1713,7 @@ declare const subscriptionRecoveryAttemptEventSchema: z.ZodObject<{
1691
1713
  nextChargeAt: string | null;
1692
1714
  gracePeriodHours: number;
1693
1715
  cancelledAt: string | null;
1716
+ cancelledBy?: "payer" | "merchant" | "strimz" | null | undefined;
1694
1717
  };
1695
1718
  }, {
1696
1719
  attemptNumber: number;
@@ -1715,6 +1738,7 @@ declare const subscriptionRecoveryAttemptEventSchema: z.ZodObject<{
1715
1738
  gracePeriodHours: number;
1716
1739
  cancelledAt: string | null;
1717
1740
  metadata?: Record<string, string | number | boolean | null> | undefined;
1741
+ cancelledBy?: "payer" | "merchant" | "strimz" | null | undefined;
1718
1742
  };
1719
1743
  }>;
1720
1744
  }, "strip", z.ZodTypeAny, {
@@ -1743,6 +1767,7 @@ declare const subscriptionRecoveryAttemptEventSchema: z.ZodObject<{
1743
1767
  nextChargeAt: string | null;
1744
1768
  gracePeriodHours: number;
1745
1769
  cancelledAt: string | null;
1770
+ cancelledBy?: "payer" | "merchant" | "strimz" | null | undefined;
1746
1771
  };
1747
1772
  };
1748
1773
  id: string;
@@ -1774,6 +1799,7 @@ declare const subscriptionRecoveryAttemptEventSchema: z.ZodObject<{
1774
1799
  gracePeriodHours: number;
1775
1800
  cancelledAt: string | null;
1776
1801
  metadata?: Record<string, string | number | boolean | null> | undefined;
1802
+ cancelledBy?: "payer" | "merchant" | "strimz" | null | undefined;
1777
1803
  };
1778
1804
  };
1779
1805
  id: string;
@@ -1804,6 +1830,7 @@ declare const subscriptionCancelledEventSchema: z.ZodObject<{
1804
1830
  nextChargeAt: z.ZodNullable<z.ZodString>;
1805
1831
  gracePeriodHours: z.ZodNumber;
1806
1832
  cancelledAt: z.ZodNullable<z.ZodString>;
1833
+ cancelledBy: z.ZodOptional<z.ZodNullable<z.ZodEnum<["payer", "merchant", "strimz"]>>>;
1807
1834
  metadata: z.ZodDefault<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, Record<string, string | number | boolean | null>, Record<string, string | number | boolean | null>>>;
1808
1835
  createdAt: z.ZodString;
1809
1836
  updatedAt: z.ZodString;
@@ -1828,6 +1855,7 @@ declare const subscriptionCancelledEventSchema: z.ZodObject<{
1828
1855
  nextChargeAt: string | null;
1829
1856
  gracePeriodHours: number;
1830
1857
  cancelledAt: string | null;
1858
+ cancelledBy?: "payer" | "merchant" | "strimz" | null | undefined;
1831
1859
  }, {
1832
1860
  status: "cancelled" | "trialing" | "active" | "at_risk" | "paused" | "lapsed";
1833
1861
  amount: string;
@@ -1849,6 +1877,7 @@ declare const subscriptionCancelledEventSchema: z.ZodObject<{
1849
1877
  gracePeriodHours: number;
1850
1878
  cancelledAt: string | null;
1851
1879
  metadata?: Record<string, string | number | boolean | null> | undefined;
1880
+ cancelledBy?: "payer" | "merchant" | "strimz" | null | undefined;
1852
1881
  }>;
1853
1882
  }, "strip", z.ZodTypeAny, {
1854
1883
  type: "subscription.cancelled";
@@ -1874,6 +1903,7 @@ declare const subscriptionCancelledEventSchema: z.ZodObject<{
1874
1903
  nextChargeAt: string | null;
1875
1904
  gracePeriodHours: number;
1876
1905
  cancelledAt: string | null;
1906
+ cancelledBy?: "payer" | "merchant" | "strimz" | null | undefined;
1877
1907
  };
1878
1908
  id: string;
1879
1909
  createdAt: string;
@@ -1902,6 +1932,7 @@ declare const subscriptionCancelledEventSchema: z.ZodObject<{
1902
1932
  gracePeriodHours: number;
1903
1933
  cancelledAt: string | null;
1904
1934
  metadata?: Record<string, string | number | boolean | null> | undefined;
1935
+ cancelledBy?: "payer" | "merchant" | "strimz" | null | undefined;
1905
1936
  };
1906
1937
  id: string;
1907
1938
  createdAt: string;
@@ -1931,6 +1962,7 @@ declare const subscriptionLapsedEventSchema: z.ZodObject<{
1931
1962
  nextChargeAt: z.ZodNullable<z.ZodString>;
1932
1963
  gracePeriodHours: z.ZodNumber;
1933
1964
  cancelledAt: z.ZodNullable<z.ZodString>;
1965
+ cancelledBy: z.ZodOptional<z.ZodNullable<z.ZodEnum<["payer", "merchant", "strimz"]>>>;
1934
1966
  metadata: z.ZodDefault<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, Record<string, string | number | boolean | null>, Record<string, string | number | boolean | null>>>;
1935
1967
  createdAt: z.ZodString;
1936
1968
  updatedAt: z.ZodString;
@@ -1955,6 +1987,7 @@ declare const subscriptionLapsedEventSchema: z.ZodObject<{
1955
1987
  nextChargeAt: string | null;
1956
1988
  gracePeriodHours: number;
1957
1989
  cancelledAt: string | null;
1990
+ cancelledBy?: "payer" | "merchant" | "strimz" | null | undefined;
1958
1991
  }, {
1959
1992
  status: "cancelled" | "trialing" | "active" | "at_risk" | "paused" | "lapsed";
1960
1993
  amount: string;
@@ -1976,6 +2009,7 @@ declare const subscriptionLapsedEventSchema: z.ZodObject<{
1976
2009
  gracePeriodHours: number;
1977
2010
  cancelledAt: string | null;
1978
2011
  metadata?: Record<string, string | number | boolean | null> | undefined;
2012
+ cancelledBy?: "payer" | "merchant" | "strimz" | null | undefined;
1979
2013
  }>;
1980
2014
  }, "strip", z.ZodTypeAny, {
1981
2015
  type: "subscription.lapsed";
@@ -2001,6 +2035,7 @@ declare const subscriptionLapsedEventSchema: z.ZodObject<{
2001
2035
  nextChargeAt: string | null;
2002
2036
  gracePeriodHours: number;
2003
2037
  cancelledAt: string | null;
2038
+ cancelledBy?: "payer" | "merchant" | "strimz" | null | undefined;
2004
2039
  };
2005
2040
  id: string;
2006
2041
  createdAt: string;
@@ -2029,6 +2064,7 @@ declare const subscriptionLapsedEventSchema: z.ZodObject<{
2029
2064
  gracePeriodHours: number;
2030
2065
  cancelledAt: string | null;
2031
2066
  metadata?: Record<string, string | number | boolean | null> | undefined;
2067
+ cancelledBy?: "payer" | "merchant" | "strimz" | null | undefined;
2032
2068
  };
2033
2069
  id: string;
2034
2070
  createdAt: string;
@@ -2058,6 +2094,7 @@ declare const subscriptionReactivatedEventSchema: z.ZodObject<{
2058
2094
  nextChargeAt: z.ZodNullable<z.ZodString>;
2059
2095
  gracePeriodHours: z.ZodNumber;
2060
2096
  cancelledAt: z.ZodNullable<z.ZodString>;
2097
+ cancelledBy: z.ZodOptional<z.ZodNullable<z.ZodEnum<["payer", "merchant", "strimz"]>>>;
2061
2098
  metadata: z.ZodDefault<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, Record<string, string | number | boolean | null>, Record<string, string | number | boolean | null>>>;
2062
2099
  createdAt: z.ZodString;
2063
2100
  updatedAt: z.ZodString;
@@ -2082,6 +2119,7 @@ declare const subscriptionReactivatedEventSchema: z.ZodObject<{
2082
2119
  nextChargeAt: string | null;
2083
2120
  gracePeriodHours: number;
2084
2121
  cancelledAt: string | null;
2122
+ cancelledBy?: "payer" | "merchant" | "strimz" | null | undefined;
2085
2123
  }, {
2086
2124
  status: "cancelled" | "trialing" | "active" | "at_risk" | "paused" | "lapsed";
2087
2125
  amount: string;
@@ -2103,6 +2141,7 @@ declare const subscriptionReactivatedEventSchema: z.ZodObject<{
2103
2141
  gracePeriodHours: number;
2104
2142
  cancelledAt: string | null;
2105
2143
  metadata?: Record<string, string | number | boolean | null> | undefined;
2144
+ cancelledBy?: "payer" | "merchant" | "strimz" | null | undefined;
2106
2145
  }>;
2107
2146
  }, "strip", z.ZodTypeAny, {
2108
2147
  type: "subscription.reactivated";
@@ -2128,6 +2167,7 @@ declare const subscriptionReactivatedEventSchema: z.ZodObject<{
2128
2167
  nextChargeAt: string | null;
2129
2168
  gracePeriodHours: number;
2130
2169
  cancelledAt: string | null;
2170
+ cancelledBy?: "payer" | "merchant" | "strimz" | null | undefined;
2131
2171
  };
2132
2172
  id: string;
2133
2173
  createdAt: string;
@@ -2156,6 +2196,7 @@ declare const subscriptionReactivatedEventSchema: z.ZodObject<{
2156
2196
  gracePeriodHours: number;
2157
2197
  cancelledAt: string | null;
2158
2198
  metadata?: Record<string, string | number | boolean | null> | undefined;
2199
+ cancelledBy?: "payer" | "merchant" | "strimz" | null | undefined;
2159
2200
  };
2160
2201
  id: string;
2161
2202
  createdAt: string;
@@ -4491,6 +4532,7 @@ declare const webhookEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
4491
4532
  nextChargeAt: z.ZodNullable<z.ZodString>;
4492
4533
  gracePeriodHours: z.ZodNumber;
4493
4534
  cancelledAt: z.ZodNullable<z.ZodString>;
4535
+ cancelledBy: z.ZodOptional<z.ZodNullable<z.ZodEnum<["payer", "merchant", "strimz"]>>>;
4494
4536
  metadata: z.ZodDefault<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, Record<string, string | number | boolean | null>, Record<string, string | number | boolean | null>>>;
4495
4537
  createdAt: z.ZodString;
4496
4538
  updatedAt: z.ZodString;
@@ -4515,6 +4557,7 @@ declare const webhookEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
4515
4557
  nextChargeAt: string | null;
4516
4558
  gracePeriodHours: number;
4517
4559
  cancelledAt: string | null;
4560
+ cancelledBy?: "payer" | "merchant" | "strimz" | null | undefined;
4518
4561
  }, {
4519
4562
  status: "cancelled" | "trialing" | "active" | "at_risk" | "paused" | "lapsed";
4520
4563
  amount: string;
@@ -4536,6 +4579,7 @@ declare const webhookEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
4536
4579
  gracePeriodHours: number;
4537
4580
  cancelledAt: string | null;
4538
4581
  metadata?: Record<string, string | number | boolean | null> | undefined;
4582
+ cancelledBy?: "payer" | "merchant" | "strimz" | null | undefined;
4539
4583
  }>;
4540
4584
  }, "strip", z.ZodTypeAny, {
4541
4585
  type: "subscription.created";
@@ -4561,6 +4605,7 @@ declare const webhookEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
4561
4605
  nextChargeAt: string | null;
4562
4606
  gracePeriodHours: number;
4563
4607
  cancelledAt: string | null;
4608
+ cancelledBy?: "payer" | "merchant" | "strimz" | null | undefined;
4564
4609
  };
4565
4610
  id: string;
4566
4611
  createdAt: string;
@@ -4589,6 +4634,7 @@ declare const webhookEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
4589
4634
  gracePeriodHours: number;
4590
4635
  cancelledAt: string | null;
4591
4636
  metadata?: Record<string, string | number | boolean | null> | undefined;
4637
+ cancelledBy?: "payer" | "merchant" | "strimz" | null | undefined;
4592
4638
  };
4593
4639
  id: string;
4594
4640
  createdAt: string;
@@ -4618,6 +4664,7 @@ declare const webhookEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
4618
4664
  nextChargeAt: z.ZodNullable<z.ZodString>;
4619
4665
  gracePeriodHours: z.ZodNumber;
4620
4666
  cancelledAt: z.ZodNullable<z.ZodString>;
4667
+ cancelledBy: z.ZodOptional<z.ZodNullable<z.ZodEnum<["payer", "merchant", "strimz"]>>>;
4621
4668
  metadata: z.ZodDefault<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, Record<string, string | number | boolean | null>, Record<string, string | number | boolean | null>>>;
4622
4669
  createdAt: z.ZodString;
4623
4670
  updatedAt: z.ZodString;
@@ -4642,6 +4689,7 @@ declare const webhookEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
4642
4689
  nextChargeAt: string | null;
4643
4690
  gracePeriodHours: number;
4644
4691
  cancelledAt: string | null;
4692
+ cancelledBy?: "payer" | "merchant" | "strimz" | null | undefined;
4645
4693
  }, {
4646
4694
  status: "cancelled" | "trialing" | "active" | "at_risk" | "paused" | "lapsed";
4647
4695
  amount: string;
@@ -4663,6 +4711,7 @@ declare const webhookEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
4663
4711
  gracePeriodHours: number;
4664
4712
  cancelledAt: string | null;
4665
4713
  metadata?: Record<string, string | number | boolean | null> | undefined;
4714
+ cancelledBy?: "payer" | "merchant" | "strimz" | null | undefined;
4666
4715
  }>;
4667
4716
  charge: z.ZodObject<{
4668
4717
  id: z.ZodString;
@@ -4823,6 +4872,7 @@ declare const webhookEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
4823
4872
  nextChargeAt: string | null;
4824
4873
  gracePeriodHours: number;
4825
4874
  cancelledAt: string | null;
4875
+ cancelledBy?: "payer" | "merchant" | "strimz" | null | undefined;
4826
4876
  };
4827
4877
  charge: {
4828
4878
  status: "failed" | "pending" | "in_flight" | "succeeded" | "retrying" | "abandoned";
@@ -4886,6 +4936,7 @@ declare const webhookEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
4886
4936
  gracePeriodHours: number;
4887
4937
  cancelledAt: string | null;
4888
4938
  metadata?: Record<string, string | number | boolean | null> | undefined;
4939
+ cancelledBy?: "payer" | "merchant" | "strimz" | null | undefined;
4889
4940
  };
4890
4941
  charge: {
4891
4942
  status: "failed" | "pending" | "in_flight" | "succeeded" | "retrying" | "abandoned";
@@ -4953,6 +5004,7 @@ declare const webhookEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
4953
5004
  nextChargeAt: string | null;
4954
5005
  gracePeriodHours: number;
4955
5006
  cancelledAt: string | null;
5007
+ cancelledBy?: "payer" | "merchant" | "strimz" | null | undefined;
4956
5008
  };
4957
5009
  charge: {
4958
5010
  status: "failed" | "pending" | "in_flight" | "succeeded" | "retrying" | "abandoned";
@@ -5023,6 +5075,7 @@ declare const webhookEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
5023
5075
  gracePeriodHours: number;
5024
5076
  cancelledAt: string | null;
5025
5077
  metadata?: Record<string, string | number | boolean | null> | undefined;
5078
+ cancelledBy?: "payer" | "merchant" | "strimz" | null | undefined;
5026
5079
  };
5027
5080
  charge: {
5028
5081
  status: "failed" | "pending" | "in_flight" | "succeeded" | "retrying" | "abandoned";
@@ -5072,6 +5125,7 @@ declare const webhookEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
5072
5125
  nextChargeAt: z.ZodNullable<z.ZodString>;
5073
5126
  gracePeriodHours: z.ZodNumber;
5074
5127
  cancelledAt: z.ZodNullable<z.ZodString>;
5128
+ cancelledBy: z.ZodOptional<z.ZodNullable<z.ZodEnum<["payer", "merchant", "strimz"]>>>;
5075
5129
  metadata: z.ZodDefault<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, Record<string, string | number | boolean | null>, Record<string, string | number | boolean | null>>>;
5076
5130
  createdAt: z.ZodString;
5077
5131
  updatedAt: z.ZodString;
@@ -5096,6 +5150,7 @@ declare const webhookEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
5096
5150
  nextChargeAt: string | null;
5097
5151
  gracePeriodHours: number;
5098
5152
  cancelledAt: string | null;
5153
+ cancelledBy?: "payer" | "merchant" | "strimz" | null | undefined;
5099
5154
  }, {
5100
5155
  status: "cancelled" | "trialing" | "active" | "at_risk" | "paused" | "lapsed";
5101
5156
  amount: string;
@@ -5117,6 +5172,7 @@ declare const webhookEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
5117
5172
  gracePeriodHours: number;
5118
5173
  cancelledAt: string | null;
5119
5174
  metadata?: Record<string, string | number | boolean | null> | undefined;
5175
+ cancelledBy?: "payer" | "merchant" | "strimz" | null | undefined;
5120
5176
  }>;
5121
5177
  charge: z.ZodObject<{
5122
5178
  id: z.ZodString;
@@ -5195,6 +5251,7 @@ declare const webhookEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
5195
5251
  nextChargeAt: string | null;
5196
5252
  gracePeriodHours: number;
5197
5253
  cancelledAt: string | null;
5254
+ cancelledBy?: "payer" | "merchant" | "strimz" | null | undefined;
5198
5255
  };
5199
5256
  charge: {
5200
5257
  status: "failed" | "pending" | "in_flight" | "succeeded" | "retrying" | "abandoned";
@@ -5237,6 +5294,7 @@ declare const webhookEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
5237
5294
  gracePeriodHours: number;
5238
5295
  cancelledAt: string | null;
5239
5296
  metadata?: Record<string, string | number | boolean | null> | undefined;
5297
+ cancelledBy?: "payer" | "merchant" | "strimz" | null | undefined;
5240
5298
  };
5241
5299
  charge: {
5242
5300
  status: "failed" | "pending" | "in_flight" | "succeeded" | "retrying" | "abandoned";
@@ -5283,6 +5341,7 @@ declare const webhookEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
5283
5341
  nextChargeAt: string | null;
5284
5342
  gracePeriodHours: number;
5285
5343
  cancelledAt: string | null;
5344
+ cancelledBy?: "payer" | "merchant" | "strimz" | null | undefined;
5286
5345
  };
5287
5346
  charge: {
5288
5347
  status: "failed" | "pending" | "in_flight" | "succeeded" | "retrying" | "abandoned";
@@ -5332,6 +5391,7 @@ declare const webhookEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
5332
5391
  gracePeriodHours: number;
5333
5392
  cancelledAt: string | null;
5334
5393
  metadata?: Record<string, string | number | boolean | null> | undefined;
5394
+ cancelledBy?: "payer" | "merchant" | "strimz" | null | undefined;
5335
5395
  };
5336
5396
  charge: {
5337
5397
  status: "failed" | "pending" | "in_flight" | "succeeded" | "retrying" | "abandoned";
@@ -5381,6 +5441,7 @@ declare const webhookEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
5381
5441
  nextChargeAt: z.ZodNullable<z.ZodString>;
5382
5442
  gracePeriodHours: z.ZodNumber;
5383
5443
  cancelledAt: z.ZodNullable<z.ZodString>;
5444
+ cancelledBy: z.ZodOptional<z.ZodNullable<z.ZodEnum<["payer", "merchant", "strimz"]>>>;
5384
5445
  metadata: z.ZodDefault<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, Record<string, string | number | boolean | null>, Record<string, string | number | boolean | null>>>;
5385
5446
  createdAt: z.ZodString;
5386
5447
  updatedAt: z.ZodString;
@@ -5405,6 +5466,7 @@ declare const webhookEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
5405
5466
  nextChargeAt: string | null;
5406
5467
  gracePeriodHours: number;
5407
5468
  cancelledAt: string | null;
5469
+ cancelledBy?: "payer" | "merchant" | "strimz" | null | undefined;
5408
5470
  }, {
5409
5471
  status: "cancelled" | "trialing" | "active" | "at_risk" | "paused" | "lapsed";
5410
5472
  amount: string;
@@ -5426,6 +5488,7 @@ declare const webhookEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
5426
5488
  gracePeriodHours: number;
5427
5489
  cancelledAt: string | null;
5428
5490
  metadata?: Record<string, string | number | boolean | null> | undefined;
5491
+ cancelledBy?: "payer" | "merchant" | "strimz" | null | undefined;
5429
5492
  }>;
5430
5493
  attemptNumber: z.ZodNumber;
5431
5494
  }, "strip", z.ZodTypeAny, {
@@ -5451,6 +5514,7 @@ declare const webhookEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
5451
5514
  nextChargeAt: string | null;
5452
5515
  gracePeriodHours: number;
5453
5516
  cancelledAt: string | null;
5517
+ cancelledBy?: "payer" | "merchant" | "strimz" | null | undefined;
5454
5518
  };
5455
5519
  }, {
5456
5520
  attemptNumber: number;
@@ -5475,6 +5539,7 @@ declare const webhookEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
5475
5539
  gracePeriodHours: number;
5476
5540
  cancelledAt: string | null;
5477
5541
  metadata?: Record<string, string | number | boolean | null> | undefined;
5542
+ cancelledBy?: "payer" | "merchant" | "strimz" | null | undefined;
5478
5543
  };
5479
5544
  }>;
5480
5545
  }, "strip", z.ZodTypeAny, {
@@ -5503,6 +5568,7 @@ declare const webhookEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
5503
5568
  nextChargeAt: string | null;
5504
5569
  gracePeriodHours: number;
5505
5570
  cancelledAt: string | null;
5571
+ cancelledBy?: "payer" | "merchant" | "strimz" | null | undefined;
5506
5572
  };
5507
5573
  };
5508
5574
  id: string;
@@ -5534,6 +5600,7 @@ declare const webhookEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
5534
5600
  gracePeriodHours: number;
5535
5601
  cancelledAt: string | null;
5536
5602
  metadata?: Record<string, string | number | boolean | null> | undefined;
5603
+ cancelledBy?: "payer" | "merchant" | "strimz" | null | undefined;
5537
5604
  };
5538
5605
  };
5539
5606
  id: string;
@@ -5563,6 +5630,7 @@ declare const webhookEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
5563
5630
  nextChargeAt: z.ZodNullable<z.ZodString>;
5564
5631
  gracePeriodHours: z.ZodNumber;
5565
5632
  cancelledAt: z.ZodNullable<z.ZodString>;
5633
+ cancelledBy: z.ZodOptional<z.ZodNullable<z.ZodEnum<["payer", "merchant", "strimz"]>>>;
5566
5634
  metadata: z.ZodDefault<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, Record<string, string | number | boolean | null>, Record<string, string | number | boolean | null>>>;
5567
5635
  createdAt: z.ZodString;
5568
5636
  updatedAt: z.ZodString;
@@ -5587,6 +5655,7 @@ declare const webhookEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
5587
5655
  nextChargeAt: string | null;
5588
5656
  gracePeriodHours: number;
5589
5657
  cancelledAt: string | null;
5658
+ cancelledBy?: "payer" | "merchant" | "strimz" | null | undefined;
5590
5659
  }, {
5591
5660
  status: "cancelled" | "trialing" | "active" | "at_risk" | "paused" | "lapsed";
5592
5661
  amount: string;
@@ -5608,6 +5677,7 @@ declare const webhookEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
5608
5677
  gracePeriodHours: number;
5609
5678
  cancelledAt: string | null;
5610
5679
  metadata?: Record<string, string | number | boolean | null> | undefined;
5680
+ cancelledBy?: "payer" | "merchant" | "strimz" | null | undefined;
5611
5681
  }>;
5612
5682
  }, "strip", z.ZodTypeAny, {
5613
5683
  type: "subscription.cancelled";
@@ -5633,6 +5703,7 @@ declare const webhookEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
5633
5703
  nextChargeAt: string | null;
5634
5704
  gracePeriodHours: number;
5635
5705
  cancelledAt: string | null;
5706
+ cancelledBy?: "payer" | "merchant" | "strimz" | null | undefined;
5636
5707
  };
5637
5708
  id: string;
5638
5709
  createdAt: string;
@@ -5661,6 +5732,7 @@ declare const webhookEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
5661
5732
  gracePeriodHours: number;
5662
5733
  cancelledAt: string | null;
5663
5734
  metadata?: Record<string, string | number | boolean | null> | undefined;
5735
+ cancelledBy?: "payer" | "merchant" | "strimz" | null | undefined;
5664
5736
  };
5665
5737
  id: string;
5666
5738
  createdAt: string;
@@ -5689,6 +5761,7 @@ declare const webhookEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
5689
5761
  nextChargeAt: z.ZodNullable<z.ZodString>;
5690
5762
  gracePeriodHours: z.ZodNumber;
5691
5763
  cancelledAt: z.ZodNullable<z.ZodString>;
5764
+ cancelledBy: z.ZodOptional<z.ZodNullable<z.ZodEnum<["payer", "merchant", "strimz"]>>>;
5692
5765
  metadata: z.ZodDefault<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, Record<string, string | number | boolean | null>, Record<string, string | number | boolean | null>>>;
5693
5766
  createdAt: z.ZodString;
5694
5767
  updatedAt: z.ZodString;
@@ -5713,6 +5786,7 @@ declare const webhookEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
5713
5786
  nextChargeAt: string | null;
5714
5787
  gracePeriodHours: number;
5715
5788
  cancelledAt: string | null;
5789
+ cancelledBy?: "payer" | "merchant" | "strimz" | null | undefined;
5716
5790
  }, {
5717
5791
  status: "cancelled" | "trialing" | "active" | "at_risk" | "paused" | "lapsed";
5718
5792
  amount: string;
@@ -5734,6 +5808,7 @@ declare const webhookEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
5734
5808
  gracePeriodHours: number;
5735
5809
  cancelledAt: string | null;
5736
5810
  metadata?: Record<string, string | number | boolean | null> | undefined;
5811
+ cancelledBy?: "payer" | "merchant" | "strimz" | null | undefined;
5737
5812
  }>;
5738
5813
  }, "strip", z.ZodTypeAny, {
5739
5814
  type: "subscription.lapsed";
@@ -5759,6 +5834,7 @@ declare const webhookEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
5759
5834
  nextChargeAt: string | null;
5760
5835
  gracePeriodHours: number;
5761
5836
  cancelledAt: string | null;
5837
+ cancelledBy?: "payer" | "merchant" | "strimz" | null | undefined;
5762
5838
  };
5763
5839
  id: string;
5764
5840
  createdAt: string;
@@ -5787,6 +5863,7 @@ declare const webhookEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
5787
5863
  gracePeriodHours: number;
5788
5864
  cancelledAt: string | null;
5789
5865
  metadata?: Record<string, string | number | boolean | null> | undefined;
5866
+ cancelledBy?: "payer" | "merchant" | "strimz" | null | undefined;
5790
5867
  };
5791
5868
  id: string;
5792
5869
  createdAt: string;
@@ -5815,6 +5892,7 @@ declare const webhookEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
5815
5892
  nextChargeAt: z.ZodNullable<z.ZodString>;
5816
5893
  gracePeriodHours: z.ZodNumber;
5817
5894
  cancelledAt: z.ZodNullable<z.ZodString>;
5895
+ cancelledBy: z.ZodOptional<z.ZodNullable<z.ZodEnum<["payer", "merchant", "strimz"]>>>;
5818
5896
  metadata: z.ZodDefault<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, Record<string, string | number | boolean | null>, Record<string, string | number | boolean | null>>>;
5819
5897
  createdAt: z.ZodString;
5820
5898
  updatedAt: z.ZodString;
@@ -5839,6 +5917,7 @@ declare const webhookEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
5839
5917
  nextChargeAt: string | null;
5840
5918
  gracePeriodHours: number;
5841
5919
  cancelledAt: string | null;
5920
+ cancelledBy?: "payer" | "merchant" | "strimz" | null | undefined;
5842
5921
  }, {
5843
5922
  status: "cancelled" | "trialing" | "active" | "at_risk" | "paused" | "lapsed";
5844
5923
  amount: string;
@@ -5860,6 +5939,7 @@ declare const webhookEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
5860
5939
  gracePeriodHours: number;
5861
5940
  cancelledAt: string | null;
5862
5941
  metadata?: Record<string, string | number | boolean | null> | undefined;
5942
+ cancelledBy?: "payer" | "merchant" | "strimz" | null | undefined;
5863
5943
  }>;
5864
5944
  }, "strip", z.ZodTypeAny, {
5865
5945
  type: "subscription.reactivated";
@@ -5885,6 +5965,7 @@ declare const webhookEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
5885
5965
  nextChargeAt: string | null;
5886
5966
  gracePeriodHours: number;
5887
5967
  cancelledAt: string | null;
5968
+ cancelledBy?: "payer" | "merchant" | "strimz" | null | undefined;
5888
5969
  };
5889
5970
  id: string;
5890
5971
  createdAt: string;
@@ -5913,6 +5994,7 @@ declare const webhookEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
5913
5994
  gracePeriodHours: number;
5914
5995
  cancelledAt: string | null;
5915
5996
  metadata?: Record<string, string | number | boolean | null> | undefined;
5997
+ cancelledBy?: "payer" | "merchant" | "strimz" | null | undefined;
5916
5998
  };
5917
5999
  id: string;
5918
6000
  createdAt: string;
package/dist/events.js CHANGED
@@ -264,6 +264,7 @@ var subscriptionStatusSchema = z.enum([
264
264
  "cancelled",
265
265
  "lapsed"
266
266
  ]);
267
+ var subscriptionCancellerSchema = z.enum(["payer", "merchant", "strimz"]);
267
268
  var subscriptionSchema = z.object({
268
269
  id: idSchema,
269
270
  onchainSubscriptionId: z.number().int().nonnegative().nullable(),
@@ -282,6 +283,7 @@ var subscriptionSchema = z.object({
282
283
  nextChargeAt: isoTimestampSchema.nullable(),
283
284
  gracePeriodHours: z.number().int().min(0).max(72),
284
285
  cancelledAt: isoTimestampSchema.nullable(),
286
+ cancelledBy: subscriptionCancellerSchema.nullable().optional(),
285
287
  metadata: metadataSchema,
286
288
  createdAt: isoTimestampSchema,
287
289
  updatedAt: isoTimestampSchema