import { BaseEvent } from "@credo-ts/core"; //#region src/VaultsEvents.d.ts /** * Vault event types — spec § Messages control plane only. * * The legacy event types (VaultCreated, VaultShared, ShareRequested, * Storage* etc.) are gone alongside the legacy messages. Application * code subscribes to these to react to the 5 spec messages. */ declare enum VaultEventTypes { ProposeReceived = "vaults/ProposeReceived", OfferReceived = "vaults/OfferReceived", AccessGranted = "vaults/AccessGranted", Sealed = "vaults/Sealed", Retired = "vaults/Retired", ProblemReport = "vaults/ProblemReport", } interface ProposeReceivedEvent extends BaseEvent { type: typeof VaultEventTypes.ProposeReceived; payload: { purpose: string; participants: string[]; constraints?: unknown; backendPrefs: string[]; indexSchema: string[]; from?: string; threadId?: string; }; } interface OfferReceivedEvent extends BaseEvent { type: typeof VaultEventTypes.OfferReceived; payload: { vaultDescriptor: Record; provisioner?: string; from?: string; threadId?: string; }; } interface AccessGrantedEvent extends BaseEvent { type: typeof VaultEventTypes.AccessGranted; payload: { to: string; capability: Record; grantedBy?: string; receivedAt: string; }; } interface SealedEvent extends BaseEvent { type: typeof VaultEventTypes.Sealed; payload: { vaultId: string; mode: string; from?: string; }; } interface RetiredEvent extends BaseEvent { type: typeof VaultEventTypes.Retired; payload: { vaultId: string; strategy: 'delete' | 'destroy-keys'; evidenceDocId?: string; from?: string; }; } interface ProblemReportReceivedEvent extends BaseEvent { type: typeof VaultEventTypes.ProblemReport; payload: { errorCode?: string; description?: string; vaultId?: string; threadId?: string; from?: string; }; } type VaultEvent = ProposeReceivedEvent | OfferReceivedEvent | AccessGrantedEvent | SealedEvent | RetiredEvent | ProblemReportReceivedEvent; //#endregion export { AccessGrantedEvent, OfferReceivedEvent, ProblemReportReceivedEvent, ProposeReceivedEvent, RetiredEvent, SealedEvent, VaultEvent, VaultEventTypes }; //# sourceMappingURL=VaultsEvents.d.mts.map