atmn 2.0.181 → 2.0.183

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 CHANGED
@@ -4987,9 +4987,6 @@ var LINT_RULES = {
4987
4987
  "plans.billingControls.usageAlerts": {
4988
4988
  required: ["threshold", "thresholdType"],
4989
4989
  fields: {
4990
- threshold: {
4991
- minimum: 0
4992
- },
4993
4990
  thresholdType: {
4994
4991
  enum: [
4995
4992
  "usage",
@@ -5982,9 +5979,6 @@ var LINT_RULES = {
5982
5979
  "plans.variants.customize.billingControls.usageAlerts": {
5983
5980
  required: ["threshold", "thresholdType"],
5984
5981
  fields: {
5985
- threshold: {
5986
- minimum: 0
5987
- },
5988
5982
  thresholdType: {
5989
5983
  enum: [
5990
5984
  "usage",
@@ -7964,7 +7958,7 @@ var createClient = (options) => ({
7964
7958
  });
7965
7959
 
7966
7960
  // src/version.ts
7967
- var version = "2.0.181";
7961
+ var version = "2.0.183";
7968
7962
 
7969
7963
  // src/http/autumnFetch.ts
7970
7964
  var runtime = typeof Bun !== "undefined" ? `bun ${Bun.version}` : `node ${process.versions.node}`;
@@ -10235,16 +10229,16 @@ import { dirname as dirname4, join as join7 } from "node:path";
10235
10229
  import chalk3 from "chalk";
10236
10230
 
10237
10231
  // src/generated/skills.ts
10238
- var SKILLS_VERSION = "2.0.181";
10232
+ var SKILLS_VERSION = "2.0.182";
10239
10233
  var SKILLS = [
10240
10234
  {
10241
10235
  name: "autumn-setup",
10242
10236
  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.",
10243
- version: "2.0.181",
10237
+ version: "2.0.182",
10244
10238
  markdown: `---
10245
10239
  name: autumn-setup
10246
10240
  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.
10247
- version: 2.0.181
10241
+ version: 2.0.182
10248
10242
  ---
10249
10243
 
10250
10244
  # Setup
@@ -10402,11 +10396,11 @@ Then stop. Don't keep building, don't tour the dashboard, don't deploy anything.
10402
10396
  {
10403
10397
  name: "autumn-catalog",
10404
10398
  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.",
10405
- version: "2.0.181",
10399
+ version: "2.0.182",
10406
10400
  markdown: `---
10407
10401
  name: autumn-catalog
10408
10402
  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.
10409
- version: 2.0.181
10403
+ version: 2.0.182
10410
10404
  ---
10411
10405
 
10412
10406
  # Catalog
@@ -14250,11 +14244,11 @@ Pitch: "Pro $20/mo or $200/yr — 1,000 messages per month either way."
14250
14244
  {
14251
14245
  name: "autumn-integrate",
14252
14246
  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.",
14253
- version: "2.0.181",
14247
+ version: "2.0.182",
14254
14248
  markdown: `---
14255
14249
  name: autumn-integrate
14256
14250
  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.
14257
- version: 2.0.181
14251
+ version: 2.0.182
14258
14252
  ---
14259
14253
 
14260
14254
  # Integrate
@@ -18957,11 +18951,11 @@ Monitor your logs for this message. If you see it, check [status.useautumn.com](
18957
18951
  {
18958
18952
  name: "autumn-concepts",
18959
18953
  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.",
18960
- version: "2.0.181",
18954
+ version: "2.0.182",
18961
18955
  markdown: `---
18962
18956
  name: autumn-concepts
18963
18957
  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.
18964
- version: 2.0.181
18958
+ version: 2.0.182
18965
18959
  ---
18966
18960
 
18967
18961
  # Concepts
@@ -19199,6 +19193,14 @@ Metered volume variant:
19199
19193
 
19200
19194
  </trial-behavior>
19201
19195
 
19196
+ <past-due-behavior>
19197
+
19198
+ - \`config.ignore_past_due\` is a plan setting (dashboard: plan settings → "Ignore past due"). When true, customers on the plan keep working while a payment is past due: balances still reset, usage is not blocked, and Stripe does not cancel the subscription.
19199
+ - Customers have the same flag on their own \`config\`. When set (true or false), the customer's value wins over every plan they hold; when unset, each plan's value decides.
19200
+ - Setting it on the plan covers current and future customers on that plan; setting it per customer covers only that customer.
19201
+
19202
+ </past-due-behavior>
19203
+
19202
19204
  <replacement-behavior>
19203
19205
 
19204
19206
  - By default, attaching a plan replaces the customer's current plan in the same group.
@@ -19238,7 +19240,7 @@ Metered volume variant:
19238
19240
  },
19239
19241
  {
19240
19242
  path: "references/trials.md",
19241
- contents: "### Trials\n\n- A trial gives a customer temporary, free access to a plan. It can be passed in during the billing call, or it can come with the plan configuration itself (which can be overriden).\n- Set a trial with `free_trial` on attach: `{ duration_length, duration_type (day|month|year), card_required, on_end }`. Always pass `duration_type`. \n- Default to card not required (if there is no paid plan), and on_end: revert (if there is a paid plan).\n\nIf the customer the customer is NOT on a paid plan (free plan or no plan at all). 2 options:\n\n- No-card trial (default to this): attach with `free_trial` and set `card_required` false. The subscription starts with no card and ends at trial end if none is added. While on it, the customer cannot upgrade or attach another plan until they add a card via the Stripe billing portal.\n- No-card trials cannot be combined with `invoice_mode` (attach rejects it). If an invoice is needed, use `card_required: true`.\n- Card-required trial: attach with `free_trial` and `card_required: true` and `long_lived_checkout` If the customer has no payment method, the attach returns a checkout URL to collect a card; they are charged when the trial ends. This should be done with a long-lived checkout URL param.\n\nThe customer already has an active (Stripe) subscription — common in sales-led trials.\n\n- On end: revert (default to this): attach the new plan with `on_end: \"revert\"` . This grants the plan in Autumn without touching the Stripe subscription; at trial end Autumn moves the customer back to their original plan, preserving the existing billing cycle.\n- To end a revert trial early, cancel it with `updateSubscription` and `cancel_action: \"cancel_immediately\"`; Autumn restores the previous plan. Do not remove `free_trial` (that converts the trial to paid) or re-attach the old plan.\n- On end: bill -- attaching a plan with a trial (or updating the subscription to add one) resets the Stripe billing anchor/cycle. This can be undesired so warn the user if they request this.\n- Card required param is ignored if there is already an active sub.\n\n\nUpdating or ending a trial\n- Call update_subscription on the trialing plan with the new trial nested under `customize`: `{ customer_id, subscription_id, customize: { free_trial: { duration_length, duration_type, card_required, on_end } } }`. Never put `free_trial` at the top level of an update: the update endpoint rejects a request whose only change is a top-level `free_trial` (\"At least one update parameter must be provided\"), while `customize.free_trial` is accepted. The duration is counted from now, not from the original start. A 14-day extension on day 10 of a 14-day trial gives 14 more days, not 4.\n- For a bill-on-end trial, pass `customize: { free_trial: null }` to end the trial immediately and start paid billing. Never do this for a revert trial: it activates the trial plan at full price instead of restoring the old plan. Cancel a revert trial instead (see above)."
19243
+ contents: '### Trials\n\n- A trial gives a customer temporary, free access to a plan. It can be passed in during the billing call, or it can come with the plan configuration itself (which can be overriden).\n- Set a trial with `free_trial` on attach: `{ duration_length, duration_type (day|month|year), card_required, on_end }`. Always pass `duration_type` and `on_end`; never omit `on_end`, because it silently defaults to `"bill"`.\n- Default to card not required (if there is no paid plan), and on_end: revert (if there is a paid plan).\n- `on_end` must match what you tell the user happens when the trial ends. If you say the customer goes back to their current or previous plan (e.g. "if no card is added, they go back to Hobby"), pass `on_end: "revert"`. Pass `on_end: "bill"` only when the customer should be charged and keep the plan at trial end, and say that.\n\nIf the customer the customer is NOT on a paid plan (free plan or no plan at all). 2 options:\n\n- No-card trial (default to this): attach with `free_trial` and set `card_required` false. The subscription starts with no card and ends at trial end if none is added. While on it, the customer cannot upgrade or attach another plan until they add a card via the Stripe billing portal.\n- No-card trials cannot be combined with `invoice_mode` (attach rejects it). If an invoice is needed, use `card_required: true`.\n- Card-required trial: attach with `free_trial` and `card_required: true` and `long_lived_checkout` If the customer has no payment method, the attach returns a checkout URL to collect a card; they are charged when the trial ends. This should be done with a long-lived checkout URL param.\n\nThe customer already has an active (Stripe) subscription — common in sales-led trials.\n\n- On end: revert (default to this): attach the new plan with `on_end: "revert"` . This grants the plan in Autumn without touching the Stripe subscription; at trial end Autumn moves the customer back to their original plan, preserving the existing billing cycle.\n- To end a revert trial early, cancel it with `updateSubscription` and `cancel_action: "cancel_immediately"`; Autumn restores the previous plan. Do not remove `free_trial` (that converts the trial to paid) or re-attach the old plan.\n- On end: bill -- attaching a plan with a trial (or updating the subscription to add one) resets the Stripe billing anchor/cycle. This can be undesired so warn the user if they request this.\n- Card required param is ignored if there is already an active sub.\n\n\nUpdating or ending a trial\n- Call update_subscription on the trialing plan with the new trial nested under `customize`: `{ customer_id, subscription_id, customize: { free_trial: { duration_length, duration_type, card_required, on_end } } }`. Never put `free_trial` at the top level of an update: the update endpoint rejects a request whose only change is a top-level `free_trial` ("At least one update parameter must be provided"), while `customize.free_trial` is accepted. The duration is counted from now, not from the original start. A 14-day extension on day 10 of a 14-day trial gives 14 more days, not 4.\n- For a bill-on-end trial, pass `customize: { free_trial: null }` to end the trial immediately and start paid billing. Never do this for a revert trial: it activates the trial plan at full price instead of restoring the old plan. Cancel a revert trial instead (see above).'
19242
19244
  },
19243
19245
  {
19244
19246
  path: "references/customer-entity.md",
@@ -19310,6 +19312,7 @@ Metered volume variant:
19310
19312
  <additional>
19311
19313
 
19312
19314
  - Billing controls can change usage behavior after balances are provisioned; see the Billing Controls section in this Concepts resource.
19315
+ - \`config.ignore_past_due\` on a customer overrides the same setting on each of their plans; leave it unset to follow the plans. See the past-due section of the Plan concept.
19313
19316
  - Use \`expand\` to pull related details when needed, such as attached plans, features, entities, invoices, payment method, or billing-control runtime state.
19314
19317
 
19315
19318
  </additional>
package/dist/index.js CHANGED
@@ -349,9 +349,6 @@ var LINT_RULES = {
349
349
  "plans.billingControls.usageAlerts": {
350
350
  required: ["threshold", "thresholdType"],
351
351
  fields: {
352
- threshold: {
353
- minimum: 0
354
- },
355
352
  thresholdType: {
356
353
  enum: [
357
354
  "usage",
@@ -1344,9 +1341,6 @@ var LINT_RULES = {
1344
1341
  "plans.variants.customize.billingControls.usageAlerts": {
1345
1342
  required: ["threshold", "thresholdType"],
1346
1343
  fields: {
1347
- threshold: {
1348
- minimum: 0
1349
- },
1350
1344
  thresholdType: {
1351
1345
  enum: [
1352
1346
  "usage",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "atmn",
3
- "version": "2.0.181",
3
+ "version": "2.0.183",
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": {
@@ -49,5 +49,5 @@
49
49
  "open": "10.2.0",
50
50
  "yaml": "2.9.0"
51
51
  },
52
- "gitHead": "cbe8e91d98816e2e661b3ae99dec513dc529052d"
52
+ "gitHead": "8917d24cad0980d2da351a5348a0a367f8bf40d4"
53
53
  }