autumn-js 1.2.13 → 1.2.14
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 +419 -69
- package/dist/backend/adapters/express.mjs +5 -5
- package/dist/backend/adapters/fetch.js +419 -69
- package/dist/backend/adapters/fetch.mjs +5 -5
- package/dist/backend/adapters/hono.js +419 -69
- package/dist/backend/adapters/hono.mjs +5 -5
- package/dist/backend/adapters/index.js +419 -69
- package/dist/backend/adapters/index.mjs +8 -8
- package/dist/backend/adapters/next.js +419 -69
- package/dist/backend/adapters/next.mjs +5 -5
- package/dist/backend/{chunk-YSQQKZBU.mjs → chunk-5XWZK7Q6.mjs} +1 -1
- package/dist/backend/{chunk-OUDB34Y7.mjs → chunk-BVJU43R5.mjs} +1 -1
- package/dist/backend/{chunk-T42RZEUZ.mjs → chunk-GE5VY4YO.mjs} +419 -69
- package/dist/backend/{chunk-DNNJOZAT.mjs → chunk-JDJMZQCY.mjs} +1 -1
- package/dist/backend/{chunk-7BVATYGA.mjs → chunk-N2OJ347N.mjs} +1 -1
- package/dist/backend/{chunk-EJGHP7KT.mjs → chunk-QAFNIIBW.mjs} +1 -1
- package/dist/backend/{chunk-RPH5L44S.mjs → chunk-ZOOAE7OJ.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 +419 -69
- package/dist/backend/core/handlers/coreHandler.mjs +3 -3
- 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 +1 -1
- package/dist/backend/core/handlers/handleRouteByName.js +419 -69
- package/dist/backend/core/handlers/handleRouteByName.mjs +3 -3
- 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 +419 -69
- package/dist/backend/core/handlers/index.mjs +4 -4
- package/dist/backend/core/index.d.mts +1 -1
- package/dist/backend/core/index.d.ts +1 -1
- package/dist/backend/core/index.js +419 -69
- package/dist/backend/core/index.mjs +6 -6
- 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.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.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/core/utils/index.mjs +3 -3
- package/dist/backend/index.d.mts +2 -2
- package/dist/backend/index.d.ts +2 -2
- package/dist/backend/index.js +419 -69
- package/dist/backend/index.mjs +6 -6
- package/dist/backend/{routeTypes-DVwngaBn.d.mts → routeTypes-B-X-zb1q.d.mts} +558 -68
- package/dist/backend/{routeTypes-B94_Mq2J.d.ts → routeTypes-bGaZQm24.d.ts} +558 -68
- package/dist/better-auth/{chunk-ZZGFPTHO.mjs → chunk-DNNKTBFL.mjs} +419 -69
- 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.mts → createAutumnEndpoint-Clm1sxhQ.d.mts} +4 -8
- package/dist/better-auth/{createAutumnEndpoint-CvXRCg-M.d.ts → 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 +419 -69
- package/dist/better-auth/index.mjs +1 -1
- 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/handleBetterAuthRoute.d.mts +2 -4
- package/dist/better-auth/utils/handleBetterAuthRoute.d.ts +2 -4
- package/dist/better-auth/utils/handleBetterAuthRoute.js +419 -69
- package/dist/better-auth/utils/handleBetterAuthRoute.mjs +1 -1
- 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 +419 -69
- package/dist/better-auth/utils/index.mjs +1 -1
- package/dist/react/AutumnContext.d.mts +1 -1
- package/dist/react/AutumnContext.d.ts +1 -1
- package/dist/react/client/AutumnClient.d.mts +1 -1
- package/dist/react/client/AutumnClient.d.ts +1 -1
- package/dist/react/client/IAutumnClient.d.mts +1 -1
- package/dist/react/client/IAutumnClient.d.ts +1 -1
- package/dist/react/client/index.d.mts +1 -1
- package/dist/react/client/index.d.ts +1 -1
- package/dist/react/hooks/index.d.mts +1 -1
- package/dist/react/hooks/index.d.ts +1 -1
- package/dist/react/hooks/internal/getLocalCheckResponse.d.mts +1 -1
- package/dist/react/hooks/internal/getLocalCheckResponse.d.ts +1 -1
- package/dist/react/hooks/internal/useCustomerActions.d.mts +1 -1
- package/dist/react/hooks/internal/useCustomerActions.d.ts +1 -1
- package/dist/react/hooks/useAggregateEvents.d.mts +1 -1
- package/dist/react/hooks/useAggregateEvents.d.ts +1 -1
- package/dist/react/hooks/useCustomer.d.mts +1 -1
- package/dist/react/hooks/useCustomer.d.ts +1 -1
- package/dist/react/hooks/useEntity.d.mts +1 -1
- package/dist/react/hooks/useEntity.d.ts +1 -1
- package/dist/react/hooks/useListEvents.d.mts +1 -1
- package/dist/react/hooks/useListEvents.d.ts +1 -1
- package/dist/react/hooks/useListPlans.d.mts +1 -1
- package/dist/react/hooks/useListPlans.d.ts +1 -1
- package/dist/react/hooks/useReferrals.d.mts +1 -1
- package/dist/react/hooks/useReferrals.d.ts +1 -1
- package/dist/react/index.d.mts +1 -1
- package/dist/react/index.d.ts +1 -1
- package/dist/react/{params-B5l9vHfZ.d.ts → params-CTiHT2EX.d.ts} +515 -64
- package/dist/react/{params-BVglT8vT.d.mts → params-ZvrBzzFE.d.mts} +515 -64
- package/dist/sdk/index.d.mts +683 -109
- package/dist/sdk/index.d.ts +683 -109
- package/dist/sdk/index.js +3436 -2889
- package/dist/sdk/index.mjs +3320 -2837
- package/package.json +1 -1
|
@@ -2286,31 +2286,31 @@ var BillingUpdateResponse$inboundSchema = z12.pipe(
|
|
|
2286
2286
|
|
|
2287
2287
|
// ../sdk/src/models/check-op.ts
|
|
2288
2288
|
var z13 = __toESM(require("zod/v4-mini"), 1);
|
|
2289
|
-
var
|
|
2289
|
+
var FlagType2 = {
|
|
2290
2290
|
Boolean: "boolean",
|
|
2291
2291
|
Metered: "metered",
|
|
2292
2292
|
CreditSystem: "credit_system"
|
|
2293
2293
|
};
|
|
2294
|
-
var
|
|
2294
|
+
var Scenario2 = {
|
|
2295
2295
|
UsageLimit: "usage_limit",
|
|
2296
2296
|
FeatureFlag: "feature_flag"
|
|
2297
2297
|
};
|
|
2298
|
-
var
|
|
2298
|
+
var CheckEnv2 = {
|
|
2299
2299
|
Sandbox: "sandbox",
|
|
2300
2300
|
Live: "live"
|
|
2301
2301
|
};
|
|
2302
|
-
var
|
|
2302
|
+
var ProductType2 = {
|
|
2303
2303
|
Feature: "feature",
|
|
2304
2304
|
PricedFeature: "priced_feature",
|
|
2305
2305
|
Price: "price"
|
|
2306
2306
|
};
|
|
2307
|
-
var
|
|
2307
|
+
var FeatureType2 = {
|
|
2308
2308
|
SingleUse: "single_use",
|
|
2309
2309
|
ContinuousUse: "continuous_use",
|
|
2310
2310
|
Boolean: "boolean",
|
|
2311
2311
|
Static: "static"
|
|
2312
2312
|
};
|
|
2313
|
-
var
|
|
2313
|
+
var CheckInterval2 = {
|
|
2314
2314
|
Minute: "minute",
|
|
2315
2315
|
Hour: "hour",
|
|
2316
2316
|
Day: "day",
|
|
@@ -2320,37 +2320,113 @@ var CheckInterval = {
|
|
|
2320
2320
|
SemiAnnual: "semi_annual",
|
|
2321
2321
|
Year: "year"
|
|
2322
2322
|
};
|
|
2323
|
-
var
|
|
2323
|
+
var CheckTierBehavior2 = {
|
|
2324
2324
|
Graduated: "graduated",
|
|
2325
2325
|
Volume: "volume"
|
|
2326
2326
|
};
|
|
2327
|
-
var
|
|
2327
|
+
var UsageModel2 = {
|
|
2328
2328
|
Prepaid: "prepaid",
|
|
2329
2329
|
PayPerUse: "pay_per_use"
|
|
2330
2330
|
};
|
|
2331
|
-
var
|
|
2331
|
+
var ConfigDuration2 = {
|
|
2332
2332
|
Month: "month",
|
|
2333
2333
|
Forever: "forever"
|
|
2334
2334
|
};
|
|
2335
|
-
var
|
|
2335
|
+
var CheckOnIncrease2 = {
|
|
2336
2336
|
BillImmediately: "bill_immediately",
|
|
2337
2337
|
ProrateImmediately: "prorate_immediately",
|
|
2338
2338
|
ProrateNextCycle: "prorate_next_cycle",
|
|
2339
2339
|
BillNextCycle: "bill_next_cycle"
|
|
2340
2340
|
};
|
|
2341
|
-
var
|
|
2341
|
+
var CheckOnDecrease2 = {
|
|
2342
2342
|
Prorate: "prorate",
|
|
2343
2343
|
ProrateImmediately: "prorate_immediately",
|
|
2344
2344
|
ProrateNextCycle: "prorate_next_cycle",
|
|
2345
2345
|
None: "none",
|
|
2346
2346
|
NoProrations: "no_prorations"
|
|
2347
2347
|
};
|
|
2348
|
-
var
|
|
2348
|
+
var FreeTrialDuration2 = {
|
|
2349
2349
|
Day: "day",
|
|
2350
2350
|
Month: "month",
|
|
2351
2351
|
Year: "year"
|
|
2352
2352
|
};
|
|
2353
|
-
var
|
|
2353
|
+
var ProductScenario2 = {
|
|
2354
|
+
Scheduled: "scheduled",
|
|
2355
|
+
Active: "active",
|
|
2356
|
+
New: "new",
|
|
2357
|
+
Renew: "renew",
|
|
2358
|
+
Upgrade: "upgrade",
|
|
2359
|
+
UpdatePrepaidQuantity: "update_prepaid_quantity",
|
|
2360
|
+
Downgrade: "downgrade",
|
|
2361
|
+
Cancel: "cancel",
|
|
2362
|
+
Expired: "expired",
|
|
2363
|
+
PastDue: "past_due"
|
|
2364
|
+
};
|
|
2365
|
+
var FlagType1 = {
|
|
2366
|
+
Boolean: "boolean",
|
|
2367
|
+
Metered: "metered",
|
|
2368
|
+
CreditSystem: "credit_system"
|
|
2369
|
+
};
|
|
2370
|
+
var Scenario1 = {
|
|
2371
|
+
UsageLimit: "usage_limit",
|
|
2372
|
+
FeatureFlag: "feature_flag"
|
|
2373
|
+
};
|
|
2374
|
+
var CheckEnv1 = {
|
|
2375
|
+
Sandbox: "sandbox",
|
|
2376
|
+
Live: "live"
|
|
2377
|
+
};
|
|
2378
|
+
var ProductType1 = {
|
|
2379
|
+
Feature: "feature",
|
|
2380
|
+
PricedFeature: "priced_feature",
|
|
2381
|
+
Price: "price"
|
|
2382
|
+
};
|
|
2383
|
+
var FeatureType1 = {
|
|
2384
|
+
SingleUse: "single_use",
|
|
2385
|
+
ContinuousUse: "continuous_use",
|
|
2386
|
+
Boolean: "boolean",
|
|
2387
|
+
Static: "static"
|
|
2388
|
+
};
|
|
2389
|
+
var CheckInterval1 = {
|
|
2390
|
+
Minute: "minute",
|
|
2391
|
+
Hour: "hour",
|
|
2392
|
+
Day: "day",
|
|
2393
|
+
Week: "week",
|
|
2394
|
+
Month: "month",
|
|
2395
|
+
Quarter: "quarter",
|
|
2396
|
+
SemiAnnual: "semi_annual",
|
|
2397
|
+
Year: "year"
|
|
2398
|
+
};
|
|
2399
|
+
var CheckTierBehavior1 = {
|
|
2400
|
+
Graduated: "graduated",
|
|
2401
|
+
Volume: "volume"
|
|
2402
|
+
};
|
|
2403
|
+
var UsageModel1 = {
|
|
2404
|
+
Prepaid: "prepaid",
|
|
2405
|
+
PayPerUse: "pay_per_use"
|
|
2406
|
+
};
|
|
2407
|
+
var ConfigDuration1 = {
|
|
2408
|
+
Month: "month",
|
|
2409
|
+
Forever: "forever"
|
|
2410
|
+
};
|
|
2411
|
+
var CheckOnIncrease1 = {
|
|
2412
|
+
BillImmediately: "bill_immediately",
|
|
2413
|
+
ProrateImmediately: "prorate_immediately",
|
|
2414
|
+
ProrateNextCycle: "prorate_next_cycle",
|
|
2415
|
+
BillNextCycle: "bill_next_cycle"
|
|
2416
|
+
};
|
|
2417
|
+
var CheckOnDecrease1 = {
|
|
2418
|
+
Prorate: "prorate",
|
|
2419
|
+
ProrateImmediately: "prorate_immediately",
|
|
2420
|
+
ProrateNextCycle: "prorate_next_cycle",
|
|
2421
|
+
None: "none",
|
|
2422
|
+
NoProrations: "no_prorations"
|
|
2423
|
+
};
|
|
2424
|
+
var FreeTrialDuration1 = {
|
|
2425
|
+
Day: "day",
|
|
2426
|
+
Month: "month",
|
|
2427
|
+
Year: "year"
|
|
2428
|
+
};
|
|
2429
|
+
var ProductScenario1 = {
|
|
2354
2430
|
Scheduled: "scheduled",
|
|
2355
2431
|
Active: "active",
|
|
2356
2432
|
New: "new",
|
|
@@ -2397,8 +2473,8 @@ var CheckParams$outboundSchema = z13.pipe(
|
|
|
2397
2473
|
});
|
|
2398
2474
|
})
|
|
2399
2475
|
);
|
|
2400
|
-
var
|
|
2401
|
-
var
|
|
2476
|
+
var FlagType2$inboundSchema = inboundSchema(FlagType2);
|
|
2477
|
+
var CheckCreditSchema2$inboundSchema = z13.pipe(
|
|
2402
2478
|
z13.object({
|
|
2403
2479
|
metered_feature_id: string4(),
|
|
2404
2480
|
credit_cost: number2()
|
|
@@ -2410,21 +2486,21 @@ var CheckCreditSchema$inboundSchema = z13.pipe(
|
|
|
2410
2486
|
});
|
|
2411
2487
|
})
|
|
2412
2488
|
);
|
|
2413
|
-
var
|
|
2489
|
+
var FlagDisplay2$inboundSchema = z13.object({
|
|
2414
2490
|
singular: z13.optional(z13.nullable(string4())),
|
|
2415
2491
|
plural: z13.optional(z13.nullable(string4()))
|
|
2416
2492
|
});
|
|
2417
|
-
var
|
|
2493
|
+
var CheckFeature2$inboundSchema = z13.pipe(
|
|
2418
2494
|
z13.object({
|
|
2419
2495
|
id: string4(),
|
|
2420
2496
|
name: string4(),
|
|
2421
|
-
type:
|
|
2497
|
+
type: FlagType2$inboundSchema,
|
|
2422
2498
|
consumable: boolean2(),
|
|
2423
2499
|
event_names: optional2(z13.array(string4())),
|
|
2424
2500
|
credit_schema: optional2(
|
|
2425
|
-
z13.array(z13.lazy(() =>
|
|
2501
|
+
z13.array(z13.lazy(() => CheckCreditSchema2$inboundSchema))
|
|
2426
2502
|
),
|
|
2427
|
-
display: optional2(z13.lazy(() =>
|
|
2503
|
+
display: optional2(z13.lazy(() => FlagDisplay2$inboundSchema)),
|
|
2428
2504
|
archived: boolean2()
|
|
2429
2505
|
}),
|
|
2430
2506
|
z13.transform((v) => {
|
|
@@ -2434,13 +2510,13 @@ var CheckFeature$inboundSchema = z13.pipe(
|
|
|
2434
2510
|
});
|
|
2435
2511
|
})
|
|
2436
2512
|
);
|
|
2437
|
-
var
|
|
2513
|
+
var Flag2$inboundSchema = z13.pipe(
|
|
2438
2514
|
z13.object({
|
|
2439
2515
|
id: string4(),
|
|
2440
2516
|
plan_id: nullable(string4()),
|
|
2441
2517
|
expires_at: nullable(number2()),
|
|
2442
2518
|
feature_id: string4(),
|
|
2443
|
-
feature: optional2(z13.lazy(() =>
|
|
2519
|
+
feature: optional2(z13.lazy(() => CheckFeature2$inboundSchema))
|
|
2444
2520
|
}),
|
|
2445
2521
|
z13.transform((v) => {
|
|
2446
2522
|
return remap(v, {
|
|
@@ -2450,15 +2526,15 @@ var Flag$inboundSchema = z13.pipe(
|
|
|
2450
2526
|
});
|
|
2451
2527
|
})
|
|
2452
2528
|
);
|
|
2453
|
-
var
|
|
2454
|
-
var
|
|
2455
|
-
var
|
|
2456
|
-
var
|
|
2457
|
-
var
|
|
2458
|
-
var
|
|
2459
|
-
var
|
|
2460
|
-
var
|
|
2461
|
-
var
|
|
2529
|
+
var Scenario2$inboundSchema = inboundSchema(Scenario2);
|
|
2530
|
+
var CheckEnv2$inboundSchema = inboundSchema(CheckEnv2);
|
|
2531
|
+
var ProductType2$inboundSchema = inboundSchema(ProductType2);
|
|
2532
|
+
var FeatureType2$inboundSchema = inboundSchema(FeatureType2);
|
|
2533
|
+
var IncludedUsage2$inboundSchema = smartUnion([number2(), string4()]);
|
|
2534
|
+
var CheckInterval2$inboundSchema = inboundSchema(CheckInterval2);
|
|
2535
|
+
var CheckTierBehavior2$inboundSchema = inboundSchema(CheckTierBehavior2);
|
|
2536
|
+
var UsageModel2$inboundSchema = inboundSchema(UsageModel2);
|
|
2537
|
+
var ProductDisplay2$inboundSchema = z13.pipe(
|
|
2462
2538
|
z13.object({
|
|
2463
2539
|
primary_text: string4(),
|
|
2464
2540
|
secondary_text: z13.optional(z13.nullable(string4()))
|
|
@@ -2470,12 +2546,12 @@ var ProductDisplay$inboundSchema = z13.pipe(
|
|
|
2470
2546
|
});
|
|
2471
2547
|
})
|
|
2472
2548
|
);
|
|
2473
|
-
var
|
|
2474
|
-
var
|
|
2549
|
+
var ConfigDuration2$inboundSchema = inboundSchema(ConfigDuration2);
|
|
2550
|
+
var CheckRollover2$inboundSchema = z13.pipe(
|
|
2475
2551
|
z13.object({
|
|
2476
2552
|
max: z13.optional(z13.nullable(number2())),
|
|
2477
2553
|
max_percentage: z13.optional(z13.nullable(number2())),
|
|
2478
|
-
duration: z13._default(
|
|
2554
|
+
duration: z13._default(ConfigDuration2$inboundSchema, "month"),
|
|
2479
2555
|
length: number2()
|
|
2480
2556
|
}),
|
|
2481
2557
|
z13.transform((v) => {
|
|
@@ -2484,15 +2560,15 @@ var CheckRollover$inboundSchema = z13.pipe(
|
|
|
2484
2560
|
});
|
|
2485
2561
|
})
|
|
2486
2562
|
);
|
|
2487
|
-
var
|
|
2488
|
-
var
|
|
2489
|
-
var
|
|
2563
|
+
var CheckOnIncrease2$inboundSchema = inboundSchema(CheckOnIncrease2);
|
|
2564
|
+
var CheckOnDecrease2$inboundSchema = inboundSchema(CheckOnDecrease2);
|
|
2565
|
+
var CheckConfig2$inboundSchema = z13.pipe(
|
|
2490
2566
|
z13.object({
|
|
2491
2567
|
rollover: z13.optional(
|
|
2492
|
-
z13.nullable(z13.lazy(() =>
|
|
2568
|
+
z13.nullable(z13.lazy(() => CheckRollover2$inboundSchema))
|
|
2493
2569
|
),
|
|
2494
|
-
on_increase: z13.optional(z13.nullable(
|
|
2495
|
-
on_decrease: z13.optional(z13.nullable(
|
|
2570
|
+
on_increase: z13.optional(z13.nullable(CheckOnIncrease2$inboundSchema)),
|
|
2571
|
+
on_decrease: z13.optional(z13.nullable(CheckOnDecrease2$inboundSchema))
|
|
2496
2572
|
}),
|
|
2497
2573
|
z13.transform((v) => {
|
|
2498
2574
|
return remap(v, {
|
|
@@ -2501,29 +2577,29 @@ var CheckConfig$inboundSchema = z13.pipe(
|
|
|
2501
2577
|
});
|
|
2502
2578
|
})
|
|
2503
2579
|
);
|
|
2504
|
-
var
|
|
2580
|
+
var CheckItem2$inboundSchema = z13.pipe(
|
|
2505
2581
|
z13.object({
|
|
2506
|
-
type: z13.optional(z13.nullable(
|
|
2582
|
+
type: z13.optional(z13.nullable(ProductType2$inboundSchema)),
|
|
2507
2583
|
feature_id: z13.optional(z13.nullable(string4())),
|
|
2508
|
-
feature_type: z13.optional(z13.nullable(
|
|
2584
|
+
feature_type: z13.optional(z13.nullable(FeatureType2$inboundSchema)),
|
|
2509
2585
|
included_usage: z13.optional(
|
|
2510
2586
|
z13.nullable(smartUnion([number2(), string4()]))
|
|
2511
2587
|
),
|
|
2512
|
-
interval: z13.optional(z13.nullable(
|
|
2588
|
+
interval: z13.optional(z13.nullable(CheckInterval2$inboundSchema)),
|
|
2513
2589
|
interval_count: z13.optional(z13.nullable(number2())),
|
|
2514
2590
|
price: z13.optional(z13.nullable(number2())),
|
|
2515
2591
|
tiers: z13.optional(z13.nullable(z13.array(nullable(z13.any())))),
|
|
2516
|
-
tier_behavior: z13.optional(z13.nullable(
|
|
2517
|
-
usage_model: z13.optional(z13.nullable(
|
|
2592
|
+
tier_behavior: z13.optional(z13.nullable(CheckTierBehavior2$inboundSchema)),
|
|
2593
|
+
usage_model: z13.optional(z13.nullable(UsageModel2$inboundSchema)),
|
|
2518
2594
|
billing_units: z13.optional(z13.nullable(number2())),
|
|
2519
2595
|
reset_usage_when_enabled: z13.optional(z13.nullable(boolean2())),
|
|
2520
2596
|
entity_feature_id: z13.optional(z13.nullable(string4())),
|
|
2521
2597
|
display: z13.optional(
|
|
2522
|
-
z13.nullable(z13.lazy(() =>
|
|
2598
|
+
z13.nullable(z13.lazy(() => ProductDisplay2$inboundSchema))
|
|
2523
2599
|
),
|
|
2524
2600
|
quantity: z13.optional(z13.nullable(number2())),
|
|
2525
2601
|
next_cycle_quantity: z13.optional(z13.nullable(number2())),
|
|
2526
|
-
config: z13.optional(z13.nullable(z13.lazy(() =>
|
|
2602
|
+
config: z13.optional(z13.nullable(z13.lazy(() => CheckConfig2$inboundSchema)))
|
|
2527
2603
|
}),
|
|
2528
2604
|
z13.transform((v) => {
|
|
2529
2605
|
return remap(v, {
|
|
@@ -2540,10 +2616,10 @@ var CheckItem$inboundSchema = z13.pipe(
|
|
|
2540
2616
|
});
|
|
2541
2617
|
})
|
|
2542
2618
|
);
|
|
2543
|
-
var
|
|
2544
|
-
var
|
|
2619
|
+
var FreeTrialDuration2$inboundSchema = inboundSchema(FreeTrialDuration2);
|
|
2620
|
+
var CheckFreeTrial2$inboundSchema = z13.pipe(
|
|
2545
2621
|
z13.object({
|
|
2546
|
-
duration:
|
|
2622
|
+
duration: FreeTrialDuration2$inboundSchema,
|
|
2547
2623
|
length: number2(),
|
|
2548
2624
|
unique_fingerprint: boolean2(),
|
|
2549
2625
|
card_required: boolean2(),
|
|
@@ -2557,8 +2633,8 @@ var CheckFreeTrial$inboundSchema = z13.pipe(
|
|
|
2557
2633
|
});
|
|
2558
2634
|
})
|
|
2559
2635
|
);
|
|
2560
|
-
var
|
|
2561
|
-
var
|
|
2636
|
+
var ProductScenario2$inboundSchema = inboundSchema(ProductScenario2);
|
|
2637
|
+
var Properties2$inboundSchema = z13.pipe(
|
|
2562
2638
|
z13.object({
|
|
2563
2639
|
is_free: boolean2(),
|
|
2564
2640
|
is_one_off: boolean2(),
|
|
@@ -2575,22 +2651,22 @@ var Properties$inboundSchema = z13.pipe(
|
|
|
2575
2651
|
});
|
|
2576
2652
|
})
|
|
2577
2653
|
);
|
|
2578
|
-
var
|
|
2654
|
+
var Product2$inboundSchema = z13.pipe(
|
|
2579
2655
|
z13.object({
|
|
2580
2656
|
id: string4(),
|
|
2581
2657
|
name: string4(),
|
|
2582
2658
|
group: nullable(string4()),
|
|
2583
|
-
env:
|
|
2659
|
+
env: CheckEnv2$inboundSchema,
|
|
2584
2660
|
is_add_on: boolean2(),
|
|
2585
2661
|
is_default: boolean2(),
|
|
2586
2662
|
archived: boolean2(),
|
|
2587
2663
|
version: number2(),
|
|
2588
2664
|
created_at: number2(),
|
|
2589
|
-
items: z13.array(z13.lazy(() =>
|
|
2590
|
-
free_trial: nullable(z13.lazy(() =>
|
|
2665
|
+
items: z13.array(z13.lazy(() => CheckItem2$inboundSchema)),
|
|
2666
|
+
free_trial: nullable(z13.lazy(() => CheckFreeTrial2$inboundSchema)),
|
|
2591
2667
|
base_variant_id: nullable(string4()),
|
|
2592
|
-
scenario: optional2(
|
|
2593
|
-
properties: optional2(z13.lazy(() =>
|
|
2668
|
+
scenario: optional2(ProductScenario2$inboundSchema),
|
|
2669
|
+
properties: optional2(z13.lazy(() => Properties2$inboundSchema))
|
|
2594
2670
|
}),
|
|
2595
2671
|
z13.transform((v) => {
|
|
2596
2672
|
return remap(v, {
|
|
@@ -2602,14 +2678,14 @@ var Product$inboundSchema = z13.pipe(
|
|
|
2602
2678
|
});
|
|
2603
2679
|
})
|
|
2604
2680
|
);
|
|
2605
|
-
var
|
|
2681
|
+
var Preview2$inboundSchema = z13.pipe(
|
|
2606
2682
|
z13.object({
|
|
2607
|
-
scenario:
|
|
2683
|
+
scenario: Scenario2$inboundSchema,
|
|
2608
2684
|
title: string4(),
|
|
2609
2685
|
message: string4(),
|
|
2610
2686
|
feature_id: string4(),
|
|
2611
2687
|
feature_name: string4(),
|
|
2612
|
-
products: z13.array(z13.lazy(() =>
|
|
2688
|
+
products: z13.array(z13.lazy(() => Product2$inboundSchema))
|
|
2613
2689
|
}),
|
|
2614
2690
|
z13.transform((v) => {
|
|
2615
2691
|
return remap(v, {
|
|
@@ -2618,15 +2694,15 @@ var Preview$inboundSchema = z13.pipe(
|
|
|
2618
2694
|
});
|
|
2619
2695
|
})
|
|
2620
2696
|
);
|
|
2621
|
-
var
|
|
2697
|
+
var CheckResponseBody2$inboundSchema = z13.pipe(
|
|
2622
2698
|
z13.object({
|
|
2623
2699
|
allowed: boolean2(),
|
|
2624
2700
|
customer_id: string4(),
|
|
2625
2701
|
entity_id: z13.optional(z13.nullable(string4())),
|
|
2626
2702
|
required_balance: optional2(number2()),
|
|
2627
2703
|
balance: nullable(Balance$inboundSchema),
|
|
2628
|
-
flag: nullable(z13.lazy(() =>
|
|
2629
|
-
preview: optional2(z13.lazy(() =>
|
|
2704
|
+
flag: nullable(z13.lazy(() => Flag2$inboundSchema)),
|
|
2705
|
+
preview: optional2(z13.lazy(() => Preview2$inboundSchema))
|
|
2630
2706
|
}),
|
|
2631
2707
|
z13.transform((v) => {
|
|
2632
2708
|
return remap(v, {
|
|
@@ -2636,6 +2712,249 @@ var CheckResponse$inboundSchema = z13.pipe(
|
|
|
2636
2712
|
});
|
|
2637
2713
|
})
|
|
2638
2714
|
);
|
|
2715
|
+
var FlagType1$inboundSchema = inboundSchema(FlagType1);
|
|
2716
|
+
var CheckCreditSchema1$inboundSchema = z13.pipe(
|
|
2717
|
+
z13.object({
|
|
2718
|
+
metered_feature_id: string4(),
|
|
2719
|
+
credit_cost: number2()
|
|
2720
|
+
}),
|
|
2721
|
+
z13.transform((v) => {
|
|
2722
|
+
return remap(v, {
|
|
2723
|
+
"metered_feature_id": "meteredFeatureId",
|
|
2724
|
+
"credit_cost": "creditCost"
|
|
2725
|
+
});
|
|
2726
|
+
})
|
|
2727
|
+
);
|
|
2728
|
+
var FlagDisplay1$inboundSchema = z13.object({
|
|
2729
|
+
singular: z13.optional(z13.nullable(string4())),
|
|
2730
|
+
plural: z13.optional(z13.nullable(string4()))
|
|
2731
|
+
});
|
|
2732
|
+
var CheckFeature1$inboundSchema = z13.pipe(
|
|
2733
|
+
z13.object({
|
|
2734
|
+
id: string4(),
|
|
2735
|
+
name: string4(),
|
|
2736
|
+
type: FlagType1$inboundSchema,
|
|
2737
|
+
consumable: boolean2(),
|
|
2738
|
+
event_names: optional2(z13.array(string4())),
|
|
2739
|
+
credit_schema: optional2(
|
|
2740
|
+
z13.array(z13.lazy(() => CheckCreditSchema1$inboundSchema))
|
|
2741
|
+
),
|
|
2742
|
+
display: optional2(z13.lazy(() => FlagDisplay1$inboundSchema)),
|
|
2743
|
+
archived: boolean2()
|
|
2744
|
+
}),
|
|
2745
|
+
z13.transform((v) => {
|
|
2746
|
+
return remap(v, {
|
|
2747
|
+
"event_names": "eventNames",
|
|
2748
|
+
"credit_schema": "creditSchema"
|
|
2749
|
+
});
|
|
2750
|
+
})
|
|
2751
|
+
);
|
|
2752
|
+
var Flag1$inboundSchema = z13.pipe(
|
|
2753
|
+
z13.object({
|
|
2754
|
+
id: string4(),
|
|
2755
|
+
plan_id: nullable(string4()),
|
|
2756
|
+
expires_at: nullable(number2()),
|
|
2757
|
+
feature_id: string4(),
|
|
2758
|
+
feature: optional2(z13.lazy(() => CheckFeature1$inboundSchema))
|
|
2759
|
+
}),
|
|
2760
|
+
z13.transform((v) => {
|
|
2761
|
+
return remap(v, {
|
|
2762
|
+
"plan_id": "planId",
|
|
2763
|
+
"expires_at": "expiresAt",
|
|
2764
|
+
"feature_id": "featureId"
|
|
2765
|
+
});
|
|
2766
|
+
})
|
|
2767
|
+
);
|
|
2768
|
+
var Scenario1$inboundSchema = inboundSchema(Scenario1);
|
|
2769
|
+
var CheckEnv1$inboundSchema = inboundSchema(CheckEnv1);
|
|
2770
|
+
var ProductType1$inboundSchema = inboundSchema(ProductType1);
|
|
2771
|
+
var FeatureType1$inboundSchema = inboundSchema(FeatureType1);
|
|
2772
|
+
var IncludedUsage1$inboundSchema = smartUnion([number2(), string4()]);
|
|
2773
|
+
var CheckInterval1$inboundSchema = inboundSchema(CheckInterval1);
|
|
2774
|
+
var CheckTierBehavior1$inboundSchema = inboundSchema(CheckTierBehavior1);
|
|
2775
|
+
var UsageModel1$inboundSchema = inboundSchema(UsageModel1);
|
|
2776
|
+
var ProductDisplay1$inboundSchema = z13.pipe(
|
|
2777
|
+
z13.object({
|
|
2778
|
+
primary_text: string4(),
|
|
2779
|
+
secondary_text: z13.optional(z13.nullable(string4()))
|
|
2780
|
+
}),
|
|
2781
|
+
z13.transform((v) => {
|
|
2782
|
+
return remap(v, {
|
|
2783
|
+
"primary_text": "primaryText",
|
|
2784
|
+
"secondary_text": "secondaryText"
|
|
2785
|
+
});
|
|
2786
|
+
})
|
|
2787
|
+
);
|
|
2788
|
+
var ConfigDuration1$inboundSchema = inboundSchema(ConfigDuration1);
|
|
2789
|
+
var CheckRollover1$inboundSchema = z13.pipe(
|
|
2790
|
+
z13.object({
|
|
2791
|
+
max: z13.optional(z13.nullable(number2())),
|
|
2792
|
+
max_percentage: z13.optional(z13.nullable(number2())),
|
|
2793
|
+
duration: z13._default(ConfigDuration1$inboundSchema, "month"),
|
|
2794
|
+
length: number2()
|
|
2795
|
+
}),
|
|
2796
|
+
z13.transform((v) => {
|
|
2797
|
+
return remap(v, {
|
|
2798
|
+
"max_percentage": "maxPercentage"
|
|
2799
|
+
});
|
|
2800
|
+
})
|
|
2801
|
+
);
|
|
2802
|
+
var CheckOnIncrease1$inboundSchema = inboundSchema(CheckOnIncrease1);
|
|
2803
|
+
var CheckOnDecrease1$inboundSchema = inboundSchema(CheckOnDecrease1);
|
|
2804
|
+
var CheckConfig1$inboundSchema = z13.pipe(
|
|
2805
|
+
z13.object({
|
|
2806
|
+
rollover: z13.optional(
|
|
2807
|
+
z13.nullable(z13.lazy(() => CheckRollover1$inboundSchema))
|
|
2808
|
+
),
|
|
2809
|
+
on_increase: z13.optional(z13.nullable(CheckOnIncrease1$inboundSchema)),
|
|
2810
|
+
on_decrease: z13.optional(z13.nullable(CheckOnDecrease1$inboundSchema))
|
|
2811
|
+
}),
|
|
2812
|
+
z13.transform((v) => {
|
|
2813
|
+
return remap(v, {
|
|
2814
|
+
"on_increase": "onIncrease",
|
|
2815
|
+
"on_decrease": "onDecrease"
|
|
2816
|
+
});
|
|
2817
|
+
})
|
|
2818
|
+
);
|
|
2819
|
+
var CheckItem1$inboundSchema = z13.pipe(
|
|
2820
|
+
z13.object({
|
|
2821
|
+
type: z13.optional(z13.nullable(ProductType1$inboundSchema)),
|
|
2822
|
+
feature_id: z13.optional(z13.nullable(string4())),
|
|
2823
|
+
feature_type: z13.optional(z13.nullable(FeatureType1$inboundSchema)),
|
|
2824
|
+
included_usage: z13.optional(
|
|
2825
|
+
z13.nullable(smartUnion([number2(), string4()]))
|
|
2826
|
+
),
|
|
2827
|
+
interval: z13.optional(z13.nullable(CheckInterval1$inboundSchema)),
|
|
2828
|
+
interval_count: z13.optional(z13.nullable(number2())),
|
|
2829
|
+
price: z13.optional(z13.nullable(number2())),
|
|
2830
|
+
tiers: z13.optional(z13.nullable(z13.array(nullable(z13.any())))),
|
|
2831
|
+
tier_behavior: z13.optional(z13.nullable(CheckTierBehavior1$inboundSchema)),
|
|
2832
|
+
usage_model: z13.optional(z13.nullable(UsageModel1$inboundSchema)),
|
|
2833
|
+
billing_units: z13.optional(z13.nullable(number2())),
|
|
2834
|
+
reset_usage_when_enabled: z13.optional(z13.nullable(boolean2())),
|
|
2835
|
+
entity_feature_id: z13.optional(z13.nullable(string4())),
|
|
2836
|
+
display: z13.optional(
|
|
2837
|
+
z13.nullable(z13.lazy(() => ProductDisplay1$inboundSchema))
|
|
2838
|
+
),
|
|
2839
|
+
quantity: z13.optional(z13.nullable(number2())),
|
|
2840
|
+
next_cycle_quantity: z13.optional(z13.nullable(number2())),
|
|
2841
|
+
config: z13.optional(z13.nullable(z13.lazy(() => CheckConfig1$inboundSchema)))
|
|
2842
|
+
}),
|
|
2843
|
+
z13.transform((v) => {
|
|
2844
|
+
return remap(v, {
|
|
2845
|
+
"feature_id": "featureId",
|
|
2846
|
+
"feature_type": "featureType",
|
|
2847
|
+
"included_usage": "includedUsage",
|
|
2848
|
+
"interval_count": "intervalCount",
|
|
2849
|
+
"tier_behavior": "tierBehavior",
|
|
2850
|
+
"usage_model": "usageModel",
|
|
2851
|
+
"billing_units": "billingUnits",
|
|
2852
|
+
"reset_usage_when_enabled": "resetUsageWhenEnabled",
|
|
2853
|
+
"entity_feature_id": "entityFeatureId",
|
|
2854
|
+
"next_cycle_quantity": "nextCycleQuantity"
|
|
2855
|
+
});
|
|
2856
|
+
})
|
|
2857
|
+
);
|
|
2858
|
+
var FreeTrialDuration1$inboundSchema = inboundSchema(FreeTrialDuration1);
|
|
2859
|
+
var CheckFreeTrial1$inboundSchema = z13.pipe(
|
|
2860
|
+
z13.object({
|
|
2861
|
+
duration: FreeTrialDuration1$inboundSchema,
|
|
2862
|
+
length: number2(),
|
|
2863
|
+
unique_fingerprint: boolean2(),
|
|
2864
|
+
card_required: boolean2(),
|
|
2865
|
+
trial_available: z13.nullable(z13._default(boolean2(), true))
|
|
2866
|
+
}),
|
|
2867
|
+
z13.transform((v) => {
|
|
2868
|
+
return remap(v, {
|
|
2869
|
+
"unique_fingerprint": "uniqueFingerprint",
|
|
2870
|
+
"card_required": "cardRequired",
|
|
2871
|
+
"trial_available": "trialAvailable"
|
|
2872
|
+
});
|
|
2873
|
+
})
|
|
2874
|
+
);
|
|
2875
|
+
var ProductScenario1$inboundSchema = inboundSchema(ProductScenario1);
|
|
2876
|
+
var Properties1$inboundSchema = z13.pipe(
|
|
2877
|
+
z13.object({
|
|
2878
|
+
is_free: boolean2(),
|
|
2879
|
+
is_one_off: boolean2(),
|
|
2880
|
+
interval_group: z13.optional(z13.nullable(string4())),
|
|
2881
|
+
has_trial: z13.optional(z13.nullable(boolean2())),
|
|
2882
|
+
updateable: z13.optional(z13.nullable(boolean2()))
|
|
2883
|
+
}),
|
|
2884
|
+
z13.transform((v) => {
|
|
2885
|
+
return remap(v, {
|
|
2886
|
+
"is_free": "isFree",
|
|
2887
|
+
"is_one_off": "isOneOff",
|
|
2888
|
+
"interval_group": "intervalGroup",
|
|
2889
|
+
"has_trial": "hasTrial"
|
|
2890
|
+
});
|
|
2891
|
+
})
|
|
2892
|
+
);
|
|
2893
|
+
var Product1$inboundSchema = z13.pipe(
|
|
2894
|
+
z13.object({
|
|
2895
|
+
id: string4(),
|
|
2896
|
+
name: string4(),
|
|
2897
|
+
group: nullable(string4()),
|
|
2898
|
+
env: CheckEnv1$inboundSchema,
|
|
2899
|
+
is_add_on: boolean2(),
|
|
2900
|
+
is_default: boolean2(),
|
|
2901
|
+
archived: boolean2(),
|
|
2902
|
+
version: number2(),
|
|
2903
|
+
created_at: number2(),
|
|
2904
|
+
items: z13.array(z13.lazy(() => CheckItem1$inboundSchema)),
|
|
2905
|
+
free_trial: nullable(z13.lazy(() => CheckFreeTrial1$inboundSchema)),
|
|
2906
|
+
base_variant_id: nullable(string4()),
|
|
2907
|
+
scenario: optional2(ProductScenario1$inboundSchema),
|
|
2908
|
+
properties: optional2(z13.lazy(() => Properties1$inboundSchema))
|
|
2909
|
+
}),
|
|
2910
|
+
z13.transform((v) => {
|
|
2911
|
+
return remap(v, {
|
|
2912
|
+
"is_add_on": "isAddOn",
|
|
2913
|
+
"is_default": "isDefault",
|
|
2914
|
+
"created_at": "createdAt",
|
|
2915
|
+
"free_trial": "freeTrial",
|
|
2916
|
+
"base_variant_id": "baseVariantId"
|
|
2917
|
+
});
|
|
2918
|
+
})
|
|
2919
|
+
);
|
|
2920
|
+
var Preview1$inboundSchema = z13.pipe(
|
|
2921
|
+
z13.object({
|
|
2922
|
+
scenario: Scenario1$inboundSchema,
|
|
2923
|
+
title: string4(),
|
|
2924
|
+
message: string4(),
|
|
2925
|
+
feature_id: string4(),
|
|
2926
|
+
feature_name: string4(),
|
|
2927
|
+
products: z13.array(z13.lazy(() => Product1$inboundSchema))
|
|
2928
|
+
}),
|
|
2929
|
+
z13.transform((v) => {
|
|
2930
|
+
return remap(v, {
|
|
2931
|
+
"feature_id": "featureId",
|
|
2932
|
+
"feature_name": "featureName"
|
|
2933
|
+
});
|
|
2934
|
+
})
|
|
2935
|
+
);
|
|
2936
|
+
var CheckResponseBody1$inboundSchema = z13.pipe(
|
|
2937
|
+
z13.object({
|
|
2938
|
+
allowed: boolean2(),
|
|
2939
|
+
customer_id: string4(),
|
|
2940
|
+
entity_id: z13.optional(z13.nullable(string4())),
|
|
2941
|
+
required_balance: optional2(number2()),
|
|
2942
|
+
balance: nullable(Balance$inboundSchema),
|
|
2943
|
+
flag: nullable(z13.lazy(() => Flag1$inboundSchema)),
|
|
2944
|
+
preview: optional2(z13.lazy(() => Preview1$inboundSchema))
|
|
2945
|
+
}),
|
|
2946
|
+
z13.transform((v) => {
|
|
2947
|
+
return remap(v, {
|
|
2948
|
+
"customer_id": "customerId",
|
|
2949
|
+
"entity_id": "entityId",
|
|
2950
|
+
"required_balance": "requiredBalance"
|
|
2951
|
+
});
|
|
2952
|
+
})
|
|
2953
|
+
);
|
|
2954
|
+
var CheckResponse$inboundSchema = smartUnion([
|
|
2955
|
+
z13.lazy(() => CheckResponseBody1$inboundSchema),
|
|
2956
|
+
z13.lazy(() => CheckResponseBody2$inboundSchema)
|
|
2957
|
+
]);
|
|
2639
2958
|
|
|
2640
2959
|
// ../sdk/src/models/create-balance-op.ts
|
|
2641
2960
|
var z14 = __toESM(require("zod/v4-mini"), 1);
|
|
@@ -4610,9 +4929,16 @@ var FinalizeBalanceParams$outboundSchema = z27.pipe(
|
|
|
4610
4929
|
});
|
|
4611
4930
|
})
|
|
4612
4931
|
);
|
|
4613
|
-
var
|
|
4932
|
+
var FinalizeLockResponseBody2$inboundSchema = z27.object({
|
|
4614
4933
|
success: boolean2()
|
|
4615
4934
|
});
|
|
4935
|
+
var FinalizeLockResponseBody1$inboundSchema = z27.object({
|
|
4936
|
+
success: boolean2()
|
|
4937
|
+
});
|
|
4938
|
+
var FinalizeLockResponse$inboundSchema = smartUnion([
|
|
4939
|
+
z27.lazy(() => FinalizeLockResponseBody1$inboundSchema),
|
|
4940
|
+
z27.lazy(() => FinalizeLockResponseBody2$inboundSchema)
|
|
4941
|
+
]);
|
|
4616
4942
|
|
|
4617
4943
|
// ../sdk/src/models/get-entity-op.ts
|
|
4618
4944
|
var z28 = __toESM(require("zod/v4-mini"), 1);
|
|
@@ -8648,7 +8974,7 @@ var TrackParams$outboundSchema = z43.pipe(
|
|
|
8648
8974
|
});
|
|
8649
8975
|
})
|
|
8650
8976
|
);
|
|
8651
|
-
var
|
|
8977
|
+
var TrackResponseBody2$inboundSchema = z43.pipe(
|
|
8652
8978
|
z43.object({
|
|
8653
8979
|
customer_id: string4(),
|
|
8654
8980
|
entity_id: optional2(string4()),
|
|
@@ -8665,6 +8991,27 @@ var TrackResponse$inboundSchema = z43.pipe(
|
|
|
8665
8991
|
});
|
|
8666
8992
|
})
|
|
8667
8993
|
);
|
|
8994
|
+
var TrackResponseBody1$inboundSchema = z43.pipe(
|
|
8995
|
+
z43.object({
|
|
8996
|
+
customer_id: string4(),
|
|
8997
|
+
entity_id: optional2(string4()),
|
|
8998
|
+
event_name: optional2(string4()),
|
|
8999
|
+
value: number2(),
|
|
9000
|
+
balance: nullable(Balance$inboundSchema),
|
|
9001
|
+
balances: optional2(z43.record(z43.string(), Balance$inboundSchema))
|
|
9002
|
+
}),
|
|
9003
|
+
z43.transform((v) => {
|
|
9004
|
+
return remap(v, {
|
|
9005
|
+
"customer_id": "customerId",
|
|
9006
|
+
"entity_id": "entityId",
|
|
9007
|
+
"event_name": "eventName"
|
|
9008
|
+
});
|
|
9009
|
+
})
|
|
9010
|
+
);
|
|
9011
|
+
var TrackResponse$inboundSchema = smartUnion([
|
|
9012
|
+
z43.lazy(() => TrackResponseBody1$inboundSchema),
|
|
9013
|
+
z43.lazy(() => TrackResponseBody2$inboundSchema)
|
|
9014
|
+
]);
|
|
8668
9015
|
|
|
8669
9016
|
// ../sdk/src/models/update-balance-op.ts
|
|
8670
9017
|
var z44 = __toESM(require("zod/v4-mini"), 1);
|
|
@@ -10149,6 +10496,7 @@ async function $do(client, request, options) {
|
|
|
10149
10496
|
const response = doResult.value;
|
|
10150
10497
|
const [result] = await match(
|
|
10151
10498
|
json(200, CheckResponse$inboundSchema),
|
|
10499
|
+
json(202, CheckResponse$inboundSchema),
|
|
10152
10500
|
fail("4XX"),
|
|
10153
10501
|
fail("5XX")
|
|
10154
10502
|
)(response, req);
|
|
@@ -10227,6 +10575,7 @@ async function $do2(client, request, options) {
|
|
|
10227
10575
|
const response = doResult.value;
|
|
10228
10576
|
const [result] = await match(
|
|
10229
10577
|
json(200, TrackResponse$inboundSchema),
|
|
10578
|
+
json(202, TrackResponse$inboundSchema),
|
|
10230
10579
|
fail("4XX"),
|
|
10231
10580
|
fail("5XX")
|
|
10232
10581
|
)(response, req);
|
|
@@ -11066,6 +11415,7 @@ async function $do5(client, request, options) {
|
|
|
11066
11415
|
const response = doResult.value;
|
|
11067
11416
|
const [result] = await match(
|
|
11068
11417
|
json(200, FinalizeLockResponse$inboundSchema),
|
|
11418
|
+
json(202, FinalizeLockResponse$inboundSchema),
|
|
11069
11419
|
fail("4XX"),
|
|
11070
11420
|
fail("5XX")
|
|
11071
11421
|
)(response, req);
|
|
@@ -14464,7 +14814,7 @@ var Autumn = class extends ClientSDK {
|
|
|
14464
14814
|
* @param lock - Reserve units of a feature upfront by passing a lock_id, then call balances.finalize to confirm or release the hold. (optional)
|
|
14465
14815
|
* @param withPreview - If true, includes upgrade/upsell information in the response when access is denied. Useful for displaying paywalls. (optional)
|
|
14466
14816
|
*
|
|
14467
|
-
* @returns Whether access is allowed, plus the current balance for that feature.
|
|
14817
|
+
* @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.
|
|
14468
14818
|
*/
|
|
14469
14819
|
async check(request, options) {
|
|
14470
14820
|
return unwrapAsync(check(
|
|
@@ -14497,7 +14847,7 @@ var Autumn = class extends ClientSDK {
|
|
|
14497
14847
|
* @param value - The amount of usage to record. Defaults to 1. Use negative values to credit balance (e.g., when removing a seat). (optional)
|
|
14498
14848
|
* @param properties - Additional properties to attach to this usage event. (optional)
|
|
14499
14849
|
*
|
|
14500
|
-
* @returns The usage value recorded, with either a single updated balance or a map of updated balances.
|
|
14850
|
+
* @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.
|
|
14501
14851
|
*/
|
|
14502
14852
|
async track(request, options) {
|
|
14503
14853
|
return unwrapAsync(track(
|