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