autumn-js 1.2.13 → 1.2.15
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 +623 -108
- package/dist/backend/adapters/express.mjs +8 -8
- package/dist/backend/adapters/fetch.js +623 -108
- package/dist/backend/adapters/fetch.mjs +8 -8
- package/dist/backend/adapters/hono.js +623 -108
- package/dist/backend/adapters/hono.mjs +8 -8
- package/dist/backend/adapters/index.js +623 -108
- package/dist/backend/adapters/index.mjs +11 -11
- package/dist/backend/adapters/next.js +623 -108
- package/dist/backend/adapters/next.mjs +8 -8
- package/dist/backend/{chunk-DNNJOZAT.mjs → chunk-BQVZ6GCE.mjs} +1 -1
- package/dist/backend/{chunk-YSQQKZBU.mjs → chunk-IEOQUAJY.mjs} +7 -7
- package/dist/backend/{chunk-MANTLPDT.mjs → chunk-IQS3LQVP.mjs} +36 -8
- package/dist/backend/{chunk-7BVATYGA.mjs → chunk-NDB3VKT4.mjs} +1 -1
- package/dist/backend/{chunk-RPH5L44S.mjs → chunk-NRTK5YZK.mjs} +1 -1
- package/dist/backend/{chunk-T42RZEUZ.mjs → chunk-OXCQHLZX.mjs} +587 -100
- package/dist/backend/{chunk-EJGHP7KT.mjs → chunk-RSIOYTRW.mjs} +5 -5
- package/dist/backend/{chunk-OUDB34Y7.mjs → chunk-X7LDYBKC.mjs} +1 -1
- 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 +623 -108
- package/dist/backend/core/handlers/coreHandler.mjs +6 -6
- 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 +3 -3
- package/dist/backend/core/handlers/handleRouteByName.js +623 -108
- package/dist/backend/core/handlers/handleRouteByName.mjs +6 -6
- 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 +623 -108
- 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 +623 -108
- package/dist/backend/core/index.mjs +7 -7
- 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 +36 -8
- package/dist/backend/core/routes/index.mjs +1 -1
- 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 +36 -8
- package/dist/backend/core/routes/routeConfigs.mjs +1 -1
- 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/index.d.mts +2 -2
- package/dist/backend/index.d.ts +2 -2
- package/dist/backend/index.js +623 -108
- package/dist/backend/index.mjs +7 -7
- package/dist/backend/{routeTypes-DVwngaBn.d.mts → routeTypes-CIspXIZ4.d.mts} +841 -169
- package/dist/backend/{routeTypes-B94_Mq2J.d.ts → routeTypes-COwIJFNS.d.ts} +841 -169
- package/dist/better-auth/{chunk-4OWECHZC.mjs → chunk-L6XX4ONM.mjs} +1 -1
- package/dist/better-auth/{chunk-ZZGFPTHO.mjs → chunk-QT6R3AXQ.mjs} +588 -101
- package/dist/better-auth/{chunk-JIFD4TSN.mjs → chunk-ZO3KGM5W.mjs} +36 -8
- package/dist/better-auth/client.d.mts +2 -4
- package/dist/better-auth/client.d.ts +2 -4
- package/dist/better-auth/{createAutumnEndpoint-CvXRCg-M.d.ts → createAutumnEndpoint-Clm1sxhQ.d.mts} +4 -8
- package/dist/better-auth/{createAutumnEndpoint-CvXRCg-M.d.mts → createAutumnEndpoint-Clm1sxhQ.d.ts} +4 -8
- package/dist/better-auth/index.d.mts +2 -4
- package/dist/better-auth/index.d.ts +2 -4
- package/dist/better-auth/index.js +623 -108
- package/dist/better-auth/index.mjs +3 -3
- package/dist/better-auth/utils/createAutumnEndpoint.d.mts +2 -4
- package/dist/better-auth/utils/createAutumnEndpoint.d.ts +2 -4
- package/dist/better-auth/utils/createAutumnEndpoint.js +36 -8
- package/dist/better-auth/utils/createAutumnEndpoint.mjs +2 -2
- package/dist/better-auth/utils/handleBetterAuthRoute.d.mts +2 -4
- package/dist/better-auth/utils/handleBetterAuthRoute.d.ts +2 -4
- package/dist/better-auth/utils/handleBetterAuthRoute.js +623 -108
- package/dist/better-auth/utils/handleBetterAuthRoute.mjs +2 -2
- package/dist/better-auth/utils/index.d.mts +3 -4
- package/dist/better-auth/utils/index.d.ts +3 -4
- package/dist/better-auth/utils/index.js +623 -108
- package/dist/better-auth/utils/index.mjs +3 -3
- package/dist/react/AutumnContext.d.mts +2 -2
- package/dist/react/AutumnContext.d.ts +2 -2
- package/dist/react/client/AutumnClient.d.mts +2 -2
- package/dist/react/client/AutumnClient.d.ts +2 -2
- package/dist/react/client/IAutumnClient.d.mts +2 -2
- package/dist/react/client/IAutumnClient.d.ts +2 -2
- package/dist/react/client/index.d.mts +2 -2
- package/dist/react/client/index.d.ts +2 -2
- package/dist/react/{customer-DB8vL_m7.d.mts → customer-BDxW2bu6.d.mts} +35 -9
- package/dist/react/{customer-CaGJEN5J.d.ts → customer-BPUObmME.d.ts} +35 -9
- package/dist/react/hooks/index.d.mts +2 -2
- package/dist/react/hooks/index.d.ts +2 -2
- package/dist/react/hooks/internal/check/balanceToAllowed.d.mts +1 -1
- package/dist/react/hooks/internal/check/balanceToAllowed.d.ts +1 -1
- package/dist/react/hooks/internal/check/customerToFeatures.d.mts +1 -1
- package/dist/react/hooks/internal/check/customerToFeatures.d.ts +1 -1
- package/dist/react/hooks/internal/check/findCreditSystemsByFeature.d.mts +1 -1
- package/dist/react/hooks/internal/check/findCreditSystemsByFeature.d.ts +1 -1
- package/dist/react/hooks/internal/check/getCreditCost.d.mts +1 -1
- package/dist/react/hooks/internal/check/getCreditCost.d.ts +1 -1
- package/dist/react/hooks/internal/getLocalCheckResponse.d.mts +2 -2
- package/dist/react/hooks/internal/getLocalCheckResponse.d.ts +2 -2
- package/dist/react/hooks/internal/useCustomerActions.d.mts +2 -2
- package/dist/react/hooks/internal/useCustomerActions.d.ts +2 -2
- 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 +2 -2
- package/dist/react/hooks/useCustomer.d.ts +2 -2
- 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 +2 -2
- package/dist/react/index.d.ts +2 -2
- package/dist/react/{params-B5l9vHfZ.d.ts → params-D4cEukOJ.d.ts} +615 -64
- package/dist/react/{params-BVglT8vT.d.mts → params-DzbSUS8O.d.mts} +615 -64
- package/dist/sdk/index.d.mts +980 -173
- package/dist/sdk/index.d.ts +980 -173
- package/dist/sdk/index.js +978 -212
- package/dist/sdk/index.mjs +825 -149
- package/package.json +1 -1
- package/dist/backend/{chunk-S5HPMJ4U.mjs → chunk-55C2WWXQ.mjs} +3 -3
|
@@ -1626,7 +1626,8 @@ var AttachParams$outboundSchema = z10.pipe(
|
|
|
1626
1626
|
z10.lazy(() => AttachCarryOverUsages$outboundSchema)
|
|
1627
1627
|
),
|
|
1628
1628
|
metadata: z10.optional(z10.record(z10.string(), z10.string())),
|
|
1629
|
-
noBillingChanges: z10.optional(z10.boolean())
|
|
1629
|
+
noBillingChanges: z10.optional(z10.boolean()),
|
|
1630
|
+
enablePlanImmediately: z10.optional(z10.boolean())
|
|
1630
1631
|
}),
|
|
1631
1632
|
z10.transform((v) => {
|
|
1632
1633
|
return remap(v, {
|
|
@@ -1647,7 +1648,8 @@ var AttachParams$outboundSchema = z10.pipe(
|
|
|
1647
1648
|
processorSubscriptionId: "processor_subscription_id",
|
|
1648
1649
|
carryOverBalances: "carry_over_balances",
|
|
1649
1650
|
carryOverUsages: "carry_over_usages",
|
|
1650
|
-
noBillingChanges: "no_billing_changes"
|
|
1651
|
+
noBillingChanges: "no_billing_changes",
|
|
1652
|
+
enablePlanImmediately: "enable_plan_immediately"
|
|
1651
1653
|
});
|
|
1652
1654
|
})
|
|
1653
1655
|
);
|
|
@@ -2199,31 +2201,31 @@ var BillingUpdateResponse$inboundSchema = z12.pipe(
|
|
|
2199
2201
|
|
|
2200
2202
|
// ../sdk/src/models/check-op.ts
|
|
2201
2203
|
import * as z13 from "zod/v4-mini";
|
|
2202
|
-
var
|
|
2204
|
+
var FlagType2 = {
|
|
2203
2205
|
Boolean: "boolean",
|
|
2204
2206
|
Metered: "metered",
|
|
2205
2207
|
CreditSystem: "credit_system"
|
|
2206
2208
|
};
|
|
2207
|
-
var
|
|
2209
|
+
var Scenario2 = {
|
|
2208
2210
|
UsageLimit: "usage_limit",
|
|
2209
2211
|
FeatureFlag: "feature_flag"
|
|
2210
2212
|
};
|
|
2211
|
-
var
|
|
2213
|
+
var CheckEnv2 = {
|
|
2212
2214
|
Sandbox: "sandbox",
|
|
2213
2215
|
Live: "live"
|
|
2214
2216
|
};
|
|
2215
|
-
var
|
|
2217
|
+
var ProductType2 = {
|
|
2216
2218
|
Feature: "feature",
|
|
2217
2219
|
PricedFeature: "priced_feature",
|
|
2218
2220
|
Price: "price"
|
|
2219
2221
|
};
|
|
2220
|
-
var
|
|
2222
|
+
var FeatureType2 = {
|
|
2221
2223
|
SingleUse: "single_use",
|
|
2222
2224
|
ContinuousUse: "continuous_use",
|
|
2223
2225
|
Boolean: "boolean",
|
|
2224
2226
|
Static: "static"
|
|
2225
2227
|
};
|
|
2226
|
-
var
|
|
2228
|
+
var CheckInterval2 = {
|
|
2227
2229
|
Minute: "minute",
|
|
2228
2230
|
Hour: "hour",
|
|
2229
2231
|
Day: "day",
|
|
@@ -2233,37 +2235,113 @@ var CheckInterval = {
|
|
|
2233
2235
|
SemiAnnual: "semi_annual",
|
|
2234
2236
|
Year: "year"
|
|
2235
2237
|
};
|
|
2236
|
-
var
|
|
2238
|
+
var CheckTierBehavior2 = {
|
|
2237
2239
|
Graduated: "graduated",
|
|
2238
2240
|
Volume: "volume"
|
|
2239
2241
|
};
|
|
2240
|
-
var
|
|
2242
|
+
var UsageModel2 = {
|
|
2241
2243
|
Prepaid: "prepaid",
|
|
2242
2244
|
PayPerUse: "pay_per_use"
|
|
2243
2245
|
};
|
|
2244
|
-
var
|
|
2246
|
+
var ConfigDuration2 = {
|
|
2245
2247
|
Month: "month",
|
|
2246
2248
|
Forever: "forever"
|
|
2247
2249
|
};
|
|
2248
|
-
var
|
|
2250
|
+
var CheckOnIncrease2 = {
|
|
2249
2251
|
BillImmediately: "bill_immediately",
|
|
2250
2252
|
ProrateImmediately: "prorate_immediately",
|
|
2251
2253
|
ProrateNextCycle: "prorate_next_cycle",
|
|
2252
2254
|
BillNextCycle: "bill_next_cycle"
|
|
2253
2255
|
};
|
|
2254
|
-
var
|
|
2256
|
+
var CheckOnDecrease2 = {
|
|
2255
2257
|
Prorate: "prorate",
|
|
2256
2258
|
ProrateImmediately: "prorate_immediately",
|
|
2257
2259
|
ProrateNextCycle: "prorate_next_cycle",
|
|
2258
2260
|
None: "none",
|
|
2259
2261
|
NoProrations: "no_prorations"
|
|
2260
2262
|
};
|
|
2261
|
-
var
|
|
2263
|
+
var FreeTrialDuration2 = {
|
|
2262
2264
|
Day: "day",
|
|
2263
2265
|
Month: "month",
|
|
2264
2266
|
Year: "year"
|
|
2265
2267
|
};
|
|
2266
|
-
var
|
|
2268
|
+
var ProductScenario2 = {
|
|
2269
|
+
Scheduled: "scheduled",
|
|
2270
|
+
Active: "active",
|
|
2271
|
+
New: "new",
|
|
2272
|
+
Renew: "renew",
|
|
2273
|
+
Upgrade: "upgrade",
|
|
2274
|
+
UpdatePrepaidQuantity: "update_prepaid_quantity",
|
|
2275
|
+
Downgrade: "downgrade",
|
|
2276
|
+
Cancel: "cancel",
|
|
2277
|
+
Expired: "expired",
|
|
2278
|
+
PastDue: "past_due"
|
|
2279
|
+
};
|
|
2280
|
+
var FlagType1 = {
|
|
2281
|
+
Boolean: "boolean",
|
|
2282
|
+
Metered: "metered",
|
|
2283
|
+
CreditSystem: "credit_system"
|
|
2284
|
+
};
|
|
2285
|
+
var Scenario1 = {
|
|
2286
|
+
UsageLimit: "usage_limit",
|
|
2287
|
+
FeatureFlag: "feature_flag"
|
|
2288
|
+
};
|
|
2289
|
+
var CheckEnv1 = {
|
|
2290
|
+
Sandbox: "sandbox",
|
|
2291
|
+
Live: "live"
|
|
2292
|
+
};
|
|
2293
|
+
var ProductType1 = {
|
|
2294
|
+
Feature: "feature",
|
|
2295
|
+
PricedFeature: "priced_feature",
|
|
2296
|
+
Price: "price"
|
|
2297
|
+
};
|
|
2298
|
+
var FeatureType1 = {
|
|
2299
|
+
SingleUse: "single_use",
|
|
2300
|
+
ContinuousUse: "continuous_use",
|
|
2301
|
+
Boolean: "boolean",
|
|
2302
|
+
Static: "static"
|
|
2303
|
+
};
|
|
2304
|
+
var CheckInterval1 = {
|
|
2305
|
+
Minute: "minute",
|
|
2306
|
+
Hour: "hour",
|
|
2307
|
+
Day: "day",
|
|
2308
|
+
Week: "week",
|
|
2309
|
+
Month: "month",
|
|
2310
|
+
Quarter: "quarter",
|
|
2311
|
+
SemiAnnual: "semi_annual",
|
|
2312
|
+
Year: "year"
|
|
2313
|
+
};
|
|
2314
|
+
var CheckTierBehavior1 = {
|
|
2315
|
+
Graduated: "graduated",
|
|
2316
|
+
Volume: "volume"
|
|
2317
|
+
};
|
|
2318
|
+
var UsageModel1 = {
|
|
2319
|
+
Prepaid: "prepaid",
|
|
2320
|
+
PayPerUse: "pay_per_use"
|
|
2321
|
+
};
|
|
2322
|
+
var ConfigDuration1 = {
|
|
2323
|
+
Month: "month",
|
|
2324
|
+
Forever: "forever"
|
|
2325
|
+
};
|
|
2326
|
+
var CheckOnIncrease1 = {
|
|
2327
|
+
BillImmediately: "bill_immediately",
|
|
2328
|
+
ProrateImmediately: "prorate_immediately",
|
|
2329
|
+
ProrateNextCycle: "prorate_next_cycle",
|
|
2330
|
+
BillNextCycle: "bill_next_cycle"
|
|
2331
|
+
};
|
|
2332
|
+
var CheckOnDecrease1 = {
|
|
2333
|
+
Prorate: "prorate",
|
|
2334
|
+
ProrateImmediately: "prorate_immediately",
|
|
2335
|
+
ProrateNextCycle: "prorate_next_cycle",
|
|
2336
|
+
None: "none",
|
|
2337
|
+
NoProrations: "no_prorations"
|
|
2338
|
+
};
|
|
2339
|
+
var FreeTrialDuration1 = {
|
|
2340
|
+
Day: "day",
|
|
2341
|
+
Month: "month",
|
|
2342
|
+
Year: "year"
|
|
2343
|
+
};
|
|
2344
|
+
var ProductScenario1 = {
|
|
2267
2345
|
Scheduled: "scheduled",
|
|
2268
2346
|
Active: "active",
|
|
2269
2347
|
New: "new",
|
|
@@ -2310,8 +2388,8 @@ var CheckParams$outboundSchema = z13.pipe(
|
|
|
2310
2388
|
});
|
|
2311
2389
|
})
|
|
2312
2390
|
);
|
|
2313
|
-
var
|
|
2314
|
-
var
|
|
2391
|
+
var FlagType2$inboundSchema = inboundSchema(FlagType2);
|
|
2392
|
+
var CheckCreditSchema2$inboundSchema = z13.pipe(
|
|
2315
2393
|
z13.object({
|
|
2316
2394
|
metered_feature_id: string4(),
|
|
2317
2395
|
credit_cost: number2()
|
|
@@ -2323,21 +2401,21 @@ var CheckCreditSchema$inboundSchema = z13.pipe(
|
|
|
2323
2401
|
});
|
|
2324
2402
|
})
|
|
2325
2403
|
);
|
|
2326
|
-
var
|
|
2404
|
+
var FlagDisplay2$inboundSchema = z13.object({
|
|
2327
2405
|
singular: z13.optional(z13.nullable(string4())),
|
|
2328
2406
|
plural: z13.optional(z13.nullable(string4()))
|
|
2329
2407
|
});
|
|
2330
|
-
var
|
|
2408
|
+
var CheckFeature2$inboundSchema = z13.pipe(
|
|
2331
2409
|
z13.object({
|
|
2332
2410
|
id: string4(),
|
|
2333
2411
|
name: string4(),
|
|
2334
|
-
type:
|
|
2412
|
+
type: FlagType2$inboundSchema,
|
|
2335
2413
|
consumable: boolean2(),
|
|
2336
2414
|
event_names: optional2(z13.array(string4())),
|
|
2337
2415
|
credit_schema: optional2(
|
|
2338
|
-
z13.array(z13.lazy(() =>
|
|
2416
|
+
z13.array(z13.lazy(() => CheckCreditSchema2$inboundSchema))
|
|
2339
2417
|
),
|
|
2340
|
-
display: optional2(z13.lazy(() =>
|
|
2418
|
+
display: optional2(z13.lazy(() => FlagDisplay2$inboundSchema)),
|
|
2341
2419
|
archived: boolean2()
|
|
2342
2420
|
}),
|
|
2343
2421
|
z13.transform((v) => {
|
|
@@ -2347,13 +2425,13 @@ var CheckFeature$inboundSchema = z13.pipe(
|
|
|
2347
2425
|
});
|
|
2348
2426
|
})
|
|
2349
2427
|
);
|
|
2350
|
-
var
|
|
2428
|
+
var Flag2$inboundSchema = z13.pipe(
|
|
2351
2429
|
z13.object({
|
|
2352
2430
|
id: string4(),
|
|
2353
2431
|
plan_id: nullable(string4()),
|
|
2354
2432
|
expires_at: nullable(number2()),
|
|
2355
2433
|
feature_id: string4(),
|
|
2356
|
-
feature: optional2(z13.lazy(() =>
|
|
2434
|
+
feature: optional2(z13.lazy(() => CheckFeature2$inboundSchema))
|
|
2357
2435
|
}),
|
|
2358
2436
|
z13.transform((v) => {
|
|
2359
2437
|
return remap(v, {
|
|
@@ -2363,15 +2441,15 @@ var Flag$inboundSchema = z13.pipe(
|
|
|
2363
2441
|
});
|
|
2364
2442
|
})
|
|
2365
2443
|
);
|
|
2366
|
-
var
|
|
2367
|
-
var
|
|
2368
|
-
var
|
|
2369
|
-
var
|
|
2370
|
-
var
|
|
2371
|
-
var
|
|
2372
|
-
var
|
|
2373
|
-
var
|
|
2374
|
-
var
|
|
2444
|
+
var Scenario2$inboundSchema = inboundSchema(Scenario2);
|
|
2445
|
+
var CheckEnv2$inboundSchema = inboundSchema(CheckEnv2);
|
|
2446
|
+
var ProductType2$inboundSchema = inboundSchema(ProductType2);
|
|
2447
|
+
var FeatureType2$inboundSchema = inboundSchema(FeatureType2);
|
|
2448
|
+
var IncludedUsage2$inboundSchema = smartUnion([number2(), string4()]);
|
|
2449
|
+
var CheckInterval2$inboundSchema = inboundSchema(CheckInterval2);
|
|
2450
|
+
var CheckTierBehavior2$inboundSchema = inboundSchema(CheckTierBehavior2);
|
|
2451
|
+
var UsageModel2$inboundSchema = inboundSchema(UsageModel2);
|
|
2452
|
+
var ProductDisplay2$inboundSchema = z13.pipe(
|
|
2375
2453
|
z13.object({
|
|
2376
2454
|
primary_text: string4(),
|
|
2377
2455
|
secondary_text: z13.optional(z13.nullable(string4()))
|
|
@@ -2383,12 +2461,12 @@ var ProductDisplay$inboundSchema = z13.pipe(
|
|
|
2383
2461
|
});
|
|
2384
2462
|
})
|
|
2385
2463
|
);
|
|
2386
|
-
var
|
|
2387
|
-
var
|
|
2464
|
+
var ConfigDuration2$inboundSchema = inboundSchema(ConfigDuration2);
|
|
2465
|
+
var CheckRollover2$inboundSchema = z13.pipe(
|
|
2388
2466
|
z13.object({
|
|
2389
2467
|
max: z13.optional(z13.nullable(number2())),
|
|
2390
2468
|
max_percentage: z13.optional(z13.nullable(number2())),
|
|
2391
|
-
duration: z13._default(
|
|
2469
|
+
duration: z13._default(ConfigDuration2$inboundSchema, "month"),
|
|
2392
2470
|
length: number2()
|
|
2393
2471
|
}),
|
|
2394
2472
|
z13.transform((v) => {
|
|
@@ -2397,15 +2475,15 @@ var CheckRollover$inboundSchema = z13.pipe(
|
|
|
2397
2475
|
});
|
|
2398
2476
|
})
|
|
2399
2477
|
);
|
|
2400
|
-
var
|
|
2401
|
-
var
|
|
2402
|
-
var
|
|
2478
|
+
var CheckOnIncrease2$inboundSchema = inboundSchema(CheckOnIncrease2);
|
|
2479
|
+
var CheckOnDecrease2$inboundSchema = inboundSchema(CheckOnDecrease2);
|
|
2480
|
+
var CheckConfig2$inboundSchema = z13.pipe(
|
|
2403
2481
|
z13.object({
|
|
2404
2482
|
rollover: z13.optional(
|
|
2405
|
-
z13.nullable(z13.lazy(() =>
|
|
2483
|
+
z13.nullable(z13.lazy(() => CheckRollover2$inboundSchema))
|
|
2406
2484
|
),
|
|
2407
|
-
on_increase: z13.optional(z13.nullable(
|
|
2408
|
-
on_decrease: z13.optional(z13.nullable(
|
|
2485
|
+
on_increase: z13.optional(z13.nullable(CheckOnIncrease2$inboundSchema)),
|
|
2486
|
+
on_decrease: z13.optional(z13.nullable(CheckOnDecrease2$inboundSchema))
|
|
2409
2487
|
}),
|
|
2410
2488
|
z13.transform((v) => {
|
|
2411
2489
|
return remap(v, {
|
|
@@ -2414,29 +2492,29 @@ var CheckConfig$inboundSchema = z13.pipe(
|
|
|
2414
2492
|
});
|
|
2415
2493
|
})
|
|
2416
2494
|
);
|
|
2417
|
-
var
|
|
2495
|
+
var CheckItem2$inboundSchema = z13.pipe(
|
|
2418
2496
|
z13.object({
|
|
2419
|
-
type: z13.optional(z13.nullable(
|
|
2497
|
+
type: z13.optional(z13.nullable(ProductType2$inboundSchema)),
|
|
2420
2498
|
feature_id: z13.optional(z13.nullable(string4())),
|
|
2421
|
-
feature_type: z13.optional(z13.nullable(
|
|
2499
|
+
feature_type: z13.optional(z13.nullable(FeatureType2$inboundSchema)),
|
|
2422
2500
|
included_usage: z13.optional(
|
|
2423
2501
|
z13.nullable(smartUnion([number2(), string4()]))
|
|
2424
2502
|
),
|
|
2425
|
-
interval: z13.optional(z13.nullable(
|
|
2503
|
+
interval: z13.optional(z13.nullable(CheckInterval2$inboundSchema)),
|
|
2426
2504
|
interval_count: z13.optional(z13.nullable(number2())),
|
|
2427
2505
|
price: z13.optional(z13.nullable(number2())),
|
|
2428
2506
|
tiers: z13.optional(z13.nullable(z13.array(nullable(z13.any())))),
|
|
2429
|
-
tier_behavior: z13.optional(z13.nullable(
|
|
2430
|
-
usage_model: z13.optional(z13.nullable(
|
|
2507
|
+
tier_behavior: z13.optional(z13.nullable(CheckTierBehavior2$inboundSchema)),
|
|
2508
|
+
usage_model: z13.optional(z13.nullable(UsageModel2$inboundSchema)),
|
|
2431
2509
|
billing_units: z13.optional(z13.nullable(number2())),
|
|
2432
2510
|
reset_usage_when_enabled: z13.optional(z13.nullable(boolean2())),
|
|
2433
2511
|
entity_feature_id: z13.optional(z13.nullable(string4())),
|
|
2434
2512
|
display: z13.optional(
|
|
2435
|
-
z13.nullable(z13.lazy(() =>
|
|
2513
|
+
z13.nullable(z13.lazy(() => ProductDisplay2$inboundSchema))
|
|
2436
2514
|
),
|
|
2437
2515
|
quantity: z13.optional(z13.nullable(number2())),
|
|
2438
2516
|
next_cycle_quantity: z13.optional(z13.nullable(number2())),
|
|
2439
|
-
config: z13.optional(z13.nullable(z13.lazy(() =>
|
|
2517
|
+
config: z13.optional(z13.nullable(z13.lazy(() => CheckConfig2$inboundSchema)))
|
|
2440
2518
|
}),
|
|
2441
2519
|
z13.transform((v) => {
|
|
2442
2520
|
return remap(v, {
|
|
@@ -2453,10 +2531,10 @@ var CheckItem$inboundSchema = z13.pipe(
|
|
|
2453
2531
|
});
|
|
2454
2532
|
})
|
|
2455
2533
|
);
|
|
2456
|
-
var
|
|
2457
|
-
var
|
|
2534
|
+
var FreeTrialDuration2$inboundSchema = inboundSchema(FreeTrialDuration2);
|
|
2535
|
+
var CheckFreeTrial2$inboundSchema = z13.pipe(
|
|
2458
2536
|
z13.object({
|
|
2459
|
-
duration:
|
|
2537
|
+
duration: FreeTrialDuration2$inboundSchema,
|
|
2460
2538
|
length: number2(),
|
|
2461
2539
|
unique_fingerprint: boolean2(),
|
|
2462
2540
|
card_required: boolean2(),
|
|
@@ -2470,8 +2548,8 @@ var CheckFreeTrial$inboundSchema = z13.pipe(
|
|
|
2470
2548
|
});
|
|
2471
2549
|
})
|
|
2472
2550
|
);
|
|
2473
|
-
var
|
|
2474
|
-
var
|
|
2551
|
+
var ProductScenario2$inboundSchema = inboundSchema(ProductScenario2);
|
|
2552
|
+
var Properties2$inboundSchema = z13.pipe(
|
|
2475
2553
|
z13.object({
|
|
2476
2554
|
is_free: boolean2(),
|
|
2477
2555
|
is_one_off: boolean2(),
|
|
@@ -2488,22 +2566,22 @@ var Properties$inboundSchema = z13.pipe(
|
|
|
2488
2566
|
});
|
|
2489
2567
|
})
|
|
2490
2568
|
);
|
|
2491
|
-
var
|
|
2569
|
+
var Product2$inboundSchema = z13.pipe(
|
|
2492
2570
|
z13.object({
|
|
2493
2571
|
id: string4(),
|
|
2494
2572
|
name: string4(),
|
|
2495
2573
|
group: nullable(string4()),
|
|
2496
|
-
env:
|
|
2574
|
+
env: CheckEnv2$inboundSchema,
|
|
2497
2575
|
is_add_on: boolean2(),
|
|
2498
2576
|
is_default: boolean2(),
|
|
2499
2577
|
archived: boolean2(),
|
|
2500
2578
|
version: number2(),
|
|
2501
2579
|
created_at: number2(),
|
|
2502
|
-
items: z13.array(z13.lazy(() =>
|
|
2503
|
-
free_trial: nullable(z13.lazy(() =>
|
|
2580
|
+
items: z13.array(z13.lazy(() => CheckItem2$inboundSchema)),
|
|
2581
|
+
free_trial: nullable(z13.lazy(() => CheckFreeTrial2$inboundSchema)),
|
|
2504
2582
|
base_variant_id: nullable(string4()),
|
|
2505
|
-
scenario: optional2(
|
|
2506
|
-
properties: optional2(z13.lazy(() =>
|
|
2583
|
+
scenario: optional2(ProductScenario2$inboundSchema),
|
|
2584
|
+
properties: optional2(z13.lazy(() => Properties2$inboundSchema))
|
|
2507
2585
|
}),
|
|
2508
2586
|
z13.transform((v) => {
|
|
2509
2587
|
return remap(v, {
|
|
@@ -2515,14 +2593,14 @@ var Product$inboundSchema = z13.pipe(
|
|
|
2515
2593
|
});
|
|
2516
2594
|
})
|
|
2517
2595
|
);
|
|
2518
|
-
var
|
|
2596
|
+
var Preview2$inboundSchema = z13.pipe(
|
|
2519
2597
|
z13.object({
|
|
2520
|
-
scenario:
|
|
2598
|
+
scenario: Scenario2$inboundSchema,
|
|
2521
2599
|
title: string4(),
|
|
2522
2600
|
message: string4(),
|
|
2523
2601
|
feature_id: string4(),
|
|
2524
2602
|
feature_name: string4(),
|
|
2525
|
-
products: z13.array(z13.lazy(() =>
|
|
2603
|
+
products: z13.array(z13.lazy(() => Product2$inboundSchema))
|
|
2526
2604
|
}),
|
|
2527
2605
|
z13.transform((v) => {
|
|
2528
2606
|
return remap(v, {
|
|
@@ -2531,15 +2609,15 @@ var Preview$inboundSchema = z13.pipe(
|
|
|
2531
2609
|
});
|
|
2532
2610
|
})
|
|
2533
2611
|
);
|
|
2534
|
-
var
|
|
2612
|
+
var CheckResponseBody2$inboundSchema = z13.pipe(
|
|
2535
2613
|
z13.object({
|
|
2536
2614
|
allowed: boolean2(),
|
|
2537
2615
|
customer_id: string4(),
|
|
2538
2616
|
entity_id: z13.optional(z13.nullable(string4())),
|
|
2539
2617
|
required_balance: optional2(number2()),
|
|
2540
2618
|
balance: nullable(Balance$inboundSchema),
|
|
2541
|
-
flag: nullable(z13.lazy(() =>
|
|
2542
|
-
preview: optional2(z13.lazy(() =>
|
|
2619
|
+
flag: nullable(z13.lazy(() => Flag2$inboundSchema)),
|
|
2620
|
+
preview: optional2(z13.lazy(() => Preview2$inboundSchema))
|
|
2543
2621
|
}),
|
|
2544
2622
|
z13.transform((v) => {
|
|
2545
2623
|
return remap(v, {
|
|
@@ -2549,6 +2627,249 @@ var CheckResponse$inboundSchema = z13.pipe(
|
|
|
2549
2627
|
});
|
|
2550
2628
|
})
|
|
2551
2629
|
);
|
|
2630
|
+
var FlagType1$inboundSchema = inboundSchema(FlagType1);
|
|
2631
|
+
var CheckCreditSchema1$inboundSchema = z13.pipe(
|
|
2632
|
+
z13.object({
|
|
2633
|
+
metered_feature_id: string4(),
|
|
2634
|
+
credit_cost: number2()
|
|
2635
|
+
}),
|
|
2636
|
+
z13.transform((v) => {
|
|
2637
|
+
return remap(v, {
|
|
2638
|
+
"metered_feature_id": "meteredFeatureId",
|
|
2639
|
+
"credit_cost": "creditCost"
|
|
2640
|
+
});
|
|
2641
|
+
})
|
|
2642
|
+
);
|
|
2643
|
+
var FlagDisplay1$inboundSchema = z13.object({
|
|
2644
|
+
singular: z13.optional(z13.nullable(string4())),
|
|
2645
|
+
plural: z13.optional(z13.nullable(string4()))
|
|
2646
|
+
});
|
|
2647
|
+
var CheckFeature1$inboundSchema = z13.pipe(
|
|
2648
|
+
z13.object({
|
|
2649
|
+
id: string4(),
|
|
2650
|
+
name: string4(),
|
|
2651
|
+
type: FlagType1$inboundSchema,
|
|
2652
|
+
consumable: boolean2(),
|
|
2653
|
+
event_names: optional2(z13.array(string4())),
|
|
2654
|
+
credit_schema: optional2(
|
|
2655
|
+
z13.array(z13.lazy(() => CheckCreditSchema1$inboundSchema))
|
|
2656
|
+
),
|
|
2657
|
+
display: optional2(z13.lazy(() => FlagDisplay1$inboundSchema)),
|
|
2658
|
+
archived: boolean2()
|
|
2659
|
+
}),
|
|
2660
|
+
z13.transform((v) => {
|
|
2661
|
+
return remap(v, {
|
|
2662
|
+
"event_names": "eventNames",
|
|
2663
|
+
"credit_schema": "creditSchema"
|
|
2664
|
+
});
|
|
2665
|
+
})
|
|
2666
|
+
);
|
|
2667
|
+
var Flag1$inboundSchema = z13.pipe(
|
|
2668
|
+
z13.object({
|
|
2669
|
+
id: string4(),
|
|
2670
|
+
plan_id: nullable(string4()),
|
|
2671
|
+
expires_at: nullable(number2()),
|
|
2672
|
+
feature_id: string4(),
|
|
2673
|
+
feature: optional2(z13.lazy(() => CheckFeature1$inboundSchema))
|
|
2674
|
+
}),
|
|
2675
|
+
z13.transform((v) => {
|
|
2676
|
+
return remap(v, {
|
|
2677
|
+
"plan_id": "planId",
|
|
2678
|
+
"expires_at": "expiresAt",
|
|
2679
|
+
"feature_id": "featureId"
|
|
2680
|
+
});
|
|
2681
|
+
})
|
|
2682
|
+
);
|
|
2683
|
+
var Scenario1$inboundSchema = inboundSchema(Scenario1);
|
|
2684
|
+
var CheckEnv1$inboundSchema = inboundSchema(CheckEnv1);
|
|
2685
|
+
var ProductType1$inboundSchema = inboundSchema(ProductType1);
|
|
2686
|
+
var FeatureType1$inboundSchema = inboundSchema(FeatureType1);
|
|
2687
|
+
var IncludedUsage1$inboundSchema = smartUnion([number2(), string4()]);
|
|
2688
|
+
var CheckInterval1$inboundSchema = inboundSchema(CheckInterval1);
|
|
2689
|
+
var CheckTierBehavior1$inboundSchema = inboundSchema(CheckTierBehavior1);
|
|
2690
|
+
var UsageModel1$inboundSchema = inboundSchema(UsageModel1);
|
|
2691
|
+
var ProductDisplay1$inboundSchema = z13.pipe(
|
|
2692
|
+
z13.object({
|
|
2693
|
+
primary_text: string4(),
|
|
2694
|
+
secondary_text: z13.optional(z13.nullable(string4()))
|
|
2695
|
+
}),
|
|
2696
|
+
z13.transform((v) => {
|
|
2697
|
+
return remap(v, {
|
|
2698
|
+
"primary_text": "primaryText",
|
|
2699
|
+
"secondary_text": "secondaryText"
|
|
2700
|
+
});
|
|
2701
|
+
})
|
|
2702
|
+
);
|
|
2703
|
+
var ConfigDuration1$inboundSchema = inboundSchema(ConfigDuration1);
|
|
2704
|
+
var CheckRollover1$inboundSchema = z13.pipe(
|
|
2705
|
+
z13.object({
|
|
2706
|
+
max: z13.optional(z13.nullable(number2())),
|
|
2707
|
+
max_percentage: z13.optional(z13.nullable(number2())),
|
|
2708
|
+
duration: z13._default(ConfigDuration1$inboundSchema, "month"),
|
|
2709
|
+
length: number2()
|
|
2710
|
+
}),
|
|
2711
|
+
z13.transform((v) => {
|
|
2712
|
+
return remap(v, {
|
|
2713
|
+
"max_percentage": "maxPercentage"
|
|
2714
|
+
});
|
|
2715
|
+
})
|
|
2716
|
+
);
|
|
2717
|
+
var CheckOnIncrease1$inboundSchema = inboundSchema(CheckOnIncrease1);
|
|
2718
|
+
var CheckOnDecrease1$inboundSchema = inboundSchema(CheckOnDecrease1);
|
|
2719
|
+
var CheckConfig1$inboundSchema = z13.pipe(
|
|
2720
|
+
z13.object({
|
|
2721
|
+
rollover: z13.optional(
|
|
2722
|
+
z13.nullable(z13.lazy(() => CheckRollover1$inboundSchema))
|
|
2723
|
+
),
|
|
2724
|
+
on_increase: z13.optional(z13.nullable(CheckOnIncrease1$inboundSchema)),
|
|
2725
|
+
on_decrease: z13.optional(z13.nullable(CheckOnDecrease1$inboundSchema))
|
|
2726
|
+
}),
|
|
2727
|
+
z13.transform((v) => {
|
|
2728
|
+
return remap(v, {
|
|
2729
|
+
"on_increase": "onIncrease",
|
|
2730
|
+
"on_decrease": "onDecrease"
|
|
2731
|
+
});
|
|
2732
|
+
})
|
|
2733
|
+
);
|
|
2734
|
+
var CheckItem1$inboundSchema = z13.pipe(
|
|
2735
|
+
z13.object({
|
|
2736
|
+
type: z13.optional(z13.nullable(ProductType1$inboundSchema)),
|
|
2737
|
+
feature_id: z13.optional(z13.nullable(string4())),
|
|
2738
|
+
feature_type: z13.optional(z13.nullable(FeatureType1$inboundSchema)),
|
|
2739
|
+
included_usage: z13.optional(
|
|
2740
|
+
z13.nullable(smartUnion([number2(), string4()]))
|
|
2741
|
+
),
|
|
2742
|
+
interval: z13.optional(z13.nullable(CheckInterval1$inboundSchema)),
|
|
2743
|
+
interval_count: z13.optional(z13.nullable(number2())),
|
|
2744
|
+
price: z13.optional(z13.nullable(number2())),
|
|
2745
|
+
tiers: z13.optional(z13.nullable(z13.array(nullable(z13.any())))),
|
|
2746
|
+
tier_behavior: z13.optional(z13.nullable(CheckTierBehavior1$inboundSchema)),
|
|
2747
|
+
usage_model: z13.optional(z13.nullable(UsageModel1$inboundSchema)),
|
|
2748
|
+
billing_units: z13.optional(z13.nullable(number2())),
|
|
2749
|
+
reset_usage_when_enabled: z13.optional(z13.nullable(boolean2())),
|
|
2750
|
+
entity_feature_id: z13.optional(z13.nullable(string4())),
|
|
2751
|
+
display: z13.optional(
|
|
2752
|
+
z13.nullable(z13.lazy(() => ProductDisplay1$inboundSchema))
|
|
2753
|
+
),
|
|
2754
|
+
quantity: z13.optional(z13.nullable(number2())),
|
|
2755
|
+
next_cycle_quantity: z13.optional(z13.nullable(number2())),
|
|
2756
|
+
config: z13.optional(z13.nullable(z13.lazy(() => CheckConfig1$inboundSchema)))
|
|
2757
|
+
}),
|
|
2758
|
+
z13.transform((v) => {
|
|
2759
|
+
return remap(v, {
|
|
2760
|
+
"feature_id": "featureId",
|
|
2761
|
+
"feature_type": "featureType",
|
|
2762
|
+
"included_usage": "includedUsage",
|
|
2763
|
+
"interval_count": "intervalCount",
|
|
2764
|
+
"tier_behavior": "tierBehavior",
|
|
2765
|
+
"usage_model": "usageModel",
|
|
2766
|
+
"billing_units": "billingUnits",
|
|
2767
|
+
"reset_usage_when_enabled": "resetUsageWhenEnabled",
|
|
2768
|
+
"entity_feature_id": "entityFeatureId",
|
|
2769
|
+
"next_cycle_quantity": "nextCycleQuantity"
|
|
2770
|
+
});
|
|
2771
|
+
})
|
|
2772
|
+
);
|
|
2773
|
+
var FreeTrialDuration1$inboundSchema = inboundSchema(FreeTrialDuration1);
|
|
2774
|
+
var CheckFreeTrial1$inboundSchema = z13.pipe(
|
|
2775
|
+
z13.object({
|
|
2776
|
+
duration: FreeTrialDuration1$inboundSchema,
|
|
2777
|
+
length: number2(),
|
|
2778
|
+
unique_fingerprint: boolean2(),
|
|
2779
|
+
card_required: boolean2(),
|
|
2780
|
+
trial_available: z13.nullable(z13._default(boolean2(), true))
|
|
2781
|
+
}),
|
|
2782
|
+
z13.transform((v) => {
|
|
2783
|
+
return remap(v, {
|
|
2784
|
+
"unique_fingerprint": "uniqueFingerprint",
|
|
2785
|
+
"card_required": "cardRequired",
|
|
2786
|
+
"trial_available": "trialAvailable"
|
|
2787
|
+
});
|
|
2788
|
+
})
|
|
2789
|
+
);
|
|
2790
|
+
var ProductScenario1$inboundSchema = inboundSchema(ProductScenario1);
|
|
2791
|
+
var Properties1$inboundSchema = z13.pipe(
|
|
2792
|
+
z13.object({
|
|
2793
|
+
is_free: boolean2(),
|
|
2794
|
+
is_one_off: boolean2(),
|
|
2795
|
+
interval_group: z13.optional(z13.nullable(string4())),
|
|
2796
|
+
has_trial: z13.optional(z13.nullable(boolean2())),
|
|
2797
|
+
updateable: z13.optional(z13.nullable(boolean2()))
|
|
2798
|
+
}),
|
|
2799
|
+
z13.transform((v) => {
|
|
2800
|
+
return remap(v, {
|
|
2801
|
+
"is_free": "isFree",
|
|
2802
|
+
"is_one_off": "isOneOff",
|
|
2803
|
+
"interval_group": "intervalGroup",
|
|
2804
|
+
"has_trial": "hasTrial"
|
|
2805
|
+
});
|
|
2806
|
+
})
|
|
2807
|
+
);
|
|
2808
|
+
var Product1$inboundSchema = z13.pipe(
|
|
2809
|
+
z13.object({
|
|
2810
|
+
id: string4(),
|
|
2811
|
+
name: string4(),
|
|
2812
|
+
group: nullable(string4()),
|
|
2813
|
+
env: CheckEnv1$inboundSchema,
|
|
2814
|
+
is_add_on: boolean2(),
|
|
2815
|
+
is_default: boolean2(),
|
|
2816
|
+
archived: boolean2(),
|
|
2817
|
+
version: number2(),
|
|
2818
|
+
created_at: number2(),
|
|
2819
|
+
items: z13.array(z13.lazy(() => CheckItem1$inboundSchema)),
|
|
2820
|
+
free_trial: nullable(z13.lazy(() => CheckFreeTrial1$inboundSchema)),
|
|
2821
|
+
base_variant_id: nullable(string4()),
|
|
2822
|
+
scenario: optional2(ProductScenario1$inboundSchema),
|
|
2823
|
+
properties: optional2(z13.lazy(() => Properties1$inboundSchema))
|
|
2824
|
+
}),
|
|
2825
|
+
z13.transform((v) => {
|
|
2826
|
+
return remap(v, {
|
|
2827
|
+
"is_add_on": "isAddOn",
|
|
2828
|
+
"is_default": "isDefault",
|
|
2829
|
+
"created_at": "createdAt",
|
|
2830
|
+
"free_trial": "freeTrial",
|
|
2831
|
+
"base_variant_id": "baseVariantId"
|
|
2832
|
+
});
|
|
2833
|
+
})
|
|
2834
|
+
);
|
|
2835
|
+
var Preview1$inboundSchema = z13.pipe(
|
|
2836
|
+
z13.object({
|
|
2837
|
+
scenario: Scenario1$inboundSchema,
|
|
2838
|
+
title: string4(),
|
|
2839
|
+
message: string4(),
|
|
2840
|
+
feature_id: string4(),
|
|
2841
|
+
feature_name: string4(),
|
|
2842
|
+
products: z13.array(z13.lazy(() => Product1$inboundSchema))
|
|
2843
|
+
}),
|
|
2844
|
+
z13.transform((v) => {
|
|
2845
|
+
return remap(v, {
|
|
2846
|
+
"feature_id": "featureId",
|
|
2847
|
+
"feature_name": "featureName"
|
|
2848
|
+
});
|
|
2849
|
+
})
|
|
2850
|
+
);
|
|
2851
|
+
var CheckResponseBody1$inboundSchema = z13.pipe(
|
|
2852
|
+
z13.object({
|
|
2853
|
+
allowed: boolean2(),
|
|
2854
|
+
customer_id: string4(),
|
|
2855
|
+
entity_id: z13.optional(z13.nullable(string4())),
|
|
2856
|
+
required_balance: optional2(number2()),
|
|
2857
|
+
balance: nullable(Balance$inboundSchema),
|
|
2858
|
+
flag: nullable(z13.lazy(() => Flag1$inboundSchema)),
|
|
2859
|
+
preview: optional2(z13.lazy(() => Preview1$inboundSchema))
|
|
2860
|
+
}),
|
|
2861
|
+
z13.transform((v) => {
|
|
2862
|
+
return remap(v, {
|
|
2863
|
+
"customer_id": "customerId",
|
|
2864
|
+
"entity_id": "entityId",
|
|
2865
|
+
"required_balance": "requiredBalance"
|
|
2866
|
+
});
|
|
2867
|
+
})
|
|
2868
|
+
);
|
|
2869
|
+
var CheckResponse$inboundSchema = smartUnion([
|
|
2870
|
+
z13.lazy(() => CheckResponseBody1$inboundSchema),
|
|
2871
|
+
z13.lazy(() => CheckResponseBody2$inboundSchema)
|
|
2872
|
+
]);
|
|
2552
2873
|
|
|
2553
2874
|
// ../sdk/src/models/create-balance-op.ts
|
|
2554
2875
|
import * as z14 from "zod/v4-mini";
|
|
@@ -4011,7 +4332,13 @@ var CustomerEnv = {
|
|
|
4011
4332
|
Sandbox: "sandbox",
|
|
4012
4333
|
Live: "live"
|
|
4013
4334
|
};
|
|
4014
|
-
var
|
|
4335
|
+
var CustomerInterval2 = {
|
|
4336
|
+
Hour: "hour",
|
|
4337
|
+
Day: "day",
|
|
4338
|
+
Week: "week",
|
|
4339
|
+
Month: "month"
|
|
4340
|
+
};
|
|
4341
|
+
var CustomerInterval1 = {
|
|
4015
4342
|
Hour: "hour",
|
|
4016
4343
|
Day: "day",
|
|
4017
4344
|
Week: "week",
|
|
@@ -4048,10 +4375,26 @@ var CustomerDurationType = {
|
|
|
4048
4375
|
Forever: "forever"
|
|
4049
4376
|
};
|
|
4050
4377
|
var CustomerEnv$inboundSchema = inboundSchema(CustomerEnv);
|
|
4051
|
-
var
|
|
4052
|
-
var
|
|
4378
|
+
var CustomerInterval2$inboundSchema = inboundSchema(CustomerInterval2);
|
|
4379
|
+
var CustomerPurchaseLimit2$inboundSchema = z21.pipe(
|
|
4380
|
+
z21.object({
|
|
4381
|
+
interval: nullable(CustomerInterval2$inboundSchema),
|
|
4382
|
+
interval_count: nullable(number2()),
|
|
4383
|
+
limit: nullable(number2()),
|
|
4384
|
+
count: number2(),
|
|
4385
|
+
next_reset_at: number2()
|
|
4386
|
+
}),
|
|
4387
|
+
z21.transform((v) => {
|
|
4388
|
+
return remap(v, {
|
|
4389
|
+
"interval_count": "intervalCount",
|
|
4390
|
+
"next_reset_at": "nextResetAt"
|
|
4391
|
+
});
|
|
4392
|
+
})
|
|
4393
|
+
);
|
|
4394
|
+
var CustomerInterval1$inboundSchema = inboundSchema(CustomerInterval1);
|
|
4395
|
+
var CustomerPurchaseLimit1$inboundSchema = z21.pipe(
|
|
4053
4396
|
z21.object({
|
|
4054
|
-
interval:
|
|
4397
|
+
interval: CustomerInterval1$inboundSchema,
|
|
4055
4398
|
interval_count: z21._default(number2(), 1),
|
|
4056
4399
|
limit: number2()
|
|
4057
4400
|
}),
|
|
@@ -4061,15 +4404,20 @@ var CustomerPurchaseLimit$inboundSchema = z21.pipe(
|
|
|
4061
4404
|
});
|
|
4062
4405
|
})
|
|
4063
4406
|
);
|
|
4407
|
+
var CustomerPurchaseLimitUnion$inboundSchema = smartUnion([
|
|
4408
|
+
z21.lazy(() => CustomerPurchaseLimit2$inboundSchema),
|
|
4409
|
+
z21.lazy(() => CustomerPurchaseLimit1$inboundSchema)
|
|
4410
|
+
]);
|
|
4064
4411
|
var CustomerAutoTopup$inboundSchema = z21.pipe(
|
|
4065
4412
|
z21.object({
|
|
4066
4413
|
feature_id: string4(),
|
|
4067
4414
|
enabled: z21._default(boolean2(), false),
|
|
4068
4415
|
threshold: number2(),
|
|
4069
4416
|
quantity: number2(),
|
|
4070
|
-
purchase_limit: optional2(
|
|
4071
|
-
z21.lazy(() =>
|
|
4072
|
-
|
|
4417
|
+
purchase_limit: optional2(smartUnion([
|
|
4418
|
+
z21.lazy(() => CustomerPurchaseLimit2$inboundSchema),
|
|
4419
|
+
z21.lazy(() => CustomerPurchaseLimit1$inboundSchema)
|
|
4420
|
+
])),
|
|
4073
4421
|
invoice_mode: optional2(boolean2())
|
|
4074
4422
|
}),
|
|
4075
4423
|
z21.transform((v) => {
|
|
@@ -4523,9 +4871,16 @@ var FinalizeBalanceParams$outboundSchema = z27.pipe(
|
|
|
4523
4871
|
});
|
|
4524
4872
|
})
|
|
4525
4873
|
);
|
|
4526
|
-
var
|
|
4874
|
+
var FinalizeLockResponseBody2$inboundSchema = z27.object({
|
|
4875
|
+
success: boolean2()
|
|
4876
|
+
});
|
|
4877
|
+
var FinalizeLockResponseBody1$inboundSchema = z27.object({
|
|
4527
4878
|
success: boolean2()
|
|
4528
4879
|
});
|
|
4880
|
+
var FinalizeLockResponse$inboundSchema = smartUnion([
|
|
4881
|
+
z27.lazy(() => FinalizeLockResponseBody1$inboundSchema),
|
|
4882
|
+
z27.lazy(() => FinalizeLockResponseBody2$inboundSchema)
|
|
4883
|
+
]);
|
|
4529
4884
|
|
|
4530
4885
|
// ../sdk/src/models/get-entity-op.ts
|
|
4531
4886
|
import * as z28 from "zod/v4-mini";
|
|
@@ -5320,7 +5675,13 @@ var ListCustomersEnv = {
|
|
|
5320
5675
|
Sandbox: "sandbox",
|
|
5321
5676
|
Live: "live"
|
|
5322
5677
|
};
|
|
5323
|
-
var
|
|
5678
|
+
var ListCustomersInterval2 = {
|
|
5679
|
+
Hour: "hour",
|
|
5680
|
+
Day: "day",
|
|
5681
|
+
Week: "week",
|
|
5682
|
+
Month: "month"
|
|
5683
|
+
};
|
|
5684
|
+
var ListCustomersInterval1 = {
|
|
5324
5685
|
Hour: "hour",
|
|
5325
5686
|
Day: "day",
|
|
5326
5687
|
Week: "week",
|
|
@@ -5365,10 +5726,26 @@ var ListCustomersParams$outboundSchema = z32.pipe(
|
|
|
5365
5726
|
})
|
|
5366
5727
|
);
|
|
5367
5728
|
var ListCustomersEnv$inboundSchema = inboundSchema(ListCustomersEnv);
|
|
5368
|
-
var
|
|
5369
|
-
var
|
|
5729
|
+
var ListCustomersInterval2$inboundSchema = inboundSchema(ListCustomersInterval2);
|
|
5730
|
+
var ListCustomersPurchaseLimit2$inboundSchema = z32.pipe(
|
|
5370
5731
|
z32.object({
|
|
5371
|
-
interval:
|
|
5732
|
+
interval: nullable(ListCustomersInterval2$inboundSchema),
|
|
5733
|
+
interval_count: nullable(number2()),
|
|
5734
|
+
limit: nullable(number2()),
|
|
5735
|
+
count: number2(),
|
|
5736
|
+
next_reset_at: number2()
|
|
5737
|
+
}),
|
|
5738
|
+
z32.transform((v) => {
|
|
5739
|
+
return remap(v, {
|
|
5740
|
+
"interval_count": "intervalCount",
|
|
5741
|
+
"next_reset_at": "nextResetAt"
|
|
5742
|
+
});
|
|
5743
|
+
})
|
|
5744
|
+
);
|
|
5745
|
+
var ListCustomersInterval1$inboundSchema = inboundSchema(ListCustomersInterval1);
|
|
5746
|
+
var ListCustomersPurchaseLimit1$inboundSchema = z32.pipe(
|
|
5747
|
+
z32.object({
|
|
5748
|
+
interval: ListCustomersInterval1$inboundSchema,
|
|
5372
5749
|
interval_count: z32._default(number2(), 1),
|
|
5373
5750
|
limit: number2()
|
|
5374
5751
|
}),
|
|
@@ -5378,15 +5755,20 @@ var ListCustomersPurchaseLimit$inboundSchema = z32.pipe(
|
|
|
5378
5755
|
});
|
|
5379
5756
|
})
|
|
5380
5757
|
);
|
|
5758
|
+
var ListCustomersPurchaseLimitUnion$inboundSchema = smartUnion([
|
|
5759
|
+
z32.lazy(() => ListCustomersPurchaseLimit2$inboundSchema),
|
|
5760
|
+
z32.lazy(() => ListCustomersPurchaseLimit1$inboundSchema)
|
|
5761
|
+
]);
|
|
5381
5762
|
var ListCustomersAutoTopup$inboundSchema = z32.pipe(
|
|
5382
5763
|
z32.object({
|
|
5383
5764
|
feature_id: string4(),
|
|
5384
5765
|
enabled: z32._default(boolean2(), false),
|
|
5385
5766
|
threshold: number2(),
|
|
5386
5767
|
quantity: number2(),
|
|
5387
|
-
purchase_limit: optional2(
|
|
5388
|
-
z32.lazy(() =>
|
|
5389
|
-
|
|
5768
|
+
purchase_limit: optional2(smartUnion([
|
|
5769
|
+
z32.lazy(() => ListCustomersPurchaseLimit2$inboundSchema),
|
|
5770
|
+
z32.lazy(() => ListCustomersPurchaseLimit1$inboundSchema)
|
|
5771
|
+
])),
|
|
5390
5772
|
invoice_mode: optional2(boolean2())
|
|
5391
5773
|
}),
|
|
5392
5774
|
z32.transform((v) => {
|
|
@@ -6385,6 +6767,7 @@ var MultiAttachParams$outboundSchema = z36.pipe(
|
|
|
6385
6767
|
"if_required"
|
|
6386
6768
|
),
|
|
6387
6769
|
newBillingSubscription: z36.optional(z36.boolean()),
|
|
6770
|
+
enablePlanImmediately: z36.optional(z36.boolean()),
|
|
6388
6771
|
customerData: z36.optional(CustomerData$outboundSchema),
|
|
6389
6772
|
entityData: z36.optional(z36.lazy(() => MultiAttachEntityData$outboundSchema))
|
|
6390
6773
|
}),
|
|
@@ -6398,6 +6781,7 @@ var MultiAttachParams$outboundSchema = z36.pipe(
|
|
|
6398
6781
|
checkoutSessionParams: "checkout_session_params",
|
|
6399
6782
|
redirectMode: "redirect_mode",
|
|
6400
6783
|
newBillingSubscription: "new_billing_subscription",
|
|
6784
|
+
enablePlanImmediately: "enable_plan_immediately",
|
|
6401
6785
|
customerData: "customer_data",
|
|
6402
6786
|
entityData: "entity_data"
|
|
6403
6787
|
});
|
|
@@ -6547,6 +6931,10 @@ var PreviewAttachCheckoutType = {
|
|
|
6547
6931
|
StripeCheckout: "stripe_checkout",
|
|
6548
6932
|
AutumnCheckout: "autumn_checkout"
|
|
6549
6933
|
};
|
|
6934
|
+
var PreviewAttachStatus = {
|
|
6935
|
+
Complete: "complete",
|
|
6936
|
+
Incomplete: "incomplete"
|
|
6937
|
+
};
|
|
6550
6938
|
var PreviewAttachFeatureQuantityRequest$outboundSchema = z38.pipe(
|
|
6551
6939
|
z38.object({
|
|
6552
6940
|
featureId: z38.string(),
|
|
@@ -6793,7 +7181,8 @@ var PreviewAttachParams$outboundSchema = z38.pipe(
|
|
|
6793
7181
|
z38.lazy(() => PreviewAttachCarryOverUsages$outboundSchema)
|
|
6794
7182
|
),
|
|
6795
7183
|
metadata: z38.optional(z38.record(z38.string(), z38.string())),
|
|
6796
|
-
noBillingChanges: z38.optional(z38.boolean())
|
|
7184
|
+
noBillingChanges: z38.optional(z38.boolean()),
|
|
7185
|
+
enablePlanImmediately: z38.optional(z38.boolean())
|
|
6797
7186
|
}),
|
|
6798
7187
|
z38.transform((v) => {
|
|
6799
7188
|
return remap(v, {
|
|
@@ -6814,7 +7203,8 @@ var PreviewAttachParams$outboundSchema = z38.pipe(
|
|
|
6814
7203
|
processorSubscriptionId: "processor_subscription_id",
|
|
6815
7204
|
carryOverBalances: "carry_over_balances",
|
|
6816
7205
|
carryOverUsages: "carry_over_usages",
|
|
6817
|
-
noBillingChanges: "no_billing_changes"
|
|
7206
|
+
noBillingChanges: "no_billing_changes",
|
|
7207
|
+
enablePlanImmediately: "enable_plan_immediately"
|
|
6818
7208
|
});
|
|
6819
7209
|
})
|
|
6820
7210
|
);
|
|
@@ -7012,6 +7402,22 @@ var PreviewAttachOutgoing$inboundSchema = z38.pipe(
|
|
|
7012
7402
|
})
|
|
7013
7403
|
);
|
|
7014
7404
|
var PreviewAttachCheckoutType$inboundSchema = inboundSchema(PreviewAttachCheckoutType);
|
|
7405
|
+
var PreviewAttachStatus$inboundSchema = inboundSchema(PreviewAttachStatus);
|
|
7406
|
+
var PreviewAttachTax$inboundSchema = z38.pipe(
|
|
7407
|
+
z38.object({
|
|
7408
|
+
total: number2(),
|
|
7409
|
+
amount_inclusive: number2(),
|
|
7410
|
+
amount_exclusive: number2(),
|
|
7411
|
+
currency: string4(),
|
|
7412
|
+
status: PreviewAttachStatus$inboundSchema
|
|
7413
|
+
}),
|
|
7414
|
+
z38.transform((v) => {
|
|
7415
|
+
return remap(v, {
|
|
7416
|
+
"amount_inclusive": "amountInclusive",
|
|
7417
|
+
"amount_exclusive": "amountExclusive"
|
|
7418
|
+
});
|
|
7419
|
+
})
|
|
7420
|
+
);
|
|
7015
7421
|
var PreviewAttachResponse$inboundSchema = z38.pipe(
|
|
7016
7422
|
z38.object({
|
|
7017
7423
|
customer_id: string4(),
|
|
@@ -7026,7 +7432,8 @@ var PreviewAttachResponse$inboundSchema = z38.pipe(
|
|
|
7026
7432
|
incoming: z38.array(z38.lazy(() => PreviewAttachIncoming$inboundSchema)),
|
|
7027
7433
|
outgoing: z38.array(z38.lazy(() => PreviewAttachOutgoing$inboundSchema)),
|
|
7028
7434
|
redirect_to_checkout: boolean2(),
|
|
7029
|
-
checkout_type: nullable(PreviewAttachCheckoutType$inboundSchema)
|
|
7435
|
+
checkout_type: nullable(PreviewAttachCheckoutType$inboundSchema),
|
|
7436
|
+
tax: optional2(z38.lazy(() => PreviewAttachTax$inboundSchema))
|
|
7030
7437
|
}),
|
|
7031
7438
|
z38.transform((v) => {
|
|
7032
7439
|
return remap(v, {
|
|
@@ -7113,6 +7520,10 @@ var PreviewMultiAttachCheckoutType = {
|
|
|
7113
7520
|
StripeCheckout: "stripe_checkout",
|
|
7114
7521
|
AutumnCheckout: "autumn_checkout"
|
|
7115
7522
|
};
|
|
7523
|
+
var PreviewMultiAttachStatus = {
|
|
7524
|
+
Complete: "complete",
|
|
7525
|
+
Incomplete: "incomplete"
|
|
7526
|
+
};
|
|
7116
7527
|
var PreviewMultiAttachPriceInterval$outboundSchema = z39.enum(PreviewMultiAttachPriceInterval);
|
|
7117
7528
|
var PreviewMultiAttachBasePrice$outboundSchema = z39.pipe(
|
|
7118
7529
|
z39.object({
|
|
@@ -7410,6 +7821,7 @@ var PreviewMultiAttachParams$outboundSchema = z39.pipe(
|
|
|
7410
7821
|
"if_required"
|
|
7411
7822
|
),
|
|
7412
7823
|
newBillingSubscription: z39.optional(z39.boolean()),
|
|
7824
|
+
enablePlanImmediately: z39.optional(z39.boolean()),
|
|
7413
7825
|
customerData: z39.optional(CustomerData$outboundSchema),
|
|
7414
7826
|
entityData: z39.optional(
|
|
7415
7827
|
z39.lazy(() => PreviewMultiAttachEntityData$outboundSchema)
|
|
@@ -7425,6 +7837,7 @@ var PreviewMultiAttachParams$outboundSchema = z39.pipe(
|
|
|
7425
7837
|
checkoutSessionParams: "checkout_session_params",
|
|
7426
7838
|
redirectMode: "redirect_mode",
|
|
7427
7839
|
newBillingSubscription: "new_billing_subscription",
|
|
7840
|
+
enablePlanImmediately: "enable_plan_immediately",
|
|
7428
7841
|
customerData: "customer_data",
|
|
7429
7842
|
entityData: "entity_data"
|
|
7430
7843
|
});
|
|
@@ -7624,6 +8037,22 @@ var PreviewMultiAttachOutgoing$inboundSchema = z39.pipe(
|
|
|
7624
8037
|
})
|
|
7625
8038
|
);
|
|
7626
8039
|
var PreviewMultiAttachCheckoutType$inboundSchema = inboundSchema(PreviewMultiAttachCheckoutType);
|
|
8040
|
+
var PreviewMultiAttachStatus$inboundSchema = inboundSchema(PreviewMultiAttachStatus);
|
|
8041
|
+
var PreviewMultiAttachTax$inboundSchema = z39.pipe(
|
|
8042
|
+
z39.object({
|
|
8043
|
+
total: number2(),
|
|
8044
|
+
amount_inclusive: number2(),
|
|
8045
|
+
amount_exclusive: number2(),
|
|
8046
|
+
currency: string4(),
|
|
8047
|
+
status: PreviewMultiAttachStatus$inboundSchema
|
|
8048
|
+
}),
|
|
8049
|
+
z39.transform((v) => {
|
|
8050
|
+
return remap(v, {
|
|
8051
|
+
"amount_inclusive": "amountInclusive",
|
|
8052
|
+
"amount_exclusive": "amountExclusive"
|
|
8053
|
+
});
|
|
8054
|
+
})
|
|
8055
|
+
);
|
|
7627
8056
|
var PreviewMultiAttachResponse$inboundSchema = z39.pipe(
|
|
7628
8057
|
z39.object({
|
|
7629
8058
|
customer_id: string4(),
|
|
@@ -7638,7 +8067,8 @@ var PreviewMultiAttachResponse$inboundSchema = z39.pipe(
|
|
|
7638
8067
|
incoming: z39.array(z39.lazy(() => PreviewMultiAttachIncoming$inboundSchema)),
|
|
7639
8068
|
outgoing: z39.array(z39.lazy(() => PreviewMultiAttachOutgoing$inboundSchema)),
|
|
7640
8069
|
redirect_to_checkout: boolean2(),
|
|
7641
|
-
checkout_type: nullable(PreviewMultiAttachCheckoutType$inboundSchema)
|
|
8070
|
+
checkout_type: nullable(PreviewMultiAttachCheckoutType$inboundSchema),
|
|
8071
|
+
tax: optional2(z39.lazy(() => PreviewMultiAttachTax$inboundSchema))
|
|
7642
8072
|
}),
|
|
7643
8073
|
z39.transform((v) => {
|
|
7644
8074
|
return remap(v, {
|
|
@@ -8492,7 +8922,8 @@ var SetupPaymentParams$outboundSchema = z42.pipe(
|
|
|
8492
8922
|
z42.lazy(() => SetupPaymentCarryOverUsages$outboundSchema)
|
|
8493
8923
|
),
|
|
8494
8924
|
metadata: z42.optional(z42.record(z42.string(), z42.string())),
|
|
8495
|
-
noBillingChanges: z42.optional(z42.boolean())
|
|
8925
|
+
noBillingChanges: z42.optional(z42.boolean()),
|
|
8926
|
+
enablePlanImmediately: z42.optional(z42.boolean())
|
|
8496
8927
|
}),
|
|
8497
8928
|
z42.transform((v) => {
|
|
8498
8929
|
return remap(v, {
|
|
@@ -8509,7 +8940,8 @@ var SetupPaymentParams$outboundSchema = z42.pipe(
|
|
|
8509
8940
|
processorSubscriptionId: "processor_subscription_id",
|
|
8510
8941
|
carryOverBalances: "carry_over_balances",
|
|
8511
8942
|
carryOverUsages: "carry_over_usages",
|
|
8512
|
-
noBillingChanges: "no_billing_changes"
|
|
8943
|
+
noBillingChanges: "no_billing_changes",
|
|
8944
|
+
enablePlanImmediately: "enable_plan_immediately"
|
|
8513
8945
|
});
|
|
8514
8946
|
})
|
|
8515
8947
|
);
|
|
@@ -8561,7 +8993,7 @@ var TrackParams$outboundSchema = z43.pipe(
|
|
|
8561
8993
|
});
|
|
8562
8994
|
})
|
|
8563
8995
|
);
|
|
8564
|
-
var
|
|
8996
|
+
var TrackResponseBody2$inboundSchema = z43.pipe(
|
|
8565
8997
|
z43.object({
|
|
8566
8998
|
customer_id: string4(),
|
|
8567
8999
|
entity_id: optional2(string4()),
|
|
@@ -8578,6 +9010,27 @@ var TrackResponse$inboundSchema = z43.pipe(
|
|
|
8578
9010
|
});
|
|
8579
9011
|
})
|
|
8580
9012
|
);
|
|
9013
|
+
var TrackResponseBody1$inboundSchema = z43.pipe(
|
|
9014
|
+
z43.object({
|
|
9015
|
+
customer_id: string4(),
|
|
9016
|
+
entity_id: optional2(string4()),
|
|
9017
|
+
event_name: optional2(string4()),
|
|
9018
|
+
value: number2(),
|
|
9019
|
+
balance: nullable(Balance$inboundSchema),
|
|
9020
|
+
balances: optional2(z43.record(z43.string(), Balance$inboundSchema))
|
|
9021
|
+
}),
|
|
9022
|
+
z43.transform((v) => {
|
|
9023
|
+
return remap(v, {
|
|
9024
|
+
"customer_id": "customerId",
|
|
9025
|
+
"entity_id": "entityId",
|
|
9026
|
+
"event_name": "eventName"
|
|
9027
|
+
});
|
|
9028
|
+
})
|
|
9029
|
+
);
|
|
9030
|
+
var TrackResponse$inboundSchema = smartUnion([
|
|
9031
|
+
z43.lazy(() => TrackResponseBody1$inboundSchema),
|
|
9032
|
+
z43.lazy(() => TrackResponseBody2$inboundSchema)
|
|
9033
|
+
]);
|
|
8581
9034
|
|
|
8582
9035
|
// ../sdk/src/models/update-balance-op.ts
|
|
8583
9036
|
import * as z44 from "zod/v4-mini";
|
|
@@ -8640,7 +9093,13 @@ var UpdateCustomerEnv = {
|
|
|
8640
9093
|
Sandbox: "sandbox",
|
|
8641
9094
|
Live: "live"
|
|
8642
9095
|
};
|
|
8643
|
-
var
|
|
9096
|
+
var UpdateCustomerIntervalResponse2 = {
|
|
9097
|
+
Hour: "hour",
|
|
9098
|
+
Day: "day",
|
|
9099
|
+
Week: "week",
|
|
9100
|
+
Month: "month"
|
|
9101
|
+
};
|
|
9102
|
+
var UpdateCustomerIntervalResponse1 = {
|
|
8644
9103
|
Hour: "hour",
|
|
8645
9104
|
Day: "day",
|
|
8646
9105
|
Week: "week",
|
|
@@ -8797,10 +9256,26 @@ var UpdateCustomerParams$outboundSchema = z45.pipe(
|
|
|
8797
9256
|
})
|
|
8798
9257
|
);
|
|
8799
9258
|
var UpdateCustomerEnv$inboundSchema = inboundSchema(UpdateCustomerEnv);
|
|
8800
|
-
var
|
|
8801
|
-
var
|
|
9259
|
+
var UpdateCustomerIntervalResponse2$inboundSchema = inboundSchema(UpdateCustomerIntervalResponse2);
|
|
9260
|
+
var UpdateCustomerPurchaseLimitResponse2$inboundSchema = z45.pipe(
|
|
8802
9261
|
z45.object({
|
|
8803
|
-
interval:
|
|
9262
|
+
interval: nullable(UpdateCustomerIntervalResponse2$inboundSchema),
|
|
9263
|
+
interval_count: nullable(number2()),
|
|
9264
|
+
limit: nullable(number2()),
|
|
9265
|
+
count: number2(),
|
|
9266
|
+
next_reset_at: number2()
|
|
9267
|
+
}),
|
|
9268
|
+
z45.transform((v) => {
|
|
9269
|
+
return remap(v, {
|
|
9270
|
+
"interval_count": "intervalCount",
|
|
9271
|
+
"next_reset_at": "nextResetAt"
|
|
9272
|
+
});
|
|
9273
|
+
})
|
|
9274
|
+
);
|
|
9275
|
+
var UpdateCustomerIntervalResponse1$inboundSchema = inboundSchema(UpdateCustomerIntervalResponse1);
|
|
9276
|
+
var UpdateCustomerPurchaseLimitResponse1$inboundSchema = z45.pipe(
|
|
9277
|
+
z45.object({
|
|
9278
|
+
interval: UpdateCustomerIntervalResponse1$inboundSchema,
|
|
8804
9279
|
interval_count: z45._default(number2(), 1),
|
|
8805
9280
|
limit: number2()
|
|
8806
9281
|
}),
|
|
@@ -8810,15 +9285,20 @@ var UpdateCustomerPurchaseLimitResponse$inboundSchema = z45.pipe(
|
|
|
8810
9285
|
});
|
|
8811
9286
|
})
|
|
8812
9287
|
);
|
|
9288
|
+
var UpdateCustomerPurchaseLimitUnion$inboundSchema = smartUnion([
|
|
9289
|
+
z45.lazy(() => UpdateCustomerPurchaseLimitResponse2$inboundSchema),
|
|
9290
|
+
z45.lazy(() => UpdateCustomerPurchaseLimitResponse1$inboundSchema)
|
|
9291
|
+
]);
|
|
8813
9292
|
var UpdateCustomerAutoTopupResponse$inboundSchema = z45.pipe(
|
|
8814
9293
|
z45.object({
|
|
8815
9294
|
feature_id: string4(),
|
|
8816
9295
|
enabled: z45._default(boolean2(), false),
|
|
8817
9296
|
threshold: number2(),
|
|
8818
9297
|
quantity: number2(),
|
|
8819
|
-
purchase_limit: optional2(
|
|
8820
|
-
z45.lazy(() =>
|
|
8821
|
-
|
|
9298
|
+
purchase_limit: optional2(smartUnion([
|
|
9299
|
+
z45.lazy(() => UpdateCustomerPurchaseLimitResponse2$inboundSchema),
|
|
9300
|
+
z45.lazy(() => UpdateCustomerPurchaseLimitResponse1$inboundSchema)
|
|
9301
|
+
])),
|
|
8822
9302
|
invoice_mode: optional2(boolean2())
|
|
8823
9303
|
}),
|
|
8824
9304
|
z45.transform((v) => {
|
|
@@ -10062,6 +10542,7 @@ async function $do(client, request, options) {
|
|
|
10062
10542
|
const response = doResult.value;
|
|
10063
10543
|
const [result] = await match(
|
|
10064
10544
|
json(200, CheckResponse$inboundSchema),
|
|
10545
|
+
json(202, CheckResponse$inboundSchema),
|
|
10065
10546
|
fail("4XX"),
|
|
10066
10547
|
fail("5XX")
|
|
10067
10548
|
)(response, req);
|
|
@@ -10140,6 +10621,7 @@ async function $do2(client, request, options) {
|
|
|
10140
10621
|
const response = doResult.value;
|
|
10141
10622
|
const [result] = await match(
|
|
10142
10623
|
json(200, TrackResponse$inboundSchema),
|
|
10624
|
+
json(202, TrackResponse$inboundSchema),
|
|
10143
10625
|
fail("4XX"),
|
|
10144
10626
|
fail("5XX")
|
|
10145
10627
|
)(response, req);
|
|
@@ -10380,8 +10862,8 @@ var SDK_METADATA = {
|
|
|
10380
10862
|
language: "typescript",
|
|
10381
10863
|
openapiDocVersion: "2.2.0",
|
|
10382
10864
|
sdkVersion: "0.10.17",
|
|
10383
|
-
genVersion: "2.881.
|
|
10384
|
-
userAgent: "speakeasy-sdk/typescript 0.10.17 2.881.
|
|
10865
|
+
genVersion: "2.881.16",
|
|
10866
|
+
userAgent: "speakeasy-sdk/typescript 0.10.17 2.881.16 2.2.0 @useautumn/sdk"
|
|
10385
10867
|
};
|
|
10386
10868
|
|
|
10387
10869
|
// ../sdk/src/lib/retries.ts
|
|
@@ -11007,6 +11489,7 @@ async function $do5(client, request, options) {
|
|
|
11007
11489
|
const response = doResult.value;
|
|
11008
11490
|
const [result] = await match(
|
|
11009
11491
|
json(200, FinalizeLockResponse$inboundSchema),
|
|
11492
|
+
json(202, FinalizeLockResponse$inboundSchema),
|
|
11010
11493
|
fail("4XX"),
|
|
11011
11494
|
fail("5XX")
|
|
11012
11495
|
)(response, req);
|
|
@@ -11809,6 +12292,7 @@ var Billing = class extends ClientSDK {
|
|
|
11809
12292
|
* @param carryOverUsages - Whether to carry over usages from the previous plan. (optional)
|
|
11810
12293
|
* @param metadata - Key-value metadata to attach to the Stripe subscription, invoice, and checkout session created during this attach flow. Keys prefixed with 'autumn_' are reserved and will be stripped. (optional)
|
|
11811
12294
|
* @param noBillingChanges - If true, skips any billing changes for the attach operation. (optional)
|
|
12295
|
+
* @param enablePlanImmediately - If true, the customer's plan is activated immediately even when payment is deferred (invoice mode) or pending (Stripe checkout). For Stripe checkout, the customer_product is inserted before the customer completes the hosted form. (optional)
|
|
11812
12296
|
*
|
|
11813
12297
|
* @returns A billing response with customer ID, invoice details, and payment URL (if checkout required).
|
|
11814
12298
|
*/
|
|
@@ -11852,6 +12336,7 @@ var Billing = class extends ClientSDK {
|
|
|
11852
12336
|
* @param checkoutSessionParams - Additional parameters to pass into the creation of the Stripe checkout session. (optional)
|
|
11853
12337
|
* @param redirectMode - Controls when to return a checkout URL. 'always' returns a URL even if payment succeeds, 'if_required' only when payment action is needed, 'never' disables redirects. (optional)
|
|
11854
12338
|
* @param newBillingSubscription - Only applicable when the customer has an existing Stripe subscription. If true, creates a new separate subscription instead of merging into the existing one. (optional)
|
|
12339
|
+
* @param enablePlanImmediately - If true, the cusProducts are activated immediately even when payment is pending via Stripe checkout. (optional)
|
|
11855
12340
|
*
|
|
11856
12341
|
* @returns A billing response with customer ID, invoice details, and payment URL (if checkout required).
|
|
11857
12342
|
*/
|
|
@@ -11895,6 +12380,7 @@ var Billing = class extends ClientSDK {
|
|
|
11895
12380
|
* @param carryOverUsages - Whether to carry over usages from the previous plan. (optional)
|
|
11896
12381
|
* @param metadata - Key-value metadata to attach to the Stripe subscription, invoice, and checkout session created during this attach flow. Keys prefixed with 'autumn_' are reserved and will be stripped. (optional)
|
|
11897
12382
|
* @param noBillingChanges - If true, skips any billing changes for the attach operation. (optional)
|
|
12383
|
+
* @param enablePlanImmediately - If true, the customer's plan is activated immediately even when payment is deferred (invoice mode) or pending (Stripe checkout). For Stripe checkout, the customer_product is inserted before the customer completes the hosted form. (optional)
|
|
11898
12384
|
*
|
|
11899
12385
|
* @returns A preview response with line items, totals, and effective dates for the proposed changes.
|
|
11900
12386
|
*/
|
|
@@ -11926,6 +12412,7 @@ var Billing = class extends ClientSDK {
|
|
|
11926
12412
|
* @param checkoutSessionParams - Additional parameters to pass into the creation of the Stripe checkout session. (optional)
|
|
11927
12413
|
* @param redirectMode - Controls when to return a checkout URL. 'always' returns a URL even if payment succeeds, 'if_required' only when payment action is needed, 'never' disables redirects. (optional)
|
|
11928
12414
|
* @param newBillingSubscription - Only applicable when the customer has an existing Stripe subscription. If true, creates a new separate subscription instead of merging into the existing one. (optional)
|
|
12415
|
+
* @param enablePlanImmediately - If true, the cusProducts are activated immediately even when payment is pending via Stripe checkout. (optional)
|
|
11929
12416
|
*
|
|
11930
12417
|
* @returns A preview response with line items, totals, and effective dates for the proposed multi-plan attachment.
|
|
11931
12418
|
*/
|
|
@@ -14405,7 +14892,7 @@ var Autumn = class extends ClientSDK {
|
|
|
14405
14892
|
* @param lock - Reserve units of a feature upfront by passing a lock_id, then call balances.finalize to confirm or release the hold. (optional)
|
|
14406
14893
|
* @param withPreview - If true, includes upgrade/upsell information in the response when access is denied. Useful for displaying paywalls. (optional)
|
|
14407
14894
|
*
|
|
14408
|
-
* @returns Whether access is allowed, plus the current balance for that feature.
|
|
14895
|
+
* @returns Whether access is allowed, plus the current balance for that feature. If Autumn is experiencing degraded service from a downstream provider, the API may return 202 and allow access fail-open.
|
|
14409
14896
|
*/
|
|
14410
14897
|
async check(request, options) {
|
|
14411
14898
|
return unwrapAsync(check(
|
|
@@ -14438,7 +14925,7 @@ var Autumn = class extends ClientSDK {
|
|
|
14438
14925
|
* @param value - The amount of usage to record. Defaults to 1. Use negative values to credit balance (e.g., when removing a seat). (optional)
|
|
14439
14926
|
* @param properties - Additional properties to attach to this usage event. (optional)
|
|
14440
14927
|
*
|
|
14441
|
-
* @returns The usage value recorded, with either a single updated balance or a map of updated balances.
|
|
14928
|
+
* @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.
|
|
14442
14929
|
*/
|
|
14443
14930
|
async track(request, options) {
|
|
14444
14931
|
return unwrapAsync(track(
|