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/dist/bin.js
CHANGED
|
@@ -1081,6 +1081,27 @@ var API_ROUTES = [
|
|
|
1081
1081
|
}
|
|
1082
1082
|
]
|
|
1083
1083
|
},
|
|
1084
|
+
{
|
|
1085
|
+
group: "billing",
|
|
1086
|
+
method: "advance_test_clock",
|
|
1087
|
+
path: "/v1/billing.advance_test_clock",
|
|
1088
|
+
description: "Advance a customer's Stripe test clock to a future time in milliseconds. Only Stripe test-mode customers with a test clock are supported. Advancement is asynchronous; Stripe enforces clock status and advancement limits.",
|
|
1089
|
+
body: "object",
|
|
1090
|
+
fields: [
|
|
1091
|
+
{
|
|
1092
|
+
name: "customer_id",
|
|
1093
|
+
type: "string",
|
|
1094
|
+
required: true,
|
|
1095
|
+
description: "The ID of the customer whose Stripe test clock to advance."
|
|
1096
|
+
},
|
|
1097
|
+
{
|
|
1098
|
+
name: "frozen_time",
|
|
1099
|
+
type: "number",
|
|
1100
|
+
required: true,
|
|
1101
|
+
description: "Target time as a Unix timestamp in milliseconds. Rounded down to whole seconds; must be later than the current clock time."
|
|
1102
|
+
}
|
|
1103
|
+
]
|
|
1104
|
+
},
|
|
1084
1105
|
{
|
|
1085
1106
|
group: "billing",
|
|
1086
1107
|
method: "create_schedule",
|
|
@@ -1678,6 +1699,12 @@ var API_ROUTES = [
|
|
|
1678
1699
|
required: false,
|
|
1679
1700
|
description: "List of discounts to apply. Each discount can be an Autumn reward ID, Stripe coupon ID, or Stripe promotion code."
|
|
1680
1701
|
},
|
|
1702
|
+
{
|
|
1703
|
+
name: "custom_line_items",
|
|
1704
|
+
type: "json",
|
|
1705
|
+
required: false,
|
|
1706
|
+
description: "Custom line items that replace the auto-generated proration invoice, or bill a standalone invoice when nothing else changes. Only valid on an existing recurring subscription."
|
|
1707
|
+
},
|
|
1681
1708
|
{
|
|
1682
1709
|
name: "cancel_action",
|
|
1683
1710
|
type: "string",
|
|
@@ -1725,12 +1752,6 @@ var API_ROUTES = [
|
|
|
1725
1752
|
type: "json",
|
|
1726
1753
|
required: false,
|
|
1727
1754
|
description: "Total seat quantities (inclusive of the license's included count) per license plan offered by this plan. Licenses not listed keep their current paid quantity."
|
|
1728
|
-
},
|
|
1729
|
-
{
|
|
1730
|
-
name: "custom_line_items",
|
|
1731
|
-
type: "json",
|
|
1732
|
-
required: false,
|
|
1733
|
-
description: "Custom line items that replace the auto-generated proration invoice, or bill a standalone invoice when nothing else changes. Only valid on an existing recurring subscription."
|
|
1734
1755
|
}
|
|
1735
1756
|
]
|
|
1736
1757
|
},
|
|
@@ -1813,6 +1834,12 @@ var API_ROUTES = [
|
|
|
1813
1834
|
required: false,
|
|
1814
1835
|
description: "List of discounts to apply. Each discount can be an Autumn reward ID, Stripe coupon ID, or Stripe promotion code."
|
|
1815
1836
|
},
|
|
1837
|
+
{
|
|
1838
|
+
name: "custom_line_items",
|
|
1839
|
+
type: "json",
|
|
1840
|
+
required: false,
|
|
1841
|
+
description: "Custom line items that replace the auto-generated proration invoice, or bill a standalone invoice when nothing else changes. Only valid on an existing recurring subscription."
|
|
1842
|
+
},
|
|
1816
1843
|
{
|
|
1817
1844
|
name: "cancel_action",
|
|
1818
1845
|
type: "string",
|
|
@@ -1860,12 +1887,6 @@ var API_ROUTES = [
|
|
|
1860
1887
|
type: "json",
|
|
1861
1888
|
required: false,
|
|
1862
1889
|
description: "Total seat quantities (inclusive of the license's included count) per license plan offered by this plan. Licenses not listed keep their current paid quantity."
|
|
1863
|
-
},
|
|
1864
|
-
{
|
|
1865
|
-
name: "custom_line_items",
|
|
1866
|
-
type: "json",
|
|
1867
|
-
required: false,
|
|
1868
|
-
description: "Custom line items that replace the auto-generated proration invoice, or bill a standalone invoice when nothing else changes. Only valid on an existing recurring subscription."
|
|
1869
1890
|
}
|
|
1870
1891
|
]
|
|
1871
1892
|
},
|
|
@@ -2746,6 +2767,74 @@ var API_ROUTES = [
|
|
|
2746
2767
|
}
|
|
2747
2768
|
]
|
|
2748
2769
|
},
|
|
2770
|
+
{
|
|
2771
|
+
group: "invoices",
|
|
2772
|
+
method: "create",
|
|
2773
|
+
path: "/v1/invoices.create",
|
|
2774
|
+
description: "Creates a standalone send-invoice Stripe invoice from catalog pricing and custom charges. Quantities are billable units, exclusive of any included usage; Autumn applies billing units and tiers. Nothing about the customer's plans, balances or subscriptions changes. Pass preview: true to get the calculated lines and totals without creating an invoice.",
|
|
2775
|
+
body: "object",
|
|
2776
|
+
fields: [
|
|
2777
|
+
{
|
|
2778
|
+
name: "customer_id",
|
|
2779
|
+
type: "string",
|
|
2780
|
+
required: true,
|
|
2781
|
+
description: "The customer to invoice."
|
|
2782
|
+
},
|
|
2783
|
+
{
|
|
2784
|
+
name: "plans",
|
|
2785
|
+
type: "json",
|
|
2786
|
+
required: false
|
|
2787
|
+
},
|
|
2788
|
+
{
|
|
2789
|
+
name: "custom_line_items",
|
|
2790
|
+
type: "json",
|
|
2791
|
+
required: false,
|
|
2792
|
+
description: "Charges that are not tied to any plan or feature."
|
|
2793
|
+
},
|
|
2794
|
+
{
|
|
2795
|
+
name: "discounts",
|
|
2796
|
+
type: "json",
|
|
2797
|
+
required: false,
|
|
2798
|
+
description: "Discounts applied to the whole invoice."
|
|
2799
|
+
},
|
|
2800
|
+
{
|
|
2801
|
+
name: "invoice_template_id",
|
|
2802
|
+
type: "string",
|
|
2803
|
+
required: false,
|
|
2804
|
+
description: "ID of an invoice template whose footer, memo and default payment terms are applied."
|
|
2805
|
+
},
|
|
2806
|
+
{
|
|
2807
|
+
name: "net_terms_days",
|
|
2808
|
+
type: "number",
|
|
2809
|
+
required: false,
|
|
2810
|
+
description: "Days until the invoice is due. Defaults to the template's terms, then the org default."
|
|
2811
|
+
},
|
|
2812
|
+
{
|
|
2813
|
+
name: "tax_rate_id",
|
|
2814
|
+
type: "string",
|
|
2815
|
+
required: false,
|
|
2816
|
+
description: "Stripe tax rate ID (txr_...) applied to every line."
|
|
2817
|
+
},
|
|
2818
|
+
{
|
|
2819
|
+
name: "period_start",
|
|
2820
|
+
type: "number",
|
|
2821
|
+
required: false,
|
|
2822
|
+
description: "Start of the period being invoiced, in milliseconds. Prorated lines are charged for period_start → period_end against one price interval starting at period_start."
|
|
2823
|
+
},
|
|
2824
|
+
{
|
|
2825
|
+
name: "period_end",
|
|
2826
|
+
type: "number",
|
|
2827
|
+
required: false,
|
|
2828
|
+
description: "End of the period being invoiced, in milliseconds."
|
|
2829
|
+
},
|
|
2830
|
+
{
|
|
2831
|
+
name: "preview",
|
|
2832
|
+
type: "boolean",
|
|
2833
|
+
required: false,
|
|
2834
|
+
description: "If true, returns the calculated lines and totals without creating an invoice."
|
|
2835
|
+
}
|
|
2836
|
+
]
|
|
2837
|
+
},
|
|
2749
2838
|
{
|
|
2750
2839
|
group: "invoices",
|
|
2751
2840
|
method: "insert",
|
|
@@ -2821,6 +2910,54 @@ var API_ROUTES = [
|
|
|
2821
2910
|
}
|
|
2822
2911
|
]
|
|
2823
2912
|
},
|
|
2913
|
+
{
|
|
2914
|
+
group: "invoices",
|
|
2915
|
+
method: "reissue",
|
|
2916
|
+
path: "/v1/invoices.reissue",
|
|
2917
|
+
description: "Voids an open send-invoice Stripe invoice and issues a replacement with the same line items. An invoice template can supply the replacement's footer (e.g. bank details) and memo. The replacement keeps the original due date unless net_terms_days is passed, which is required once the original is past due. Pass update_customer_email to change the customer's billing email first so the replacement is sent there. The replacement stays linked to the same subscription and fulfils the same pending plan when paid.",
|
|
2918
|
+
body: "object",
|
|
2919
|
+
fields: [
|
|
2920
|
+
{
|
|
2921
|
+
name: "invoice_id",
|
|
2922
|
+
type: "string",
|
|
2923
|
+
required: true,
|
|
2924
|
+
description: "The Autumn invoice ID to void and replace."
|
|
2925
|
+
},
|
|
2926
|
+
{
|
|
2927
|
+
name: "invoice_template_id",
|
|
2928
|
+
type: "string",
|
|
2929
|
+
required: false,
|
|
2930
|
+
description: "ID of an invoice template (configured in billing settings) whose footer and memo are applied to the replacement invoice."
|
|
2931
|
+
},
|
|
2932
|
+
{
|
|
2933
|
+
name: "net_terms_days",
|
|
2934
|
+
type: "number",
|
|
2935
|
+
required: false,
|
|
2936
|
+
description: "Number of days the customer has to pay the replacement invoice. Defaults to the original invoice's due date; required when that date has already passed."
|
|
2937
|
+
},
|
|
2938
|
+
{
|
|
2939
|
+
name: "update_customer_email",
|
|
2940
|
+
type: "string",
|
|
2941
|
+
required: false,
|
|
2942
|
+
description: "Updates the customer's billing email before the replacement is issued, so Stripe sends the new invoice to this address."
|
|
2943
|
+
}
|
|
2944
|
+
]
|
|
2945
|
+
},
|
|
2946
|
+
{
|
|
2947
|
+
group: "invoices",
|
|
2948
|
+
method: "void",
|
|
2949
|
+
path: "/v1/invoices.void",
|
|
2950
|
+
description: "Voids an open or uncollectible Stripe invoice. Any plan still waiting on the invoice to be paid expires. Voiding an unpaid subscription invoice lets Stripe re-derive the subscription status from its remaining invoices, which can move a past-due subscription back to active. Already-void invoices are returned unchanged.",
|
|
2951
|
+
body: "object",
|
|
2952
|
+
fields: [
|
|
2953
|
+
{
|
|
2954
|
+
name: "invoice_id",
|
|
2955
|
+
type: "string",
|
|
2956
|
+
required: true,
|
|
2957
|
+
description: "The Autumn invoice ID to void."
|
|
2958
|
+
}
|
|
2959
|
+
]
|
|
2960
|
+
},
|
|
2824
2961
|
{
|
|
2825
2962
|
group: "licenses",
|
|
2826
2963
|
method: "attach",
|
|
@@ -3944,6 +4081,14 @@ var LINT_RULES = {
|
|
|
3944
4081
|
}
|
|
3945
4082
|
]
|
|
3946
4083
|
},
|
|
4084
|
+
"plans.items.expiry": {
|
|
4085
|
+
required: ["duration", "length"],
|
|
4086
|
+
fields: {
|
|
4087
|
+
duration: {
|
|
4088
|
+
enum: ["day", "week", "month", "year"]
|
|
4089
|
+
}
|
|
4090
|
+
}
|
|
4091
|
+
},
|
|
3947
4092
|
"plans.items.featureOverride.creditSchema": {
|
|
3948
4093
|
variants: {
|
|
3949
4094
|
on: "tierBehavior",
|
|
@@ -4206,6 +4351,14 @@ var LINT_RULES = {
|
|
|
4206
4351
|
}
|
|
4207
4352
|
}
|
|
4208
4353
|
},
|
|
4354
|
+
"plans.licenses.customize.addItems.expiry": {
|
|
4355
|
+
required: ["duration", "length"],
|
|
4356
|
+
fields: {
|
|
4357
|
+
duration: {
|
|
4358
|
+
enum: ["day", "week", "month", "year"]
|
|
4359
|
+
}
|
|
4360
|
+
}
|
|
4361
|
+
},
|
|
4209
4362
|
"plans.licenses.customize.addItems.featureOverride.creditSchema": {
|
|
4210
4363
|
variants: {
|
|
4211
4364
|
on: "tierBehavior",
|
|
@@ -4592,6 +4745,14 @@ var LINT_RULES = {
|
|
|
4592
4745
|
}
|
|
4593
4746
|
}
|
|
4594
4747
|
},
|
|
4748
|
+
"plans.variants.customize.addItems.expiry": {
|
|
4749
|
+
required: ["duration", "length"],
|
|
4750
|
+
fields: {
|
|
4751
|
+
duration: {
|
|
4752
|
+
enum: ["day", "week", "month", "year"]
|
|
4753
|
+
}
|
|
4754
|
+
}
|
|
4755
|
+
},
|
|
4595
4756
|
"plans.variants.customize.addItems.featureOverride.creditSchema": {
|
|
4596
4757
|
variants: {
|
|
4597
4758
|
on: "tierBehavior",
|
|
@@ -4929,6 +5090,14 @@ var LINT_RULES = {
|
|
|
4929
5090
|
}
|
|
4930
5091
|
}
|
|
4931
5092
|
},
|
|
5093
|
+
"plans.variants.customize.items.expiry": {
|
|
5094
|
+
required: ["duration", "length"],
|
|
5095
|
+
fields: {
|
|
5096
|
+
duration: {
|
|
5097
|
+
enum: ["day", "week", "month", "year"]
|
|
5098
|
+
}
|
|
5099
|
+
}
|
|
5100
|
+
},
|
|
4932
5101
|
"plans.variants.customize.items.featureOverride.creditSchema": {
|
|
4933
5102
|
variants: {
|
|
4934
5103
|
on: "tierBehavior",
|
|
@@ -5217,6 +5386,14 @@ var LINT_RULES = {
|
|
|
5217
5386
|
}
|
|
5218
5387
|
}
|
|
5219
5388
|
},
|
|
5389
|
+
"plans.variants.customize.upsertLicenses.customize.addItems.expiry": {
|
|
5390
|
+
required: ["duration", "length"],
|
|
5391
|
+
fields: {
|
|
5392
|
+
duration: {
|
|
5393
|
+
enum: ["day", "week", "month", "year"]
|
|
5394
|
+
}
|
|
5395
|
+
}
|
|
5396
|
+
},
|
|
5220
5397
|
"plans.variants.customize.upsertLicenses.customize.addItems.featureOverride.creditSchema": {
|
|
5221
5398
|
variants: {
|
|
5222
5399
|
on: "tierBehavior",
|
|
@@ -6610,7 +6787,7 @@ var createClient = (options) => ({
|
|
|
6610
6787
|
});
|
|
6611
6788
|
|
|
6612
6789
|
// src/version.ts
|
|
6613
|
-
var version = "2.0.
|
|
6790
|
+
var version = "2.0.1";
|
|
6614
6791
|
|
|
6615
6792
|
// src/http/autumnFetch.ts
|
|
6616
6793
|
var runtime = typeof Bun !== "undefined" ? `bun ${Bun.version}` : `node ${process.versions.node}`;
|
|
@@ -7668,6 +7845,8 @@ var COLLECTIONS = {
|
|
|
7668
7845
|
"billingControls.usageLimits.interval",
|
|
7669
7846
|
"billingControls.usageLimits.limit",
|
|
7670
7847
|
"freeTrial.durationLength",
|
|
7848
|
+
"items.expiry.duration",
|
|
7849
|
+
"items.expiry.length",
|
|
7671
7850
|
"items.featureId",
|
|
7672
7851
|
"items.featureOverride.creditSchema.creditCost",
|
|
7673
7852
|
"items.featureOverride.creditSchema.dimensions.*.creditCost",
|
|
@@ -7694,6 +7873,8 @@ var COLLECTIONS = {
|
|
|
7694
7873
|
"items.reset.interval",
|
|
7695
7874
|
"items.rollover.expiryDurationType",
|
|
7696
7875
|
"items.thresholdBilling.threshold",
|
|
7876
|
+
"licenses.customize.addItems.expiry.duration",
|
|
7877
|
+
"licenses.customize.addItems.expiry.length",
|
|
7697
7878
|
"licenses.customize.addItems.featureId",
|
|
7698
7879
|
"licenses.customize.addItems.featureOverride.creditSchema.creditCost",
|
|
7699
7880
|
"licenses.customize.addItems.featureOverride.creditSchema.dimensions.*.creditCost",
|
|
@@ -7735,6 +7916,8 @@ var COLLECTIONS = {
|
|
|
7735
7916
|
"processors.revenuecat.products.featureQuantities.featureId",
|
|
7736
7917
|
"processors.revenuecat.products.productId",
|
|
7737
7918
|
"processors.stripe.productId",
|
|
7919
|
+
"variants.customize.addItems.expiry.duration",
|
|
7920
|
+
"variants.customize.addItems.expiry.length",
|
|
7738
7921
|
"variants.customize.addItems.featureId",
|
|
7739
7922
|
"variants.customize.addItems.featureOverride.creditSchema.creditCost",
|
|
7740
7923
|
"variants.customize.addItems.featureOverride.creditSchema.dimensions.*.creditCost",
|
|
@@ -7774,6 +7957,8 @@ var COLLECTIONS = {
|
|
|
7774
7957
|
"variants.customize.billingControls.usageLimits.interval",
|
|
7775
7958
|
"variants.customize.billingControls.usageLimits.limit",
|
|
7776
7959
|
"variants.customize.freeTrial.durationLength",
|
|
7960
|
+
"variants.customize.items.expiry.duration",
|
|
7961
|
+
"variants.customize.items.expiry.length",
|
|
7777
7962
|
"variants.customize.items.featureId",
|
|
7778
7963
|
"variants.customize.items.featureOverride.creditSchema.creditCost",
|
|
7779
7964
|
"variants.customize.items.featureOverride.creditSchema.dimensions.*.creditCost",
|
|
@@ -7804,6 +7989,8 @@ var COLLECTIONS = {
|
|
|
7804
7989
|
"variants.customize.price.amount",
|
|
7805
7990
|
"variants.customize.price.interval",
|
|
7806
7991
|
"variants.customize.removeLicenses.licensePlanId",
|
|
7992
|
+
"variants.customize.upsertLicenses.customize.addItems.expiry.duration",
|
|
7993
|
+
"variants.customize.upsertLicenses.customize.addItems.expiry.length",
|
|
7807
7994
|
"variants.customize.upsertLicenses.customize.addItems.featureId",
|
|
7808
7995
|
"variants.customize.upsertLicenses.customize.addItems.featureOverride.creditSchema.creditCost",
|
|
7809
7996
|
"variants.customize.upsertLicenses.customize.addItems.featureOverride.creditSchema.dimensions.*.creditCost",
|
|
@@ -7897,6 +8084,9 @@ var COLLECTIONS = {
|
|
|
7897
8084
|
"internalId",
|
|
7898
8085
|
"items",
|
|
7899
8086
|
"items.entityFeatureId",
|
|
8087
|
+
"items.expiry",
|
|
8088
|
+
"items.expiry.duration",
|
|
8089
|
+
"items.expiry.length",
|
|
7900
8090
|
"items.featureId",
|
|
7901
8091
|
"items.featureOverride",
|
|
7902
8092
|
"items.featureOverride.creditSchema",
|
|
@@ -7970,6 +8160,9 @@ var COLLECTIONS = {
|
|
|
7970
8160
|
"licenses.customize",
|
|
7971
8161
|
"licenses.customize.addItems",
|
|
7972
8162
|
"licenses.customize.addItems.entityFeatureId",
|
|
8163
|
+
"licenses.customize.addItems.expiry",
|
|
8164
|
+
"licenses.customize.addItems.expiry.duration",
|
|
8165
|
+
"licenses.customize.addItems.expiry.length",
|
|
7973
8166
|
"licenses.customize.addItems.featureId",
|
|
7974
8167
|
"licenses.customize.addItems.featureOverride",
|
|
7975
8168
|
"licenses.customize.addItems.featureOverride.creditSchema",
|
|
@@ -8083,6 +8276,9 @@ var COLLECTIONS = {
|
|
|
8083
8276
|
"variants.customize",
|
|
8084
8277
|
"variants.customize.addItems",
|
|
8085
8278
|
"variants.customize.addItems.entityFeatureId",
|
|
8279
|
+
"variants.customize.addItems.expiry",
|
|
8280
|
+
"variants.customize.addItems.expiry.duration",
|
|
8281
|
+
"variants.customize.addItems.expiry.length",
|
|
8086
8282
|
"variants.customize.addItems.featureId",
|
|
8087
8283
|
"variants.customize.addItems.featureOverride",
|
|
8088
8284
|
"variants.customize.addItems.featureOverride.creditSchema",
|
|
@@ -8194,6 +8390,9 @@ var COLLECTIONS = {
|
|
|
8194
8390
|
"variants.customize.freeTrial.onEnd",
|
|
8195
8391
|
"variants.customize.items",
|
|
8196
8392
|
"variants.customize.items.entityFeatureId",
|
|
8393
|
+
"variants.customize.items.expiry",
|
|
8394
|
+
"variants.customize.items.expiry.duration",
|
|
8395
|
+
"variants.customize.items.expiry.length",
|
|
8197
8396
|
"variants.customize.items.featureId",
|
|
8198
8397
|
"variants.customize.items.featureOverride",
|
|
8199
8398
|
"variants.customize.items.featureOverride.creditSchema",
|
|
@@ -8279,6 +8478,9 @@ var COLLECTIONS = {
|
|
|
8279
8478
|
"variants.customize.upsertLicenses.customize",
|
|
8280
8479
|
"variants.customize.upsertLicenses.customize.addItems",
|
|
8281
8480
|
"variants.customize.upsertLicenses.customize.addItems.entityFeatureId",
|
|
8481
|
+
"variants.customize.upsertLicenses.customize.addItems.expiry",
|
|
8482
|
+
"variants.customize.upsertLicenses.customize.addItems.expiry.duration",
|
|
8483
|
+
"variants.customize.upsertLicenses.customize.addItems.expiry.length",
|
|
8282
8484
|
"variants.customize.upsertLicenses.customize.addItems.featureId",
|
|
8283
8485
|
"variants.customize.upsertLicenses.customize.addItems.featureOverride",
|
|
8284
8486
|
"variants.customize.upsertLicenses.customize.addItems.featureOverride.creditSchema",
|
|
@@ -8786,16 +8988,16 @@ import { dirname as dirname4, join as join7 } from "node:path";
|
|
|
8786
8988
|
import chalk3 from "chalk";
|
|
8787
8989
|
|
|
8788
8990
|
// src/generated/skills.ts
|
|
8789
|
-
var SKILLS_VERSION = "2.0.
|
|
8991
|
+
var SKILLS_VERSION = "2.0.1";
|
|
8790
8992
|
var SKILLS = [
|
|
8791
8993
|
{
|
|
8792
8994
|
name: "autumn-setup",
|
|
8793
8995
|
description: "First-time Autumn setup — install the atmn CLI, connect to an org (sign in, or keyless with no account), turn the user's pricing into autumn.config.ts, and push it to a sandbox org. Use when the user is new to Autumn, pastes an Autumn setup prompt, or asks to set up Autumn, add billing, monetization, subscriptions, usage-based billing, pricing, or plans. If Autumn is already set up, use autumn-catalog instead.",
|
|
8794
|
-
version: "2.0.
|
|
8996
|
+
version: "2.0.1",
|
|
8795
8997
|
markdown: `---
|
|
8796
8998
|
name: autumn-setup
|
|
8797
8999
|
description: First-time Autumn setup — install the atmn CLI, connect to an org (sign in, or keyless with no account), turn the user's pricing into autumn.config.ts, and push it to a sandbox org. Use when the user is new to Autumn, pastes an Autumn setup prompt, or asks to set up Autumn, add billing, monetization, subscriptions, usage-based billing, pricing, or plans. If Autumn is already set up, use autumn-catalog instead.
|
|
8798
|
-
version: 2.0.
|
|
9000
|
+
version: 2.0.1
|
|
8799
9001
|
---
|
|
8800
9002
|
|
|
8801
9003
|
# Setup
|
|
@@ -8953,11 +9155,11 @@ Then stop. Don't keep building, don't tour the dashboard, don't deploy anything.
|
|
|
8953
9155
|
{
|
|
8954
9156
|
name: "autumn-catalog",
|
|
8955
9157
|
description: "Modeling a user's pricing into an Autumn catalog — deciding the structure (plans, variants, add-ons, licenses, credit systems, pooled balances) before writing config, then filling in the numbers. Use when the user describes their pricing or asks to model, change, or push a catalog.",
|
|
8956
|
-
version: "2.0.
|
|
9158
|
+
version: "2.0.1",
|
|
8957
9159
|
markdown: `---
|
|
8958
9160
|
name: autumn-catalog
|
|
8959
9161
|
description: Modeling a user's pricing into an Autumn catalog — deciding the structure (plans, variants, add-ons, licenses, credit systems, pooled balances) before writing config, then filling in the numbers. Use when the user describes their pricing or asks to model, change, or push a catalog.
|
|
8960
|
-
version: 2.0.
|
|
9162
|
+
version: 2.0.1
|
|
8961
9163
|
---
|
|
8962
9164
|
|
|
8963
9165
|
# Catalog
|
|
@@ -12839,11 +13041,11 @@ Pitch: "Pro $20/mo or $200/yr — 1,000 messages per month either way."
|
|
|
12839
13041
|
{
|
|
12840
13042
|
name: "autumn-integrate",
|
|
12841
13043
|
description: "Integrating Autumn into an app's backend — creating customers, billing flows (attach, checkout, upgrade, cancel), gating features with check, recording usage with track, and exposing billing data to the frontend. Use when the user asks to integrate Autumn, add billing/payments to their app, gate features, meter usage, or build checkout/upgrade flows. Requires a pushed catalog; use autumn-catalog first if plans don't exist yet.",
|
|
12842
|
-
version: "2.0.
|
|
13044
|
+
version: "2.0.1",
|
|
12843
13045
|
markdown: `---
|
|
12844
13046
|
name: autumn-integrate
|
|
12845
13047
|
description: Integrating Autumn into an app's backend — creating customers, billing flows (attach, checkout, upgrade, cancel), gating features with check, recording usage with track, and exposing billing data to the frontend. Use when the user asks to integrate Autumn, add billing/payments to their app, gate features, meter usage, or build checkout/upgrade flows. Requires a pushed catalog; use autumn-catalog first if plans don't exist yet.
|
|
12846
|
-
version: 2.0.
|
|
13048
|
+
version: 2.0.1
|
|
12847
13049
|
---
|
|
12848
13050
|
|
|
12849
13051
|
# Integrate
|
|
@@ -13655,7 +13857,7 @@ pnpm dlx atmn init
|
|
|
13655
13857
|
\`\`\`
|
|
13656
13858
|
</CodeGroup>
|
|
13657
13859
|
|
|
13658
|
-
This
|
|
13860
|
+
This asks how you want to connect (sign in, or create a sandbox with no account), then creates an \`autumn/\` folder with an \`autumn.config.ts\` inside. Replace the contents of that file with the code below, or view our [config reference](/cli/config) to build your own.
|
|
13659
13861
|
|
|
13660
13862
|
\`\`\`typescript autumn.config.ts [expandable]
|
|
13661
13863
|
import { atmn, feature, plan } from "atmn";
|
|
@@ -13735,8 +13937,8 @@ pnpm dlx atmn push --yes
|
|
|
13735
13937
|
\`\`\`
|
|
13736
13938
|
</CodeGroup>
|
|
13737
13939
|
|
|
13738
|
-
If you already have
|
|
13739
|
-
pull
|
|
13940
|
+
If you already have plans created in the dashboard, \`atmn init\` pulls them
|
|
13941
|
+
into your config for you. Run \`atmn pull\` at any time to do it again.
|
|
13740
13942
|
|
|
13741
13943
|
</Step>
|
|
13742
13944
|
|
|
@@ -16399,7 +16601,21 @@ Auto top-ups are customer-level only because they create invoices and charge a p
|
|
|
16399
16601
|
|
|
16400
16602
|
## Plan-Level Defaults
|
|
16401
16603
|
|
|
16402
|
-
Every billing control can also be defined on a **plan** (in the dashboard under plan settings → billing controls,
|
|
16604
|
+
Every billing control can also be defined on a **plan** (in the dashboard under plan settings → billing controls, via the \`billingControls\` field when creating or updating a plan, or in the [CLI config](/cli/config#plans) with the same field). Plan-level controls act as defaults for every customer on that plan — set a daily usage limit once on your free tier instead of on each customer.
|
|
16605
|
+
|
|
16606
|
+
\`\`\`ts autumn.config.ts
|
|
16607
|
+
export const free = plan({
|
|
16608
|
+
planId: "free",
|
|
16609
|
+
versionSlug: "v1",
|
|
16610
|
+
active: true,
|
|
16611
|
+
name: "Free",
|
|
16612
|
+
autoEnable: true,
|
|
16613
|
+
items: [{ featureId: "emails", included: 200, reset: { interval: "month" } }],
|
|
16614
|
+
billingControls: {
|
|
16615
|
+
usageLimits: [{ featureId: "emails", limit: 200, interval: "day" }],
|
|
16616
|
+
},
|
|
16617
|
+
});
|
|
16618
|
+
\`\`\`
|
|
16403
16619
|
|
|
16404
16620
|
Resolution when a customer is on one or more plans:
|
|
16405
16621
|
|
|
@@ -17438,11 +17654,11 @@ Monitor your logs for this message. If you see it, check [status.useautumn.com](
|
|
|
17438
17654
|
{
|
|
17439
17655
|
name: "autumn-concepts",
|
|
17440
17656
|
description: "Understanding Autumn's billing objects before acting on them — what a plan version is and what active means, when a trial starts or ends billing, how entity- and seat-scoped subscriptions differ from the customer's own, what a customize diff actually changes, and how caps, overage, and top-ups behave. Load before versioning, editing, or drafting a plan, or when a customer's state does not match the plain reading of their plan.",
|
|
17441
|
-
version: "2.0.
|
|
17657
|
+
version: "2.0.1",
|
|
17442
17658
|
markdown: `---
|
|
17443
17659
|
name: autumn-concepts
|
|
17444
17660
|
description: Understanding Autumn's billing objects before acting on them — what a plan version is and what active means, when a trial starts or ends billing, how entity- and seat-scoped subscriptions differ from the customer's own, what a customize diff actually changes, and how caps, overage, and top-ups behave. Load before versioning, editing, or drafting a plan, or when a customer's state does not match the plain reading of their plan.
|
|
17445
|
-
version: 2.0.
|
|
17661
|
+
version: 2.0.1
|
|
17446
17662
|
---
|
|
17447
17663
|
|
|
17448
17664
|
# Concepts
|
package/dist/index.js
CHANGED
|
@@ -407,6 +407,14 @@ var LINT_RULES = {
|
|
|
407
407
|
}
|
|
408
408
|
]
|
|
409
409
|
},
|
|
410
|
+
"plans.items.expiry": {
|
|
411
|
+
required: ["duration", "length"],
|
|
412
|
+
fields: {
|
|
413
|
+
duration: {
|
|
414
|
+
enum: ["day", "week", "month", "year"]
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
},
|
|
410
418
|
"plans.items.featureOverride.creditSchema": {
|
|
411
419
|
variants: {
|
|
412
420
|
on: "tierBehavior",
|
|
@@ -669,6 +677,14 @@ var LINT_RULES = {
|
|
|
669
677
|
}
|
|
670
678
|
}
|
|
671
679
|
},
|
|
680
|
+
"plans.licenses.customize.addItems.expiry": {
|
|
681
|
+
required: ["duration", "length"],
|
|
682
|
+
fields: {
|
|
683
|
+
duration: {
|
|
684
|
+
enum: ["day", "week", "month", "year"]
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
},
|
|
672
688
|
"plans.licenses.customize.addItems.featureOverride.creditSchema": {
|
|
673
689
|
variants: {
|
|
674
690
|
on: "tierBehavior",
|
|
@@ -1055,6 +1071,14 @@ var LINT_RULES = {
|
|
|
1055
1071
|
}
|
|
1056
1072
|
}
|
|
1057
1073
|
},
|
|
1074
|
+
"plans.variants.customize.addItems.expiry": {
|
|
1075
|
+
required: ["duration", "length"],
|
|
1076
|
+
fields: {
|
|
1077
|
+
duration: {
|
|
1078
|
+
enum: ["day", "week", "month", "year"]
|
|
1079
|
+
}
|
|
1080
|
+
}
|
|
1081
|
+
},
|
|
1058
1082
|
"plans.variants.customize.addItems.featureOverride.creditSchema": {
|
|
1059
1083
|
variants: {
|
|
1060
1084
|
on: "tierBehavior",
|
|
@@ -1392,6 +1416,14 @@ var LINT_RULES = {
|
|
|
1392
1416
|
}
|
|
1393
1417
|
}
|
|
1394
1418
|
},
|
|
1419
|
+
"plans.variants.customize.items.expiry": {
|
|
1420
|
+
required: ["duration", "length"],
|
|
1421
|
+
fields: {
|
|
1422
|
+
duration: {
|
|
1423
|
+
enum: ["day", "week", "month", "year"]
|
|
1424
|
+
}
|
|
1425
|
+
}
|
|
1426
|
+
},
|
|
1395
1427
|
"plans.variants.customize.items.featureOverride.creditSchema": {
|
|
1396
1428
|
variants: {
|
|
1397
1429
|
on: "tierBehavior",
|
|
@@ -1680,6 +1712,14 @@ var LINT_RULES = {
|
|
|
1680
1712
|
}
|
|
1681
1713
|
}
|
|
1682
1714
|
},
|
|
1715
|
+
"plans.variants.customize.upsertLicenses.customize.addItems.expiry": {
|
|
1716
|
+
required: ["duration", "length"],
|
|
1717
|
+
fields: {
|
|
1718
|
+
duration: {
|
|
1719
|
+
enum: ["day", "week", "month", "year"]
|
|
1720
|
+
}
|
|
1721
|
+
}
|
|
1722
|
+
},
|
|
1683
1723
|
"plans.variants.customize.upsertLicenses.customize.addItems.featureOverride.creditSchema": {
|
|
1684
1724
|
variants: {
|
|
1685
1725
|
on: "tierBehavior",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "atmn",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "The CLI for Autumn — define your pricing in code, sync it to Autumn, and keep everything in version control.",
|
|
6
6
|
"bin": {
|
|
@@ -48,5 +48,6 @@
|
|
|
48
48
|
"jiti": "2.7.0",
|
|
49
49
|
"open": "10.2.0",
|
|
50
50
|
"yaml": "2.9.0"
|
|
51
|
-
}
|
|
51
|
+
},
|
|
52
|
+
"gitHead": "5a548945bb2a7bec37404428767108467915449d"
|
|
52
53
|
}
|