@trigger.dev/billing
Advanced tools
| import { z } from 'zod'; | ||
| declare const RunPricingSchema: z.ZodObject<{ | ||
| pricing: z.ZodOptional<z.ZodObject<{ | ||
| code: z.ZodString; | ||
| brackets: z.ZodArray<z.ZodObject<{ | ||
| upto: z.ZodOptional<z.ZodNumber>; | ||
| unitCost: z.ZodNumber; | ||
| }, "strip", z.ZodTypeAny, { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }, { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }>, "many">; | ||
| }, "strip", z.ZodTypeAny, { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| }, { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| }>>; | ||
| freeAllowance: z.ZodOptional<z.ZodNumber>; | ||
| }, "strip", z.ZodTypeAny, { | ||
| pricing?: { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| }, { | ||
| pricing?: { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| }>; | ||
| declare const PlanSchema: z.ZodObject<{ | ||
| title: z.ZodString; | ||
| code: z.ZodString; | ||
| concurrentRuns: z.ZodOptional<z.ZodObject<{ | ||
| pricing: z.ZodOptional<z.ZodObject<{ | ||
| tiers: z.ZodArray<z.ZodObject<{ | ||
| code: z.ZodString; | ||
| upto: z.ZodNumber; | ||
| tierCost: z.ZodNumber; | ||
| }, "strip", z.ZodTypeAny, { | ||
| code: string; | ||
| upto: number; | ||
| tierCost: number; | ||
| }, { | ||
| code: string; | ||
| upto: number; | ||
| tierCost: number; | ||
| }>, "many">; | ||
| }, "strip", z.ZodTypeAny, { | ||
| tiers: { | ||
| code: string; | ||
| upto: number; | ||
| tierCost: number; | ||
| }[]; | ||
| }, { | ||
| tiers: { | ||
| code: string; | ||
| upto: number; | ||
| tierCost: number; | ||
| }[]; | ||
| }>>; | ||
| freeAllowance: z.ZodOptional<z.ZodNumber>; | ||
| }, "strip", z.ZodTypeAny, { | ||
| pricing?: { | ||
| tiers: { | ||
| code: string; | ||
| upto: number; | ||
| tierCost: number; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| }, { | ||
| pricing?: { | ||
| tiers: { | ||
| code: string; | ||
| upto: number; | ||
| tierCost: number; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| }>>; | ||
| runs: z.ZodOptional<z.ZodObject<{ | ||
| pricing: z.ZodOptional<z.ZodObject<{ | ||
| code: z.ZodString; | ||
| brackets: z.ZodArray<z.ZodObject<{ | ||
| upto: z.ZodOptional<z.ZodNumber>; | ||
| unitCost: z.ZodNumber; | ||
| }, "strip", z.ZodTypeAny, { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }, { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }>, "many">; | ||
| }, "strip", z.ZodTypeAny, { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| }, { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| }>>; | ||
| freeAllowance: z.ZodOptional<z.ZodNumber>; | ||
| }, "strip", z.ZodTypeAny, { | ||
| pricing?: { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| }, { | ||
| pricing?: { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| }>>; | ||
| }, "strip", z.ZodTypeAny, { | ||
| title: string; | ||
| code: string; | ||
| concurrentRuns?: { | ||
| pricing?: { | ||
| tiers: { | ||
| code: string; | ||
| upto: number; | ||
| tierCost: number; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| } | undefined; | ||
| runs?: { | ||
| pricing?: { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| } | undefined; | ||
| }, { | ||
| title: string; | ||
| code: string; | ||
| concurrentRuns?: { | ||
| pricing?: { | ||
| tiers: { | ||
| code: string; | ||
| upto: number; | ||
| tierCost: number; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| } | undefined; | ||
| runs?: { | ||
| pricing?: { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| } | undefined; | ||
| }>; | ||
| type Plan = z.infer<typeof PlanSchema>; | ||
| declare const PlansSchema: z.ZodObject<{ | ||
| free: z.ZodObject<{ | ||
| title: z.ZodString; | ||
| code: z.ZodString; | ||
| concurrentRuns: z.ZodOptional<z.ZodObject<{ | ||
| pricing: z.ZodOptional<z.ZodObject<{ | ||
| tiers: z.ZodArray<z.ZodObject<{ | ||
| code: z.ZodString; | ||
| upto: z.ZodNumber; | ||
| tierCost: z.ZodNumber; | ||
| }, "strip", z.ZodTypeAny, { | ||
| code: string; | ||
| upto: number; | ||
| tierCost: number; | ||
| }, { | ||
| code: string; | ||
| upto: number; | ||
| tierCost: number; | ||
| }>, "many">; | ||
| }, "strip", z.ZodTypeAny, { | ||
| tiers: { | ||
| code: string; | ||
| upto: number; | ||
| tierCost: number; | ||
| }[]; | ||
| }, { | ||
| tiers: { | ||
| code: string; | ||
| upto: number; | ||
| tierCost: number; | ||
| }[]; | ||
| }>>; | ||
| freeAllowance: z.ZodOptional<z.ZodNumber>; | ||
| }, "strip", z.ZodTypeAny, { | ||
| pricing?: { | ||
| tiers: { | ||
| code: string; | ||
| upto: number; | ||
| tierCost: number; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| }, { | ||
| pricing?: { | ||
| tiers: { | ||
| code: string; | ||
| upto: number; | ||
| tierCost: number; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| }>>; | ||
| runs: z.ZodOptional<z.ZodObject<{ | ||
| pricing: z.ZodOptional<z.ZodObject<{ | ||
| code: z.ZodString; | ||
| brackets: z.ZodArray<z.ZodObject<{ | ||
| upto: z.ZodOptional<z.ZodNumber>; | ||
| unitCost: z.ZodNumber; | ||
| }, "strip", z.ZodTypeAny, { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }, { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }>, "many">; | ||
| }, "strip", z.ZodTypeAny, { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| }, { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| }>>; | ||
| freeAllowance: z.ZodOptional<z.ZodNumber>; | ||
| }, "strip", z.ZodTypeAny, { | ||
| pricing?: { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| }, { | ||
| pricing?: { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| }>>; | ||
| }, "strip", z.ZodTypeAny, { | ||
| title: string; | ||
| code: string; | ||
| concurrentRuns?: { | ||
| pricing?: { | ||
| tiers: { | ||
| code: string; | ||
| upto: number; | ||
| tierCost: number; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| } | undefined; | ||
| runs?: { | ||
| pricing?: { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| } | undefined; | ||
| }, { | ||
| title: string; | ||
| code: string; | ||
| concurrentRuns?: { | ||
| pricing?: { | ||
| tiers: { | ||
| code: string; | ||
| upto: number; | ||
| tierCost: number; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| } | undefined; | ||
| runs?: { | ||
| pricing?: { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| } | undefined; | ||
| }>; | ||
| paid: z.ZodObject<{ | ||
| title: z.ZodString; | ||
| code: z.ZodString; | ||
| concurrentRuns: z.ZodOptional<z.ZodObject<{ | ||
| pricing: z.ZodOptional<z.ZodObject<{ | ||
| tiers: z.ZodArray<z.ZodObject<{ | ||
| code: z.ZodString; | ||
| upto: z.ZodNumber; | ||
| tierCost: z.ZodNumber; | ||
| }, "strip", z.ZodTypeAny, { | ||
| code: string; | ||
| upto: number; | ||
| tierCost: number; | ||
| }, { | ||
| code: string; | ||
| upto: number; | ||
| tierCost: number; | ||
| }>, "many">; | ||
| }, "strip", z.ZodTypeAny, { | ||
| tiers: { | ||
| code: string; | ||
| upto: number; | ||
| tierCost: number; | ||
| }[]; | ||
| }, { | ||
| tiers: { | ||
| code: string; | ||
| upto: number; | ||
| tierCost: number; | ||
| }[]; | ||
| }>>; | ||
| freeAllowance: z.ZodOptional<z.ZodNumber>; | ||
| }, "strip", z.ZodTypeAny, { | ||
| pricing?: { | ||
| tiers: { | ||
| code: string; | ||
| upto: number; | ||
| tierCost: number; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| }, { | ||
| pricing?: { | ||
| tiers: { | ||
| code: string; | ||
| upto: number; | ||
| tierCost: number; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| }>>; | ||
| runs: z.ZodOptional<z.ZodObject<{ | ||
| pricing: z.ZodOptional<z.ZodObject<{ | ||
| code: z.ZodString; | ||
| brackets: z.ZodArray<z.ZodObject<{ | ||
| upto: z.ZodOptional<z.ZodNumber>; | ||
| unitCost: z.ZodNumber; | ||
| }, "strip", z.ZodTypeAny, { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }, { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }>, "many">; | ||
| }, "strip", z.ZodTypeAny, { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| }, { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| }>>; | ||
| freeAllowance: z.ZodOptional<z.ZodNumber>; | ||
| }, "strip", z.ZodTypeAny, { | ||
| pricing?: { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| }, { | ||
| pricing?: { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| }>>; | ||
| }, "strip", z.ZodTypeAny, { | ||
| title: string; | ||
| code: string; | ||
| concurrentRuns?: { | ||
| pricing?: { | ||
| tiers: { | ||
| code: string; | ||
| upto: number; | ||
| tierCost: number; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| } | undefined; | ||
| runs?: { | ||
| pricing?: { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| } | undefined; | ||
| }, { | ||
| title: string; | ||
| code: string; | ||
| concurrentRuns?: { | ||
| pricing?: { | ||
| tiers: { | ||
| code: string; | ||
| upto: number; | ||
| tierCost: number; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| } | undefined; | ||
| runs?: { | ||
| pricing?: { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| } | undefined; | ||
| }>; | ||
| enterprise: z.ZodObject<{ | ||
| title: z.ZodString; | ||
| code: z.ZodString; | ||
| concurrentRuns: z.ZodOptional<z.ZodObject<{ | ||
| pricing: z.ZodOptional<z.ZodObject<{ | ||
| tiers: z.ZodArray<z.ZodObject<{ | ||
| code: z.ZodString; | ||
| upto: z.ZodNumber; | ||
| tierCost: z.ZodNumber; | ||
| }, "strip", z.ZodTypeAny, { | ||
| code: string; | ||
| upto: number; | ||
| tierCost: number; | ||
| }, { | ||
| code: string; | ||
| upto: number; | ||
| tierCost: number; | ||
| }>, "many">; | ||
| }, "strip", z.ZodTypeAny, { | ||
| tiers: { | ||
| code: string; | ||
| upto: number; | ||
| tierCost: number; | ||
| }[]; | ||
| }, { | ||
| tiers: { | ||
| code: string; | ||
| upto: number; | ||
| tierCost: number; | ||
| }[]; | ||
| }>>; | ||
| freeAllowance: z.ZodOptional<z.ZodNumber>; | ||
| }, "strip", z.ZodTypeAny, { | ||
| pricing?: { | ||
| tiers: { | ||
| code: string; | ||
| upto: number; | ||
| tierCost: number; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| }, { | ||
| pricing?: { | ||
| tiers: { | ||
| code: string; | ||
| upto: number; | ||
| tierCost: number; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| }>>; | ||
| runs: z.ZodOptional<z.ZodObject<{ | ||
| pricing: z.ZodOptional<z.ZodObject<{ | ||
| code: z.ZodString; | ||
| brackets: z.ZodArray<z.ZodObject<{ | ||
| upto: z.ZodOptional<z.ZodNumber>; | ||
| unitCost: z.ZodNumber; | ||
| }, "strip", z.ZodTypeAny, { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }, { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }>, "many">; | ||
| }, "strip", z.ZodTypeAny, { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| }, { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| }>>; | ||
| freeAllowance: z.ZodOptional<z.ZodNumber>; | ||
| }, "strip", z.ZodTypeAny, { | ||
| pricing?: { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| }, { | ||
| pricing?: { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| }>>; | ||
| }, "strip", z.ZodTypeAny, { | ||
| title: string; | ||
| code: string; | ||
| concurrentRuns?: { | ||
| pricing?: { | ||
| tiers: { | ||
| code: string; | ||
| upto: number; | ||
| tierCost: number; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| } | undefined; | ||
| runs?: { | ||
| pricing?: { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| } | undefined; | ||
| }, { | ||
| title: string; | ||
| code: string; | ||
| concurrentRuns?: { | ||
| pricing?: { | ||
| tiers: { | ||
| code: string; | ||
| upto: number; | ||
| tierCost: number; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| } | undefined; | ||
| runs?: { | ||
| pricing?: { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| } | undefined; | ||
| }>; | ||
| }, "strip", z.ZodTypeAny, { | ||
| free: { | ||
| title: string; | ||
| code: string; | ||
| concurrentRuns?: { | ||
| pricing?: { | ||
| tiers: { | ||
| code: string; | ||
| upto: number; | ||
| tierCost: number; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| } | undefined; | ||
| runs?: { | ||
| pricing?: { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| } | undefined; | ||
| }; | ||
| paid: { | ||
| title: string; | ||
| code: string; | ||
| concurrentRuns?: { | ||
| pricing?: { | ||
| tiers: { | ||
| code: string; | ||
| upto: number; | ||
| tierCost: number; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| } | undefined; | ||
| runs?: { | ||
| pricing?: { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| } | undefined; | ||
| }; | ||
| enterprise: { | ||
| title: string; | ||
| code: string; | ||
| concurrentRuns?: { | ||
| pricing?: { | ||
| tiers: { | ||
| code: string; | ||
| upto: number; | ||
| tierCost: number; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| } | undefined; | ||
| runs?: { | ||
| pricing?: { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| } | undefined; | ||
| }; | ||
| }, { | ||
| free: { | ||
| title: string; | ||
| code: string; | ||
| concurrentRuns?: { | ||
| pricing?: { | ||
| tiers: { | ||
| code: string; | ||
| upto: number; | ||
| tierCost: number; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| } | undefined; | ||
| runs?: { | ||
| pricing?: { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| } | undefined; | ||
| }; | ||
| paid: { | ||
| title: string; | ||
| code: string; | ||
| concurrentRuns?: { | ||
| pricing?: { | ||
| tiers: { | ||
| code: string; | ||
| upto: number; | ||
| tierCost: number; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| } | undefined; | ||
| runs?: { | ||
| pricing?: { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| } | undefined; | ||
| }; | ||
| enterprise: { | ||
| title: string; | ||
| code: string; | ||
| concurrentRuns?: { | ||
| pricing?: { | ||
| tiers: { | ||
| code: string; | ||
| upto: number; | ||
| tierCost: number; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| } | undefined; | ||
| runs?: { | ||
| pricing?: { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| } | undefined; | ||
| }; | ||
| }>; | ||
| type Plans = z.infer<typeof PlansSchema>; | ||
| export { Plan as P, RunPricingSchema as R, PlansSchema as a, PlanSchema as b, Plans as c }; |
+1
-1
| import { P as PricedMetric } from './pricing-df9c71b3.js'; | ||
| import { P as Plan } from './plans-872a7138.js'; | ||
| import { P as Plan } from './plans-558232c2.js'; | ||
| import 'zod'; | ||
@@ -4,0 +4,0 @@ |
+1
-1
| import { P as PricedMetric } from './pricing-df9c71b3.js'; | ||
| import { P as Plan } from './plans-872a7138.js'; | ||
| import { P as Plan } from './plans-558232c2.js'; | ||
| import 'zod'; | ||
@@ -4,0 +4,0 @@ |
@@ -1,2 +0,2 @@ | ||
| import { P as Plan } from './plans-872a7138.js'; | ||
| import { P as Plan } from './plans-558232c2.js'; | ||
| import 'zod'; | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
| import { P as Plan } from './plans-872a7138.js'; | ||
| import { P as Plan } from './plans-558232c2.js'; | ||
| import 'zod'; | ||
@@ -3,0 +3,0 @@ |
+3
-1
@@ -20,7 +20,9 @@ "use strict"; | ||
| __reExport(src_exports, require("./estimate"), module.exports); | ||
| __reExport(src_exports, require("./client"), module.exports); | ||
| // Annotate the CommonJS export names for ESM import in node: | ||
| 0 && (module.exports = { | ||
| ...require("./schemas"), | ||
| ...require("./estimate") | ||
| ...require("./estimate"), | ||
| ...require("./client") | ||
| }); | ||
| //# sourceMappingURL=index.cjs.map |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from \"./schemas\";\nexport * from \"./estimate\";\n"],"mappings":";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,wBAAc,sBAAd;AACA,wBAAc,uBADd;","names":[]} | ||
| {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from \"./schemas\";\nexport * from \"./estimate\";\nexport * from \"./client\";\n"],"mappings":";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,wBAAc,sBAAd;AACA,wBAAc,uBADd;AAEA,wBAAc,qBAFd;","names":[]} |
+414
-100
@@ -1,4 +0,5 @@ | ||
| import { z } from 'zod'; | ||
| import { z, ZodType } from 'zod'; | ||
| export { P as PricedMetric, a as PricedMetricSchema } from './pricing-df9c71b3.js'; | ||
| export { P as Plan, a as PlanSchema, b as Plans } from './plans-872a7138.js'; | ||
| import { a as PlansSchema } from './plans-558232c2.js'; | ||
| export { P as Plan, b as PlanSchema, c as Plans, R as RunPricingSchema } from './plans-558232c2.js'; | ||
| export { estimate } from './estimate.mjs'; | ||
@@ -81,4 +82,4 @@ | ||
| }, "strip", z.ZodTypeAny, { | ||
| title: string; | ||
| code: string; | ||
| title: string; | ||
| concurrentRuns?: { | ||
@@ -100,4 +101,4 @@ pricing?: { | ||
| }, { | ||
| title: string; | ||
| code: string; | ||
| title: string; | ||
| concurrentRuns?: { | ||
@@ -122,120 +123,403 @@ pricing?: { | ||
| declare const ActiveSubscriptionSchema: z.ZodObject<{ | ||
| id: z.ZodString; | ||
| status: z.ZodUnion<[z.ZodLiteral<"active">, z.ZodLiteral<"pending">, z.ZodLiteral<"canceled">, z.ZodLiteral<"terminated">]>; | ||
| createdAt: z.ZodString; | ||
| terminatedAt: z.ZodOptional<z.ZodString>; | ||
| plan: z.ZodObject<{ | ||
| title: z.ZodString; | ||
| code: z.ZodString; | ||
| concurrentRuns: z.ZodObject<{ | ||
| pricing: z.ZodOptional<z.ZodObject<{ | ||
| code: z.ZodString; | ||
| upto: z.ZodOptional<z.ZodNumber>; | ||
| tierCost: z.ZodNumber; | ||
| }, "strip", z.ZodTypeAny, { | ||
| code: string; | ||
| tierCost: number; | ||
| upto?: number | undefined; | ||
| }, { | ||
| code: string; | ||
| tierCost: number; | ||
| upto?: number | undefined; | ||
| }>>; | ||
| freeAllowance: z.ZodOptional<z.ZodNumber>; | ||
| }, "strip", z.ZodTypeAny, { | ||
| pricing?: { | ||
| code: string; | ||
| tierCost: number; | ||
| upto?: number | undefined; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| }, { | ||
| pricing?: { | ||
| code: string; | ||
| tierCost: number; | ||
| upto?: number | undefined; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| }>; | ||
| runs: z.ZodOptional<z.ZodObject<{ | ||
| pricing: z.ZodOptional<z.ZodObject<{ | ||
| code: z.ZodString; | ||
| brackets: z.ZodArray<z.ZodObject<{ | ||
| upto: z.ZodOptional<z.ZodNumber>; | ||
| unitCost: z.ZodNumber; | ||
| }, "strip", z.ZodTypeAny, { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }, { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }>, "many">; | ||
| }, "strip", z.ZodTypeAny, { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| }, { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| }>>; | ||
| freeAllowance: z.ZodOptional<z.ZodNumber>; | ||
| }, "strip", z.ZodTypeAny, { | ||
| pricing?: { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| }, { | ||
| pricing?: { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| }>>; | ||
| }, "strip", z.ZodTypeAny, { | ||
| title: string; | ||
| code: string; | ||
| concurrentRuns: { | ||
| pricing?: { | ||
| code: string; | ||
| tierCost: number; | ||
| upto?: number | undefined; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| }; | ||
| runs?: { | ||
| pricing?: { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| } | undefined; | ||
| }, { | ||
| title: string; | ||
| code: string; | ||
| concurrentRuns: { | ||
| pricing?: { | ||
| code: string; | ||
| tierCost: number; | ||
| upto?: number | undefined; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| }; | ||
| runs?: { | ||
| pricing?: { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| } | undefined; | ||
| }>; | ||
| canceledAt: z.ZodOptional<z.ZodString>; | ||
| planCode: z.ZodString; | ||
| previousPlanCode: z.ZodOptional<z.ZodString>; | ||
| nextPlanCode: z.ZodOptional<z.ZodString>; | ||
| downgradePlanDate: z.ZodOptional<z.ZodString>; | ||
| }, "strip", z.ZodTypeAny, { | ||
| status: "active" | "pending" | "canceled" | "terminated"; | ||
| id: string; | ||
| createdAt: string; | ||
| planCode: string; | ||
| terminatedAt?: string | undefined; | ||
| plan: { | ||
| title: string; | ||
| code: string; | ||
| concurrentRuns: { | ||
| pricing?: { | ||
| code: string; | ||
| tierCost: number; | ||
| upto?: number | undefined; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| }; | ||
| runs?: { | ||
| pricing?: { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| } | undefined; | ||
| }; | ||
| canceledAt?: string | undefined; | ||
| previousPlanCode?: string | undefined; | ||
| nextPlanCode?: string | undefined; | ||
| downgradePlanDate?: string | undefined; | ||
| }, { | ||
| status: "active" | "pending" | "canceled" | "terminated"; | ||
| id: string; | ||
| createdAt: string; | ||
| planCode: string; | ||
| terminatedAt?: string | undefined; | ||
| plan: { | ||
| title: string; | ||
| code: string; | ||
| concurrentRuns: { | ||
| pricing?: { | ||
| code: string; | ||
| tierCost: number; | ||
| upto?: number | undefined; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| }; | ||
| runs?: { | ||
| pricing?: { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| } | undefined; | ||
| }; | ||
| canceledAt?: string | undefined; | ||
| previousPlanCode?: string | undefined; | ||
| nextPlanCode?: string | undefined; | ||
| downgradePlanDate?: string | undefined; | ||
| }>; | ||
| type ActiveSubscription = z.infer<typeof ActiveSubscriptionSchema>; | ||
| declare const LimitsSchema: z.ZodObject<{ | ||
| runs: z.ZodOptional<z.ZodNumber>; | ||
| concurrentRuns: z.ZodNumber; | ||
| }, "strip", z.ZodTypeAny, { | ||
| concurrentRuns: number; | ||
| runs?: number | undefined; | ||
| }, { | ||
| concurrentRuns: number; | ||
| runs?: number | undefined; | ||
| }>; | ||
| type Limits = z.infer<typeof LimitsSchema>; | ||
| declare const CurrentUsageSchema: z.ZodObject<{ | ||
| declare const CurrentPlanSchema: z.ZodObject<{ | ||
| subscription: z.ZodOptional<z.ZodObject<{ | ||
| id: z.ZodString; | ||
| status: z.ZodUnion<[z.ZodLiteral<"active">, z.ZodLiteral<"pending">, z.ZodLiteral<"canceled">, z.ZodLiteral<"terminated">]>; | ||
| createdAt: z.ZodString; | ||
| terminatedAt: z.ZodOptional<z.ZodString>; | ||
| plan: z.ZodObject<{ | ||
| title: z.ZodString; | ||
| code: z.ZodString; | ||
| concurrentRuns: z.ZodObject<{ | ||
| pricing: z.ZodOptional<z.ZodObject<{ | ||
| code: z.ZodString; | ||
| upto: z.ZodOptional<z.ZodNumber>; | ||
| tierCost: z.ZodNumber; | ||
| }, "strip", z.ZodTypeAny, { | ||
| code: string; | ||
| tierCost: number; | ||
| upto?: number | undefined; | ||
| }, { | ||
| code: string; | ||
| tierCost: number; | ||
| upto?: number | undefined; | ||
| }>>; | ||
| freeAllowance: z.ZodOptional<z.ZodNumber>; | ||
| }, "strip", z.ZodTypeAny, { | ||
| pricing?: { | ||
| code: string; | ||
| tierCost: number; | ||
| upto?: number | undefined; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| }, { | ||
| pricing?: { | ||
| code: string; | ||
| tierCost: number; | ||
| upto?: number | undefined; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| }>; | ||
| runs: z.ZodOptional<z.ZodObject<{ | ||
| pricing: z.ZodOptional<z.ZodObject<{ | ||
| code: z.ZodString; | ||
| brackets: z.ZodArray<z.ZodObject<{ | ||
| upto: z.ZodOptional<z.ZodNumber>; | ||
| unitCost: z.ZodNumber; | ||
| }, "strip", z.ZodTypeAny, { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }, { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }>, "many">; | ||
| }, "strip", z.ZodTypeAny, { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| }, { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| }>>; | ||
| freeAllowance: z.ZodOptional<z.ZodNumber>; | ||
| }, "strip", z.ZodTypeAny, { | ||
| pricing?: { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| }, { | ||
| pricing?: { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| }>>; | ||
| }, "strip", z.ZodTypeAny, { | ||
| title: string; | ||
| code: string; | ||
| concurrentRuns: { | ||
| pricing?: { | ||
| code: string; | ||
| tierCost: number; | ||
| upto?: number | undefined; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| }; | ||
| runs?: { | ||
| pricing?: { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| } | undefined; | ||
| }, { | ||
| title: string; | ||
| code: string; | ||
| concurrentRuns: { | ||
| pricing?: { | ||
| code: string; | ||
| tierCost: number; | ||
| upto?: number | undefined; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| }; | ||
| runs?: { | ||
| pricing?: { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| } | undefined; | ||
| }>; | ||
| canceledAt: z.ZodOptional<z.ZodString>; | ||
| planCode: z.ZodString; | ||
| previousPlanCode: z.ZodOptional<z.ZodString>; | ||
| nextPlanCode: z.ZodOptional<z.ZodString>; | ||
| downgradePlanDate: z.ZodOptional<z.ZodString>; | ||
| }, "strip", z.ZodTypeAny, { | ||
| status: "active" | "pending" | "canceled" | "terminated"; | ||
| id: string; | ||
| createdAt: string; | ||
| planCode: string; | ||
| terminatedAt?: string | undefined; | ||
| plan: { | ||
| title: string; | ||
| code: string; | ||
| concurrentRuns: { | ||
| pricing?: { | ||
| code: string; | ||
| tierCost: number; | ||
| upto?: number | undefined; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| }; | ||
| runs?: { | ||
| pricing?: { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| } | undefined; | ||
| }; | ||
| canceledAt?: string | undefined; | ||
| previousPlanCode?: string | undefined; | ||
| nextPlanCode?: string | undefined; | ||
| downgradePlanDate?: string | undefined; | ||
| }, { | ||
| status: "active" | "pending" | "canceled" | "terminated"; | ||
| id: string; | ||
| createdAt: string; | ||
| planCode: string; | ||
| terminatedAt?: string | undefined; | ||
| plan: { | ||
| title: string; | ||
| code: string; | ||
| concurrentRuns: { | ||
| pricing?: { | ||
| code: string; | ||
| tierCost: number; | ||
| upto?: number | undefined; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| }; | ||
| runs?: { | ||
| pricing?: { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| } | undefined; | ||
| }; | ||
| canceledAt?: string | undefined; | ||
| previousPlanCode?: string | undefined; | ||
| nextPlanCode?: string | undefined; | ||
| downgradePlanDate?: string | undefined; | ||
| }>>; | ||
| limits: z.ZodObject<{ | ||
| runs: z.ZodOptional<z.ZodNumber>; | ||
| concurrentRuns: z.ZodNumber; | ||
| }, "strip", z.ZodTypeAny, { | ||
| concurrentRuns: number; | ||
| runs?: number | undefined; | ||
| }, { | ||
| concurrentRuns: number; | ||
| runs?: number | undefined; | ||
| }>; | ||
| }, "strip", z.ZodTypeAny, { | ||
| limits: { | ||
| concurrentRuns: number; | ||
| runs?: number | undefined; | ||
| }; | ||
| subscription?: { | ||
| status: "active" | "pending" | "canceled" | "terminated"; | ||
| id: string; | ||
| createdAt: string; | ||
| planCode: string; | ||
| terminatedAt?: string | undefined; | ||
| plan: { | ||
| title: string; | ||
| code: string; | ||
| concurrentRuns: { | ||
| pricing?: { | ||
| code: string; | ||
| tierCost: number; | ||
| upto?: number | undefined; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| }; | ||
| runs?: { | ||
| pricing?: { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| } | undefined; | ||
| }; | ||
| canceledAt?: string | undefined; | ||
| previousPlanCode?: string | undefined; | ||
| nextPlanCode?: string | undefined; | ||
| downgradePlanDate?: string | undefined; | ||
| } | undefined; | ||
| }, { | ||
| limits: { | ||
| concurrentRuns: number; | ||
| runs?: number | undefined; | ||
| }; | ||
| subscription?: { | ||
| status: "active" | "pending" | "canceled" | "terminated"; | ||
| id: string; | ||
| createdAt: string; | ||
| planCode: string; | ||
| terminatedAt?: string | undefined; | ||
| plan: { | ||
| title: string; | ||
| code: string; | ||
| concurrentRuns: { | ||
| pricing?: { | ||
| code: string; | ||
| tierCost: number; | ||
| upto?: number | undefined; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| }; | ||
| runs?: { | ||
| pricing?: { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| } | undefined; | ||
| }; | ||
| canceledAt?: string | undefined; | ||
| previousPlanCode?: string | undefined; | ||
| nextPlanCode?: string | undefined; | ||
| downgradePlanDate?: string | undefined; | ||
| } | undefined; | ||
| }>; | ||
| type CurrentUsage = z.infer<typeof CurrentUsageSchema>; | ||
| type CurrentPlan = z.infer<typeof CurrentPlanSchema>; | ||
| declare const SetPlanBodySchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{ | ||
@@ -385,2 +669,32 @@ type: z.ZodLiteral<"paid">; | ||
| export { ActiveSubscription, ActiveSubscriptionSchema, BracketSchema, CanceledSubscriptionResult, CreateSubscriptionFlowStart, CurrentUsage, CurrentUsageSchema, Limits, PlanDefinition, PlanDefinitionSchema, SetPlanBody, SetPlanBodySchema, SubscribeResult, SubscribeResultSchema, UpdatedSubscriptionResult }; | ||
| declare const ErrorSchema: z.ZodObject<{ | ||
| error: z.ZodString; | ||
| }, "strip", z.ZodTypeAny, { | ||
| error: string; | ||
| }, { | ||
| error: string; | ||
| }>; | ||
| type Error = z.infer<typeof ErrorSchema>; | ||
| type BillingClientConfig = { | ||
| url: string; | ||
| apiKey: string; | ||
| }; | ||
| type SuccessResult<TSchema extends ZodType> = { | ||
| success: true; | ||
| } & z.infer<TSchema>; | ||
| type ErrorResult = { | ||
| success: false; | ||
| error: string; | ||
| }; | ||
| type Result<TSchema extends ZodType> = SuccessResult<TSchema> | ErrorResult; | ||
| declare class BillingClient { | ||
| private readonly config; | ||
| constructor(config: BillingClientConfig); | ||
| plans(): Promise<Result<typeof PlansSchema>>; | ||
| currentPlan(orgId: string): Promise<Result<typeof CurrentPlanSchema>>; | ||
| setPlan(orgId: string, body: SetPlanBody): Promise<Result<typeof SubscribeResultSchema>>; | ||
| fetch<TSchema extends ZodType = z.ZodTypeAny>(path: string, schema: TSchema): Promise<Result<TSchema>>; | ||
| } | ||
| export { ActiveSubscription, ActiveSubscriptionSchema, BillingClient, BracketSchema, CanceledSubscriptionResult, CreateSubscriptionFlowStart, CurrentPlan, CurrentPlanSchema, Error, ErrorSchema, PlanDefinition, PlanDefinitionSchema, PlansSchema, SetPlanBody, SetPlanBodySchema, SubscribeResult, SubscribeResultSchema, UpdatedSubscriptionResult }; |
+414
-100
@@ -1,4 +0,5 @@ | ||
| import { z } from 'zod'; | ||
| import { z, ZodType } from 'zod'; | ||
| export { P as PricedMetric, a as PricedMetricSchema } from './pricing-df9c71b3.js'; | ||
| export { P as Plan, a as PlanSchema, b as Plans } from './plans-872a7138.js'; | ||
| import { a as PlansSchema } from './plans-558232c2.js'; | ||
| export { P as Plan, b as PlanSchema, c as Plans, R as RunPricingSchema } from './plans-558232c2.js'; | ||
| export { estimate } from './estimate.js'; | ||
@@ -81,4 +82,4 @@ | ||
| }, "strip", z.ZodTypeAny, { | ||
| title: string; | ||
| code: string; | ||
| title: string; | ||
| concurrentRuns?: { | ||
@@ -100,4 +101,4 @@ pricing?: { | ||
| }, { | ||
| title: string; | ||
| code: string; | ||
| title: string; | ||
| concurrentRuns?: { | ||
@@ -122,120 +123,403 @@ pricing?: { | ||
| declare const ActiveSubscriptionSchema: z.ZodObject<{ | ||
| id: z.ZodString; | ||
| status: z.ZodUnion<[z.ZodLiteral<"active">, z.ZodLiteral<"pending">, z.ZodLiteral<"canceled">, z.ZodLiteral<"terminated">]>; | ||
| createdAt: z.ZodString; | ||
| terminatedAt: z.ZodOptional<z.ZodString>; | ||
| plan: z.ZodObject<{ | ||
| title: z.ZodString; | ||
| code: z.ZodString; | ||
| concurrentRuns: z.ZodObject<{ | ||
| pricing: z.ZodOptional<z.ZodObject<{ | ||
| code: z.ZodString; | ||
| upto: z.ZodOptional<z.ZodNumber>; | ||
| tierCost: z.ZodNumber; | ||
| }, "strip", z.ZodTypeAny, { | ||
| code: string; | ||
| tierCost: number; | ||
| upto?: number | undefined; | ||
| }, { | ||
| code: string; | ||
| tierCost: number; | ||
| upto?: number | undefined; | ||
| }>>; | ||
| freeAllowance: z.ZodOptional<z.ZodNumber>; | ||
| }, "strip", z.ZodTypeAny, { | ||
| pricing?: { | ||
| code: string; | ||
| tierCost: number; | ||
| upto?: number | undefined; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| }, { | ||
| pricing?: { | ||
| code: string; | ||
| tierCost: number; | ||
| upto?: number | undefined; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| }>; | ||
| runs: z.ZodOptional<z.ZodObject<{ | ||
| pricing: z.ZodOptional<z.ZodObject<{ | ||
| code: z.ZodString; | ||
| brackets: z.ZodArray<z.ZodObject<{ | ||
| upto: z.ZodOptional<z.ZodNumber>; | ||
| unitCost: z.ZodNumber; | ||
| }, "strip", z.ZodTypeAny, { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }, { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }>, "many">; | ||
| }, "strip", z.ZodTypeAny, { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| }, { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| }>>; | ||
| freeAllowance: z.ZodOptional<z.ZodNumber>; | ||
| }, "strip", z.ZodTypeAny, { | ||
| pricing?: { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| }, { | ||
| pricing?: { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| }>>; | ||
| }, "strip", z.ZodTypeAny, { | ||
| title: string; | ||
| code: string; | ||
| concurrentRuns: { | ||
| pricing?: { | ||
| code: string; | ||
| tierCost: number; | ||
| upto?: number | undefined; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| }; | ||
| runs?: { | ||
| pricing?: { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| } | undefined; | ||
| }, { | ||
| title: string; | ||
| code: string; | ||
| concurrentRuns: { | ||
| pricing?: { | ||
| code: string; | ||
| tierCost: number; | ||
| upto?: number | undefined; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| }; | ||
| runs?: { | ||
| pricing?: { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| } | undefined; | ||
| }>; | ||
| canceledAt: z.ZodOptional<z.ZodString>; | ||
| planCode: z.ZodString; | ||
| previousPlanCode: z.ZodOptional<z.ZodString>; | ||
| nextPlanCode: z.ZodOptional<z.ZodString>; | ||
| downgradePlanDate: z.ZodOptional<z.ZodString>; | ||
| }, "strip", z.ZodTypeAny, { | ||
| status: "active" | "pending" | "canceled" | "terminated"; | ||
| id: string; | ||
| createdAt: string; | ||
| planCode: string; | ||
| terminatedAt?: string | undefined; | ||
| plan: { | ||
| title: string; | ||
| code: string; | ||
| concurrentRuns: { | ||
| pricing?: { | ||
| code: string; | ||
| tierCost: number; | ||
| upto?: number | undefined; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| }; | ||
| runs?: { | ||
| pricing?: { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| } | undefined; | ||
| }; | ||
| canceledAt?: string | undefined; | ||
| previousPlanCode?: string | undefined; | ||
| nextPlanCode?: string | undefined; | ||
| downgradePlanDate?: string | undefined; | ||
| }, { | ||
| status: "active" | "pending" | "canceled" | "terminated"; | ||
| id: string; | ||
| createdAt: string; | ||
| planCode: string; | ||
| terminatedAt?: string | undefined; | ||
| plan: { | ||
| title: string; | ||
| code: string; | ||
| concurrentRuns: { | ||
| pricing?: { | ||
| code: string; | ||
| tierCost: number; | ||
| upto?: number | undefined; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| }; | ||
| runs?: { | ||
| pricing?: { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| } | undefined; | ||
| }; | ||
| canceledAt?: string | undefined; | ||
| previousPlanCode?: string | undefined; | ||
| nextPlanCode?: string | undefined; | ||
| downgradePlanDate?: string | undefined; | ||
| }>; | ||
| type ActiveSubscription = z.infer<typeof ActiveSubscriptionSchema>; | ||
| declare const LimitsSchema: z.ZodObject<{ | ||
| runs: z.ZodOptional<z.ZodNumber>; | ||
| concurrentRuns: z.ZodNumber; | ||
| }, "strip", z.ZodTypeAny, { | ||
| concurrentRuns: number; | ||
| runs?: number | undefined; | ||
| }, { | ||
| concurrentRuns: number; | ||
| runs?: number | undefined; | ||
| }>; | ||
| type Limits = z.infer<typeof LimitsSchema>; | ||
| declare const CurrentUsageSchema: z.ZodObject<{ | ||
| declare const CurrentPlanSchema: z.ZodObject<{ | ||
| subscription: z.ZodOptional<z.ZodObject<{ | ||
| id: z.ZodString; | ||
| status: z.ZodUnion<[z.ZodLiteral<"active">, z.ZodLiteral<"pending">, z.ZodLiteral<"canceled">, z.ZodLiteral<"terminated">]>; | ||
| createdAt: z.ZodString; | ||
| terminatedAt: z.ZodOptional<z.ZodString>; | ||
| plan: z.ZodObject<{ | ||
| title: z.ZodString; | ||
| code: z.ZodString; | ||
| concurrentRuns: z.ZodObject<{ | ||
| pricing: z.ZodOptional<z.ZodObject<{ | ||
| code: z.ZodString; | ||
| upto: z.ZodOptional<z.ZodNumber>; | ||
| tierCost: z.ZodNumber; | ||
| }, "strip", z.ZodTypeAny, { | ||
| code: string; | ||
| tierCost: number; | ||
| upto?: number | undefined; | ||
| }, { | ||
| code: string; | ||
| tierCost: number; | ||
| upto?: number | undefined; | ||
| }>>; | ||
| freeAllowance: z.ZodOptional<z.ZodNumber>; | ||
| }, "strip", z.ZodTypeAny, { | ||
| pricing?: { | ||
| code: string; | ||
| tierCost: number; | ||
| upto?: number | undefined; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| }, { | ||
| pricing?: { | ||
| code: string; | ||
| tierCost: number; | ||
| upto?: number | undefined; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| }>; | ||
| runs: z.ZodOptional<z.ZodObject<{ | ||
| pricing: z.ZodOptional<z.ZodObject<{ | ||
| code: z.ZodString; | ||
| brackets: z.ZodArray<z.ZodObject<{ | ||
| upto: z.ZodOptional<z.ZodNumber>; | ||
| unitCost: z.ZodNumber; | ||
| }, "strip", z.ZodTypeAny, { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }, { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }>, "many">; | ||
| }, "strip", z.ZodTypeAny, { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| }, { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| }>>; | ||
| freeAllowance: z.ZodOptional<z.ZodNumber>; | ||
| }, "strip", z.ZodTypeAny, { | ||
| pricing?: { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| }, { | ||
| pricing?: { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| }>>; | ||
| }, "strip", z.ZodTypeAny, { | ||
| title: string; | ||
| code: string; | ||
| concurrentRuns: { | ||
| pricing?: { | ||
| code: string; | ||
| tierCost: number; | ||
| upto?: number | undefined; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| }; | ||
| runs?: { | ||
| pricing?: { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| } | undefined; | ||
| }, { | ||
| title: string; | ||
| code: string; | ||
| concurrentRuns: { | ||
| pricing?: { | ||
| code: string; | ||
| tierCost: number; | ||
| upto?: number | undefined; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| }; | ||
| runs?: { | ||
| pricing?: { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| } | undefined; | ||
| }>; | ||
| canceledAt: z.ZodOptional<z.ZodString>; | ||
| planCode: z.ZodString; | ||
| previousPlanCode: z.ZodOptional<z.ZodString>; | ||
| nextPlanCode: z.ZodOptional<z.ZodString>; | ||
| downgradePlanDate: z.ZodOptional<z.ZodString>; | ||
| }, "strip", z.ZodTypeAny, { | ||
| status: "active" | "pending" | "canceled" | "terminated"; | ||
| id: string; | ||
| createdAt: string; | ||
| planCode: string; | ||
| terminatedAt?: string | undefined; | ||
| plan: { | ||
| title: string; | ||
| code: string; | ||
| concurrentRuns: { | ||
| pricing?: { | ||
| code: string; | ||
| tierCost: number; | ||
| upto?: number | undefined; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| }; | ||
| runs?: { | ||
| pricing?: { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| } | undefined; | ||
| }; | ||
| canceledAt?: string | undefined; | ||
| previousPlanCode?: string | undefined; | ||
| nextPlanCode?: string | undefined; | ||
| downgradePlanDate?: string | undefined; | ||
| }, { | ||
| status: "active" | "pending" | "canceled" | "terminated"; | ||
| id: string; | ||
| createdAt: string; | ||
| planCode: string; | ||
| terminatedAt?: string | undefined; | ||
| plan: { | ||
| title: string; | ||
| code: string; | ||
| concurrentRuns: { | ||
| pricing?: { | ||
| code: string; | ||
| tierCost: number; | ||
| upto?: number | undefined; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| }; | ||
| runs?: { | ||
| pricing?: { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| } | undefined; | ||
| }; | ||
| canceledAt?: string | undefined; | ||
| previousPlanCode?: string | undefined; | ||
| nextPlanCode?: string | undefined; | ||
| downgradePlanDate?: string | undefined; | ||
| }>>; | ||
| limits: z.ZodObject<{ | ||
| runs: z.ZodOptional<z.ZodNumber>; | ||
| concurrentRuns: z.ZodNumber; | ||
| }, "strip", z.ZodTypeAny, { | ||
| concurrentRuns: number; | ||
| runs?: number | undefined; | ||
| }, { | ||
| concurrentRuns: number; | ||
| runs?: number | undefined; | ||
| }>; | ||
| }, "strip", z.ZodTypeAny, { | ||
| limits: { | ||
| concurrentRuns: number; | ||
| runs?: number | undefined; | ||
| }; | ||
| subscription?: { | ||
| status: "active" | "pending" | "canceled" | "terminated"; | ||
| id: string; | ||
| createdAt: string; | ||
| planCode: string; | ||
| terminatedAt?: string | undefined; | ||
| plan: { | ||
| title: string; | ||
| code: string; | ||
| concurrentRuns: { | ||
| pricing?: { | ||
| code: string; | ||
| tierCost: number; | ||
| upto?: number | undefined; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| }; | ||
| runs?: { | ||
| pricing?: { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| } | undefined; | ||
| }; | ||
| canceledAt?: string | undefined; | ||
| previousPlanCode?: string | undefined; | ||
| nextPlanCode?: string | undefined; | ||
| downgradePlanDate?: string | undefined; | ||
| } | undefined; | ||
| }, { | ||
| limits: { | ||
| concurrentRuns: number; | ||
| runs?: number | undefined; | ||
| }; | ||
| subscription?: { | ||
| status: "active" | "pending" | "canceled" | "terminated"; | ||
| id: string; | ||
| createdAt: string; | ||
| planCode: string; | ||
| terminatedAt?: string | undefined; | ||
| plan: { | ||
| title: string; | ||
| code: string; | ||
| concurrentRuns: { | ||
| pricing?: { | ||
| code: string; | ||
| tierCost: number; | ||
| upto?: number | undefined; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| }; | ||
| runs?: { | ||
| pricing?: { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| } | undefined; | ||
| }; | ||
| canceledAt?: string | undefined; | ||
| previousPlanCode?: string | undefined; | ||
| nextPlanCode?: string | undefined; | ||
| downgradePlanDate?: string | undefined; | ||
| } | undefined; | ||
| }>; | ||
| type CurrentUsage = z.infer<typeof CurrentUsageSchema>; | ||
| type CurrentPlan = z.infer<typeof CurrentPlanSchema>; | ||
| declare const SetPlanBodySchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{ | ||
@@ -385,2 +669,32 @@ type: z.ZodLiteral<"paid">; | ||
| export { ActiveSubscription, ActiveSubscriptionSchema, BracketSchema, CanceledSubscriptionResult, CreateSubscriptionFlowStart, CurrentUsage, CurrentUsageSchema, Limits, PlanDefinition, PlanDefinitionSchema, SetPlanBody, SetPlanBodySchema, SubscribeResult, SubscribeResultSchema, UpdatedSubscriptionResult }; | ||
| declare const ErrorSchema: z.ZodObject<{ | ||
| error: z.ZodString; | ||
| }, "strip", z.ZodTypeAny, { | ||
| error: string; | ||
| }, { | ||
| error: string; | ||
| }>; | ||
| type Error = z.infer<typeof ErrorSchema>; | ||
| type BillingClientConfig = { | ||
| url: string; | ||
| apiKey: string; | ||
| }; | ||
| type SuccessResult<TSchema extends ZodType> = { | ||
| success: true; | ||
| } & z.infer<TSchema>; | ||
| type ErrorResult = { | ||
| success: false; | ||
| error: string; | ||
| }; | ||
| type Result<TSchema extends ZodType> = SuccessResult<TSchema> | ErrorResult; | ||
| declare class BillingClient { | ||
| private readonly config; | ||
| constructor(config: BillingClientConfig); | ||
| plans(): Promise<Result<typeof PlansSchema>>; | ||
| currentPlan(orgId: string): Promise<Result<typeof CurrentPlanSchema>>; | ||
| setPlan(orgId: string, body: SetPlanBody): Promise<Result<typeof SubscribeResultSchema>>; | ||
| fetch<TSchema extends ZodType = z.ZodTypeAny>(path: string, schema: TSchema): Promise<Result<TSchema>>; | ||
| } | ||
| export { ActiveSubscription, ActiveSubscriptionSchema, BillingClient, BracketSchema, CanceledSubscriptionResult, CreateSubscriptionFlowStart, CurrentPlan, CurrentPlanSchema, Error, ErrorSchema, PlanDefinition, PlanDefinitionSchema, PlansSchema, SetPlanBody, SetPlanBodySchema, SubscribeResult, SubscribeResultSchema, UpdatedSubscriptionResult }; |
+1
-0
| export * from "./schemas"; | ||
| export * from "./estimate"; | ||
| export * from "./client"; | ||
| //# sourceMappingURL=index.js.map |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from \"./schemas\";\nexport * from \"./estimate\";\n"],"mappings":"AAAA,cAAc;AACd,cAAc;","names":[]} | ||
| {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from \"./schemas\";\nexport * from \"./estimate\";\nexport * from \"./client\";\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;","names":[]} |
+1
-1
| { | ||
| "name": "@trigger.dev/billing", | ||
| "version": "1.0.1", | ||
| "version": "1.0.2", | ||
| "description": "Calculates the billing for a given organization", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
| import { z } from 'zod'; | ||
| declare const PlanSchema: z.ZodObject<{ | ||
| title: z.ZodString; | ||
| code: z.ZodString; | ||
| concurrentRuns: z.ZodOptional<z.ZodObject<{ | ||
| pricing: z.ZodOptional<z.ZodObject<{ | ||
| tiers: z.ZodArray<z.ZodObject<{ | ||
| code: z.ZodString; | ||
| upto: z.ZodNumber; | ||
| tierCost: z.ZodNumber; | ||
| }, "strip", z.ZodTypeAny, { | ||
| code: string; | ||
| upto: number; | ||
| tierCost: number; | ||
| }, { | ||
| code: string; | ||
| upto: number; | ||
| tierCost: number; | ||
| }>, "many">; | ||
| }, "strip", z.ZodTypeAny, { | ||
| tiers: { | ||
| code: string; | ||
| upto: number; | ||
| tierCost: number; | ||
| }[]; | ||
| }, { | ||
| tiers: { | ||
| code: string; | ||
| upto: number; | ||
| tierCost: number; | ||
| }[]; | ||
| }>>; | ||
| freeAllowance: z.ZodOptional<z.ZodNumber>; | ||
| }, "strip", z.ZodTypeAny, { | ||
| pricing?: { | ||
| tiers: { | ||
| code: string; | ||
| upto: number; | ||
| tierCost: number; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| }, { | ||
| pricing?: { | ||
| tiers: { | ||
| code: string; | ||
| upto: number; | ||
| tierCost: number; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| }>>; | ||
| runs: z.ZodOptional<z.ZodObject<{ | ||
| pricing: z.ZodOptional<z.ZodObject<{ | ||
| code: z.ZodString; | ||
| brackets: z.ZodArray<z.ZodObject<{ | ||
| upto: z.ZodOptional<z.ZodNumber>; | ||
| unitCost: z.ZodNumber; | ||
| }, "strip", z.ZodTypeAny, { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }, { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }>, "many">; | ||
| }, "strip", z.ZodTypeAny, { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| }, { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| }>>; | ||
| freeAllowance: z.ZodOptional<z.ZodNumber>; | ||
| }, "strip", z.ZodTypeAny, { | ||
| pricing?: { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| }, { | ||
| pricing?: { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| }>>; | ||
| }, "strip", z.ZodTypeAny, { | ||
| code: string; | ||
| title: string; | ||
| concurrentRuns?: { | ||
| pricing?: { | ||
| tiers: { | ||
| code: string; | ||
| upto: number; | ||
| tierCost: number; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| } | undefined; | ||
| runs?: { | ||
| pricing?: { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| } | undefined; | ||
| }, { | ||
| code: string; | ||
| title: string; | ||
| concurrentRuns?: { | ||
| pricing?: { | ||
| tiers: { | ||
| code: string; | ||
| upto: number; | ||
| tierCost: number; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| } | undefined; | ||
| runs?: { | ||
| pricing?: { | ||
| code: string; | ||
| brackets: { | ||
| unitCost: number; | ||
| upto?: number | undefined; | ||
| }[]; | ||
| } | undefined; | ||
| freeAllowance?: number | undefined; | ||
| } | undefined; | ||
| }>; | ||
| type Plan = z.infer<typeof PlanSchema>; | ||
| type Plans = { | ||
| free: Plan; | ||
| paid: Plan; | ||
| enterprise: Plan; | ||
| }; | ||
| export { Plan as P, PlanSchema as a, Plans as b }; |
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
127655
44.19%2350
66.31%2
Infinity%