import { SmrtCollection } from '@happyvertical/smrt-core'; import { Secret, SecretStatus } from '../models/Secret.js'; /** * Options for listing secrets */ export interface ListSecretsOptions { /** Filter by category */ category?: string; /** Filter by status */ status?: SecretStatus; /** Include expired secrets */ includeExpired?: boolean; /** Maximum number of results */ limit?: number; /** Offset for pagination */ offset?: number; } /** * Collection for managing Secret objects * * All lookups take an explicit `tenantId` and scope on the authoritative * `tenant_id` column. Scoping must NOT rely on the tenancy interceptor * (which may be disabled in the host application) and must NOT use the * `context` column: `context = tenantId` is only a convention applied on * the create path, so pre-convention rows may have a divergent `context`. * See https://github.com/happyvertical/smrt/issues/1501 */ export declare class SecretCollection extends SmrtCollection { static readonly _itemClass: typeof Secret; /** * Find a secret by name within the given tenant */ findByName(tenantId: string, name: string): Promise; /** * List secrets for a tenant with filtering options */ listSecrets(tenantId: string, options?: ListSecretsOptions): Promise; /** * List all active secrets for a tenant */ listActive(tenantId: string): Promise; /** * List a tenant's secrets by category */ listByCategory(tenantId: string, category: string): Promise; /** * List a tenant's secrets that need attention (expired or about to expire) */ listExpiring(tenantId: string, daysAhead?: number): Promise; /** * Get categories used in a tenant's secrets */ getCategories(tenantId: string): Promise; /** * Count a tenant's secrets by status */ countByStatus(tenantId: string): Promise>; /** * Delete a tenant's secret by name */ deleteByName(tenantId: string, name: string): Promise; } //# sourceMappingURL=SecretCollection.d.ts.map