/** * Feature flags — per-project, optionally scoped to an environment. * * GET /flags?projectId=&environmentId=&limit=&offset= * POST /flags — create * PATCH /flags — update (body carries id) * DELETE /flags — delete (body carries id) * * The API intentionally uses body-carried ids (instead of path params) * so callers can target a flag with a single round-trip regardless of * which environment it's bound to. */ import type { Client } from './client.js'; export interface Flag { readonly id: string; readonly key: string; readonly name: string; readonly description: string | null; readonly enabled: boolean; readonly rolloutPercentage: number; readonly targetPremiumOnly: boolean; readonly targetAdminOnly: boolean; readonly sortOrder: number; readonly environmentId: string | null; readonly createdAt: string; readonly updatedAt: string | null; } export interface ListOptions { readonly environmentId?: string; readonly limit?: number; readonly offset?: number; } export interface ListResult { readonly flags: readonly Flag[]; readonly total: number; } export declare const list: (client: Client, projectId: string, options?: ListOptions) => Promise; export interface CreateInput { readonly projectId: string; readonly environmentId?: string; readonly key: string; readonly name: string; readonly description?: string; readonly enabled?: boolean; readonly rolloutPercentage?: number; readonly targetPremiumOnly?: boolean; readonly targetAdminOnly?: boolean; } export interface CreatedFlag { readonly id: string; readonly key: string; readonly name: string; readonly enabled: boolean; readonly rolloutPercentage: number; readonly environmentId: string | null; } export declare const create: (client: Client, input: CreateInput) => Promise; export interface UpdateInput { readonly projectId: string; readonly environmentId?: string; readonly key: string; readonly name?: string; readonly description?: string | null; readonly enabled?: boolean; readonly rolloutPercentage?: number; readonly targetPremiumOnly?: boolean; readonly targetAdminOnly?: boolean; readonly expectedVersion?: string; } export interface UpdatedFlag { readonly id: string; readonly key: string; readonly name: string; readonly enabled: boolean; readonly rolloutPercentage: number; } export declare const update: (client: Client, input: UpdateInput) => Promise; declare const _delete: (client: Client, input: { readonly id: string; readonly projectId: string; }) => Promise<{ success: boolean; }>; export { _delete as delete }; //# sourceMappingURL=flags.d.ts.map