import * as plugins from '../../plugins.js'; import type { IWebPushEncryptedEnvelope } from '../../webpush/classes.webpush-crypto.js'; export interface IWebPushStoredCredential { id: string; status: plugins.servezoneInterfaces.data.TWebPushCredentialStatus; hmacKeyId: string; secretHash?: string; createdAt: number; updatedAt: number; lastRotatedAt: number | null; validUntil: number | null; } export interface IWebPushStoredVapidKey { id: string; publicKey: string; status: plugins.servezoneInterfaces.data.TWebPushVapidKeyStatus; createdAt: number; activatedAt: number | null; retireAfter: number | null; retiredAt: number | null; privateKeyEnvelope?: IWebPushEncryptedEnvelope; } export interface IWebPushCredentialRotationRecovery { requestedCredentialId: string; resultingCredentialId: string; lifecycleGeneration: number; secretEnvelope: IWebPushEncryptedEnvelope; createdAt: number; expiresAt: number; } export type TWebPushControllerIntent = 'enabled' | 'disabled' | 'deleted'; export interface IWebPushStoredControllerFence { id: string; epoch: string; generation: number; operationId: string; intent: TWebPushControllerIntent; requestDigest: string; appliedAt: number; } export declare class WebPushBindingDoc extends plugins.smartdata.SmartDataDbDoc { id: string; ownerGatewayClientType: plugins.servezoneInterfaces.data.TGatewayClientType; ownerGatewayClientId: string; ownerAppInstanceId: string; enabled: boolean; status: plugins.servezoneInterfaces.data.TWebPushBindingStatus; credential: IWebPushStoredCredential; /** At most one still-valid overlap credential; expired entries are scrubbed. */ previousCredentials: IWebPushStoredCredential[]; /** MUST BE ABSENT outside the bounded idempotent credential-rotation replay window. */ credentialRotationRecovery?: IWebPushCredentialRotationRecovery; vapidKeys: IWebPushStoredVapidKey[]; createdAt: number; updatedAt: number; createdBy: string; mutationRevision: number; lifecycleGeneration: number; /** Highest durably applied controller mutation for this owner-reserving binding. */ controllerFence?: IWebPushStoredControllerFence; /** MUST BE ABSENT unless this owner-reserving binding is a deletion tombstone. */ deletedAt?: number; static getNativeCollection(): plugins.smartdata.SmartdataCollection['mongoDbCollection']; createSavableObject(): Promise; }