atmn 2.0.167 → 2.0.169

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
@@ -4421,6 +4421,142 @@ var API_ROUTES = [
4421
4421
  description: "When false, `webhooks` is the environment's complete set: every webhook not listed is deleted, including ones made in the dashboard. Defaults true, which leaves unlisted webhooks alone."
4422
4422
  }
4423
4423
  ]
4424
+ },
4425
+ {
4426
+ group: "approval_rules",
4427
+ method: "list",
4428
+ path: "/v1/approval_rules.list",
4429
+ description: "Lists the organization's approval rules, oldest first. Every member and key can read rules. For each request, only the most specific level with a rule for that person decides (user, then role, then everyone), and every rule at that level must pass.",
4430
+ body: "none",
4431
+ fields: []
4432
+ },
4433
+ {
4434
+ group: "approval_rules",
4435
+ method: "get",
4436
+ path: "/v1/approval_rules.get",
4437
+ description: "Gets one approval rule by ID.",
4438
+ body: "object",
4439
+ fields: [
4440
+ {
4441
+ name: "id",
4442
+ type: "string",
4443
+ required: true
4444
+ }
4445
+ ]
4446
+ },
4447
+ {
4448
+ group: "approval_rules",
4449
+ method: "create",
4450
+ path: "/v1/approval_rules.create",
4451
+ description: "Creates an approval rule as version 1. `allow` is `true` (always allowed), `false` (never allowed) or an object of conditions that must all match. Problems with the rule come back as `invalid_approval_rule` with every issue under `details.issues`. Rules apply in live only. Only owners and admins (an OAuth token also needs `organisation:write` consent) and live secret keys with every scope can call it. Anyone else, whatever their scopes and including any sandbox key, gets 403 `approval_rule_editor_required`.",
4452
+ body: "object",
4453
+ fields: [
4454
+ {
4455
+ name: "name",
4456
+ type: "string",
4457
+ required: true
4458
+ },
4459
+ {
4460
+ name: "subjects",
4461
+ type: "json",
4462
+ required: true
4463
+ },
4464
+ {
4465
+ name: "actions",
4466
+ type: "json",
4467
+ required: true
4468
+ },
4469
+ {
4470
+ name: "allow",
4471
+ type: "json",
4472
+ required: true,
4473
+ description: "true always allows the actions and false never does. An object of conditions in the shape of the rule's area allows them only when every condition matches."
4474
+ },
4475
+ {
4476
+ name: "note",
4477
+ type: "string",
4478
+ required: false
4479
+ },
4480
+ {
4481
+ name: "enabled",
4482
+ type: "boolean",
4483
+ required: false
4484
+ }
4485
+ ]
4486
+ },
4487
+ {
4488
+ group: "approval_rules",
4489
+ method: "update",
4490
+ path: "/v1/approval_rules.update",
4491
+ description: "Updates the fields you pass and saves the rule as its next version. The whole rule is checked again, so changing `actions` re-checks the conditions in `allow`. Sending `allow` replaces it, so switching between `true`, `false` and conditions is one field. Only owners and admins (an OAuth token also needs `organisation:write` consent) and live secret keys with every scope can call it. Anyone else, whatever their scopes and including any sandbox key, gets 403 `approval_rule_editor_required`.",
4492
+ body: "object",
4493
+ fields: [
4494
+ {
4495
+ name: "id",
4496
+ type: "string",
4497
+ required: true
4498
+ },
4499
+ {
4500
+ name: "name",
4501
+ type: "string",
4502
+ required: false
4503
+ },
4504
+ {
4505
+ name: "subjects",
4506
+ type: "json",
4507
+ required: false
4508
+ },
4509
+ {
4510
+ name: "actions",
4511
+ type: "json",
4512
+ required: false
4513
+ },
4514
+ {
4515
+ name: "allow",
4516
+ type: "json",
4517
+ required: false,
4518
+ description: "true always allows the actions and false never does. An object of conditions in the shape of the rule's area allows them only when every condition matches."
4519
+ },
4520
+ {
4521
+ name: "note",
4522
+ type: "string",
4523
+ required: false
4524
+ },
4525
+ {
4526
+ name: "enabled",
4527
+ type: "boolean",
4528
+ required: false
4529
+ }
4530
+ ]
4531
+ },
4532
+ {
4533
+ group: "approval_rules",
4534
+ method: "delete",
4535
+ path: "/v1/approval_rules.delete",
4536
+ description: "Deletes an approval rule. Its versions stay readable through `approval_rules.versions.list`. Only owners and admins (an OAuth token also needs `organisation:write` consent) and live secret keys with every scope can call it. Anyone else, whatever their scopes and including any sandbox key, gets 403 `approval_rule_editor_required`.",
4537
+ body: "object",
4538
+ fields: [
4539
+ {
4540
+ name: "id",
4541
+ type: "string",
4542
+ required: true
4543
+ }
4544
+ ]
4545
+ },
4546
+ {
4547
+ group: "approvals",
4548
+ method: "can",
4549
+ path: "/v1/approvals.can",
4550
+ description: "Says whether the caller could make some request for an action: `scope` when their scope allows it and no rule rules it out, `blocked` when an enforced rule never allows it, and `none` when they lack the action's scope. A conditional rule can still deny a given request; preview it to see. Alias actions such as `billing.multi_attach` are read as the action they're checked as.",
4551
+ body: "object",
4552
+ fields: [
4553
+ {
4554
+ name: "action",
4555
+ type: "string",
4556
+ required: true,
4557
+ description: "The action to ask about, named after the route it gates. Routes checked as another action, like billing.multi_attach, are read as that action."
4558
+ }
4559
+ ]
4424
4560
  }
4425
4561
  ];
4426
4562
 
@@ -7735,7 +7871,7 @@ var createClient = (options) => ({
7735
7871
  });
7736
7872
 
7737
7873
  // src/version.ts
7738
- var version = "2.0.167";
7874
+ var version = "2.0.169";
7739
7875
 
7740
7876
  // src/http/autumnFetch.ts
7741
7877
  var runtime = typeof Bun !== "undefined" ? `bun ${Bun.version}` : `node ${process.versions.node}`;
@@ -10006,16 +10142,16 @@ import { dirname as dirname4, join as join7 } from "node:path";
10006
10142
  import chalk3 from "chalk";
10007
10143
 
10008
10144
  // src/generated/skills.ts
10009
- var SKILLS_VERSION = "2.0.166";
10145
+ var SKILLS_VERSION = "2.0.168";
10010
10146
  var SKILLS = [
10011
10147
  {
10012
10148
  name: "autumn-setup",
10013
10149
  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.",
10014
- version: "2.0.166",
10150
+ version: "2.0.168",
10015
10151
  markdown: `---
10016
10152
  name: autumn-setup
10017
10153
  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.
10018
- version: 2.0.166
10154
+ version: 2.0.168
10019
10155
  ---
10020
10156
 
10021
10157
  # Setup
@@ -10173,11 +10309,11 @@ Then stop. Don't keep building, don't tour the dashboard, don't deploy anything.
10173
10309
  {
10174
10310
  name: "autumn-catalog",
10175
10311
  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.",
10176
- version: "2.0.166",
10312
+ version: "2.0.168",
10177
10313
  markdown: `---
10178
10314
  name: autumn-catalog
10179
10315
  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.
10180
- version: 2.0.166
10316
+ version: 2.0.168
10181
10317
  ---
10182
10318
 
10183
10319
  # Catalog
@@ -14021,11 +14157,11 @@ Pitch: "Pro $20/mo or $200/yr — 1,000 messages per month either way."
14021
14157
  {
14022
14158
  name: "autumn-integrate",
14023
14159
  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.",
14024
- version: "2.0.166",
14160
+ version: "2.0.168",
14025
14161
  markdown: `---
14026
14162
  name: autumn-integrate
14027
14163
  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.
14028
- version: 2.0.166
14164
+ version: 2.0.168
14029
14165
  ---
14030
14166
 
14031
14167
  # Integrate
@@ -18728,11 +18864,11 @@ Monitor your logs for this message. If you see it, check [status.useautumn.com](
18728
18864
  {
18729
18865
  name: "autumn-concepts",
18730
18866
  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.",
18731
- version: "2.0.166",
18867
+ version: "2.0.168",
18732
18868
  markdown: `---
18733
18869
  name: autumn-concepts
18734
18870
  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.
18735
- version: 2.0.166
18871
+ version: 2.0.168
18736
18872
  ---
18737
18873
 
18738
18874
  # Concepts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "atmn",
3
- "version": "2.0.167",
3
+ "version": "2.0.169",
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": "2e6dd072a0ec96550d3be4e1d713ace0771ba85e"
52
+ "gitHead": "b6f4f03cd085eca2df1781dd51d892bac30f88ce"
53
53
  }
@@ -4756,4 +4756,148 @@ export const API_ROUTES: readonly ApiRoute[] = [
4756
4756
  },
4757
4757
  ],
4758
4758
  },
4759
+ {
4760
+ group: "approval_rules",
4761
+ method: "list",
4762
+ path: "/v1/approval_rules.list",
4763
+ description:
4764
+ "Lists the organization's approval rules, oldest first. Every member and key can read rules. For each request, only the most specific level with a rule for that person decides (user, then role, then everyone), and every rule at that level must pass.",
4765
+ body: "none",
4766
+ fields: [],
4767
+ },
4768
+ {
4769
+ group: "approval_rules",
4770
+ method: "get",
4771
+ path: "/v1/approval_rules.get",
4772
+ description: "Gets one approval rule by ID.",
4773
+ body: "object",
4774
+ fields: [
4775
+ {
4776
+ name: "id",
4777
+ type: "string",
4778
+ required: true,
4779
+ },
4780
+ ],
4781
+ },
4782
+ {
4783
+ group: "approval_rules",
4784
+ method: "create",
4785
+ path: "/v1/approval_rules.create",
4786
+ description:
4787
+ "Creates an approval rule as version 1. `allow` is `true` (always allowed), `false` (never allowed) or an object of conditions that must all match. Problems with the rule come back as `invalid_approval_rule` with every issue under `details.issues`. Rules apply in live only. Only owners and admins (an OAuth token also needs `organisation:write` consent) and live secret keys with every scope can call it. Anyone else, whatever their scopes and including any sandbox key, gets 403 `approval_rule_editor_required`.",
4788
+ body: "object",
4789
+ fields: [
4790
+ {
4791
+ name: "name",
4792
+ type: "string",
4793
+ required: true,
4794
+ },
4795
+ {
4796
+ name: "subjects",
4797
+ type: "json",
4798
+ required: true,
4799
+ },
4800
+ {
4801
+ name: "actions",
4802
+ type: "json",
4803
+ required: true,
4804
+ },
4805
+ {
4806
+ name: "allow",
4807
+ type: "json",
4808
+ required: true,
4809
+ description:
4810
+ "true always allows the actions and false never does. An object of conditions in the shape of the rule's area allows them only when every condition matches.",
4811
+ },
4812
+ {
4813
+ name: "note",
4814
+ type: "string",
4815
+ required: false,
4816
+ },
4817
+ {
4818
+ name: "enabled",
4819
+ type: "boolean",
4820
+ required: false,
4821
+ },
4822
+ ],
4823
+ },
4824
+ {
4825
+ group: "approval_rules",
4826
+ method: "update",
4827
+ path: "/v1/approval_rules.update",
4828
+ description:
4829
+ "Updates the fields you pass and saves the rule as its next version. The whole rule is checked again, so changing `actions` re-checks the conditions in `allow`. Sending `allow` replaces it, so switching between `true`, `false` and conditions is one field. Only owners and admins (an OAuth token also needs `organisation:write` consent) and live secret keys with every scope can call it. Anyone else, whatever their scopes and including any sandbox key, gets 403 `approval_rule_editor_required`.",
4830
+ body: "object",
4831
+ fields: [
4832
+ {
4833
+ name: "id",
4834
+ type: "string",
4835
+ required: true,
4836
+ },
4837
+ {
4838
+ name: "name",
4839
+ type: "string",
4840
+ required: false,
4841
+ },
4842
+ {
4843
+ name: "subjects",
4844
+ type: "json",
4845
+ required: false,
4846
+ },
4847
+ {
4848
+ name: "actions",
4849
+ type: "json",
4850
+ required: false,
4851
+ },
4852
+ {
4853
+ name: "allow",
4854
+ type: "json",
4855
+ required: false,
4856
+ description:
4857
+ "true always allows the actions and false never does. An object of conditions in the shape of the rule's area allows them only when every condition matches.",
4858
+ },
4859
+ {
4860
+ name: "note",
4861
+ type: "string",
4862
+ required: false,
4863
+ },
4864
+ {
4865
+ name: "enabled",
4866
+ type: "boolean",
4867
+ required: false,
4868
+ },
4869
+ ],
4870
+ },
4871
+ {
4872
+ group: "approval_rules",
4873
+ method: "delete",
4874
+ path: "/v1/approval_rules.delete",
4875
+ description:
4876
+ "Deletes an approval rule. Its versions stay readable through `approval_rules.versions.list`. Only owners and admins (an OAuth token also needs `organisation:write` consent) and live secret keys with every scope can call it. Anyone else, whatever their scopes and including any sandbox key, gets 403 `approval_rule_editor_required`.",
4877
+ body: "object",
4878
+ fields: [
4879
+ {
4880
+ name: "id",
4881
+ type: "string",
4882
+ required: true,
4883
+ },
4884
+ ],
4885
+ },
4886
+ {
4887
+ group: "approvals",
4888
+ method: "can",
4889
+ path: "/v1/approvals.can",
4890
+ description:
4891
+ "Says whether the caller could make some request for an action: `scope` when their scope allows it and no rule rules it out, `blocked` when an enforced rule never allows it, and `none` when they lack the action's scope. A conditional rule can still deny a given request; preview it to see. Alias actions such as `billing.multi_attach` are read as the action they're checked as.",
4892
+ body: "object",
4893
+ fields: [
4894
+ {
4895
+ name: "action",
4896
+ type: "string",
4897
+ required: true,
4898
+ description:
4899
+ "The action to ask about, named after the route it gates. Routes checked as another action, like billing.multi_attach, are read as that action.",
4900
+ },
4901
+ ],
4902
+ },
4759
4903
  ];