import { A as StateMachine, C as StateValue, D as PromiseActorLogic, a as ActorRefFromLogic, b as RequiredActorOptions, c as AnyEventObject, g as IsNotNever, h as InputFrom, k as MachineSnapshot, m as GetConcreteByKey, o as AnyActorLogic, p as EventObject, r as ActorRef, s as AnyActorRef, u as ConditionalRequired, v as MetaObject, w as Values, x as RequiredLogicInput, y as NonReducibleUnknown } from "./spawn-D9jgw9pW.js"; import "./StateMachine-EDpYWy0i.js"; import { t as Manager } from "./Manager-CQQ99QOI.js"; import "./Actor-iTq7YY48.js"; //#region src/modules/certificate-issuance/certificateIssuanceConstants.d.ts declare const MIN_PASSWORD_LENGTH = 8; declare const PASSWORD_VALIDATION_KEYS: readonly ["length", "uppercase", "lowercase", "number"]; declare const REQUIREMENT_I18N_KEYS: Record; //#endregion //#region src/modules/certificate-issuance/types.d.ts type CertificateIssuanceType = 'ONE_TIME' | 'SHORT_TERM' | 'LONG_TERM'; /** * Configuration for the certificate issuance module. */ type CertificateIssuanceConfig = { /** Issuance region (from flow `moduleConfiguration`) */ region: string; /** Certificate validity period */ type: CertificateIssuanceType; }; type IssueCertificateResponse = { blob: Blob; }; type PasswordValidations = { length: boolean; uppercase: boolean; lowercase: boolean; number: boolean; }; type PasswordValidationKey = (typeof PASSWORD_VALIDATION_KEYS)[number]; //#endregion //#region src/modules/certificate-issuance/certificateIssuanceStateMachine.d.ts type CertificateIssuanceContext = { config: CertificateIssuanceConfig; password: string; passwordValidations: PasswordValidations; certificateBlob: Blob | undefined; }; type CertificateIssuanceInput = { config: CertificateIssuanceConfig; }; declare const certificateIssuanceMachine: StateMachine> | undefined; }, { src: "issueCertificate"; logic: PromiseActorLogic; id: string | undefined; }, Values<{ setPassword: { type: "setPassword"; params: NonReducibleUnknown; }; setBlob: { type: "setBlob"; params: NonReducibleUnknown; }; }>, { type: "isPasswordValid"; params: unknown; }, never, "error" | "idle" | "processing" | "success" | "finished" | "password" | "downloaded", string, CertificateIssuanceInput, NonReducibleUnknown, EventObject, MetaObject, { readonly id: "certificateIssuance"; readonly initial: "idle"; readonly context: ({ input }: { spawn: { (logic: TSrc, ...[options]: { src: "issueCertificate"; logic: PromiseActorLogic; id: string | undefined; } extends (infer T) ? T extends { src: "issueCertificate"; logic: PromiseActorLogic; id: string | undefined; } ? T extends { src: TSrc; } ? ConditionalRequired<[options?: ({ id?: T["id"] | undefined; systemId?: string; input?: InputFrom | undefined; syncSnapshot?: boolean; } & { [K in RequiredActorOptions]: unknown; }) | undefined], IsNotNever>> : never : never : never): ActorRefFromLogic; id: string | undefined; }, "src", TSrc>["logic"]>; (src: TLogic, ...[options]: ConditionalRequired<[options?: ({ id?: never; systemId?: string; input?: InputFrom | undefined; syncSnapshot?: boolean; } & { [K in RequiredLogicInput]: unknown; }) | undefined], IsNotNever>>): ActorRefFromLogic; }; input: CertificateIssuanceInput; self: ActorRef, StateValue, string, unknown, any, any>, { type: "LOAD"; } | { type: "PASSWORD_CHANGED"; password: string; } | { type: "SUBMIT_PASSWORD"; } | { type: "DOWNLOADED"; } | { type: "DOWNLOAD_FAILED"; } | { type: "FINISH"; }, AnyEventObject>; }) => { config: CertificateIssuanceConfig; password: string; passwordValidations: PasswordValidations; certificateBlob: undefined; }; readonly states: { readonly idle: { readonly on: { readonly LOAD: { readonly target: "password"; }; }; }; readonly password: { readonly on: { readonly PASSWORD_CHANGED: { readonly actions: "setPassword"; }; readonly SUBMIT_PASSWORD: { readonly target: "processing"; readonly guard: "isPasswordValid"; }; }; }; readonly processing: { readonly invoke: { readonly id: "issueCertificate"; readonly src: "issueCertificate"; readonly input: ({ context }: { context: CertificateIssuanceContext; event: { type: "LOAD"; } | { type: "PASSWORD_CHANGED"; password: string; } | { type: "SUBMIT_PASSWORD"; } | { type: "DOWNLOADED"; } | { type: "DOWNLOAD_FAILED"; } | { type: "FINISH"; }; self: ActorRef, StateValue, string, unknown, any, any>, { type: "LOAD"; } | { type: "PASSWORD_CHANGED"; password: string; } | { type: "SUBMIT_PASSWORD"; } | { type: "DOWNLOADED"; } | { type: "DOWNLOAD_FAILED"; } | { type: "FINISH"; }, AnyEventObject>; }) => { password: string; }; readonly onDone: { readonly target: "success"; readonly actions: "setBlob"; }; readonly onError: { readonly target: "error"; }; }; }; readonly success: { readonly on: { readonly DOWNLOADED: { readonly target: "downloaded"; }; readonly DOWNLOAD_FAILED: { readonly target: "error"; }; readonly FINISH: { readonly target: "finished"; }; }; }; readonly downloaded: { readonly on: { readonly FINISH: { readonly target: "finished"; }; }; }; readonly error: { readonly after: { readonly 3000: { readonly target: "finished"; }; }; }; readonly finished: { readonly type: "final"; }; }; }>; //#endregion //#region src/modules/certificate-issuance/certificateIssuanceActor.d.ts type CreateCertificateIssuanceActorOptions = { config: CertificateIssuanceConfig; }; //#endregion //#region src/modules/certificate-issuance/certificateIssuanceManager.d.ts type CertificateIssuanceIdleState = { status: 'idle'; }; type CertificateIssuancePasswordState = { status: 'password'; password: string; passwordValidations: PasswordValidations; canSubmit: boolean; }; type CertificateIssuanceProcessingState = { status: 'processing'; }; type CertificateIssuanceErrorState = { status: 'error'; }; type CertificateIssuanceSuccessState = { status: 'success'; blob: Blob; }; type CertificateIssuanceDownloadedState = { status: 'downloaded'; }; type CertificateIssuanceFinishedState = { status: 'finished'; }; type CertificateIssuanceState = CertificateIssuanceIdleState | CertificateIssuancePasswordState | CertificateIssuanceProcessingState | CertificateIssuanceSuccessState | CertificateIssuanceDownloadedState | CertificateIssuanceErrorState | CertificateIssuanceFinishedState; declare function createCertificateIssuanceManager(options: CreateCertificateIssuanceActorOptions): Manager & { load(): void; setPassword(password: string): void; submitPassword(): void; markDownloaded(): void; reportDownloadError(): void; finish(): void; }; type CertificateIssuanceManager = ReturnType; //#endregion //#region src/modules/certificate-issuance/certificateIssuanceUtils.d.ts declare function emptyPasswordValidations(): PasswordValidations; declare function validatePassword(value: string): PasswordValidations; declare function isPasswordValid(validations: PasswordValidations): boolean; //#endregion export { type CertificateIssuanceConfig, type CertificateIssuanceManager, type CertificateIssuanceState, type CertificateIssuanceType, type IssueCertificateResponse, MIN_PASSWORD_LENGTH, PASSWORD_VALIDATION_KEYS, type PasswordValidationKey, type PasswordValidations, REQUIREMENT_I18N_KEYS, certificateIssuanceMachine, createCertificateIssuanceManager, emptyPasswordValidations, isPasswordValid, validatePassword };