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.
- package/dist/cli.js +12358 -1218
- package/dist/src/compose/models/planModels.d.ts +17 -10
- package/package.json +95 -94
- package/dist/cli.cjs +0 -1640
- package/dist/cli.d.cts +0 -1
- package/dist/cli.d.ts +0 -1
- package/dist/cli.js.map +0 -278
- package/dist/commands/auth.d.ts +0 -1
- package/dist/commands/init.d.ts +0 -3
- package/dist/commands/nuke.d.ts +0 -1
- package/dist/commands/pull.d.ts +0 -3
- package/dist/commands/push.d.ts +0 -5
- package/dist/compose/builders/builderFunctions.d.ts +0 -63
- package/dist/compose/index.d.ts +0 -10
- package/dist/compose/models/composeModels.d.ts +0 -74
- package/dist/compose/models/productItemModels.d.ts +0 -77
- package/dist/constants.d.ts +0 -3
- package/dist/core/api.d.ts +0 -31
- package/dist/core/auth.d.ts +0 -1
- package/dist/core/builders/featureBuilder.d.ts +0 -2
- package/dist/core/builders/features.d.ts +0 -2
- package/dist/core/builders/freeTrialBuilder.d.ts +0 -4
- package/dist/core/builders/productBuilder.d.ts +0 -18
- package/dist/core/builders/products.d.ts +0 -18
- package/dist/core/config.d.ts +0 -40
- package/dist/core/nuke.d.ts +0 -6
- package/dist/core/pull.d.ts +0 -29
- package/dist/core/push.d.ts +0 -25
- package/dist/core/requests/featureRequests.d.ts +0 -10
- package/dist/core/requests/orgRequests.d.ts +0 -1
- package/dist/core/requests/prodRequests.d.ts +0 -10
- package/dist/core/utils.d.ts +0 -11
- package/dist/index.cjs +0 -58
- package/dist/index.d.cts +0 -188
- package/dist/index.d.ts +0 -188
- package/dist/index.js +0 -52
- package/dist/index.js.map +0 -10
package/dist/index.d.cts
DELETED
|
@@ -1,188 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod/v4';
|
|
2
|
-
|
|
3
|
-
declare const ProductSchema: z.ZodObject<{
|
|
4
|
-
id: z.ZodString;
|
|
5
|
-
name: z.ZodString;
|
|
6
|
-
group: z.ZodOptional<z.ZodString>;
|
|
7
|
-
is_add_on: z.ZodOptional<z.ZodPrefault<z.ZodBoolean>>;
|
|
8
|
-
is_default: z.ZodOptional<z.ZodPrefault<z.ZodBoolean>>;
|
|
9
|
-
items: z.ZodArray<z.ZodObject<{
|
|
10
|
-
type: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
11
|
-
feature: "feature";
|
|
12
|
-
priced_feature: "priced_feature";
|
|
13
|
-
}>>>;
|
|
14
|
-
feature_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
15
|
-
included_usage: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"inf">]>>>;
|
|
16
|
-
interval: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
17
|
-
minute: "minute";
|
|
18
|
-
hour: "hour";
|
|
19
|
-
day: "day";
|
|
20
|
-
week: "week";
|
|
21
|
-
month: "month";
|
|
22
|
-
quarter: "quarter";
|
|
23
|
-
semi_annual: "semi_annual";
|
|
24
|
-
year: "year";
|
|
25
|
-
}>>>;
|
|
26
|
-
usage_model: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
27
|
-
prepaid: "prepaid";
|
|
28
|
-
pay_per_use: "pay_per_use";
|
|
29
|
-
}>>>;
|
|
30
|
-
price: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
31
|
-
tiers: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
32
|
-
amount: z.ZodNumber;
|
|
33
|
-
to: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"inf">]>;
|
|
34
|
-
}, z.core.$strip>>>>;
|
|
35
|
-
billing_units: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
36
|
-
reset_usage_when_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
37
|
-
entity_feature_id: z.ZodOptional<z.ZodString>;
|
|
38
|
-
}, z.core.$strip>>;
|
|
39
|
-
free_trial: z.ZodOptional<z.ZodObject<{
|
|
40
|
-
duration: z.ZodEnum<{
|
|
41
|
-
day: "day";
|
|
42
|
-
month: "month";
|
|
43
|
-
year: "year";
|
|
44
|
-
}>;
|
|
45
|
-
length: z.ZodNumber;
|
|
46
|
-
unique_fingerprint: z.ZodBoolean;
|
|
47
|
-
card_required: z.ZodBoolean;
|
|
48
|
-
}, z.core.$strip>>;
|
|
49
|
-
archived: z.ZodOptional<z.ZodBoolean>;
|
|
50
|
-
}, z.core.$strip>;
|
|
51
|
-
declare const FeatureSchema: z.ZodObject<{
|
|
52
|
-
id: z.ZodString;
|
|
53
|
-
name: z.ZodOptional<z.ZodString>;
|
|
54
|
-
type: z.ZodEnum<{
|
|
55
|
-
boolean: "boolean";
|
|
56
|
-
single_use: "single_use";
|
|
57
|
-
continuous_use: "continuous_use";
|
|
58
|
-
credit_system: "credit_system";
|
|
59
|
-
}>;
|
|
60
|
-
credit_schema: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
61
|
-
metered_feature_id: z.ZodString;
|
|
62
|
-
credit_cost: z.ZodNumber;
|
|
63
|
-
}, z.core.$strip>>>;
|
|
64
|
-
archived: z.ZodOptional<z.ZodBoolean>;
|
|
65
|
-
}, z.core.$strip>;
|
|
66
|
-
type Feature = z.infer<typeof FeatureSchema>;
|
|
67
|
-
type Product = z.infer<typeof ProductSchema>;
|
|
68
|
-
|
|
69
|
-
declare const ProductItemIntervalEnum: z.ZodEnum<{
|
|
70
|
-
minute: "minute";
|
|
71
|
-
hour: "hour";
|
|
72
|
-
day: "day";
|
|
73
|
-
week: "week";
|
|
74
|
-
month: "month";
|
|
75
|
-
quarter: "quarter";
|
|
76
|
-
semi_annual: "semi_annual";
|
|
77
|
-
year: "year";
|
|
78
|
-
}>;
|
|
79
|
-
declare const UsageModelEnum: z.ZodEnum<{
|
|
80
|
-
prepaid: "prepaid";
|
|
81
|
-
pay_per_use: "pay_per_use";
|
|
82
|
-
}>;
|
|
83
|
-
type ProductItemInterval = z.infer<typeof ProductItemIntervalEnum>;
|
|
84
|
-
type UsageModel = z.infer<typeof UsageModelEnum>;
|
|
85
|
-
declare const ProductItemSchema: z.ZodObject<{
|
|
86
|
-
type: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
87
|
-
feature: "feature";
|
|
88
|
-
priced_feature: "priced_feature";
|
|
89
|
-
}>>>;
|
|
90
|
-
feature_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
91
|
-
included_usage: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"inf">]>>>;
|
|
92
|
-
interval: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
93
|
-
minute: "minute";
|
|
94
|
-
hour: "hour";
|
|
95
|
-
day: "day";
|
|
96
|
-
week: "week";
|
|
97
|
-
month: "month";
|
|
98
|
-
quarter: "quarter";
|
|
99
|
-
semi_annual: "semi_annual";
|
|
100
|
-
year: "year";
|
|
101
|
-
}>>>;
|
|
102
|
-
usage_model: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
103
|
-
prepaid: "prepaid";
|
|
104
|
-
pay_per_use: "pay_per_use";
|
|
105
|
-
}>>>;
|
|
106
|
-
price: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
107
|
-
tiers: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
108
|
-
amount: z.ZodNumber;
|
|
109
|
-
to: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"inf">]>;
|
|
110
|
-
}, z.core.$strip>>>>;
|
|
111
|
-
billing_units: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
112
|
-
reset_usage_when_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
113
|
-
entity_feature_id: z.ZodOptional<z.ZodString>;
|
|
114
|
-
}, z.core.$strip>;
|
|
115
|
-
type ProductItem = z.infer<typeof ProductItemSchema>;
|
|
116
|
-
|
|
117
|
-
declare const product: (p: Product) => {
|
|
118
|
-
id: string;
|
|
119
|
-
name: string;
|
|
120
|
-
items: {
|
|
121
|
-
type?: "feature" | "priced_feature" | null | undefined;
|
|
122
|
-
feature_id?: string | null | undefined;
|
|
123
|
-
included_usage?: number | "inf" | null | undefined;
|
|
124
|
-
interval?: "minute" | "hour" | "day" | "week" | "month" | "quarter" | "semi_annual" | "year" | null | undefined;
|
|
125
|
-
usage_model?: "prepaid" | "pay_per_use" | null | undefined;
|
|
126
|
-
price?: number | null | undefined;
|
|
127
|
-
tiers?: {
|
|
128
|
-
amount: number;
|
|
129
|
-
to: number | "inf";
|
|
130
|
-
}[] | null | undefined;
|
|
131
|
-
billing_units?: number | null | undefined;
|
|
132
|
-
reset_usage_when_enabled?: boolean | undefined;
|
|
133
|
-
entity_feature_id?: string | undefined;
|
|
134
|
-
}[];
|
|
135
|
-
group?: string | undefined;
|
|
136
|
-
is_add_on?: boolean | undefined;
|
|
137
|
-
is_default?: boolean | undefined;
|
|
138
|
-
free_trial?: {
|
|
139
|
-
duration: "day" | "month" | "year";
|
|
140
|
-
length: number;
|
|
141
|
-
unique_fingerprint: boolean;
|
|
142
|
-
card_required: boolean;
|
|
143
|
-
} | undefined;
|
|
144
|
-
archived?: boolean | undefined;
|
|
145
|
-
};
|
|
146
|
-
declare const feature: (f: Feature) => {
|
|
147
|
-
id: string;
|
|
148
|
-
type: "boolean" | "single_use" | "continuous_use" | "credit_system";
|
|
149
|
-
name?: string | undefined;
|
|
150
|
-
credit_schema?: {
|
|
151
|
-
metered_feature_id: string;
|
|
152
|
-
credit_cost: number;
|
|
153
|
-
}[] | undefined;
|
|
154
|
-
archived?: boolean | undefined;
|
|
155
|
-
};
|
|
156
|
-
declare const featureItem: ({ feature_id, included_usage, interval, reset_usage_when_enabled, entity_feature_id, }: {
|
|
157
|
-
feature_id: string;
|
|
158
|
-
included_usage?: number | "inf";
|
|
159
|
-
interval?: ProductItemInterval;
|
|
160
|
-
reset_usage_when_enabled?: boolean;
|
|
161
|
-
entity_feature_id?: string;
|
|
162
|
-
}) => ProductItem;
|
|
163
|
-
declare const pricedFeatureItem: ({ feature_id, price, tiers, interval, included_usage, billing_units, usage_model, reset_usage_when_enabled, entity_feature_id, }: {
|
|
164
|
-
feature_id: string;
|
|
165
|
-
price?: number;
|
|
166
|
-
tiers?: {
|
|
167
|
-
to: number | "inf";
|
|
168
|
-
amount: number;
|
|
169
|
-
}[];
|
|
170
|
-
interval?: ProductItemInterval;
|
|
171
|
-
included_usage?: number;
|
|
172
|
-
billing_units?: number;
|
|
173
|
-
usage_model?: UsageModel;
|
|
174
|
-
reset_usage_when_enabled?: boolean;
|
|
175
|
-
entity_feature_id?: string;
|
|
176
|
-
}) => ProductItem;
|
|
177
|
-
declare const priceItem: ({ price, interval, }: {
|
|
178
|
-
price: number;
|
|
179
|
-
interval?: ProductItemInterval;
|
|
180
|
-
}) => ProductItem;
|
|
181
|
-
|
|
182
|
-
type Infinity = "infinity";
|
|
183
|
-
type AutumnConfig = {
|
|
184
|
-
products: Product[];
|
|
185
|
-
features: Feature[];
|
|
186
|
-
};
|
|
187
|
-
|
|
188
|
-
export { type AutumnConfig, type Feature, type Infinity, type Product, type ProductItem, feature, featureItem, priceItem, pricedFeatureItem, product };
|
package/dist/index.d.ts
DELETED
|
@@ -1,188 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod/v4';
|
|
2
|
-
|
|
3
|
-
declare const ProductSchema: z.ZodObject<{
|
|
4
|
-
id: z.ZodString;
|
|
5
|
-
name: z.ZodString;
|
|
6
|
-
group: z.ZodOptional<z.ZodString>;
|
|
7
|
-
is_add_on: z.ZodOptional<z.ZodPrefault<z.ZodBoolean>>;
|
|
8
|
-
is_default: z.ZodOptional<z.ZodPrefault<z.ZodBoolean>>;
|
|
9
|
-
items: z.ZodArray<z.ZodObject<{
|
|
10
|
-
type: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
11
|
-
feature: "feature";
|
|
12
|
-
priced_feature: "priced_feature";
|
|
13
|
-
}>>>;
|
|
14
|
-
feature_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
15
|
-
included_usage: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"inf">]>>>;
|
|
16
|
-
interval: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
17
|
-
minute: "minute";
|
|
18
|
-
hour: "hour";
|
|
19
|
-
day: "day";
|
|
20
|
-
week: "week";
|
|
21
|
-
month: "month";
|
|
22
|
-
quarter: "quarter";
|
|
23
|
-
semi_annual: "semi_annual";
|
|
24
|
-
year: "year";
|
|
25
|
-
}>>>;
|
|
26
|
-
usage_model: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
27
|
-
prepaid: "prepaid";
|
|
28
|
-
pay_per_use: "pay_per_use";
|
|
29
|
-
}>>>;
|
|
30
|
-
price: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
31
|
-
tiers: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
32
|
-
amount: z.ZodNumber;
|
|
33
|
-
to: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"inf">]>;
|
|
34
|
-
}, z.core.$strip>>>>;
|
|
35
|
-
billing_units: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
36
|
-
reset_usage_when_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
37
|
-
entity_feature_id: z.ZodOptional<z.ZodString>;
|
|
38
|
-
}, z.core.$strip>>;
|
|
39
|
-
free_trial: z.ZodOptional<z.ZodObject<{
|
|
40
|
-
duration: z.ZodEnum<{
|
|
41
|
-
day: "day";
|
|
42
|
-
month: "month";
|
|
43
|
-
year: "year";
|
|
44
|
-
}>;
|
|
45
|
-
length: z.ZodNumber;
|
|
46
|
-
unique_fingerprint: z.ZodBoolean;
|
|
47
|
-
card_required: z.ZodBoolean;
|
|
48
|
-
}, z.core.$strip>>;
|
|
49
|
-
archived: z.ZodOptional<z.ZodBoolean>;
|
|
50
|
-
}, z.core.$strip>;
|
|
51
|
-
declare const FeatureSchema: z.ZodObject<{
|
|
52
|
-
id: z.ZodString;
|
|
53
|
-
name: z.ZodOptional<z.ZodString>;
|
|
54
|
-
type: z.ZodEnum<{
|
|
55
|
-
boolean: "boolean";
|
|
56
|
-
single_use: "single_use";
|
|
57
|
-
continuous_use: "continuous_use";
|
|
58
|
-
credit_system: "credit_system";
|
|
59
|
-
}>;
|
|
60
|
-
credit_schema: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
61
|
-
metered_feature_id: z.ZodString;
|
|
62
|
-
credit_cost: z.ZodNumber;
|
|
63
|
-
}, z.core.$strip>>>;
|
|
64
|
-
archived: z.ZodOptional<z.ZodBoolean>;
|
|
65
|
-
}, z.core.$strip>;
|
|
66
|
-
type Feature = z.infer<typeof FeatureSchema>;
|
|
67
|
-
type Product = z.infer<typeof ProductSchema>;
|
|
68
|
-
|
|
69
|
-
declare const ProductItemIntervalEnum: z.ZodEnum<{
|
|
70
|
-
minute: "minute";
|
|
71
|
-
hour: "hour";
|
|
72
|
-
day: "day";
|
|
73
|
-
week: "week";
|
|
74
|
-
month: "month";
|
|
75
|
-
quarter: "quarter";
|
|
76
|
-
semi_annual: "semi_annual";
|
|
77
|
-
year: "year";
|
|
78
|
-
}>;
|
|
79
|
-
declare const UsageModelEnum: z.ZodEnum<{
|
|
80
|
-
prepaid: "prepaid";
|
|
81
|
-
pay_per_use: "pay_per_use";
|
|
82
|
-
}>;
|
|
83
|
-
type ProductItemInterval = z.infer<typeof ProductItemIntervalEnum>;
|
|
84
|
-
type UsageModel = z.infer<typeof UsageModelEnum>;
|
|
85
|
-
declare const ProductItemSchema: z.ZodObject<{
|
|
86
|
-
type: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
87
|
-
feature: "feature";
|
|
88
|
-
priced_feature: "priced_feature";
|
|
89
|
-
}>>>;
|
|
90
|
-
feature_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
91
|
-
included_usage: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"inf">]>>>;
|
|
92
|
-
interval: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
93
|
-
minute: "minute";
|
|
94
|
-
hour: "hour";
|
|
95
|
-
day: "day";
|
|
96
|
-
week: "week";
|
|
97
|
-
month: "month";
|
|
98
|
-
quarter: "quarter";
|
|
99
|
-
semi_annual: "semi_annual";
|
|
100
|
-
year: "year";
|
|
101
|
-
}>>>;
|
|
102
|
-
usage_model: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
103
|
-
prepaid: "prepaid";
|
|
104
|
-
pay_per_use: "pay_per_use";
|
|
105
|
-
}>>>;
|
|
106
|
-
price: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
107
|
-
tiers: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
108
|
-
amount: z.ZodNumber;
|
|
109
|
-
to: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"inf">]>;
|
|
110
|
-
}, z.core.$strip>>>>;
|
|
111
|
-
billing_units: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
112
|
-
reset_usage_when_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
113
|
-
entity_feature_id: z.ZodOptional<z.ZodString>;
|
|
114
|
-
}, z.core.$strip>;
|
|
115
|
-
type ProductItem = z.infer<typeof ProductItemSchema>;
|
|
116
|
-
|
|
117
|
-
declare const product: (p: Product) => {
|
|
118
|
-
id: string;
|
|
119
|
-
name: string;
|
|
120
|
-
items: {
|
|
121
|
-
type?: "feature" | "priced_feature" | null | undefined;
|
|
122
|
-
feature_id?: string | null | undefined;
|
|
123
|
-
included_usage?: number | "inf" | null | undefined;
|
|
124
|
-
interval?: "minute" | "hour" | "day" | "week" | "month" | "quarter" | "semi_annual" | "year" | null | undefined;
|
|
125
|
-
usage_model?: "prepaid" | "pay_per_use" | null | undefined;
|
|
126
|
-
price?: number | null | undefined;
|
|
127
|
-
tiers?: {
|
|
128
|
-
amount: number;
|
|
129
|
-
to: number | "inf";
|
|
130
|
-
}[] | null | undefined;
|
|
131
|
-
billing_units?: number | null | undefined;
|
|
132
|
-
reset_usage_when_enabled?: boolean | undefined;
|
|
133
|
-
entity_feature_id?: string | undefined;
|
|
134
|
-
}[];
|
|
135
|
-
group?: string | undefined;
|
|
136
|
-
is_add_on?: boolean | undefined;
|
|
137
|
-
is_default?: boolean | undefined;
|
|
138
|
-
free_trial?: {
|
|
139
|
-
duration: "day" | "month" | "year";
|
|
140
|
-
length: number;
|
|
141
|
-
unique_fingerprint: boolean;
|
|
142
|
-
card_required: boolean;
|
|
143
|
-
} | undefined;
|
|
144
|
-
archived?: boolean | undefined;
|
|
145
|
-
};
|
|
146
|
-
declare const feature: (f: Feature) => {
|
|
147
|
-
id: string;
|
|
148
|
-
type: "boolean" | "single_use" | "continuous_use" | "credit_system";
|
|
149
|
-
name?: string | undefined;
|
|
150
|
-
credit_schema?: {
|
|
151
|
-
metered_feature_id: string;
|
|
152
|
-
credit_cost: number;
|
|
153
|
-
}[] | undefined;
|
|
154
|
-
archived?: boolean | undefined;
|
|
155
|
-
};
|
|
156
|
-
declare const featureItem: ({ feature_id, included_usage, interval, reset_usage_when_enabled, entity_feature_id, }: {
|
|
157
|
-
feature_id: string;
|
|
158
|
-
included_usage?: number | "inf";
|
|
159
|
-
interval?: ProductItemInterval;
|
|
160
|
-
reset_usage_when_enabled?: boolean;
|
|
161
|
-
entity_feature_id?: string;
|
|
162
|
-
}) => ProductItem;
|
|
163
|
-
declare const pricedFeatureItem: ({ feature_id, price, tiers, interval, included_usage, billing_units, usage_model, reset_usage_when_enabled, entity_feature_id, }: {
|
|
164
|
-
feature_id: string;
|
|
165
|
-
price?: number;
|
|
166
|
-
tiers?: {
|
|
167
|
-
to: number | "inf";
|
|
168
|
-
amount: number;
|
|
169
|
-
}[];
|
|
170
|
-
interval?: ProductItemInterval;
|
|
171
|
-
included_usage?: number;
|
|
172
|
-
billing_units?: number;
|
|
173
|
-
usage_model?: UsageModel;
|
|
174
|
-
reset_usage_when_enabled?: boolean;
|
|
175
|
-
entity_feature_id?: string;
|
|
176
|
-
}) => ProductItem;
|
|
177
|
-
declare const priceItem: ({ price, interval, }: {
|
|
178
|
-
price: number;
|
|
179
|
-
interval?: ProductItemInterval;
|
|
180
|
-
}) => ProductItem;
|
|
181
|
-
|
|
182
|
-
type Infinity = "infinity";
|
|
183
|
-
type AutumnConfig = {
|
|
184
|
-
products: Product[];
|
|
185
|
-
features: Feature[];
|
|
186
|
-
};
|
|
187
|
-
|
|
188
|
-
export { type AutumnConfig, type Feature, type Infinity, type Product, type ProductItem, feature, featureItem, priceItem, pricedFeatureItem, product };
|
package/dist/index.js
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
// source/compose/builders/builderFunctions.ts
|
|
2
|
-
var product = (p) => p;
|
|
3
|
-
var feature = (f) => f;
|
|
4
|
-
var featureItem = ({
|
|
5
|
-
feature_id,
|
|
6
|
-
included_usage,
|
|
7
|
-
interval,
|
|
8
|
-
reset_usage_when_enabled,
|
|
9
|
-
entity_feature_id
|
|
10
|
-
}) => {
|
|
11
|
-
return {
|
|
12
|
-
included_usage,
|
|
13
|
-
feature_id,
|
|
14
|
-
interval,
|
|
15
|
-
reset_usage_when_enabled,
|
|
16
|
-
entity_feature_id
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
var pricedFeatureItem = ({
|
|
20
|
-
feature_id,
|
|
21
|
-
price,
|
|
22
|
-
tiers,
|
|
23
|
-
interval,
|
|
24
|
-
included_usage = void 0,
|
|
25
|
-
billing_units = 1,
|
|
26
|
-
usage_model = "pay_per_use",
|
|
27
|
-
reset_usage_when_enabled,
|
|
28
|
-
entity_feature_id
|
|
29
|
-
}) => {
|
|
30
|
-
return {
|
|
31
|
-
price,
|
|
32
|
-
tiers,
|
|
33
|
-
interval,
|
|
34
|
-
billing_units,
|
|
35
|
-
feature_id,
|
|
36
|
-
usage_model,
|
|
37
|
-
included_usage,
|
|
38
|
-
reset_usage_when_enabled,
|
|
39
|
-
entity_feature_id
|
|
40
|
-
};
|
|
41
|
-
};
|
|
42
|
-
var priceItem = ({
|
|
43
|
-
price,
|
|
44
|
-
interval
|
|
45
|
-
}) => {
|
|
46
|
-
return {
|
|
47
|
-
price,
|
|
48
|
-
interval
|
|
49
|
-
};
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
export { feature, featureItem, priceItem, pricedFeatureItem, product };
|
package/dist/index.js.map
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../source/compose/builders/builderFunctions.ts"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"import type { Feature, Product } from \"../models/composeModels.js\";\n\nimport type {\n\tProductItem,\n\tProductItemInterval,\n\tUsageModel,\n} from \"../models/productItemModels.js\";\n\nexport const product = (p: Product) => p;\nexport const feature = (f: Feature) => f;\n\nexport const featureItem = ({\n\tfeature_id,\n\tincluded_usage,\n\tinterval,\n\treset_usage_when_enabled,\n\tentity_feature_id,\n}: {\n\tfeature_id: string;\n\tincluded_usage?: number | 'inf';\n\tinterval?: ProductItemInterval;\n\treset_usage_when_enabled?: boolean;\n\tentity_feature_id?: string;\n}): ProductItem => {\n\treturn {\n\t\tincluded_usage,\n\t\tfeature_id,\n\t\tinterval,\n\t\treset_usage_when_enabled,\n\t\tentity_feature_id,\n\t};\n};\n\nexport const pricedFeatureItem = ({\n\tfeature_id,\n\tprice,\n\ttiers,\n\tinterval,\n\tincluded_usage = undefined,\n\tbilling_units = 1,\n\tusage_model = \"pay_per_use\",\n\treset_usage_when_enabled,\n\tentity_feature_id,\n}: {\n\tfeature_id: string;\n\tprice?: number;\n\ttiers?: {to: number | 'inf'; amount: number}[];\n\tinterval?: ProductItemInterval;\n\tincluded_usage?: number;\n\tbilling_units?: number;\n\tusage_model?: UsageModel;\n\treset_usage_when_enabled?: boolean;\n\tentity_feature_id?: string;\n}): ProductItem => {\n\treturn {\n\t\tprice,\n\t\ttiers,\n\t\tinterval,\n\t\tbilling_units,\n\t\tfeature_id,\n\t\tusage_model,\n\t\tincluded_usage,\n\t\treset_usage_when_enabled,\n\t\tentity_feature_id,\n\t};\n};\n\nexport const priceItem = ({\n\tprice,\n\tinterval,\n}: {\n\tprice: number;\n\tinterval?: ProductItemInterval;\n}): ProductItem => {\n\treturn {\n\t\tprice,\n\t\tinterval,\n\t};\n};\n"
|
|
6
|
-
],
|
|
7
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQO,IAAM,UAAU,CAAC,MAAe;AAChC,IAAM,UAAU,CAAC,MAAe;AAEhC,IAAM,cAAc;AAAA,EAC1B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,MAOkB;AAAA,EAClB,OAAO;AAAA,IACN;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD;AAAA;AAGM,IAAM,oBAAoB;AAAA,EAChC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,iBAAiB;AAAA,EACjB,gBAAgB;AAAA,EAChB,cAAc;AAAA,EACd;AAAA,EACA;AAAA,MAWkB;AAAA,EAClB,OAAO;AAAA,IACN;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD;AAAA;AAGM,IAAM,YAAY;AAAA,EACxB;AAAA,EACA;AAAA,MAIkB;AAAA,EAClB,OAAO;AAAA,IACN;AAAA,IACA;AAAA,EACD;AAAA;",
|
|
8
|
-
"debugId": "F53D3408B4C808C064756E2164756E21",
|
|
9
|
-
"names": []
|
|
10
|
-
}
|