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/commands/auth.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function AuthCommand(): Promise<void>;
|
package/dist/commands/init.d.ts
DELETED
package/dist/commands/nuke.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function Nuke(): Promise<void>;
|
package/dist/commands/pull.d.ts
DELETED
package/dist/commands/push.d.ts
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { Product, Feature } from '../models/composeModels.js';
|
|
2
|
-
import { ProductItem, ProductItemInterval, UsageModel } from '../models/productItemModels.js';
|
|
3
|
-
export declare const product: (p: Product) => {
|
|
4
|
-
id: string;
|
|
5
|
-
name: string;
|
|
6
|
-
items: {
|
|
7
|
-
type?: "feature" | "priced_feature" | null | undefined;
|
|
8
|
-
feature_id?: string | null | undefined;
|
|
9
|
-
included_usage?: number | "inf" | null | undefined;
|
|
10
|
-
interval?: "minute" | "hour" | "day" | "week" | "month" | "quarter" | "semi_annual" | "year" | null | undefined;
|
|
11
|
-
usage_model?: "prepaid" | "pay_per_use" | null | undefined;
|
|
12
|
-
price?: number | null | undefined;
|
|
13
|
-
tiers?: {
|
|
14
|
-
amount: number;
|
|
15
|
-
to: number | "inf";
|
|
16
|
-
}[] | null | undefined;
|
|
17
|
-
billing_units?: number | null | undefined;
|
|
18
|
-
reset_usage_when_enabled?: boolean | undefined;
|
|
19
|
-
entity_feature_id?: string | undefined;
|
|
20
|
-
}[];
|
|
21
|
-
is_add_on?: boolean | undefined;
|
|
22
|
-
is_default?: boolean | undefined;
|
|
23
|
-
free_trial?: {
|
|
24
|
-
duration: "day" | "month" | "year";
|
|
25
|
-
length: number;
|
|
26
|
-
unique_fingerprint: boolean;
|
|
27
|
-
card_required: boolean;
|
|
28
|
-
} | undefined;
|
|
29
|
-
};
|
|
30
|
-
export declare const feature: (f: Feature) => {
|
|
31
|
-
id: string;
|
|
32
|
-
type: "boolean" | "single_use" | "continuous_use" | "credit_system";
|
|
33
|
-
name?: string | undefined;
|
|
34
|
-
credit_schema?: {
|
|
35
|
-
metered_feature_id: string;
|
|
36
|
-
credit_cost: number;
|
|
37
|
-
}[] | undefined;
|
|
38
|
-
};
|
|
39
|
-
export declare const featureItem: ({ feature_id, included_usage, interval, reset_usage_when_enabled, entity_feature_id, }: {
|
|
40
|
-
feature_id: string;
|
|
41
|
-
included_usage?: number | "inf";
|
|
42
|
-
interval?: ProductItemInterval;
|
|
43
|
-
reset_usage_when_enabled?: boolean;
|
|
44
|
-
entity_feature_id?: string;
|
|
45
|
-
}) => ProductItem;
|
|
46
|
-
export declare const pricedFeatureItem: ({ feature_id, price, tiers, interval, included_usage, billing_units, usage_model, reset_usage_when_enabled, entity_feature_id, }: {
|
|
47
|
-
feature_id: string;
|
|
48
|
-
price?: number;
|
|
49
|
-
tiers?: {
|
|
50
|
-
to: number | "inf";
|
|
51
|
-
amount: number;
|
|
52
|
-
}[];
|
|
53
|
-
interval?: ProductItemInterval;
|
|
54
|
-
included_usage?: number;
|
|
55
|
-
billing_units?: number;
|
|
56
|
-
usage_model?: UsageModel;
|
|
57
|
-
reset_usage_when_enabled?: boolean;
|
|
58
|
-
entity_feature_id?: string;
|
|
59
|
-
}) => ProductItem;
|
|
60
|
-
export declare const priceItem: ({ price, interval, }: {
|
|
61
|
-
price: number;
|
|
62
|
-
interval?: ProductItemInterval;
|
|
63
|
-
}) => ProductItem;
|
package/dist/compose/index.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { product, priceItem, feature, featureItem, pricedFeatureItem } from './builders/builderFunctions.js';
|
|
2
|
-
import { Feature, Product } from './models/composeModels.js';
|
|
3
|
-
import { ProductItem } from './models/productItemModels.js';
|
|
4
|
-
export { product, priceItem, feature, featureItem, pricedFeatureItem };
|
|
5
|
-
export type { Feature, Product, ProductItem };
|
|
6
|
-
export type Infinity = 'infinity';
|
|
7
|
-
export type AutumnConfig = {
|
|
8
|
-
products: Product[];
|
|
9
|
-
features: Feature[];
|
|
10
|
-
};
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod/v4';
|
|
2
|
-
export declare const FreeTrialSchema: z.ZodObject<{
|
|
3
|
-
duration: z.ZodEnum<{
|
|
4
|
-
day: "day";
|
|
5
|
-
month: "month";
|
|
6
|
-
year: "year";
|
|
7
|
-
}>;
|
|
8
|
-
length: z.ZodNumber;
|
|
9
|
-
unique_fingerprint: z.ZodBoolean;
|
|
10
|
-
card_required: z.ZodBoolean;
|
|
11
|
-
}, z.core.$strip>;
|
|
12
|
-
export declare const ProductSchema: z.ZodObject<{
|
|
13
|
-
id: z.ZodString;
|
|
14
|
-
name: z.ZodString;
|
|
15
|
-
is_add_on: z.ZodOptional<z.ZodPrefault<z.ZodBoolean>>;
|
|
16
|
-
is_default: z.ZodOptional<z.ZodPrefault<z.ZodBoolean>>;
|
|
17
|
-
items: z.ZodArray<z.ZodObject<{
|
|
18
|
-
type: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
19
|
-
feature: "feature";
|
|
20
|
-
priced_feature: "priced_feature";
|
|
21
|
-
}>>>;
|
|
22
|
-
feature_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
23
|
-
included_usage: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"inf">]>>>;
|
|
24
|
-
interval: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
25
|
-
minute: "minute";
|
|
26
|
-
hour: "hour";
|
|
27
|
-
day: "day";
|
|
28
|
-
week: "week";
|
|
29
|
-
month: "month";
|
|
30
|
-
quarter: "quarter";
|
|
31
|
-
semi_annual: "semi_annual";
|
|
32
|
-
year: "year";
|
|
33
|
-
}>>>;
|
|
34
|
-
usage_model: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
35
|
-
prepaid: "prepaid";
|
|
36
|
-
pay_per_use: "pay_per_use";
|
|
37
|
-
}>>>;
|
|
38
|
-
price: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
39
|
-
tiers: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
40
|
-
amount: z.ZodNumber;
|
|
41
|
-
to: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"inf">]>;
|
|
42
|
-
}, z.core.$strip>>>>;
|
|
43
|
-
billing_units: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
44
|
-
reset_usage_when_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
45
|
-
entity_feature_id: z.ZodOptional<z.ZodString>;
|
|
46
|
-
}, z.core.$strip>>;
|
|
47
|
-
free_trial: z.ZodOptional<z.ZodObject<{
|
|
48
|
-
duration: z.ZodEnum<{
|
|
49
|
-
day: "day";
|
|
50
|
-
month: "month";
|
|
51
|
-
year: "year";
|
|
52
|
-
}>;
|
|
53
|
-
length: z.ZodNumber;
|
|
54
|
-
unique_fingerprint: z.ZodBoolean;
|
|
55
|
-
card_required: z.ZodBoolean;
|
|
56
|
-
}, z.core.$strip>>;
|
|
57
|
-
}, z.core.$strip>;
|
|
58
|
-
export declare const FeatureSchema: z.ZodObject<{
|
|
59
|
-
id: z.ZodString;
|
|
60
|
-
name: z.ZodOptional<z.ZodString>;
|
|
61
|
-
type: z.ZodEnum<{
|
|
62
|
-
boolean: "boolean";
|
|
63
|
-
single_use: "single_use";
|
|
64
|
-
continuous_use: "continuous_use";
|
|
65
|
-
credit_system: "credit_system";
|
|
66
|
-
}>;
|
|
67
|
-
credit_schema: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
68
|
-
metered_feature_id: z.ZodString;
|
|
69
|
-
credit_cost: z.ZodNumber;
|
|
70
|
-
}, z.core.$strip>>>;
|
|
71
|
-
}, z.core.$strip>;
|
|
72
|
-
export type Feature = z.infer<typeof FeatureSchema>;
|
|
73
|
-
export type Product = z.infer<typeof ProductSchema>;
|
|
74
|
-
export type FreeTrial = z.infer<typeof FreeTrialSchema>;
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod/v4';
|
|
2
|
-
export declare const ProductItemIntervalEnum: z.ZodEnum<{
|
|
3
|
-
minute: "minute";
|
|
4
|
-
hour: "hour";
|
|
5
|
-
day: "day";
|
|
6
|
-
week: "week";
|
|
7
|
-
month: "month";
|
|
8
|
-
quarter: "quarter";
|
|
9
|
-
semi_annual: "semi_annual";
|
|
10
|
-
year: "year";
|
|
11
|
-
}>;
|
|
12
|
-
export declare const UsageModelEnum: z.ZodEnum<{
|
|
13
|
-
prepaid: "prepaid";
|
|
14
|
-
pay_per_use: "pay_per_use";
|
|
15
|
-
}>;
|
|
16
|
-
export type ProductItemInterval = z.infer<typeof ProductItemIntervalEnum>;
|
|
17
|
-
export type UsageModel = z.infer<typeof UsageModelEnum>;
|
|
18
|
-
export declare const ProductItemSchema: z.ZodObject<{
|
|
19
|
-
type: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
20
|
-
feature: "feature";
|
|
21
|
-
priced_feature: "priced_feature";
|
|
22
|
-
}>>>;
|
|
23
|
-
feature_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
24
|
-
included_usage: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"inf">]>>>;
|
|
25
|
-
interval: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
26
|
-
minute: "minute";
|
|
27
|
-
hour: "hour";
|
|
28
|
-
day: "day";
|
|
29
|
-
week: "week";
|
|
30
|
-
month: "month";
|
|
31
|
-
quarter: "quarter";
|
|
32
|
-
semi_annual: "semi_annual";
|
|
33
|
-
year: "year";
|
|
34
|
-
}>>>;
|
|
35
|
-
usage_model: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
36
|
-
prepaid: "prepaid";
|
|
37
|
-
pay_per_use: "pay_per_use";
|
|
38
|
-
}>>>;
|
|
39
|
-
price: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
40
|
-
tiers: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
41
|
-
amount: z.ZodNumber;
|
|
42
|
-
to: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"inf">]>;
|
|
43
|
-
}, z.core.$strip>>>>;
|
|
44
|
-
billing_units: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
45
|
-
reset_usage_when_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
46
|
-
entity_feature_id: z.ZodOptional<z.ZodString>;
|
|
47
|
-
}, z.core.$strip>;
|
|
48
|
-
export declare const FeatureItemSchema: z.ZodObject<{
|
|
49
|
-
feature_id: z.ZodString;
|
|
50
|
-
included_usage: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
51
|
-
interval: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
52
|
-
minute: "minute";
|
|
53
|
-
hour: "hour";
|
|
54
|
-
day: "day";
|
|
55
|
-
week: "week";
|
|
56
|
-
month: "month";
|
|
57
|
-
quarter: "quarter";
|
|
58
|
-
semi_annual: "semi_annual";
|
|
59
|
-
year: "year";
|
|
60
|
-
}>>>;
|
|
61
|
-
}, z.core.$strip>;
|
|
62
|
-
export declare const PriceItemSchema: z.ZodObject<{
|
|
63
|
-
price: z.ZodNumber;
|
|
64
|
-
interval: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
65
|
-
minute: "minute";
|
|
66
|
-
hour: "hour";
|
|
67
|
-
day: "day";
|
|
68
|
-
week: "week";
|
|
69
|
-
month: "month";
|
|
70
|
-
quarter: "quarter";
|
|
71
|
-
semi_annual: "semi_annual";
|
|
72
|
-
year: "year";
|
|
73
|
-
}>>>;
|
|
74
|
-
}, z.core.$strip>;
|
|
75
|
-
export type FeatureItem = z.infer<typeof FeatureItemSchema>;
|
|
76
|
-
export type PriceItem = z.infer<typeof PriceItemSchema>;
|
|
77
|
-
export type ProductItem = z.infer<typeof ProductItemSchema>;
|
package/dist/constants.d.ts
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export declare const FRONTEND_URL = "http://localhost:3000";
|
|
2
|
-
export declare const BACKEND_URL = "http://localhost:8080";
|
|
3
|
-
export declare const DEFAULT_CONFIG = "import {\n\tfeature,\n\tproduct,\n\tpriceItem,\n\tfeatureItem,\n\tpricedFeatureItem,\n} from 'atmn';\n\nexport const seats = feature({\n\tid: 'seats',\n\tname: 'Seats',\n\ttype: 'continuous_use',\n});\n\nexport const messages = feature({\n\tid: 'messages',\n\tname: 'Messages',\n\ttype: 'single_use',\n});\n\nexport const pro = product({\n\tid: 'pro',\n\tname: 'Pro',\n\titems: [\n\t\t// 500 messages per month\n\t\tfeatureItem({\n\t\t\tfeature_id: messages.id,\n\t\t\tincluded_usage: 500,\n\t\t\tinterval: 'month',\n\t\t}),\n\n\t\t// $10 per seat per month\n\t\tpricedFeatureItem({\n\t\t\tfeature_id: seats.id,\n\t\t\tprice: 10,\n\t\t\tinterval: 'month',\n\t\t}),\n\n\t\t// $50 / month\n\t\tpriceItem({\n\t\t\tprice: 50,\n\t\t\tinterval: 'month',\n\t\t}),\n\t],\n});\n";
|
package/dist/core/api.d.ts
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
export declare function request({ method, base, path, data, headers, customAuth, throwOnError, secretKey, }: {
|
|
2
|
-
method: string;
|
|
3
|
-
base: string;
|
|
4
|
-
path: string;
|
|
5
|
-
data?: any;
|
|
6
|
-
headers?: any;
|
|
7
|
-
customAuth?: string;
|
|
8
|
-
throwOnError?: boolean;
|
|
9
|
-
secretKey?: string;
|
|
10
|
-
}): Promise<any>;
|
|
11
|
-
export declare function internalRequest({ method, path, data, headers, customAuth, }: {
|
|
12
|
-
method: string;
|
|
13
|
-
path: string;
|
|
14
|
-
data?: any;
|
|
15
|
-
headers?: any;
|
|
16
|
-
customAuth?: string;
|
|
17
|
-
}): Promise<any>;
|
|
18
|
-
export declare function externalRequest({ method, path, data, headers, customAuth, throwOnError, }: {
|
|
19
|
-
method: string;
|
|
20
|
-
path: string;
|
|
21
|
-
data?: any;
|
|
22
|
-
headers?: any;
|
|
23
|
-
customAuth?: string;
|
|
24
|
-
throwOnError?: boolean;
|
|
25
|
-
}): Promise<any>;
|
|
26
|
-
export declare function deleteFeature(id: string): Promise<any>;
|
|
27
|
-
export declare function deleteProduct(id: string): Promise<any>;
|
|
28
|
-
export declare function updateCLIStripeKeys({ stripeSecretKey, autumnSecretKey, }: {
|
|
29
|
-
stripeSecretKey: string;
|
|
30
|
-
autumnSecretKey: string;
|
|
31
|
-
}): Promise<any>;
|
package/dist/core/auth.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function getOTP(otp: string): Promise<any>;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { ProductItem, Product, Feature } from '../../compose/index.js';
|
|
2
|
-
export declare function importBuilder(): string;
|
|
3
|
-
export declare function exportBuilder(productIds: string[], featureIds: string[]): string;
|
|
4
|
-
export declare function productBuilder({ product, features, }: {
|
|
5
|
-
product: Product;
|
|
6
|
-
features: Feature[];
|
|
7
|
-
}): string;
|
|
8
|
-
export declare function pricedFeatureItemBuilder({ item, features, }: {
|
|
9
|
-
item: ProductItem;
|
|
10
|
-
features: Feature[];
|
|
11
|
-
}): string;
|
|
12
|
-
export declare function featureItemBuilder({ item, features, }: {
|
|
13
|
-
item: ProductItem;
|
|
14
|
-
features: Feature[];
|
|
15
|
-
}): string;
|
|
16
|
-
export declare function priceItemBuilder({ item }: {
|
|
17
|
-
item: ProductItem;
|
|
18
|
-
}): string;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { ProductItem, Product, Feature } from '../../compose/index.js';
|
|
2
|
-
export declare function importBuilder(): string;
|
|
3
|
-
export declare function exportBuilder(productIds: string[], featureIds: string[]): string;
|
|
4
|
-
export declare function productBuilder({ product, features, }: {
|
|
5
|
-
product: Product;
|
|
6
|
-
features: Feature[];
|
|
7
|
-
}): string;
|
|
8
|
-
export declare function pricedFeatureItemBuilder({ item, features, }: {
|
|
9
|
-
item: ProductItem;
|
|
10
|
-
features: Feature[];
|
|
11
|
-
}): string;
|
|
12
|
-
export declare function featureItemBuilder({ item, features, }: {
|
|
13
|
-
item: ProductItem;
|
|
14
|
-
features: Feature[];
|
|
15
|
-
}): string;
|
|
16
|
-
export declare function priceItemBuilder({ item }: {
|
|
17
|
-
item: ProductItem;
|
|
18
|
-
}): string;
|
package/dist/core/config.d.ts
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
export declare function loadAutumnConfigFile(): Promise<{
|
|
2
|
-
products: {
|
|
3
|
-
id: string;
|
|
4
|
-
name: string;
|
|
5
|
-
items: {
|
|
6
|
-
type?: "feature" | "priced_feature" | null | undefined;
|
|
7
|
-
feature_id?: string | null | undefined;
|
|
8
|
-
included_usage?: number | "inf" | null | undefined;
|
|
9
|
-
interval?: "minute" | "hour" | "day" | "week" | "month" | "quarter" | "semi_annual" | "year" | null | undefined;
|
|
10
|
-
usage_model?: "prepaid" | "pay_per_use" | null | undefined;
|
|
11
|
-
price?: number | null | undefined;
|
|
12
|
-
tiers?: {
|
|
13
|
-
amount: number;
|
|
14
|
-
to: number | "inf";
|
|
15
|
-
}[] | null | undefined;
|
|
16
|
-
billing_units?: number | null | undefined;
|
|
17
|
-
reset_usage_when_enabled?: boolean | undefined;
|
|
18
|
-
entity_feature_id?: string | undefined;
|
|
19
|
-
}[];
|
|
20
|
-
is_add_on?: boolean | undefined;
|
|
21
|
-
is_default?: boolean | undefined;
|
|
22
|
-
free_trial?: {
|
|
23
|
-
duration: "day" | "month" | "year";
|
|
24
|
-
length: number;
|
|
25
|
-
unique_fingerprint: boolean;
|
|
26
|
-
card_required: boolean;
|
|
27
|
-
} | undefined;
|
|
28
|
-
}[];
|
|
29
|
-
features: {
|
|
30
|
-
id: string;
|
|
31
|
-
type: "boolean" | "single_use" | "continuous_use" | "credit_system";
|
|
32
|
-
name?: string | undefined;
|
|
33
|
-
credit_schema?: {
|
|
34
|
-
metered_feature_id: string;
|
|
35
|
-
credit_cost: number;
|
|
36
|
-
}[] | undefined;
|
|
37
|
-
}[];
|
|
38
|
-
env: string;
|
|
39
|
-
}>;
|
|
40
|
-
export declare function writeConfig(config: string): void;
|
package/dist/core/nuke.d.ts
DELETED
package/dist/core/pull.d.ts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
export declare function getProducts(ids: string[]): Promise<{
|
|
2
|
-
id: string;
|
|
3
|
-
name: string;
|
|
4
|
-
items: {
|
|
5
|
-
type?: "feature" | "priced_feature" | null | undefined;
|
|
6
|
-
feature_id?: string | null | undefined;
|
|
7
|
-
included_usage?: number | "inf" | null | undefined;
|
|
8
|
-
interval?: "minute" | "hour" | "day" | "week" | "month" | "quarter" | "semi_annual" | "year" | null | undefined;
|
|
9
|
-
usage_model?: "prepaid" | "pay_per_use" | null | undefined;
|
|
10
|
-
price?: number | null | undefined;
|
|
11
|
-
tiers?: {
|
|
12
|
-
amount: number;
|
|
13
|
-
to: number | "inf";
|
|
14
|
-
}[] | null | undefined;
|
|
15
|
-
billing_units?: number | null | undefined;
|
|
16
|
-
reset_usage_when_enabled?: boolean | undefined;
|
|
17
|
-
entity_feature_id?: string | undefined;
|
|
18
|
-
}[];
|
|
19
|
-
is_add_on?: boolean | undefined;
|
|
20
|
-
is_default?: boolean | undefined;
|
|
21
|
-
free_trial?: {
|
|
22
|
-
duration: "day" | "month" | "year";
|
|
23
|
-
length: number;
|
|
24
|
-
unique_fingerprint: boolean;
|
|
25
|
-
card_required: boolean;
|
|
26
|
-
} | undefined;
|
|
27
|
-
}[]>;
|
|
28
|
-
export declare function getAllProducts(): Promise<any>;
|
|
29
|
-
export declare function getFeatures(): Promise<any>;
|
package/dist/core/push.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { Spinner } from "yocto-spinner";
|
|
2
|
-
import type { Feature, Product } from "../compose/index.js";
|
|
3
|
-
export declare function checkForDeletables(currentFeatures: Feature[], currentProducts: Product[]): Promise<{
|
|
4
|
-
curFeatures: any;
|
|
5
|
-
curProducts: any;
|
|
6
|
-
featuresToDelete: any;
|
|
7
|
-
productsToDelete: any;
|
|
8
|
-
}>;
|
|
9
|
-
export declare function upsertFeature(feature: Feature, s: Spinner): Promise<any>;
|
|
10
|
-
export declare function checkProductForConfirmation({ curProducts, product, }: {
|
|
11
|
-
curProducts: Product[];
|
|
12
|
-
product: Product;
|
|
13
|
-
}): Promise<{
|
|
14
|
-
id: string;
|
|
15
|
-
will_version: any;
|
|
16
|
-
}>;
|
|
17
|
-
export declare function upsertProduct({ curProducts, product, spinner, shouldUpdate, }: {
|
|
18
|
-
curProducts: Product[];
|
|
19
|
-
product: Product;
|
|
20
|
-
spinner: Spinner;
|
|
21
|
-
shouldUpdate?: boolean;
|
|
22
|
-
}): Promise<{
|
|
23
|
-
id: string;
|
|
24
|
-
action: string;
|
|
25
|
-
}>;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Feature } from '../../compose/index.js';
|
|
2
|
-
export declare const updateFeature: ({ id, update, }: {
|
|
3
|
-
id: string;
|
|
4
|
-
update: Partial<Feature & {
|
|
5
|
-
archived: boolean;
|
|
6
|
-
}>;
|
|
7
|
-
}) => Promise<any>;
|
|
8
|
-
export declare const checkFeatureDeletionData: ({ featureId, }: {
|
|
9
|
-
featureId: string;
|
|
10
|
-
}) => Promise<any>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const getOrg: () => Promise<any>;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Product } from '../../compose/index.js';
|
|
2
|
-
export declare const getProductDeleteInfo: ({ productId, }: {
|
|
3
|
-
productId: string;
|
|
4
|
-
}) => Promise<any>;
|
|
5
|
-
export declare const updateProduct: ({ productId, update, }: {
|
|
6
|
-
productId: string;
|
|
7
|
-
update: Partial<Product & {
|
|
8
|
-
archived: boolean;
|
|
9
|
-
}>;
|
|
10
|
-
}) => Promise<any>;
|
package/dist/core/utils.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export declare const notNullish: (value: any) => boolean;
|
|
2
|
-
export declare const nullish: (value: any) => boolean;
|
|
3
|
-
export declare const isProdFlag: () => boolean;
|
|
4
|
-
export declare function snakeCaseToCamelCase(value: string): string;
|
|
5
|
-
export declare function idToVar({ id, prefix, }: {
|
|
6
|
-
id: string;
|
|
7
|
-
prefix?: string;
|
|
8
|
-
}): string;
|
|
9
|
-
export declare function storeToEnv(prodKey: string, sandboxKey: string): Promise<void>;
|
|
10
|
-
export declare function readFromEnv(): string;
|
|
11
|
-
export declare function initSpinner(message: string): import("yocto-spinner").Spinner;
|
package/dist/index.cjs
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
// source/compose/builders/builderFunctions.ts
|
|
4
|
-
var product = (p) => p;
|
|
5
|
-
var feature = (f) => f;
|
|
6
|
-
var featureItem = ({
|
|
7
|
-
feature_id,
|
|
8
|
-
included_usage,
|
|
9
|
-
interval,
|
|
10
|
-
reset_usage_when_enabled,
|
|
11
|
-
entity_feature_id
|
|
12
|
-
}) => {
|
|
13
|
-
return {
|
|
14
|
-
included_usage,
|
|
15
|
-
feature_id,
|
|
16
|
-
interval,
|
|
17
|
-
reset_usage_when_enabled,
|
|
18
|
-
entity_feature_id
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
var pricedFeatureItem = ({
|
|
22
|
-
feature_id,
|
|
23
|
-
price,
|
|
24
|
-
tiers,
|
|
25
|
-
interval,
|
|
26
|
-
included_usage = void 0,
|
|
27
|
-
billing_units = 1,
|
|
28
|
-
usage_model = "pay_per_use",
|
|
29
|
-
reset_usage_when_enabled,
|
|
30
|
-
entity_feature_id
|
|
31
|
-
}) => {
|
|
32
|
-
return {
|
|
33
|
-
price,
|
|
34
|
-
tiers,
|
|
35
|
-
interval,
|
|
36
|
-
billing_units,
|
|
37
|
-
feature_id,
|
|
38
|
-
usage_model,
|
|
39
|
-
included_usage,
|
|
40
|
-
reset_usage_when_enabled,
|
|
41
|
-
entity_feature_id
|
|
42
|
-
};
|
|
43
|
-
};
|
|
44
|
-
var priceItem = ({
|
|
45
|
-
price,
|
|
46
|
-
interval
|
|
47
|
-
}) => {
|
|
48
|
-
return {
|
|
49
|
-
price,
|
|
50
|
-
interval
|
|
51
|
-
};
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
exports.feature = feature;
|
|
55
|
-
exports.featureItem = featureItem;
|
|
56
|
-
exports.priceItem = priceItem;
|
|
57
|
-
exports.pricedFeatureItem = pricedFeatureItem;
|
|
58
|
-
exports.product = product;
|