autumn-js 0.1.58 → 0.1.60

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.
Files changed (126) hide show
  1. package/dist/libraries/backend/better-auth.js +1 -1
  2. package/dist/libraries/backend/better-auth.mjs +1 -1
  3. package/dist/libraries/backend/express.d.mts +1 -1
  4. package/dist/libraries/backend/express.d.ts +1 -1
  5. package/dist/libraries/backend/index.d.mts +1 -1
  6. package/dist/libraries/backend/index.d.ts +1 -1
  7. package/dist/libraries/backend/{referralTypes-DFoyaks_.d.ts → referralTypes-BbQIQSwu.d.ts} +39 -2
  8. package/dist/libraries/backend/{referralTypes-DQvRryhI.d.mts → referralTypes-DfCAdrH5.d.mts} +39 -2
  9. package/dist/libraries/backend/utils/withAuth.d.mts +1 -1
  10. package/dist/libraries/backend/utils/withAuth.d.ts +1 -1
  11. package/dist/libraries/react/AutumnContext.d.mts +1 -1
  12. package/dist/libraries/react/AutumnContext.d.ts +1 -1
  13. package/dist/libraries/react/AutumnContext.js +1 -1
  14. package/dist/libraries/react/AutumnContext.mjs +4 -4
  15. package/dist/libraries/react/BaseAutumnProvider.d.mts +1 -1
  16. package/dist/libraries/react/BaseAutumnProvider.d.ts +1 -1
  17. package/dist/libraries/react/BaseAutumnProvider.js +1 -1
  18. package/dist/libraries/react/BaseAutumnProvider.mjs +7 -7
  19. package/dist/libraries/react/{ReactAutumnClient-oMfOgmCh.d.ts → ReactAutumnClient-BIu9o4qt.d.ts} +2 -2
  20. package/dist/libraries/react/{ReactAutumnClient-Ia5U0PaT.d.mts → ReactAutumnClient-BUCaFQyc.d.mts} +2 -2
  21. package/dist/libraries/react/ReactAutumnProvider.js +1 -1
  22. package/dist/libraries/react/ReactAutumnProvider.mjs +8 -8
  23. package/dist/libraries/react/{chunk-YOUN2TA4.mjs → chunk-2FM3THPQ.mjs} +1 -1
  24. package/dist/libraries/react/{chunk-DI2OKRQG.mjs → chunk-3YJEXV3N.mjs} +2 -1
  25. package/dist/libraries/react/{chunk-57G436NL.mjs → chunk-662NSPAN.mjs} +2 -2
  26. package/dist/libraries/react/{chunk-3HZWPY3Y.mjs → chunk-6EXNYWJX.mjs} +1 -1
  27. package/dist/libraries/react/{chunk-VJ7HU27Y.mjs → chunk-AERIX2KL.mjs} +4 -4
  28. package/dist/libraries/react/{chunk-BAQYEWPO.mjs → chunk-AFS2TJWY.mjs} +1 -1
  29. package/dist/libraries/react/{chunk-TMBPDMCG.mjs → chunk-AR4G5NEU.mjs} +1 -1
  30. package/dist/libraries/react/{chunk-6ET7BZ6Z.mjs → chunk-GRYYEFIB.mjs} +2 -2
  31. package/dist/libraries/react/{chunk-D5GSRXSP.mjs → chunk-GUEIRI73.mjs} +4 -4
  32. package/dist/libraries/react/{chunk-ZMM5QZ67.mjs → chunk-J3OY6QTS.mjs} +28 -28
  33. package/dist/libraries/react/{chunk-UKFZYMMO.mjs → chunk-LUCO2OG2.mjs} +4 -4
  34. package/dist/libraries/react/{chunk-4SS6N2XA.mjs → chunk-N6DY2K75.mjs} +1 -1
  35. package/dist/libraries/react/{chunk-S4XVATSO.mjs → chunk-RZKICKGQ.mjs} +3 -3
  36. package/dist/libraries/react/{chunk-QIJTY4HU.mjs → chunk-SIN5IMSL.mjs} +1 -1
  37. package/dist/libraries/react/{chunk-IPGTOZO5.mjs → chunk-WC3E5NNC.mjs} +2 -1
  38. package/dist/libraries/react/client/ConvexAutumnClient.d.mts +1 -1
  39. package/dist/libraries/react/client/ConvexAutumnClient.d.ts +1 -1
  40. package/dist/libraries/react/client/ReactAutumnClient.d.mts +1 -1
  41. package/dist/libraries/react/client/ReactAutumnClient.d.ts +1 -1
  42. package/dist/libraries/react/client/ReactAutumnClient.js +1 -1
  43. package/dist/libraries/react/client/ReactAutumnClient.mjs +3 -3
  44. package/dist/libraries/react/client/clientAnalyticsMethods.d.mts +1 -1
  45. package/dist/libraries/react/client/clientAnalyticsMethods.d.ts +1 -1
  46. package/dist/libraries/react/client/clientCompMethods.d.mts +1 -1
  47. package/dist/libraries/react/client/clientCompMethods.d.ts +1 -1
  48. package/dist/libraries/react/client/clientCusMethods.d.mts +1 -1
  49. package/dist/libraries/react/client/clientCusMethods.d.ts +1 -1
  50. package/dist/libraries/react/client/clientEntityMethods.d.mts +1 -1
  51. package/dist/libraries/react/client/clientEntityMethods.d.ts +1 -1
  52. package/dist/libraries/react/client/clientGenMethods.d.mts +2 -2
  53. package/dist/libraries/react/client/clientGenMethods.d.ts +2 -2
  54. package/dist/libraries/react/client/clientGenMethods.js +1 -1
  55. package/dist/libraries/react/client/clientGenMethods.mjs +1 -1
  56. package/dist/libraries/react/client/clientProdMethods.d.mts +1 -1
  57. package/dist/libraries/react/client/clientProdMethods.d.ts +1 -1
  58. package/dist/libraries/react/client/clientReferralMethods.d.mts +1 -1
  59. package/dist/libraries/react/client/clientReferralMethods.d.ts +1 -1
  60. package/dist/libraries/react/client/types/clientGenTypes.d.mts +2 -2
  61. package/dist/libraries/react/client/types/clientGenTypes.d.ts +2 -2
  62. package/dist/libraries/react/client/types/clientGenTypes.js +1 -1
  63. package/dist/libraries/react/client/types/clientGenTypes.mjs +1 -1
  64. package/dist/libraries/react/components/checkout-dialog/checkout-dialog-synced.js +1 -1
  65. package/dist/libraries/react/components/checkout-dialog/checkout-dialog-synced.mjs +25 -25
  66. package/dist/libraries/react/components/paywall-dialog/paywall-dialog-synced.js +1 -1
  67. package/dist/libraries/react/components/paywall-dialog/paywall-dialog-synced.mjs +25 -25
  68. package/dist/libraries/react/components/pricing-table/pricing-table-synced.js +1 -1
  69. package/dist/libraries/react/components/pricing-table/pricing-table-synced.mjs +25 -25
  70. package/dist/libraries/react/components/ui/dialog.mjs +2 -2
  71. package/dist/libraries/react/components/ui/popover.mjs +2 -2
  72. package/dist/libraries/react/hooks/helpers/handleCheck.d.mts +1 -1
  73. package/dist/libraries/react/hooks/helpers/handleCheck.d.ts +1 -1
  74. package/dist/libraries/react/hooks/helpers/useAutumnBase.d.mts +1 -1
  75. package/dist/libraries/react/hooks/helpers/useAutumnBase.d.ts +1 -1
  76. package/dist/libraries/react/hooks/useAggregateEvents.js +2 -1
  77. package/dist/libraries/react/hooks/useAggregateEvents.mjs +5 -5
  78. package/dist/libraries/react/hooks/useAnalytics.js +1 -1
  79. package/dist/libraries/react/hooks/useAnalytics.mjs +5 -5
  80. package/dist/libraries/react/hooks/useCustomer.d.mts +1 -1
  81. package/dist/libraries/react/hooks/useCustomer.d.ts +1 -1
  82. package/dist/libraries/react/hooks/useCustomer.js +1 -1
  83. package/dist/libraries/react/hooks/useCustomer.mjs +7 -7
  84. package/dist/libraries/react/hooks/useCustomerBase.d.mts +2 -2
  85. package/dist/libraries/react/hooks/useCustomerBase.d.ts +2 -2
  86. package/dist/libraries/react/hooks/useCustomerBase.js +1 -1
  87. package/dist/libraries/react/hooks/useCustomerBase.mjs +6 -6
  88. package/dist/libraries/react/hooks/useEntity.js +1 -1
  89. package/dist/libraries/react/hooks/useEntity.mjs +7 -7
  90. package/dist/libraries/react/hooks/useEntityBase.d.mts +1 -1
  91. package/dist/libraries/react/hooks/useEntityBase.d.ts +1 -1
  92. package/dist/libraries/react/hooks/useEntityBase.js +1 -1
  93. package/dist/libraries/react/hooks/useEntityBase.mjs +6 -6
  94. package/dist/libraries/react/hooks/useListEvents.js +2 -1
  95. package/dist/libraries/react/hooks/useListEvents.mjs +5 -5
  96. package/dist/libraries/react/hooks/usePaywall.js +1 -1
  97. package/dist/libraries/react/hooks/usePaywall.mjs +5 -5
  98. package/dist/libraries/react/hooks/usePricingTable.js +1 -1
  99. package/dist/libraries/react/hooks/usePricingTable.mjs +5 -5
  100. package/dist/libraries/react/hooks/usePricingTableBase.d.mts +1 -1
  101. package/dist/libraries/react/hooks/usePricingTableBase.d.ts +1 -1
  102. package/dist/libraries/react/hooks/useProductsBase.d.mts +1 -1
  103. package/dist/libraries/react/hooks/useProductsBase.d.ts +1 -1
  104. package/dist/libraries/react/index.d.mts +3 -3
  105. package/dist/libraries/react/index.d.ts +3 -3
  106. package/dist/libraries/react/index.js +3 -1
  107. package/dist/libraries/react/index.mjs +3 -1
  108. package/dist/next/client/NextAutumnClient.d.mts +3 -3
  109. package/dist/next/client/NextAutumnClient.d.ts +3 -3
  110. package/dist/next/client/{clientAttachTypes-C8e1uv-S.d.mts → clientAttachTypes-Bt2nJCCu.d.mts} +2 -2
  111. package/dist/next/client/{clientAttachTypes-Ca9YkmkW.d.ts → clientAttachTypes-CugoThHh.d.ts} +2 -2
  112. package/dist/next/client/hooks/useAutumn.d.mts +1 -1
  113. package/dist/next/client/hooks/useAutumn.d.ts +1 -1
  114. package/dist/next/client/hooks/useCustomer.d.mts +2 -2
  115. package/dist/next/client/hooks/useCustomer.d.ts +2 -2
  116. package/dist/next/client/hooks/useEntity.d.mts +1 -1
  117. package/dist/next/client/hooks/useEntity.d.ts +1 -1
  118. package/dist/next/server/cusActions.d.mts +39 -2
  119. package/dist/next/server/cusActions.d.ts +39 -2
  120. package/dist/sdk/index.d.mts +33 -3
  121. package/dist/sdk/index.d.ts +33 -3
  122. package/dist/sdk/index.js +1 -0
  123. package/dist/sdk/index.mjs +1 -1
  124. package/package.json +1 -1
  125. package/dist/libraries/react/{chunk-JLY4L5PT.mjs → chunk-EMHT2HX4.mjs} +3 -3
  126. package/dist/libraries/react/{chunk-WZHPY2S7.mjs → chunk-XDTP22HE.mjs} +3 -3
@@ -1,4 +1,4 @@
1
- import { A as AttachParams, T as TrackParams, a as TrackResult, C as CancelParams, b as CancelResult, O as OpenBillingPortalParams, S as SetupPaymentParams, c as SetupPaymentResult, d as CheckoutParams } from '../clientAttachTypes-C8e1uv-S.mjs';
1
+ import { A as AttachParams, T as TrackParams, a as TrackResult, C as CancelParams, b as CancelResult, O as OpenBillingPortalParams, S as SetupPaymentParams, c as SetupPaymentResult, d as CheckoutParams } from '../clientAttachTypes-Bt2nJCCu.mjs';
2
2
  import { A as AutumnPromise } from '../response-DKQ_cb7U.mjs';
3
3
  import { B as BillingPortalResult } from '../cusTypes-Cny6ELGC.mjs';
4
4
  import '../prodTypes-HrKk7bUE.mjs';
@@ -1,4 +1,4 @@
1
- import { A as AttachParams, T as TrackParams, a as TrackResult, C as CancelParams, b as CancelResult, O as OpenBillingPortalParams, S as SetupPaymentParams, c as SetupPaymentResult, d as CheckoutParams } from '../clientAttachTypes-Ca9YkmkW.js';
1
+ import { A as AttachParams, T as TrackParams, a as TrackResult, C as CancelParams, b as CancelResult, O as OpenBillingPortalParams, S as SetupPaymentParams, c as SetupPaymentResult, d as CheckoutParams } from '../clientAttachTypes-CugoThHh.js';
2
2
  import { A as AutumnPromise } from '../response-CLgEplsF.js';
3
3
  import { B as BillingPortalResult } from '../cusTypes-DJ8I9f_a.js';
4
4
  import '../prodTypes-HrKk7bUE.js';
@@ -1,4 +1,4 @@
1
- import { A as AttachParams, f as CheckResult, T as TrackParams, a as TrackResult, C as CancelParams, b as CancelResult, S as SetupPaymentParams, c as SetupPaymentResult, O as OpenBillingPortalParams, d as CheckoutParams, e as CheckParams } from '../clientAttachTypes-C8e1uv-S.mjs';
1
+ import { A as AttachParams, f as CheckResult, T as TrackParams, a as TrackResult, C as CancelParams, b as CancelResult, S as SetupPaymentParams, c as SetupPaymentResult, O as OpenBillingPortalParams, d as CheckoutParams, e as CheckParams } from '../clientAttachTypes-Bt2nJCCu.mjs';
2
2
  import { A as AttachResult, C as CheckoutResult, a as CreateEntityParams, b as CreateReferralCodeResult, R as RedeemReferralCodeResult } from '../clientEntTypes--IF-i2B5.mjs';
3
3
  import { A as AutumnPromise, S as Success } from '../response-DKQ_cb7U.mjs';
4
4
  import { A as AutumnError } from '../error-DHbclCVh.mjs';
@@ -43,7 +43,7 @@ interface UseCustomerResult {
43
43
  * Sets up a payment method for the customer.
44
44
  * Collects payment information without immediately charging.
45
45
  */
46
- setupPayment: (params: SetupPaymentParams) => AutumnPromise<SetupPaymentResult>;
46
+ setupPayment: (params?: SetupPaymentParams) => AutumnPromise<SetupPaymentResult>;
47
47
  /**
48
48
  * Opens the Stripe billing portal for the customer.
49
49
  * Allows customers to manage their subscription and payment methods.
@@ -1,4 +1,4 @@
1
- import { A as AttachParams, f as CheckResult, T as TrackParams, a as TrackResult, C as CancelParams, b as CancelResult, S as SetupPaymentParams, c as SetupPaymentResult, O as OpenBillingPortalParams, d as CheckoutParams, e as CheckParams } from '../clientAttachTypes-Ca9YkmkW.js';
1
+ import { A as AttachParams, f as CheckResult, T as TrackParams, a as TrackResult, C as CancelParams, b as CancelResult, S as SetupPaymentParams, c as SetupPaymentResult, O as OpenBillingPortalParams, d as CheckoutParams, e as CheckParams } from '../clientAttachTypes-CugoThHh.js';
2
2
  import { A as AttachResult, C as CheckoutResult, a as CreateEntityParams, b as CreateReferralCodeResult, R as RedeemReferralCodeResult } from '../clientEntTypes-DtmpIviv.js';
3
3
  import { A as AutumnPromise, S as Success } from '../response-CLgEplsF.js';
4
4
  import { A as AutumnError } from '../error-DHbclCVh.js';
@@ -43,7 +43,7 @@ interface UseCustomerResult {
43
43
  * Sets up a payment method for the customer.
44
44
  * Collects payment information without immediately charging.
45
45
  */
46
- setupPayment: (params: SetupPaymentParams) => AutumnPromise<SetupPaymentResult>;
46
+ setupPayment: (params?: SetupPaymentParams) => AutumnPromise<SetupPaymentResult>;
47
47
  /**
48
48
  * Opens the Stripe billing portal for the customer.
49
49
  * Allows customers to manage their subscription and payment methods.
@@ -1,4 +1,4 @@
1
- import { e as CheckParams, f as CheckResult, A as AttachParams, C as CancelParams, T as TrackParams } from '../clientAttachTypes-C8e1uv-S.mjs';
1
+ import { e as CheckParams, f as CheckResult, A as AttachParams, C as CancelParams, T as TrackParams } from '../clientAttachTypes-Bt2nJCCu.mjs';
2
2
  import { A as AutumnError } from '../error-DHbclCVh.mjs';
3
3
  import { G as GetEntityParams, E as Entity } from '../entTypes-2N5YUUiP.mjs';
4
4
  import '../prodTypes-HrKk7bUE.mjs';
@@ -1,4 +1,4 @@
1
- import { e as CheckParams, f as CheckResult, A as AttachParams, C as CancelParams, T as TrackParams } from '../clientAttachTypes-Ca9YkmkW.js';
1
+ import { e as CheckParams, f as CheckResult, A as AttachParams, C as CancelParams, T as TrackParams } from '../clientAttachTypes-CugoThHh.js';
2
2
  import { A as AutumnError } from '../error-DHbclCVh.js';
3
3
  import { G as GetEntityParams, E as Entity } from '../entTypes-D04IFxc9.js';
4
4
  import '../prodTypes-HrKk7bUE.js';
@@ -162,6 +162,17 @@ type QueryResult = {
162
162
  [key: string]: number | Record<string, number>;
163
163
  }>;
164
164
  };
165
+ declare const EventsListParamsSchema: z.ZodObject<{
166
+ offset: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
167
+ limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
168
+ customer_id: z.ZodString;
169
+ feature_id: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString>]>;
170
+ custom_range: z.ZodOptional<z.ZodObject<{
171
+ start: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
172
+ end: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
173
+ }, z.core.$strip>>;
174
+ }, z.core.$strip>;
175
+ type EventsListParams = z.infer<typeof EventsListParamsSchema>;
165
176
 
166
177
  declare enum FeatureType {
167
178
  Boolean = "boolean",
@@ -258,7 +269,20 @@ declare class Autumn {
258
269
  }, AutumnError>>;
259
270
  };
260
271
  static events: {
261
- list: (params: LogParams) => Promise<Result<EventListResponse, AutumnError>>;
272
+ list: (params: EventsListParams) => Promise<Result<{
273
+ list: {
274
+ id: string;
275
+ timestamp: number;
276
+ feature_id: string;
277
+ customer_id: string;
278
+ value: number;
279
+ properties: Record<string, never>;
280
+ }[];
281
+ has_more: boolean;
282
+ offset: number;
283
+ limit: number;
284
+ total: number;
285
+ }, AutumnError>>;
262
286
  aggregate: (params: QueryParams) => Promise<Result<QueryResult, AutumnError>>;
263
287
  };
264
288
  customers: {
@@ -315,7 +339,20 @@ declare class Autumn {
315
339
  }, AutumnError>>;
316
340
  };
317
341
  events: {
318
- list: (params: LogParams) => Promise<Result<EventListResponse, AutumnError>>;
342
+ list: (params: EventsListParams) => Promise<Result<{
343
+ list: {
344
+ id: string;
345
+ timestamp: number;
346
+ feature_id: string;
347
+ customer_id: string;
348
+ value: number;
349
+ properties: Record<string, never>;
350
+ }[];
351
+ has_more: boolean;
352
+ offset: number;
353
+ limit: number;
354
+ total: number;
355
+ }, AutumnError>>;
319
356
  aggregate: (params: QueryParams) => Promise<Result<QueryResult, AutumnError>>;
320
357
  };
321
358
  /**
@@ -162,6 +162,17 @@ type QueryResult = {
162
162
  [key: string]: number | Record<string, number>;
163
163
  }>;
164
164
  };
165
+ declare const EventsListParamsSchema: z.ZodObject<{
166
+ offset: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
167
+ limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
168
+ customer_id: z.ZodString;
169
+ feature_id: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString>]>;
170
+ custom_range: z.ZodOptional<z.ZodObject<{
171
+ start: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
172
+ end: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
173
+ }, z.core.$strip>>;
174
+ }, z.core.$strip>;
175
+ type EventsListParams = z.infer<typeof EventsListParamsSchema>;
165
176
 
166
177
  declare enum FeatureType {
167
178
  Boolean = "boolean",
@@ -258,7 +269,20 @@ declare class Autumn {
258
269
  }, AutumnError>>;
259
270
  };
260
271
  static events: {
261
- list: (params: LogParams) => Promise<Result<EventListResponse, AutumnError>>;
272
+ list: (params: EventsListParams) => Promise<Result<{
273
+ list: {
274
+ id: string;
275
+ timestamp: number;
276
+ feature_id: string;
277
+ customer_id: string;
278
+ value: number;
279
+ properties: Record<string, never>;
280
+ }[];
281
+ has_more: boolean;
282
+ offset: number;
283
+ limit: number;
284
+ total: number;
285
+ }, AutumnError>>;
262
286
  aggregate: (params: QueryParams) => Promise<Result<QueryResult, AutumnError>>;
263
287
  };
264
288
  customers: {
@@ -315,7 +339,20 @@ declare class Autumn {
315
339
  }, AutumnError>>;
316
340
  };
317
341
  events: {
318
- list: (params: LogParams) => Promise<Result<EventListResponse, AutumnError>>;
342
+ list: (params: EventsListParams) => Promise<Result<{
343
+ list: {
344
+ id: string;
345
+ timestamp: number;
346
+ feature_id: string;
347
+ customer_id: string;
348
+ value: number;
349
+ properties: Record<string, never>;
350
+ }[];
351
+ has_more: boolean;
352
+ offset: number;
353
+ limit: number;
354
+ total: number;
355
+ }, AutumnError>>;
319
356
  aggregate: (params: QueryParams) => Promise<Result<QueryResult, AutumnError>>;
320
357
  };
321
358
  /**
@@ -517,6 +517,10 @@ declare const QueryRangeEnum: z.ZodEnum<{
517
517
  "1bc": "1bc";
518
518
  "3bc": "3bc";
519
519
  }>;
520
+ declare const BinSizeEnum: z.ZodEnum<{
521
+ day: "day";
522
+ hour: "hour";
523
+ }>;
520
524
  declare const QueryParamsSchema: z.ZodObject<{
521
525
  customer_id: z.ZodString;
522
526
  feature_id: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString>]>;
@@ -715,7 +719,20 @@ declare class Autumn {
715
719
  }, AutumnError>>;
716
720
  };
717
721
  static events: {
718
- list: (params: LogParams) => Promise<Result<EventListResponse, AutumnError>>;
722
+ list: (params: EventsListParams) => Promise<Result<{
723
+ list: {
724
+ id: string;
725
+ timestamp: number;
726
+ feature_id: string;
727
+ customer_id: string;
728
+ value: number;
729
+ properties: Record<string, never>;
730
+ }[];
731
+ has_more: boolean;
732
+ offset: number;
733
+ limit: number;
734
+ total: number;
735
+ }, AutumnError>>;
719
736
  aggregate: (params: QueryParams) => Promise<Result<QueryResult, AutumnError>>;
720
737
  };
721
738
  customers: {
@@ -772,7 +789,20 @@ declare class Autumn {
772
789
  }, AutumnError>>;
773
790
  };
774
791
  events: {
775
- list: (params: LogParams) => Promise<Result<EventListResponse, AutumnError>>;
792
+ list: (params: EventsListParams) => Promise<Result<{
793
+ list: {
794
+ id: string;
795
+ timestamp: number;
796
+ feature_id: string;
797
+ customer_id: string;
798
+ value: number;
799
+ properties: Record<string, never>;
800
+ }[];
801
+ has_more: boolean;
802
+ offset: number;
803
+ limit: number;
804
+ total: number;
805
+ }, AutumnError>>;
776
806
  aggregate: (params: QueryParams) => Promise<Result<QueryResult, AutumnError>>;
777
807
  };
778
808
  /**
@@ -1103,4 +1133,4 @@ interface RedeemReferralCodeResult {
1103
1133
  };
1104
1134
  }
1105
1135
 
1106
- export { AppEnv, type AttachFeatureOptions, AttachFeatureOptionsSchema, type AttachParams, AttachParamsSchema, type AttachResult, AttachResultSchema, Autumn, AutumnError, type AutumnErrorWithStatus, type AutumnPromise, type BillingPortalParams, BillingPortalParamsSchema, type BillingPortalResult, type CancelParams, CancelParamsSchema, type CancelResult, CancelResultSchema, type CheckFeaturePreview, type CheckFeatureResult, CheckFeatureResultSchema, type CheckFeatureScenario, type CheckParams, CheckParamsSchema, type CheckProductPreview, type CheckProductResult, type CheckResult, type CheckoutParams, CheckoutParamsSchema, type CheckoutResult, CoreCusFeatureSchema, type CoreCustomerFeature, type CreateCustomerParams, CreateCustomerParamsSchema, type CreateEntityParams, type CreateEntityResult, type CreateProductParams, type CreateReferralCodeParams, CreateReferralCodeParamsSchema, type CreateReferralCodeResult, type Customer, type CustomerData, CustomerDataSchema, CustomerExpandEnum, type CustomerExpandOption, type CustomerFeature, type CustomerInvoice, type CustomerProduct, type CustomerReferral, type DeleteCustomerParams, DeleteCustomerParamsSchema, type DeleteEntityResult, type DeleteProductParams, type Entity, type EntityData, EntityDataSchema, type EntityExpandOption, type ErrorResponse, type EventsListItem, EventsListItemSchema, type EventsListParams, EventsListParamsSchema, type EventsListResponse, EventsListResponseSchema, type Feature$1 as Feature, FeatureSchema, type FreeTrial, FreeTrialDuration, type GetCustomerParams, type GetEntityParams, type GetPricingTableParams, Infinite, type ListCustomersParams, ListCustomersParamsSchema, type ListProductsParams, type PriceTier, type PricingTableProduct, type Product, type ProductItem, ProductItemInterval, type ProductItemIntervalType, type ProductScenario, ProductStatus, type QueryParams, QueryParamsSchema, QueryRangeEnum, type QueryResult, type RedeemReferralCodeParams, RedeemReferralCodeParamsSchema, type RedeemReferralCodeResult, type SetupPaymentParams, type SetupPaymentResult, type TrackParams, TrackParamsSchema, type TrackResult, TrackResultSchema, type TransferProductParams, TransferProductParamsSchema, type TransferProductResult, type UpdateBalancesParams, UpdateBalancesParamsSchema, type UpdateBalancesResult, type UpdateCustomerParams, UsageModel, type UsageModelType, type UsageParams, type UsageResult, fetchPricingTable, toContainerResult };
1136
+ export { AppEnv, type AttachFeatureOptions, AttachFeatureOptionsSchema, type AttachParams, AttachParamsSchema, type AttachResult, AttachResultSchema, Autumn, AutumnError, type AutumnErrorWithStatus, type AutumnPromise, type BillingPortalParams, BillingPortalParamsSchema, type BillingPortalResult, BinSizeEnum, type CancelParams, CancelParamsSchema, type CancelResult, CancelResultSchema, type CheckFeaturePreview, type CheckFeatureResult, CheckFeatureResultSchema, type CheckFeatureScenario, type CheckParams, CheckParamsSchema, type CheckProductPreview, type CheckProductResult, type CheckResult, type CheckoutParams, CheckoutParamsSchema, type CheckoutResult, CoreCusFeatureSchema, type CoreCustomerFeature, type CreateCustomerParams, CreateCustomerParamsSchema, type CreateEntityParams, type CreateEntityResult, type CreateProductParams, type CreateReferralCodeParams, CreateReferralCodeParamsSchema, type CreateReferralCodeResult, type Customer, type CustomerData, CustomerDataSchema, CustomerExpandEnum, type CustomerExpandOption, type CustomerFeature, type CustomerInvoice, type CustomerProduct, type CustomerReferral, type DeleteCustomerParams, DeleteCustomerParamsSchema, type DeleteEntityResult, type DeleteProductParams, type Entity, type EntityData, EntityDataSchema, type EntityExpandOption, type ErrorResponse, type EventsListItem, EventsListItemSchema, type EventsListParams, EventsListParamsSchema, type EventsListResponse, EventsListResponseSchema, type Feature$1 as Feature, FeatureSchema, type FreeTrial, FreeTrialDuration, type GetCustomerParams, type GetEntityParams, type GetPricingTableParams, Infinite, type ListCustomersParams, ListCustomersParamsSchema, type ListProductsParams, type PriceTier, type PricingTableProduct, type Product, type ProductItem, ProductItemInterval, type ProductItemIntervalType, type ProductScenario, ProductStatus, type QueryParams, QueryParamsSchema, QueryRangeEnum, type QueryResult, type RedeemReferralCodeParams, RedeemReferralCodeParamsSchema, type RedeemReferralCodeResult, type SetupPaymentParams, type SetupPaymentResult, type TrackParams, TrackParamsSchema, type TrackResult, TrackResultSchema, type TransferProductParams, TransferProductParamsSchema, type TransferProductResult, type UpdateBalancesParams, UpdateBalancesParamsSchema, type UpdateBalancesResult, type UpdateCustomerParams, UsageModel, type UsageModelType, type UsageParams, type UsageResult, fetchPricingTable, toContainerResult };
@@ -517,6 +517,10 @@ declare const QueryRangeEnum: z.ZodEnum<{
517
517
  "1bc": "1bc";
518
518
  "3bc": "3bc";
519
519
  }>;
520
+ declare const BinSizeEnum: z.ZodEnum<{
521
+ day: "day";
522
+ hour: "hour";
523
+ }>;
520
524
  declare const QueryParamsSchema: z.ZodObject<{
521
525
  customer_id: z.ZodString;
522
526
  feature_id: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString>]>;
@@ -715,7 +719,20 @@ declare class Autumn {
715
719
  }, AutumnError>>;
716
720
  };
717
721
  static events: {
718
- list: (params: LogParams) => Promise<Result<EventListResponse, AutumnError>>;
722
+ list: (params: EventsListParams) => Promise<Result<{
723
+ list: {
724
+ id: string;
725
+ timestamp: number;
726
+ feature_id: string;
727
+ customer_id: string;
728
+ value: number;
729
+ properties: Record<string, never>;
730
+ }[];
731
+ has_more: boolean;
732
+ offset: number;
733
+ limit: number;
734
+ total: number;
735
+ }, AutumnError>>;
719
736
  aggregate: (params: QueryParams) => Promise<Result<QueryResult, AutumnError>>;
720
737
  };
721
738
  customers: {
@@ -772,7 +789,20 @@ declare class Autumn {
772
789
  }, AutumnError>>;
773
790
  };
774
791
  events: {
775
- list: (params: LogParams) => Promise<Result<EventListResponse, AutumnError>>;
792
+ list: (params: EventsListParams) => Promise<Result<{
793
+ list: {
794
+ id: string;
795
+ timestamp: number;
796
+ feature_id: string;
797
+ customer_id: string;
798
+ value: number;
799
+ properties: Record<string, never>;
800
+ }[];
801
+ has_more: boolean;
802
+ offset: number;
803
+ limit: number;
804
+ total: number;
805
+ }, AutumnError>>;
776
806
  aggregate: (params: QueryParams) => Promise<Result<QueryResult, AutumnError>>;
777
807
  };
778
808
  /**
@@ -1103,4 +1133,4 @@ interface RedeemReferralCodeResult {
1103
1133
  };
1104
1134
  }
1105
1135
 
1106
- export { AppEnv, type AttachFeatureOptions, AttachFeatureOptionsSchema, type AttachParams, AttachParamsSchema, type AttachResult, AttachResultSchema, Autumn, AutumnError, type AutumnErrorWithStatus, type AutumnPromise, type BillingPortalParams, BillingPortalParamsSchema, type BillingPortalResult, type CancelParams, CancelParamsSchema, type CancelResult, CancelResultSchema, type CheckFeaturePreview, type CheckFeatureResult, CheckFeatureResultSchema, type CheckFeatureScenario, type CheckParams, CheckParamsSchema, type CheckProductPreview, type CheckProductResult, type CheckResult, type CheckoutParams, CheckoutParamsSchema, type CheckoutResult, CoreCusFeatureSchema, type CoreCustomerFeature, type CreateCustomerParams, CreateCustomerParamsSchema, type CreateEntityParams, type CreateEntityResult, type CreateProductParams, type CreateReferralCodeParams, CreateReferralCodeParamsSchema, type CreateReferralCodeResult, type Customer, type CustomerData, CustomerDataSchema, CustomerExpandEnum, type CustomerExpandOption, type CustomerFeature, type CustomerInvoice, type CustomerProduct, type CustomerReferral, type DeleteCustomerParams, DeleteCustomerParamsSchema, type DeleteEntityResult, type DeleteProductParams, type Entity, type EntityData, EntityDataSchema, type EntityExpandOption, type ErrorResponse, type EventsListItem, EventsListItemSchema, type EventsListParams, EventsListParamsSchema, type EventsListResponse, EventsListResponseSchema, type Feature$1 as Feature, FeatureSchema, type FreeTrial, FreeTrialDuration, type GetCustomerParams, type GetEntityParams, type GetPricingTableParams, Infinite, type ListCustomersParams, ListCustomersParamsSchema, type ListProductsParams, type PriceTier, type PricingTableProduct, type Product, type ProductItem, ProductItemInterval, type ProductItemIntervalType, type ProductScenario, ProductStatus, type QueryParams, QueryParamsSchema, QueryRangeEnum, type QueryResult, type RedeemReferralCodeParams, RedeemReferralCodeParamsSchema, type RedeemReferralCodeResult, type SetupPaymentParams, type SetupPaymentResult, type TrackParams, TrackParamsSchema, type TrackResult, TrackResultSchema, type TransferProductParams, TransferProductParamsSchema, type TransferProductResult, type UpdateBalancesParams, UpdateBalancesParamsSchema, type UpdateBalancesResult, type UpdateCustomerParams, UsageModel, type UsageModelType, type UsageParams, type UsageResult, fetchPricingTable, toContainerResult };
1136
+ export { AppEnv, type AttachFeatureOptions, AttachFeatureOptionsSchema, type AttachParams, AttachParamsSchema, type AttachResult, AttachResultSchema, Autumn, AutumnError, type AutumnErrorWithStatus, type AutumnPromise, type BillingPortalParams, BillingPortalParamsSchema, type BillingPortalResult, BinSizeEnum, type CancelParams, CancelParamsSchema, type CancelResult, CancelResultSchema, type CheckFeaturePreview, type CheckFeatureResult, CheckFeatureResultSchema, type CheckFeatureScenario, type CheckParams, CheckParamsSchema, type CheckProductPreview, type CheckProductResult, type CheckResult, type CheckoutParams, CheckoutParamsSchema, type CheckoutResult, CoreCusFeatureSchema, type CoreCustomerFeature, type CreateCustomerParams, CreateCustomerParamsSchema, type CreateEntityParams, type CreateEntityResult, type CreateProductParams, type CreateReferralCodeParams, CreateReferralCodeParamsSchema, type CreateReferralCodeResult, type Customer, type CustomerData, CustomerDataSchema, CustomerExpandEnum, type CustomerExpandOption, type CustomerFeature, type CustomerInvoice, type CustomerProduct, type CustomerReferral, type DeleteCustomerParams, DeleteCustomerParamsSchema, type DeleteEntityResult, type DeleteProductParams, type Entity, type EntityData, EntityDataSchema, type EntityExpandOption, type ErrorResponse, type EventsListItem, EventsListItemSchema, type EventsListParams, EventsListParamsSchema, type EventsListResponse, EventsListResponseSchema, type Feature$1 as Feature, FeatureSchema, type FreeTrial, FreeTrialDuration, type GetCustomerParams, type GetEntityParams, type GetPricingTableParams, Infinite, type ListCustomersParams, ListCustomersParamsSchema, type ListProductsParams, type PriceTier, type PricingTableProduct, type Product, type ProductItem, ProductItemInterval, type ProductItemIntervalType, type ProductScenario, ProductStatus, type QueryParams, QueryParamsSchema, QueryRangeEnum, type QueryResult, type RedeemReferralCodeParams, RedeemReferralCodeParamsSchema, type RedeemReferralCodeResult, type SetupPaymentParams, type SetupPaymentResult, type TrackParams, TrackParamsSchema, type TrackResult, TrackResultSchema, type TransferProductParams, TransferProductParamsSchema, type TransferProductResult, type UpdateBalancesParams, UpdateBalancesParamsSchema, type UpdateBalancesResult, type UpdateCustomerParams, UsageModel, type UsageModelType, type UsageParams, type UsageResult, fetchPricingTable, toContainerResult };
package/dist/sdk/index.js CHANGED
@@ -1078,6 +1078,7 @@ exports.AttachResultSchema = AttachResultSchema;
1078
1078
  exports.Autumn = Autumn;
1079
1079
  exports.AutumnError = AutumnError;
1080
1080
  exports.BillingPortalParamsSchema = BillingPortalParamsSchema;
1081
+ exports.BinSizeEnum = BinSizeEnum;
1081
1082
  exports.CancelParamsSchema = CancelParamsSchema;
1082
1083
  exports.CancelResultSchema = CancelResultSchema;
1083
1084
  exports.CheckFeatureResultSchema = CheckFeatureResultSchema;
@@ -1065,4 +1065,4 @@ var RedeemReferralCodeParamsSchema = z.object({
1065
1065
  customer_id: z.string()
1066
1066
  });
1067
1067
 
1068
- export { AppEnv, AttachFeatureOptionsSchema, AttachParamsSchema, AttachResultSchema, Autumn, AutumnError, BillingPortalParamsSchema, CancelParamsSchema, CancelResultSchema, CheckFeatureResultSchema, CheckParamsSchema, CheckoutParamsSchema, CoreCusFeatureSchema, CreateCustomerParamsSchema, CreateReferralCodeParamsSchema, CustomerDataSchema, CustomerExpandEnum, DeleteCustomerParamsSchema, EntityDataSchema, EventsListItemSchema, EventsListParamsSchema, EventsListResponseSchema, FeatureSchema, FreeTrialDuration, Infinite, ListCustomersParamsSchema, ProductItemInterval, ProductStatus, QueryParamsSchema, QueryRangeEnum, RedeemReferralCodeParamsSchema, TrackParamsSchema, TrackResultSchema, TransferProductParamsSchema, UpdateBalancesParamsSchema, UsageModel, fetchPricingTable, toContainerResult };
1068
+ export { AppEnv, AttachFeatureOptionsSchema, AttachParamsSchema, AttachResultSchema, Autumn, AutumnError, BillingPortalParamsSchema, BinSizeEnum, CancelParamsSchema, CancelResultSchema, CheckFeatureResultSchema, CheckParamsSchema, CheckoutParamsSchema, CoreCusFeatureSchema, CreateCustomerParamsSchema, CreateReferralCodeParamsSchema, CustomerDataSchema, CustomerExpandEnum, DeleteCustomerParamsSchema, EntityDataSchema, EventsListItemSchema, EventsListParamsSchema, EventsListResponseSchema, FeatureSchema, FreeTrialDuration, Infinite, ListCustomersParamsSchema, ProductItemInterval, ProductStatus, QueryParamsSchema, QueryRangeEnum, RedeemReferralCodeParamsSchema, TrackParamsSchema, TrackResultSchema, TransferProductParamsSchema, UpdateBalancesParamsSchema, UsageModel, fetchPricingTable, toContainerResult };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "autumn-js",
3
3
  "description": "Autumn JS Library",
4
- "version": "0.1.58",
4
+ "version": "0.1.60",
5
5
  "repository": "github:useautumn/autumn-js",
6
6
  "homepage": "https://docs.useautumn.com",
7
7
  "main": "./dist/sdk/index.js",
@@ -1,8 +1,5 @@
1
1
  "use client";
2
2
 
3
- import {
4
- X
5
- } from "./chunk-2ZZJUGBO.mjs";
6
3
  import {
7
4
  Combination_default,
8
5
  DismissableLayer,
@@ -11,6 +8,9 @@ import {
11
8
  hideOthers,
12
9
  useFocusGuards
13
10
  } from "./chunk-MJF25D7E.mjs";
11
+ import {
12
+ X
13
+ } from "./chunk-2ZZJUGBO.mjs";
14
14
  import {
15
15
  Presence,
16
16
  useId
@@ -9,13 +9,13 @@ import {
9
9
  useCallbackRef,
10
10
  useFocusGuards
11
11
  } from "./chunk-MJF25D7E.mjs";
12
+ import {
13
+ useSize
14
+ } from "./chunk-6I5DGTWH.mjs";
12
15
  import {
13
16
  Presence,
14
17
  useId
15
18
  } from "./chunk-36POY2CM.mjs";
16
- import {
17
- useSize
18
- } from "./chunk-6I5DGTWH.mjs";
19
19
  import {
20
20
  Primitive,
21
21
  composeEventHandlers,