import type { Context } from "../context.ts"; import { type PlanetScaleProps } from "./api.ts"; import type { Branch } from "./branch.ts"; import type { Database } from "./database.ts"; import type { Role } from "./role.ts"; export interface DefaultRoleProps extends PlanetScaleProps { /** * The organization where the role will be created * Required when using string database name, optional when using Database resource * @default process.env.PLANETSCALE_ORGANIZATION */ organization?: string; /** * The database where the role will be created * Can be either a database name (string) or Database resource */ database: string | Database; /** * The branch where the role will be created * Can be either a branch name (string) or Branch resource * @default "main" */ branch?: string | Branch; /** * Whether to force reset the default role if it already exists. * This will delete the existing role and create a new one. * * Note: Adopting an existing role is not supported because the password is only returned after create. * * @default false */ forceReset?: boolean; } export type DefaultRole = Omit; /** * Create and manage the default role for a PlanetScale PostgreSQL database branch. * * If a default role already exists for this database and branch combination, you may need to use the `forceReset` property to reset the role. * * For MySQL, use [Passwords](./password.ts) instead. * * @example * const database = await Database("my-database", { * kind: "postgresql", * }); * const defaultRole = await DefaultRole("my-default-role", { * database, * }); */ export declare const DefaultRole: (((this: any, id: string, props?: {}) => never) & (new (_: never) => never)) | ((this: Context, _id: string, props: DefaultRoleProps) => Promise); //# sourceMappingURL=default-role.d.ts.map