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
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
routeConfigs,
|
|
9
9
|
sanitizeBody,
|
|
10
10
|
secretKeyCheck
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-ZO3KGM5W.mjs";
|
|
12
12
|
import {
|
|
13
13
|
getActiveOrganization
|
|
14
14
|
} from "./chunk-BT3EAYVW.mjs";
|
|
@@ -60,8 +60,8 @@ var SDK_METADATA = {
|
|
|
60
60
|
language: "typescript",
|
|
61
61
|
openapiDocVersion: "2.2.0",
|
|
62
62
|
sdkVersion: "0.10.17",
|
|
63
|
-
genVersion: "2.881.
|
|
64
|
-
userAgent: "speakeasy-sdk/typescript 0.10.17 2.881.
|
|
63
|
+
genVersion: "2.881.16",
|
|
64
|
+
userAgent: "speakeasy-sdk/typescript 0.10.17 2.881.16 2.2.0 @useautumn/sdk"
|
|
65
65
|
};
|
|
66
66
|
|
|
67
67
|
// ../sdk/src/lib/http.ts
|
|
@@ -1691,7 +1691,8 @@ var AttachParams$outboundSchema = z10.pipe(
|
|
|
1691
1691
|
z10.lazy(() => AttachCarryOverUsages$outboundSchema)
|
|
1692
1692
|
),
|
|
1693
1693
|
metadata: z10.optional(z10.record(z10.string(), z10.string())),
|
|
1694
|
-
noBillingChanges: z10.optional(z10.boolean())
|
|
1694
|
+
noBillingChanges: z10.optional(z10.boolean()),
|
|
1695
|
+
enablePlanImmediately: z10.optional(z10.boolean())
|
|
1695
1696
|
}),
|
|
1696
1697
|
z10.transform((v) => {
|
|
1697
1698
|
return remap(v, {
|
|
@@ -1712,7 +1713,8 @@ var AttachParams$outboundSchema = z10.pipe(
|
|
|
1712
1713
|
processorSubscriptionId: "processor_subscription_id",
|
|
1713
1714
|
carryOverBalances: "carry_over_balances",
|
|
1714
1715
|
carryOverUsages: "carry_over_usages",
|
|
1715
|
-
noBillingChanges: "no_billing_changes"
|
|
1716
|
+
noBillingChanges: "no_billing_changes",
|
|
1717
|
+
enablePlanImmediately: "enable_plan_immediately"
|
|
1716
1718
|
});
|
|
1717
1719
|
})
|
|
1718
1720
|
);
|
|
@@ -2264,31 +2266,31 @@ var BillingUpdateResponse$inboundSchema = z12.pipe(
|
|
|
2264
2266
|
|
|
2265
2267
|
// ../sdk/src/models/check-op.ts
|
|
2266
2268
|
import * as z13 from "zod/v4-mini";
|
|
2267
|
-
var
|
|
2269
|
+
var FlagType2 = {
|
|
2268
2270
|
Boolean: "boolean",
|
|
2269
2271
|
Metered: "metered",
|
|
2270
2272
|
CreditSystem: "credit_system"
|
|
2271
2273
|
};
|
|
2272
|
-
var
|
|
2274
|
+
var Scenario2 = {
|
|
2273
2275
|
UsageLimit: "usage_limit",
|
|
2274
2276
|
FeatureFlag: "feature_flag"
|
|
2275
2277
|
};
|
|
2276
|
-
var
|
|
2278
|
+
var CheckEnv2 = {
|
|
2277
2279
|
Sandbox: "sandbox",
|
|
2278
2280
|
Live: "live"
|
|
2279
2281
|
};
|
|
2280
|
-
var
|
|
2282
|
+
var ProductType2 = {
|
|
2281
2283
|
Feature: "feature",
|
|
2282
2284
|
PricedFeature: "priced_feature",
|
|
2283
2285
|
Price: "price"
|
|
2284
2286
|
};
|
|
2285
|
-
var
|
|
2287
|
+
var FeatureType2 = {
|
|
2286
2288
|
SingleUse: "single_use",
|
|
2287
2289
|
ContinuousUse: "continuous_use",
|
|
2288
2290
|
Boolean: "boolean",
|
|
2289
2291
|
Static: "static"
|
|
2290
2292
|
};
|
|
2291
|
-
var
|
|
2293
|
+
var CheckInterval2 = {
|
|
2292
2294
|
Minute: "minute",
|
|
2293
2295
|
Hour: "hour",
|
|
2294
2296
|
Day: "day",
|
|
@@ -2298,37 +2300,113 @@ var CheckInterval = {
|
|
|
2298
2300
|
SemiAnnual: "semi_annual",
|
|
2299
2301
|
Year: "year"
|
|
2300
2302
|
};
|
|
2301
|
-
var
|
|
2303
|
+
var CheckTierBehavior2 = {
|
|
2302
2304
|
Graduated: "graduated",
|
|
2303
2305
|
Volume: "volume"
|
|
2304
2306
|
};
|
|
2305
|
-
var
|
|
2307
|
+
var UsageModel2 = {
|
|
2306
2308
|
Prepaid: "prepaid",
|
|
2307
2309
|
PayPerUse: "pay_per_use"
|
|
2308
2310
|
};
|
|
2309
|
-
var
|
|
2311
|
+
var ConfigDuration2 = {
|
|
2310
2312
|
Month: "month",
|
|
2311
2313
|
Forever: "forever"
|
|
2312
2314
|
};
|
|
2313
|
-
var
|
|
2315
|
+
var CheckOnIncrease2 = {
|
|
2314
2316
|
BillImmediately: "bill_immediately",
|
|
2315
2317
|
ProrateImmediately: "prorate_immediately",
|
|
2316
2318
|
ProrateNextCycle: "prorate_next_cycle",
|
|
2317
2319
|
BillNextCycle: "bill_next_cycle"
|
|
2318
2320
|
};
|
|
2319
|
-
var
|
|
2321
|
+
var CheckOnDecrease2 = {
|
|
2320
2322
|
Prorate: "prorate",
|
|
2321
2323
|
ProrateImmediately: "prorate_immediately",
|
|
2322
2324
|
ProrateNextCycle: "prorate_next_cycle",
|
|
2323
2325
|
None: "none",
|
|
2324
2326
|
NoProrations: "no_prorations"
|
|
2325
2327
|
};
|
|
2326
|
-
var
|
|
2328
|
+
var FreeTrialDuration2 = {
|
|
2327
2329
|
Day: "day",
|
|
2328
2330
|
Month: "month",
|
|
2329
2331
|
Year: "year"
|
|
2330
2332
|
};
|
|
2331
|
-
var
|
|
2333
|
+
var ProductScenario2 = {
|
|
2334
|
+
Scheduled: "scheduled",
|
|
2335
|
+
Active: "active",
|
|
2336
|
+
New: "new",
|
|
2337
|
+
Renew: "renew",
|
|
2338
|
+
Upgrade: "upgrade",
|
|
2339
|
+
UpdatePrepaidQuantity: "update_prepaid_quantity",
|
|
2340
|
+
Downgrade: "downgrade",
|
|
2341
|
+
Cancel: "cancel",
|
|
2342
|
+
Expired: "expired",
|
|
2343
|
+
PastDue: "past_due"
|
|
2344
|
+
};
|
|
2345
|
+
var FlagType1 = {
|
|
2346
|
+
Boolean: "boolean",
|
|
2347
|
+
Metered: "metered",
|
|
2348
|
+
CreditSystem: "credit_system"
|
|
2349
|
+
};
|
|
2350
|
+
var Scenario1 = {
|
|
2351
|
+
UsageLimit: "usage_limit",
|
|
2352
|
+
FeatureFlag: "feature_flag"
|
|
2353
|
+
};
|
|
2354
|
+
var CheckEnv1 = {
|
|
2355
|
+
Sandbox: "sandbox",
|
|
2356
|
+
Live: "live"
|
|
2357
|
+
};
|
|
2358
|
+
var ProductType1 = {
|
|
2359
|
+
Feature: "feature",
|
|
2360
|
+
PricedFeature: "priced_feature",
|
|
2361
|
+
Price: "price"
|
|
2362
|
+
};
|
|
2363
|
+
var FeatureType1 = {
|
|
2364
|
+
SingleUse: "single_use",
|
|
2365
|
+
ContinuousUse: "continuous_use",
|
|
2366
|
+
Boolean: "boolean",
|
|
2367
|
+
Static: "static"
|
|
2368
|
+
};
|
|
2369
|
+
var CheckInterval1 = {
|
|
2370
|
+
Minute: "minute",
|
|
2371
|
+
Hour: "hour",
|
|
2372
|
+
Day: "day",
|
|
2373
|
+
Week: "week",
|
|
2374
|
+
Month: "month",
|
|
2375
|
+
Quarter: "quarter",
|
|
2376
|
+
SemiAnnual: "semi_annual",
|
|
2377
|
+
Year: "year"
|
|
2378
|
+
};
|
|
2379
|
+
var CheckTierBehavior1 = {
|
|
2380
|
+
Graduated: "graduated",
|
|
2381
|
+
Volume: "volume"
|
|
2382
|
+
};
|
|
2383
|
+
var UsageModel1 = {
|
|
2384
|
+
Prepaid: "prepaid",
|
|
2385
|
+
PayPerUse: "pay_per_use"
|
|
2386
|
+
};
|
|
2387
|
+
var ConfigDuration1 = {
|
|
2388
|
+
Month: "month",
|
|
2389
|
+
Forever: "forever"
|
|
2390
|
+
};
|
|
2391
|
+
var CheckOnIncrease1 = {
|
|
2392
|
+
BillImmediately: "bill_immediately",
|
|
2393
|
+
ProrateImmediately: "prorate_immediately",
|
|
2394
|
+
ProrateNextCycle: "prorate_next_cycle",
|
|
2395
|
+
BillNextCycle: "bill_next_cycle"
|
|
2396
|
+
};
|
|
2397
|
+
var CheckOnDecrease1 = {
|
|
2398
|
+
Prorate: "prorate",
|
|
2399
|
+
ProrateImmediately: "prorate_immediately",
|
|
2400
|
+
ProrateNextCycle: "prorate_next_cycle",
|
|
2401
|
+
None: "none",
|
|
2402
|
+
NoProrations: "no_prorations"
|
|
2403
|
+
};
|
|
2404
|
+
var FreeTrialDuration1 = {
|
|
2405
|
+
Day: "day",
|
|
2406
|
+
Month: "month",
|
|
2407
|
+
Year: "year"
|
|
2408
|
+
};
|
|
2409
|
+
var ProductScenario1 = {
|
|
2332
2410
|
Scheduled: "scheduled",
|
|
2333
2411
|
Active: "active",
|
|
2334
2412
|
New: "new",
|
|
@@ -2375,8 +2453,8 @@ var CheckParams$outboundSchema = z13.pipe(
|
|
|
2375
2453
|
});
|
|
2376
2454
|
})
|
|
2377
2455
|
);
|
|
2378
|
-
var
|
|
2379
|
-
var
|
|
2456
|
+
var FlagType2$inboundSchema = inboundSchema(FlagType2);
|
|
2457
|
+
var CheckCreditSchema2$inboundSchema = z13.pipe(
|
|
2380
2458
|
z13.object({
|
|
2381
2459
|
metered_feature_id: string4(),
|
|
2382
2460
|
credit_cost: number2()
|
|
@@ -2388,21 +2466,21 @@ var CheckCreditSchema$inboundSchema = z13.pipe(
|
|
|
2388
2466
|
});
|
|
2389
2467
|
})
|
|
2390
2468
|
);
|
|
2391
|
-
var
|
|
2469
|
+
var FlagDisplay2$inboundSchema = z13.object({
|
|
2392
2470
|
singular: z13.optional(z13.nullable(string4())),
|
|
2393
2471
|
plural: z13.optional(z13.nullable(string4()))
|
|
2394
2472
|
});
|
|
2395
|
-
var
|
|
2473
|
+
var CheckFeature2$inboundSchema = z13.pipe(
|
|
2396
2474
|
z13.object({
|
|
2397
2475
|
id: string4(),
|
|
2398
2476
|
name: string4(),
|
|
2399
|
-
type:
|
|
2477
|
+
type: FlagType2$inboundSchema,
|
|
2400
2478
|
consumable: boolean2(),
|
|
2401
2479
|
event_names: optional2(z13.array(string4())),
|
|
2402
2480
|
credit_schema: optional2(
|
|
2403
|
-
z13.array(z13.lazy(() =>
|
|
2481
|
+
z13.array(z13.lazy(() => CheckCreditSchema2$inboundSchema))
|
|
2404
2482
|
),
|
|
2405
|
-
display: optional2(z13.lazy(() =>
|
|
2483
|
+
display: optional2(z13.lazy(() => FlagDisplay2$inboundSchema)),
|
|
2406
2484
|
archived: boolean2()
|
|
2407
2485
|
}),
|
|
2408
2486
|
z13.transform((v) => {
|
|
@@ -2412,13 +2490,13 @@ var CheckFeature$inboundSchema = z13.pipe(
|
|
|
2412
2490
|
});
|
|
2413
2491
|
})
|
|
2414
2492
|
);
|
|
2415
|
-
var
|
|
2493
|
+
var Flag2$inboundSchema = z13.pipe(
|
|
2416
2494
|
z13.object({
|
|
2417
2495
|
id: string4(),
|
|
2418
2496
|
plan_id: nullable(string4()),
|
|
2419
2497
|
expires_at: nullable(number2()),
|
|
2420
2498
|
feature_id: string4(),
|
|
2421
|
-
feature: optional2(z13.lazy(() =>
|
|
2499
|
+
feature: optional2(z13.lazy(() => CheckFeature2$inboundSchema))
|
|
2422
2500
|
}),
|
|
2423
2501
|
z13.transform((v) => {
|
|
2424
2502
|
return remap(v, {
|
|
@@ -2428,15 +2506,15 @@ var Flag$inboundSchema = z13.pipe(
|
|
|
2428
2506
|
});
|
|
2429
2507
|
})
|
|
2430
2508
|
);
|
|
2431
|
-
var
|
|
2432
|
-
var
|
|
2433
|
-
var
|
|
2434
|
-
var
|
|
2435
|
-
var
|
|
2436
|
-
var
|
|
2437
|
-
var
|
|
2438
|
-
var
|
|
2439
|
-
var
|
|
2509
|
+
var Scenario2$inboundSchema = inboundSchema(Scenario2);
|
|
2510
|
+
var CheckEnv2$inboundSchema = inboundSchema(CheckEnv2);
|
|
2511
|
+
var ProductType2$inboundSchema = inboundSchema(ProductType2);
|
|
2512
|
+
var FeatureType2$inboundSchema = inboundSchema(FeatureType2);
|
|
2513
|
+
var IncludedUsage2$inboundSchema = smartUnion([number2(), string4()]);
|
|
2514
|
+
var CheckInterval2$inboundSchema = inboundSchema(CheckInterval2);
|
|
2515
|
+
var CheckTierBehavior2$inboundSchema = inboundSchema(CheckTierBehavior2);
|
|
2516
|
+
var UsageModel2$inboundSchema = inboundSchema(UsageModel2);
|
|
2517
|
+
var ProductDisplay2$inboundSchema = z13.pipe(
|
|
2440
2518
|
z13.object({
|
|
2441
2519
|
primary_text: string4(),
|
|
2442
2520
|
secondary_text: z13.optional(z13.nullable(string4()))
|
|
@@ -2448,12 +2526,12 @@ var ProductDisplay$inboundSchema = z13.pipe(
|
|
|
2448
2526
|
});
|
|
2449
2527
|
})
|
|
2450
2528
|
);
|
|
2451
|
-
var
|
|
2452
|
-
var
|
|
2529
|
+
var ConfigDuration2$inboundSchema = inboundSchema(ConfigDuration2);
|
|
2530
|
+
var CheckRollover2$inboundSchema = z13.pipe(
|
|
2453
2531
|
z13.object({
|
|
2454
2532
|
max: z13.optional(z13.nullable(number2())),
|
|
2455
2533
|
max_percentage: z13.optional(z13.nullable(number2())),
|
|
2456
|
-
duration: z13._default(
|
|
2534
|
+
duration: z13._default(ConfigDuration2$inboundSchema, "month"),
|
|
2457
2535
|
length: number2()
|
|
2458
2536
|
}),
|
|
2459
2537
|
z13.transform((v) => {
|
|
@@ -2462,15 +2540,15 @@ var CheckRollover$inboundSchema = z13.pipe(
|
|
|
2462
2540
|
});
|
|
2463
2541
|
})
|
|
2464
2542
|
);
|
|
2465
|
-
var
|
|
2466
|
-
var
|
|
2467
|
-
var
|
|
2543
|
+
var CheckOnIncrease2$inboundSchema = inboundSchema(CheckOnIncrease2);
|
|
2544
|
+
var CheckOnDecrease2$inboundSchema = inboundSchema(CheckOnDecrease2);
|
|
2545
|
+
var CheckConfig2$inboundSchema = z13.pipe(
|
|
2468
2546
|
z13.object({
|
|
2469
2547
|
rollover: z13.optional(
|
|
2470
|
-
z13.nullable(z13.lazy(() =>
|
|
2548
|
+
z13.nullable(z13.lazy(() => CheckRollover2$inboundSchema))
|
|
2471
2549
|
),
|
|
2472
|
-
on_increase: z13.optional(z13.nullable(
|
|
2473
|
-
on_decrease: z13.optional(z13.nullable(
|
|
2550
|
+
on_increase: z13.optional(z13.nullable(CheckOnIncrease2$inboundSchema)),
|
|
2551
|
+
on_decrease: z13.optional(z13.nullable(CheckOnDecrease2$inboundSchema))
|
|
2474
2552
|
}),
|
|
2475
2553
|
z13.transform((v) => {
|
|
2476
2554
|
return remap(v, {
|
|
@@ -2479,29 +2557,29 @@ var CheckConfig$inboundSchema = z13.pipe(
|
|
|
2479
2557
|
});
|
|
2480
2558
|
})
|
|
2481
2559
|
);
|
|
2482
|
-
var
|
|
2560
|
+
var CheckItem2$inboundSchema = z13.pipe(
|
|
2483
2561
|
z13.object({
|
|
2484
|
-
type: z13.optional(z13.nullable(
|
|
2562
|
+
type: z13.optional(z13.nullable(ProductType2$inboundSchema)),
|
|
2485
2563
|
feature_id: z13.optional(z13.nullable(string4())),
|
|
2486
|
-
feature_type: z13.optional(z13.nullable(
|
|
2564
|
+
feature_type: z13.optional(z13.nullable(FeatureType2$inboundSchema)),
|
|
2487
2565
|
included_usage: z13.optional(
|
|
2488
2566
|
z13.nullable(smartUnion([number2(), string4()]))
|
|
2489
2567
|
),
|
|
2490
|
-
interval: z13.optional(z13.nullable(
|
|
2568
|
+
interval: z13.optional(z13.nullable(CheckInterval2$inboundSchema)),
|
|
2491
2569
|
interval_count: z13.optional(z13.nullable(number2())),
|
|
2492
2570
|
price: z13.optional(z13.nullable(number2())),
|
|
2493
2571
|
tiers: z13.optional(z13.nullable(z13.array(nullable(z13.any())))),
|
|
2494
|
-
tier_behavior: z13.optional(z13.nullable(
|
|
2495
|
-
usage_model: z13.optional(z13.nullable(
|
|
2572
|
+
tier_behavior: z13.optional(z13.nullable(CheckTierBehavior2$inboundSchema)),
|
|
2573
|
+
usage_model: z13.optional(z13.nullable(UsageModel2$inboundSchema)),
|
|
2496
2574
|
billing_units: z13.optional(z13.nullable(number2())),
|
|
2497
2575
|
reset_usage_when_enabled: z13.optional(z13.nullable(boolean2())),
|
|
2498
2576
|
entity_feature_id: z13.optional(z13.nullable(string4())),
|
|
2499
2577
|
display: z13.optional(
|
|
2500
|
-
z13.nullable(z13.lazy(() =>
|
|
2578
|
+
z13.nullable(z13.lazy(() => ProductDisplay2$inboundSchema))
|
|
2501
2579
|
),
|
|
2502
2580
|
quantity: z13.optional(z13.nullable(number2())),
|
|
2503
2581
|
next_cycle_quantity: z13.optional(z13.nullable(number2())),
|
|
2504
|
-
config: z13.optional(z13.nullable(z13.lazy(() =>
|
|
2582
|
+
config: z13.optional(z13.nullable(z13.lazy(() => CheckConfig2$inboundSchema)))
|
|
2505
2583
|
}),
|
|
2506
2584
|
z13.transform((v) => {
|
|
2507
2585
|
return remap(v, {
|
|
@@ -2518,10 +2596,10 @@ var CheckItem$inboundSchema = z13.pipe(
|
|
|
2518
2596
|
});
|
|
2519
2597
|
})
|
|
2520
2598
|
);
|
|
2521
|
-
var
|
|
2522
|
-
var
|
|
2599
|
+
var FreeTrialDuration2$inboundSchema = inboundSchema(FreeTrialDuration2);
|
|
2600
|
+
var CheckFreeTrial2$inboundSchema = z13.pipe(
|
|
2523
2601
|
z13.object({
|
|
2524
|
-
duration:
|
|
2602
|
+
duration: FreeTrialDuration2$inboundSchema,
|
|
2525
2603
|
length: number2(),
|
|
2526
2604
|
unique_fingerprint: boolean2(),
|
|
2527
2605
|
card_required: boolean2(),
|
|
@@ -2535,8 +2613,8 @@ var CheckFreeTrial$inboundSchema = z13.pipe(
|
|
|
2535
2613
|
});
|
|
2536
2614
|
})
|
|
2537
2615
|
);
|
|
2538
|
-
var
|
|
2539
|
-
var
|
|
2616
|
+
var ProductScenario2$inboundSchema = inboundSchema(ProductScenario2);
|
|
2617
|
+
var Properties2$inboundSchema = z13.pipe(
|
|
2540
2618
|
z13.object({
|
|
2541
2619
|
is_free: boolean2(),
|
|
2542
2620
|
is_one_off: boolean2(),
|
|
@@ -2553,22 +2631,22 @@ var Properties$inboundSchema = z13.pipe(
|
|
|
2553
2631
|
});
|
|
2554
2632
|
})
|
|
2555
2633
|
);
|
|
2556
|
-
var
|
|
2634
|
+
var Product2$inboundSchema = z13.pipe(
|
|
2557
2635
|
z13.object({
|
|
2558
2636
|
id: string4(),
|
|
2559
2637
|
name: string4(),
|
|
2560
2638
|
group: nullable(string4()),
|
|
2561
|
-
env:
|
|
2639
|
+
env: CheckEnv2$inboundSchema,
|
|
2562
2640
|
is_add_on: boolean2(),
|
|
2563
2641
|
is_default: boolean2(),
|
|
2564
2642
|
archived: boolean2(),
|
|
2565
2643
|
version: number2(),
|
|
2566
2644
|
created_at: number2(),
|
|
2567
|
-
items: z13.array(z13.lazy(() =>
|
|
2568
|
-
free_trial: nullable(z13.lazy(() =>
|
|
2645
|
+
items: z13.array(z13.lazy(() => CheckItem2$inboundSchema)),
|
|
2646
|
+
free_trial: nullable(z13.lazy(() => CheckFreeTrial2$inboundSchema)),
|
|
2569
2647
|
base_variant_id: nullable(string4()),
|
|
2570
|
-
scenario: optional2(
|
|
2571
|
-
properties: optional2(z13.lazy(() =>
|
|
2648
|
+
scenario: optional2(ProductScenario2$inboundSchema),
|
|
2649
|
+
properties: optional2(z13.lazy(() => Properties2$inboundSchema))
|
|
2572
2650
|
}),
|
|
2573
2651
|
z13.transform((v) => {
|
|
2574
2652
|
return remap(v, {
|
|
@@ -2580,14 +2658,14 @@ var Product$inboundSchema = z13.pipe(
|
|
|
2580
2658
|
});
|
|
2581
2659
|
})
|
|
2582
2660
|
);
|
|
2583
|
-
var
|
|
2661
|
+
var Preview2$inboundSchema = z13.pipe(
|
|
2584
2662
|
z13.object({
|
|
2585
|
-
scenario:
|
|
2663
|
+
scenario: Scenario2$inboundSchema,
|
|
2586
2664
|
title: string4(),
|
|
2587
2665
|
message: string4(),
|
|
2588
2666
|
feature_id: string4(),
|
|
2589
2667
|
feature_name: string4(),
|
|
2590
|
-
products: z13.array(z13.lazy(() =>
|
|
2668
|
+
products: z13.array(z13.lazy(() => Product2$inboundSchema))
|
|
2591
2669
|
}),
|
|
2592
2670
|
z13.transform((v) => {
|
|
2593
2671
|
return remap(v, {
|
|
@@ -2596,15 +2674,15 @@ var Preview$inboundSchema = z13.pipe(
|
|
|
2596
2674
|
});
|
|
2597
2675
|
})
|
|
2598
2676
|
);
|
|
2599
|
-
var
|
|
2677
|
+
var CheckResponseBody2$inboundSchema = z13.pipe(
|
|
2600
2678
|
z13.object({
|
|
2601
2679
|
allowed: boolean2(),
|
|
2602
2680
|
customer_id: string4(),
|
|
2603
2681
|
entity_id: z13.optional(z13.nullable(string4())),
|
|
2604
2682
|
required_balance: optional2(number2()),
|
|
2605
2683
|
balance: nullable(Balance$inboundSchema),
|
|
2606
|
-
flag: nullable(z13.lazy(() =>
|
|
2607
|
-
preview: optional2(z13.lazy(() =>
|
|
2684
|
+
flag: nullable(z13.lazy(() => Flag2$inboundSchema)),
|
|
2685
|
+
preview: optional2(z13.lazy(() => Preview2$inboundSchema))
|
|
2608
2686
|
}),
|
|
2609
2687
|
z13.transform((v) => {
|
|
2610
2688
|
return remap(v, {
|
|
@@ -2614,6 +2692,249 @@ var CheckResponse$inboundSchema = z13.pipe(
|
|
|
2614
2692
|
});
|
|
2615
2693
|
})
|
|
2616
2694
|
);
|
|
2695
|
+
var FlagType1$inboundSchema = inboundSchema(FlagType1);
|
|
2696
|
+
var CheckCreditSchema1$inboundSchema = z13.pipe(
|
|
2697
|
+
z13.object({
|
|
2698
|
+
metered_feature_id: string4(),
|
|
2699
|
+
credit_cost: number2()
|
|
2700
|
+
}),
|
|
2701
|
+
z13.transform((v) => {
|
|
2702
|
+
return remap(v, {
|
|
2703
|
+
"metered_feature_id": "meteredFeatureId",
|
|
2704
|
+
"credit_cost": "creditCost"
|
|
2705
|
+
});
|
|
2706
|
+
})
|
|
2707
|
+
);
|
|
2708
|
+
var FlagDisplay1$inboundSchema = z13.object({
|
|
2709
|
+
singular: z13.optional(z13.nullable(string4())),
|
|
2710
|
+
plural: z13.optional(z13.nullable(string4()))
|
|
2711
|
+
});
|
|
2712
|
+
var CheckFeature1$inboundSchema = z13.pipe(
|
|
2713
|
+
z13.object({
|
|
2714
|
+
id: string4(),
|
|
2715
|
+
name: string4(),
|
|
2716
|
+
type: FlagType1$inboundSchema,
|
|
2717
|
+
consumable: boolean2(),
|
|
2718
|
+
event_names: optional2(z13.array(string4())),
|
|
2719
|
+
credit_schema: optional2(
|
|
2720
|
+
z13.array(z13.lazy(() => CheckCreditSchema1$inboundSchema))
|
|
2721
|
+
),
|
|
2722
|
+
display: optional2(z13.lazy(() => FlagDisplay1$inboundSchema)),
|
|
2723
|
+
archived: boolean2()
|
|
2724
|
+
}),
|
|
2725
|
+
z13.transform((v) => {
|
|
2726
|
+
return remap(v, {
|
|
2727
|
+
"event_names": "eventNames",
|
|
2728
|
+
"credit_schema": "creditSchema"
|
|
2729
|
+
});
|
|
2730
|
+
})
|
|
2731
|
+
);
|
|
2732
|
+
var Flag1$inboundSchema = z13.pipe(
|
|
2733
|
+
z13.object({
|
|
2734
|
+
id: string4(),
|
|
2735
|
+
plan_id: nullable(string4()),
|
|
2736
|
+
expires_at: nullable(number2()),
|
|
2737
|
+
feature_id: string4(),
|
|
2738
|
+
feature: optional2(z13.lazy(() => CheckFeature1$inboundSchema))
|
|
2739
|
+
}),
|
|
2740
|
+
z13.transform((v) => {
|
|
2741
|
+
return remap(v, {
|
|
2742
|
+
"plan_id": "planId",
|
|
2743
|
+
"expires_at": "expiresAt",
|
|
2744
|
+
"feature_id": "featureId"
|
|
2745
|
+
});
|
|
2746
|
+
})
|
|
2747
|
+
);
|
|
2748
|
+
var Scenario1$inboundSchema = inboundSchema(Scenario1);
|
|
2749
|
+
var CheckEnv1$inboundSchema = inboundSchema(CheckEnv1);
|
|
2750
|
+
var ProductType1$inboundSchema = inboundSchema(ProductType1);
|
|
2751
|
+
var FeatureType1$inboundSchema = inboundSchema(FeatureType1);
|
|
2752
|
+
var IncludedUsage1$inboundSchema = smartUnion([number2(), string4()]);
|
|
2753
|
+
var CheckInterval1$inboundSchema = inboundSchema(CheckInterval1);
|
|
2754
|
+
var CheckTierBehavior1$inboundSchema = inboundSchema(CheckTierBehavior1);
|
|
2755
|
+
var UsageModel1$inboundSchema = inboundSchema(UsageModel1);
|
|
2756
|
+
var ProductDisplay1$inboundSchema = z13.pipe(
|
|
2757
|
+
z13.object({
|
|
2758
|
+
primary_text: string4(),
|
|
2759
|
+
secondary_text: z13.optional(z13.nullable(string4()))
|
|
2760
|
+
}),
|
|
2761
|
+
z13.transform((v) => {
|
|
2762
|
+
return remap(v, {
|
|
2763
|
+
"primary_text": "primaryText",
|
|
2764
|
+
"secondary_text": "secondaryText"
|
|
2765
|
+
});
|
|
2766
|
+
})
|
|
2767
|
+
);
|
|
2768
|
+
var ConfigDuration1$inboundSchema = inboundSchema(ConfigDuration1);
|
|
2769
|
+
var CheckRollover1$inboundSchema = z13.pipe(
|
|
2770
|
+
z13.object({
|
|
2771
|
+
max: z13.optional(z13.nullable(number2())),
|
|
2772
|
+
max_percentage: z13.optional(z13.nullable(number2())),
|
|
2773
|
+
duration: z13._default(ConfigDuration1$inboundSchema, "month"),
|
|
2774
|
+
length: number2()
|
|
2775
|
+
}),
|
|
2776
|
+
z13.transform((v) => {
|
|
2777
|
+
return remap(v, {
|
|
2778
|
+
"max_percentage": "maxPercentage"
|
|
2779
|
+
});
|
|
2780
|
+
})
|
|
2781
|
+
);
|
|
2782
|
+
var CheckOnIncrease1$inboundSchema = inboundSchema(CheckOnIncrease1);
|
|
2783
|
+
var CheckOnDecrease1$inboundSchema = inboundSchema(CheckOnDecrease1);
|
|
2784
|
+
var CheckConfig1$inboundSchema = z13.pipe(
|
|
2785
|
+
z13.object({
|
|
2786
|
+
rollover: z13.optional(
|
|
2787
|
+
z13.nullable(z13.lazy(() => CheckRollover1$inboundSchema))
|
|
2788
|
+
),
|
|
2789
|
+
on_increase: z13.optional(z13.nullable(CheckOnIncrease1$inboundSchema)),
|
|
2790
|
+
on_decrease: z13.optional(z13.nullable(CheckOnDecrease1$inboundSchema))
|
|
2791
|
+
}),
|
|
2792
|
+
z13.transform((v) => {
|
|
2793
|
+
return remap(v, {
|
|
2794
|
+
"on_increase": "onIncrease",
|
|
2795
|
+
"on_decrease": "onDecrease"
|
|
2796
|
+
});
|
|
2797
|
+
})
|
|
2798
|
+
);
|
|
2799
|
+
var CheckItem1$inboundSchema = z13.pipe(
|
|
2800
|
+
z13.object({
|
|
2801
|
+
type: z13.optional(z13.nullable(ProductType1$inboundSchema)),
|
|
2802
|
+
feature_id: z13.optional(z13.nullable(string4())),
|
|
2803
|
+
feature_type: z13.optional(z13.nullable(FeatureType1$inboundSchema)),
|
|
2804
|
+
included_usage: z13.optional(
|
|
2805
|
+
z13.nullable(smartUnion([number2(), string4()]))
|
|
2806
|
+
),
|
|
2807
|
+
interval: z13.optional(z13.nullable(CheckInterval1$inboundSchema)),
|
|
2808
|
+
interval_count: z13.optional(z13.nullable(number2())),
|
|
2809
|
+
price: z13.optional(z13.nullable(number2())),
|
|
2810
|
+
tiers: z13.optional(z13.nullable(z13.array(nullable(z13.any())))),
|
|
2811
|
+
tier_behavior: z13.optional(z13.nullable(CheckTierBehavior1$inboundSchema)),
|
|
2812
|
+
usage_model: z13.optional(z13.nullable(UsageModel1$inboundSchema)),
|
|
2813
|
+
billing_units: z13.optional(z13.nullable(number2())),
|
|
2814
|
+
reset_usage_when_enabled: z13.optional(z13.nullable(boolean2())),
|
|
2815
|
+
entity_feature_id: z13.optional(z13.nullable(string4())),
|
|
2816
|
+
display: z13.optional(
|
|
2817
|
+
z13.nullable(z13.lazy(() => ProductDisplay1$inboundSchema))
|
|
2818
|
+
),
|
|
2819
|
+
quantity: z13.optional(z13.nullable(number2())),
|
|
2820
|
+
next_cycle_quantity: z13.optional(z13.nullable(number2())),
|
|
2821
|
+
config: z13.optional(z13.nullable(z13.lazy(() => CheckConfig1$inboundSchema)))
|
|
2822
|
+
}),
|
|
2823
|
+
z13.transform((v) => {
|
|
2824
|
+
return remap(v, {
|
|
2825
|
+
"feature_id": "featureId",
|
|
2826
|
+
"feature_type": "featureType",
|
|
2827
|
+
"included_usage": "includedUsage",
|
|
2828
|
+
"interval_count": "intervalCount",
|
|
2829
|
+
"tier_behavior": "tierBehavior",
|
|
2830
|
+
"usage_model": "usageModel",
|
|
2831
|
+
"billing_units": "billingUnits",
|
|
2832
|
+
"reset_usage_when_enabled": "resetUsageWhenEnabled",
|
|
2833
|
+
"entity_feature_id": "entityFeatureId",
|
|
2834
|
+
"next_cycle_quantity": "nextCycleQuantity"
|
|
2835
|
+
});
|
|
2836
|
+
})
|
|
2837
|
+
);
|
|
2838
|
+
var FreeTrialDuration1$inboundSchema = inboundSchema(FreeTrialDuration1);
|
|
2839
|
+
var CheckFreeTrial1$inboundSchema = z13.pipe(
|
|
2840
|
+
z13.object({
|
|
2841
|
+
duration: FreeTrialDuration1$inboundSchema,
|
|
2842
|
+
length: number2(),
|
|
2843
|
+
unique_fingerprint: boolean2(),
|
|
2844
|
+
card_required: boolean2(),
|
|
2845
|
+
trial_available: z13.nullable(z13._default(boolean2(), true))
|
|
2846
|
+
}),
|
|
2847
|
+
z13.transform((v) => {
|
|
2848
|
+
return remap(v, {
|
|
2849
|
+
"unique_fingerprint": "uniqueFingerprint",
|
|
2850
|
+
"card_required": "cardRequired",
|
|
2851
|
+
"trial_available": "trialAvailable"
|
|
2852
|
+
});
|
|
2853
|
+
})
|
|
2854
|
+
);
|
|
2855
|
+
var ProductScenario1$inboundSchema = inboundSchema(ProductScenario1);
|
|
2856
|
+
var Properties1$inboundSchema = z13.pipe(
|
|
2857
|
+
z13.object({
|
|
2858
|
+
is_free: boolean2(),
|
|
2859
|
+
is_one_off: boolean2(),
|
|
2860
|
+
interval_group: z13.optional(z13.nullable(string4())),
|
|
2861
|
+
has_trial: z13.optional(z13.nullable(boolean2())),
|
|
2862
|
+
updateable: z13.optional(z13.nullable(boolean2()))
|
|
2863
|
+
}),
|
|
2864
|
+
z13.transform((v) => {
|
|
2865
|
+
return remap(v, {
|
|
2866
|
+
"is_free": "isFree",
|
|
2867
|
+
"is_one_off": "isOneOff",
|
|
2868
|
+
"interval_group": "intervalGroup",
|
|
2869
|
+
"has_trial": "hasTrial"
|
|
2870
|
+
});
|
|
2871
|
+
})
|
|
2872
|
+
);
|
|
2873
|
+
var Product1$inboundSchema = z13.pipe(
|
|
2874
|
+
z13.object({
|
|
2875
|
+
id: string4(),
|
|
2876
|
+
name: string4(),
|
|
2877
|
+
group: nullable(string4()),
|
|
2878
|
+
env: CheckEnv1$inboundSchema,
|
|
2879
|
+
is_add_on: boolean2(),
|
|
2880
|
+
is_default: boolean2(),
|
|
2881
|
+
archived: boolean2(),
|
|
2882
|
+
version: number2(),
|
|
2883
|
+
created_at: number2(),
|
|
2884
|
+
items: z13.array(z13.lazy(() => CheckItem1$inboundSchema)),
|
|
2885
|
+
free_trial: nullable(z13.lazy(() => CheckFreeTrial1$inboundSchema)),
|
|
2886
|
+
base_variant_id: nullable(string4()),
|
|
2887
|
+
scenario: optional2(ProductScenario1$inboundSchema),
|
|
2888
|
+
properties: optional2(z13.lazy(() => Properties1$inboundSchema))
|
|
2889
|
+
}),
|
|
2890
|
+
z13.transform((v) => {
|
|
2891
|
+
return remap(v, {
|
|
2892
|
+
"is_add_on": "isAddOn",
|
|
2893
|
+
"is_default": "isDefault",
|
|
2894
|
+
"created_at": "createdAt",
|
|
2895
|
+
"free_trial": "freeTrial",
|
|
2896
|
+
"base_variant_id": "baseVariantId"
|
|
2897
|
+
});
|
|
2898
|
+
})
|
|
2899
|
+
);
|
|
2900
|
+
var Preview1$inboundSchema = z13.pipe(
|
|
2901
|
+
z13.object({
|
|
2902
|
+
scenario: Scenario1$inboundSchema,
|
|
2903
|
+
title: string4(),
|
|
2904
|
+
message: string4(),
|
|
2905
|
+
feature_id: string4(),
|
|
2906
|
+
feature_name: string4(),
|
|
2907
|
+
products: z13.array(z13.lazy(() => Product1$inboundSchema))
|
|
2908
|
+
}),
|
|
2909
|
+
z13.transform((v) => {
|
|
2910
|
+
return remap(v, {
|
|
2911
|
+
"feature_id": "featureId",
|
|
2912
|
+
"feature_name": "featureName"
|
|
2913
|
+
});
|
|
2914
|
+
})
|
|
2915
|
+
);
|
|
2916
|
+
var CheckResponseBody1$inboundSchema = z13.pipe(
|
|
2917
|
+
z13.object({
|
|
2918
|
+
allowed: boolean2(),
|
|
2919
|
+
customer_id: string4(),
|
|
2920
|
+
entity_id: z13.optional(z13.nullable(string4())),
|
|
2921
|
+
required_balance: optional2(number2()),
|
|
2922
|
+
balance: nullable(Balance$inboundSchema),
|
|
2923
|
+
flag: nullable(z13.lazy(() => Flag1$inboundSchema)),
|
|
2924
|
+
preview: optional2(z13.lazy(() => Preview1$inboundSchema))
|
|
2925
|
+
}),
|
|
2926
|
+
z13.transform((v) => {
|
|
2927
|
+
return remap(v, {
|
|
2928
|
+
"customer_id": "customerId",
|
|
2929
|
+
"entity_id": "entityId",
|
|
2930
|
+
"required_balance": "requiredBalance"
|
|
2931
|
+
});
|
|
2932
|
+
})
|
|
2933
|
+
);
|
|
2934
|
+
var CheckResponse$inboundSchema = smartUnion([
|
|
2935
|
+
z13.lazy(() => CheckResponseBody1$inboundSchema),
|
|
2936
|
+
z13.lazy(() => CheckResponseBody2$inboundSchema)
|
|
2937
|
+
]);
|
|
2617
2938
|
|
|
2618
2939
|
// ../sdk/src/models/create-balance-op.ts
|
|
2619
2940
|
import * as z14 from "zod/v4-mini";
|
|
@@ -4076,7 +4397,13 @@ var CustomerEnv = {
|
|
|
4076
4397
|
Sandbox: "sandbox",
|
|
4077
4398
|
Live: "live"
|
|
4078
4399
|
};
|
|
4079
|
-
var
|
|
4400
|
+
var CustomerInterval2 = {
|
|
4401
|
+
Hour: "hour",
|
|
4402
|
+
Day: "day",
|
|
4403
|
+
Week: "week",
|
|
4404
|
+
Month: "month"
|
|
4405
|
+
};
|
|
4406
|
+
var CustomerInterval1 = {
|
|
4080
4407
|
Hour: "hour",
|
|
4081
4408
|
Day: "day",
|
|
4082
4409
|
Week: "week",
|
|
@@ -4113,10 +4440,26 @@ var CustomerDurationType = {
|
|
|
4113
4440
|
Forever: "forever"
|
|
4114
4441
|
};
|
|
4115
4442
|
var CustomerEnv$inboundSchema = inboundSchema(CustomerEnv);
|
|
4116
|
-
var
|
|
4117
|
-
var
|
|
4443
|
+
var CustomerInterval2$inboundSchema = inboundSchema(CustomerInterval2);
|
|
4444
|
+
var CustomerPurchaseLimit2$inboundSchema = z21.pipe(
|
|
4445
|
+
z21.object({
|
|
4446
|
+
interval: nullable(CustomerInterval2$inboundSchema),
|
|
4447
|
+
interval_count: nullable(number2()),
|
|
4448
|
+
limit: nullable(number2()),
|
|
4449
|
+
count: number2(),
|
|
4450
|
+
next_reset_at: number2()
|
|
4451
|
+
}),
|
|
4452
|
+
z21.transform((v) => {
|
|
4453
|
+
return remap(v, {
|
|
4454
|
+
"interval_count": "intervalCount",
|
|
4455
|
+
"next_reset_at": "nextResetAt"
|
|
4456
|
+
});
|
|
4457
|
+
})
|
|
4458
|
+
);
|
|
4459
|
+
var CustomerInterval1$inboundSchema = inboundSchema(CustomerInterval1);
|
|
4460
|
+
var CustomerPurchaseLimit1$inboundSchema = z21.pipe(
|
|
4118
4461
|
z21.object({
|
|
4119
|
-
interval:
|
|
4462
|
+
interval: CustomerInterval1$inboundSchema,
|
|
4120
4463
|
interval_count: z21._default(number2(), 1),
|
|
4121
4464
|
limit: number2()
|
|
4122
4465
|
}),
|
|
@@ -4126,15 +4469,20 @@ var CustomerPurchaseLimit$inboundSchema = z21.pipe(
|
|
|
4126
4469
|
});
|
|
4127
4470
|
})
|
|
4128
4471
|
);
|
|
4472
|
+
var CustomerPurchaseLimitUnion$inboundSchema = smartUnion([
|
|
4473
|
+
z21.lazy(() => CustomerPurchaseLimit2$inboundSchema),
|
|
4474
|
+
z21.lazy(() => CustomerPurchaseLimit1$inboundSchema)
|
|
4475
|
+
]);
|
|
4129
4476
|
var CustomerAutoTopup$inboundSchema = z21.pipe(
|
|
4130
4477
|
z21.object({
|
|
4131
4478
|
feature_id: string4(),
|
|
4132
4479
|
enabled: z21._default(boolean2(), false),
|
|
4133
4480
|
threshold: number2(),
|
|
4134
4481
|
quantity: number2(),
|
|
4135
|
-
purchase_limit: optional2(
|
|
4136
|
-
z21.lazy(() =>
|
|
4137
|
-
|
|
4482
|
+
purchase_limit: optional2(smartUnion([
|
|
4483
|
+
z21.lazy(() => CustomerPurchaseLimit2$inboundSchema),
|
|
4484
|
+
z21.lazy(() => CustomerPurchaseLimit1$inboundSchema)
|
|
4485
|
+
])),
|
|
4138
4486
|
invoice_mode: optional2(boolean2())
|
|
4139
4487
|
}),
|
|
4140
4488
|
z21.transform((v) => {
|
|
@@ -4588,9 +4936,16 @@ var FinalizeBalanceParams$outboundSchema = z27.pipe(
|
|
|
4588
4936
|
});
|
|
4589
4937
|
})
|
|
4590
4938
|
);
|
|
4591
|
-
var
|
|
4939
|
+
var FinalizeLockResponseBody2$inboundSchema = z27.object({
|
|
4940
|
+
success: boolean2()
|
|
4941
|
+
});
|
|
4942
|
+
var FinalizeLockResponseBody1$inboundSchema = z27.object({
|
|
4592
4943
|
success: boolean2()
|
|
4593
4944
|
});
|
|
4945
|
+
var FinalizeLockResponse$inboundSchema = smartUnion([
|
|
4946
|
+
z27.lazy(() => FinalizeLockResponseBody1$inboundSchema),
|
|
4947
|
+
z27.lazy(() => FinalizeLockResponseBody2$inboundSchema)
|
|
4948
|
+
]);
|
|
4594
4949
|
|
|
4595
4950
|
// ../sdk/src/models/get-entity-op.ts
|
|
4596
4951
|
import * as z28 from "zod/v4-mini";
|
|
@@ -5385,7 +5740,13 @@ var ListCustomersEnv = {
|
|
|
5385
5740
|
Sandbox: "sandbox",
|
|
5386
5741
|
Live: "live"
|
|
5387
5742
|
};
|
|
5388
|
-
var
|
|
5743
|
+
var ListCustomersInterval2 = {
|
|
5744
|
+
Hour: "hour",
|
|
5745
|
+
Day: "day",
|
|
5746
|
+
Week: "week",
|
|
5747
|
+
Month: "month"
|
|
5748
|
+
};
|
|
5749
|
+
var ListCustomersInterval1 = {
|
|
5389
5750
|
Hour: "hour",
|
|
5390
5751
|
Day: "day",
|
|
5391
5752
|
Week: "week",
|
|
@@ -5430,10 +5791,26 @@ var ListCustomersParams$outboundSchema = z32.pipe(
|
|
|
5430
5791
|
})
|
|
5431
5792
|
);
|
|
5432
5793
|
var ListCustomersEnv$inboundSchema = inboundSchema(ListCustomersEnv);
|
|
5433
|
-
var
|
|
5434
|
-
var
|
|
5794
|
+
var ListCustomersInterval2$inboundSchema = inboundSchema(ListCustomersInterval2);
|
|
5795
|
+
var ListCustomersPurchaseLimit2$inboundSchema = z32.pipe(
|
|
5435
5796
|
z32.object({
|
|
5436
|
-
interval:
|
|
5797
|
+
interval: nullable(ListCustomersInterval2$inboundSchema),
|
|
5798
|
+
interval_count: nullable(number2()),
|
|
5799
|
+
limit: nullable(number2()),
|
|
5800
|
+
count: number2(),
|
|
5801
|
+
next_reset_at: number2()
|
|
5802
|
+
}),
|
|
5803
|
+
z32.transform((v) => {
|
|
5804
|
+
return remap(v, {
|
|
5805
|
+
"interval_count": "intervalCount",
|
|
5806
|
+
"next_reset_at": "nextResetAt"
|
|
5807
|
+
});
|
|
5808
|
+
})
|
|
5809
|
+
);
|
|
5810
|
+
var ListCustomersInterval1$inboundSchema = inboundSchema(ListCustomersInterval1);
|
|
5811
|
+
var ListCustomersPurchaseLimit1$inboundSchema = z32.pipe(
|
|
5812
|
+
z32.object({
|
|
5813
|
+
interval: ListCustomersInterval1$inboundSchema,
|
|
5437
5814
|
interval_count: z32._default(number2(), 1),
|
|
5438
5815
|
limit: number2()
|
|
5439
5816
|
}),
|
|
@@ -5443,15 +5820,20 @@ var ListCustomersPurchaseLimit$inboundSchema = z32.pipe(
|
|
|
5443
5820
|
});
|
|
5444
5821
|
})
|
|
5445
5822
|
);
|
|
5823
|
+
var ListCustomersPurchaseLimitUnion$inboundSchema = smartUnion([
|
|
5824
|
+
z32.lazy(() => ListCustomersPurchaseLimit2$inboundSchema),
|
|
5825
|
+
z32.lazy(() => ListCustomersPurchaseLimit1$inboundSchema)
|
|
5826
|
+
]);
|
|
5446
5827
|
var ListCustomersAutoTopup$inboundSchema = z32.pipe(
|
|
5447
5828
|
z32.object({
|
|
5448
5829
|
feature_id: string4(),
|
|
5449
5830
|
enabled: z32._default(boolean2(), false),
|
|
5450
5831
|
threshold: number2(),
|
|
5451
5832
|
quantity: number2(),
|
|
5452
|
-
purchase_limit: optional2(
|
|
5453
|
-
z32.lazy(() =>
|
|
5454
|
-
|
|
5833
|
+
purchase_limit: optional2(smartUnion([
|
|
5834
|
+
z32.lazy(() => ListCustomersPurchaseLimit2$inboundSchema),
|
|
5835
|
+
z32.lazy(() => ListCustomersPurchaseLimit1$inboundSchema)
|
|
5836
|
+
])),
|
|
5455
5837
|
invoice_mode: optional2(boolean2())
|
|
5456
5838
|
}),
|
|
5457
5839
|
z32.transform((v) => {
|
|
@@ -6450,6 +6832,7 @@ var MultiAttachParams$outboundSchema = z36.pipe(
|
|
|
6450
6832
|
"if_required"
|
|
6451
6833
|
),
|
|
6452
6834
|
newBillingSubscription: z36.optional(z36.boolean()),
|
|
6835
|
+
enablePlanImmediately: z36.optional(z36.boolean()),
|
|
6453
6836
|
customerData: z36.optional(CustomerData$outboundSchema),
|
|
6454
6837
|
entityData: z36.optional(z36.lazy(() => MultiAttachEntityData$outboundSchema))
|
|
6455
6838
|
}),
|
|
@@ -6463,6 +6846,7 @@ var MultiAttachParams$outboundSchema = z36.pipe(
|
|
|
6463
6846
|
checkoutSessionParams: "checkout_session_params",
|
|
6464
6847
|
redirectMode: "redirect_mode",
|
|
6465
6848
|
newBillingSubscription: "new_billing_subscription",
|
|
6849
|
+
enablePlanImmediately: "enable_plan_immediately",
|
|
6466
6850
|
customerData: "customer_data",
|
|
6467
6851
|
entityData: "entity_data"
|
|
6468
6852
|
});
|
|
@@ -6612,6 +6996,10 @@ var PreviewAttachCheckoutType = {
|
|
|
6612
6996
|
StripeCheckout: "stripe_checkout",
|
|
6613
6997
|
AutumnCheckout: "autumn_checkout"
|
|
6614
6998
|
};
|
|
6999
|
+
var PreviewAttachStatus = {
|
|
7000
|
+
Complete: "complete",
|
|
7001
|
+
Incomplete: "incomplete"
|
|
7002
|
+
};
|
|
6615
7003
|
var PreviewAttachFeatureQuantityRequest$outboundSchema = z38.pipe(
|
|
6616
7004
|
z38.object({
|
|
6617
7005
|
featureId: z38.string(),
|
|
@@ -6858,7 +7246,8 @@ var PreviewAttachParams$outboundSchema = z38.pipe(
|
|
|
6858
7246
|
z38.lazy(() => PreviewAttachCarryOverUsages$outboundSchema)
|
|
6859
7247
|
),
|
|
6860
7248
|
metadata: z38.optional(z38.record(z38.string(), z38.string())),
|
|
6861
|
-
noBillingChanges: z38.optional(z38.boolean())
|
|
7249
|
+
noBillingChanges: z38.optional(z38.boolean()),
|
|
7250
|
+
enablePlanImmediately: z38.optional(z38.boolean())
|
|
6862
7251
|
}),
|
|
6863
7252
|
z38.transform((v) => {
|
|
6864
7253
|
return remap(v, {
|
|
@@ -6879,7 +7268,8 @@ var PreviewAttachParams$outboundSchema = z38.pipe(
|
|
|
6879
7268
|
processorSubscriptionId: "processor_subscription_id",
|
|
6880
7269
|
carryOverBalances: "carry_over_balances",
|
|
6881
7270
|
carryOverUsages: "carry_over_usages",
|
|
6882
|
-
noBillingChanges: "no_billing_changes"
|
|
7271
|
+
noBillingChanges: "no_billing_changes",
|
|
7272
|
+
enablePlanImmediately: "enable_plan_immediately"
|
|
6883
7273
|
});
|
|
6884
7274
|
})
|
|
6885
7275
|
);
|
|
@@ -7077,6 +7467,22 @@ var PreviewAttachOutgoing$inboundSchema = z38.pipe(
|
|
|
7077
7467
|
})
|
|
7078
7468
|
);
|
|
7079
7469
|
var PreviewAttachCheckoutType$inboundSchema = inboundSchema(PreviewAttachCheckoutType);
|
|
7470
|
+
var PreviewAttachStatus$inboundSchema = inboundSchema(PreviewAttachStatus);
|
|
7471
|
+
var PreviewAttachTax$inboundSchema = z38.pipe(
|
|
7472
|
+
z38.object({
|
|
7473
|
+
total: number2(),
|
|
7474
|
+
amount_inclusive: number2(),
|
|
7475
|
+
amount_exclusive: number2(),
|
|
7476
|
+
currency: string4(),
|
|
7477
|
+
status: PreviewAttachStatus$inboundSchema
|
|
7478
|
+
}),
|
|
7479
|
+
z38.transform((v) => {
|
|
7480
|
+
return remap(v, {
|
|
7481
|
+
"amount_inclusive": "amountInclusive",
|
|
7482
|
+
"amount_exclusive": "amountExclusive"
|
|
7483
|
+
});
|
|
7484
|
+
})
|
|
7485
|
+
);
|
|
7080
7486
|
var PreviewAttachResponse$inboundSchema = z38.pipe(
|
|
7081
7487
|
z38.object({
|
|
7082
7488
|
customer_id: string4(),
|
|
@@ -7091,7 +7497,8 @@ var PreviewAttachResponse$inboundSchema = z38.pipe(
|
|
|
7091
7497
|
incoming: z38.array(z38.lazy(() => PreviewAttachIncoming$inboundSchema)),
|
|
7092
7498
|
outgoing: z38.array(z38.lazy(() => PreviewAttachOutgoing$inboundSchema)),
|
|
7093
7499
|
redirect_to_checkout: boolean2(),
|
|
7094
|
-
checkout_type: nullable(PreviewAttachCheckoutType$inboundSchema)
|
|
7500
|
+
checkout_type: nullable(PreviewAttachCheckoutType$inboundSchema),
|
|
7501
|
+
tax: optional2(z38.lazy(() => PreviewAttachTax$inboundSchema))
|
|
7095
7502
|
}),
|
|
7096
7503
|
z38.transform((v) => {
|
|
7097
7504
|
return remap(v, {
|
|
@@ -7178,6 +7585,10 @@ var PreviewMultiAttachCheckoutType = {
|
|
|
7178
7585
|
StripeCheckout: "stripe_checkout",
|
|
7179
7586
|
AutumnCheckout: "autumn_checkout"
|
|
7180
7587
|
};
|
|
7588
|
+
var PreviewMultiAttachStatus = {
|
|
7589
|
+
Complete: "complete",
|
|
7590
|
+
Incomplete: "incomplete"
|
|
7591
|
+
};
|
|
7181
7592
|
var PreviewMultiAttachPriceInterval$outboundSchema = z39.enum(PreviewMultiAttachPriceInterval);
|
|
7182
7593
|
var PreviewMultiAttachBasePrice$outboundSchema = z39.pipe(
|
|
7183
7594
|
z39.object({
|
|
@@ -7475,6 +7886,7 @@ var PreviewMultiAttachParams$outboundSchema = z39.pipe(
|
|
|
7475
7886
|
"if_required"
|
|
7476
7887
|
),
|
|
7477
7888
|
newBillingSubscription: z39.optional(z39.boolean()),
|
|
7889
|
+
enablePlanImmediately: z39.optional(z39.boolean()),
|
|
7478
7890
|
customerData: z39.optional(CustomerData$outboundSchema),
|
|
7479
7891
|
entityData: z39.optional(
|
|
7480
7892
|
z39.lazy(() => PreviewMultiAttachEntityData$outboundSchema)
|
|
@@ -7490,6 +7902,7 @@ var PreviewMultiAttachParams$outboundSchema = z39.pipe(
|
|
|
7490
7902
|
checkoutSessionParams: "checkout_session_params",
|
|
7491
7903
|
redirectMode: "redirect_mode",
|
|
7492
7904
|
newBillingSubscription: "new_billing_subscription",
|
|
7905
|
+
enablePlanImmediately: "enable_plan_immediately",
|
|
7493
7906
|
customerData: "customer_data",
|
|
7494
7907
|
entityData: "entity_data"
|
|
7495
7908
|
});
|
|
@@ -7689,6 +8102,22 @@ var PreviewMultiAttachOutgoing$inboundSchema = z39.pipe(
|
|
|
7689
8102
|
})
|
|
7690
8103
|
);
|
|
7691
8104
|
var PreviewMultiAttachCheckoutType$inboundSchema = inboundSchema(PreviewMultiAttachCheckoutType);
|
|
8105
|
+
var PreviewMultiAttachStatus$inboundSchema = inboundSchema(PreviewMultiAttachStatus);
|
|
8106
|
+
var PreviewMultiAttachTax$inboundSchema = z39.pipe(
|
|
8107
|
+
z39.object({
|
|
8108
|
+
total: number2(),
|
|
8109
|
+
amount_inclusive: number2(),
|
|
8110
|
+
amount_exclusive: number2(),
|
|
8111
|
+
currency: string4(),
|
|
8112
|
+
status: PreviewMultiAttachStatus$inboundSchema
|
|
8113
|
+
}),
|
|
8114
|
+
z39.transform((v) => {
|
|
8115
|
+
return remap(v, {
|
|
8116
|
+
"amount_inclusive": "amountInclusive",
|
|
8117
|
+
"amount_exclusive": "amountExclusive"
|
|
8118
|
+
});
|
|
8119
|
+
})
|
|
8120
|
+
);
|
|
7692
8121
|
var PreviewMultiAttachResponse$inboundSchema = z39.pipe(
|
|
7693
8122
|
z39.object({
|
|
7694
8123
|
customer_id: string4(),
|
|
@@ -7703,7 +8132,8 @@ var PreviewMultiAttachResponse$inboundSchema = z39.pipe(
|
|
|
7703
8132
|
incoming: z39.array(z39.lazy(() => PreviewMultiAttachIncoming$inboundSchema)),
|
|
7704
8133
|
outgoing: z39.array(z39.lazy(() => PreviewMultiAttachOutgoing$inboundSchema)),
|
|
7705
8134
|
redirect_to_checkout: boolean2(),
|
|
7706
|
-
checkout_type: nullable(PreviewMultiAttachCheckoutType$inboundSchema)
|
|
8135
|
+
checkout_type: nullable(PreviewMultiAttachCheckoutType$inboundSchema),
|
|
8136
|
+
tax: optional2(z39.lazy(() => PreviewMultiAttachTax$inboundSchema))
|
|
7707
8137
|
}),
|
|
7708
8138
|
z39.transform((v) => {
|
|
7709
8139
|
return remap(v, {
|
|
@@ -8557,7 +8987,8 @@ var SetupPaymentParams$outboundSchema = z42.pipe(
|
|
|
8557
8987
|
z42.lazy(() => SetupPaymentCarryOverUsages$outboundSchema)
|
|
8558
8988
|
),
|
|
8559
8989
|
metadata: z42.optional(z42.record(z42.string(), z42.string())),
|
|
8560
|
-
noBillingChanges: z42.optional(z42.boolean())
|
|
8990
|
+
noBillingChanges: z42.optional(z42.boolean()),
|
|
8991
|
+
enablePlanImmediately: z42.optional(z42.boolean())
|
|
8561
8992
|
}),
|
|
8562
8993
|
z42.transform((v) => {
|
|
8563
8994
|
return remap(v, {
|
|
@@ -8574,7 +9005,8 @@ var SetupPaymentParams$outboundSchema = z42.pipe(
|
|
|
8574
9005
|
processorSubscriptionId: "processor_subscription_id",
|
|
8575
9006
|
carryOverBalances: "carry_over_balances",
|
|
8576
9007
|
carryOverUsages: "carry_over_usages",
|
|
8577
|
-
noBillingChanges: "no_billing_changes"
|
|
9008
|
+
noBillingChanges: "no_billing_changes",
|
|
9009
|
+
enablePlanImmediately: "enable_plan_immediately"
|
|
8578
9010
|
});
|
|
8579
9011
|
})
|
|
8580
9012
|
);
|
|
@@ -8626,7 +9058,7 @@ var TrackParams$outboundSchema = z43.pipe(
|
|
|
8626
9058
|
});
|
|
8627
9059
|
})
|
|
8628
9060
|
);
|
|
8629
|
-
var
|
|
9061
|
+
var TrackResponseBody2$inboundSchema = z43.pipe(
|
|
8630
9062
|
z43.object({
|
|
8631
9063
|
customer_id: string4(),
|
|
8632
9064
|
entity_id: optional2(string4()),
|
|
@@ -8643,6 +9075,27 @@ var TrackResponse$inboundSchema = z43.pipe(
|
|
|
8643
9075
|
});
|
|
8644
9076
|
})
|
|
8645
9077
|
);
|
|
9078
|
+
var TrackResponseBody1$inboundSchema = z43.pipe(
|
|
9079
|
+
z43.object({
|
|
9080
|
+
customer_id: string4(),
|
|
9081
|
+
entity_id: optional2(string4()),
|
|
9082
|
+
event_name: optional2(string4()),
|
|
9083
|
+
value: number2(),
|
|
9084
|
+
balance: nullable(Balance$inboundSchema),
|
|
9085
|
+
balances: optional2(z43.record(z43.string(), Balance$inboundSchema))
|
|
9086
|
+
}),
|
|
9087
|
+
z43.transform((v) => {
|
|
9088
|
+
return remap(v, {
|
|
9089
|
+
"customer_id": "customerId",
|
|
9090
|
+
"entity_id": "entityId",
|
|
9091
|
+
"event_name": "eventName"
|
|
9092
|
+
});
|
|
9093
|
+
})
|
|
9094
|
+
);
|
|
9095
|
+
var TrackResponse$inboundSchema = smartUnion([
|
|
9096
|
+
z43.lazy(() => TrackResponseBody1$inboundSchema),
|
|
9097
|
+
z43.lazy(() => TrackResponseBody2$inboundSchema)
|
|
9098
|
+
]);
|
|
8646
9099
|
|
|
8647
9100
|
// ../sdk/src/models/update-balance-op.ts
|
|
8648
9101
|
import * as z44 from "zod/v4-mini";
|
|
@@ -8705,7 +9158,13 @@ var UpdateCustomerEnv = {
|
|
|
8705
9158
|
Sandbox: "sandbox",
|
|
8706
9159
|
Live: "live"
|
|
8707
9160
|
};
|
|
8708
|
-
var
|
|
9161
|
+
var UpdateCustomerIntervalResponse2 = {
|
|
9162
|
+
Hour: "hour",
|
|
9163
|
+
Day: "day",
|
|
9164
|
+
Week: "week",
|
|
9165
|
+
Month: "month"
|
|
9166
|
+
};
|
|
9167
|
+
var UpdateCustomerIntervalResponse1 = {
|
|
8709
9168
|
Hour: "hour",
|
|
8710
9169
|
Day: "day",
|
|
8711
9170
|
Week: "week",
|
|
@@ -8862,10 +9321,26 @@ var UpdateCustomerParams$outboundSchema = z45.pipe(
|
|
|
8862
9321
|
})
|
|
8863
9322
|
);
|
|
8864
9323
|
var UpdateCustomerEnv$inboundSchema = inboundSchema(UpdateCustomerEnv);
|
|
8865
|
-
var
|
|
8866
|
-
var
|
|
9324
|
+
var UpdateCustomerIntervalResponse2$inboundSchema = inboundSchema(UpdateCustomerIntervalResponse2);
|
|
9325
|
+
var UpdateCustomerPurchaseLimitResponse2$inboundSchema = z45.pipe(
|
|
8867
9326
|
z45.object({
|
|
8868
|
-
interval:
|
|
9327
|
+
interval: nullable(UpdateCustomerIntervalResponse2$inboundSchema),
|
|
9328
|
+
interval_count: nullable(number2()),
|
|
9329
|
+
limit: nullable(number2()),
|
|
9330
|
+
count: number2(),
|
|
9331
|
+
next_reset_at: number2()
|
|
9332
|
+
}),
|
|
9333
|
+
z45.transform((v) => {
|
|
9334
|
+
return remap(v, {
|
|
9335
|
+
"interval_count": "intervalCount",
|
|
9336
|
+
"next_reset_at": "nextResetAt"
|
|
9337
|
+
});
|
|
9338
|
+
})
|
|
9339
|
+
);
|
|
9340
|
+
var UpdateCustomerIntervalResponse1$inboundSchema = inboundSchema(UpdateCustomerIntervalResponse1);
|
|
9341
|
+
var UpdateCustomerPurchaseLimitResponse1$inboundSchema = z45.pipe(
|
|
9342
|
+
z45.object({
|
|
9343
|
+
interval: UpdateCustomerIntervalResponse1$inboundSchema,
|
|
8869
9344
|
interval_count: z45._default(number2(), 1),
|
|
8870
9345
|
limit: number2()
|
|
8871
9346
|
}),
|
|
@@ -8875,15 +9350,20 @@ var UpdateCustomerPurchaseLimitResponse$inboundSchema = z45.pipe(
|
|
|
8875
9350
|
});
|
|
8876
9351
|
})
|
|
8877
9352
|
);
|
|
9353
|
+
var UpdateCustomerPurchaseLimitUnion$inboundSchema = smartUnion([
|
|
9354
|
+
z45.lazy(() => UpdateCustomerPurchaseLimitResponse2$inboundSchema),
|
|
9355
|
+
z45.lazy(() => UpdateCustomerPurchaseLimitResponse1$inboundSchema)
|
|
9356
|
+
]);
|
|
8878
9357
|
var UpdateCustomerAutoTopupResponse$inboundSchema = z45.pipe(
|
|
8879
9358
|
z45.object({
|
|
8880
9359
|
feature_id: string4(),
|
|
8881
9360
|
enabled: z45._default(boolean2(), false),
|
|
8882
9361
|
threshold: number2(),
|
|
8883
9362
|
quantity: number2(),
|
|
8884
|
-
purchase_limit: optional2(
|
|
8885
|
-
z45.lazy(() =>
|
|
8886
|
-
|
|
9363
|
+
purchase_limit: optional2(smartUnion([
|
|
9364
|
+
z45.lazy(() => UpdateCustomerPurchaseLimitResponse2$inboundSchema),
|
|
9365
|
+
z45.lazy(() => UpdateCustomerPurchaseLimitResponse1$inboundSchema)
|
|
9366
|
+
])),
|
|
8887
9367
|
invoice_mode: optional2(boolean2())
|
|
8888
9368
|
}),
|
|
8889
9369
|
z45.transform((v) => {
|
|
@@ -10127,6 +10607,7 @@ async function $do(client, request, options) {
|
|
|
10127
10607
|
const response = doResult.value;
|
|
10128
10608
|
const [result] = await match(
|
|
10129
10609
|
json(200, CheckResponse$inboundSchema),
|
|
10610
|
+
json(202, CheckResponse$inboundSchema),
|
|
10130
10611
|
fail("4XX"),
|
|
10131
10612
|
fail("5XX")
|
|
10132
10613
|
)(response, req);
|
|
@@ -10205,6 +10686,7 @@ async function $do2(client, request, options) {
|
|
|
10205
10686
|
const response = doResult.value;
|
|
10206
10687
|
const [result] = await match(
|
|
10207
10688
|
json(200, TrackResponse$inboundSchema),
|
|
10689
|
+
json(202, TrackResponse$inboundSchema),
|
|
10208
10690
|
fail("4XX"),
|
|
10209
10691
|
fail("5XX")
|
|
10210
10692
|
)(response, req);
|
|
@@ -11044,6 +11526,7 @@ async function $do5(client, request, options) {
|
|
|
11044
11526
|
const response = doResult.value;
|
|
11045
11527
|
const [result] = await match(
|
|
11046
11528
|
json(200, FinalizeLockResponse$inboundSchema),
|
|
11529
|
+
json(202, FinalizeLockResponse$inboundSchema),
|
|
11047
11530
|
fail("4XX"),
|
|
11048
11531
|
fail("5XX")
|
|
11049
11532
|
)(response, req);
|
|
@@ -11846,6 +12329,7 @@ var Billing = class extends ClientSDK {
|
|
|
11846
12329
|
* @param carryOverUsages - Whether to carry over usages from the previous plan. (optional)
|
|
11847
12330
|
* @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)
|
|
11848
12331
|
* @param noBillingChanges - If true, skips any billing changes for the attach operation. (optional)
|
|
12332
|
+
* @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)
|
|
11849
12333
|
*
|
|
11850
12334
|
* @returns A billing response with customer ID, invoice details, and payment URL (if checkout required).
|
|
11851
12335
|
*/
|
|
@@ -11889,6 +12373,7 @@ var Billing = class extends ClientSDK {
|
|
|
11889
12373
|
* @param checkoutSessionParams - Additional parameters to pass into the creation of the Stripe checkout session. (optional)
|
|
11890
12374
|
* @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)
|
|
11891
12375
|
* @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)
|
|
12376
|
+
* @param enablePlanImmediately - If true, the cusProducts are activated immediately even when payment is pending via Stripe checkout. (optional)
|
|
11892
12377
|
*
|
|
11893
12378
|
* @returns A billing response with customer ID, invoice details, and payment URL (if checkout required).
|
|
11894
12379
|
*/
|
|
@@ -11932,6 +12417,7 @@ var Billing = class extends ClientSDK {
|
|
|
11932
12417
|
* @param carryOverUsages - Whether to carry over usages from the previous plan. (optional)
|
|
11933
12418
|
* @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)
|
|
11934
12419
|
* @param noBillingChanges - If true, skips any billing changes for the attach operation. (optional)
|
|
12420
|
+
* @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)
|
|
11935
12421
|
*
|
|
11936
12422
|
* @returns A preview response with line items, totals, and effective dates for the proposed changes.
|
|
11937
12423
|
*/
|
|
@@ -11963,6 +12449,7 @@ var Billing = class extends ClientSDK {
|
|
|
11963
12449
|
* @param checkoutSessionParams - Additional parameters to pass into the creation of the Stripe checkout session. (optional)
|
|
11964
12450
|
* @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)
|
|
11965
12451
|
* @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)
|
|
12452
|
+
* @param enablePlanImmediately - If true, the cusProducts are activated immediately even when payment is pending via Stripe checkout. (optional)
|
|
11966
12453
|
*
|
|
11967
12454
|
* @returns A preview response with line items, totals, and effective dates for the proposed multi-plan attachment.
|
|
11968
12455
|
*/
|
|
@@ -14442,7 +14929,7 @@ var Autumn = class extends ClientSDK {
|
|
|
14442
14929
|
* @param lock - Reserve units of a feature upfront by passing a lock_id, then call balances.finalize to confirm or release the hold. (optional)
|
|
14443
14930
|
* @param withPreview - If true, includes upgrade/upsell information in the response when access is denied. Useful for displaying paywalls. (optional)
|
|
14444
14931
|
*
|
|
14445
|
-
* @returns Whether access is allowed, plus the current balance for that feature.
|
|
14932
|
+
* @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.
|
|
14446
14933
|
*/
|
|
14447
14934
|
async check(request, options) {
|
|
14448
14935
|
return unwrapAsync(check(
|
|
@@ -14475,7 +14962,7 @@ var Autumn = class extends ClientSDK {
|
|
|
14475
14962
|
* @param value - The amount of usage to record. Defaults to 1. Use negative values to credit balance (e.g., when removing a seat). (optional)
|
|
14476
14963
|
* @param properties - Additional properties to attach to this usage event. (optional)
|
|
14477
14964
|
*
|
|
14478
|
-
* @returns The usage value recorded, with either a single updated balance or a map of updated balances.
|
|
14965
|
+
* @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.
|
|
14479
14966
|
*/
|
|
14480
14967
|
async track(request, options) {
|
|
14481
14968
|
return unwrapAsync(track(
|