import type { Settings } from "@opengeni/config"; import type { ManagedEmailTransport } from "@opengeni/core"; export type OrganizationUserSetupEmailTokenTransport = "fragment" | "query"; /** * Prove that the stable invited-user setup bearer can be constructed before an * invitation commits. Provider availability is intentionally outside this * precondition: the durable delivery journal records a failed or ambiguous * transport outcome after the invitation exists. */ export declare function assertOrganizationUserSetupDeliveryConfigured(settings: Settings, transport: ManagedEmailTransport): void; /** Enforce the query-bearing edge proof for env and embedded settings alike. */ export declare function assertOrganizationUserSetupQueryTransportConfigured(settings: Pick): void; /** Reject an invalid embedded-provider contract before any durable boundary. */ export declare function assertManagedEmailTransportMetadata(transport: ManagedEmailTransport): void; export declare function deriveOrganizationUserSetupToken(settings: Settings, input: { invitationId: string; deliveryId: string; transport?: OrganizationUserSetupEmailTokenTransport; }): Promise<{ token: string; digest: string; url: string; }>; export type OrganizationUserSetupEmailSnapshot = { senderEmail: string; recipientEmail: string; recipientName: string | null; organizationName: string; organizationRole: "owner" | "admin" | "member"; sharedWorkspaceAccess: Array<{ workspaceId: string; workspaceName: string; role: "viewer" | "member" | "admin"; }>; setupUrl: string; }; export declare function renderOrganizationUserSetupEmail(input: OrganizationUserSetupEmailSnapshot): { from: string; to: string; subject: string; text: string; html: string; }; export declare function organizationUserSetupPayloadDigest(input: { from: string; to: string; subject: string; text: string; html: string; providerIdempotencyScope: string; }): Promise; export declare function resolveOrganizationUserSetupDeliveryEmail(settings: Settings, input: { invitationId: string; deliveryId: string; senderEmail: string; recipientEmail: string; recipientName: string | null; organizationName: string; organizationRole: "owner" | "admin" | "member"; sharedWorkspaceAccess: OrganizationUserSetupEmailSnapshot["sharedWorkspaceAccess"]; providerIdempotencyScope: string; frozenTransport: OrganizationUserSetupEmailTokenTransport | null; frozenPayloadDigest: string | null; }): Promise<{ transport: OrganizationUserSetupEmailTokenTransport; token: string; tokenDigest: string; payloadDigest: string; message: ReturnType; }>; export declare function organizationUserSetupRequestFingerprint(settings: Settings, input: { tokenDigest: string; name: string; password: string; }): Promise; export declare function selfServiceOrganizationSetupRequestFingerprint(input: { authUserId: string; organizationName: string; }): Promise; export declare function organizationUserSetupTokenDigest(token: string): Promise;