autumn-js 1.2.29 → 1.2.30
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/backend/adapters/express.js +97 -11
- package/dist/backend/adapters/express.mjs +9 -9
- package/dist/backend/adapters/fetch.js +97 -11
- package/dist/backend/adapters/fetch.mjs +9 -9
- package/dist/backend/adapters/hono.js +97 -11
- package/dist/backend/adapters/hono.mjs +9 -9
- package/dist/backend/adapters/index.js +97 -11
- package/dist/backend/adapters/index.mjs +12 -12
- package/dist/backend/adapters/next.js +97 -11
- package/dist/backend/adapters/next.mjs +9 -9
- package/dist/backend/{chunk-4UL3TTQH.mjs → chunk-4D5WTA37.mjs} +1 -1
- package/dist/backend/{chunk-PA2SVXPZ.mjs → chunk-6H7JNSG4.mjs} +69 -7
- package/dist/backend/{chunk-43AWNK4F.mjs → chunk-ECIOGEDC.mjs} +1 -1
- package/dist/backend/{chunk-XCPTPX5N.mjs → chunk-ILWBT65Y.mjs} +1 -1
- package/dist/backend/{chunk-NTY5YJIP.mjs → chunk-MWZDYRO7.mjs} +5 -5
- package/dist/backend/{chunk-ZMYKADPC.mjs → chunk-N72VCQNK.mjs} +28 -4
- package/dist/backend/{chunk-Q3C6NI3F.mjs → chunk-TSMOAEQZ.mjs} +1 -1
- package/dist/backend/{chunk-L4H3DDRD.mjs → chunk-X3DVYZOC.mjs} +7 -7
- package/dist/backend/core/handlers/coreHandler.d.mts +1 -1
- package/dist/backend/core/handlers/coreHandler.d.ts +1 -1
- package/dist/backend/core/handlers/coreHandler.js +97 -11
- package/dist/backend/core/handlers/coreHandler.mjs +7 -7
- package/dist/backend/core/handlers/executeRoute.d.mts +1 -1
- package/dist/backend/core/handlers/executeRoute.d.ts +1 -1
- package/dist/backend/core/handlers/executeRoute.mjs +4 -4
- package/dist/backend/core/handlers/handleRouteByName.js +97 -11
- package/dist/backend/core/handlers/handleRouteByName.mjs +7 -7
- package/dist/backend/core/handlers/index.d.mts +1 -1
- package/dist/backend/core/handlers/index.d.ts +1 -1
- package/dist/backend/core/handlers/index.js +97 -11
- package/dist/backend/core/handlers/index.mjs +10 -10
- package/dist/backend/core/index.d.mts +1 -1
- package/dist/backend/core/index.d.ts +1 -1
- package/dist/backend/core/index.js +97 -11
- package/dist/backend/core/index.mjs +10 -10
- package/dist/backend/core/routes/index.d.mts +1 -1
- package/dist/backend/core/routes/index.d.ts +1 -1
- package/dist/backend/core/routes/index.js +28 -4
- package/dist/backend/core/routes/index.mjs +2 -2
- package/dist/backend/core/routes/routeBuilder.d.mts +1 -1
- package/dist/backend/core/routes/routeBuilder.d.ts +1 -1
- package/dist/backend/core/routes/routeConfigs.d.mts +1 -1
- package/dist/backend/core/routes/routeConfigs.d.ts +1 -1
- package/dist/backend/core/routes/routeConfigs.js +28 -4
- package/dist/backend/core/routes/routeConfigs.mjs +2 -2
- package/dist/backend/core/types/handlerTypes.d.mts +1 -1
- package/dist/backend/core/types/handlerTypes.d.ts +1 -1
- package/dist/backend/core/types/index.d.mts +1 -1
- package/dist/backend/core/types/index.d.ts +1 -1
- package/dist/backend/core/types/routeTypes.d.mts +1 -1
- package/dist/backend/core/types/routeTypes.d.ts +1 -1
- package/dist/backend/core/utils/index.mjs +3 -3
- package/dist/backend/index.d.mts +2 -2
- package/dist/backend/index.d.ts +2 -2
- package/dist/backend/index.js +97 -11
- package/dist/backend/index.mjs +10 -10
- package/dist/backend/{routeTypes-CHBZpc7P.d.ts → routeTypes-BZffsFMg.d.ts} +89 -6
- package/dist/backend/{routeTypes-Dyixv9y9.d.mts → routeTypes-CtouWF41.d.mts} +89 -6
- package/dist/better-auth/{chunk-PUZS3JJ5.mjs → chunk-NHHBDYNA.mjs} +70 -8
- package/dist/better-auth/{chunk-JN6NZZNR.mjs → chunk-R3YUB555.mjs} +1 -1
- package/dist/better-auth/{chunk-EBJECIYH.mjs → chunk-UOQDNCD2.mjs} +28 -4
- package/dist/better-auth/index.js +97 -11
- package/dist/better-auth/index.mjs +3 -3
- package/dist/better-auth/utils/createAutumnEndpoint.js +28 -4
- package/dist/better-auth/utils/createAutumnEndpoint.mjs +2 -2
- package/dist/better-auth/utils/handleBetterAuthRoute.js +97 -11
- package/dist/better-auth/utils/handleBetterAuthRoute.mjs +2 -2
- package/dist/better-auth/utils/index.js +97 -11
- package/dist/better-auth/utils/index.mjs +3 -3
- package/dist/react/AutumnContext.d.mts +1 -1
- package/dist/react/AutumnContext.d.ts +1 -1
- package/dist/react/client/AutumnClient.d.mts +1 -1
- package/dist/react/client/AutumnClient.d.ts +1 -1
- package/dist/react/client/IAutumnClient.d.mts +1 -1
- package/dist/react/client/IAutumnClient.d.ts +1 -1
- package/dist/react/client/index.d.mts +1 -1
- package/dist/react/client/index.d.ts +1 -1
- package/dist/react/hooks/index.d.mts +1 -1
- package/dist/react/hooks/index.d.ts +1 -1
- package/dist/react/hooks/internal/getLocalCheckResponse.d.mts +1 -1
- package/dist/react/hooks/internal/getLocalCheckResponse.d.ts +1 -1
- package/dist/react/hooks/internal/useCustomerActions.d.mts +1 -1
- package/dist/react/hooks/internal/useCustomerActions.d.ts +1 -1
- package/dist/react/hooks/useAggregateEvents.d.mts +1 -1
- package/dist/react/hooks/useAggregateEvents.d.ts +1 -1
- package/dist/react/hooks/useCustomer.d.mts +1 -1
- package/dist/react/hooks/useCustomer.d.ts +1 -1
- package/dist/react/hooks/useEntity.d.mts +1 -1
- package/dist/react/hooks/useEntity.d.ts +1 -1
- package/dist/react/hooks/useListEvents.d.mts +1 -1
- package/dist/react/hooks/useListEvents.d.ts +1 -1
- package/dist/react/hooks/useListPlans.d.mts +1 -1
- package/dist/react/hooks/useListPlans.d.ts +1 -1
- package/dist/react/hooks/useReferrals.d.mts +1 -1
- package/dist/react/hooks/useReferrals.d.ts +1 -1
- package/dist/react/index.d.mts +1 -1
- package/dist/react/index.d.ts +1 -1
- package/dist/react/{params-LJh-duAf.d.mts → params-B-8mg8Ze.d.mts} +42 -0
- package/dist/react/{params-DiohUULB.d.ts → params-Dqm7Np9G.d.ts} +42 -0
- package/dist/sdk/index.d.mts +133 -8
- package/dist/sdk/index.d.ts +133 -8
- package/dist/sdk/index.js +99 -7
- package/dist/sdk/index.mjs +90 -8
- package/package.json +1 -1
- package/dist/backend/{chunk-MOHYGUMA.mjs → chunk-IXUCY7AU.mjs} +3 -3
|
@@ -1911,6 +1911,7 @@ var AttachParams$outboundSchema = z10.pipe(
|
|
|
1911
1911
|
startsAt: z10.optional(z10.int()),
|
|
1912
1912
|
endsAt: z10.optional(z10.int()),
|
|
1913
1913
|
checkoutSessionParams: z10.optional(z10.record(z10.string(), z10.any())),
|
|
1914
|
+
longLivedCheckout: z10.optional(z10.boolean()),
|
|
1914
1915
|
customLineItems: z10.optional(
|
|
1915
1916
|
z10.array(z10.lazy(() => AttachCustomLineItem$outboundSchema))
|
|
1916
1917
|
),
|
|
@@ -1943,6 +1944,7 @@ var AttachParams$outboundSchema = z10.pipe(
|
|
|
1943
1944
|
startsAt: "starts_at",
|
|
1944
1945
|
endsAt: "ends_at",
|
|
1945
1946
|
checkoutSessionParams: "checkout_session_params",
|
|
1947
|
+
longLivedCheckout: "long_lived_checkout",
|
|
1946
1948
|
customLineItems: "custom_line_items",
|
|
1947
1949
|
processorSubscriptionId: "processor_subscription_id",
|
|
1948
1950
|
carryOverBalances: "carry_over_balances",
|
|
@@ -2718,6 +2720,17 @@ var BillingUpdateCancelAction$outboundSchema = z13.enum(BillingUpdateCancelActio
|
|
|
2718
2720
|
var BillingUpdateRecalculateBalances$outboundSchema = z13.object({
|
|
2719
2721
|
enabled: z13.boolean()
|
|
2720
2722
|
});
|
|
2723
|
+
var BillingUpdateCarryOverUsages$outboundSchema = z13.pipe(
|
|
2724
|
+
z13.object({
|
|
2725
|
+
enabled: z13.boolean(),
|
|
2726
|
+
featureIds: z13.optional(z13.array(z13.string()))
|
|
2727
|
+
}),
|
|
2728
|
+
z13.transform((v) => {
|
|
2729
|
+
return remap(v, {
|
|
2730
|
+
featureIds: "feature_ids"
|
|
2731
|
+
});
|
|
2732
|
+
})
|
|
2733
|
+
);
|
|
2721
2734
|
var UpdateSubscriptionParams$outboundSchema = z13.pipe(
|
|
2722
2735
|
z13.object({
|
|
2723
2736
|
customerId: z13.string(),
|
|
@@ -2747,6 +2760,9 @@ var UpdateSubscriptionParams$outboundSchema = z13.pipe(
|
|
|
2747
2760
|
noBillingChanges: z13.optional(z13.boolean()),
|
|
2748
2761
|
recalculateBalances: z13.optional(
|
|
2749
2762
|
z13.lazy(() => BillingUpdateRecalculateBalances$outboundSchema)
|
|
2763
|
+
),
|
|
2764
|
+
carryOverUsages: z13.optional(
|
|
2765
|
+
z13.lazy(() => BillingUpdateCarryOverUsages$outboundSchema)
|
|
2750
2766
|
)
|
|
2751
2767
|
}),
|
|
2752
2768
|
z13.transform((v) => {
|
|
@@ -2762,7 +2778,8 @@ var UpdateSubscriptionParams$outboundSchema = z13.pipe(
|
|
|
2762
2778
|
cancelAction: "cancel_action",
|
|
2763
2779
|
billingCycleAnchor: "billing_cycle_anchor",
|
|
2764
2780
|
noBillingChanges: "no_billing_changes",
|
|
2765
|
-
recalculateBalances: "recalculate_balances"
|
|
2781
|
+
recalculateBalances: "recalculate_balances",
|
|
2782
|
+
carryOverUsages: "carry_over_usages"
|
|
2766
2783
|
});
|
|
2767
2784
|
})
|
|
2768
2785
|
);
|
|
@@ -3613,6 +3630,7 @@ var CreateBalanceParams$outboundSchema = z15.pipe(
|
|
|
3613
3630
|
reset: z15.optional(z15.lazy(() => CreateBalanceReset$outboundSchema)),
|
|
3614
3631
|
rollover: z15.optional(z15.lazy(() => CreateBalanceRollover$outboundSchema)),
|
|
3615
3632
|
expiresAt: z15.optional(z15.number()),
|
|
3633
|
+
nextResetAt: z15.optional(z15.number()),
|
|
3616
3634
|
balanceId: z15.optional(z15.string())
|
|
3617
3635
|
}),
|
|
3618
3636
|
z15.transform((v) => {
|
|
@@ -3622,6 +3640,7 @@ var CreateBalanceParams$outboundSchema = z15.pipe(
|
|
|
3622
3640
|
entityId: "entity_id",
|
|
3623
3641
|
includedGrant: "included_grant",
|
|
3624
3642
|
expiresAt: "expires_at",
|
|
3643
|
+
nextResetAt: "next_reset_at",
|
|
3625
3644
|
balanceId: "balance_id"
|
|
3626
3645
|
});
|
|
3627
3646
|
})
|
|
@@ -5277,6 +5296,10 @@ var BillingBehavior = {
|
|
|
5277
5296
|
ProrateImmediately: "prorate_immediately",
|
|
5278
5297
|
None: "none"
|
|
5279
5298
|
};
|
|
5299
|
+
var CreateScheduleDurationType2 = {
|
|
5300
|
+
Month: "month",
|
|
5301
|
+
Year: "year"
|
|
5302
|
+
};
|
|
5280
5303
|
var CreateSchedulePriceInterval2 = {
|
|
5281
5304
|
OneOff: "one_off",
|
|
5282
5305
|
Week: "week",
|
|
@@ -5435,6 +5458,20 @@ var CreateScheduleAttachDiscount$outboundSchema = z22.pipe(
|
|
|
5435
5458
|
);
|
|
5436
5459
|
var CreateScheduleRedirectMode$outboundSchema = z22.enum(CreateScheduleRedirectMode);
|
|
5437
5460
|
var BillingBehavior$outboundSchema = z22.enum(BillingBehavior);
|
|
5461
|
+
var StartsAt2$outboundSchema = smartUnion([z22.number(), z22.string()]);
|
|
5462
|
+
var CreateScheduleDurationType2$outboundSchema = z22.enum(CreateScheduleDurationType2);
|
|
5463
|
+
var StartingAfter2$outboundSchema = z22.pipe(
|
|
5464
|
+
z22.object({
|
|
5465
|
+
durationType: CreateScheduleDurationType2$outboundSchema,
|
|
5466
|
+
durationCount: z22.int()
|
|
5467
|
+
}),
|
|
5468
|
+
z22.transform((v) => {
|
|
5469
|
+
return remap(v, {
|
|
5470
|
+
durationType: "duration_type",
|
|
5471
|
+
durationCount: "duration_count"
|
|
5472
|
+
});
|
|
5473
|
+
})
|
|
5474
|
+
);
|
|
5438
5475
|
var CreateScheduleFeatureQuantity2$outboundSchema = z22.pipe(
|
|
5439
5476
|
z22.object({
|
|
5440
5477
|
featureId: z22.string(),
|
|
@@ -5743,12 +5780,14 @@ var CreateSchedulePlan2$outboundSchema = z22.pipe(
|
|
|
5743
5780
|
);
|
|
5744
5781
|
var PhaseRequest2$outboundSchema = z22.pipe(
|
|
5745
5782
|
z22.object({
|
|
5746
|
-
startsAt: z22.number(),
|
|
5783
|
+
startsAt: z22.optional(smartUnion([z22.number(), z22.string()])),
|
|
5784
|
+
startingAfter: z22.optional(z22.lazy(() => StartingAfter2$outboundSchema)),
|
|
5747
5785
|
plans: z22.array(z22.lazy(() => CreateSchedulePlan2$outboundSchema))
|
|
5748
5786
|
}),
|
|
5749
5787
|
z22.transform((v) => {
|
|
5750
5788
|
return remap(v, {
|
|
5751
|
-
startsAt: "starts_at"
|
|
5789
|
+
startsAt: "starts_at",
|
|
5790
|
+
startingAfter: "starting_after"
|
|
5752
5791
|
});
|
|
5753
5792
|
})
|
|
5754
5793
|
);
|
|
@@ -10395,6 +10434,7 @@ var PreviewAttachParams$outboundSchema = z45.pipe(
|
|
|
10395
10434
|
startsAt: z45.optional(z45.int()),
|
|
10396
10435
|
endsAt: z45.optional(z45.int()),
|
|
10397
10436
|
checkoutSessionParams: z45.optional(z45.record(z45.string(), z45.any())),
|
|
10437
|
+
longLivedCheckout: z45.optional(z45.boolean()),
|
|
10398
10438
|
customLineItems: z45.optional(
|
|
10399
10439
|
z45.array(z45.lazy(() => PreviewAttachCustomLineItem$outboundSchema))
|
|
10400
10440
|
),
|
|
@@ -10427,6 +10467,7 @@ var PreviewAttachParams$outboundSchema = z45.pipe(
|
|
|
10427
10467
|
startsAt: "starts_at",
|
|
10428
10468
|
endsAt: "ends_at",
|
|
10429
10469
|
checkoutSessionParams: "checkout_session_params",
|
|
10470
|
+
longLivedCheckout: "long_lived_checkout",
|
|
10430
10471
|
customLineItems: "custom_line_items",
|
|
10431
10472
|
processorSubscriptionId: "processor_subscription_id",
|
|
10432
10473
|
carryOverBalances: "carry_over_balances",
|
|
@@ -11852,6 +11893,17 @@ var PreviewUpdateCancelAction$outboundSchema = z47.enum(PreviewUpdateCancelActio
|
|
|
11852
11893
|
var PreviewUpdateRecalculateBalances$outboundSchema = z47.object({
|
|
11853
11894
|
enabled: z47.boolean()
|
|
11854
11895
|
});
|
|
11896
|
+
var PreviewUpdateCarryOverUsages$outboundSchema = z47.pipe(
|
|
11897
|
+
z47.object({
|
|
11898
|
+
enabled: z47.boolean(),
|
|
11899
|
+
featureIds: z47.optional(z47.array(z47.string()))
|
|
11900
|
+
}),
|
|
11901
|
+
z47.transform((v) => {
|
|
11902
|
+
return remap(v, {
|
|
11903
|
+
featureIds: "feature_ids"
|
|
11904
|
+
});
|
|
11905
|
+
})
|
|
11906
|
+
);
|
|
11855
11907
|
var PreviewUpdateParams$outboundSchema = z47.pipe(
|
|
11856
11908
|
z47.object({
|
|
11857
11909
|
customerId: z47.string(),
|
|
@@ -11881,6 +11933,9 @@ var PreviewUpdateParams$outboundSchema = z47.pipe(
|
|
|
11881
11933
|
noBillingChanges: z47.optional(z47.boolean()),
|
|
11882
11934
|
recalculateBalances: z47.optional(
|
|
11883
11935
|
z47.lazy(() => PreviewUpdateRecalculateBalances$outboundSchema)
|
|
11936
|
+
),
|
|
11937
|
+
carryOverUsages: z47.optional(
|
|
11938
|
+
z47.lazy(() => PreviewUpdateCarryOverUsages$outboundSchema)
|
|
11884
11939
|
)
|
|
11885
11940
|
}),
|
|
11886
11941
|
z47.transform((v) => {
|
|
@@ -11896,7 +11951,8 @@ var PreviewUpdateParams$outboundSchema = z47.pipe(
|
|
|
11896
11951
|
cancelAction: "cancel_action",
|
|
11897
11952
|
billingCycleAnchor: "billing_cycle_anchor",
|
|
11898
11953
|
noBillingChanges: "no_billing_changes",
|
|
11899
|
-
recalculateBalances: "recalculate_balances"
|
|
11954
|
+
recalculateBalances: "recalculate_balances",
|
|
11955
|
+
carryOverUsages: "carry_over_usages"
|
|
11900
11956
|
});
|
|
11901
11957
|
})
|
|
11902
11958
|
);
|
|
@@ -13042,7 +13098,8 @@ var TrackTokensParams$outboundSchema = z53.pipe(
|
|
|
13042
13098
|
audioInputTokens: z53.optional(z53.int()),
|
|
13043
13099
|
audioOutputTokens: z53.optional(z53.int()),
|
|
13044
13100
|
reasoningTokens: z53.optional(z53.int()),
|
|
13045
|
-
properties: z53.optional(z53.record(z53.string(), z53.any()))
|
|
13101
|
+
properties: z53.optional(z53.record(z53.string(), z53.any())),
|
|
13102
|
+
async: z53.optional(z53.boolean())
|
|
13046
13103
|
}),
|
|
13047
13104
|
z53.transform((v) => {
|
|
13048
13105
|
return remap(v, {
|
|
@@ -16968,6 +17025,7 @@ var Billing = class extends ClientSDK {
|
|
|
16968
17025
|
* @param startsAt - Unix timestamp in milliseconds for when the attached plan should start. Future dates create a scheduled subscription. (optional)
|
|
16969
17026
|
* @param endsAt - Unix timestamp in milliseconds for when the attached plan should end. (optional)
|
|
16970
17027
|
* @param checkoutSessionParams - Additional parameters to pass into the creation of the Stripe checkout session. (optional)
|
|
17028
|
+
* @param longLivedCheckout - If true, returns an Autumn-hosted checkout link that can create a fresh Stripe checkout session when opened. (optional)
|
|
16971
17029
|
* @param customLineItems - Custom line items that override the auto-generated proration invoice. Only valid for immediate plan changes (eg. upgrades or one off plans). (optional)
|
|
16972
17030
|
* @param processorSubscriptionId - The processor subscription ID to link. Use this to attach an existing Stripe subscription instead of creating a new one. (optional)
|
|
16973
17031
|
* @param carryOverBalances - Whether to carry over balances from the previous plan. (optional)
|
|
@@ -16994,7 +17052,7 @@ var Billing = class extends ClientSDK {
|
|
|
16994
17052
|
* @example
|
|
16995
17053
|
* ```typescript
|
|
16996
17054
|
* // Schedule a transition from a trial plan to a paid plan
|
|
16997
|
-
* const response = await client.billing.createSchedule({ customerId: "cus_123", phases: [{"startsAt":
|
|
17055
|
+
* const response = await client.billing.createSchedule({ customerId: "cus_123", phases: [{"startsAt":1782124314923,"plans":[{"planId":"trial_plan"}]},{"startsAt":1783333914923,"plans":[{"planId":"pro_plan"}]}] });
|
|
16998
17056
|
* ```
|
|
16999
17057
|
*
|
|
17000
17058
|
* @param customerId - The ID of the customer to create the schedule for.
|
|
@@ -17091,6 +17149,7 @@ var Billing = class extends ClientSDK {
|
|
|
17091
17149
|
* @param startsAt - Unix timestamp in milliseconds for when the attached plan should start. Future dates create a scheduled subscription. (optional)
|
|
17092
17150
|
* @param endsAt - Unix timestamp in milliseconds for when the attached plan should end. (optional)
|
|
17093
17151
|
* @param checkoutSessionParams - Additional parameters to pass into the creation of the Stripe checkout session. (optional)
|
|
17152
|
+
* @param longLivedCheckout - If true, returns an Autumn-hosted checkout link that can create a fresh Stripe checkout session when opened. (optional)
|
|
17094
17153
|
* @param customLineItems - Custom line items that override the auto-generated proration invoice. Only valid for immediate plan changes (eg. upgrades or one off plans). (optional)
|
|
17095
17154
|
* @param processorSubscriptionId - The processor subscription ID to link. Use this to attach an existing Stripe subscription instead of creating a new one. (optional)
|
|
17096
17155
|
* @param carryOverBalances - Whether to carry over balances from the previous plan. (optional)
|
|
@@ -17179,6 +17238,7 @@ var Billing = class extends ClientSDK {
|
|
|
17179
17238
|
* @param billingCycleAnchor - Reset the billing cycle anchor immediately with 'now' (optional)
|
|
17180
17239
|
* @param noBillingChanges - If true, the subscription is updated internally without applying billing changes in Stripe. (optional)
|
|
17181
17240
|
* @param recalculateBalances - Controls whether balances should be recalculated during the subscription update. (optional)
|
|
17241
|
+
* @param carryOverUsages - Whether to carry over usages from the previous plan. (optional)
|
|
17182
17242
|
*
|
|
17183
17243
|
* @returns A billing response with customer ID, invoice details, and payment URL (if next action is required).
|
|
17184
17244
|
*/
|
|
@@ -17215,6 +17275,7 @@ var Billing = class extends ClientSDK {
|
|
|
17215
17275
|
* @param billingCycleAnchor - Reset the billing cycle anchor immediately with 'now' (optional)
|
|
17216
17276
|
* @param noBillingChanges - If true, the subscription is updated internally without applying billing changes in Stripe. (optional)
|
|
17217
17277
|
* @param recalculateBalances - Controls whether balances should be recalculated during the subscription update. (optional)
|
|
17278
|
+
* @param carryOverUsages - Whether to carry over usages from the previous plan. (optional)
|
|
17218
17279
|
*
|
|
17219
17280
|
* @returns A preview response with line items showing prorated charges or credits for the proposed changes.
|
|
17220
17281
|
*/
|
|
@@ -20233,7 +20294,7 @@ var Autumn = class extends ClientSDK {
|
|
|
20233
20294
|
* @param eventName - Event name to track usage for. Use instead of feature_id when multiple features should be tracked from a single event. (optional)
|
|
20234
20295
|
* @param value - The amount of usage to record. Defaults to 1. Use negative values to credit balance (e.g., when removing a seat). (optional)
|
|
20235
20296
|
* @param properties - Additional properties to attach to this usage event. (optional)
|
|
20236
|
-
* @param async - If true, enqueue the event for asynchronous processing and return
|
|
20297
|
+
* @param async - If true, enqueue the event for asynchronous processing and return 204 immediately. The response will not include balance information. (optional)
|
|
20237
20298
|
*
|
|
20238
20299
|
* @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.
|
|
20239
20300
|
*/
|
|
@@ -20274,6 +20335,7 @@ var Autumn = class extends ClientSDK {
|
|
|
20274
20335
|
* @param audioOutputTokens - Number of audio output tokens generated. (optional)
|
|
20275
20336
|
* @param reasoningTokens - Number of reasoning tokens generated. (optional)
|
|
20276
20337
|
* @param properties - Additional properties to attach to this usage event. (optional)
|
|
20338
|
+
* @param async - If true, enqueue the event for asynchronous processing and return 204 immediately. The response will not include balance information. (optional)
|
|
20277
20339
|
*
|
|
20278
20340
|
* @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.
|
|
20279
20341
|
*/
|
|
@@ -20584,6 +20646,7 @@ var attachParamsOutboundSchema = import_v42.z.object({
|
|
|
20584
20646
|
starts_at: import_v42.z.union([import_v42.z.number(), import_v42.z.undefined()]).optional(),
|
|
20585
20647
|
ends_at: import_v42.z.union([import_v42.z.number(), import_v42.z.undefined()]).optional(),
|
|
20586
20648
|
checkout_session_params: import_v42.z.union([import_v42.z.record(import_v42.z.string(), import_v42.z.any()), import_v42.z.undefined()]).optional(),
|
|
20649
|
+
long_lived_checkout: import_v42.z.union([import_v42.z.boolean(), import_v42.z.undefined()]).optional(),
|
|
20587
20650
|
custom_line_items: import_v42.z.union([import_v42.z.array(attachCustomLineItemOutboundSchema), import_v42.z.undefined()]).optional(),
|
|
20588
20651
|
processor_subscription_id: import_v42.z.union([import_v42.z.string(), import_v42.z.undefined()]).optional(),
|
|
20589
20652
|
carry_over_balances: import_v42.z.union([attachCarryOverBalancesOutboundSchema, import_v42.z.undefined()]).optional(),
|
|
@@ -20735,6 +20798,7 @@ var attachParamsSchema = import_v42.z.object({
|
|
|
20735
20798
|
startsAt: import_v42.z.union([import_v42.z.number(), import_v42.z.undefined()]).optional(),
|
|
20736
20799
|
endsAt: import_v42.z.union([import_v42.z.number(), import_v42.z.undefined()]).optional(),
|
|
20737
20800
|
checkoutSessionParams: import_v42.z.union([import_v42.z.record(import_v42.z.string(), import_v42.z.any()), import_v42.z.undefined()]).optional(),
|
|
20801
|
+
longLivedCheckout: import_v42.z.union([import_v42.z.boolean(), import_v42.z.undefined()]).optional(),
|
|
20738
20802
|
customLineItems: import_v42.z.union([import_v42.z.array(attachCustomLineItemSchema), import_v42.z.undefined()]).optional(),
|
|
20739
20803
|
processorSubscriptionId: import_v42.z.union([import_v42.z.string(), import_v42.z.undefined()]).optional(),
|
|
20740
20804
|
carryOverBalances: import_v42.z.union([attachCarryOverBalancesSchema, import_v42.z.undefined()]).optional(),
|
|
@@ -21704,6 +21768,7 @@ var previewAttachParamsOutboundSchema = import_v49.z.object({
|
|
|
21704
21768
|
starts_at: import_v49.z.union([import_v49.z.number(), import_v49.z.undefined()]).optional(),
|
|
21705
21769
|
ends_at: import_v49.z.union([import_v49.z.number(), import_v49.z.undefined()]).optional(),
|
|
21706
21770
|
checkout_session_params: import_v49.z.union([import_v49.z.record(import_v49.z.string(), import_v49.z.any()), import_v49.z.undefined()]).optional(),
|
|
21771
|
+
long_lived_checkout: import_v49.z.union([import_v49.z.boolean(), import_v49.z.undefined()]).optional(),
|
|
21707
21772
|
custom_line_items: import_v49.z.union([import_v49.z.array(previewAttachCustomLineItemOutboundSchema), import_v49.z.undefined()]).optional(),
|
|
21708
21773
|
processor_subscription_id: import_v49.z.union([import_v49.z.string(), import_v49.z.undefined()]).optional(),
|
|
21709
21774
|
carry_over_balances: import_v49.z.union([previewAttachCarryOverBalancesOutboundSchema, import_v49.z.undefined()]).optional(),
|
|
@@ -21856,6 +21921,7 @@ var previewAttachParamsSchema = import_v49.z.object({
|
|
|
21856
21921
|
startsAt: import_v49.z.union([import_v49.z.number(), import_v49.z.undefined()]).optional(),
|
|
21857
21922
|
endsAt: import_v49.z.union([import_v49.z.number(), import_v49.z.undefined()]).optional(),
|
|
21858
21923
|
checkoutSessionParams: import_v49.z.union([import_v49.z.record(import_v49.z.string(), import_v49.z.any()), import_v49.z.undefined()]).optional(),
|
|
21924
|
+
longLivedCheckout: import_v49.z.union([import_v49.z.boolean(), import_v49.z.undefined()]).optional(),
|
|
21859
21925
|
customLineItems: import_v49.z.union([import_v49.z.array(previewAttachCustomLineItemSchema), import_v49.z.undefined()]).optional(),
|
|
21860
21926
|
processorSubscriptionId: import_v49.z.union([import_v49.z.string(), import_v49.z.undefined()]).optional(),
|
|
21861
21927
|
carryOverBalances: import_v49.z.union([previewAttachCarryOverBalancesSchema, import_v49.z.undefined()]).optional(),
|
|
@@ -22340,6 +22406,10 @@ var previewUpdateAttachDiscountSchema = import_v411.z.object({
|
|
|
22340
22406
|
var previewUpdateRecalculateBalancesSchema = import_v411.z.object({
|
|
22341
22407
|
enabled: import_v411.z.boolean()
|
|
22342
22408
|
});
|
|
22409
|
+
var previewUpdateCarryOverUsagesSchema = import_v411.z.object({
|
|
22410
|
+
enabled: import_v411.z.boolean(),
|
|
22411
|
+
featureIds: import_v411.z.union([import_v411.z.array(import_v411.z.string()), import_v411.z.undefined()]).optional()
|
|
22412
|
+
});
|
|
22343
22413
|
var previewUpdateDiscountSchema = import_v411.z.object({
|
|
22344
22414
|
amountOff: import_v411.z.number(),
|
|
22345
22415
|
percentOff: import_v411.z.union([import_v411.z.number(), import_v411.z.undefined()]).optional(),
|
|
@@ -22542,6 +22612,10 @@ var previewUpdateAttachDiscountOutboundSchema = import_v411.z.object({
|
|
|
22542
22612
|
var previewUpdateRecalculateBalancesOutboundSchema = import_v411.z.object({
|
|
22543
22613
|
enabled: import_v411.z.boolean()
|
|
22544
22614
|
});
|
|
22615
|
+
var previewUpdateCarryOverUsagesOutboundSchema = import_v411.z.object({
|
|
22616
|
+
enabled: import_v411.z.boolean(),
|
|
22617
|
+
feature_ids: import_v411.z.union([import_v411.z.array(import_v411.z.string()), import_v411.z.undefined()]).optional()
|
|
22618
|
+
});
|
|
22545
22619
|
var previewUpdateParamsOutboundSchema = import_v411.z.object({
|
|
22546
22620
|
customer_id: import_v411.z.string(),
|
|
22547
22621
|
entity_id: import_v411.z.union([import_v411.z.string(), import_v411.z.undefined()]).optional(),
|
|
@@ -22560,7 +22634,8 @@ var previewUpdateParamsOutboundSchema = import_v411.z.object({
|
|
|
22560
22634
|
cancel_action: import_v411.z.union([import_v411.z.string(), import_v411.z.undefined()]).optional(),
|
|
22561
22635
|
billing_cycle_anchor: import_v411.z.union([import_v411.z.literal("now"), import_v411.z.undefined()]).optional(),
|
|
22562
22636
|
no_billing_changes: import_v411.z.union([import_v411.z.boolean(), import_v411.z.undefined()]).optional(),
|
|
22563
|
-
recalculate_balances: import_v411.z.union([previewUpdateRecalculateBalancesOutboundSchema, import_v411.z.undefined()]).optional()
|
|
22637
|
+
recalculate_balances: import_v411.z.union([previewUpdateRecalculateBalancesOutboundSchema, import_v411.z.undefined()]).optional(),
|
|
22638
|
+
carry_over_usages: import_v411.z.union([previewUpdateCarryOverUsagesOutboundSchema, import_v411.z.undefined()]).optional()
|
|
22564
22639
|
});
|
|
22565
22640
|
var closedEnumSchema7 = import_v411.z.any();
|
|
22566
22641
|
var planSchema3 = import_v411.z.any();
|
|
@@ -22701,7 +22776,8 @@ var previewUpdateParamsSchema = import_v411.z.object({
|
|
|
22701
22776
|
cancelAction: import_v411.z.union([previewUpdateCancelActionSchema, import_v411.z.undefined()]).optional(),
|
|
22702
22777
|
billingCycleAnchor: import_v411.z.union([import_v411.z.literal("now"), import_v411.z.undefined()]).optional(),
|
|
22703
22778
|
noBillingChanges: import_v411.z.union([import_v411.z.boolean(), import_v411.z.undefined()]).optional(),
|
|
22704
|
-
recalculateBalances: import_v411.z.union([previewUpdateRecalculateBalancesSchema, import_v411.z.undefined()]).optional()
|
|
22779
|
+
recalculateBalances: import_v411.z.union([previewUpdateRecalculateBalancesSchema, import_v411.z.undefined()]).optional(),
|
|
22780
|
+
carryOverUsages: import_v411.z.union([previewUpdateCarryOverUsagesSchema, import_v411.z.undefined()]).optional()
|
|
22705
22781
|
});
|
|
22706
22782
|
var previewUpdateIncomingSchema = import_v411.z.object({
|
|
22707
22783
|
planId: import_v411.z.string(),
|
|
@@ -23143,6 +23219,10 @@ var billingUpdateAttachDiscountSchema = import_v414.z.object({
|
|
|
23143
23219
|
var billingUpdateRecalculateBalancesSchema = import_v414.z.object({
|
|
23144
23220
|
enabled: import_v414.z.boolean()
|
|
23145
23221
|
});
|
|
23222
|
+
var billingUpdateCarryOverUsagesSchema = import_v414.z.object({
|
|
23223
|
+
enabled: import_v414.z.boolean(),
|
|
23224
|
+
featureIds: import_v414.z.union([import_v414.z.array(import_v414.z.string()), import_v414.z.undefined()]).optional()
|
|
23225
|
+
});
|
|
23146
23226
|
var billingUpdateInvoiceSchema = import_v414.z.object({
|
|
23147
23227
|
status: import_v414.z.string().nullable(),
|
|
23148
23228
|
stripeId: import_v414.z.string(),
|
|
@@ -23281,6 +23361,10 @@ var billingUpdateAttachDiscountOutboundSchema = import_v414.z.object({
|
|
|
23281
23361
|
var billingUpdateRecalculateBalancesOutboundSchema = import_v414.z.object({
|
|
23282
23362
|
enabled: import_v414.z.boolean()
|
|
23283
23363
|
});
|
|
23364
|
+
var billingUpdateCarryOverUsagesOutboundSchema = import_v414.z.object({
|
|
23365
|
+
enabled: import_v414.z.boolean(),
|
|
23366
|
+
feature_ids: import_v414.z.union([import_v414.z.array(import_v414.z.string()), import_v414.z.undefined()]).optional()
|
|
23367
|
+
});
|
|
23284
23368
|
var updateSubscriptionParamsOutboundSchema = import_v414.z.object({
|
|
23285
23369
|
customer_id: import_v414.z.string(),
|
|
23286
23370
|
entity_id: import_v414.z.union([import_v414.z.string(), import_v414.z.undefined()]).optional(),
|
|
@@ -23296,7 +23380,8 @@ var updateSubscriptionParamsOutboundSchema = import_v414.z.object({
|
|
|
23296
23380
|
cancel_action: import_v414.z.union([import_v414.z.string(), import_v414.z.undefined()]).optional(),
|
|
23297
23381
|
billing_cycle_anchor: import_v414.z.union([import_v414.z.literal("now"), import_v414.z.undefined()]).optional(),
|
|
23298
23382
|
no_billing_changes: import_v414.z.union([import_v414.z.boolean(), import_v414.z.undefined()]).optional(),
|
|
23299
|
-
recalculate_balances: import_v414.z.union([billingUpdateRecalculateBalancesOutboundSchema, import_v414.z.undefined()]).optional()
|
|
23383
|
+
recalculate_balances: import_v414.z.union([billingUpdateRecalculateBalancesOutboundSchema, import_v414.z.undefined()]).optional(),
|
|
23384
|
+
carry_over_usages: import_v414.z.union([billingUpdateCarryOverUsagesOutboundSchema, import_v414.z.undefined()]).optional()
|
|
23300
23385
|
});
|
|
23301
23386
|
var closedEnumSchema9 = import_v414.z.any();
|
|
23302
23387
|
var openEnumSchema8 = import_v414.z.any();
|
|
@@ -23436,7 +23521,8 @@ var updateSubscriptionParamsSchema = import_v414.z.object({
|
|
|
23436
23521
|
cancelAction: import_v414.z.union([billingUpdateCancelActionSchema, import_v414.z.undefined()]).optional(),
|
|
23437
23522
|
billingCycleAnchor: import_v414.z.union([import_v414.z.literal("now"), import_v414.z.undefined()]).optional(),
|
|
23438
23523
|
noBillingChanges: import_v414.z.union([import_v414.z.boolean(), import_v414.z.undefined()]).optional(),
|
|
23439
|
-
recalculateBalances: import_v414.z.union([billingUpdateRecalculateBalancesSchema, import_v414.z.undefined()]).optional()
|
|
23524
|
+
recalculateBalances: import_v414.z.union([billingUpdateRecalculateBalancesSchema, import_v414.z.undefined()]).optional(),
|
|
23525
|
+
carryOverUsages: import_v414.z.union([billingUpdateCarryOverUsagesSchema, import_v414.z.undefined()]).optional()
|
|
23440
23526
|
});
|
|
23441
23527
|
var billingUpdateCodeSchema = openEnumSchema8;
|
|
23442
23528
|
var billingUpdateRequiredActionSchema = import_v414.z.object({
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
autumnHandler
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-ILWBT65Y.mjs";
|
|
4
4
|
import "../chunk-WYDGEDEU.mjs";
|
|
5
5
|
import "../chunk-VXND2UDT.mjs";
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-PA2SVXPZ.mjs";
|
|
9
|
-
import "../chunk-MOHYGUMA.mjs";
|
|
10
|
-
import "../chunk-TBQ27LIK.mjs";
|
|
11
|
-
import "../chunk-J44WR3QZ.mjs";
|
|
6
|
+
import "../chunk-MWZDYRO7.mjs";
|
|
7
|
+
import "../chunk-X3DVYZOC.mjs";
|
|
12
8
|
import "../chunk-TSF4YCUO.mjs";
|
|
13
9
|
import "../chunk-UAR3TMWI.mjs";
|
|
14
|
-
import "../chunk-
|
|
10
|
+
import "../chunk-6H7JNSG4.mjs";
|
|
11
|
+
import "../chunk-N72VCQNK.mjs";
|
|
12
|
+
import "../chunk-IXUCY7AU.mjs";
|
|
15
13
|
import "../chunk-OTXV5FY7.mjs";
|
|
16
|
-
import "../chunk-VZIMT7AO.mjs";
|
|
17
14
|
import "../chunk-I7CD6EB6.mjs";
|
|
15
|
+
import "../chunk-VZIMT7AO.mjs";
|
|
16
|
+
import "../chunk-TBQ27LIK.mjs";
|
|
17
|
+
import "../chunk-J44WR3QZ.mjs";
|
|
18
18
|
import "../chunk-N7NFYY54.mjs";
|
|
19
19
|
export {
|
|
20
20
|
autumnHandler
|