atmn 2.0.141 → 2.0.143
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/bin.js +67 -85
- package/dist/index.js +33 -75
- package/package.json +2 -2
- package/src/generated/apiRoutes.ts +14 -0
- package/src/generated/client.ts +916 -158
- package/src/generated/emit.ts +12 -0
- package/src/generated/features.ts +2 -0
- package/src/generated/licenses.ts +7 -1
- package/src/generated/lintRules.ts +33 -75
- package/src/generated/plans.ts +35 -5
- package/src/generated/skills.ts +9 -9
- package/src/generated/variants.ts +21 -3
package/src/generated/emit.ts
CHANGED
|
@@ -17,6 +17,7 @@ export const COLLECTIONS: Readonly<Record<string, CollectionSpec>> = {
|
|
|
17
17
|
"name",
|
|
18
18
|
"type",
|
|
19
19
|
"consumable",
|
|
20
|
+
"combine",
|
|
20
21
|
"creditSchema",
|
|
21
22
|
"modelMarkups",
|
|
22
23
|
"defaultMarkup",
|
|
@@ -46,6 +47,7 @@ export const COLLECTIONS: Readonly<Record<string, CollectionSpec>> = {
|
|
|
46
47
|
],
|
|
47
48
|
paths: [
|
|
48
49
|
"archived",
|
|
50
|
+
"combine",
|
|
49
51
|
"consumable",
|
|
50
52
|
"creditSchema",
|
|
51
53
|
"creditSchema.billingUnits",
|
|
@@ -141,6 +143,7 @@ export const COLLECTIONS: Readonly<Record<string, CollectionSpec>> = {
|
|
|
141
143
|
"items.featureOverride.creditSchema.dimensions.*.tiers",
|
|
142
144
|
"items.featureOverride.creditSchema.dimensions.*.tiers.creditCost",
|
|
143
145
|
"items.featureOverride.creditSchema.dimensions.*.tiers.to",
|
|
146
|
+
"items.featureOverride.creditSchema.excluded",
|
|
144
147
|
"items.featureOverride.creditSchema.meteredFeatureId",
|
|
145
148
|
"items.featureOverride.creditSchema.multipliers.*.match",
|
|
146
149
|
"items.featureOverride.creditSchema.tierBehavior",
|
|
@@ -169,6 +172,7 @@ export const COLLECTIONS: Readonly<Record<string, CollectionSpec>> = {
|
|
|
169
172
|
"licenses.customize.addItems.featureOverride.creditSchema.dimensions.*.tiers",
|
|
170
173
|
"licenses.customize.addItems.featureOverride.creditSchema.dimensions.*.tiers.creditCost",
|
|
171
174
|
"licenses.customize.addItems.featureOverride.creditSchema.dimensions.*.tiers.to",
|
|
175
|
+
"licenses.customize.addItems.featureOverride.creditSchema.excluded",
|
|
172
176
|
"licenses.customize.addItems.featureOverride.creditSchema.meteredFeatureId",
|
|
173
177
|
"licenses.customize.addItems.featureOverride.creditSchema.multipliers.*.match",
|
|
174
178
|
"licenses.customize.addItems.featureOverride.creditSchema.tierBehavior",
|
|
@@ -212,6 +216,7 @@ export const COLLECTIONS: Readonly<Record<string, CollectionSpec>> = {
|
|
|
212
216
|
"variants.customize.addItems.featureOverride.creditSchema.dimensions.*.tiers",
|
|
213
217
|
"variants.customize.addItems.featureOverride.creditSchema.dimensions.*.tiers.creditCost",
|
|
214
218
|
"variants.customize.addItems.featureOverride.creditSchema.dimensions.*.tiers.to",
|
|
219
|
+
"variants.customize.addItems.featureOverride.creditSchema.excluded",
|
|
215
220
|
"variants.customize.addItems.featureOverride.creditSchema.meteredFeatureId",
|
|
216
221
|
"variants.customize.addItems.featureOverride.creditSchema.multipliers.*.match",
|
|
217
222
|
"variants.customize.addItems.featureOverride.creditSchema.tierBehavior",
|
|
@@ -253,6 +258,7 @@ export const COLLECTIONS: Readonly<Record<string, CollectionSpec>> = {
|
|
|
253
258
|
"variants.customize.items.featureOverride.creditSchema.dimensions.*.tiers",
|
|
254
259
|
"variants.customize.items.featureOverride.creditSchema.dimensions.*.tiers.creditCost",
|
|
255
260
|
"variants.customize.items.featureOverride.creditSchema.dimensions.*.tiers.to",
|
|
261
|
+
"variants.customize.items.featureOverride.creditSchema.excluded",
|
|
256
262
|
"variants.customize.items.featureOverride.creditSchema.meteredFeatureId",
|
|
257
263
|
"variants.customize.items.featureOverride.creditSchema.multipliers.*.match",
|
|
258
264
|
"variants.customize.items.featureOverride.creditSchema.tierBehavior",
|
|
@@ -284,6 +290,7 @@ export const COLLECTIONS: Readonly<Record<string, CollectionSpec>> = {
|
|
|
284
290
|
"variants.customize.upsertLicenses.customize.addItems.featureOverride.creditSchema.dimensions.*.tierBehavior",
|
|
285
291
|
"variants.customize.upsertLicenses.customize.addItems.featureOverride.creditSchema.dimensions.*.tiers",
|
|
286
292
|
"variants.customize.upsertLicenses.customize.addItems.featureOverride.creditSchema.dimensions.*.tiers.creditCost",
|
|
293
|
+
"variants.customize.upsertLicenses.customize.addItems.featureOverride.creditSchema.excluded",
|
|
287
294
|
"variants.customize.upsertLicenses.customize.addItems.featureOverride.creditSchema.meteredFeatureId",
|
|
288
295
|
"variants.customize.upsertLicenses.customize.addItems.featureOverride.creditSchema.multipliers.*.match",
|
|
289
296
|
"variants.customize.upsertLicenses.customize.addItems.featureOverride.creditSchema.tierBehavior",
|
|
@@ -386,6 +393,7 @@ export const COLLECTIONS: Readonly<Record<string, CollectionSpec>> = {
|
|
|
386
393
|
"items.featureOverride.creditSchema.dimensions.*.tiers",
|
|
387
394
|
"items.featureOverride.creditSchema.dimensions.*.tiers.creditCost",
|
|
388
395
|
"items.featureOverride.creditSchema.dimensions.*.tiers.to",
|
|
396
|
+
"items.featureOverride.creditSchema.excluded",
|
|
389
397
|
"items.featureOverride.creditSchema.meteredFeatureId",
|
|
390
398
|
"items.featureOverride.creditSchema.multipliers",
|
|
391
399
|
"items.featureOverride.creditSchema.multipliers.*.add",
|
|
@@ -462,6 +470,7 @@ export const COLLECTIONS: Readonly<Record<string, CollectionSpec>> = {
|
|
|
462
470
|
"licenses.customize.addItems.featureOverride.creditSchema.dimensions.*.tiers",
|
|
463
471
|
"licenses.customize.addItems.featureOverride.creditSchema.dimensions.*.tiers.creditCost",
|
|
464
472
|
"licenses.customize.addItems.featureOverride.creditSchema.dimensions.*.tiers.to",
|
|
473
|
+
"licenses.customize.addItems.featureOverride.creditSchema.excluded",
|
|
465
474
|
"licenses.customize.addItems.featureOverride.creditSchema.meteredFeatureId",
|
|
466
475
|
"licenses.customize.addItems.featureOverride.creditSchema.multipliers",
|
|
467
476
|
"licenses.customize.addItems.featureOverride.creditSchema.multipliers.*.add",
|
|
@@ -577,6 +586,7 @@ export const COLLECTIONS: Readonly<Record<string, CollectionSpec>> = {
|
|
|
577
586
|
"variants.customize.addItems.featureOverride.creditSchema.dimensions.*.tiers",
|
|
578
587
|
"variants.customize.addItems.featureOverride.creditSchema.dimensions.*.tiers.creditCost",
|
|
579
588
|
"variants.customize.addItems.featureOverride.creditSchema.dimensions.*.tiers.to",
|
|
589
|
+
"variants.customize.addItems.featureOverride.creditSchema.excluded",
|
|
580
590
|
"variants.customize.addItems.featureOverride.creditSchema.meteredFeatureId",
|
|
581
591
|
"variants.customize.addItems.featureOverride.creditSchema.multipliers",
|
|
582
592
|
"variants.customize.addItems.featureOverride.creditSchema.multipliers.*.add",
|
|
@@ -691,6 +701,7 @@ export const COLLECTIONS: Readonly<Record<string, CollectionSpec>> = {
|
|
|
691
701
|
"variants.customize.items.featureOverride.creditSchema.dimensions.*.tiers",
|
|
692
702
|
"variants.customize.items.featureOverride.creditSchema.dimensions.*.tiers.creditCost",
|
|
693
703
|
"variants.customize.items.featureOverride.creditSchema.dimensions.*.tiers.to",
|
|
704
|
+
"variants.customize.items.featureOverride.creditSchema.excluded",
|
|
694
705
|
"variants.customize.items.featureOverride.creditSchema.meteredFeatureId",
|
|
695
706
|
"variants.customize.items.featureOverride.creditSchema.multipliers",
|
|
696
707
|
"variants.customize.items.featureOverride.creditSchema.multipliers.*.add",
|
|
@@ -779,6 +790,7 @@ export const COLLECTIONS: Readonly<Record<string, CollectionSpec>> = {
|
|
|
779
790
|
"variants.customize.upsertLicenses.customize.addItems.featureOverride.creditSchema.dimensions.*.tiers",
|
|
780
791
|
"variants.customize.upsertLicenses.customize.addItems.featureOverride.creditSchema.dimensions.*.tiers.creditCost",
|
|
781
792
|
"variants.customize.upsertLicenses.customize.addItems.featureOverride.creditSchema.dimensions.*.tiers.to",
|
|
793
|
+
"variants.customize.upsertLicenses.customize.addItems.featureOverride.creditSchema.excluded",
|
|
782
794
|
"variants.customize.upsertLicenses.customize.addItems.featureOverride.creditSchema.meteredFeatureId",
|
|
783
795
|
"variants.customize.upsertLicenses.customize.addItems.featureOverride.creditSchema.multipliers",
|
|
784
796
|
"variants.customize.upsertLicenses.customize.addItems.featureOverride.creditSchema.multipliers.*.add",
|
|
@@ -8,6 +8,8 @@ export type Feature = {
|
|
|
8
8
|
type: "boolean" | "metered" | "credit_system" | "ai_credit_system";
|
|
9
9
|
/** Whether this feature is consumable. A consumable feature is one that periodically resets and is consumed rather than allocated (like credits, API requests, etc.). Applicable only for 'metered' features. */
|
|
10
10
|
consumable?: boolean;
|
|
11
|
+
/** How grants of this feature from several plans combine. 'sum' (default) adds them up. 'max' or 'min' keeps only the highest or lowest grant among plan items with no price; priced items always add on top. Metered and credit system features only. */
|
|
12
|
+
combine?: "sum" | "max" | "min";
|
|
11
13
|
/** A schema that maps metered feature IDs to flat or graduated credit costs. For classic credit systems only — AI credit systems use model_markups instead. */
|
|
12
14
|
creditSchema?: Array<
|
|
13
15
|
| {
|
|
@@ -137,7 +137,7 @@ export type License = {
|
|
|
137
137
|
};
|
|
138
138
|
/** Overrides fields of this item's feature for customers on this plan (e.g. a credit system's credit_schema). */
|
|
139
139
|
featureOverride?: {
|
|
140
|
-
/** For credit system features:
|
|
140
|
+
/** For credit system features: merges into the feature's credit_schema by metered_feature_id for customers on this plan. A row with a rate overrides or adds that feature, a row with `excluded: true` removes it, and unlisted features keep the credit system's rate. */
|
|
141
141
|
creditSchema?: Array<
|
|
142
142
|
| {
|
|
143
143
|
/** ID of the metered feature that draws from this credit system. */
|
|
@@ -234,6 +234,12 @@ export type License = {
|
|
|
234
234
|
/** Credits consumed per billing-unit group. */
|
|
235
235
|
creditCost: number;
|
|
236
236
|
}
|
|
237
|
+
| {
|
|
238
|
+
/** ID of the metered feature to remove from the credit system. */
|
|
239
|
+
meteredFeatureId: string;
|
|
240
|
+
/** Removes this feature from the credit system for customers on this plan. Cannot be combined with a rate. */
|
|
241
|
+
excluded: true;
|
|
242
|
+
}
|
|
237
243
|
>;
|
|
238
244
|
/** For AI credit system features: replaces the feature's markup chain entirely for customers on this plan. An unset level means no markup at that level rather than inheriting the feature's. */
|
|
239
245
|
markups?: {
|
|
@@ -12,6 +12,9 @@ export const LINT_RULES: LintRules = {
|
|
|
12
12
|
type: {
|
|
13
13
|
enum: ["boolean", "metered", "credit_system", "ai_credit_system"],
|
|
14
14
|
},
|
|
15
|
+
combine: {
|
|
16
|
+
enum: ["sum", "max", "min"],
|
|
17
|
+
},
|
|
15
18
|
defaultMarkup: {
|
|
16
19
|
minimum: -100,
|
|
17
20
|
},
|
|
@@ -426,28 +429,22 @@ export const LINT_RULES: LintRules = {
|
|
|
426
429
|
},
|
|
427
430
|
"plans.items.featureOverride.creditSchema": {
|
|
428
431
|
variants: {
|
|
429
|
-
on: "
|
|
432
|
+
on: "excluded",
|
|
430
433
|
byValue: {
|
|
431
|
-
|
|
432
|
-
required: ["
|
|
434
|
+
true: {
|
|
435
|
+
required: ["excluded", "meteredFeatureId"],
|
|
433
436
|
fields: {
|
|
434
437
|
meteredFeatureId: {
|
|
435
438
|
minLength: 1,
|
|
436
439
|
},
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
},
|
|
440
|
-
tierBehavior: {
|
|
441
|
-
enum: ["graduated"],
|
|
442
|
-
},
|
|
443
|
-
tiers: {
|
|
444
|
-
minItems: 1,
|
|
440
|
+
excluded: {
|
|
441
|
+
enum: [true],
|
|
445
442
|
},
|
|
446
443
|
},
|
|
447
444
|
},
|
|
448
445
|
},
|
|
449
446
|
fallback: {
|
|
450
|
-
required: ["
|
|
447
|
+
required: ["meteredFeatureId"],
|
|
451
448
|
fields: {
|
|
452
449
|
meteredFeatureId: {
|
|
453
450
|
minLength: 1,
|
|
@@ -455,9 +452,6 @@ export const LINT_RULES: LintRules = {
|
|
|
455
452
|
billingUnits: {
|
|
456
453
|
exclusiveMinimum: 0,
|
|
457
454
|
},
|
|
458
|
-
creditCost: {
|
|
459
|
-
minimum: 0,
|
|
460
|
-
},
|
|
461
455
|
},
|
|
462
456
|
},
|
|
463
457
|
},
|
|
@@ -699,28 +693,22 @@ export const LINT_RULES: LintRules = {
|
|
|
699
693
|
},
|
|
700
694
|
"plans.licenses.customize.addItems.featureOverride.creditSchema": {
|
|
701
695
|
variants: {
|
|
702
|
-
on: "
|
|
696
|
+
on: "excluded",
|
|
703
697
|
byValue: {
|
|
704
|
-
|
|
705
|
-
required: ["
|
|
698
|
+
true: {
|
|
699
|
+
required: ["excluded", "meteredFeatureId"],
|
|
706
700
|
fields: {
|
|
707
701
|
meteredFeatureId: {
|
|
708
702
|
minLength: 1,
|
|
709
703
|
},
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
},
|
|
713
|
-
tierBehavior: {
|
|
714
|
-
enum: ["graduated"],
|
|
715
|
-
},
|
|
716
|
-
tiers: {
|
|
717
|
-
minItems: 1,
|
|
704
|
+
excluded: {
|
|
705
|
+
enum: [true],
|
|
718
706
|
},
|
|
719
707
|
},
|
|
720
708
|
},
|
|
721
709
|
},
|
|
722
710
|
fallback: {
|
|
723
|
-
required: ["
|
|
711
|
+
required: ["meteredFeatureId"],
|
|
724
712
|
fields: {
|
|
725
713
|
meteredFeatureId: {
|
|
726
714
|
minLength: 1,
|
|
@@ -728,9 +716,6 @@ export const LINT_RULES: LintRules = {
|
|
|
728
716
|
billingUnits: {
|
|
729
717
|
exclusiveMinimum: 0,
|
|
730
718
|
},
|
|
731
|
-
creditCost: {
|
|
732
|
-
minimum: 0,
|
|
733
|
-
},
|
|
734
719
|
},
|
|
735
720
|
},
|
|
736
721
|
},
|
|
@@ -1049,28 +1034,22 @@ export const LINT_RULES: LintRules = {
|
|
|
1049
1034
|
},
|
|
1050
1035
|
"plans.variants.customize.addItems.featureOverride.creditSchema": {
|
|
1051
1036
|
variants: {
|
|
1052
|
-
on: "
|
|
1037
|
+
on: "excluded",
|
|
1053
1038
|
byValue: {
|
|
1054
|
-
|
|
1055
|
-
required: ["
|
|
1039
|
+
true: {
|
|
1040
|
+
required: ["excluded", "meteredFeatureId"],
|
|
1056
1041
|
fields: {
|
|
1057
1042
|
meteredFeatureId: {
|
|
1058
1043
|
minLength: 1,
|
|
1059
1044
|
},
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
},
|
|
1063
|
-
tierBehavior: {
|
|
1064
|
-
enum: ["graduated"],
|
|
1065
|
-
},
|
|
1066
|
-
tiers: {
|
|
1067
|
-
minItems: 1,
|
|
1045
|
+
excluded: {
|
|
1046
|
+
enum: [true],
|
|
1068
1047
|
},
|
|
1069
1048
|
},
|
|
1070
1049
|
},
|
|
1071
1050
|
},
|
|
1072
1051
|
fallback: {
|
|
1073
|
-
required: ["
|
|
1052
|
+
required: ["meteredFeatureId"],
|
|
1074
1053
|
fields: {
|
|
1075
1054
|
meteredFeatureId: {
|
|
1076
1055
|
minLength: 1,
|
|
@@ -1078,9 +1057,6 @@ export const LINT_RULES: LintRules = {
|
|
|
1078
1057
|
billingUnits: {
|
|
1079
1058
|
exclusiveMinimum: 0,
|
|
1080
1059
|
},
|
|
1081
|
-
creditCost: {
|
|
1082
|
-
minimum: 0,
|
|
1083
|
-
},
|
|
1084
1060
|
},
|
|
1085
1061
|
},
|
|
1086
1062
|
},
|
|
@@ -1407,28 +1383,22 @@ export const LINT_RULES: LintRules = {
|
|
|
1407
1383
|
},
|
|
1408
1384
|
"plans.variants.customize.items.featureOverride.creditSchema": {
|
|
1409
1385
|
variants: {
|
|
1410
|
-
on: "
|
|
1386
|
+
on: "excluded",
|
|
1411
1387
|
byValue: {
|
|
1412
|
-
|
|
1413
|
-
required: ["
|
|
1388
|
+
true: {
|
|
1389
|
+
required: ["excluded", "meteredFeatureId"],
|
|
1414
1390
|
fields: {
|
|
1415
1391
|
meteredFeatureId: {
|
|
1416
1392
|
minLength: 1,
|
|
1417
1393
|
},
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
},
|
|
1421
|
-
tierBehavior: {
|
|
1422
|
-
enum: ["graduated"],
|
|
1423
|
-
},
|
|
1424
|
-
tiers: {
|
|
1425
|
-
minItems: 1,
|
|
1394
|
+
excluded: {
|
|
1395
|
+
enum: [true],
|
|
1426
1396
|
},
|
|
1427
1397
|
},
|
|
1428
1398
|
},
|
|
1429
1399
|
},
|
|
1430
1400
|
fallback: {
|
|
1431
|
-
required: ["
|
|
1401
|
+
required: ["meteredFeatureId"],
|
|
1432
1402
|
fields: {
|
|
1433
1403
|
meteredFeatureId: {
|
|
1434
1404
|
minLength: 1,
|
|
@@ -1436,9 +1406,6 @@ export const LINT_RULES: LintRules = {
|
|
|
1436
1406
|
billingUnits: {
|
|
1437
1407
|
exclusiveMinimum: 0,
|
|
1438
1408
|
},
|
|
1439
|
-
creditCost: {
|
|
1440
|
-
minimum: 0,
|
|
1441
|
-
},
|
|
1442
1409
|
},
|
|
1443
1410
|
},
|
|
1444
1411
|
},
|
|
@@ -1705,28 +1672,22 @@ export const LINT_RULES: LintRules = {
|
|
|
1705
1672
|
"plans.variants.customize.upsertLicenses.customize.addItems.featureOverride.creditSchema":
|
|
1706
1673
|
{
|
|
1707
1674
|
variants: {
|
|
1708
|
-
on: "
|
|
1675
|
+
on: "excluded",
|
|
1709
1676
|
byValue: {
|
|
1710
|
-
|
|
1711
|
-
required: ["
|
|
1677
|
+
true: {
|
|
1678
|
+
required: ["excluded", "meteredFeatureId"],
|
|
1712
1679
|
fields: {
|
|
1713
1680
|
meteredFeatureId: {
|
|
1714
1681
|
minLength: 1,
|
|
1715
1682
|
},
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
},
|
|
1719
|
-
tierBehavior: {
|
|
1720
|
-
enum: ["graduated"],
|
|
1721
|
-
},
|
|
1722
|
-
tiers: {
|
|
1723
|
-
minItems: 1,
|
|
1683
|
+
excluded: {
|
|
1684
|
+
enum: [true],
|
|
1724
1685
|
},
|
|
1725
1686
|
},
|
|
1726
1687
|
},
|
|
1727
1688
|
},
|
|
1728
1689
|
fallback: {
|
|
1729
|
-
required: ["
|
|
1690
|
+
required: ["meteredFeatureId"],
|
|
1730
1691
|
fields: {
|
|
1731
1692
|
meteredFeatureId: {
|
|
1732
1693
|
minLength: 1,
|
|
@@ -1734,9 +1695,6 @@ export const LINT_RULES: LintRules = {
|
|
|
1734
1695
|
billingUnits: {
|
|
1735
1696
|
exclusiveMinimum: 0,
|
|
1736
1697
|
},
|
|
1737
|
-
creditCost: {
|
|
1738
|
-
minimum: 0,
|
|
1739
|
-
},
|
|
1740
1698
|
},
|
|
1741
1699
|
},
|
|
1742
1700
|
},
|
package/src/generated/plans.ts
CHANGED
|
@@ -182,7 +182,7 @@ export type Plan = {
|
|
|
182
182
|
};
|
|
183
183
|
/** Overrides fields of this item's feature for customers on this plan (e.g. a credit system's credit_schema). */
|
|
184
184
|
featureOverride?: {
|
|
185
|
-
/** For credit system features:
|
|
185
|
+
/** For credit system features: merges into the feature's credit_schema by metered_feature_id for customers on this plan. A row with a rate overrides or adds that feature, a row with `excluded: true` removes it, and unlisted features keep the credit system's rate. */
|
|
186
186
|
creditSchema?: Array<
|
|
187
187
|
| {
|
|
188
188
|
/** ID of the metered feature that draws from this credit system. */
|
|
@@ -279,6 +279,12 @@ export type Plan = {
|
|
|
279
279
|
/** Credits consumed per billing-unit group. */
|
|
280
280
|
creditCost: number;
|
|
281
281
|
}
|
|
282
|
+
| {
|
|
283
|
+
/** ID of the metered feature to remove from the credit system. */
|
|
284
|
+
meteredFeatureId: string;
|
|
285
|
+
/** Removes this feature from the credit system for customers on this plan. Cannot be combined with a rate. */
|
|
286
|
+
excluded: true;
|
|
287
|
+
}
|
|
282
288
|
>;
|
|
283
289
|
/** For AI credit system features: replaces the feature's markup chain entirely for customers on this plan. An unset level means no markup at that level rather than inheriting the feature's. */
|
|
284
290
|
markups?: {
|
|
@@ -587,7 +593,7 @@ export type Plan = {
|
|
|
587
593
|
};
|
|
588
594
|
/** Overrides fields of this item's feature for customers on this plan (e.g. a credit system's credit_schema). */
|
|
589
595
|
featureOverride?: {
|
|
590
|
-
/** For credit system features:
|
|
596
|
+
/** For credit system features: merges into the feature's credit_schema by metered_feature_id for customers on this plan. A row with a rate overrides or adds that feature, a row with `excluded: true` removes it, and unlisted features keep the credit system's rate. */
|
|
591
597
|
creditSchema?: Array<
|
|
592
598
|
| {
|
|
593
599
|
/** ID of the metered feature that draws from this credit system. */
|
|
@@ -684,6 +690,12 @@ export type Plan = {
|
|
|
684
690
|
/** Credits consumed per billing-unit group. */
|
|
685
691
|
creditCost: number;
|
|
686
692
|
}
|
|
693
|
+
| {
|
|
694
|
+
/** ID of the metered feature to remove from the credit system. */
|
|
695
|
+
meteredFeatureId: string;
|
|
696
|
+
/** Removes this feature from the credit system for customers on this plan. Cannot be combined with a rate. */
|
|
697
|
+
excluded: true;
|
|
698
|
+
}
|
|
687
699
|
>;
|
|
688
700
|
/** For AI credit system features: replaces the feature's markup chain entirely for customers on this plan. An unset level means no markup at that level rather than inheriting the feature's. */
|
|
689
701
|
markups?: {
|
|
@@ -819,7 +831,7 @@ export type Plan = {
|
|
|
819
831
|
};
|
|
820
832
|
/** Overrides fields of this item's feature for customers on this plan (e.g. a credit system's credit_schema). */
|
|
821
833
|
featureOverride?: {
|
|
822
|
-
/** For credit system features:
|
|
834
|
+
/** For credit system features: merges into the feature's credit_schema by metered_feature_id for customers on this plan. A row with a rate overrides or adds that feature, a row with `excluded: true` removes it, and unlisted features keep the credit system's rate. */
|
|
823
835
|
creditSchema?: Array<
|
|
824
836
|
| {
|
|
825
837
|
/** ID of the metered feature that draws from this credit system. */
|
|
@@ -916,6 +928,12 @@ export type Plan = {
|
|
|
916
928
|
/** Credits consumed per billing-unit group. */
|
|
917
929
|
creditCost: number;
|
|
918
930
|
}
|
|
931
|
+
| {
|
|
932
|
+
/** ID of the metered feature to remove from the credit system. */
|
|
933
|
+
meteredFeatureId: string;
|
|
934
|
+
/** Removes this feature from the credit system for customers on this plan. Cannot be combined with a rate. */
|
|
935
|
+
excluded: true;
|
|
936
|
+
}
|
|
919
937
|
>;
|
|
920
938
|
/** For AI credit system features: replaces the feature's markup chain entirely for customers on this plan. An unset level means no markup at that level rather than inheriting the feature's. */
|
|
921
939
|
markups?: {
|
|
@@ -1204,7 +1222,7 @@ export type Plan = {
|
|
|
1204
1222
|
};
|
|
1205
1223
|
/** Overrides fields of this item's feature for customers on this plan (e.g. a credit system's credit_schema). */
|
|
1206
1224
|
featureOverride?: {
|
|
1207
|
-
/** For credit system features:
|
|
1225
|
+
/** For credit system features: merges into the feature's credit_schema by metered_feature_id for customers on this plan. A row with a rate overrides or adds that feature, a row with `excluded: true` removes it, and unlisted features keep the credit system's rate. */
|
|
1208
1226
|
creditSchema?: Array<
|
|
1209
1227
|
| {
|
|
1210
1228
|
/** ID of the metered feature that draws from this credit system. */
|
|
@@ -1301,6 +1319,12 @@ export type Plan = {
|
|
|
1301
1319
|
/** Credits consumed per billing-unit group. */
|
|
1302
1320
|
creditCost: number;
|
|
1303
1321
|
}
|
|
1322
|
+
| {
|
|
1323
|
+
/** ID of the metered feature to remove from the credit system. */
|
|
1324
|
+
meteredFeatureId: string;
|
|
1325
|
+
/** Removes this feature from the credit system for customers on this plan. Cannot be combined with a rate. */
|
|
1326
|
+
excluded: true;
|
|
1327
|
+
}
|
|
1304
1328
|
>;
|
|
1305
1329
|
/** For AI credit system features: replaces the feature's markup chain entirely for customers on this plan. An unset level means no markup at that level rather than inheriting the feature's. */
|
|
1306
1330
|
markups?: {
|
|
@@ -1499,7 +1523,7 @@ export type Plan = {
|
|
|
1499
1523
|
};
|
|
1500
1524
|
/** Overrides fields of this item's feature for customers on this plan (e.g. a credit system's credit_schema). */
|
|
1501
1525
|
featureOverride?: {
|
|
1502
|
-
/** For credit system features:
|
|
1526
|
+
/** For credit system features: merges into the feature's credit_schema by metered_feature_id for customers on this plan. A row with a rate overrides or adds that feature, a row with `excluded: true` removes it, and unlisted features keep the credit system's rate. */
|
|
1503
1527
|
creditSchema?: Array<
|
|
1504
1528
|
| {
|
|
1505
1529
|
/** ID of the metered feature that draws from this credit system. */
|
|
@@ -1596,6 +1620,12 @@ export type Plan = {
|
|
|
1596
1620
|
/** Credits consumed per billing-unit group. */
|
|
1597
1621
|
creditCost: number;
|
|
1598
1622
|
}
|
|
1623
|
+
| {
|
|
1624
|
+
/** ID of the metered feature to remove from the credit system. */
|
|
1625
|
+
meteredFeatureId: string;
|
|
1626
|
+
/** Removes this feature from the credit system for customers on this plan. Cannot be combined with a rate. */
|
|
1627
|
+
excluded: true;
|
|
1628
|
+
}
|
|
1599
1629
|
>;
|
|
1600
1630
|
/** For AI credit system features: replaces the feature's markup chain entirely for customers on this plan. An unset level means no markup at that level rather than inheriting the feature's. */
|
|
1601
1631
|
markups?: {
|