autumn-js 1.3.45 → 1.3.46
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 +43 -17
- package/dist/backend/adapters/express.mjs +4 -4
- package/dist/backend/adapters/fetch.js +43 -17
- package/dist/backend/adapters/fetch.mjs +4 -4
- package/dist/backend/adapters/hono.js +43 -17
- package/dist/backend/adapters/hono.mjs +4 -4
- package/dist/backend/adapters/index.js +43 -17
- package/dist/backend/adapters/index.mjs +7 -7
- package/dist/backend/adapters/next.js +43 -17
- package/dist/backend/adapters/next.mjs +4 -4
- package/dist/backend/{chunk-YPH7HFUK.mjs → chunk-6RGLO6FV.mjs} +1 -1
- package/dist/backend/{chunk-O626OIQH.mjs → chunk-C4IENXIG.mjs} +1 -1
- package/dist/backend/{chunk-B6LFGURF.mjs → chunk-DZBBXOKT.mjs} +1 -1
- package/dist/backend/{chunk-BKJ5TJQD.mjs → chunk-ESSDMDXJ.mjs} +1 -1
- package/dist/backend/{chunk-WUJROAC6.mjs → chunk-KSYN5FLV.mjs} +43 -17
- package/dist/backend/{chunk-HGLQ4JSO.mjs → chunk-NOJP6FIN.mjs} +1 -1
- package/dist/backend/{chunk-BBDVVRGT.mjs → chunk-ZFFEG27F.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 +43 -17
- package/dist/backend/core/handlers/coreHandler.mjs +2 -2
- 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/handleRouteByName.js +43 -17
- package/dist/backend/core/handlers/handleRouteByName.mjs +2 -2
- 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 +43 -17
- package/dist/backend/core/handlers/index.mjs +3 -3
- package/dist/backend/core/index.d.mts +1 -1
- package/dist/backend/core/index.d.ts +1 -1
- package/dist/backend/core/index.js +43 -17
- package/dist/backend/core/index.mjs +3 -3
- 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/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/types/handlerTypes.d.mts +1 -1
- package/dist/backend/core/types/handlerTypes.d.ts +1 -1
- package/dist/backend/core/types/index.d.mts +1 -1
- package/dist/backend/core/types/index.d.ts +1 -1
- package/dist/backend/core/types/routeTypes.d.mts +1 -1
- package/dist/backend/core/types/routeTypes.d.ts +1 -1
- package/dist/backend/index.d.mts +2 -2
- package/dist/backend/index.d.ts +2 -2
- package/dist/backend/index.js +43 -17
- package/dist/backend/index.mjs +3 -3
- package/dist/backend/{routeTypes-DsIf5SHS.d.ts → routeTypes-4TatmvQY.d.ts} +73 -15
- package/dist/backend/{routeTypes-BAn0Kksn.d.mts → routeTypes-DAI_E67X.d.mts} +73 -15
- package/dist/better-auth/{chunk-3M4F43H2.mjs → chunk-R7IEJQOY.mjs} +43 -17
- package/dist/better-auth/index.js +43 -17
- package/dist/better-auth/index.mjs +1 -1
- package/dist/better-auth/utils/handleBetterAuthRoute.js +43 -17
- package/dist/better-auth/utils/handleBetterAuthRoute.mjs +1 -1
- package/dist/better-auth/utils/index.js +43 -17
- package/dist/better-auth/utils/index.mjs +1 -1
- package/dist/react/AutumnContext.d.mts +4 -4
- package/dist/react/AutumnContext.d.ts +4 -4
- package/dist/react/client/AutumnClient.d.mts +4 -4
- package/dist/react/client/AutumnClient.d.ts +4 -4
- package/dist/react/client/IAutumnClient.d.mts +4 -4
- package/dist/react/client/IAutumnClient.d.ts +4 -4
- package/dist/react/client/index.d.mts +4 -4
- package/dist/react/client/index.d.ts +4 -4
- package/dist/react/{customer-B0VDWypn.d.ts → customer-B0KAd7eZ.d.ts} +16 -16
- package/dist/react/{customer-BIYGF3IC.d.mts → customer-DfpvnPRk.d.mts} +16 -16
- package/dist/react/hooks/index.d.mts +4 -4
- package/dist/react/hooks/index.d.ts +4 -4
- 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 +4 -4
- package/dist/react/hooks/internal/useCustomerActions.d.ts +4 -4
- package/dist/react/hooks/useAggregateEvents.d.mts +2 -2
- package/dist/react/hooks/useAggregateEvents.d.ts +2 -2
- package/dist/react/hooks/useCustomer.d.mts +3 -3
- package/dist/react/hooks/useCustomer.d.ts +3 -3
- package/dist/react/hooks/useEntity.d.mts +2 -2
- package/dist/react/hooks/useEntity.d.ts +2 -2
- package/dist/react/hooks/useListEvents.d.mts +2 -2
- package/dist/react/hooks/useListEvents.d.ts +2 -2
- package/dist/react/hooks/useListPlans.d.mts +3 -3
- package/dist/react/hooks/useListPlans.d.ts +3 -3
- package/dist/react/hooks/useReferrals.d.mts +2 -2
- package/dist/react/hooks/useReferrals.d.ts +2 -2
- package/dist/react/index.d.mts +4 -4
- package/dist/react/index.d.ts +4 -4
- package/dist/react/{list-plans-response-kGzo3GRQ.d.ts → list-plans-response-6iUDTnPQ.d.ts} +1 -1
- package/dist/react/{list-plans-response-BqtwCPty.d.mts → list-plans-response-BzsqJlxN.d.mts} +1 -1
- package/dist/react/{params-DP6BNkc0.d.ts → params-CMcoADwO.d.ts} +1 -1
- package/dist/react/{params-DZznA-no.d.mts → params-vAoGWtk9.d.mts} +1 -1
- package/dist/react/{plan-CEOgE_On.d.mts → plan-Ct5TGTnS.d.mts} +33 -0
- package/dist/react/{plan-CEOgE_On.d.ts → plan-Ct5TGTnS.d.ts} +33 -0
- package/dist/sdk/index.d.mts +89 -21
- package/dist/sdk/index.d.ts +89 -21
- package/dist/sdk/index.js +75 -27
- package/dist/sdk/index.mjs +58 -18
- package/package.json +2 -2
package/dist/backend/index.js
CHANGED
|
@@ -3695,6 +3695,10 @@ var BalanceBillingMethod = {
|
|
|
3695
3695
|
Prepaid: "prepaid",
|
|
3696
3696
|
UsageBased: "usage_based"
|
|
3697
3697
|
};
|
|
3698
|
+
var BalanceSource = {
|
|
3699
|
+
Customer: "customer",
|
|
3700
|
+
Entity: "entity"
|
|
3701
|
+
};
|
|
3698
3702
|
var BalanceType$inboundSchema = inboundSchema(BalanceType);
|
|
3699
3703
|
var BalanceDimensions6$inboundSchema = z15.pipe(
|
|
3700
3704
|
z15.object({
|
|
@@ -4055,6 +4059,10 @@ var BalancePrice$inboundSchema = z15.pipe(
|
|
|
4055
4059
|
});
|
|
4056
4060
|
})
|
|
4057
4061
|
);
|
|
4062
|
+
var BalanceSource$inboundSchema = inboundSchema(BalanceSource);
|
|
4063
|
+
var Allocation$inboundSchema = z15.object({
|
|
4064
|
+
amount: number2()
|
|
4065
|
+
});
|
|
4058
4066
|
var Breakdown$inboundSchema = z15.pipe(
|
|
4059
4067
|
z15.object({
|
|
4060
4068
|
id: z15._default(string5(), ""),
|
|
@@ -4066,7 +4074,11 @@ var Breakdown$inboundSchema = z15.pipe(
|
|
|
4066
4074
|
unlimited: boolean2(),
|
|
4067
4075
|
reset: nullable(z15.lazy(() => BalanceReset$inboundSchema)),
|
|
4068
4076
|
price: nullable(z15.lazy(() => BalancePrice$inboundSchema)),
|
|
4069
|
-
expires_at: nullable(number2())
|
|
4077
|
+
expires_at: nullable(number2()),
|
|
4078
|
+
source: optional3(BalanceSource$inboundSchema),
|
|
4079
|
+
allocation: z15.optional(
|
|
4080
|
+
z15.nullable(z15.lazy(() => Allocation$inboundSchema))
|
|
4081
|
+
)
|
|
4070
4082
|
}),
|
|
4071
4083
|
z15.transform((v) => {
|
|
4072
4084
|
return remap(v, {
|
|
@@ -4103,7 +4115,9 @@ var Balance$inboundSchema = z15.pipe(
|
|
|
4103
4115
|
breakdown: optional3(z15.array(z15.lazy(() => Breakdown$inboundSchema))),
|
|
4104
4116
|
rollovers: optional3(z15.array(z15.lazy(
|
|
4105
4117
|
() => BalanceRollover$inboundSchema
|
|
4106
|
-
)))
|
|
4118
|
+
))),
|
|
4119
|
+
allocated: optional3(number2()),
|
|
4120
|
+
unallocated: optional3(number2())
|
|
4107
4121
|
}),
|
|
4108
4122
|
z15.transform((v) => {
|
|
4109
4123
|
return remap(v, {
|
|
@@ -21160,7 +21174,7 @@ var CustomerAutoTopupInterval1 = {
|
|
|
21160
21174
|
Week: "week",
|
|
21161
21175
|
Month: "month"
|
|
21162
21176
|
};
|
|
21163
|
-
var
|
|
21177
|
+
var CustomerAutoTopupSource = {
|
|
21164
21178
|
Customer: "customer",
|
|
21165
21179
|
Plan: "plan"
|
|
21166
21180
|
};
|
|
@@ -21168,7 +21182,7 @@ var CustomerLimitType = {
|
|
|
21168
21182
|
Absolute: "absolute",
|
|
21169
21183
|
UsagePercentage: "usage_percentage"
|
|
21170
21184
|
};
|
|
21171
|
-
var
|
|
21185
|
+
var CustomerSpendLimitSource = {
|
|
21172
21186
|
Customer: "customer",
|
|
21173
21187
|
Plan: "plan"
|
|
21174
21188
|
};
|
|
@@ -21182,7 +21196,7 @@ var CustomerAnchor = {
|
|
|
21182
21196
|
BillingCycle: "billing_cycle",
|
|
21183
21197
|
Utc: "utc"
|
|
21184
21198
|
};
|
|
21185
|
-
var
|
|
21199
|
+
var CustomerUsageLimitSource = {
|
|
21186
21200
|
Customer: "customer",
|
|
21187
21201
|
Plan: "plan"
|
|
21188
21202
|
};
|
|
@@ -21198,11 +21212,11 @@ var CustomerBasis = {
|
|
|
21198
21212
|
Recurring: "recurring",
|
|
21199
21213
|
UsageLimit: "usage_limit"
|
|
21200
21214
|
};
|
|
21201
|
-
var
|
|
21215
|
+
var CustomerUsageAlertSource = {
|
|
21202
21216
|
Customer: "customer",
|
|
21203
21217
|
Plan: "plan"
|
|
21204
21218
|
};
|
|
21205
|
-
var
|
|
21219
|
+
var CustomerOverageAllowedSource = {
|
|
21206
21220
|
Customer: "customer",
|
|
21207
21221
|
Plan: "plan"
|
|
21208
21222
|
};
|
|
@@ -21295,7 +21309,7 @@ var CustomerPurchaseLimitUnion$inboundSchema = smartUnion([
|
|
|
21295
21309
|
z39.lazy(() => CustomerPurchaseLimit1$inboundSchema),
|
|
21296
21310
|
z39.lazy(() => CustomerPurchaseLimit2$inboundSchema)
|
|
21297
21311
|
]);
|
|
21298
|
-
var
|
|
21312
|
+
var CustomerAutoTopupSource$inboundSchema = inboundSchema(CustomerAutoTopupSource);
|
|
21299
21313
|
var CustomerAutoTopup$inboundSchema = z39.pipe(
|
|
21300
21314
|
z39.object({
|
|
21301
21315
|
feature_id: string5(),
|
|
@@ -21307,7 +21321,7 @@ var CustomerAutoTopup$inboundSchema = z39.pipe(
|
|
|
21307
21321
|
z39.lazy(() => CustomerPurchaseLimit2$inboundSchema)
|
|
21308
21322
|
])),
|
|
21309
21323
|
invoice_mode: optional3(boolean2()),
|
|
21310
|
-
source: optional3(
|
|
21324
|
+
source: optional3(CustomerAutoTopupSource$inboundSchema)
|
|
21311
21325
|
}),
|
|
21312
21326
|
z39.transform((v) => {
|
|
21313
21327
|
return remap(v, {
|
|
@@ -21318,7 +21332,7 @@ var CustomerAutoTopup$inboundSchema = z39.pipe(
|
|
|
21318
21332
|
})
|
|
21319
21333
|
);
|
|
21320
21334
|
var CustomerLimitType$inboundSchema = inboundSchema(CustomerLimitType);
|
|
21321
|
-
var
|
|
21335
|
+
var CustomerSpendLimitSource$inboundSchema = inboundSchema(CustomerSpendLimitSource);
|
|
21322
21336
|
var CustomerSpendLimit$inboundSchema = z39.pipe(
|
|
21323
21337
|
z39.object({
|
|
21324
21338
|
feature_id: optional3(string5()),
|
|
@@ -21326,7 +21340,7 @@ var CustomerSpendLimit$inboundSchema = z39.pipe(
|
|
|
21326
21340
|
limit_type: optional3(CustomerLimitType$inboundSchema),
|
|
21327
21341
|
overage_limit: optional3(number2()),
|
|
21328
21342
|
skip_overage_billing: optional3(boolean2()),
|
|
21329
|
-
source: optional3(
|
|
21343
|
+
source: optional3(CustomerSpendLimitSource$inboundSchema)
|
|
21330
21344
|
}),
|
|
21331
21345
|
z39.transform((v) => {
|
|
21332
21346
|
return remap(v, {
|
|
@@ -21342,7 +21356,7 @@ var CustomerAnchor$inboundSchema = inboundSchema(CustomerAnchor);
|
|
|
21342
21356
|
var CustomerUsageLimitFilter$inboundSchema = z39.object({
|
|
21343
21357
|
properties: z39.record(z39.string(), string5())
|
|
21344
21358
|
});
|
|
21345
|
-
var
|
|
21359
|
+
var CustomerUsageLimitSource$inboundSchema = inboundSchema(CustomerUsageLimitSource);
|
|
21346
21360
|
var CustomerUsageLimit$inboundSchema = z39.pipe(
|
|
21347
21361
|
z39.object({
|
|
21348
21362
|
feature_id: string5(),
|
|
@@ -21354,7 +21368,7 @@ var CustomerUsageLimit$inboundSchema = z39.pipe(
|
|
|
21354
21368
|
z39.lazy(() => CustomerUsageLimitFilter$inboundSchema)
|
|
21355
21369
|
),
|
|
21356
21370
|
usage: optional3(number2()),
|
|
21357
|
-
source: optional3(
|
|
21371
|
+
source: optional3(CustomerUsageLimitSource$inboundSchema)
|
|
21358
21372
|
}),
|
|
21359
21373
|
z39.transform((v) => {
|
|
21360
21374
|
return remap(v, {
|
|
@@ -21367,7 +21381,7 @@ var CustomerBasis$inboundSchema = inboundSchema(CustomerBasis);
|
|
|
21367
21381
|
var CustomerUsageAlertFilter$inboundSchema = z39.object({
|
|
21368
21382
|
properties: z39.record(z39.string(), string5())
|
|
21369
21383
|
});
|
|
21370
|
-
var
|
|
21384
|
+
var CustomerUsageAlertSource$inboundSchema = inboundSchema(CustomerUsageAlertSource);
|
|
21371
21385
|
var CustomerUsageAlert$inboundSchema = z39.pipe(
|
|
21372
21386
|
z39.object({
|
|
21373
21387
|
feature_id: optional3(string5()),
|
|
@@ -21379,7 +21393,7 @@ var CustomerUsageAlert$inboundSchema = z39.pipe(
|
|
|
21379
21393
|
z39.lazy(() => CustomerUsageAlertFilter$inboundSchema)
|
|
21380
21394
|
),
|
|
21381
21395
|
name: optional3(string5()),
|
|
21382
|
-
source: optional3(
|
|
21396
|
+
source: optional3(CustomerUsageAlertSource$inboundSchema)
|
|
21383
21397
|
}),
|
|
21384
21398
|
z39.transform((v) => {
|
|
21385
21399
|
return remap(v, {
|
|
@@ -21388,12 +21402,12 @@ var CustomerUsageAlert$inboundSchema = z39.pipe(
|
|
|
21388
21402
|
});
|
|
21389
21403
|
})
|
|
21390
21404
|
);
|
|
21391
|
-
var
|
|
21405
|
+
var CustomerOverageAllowedSource$inboundSchema = inboundSchema(CustomerOverageAllowedSource);
|
|
21392
21406
|
var CustomerOverageAllowed$inboundSchema = z39.pipe(
|
|
21393
21407
|
z39.object({
|
|
21394
21408
|
feature_id: string5(),
|
|
21395
21409
|
enabled: z39._default(boolean2(), false),
|
|
21396
|
-
source: optional3(
|
|
21410
|
+
source: optional3(CustomerOverageAllowedSource$inboundSchema)
|
|
21397
21411
|
}),
|
|
21398
21412
|
z39.transform((v) => {
|
|
21399
21413
|
return remap(v, {
|
|
@@ -28166,6 +28180,10 @@ var ListBalancesBillingMethod = {
|
|
|
28166
28180
|
Prepaid: "prepaid",
|
|
28167
28181
|
UsageBased: "usage_based"
|
|
28168
28182
|
};
|
|
28183
|
+
var ListBalancesSource = {
|
|
28184
|
+
Customer: "customer",
|
|
28185
|
+
Entity: "entity"
|
|
28186
|
+
};
|
|
28169
28187
|
var ListBalancesListStatus = {
|
|
28170
28188
|
Active: "active",
|
|
28171
28189
|
Expired: "expired"
|
|
@@ -28244,6 +28262,10 @@ var ListBalancesPrice$inboundSchema = z66.pipe(
|
|
|
28244
28262
|
});
|
|
28245
28263
|
})
|
|
28246
28264
|
);
|
|
28265
|
+
var ListBalancesSource$inboundSchema = inboundSchema(ListBalancesSource);
|
|
28266
|
+
var ListBalancesAllocation$inboundSchema = z66.object({
|
|
28267
|
+
amount: number2()
|
|
28268
|
+
});
|
|
28247
28269
|
var ListBalancesListStatus$inboundSchema = inboundSchema(ListBalancesListStatus);
|
|
28248
28270
|
var ListBalancesRollover$inboundSchema = z66.pipe(
|
|
28249
28271
|
z66.object({
|
|
@@ -28269,6 +28291,10 @@ var ListBalancesList$inboundSchema = z66.pipe(
|
|
|
28269
28291
|
reset: nullable(z66.lazy(() => ListBalancesReset$inboundSchema)),
|
|
28270
28292
|
price: nullable(z66.lazy(() => ListBalancesPrice$inboundSchema)),
|
|
28271
28293
|
expires_at: nullable(number2()),
|
|
28294
|
+
source: optional3(ListBalancesSource$inboundSchema),
|
|
28295
|
+
allocation: z66.optional(
|
|
28296
|
+
z66.nullable(z66.lazy(() => ListBalancesAllocation$inboundSchema))
|
|
28297
|
+
),
|
|
28272
28298
|
feature_id: string5(),
|
|
28273
28299
|
status: ListBalancesListStatus$inboundSchema,
|
|
28274
28300
|
rollovers: z66.array(z66.lazy(() => ListBalancesRollover$inboundSchema)),
|
package/dist/backend/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "./chunk-WYDGEDEU.mjs";
|
|
2
2
|
import "./chunk-VXND2UDT.mjs";
|
|
3
|
-
import "./chunk-
|
|
3
|
+
import "./chunk-6RGLO6FV.mjs";
|
|
4
4
|
import {
|
|
5
5
|
createCoreHandler
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-ZFFEG27F.mjs";
|
|
7
|
+
import "./chunk-KSYN5FLV.mjs";
|
|
8
8
|
import "./chunk-MOHYGUMA.mjs";
|
|
9
9
|
import "./chunk-TBQ27LIK.mjs";
|
|
10
10
|
import "./chunk-J44WR3QZ.mjs";
|
|
@@ -3294,6 +3294,23 @@ type BalancePrice = {
|
|
|
3294
3294
|
*/
|
|
3295
3295
|
maxPurchase: number | null;
|
|
3296
3296
|
};
|
|
3297
|
+
/**
|
|
3298
|
+
* Where this row's credits come from: shared at the customer level, or owned by the entity.
|
|
3299
|
+
*/
|
|
3300
|
+
declare const BalanceSource: {
|
|
3301
|
+
readonly Customer: "customer";
|
|
3302
|
+
readonly Entity: "entity";
|
|
3303
|
+
};
|
|
3304
|
+
/**
|
|
3305
|
+
* Where this row's credits come from: shared at the customer level, or owned by the entity.
|
|
3306
|
+
*/
|
|
3307
|
+
type BalanceSource = OpenEnum<typeof BalanceSource>;
|
|
3308
|
+
type Allocation = {
|
|
3309
|
+
/**
|
|
3310
|
+
* The amount allocated to this entity.
|
|
3311
|
+
*/
|
|
3312
|
+
amount: number;
|
|
3313
|
+
};
|
|
3297
3314
|
type Breakdown = {
|
|
3298
3315
|
/**
|
|
3299
3316
|
* The unique identifier for this balance breakdown.
|
|
@@ -3335,6 +3352,14 @@ type Breakdown = {
|
|
|
3335
3352
|
* Timestamp when this balance expires, or null for no expiration.
|
|
3336
3353
|
*/
|
|
3337
3354
|
expiresAt: number | null;
|
|
3355
|
+
/**
|
|
3356
|
+
* Where this row's credits come from: shared at the customer level, or owned by the entity.
|
|
3357
|
+
*/
|
|
3358
|
+
source?: BalanceSource | undefined;
|
|
3359
|
+
/**
|
|
3360
|
+
* Set when this row's numbers are the entity's allocated share of the customer's credits.
|
|
3361
|
+
*/
|
|
3362
|
+
allocation?: Allocation | null | undefined;
|
|
3338
3363
|
};
|
|
3339
3364
|
type BalanceRollover = {
|
|
3340
3365
|
/**
|
|
@@ -3395,6 +3420,14 @@ type Balance = {
|
|
|
3395
3420
|
* Rollover balances carried over from previous periods.
|
|
3396
3421
|
*/
|
|
3397
3422
|
rollovers?: Array<BalanceRollover> | undefined;
|
|
3423
|
+
/**
|
|
3424
|
+
* Shared credits held for entities by allocations; present only when the customer allocates this feature.
|
|
3425
|
+
*/
|
|
3426
|
+
allocated?: number | undefined;
|
|
3427
|
+
/**
|
|
3428
|
+
* Remaining shared credits no allocation holds; any entity may use them.
|
|
3429
|
+
*/
|
|
3430
|
+
unallocated?: number | undefined;
|
|
3398
3431
|
};
|
|
3399
3432
|
|
|
3400
3433
|
/**
|
|
@@ -23498,14 +23531,14 @@ type CustomerPurchaseLimit1 = {
|
|
|
23498
23531
|
/**
|
|
23499
23532
|
* Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
|
|
23500
23533
|
*/
|
|
23501
|
-
declare const
|
|
23534
|
+
declare const CustomerAutoTopupSource: {
|
|
23502
23535
|
readonly Customer: "customer";
|
|
23503
23536
|
readonly Plan: "plan";
|
|
23504
23537
|
};
|
|
23505
23538
|
/**
|
|
23506
23539
|
* Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
|
|
23507
23540
|
*/
|
|
23508
|
-
type
|
|
23541
|
+
type CustomerAutoTopupSource = OpenEnum<typeof CustomerAutoTopupSource>;
|
|
23509
23542
|
type CustomerAutoTopup = {
|
|
23510
23543
|
/**
|
|
23511
23544
|
* The ID of the feature (credit balance) to auto top-up.
|
|
@@ -23534,7 +23567,7 @@ type CustomerAutoTopup = {
|
|
|
23534
23567
|
/**
|
|
23535
23568
|
* Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
|
|
23536
23569
|
*/
|
|
23537
|
-
source?:
|
|
23570
|
+
source?: CustomerAutoTopupSource | undefined;
|
|
23538
23571
|
};
|
|
23539
23572
|
/**
|
|
23540
23573
|
* How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
|
|
@@ -23550,14 +23583,14 @@ type CustomerLimitType = OpenEnum<typeof CustomerLimitType>;
|
|
|
23550
23583
|
/**
|
|
23551
23584
|
* Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
|
|
23552
23585
|
*/
|
|
23553
|
-
declare const
|
|
23586
|
+
declare const CustomerSpendLimitSource: {
|
|
23554
23587
|
readonly Customer: "customer";
|
|
23555
23588
|
readonly Plan: "plan";
|
|
23556
23589
|
};
|
|
23557
23590
|
/**
|
|
23558
23591
|
* Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
|
|
23559
23592
|
*/
|
|
23560
|
-
type
|
|
23593
|
+
type CustomerSpendLimitSource = OpenEnum<typeof CustomerSpendLimitSource>;
|
|
23561
23594
|
type CustomerSpendLimit = {
|
|
23562
23595
|
/**
|
|
23563
23596
|
* Optional feature ID this spend limit applies to.
|
|
@@ -23582,7 +23615,7 @@ type CustomerSpendLimit = {
|
|
|
23582
23615
|
/**
|
|
23583
23616
|
* Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
|
|
23584
23617
|
*/
|
|
23585
|
-
source?:
|
|
23618
|
+
source?: CustomerSpendLimitSource | undefined;
|
|
23586
23619
|
};
|
|
23587
23620
|
/**
|
|
23588
23621
|
* Interval for the cap, aligned to the customer's billing cycle.
|
|
@@ -23619,14 +23652,14 @@ type CustomerUsageLimitFilter = {
|
|
|
23619
23652
|
/**
|
|
23620
23653
|
* Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
|
|
23621
23654
|
*/
|
|
23622
|
-
declare const
|
|
23655
|
+
declare const CustomerUsageLimitSource: {
|
|
23623
23656
|
readonly Customer: "customer";
|
|
23624
23657
|
readonly Plan: "plan";
|
|
23625
23658
|
};
|
|
23626
23659
|
/**
|
|
23627
23660
|
* Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
|
|
23628
23661
|
*/
|
|
23629
|
-
type
|
|
23662
|
+
type CustomerUsageLimitSource = OpenEnum<typeof CustomerUsageLimitSource>;
|
|
23630
23663
|
type CustomerUsageLimit = {
|
|
23631
23664
|
/**
|
|
23632
23665
|
* The feature this usage limit applies to.
|
|
@@ -23659,7 +23692,7 @@ type CustomerUsageLimit = {
|
|
|
23659
23692
|
/**
|
|
23660
23693
|
* Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
|
|
23661
23694
|
*/
|
|
23662
|
-
source?:
|
|
23695
|
+
source?: CustomerUsageLimitSource | undefined;
|
|
23663
23696
|
};
|
|
23664
23697
|
/**
|
|
23665
23698
|
* Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
|
|
@@ -23698,14 +23731,14 @@ type CustomerUsageAlertFilter = {
|
|
|
23698
23731
|
/**
|
|
23699
23732
|
* Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
|
|
23700
23733
|
*/
|
|
23701
|
-
declare const
|
|
23734
|
+
declare const CustomerUsageAlertSource: {
|
|
23702
23735
|
readonly Customer: "customer";
|
|
23703
23736
|
readonly Plan: "plan";
|
|
23704
23737
|
};
|
|
23705
23738
|
/**
|
|
23706
23739
|
* Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
|
|
23707
23740
|
*/
|
|
23708
|
-
type
|
|
23741
|
+
type CustomerUsageAlertSource = OpenEnum<typeof CustomerUsageAlertSource>;
|
|
23709
23742
|
type CustomerUsageAlert = {
|
|
23710
23743
|
/**
|
|
23711
23744
|
* The feature ID this alert applies to.
|
|
@@ -23738,19 +23771,19 @@ type CustomerUsageAlert = {
|
|
|
23738
23771
|
/**
|
|
23739
23772
|
* Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
|
|
23740
23773
|
*/
|
|
23741
|
-
source?:
|
|
23774
|
+
source?: CustomerUsageAlertSource | undefined;
|
|
23742
23775
|
};
|
|
23743
23776
|
/**
|
|
23744
23777
|
* Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
|
|
23745
23778
|
*/
|
|
23746
|
-
declare const
|
|
23779
|
+
declare const CustomerOverageAllowedSource: {
|
|
23747
23780
|
readonly Customer: "customer";
|
|
23748
23781
|
readonly Plan: "plan";
|
|
23749
23782
|
};
|
|
23750
23783
|
/**
|
|
23751
23784
|
* Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
|
|
23752
23785
|
*/
|
|
23753
|
-
type
|
|
23786
|
+
type CustomerOverageAllowedSource = OpenEnum<typeof CustomerOverageAllowedSource>;
|
|
23754
23787
|
type CustomerOverageAllowed = {
|
|
23755
23788
|
/**
|
|
23756
23789
|
* The feature ID this overage allowed control applies to.
|
|
@@ -23763,7 +23796,7 @@ type CustomerOverageAllowed = {
|
|
|
23763
23796
|
/**
|
|
23764
23797
|
* Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
|
|
23765
23798
|
*/
|
|
23766
|
-
source?:
|
|
23799
|
+
source?: CustomerOverageAllowedSource | undefined;
|
|
23767
23800
|
};
|
|
23768
23801
|
/**
|
|
23769
23802
|
* Billing controls for the customer (auto top-ups, etc.)
|
|
@@ -32104,6 +32137,23 @@ type ListBalancesPrice = {
|
|
|
32104
32137
|
*/
|
|
32105
32138
|
maxPurchase: number | null;
|
|
32106
32139
|
};
|
|
32140
|
+
/**
|
|
32141
|
+
* Where this row's credits come from: shared at the customer level, or owned by the entity.
|
|
32142
|
+
*/
|
|
32143
|
+
declare const ListBalancesSource: {
|
|
32144
|
+
readonly Customer: "customer";
|
|
32145
|
+
readonly Entity: "entity";
|
|
32146
|
+
};
|
|
32147
|
+
/**
|
|
32148
|
+
* Where this row's credits come from: shared at the customer level, or owned by the entity.
|
|
32149
|
+
*/
|
|
32150
|
+
type ListBalancesSource = OpenEnum<typeof ListBalancesSource>;
|
|
32151
|
+
type ListBalancesAllocation = {
|
|
32152
|
+
/**
|
|
32153
|
+
* The amount allocated to this entity.
|
|
32154
|
+
*/
|
|
32155
|
+
amount: number;
|
|
32156
|
+
};
|
|
32107
32157
|
/**
|
|
32108
32158
|
* Whether this balance is active or expired.
|
|
32109
32159
|
*/
|
|
@@ -32170,6 +32220,14 @@ type ListBalancesList = {
|
|
|
32170
32220
|
* Timestamp when this balance expires, or null for no expiration.
|
|
32171
32221
|
*/
|
|
32172
32222
|
expiresAt: number | null;
|
|
32223
|
+
/**
|
|
32224
|
+
* Where this row's credits come from: shared at the customer level, or owned by the entity.
|
|
32225
|
+
*/
|
|
32226
|
+
source?: ListBalancesSource | undefined;
|
|
32227
|
+
/**
|
|
32228
|
+
* Set when this row's numbers are the entity's allocated share of the customer's credits.
|
|
32229
|
+
*/
|
|
32230
|
+
allocation?: ListBalancesAllocation | null | undefined;
|
|
32173
32231
|
/**
|
|
32174
32232
|
* The feature this balance is for.
|
|
32175
32233
|
*/
|
|
@@ -3294,6 +3294,23 @@ type BalancePrice = {
|
|
|
3294
3294
|
*/
|
|
3295
3295
|
maxPurchase: number | null;
|
|
3296
3296
|
};
|
|
3297
|
+
/**
|
|
3298
|
+
* Where this row's credits come from: shared at the customer level, or owned by the entity.
|
|
3299
|
+
*/
|
|
3300
|
+
declare const BalanceSource: {
|
|
3301
|
+
readonly Customer: "customer";
|
|
3302
|
+
readonly Entity: "entity";
|
|
3303
|
+
};
|
|
3304
|
+
/**
|
|
3305
|
+
* Where this row's credits come from: shared at the customer level, or owned by the entity.
|
|
3306
|
+
*/
|
|
3307
|
+
type BalanceSource = OpenEnum<typeof BalanceSource>;
|
|
3308
|
+
type Allocation = {
|
|
3309
|
+
/**
|
|
3310
|
+
* The amount allocated to this entity.
|
|
3311
|
+
*/
|
|
3312
|
+
amount: number;
|
|
3313
|
+
};
|
|
3297
3314
|
type Breakdown = {
|
|
3298
3315
|
/**
|
|
3299
3316
|
* The unique identifier for this balance breakdown.
|
|
@@ -3335,6 +3352,14 @@ type Breakdown = {
|
|
|
3335
3352
|
* Timestamp when this balance expires, or null for no expiration.
|
|
3336
3353
|
*/
|
|
3337
3354
|
expiresAt: number | null;
|
|
3355
|
+
/**
|
|
3356
|
+
* Where this row's credits come from: shared at the customer level, or owned by the entity.
|
|
3357
|
+
*/
|
|
3358
|
+
source?: BalanceSource | undefined;
|
|
3359
|
+
/**
|
|
3360
|
+
* Set when this row's numbers are the entity's allocated share of the customer's credits.
|
|
3361
|
+
*/
|
|
3362
|
+
allocation?: Allocation | null | undefined;
|
|
3338
3363
|
};
|
|
3339
3364
|
type BalanceRollover = {
|
|
3340
3365
|
/**
|
|
@@ -3395,6 +3420,14 @@ type Balance = {
|
|
|
3395
3420
|
* Rollover balances carried over from previous periods.
|
|
3396
3421
|
*/
|
|
3397
3422
|
rollovers?: Array<BalanceRollover> | undefined;
|
|
3423
|
+
/**
|
|
3424
|
+
* Shared credits held for entities by allocations; present only when the customer allocates this feature.
|
|
3425
|
+
*/
|
|
3426
|
+
allocated?: number | undefined;
|
|
3427
|
+
/**
|
|
3428
|
+
* Remaining shared credits no allocation holds; any entity may use them.
|
|
3429
|
+
*/
|
|
3430
|
+
unallocated?: number | undefined;
|
|
3398
3431
|
};
|
|
3399
3432
|
|
|
3400
3433
|
/**
|
|
@@ -23498,14 +23531,14 @@ type CustomerPurchaseLimit1 = {
|
|
|
23498
23531
|
/**
|
|
23499
23532
|
* Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
|
|
23500
23533
|
*/
|
|
23501
|
-
declare const
|
|
23534
|
+
declare const CustomerAutoTopupSource: {
|
|
23502
23535
|
readonly Customer: "customer";
|
|
23503
23536
|
readonly Plan: "plan";
|
|
23504
23537
|
};
|
|
23505
23538
|
/**
|
|
23506
23539
|
* Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
|
|
23507
23540
|
*/
|
|
23508
|
-
type
|
|
23541
|
+
type CustomerAutoTopupSource = OpenEnum<typeof CustomerAutoTopupSource>;
|
|
23509
23542
|
type CustomerAutoTopup = {
|
|
23510
23543
|
/**
|
|
23511
23544
|
* The ID of the feature (credit balance) to auto top-up.
|
|
@@ -23534,7 +23567,7 @@ type CustomerAutoTopup = {
|
|
|
23534
23567
|
/**
|
|
23535
23568
|
* Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
|
|
23536
23569
|
*/
|
|
23537
|
-
source?:
|
|
23570
|
+
source?: CustomerAutoTopupSource | undefined;
|
|
23538
23571
|
};
|
|
23539
23572
|
/**
|
|
23540
23573
|
* How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
|
|
@@ -23550,14 +23583,14 @@ type CustomerLimitType = OpenEnum<typeof CustomerLimitType>;
|
|
|
23550
23583
|
/**
|
|
23551
23584
|
* Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
|
|
23552
23585
|
*/
|
|
23553
|
-
declare const
|
|
23586
|
+
declare const CustomerSpendLimitSource: {
|
|
23554
23587
|
readonly Customer: "customer";
|
|
23555
23588
|
readonly Plan: "plan";
|
|
23556
23589
|
};
|
|
23557
23590
|
/**
|
|
23558
23591
|
* Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
|
|
23559
23592
|
*/
|
|
23560
|
-
type
|
|
23593
|
+
type CustomerSpendLimitSource = OpenEnum<typeof CustomerSpendLimitSource>;
|
|
23561
23594
|
type CustomerSpendLimit = {
|
|
23562
23595
|
/**
|
|
23563
23596
|
* Optional feature ID this spend limit applies to.
|
|
@@ -23582,7 +23615,7 @@ type CustomerSpendLimit = {
|
|
|
23582
23615
|
/**
|
|
23583
23616
|
* Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
|
|
23584
23617
|
*/
|
|
23585
|
-
source?:
|
|
23618
|
+
source?: CustomerSpendLimitSource | undefined;
|
|
23586
23619
|
};
|
|
23587
23620
|
/**
|
|
23588
23621
|
* Interval for the cap, aligned to the customer's billing cycle.
|
|
@@ -23619,14 +23652,14 @@ type CustomerUsageLimitFilter = {
|
|
|
23619
23652
|
/**
|
|
23620
23653
|
* Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
|
|
23621
23654
|
*/
|
|
23622
|
-
declare const
|
|
23655
|
+
declare const CustomerUsageLimitSource: {
|
|
23623
23656
|
readonly Customer: "customer";
|
|
23624
23657
|
readonly Plan: "plan";
|
|
23625
23658
|
};
|
|
23626
23659
|
/**
|
|
23627
23660
|
* Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
|
|
23628
23661
|
*/
|
|
23629
|
-
type
|
|
23662
|
+
type CustomerUsageLimitSource = OpenEnum<typeof CustomerUsageLimitSource>;
|
|
23630
23663
|
type CustomerUsageLimit = {
|
|
23631
23664
|
/**
|
|
23632
23665
|
* The feature this usage limit applies to.
|
|
@@ -23659,7 +23692,7 @@ type CustomerUsageLimit = {
|
|
|
23659
23692
|
/**
|
|
23660
23693
|
* Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
|
|
23661
23694
|
*/
|
|
23662
|
-
source?:
|
|
23695
|
+
source?: CustomerUsageLimitSource | undefined;
|
|
23663
23696
|
};
|
|
23664
23697
|
/**
|
|
23665
23698
|
* Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
|
|
@@ -23698,14 +23731,14 @@ type CustomerUsageAlertFilter = {
|
|
|
23698
23731
|
/**
|
|
23699
23732
|
* Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
|
|
23700
23733
|
*/
|
|
23701
|
-
declare const
|
|
23734
|
+
declare const CustomerUsageAlertSource: {
|
|
23702
23735
|
readonly Customer: "customer";
|
|
23703
23736
|
readonly Plan: "plan";
|
|
23704
23737
|
};
|
|
23705
23738
|
/**
|
|
23706
23739
|
* Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
|
|
23707
23740
|
*/
|
|
23708
|
-
type
|
|
23741
|
+
type CustomerUsageAlertSource = OpenEnum<typeof CustomerUsageAlertSource>;
|
|
23709
23742
|
type CustomerUsageAlert = {
|
|
23710
23743
|
/**
|
|
23711
23744
|
* The feature ID this alert applies to.
|
|
@@ -23738,19 +23771,19 @@ type CustomerUsageAlert = {
|
|
|
23738
23771
|
/**
|
|
23739
23772
|
* Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
|
|
23740
23773
|
*/
|
|
23741
|
-
source?:
|
|
23774
|
+
source?: CustomerUsageAlertSource | undefined;
|
|
23742
23775
|
};
|
|
23743
23776
|
/**
|
|
23744
23777
|
* Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
|
|
23745
23778
|
*/
|
|
23746
|
-
declare const
|
|
23779
|
+
declare const CustomerOverageAllowedSource: {
|
|
23747
23780
|
readonly Customer: "customer";
|
|
23748
23781
|
readonly Plan: "plan";
|
|
23749
23782
|
};
|
|
23750
23783
|
/**
|
|
23751
23784
|
* Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
|
|
23752
23785
|
*/
|
|
23753
|
-
type
|
|
23786
|
+
type CustomerOverageAllowedSource = OpenEnum<typeof CustomerOverageAllowedSource>;
|
|
23754
23787
|
type CustomerOverageAllowed = {
|
|
23755
23788
|
/**
|
|
23756
23789
|
* The feature ID this overage allowed control applies to.
|
|
@@ -23763,7 +23796,7 @@ type CustomerOverageAllowed = {
|
|
|
23763
23796
|
/**
|
|
23764
23797
|
* Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
|
|
23765
23798
|
*/
|
|
23766
|
-
source?:
|
|
23799
|
+
source?: CustomerOverageAllowedSource | undefined;
|
|
23767
23800
|
};
|
|
23768
23801
|
/**
|
|
23769
23802
|
* Billing controls for the customer (auto top-ups, etc.)
|
|
@@ -32104,6 +32137,23 @@ type ListBalancesPrice = {
|
|
|
32104
32137
|
*/
|
|
32105
32138
|
maxPurchase: number | null;
|
|
32106
32139
|
};
|
|
32140
|
+
/**
|
|
32141
|
+
* Where this row's credits come from: shared at the customer level, or owned by the entity.
|
|
32142
|
+
*/
|
|
32143
|
+
declare const ListBalancesSource: {
|
|
32144
|
+
readonly Customer: "customer";
|
|
32145
|
+
readonly Entity: "entity";
|
|
32146
|
+
};
|
|
32147
|
+
/**
|
|
32148
|
+
* Where this row's credits come from: shared at the customer level, or owned by the entity.
|
|
32149
|
+
*/
|
|
32150
|
+
type ListBalancesSource = OpenEnum<typeof ListBalancesSource>;
|
|
32151
|
+
type ListBalancesAllocation = {
|
|
32152
|
+
/**
|
|
32153
|
+
* The amount allocated to this entity.
|
|
32154
|
+
*/
|
|
32155
|
+
amount: number;
|
|
32156
|
+
};
|
|
32107
32157
|
/**
|
|
32108
32158
|
* Whether this balance is active or expired.
|
|
32109
32159
|
*/
|
|
@@ -32170,6 +32220,14 @@ type ListBalancesList = {
|
|
|
32170
32220
|
* Timestamp when this balance expires, or null for no expiration.
|
|
32171
32221
|
*/
|
|
32172
32222
|
expiresAt: number | null;
|
|
32223
|
+
/**
|
|
32224
|
+
* Where this row's credits come from: shared at the customer level, or owned by the entity.
|
|
32225
|
+
*/
|
|
32226
|
+
source?: ListBalancesSource | undefined;
|
|
32227
|
+
/**
|
|
32228
|
+
* Set when this row's numbers are the entity's allocated share of the customer's credits.
|
|
32229
|
+
*/
|
|
32230
|
+
allocation?: ListBalancesAllocation | null | undefined;
|
|
32173
32231
|
/**
|
|
32174
32232
|
* The feature this balance is for.
|
|
32175
32233
|
*/
|