export type EncryptionMaterialStatus = "active" | "archived"; export interface BaseDataEncryptionMaterial { id: string; company_id: number; created_at: string; description: string | null; display_name: string; tags: string[]; updated_at: string; } export interface OwnedDataEncryptionMaterial extends BaseDataEncryptionMaterial { type: "owned"; collaborators: unknown; updated_by: number; } export interface SharedDataEncryptionMaterial extends BaseDataEncryptionMaterial { type: "shared"; } export type DataEncryptionMaterial = OwnedDataEncryptionMaterial | SharedDataEncryptionMaterial; /** * Shape returned by `GET /encryption-materials/decrypted`. Unlike the other * encryption material responses, this exposes the raw (base64-encoded) key * material and does not carry any of the display/tagging metadata. */ export interface DecryptedDataEncryptionMaterial { id: string; company_id: number; /** Base64-encoded decrypted encryption key. */ key: string; /** Base64-encoded encryption salt. */ salt: string; } export interface CreateEncryptionMaterialRequest { display_name: string; description?: string; tags?: string[]; } export interface UpdateEncryptionMaterialRequest { display_name: string; description?: string; /** If provided, must contain at least one tag. */ tags?: string[]; }