emitAuthEvent( event: { causedBy: null | string; data: | { _tag: "network"; corsFlag?: { allowCredentials?: string; allowOrigin?: string; method: string; preflightStatus?: number; reason: | "status-zero" | "missing-allow-origin" | "credentials-mismatch" | "wildcard-with-credentials" | "preflight-failed"; url: string; }; duration: number; method: string; requestBody?: unknown; requestHeaders: { readonly [key: string]: string }; responseBody?: unknown; responseHeaders: { readonly [key: string]: string }; status: number; url: string; } | { _tag: "sdk"; authorization?: { code?: string; state?: string }; collectors?: readonly unknown[]; error?: { code: string; internalHttpStatus?: number; message: string; type: string; }; eventName?: string; httpStatus?: number; interactionId?: string; interactionToken?: string; nodeDescription?: string; nodeId?: string; nodeName?: string; nodeStatus: string; previousStatus?: string; requestId?: string; responseBody?: unknown; session?: string; } | { _tag: "sdk-config"; config: unknown } | { _tag: "dom"; element?: string; url?: string } | { _tag: "session"; after?: string; before?: string; key: string } | { _tag: "journey"; authId?: string; callbacks?: readonly unknown[]; description?: string; errorCode?: number; errorMessage?: string; errorReason?: string; header?: string; realm?: string; stage?: string; stepType: "Step" | "LoginSuccess" | "LoginFailure"; successUrl?: string; tokenId?: string; } | { _tag: "oidc"; clientId?: string; errorCode?: string; errorMessage?: string; phase: "authorize" | "exchange" | "revoke" | "userinfo" | "logout"; status: "error" | "success"; }; flags: { isAuthRelated: boolean; isCors: boolean; isError: boolean }; flowId: null | string; id: string; oidcSemantics?: { _tag: "oidc-semantics"; clientId?: string; dpop?: { nonce?: string; proofJwt?: string; tokenType?: string }; error?: { error: string; errorDescription?: string }; grantType?: string; nonce?: string; oidcPhase: | "authorize" | "userinfo" | "par" | "discovery" | "token" | "revocation" | "introspection" | "end-session" | "jwks"; par?: { expiresIn?: number; requestUri?: string }; pkce?: { challengeMethod: string; hasVerifier: boolean }; state?: string; tokens?: { accessToken?: boolean; expiresIn?: number; idToken?: boolean; refreshToken?: boolean; tokenType?: string; }; }; source: "network" | "sdk" | "dom" | "session"; timestamp: number; type: | "network:request" | "network:response" | "network:cors-flag" | "sdk:node-change" | "sdk:action" | "sdk:config" | "sdk:journey-step" | "sdk:oidc-state" | "dom:form-submit" | "dom:redirect" | "session:cookie" | "session:storage"; },): void Parameters
- event: {
causedBy: null | string;
data:
| {
_tag: "network";
corsFlag?: {
allowCredentials?: string;
allowOrigin?: string;
method: string;
preflightStatus?: number;
reason: | "status-zero"
| "missing-allow-origin"
| "credentials-mismatch"
| "wildcard-with-credentials"
| "preflight-failed";
url: string;
};
duration: number;
method: string;
requestBody?: unknown;
requestHeaders: { readonly [key: string]: string };
responseBody?: unknown;
responseHeaders: { readonly [key: string]: string };
status: number;
url: string;
}
| {
_tag: "sdk";
authorization?: { code?: string; state?: string };
collectors?: readonly unknown[];
error?: {
code: string;
internalHttpStatus?: number;
message: string;
type: string;
};
eventName?: string;
httpStatus?: number;
interactionId?: string;
interactionToken?: string;
nodeDescription?: string;
nodeId?: string;
nodeName?: string;
nodeStatus: string;
previousStatus?: string;
requestId?: string;
responseBody?: unknown;
session?: string;
}
| { _tag: "sdk-config"; config: unknown }
| { _tag: "dom"; element?: string; url?: string }
| { _tag: "session"; after?: string; before?: string; key: string }
| {
_tag: "journey";
authId?: string;
callbacks?: readonly unknown[];
description?: string;
errorCode?: number;
errorMessage?: string;
errorReason?: string;
header?: string;
realm?: string;
stage?: string;
stepType: "Step" | "LoginSuccess" | "LoginFailure";
successUrl?: string;
tokenId?: string;
}
| {
_tag: "oidc";
clientId?: string;
errorCode?: string;
errorMessage?: string;
phase: "authorize"
| "exchange"
| "revoke"
| "userinfo"
| "logout";
status: "error" | "success";
};
flags: { isAuthRelated: boolean; isCors: boolean; isError: boolean };
flowId: null | string;
id: string;
oidcSemantics?: {
_tag: "oidc-semantics";
clientId?: string;
dpop?: { nonce?: string; proofJwt?: string; tokenType?: string };
error?: { error: string; errorDescription?: string };
grantType?: string;
nonce?: string;
oidcPhase:
| "authorize"
| "userinfo"
| "par"
| "discovery"
| "token"
| "revocation"
| "introspection"
| "end-session"
| "jwks";
par?: { expiresIn?: number; requestUri?: string };
pkce?: { challengeMethod: string; hasVerifier: boolean };
state?: string;
tokens?: {
accessToken?: boolean;
expiresIn?: number;
idToken?: boolean;
refreshToken?: boolean;
tokenType?: string;
};
};
source: "network"
| "sdk"
| "dom"
| "session";
timestamp: number;
type:
| "network:request"
| "network:response"
| "network:cors-flag"
| "sdk:node-change"
| "sdk:action"
| "sdk:config"
| "sdk:journey-step"
| "sdk:oidc-state"
| "dom:form-submit"
| "dom:redirect"
| "session:cookie"
| "session:storage";
}
Returns void