autumn-js 1.2.26 → 1.2.28
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.d.mts +1 -1
- package/dist/backend/adapters/express.d.ts +1 -1
- package/dist/backend/adapters/express.js +4295 -3538
- package/dist/backend/adapters/express.mjs +9 -9
- package/dist/backend/adapters/fetch.d.mts +1 -1
- package/dist/backend/adapters/fetch.d.ts +1 -1
- package/dist/backend/adapters/fetch.js +4295 -3538
- package/dist/backend/adapters/fetch.mjs +9 -9
- package/dist/backend/adapters/hono.d.mts +1 -1
- package/dist/backend/adapters/hono.d.ts +1 -1
- package/dist/backend/adapters/hono.js +4295 -3538
- package/dist/backend/adapters/hono.mjs +9 -9
- package/dist/backend/adapters/index.d.mts +1 -1
- package/dist/backend/adapters/index.d.ts +1 -1
- package/dist/backend/adapters/index.js +4295 -3538
- package/dist/backend/adapters/index.mjs +12 -12
- package/dist/backend/adapters/next.d.mts +1 -1
- package/dist/backend/adapters/next.d.ts +1 -1
- package/dist/backend/adapters/next.js +4295 -3538
- package/dist/backend/adapters/next.mjs +9 -9
- package/dist/backend/{authTypes-B7b2mex1.d.mts → authTypes-CxFcWXh3.d.mts} +1 -1
- package/dist/backend/{authTypes-B7b2mex1.d.ts → authTypes-CxFcWXh3.d.ts} +1 -1
- package/dist/backend/{chunk-LJZUMUU3.mjs → chunk-66OVIMBS.mjs} +5 -5
- package/dist/backend/{chunk-UCGI7CYU.mjs → chunk-GTZJYVV6.mjs} +4248 -3521
- package/dist/backend/chunk-I7CD6EB6.mjs +28 -0
- package/dist/backend/{chunk-55C2WWXQ.mjs → chunk-IXUCY7AU.mjs} +7 -6
- package/dist/backend/{chunk-D4BQG3DH.mjs → chunk-JNHJR2RN.mjs} +1 -1
- package/dist/backend/{chunk-KJTWQSMK.mjs → chunk-N5DL6VA7.mjs} +1 -1
- package/dist/backend/{chunk-MPNJ2AXO.mjs → chunk-PG3VMMBU.mjs} +1 -1
- package/dist/backend/{chunk-ZVZEA5YL.mjs → chunk-RBV55GF7.mjs} +7 -7
- package/dist/backend/{chunk-MAU6WWTL.mjs → chunk-W6NPZLA5.mjs} +40 -14
- package/dist/backend/{chunk-TJ7TRWN4.mjs → chunk-WK4VK7MP.mjs} +1 -1
- package/dist/backend/core/handlers/coreHandler.d.mts +3 -2
- package/dist/backend/core/handlers/coreHandler.d.ts +3 -2
- package/dist/backend/core/handlers/coreHandler.js +4295 -3538
- package/dist/backend/core/handlers/coreHandler.mjs +7 -7
- package/dist/backend/core/handlers/executeRoute.d.mts +3 -2
- package/dist/backend/core/handlers/executeRoute.d.ts +3 -2
- package/dist/backend/core/handlers/executeRoute.js +12 -7
- package/dist/backend/core/handlers/executeRoute.mjs +4 -4
- package/dist/backend/core/handlers/handleRouteByName.d.mts +1 -1
- package/dist/backend/core/handlers/handleRouteByName.d.ts +1 -1
- package/dist/backend/core/handlers/handleRouteByName.js +4295 -3538
- package/dist/backend/core/handlers/handleRouteByName.mjs +7 -7
- package/dist/backend/core/handlers/index.d.mts +3 -2
- package/dist/backend/core/handlers/index.d.ts +3 -2
- package/dist/backend/core/handlers/index.js +4295 -3538
- package/dist/backend/core/handlers/index.mjs +10 -10
- package/dist/backend/core/handlers/resolveIdentity.d.mts +1 -1
- package/dist/backend/core/handlers/resolveIdentity.d.ts +1 -1
- package/dist/backend/core/index.d.mts +2 -2
- package/dist/backend/core/index.d.ts +2 -2
- package/dist/backend/core/index.js +4295 -3538
- package/dist/backend/core/index.mjs +10 -10
- package/dist/backend/core/routes/index.d.mts +3 -2
- package/dist/backend/core/routes/index.d.ts +3 -2
- package/dist/backend/core/routes/index.js +46 -17
- package/dist/backend/core/routes/index.mjs +2 -2
- package/dist/backend/core/routes/routeBuilder.d.mts +3 -2
- package/dist/backend/core/routes/routeBuilder.d.ts +3 -2
- package/dist/backend/core/routes/routeConfigs.d.mts +3 -2
- package/dist/backend/core/routes/routeConfigs.d.ts +3 -2
- package/dist/backend/core/routes/routeConfigs.js +46 -17
- package/dist/backend/core/routes/routeConfigs.mjs +2 -2
- package/dist/backend/core/types/authTypes.d.mts +1 -1
- package/dist/backend/core/types/authTypes.d.ts +1 -1
- package/dist/backend/core/types/handlerTypes.d.mts +3 -2
- package/dist/backend/core/types/handlerTypes.d.ts +3 -2
- package/dist/backend/core/types/index.d.mts +3 -2
- package/dist/backend/core/types/index.d.ts +3 -2
- package/dist/backend/core/types/routeTypes.d.mts +3 -2
- package/dist/backend/core/types/routeTypes.d.ts +3 -2
- package/dist/backend/core/utils/index.d.mts +1 -1
- package/dist/backend/core/utils/index.d.ts +1 -1
- package/dist/backend/core/utils/index.js +12 -4
- package/dist/backend/core/utils/index.mjs +7 -3
- package/dist/backend/core/utils/sanitizeBody.d.mts +6 -2
- package/dist/backend/core/utils/sanitizeBody.d.ts +6 -2
- package/dist/backend/core/utils/sanitizeBody.js +12 -4
- package/dist/backend/core/utils/sanitizeBody.mjs +5 -1
- package/dist/backend/index.d.mts +4 -4
- package/dist/backend/index.d.ts +4 -4
- package/dist/backend/index.js +4295 -3538
- package/dist/backend/index.mjs +10 -10
- package/dist/backend/{routeTypes-BcR8yEXe.d.mts → routeTypes-924R85Bn.d.mts} +557 -15
- package/dist/backend/{routeTypes-CXj2d3BE.d.ts → routeTypes-Db2ZFQC4.d.ts} +557 -15
- package/dist/better-auth/{chunk-EFVPBRMR.mjs → chunk-4ZDXHHF4.mjs} +4253 -3525
- package/dist/better-auth/{chunk-RHJSAAZY.mjs → chunk-NKH2QR2X.mjs} +46 -17
- package/dist/better-auth/{chunk-3TLQJLI4.mjs → chunk-ONM42KFR.mjs} +1 -1
- package/dist/better-auth/index.js +4293 -3536
- package/dist/better-auth/index.mjs +3 -3
- package/dist/better-auth/utils/createAutumnEndpoint.js +46 -17
- package/dist/better-auth/utils/createAutumnEndpoint.mjs +2 -2
- package/dist/better-auth/utils/handleBetterAuthRoute.js +4295 -3538
- package/dist/better-auth/utils/handleBetterAuthRoute.mjs +2 -2
- package/dist/better-auth/utils/index.js +4293 -3536
- package/dist/better-auth/utils/index.mjs +3 -3
- package/dist/react/AutumnContext.d.mts +3 -3
- package/dist/react/AutumnContext.d.ts +3 -3
- package/dist/react/AutumnProvider.js +15 -15
- package/dist/react/AutumnProvider.mjs +2 -2
- package/dist/react/{chunk-7IDH4OMG.mjs → chunk-26CKSAPZ.mjs} +1 -1
- package/dist/react/{chunk-NSFHAUTD.mjs → chunk-CHU7CIWP.mjs} +1 -1
- package/dist/react/{chunk-YQFYWH7J.mjs → chunk-G7FTQLT7.mjs} +1 -1
- package/dist/react/{chunk-BDG6JHEW.mjs → chunk-HSQUB3BZ.mjs} +1 -1
- package/dist/react/{chunk-DEZBJQEG.mjs → chunk-KB72KQKN.mjs} +1 -1
- package/dist/react/{chunk-FWWIAOPU.mjs → chunk-OXQG65ZT.mjs} +1 -1
- package/dist/react/{chunk-HRPQYDEN.mjs → chunk-P23DM4IS.mjs} +1 -1
- package/dist/react/{chunk-E5ZHOMZ4.mjs → chunk-XJZH5NMZ.mjs} +23 -23
- package/dist/react/{chunk-HVBDZARN.mjs → chunk-ZGPE4R6H.mjs} +2 -2
- package/dist/react/client/AutumnClient.d.mts +3 -3
- package/dist/react/client/AutumnClient.d.ts +3 -3
- package/dist/react/client/IAutumnClient.d.mts +3 -3
- package/dist/react/client/IAutumnClient.d.ts +3 -3
- package/dist/react/client/index.d.mts +3 -3
- package/dist/react/client/index.d.ts +3 -3
- package/dist/react/{customer-zogPdrbc.d.ts → customer-DPMyc3yN.d.mts} +31 -1
- package/dist/react/{customer-BTYGVzNm.d.mts → customer-Dr6WZsA2.d.ts} +31 -1
- package/dist/react/hooks/index.d.mts +3 -3
- package/dist/react/hooks/index.d.ts +3 -3
- package/dist/react/hooks/index.js +16 -16
- package/dist/react/hooks/index.mjs +8 -8
- package/dist/react/hooks/internal/check/balanceToAllowed.d.mts +2 -2
- package/dist/react/hooks/internal/check/balanceToAllowed.d.ts +2 -2
- package/dist/react/hooks/internal/check/customerToFeatures.d.mts +2 -2
- package/dist/react/hooks/internal/check/customerToFeatures.d.ts +2 -2
- package/dist/react/hooks/internal/check/findCreditSystemsByFeature.d.mts +2 -2
- package/dist/react/hooks/internal/check/findCreditSystemsByFeature.d.ts +2 -2
- package/dist/react/hooks/internal/check/getCreditCost.d.mts +2 -2
- package/dist/react/hooks/internal/check/getCreditCost.d.ts +2 -2
- package/dist/react/hooks/internal/getLocalCheckResponse.d.mts +3 -3
- package/dist/react/hooks/internal/getLocalCheckResponse.d.ts +3 -3
- package/dist/react/hooks/internal/useCustomerActions.d.mts +3 -3
- package/dist/react/hooks/internal/useCustomerActions.d.ts +3 -3
- package/dist/react/hooks/internal/useCustomerActions.js +1 -1
- package/dist/react/hooks/internal/useCustomerActions.mjs +2 -2
- package/dist/react/hooks/useAggregateEvents.d.mts +2 -2
- package/dist/react/hooks/useAggregateEvents.d.ts +2 -2
- package/dist/react/hooks/useAggregateEvents.js +16 -16
- package/dist/react/hooks/useAggregateEvents.mjs +2 -2
- package/dist/react/hooks/useCustomer.d.mts +3 -3
- package/dist/react/hooks/useCustomer.d.ts +3 -3
- package/dist/react/hooks/useCustomer.js +16 -16
- package/dist/react/hooks/useCustomer.mjs +3 -3
- package/dist/react/hooks/useEntity.d.mts +2 -2
- package/dist/react/hooks/useEntity.d.ts +2 -2
- package/dist/react/hooks/useEntity.js +16 -16
- package/dist/react/hooks/useEntity.mjs +2 -2
- package/dist/react/hooks/useListEvents.d.mts +2 -2
- package/dist/react/hooks/useListEvents.d.ts +2 -2
- package/dist/react/hooks/useListEvents.js +16 -16
- package/dist/react/hooks/useListEvents.mjs +2 -2
- package/dist/react/hooks/useListPlans.d.mts +2 -2
- package/dist/react/hooks/useListPlans.d.ts +2 -2
- package/dist/react/hooks/useListPlans.js +16 -16
- package/dist/react/hooks/useListPlans.mjs +2 -2
- package/dist/react/hooks/useReferrals.d.mts +2 -2
- package/dist/react/hooks/useReferrals.d.ts +2 -2
- package/dist/react/hooks/useReferrals.js +16 -16
- package/dist/react/hooks/useReferrals.mjs +2 -2
- package/dist/react/index.d.mts +3 -3
- package/dist/react/index.d.ts +3 -3
- package/dist/react/index.js +22 -22
- package/dist/react/index.mjs +9 -9
- package/dist/react/{params-DWJn7Y2f.d.ts → params-CeTb8jcT.d.mts} +89 -11
- package/dist/react/{params-DpI-uEQy.d.mts → params-Dl_h1rsu.d.ts} +89 -11
- package/dist/react/{plan-DYHM9lBi.d.mts → plan-CRa-NBw0.d.mts} +1 -1
- package/dist/react/{plan-DYHM9lBi.d.ts → plan-CRa-NBw0.d.ts} +1 -1
- package/dist/sdk/index.d.mts +1075 -378
- package/dist/sdk/index.d.ts +1075 -378
- package/dist/sdk/index.js +4662 -3804
- package/dist/sdk/index.mjs +4584 -3800
- package/package.json +142 -142
- package/dist/backend/chunk-Z6QP3YEA.mjs +0 -22
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { C as ClosedEnum, O as OpenEnum, b as CustomerExpand, G as GetOrCreateCustomerParams, R as ResolvedIdentity } from './authTypes-CxFcWXh3.mjs';
|
|
2
2
|
import { z } from 'zod/v4';
|
|
3
|
+
import { ProtectedBodyField } from './core/utils/sanitizeBody.mjs';
|
|
3
4
|
import { BackendResult } from './core/types/responseTypes.mjs';
|
|
4
5
|
|
|
5
6
|
type Fetcher = (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
|
|
@@ -113,7 +114,7 @@ type SDKOptions = {
|
|
|
113
114
|
* and break out of regular control flow of programs making them harder to
|
|
114
115
|
* inspect and more verbose work with due to try-catch blocks.
|
|
115
116
|
*/
|
|
116
|
-
type Result<T, E = unknown> = {
|
|
117
|
+
type Result$1<T, E = unknown> = {
|
|
117
118
|
ok: true;
|
|
118
119
|
value: T;
|
|
119
120
|
error?: never;
|
|
@@ -801,7 +802,7 @@ type AttachCustomize = {
|
|
|
801
802
|
*/
|
|
802
803
|
price?: AttachBasePrice | null | undefined;
|
|
803
804
|
/**
|
|
804
|
-
* Override the items in the plan (PUT-style — replaces all existing items). Mutually exclusive with add_items / remove_items.
|
|
805
|
+
* Override the items in the plan (PUT-style — replaces all existing items). Mutually exclusive with add_items / remove_items / update_items.
|
|
805
806
|
*/
|
|
806
807
|
items?: Array<AttachItemPlanItem> | undefined;
|
|
807
808
|
/**
|
|
@@ -833,6 +834,14 @@ type AttachInvoiceMode = {
|
|
|
833
834
|
* If true, finalizes the invoice so it can be sent to the customer. If false, keeps it as a draft for manual review.
|
|
834
835
|
*/
|
|
835
836
|
finalize?: boolean | undefined;
|
|
837
|
+
/**
|
|
838
|
+
* ID of an invoice template (configured in billing settings) whose footer (e.g. bank details) is applied to the invoice.
|
|
839
|
+
*/
|
|
840
|
+
invoiceTemplateId?: string | undefined;
|
|
841
|
+
/**
|
|
842
|
+
* Number of days the customer has to pay the invoice before it is due (Stripe days_until_due).
|
|
843
|
+
*/
|
|
844
|
+
netTermsDays?: number | undefined;
|
|
836
845
|
};
|
|
837
846
|
/**
|
|
838
847
|
* How to handle proration when updating an existing subscription. 'prorate_immediately' charges/credits prorated amounts now, 'none' skips creating any charges.
|
|
@@ -1348,6 +1357,60 @@ type Balance = {
|
|
|
1348
1357
|
rollovers?: Array<BalanceRollover> | undefined;
|
|
1349
1358
|
};
|
|
1350
1359
|
|
|
1360
|
+
type BatchTrackLock = {
|
|
1361
|
+
/**
|
|
1362
|
+
* A unique identifier for this lock. Used to finalize the lock later via balances.finalize.
|
|
1363
|
+
*/
|
|
1364
|
+
lockId: string;
|
|
1365
|
+
/**
|
|
1366
|
+
* Must be true to enable locking.
|
|
1367
|
+
*/
|
|
1368
|
+
enabled: true;
|
|
1369
|
+
/**
|
|
1370
|
+
* Unix timestamp (ms) when the lock automatically expires and releases the held balance.
|
|
1371
|
+
*/
|
|
1372
|
+
expiresAt?: number | undefined;
|
|
1373
|
+
};
|
|
1374
|
+
type RequestBody = {
|
|
1375
|
+
/**
|
|
1376
|
+
* The ID of the customer.
|
|
1377
|
+
*/
|
|
1378
|
+
customerId: string;
|
|
1379
|
+
/**
|
|
1380
|
+
* The ID of the feature to track usage for. Required if event_name is not provided.
|
|
1381
|
+
*/
|
|
1382
|
+
featureId?: string | undefined;
|
|
1383
|
+
/**
|
|
1384
|
+
* The ID of the entity for entity-scoped balances (e.g., per-seat limits).
|
|
1385
|
+
*/
|
|
1386
|
+
entityId?: string | undefined;
|
|
1387
|
+
/**
|
|
1388
|
+
* Event name to track usage for. Use instead of feature_id when multiple features should be tracked from a single event.
|
|
1389
|
+
*/
|
|
1390
|
+
eventName?: string | undefined;
|
|
1391
|
+
/**
|
|
1392
|
+
* The amount of usage to record. Defaults to 1. Use negative values to credit balance (e.g., when removing a seat).
|
|
1393
|
+
*/
|
|
1394
|
+
value?: number | undefined;
|
|
1395
|
+
/**
|
|
1396
|
+
* Additional properties to attach to this usage event.
|
|
1397
|
+
*/
|
|
1398
|
+
properties?: {
|
|
1399
|
+
[k: string]: any;
|
|
1400
|
+
} | undefined;
|
|
1401
|
+
/**
|
|
1402
|
+
* If true, enqueue the event for asynchronous processing and return 202 immediately. The response will not include balance information.
|
|
1403
|
+
*/
|
|
1404
|
+
async?: boolean | undefined;
|
|
1405
|
+
lock?: BatchTrackLock | undefined;
|
|
1406
|
+
};
|
|
1407
|
+
/**
|
|
1408
|
+
* Batch accepted. All items passed synchronous validation. Enqueue is best-effort: partial failures (some items enqueued, some not) are logged server-side and are NOT surfaced in the response body; clients must not retry on 202. See the endpoint description for full partial-failure semantics.
|
|
1409
|
+
*/
|
|
1410
|
+
type BatchTrackResponse = {
|
|
1411
|
+
success: true;
|
|
1412
|
+
};
|
|
1413
|
+
|
|
1351
1414
|
/**
|
|
1352
1415
|
* Quantity configuration for a prepaid feature.
|
|
1353
1416
|
*/
|
|
@@ -1905,7 +1968,7 @@ type BillingUpdateCustomize = {
|
|
|
1905
1968
|
*/
|
|
1906
1969
|
price?: BillingUpdateBasePrice | null | undefined;
|
|
1907
1970
|
/**
|
|
1908
|
-
* Override the items in the plan (PUT-style — replaces all existing items). Mutually exclusive with add_items / remove_items.
|
|
1971
|
+
* Override the items in the plan (PUT-style — replaces all existing items). Mutually exclusive with add_items / remove_items / update_items.
|
|
1909
1972
|
*/
|
|
1910
1973
|
items?: Array<BillingUpdateItemPlanItem> | undefined;
|
|
1911
1974
|
/**
|
|
@@ -1937,6 +2000,14 @@ type BillingUpdateInvoiceMode = {
|
|
|
1937
2000
|
* If true, finalizes the invoice so it can be sent to the customer. If false, keeps it as a draft for manual review.
|
|
1938
2001
|
*/
|
|
1939
2002
|
finalize?: boolean | undefined;
|
|
2003
|
+
/**
|
|
2004
|
+
* ID of an invoice template (configured in billing settings) whose footer (e.g. bank details) is applied to the invoice.
|
|
2005
|
+
*/
|
|
2006
|
+
invoiceTemplateId?: string | undefined;
|
|
2007
|
+
/**
|
|
2008
|
+
* Number of days the customer has to pay the invoice before it is due (Stripe days_until_due).
|
|
2009
|
+
*/
|
|
2010
|
+
netTermsDays?: number | undefined;
|
|
1940
2011
|
};
|
|
1941
2012
|
/**
|
|
1942
2013
|
* How to handle proration when updating an existing subscription. 'prorate_immediately' charges/credits prorated amounts now, 'none' skips creating any charges.
|
|
@@ -2528,7 +2599,7 @@ type Properties2 = {
|
|
|
2528
2599
|
*/
|
|
2529
2600
|
updateable?: boolean | null | undefined;
|
|
2530
2601
|
};
|
|
2531
|
-
type
|
|
2602
|
+
type CheckProduct2 = {
|
|
2532
2603
|
/**
|
|
2533
2604
|
* The ID of the product you set when creating the product
|
|
2534
2605
|
*/
|
|
@@ -2610,7 +2681,7 @@ type Preview2 = {
|
|
|
2610
2681
|
/**
|
|
2611
2682
|
* Products that would grant access to this feature. Use to display upgrade options.
|
|
2612
2683
|
*/
|
|
2613
|
-
products: Array<
|
|
2684
|
+
products: Array<CheckProduct2>;
|
|
2614
2685
|
};
|
|
2615
2686
|
/**
|
|
2616
2687
|
* Accepted. Autumn is experiencing degraded service from a downstream provider, so access was allowed fail-open.
|
|
@@ -2993,7 +3064,7 @@ type Properties1 = {
|
|
|
2993
3064
|
*/
|
|
2994
3065
|
updateable?: boolean | null | undefined;
|
|
2995
3066
|
};
|
|
2996
|
-
type
|
|
3067
|
+
type CheckProduct1 = {
|
|
2997
3068
|
/**
|
|
2998
3069
|
* The ID of the product you set when creating the product
|
|
2999
3070
|
*/
|
|
@@ -3075,7 +3146,7 @@ type Preview1 = {
|
|
|
3075
3146
|
/**
|
|
3076
3147
|
* Products that would grant access to this feature. Use to display upgrade options.
|
|
3077
3148
|
*/
|
|
3078
|
-
products: Array<
|
|
3149
|
+
products: Array<CheckProduct1>;
|
|
3079
3150
|
};
|
|
3080
3151
|
/**
|
|
3081
3152
|
* OK
|
|
@@ -3972,6 +4043,17 @@ declare const CreateEntityStatus: {
|
|
|
3972
4043
|
* Current status of the subscription.
|
|
3973
4044
|
*/
|
|
3974
4045
|
type CreateEntityStatus = OpenEnum<typeof CreateEntityStatus>;
|
|
4046
|
+
/**
|
|
4047
|
+
* Whether this subscription is attached at the customer level or entity level.
|
|
4048
|
+
*/
|
|
4049
|
+
declare const CreateEntitySubscriptionScope: {
|
|
4050
|
+
readonly Customer: "customer";
|
|
4051
|
+
readonly Entity: "entity";
|
|
4052
|
+
};
|
|
4053
|
+
/**
|
|
4054
|
+
* Whether this subscription is attached at the customer level or entity level.
|
|
4055
|
+
*/
|
|
4056
|
+
type CreateEntitySubscriptionScope = OpenEnum<typeof CreateEntitySubscriptionScope>;
|
|
3975
4057
|
type CreateEntitySubscription = {
|
|
3976
4058
|
/**
|
|
3977
4059
|
* The unique identifier of this subscription. If a subscription_id was provided at attach time, it is used; otherwise, falls back to the internal ID.
|
|
@@ -4026,7 +4108,22 @@ type CreateEntitySubscription = {
|
|
|
4026
4108
|
* Number of units of this subscription (for per-seat plans).
|
|
4027
4109
|
*/
|
|
4028
4110
|
quantity: number;
|
|
4111
|
+
/**
|
|
4112
|
+
* Whether this subscription is attached at the customer level or entity level.
|
|
4113
|
+
*/
|
|
4114
|
+
scope?: CreateEntitySubscriptionScope | undefined;
|
|
4115
|
+
};
|
|
4116
|
+
/**
|
|
4117
|
+
* Whether this purchase is attached at the customer level or entity level.
|
|
4118
|
+
*/
|
|
4119
|
+
declare const CreateEntityPurchaseScope: {
|
|
4120
|
+
readonly Customer: "customer";
|
|
4121
|
+
readonly Entity: "entity";
|
|
4029
4122
|
};
|
|
4123
|
+
/**
|
|
4124
|
+
* Whether this purchase is attached at the customer level or entity level.
|
|
4125
|
+
*/
|
|
4126
|
+
type CreateEntityPurchaseScope = OpenEnum<typeof CreateEntityPurchaseScope>;
|
|
4030
4127
|
type CreateEntityPurchase = {
|
|
4031
4128
|
plan?: Plan | undefined;
|
|
4032
4129
|
/**
|
|
@@ -4045,6 +4142,10 @@ type CreateEntityPurchase = {
|
|
|
4045
4142
|
* Number of units purchased.
|
|
4046
4143
|
*/
|
|
4047
4144
|
quantity: number;
|
|
4145
|
+
/**
|
|
4146
|
+
* Whether this purchase is attached at the customer level or entity level.
|
|
4147
|
+
*/
|
|
4148
|
+
scope?: CreateEntityPurchaseScope | undefined;
|
|
4048
4149
|
};
|
|
4049
4150
|
/**
|
|
4050
4151
|
* Feature type: 'boolean' for on/off access, 'metered' for usage-tracked features, 'credit_system' for unified credit pools.
|
|
@@ -5258,6 +5359,27 @@ type CreateScheduleInvoiceMode = {
|
|
|
5258
5359
|
* If true, finalizes the invoice so it can be sent to the customer. If false, keeps it as a draft for manual review.
|
|
5259
5360
|
*/
|
|
5260
5361
|
finalize?: boolean | undefined;
|
|
5362
|
+
/**
|
|
5363
|
+
* ID of an invoice template (configured in billing settings) whose footer (e.g. bank details) is applied to the invoice.
|
|
5364
|
+
*/
|
|
5365
|
+
invoiceTemplateId?: string | undefined;
|
|
5366
|
+
/**
|
|
5367
|
+
* Number of days the customer has to pay the invoice before it is due (Stripe days_until_due).
|
|
5368
|
+
*/
|
|
5369
|
+
netTermsDays?: number | undefined;
|
|
5370
|
+
};
|
|
5371
|
+
/**
|
|
5372
|
+
* A discount to apply. Can be either a reward ID or a promotion code.
|
|
5373
|
+
*/
|
|
5374
|
+
type CreateScheduleAttachDiscount = {
|
|
5375
|
+
/**
|
|
5376
|
+
* The ID of the reward to apply as a discount.
|
|
5377
|
+
*/
|
|
5378
|
+
rewardId?: string | undefined;
|
|
5379
|
+
/**
|
|
5380
|
+
* The promotion code to apply as a discount.
|
|
5381
|
+
*/
|
|
5382
|
+
promotionCode?: string | undefined;
|
|
5261
5383
|
};
|
|
5262
5384
|
/**
|
|
5263
5385
|
* Controls when to return a checkout URL for the immediate phase. 'always' forces a confirmation or checkout flow, 'if_required' only redirects when needed, and 'never' disables redirects.
|
|
@@ -5595,6 +5717,10 @@ type CreateScheduleParams = {
|
|
|
5595
5717
|
* Invoice mode creates and sends an invoice instead of charging the customer's payment method immediately for the first phase.
|
|
5596
5718
|
*/
|
|
5597
5719
|
invoiceMode?: CreateScheduleInvoiceMode | undefined;
|
|
5720
|
+
/**
|
|
5721
|
+
* List of discounts to apply to the immediate phase. Each discount can be an Autumn reward ID, Stripe coupon ID, or Stripe promotion code.
|
|
5722
|
+
*/
|
|
5723
|
+
discounts?: Array<CreateScheduleAttachDiscount> | undefined;
|
|
5598
5724
|
/**
|
|
5599
5725
|
* URL to redirect to after successful checkout.
|
|
5600
5726
|
*/
|
|
@@ -5917,6 +6043,17 @@ declare const CustomerStatus: {
|
|
|
5917
6043
|
* Current status of the subscription.
|
|
5918
6044
|
*/
|
|
5919
6045
|
type CustomerStatus = OpenEnum<typeof CustomerStatus>;
|
|
6046
|
+
/**
|
|
6047
|
+
* Whether this subscription is attached at the customer level or entity level.
|
|
6048
|
+
*/
|
|
6049
|
+
declare const SubscriptionScope: {
|
|
6050
|
+
readonly Customer: "customer";
|
|
6051
|
+
readonly Entity: "entity";
|
|
6052
|
+
};
|
|
6053
|
+
/**
|
|
6054
|
+
* Whether this subscription is attached at the customer level or entity level.
|
|
6055
|
+
*/
|
|
6056
|
+
type SubscriptionScope = OpenEnum<typeof SubscriptionScope>;
|
|
5920
6057
|
type Subscription = {
|
|
5921
6058
|
/**
|
|
5922
6059
|
* The unique identifier of this subscription. If a subscription_id was provided at attach time, it is used; otherwise, falls back to the internal ID.
|
|
@@ -5971,7 +6108,22 @@ type Subscription = {
|
|
|
5971
6108
|
* Number of units of this subscription (for per-seat plans).
|
|
5972
6109
|
*/
|
|
5973
6110
|
quantity: number;
|
|
6111
|
+
/**
|
|
6112
|
+
* Whether this subscription is attached at the customer level or entity level.
|
|
6113
|
+
*/
|
|
6114
|
+
scope?: SubscriptionScope | undefined;
|
|
5974
6115
|
};
|
|
6116
|
+
/**
|
|
6117
|
+
* Whether this purchase is attached at the customer level or entity level.
|
|
6118
|
+
*/
|
|
6119
|
+
declare const PurchaseScope: {
|
|
6120
|
+
readonly Customer: "customer";
|
|
6121
|
+
readonly Entity: "entity";
|
|
6122
|
+
};
|
|
6123
|
+
/**
|
|
6124
|
+
* Whether this purchase is attached at the customer level or entity level.
|
|
6125
|
+
*/
|
|
6126
|
+
type PurchaseScope = OpenEnum<typeof PurchaseScope>;
|
|
5975
6127
|
type Purchase = {
|
|
5976
6128
|
plan?: Plan | undefined;
|
|
5977
6129
|
/**
|
|
@@ -5990,6 +6142,10 @@ type Purchase = {
|
|
|
5990
6142
|
* Number of units purchased.
|
|
5991
6143
|
*/
|
|
5992
6144
|
quantity: number;
|
|
6145
|
+
/**
|
|
6146
|
+
* Whether this purchase is attached at the customer level or entity level.
|
|
6147
|
+
*/
|
|
6148
|
+
scope?: PurchaseScope | undefined;
|
|
5993
6149
|
};
|
|
5994
6150
|
/**
|
|
5995
6151
|
* Feature type: 'boolean' for on/off access, 'metered' for usage-tracked features, 'credit_system' for unified credit pools.
|
|
@@ -6769,6 +6925,17 @@ declare const GetCustomerStatus: {
|
|
|
6769
6925
|
* Current status of the subscription.
|
|
6770
6926
|
*/
|
|
6771
6927
|
type GetCustomerStatus = OpenEnum<typeof GetCustomerStatus>;
|
|
6928
|
+
/**
|
|
6929
|
+
* Whether this subscription is attached at the customer level or entity level.
|
|
6930
|
+
*/
|
|
6931
|
+
declare const GetCustomerSubscriptionScope: {
|
|
6932
|
+
readonly Customer: "customer";
|
|
6933
|
+
readonly Entity: "entity";
|
|
6934
|
+
};
|
|
6935
|
+
/**
|
|
6936
|
+
* Whether this subscription is attached at the customer level or entity level.
|
|
6937
|
+
*/
|
|
6938
|
+
type GetCustomerSubscriptionScope = OpenEnum<typeof GetCustomerSubscriptionScope>;
|
|
6772
6939
|
type GetCustomerSubscription = {
|
|
6773
6940
|
/**
|
|
6774
6941
|
* The unique identifier of this subscription. If a subscription_id was provided at attach time, it is used; otherwise, falls back to the internal ID.
|
|
@@ -6823,7 +6990,22 @@ type GetCustomerSubscription = {
|
|
|
6823
6990
|
* Number of units of this subscription (for per-seat plans).
|
|
6824
6991
|
*/
|
|
6825
6992
|
quantity: number;
|
|
6993
|
+
/**
|
|
6994
|
+
* Whether this subscription is attached at the customer level or entity level.
|
|
6995
|
+
*/
|
|
6996
|
+
scope?: GetCustomerSubscriptionScope | undefined;
|
|
6826
6997
|
};
|
|
6998
|
+
/**
|
|
6999
|
+
* Whether this purchase is attached at the customer level or entity level.
|
|
7000
|
+
*/
|
|
7001
|
+
declare const GetCustomerPurchaseScope: {
|
|
7002
|
+
readonly Customer: "customer";
|
|
7003
|
+
readonly Entity: "entity";
|
|
7004
|
+
};
|
|
7005
|
+
/**
|
|
7006
|
+
* Whether this purchase is attached at the customer level or entity level.
|
|
7007
|
+
*/
|
|
7008
|
+
type GetCustomerPurchaseScope = OpenEnum<typeof GetCustomerPurchaseScope>;
|
|
6827
7009
|
type GetCustomerPurchase = {
|
|
6828
7010
|
plan?: Plan | undefined;
|
|
6829
7011
|
/**
|
|
@@ -6842,6 +7024,10 @@ type GetCustomerPurchase = {
|
|
|
6842
7024
|
* Number of units purchased.
|
|
6843
7025
|
*/
|
|
6844
7026
|
quantity: number;
|
|
7027
|
+
/**
|
|
7028
|
+
* Whether this purchase is attached at the customer level or entity level.
|
|
7029
|
+
*/
|
|
7030
|
+
scope?: GetCustomerPurchaseScope | undefined;
|
|
6845
7031
|
};
|
|
6846
7032
|
/**
|
|
6847
7033
|
* Feature type: 'boolean' for on/off access, 'metered' for usage-tracked features, 'credit_system' for unified credit pools.
|
|
@@ -7302,6 +7488,17 @@ declare const GetEntityStatus: {
|
|
|
7302
7488
|
* Current status of the subscription.
|
|
7303
7489
|
*/
|
|
7304
7490
|
type GetEntityStatus = OpenEnum<typeof GetEntityStatus>;
|
|
7491
|
+
/**
|
|
7492
|
+
* Whether this subscription is attached at the customer level or entity level.
|
|
7493
|
+
*/
|
|
7494
|
+
declare const GetEntitySubscriptionScope: {
|
|
7495
|
+
readonly Customer: "customer";
|
|
7496
|
+
readonly Entity: "entity";
|
|
7497
|
+
};
|
|
7498
|
+
/**
|
|
7499
|
+
* Whether this subscription is attached at the customer level or entity level.
|
|
7500
|
+
*/
|
|
7501
|
+
type GetEntitySubscriptionScope = OpenEnum<typeof GetEntitySubscriptionScope>;
|
|
7305
7502
|
type GetEntitySubscription = {
|
|
7306
7503
|
/**
|
|
7307
7504
|
* The unique identifier of this subscription. If a subscription_id was provided at attach time, it is used; otherwise, falls back to the internal ID.
|
|
@@ -7356,7 +7553,22 @@ type GetEntitySubscription = {
|
|
|
7356
7553
|
* Number of units of this subscription (for per-seat plans).
|
|
7357
7554
|
*/
|
|
7358
7555
|
quantity: number;
|
|
7556
|
+
/**
|
|
7557
|
+
* Whether this subscription is attached at the customer level or entity level.
|
|
7558
|
+
*/
|
|
7559
|
+
scope?: GetEntitySubscriptionScope | undefined;
|
|
7560
|
+
};
|
|
7561
|
+
/**
|
|
7562
|
+
* Whether this purchase is attached at the customer level or entity level.
|
|
7563
|
+
*/
|
|
7564
|
+
declare const GetEntityPurchaseScope: {
|
|
7565
|
+
readonly Customer: "customer";
|
|
7566
|
+
readonly Entity: "entity";
|
|
7359
7567
|
};
|
|
7568
|
+
/**
|
|
7569
|
+
* Whether this purchase is attached at the customer level or entity level.
|
|
7570
|
+
*/
|
|
7571
|
+
type GetEntityPurchaseScope = OpenEnum<typeof GetEntityPurchaseScope>;
|
|
7360
7572
|
type GetEntityPurchase = {
|
|
7361
7573
|
plan?: Plan | undefined;
|
|
7362
7574
|
/**
|
|
@@ -7375,6 +7587,10 @@ type GetEntityPurchase = {
|
|
|
7375
7587
|
* Number of units purchased.
|
|
7376
7588
|
*/
|
|
7377
7589
|
quantity: number;
|
|
7590
|
+
/**
|
|
7591
|
+
* Whether this purchase is attached at the customer level or entity level.
|
|
7592
|
+
*/
|
|
7593
|
+
scope?: GetEntityPurchaseScope | undefined;
|
|
7378
7594
|
};
|
|
7379
7595
|
/**
|
|
7380
7596
|
* Feature type: 'boolean' for on/off access, 'metered' for usage-tracked features, 'credit_system' for unified credit pools.
|
|
@@ -8176,6 +8392,59 @@ type GetPlanResponse = {
|
|
|
8176
8392
|
customerEligibility?: GetPlanCustomerEligibility | undefined;
|
|
8177
8393
|
};
|
|
8178
8394
|
|
|
8395
|
+
/**
|
|
8396
|
+
* "test" and "sandbox" both target the sandbox environment
|
|
8397
|
+
*/
|
|
8398
|
+
declare const GetRevenueCatKeysEnv: {
|
|
8399
|
+
readonly Test: "test";
|
|
8400
|
+
readonly Sandbox: "sandbox";
|
|
8401
|
+
readonly Live: "live";
|
|
8402
|
+
};
|
|
8403
|
+
/**
|
|
8404
|
+
* "test" and "sandbox" both target the sandbox environment
|
|
8405
|
+
*/
|
|
8406
|
+
type GetRevenueCatKeysEnv = ClosedEnum<typeof GetRevenueCatKeysEnv>;
|
|
8407
|
+
type GetRevenueCatKeysParams = {
|
|
8408
|
+
organizationSlug: string;
|
|
8409
|
+
/**
|
|
8410
|
+
* "test" and "sandbox" both target the sandbox environment
|
|
8411
|
+
*/
|
|
8412
|
+
env: GetRevenueCatKeysEnv;
|
|
8413
|
+
};
|
|
8414
|
+
type ApiKey = {
|
|
8415
|
+
id: string;
|
|
8416
|
+
/**
|
|
8417
|
+
* The public SDK API key value
|
|
8418
|
+
*/
|
|
8419
|
+
key: string;
|
|
8420
|
+
/**
|
|
8421
|
+
* e.g. "production" / "sandbox"
|
|
8422
|
+
*/
|
|
8423
|
+
environment?: string | null | undefined;
|
|
8424
|
+
appId?: string | null | undefined;
|
|
8425
|
+
createdAt?: number | undefined;
|
|
8426
|
+
[additionalProperties: string]: unknown;
|
|
8427
|
+
};
|
|
8428
|
+
type GetRevenueCatKeysApp = {
|
|
8429
|
+
appId: string;
|
|
8430
|
+
/**
|
|
8431
|
+
* RevenueCat store type, e.g. test_store / app_store / play_store
|
|
8432
|
+
*/
|
|
8433
|
+
appType: string;
|
|
8434
|
+
name: string;
|
|
8435
|
+
apiKeys: Array<ApiKey>;
|
|
8436
|
+
};
|
|
8437
|
+
/**
|
|
8438
|
+
* OK
|
|
8439
|
+
*/
|
|
8440
|
+
type GetRevenueCatKeysResponse = {
|
|
8441
|
+
apps: Array<GetRevenueCatKeysApp>;
|
|
8442
|
+
/**
|
|
8443
|
+
* Freshly-refreshed RevenueCat OAuth access token for the org (null for api-key orgs). The refresh token is never exposed — call this endpoint again for a new access token.
|
|
8444
|
+
*/
|
|
8445
|
+
oauthAccessToken: string | null;
|
|
8446
|
+
};
|
|
8447
|
+
|
|
8179
8448
|
/**
|
|
8180
8449
|
* Base class for all HTTP errors.
|
|
8181
8450
|
*/
|
|
@@ -8220,6 +8489,24 @@ declare class ConnectionError extends HTTPClientError {
|
|
|
8220
8489
|
readonly name = "ConnectionError";
|
|
8221
8490
|
}
|
|
8222
8491
|
|
|
8492
|
+
declare const LinkRevenueCatEnv: {
|
|
8493
|
+
readonly Test: "test";
|
|
8494
|
+
readonly Live: "live";
|
|
8495
|
+
};
|
|
8496
|
+
type LinkRevenueCatEnv = ClosedEnum<typeof LinkRevenueCatEnv>;
|
|
8497
|
+
type LinkRevenueCatParams = {
|
|
8498
|
+
organizationSlug: string;
|
|
8499
|
+
env: LinkRevenueCatEnv;
|
|
8500
|
+
projectName: string;
|
|
8501
|
+
redirectUrl: string;
|
|
8502
|
+
};
|
|
8503
|
+
/**
|
|
8504
|
+
* OK
|
|
8505
|
+
*/
|
|
8506
|
+
type LinkRevenueCatResponse = {
|
|
8507
|
+
oauthUrl: string;
|
|
8508
|
+
};
|
|
8509
|
+
|
|
8223
8510
|
type ListCustomersPlan = {
|
|
8224
8511
|
id: string;
|
|
8225
8512
|
versions?: Array<number> | undefined;
|
|
@@ -8451,6 +8738,17 @@ declare const ListCustomersStatus: {
|
|
|
8451
8738
|
* Current status of the subscription.
|
|
8452
8739
|
*/
|
|
8453
8740
|
type ListCustomersStatus = OpenEnum<typeof ListCustomersStatus>;
|
|
8741
|
+
/**
|
|
8742
|
+
* Whether this subscription is attached at the customer level or entity level.
|
|
8743
|
+
*/
|
|
8744
|
+
declare const ListCustomersSubscriptionScope: {
|
|
8745
|
+
readonly Customer: "customer";
|
|
8746
|
+
readonly Entity: "entity";
|
|
8747
|
+
};
|
|
8748
|
+
/**
|
|
8749
|
+
* Whether this subscription is attached at the customer level or entity level.
|
|
8750
|
+
*/
|
|
8751
|
+
type ListCustomersSubscriptionScope = OpenEnum<typeof ListCustomersSubscriptionScope>;
|
|
8454
8752
|
type ListCustomersSubscription = {
|
|
8455
8753
|
/**
|
|
8456
8754
|
* The unique identifier of this subscription. If a subscription_id was provided at attach time, it is used; otherwise, falls back to the internal ID.
|
|
@@ -8505,7 +8803,22 @@ type ListCustomersSubscription = {
|
|
|
8505
8803
|
* Number of units of this subscription (for per-seat plans).
|
|
8506
8804
|
*/
|
|
8507
8805
|
quantity: number;
|
|
8806
|
+
/**
|
|
8807
|
+
* Whether this subscription is attached at the customer level or entity level.
|
|
8808
|
+
*/
|
|
8809
|
+
scope?: ListCustomersSubscriptionScope | undefined;
|
|
8508
8810
|
};
|
|
8811
|
+
/**
|
|
8812
|
+
* Whether this purchase is attached at the customer level or entity level.
|
|
8813
|
+
*/
|
|
8814
|
+
declare const ListCustomersPurchaseScope: {
|
|
8815
|
+
readonly Customer: "customer";
|
|
8816
|
+
readonly Entity: "entity";
|
|
8817
|
+
};
|
|
8818
|
+
/**
|
|
8819
|
+
* Whether this purchase is attached at the customer level or entity level.
|
|
8820
|
+
*/
|
|
8821
|
+
type ListCustomersPurchaseScope = OpenEnum<typeof ListCustomersPurchaseScope>;
|
|
8509
8822
|
type ListCustomersPurchase = {
|
|
8510
8823
|
plan?: Plan | undefined;
|
|
8511
8824
|
/**
|
|
@@ -8524,6 +8837,10 @@ type ListCustomersPurchase = {
|
|
|
8524
8837
|
* Number of units purchased.
|
|
8525
8838
|
*/
|
|
8526
8839
|
quantity: number;
|
|
8840
|
+
/**
|
|
8841
|
+
* Whether this purchase is attached at the customer level or entity level.
|
|
8842
|
+
*/
|
|
8843
|
+
scope?: ListCustomersPurchaseScope | undefined;
|
|
8527
8844
|
};
|
|
8528
8845
|
/**
|
|
8529
8846
|
* Feature type: 'boolean' for on/off access, 'metered' for usage-tracked features, 'credit_system' for unified credit pools.
|
|
@@ -8808,6 +9125,10 @@ type ListEntitiesParams = {
|
|
|
8808
9125
|
* Filter by parent customer processor type (stripe, revenuecat, vercel).
|
|
8809
9126
|
*/
|
|
8810
9127
|
processors?: Array<ListEntitiesProcessor> | undefined;
|
|
9128
|
+
/**
|
|
9129
|
+
* Restrict the response to entities owned by this customer id. Use to bulk-fetch all entities for one customer in a single paginated call instead of iterating entities.get.
|
|
9130
|
+
*/
|
|
9131
|
+
customerId?: string | undefined;
|
|
8811
9132
|
};
|
|
8812
9133
|
/**
|
|
8813
9134
|
* The environment (sandbox/live)
|
|
@@ -8831,6 +9152,17 @@ declare const ListEntitiesStatus: {
|
|
|
8831
9152
|
* Current status of the subscription.
|
|
8832
9153
|
*/
|
|
8833
9154
|
type ListEntitiesStatus = OpenEnum<typeof ListEntitiesStatus>;
|
|
9155
|
+
/**
|
|
9156
|
+
* Whether this subscription is attached at the customer level or entity level.
|
|
9157
|
+
*/
|
|
9158
|
+
declare const ListEntitiesSubscriptionScope: {
|
|
9159
|
+
readonly Customer: "customer";
|
|
9160
|
+
readonly Entity: "entity";
|
|
9161
|
+
};
|
|
9162
|
+
/**
|
|
9163
|
+
* Whether this subscription is attached at the customer level or entity level.
|
|
9164
|
+
*/
|
|
9165
|
+
type ListEntitiesSubscriptionScope = OpenEnum<typeof ListEntitiesSubscriptionScope>;
|
|
8834
9166
|
type ListEntitiesSubscription = {
|
|
8835
9167
|
/**
|
|
8836
9168
|
* The unique identifier of this subscription. If a subscription_id was provided at attach time, it is used; otherwise, falls back to the internal ID.
|
|
@@ -8885,7 +9217,22 @@ type ListEntitiesSubscription = {
|
|
|
8885
9217
|
* Number of units of this subscription (for per-seat plans).
|
|
8886
9218
|
*/
|
|
8887
9219
|
quantity: number;
|
|
9220
|
+
/**
|
|
9221
|
+
* Whether this subscription is attached at the customer level or entity level.
|
|
9222
|
+
*/
|
|
9223
|
+
scope?: ListEntitiesSubscriptionScope | undefined;
|
|
8888
9224
|
};
|
|
9225
|
+
/**
|
|
9226
|
+
* Whether this purchase is attached at the customer level or entity level.
|
|
9227
|
+
*/
|
|
9228
|
+
declare const ListEntitiesPurchaseScope: {
|
|
9229
|
+
readonly Customer: "customer";
|
|
9230
|
+
readonly Entity: "entity";
|
|
9231
|
+
};
|
|
9232
|
+
/**
|
|
9233
|
+
* Whether this purchase is attached at the customer level or entity level.
|
|
9234
|
+
*/
|
|
9235
|
+
type ListEntitiesPurchaseScope = OpenEnum<typeof ListEntitiesPurchaseScope>;
|
|
8889
9236
|
type ListEntitiesPurchase = {
|
|
8890
9237
|
plan?: Plan | undefined;
|
|
8891
9238
|
/**
|
|
@@ -8904,6 +9251,10 @@ type ListEntitiesPurchase = {
|
|
|
8904
9251
|
* Number of units purchased.
|
|
8905
9252
|
*/
|
|
8906
9253
|
quantity: number;
|
|
9254
|
+
/**
|
|
9255
|
+
* Whether this purchase is attached at the customer level or entity level.
|
|
9256
|
+
*/
|
|
9257
|
+
scope?: ListEntitiesPurchaseScope | undefined;
|
|
8907
9258
|
};
|
|
8908
9259
|
/**
|
|
8909
9260
|
* Feature type: 'boolean' for on/off access, 'metered' for usage-tracked features, 'credit_system' for unified credit pools.
|
|
@@ -10206,6 +10557,14 @@ type MultiAttachInvoiceMode = {
|
|
|
10206
10557
|
* If true, finalizes the invoice so it can be sent to the customer. If false, keeps it as a draft for manual review.
|
|
10207
10558
|
*/
|
|
10208
10559
|
finalize?: boolean | undefined;
|
|
10560
|
+
/**
|
|
10561
|
+
* ID of an invoice template (configured in billing settings) whose footer (e.g. bank details) is applied to the invoice.
|
|
10562
|
+
*/
|
|
10563
|
+
invoiceTemplateId?: string | undefined;
|
|
10564
|
+
/**
|
|
10565
|
+
* Number of days the customer has to pay the invoice before it is due (Stripe days_until_due).
|
|
10566
|
+
*/
|
|
10567
|
+
netTermsDays?: number | undefined;
|
|
10209
10568
|
};
|
|
10210
10569
|
/**
|
|
10211
10570
|
* A discount to apply. Can be either a reward ID or a promotion code.
|
|
@@ -11036,7 +11395,7 @@ type PreviewAttachCustomize = {
|
|
|
11036
11395
|
*/
|
|
11037
11396
|
price?: PreviewAttachBasePrice | null | undefined;
|
|
11038
11397
|
/**
|
|
11039
|
-
* Override the items in the plan (PUT-style — replaces all existing items). Mutually exclusive with add_items / remove_items.
|
|
11398
|
+
* Override the items in the plan (PUT-style — replaces all existing items). Mutually exclusive with add_items / remove_items / update_items.
|
|
11040
11399
|
*/
|
|
11041
11400
|
items?: Array<PreviewAttachItemPlanItem> | undefined;
|
|
11042
11401
|
/**
|
|
@@ -11068,6 +11427,14 @@ type PreviewAttachInvoiceMode = {
|
|
|
11068
11427
|
* If true, finalizes the invoice so it can be sent to the customer. If false, keeps it as a draft for manual review.
|
|
11069
11428
|
*/
|
|
11070
11429
|
finalize?: boolean | undefined;
|
|
11430
|
+
/**
|
|
11431
|
+
* ID of an invoice template (configured in billing settings) whose footer (e.g. bank details) is applied to the invoice.
|
|
11432
|
+
*/
|
|
11433
|
+
invoiceTemplateId?: string | undefined;
|
|
11434
|
+
/**
|
|
11435
|
+
* Number of days the customer has to pay the invoice before it is due (Stripe days_until_due).
|
|
11436
|
+
*/
|
|
11437
|
+
netTermsDays?: number | undefined;
|
|
11071
11438
|
};
|
|
11072
11439
|
/**
|
|
11073
11440
|
* How to handle proration when updating an existing subscription. 'prorate_immediately' charges/credits prorated amounts now, 'none' skips creating any charges.
|
|
@@ -11957,6 +12324,14 @@ type PreviewMultiAttachInvoiceMode = {
|
|
|
11957
12324
|
* If true, finalizes the invoice so it can be sent to the customer. If false, keeps it as a draft for manual review.
|
|
11958
12325
|
*/
|
|
11959
12326
|
finalize?: boolean | undefined;
|
|
12327
|
+
/**
|
|
12328
|
+
* ID of an invoice template (configured in billing settings) whose footer (e.g. bank details) is applied to the invoice.
|
|
12329
|
+
*/
|
|
12330
|
+
invoiceTemplateId?: string | undefined;
|
|
12331
|
+
/**
|
|
12332
|
+
* Number of days the customer has to pay the invoice before it is due (Stripe days_until_due).
|
|
12333
|
+
*/
|
|
12334
|
+
netTermsDays?: number | undefined;
|
|
11960
12335
|
};
|
|
11961
12336
|
/**
|
|
11962
12337
|
* A discount to apply. Can be either a reward ID or a promotion code.
|
|
@@ -13028,7 +13403,7 @@ type PreviewUpdateCustomize = {
|
|
|
13028
13403
|
*/
|
|
13029
13404
|
price?: PreviewUpdateBasePrice | null | undefined;
|
|
13030
13405
|
/**
|
|
13031
|
-
* Override the items in the plan (PUT-style — replaces all existing items). Mutually exclusive with add_items / remove_items.
|
|
13406
|
+
* Override the items in the plan (PUT-style — replaces all existing items). Mutually exclusive with add_items / remove_items / update_items.
|
|
13032
13407
|
*/
|
|
13033
13408
|
items?: Array<PreviewUpdateItemPlanItem> | undefined;
|
|
13034
13409
|
/**
|
|
@@ -13060,6 +13435,14 @@ type PreviewUpdateInvoiceMode = {
|
|
|
13060
13435
|
* If true, finalizes the invoice so it can be sent to the customer. If false, keeps it as a draft for manual review.
|
|
13061
13436
|
*/
|
|
13062
13437
|
finalize?: boolean | undefined;
|
|
13438
|
+
/**
|
|
13439
|
+
* ID of an invoice template (configured in billing settings) whose footer (e.g. bank details) is applied to the invoice.
|
|
13440
|
+
*/
|
|
13441
|
+
invoiceTemplateId?: string | undefined;
|
|
13442
|
+
/**
|
|
13443
|
+
* Number of days the customer has to pay the invoice before it is due (Stripe days_until_due).
|
|
13444
|
+
*/
|
|
13445
|
+
netTermsDays?: number | undefined;
|
|
13063
13446
|
};
|
|
13064
13447
|
/**
|
|
13065
13448
|
* How to handle proration when updating an existing subscription. 'prorate_immediately' charges/credits prorated amounts now, 'none' skips creating any charges.
|
|
@@ -14144,7 +14527,7 @@ type SetupPaymentCustomize = {
|
|
|
14144
14527
|
*/
|
|
14145
14528
|
price?: SetupPaymentBasePrice | null | undefined;
|
|
14146
14529
|
/**
|
|
14147
|
-
* Override the items in the plan (PUT-style — replaces all existing items). Mutually exclusive with add_items / remove_items.
|
|
14530
|
+
* Override the items in the plan (PUT-style — replaces all existing items). Mutually exclusive with add_items / remove_items / update_items.
|
|
14148
14531
|
*/
|
|
14149
14532
|
items?: Array<SetupPaymentItemPlanItem> | undefined;
|
|
14150
14533
|
/**
|
|
@@ -14332,6 +14715,75 @@ type SetupPaymentResponse = {
|
|
|
14332
14715
|
url: string;
|
|
14333
14716
|
};
|
|
14334
14717
|
|
|
14718
|
+
/**
|
|
14719
|
+
* "test" and "sandbox" both target the sandbox environment
|
|
14720
|
+
*/
|
|
14721
|
+
declare const SyncRevenueCatEnv: {
|
|
14722
|
+
readonly Test: "test";
|
|
14723
|
+
readonly Sandbox: "sandbox";
|
|
14724
|
+
readonly Live: "live";
|
|
14725
|
+
};
|
|
14726
|
+
/**
|
|
14727
|
+
* "test" and "sandbox" both target the sandbox environment
|
|
14728
|
+
*/
|
|
14729
|
+
type SyncRevenueCatEnv = ClosedEnum<typeof SyncRevenueCatEnv>;
|
|
14730
|
+
type SyncRevenueCatParams = {
|
|
14731
|
+
organizationSlug: string;
|
|
14732
|
+
/**
|
|
14733
|
+
* "test" and "sandbox" both target the sandbox environment
|
|
14734
|
+
*/
|
|
14735
|
+
env: SyncRevenueCatEnv;
|
|
14736
|
+
/**
|
|
14737
|
+
* Plans to push. Omit to sync every plan in the org/env.
|
|
14738
|
+
*/
|
|
14739
|
+
productIds?: Array<string> | undefined;
|
|
14740
|
+
};
|
|
14741
|
+
declare const SyncRevenueCatStatus: {
|
|
14742
|
+
readonly Synced: "synced";
|
|
14743
|
+
readonly Skipped: "skipped";
|
|
14744
|
+
readonly Error: "error";
|
|
14745
|
+
};
|
|
14746
|
+
type SyncRevenueCatStatus = OpenEnum<typeof SyncRevenueCatStatus>;
|
|
14747
|
+
declare const SyncRevenueCatProduct: {
|
|
14748
|
+
readonly Created: "created";
|
|
14749
|
+
readonly Updated: "updated";
|
|
14750
|
+
readonly Exists: "exists";
|
|
14751
|
+
};
|
|
14752
|
+
type SyncRevenueCatProduct = OpenEnum<typeof SyncRevenueCatProduct>;
|
|
14753
|
+
declare const StorePush: {
|
|
14754
|
+
readonly Pushed: "pushed";
|
|
14755
|
+
readonly Failed: "failed";
|
|
14756
|
+
readonly Skipped: "skipped";
|
|
14757
|
+
};
|
|
14758
|
+
type StorePush = OpenEnum<typeof StorePush>;
|
|
14759
|
+
declare const SyncRevenueCatPrice: {
|
|
14760
|
+
readonly Set: "set";
|
|
14761
|
+
readonly Skipped: "skipped";
|
|
14762
|
+
readonly Failed: "failed";
|
|
14763
|
+
};
|
|
14764
|
+
type SyncRevenueCatPrice = OpenEnum<typeof SyncRevenueCatPrice>;
|
|
14765
|
+
type SyncRevenueCatApp = {
|
|
14766
|
+
appId: string;
|
|
14767
|
+
appType: string;
|
|
14768
|
+
product: SyncRevenueCatProduct;
|
|
14769
|
+
storePush?: StorePush | undefined;
|
|
14770
|
+
price?: SyncRevenueCatPrice | undefined;
|
|
14771
|
+
message?: string | undefined;
|
|
14772
|
+
};
|
|
14773
|
+
type Result = {
|
|
14774
|
+
planId: string;
|
|
14775
|
+
status: SyncRevenueCatStatus;
|
|
14776
|
+
storeIdentifier?: string | undefined;
|
|
14777
|
+
apps?: Array<SyncRevenueCatApp> | undefined;
|
|
14778
|
+
message?: string | undefined;
|
|
14779
|
+
};
|
|
14780
|
+
/**
|
|
14781
|
+
* OK
|
|
14782
|
+
*/
|
|
14783
|
+
type SyncRevenueCatResponse = {
|
|
14784
|
+
results: Array<Result>;
|
|
14785
|
+
};
|
|
14786
|
+
|
|
14335
14787
|
type TrackLock = {
|
|
14336
14788
|
/**
|
|
14337
14789
|
* A unique identifier for this lock. Used to finalize the lock later via balances.finalize.
|
|
@@ -14373,6 +14825,10 @@ type TrackParams = {
|
|
|
14373
14825
|
properties?: {
|
|
14374
14826
|
[k: string]: any;
|
|
14375
14827
|
} | undefined;
|
|
14828
|
+
/**
|
|
14829
|
+
* If true, enqueue the event for asynchronous processing and return 202 immediately. The response will not include balance information.
|
|
14830
|
+
*/
|
|
14831
|
+
async?: boolean | undefined;
|
|
14376
14832
|
lock?: TrackLock | undefined;
|
|
14377
14833
|
};
|
|
14378
14834
|
declare const TrackIntervalEnum2: {
|
|
@@ -14983,6 +15439,17 @@ declare const UpdateCustomerStatus: {
|
|
|
14983
15439
|
* Current status of the subscription.
|
|
14984
15440
|
*/
|
|
14985
15441
|
type UpdateCustomerStatus = OpenEnum<typeof UpdateCustomerStatus>;
|
|
15442
|
+
/**
|
|
15443
|
+
* Whether this subscription is attached at the customer level or entity level.
|
|
15444
|
+
*/
|
|
15445
|
+
declare const UpdateCustomerSubscriptionScope: {
|
|
15446
|
+
readonly Customer: "customer";
|
|
15447
|
+
readonly Entity: "entity";
|
|
15448
|
+
};
|
|
15449
|
+
/**
|
|
15450
|
+
* Whether this subscription is attached at the customer level or entity level.
|
|
15451
|
+
*/
|
|
15452
|
+
type UpdateCustomerSubscriptionScope = OpenEnum<typeof UpdateCustomerSubscriptionScope>;
|
|
14986
15453
|
type UpdateCustomerSubscription = {
|
|
14987
15454
|
/**
|
|
14988
15455
|
* The unique identifier of this subscription. If a subscription_id was provided at attach time, it is used; otherwise, falls back to the internal ID.
|
|
@@ -15037,7 +15504,22 @@ type UpdateCustomerSubscription = {
|
|
|
15037
15504
|
* Number of units of this subscription (for per-seat plans).
|
|
15038
15505
|
*/
|
|
15039
15506
|
quantity: number;
|
|
15507
|
+
/**
|
|
15508
|
+
* Whether this subscription is attached at the customer level or entity level.
|
|
15509
|
+
*/
|
|
15510
|
+
scope?: UpdateCustomerSubscriptionScope | undefined;
|
|
15511
|
+
};
|
|
15512
|
+
/**
|
|
15513
|
+
* Whether this purchase is attached at the customer level or entity level.
|
|
15514
|
+
*/
|
|
15515
|
+
declare const UpdateCustomerPurchaseScope: {
|
|
15516
|
+
readonly Customer: "customer";
|
|
15517
|
+
readonly Entity: "entity";
|
|
15040
15518
|
};
|
|
15519
|
+
/**
|
|
15520
|
+
* Whether this purchase is attached at the customer level or entity level.
|
|
15521
|
+
*/
|
|
15522
|
+
type UpdateCustomerPurchaseScope = OpenEnum<typeof UpdateCustomerPurchaseScope>;
|
|
15041
15523
|
type UpdateCustomerPurchase = {
|
|
15042
15524
|
plan?: Plan | undefined;
|
|
15043
15525
|
/**
|
|
@@ -15056,6 +15538,10 @@ type UpdateCustomerPurchase = {
|
|
|
15056
15538
|
* Number of units purchased.
|
|
15057
15539
|
*/
|
|
15058
15540
|
quantity: number;
|
|
15541
|
+
/**
|
|
15542
|
+
* Whether this purchase is attached at the customer level or entity level.
|
|
15543
|
+
*/
|
|
15544
|
+
scope?: UpdateCustomerPurchaseScope | undefined;
|
|
15059
15545
|
};
|
|
15060
15546
|
/**
|
|
15061
15547
|
* Feature type: 'boolean' for on/off access, 'metered' for usage-tracked features, 'credit_system' for unified credit pools.
|
|
@@ -15396,6 +15882,17 @@ declare const UpdateEntityStatus: {
|
|
|
15396
15882
|
* Current status of the subscription.
|
|
15397
15883
|
*/
|
|
15398
15884
|
type UpdateEntityStatus = OpenEnum<typeof UpdateEntityStatus>;
|
|
15885
|
+
/**
|
|
15886
|
+
* Whether this subscription is attached at the customer level or entity level.
|
|
15887
|
+
*/
|
|
15888
|
+
declare const UpdateEntitySubscriptionScope: {
|
|
15889
|
+
readonly Customer: "customer";
|
|
15890
|
+
readonly Entity: "entity";
|
|
15891
|
+
};
|
|
15892
|
+
/**
|
|
15893
|
+
* Whether this subscription is attached at the customer level or entity level.
|
|
15894
|
+
*/
|
|
15895
|
+
type UpdateEntitySubscriptionScope = OpenEnum<typeof UpdateEntitySubscriptionScope>;
|
|
15399
15896
|
type UpdateEntitySubscription = {
|
|
15400
15897
|
/**
|
|
15401
15898
|
* The unique identifier of this subscription. If a subscription_id was provided at attach time, it is used; otherwise, falls back to the internal ID.
|
|
@@ -15450,7 +15947,22 @@ type UpdateEntitySubscription = {
|
|
|
15450
15947
|
* Number of units of this subscription (for per-seat plans).
|
|
15451
15948
|
*/
|
|
15452
15949
|
quantity: number;
|
|
15950
|
+
/**
|
|
15951
|
+
* Whether this subscription is attached at the customer level or entity level.
|
|
15952
|
+
*/
|
|
15953
|
+
scope?: UpdateEntitySubscriptionScope | undefined;
|
|
15453
15954
|
};
|
|
15955
|
+
/**
|
|
15956
|
+
* Whether this purchase is attached at the customer level or entity level.
|
|
15957
|
+
*/
|
|
15958
|
+
declare const UpdateEntityPurchaseScope: {
|
|
15959
|
+
readonly Customer: "customer";
|
|
15960
|
+
readonly Entity: "entity";
|
|
15961
|
+
};
|
|
15962
|
+
/**
|
|
15963
|
+
* Whether this purchase is attached at the customer level or entity level.
|
|
15964
|
+
*/
|
|
15965
|
+
type UpdateEntityPurchaseScope = OpenEnum<typeof UpdateEntityPurchaseScope>;
|
|
15454
15966
|
type UpdateEntityPurchase = {
|
|
15455
15967
|
plan?: Plan | undefined;
|
|
15456
15968
|
/**
|
|
@@ -15469,6 +15981,10 @@ type UpdateEntityPurchase = {
|
|
|
15469
15981
|
* Number of units purchased.
|
|
15470
15982
|
*/
|
|
15471
15983
|
quantity: number;
|
|
15984
|
+
/**
|
|
15985
|
+
* Whether this purchase is attached at the customer level or entity level.
|
|
15986
|
+
*/
|
|
15987
|
+
scope?: UpdateEntityPurchaseScope | undefined;
|
|
15472
15988
|
};
|
|
15473
15989
|
/**
|
|
15474
15990
|
* Feature type: 'boolean' for on/off access, 'metered' for usage-tracked features, 'credit_system' for unified credit pools.
|
|
@@ -16810,13 +17326,13 @@ declare class ClientSDK {
|
|
|
16810
17326
|
hooks?: SDKHooks;
|
|
16811
17327
|
};
|
|
16812
17328
|
constructor(options?: SDKOptions);
|
|
16813
|
-
_createRequest(context: HookContext, conf: RequestConfig, options?: RequestOptions): Result<Request, InvalidRequestError | UnexpectedClientError>;
|
|
17329
|
+
_createRequest(context: HookContext, conf: RequestConfig, options?: RequestOptions): Result$1<Request, InvalidRequestError | UnexpectedClientError>;
|
|
16814
17330
|
_do(request: Request, options: {
|
|
16815
17331
|
context: HookContext;
|
|
16816
17332
|
isErrorStatusCode: (statusCode: number) => boolean;
|
|
16817
17333
|
retryConfig: RetryConfig;
|
|
16818
17334
|
retryCodes: string[];
|
|
16819
|
-
}): Promise<Result<Response, RequestAbortedError | RequestTimeoutError | ConnectionError | UnexpectedClientError>>;
|
|
17335
|
+
}): Promise<Result$1<Response, RequestAbortedError | RequestTimeoutError | ConnectionError | UnexpectedClientError>>;
|
|
16820
17336
|
}
|
|
16821
17337
|
|
|
16822
17338
|
declare class Balances extends ClientSDK {
|
|
@@ -16900,12 +17416,13 @@ declare class Billing extends ClientSDK {
|
|
|
16900
17416
|
* @example
|
|
16901
17417
|
* ```typescript
|
|
16902
17418
|
* // Schedule a transition from a trial plan to a paid plan
|
|
16903
|
-
* const response = await client.billing.createSchedule({ customerId: "cus_123", phases: [{"startsAt":
|
|
17419
|
+
* const response = await client.billing.createSchedule({ customerId: "cus_123", phases: [{"startsAt":1780512803523,"plans":[{"planId":"trial_plan"}]},{"startsAt":1781722403523,"plans":[{"planId":"pro_plan"}]}] });
|
|
16904
17420
|
* ```
|
|
16905
17421
|
*
|
|
16906
17422
|
* @param customerId - The ID of the customer to create the schedule for.
|
|
16907
17423
|
* @param entityId - Optional entity ID for an entity-scoped schedule. (optional)
|
|
16908
17424
|
* @param invoiceMode - Invoice mode creates and sends an invoice instead of charging the customer's payment method immediately for the first phase. (optional)
|
|
17425
|
+
* @param discounts - List of discounts to apply to the immediate phase. Each discount can be an Autumn reward ID, Stripe coupon ID, or Stripe promotion code. (optional)
|
|
16909
17426
|
* @param successUrl - URL to redirect to after successful checkout. (optional)
|
|
16910
17427
|
* @param checkoutSessionParams - Additional parameters to pass into the creation of the Stripe checkout session. (optional)
|
|
16911
17428
|
* @param redirectMode - Controls when to return a checkout URL for the immediate phase. 'always' forces a confirmation or checkout flow, 'if_required' only redirects when needed, and 'never' disables redirects. (optional)
|
|
@@ -17239,6 +17756,7 @@ declare class Entities extends ClientSDK {
|
|
|
17239
17756
|
* @param subscriptionStatus - Filter customer products used for entity hydration and plan matching. Defaults to active and scheduled. (optional)
|
|
17240
17757
|
* @param search - Search entities by id or name. (optional)
|
|
17241
17758
|
* @param processors - Filter by parent customer processor type (stripe, revenuecat, vercel). (optional)
|
|
17759
|
+
* @param customerId - Restrict the response to entities owned by this customer id. Use to bulk-fetch all entities for one customer in a single paginated call instead of iterating entities.get. (optional)
|
|
17242
17760
|
*
|
|
17243
17761
|
* @returns A paginated list of entity objects including their current subscriptions, purchases, balances, and flags.
|
|
17244
17762
|
*/
|
|
@@ -17597,6 +18115,21 @@ declare class Plans extends ClientSDK {
|
|
|
17597
18115
|
delete(request: DeletePlanParams, options?: RequestOptions): Promise<DeletePlanResponse>;
|
|
17598
18116
|
}
|
|
17599
18117
|
|
|
18118
|
+
declare class Platform extends ClientSDK {
|
|
18119
|
+
/**
|
|
18120
|
+
* Generate a RevenueCat OAuth URL for linking a project to an organization.
|
|
18121
|
+
*/
|
|
18122
|
+
linkRevenueCat(request: LinkRevenueCatParams, options?: RequestOptions): Promise<LinkRevenueCatResponse>;
|
|
18123
|
+
/**
|
|
18124
|
+
* Push an organization's plans into RevenueCat as products (creating or renaming them across the project's apps) and set test-store prices from each plan's price. Requires the org to have linked RevenueCat via OAuth.
|
|
18125
|
+
*/
|
|
18126
|
+
syncRevenueCat(request: SyncRevenueCatParams, options?: RequestOptions): Promise<SyncRevenueCatResponse>;
|
|
18127
|
+
/**
|
|
18128
|
+
* Retrieve a managed organization's RevenueCat public (SDK) API keys, grouped by app — for the test store, App Store, and Google Play Store. Use these to configure the RevenueCat SDK in the org's mobile app.
|
|
18129
|
+
*/
|
|
18130
|
+
getRevenueCatKeys(request: GetRevenueCatKeysParams, options?: RequestOptions): Promise<GetRevenueCatKeysResponse>;
|
|
18131
|
+
}
|
|
18132
|
+
|
|
17600
18133
|
declare class Referrals extends ClientSDK {
|
|
17601
18134
|
/**
|
|
17602
18135
|
* Create or fetch a referral code for a customer in a referral program.
|
|
@@ -17634,6 +18167,8 @@ declare class Autumn extends ClientSDK {
|
|
|
17634
18167
|
get referrals(): Referrals;
|
|
17635
18168
|
private _rewards?;
|
|
17636
18169
|
get rewards(): Rewards;
|
|
18170
|
+
private _platform?;
|
|
18171
|
+
get platform(): Platform;
|
|
17637
18172
|
/**
|
|
17638
18173
|
* Checks whether a customer currently has enough balance to use a feature.
|
|
17639
18174
|
*
|
|
@@ -17692,10 +18227,15 @@ declare class Autumn extends ClientSDK {
|
|
|
17692
18227
|
* @param eventName - Event name to track usage for. Use instead of feature_id when multiple features should be tracked from a single event. (optional)
|
|
17693
18228
|
* @param value - The amount of usage to record. Defaults to 1. Use negative values to credit balance (e.g., when removing a seat). (optional)
|
|
17694
18229
|
* @param properties - Additional properties to attach to this usage event. (optional)
|
|
18230
|
+
* @param async - If true, enqueue the event for asynchronous processing and return 202 immediately. The response will not include balance information. (optional)
|
|
17695
18231
|
*
|
|
17696
18232
|
* @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.
|
|
17697
18233
|
*/
|
|
17698
18234
|
track(request: TrackParams, options?: RequestOptions): Promise<TrackResponse>;
|
|
18235
|
+
/**
|
|
18236
|
+
* Enqueue up to 1000 usage events for asynchronous processing. Items are validated synchronously up front; validated items are then enqueued via SQS for background deduction by workers. The response returns 202 immediately and does not include balance information. On partial enqueue failure (some items fail to enqueue, others succeed), the endpoint still returns 202 and logs the failures server-side; clients should NOT retry, because retrying re-enqueues the already-succeeded items. A 503 is returned only when zero items were successfully enqueued (queue entirely unavailable) — that case is safe to retry.
|
|
18237
|
+
*/
|
|
18238
|
+
batchTrack(request: Array<RequestBody>, options?: RequestOptions): Promise<BatchTrackResponse>;
|
|
17699
18239
|
}
|
|
17700
18240
|
|
|
17701
18241
|
/** All supported route names as const for type safety */
|
|
@@ -17736,8 +18276,10 @@ type RouteDefinition<T extends RouteName = RouteName> = {
|
|
|
17736
18276
|
customHandler?: CustomHandlerFn;
|
|
17737
18277
|
/** Whether customer ID is required (default: true) */
|
|
17738
18278
|
requireCustomer?: boolean;
|
|
18279
|
+
/** Body fields that must come from identity, not frontend */
|
|
18280
|
+
protectedBodyFields?: readonly ProtectedBodyField[];
|
|
17739
18281
|
/** Zod schema for request body validation (used by better-auth plugin) */
|
|
17740
18282
|
bodySchema?: z.ZodTypeAny;
|
|
17741
18283
|
};
|
|
17742
18284
|
|
|
17743
|
-
export { Autumn as A, type CustomHandlerArgs as C,
|
|
18285
|
+
export { Autumn as A, type CustomHandlerArgs as C, ROUTE_NAMES as R, type CustomHandlerFn as a, type RouteDefinition as b, type RouteName as c };
|