autumn-js 1.2.31 → 1.2.32

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 (116) hide show
  1. package/dist/backend/adapters/express.js +16 -1
  2. package/dist/backend/adapters/express.mjs +6 -6
  3. package/dist/backend/adapters/fetch.js +16 -1
  4. package/dist/backend/adapters/fetch.mjs +6 -6
  5. package/dist/backend/adapters/hono.js +16 -1
  6. package/dist/backend/adapters/hono.mjs +6 -6
  7. package/dist/backend/adapters/index.js +16 -1
  8. package/dist/backend/adapters/index.mjs +9 -9
  9. package/dist/backend/adapters/next.js +16 -1
  10. package/dist/backend/adapters/next.mjs +6 -6
  11. package/dist/backend/{chunk-JMSAO3QS.mjs → chunk-5QIIBIZY.mjs} +2 -2
  12. package/dist/backend/{chunk-6BIFNQMZ.mjs → chunk-7MPQ5TCH.mjs} +2 -2
  13. package/dist/backend/{chunk-Z3FKN2NF.mjs → chunk-AYS6GLVO.mjs} +1 -1
  14. package/dist/backend/{chunk-QA6NTMCY.mjs → chunk-MXD3NPQK.mjs} +1 -1
  15. package/dist/backend/{chunk-NYLHQ6KR.mjs → chunk-NSAJNDTG.mjs} +1 -1
  16. package/dist/backend/{chunk-N72VCQNK.mjs → chunk-UYURZ75E.mjs} +1 -0
  17. package/dist/backend/{chunk-HF6Z42J6.mjs → chunk-W7MG3LB3.mjs} +1 -1
  18. package/dist/backend/{chunk-JD72L3WP.mjs → chunk-Z7WSDAEZ.mjs} +15 -1
  19. package/dist/backend/core/handlers/coreHandler.d.mts +1 -1
  20. package/dist/backend/core/handlers/coreHandler.d.ts +1 -1
  21. package/dist/backend/core/handlers/coreHandler.js +16 -1
  22. package/dist/backend/core/handlers/coreHandler.mjs +4 -4
  23. package/dist/backend/core/handlers/executeRoute.d.mts +1 -1
  24. package/dist/backend/core/handlers/executeRoute.d.ts +1 -1
  25. package/dist/backend/core/handlers/executeRoute.mjs +1 -1
  26. package/dist/backend/core/handlers/handleRouteByName.js +16 -1
  27. package/dist/backend/core/handlers/handleRouteByName.mjs +4 -4
  28. package/dist/backend/core/handlers/index.d.mts +1 -1
  29. package/dist/backend/core/handlers/index.d.ts +1 -1
  30. package/dist/backend/core/handlers/index.js +16 -1
  31. package/dist/backend/core/handlers/index.mjs +5 -5
  32. package/dist/backend/core/index.d.mts +1 -1
  33. package/dist/backend/core/index.d.ts +1 -1
  34. package/dist/backend/core/index.js +16 -1
  35. package/dist/backend/core/index.mjs +7 -7
  36. package/dist/backend/core/routes/index.d.mts +1 -1
  37. package/dist/backend/core/routes/index.d.ts +1 -1
  38. package/dist/backend/core/routes/index.js +1 -0
  39. package/dist/backend/core/routes/index.mjs +2 -2
  40. package/dist/backend/core/routes/routeBuilder.d.mts +1 -1
  41. package/dist/backend/core/routes/routeBuilder.d.ts +1 -1
  42. package/dist/backend/core/routes/routeConfigs.d.mts +1 -1
  43. package/dist/backend/core/routes/routeConfigs.d.ts +1 -1
  44. package/dist/backend/core/routes/routeConfigs.js +1 -0
  45. package/dist/backend/core/routes/routeConfigs.mjs +2 -2
  46. package/dist/backend/core/types/handlerTypes.d.mts +1 -1
  47. package/dist/backend/core/types/handlerTypes.d.ts +1 -1
  48. package/dist/backend/core/types/index.d.mts +1 -1
  49. package/dist/backend/core/types/index.d.ts +1 -1
  50. package/dist/backend/core/types/routeTypes.d.mts +1 -1
  51. package/dist/backend/core/types/routeTypes.d.ts +1 -1
  52. package/dist/backend/core/utils/index.mjs +3 -3
  53. package/dist/backend/index.d.mts +2 -2
  54. package/dist/backend/index.d.ts +2 -2
  55. package/dist/backend/index.js +16 -1
  56. package/dist/backend/index.mjs +7 -7
  57. package/dist/backend/{routeTypes-DVB8MoV9.d.ts → routeTypes-ChCnBnee.d.ts} +59 -1
  58. package/dist/backend/{routeTypes-DxmM-KwZ.d.mts → routeTypes-DmFnGvb2.d.mts} +59 -1
  59. package/dist/better-auth/{chunk-R3YUB555.mjs → chunk-56VTK4JS.mjs} +1 -1
  60. package/dist/better-auth/{chunk-633AUR7J.mjs → chunk-JBU3OM2O.mjs} +16 -2
  61. package/dist/better-auth/{chunk-UOQDNCD2.mjs → chunk-ZQA6B5RX.mjs} +1 -0
  62. package/dist/better-auth/index.js +16 -1
  63. package/dist/better-auth/index.mjs +3 -3
  64. package/dist/better-auth/utils/createAutumnEndpoint.js +1 -0
  65. package/dist/better-auth/utils/createAutumnEndpoint.mjs +2 -2
  66. package/dist/better-auth/utils/handleBetterAuthRoute.js +16 -1
  67. package/dist/better-auth/utils/handleBetterAuthRoute.mjs +2 -2
  68. package/dist/better-auth/utils/index.js +16 -1
  69. package/dist/better-auth/utils/index.mjs +3 -3
  70. package/dist/react/AutumnContext.d.mts +3 -3
  71. package/dist/react/AutumnContext.d.ts +3 -3
  72. package/dist/react/client/AutumnClient.d.mts +3 -3
  73. package/dist/react/client/AutumnClient.d.ts +3 -3
  74. package/dist/react/client/IAutumnClient.d.mts +9 -3
  75. package/dist/react/client/IAutumnClient.d.ts +9 -3
  76. package/dist/react/client/index.d.mts +3 -3
  77. package/dist/react/client/index.d.ts +3 -3
  78. package/dist/react/{customer-DjiQ6w1e.d.mts → customer-B9DcViyn.d.mts} +1 -1
  79. package/dist/react/{customer-BbU458Gc.d.ts → customer-DbS31iZc.d.ts} +1 -1
  80. package/dist/react/hooks/index.d.mts +3 -3
  81. package/dist/react/hooks/index.d.ts +3 -3
  82. package/dist/react/hooks/internal/check/balanceToAllowed.d.mts +2 -2
  83. package/dist/react/hooks/internal/check/balanceToAllowed.d.ts +2 -2
  84. package/dist/react/hooks/internal/check/customerToFeatures.d.mts +2 -2
  85. package/dist/react/hooks/internal/check/customerToFeatures.d.ts +2 -2
  86. package/dist/react/hooks/internal/check/findCreditSystemsByFeature.d.mts +2 -2
  87. package/dist/react/hooks/internal/check/findCreditSystemsByFeature.d.ts +2 -2
  88. package/dist/react/hooks/internal/check/getCreditCost.d.mts +2 -2
  89. package/dist/react/hooks/internal/check/getCreditCost.d.ts +2 -2
  90. package/dist/react/hooks/internal/getLocalCheckResponse.d.mts +3 -3
  91. package/dist/react/hooks/internal/getLocalCheckResponse.d.ts +3 -3
  92. package/dist/react/hooks/internal/useCustomerActions.d.mts +3 -3
  93. package/dist/react/hooks/internal/useCustomerActions.d.ts +3 -3
  94. package/dist/react/hooks/useAggregateEvents.d.mts +2 -2
  95. package/dist/react/hooks/useAggregateEvents.d.ts +2 -2
  96. package/dist/react/hooks/useCustomer.d.mts +3 -3
  97. package/dist/react/hooks/useCustomer.d.ts +3 -3
  98. package/dist/react/hooks/useEntity.d.mts +2 -2
  99. package/dist/react/hooks/useEntity.d.ts +2 -2
  100. package/dist/react/hooks/useListEvents.d.mts +2 -2
  101. package/dist/react/hooks/useListEvents.d.ts +2 -2
  102. package/dist/react/hooks/useListPlans.d.mts +2 -2
  103. package/dist/react/hooks/useListPlans.d.ts +2 -2
  104. package/dist/react/hooks/useReferrals.d.mts +2 -2
  105. package/dist/react/hooks/useReferrals.d.ts +2 -2
  106. package/dist/react/index.d.mts +3 -3
  107. package/dist/react/index.d.ts +3 -3
  108. package/dist/react/{params-B-8mg8Ze.d.mts → params-B8-s4Q1n.d.ts} +1 -1
  109. package/dist/react/{params-Dqm7Np9G.d.ts → params-BquS51Ut.d.mts} +1 -1
  110. package/dist/react/{plan-2RG0aPsm.d.mts → plan-BKltGb1S.d.mts} +6 -0
  111. package/dist/react/{plan-2RG0aPsm.d.ts → plan-BKltGb1S.d.ts} +6 -0
  112. package/dist/sdk/index.d.mts +68 -1
  113. package/dist/sdk/index.d.ts +68 -1
  114. package/dist/sdk/index.js +15 -1
  115. package/dist/sdk/index.mjs +15 -1
  116. package/package.json +1 -1
@@ -1991,6 +1991,10 @@ type RequestBody = {
1991
1991
  properties?: {
1992
1992
  [k: string]: any;
1993
1993
  } | undefined;
1994
+ /**
1995
+ * Unix timestamp in milliseconds to use for the usage event. Defaults to the current time.
1996
+ */
1997
+ timestamp?: number | undefined;
1994
1998
  /**
1995
1999
  * If true, enqueue the event for asynchronous processing and return 204 immediately. The response will not include balance information.
1996
2000
  */
@@ -2022,6 +2026,7 @@ type RequestBody$Outbound = {
2022
2026
  properties?: {
2023
2027
  [k: string]: any;
2024
2028
  } | undefined;
2029
+ timestamp?: number | undefined;
2025
2030
  async?: boolean | undefined;
2026
2031
  lock?: BatchTrackLock$Outbound | undefined;
2027
2032
  };
@@ -5295,6 +5300,12 @@ type Plan = {
5295
5300
  * Miscellaneous plan-level configuration flags.
5296
5301
  */
5297
5302
  config: PlanConfig;
5303
+ /**
5304
+ * Arbitrary key-value metadata defined by you for your own use. Shared across all versions of the plan.
5305
+ */
5306
+ metadata: {
5307
+ [k: string]: any;
5308
+ };
5298
5309
  customerEligibility?: CustomerEligibility | undefined;
5299
5310
  };
5300
5311
  /** @internal */
@@ -6660,6 +6671,12 @@ type CreatePlanParams = {
6660
6671
  * Miscellaneous plan-level configuration flags.
6661
6672
  */
6662
6673
  config?: CreatePlanConfigRequest | undefined;
6674
+ /**
6675
+ * Arbitrary key-value metadata defined by you for your own use (e.g. UI copy, feature highlights). Values can be any JSON-serializable value. Shared across all versions of the plan.
6676
+ */
6677
+ metadata?: {
6678
+ [k: string]: any;
6679
+ } | undefined;
6663
6680
  createInStripe?: boolean | undefined;
6664
6681
  };
6665
6682
  /**
@@ -7116,6 +7133,12 @@ type CreatePlanResponse = {
7116
7133
  * Miscellaneous plan-level configuration flags.
7117
7134
  */
7118
7135
  config: CreatePlanConfigResponse;
7136
+ /**
7137
+ * Arbitrary key-value metadata defined by you for your own use. Shared across all versions of the plan.
7138
+ */
7139
+ metadata: {
7140
+ [k: string]: any;
7141
+ };
7119
7142
  customerEligibility?: CreatePlanCustomerEligibility | undefined;
7120
7143
  };
7121
7144
  /** @internal */
@@ -7243,6 +7266,9 @@ type CreatePlanParams$Outbound = {
7243
7266
  items?: Array<CreatePlanPlanItem$Outbound> | undefined;
7244
7267
  free_trial?: FreeTrialRequest$Outbound | undefined;
7245
7268
  config?: CreatePlanConfigRequest$Outbound | undefined;
7269
+ metadata?: {
7270
+ [k: string]: any;
7271
+ } | undefined;
7246
7272
  create_in_stripe: boolean;
7247
7273
  };
7248
7274
  /** @internal */
@@ -12031,6 +12057,12 @@ type GetPlanResponse = {
12031
12057
  * Miscellaneous plan-level configuration flags.
12032
12058
  */
12033
12059
  config: GetPlanConfig;
12060
+ /**
12061
+ * Arbitrary key-value metadata defined by you for your own use. Shared across all versions of the plan.
12062
+ */
12063
+ metadata: {
12064
+ [k: string]: any;
12065
+ };
12034
12066
  customerEligibility?: GetPlanCustomerEligibility | undefined;
12035
12067
  };
12036
12068
  /** @internal */
@@ -14409,6 +14441,12 @@ type ListPlansList = {
14409
14441
  * Miscellaneous plan-level configuration flags.
14410
14442
  */
14411
14443
  config: ListPlansConfig;
14444
+ /**
14445
+ * Arbitrary key-value metadata defined by you for your own use. Shared across all versions of the plan.
14446
+ */
14447
+ metadata: {
14448
+ [k: string]: any;
14449
+ };
14412
14450
  customerEligibility?: ListPlansCustomerEligibility | undefined;
14413
14451
  };
14414
14452
  /**
@@ -21033,6 +21071,10 @@ type TrackParams = {
21033
21071
  properties?: {
21034
21072
  [k: string]: any;
21035
21073
  } | undefined;
21074
+ /**
21075
+ * Unix timestamp in milliseconds to use for the usage event. Defaults to the current time.
21076
+ */
21077
+ timestamp?: number | undefined;
21036
21078
  /**
21037
21079
  * If true, enqueue the event for asynchronous processing and return 204 immediately. The response will not include balance information.
21038
21080
  */
@@ -21233,6 +21275,7 @@ type TrackParams$Outbound = {
21233
21275
  properties?: {
21234
21276
  [k: string]: any;
21235
21277
  } | undefined;
21278
+ timestamp?: number | undefined;
21236
21279
  async?: boolean | undefined;
21237
21280
  lock?: TrackLock$Outbound | undefined;
21238
21281
  };
@@ -21325,6 +21368,10 @@ type TrackTokensParams = {
21325
21368
  properties?: {
21326
21369
  [k: string]: any;
21327
21370
  } | undefined;
21371
+ /**
21372
+ * Unix timestamp in milliseconds to use for the usage event. Defaults to the current time.
21373
+ */
21374
+ timestamp?: number | undefined;
21328
21375
  /**
21329
21376
  * If true, enqueue the event for asynchronous processing and return 204 immediately. The response will not include balance information.
21330
21377
  */
@@ -21521,6 +21568,7 @@ type TrackTokensParams$Outbound = {
21521
21568
  properties?: {
21522
21569
  [k: string]: any;
21523
21570
  } | undefined;
21571
+ timestamp?: number | undefined;
21524
21572
  async?: boolean | undefined;
21525
21573
  };
21526
21574
  /** @internal */
@@ -23920,6 +23968,12 @@ type UpdatePlanParams = {
23920
23968
  * Miscellaneous plan-level configuration flags.
23921
23969
  */
23922
23970
  config?: UpdatePlanConfigRequest | undefined;
23971
+ /**
23972
+ * Arbitrary key-value metadata defined by you for your own use (e.g. UI copy, feature highlights). Values can be any JSON-serializable value. Shared across all versions of the plan.
23973
+ */
23974
+ metadata?: {
23975
+ [k: string]: any;
23976
+ } | undefined;
23923
23977
  createInStripe?: boolean | undefined;
23924
23978
  version?: number | undefined;
23925
23979
  archived?: boolean | undefined;
@@ -24383,6 +24437,12 @@ type UpdatePlanResponse = {
24383
24437
  * Miscellaneous plan-level configuration flags.
24384
24438
  */
24385
24439
  config: UpdatePlanConfigResponse;
24440
+ /**
24441
+ * Arbitrary key-value metadata defined by you for your own use. Shared across all versions of the plan.
24442
+ */
24443
+ metadata: {
24444
+ [k: string]: any;
24445
+ };
24386
24446
  customerEligibility?: UpdatePlanCustomerEligibility | undefined;
24387
24447
  };
24388
24448
  /** @internal */
@@ -24510,6 +24570,9 @@ type UpdatePlanParams$Outbound = {
24510
24570
  items?: Array<UpdatePlanPlanItem$Outbound> | undefined;
24511
24571
  free_trial?: UpdatePlanFreeTrialParams$Outbound | null | undefined;
24512
24572
  config?: UpdatePlanConfigRequest$Outbound | undefined;
24573
+ metadata?: {
24574
+ [k: string]: any;
24575
+ } | undefined;
24513
24576
  create_in_stripe: boolean;
24514
24577
  version?: number | undefined;
24515
24578
  archived: boolean;
@@ -24844,7 +24907,7 @@ declare class Billing extends ClientSDK {
24844
24907
  * @example
24845
24908
  * ```typescript
24846
24909
  * // Schedule a transition from a trial plan to a paid plan
24847
- * const response = await client.billing.createSchedule({ customerId: "cus_123", phases: [{"startsAt":1782152693121,"plans":[{"planId":"trial_plan"}]},{"startsAt":1783362293121,"plans":[{"planId":"pro_plan"}]}] });
24910
+ * const response = await client.billing.createSchedule({ customerId: "cus_123", phases: [{"startsAt":1782402442343,"plans":[{"planId":"trial_plan"}]},{"startsAt":1783612042343,"plans":[{"planId":"pro_plan"}]}] });
24848
24911
  * ```
24849
24912
  *
24850
24913
  * @param customerId - The ID of the customer to create the schedule for.
@@ -25446,6 +25509,7 @@ declare class Plans extends ClientSDK {
25446
25509
  * @param items - Feature configurations for this plan. Each item defines included units, pricing, and reset behavior. (optional)
25447
25510
  * @param freeTrial - Free trial configuration. Customers can try this plan before being charged. (optional)
25448
25511
  * @param config - Miscellaneous plan-level configuration flags. (optional)
25512
+ * @param metadata - Arbitrary key-value metadata defined by you for your own use (e.g. UI copy, feature highlights). Values can be any JSON-serializable value. Shared across all versions of the plan. (optional)
25449
25513
  *
25450
25514
  * @returns The created plan object.
25451
25515
  */
@@ -25534,6 +25598,7 @@ declare class Plans extends ClientSDK {
25534
25598
  * @param items - Feature configurations for this plan. Each item defines included units, pricing, and reset behavior. (optional)
25535
25599
  * @param freeTrial - The free trial of the plan. Set to null to remove the free trial. (optional)
25536
25600
  * @param config - Miscellaneous plan-level configuration flags. (optional)
25601
+ * @param metadata - Arbitrary key-value metadata defined by you for your own use (e.g. UI copy, feature highlights). Values can be any JSON-serializable value. Shared across all versions of the plan. (optional)
25537
25602
  * @param newPlanId - The new ID to use for the plan. Can only be updated if the plan has not been used by any customers. (optional)
25538
25603
  *
25539
25604
  * @returns The updated plan object.
@@ -25681,6 +25746,7 @@ declare class Autumn extends ClientSDK {
25681
25746
  * @param eventName - Event name to track usage for. Use instead of feature_id when multiple features should be tracked from a single event. (optional)
25682
25747
  * @param value - The amount of usage to record. Defaults to 1. Use negative values to credit balance (e.g., when removing a seat). (optional)
25683
25748
  * @param properties - Additional properties to attach to this usage event. (optional)
25749
+ * @param timestamp - Unix timestamp in milliseconds to use for the usage event. Defaults to the current time. (optional)
25684
25750
  * @param async - If true, enqueue the event for asynchronous processing and return 204 immediately. The response will not include balance information. (optional)
25685
25751
  *
25686
25752
  * @returns The usage value recorded, with either a single updated balance or a map of updated balances. If Autumn is experiencing degraded service from a downstream provider, the API may return 202 after accepting the event for replay so it can be tracked as soon as the service is restored.
@@ -25716,6 +25782,7 @@ declare class Autumn extends ClientSDK {
25716
25782
  * @param audioOutputTokens - Number of audio output tokens generated. (optional)
25717
25783
  * @param reasoningTokens - Number of reasoning tokens generated. (optional)
25718
25784
  * @param properties - Additional properties to attach to this usage event. (optional)
25785
+ * @param timestamp - Unix timestamp in milliseconds to use for the usage event. Defaults to the current time. (optional)
25719
25786
  * @param async - If true, enqueue the event for asynchronous processing and return 204 immediately. The response will not include balance information. (optional)
25720
25787
  *
25721
25788
  * @returns The dollar value recorded and the updated AI credit system balance. If Autumn is experiencing degraded service from a downstream provider, the API may return 202 after accepting the token usage event for replay so it can be tracked as soon as the service is restored.
@@ -1991,6 +1991,10 @@ type RequestBody = {
1991
1991
  properties?: {
1992
1992
  [k: string]: any;
1993
1993
  } | undefined;
1994
+ /**
1995
+ * Unix timestamp in milliseconds to use for the usage event. Defaults to the current time.
1996
+ */
1997
+ timestamp?: number | undefined;
1994
1998
  /**
1995
1999
  * If true, enqueue the event for asynchronous processing and return 204 immediately. The response will not include balance information.
1996
2000
  */
@@ -2022,6 +2026,7 @@ type RequestBody$Outbound = {
2022
2026
  properties?: {
2023
2027
  [k: string]: any;
2024
2028
  } | undefined;
2029
+ timestamp?: number | undefined;
2025
2030
  async?: boolean | undefined;
2026
2031
  lock?: BatchTrackLock$Outbound | undefined;
2027
2032
  };
@@ -5295,6 +5300,12 @@ type Plan = {
5295
5300
  * Miscellaneous plan-level configuration flags.
5296
5301
  */
5297
5302
  config: PlanConfig;
5303
+ /**
5304
+ * Arbitrary key-value metadata defined by you for your own use. Shared across all versions of the plan.
5305
+ */
5306
+ metadata: {
5307
+ [k: string]: any;
5308
+ };
5298
5309
  customerEligibility?: CustomerEligibility | undefined;
5299
5310
  };
5300
5311
  /** @internal */
@@ -6660,6 +6671,12 @@ type CreatePlanParams = {
6660
6671
  * Miscellaneous plan-level configuration flags.
6661
6672
  */
6662
6673
  config?: CreatePlanConfigRequest | undefined;
6674
+ /**
6675
+ * Arbitrary key-value metadata defined by you for your own use (e.g. UI copy, feature highlights). Values can be any JSON-serializable value. Shared across all versions of the plan.
6676
+ */
6677
+ metadata?: {
6678
+ [k: string]: any;
6679
+ } | undefined;
6663
6680
  createInStripe?: boolean | undefined;
6664
6681
  };
6665
6682
  /**
@@ -7116,6 +7133,12 @@ type CreatePlanResponse = {
7116
7133
  * Miscellaneous plan-level configuration flags.
7117
7134
  */
7118
7135
  config: CreatePlanConfigResponse;
7136
+ /**
7137
+ * Arbitrary key-value metadata defined by you for your own use. Shared across all versions of the plan.
7138
+ */
7139
+ metadata: {
7140
+ [k: string]: any;
7141
+ };
7119
7142
  customerEligibility?: CreatePlanCustomerEligibility | undefined;
7120
7143
  };
7121
7144
  /** @internal */
@@ -7243,6 +7266,9 @@ type CreatePlanParams$Outbound = {
7243
7266
  items?: Array<CreatePlanPlanItem$Outbound> | undefined;
7244
7267
  free_trial?: FreeTrialRequest$Outbound | undefined;
7245
7268
  config?: CreatePlanConfigRequest$Outbound | undefined;
7269
+ metadata?: {
7270
+ [k: string]: any;
7271
+ } | undefined;
7246
7272
  create_in_stripe: boolean;
7247
7273
  };
7248
7274
  /** @internal */
@@ -12031,6 +12057,12 @@ type GetPlanResponse = {
12031
12057
  * Miscellaneous plan-level configuration flags.
12032
12058
  */
12033
12059
  config: GetPlanConfig;
12060
+ /**
12061
+ * Arbitrary key-value metadata defined by you for your own use. Shared across all versions of the plan.
12062
+ */
12063
+ metadata: {
12064
+ [k: string]: any;
12065
+ };
12034
12066
  customerEligibility?: GetPlanCustomerEligibility | undefined;
12035
12067
  };
12036
12068
  /** @internal */
@@ -14409,6 +14441,12 @@ type ListPlansList = {
14409
14441
  * Miscellaneous plan-level configuration flags.
14410
14442
  */
14411
14443
  config: ListPlansConfig;
14444
+ /**
14445
+ * Arbitrary key-value metadata defined by you for your own use. Shared across all versions of the plan.
14446
+ */
14447
+ metadata: {
14448
+ [k: string]: any;
14449
+ };
14412
14450
  customerEligibility?: ListPlansCustomerEligibility | undefined;
14413
14451
  };
14414
14452
  /**
@@ -21033,6 +21071,10 @@ type TrackParams = {
21033
21071
  properties?: {
21034
21072
  [k: string]: any;
21035
21073
  } | undefined;
21074
+ /**
21075
+ * Unix timestamp in milliseconds to use for the usage event. Defaults to the current time.
21076
+ */
21077
+ timestamp?: number | undefined;
21036
21078
  /**
21037
21079
  * If true, enqueue the event for asynchronous processing and return 204 immediately. The response will not include balance information.
21038
21080
  */
@@ -21233,6 +21275,7 @@ type TrackParams$Outbound = {
21233
21275
  properties?: {
21234
21276
  [k: string]: any;
21235
21277
  } | undefined;
21278
+ timestamp?: number | undefined;
21236
21279
  async?: boolean | undefined;
21237
21280
  lock?: TrackLock$Outbound | undefined;
21238
21281
  };
@@ -21325,6 +21368,10 @@ type TrackTokensParams = {
21325
21368
  properties?: {
21326
21369
  [k: string]: any;
21327
21370
  } | undefined;
21371
+ /**
21372
+ * Unix timestamp in milliseconds to use for the usage event. Defaults to the current time.
21373
+ */
21374
+ timestamp?: number | undefined;
21328
21375
  /**
21329
21376
  * If true, enqueue the event for asynchronous processing and return 204 immediately. The response will not include balance information.
21330
21377
  */
@@ -21521,6 +21568,7 @@ type TrackTokensParams$Outbound = {
21521
21568
  properties?: {
21522
21569
  [k: string]: any;
21523
21570
  } | undefined;
21571
+ timestamp?: number | undefined;
21524
21572
  async?: boolean | undefined;
21525
21573
  };
21526
21574
  /** @internal */
@@ -23920,6 +23968,12 @@ type UpdatePlanParams = {
23920
23968
  * Miscellaneous plan-level configuration flags.
23921
23969
  */
23922
23970
  config?: UpdatePlanConfigRequest | undefined;
23971
+ /**
23972
+ * Arbitrary key-value metadata defined by you for your own use (e.g. UI copy, feature highlights). Values can be any JSON-serializable value. Shared across all versions of the plan.
23973
+ */
23974
+ metadata?: {
23975
+ [k: string]: any;
23976
+ } | undefined;
23923
23977
  createInStripe?: boolean | undefined;
23924
23978
  version?: number | undefined;
23925
23979
  archived?: boolean | undefined;
@@ -24383,6 +24437,12 @@ type UpdatePlanResponse = {
24383
24437
  * Miscellaneous plan-level configuration flags.
24384
24438
  */
24385
24439
  config: UpdatePlanConfigResponse;
24440
+ /**
24441
+ * Arbitrary key-value metadata defined by you for your own use. Shared across all versions of the plan.
24442
+ */
24443
+ metadata: {
24444
+ [k: string]: any;
24445
+ };
24386
24446
  customerEligibility?: UpdatePlanCustomerEligibility | undefined;
24387
24447
  };
24388
24448
  /** @internal */
@@ -24510,6 +24570,9 @@ type UpdatePlanParams$Outbound = {
24510
24570
  items?: Array<UpdatePlanPlanItem$Outbound> | undefined;
24511
24571
  free_trial?: UpdatePlanFreeTrialParams$Outbound | null | undefined;
24512
24572
  config?: UpdatePlanConfigRequest$Outbound | undefined;
24573
+ metadata?: {
24574
+ [k: string]: any;
24575
+ } | undefined;
24513
24576
  create_in_stripe: boolean;
24514
24577
  version?: number | undefined;
24515
24578
  archived: boolean;
@@ -24844,7 +24907,7 @@ declare class Billing extends ClientSDK {
24844
24907
  * @example
24845
24908
  * ```typescript
24846
24909
  * // Schedule a transition from a trial plan to a paid plan
24847
- * const response = await client.billing.createSchedule({ customerId: "cus_123", phases: [{"startsAt":1782152693121,"plans":[{"planId":"trial_plan"}]},{"startsAt":1783362293121,"plans":[{"planId":"pro_plan"}]}] });
24910
+ * const response = await client.billing.createSchedule({ customerId: "cus_123", phases: [{"startsAt":1782402442343,"plans":[{"planId":"trial_plan"}]},{"startsAt":1783612042343,"plans":[{"planId":"pro_plan"}]}] });
24848
24911
  * ```
24849
24912
  *
24850
24913
  * @param customerId - The ID of the customer to create the schedule for.
@@ -25446,6 +25509,7 @@ declare class Plans extends ClientSDK {
25446
25509
  * @param items - Feature configurations for this plan. Each item defines included units, pricing, and reset behavior. (optional)
25447
25510
  * @param freeTrial - Free trial configuration. Customers can try this plan before being charged. (optional)
25448
25511
  * @param config - Miscellaneous plan-level configuration flags. (optional)
25512
+ * @param metadata - Arbitrary key-value metadata defined by you for your own use (e.g. UI copy, feature highlights). Values can be any JSON-serializable value. Shared across all versions of the plan. (optional)
25449
25513
  *
25450
25514
  * @returns The created plan object.
25451
25515
  */
@@ -25534,6 +25598,7 @@ declare class Plans extends ClientSDK {
25534
25598
  * @param items - Feature configurations for this plan. Each item defines included units, pricing, and reset behavior. (optional)
25535
25599
  * @param freeTrial - The free trial of the plan. Set to null to remove the free trial. (optional)
25536
25600
  * @param config - Miscellaneous plan-level configuration flags. (optional)
25601
+ * @param metadata - Arbitrary key-value metadata defined by you for your own use (e.g. UI copy, feature highlights). Values can be any JSON-serializable value. Shared across all versions of the plan. (optional)
25537
25602
  * @param newPlanId - The new ID to use for the plan. Can only be updated if the plan has not been used by any customers. (optional)
25538
25603
  *
25539
25604
  * @returns The updated plan object.
@@ -25681,6 +25746,7 @@ declare class Autumn extends ClientSDK {
25681
25746
  * @param eventName - Event name to track usage for. Use instead of feature_id when multiple features should be tracked from a single event. (optional)
25682
25747
  * @param value - The amount of usage to record. Defaults to 1. Use negative values to credit balance (e.g., when removing a seat). (optional)
25683
25748
  * @param properties - Additional properties to attach to this usage event. (optional)
25749
+ * @param timestamp - Unix timestamp in milliseconds to use for the usage event. Defaults to the current time. (optional)
25684
25750
  * @param async - If true, enqueue the event for asynchronous processing and return 204 immediately. The response will not include balance information. (optional)
25685
25751
  *
25686
25752
  * @returns The usage value recorded, with either a single updated balance or a map of updated balances. If Autumn is experiencing degraded service from a downstream provider, the API may return 202 after accepting the event for replay so it can be tracked as soon as the service is restored.
@@ -25716,6 +25782,7 @@ declare class Autumn extends ClientSDK {
25716
25782
  * @param audioOutputTokens - Number of audio output tokens generated. (optional)
25717
25783
  * @param reasoningTokens - Number of reasoning tokens generated. (optional)
25718
25784
  * @param properties - Additional properties to attach to this usage event. (optional)
25785
+ * @param timestamp - Unix timestamp in milliseconds to use for the usage event. Defaults to the current time. (optional)
25719
25786
  * @param async - If true, enqueue the event for asynchronous processing and return 204 immediately. The response will not include balance information. (optional)
25720
25787
  *
25721
25788
  * @returns The dollar value recorded and the updated AI credit system balance. If Autumn is experiencing degraded service from a downstream provider, the API may return 202 after accepting the token usage event for replay so it can be tracked as soon as the service is restored.
package/dist/sdk/index.js CHANGED
@@ -2485,6 +2485,7 @@ var RequestBody$outboundSchema = z46__namespace.pipe(
2485
2485
  eventName: z46__namespace.optional(z46__namespace.string()),
2486
2486
  value: z46__namespace.optional(z46__namespace.number()),
2487
2487
  properties: z46__namespace.optional(z46__namespace.record(z46__namespace.string(), z46__namespace.any())),
2488
+ timestamp: z46__namespace.optional(z46__namespace.int()),
2488
2489
  async: z46__namespace.optional(z46__namespace.boolean()),
2489
2490
  lock: z46__namespace.optional(z46__namespace.lazy(() => BatchTrackLock$outboundSchema))
2490
2491
  }),
@@ -4947,6 +4948,7 @@ var Plan$inboundSchema = z46__namespace.pipe(
4947
4948
  archived: boolean2(),
4948
4949
  base_variant_id: nullable(string4()),
4949
4950
  config: z46__namespace.lazy(() => PlanConfig$inboundSchema),
4951
+ metadata: z46__namespace.record(z46__namespace.string(), z46__namespace.any()),
4950
4952
  customer_eligibility: optional3(z46__namespace.lazy(
4951
4953
  () => CustomerEligibility$inboundSchema
4952
4954
  ))
@@ -6101,6 +6103,7 @@ var CreatePlanParams$outboundSchema = z46__namespace.pipe(
6101
6103
  items: z46__namespace.optional(z46__namespace.array(z46__namespace.lazy(() => CreatePlanPlanItem$outboundSchema))),
6102
6104
  freeTrial: z46__namespace.optional(z46__namespace.lazy(() => FreeTrialRequest$outboundSchema)),
6103
6105
  config: z46__namespace.optional(z46__namespace.lazy(() => CreatePlanConfigRequest$outboundSchema)),
6106
+ metadata: z46__namespace.optional(z46__namespace.record(z46__namespace.string(), z46__namespace.any())),
6104
6107
  createInStripe: z46__namespace._default(z46__namespace.boolean(), true)
6105
6108
  }),
6106
6109
  z46__namespace.transform((v) => {
@@ -6450,6 +6453,7 @@ var CreatePlanResponse$inboundSchema = z46__namespace.pipe(
6450
6453
  archived: boolean2(),
6451
6454
  base_variant_id: nullable(string4()),
6452
6455
  config: z46__namespace.lazy(() => CreatePlanConfigResponse$inboundSchema),
6456
+ metadata: z46__namespace.record(z46__namespace.string(), z46__namespace.any()),
6453
6457
  customer_eligibility: optional3(
6454
6458
  z46__namespace.lazy(() => CreatePlanCustomerEligibility$inboundSchema)
6455
6459
  )
@@ -10155,6 +10159,7 @@ var GetPlanResponse$inboundSchema = z46__namespace.pipe(
10155
10159
  archived: boolean2(),
10156
10160
  base_variant_id: nullable(string4()),
10157
10161
  config: z46__namespace.lazy(() => GetPlanConfig$inboundSchema),
10162
+ metadata: z46__namespace.record(z46__namespace.string(), z46__namespace.any()),
10158
10163
  customer_eligibility: optional3(
10159
10164
  z46__namespace.lazy(() => GetPlanCustomerEligibility$inboundSchema)
10160
10165
  )
@@ -12119,6 +12124,7 @@ var ListPlansList$inboundSchema = z46__namespace.pipe(
12119
12124
  archived: boolean2(),
12120
12125
  base_variant_id: nullable(string4()),
12121
12126
  config: z46__namespace.lazy(() => ListPlansConfig$inboundSchema),
12127
+ metadata: z46__namespace.record(z46__namespace.string(), z46__namespace.any()),
12122
12128
  customer_eligibility: optional3(
12123
12129
  z46__namespace.lazy(() => ListPlansCustomerEligibility$inboundSchema)
12124
12130
  )
@@ -16843,6 +16849,7 @@ var TrackParams$outboundSchema = z46__namespace.pipe(
16843
16849
  eventName: z46__namespace.optional(z46__namespace.string()),
16844
16850
  value: z46__namespace.optional(z46__namespace.number()),
16845
16851
  properties: z46__namespace.optional(z46__namespace.record(z46__namespace.string(), z46__namespace.any())),
16852
+ timestamp: z46__namespace.optional(z46__namespace.int()),
16846
16853
  async: z46__namespace.optional(z46__namespace.boolean()),
16847
16854
  lock: z46__namespace.optional(z46__namespace.lazy(() => TrackLock$outboundSchema))
16848
16855
  }),
@@ -17067,6 +17074,7 @@ var TrackTokensParams$outboundSchema = z46__namespace.pipe(
17067
17074
  audioOutputTokens: z46__namespace.optional(z46__namespace.int()),
17068
17075
  reasoningTokens: z46__namespace.optional(z46__namespace.int()),
17069
17076
  properties: z46__namespace.optional(z46__namespace.record(z46__namespace.string(), z46__namespace.any())),
17077
+ timestamp: z46__namespace.optional(z46__namespace.int()),
17070
17078
  async: z46__namespace.optional(z46__namespace.boolean())
17071
17079
  }),
17072
17080
  z46__namespace.transform((v) => {
@@ -19239,6 +19247,7 @@ var UpdatePlanParams$outboundSchema = z46__namespace.pipe(
19239
19247
  z46__namespace.nullable(z46__namespace.lazy(() => UpdatePlanFreeTrialParams$outboundSchema))
19240
19248
  ),
19241
19249
  config: z46__namespace.optional(z46__namespace.lazy(() => UpdatePlanConfigRequest$outboundSchema)),
19250
+ metadata: z46__namespace.optional(z46__namespace.record(z46__namespace.string(), z46__namespace.any())),
19242
19251
  createInStripe: z46__namespace._default(z46__namespace.boolean(), true),
19243
19252
  version: z46__namespace.optional(z46__namespace.number()),
19244
19253
  archived: z46__namespace._default(z46__namespace.boolean(), false),
@@ -19592,6 +19601,7 @@ var UpdatePlanResponse$inboundSchema = z46__namespace.pipe(
19592
19601
  archived: boolean2(),
19593
19602
  base_variant_id: nullable(string4()),
19594
19603
  config: z46__namespace.lazy(() => UpdatePlanConfigResponse$inboundSchema),
19604
+ metadata: z46__namespace.record(z46__namespace.string(), z46__namespace.any()),
19595
19605
  customer_eligibility: optional3(
19596
19606
  z46__namespace.lazy(() => UpdatePlanCustomerEligibility$inboundSchema)
19597
19607
  )
@@ -21651,7 +21661,7 @@ var Billing = class extends ClientSDK {
21651
21661
  * @example
21652
21662
  * ```typescript
21653
21663
  * // Schedule a transition from a trial plan to a paid plan
21654
- * const response = await client.billing.createSchedule({ customerId: "cus_123", phases: [{"startsAt":1782152693121,"plans":[{"planId":"trial_plan"}]},{"startsAt":1783362293121,"plans":[{"planId":"pro_plan"}]}] });
21664
+ * const response = await client.billing.createSchedule({ customerId: "cus_123", phases: [{"startsAt":1782402442343,"plans":[{"planId":"trial_plan"}]},{"startsAt":1783612042343,"plans":[{"planId":"pro_plan"}]}] });
21655
21665
  * ```
21656
21666
  *
21657
21667
  * @param customerId - The ID of the customer to create the schedule for.
@@ -24283,6 +24293,7 @@ var Plans = class extends ClientSDK {
24283
24293
  * @param items - Feature configurations for this plan. Each item defines included units, pricing, and reset behavior. (optional)
24284
24294
  * @param freeTrial - Free trial configuration. Customers can try this plan before being charged. (optional)
24285
24295
  * @param config - Miscellaneous plan-level configuration flags. (optional)
24296
+ * @param metadata - Arbitrary key-value metadata defined by you for your own use (e.g. UI copy, feature highlights). Values can be any JSON-serializable value. Shared across all versions of the plan. (optional)
24286
24297
  *
24287
24298
  * @returns The created plan object.
24288
24299
  */
@@ -24389,6 +24400,7 @@ var Plans = class extends ClientSDK {
24389
24400
  * @param items - Feature configurations for this plan. Each item defines included units, pricing, and reset behavior. (optional)
24390
24401
  * @param freeTrial - The free trial of the plan. Set to null to remove the free trial. (optional)
24391
24402
  * @param config - Miscellaneous plan-level configuration flags. (optional)
24403
+ * @param metadata - Arbitrary key-value metadata defined by you for your own use (e.g. UI copy, feature highlights). Values can be any JSON-serializable value. Shared across all versions of the plan. (optional)
24392
24404
  * @param newPlanId - The new ID to use for the plan. Can only be updated if the plan has not been used by any customers. (optional)
24393
24405
  *
24394
24406
  * @returns The updated plan object.
@@ -25069,6 +25081,7 @@ var Autumn = class extends ClientSDK {
25069
25081
  * @param eventName - Event name to track usage for. Use instead of feature_id when multiple features should be tracked from a single event. (optional)
25070
25082
  * @param value - The amount of usage to record. Defaults to 1. Use negative values to credit balance (e.g., when removing a seat). (optional)
25071
25083
  * @param properties - Additional properties to attach to this usage event. (optional)
25084
+ * @param timestamp - Unix timestamp in milliseconds to use for the usage event. Defaults to the current time. (optional)
25072
25085
  * @param async - If true, enqueue the event for asynchronous processing and return 204 immediately. The response will not include balance information. (optional)
25073
25086
  *
25074
25087
  * @returns The usage value recorded, with either a single updated balance or a map of updated balances. If Autumn is experiencing degraded service from a downstream provider, the API may return 202 after accepting the event for replay so it can be tracked as soon as the service is restored.
@@ -25110,6 +25123,7 @@ var Autumn = class extends ClientSDK {
25110
25123
  * @param audioOutputTokens - Number of audio output tokens generated. (optional)
25111
25124
  * @param reasoningTokens - Number of reasoning tokens generated. (optional)
25112
25125
  * @param properties - Additional properties to attach to this usage event. (optional)
25126
+ * @param timestamp - Unix timestamp in milliseconds to use for the usage event. Defaults to the current time. (optional)
25113
25127
  * @param async - If true, enqueue the event for asynchronous processing and return 204 immediately. The response will not include balance information. (optional)
25114
25128
  *
25115
25129
  * @returns The dollar value recorded and the updated AI credit system balance. If Autumn is experiencing degraded service from a downstream provider, the API may return 202 after accepting the token usage event for replay so it can be tracked as soon as the service is restored.
@@ -2462,6 +2462,7 @@ var RequestBody$outboundSchema = z46.pipe(
2462
2462
  eventName: z46.optional(z46.string()),
2463
2463
  value: z46.optional(z46.number()),
2464
2464
  properties: z46.optional(z46.record(z46.string(), z46.any())),
2465
+ timestamp: z46.optional(z46.int()),
2465
2466
  async: z46.optional(z46.boolean()),
2466
2467
  lock: z46.optional(z46.lazy(() => BatchTrackLock$outboundSchema))
2467
2468
  }),
@@ -4924,6 +4925,7 @@ var Plan$inboundSchema = z46.pipe(
4924
4925
  archived: boolean2(),
4925
4926
  base_variant_id: nullable(string4()),
4926
4927
  config: z46.lazy(() => PlanConfig$inboundSchema),
4928
+ metadata: z46.record(z46.string(), z46.any()),
4927
4929
  customer_eligibility: optional3(z46.lazy(
4928
4930
  () => CustomerEligibility$inboundSchema
4929
4931
  ))
@@ -6078,6 +6080,7 @@ var CreatePlanParams$outboundSchema = z46.pipe(
6078
6080
  items: z46.optional(z46.array(z46.lazy(() => CreatePlanPlanItem$outboundSchema))),
6079
6081
  freeTrial: z46.optional(z46.lazy(() => FreeTrialRequest$outboundSchema)),
6080
6082
  config: z46.optional(z46.lazy(() => CreatePlanConfigRequest$outboundSchema)),
6083
+ metadata: z46.optional(z46.record(z46.string(), z46.any())),
6081
6084
  createInStripe: z46._default(z46.boolean(), true)
6082
6085
  }),
6083
6086
  z46.transform((v) => {
@@ -6427,6 +6430,7 @@ var CreatePlanResponse$inboundSchema = z46.pipe(
6427
6430
  archived: boolean2(),
6428
6431
  base_variant_id: nullable(string4()),
6429
6432
  config: z46.lazy(() => CreatePlanConfigResponse$inboundSchema),
6433
+ metadata: z46.record(z46.string(), z46.any()),
6430
6434
  customer_eligibility: optional3(
6431
6435
  z46.lazy(() => CreatePlanCustomerEligibility$inboundSchema)
6432
6436
  )
@@ -10132,6 +10136,7 @@ var GetPlanResponse$inboundSchema = z46.pipe(
10132
10136
  archived: boolean2(),
10133
10137
  base_variant_id: nullable(string4()),
10134
10138
  config: z46.lazy(() => GetPlanConfig$inboundSchema),
10139
+ metadata: z46.record(z46.string(), z46.any()),
10135
10140
  customer_eligibility: optional3(
10136
10141
  z46.lazy(() => GetPlanCustomerEligibility$inboundSchema)
10137
10142
  )
@@ -12096,6 +12101,7 @@ var ListPlansList$inboundSchema = z46.pipe(
12096
12101
  archived: boolean2(),
12097
12102
  base_variant_id: nullable(string4()),
12098
12103
  config: z46.lazy(() => ListPlansConfig$inboundSchema),
12104
+ metadata: z46.record(z46.string(), z46.any()),
12099
12105
  customer_eligibility: optional3(
12100
12106
  z46.lazy(() => ListPlansCustomerEligibility$inboundSchema)
12101
12107
  )
@@ -16820,6 +16826,7 @@ var TrackParams$outboundSchema = z46.pipe(
16820
16826
  eventName: z46.optional(z46.string()),
16821
16827
  value: z46.optional(z46.number()),
16822
16828
  properties: z46.optional(z46.record(z46.string(), z46.any())),
16829
+ timestamp: z46.optional(z46.int()),
16823
16830
  async: z46.optional(z46.boolean()),
16824
16831
  lock: z46.optional(z46.lazy(() => TrackLock$outboundSchema))
16825
16832
  }),
@@ -17044,6 +17051,7 @@ var TrackTokensParams$outboundSchema = z46.pipe(
17044
17051
  audioOutputTokens: z46.optional(z46.int()),
17045
17052
  reasoningTokens: z46.optional(z46.int()),
17046
17053
  properties: z46.optional(z46.record(z46.string(), z46.any())),
17054
+ timestamp: z46.optional(z46.int()),
17047
17055
  async: z46.optional(z46.boolean())
17048
17056
  }),
17049
17057
  z46.transform((v) => {
@@ -19216,6 +19224,7 @@ var UpdatePlanParams$outboundSchema = z46.pipe(
19216
19224
  z46.nullable(z46.lazy(() => UpdatePlanFreeTrialParams$outboundSchema))
19217
19225
  ),
19218
19226
  config: z46.optional(z46.lazy(() => UpdatePlanConfigRequest$outboundSchema)),
19227
+ metadata: z46.optional(z46.record(z46.string(), z46.any())),
19219
19228
  createInStripe: z46._default(z46.boolean(), true),
19220
19229
  version: z46.optional(z46.number()),
19221
19230
  archived: z46._default(z46.boolean(), false),
@@ -19569,6 +19578,7 @@ var UpdatePlanResponse$inboundSchema = z46.pipe(
19569
19578
  archived: boolean2(),
19570
19579
  base_variant_id: nullable(string4()),
19571
19580
  config: z46.lazy(() => UpdatePlanConfigResponse$inboundSchema),
19581
+ metadata: z46.record(z46.string(), z46.any()),
19572
19582
  customer_eligibility: optional3(
19573
19583
  z46.lazy(() => UpdatePlanCustomerEligibility$inboundSchema)
19574
19584
  )
@@ -21628,7 +21638,7 @@ var Billing = class extends ClientSDK {
21628
21638
  * @example
21629
21639
  * ```typescript
21630
21640
  * // Schedule a transition from a trial plan to a paid plan
21631
- * const response = await client.billing.createSchedule({ customerId: "cus_123", phases: [{"startsAt":1782152693121,"plans":[{"planId":"trial_plan"}]},{"startsAt":1783362293121,"plans":[{"planId":"pro_plan"}]}] });
21641
+ * const response = await client.billing.createSchedule({ customerId: "cus_123", phases: [{"startsAt":1782402442343,"plans":[{"planId":"trial_plan"}]},{"startsAt":1783612042343,"plans":[{"planId":"pro_plan"}]}] });
21632
21642
  * ```
21633
21643
  *
21634
21644
  * @param customerId - The ID of the customer to create the schedule for.
@@ -24260,6 +24270,7 @@ var Plans = class extends ClientSDK {
24260
24270
  * @param items - Feature configurations for this plan. Each item defines included units, pricing, and reset behavior. (optional)
24261
24271
  * @param freeTrial - Free trial configuration. Customers can try this plan before being charged. (optional)
24262
24272
  * @param config - Miscellaneous plan-level configuration flags. (optional)
24273
+ * @param metadata - Arbitrary key-value metadata defined by you for your own use (e.g. UI copy, feature highlights). Values can be any JSON-serializable value. Shared across all versions of the plan. (optional)
24263
24274
  *
24264
24275
  * @returns The created plan object.
24265
24276
  */
@@ -24366,6 +24377,7 @@ var Plans = class extends ClientSDK {
24366
24377
  * @param items - Feature configurations for this plan. Each item defines included units, pricing, and reset behavior. (optional)
24367
24378
  * @param freeTrial - The free trial of the plan. Set to null to remove the free trial. (optional)
24368
24379
  * @param config - Miscellaneous plan-level configuration flags. (optional)
24380
+ * @param metadata - Arbitrary key-value metadata defined by you for your own use (e.g. UI copy, feature highlights). Values can be any JSON-serializable value. Shared across all versions of the plan. (optional)
24369
24381
  * @param newPlanId - The new ID to use for the plan. Can only be updated if the plan has not been used by any customers. (optional)
24370
24382
  *
24371
24383
  * @returns The updated plan object.
@@ -25046,6 +25058,7 @@ var Autumn = class extends ClientSDK {
25046
25058
  * @param eventName - Event name to track usage for. Use instead of feature_id when multiple features should be tracked from a single event. (optional)
25047
25059
  * @param value - The amount of usage to record. Defaults to 1. Use negative values to credit balance (e.g., when removing a seat). (optional)
25048
25060
  * @param properties - Additional properties to attach to this usage event. (optional)
25061
+ * @param timestamp - Unix timestamp in milliseconds to use for the usage event. Defaults to the current time. (optional)
25049
25062
  * @param async - If true, enqueue the event for asynchronous processing and return 204 immediately. The response will not include balance information. (optional)
25050
25063
  *
25051
25064
  * @returns The usage value recorded, with either a single updated balance or a map of updated balances. If Autumn is experiencing degraded service from a downstream provider, the API may return 202 after accepting the event for replay so it can be tracked as soon as the service is restored.
@@ -25087,6 +25100,7 @@ var Autumn = class extends ClientSDK {
25087
25100
  * @param audioOutputTokens - Number of audio output tokens generated. (optional)
25088
25101
  * @param reasoningTokens - Number of reasoning tokens generated. (optional)
25089
25102
  * @param properties - Additional properties to attach to this usage event. (optional)
25103
+ * @param timestamp - Unix timestamp in milliseconds to use for the usage event. Defaults to the current time. (optional)
25090
25104
  * @param async - If true, enqueue the event for asynchronous processing and return 204 immediately. The response will not include balance information. (optional)
25091
25105
  *
25092
25106
  * @returns The dollar value recorded and the updated AI credit system balance. If Autumn is experiencing degraded service from a downstream provider, the API may return 202 after accepting the token usage event for replay so it can be tracked as soon as the service is restored.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "autumn-js",
3
3
  "description": "Autumn JS Library",
4
- "version": "1.2.31",
4
+ "version": "1.2.32",
5
5
  "repository": "github:useautumn/autumn",
6
6
  "homepage": "https://docs.useautumn.com",
7
7
  "main": "./dist/sdk/index.js",