import type { Selectable } from 'kysely'; import type * as Db from '../Db.js'; import type * as db_Schema from '../Schema.js'; /** Columns of the `enabled_billing_sources` table, derived from `Schema.EnabledBillingSource`. */ export type Table = db_Schema.EnabledBillingSource; /** A stored enabled billing-source row. */ export type Record = Selectable; /** An enabled billing-source type. */ export type Source = Record['source']; /** Billing-source types in canonical display order. */ export declare const sources: readonly ["stripe", "tempo"]; /** * Enables a billing-source type for an organization. * * @param db - The database. * @param input - The source to enable. * @returns The stored row, or `undefined` when already enabled. */ export declare function add(db: Db.Db, input: add.Input): Promise; export declare namespace add { /** Fields accepted when enabling a billing source. */ type Input = { /** Identity enabling the source. */ createdBy: string; /** Organization id (`org_…`) the source is enabled for. */ orgId: string; /** Billing-source type to enable. */ source: Source; }; } /** * Lists an organization's enabled billing sources in canonical order. * * @param db - The database. * @param orgId - The organization id (`org_…`). * @returns The enabled sources. */ export declare function listByOrg(db: Db.Db, orgId: string): Promise; /** * Removes one enabled billing source from an organization. * * @param db - The database. * @param input - The source to remove. * @returns The removed row, or `undefined` when absent. */ export declare function remove(db: Db.Db, input: remove.Input): Promise; export declare namespace remove { /** Fields identifying one enabled billing source. */ type Input = { /** Organization id (`org_…`) the source is enabled for. */ orgId: string; /** Billing-source type to remove. */ source: Source; }; } /** * Checks whether a billing-source type is enabled for an organization. * * @param db - The database. * @param input - The source to check. * @returns Whether the source is enabled. */ export declare function isEnabled(db: Db.Db, input: isEnabled.Input): Promise; export declare namespace isEnabled { /** Fields identifying one enabled billing source. */ type Input = { /** Organization id (`org_…`) the source is enabled for. */ orgId: string; /** Billing-source type to check. */ source: Source; }; } //# sourceMappingURL=enabledBillingSources.d.ts.map