atmn 2.0.0 → 2.0.1
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 +242 -26
- package/dist/index.js +40 -0
- package/package.json +3 -2
- package/src/generated/apiRoutes.ts +164 -14
- package/src/generated/client.ts +1015 -0
- package/src/generated/emit.ts +25 -0
- package/src/generated/licenses.ts +5 -0
- package/src/generated/lintRules.ts +40 -0
- package/src/generated/plans.ts +27 -2
- package/src/generated/skills.ts +11 -11
- package/src/generated/variants.ts +16 -1
package/src/generated/emit.ts
CHANGED
|
@@ -127,6 +127,8 @@ export const COLLECTIONS: Readonly<Record<string, CollectionSpec>> = {
|
|
|
127
127
|
"billingControls.usageLimits.interval",
|
|
128
128
|
"billingControls.usageLimits.limit",
|
|
129
129
|
"freeTrial.durationLength",
|
|
130
|
+
"items.expiry.duration",
|
|
131
|
+
"items.expiry.length",
|
|
130
132
|
"items.featureId",
|
|
131
133
|
"items.featureOverride.creditSchema.creditCost",
|
|
132
134
|
"items.featureOverride.creditSchema.dimensions.*.creditCost",
|
|
@@ -153,6 +155,8 @@ export const COLLECTIONS: Readonly<Record<string, CollectionSpec>> = {
|
|
|
153
155
|
"items.reset.interval",
|
|
154
156
|
"items.rollover.expiryDurationType",
|
|
155
157
|
"items.thresholdBilling.threshold",
|
|
158
|
+
"licenses.customize.addItems.expiry.duration",
|
|
159
|
+
"licenses.customize.addItems.expiry.length",
|
|
156
160
|
"licenses.customize.addItems.featureId",
|
|
157
161
|
"licenses.customize.addItems.featureOverride.creditSchema.creditCost",
|
|
158
162
|
"licenses.customize.addItems.featureOverride.creditSchema.dimensions.*.creditCost",
|
|
@@ -194,6 +198,8 @@ export const COLLECTIONS: Readonly<Record<string, CollectionSpec>> = {
|
|
|
194
198
|
"processors.revenuecat.products.featureQuantities.featureId",
|
|
195
199
|
"processors.revenuecat.products.productId",
|
|
196
200
|
"processors.stripe.productId",
|
|
201
|
+
"variants.customize.addItems.expiry.duration",
|
|
202
|
+
"variants.customize.addItems.expiry.length",
|
|
197
203
|
"variants.customize.addItems.featureId",
|
|
198
204
|
"variants.customize.addItems.featureOverride.creditSchema.creditCost",
|
|
199
205
|
"variants.customize.addItems.featureOverride.creditSchema.dimensions.*.creditCost",
|
|
@@ -233,6 +239,8 @@ export const COLLECTIONS: Readonly<Record<string, CollectionSpec>> = {
|
|
|
233
239
|
"variants.customize.billingControls.usageLimits.interval",
|
|
234
240
|
"variants.customize.billingControls.usageLimits.limit",
|
|
235
241
|
"variants.customize.freeTrial.durationLength",
|
|
242
|
+
"variants.customize.items.expiry.duration",
|
|
243
|
+
"variants.customize.items.expiry.length",
|
|
236
244
|
"variants.customize.items.featureId",
|
|
237
245
|
"variants.customize.items.featureOverride.creditSchema.creditCost",
|
|
238
246
|
"variants.customize.items.featureOverride.creditSchema.dimensions.*.creditCost",
|
|
@@ -263,6 +271,8 @@ export const COLLECTIONS: Readonly<Record<string, CollectionSpec>> = {
|
|
|
263
271
|
"variants.customize.price.amount",
|
|
264
272
|
"variants.customize.price.interval",
|
|
265
273
|
"variants.customize.removeLicenses.licensePlanId",
|
|
274
|
+
"variants.customize.upsertLicenses.customize.addItems.expiry.duration",
|
|
275
|
+
"variants.customize.upsertLicenses.customize.addItems.expiry.length",
|
|
266
276
|
"variants.customize.upsertLicenses.customize.addItems.featureId",
|
|
267
277
|
"variants.customize.upsertLicenses.customize.addItems.featureOverride.creditSchema.creditCost",
|
|
268
278
|
"variants.customize.upsertLicenses.customize.addItems.featureOverride.creditSchema.dimensions.*.creditCost",
|
|
@@ -356,6 +366,9 @@ export const COLLECTIONS: Readonly<Record<string, CollectionSpec>> = {
|
|
|
356
366
|
"internalId",
|
|
357
367
|
"items",
|
|
358
368
|
"items.entityFeatureId",
|
|
369
|
+
"items.expiry",
|
|
370
|
+
"items.expiry.duration",
|
|
371
|
+
"items.expiry.length",
|
|
359
372
|
"items.featureId",
|
|
360
373
|
"items.featureOverride",
|
|
361
374
|
"items.featureOverride.creditSchema",
|
|
@@ -429,6 +442,9 @@ export const COLLECTIONS: Readonly<Record<string, CollectionSpec>> = {
|
|
|
429
442
|
"licenses.customize",
|
|
430
443
|
"licenses.customize.addItems",
|
|
431
444
|
"licenses.customize.addItems.entityFeatureId",
|
|
445
|
+
"licenses.customize.addItems.expiry",
|
|
446
|
+
"licenses.customize.addItems.expiry.duration",
|
|
447
|
+
"licenses.customize.addItems.expiry.length",
|
|
432
448
|
"licenses.customize.addItems.featureId",
|
|
433
449
|
"licenses.customize.addItems.featureOverride",
|
|
434
450
|
"licenses.customize.addItems.featureOverride.creditSchema",
|
|
@@ -542,6 +558,9 @@ export const COLLECTIONS: Readonly<Record<string, CollectionSpec>> = {
|
|
|
542
558
|
"variants.customize",
|
|
543
559
|
"variants.customize.addItems",
|
|
544
560
|
"variants.customize.addItems.entityFeatureId",
|
|
561
|
+
"variants.customize.addItems.expiry",
|
|
562
|
+
"variants.customize.addItems.expiry.duration",
|
|
563
|
+
"variants.customize.addItems.expiry.length",
|
|
545
564
|
"variants.customize.addItems.featureId",
|
|
546
565
|
"variants.customize.addItems.featureOverride",
|
|
547
566
|
"variants.customize.addItems.featureOverride.creditSchema",
|
|
@@ -653,6 +672,9 @@ export const COLLECTIONS: Readonly<Record<string, CollectionSpec>> = {
|
|
|
653
672
|
"variants.customize.freeTrial.onEnd",
|
|
654
673
|
"variants.customize.items",
|
|
655
674
|
"variants.customize.items.entityFeatureId",
|
|
675
|
+
"variants.customize.items.expiry",
|
|
676
|
+
"variants.customize.items.expiry.duration",
|
|
677
|
+
"variants.customize.items.expiry.length",
|
|
656
678
|
"variants.customize.items.featureId",
|
|
657
679
|
"variants.customize.items.featureOverride",
|
|
658
680
|
"variants.customize.items.featureOverride.creditSchema",
|
|
@@ -738,6 +760,9 @@ export const COLLECTIONS: Readonly<Record<string, CollectionSpec>> = {
|
|
|
738
760
|
"variants.customize.upsertLicenses.customize",
|
|
739
761
|
"variants.customize.upsertLicenses.customize.addItems",
|
|
740
762
|
"variants.customize.upsertLicenses.customize.addItems.entityFeatureId",
|
|
763
|
+
"variants.customize.upsertLicenses.customize.addItems.expiry",
|
|
764
|
+
"variants.customize.upsertLicenses.customize.addItems.expiry.duration",
|
|
765
|
+
"variants.customize.upsertLicenses.customize.addItems.expiry.length",
|
|
741
766
|
"variants.customize.upsertLicenses.customize.addItems.featureId",
|
|
742
767
|
"variants.customize.upsertLicenses.customize.addItems.featureOverride",
|
|
743
768
|
"variants.customize.upsertLicenses.customize.addItems.featureOverride.creditSchema",
|
|
@@ -129,6 +129,11 @@ export type License = {
|
|
|
129
129
|
/** Number of periods before expiry. */
|
|
130
130
|
expiryDurationLength?: number;
|
|
131
131
|
};
|
|
132
|
+
/** Purchased units expire this long after each purchase. One-off prepaid consumable items only. */
|
|
133
|
+
expiry?: {
|
|
134
|
+
duration: "day" | "week" | "month" | "year";
|
|
135
|
+
length: number;
|
|
136
|
+
};
|
|
132
137
|
/** Overrides fields of this item's feature for customers on this plan (e.g. a credit system's credit_schema). */
|
|
133
138
|
featureOverride?: {
|
|
134
139
|
/** For credit system features: replaces the feature's credit_schema entirely for customers on this plan. */
|
|
@@ -399,6 +399,14 @@ export const LINT_RULES: LintRules = {
|
|
|
399
399
|
},
|
|
400
400
|
],
|
|
401
401
|
},
|
|
402
|
+
"plans.items.expiry": {
|
|
403
|
+
required: ["duration", "length"],
|
|
404
|
+
fields: {
|
|
405
|
+
duration: {
|
|
406
|
+
enum: ["day", "week", "month", "year"],
|
|
407
|
+
},
|
|
408
|
+
},
|
|
409
|
+
},
|
|
402
410
|
"plans.items.featureOverride.creditSchema": {
|
|
403
411
|
variants: {
|
|
404
412
|
on: "tierBehavior",
|
|
@@ -661,6 +669,14 @@ export const LINT_RULES: LintRules = {
|
|
|
661
669
|
},
|
|
662
670
|
},
|
|
663
671
|
},
|
|
672
|
+
"plans.licenses.customize.addItems.expiry": {
|
|
673
|
+
required: ["duration", "length"],
|
|
674
|
+
fields: {
|
|
675
|
+
duration: {
|
|
676
|
+
enum: ["day", "week", "month", "year"],
|
|
677
|
+
},
|
|
678
|
+
},
|
|
679
|
+
},
|
|
664
680
|
"plans.licenses.customize.addItems.featureOverride.creditSchema": {
|
|
665
681
|
variants: {
|
|
666
682
|
on: "tierBehavior",
|
|
@@ -1052,6 +1068,14 @@ export const LINT_RULES: LintRules = {
|
|
|
1052
1068
|
},
|
|
1053
1069
|
},
|
|
1054
1070
|
},
|
|
1071
|
+
"plans.variants.customize.addItems.expiry": {
|
|
1072
|
+
required: ["duration", "length"],
|
|
1073
|
+
fields: {
|
|
1074
|
+
duration: {
|
|
1075
|
+
enum: ["day", "week", "month", "year"],
|
|
1076
|
+
},
|
|
1077
|
+
},
|
|
1078
|
+
},
|
|
1055
1079
|
"plans.variants.customize.addItems.featureOverride.creditSchema": {
|
|
1056
1080
|
variants: {
|
|
1057
1081
|
on: "tierBehavior",
|
|
@@ -1394,6 +1418,14 @@ export const LINT_RULES: LintRules = {
|
|
|
1394
1418
|
},
|
|
1395
1419
|
},
|
|
1396
1420
|
},
|
|
1421
|
+
"plans.variants.customize.items.expiry": {
|
|
1422
|
+
required: ["duration", "length"],
|
|
1423
|
+
fields: {
|
|
1424
|
+
duration: {
|
|
1425
|
+
enum: ["day", "week", "month", "year"],
|
|
1426
|
+
},
|
|
1427
|
+
},
|
|
1428
|
+
},
|
|
1397
1429
|
"plans.variants.customize.items.featureOverride.creditSchema": {
|
|
1398
1430
|
variants: {
|
|
1399
1431
|
on: "tierBehavior",
|
|
@@ -1683,6 +1715,14 @@ export const LINT_RULES: LintRules = {
|
|
|
1683
1715
|
},
|
|
1684
1716
|
},
|
|
1685
1717
|
},
|
|
1718
|
+
"plans.variants.customize.upsertLicenses.customize.addItems.expiry": {
|
|
1719
|
+
required: ["duration", "length"],
|
|
1720
|
+
fields: {
|
|
1721
|
+
duration: {
|
|
1722
|
+
enum: ["day", "week", "month", "year"],
|
|
1723
|
+
},
|
|
1724
|
+
},
|
|
1725
|
+
},
|
|
1686
1726
|
"plans.variants.customize.upsertLicenses.customize.addItems.featureOverride.creditSchema":
|
|
1687
1727
|
{
|
|
1688
1728
|
variants: {
|
package/src/generated/plans.ts
CHANGED
|
@@ -16,7 +16,7 @@ export type Plan = {
|
|
|
16
16
|
addOn?: boolean;
|
|
17
17
|
/** Whether the plan is automatically enabled for new customers. Defaults to false. */
|
|
18
18
|
autoEnable?: boolean;
|
|
19
|
-
/** Archive or
|
|
19
|
+
/** Archive this plan. Omitted or false means the stated plan is live. */
|
|
20
20
|
archived?: boolean;
|
|
21
21
|
/** Take the active pointer. On `new_version`, omit to mint a draft; `true` promotes the minted row immediately. */
|
|
22
22
|
active: boolean;
|
|
@@ -174,6 +174,11 @@ export type Plan = {
|
|
|
174
174
|
/** Number of periods before expiry. */
|
|
175
175
|
expiryDurationLength?: number;
|
|
176
176
|
};
|
|
177
|
+
/** Purchased units expire this long after each purchase. One-off prepaid consumable items only. */
|
|
178
|
+
expiry?: {
|
|
179
|
+
duration: "day" | "week" | "month" | "year";
|
|
180
|
+
length: number;
|
|
181
|
+
};
|
|
177
182
|
/** Overrides fields of this item's feature for customers on this plan (e.g. a credit system's credit_schema). */
|
|
178
183
|
featureOverride?: {
|
|
179
184
|
/** For credit system features: replaces the feature's credit_schema entirely for customers on this plan. */
|
|
@@ -420,7 +425,7 @@ export type Plan = {
|
|
|
420
425
|
versionSlug?: string;
|
|
421
426
|
/** Display name when creating the variant if it does not exist. */
|
|
422
427
|
name: string;
|
|
423
|
-
/** Archive
|
|
428
|
+
/** Archive this variant. Omitted or false means the stated variant is live. */
|
|
424
429
|
archived?: boolean;
|
|
425
430
|
/** Slug for the row this variant mints. Omit to inherit the base's `new_version_slug`, then `v{n}`. Ignored when this entry resolves to an existing row. */
|
|
426
431
|
newVersionSlug?: string;
|
|
@@ -573,6 +578,11 @@ export type Plan = {
|
|
|
573
578
|
/** Number of periods before expiry. */
|
|
574
579
|
expiryDurationLength?: number;
|
|
575
580
|
};
|
|
581
|
+
/** Purchased units expire this long after each purchase. One-off prepaid consumable items only. */
|
|
582
|
+
expiry?: {
|
|
583
|
+
duration: "day" | "week" | "month" | "year";
|
|
584
|
+
length: number;
|
|
585
|
+
};
|
|
576
586
|
/** Overrides fields of this item's feature for customers on this plan (e.g. a credit system's credit_schema). */
|
|
577
587
|
featureOverride?: {
|
|
578
588
|
/** For credit system features: replaces the feature's credit_schema entirely for customers on this plan. */
|
|
@@ -799,6 +809,11 @@ export type Plan = {
|
|
|
799
809
|
/** Number of periods before expiry. */
|
|
800
810
|
expiryDurationLength?: number;
|
|
801
811
|
};
|
|
812
|
+
/** Purchased units expire this long after each purchase. One-off prepaid consumable items only. */
|
|
813
|
+
expiry?: {
|
|
814
|
+
duration: "day" | "week" | "month" | "year";
|
|
815
|
+
length: number;
|
|
816
|
+
};
|
|
802
817
|
/** Overrides fields of this item's feature for customers on this plan (e.g. a credit system's credit_schema). */
|
|
803
818
|
featureOverride?: {
|
|
804
819
|
/** For credit system features: replaces the feature's credit_schema entirely for customers on this plan. */
|
|
@@ -1178,6 +1193,11 @@ export type Plan = {
|
|
|
1178
1193
|
/** Number of periods before expiry. */
|
|
1179
1194
|
expiryDurationLength?: number;
|
|
1180
1195
|
};
|
|
1196
|
+
/** Purchased units expire this long after each purchase. One-off prepaid consumable items only. */
|
|
1197
|
+
expiry?: {
|
|
1198
|
+
duration: "day" | "week" | "month" | "year";
|
|
1199
|
+
length: number;
|
|
1200
|
+
};
|
|
1181
1201
|
/** Overrides fields of this item's feature for customers on this plan (e.g. a credit system's credit_schema). */
|
|
1182
1202
|
featureOverride?: {
|
|
1183
1203
|
/** For credit system features: replaces the feature's credit_schema entirely for customers on this plan. */
|
|
@@ -1467,6 +1487,11 @@ export type Plan = {
|
|
|
1467
1487
|
/** Number of periods before expiry. */
|
|
1468
1488
|
expiryDurationLength?: number;
|
|
1469
1489
|
};
|
|
1490
|
+
/** Purchased units expire this long after each purchase. One-off prepaid consumable items only. */
|
|
1491
|
+
expiry?: {
|
|
1492
|
+
duration: "day" | "week" | "month" | "year";
|
|
1493
|
+
length: number;
|
|
1494
|
+
};
|
|
1470
1495
|
/** Overrides fields of this item's feature for customers on this plan (e.g. a credit system's credit_schema). */
|
|
1471
1496
|
featureOverride?: {
|
|
1472
1497
|
/** For credit system features: replaces the feature's credit_schema entirely for customers on this plan. */
|