@alfe.ai/integration-manifest 0.0.7 → 0.0.8
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/index.d.ts +5 -1
- package/dist/index.js +6 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -88,11 +88,13 @@ interface IntegrationPricingPlan {
|
|
|
88
88
|
interval?: 'month' | 'year';
|
|
89
89
|
}
|
|
90
90
|
interface IntegrationPricing {
|
|
91
|
-
type: 'free' | 'paid';
|
|
91
|
+
type: 'free' | 'paid' | 'usage';
|
|
92
92
|
/** Single price (shorthand for integrations with one plan) */
|
|
93
93
|
price?: number;
|
|
94
94
|
currency?: string;
|
|
95
95
|
interval?: 'month' | 'year';
|
|
96
|
+
/** Description of usage-based pricing (for type: 'usage') */
|
|
97
|
+
description?: string;
|
|
96
98
|
/** Multiple plans/tiers (e.g., starter, growth, scale) */
|
|
97
99
|
plans?: Record<string, IntegrationPricingPlan>;
|
|
98
100
|
}
|
|
@@ -374,6 +376,7 @@ declare const IntegrationManifestSchema: z.ZodObject<{
|
|
|
374
376
|
type: z.ZodEnum<{
|
|
375
377
|
free: "free";
|
|
376
378
|
paid: "paid";
|
|
379
|
+
usage: "usage";
|
|
377
380
|
}>;
|
|
378
381
|
price: z.ZodOptional<z.ZodNumber>;
|
|
379
382
|
currency: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
@@ -381,6 +384,7 @@ declare const IntegrationManifestSchema: z.ZodObject<{
|
|
|
381
384
|
month: "month";
|
|
382
385
|
year: "year";
|
|
383
386
|
}>>;
|
|
387
|
+
description: z.ZodOptional<z.ZodString>;
|
|
384
388
|
plans: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
385
389
|
name: z.ZodString;
|
|
386
390
|
price: z.ZodNumber;
|
package/dist/index.js
CHANGED
|
@@ -99,10 +99,15 @@ const IntegrationPricingPlanSchema = z.object({
|
|
|
99
99
|
interval: z.enum(["month", "year"]).optional().default("month")
|
|
100
100
|
});
|
|
101
101
|
const IntegrationPricingSchema = z.object({
|
|
102
|
-
type: z.enum([
|
|
102
|
+
type: z.enum([
|
|
103
|
+
"free",
|
|
104
|
+
"paid",
|
|
105
|
+
"usage"
|
|
106
|
+
]),
|
|
103
107
|
price: z.number().positive().optional(),
|
|
104
108
|
currency: z.string().length(3).optional().default("USD"),
|
|
105
109
|
interval: z.enum(["month", "year"]).optional(),
|
|
110
|
+
description: z.string().optional(),
|
|
106
111
|
plans: z.record(z.string(), IntegrationPricingPlanSchema).optional()
|
|
107
112
|
}).refine((pricing) => {
|
|
108
113
|
if (pricing.type === "paid") {
|