import { ActionProcedureDescriptor } from '@voltro/protocol'; import { PluginRpcClientDescriptor } from '@voltro/protocol'; import { QueryProcedureDescriptor } from '@voltro/protocol'; import { Schema } from 'effect'; /** * A billing failure. `transient: true` marks failures the service retries * (network blip talking to the provider); non-transient failures (a 4xx * from the provider, a misconfigured plan) are surfaced immediately. The * `billingPlugin` registers this via `errorSchemas` so it decodes TYPED on * the client rather than crossing as an untyped defect. */ declare class BillingError extends BillingError_base { } declare const BillingError_base: Schema.TaggedErrorClass; } & { /** Where the failure originated — provider name or an internal stage. */ source: typeof Schema.String; message: typeof Schema.String; /** Retryable? The service retries `transient` failures on a Schedule. */ transient: typeof Schema.Boolean; }>; /** Declared for the codegen (`VoltroPlugin.rpcClientDescriptors`) so each tag is * emitted into the generated client group. Kept in lockstep with the exports. */ export declare const billingRpcClientImports: ReadonlyArray; export declare const changePlanDescriptor: ActionProcedureDescriptor<"billing.changePlan", Schema.Struct<{ plan: typeof Schema.String; }>, Schema.Struct<{ plan: typeof Schema.String; quantity: typeof Schema.Number; /** Integer minor-unit settlement: > 0 charge, < 0 credit, 0 at boundary. */ prorationMinor: typeof Schema.Number; currency: typeof Schema.String; }>, typeof BillingError>; export declare const changeSeatsDescriptor: ActionProcedureDescriptor<"billing.changeSeats", Schema.Struct<{ quantity: typeof Schema.Number; }>, Schema.Struct<{ plan: typeof Schema.String; quantity: typeof Schema.Number; /** Integer minor-unit settlement: > 0 charge, < 0 credit, 0 at boundary. */ prorationMinor: typeof Schema.Number; currency: typeof Schema.String; }>, typeof BillingError>; /** * "Is this tenant entitled right now?" — the dunning-aware answer a billing * banner needs. `entitled: false` means the grace period expired; `inGrace` * with a `graceEndsAt` is the "your payment failed, you have until …" state. * Timestamps are ISO strings (the descriptor's Schema is String, so a Date * would fail encode at the boundary). */ export declare const entitlementStatusDescriptor: QueryProcedureDescriptor<"billing.entitlementStatus", Schema.Struct<{}>, Schema.Struct<{ plan: typeof Schema.String; billedPlan: typeof Schema.String; status: typeof Schema.String; entitled: typeof Schema.Boolean; inGrace: typeof Schema.Boolean; graceEndsAt: Schema.NullOr; lockedSince: Schema.NullOr; lockout: typeof Schema.String; }>, typeof BillingError>; /** The provider's invoice history. `hostedUrl` / `pdfUrl` are the provider's * own pages — we never render an invoice ourselves. */ export declare const invoicesDescriptor: QueryProcedureDescriptor<"billing.invoices", Schema.Struct<{}>, Schema.Struct<{ invoices: Schema.Array$; hostedUrl: Schema.NullOr; pdfUrl: Schema.NullOr; }>>; }>, typeof BillingError>; export declare const portalUrlDescriptor: ActionProcedureDescriptor<"billing.portalUrl", Schema.Struct<{ returnUrl: typeof Schema.String; }>, Schema.Struct<{ url: typeof Schema.String; }>, typeof BillingError>; /** What a plan/seat change would cost, from the provider's invoice preview. * Quote THIS in a confirmation dialog — a locally-estimated figure differs * from the charge by the provider's rounding, tax and credit balance. */ export declare const previewChangeDescriptor: ActionProcedureDescriptor<"billing.previewChange", Schema.Struct<{ plan: Schema.optional; quantity: Schema.optional; }>, Schema.Struct<{ plan: typeof Schema.String; quantity: typeof Schema.Number; /** Integer minor-unit settlement: > 0 charge, < 0 credit, 0 at boundary. */ prorationMinor: typeof Schema.Number; currency: typeof Schema.String; }>, typeof BillingError>; export declare const reportUsageDescriptor: ActionProcedureDescriptor<"billing.reportUsage", Schema.Struct<{ key: typeof Schema.String; quantity: typeof Schema.Number; }>, Schema.Struct<{ ok: typeof Schema.Boolean; }>, typeof BillingError>; export declare const startCheckoutDescriptor: ActionProcedureDescriptor<"billing.startCheckout", Schema.Struct<{ plan: typeof Schema.String; successUrl: typeof Schema.String; cancelUrl: typeof Schema.String; /** Seats to buy up front. Omit for 1. */ quantity: Schema.optional; }>, Schema.Struct<{ url: typeof Schema.String; }>, typeof BillingError>; export declare const subscriptionDescriptor: QueryProcedureDescriptor<"billing.subscription", Schema.Struct<{}>, Schema.Struct<{ subscription: Schema.NullOr; cancelAt: Schema.NullOr; }>>; }>, typeof BillingError>; export { }