atmn 1.0.1 → 1.0.3

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.
Files changed (37) hide show
  1. package/dist/cli.js +12358 -1218
  2. package/dist/src/compose/models/planModels.d.ts +17 -10
  3. package/package.json +95 -94
  4. package/dist/cli.cjs +0 -1640
  5. package/dist/cli.d.cts +0 -1
  6. package/dist/cli.d.ts +0 -1
  7. package/dist/cli.js.map +0 -278
  8. package/dist/commands/auth.d.ts +0 -1
  9. package/dist/commands/init.d.ts +0 -3
  10. package/dist/commands/nuke.d.ts +0 -1
  11. package/dist/commands/pull.d.ts +0 -3
  12. package/dist/commands/push.d.ts +0 -5
  13. package/dist/compose/builders/builderFunctions.d.ts +0 -63
  14. package/dist/compose/index.d.ts +0 -10
  15. package/dist/compose/models/composeModels.d.ts +0 -74
  16. package/dist/compose/models/productItemModels.d.ts +0 -77
  17. package/dist/constants.d.ts +0 -3
  18. package/dist/core/api.d.ts +0 -31
  19. package/dist/core/auth.d.ts +0 -1
  20. package/dist/core/builders/featureBuilder.d.ts +0 -2
  21. package/dist/core/builders/features.d.ts +0 -2
  22. package/dist/core/builders/freeTrialBuilder.d.ts +0 -4
  23. package/dist/core/builders/productBuilder.d.ts +0 -18
  24. package/dist/core/builders/products.d.ts +0 -18
  25. package/dist/core/config.d.ts +0 -40
  26. package/dist/core/nuke.d.ts +0 -6
  27. package/dist/core/pull.d.ts +0 -29
  28. package/dist/core/push.d.ts +0 -25
  29. package/dist/core/requests/featureRequests.d.ts +0 -10
  30. package/dist/core/requests/orgRequests.d.ts +0 -1
  31. package/dist/core/requests/prodRequests.d.ts +0 -10
  32. package/dist/core/utils.d.ts +0 -11
  33. package/dist/index.cjs +0 -58
  34. package/dist/index.d.cts +0 -188
  35. package/dist/index.d.ts +0 -188
  36. package/dist/index.js +0 -52
  37. package/dist/index.js.map +0 -10
@@ -8,7 +8,7 @@ export declare const PlanFeatureSchema: z.ZodObject<{
8
8
  included: z.ZodOptional<z.ZodNumber>;
9
9
  unlimited: z.ZodOptional<z.ZodBoolean>;
10
10
  reset: z.ZodOptional<z.ZodObject<{
11
- interval: z.ZodUnion<readonly [z.ZodLiteral<"one_off">, z.ZodLiteral<"hour">, z.ZodLiteral<"day">, z.ZodLiteral<"week">, z.ZodLiteral<"month">, z.ZodLiteral<"quarter">, z.ZodLiteral<"year">]>;
11
+ interval: z.ZodUnion<readonly [z.ZodLiteral<"one_off">, z.ZodLiteral<"minute">, z.ZodLiteral<"hour">, z.ZodLiteral<"day">, z.ZodLiteral<"week">, z.ZodLiteral<"month">, z.ZodLiteral<"quarter">, z.ZodLiteral<"semi_annual">, z.ZodLiteral<"year">]>;
12
12
  interval_count: z.ZodOptional<z.ZodNumber>;
13
13
  }, z.core.$strip>>;
14
14
  price: z.ZodOptional<z.ZodObject<{
@@ -17,7 +17,7 @@ export declare const PlanFeatureSchema: z.ZodObject<{
17
17
  to: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"inf">]>;
18
18
  amount: z.ZodNumber;
19
19
  }, z.core.$strip>>>;
20
- interval: z.ZodUnion<readonly [z.ZodLiteral<"month">, z.ZodLiteral<"quarter">, z.ZodLiteral<"semi_annual">, z.ZodLiteral<"year">]>;
20
+ interval: z.ZodUnion<readonly [z.ZodLiteral<"week">, z.ZodLiteral<"month">, z.ZodLiteral<"quarter">, z.ZodLiteral<"semi_annual">, z.ZodLiteral<"year">]>;
21
21
  interval_count: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
22
22
  billing_units: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
23
23
  billing_method: z.ZodUnion<readonly [z.ZodLiteral<"prepaid">, z.ZodLiteral<"usage_based">]>;
@@ -28,10 +28,13 @@ export declare const PlanFeatureSchema: z.ZodObject<{
28
28
  on_decrease: z.ZodUnion<readonly [z.ZodLiteral<"prorate">, z.ZodLiteral<"refund_immediately">, z.ZodLiteral<"no_action">]>;
29
29
  }, z.core.$strip>>;
30
30
  rollover: z.ZodOptional<z.ZodObject<{
31
- max: z.ZodNumber;
31
+ max: z.ZodOptional<z.ZodNumber>;
32
32
  expiry_duration_type: z.ZodUnion<readonly [z.ZodLiteral<"month">, z.ZodLiteral<"forever">]>;
33
33
  expiry_duration_length: z.ZodOptional<z.ZodNumber>;
34
34
  }, z.core.$strip>>;
35
+ entity_feature_id: z.ZodOptional<z.ZodString>;
36
+ entitlement_id: z.ZodOptional<z.ZodString>;
37
+ price_id: z.ZodOptional<z.ZodString>;
35
38
  }, z.core.$strip>;
36
39
  export declare const FreeTrialSchema: z.ZodObject<{
37
40
  duration_length: z.ZodNumber;
@@ -43,7 +46,7 @@ export declare const PlanSchema: z.ZodObject<{
43
46
  auto_enable: z.ZodDefault<z.ZodBoolean>;
44
47
  price: z.ZodOptional<z.ZodObject<{
45
48
  amount: z.ZodNumber;
46
- interval: z.ZodUnion<readonly [z.ZodLiteral<"month">, z.ZodLiteral<"quarter">, z.ZodLiteral<"semi_annual">, z.ZodLiteral<"year">]>;
49
+ interval: z.ZodUnion<readonly [z.ZodLiteral<"one_off">, z.ZodLiteral<"week">, z.ZodLiteral<"month">, z.ZodLiteral<"quarter">, z.ZodLiteral<"semi_annual">, z.ZodLiteral<"year">]>;
47
50
  interval_count: z.ZodOptional<z.ZodNumber>;
48
51
  }, z.core.$strip>>;
49
52
  items: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -51,7 +54,7 @@ export declare const PlanSchema: z.ZodObject<{
51
54
  included: z.ZodOptional<z.ZodNumber>;
52
55
  unlimited: z.ZodOptional<z.ZodBoolean>;
53
56
  reset: z.ZodOptional<z.ZodObject<{
54
- interval: z.ZodUnion<readonly [z.ZodLiteral<"one_off">, z.ZodLiteral<"hour">, z.ZodLiteral<"day">, z.ZodLiteral<"week">, z.ZodLiteral<"month">, z.ZodLiteral<"quarter">, z.ZodLiteral<"year">]>;
57
+ interval: z.ZodUnion<readonly [z.ZodLiteral<"one_off">, z.ZodLiteral<"minute">, z.ZodLiteral<"hour">, z.ZodLiteral<"day">, z.ZodLiteral<"week">, z.ZodLiteral<"month">, z.ZodLiteral<"quarter">, z.ZodLiteral<"semi_annual">, z.ZodLiteral<"year">]>;
55
58
  interval_count: z.ZodOptional<z.ZodNumber>;
56
59
  }, z.core.$strip>>;
57
60
  price: z.ZodOptional<z.ZodObject<{
@@ -60,7 +63,7 @@ export declare const PlanSchema: z.ZodObject<{
60
63
  to: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"inf">]>;
61
64
  amount: z.ZodNumber;
62
65
  }, z.core.$strip>>>;
63
- interval: z.ZodUnion<readonly [z.ZodLiteral<"month">, z.ZodLiteral<"quarter">, z.ZodLiteral<"semi_annual">, z.ZodLiteral<"year">]>;
66
+ interval: z.ZodUnion<readonly [z.ZodLiteral<"week">, z.ZodLiteral<"month">, z.ZodLiteral<"quarter">, z.ZodLiteral<"semi_annual">, z.ZodLiteral<"year">]>;
64
67
  interval_count: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
65
68
  billing_units: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
66
69
  billing_method: z.ZodUnion<readonly [z.ZodLiteral<"prepaid">, z.ZodLiteral<"usage_based">]>;
@@ -71,10 +74,13 @@ export declare const PlanSchema: z.ZodObject<{
71
74
  on_decrease: z.ZodUnion<readonly [z.ZodLiteral<"prorate">, z.ZodLiteral<"refund_immediately">, z.ZodLiteral<"no_action">]>;
72
75
  }, z.core.$strip>>;
73
76
  rollover: z.ZodOptional<z.ZodObject<{
74
- max: z.ZodNumber;
77
+ max: z.ZodOptional<z.ZodNumber>;
75
78
  expiry_duration_type: z.ZodUnion<readonly [z.ZodLiteral<"month">, z.ZodLiteral<"forever">]>;
76
79
  expiry_duration_length: z.ZodOptional<z.ZodNumber>;
77
80
  }, z.core.$strip>>;
81
+ entity_feature_id: z.ZodOptional<z.ZodString>;
82
+ entitlement_id: z.ZodOptional<z.ZodString>;
83
+ price_id: z.ZodOptional<z.ZodString>;
78
84
  }, z.core.$strip>>>;
79
85
  free_trial: z.ZodOptional<z.ZodObject<{
80
86
  duration_length: z.ZodNumber;
@@ -85,9 +91,10 @@ export declare const PlanSchema: z.ZodObject<{
85
91
  name: z.ZodString;
86
92
  group: z.ZodDefault<z.ZodString>;
87
93
  }, z.core.$strip>;
88
- export type ResetInterval = "one_off" | "hour" | "day" | "week" | "month" | "quarter" | "year";
94
+ export type ResetInterval = "one_off" | "minute" | "hour" | "day" | "week" | "month" | "quarter" | "semi_annual" | "year";
89
95
  export type RolloverExpiryDurationType = "month" | "forever";
90
- export type BillingInterval = "month" | "quarter" | "semi_annual" | "year";
96
+ export type BillingInterval = "week" | "month" | "quarter" | "semi_annual" | "year";
97
+ export type PlanPriceInterval = "one_off" | "week" | "month" | "quarter" | "semi_annual" | "year";
91
98
  export type BillingMethod = "prepaid" | "usage_based";
92
99
  export type OnIncrease = "prorate" | "charge_immediately";
93
100
  export type OnDecrease = "prorate" | "refund_immediately" | "no_action";
@@ -216,7 +223,7 @@ export type Plan = {
216
223
  /** Price in your currency (e.g., 50 for $50.00) */
217
224
  amount: number;
218
225
  /** Billing frequency */
219
- interval: BillingInterval;
226
+ interval: PlanPriceInterval;
220
227
  };
221
228
  /** Items included with usage limits and pricing */
222
229
  items?: PlanFeature[];
package/package.json CHANGED
@@ -1,96 +1,97 @@
1
1
  {
2
- "name": "atmn",
3
- "version": "1.0.1",
4
- "license": "MIT",
5
- "bin": {
6
- "atmn": "dist/cli.js"
7
- },
8
- "main": "dist/compose/index.js",
9
- "types": "dist/src/compose/index.d.ts",
10
- "type": "module",
11
- "engines": {
12
- "node": ">=16"
13
- },
14
- "scripts": {
15
- "build": "bun run bun.config.ts",
16
- "dev": "nodemon -e ts,tsx --watch src --ignore dist --exec \"bun run bun.config.ts\"",
17
- "dev:bun": "bun run dev.ts",
18
- "test": "bun test",
19
- "test:watch": "bun test --watch",
20
- "test2": "prettier --check . && xo && ava",
21
- "test-cli": "node --trace-deprecation -- ./dist/cli.js"
22
- },
23
- "files": [
24
- "dist",
25
- "package.json",
26
- "README.md"
27
- ],
28
- "dependencies": {
29
- "@inkjs/ui": "^2.0.0",
30
- "@inquirer/prompts": "^7.6.0",
31
- "@mishieck/ink-titled-box": "^0.3.0",
32
- "@tanstack/react-query": "^5.90.17",
33
- "@types/prettier": "^3.0.0",
34
- "arctic": "^3.7.0",
35
- "axios": "^1.10.0",
36
- "cfonts": "^3.3.1",
37
- "chalk": "^5.2.0",
38
- "clipboardy": "^5.0.2",
39
- "commander": "^14.0.0",
40
- "dotenv": "^17.2.0",
41
- "ervy": "^1.0.7",
42
- "ink": "^6.6.0",
43
- "ink-big-text": "^2.0.0",
44
- "ink-chart": "^0.1.1",
45
- "ink-confirm-input": "^2.0.0",
46
- "ink-scroll-list": "^0.4.1",
47
- "ink-scroll-view": "^0.3.5",
48
- "ink-select-input": "^6.2.0",
49
- "ink-spinner": "^5.0.0",
50
- "ink-table": "^3.1.0",
51
- "ink-text-input": "^6.0.0",
52
- "inquirer": "^12.7.0",
53
- "jiti": "^2.4.2",
54
- "open": "^10.1.2",
55
- "prettier": "^3.6.2",
56
- "react": "^19.2.3",
57
- "yocto-spinner": "^1.0.0",
58
- "zod": "^4.0.0"
59
- },
60
- "devDependencies": {
61
- "@sindresorhus/tsconfig": "^3.0.1",
62
- "@types/bun": "^1.2.21",
63
- "@types/node": "^24.0.10",
64
- "@types/react": "^19.0.0",
65
- "@vdemedes/prettier-config": "^2.0.1",
66
- "ava": "^5.2.0",
67
- "cli-testing-library": "^3.0.1",
68
- "eslint-config-xo-react": "^0.27.0",
69
- "eslint-plugin-react": "^7.32.2",
70
- "eslint-plugin-react-hooks": "^4.6.0",
71
- "ink-testing-library": "^3.0.0",
72
- "nodemon": "^3.1.11",
73
- "react-devtools-core": "^6.1.2",
74
- "ts-node": "^10.9.1",
75
- "tsup": "^8.5.0",
76
- "typescript": "^5.0.3",
77
- "xo": "^0.53.1"
78
- },
79
- "ava": {
80
- "extensions": {
81
- "ts": "module",
82
- "tsx": "module"
83
- },
84
- "nodeArguments": [
85
- "--loader=ts-node/esm"
86
- ]
87
- },
88
- "xo": {
89
- "extends": "xo-react",
90
- "prettier": true,
91
- "rules": {
92
- "react/prop-types": "off"
93
- }
94
- },
95
- "prettier": "@vdemedes/prettier-config"
2
+ "name": "atmn",
3
+ "version": "1.0.3",
4
+ "license": "MIT",
5
+ "bin": {
6
+ "atmn": "dist/cli.js"
7
+ },
8
+ "main": "dist/compose/index.js",
9
+ "types": "dist/src/compose/index.d.ts",
10
+ "type": "module",
11
+ "engines": {
12
+ "node": ">=16"
13
+ },
14
+ "scripts": {
15
+ "build": "bun run bun.config.ts",
16
+ "dev": "nodemon -e ts,tsx --watch src --ignore dist --exec \"bun run bun.config.ts\"",
17
+ "dev:bun": "bun run dev.ts",
18
+ "test": "bun test",
19
+ "test:watch": "bun test --watch",
20
+ "test2": "prettier --check . && xo && ava",
21
+ "test-cli": "node --trace-deprecation -- ./dist/cli.js"
22
+ },
23
+ "files": [
24
+ "dist",
25
+ "package.json",
26
+ "README.md"
27
+ ],
28
+ "dependencies": {
29
+ "@inkjs/ui": "^2.0.0",
30
+ "@inquirer/prompts": "^7.6.0",
31
+ "@mishieck/ink-titled-box": "^0.3.0",
32
+ "@tanstack/react-query": "^5.90.17",
33
+ "@types/prettier": "^3.0.0",
34
+ "arctic": "^3.7.0",
35
+ "axios": "^1.10.0",
36
+ "cfonts": "^3.3.1",
37
+ "chalk": "^5.2.0",
38
+ "clipboardy": "^5.0.2",
39
+ "commander": "^14.0.0",
40
+ "dotenv": "^17.2.0",
41
+ "ervy": "^1.0.7",
42
+ "ink": "^6.6.0",
43
+ "ink-big-text": "^2.0.0",
44
+ "ink-chart": "^0.1.1",
45
+ "ink-confirm-input": "^2.0.0",
46
+ "ink-scroll-list": "^0.4.1",
47
+ "ink-scroll-view": "^0.3.5",
48
+ "ink-select-input": "^6.2.0",
49
+ "ink-spinner": "^5.0.0",
50
+ "ink-table": "^3.1.0",
51
+ "ink-text-input": "^6.0.0",
52
+ "inquirer": "^12.7.0",
53
+ "jiti": "^2.4.2",
54
+ "open": "^10.1.2",
55
+ "prettier": "^3.6.2",
56
+ "react": "^19.2.3",
57
+ "yocto-spinner": "^1.0.0",
58
+ "zod": "^4.0.0",
59
+ "conf": "^13.0.1"
60
+ },
61
+ "devDependencies": {
62
+ "@sindresorhus/tsconfig": "^3.0.1",
63
+ "@types/bun": "^1.2.21",
64
+ "@types/node": "^24.0.10",
65
+ "@types/react": "^19.0.0",
66
+ "@vdemedes/prettier-config": "^2.0.1",
67
+ "ava": "^5.2.0",
68
+ "cli-testing-library": "^3.0.1",
69
+ "eslint-config-xo-react": "^0.27.0",
70
+ "eslint-plugin-react": "^7.32.2",
71
+ "eslint-plugin-react-hooks": "^4.6.0",
72
+ "ink-testing-library": "^3.0.0",
73
+ "nodemon": "^3.1.11",
74
+ "react-devtools-core": "^6.1.2",
75
+ "ts-node": "^10.9.1",
76
+ "tsup": "^8.5.0",
77
+ "typescript": "^5.0.3",
78
+ "xo": "^0.53.1"
79
+ },
80
+ "ava": {
81
+ "extensions": {
82
+ "ts": "module",
83
+ "tsx": "module"
84
+ },
85
+ "nodeArguments": [
86
+ "--loader=ts-node/esm"
87
+ ]
88
+ },
89
+ "xo": {
90
+ "extends": "xo-react",
91
+ "prettier": true,
92
+ "rules": {
93
+ "react/prop-types": "off"
94
+ }
95
+ },
96
+ "prettier": "@vdemedes/prettier-config"
96
97
  }