UNPKG

@slashid/slashid

Version:

Client SDK for the /id platform

2,287 lines (2,286 loc) 170 kB
/** * An object carrying the SlashID SDK version information */ export const version: { major: string; minor: string; patch: string; raw: string; }; interface ConfigurationParameters { basePath?: string; fetchApi?: FetchAPI; middleware?: Middleware[]; queryParamsStringify?: (params: HTTPQuery) => string; username?: string; password?: string; apiKey?: string | ((name: string) => string); accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string | Promise<string>); headers?: HTTPHeaders; credentials?: RequestCredentials; } declare class Configuration { constructor(configuration?: ConfigurationParameters); set config(configuration: Configuration); get basePath(): string; get fetchApi(): FetchAPI | undefined; get middleware(): Middleware[]; get queryParamsStringify(): (params: HTTPQuery) => string; get username(): string | undefined; get password(): string | undefined; get apiKey(): ((name: string) => string) | undefined; get accessToken(): ((name?: string, scopes?: string[]) => string | Promise<string>) | undefined; get headers(): HTTPHeaders | undefined; get credentials(): RequestCredentials | undefined; } type FetchAPI = WindowOrWorkerGlobalScope['fetch']; type Json = any; type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD'; type HTTPHeaders = { [key: string]: string; }; type HTTPQuery = { [key: string]: string | number | null | boolean | Array<string | number | null | boolean> | Set<string | number | null | boolean> | HTTPQuery; }; type HTTPBody = Json | FormData | URLSearchParams; type HTTPRequestInit = { headers?: HTTPHeaders; method: HTTPMethod; credentials?: RequestCredentials; body?: HTTPBody; }; type InitOverrideFunction = (requestContext: { init: HTTPRequestInit; context: RequestOpts; }) => Promise<RequestInit>; interface FetchParams { url: string; init: RequestInit; } interface RequestOpts { path: string; method: HTTPMethod; headers: HTTPHeaders; query?: HTTPQuery; body?: HTTPBody; } interface RequestContext { fetch: FetchAPI; url: string; init: RequestInit; } interface ResponseContext { fetch: FetchAPI; url: string; init: RequestInit; response: Response; } interface ErrorContext { fetch: FetchAPI; url: string; init: RequestInit; error: unknown; response?: Response; } interface Middleware { pre?(context: RequestContext): Promise<FetchParams | void>; post?(context: ResponseContext): Promise<Response | void>; onError?(context: ErrorContext): Promise<Response | void>; } interface ApiResponse<T> { raw: Response; value(): Promise<T>; } /** * * @export * @interface APIPagination */ interface APIPagination { /** * * @type {number} * @memberof APIPagination */ limit: number; /** * * @type {number} * @memberof APIPagination */ offset: number; /** * * @type {number} * @memberof APIPagination */ total_count: number; } /** * * @export * @interface APIMeta */ interface APIMeta { /** * * @type {APIPagination} * @memberof APIMeta */ pagination?: APIPagination; } /** * * @export * @interface APIResponseError */ interface _APIResponseError1 { /** * * @type {number} * @memberof APIResponseError */ httpcode?: number; /** * * @type {string} * @memberof APIResponseError */ message?: string; } /** * * @export * @interface APIResponseBase */ interface APIResponseBase { /** * * @type {APIMeta} * @memberof APIResponseBase */ meta?: APIMeta; /** * * @type {Array<APIResponseError>} * @memberof APIResponseBase */ errors?: Array<_APIResponseError1>; } /** * SlashID API v1.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * Do not edit the class manually. */ /** * * @export */ declare const Region: { readonly UsIowa: "us-iowa"; readonly EuropeBelgium: "europe-belgium"; readonly AsiaJapan: "asia-japan"; readonly EuropeEngland: "europe-england"; readonly AustraliaSydney: "australia-sydney"; }; type Region = (typeof Region)[keyof typeof Region]; /** * Structure to create an anonymous person * @export * @interface AnonymousPersonCreateReq */ interface AnonymousPersonCreateReq { /** * * @type {Region} * @memberof AnonymousPersonCreateReq */ region?: Region; } /** * SlashID API v1.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * Do not edit the class manually. */ /** * * @export */ declare const ChallengeType: { readonly UiCustomization: "ui_customization"; readonly AuthnContextUpdate: "authn_context_update"; readonly Proxy: "proxy"; readonly WebauthnCreate: "webauthn_create"; readonly WebauthnGet: "webauthn_get"; readonly Nonce: "nonce"; readonly Otp: "otp"; readonly Oidc: "oidc"; readonly Saml: "saml"; readonly PasswordSet: "password_set"; readonly PasswordVerify: "password_verify"; readonly PasswordReset: "password_reset"; readonly TotpRegister: "totp_register"; readonly TotpVerify: "totp_verify"; }; type ChallengeType = (typeof ChallengeType)[keyof typeof ChallengeType]; /** * * @export * @interface NonceAttestationData */ interface NonceAttestationData { /** * * @type {string} * @memberof NonceAttestationData */ challenge?: string; } /** * * @export * @interface NonceAttestation */ interface NonceAttestation { /** * * @type {string} * @memberof NonceAttestation */ challenge_id: string; /** * * @type {ChallengeType} * @memberof NonceAttestation */ challenge_type: ChallengeType; /** * * @type {NonceAttestationData} * @memberof NonceAttestation */ data?: NonceAttestationData; } /** * * @export * @interface OTPAttestationData */ interface OTPAttestationData { /** * * @type {string} * @memberof OTPAttestationData */ otp?: string; } /** * * @export * @interface OTPAttestation */ interface OTPAttestation { /** * * @type {string} * @memberof OTPAttestation */ challenge_id: string; /** * * @type {ChallengeType} * @memberof OTPAttestation */ challenge_type: ChallengeType; /** * * @type {OTPAttestationData} * @memberof OTPAttestation */ data?: OTPAttestationData; } /** * * @export * @interface PasswordResetAttestationData */ interface PasswordResetAttestationData { /** * * @type {string} * @memberof PasswordResetAttestationData */ password: string; } /** * * @export * @interface PasswordResetAttestation */ interface PasswordResetAttestation { /** * * @type {string} * @memberof PasswordResetAttestation */ challenge_id: string; /** * * @type {ChallengeType} * @memberof PasswordResetAttestation */ challenge_type: ChallengeType; /** * * @type {PasswordResetAttestationData} * @memberof PasswordResetAttestation */ data?: PasswordResetAttestationData; } /** * * @export * @interface PasswordSetAttestationData */ interface PasswordSetAttestationData { /** * * @type {string} * @memberof PasswordSetAttestationData */ password: string; } /** * * @export * @interface PasswordSetAttestation */ interface PasswordSetAttestation { /** * * @type {string} * @memberof PasswordSetAttestation */ challenge_id: string; /** * * @type {ChallengeType} * @memberof PasswordSetAttestation */ challenge_type: ChallengeType; /** * * @type {PasswordSetAttestationData} * @memberof PasswordSetAttestation */ data?: PasswordSetAttestationData; } /** * * @export * @interface PasswordVerifyAttestationData */ interface PasswordVerifyAttestationData { /** * * @type {string} * @memberof PasswordVerifyAttestationData */ password: string; } /** * * @export * @interface PasswordVerifyAttestation */ interface PasswordVerifyAttestation { /** * * @type {string} * @memberof PasswordVerifyAttestation */ challenge_id: string; /** * * @type {ChallengeType} * @memberof PasswordVerifyAttestation */ challenge_type: ChallengeType; /** * * @type {PasswordVerifyAttestationData} * @memberof PasswordVerifyAttestation */ data?: PasswordVerifyAttestationData; } /** * * @export * @interface TOTPRegisterAttestationData */ interface TOTPRegisterAttestationData { /** * * @type {string} * @memberof TOTPRegisterAttestationData */ otp?: string; } /** * * @export * @interface TOTPRegisterAttestation */ interface TOTPRegisterAttestation { /** * * @type {string} * @memberof TOTPRegisterAttestation */ challenge_id: string; /** * * @type {ChallengeType} * @memberof TOTPRegisterAttestation */ challenge_type: ChallengeType; /** * * @type {TOTPRegisterAttestationData} * @memberof TOTPRegisterAttestation */ data?: TOTPRegisterAttestationData; } /** * * @export * @interface TOTPVerifyAttestationData */ interface TOTPVerifyAttestationData { /** * * @type {string} * @memberof TOTPVerifyAttestationData */ otp?: string; } /** * * @export * @interface TOTPVerifyAttestation */ interface TOTPVerifyAttestation { /** * * @type {string} * @memberof TOTPVerifyAttestation */ challenge_id: string; /** * * @type {ChallengeType} * @memberof TOTPVerifyAttestation */ challenge_type: ChallengeType; /** * * @type {TOTPVerifyAttestationData} * @memberof TOTPVerifyAttestation */ data?: TOTPVerifyAttestationData; } /** * * @export * @interface WebAuthnCreateAttestation */ interface WebAuthnCreateAttestation { /** * * @type {string} * @memberof WebAuthnCreateAttestation */ challenge_id: string; /** * * @type {ChallengeType} * @memberof WebAuthnCreateAttestation */ challenge_type: ChallengeType; /** * * @type {object} * @memberof WebAuthnCreateAttestation */ data?: object; } /** * * @export * @interface WebAuthnGetAttestation */ interface WebAuthnGetAttestation { /** * * @type {string} * @memberof WebAuthnGetAttestation */ challenge_id: string; /** * * @type {ChallengeType} * @memberof WebAuthnGetAttestation */ challenge_type: ChallengeType; /** * * @type {object} * @memberof WebAuthnGetAttestation */ data?: object; } /** * @type Attestation * * @export */ type Attestation = ({ challenge_type: 'nonce'; } & NonceAttestation) | ({ challenge_type: 'otp'; } & OTPAttestation) | ({ challenge_type: 'password_reset'; } & PasswordResetAttestation) | ({ challenge_type: 'password_set'; } & PasswordSetAttestation) | ({ challenge_type: 'password_verify'; } & PasswordVerifyAttestation) | ({ challenge_type: 'totp_register'; } & TOTPRegisterAttestation) | ({ challenge_type: 'totp_verify'; } & TOTPVerifyAttestation) | ({ challenge_type: 'webauthn_create'; } & WebAuthnCreateAttestation) | ({ challenge_type: 'webauthn_get'; } & WebAuthnGetAttestation); /** * SlashID API v1.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * Do not edit the class manually. */ /** * Allowed login factor * @export */ declare const _FactorMethod1: { readonly Webauthn: "webauthn"; readonly EmailLink: "email_link"; readonly SmsLink: "sms_link"; readonly OtpViaSms: "otp_via_sms"; readonly OtpViaEmail: "otp_via_email"; readonly Totp: "totp"; readonly Oidc: "oidc"; readonly Saml: "saml"; readonly Api: "api"; readonly DirectId: "direct_id"; readonly Password: "password"; readonly Impersonate: "impersonate"; readonly Anonymous: "anonymous"; }; type _FactorMethod1 = (typeof _FactorMethod1)[keyof typeof _FactorMethod1]; /** * SlashID API v1.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * Do not edit the class manually. */ /** * * @export */ export const PersonHandleType: { readonly EmailAddress: "email_address"; readonly PhoneNumber: "phone_number"; readonly Username: "username"; }; export type PersonHandleType = (typeof PersonHandleType)[keyof typeof PersonHandleType]; /** * * @export * @interface PersonHandle */ interface PersonHandle { /** * * @type {PersonHandleType} * @memberof PersonHandle */ type: PersonHandleType; /** * * @type {string} * @memberof PersonHandle */ value: string; } /** * * @export * @interface Authentication */ interface Authentication { /** * * @type {PersonHandle} * @memberof Authentication */ handle: PersonHandle; /** * RFC3339 timestamp * @type {Date} * @memberof Authentication */ timestamp: Date; /** * * @type {FactorMethod} * @memberof Authentication */ method: _FactorMethod1; } /** * * @export * @interface EmailLinkMethodOptions */ interface EmailLinkMethodOptions { /** * * @type {FactorMethod} * @memberof EmailLinkMethodOptions */ method: _FactorMethod1; /** * URI to redirect to after resolving the challenge. * @type {string} * @memberof EmailLinkMethodOptions */ redirect_target?: string; } /** * SlashID API v1.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * Do not edit the class manually. */ /** * * @export */ declare const OAuthProvider: { readonly Google: "google"; readonly Github: "github"; readonly Bitbucket: "bitbucket"; readonly Gitlab: "gitlab"; readonly Facebook: "facebook"; readonly Line: "line"; readonly Azuread: "azuread"; readonly Okta: "okta"; readonly Apple: "apple"; }; type OAuthProvider = (typeof OAuthProvider)[keyof typeof OAuthProvider]; /** * SlashID API v1.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * Do not edit the class manually. */ /** * Determines whether the OIDC call should fetch groups data. * @export */ declare const OIDCGroupsOptions: { readonly True: "true"; readonly False: "false"; }; type OIDCGroupsOptions = (typeof OIDCGroupsOptions)[keyof typeof OIDCGroupsOptions]; /** * SlashID API v1.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * Do not edit the class manually. */ /** * Determines how the OIDC login page is presented to the user; defaults to popup. * @export */ declare const OIDCUXMode: { readonly Popup: "popup"; readonly Redirect: "redirect"; }; type OIDCUXMode = (typeof OIDCUXMode)[keyof typeof OIDCUXMode]; /** * * @export * @interface OIDCMethodOptions */ interface OIDCMethodOptions { /** * * @type {FactorMethod} * @memberof OIDCMethodOptions */ method: _FactorMethod1; /** * * @type {string} * @memberof OIDCMethodOptions */ client_id: string; /** * * @type {OAuthProvider} * @memberof OIDCMethodOptions */ provider: OAuthProvider; /** * * @type {OIDCUXMode} * @memberof OIDCMethodOptions * @deprecated */ ux_mode?: OIDCUXMode; /** * URL to redirect to after login at the third-party IdP. * @type {string} * @memberof OIDCMethodOptions */ redirect_target?: string; /** * * @type {OIDCGroupsOptions} * @memberof OIDCMethodOptions */ requires_groups?: OIDCGroupsOptions; /** * * @type {string} * @memberof OIDCMethodOptions */ pkce_code_challenge?: string; /** * * @type {string} * @memberof OIDCMethodOptions */ csrf_token?: string; } /** * * @export * @interface OTPViaEmailMethodOptions */ interface OTPViaEmailMethodOptions { /** * * @type {FactorMethod} * @memberof OTPViaEmailMethodOptions */ method: _FactorMethod1; } /** * * @export * @interface OTPViaSMSMethodOptions */ interface OTPViaSMSMethodOptions { /** * * @type {FactorMethod} * @memberof OTPViaSMSMethodOptions */ method: _FactorMethod1; } /** * * @export * @interface PasswordMethodOptions */ interface PasswordMethodOptions { /** * * @type {FactorMethod} * @memberof PasswordMethodOptions */ method: _FactorMethod1; } /** * SlashID API v1.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * Do not edit the class manually. */ /** * Determines how the SSO login page is presented to the user; defaults to popup. * @export */ declare const SSOUXMode: { readonly Popup: "popup"; readonly Redirect: "redirect"; }; type SSOUXMode = (typeof SSOUXMode)[keyof typeof SSOUXMode]; /** * * @export * @interface SAMLMethodOptions */ interface SAMLMethodOptions { /** * * @type {FactorMethod} * @memberof SAMLMethodOptions */ method: _FactorMethod1; /** * * @type {string} * @memberof SAMLMethodOptions */ provider_credentials_id: string; /** * * @type {SSOUXMode} * @memberof SAMLMethodOptions */ ux_mode?: SSOUXMode; /** * URL to redirect to after login at the third-party IdP. * @type {string} * @memberof SAMLMethodOptions */ redirect_target?: string; /** * * @type {string} * @memberof SAMLMethodOptions */ pkce_code_challenge?: string; /** * * @type {string} * @memberof SAMLMethodOptions */ csrf_token?: string; } /** * * @export * @interface SMSLinkMethodOptions */ interface SMSLinkMethodOptions { /** * * @type {FactorMethod} * @memberof SMSLinkMethodOptions */ method: _FactorMethod1; /** * URI to redirect to after resolving the challenge. * @type {string} * @memberof SMSLinkMethodOptions */ redirect_target?: string; } /** * * @export * @interface TOTPMethodOptions */ interface TOTPMethodOptions { /** * * @type {FactorMethod} * @memberof TOTPMethodOptions */ method: _FactorMethod1; } /** * SlashID API v1.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * Do not edit the class manually. */ /** * * @export */ declare const WebAuthnAttestation: { readonly None: "none"; readonly Indirect: "indirect"; readonly Direct: "direct"; }; type WebAuthnAttestation = (typeof WebAuthnAttestation)[keyof typeof WebAuthnAttestation]; /** * SlashID API v1.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * Do not edit the class manually. */ /** * * @export */ export const WebAuthnAuthenticatorAttachment: { readonly Any: "any"; readonly Platform: "platform"; readonly CrossPlatform: "cross_platform"; }; export type WebAuthnAuthenticatorAttachment = (typeof WebAuthnAuthenticatorAttachment)[keyof typeof WebAuthnAuthenticatorAttachment]; /** * SlashID API v1.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * Do not edit the class manually. */ /** * * @export */ declare const WebAuthnResidentKey: { readonly Discouraged: "discouraged"; readonly Preferred: "preferred"; readonly Required: "required"; }; type WebAuthnResidentKey = (typeof WebAuthnResidentKey)[keyof typeof WebAuthnResidentKey]; /** * SlashID API v1.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * Do not edit the class manually. */ /** * * @export */ declare const WebAuthnUserVerification: { readonly Discouraged: "discouraged"; readonly Preferred: "preferred"; readonly Required: "required"; }; type WebAuthnUserVerification = (typeof WebAuthnUserVerification)[keyof typeof WebAuthnUserVerification]; /** * * @export * @interface WebAuthnMethodOptions */ interface WebAuthnMethodOptions { /** * * @type {FactorMethod} * @memberof WebAuthnMethodOptions */ method: _FactorMethod1; /** * * @type {string} * @memberof WebAuthnMethodOptions */ scope?: string; /** * * @type {Array<string>} * @memberof WebAuthnMethodOptions */ available_credential_ids?: Array<string>; /** * * @type {WebAuthnAuthenticatorAttachment} * @memberof WebAuthnMethodOptions */ attachment?: WebAuthnAuthenticatorAttachment; /** * * @type {WebAuthnUserVerification} * @memberof WebAuthnMethodOptions */ user_verification?: WebAuthnUserVerification; /** * * @type {WebAuthnResidentKey} * @memberof WebAuthnMethodOptions */ resident_key?: WebAuthnResidentKey; /** * * @type {WebAuthnAttestation} * @memberof WebAuthnMethodOptions */ attestation?: WebAuthnAttestation; } /** * @type FactorOptions * * @export */ type FactorOptions = ({ method: 'email_link'; } & EmailLinkMethodOptions) | ({ method: 'oidc'; } & OIDCMethodOptions) | ({ method: 'otp_via_email'; } & OTPViaEmailMethodOptions) | ({ method: 'otp_via_sms'; } & OTPViaSMSMethodOptions) | ({ method: 'password'; } & PasswordMethodOptions) | ({ method: 'saml'; } & SAMLMethodOptions) | ({ method: 'sms_link'; } & SMSLinkMethodOptions) | ({ method: 'totp'; } & TOTPMethodOptions) | ({ method: 'webauthn'; } & WebAuthnMethodOptions); /** * * @export * @interface Factor */ interface _Factor1 { /** * * @type {FactorMethod} * @memberof Factor */ method?: _FactorMethod1; /** * * @type {FactorOptions} * @memberof Factor */ options?: FactorOptions; } /** * * @export * @interface AuthnContextUpdateChallengeOptions */ interface AuthnContextUpdateChallengeOptions { /** * * @type {string} * @memberof AuthnContextUpdateChallengeOptions */ target_org_id: string; /** * * @type {Factor} * @memberof AuthnContextUpdateChallengeOptions */ factor?: _Factor1; } /** * * @export * @interface AuthnContextUpdateChallenge */ interface AuthnContextUpdateChallenge { /** * * @type {string} * @memberof AuthnContextUpdateChallenge */ id: string; /** * * @type {ChallengeType} * @memberof AuthnContextUpdateChallenge */ type: ChallengeType; /** * * @type {FactorMethod} * @memberof AuthnContextUpdateChallenge */ authentication_method: _FactorMethod1; /** * * @type {AuthnContextUpdateChallengeOptions} * @memberof AuthnContextUpdateChallenge */ options: AuthnContextUpdateChallengeOptions; } /** * SlashID API v1.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * Do not edit the class manually. */ /** * * @export */ declare const PasswordValidationRuleName: { readonly Length: "length"; readonly PasswordVariants: "password_variants"; readonly AdminVariants: "admin_variants"; readonly UserVariants: "user_variants"; readonly AlphanumericSequences1: "alphanumeric_sequences_1"; readonly AlphanumericSequences2: "alphanumeric_sequences_2"; readonly NumericSequencesAscending: "numeric_sequences_ascending"; readonly NumericSequencesDescending: "numeric_sequences_descending"; readonly NumericSubsequencesAscending: "numeric_subsequences_ascending"; readonly NumericSubsequencesDescending: "numeric_subsequences_descending"; readonly CommonPasswordXkcd: "common_password_xkcd"; }; type PasswordValidationRuleName = (typeof PasswordValidationRuleName)[keyof typeof PasswordValidationRuleName]; /** * * @export * @interface NonceChallengeOptions */ interface NonceChallengeOptions { /** * * @type {string} * @memberof NonceChallengeOptions */ challenge?: string; } /** * * @export * @interface NonceChallenge */ interface NonceChallenge { /** * * @type {string} * @memberof NonceChallenge */ id: string; /** * * @type {ChallengeType} * @memberof NonceChallenge */ type: ChallengeType; /** * * @type {FactorMethod} * @memberof NonceChallenge */ authentication_method: _FactorMethod1; /** * * @type {NonceChallengeOptions} * @memberof NonceChallenge */ options?: NonceChallengeOptions; } /** * * @export * @interface OIDCChallengeOptions */ interface OIDCChallengeOptions { /** * * @type {string} * @memberof OIDCChallengeOptions */ auth_code_url: string; } /** * * @export * @interface OIDCChallenge */ interface OIDCChallenge { /** * * @type {string} * @memberof OIDCChallenge */ id: string; /** * * @type {ChallengeType} * @memberof OIDCChallenge */ type: ChallengeType; /** * * @type {FactorMethod} * @memberof OIDCChallenge */ authentication_method: _FactorMethod1; /** * * @type {OIDCChallengeOptions} * @memberof OIDCChallenge */ options: OIDCChallengeOptions; } /** * * @export * @interface OTPChallenge */ interface OTPChallenge { /** * * @type {string} * @memberof OTPChallenge */ id: string; /** * * @type {ChallengeType} * @memberof OTPChallenge */ type: ChallengeType; /** * * @type {FactorMethod} * @memberof OTPChallenge */ authentication_method: _FactorMethod1; } /** * SlashID API v1.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * Do not edit the class manually. */ /** * * @export */ declare const PatternMatchType: { readonly Match: "must_match"; readonly NotMatch: "must_not_match"; }; type PatternMatchType = (typeof PatternMatchType)[keyof typeof PatternMatchType]; /** * SlashID API v1.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * Do not edit the class manually. */ /** * * @export */ declare const PatternQualifier: { readonly CaseInsensitive: "case_insensitive"; }; type PatternQualifier = (typeof PatternQualifier)[keyof typeof PatternQualifier]; /** * * @export * @interface RegexPasswordValidationRule */ interface RegexPasswordValidationRule { /** * * @type {PasswordValidationRuleName} * @memberof RegexPasswordValidationRule */ name: PasswordValidationRuleName; /** * * @type {string} * @memberof RegexPasswordValidationRule */ pattern: string; /** * * @type {PatternMatchType} * @memberof RegexPasswordValidationRule */ match_type: PatternMatchType; /** * * @type {Array<PatternQualifier>} * @memberof RegexPasswordValidationRule */ pattern_qualifiers?: Array<PatternQualifier>; } /** * * @export * @interface PasswordValidationRuleset */ interface PasswordValidationRuleset { /** * * @type {Array<RegexPasswordValidationRule>} * @memberof PasswordValidationRuleset */ regular_expressions?: Array<RegexPasswordValidationRule>; } /** * * @export * @interface PasswordResetChallengeOptions */ interface PasswordResetChallengeOptions { /** * * @type {PasswordValidationRuleset} * @memberof PasswordResetChallengeOptions */ validation_rules: PasswordValidationRuleset; } /** * * @export * @interface PasswordResetChallenge */ interface PasswordResetChallenge { /** * * @type {string} * @memberof PasswordResetChallenge */ id: string; /** * * @type {ChallengeType} * @memberof PasswordResetChallenge */ type: ChallengeType; /** * * @type {FactorMethod} * @memberof PasswordResetChallenge */ authentication_method: _FactorMethod1; /** * * @type {PasswordResetChallengeOptions} * @memberof PasswordResetChallenge */ options: PasswordResetChallengeOptions; } /** * * @export * @interface PasswordSetChallengeOptions */ interface PasswordSetChallengeOptions { /** * * @type {PasswordValidationRuleset} * @memberof PasswordSetChallengeOptions */ validation_rules: PasswordValidationRuleset; } /** * * @export * @interface PasswordSetChallenge */ interface PasswordSetChallenge { /** * * @type {string} * @memberof PasswordSetChallenge */ id: string; /** * * @type {ChallengeType} * @memberof PasswordSetChallenge */ type: ChallengeType; /** * * @type {FactorMethod} * @memberof PasswordSetChallenge */ authentication_method: _FactorMethod1; /** * * @type {PasswordSetChallengeOptions} * @memberof PasswordSetChallenge */ options: PasswordSetChallengeOptions; } /** * * @export * @interface PasswordVerifyChallenge */ interface PasswordVerifyChallenge { /** * * @type {string} * @memberof PasswordVerifyChallenge */ id: string; /** * * @type {ChallengeType} * @memberof PasswordVerifyChallenge */ type: ChallengeType; /** * * @type {FactorMethod} * @memberof PasswordVerifyChallenge */ authentication_method: _FactorMethod1; } /** * * @export * @interface ProxyChallengeOptions */ interface ProxyChallengeOptions { /** * * @type {string} * @memberof ProxyChallengeOptions */ challenge_id?: string; } /** * * @export * @interface ProxyChallenge */ interface ProxyChallenge { /** * * @type {string} * @memberof ProxyChallenge */ id: string; /** * * @type {ChallengeType} * @memberof ProxyChallenge */ type: ChallengeType; /** * * @type {FactorMethod} * @memberof ProxyChallenge */ authentication_method: _FactorMethod1; /** * * @type {ProxyChallengeOptions} * @memberof ProxyChallenge */ options?: ProxyChallengeOptions; } /** * * @export * @interface SAMLChallengeOptions */ interface SAMLChallengeOptions { /** * * @type {string} * @memberof SAMLChallengeOptions */ start_authentication_url: string; } /** * * @export * @interface SAMLChallenge */ interface SAMLChallenge { /** * * @type {string} * @memberof SAMLChallenge */ id: string; /** * * @type {ChallengeType} * @memberof SAMLChallenge */ type: ChallengeType; /** * * @type {FactorMethod} * @memberof SAMLChallenge */ authentication_method: _FactorMethod1; /** * * @type {SAMLChallengeOptions} * @memberof SAMLChallenge */ options: SAMLChallengeOptions; } /** * * @export * @interface TOTPRegisterChallengeOptions */ interface TOTPRegisterChallengeOptions { /** * * @type {string} * @memberof TOTPRegisterChallengeOptions */ key_uri: string; /** * * @type {string} * @memberof TOTPRegisterChallengeOptions */ qr_code_data_b64: string; /** * * @type {Array<string>} * @memberof TOTPRegisterChallengeOptions */ recovery_codes: Array<string>; } /** * * @export * @interface TOTPRegisterChallenge */ interface TOTPRegisterChallenge { /** * * @type {string} * @memberof TOTPRegisterChallenge */ id: string; /** * * @type {ChallengeType} * @memberof TOTPRegisterChallenge */ type: ChallengeType; /** * * @type {FactorMethod} * @memberof TOTPRegisterChallenge */ authentication_method: _FactorMethod1; /** * * @type {TOTPRegisterChallengeOptions} * @memberof TOTPRegisterChallenge */ options?: TOTPRegisterChallengeOptions; } /** * * @export * @interface TOTPVerifyChallenge */ interface TOTPVerifyChallenge { /** * * @type {string} * @memberof TOTPVerifyChallenge */ id: string; /** * * @type {ChallengeType} * @memberof TOTPVerifyChallenge */ type: ChallengeType; /** * * @type {FactorMethod} * @memberof TOTPVerifyChallenge */ authentication_method: _FactorMethod1; } /** * * @export * @interface UICustomizationChallengeOptions */ interface UICustomizationChallengeOptions { /** * UI configuration for the hosted page users are redirected to after clicking a magic link or password reset link. * @type {{ [key: string]: any; }} * @memberof UICustomizationChallengeOptions */ authn_redirect_page_ui_config?: { [key: string]: any; }; } /** * * @export * @interface UICustomizationChallenge */ interface UICustomizationChallenge { /** * * @type {string} * @memberof UICustomizationChallenge */ id: string; /** * * @type {ChallengeType} * @memberof UICustomizationChallenge */ type: ChallengeType; /** * * @type {FactorMethod} * @memberof UICustomizationChallenge */ authentication_method: _FactorMethod1; /** * * @type {UICustomizationChallengeOptions} * @memberof UICustomizationChallenge */ options?: UICustomizationChallengeOptions; } /** * * @export * @interface WebAuthnCreateChallenge */ interface WebAuthnCreateChallenge { /** * * @type {string} * @memberof WebAuthnCreateChallenge */ id: string; /** * * @type {ChallengeType} * @memberof WebAuthnCreateChallenge */ type: ChallengeType; /** * * @type {FactorMethod} * @memberof WebAuthnCreateChallenge */ authentication_method: _FactorMethod1; /** * The "Options for Credential Creation" as described by the WebAuthn spec at https://www.w3.org/TR/webauthn/#dictionary-makecredentialoptions * @type {object} * @memberof WebAuthnCreateChallenge */ options?: object; } /** * * @export * @interface WebAuthnGetChallenge */ interface WebAuthnGetChallenge { /** * * @type {string} * @memberof WebAuthnGetChallenge */ id: string; /** * * @type {ChallengeType} * @memberof WebAuthnGetChallenge */ type: ChallengeType; /** * * @type {FactorMethod} * @memberof WebAuthnGetChallenge */ authentication_method: _FactorMethod1; /** * The "Options for Assertion Generation" as described by the WebAuthn spec at https://www.w3.org/TR/webauthn/#assertion-options * @type {object} * @memberof WebAuthnGetChallenge */ options?: object; } /** * @type ChallengeListInner * * @export */ type ChallengeListInner = ({ type: 'authn_context_update'; } & AuthnContextUpdateChallenge) | ({ type: 'nonce'; } & NonceChallenge) | ({ type: 'oidc'; } & OIDCChallenge) | ({ type: 'otp'; } & OTPChallenge) | ({ type: 'password_reset'; } & PasswordResetChallenge) | ({ type: 'password_set'; } & PasswordSetChallenge) | ({ type: 'password_verify'; } & PasswordVerifyChallenge) | ({ type: 'proxy'; } & ProxyChallenge) | ({ type: 'saml'; } & SAMLChallenge) | ({ type: 'totp_register'; } & TOTPRegisterChallenge) | ({ type: 'totp_verify'; } & TOTPVerifyChallenge) | ({ type: 'ui_customization'; } & UICustomizationChallenge) | ({ type: 'webauthn_create'; } & WebAuthnCreateChallenge) | ({ type: 'webauthn_get'; } & WebAuthnGetChallenge); /** * SlashID API v1.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * Do not edit the class manually. */ /** * The type of the credential * @export */ declare const CredentialType: { readonly PublicKey: "public-key"; readonly Password: "password"; readonly Totp: "totp"; }; type CredentialType = (typeof CredentialType)[keyof typeof CredentialType]; /** * SlashID API v1.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * Do not edit the class manually. */ /** * * @export */ declare const EventName: { readonly AuthenticationSucceededV1: "AuthenticationSucceeded_v1"; readonly AuthenticationFailedV1: "AuthenticationFailed_v1"; readonly PersonCreatedV1: "PersonCreated_v1"; readonly AnonymousPersonCreatedV1: "AnonymousPersonCreated_v1"; readonly PersonDeletedV1: "PersonDeleted_v1"; readonly VirtualPageLoadedV1: "VirtualPageLoaded_v1"; readonly SlashIdsdkLoadedV1: "SlashIDSDKLoaded_v1"; readonly PersonIdentifiedV1: "PersonIdentified_v1"; readonly PersonLoggedOutV1: "PersonLoggedOut_v1"; readonly TokenMintedV1: "TokenMinted_v1"; readonly AnonymousTokenMintedV1: "AnonymousTokenMinted_v1"; readonly PasswordChangedV1: "PasswordChanged_v1"; readonly GdprConsentsChangedV1: "GdprConsentsChanged_v1"; readonly GateServerStartedV1: "GateServerStarted_v1"; readonly GateRequestHandledV1: "GateRequestHandled_v1"; readonly GateRequestCredentialFoundV1: "GateRequestCredentialFound_v1"; readonly PermissionCreatedInRegionV1: "PermissionCreated_InRegion_v1"; readonly PermissionCreatedV1: "PermissionCreated_v1"; readonly PermissionDeletedInRegionV1: "PermissionDeleted_InRegion_v1"; readonly PermissionDeletedV1: "PermissionDeleted_v1"; readonly RoleCreatedInRegionV1: "RoleCreated_InRegion_v1"; readonly RoleCreatedV1: "RoleCreated_v1"; readonly RoleDeletedInRegionV1: "RoleDeleted_InRegion_v1"; readonly RoleDeletedV1: "RoleDeleted_v1"; readonly RoleUpdatedInRegionV1: "RoleUpdated_InRegion_v1"; readonly RoleUpdatedV1: "RoleUpdated_v1"; readonly RolesSetToPersonInRegionV1: "RolesSetToPerson_InRegion_v1"; readonly RolesSetToPersonV1: "RolesSetToPerson_v1"; readonly PermissionsSetToPersonInRegionV1: "PermissionsSetToPerson_InRegion_v1"; readonly PermissionsSetToPersonV1: "PermissionsSetToPerson_v1"; readonly MitmAttackDetectedV1: "MitmAttackDetected_v1"; readonly PermissionUpdatedInRegionV1: "PermissionUpdated_InRegion_v1"; readonly PermissionUpdatedV1: "PermissionUpdated_v1"; }; type EventName = (typeof EventName)[keyof typeof EventName]; /** * * @export * @interface SDKEventAuthenticationFailedV1 */ interface SDKEventAuthenticationFailedV1 { /** * * @type {EventName} * @memberof SDKEventAuthenticationFailedV1 */ event_name: EventName; /** * Person ID * @type {string} * @memberof SDKEventAuthenticationFailedV1 */ person_id?: string; /** * * @type {Array<FactorMethod>} * @memberof SDKEventAuthenticationFailedV1 */ authenticated_methods?: Array<_FactorMethod1>; /** * * @type {FactorMethod} * @memberof SDKEventAuthenticationFailedV1 */ failed_authn_method: _FactorMethod1; /** * * @type {string} * @memberof SDKEventAuthenticationFailedV1 */ failure_reason: string; /** * * @type {string} * @memberof SDKEventAuthenticationFailedV1 */ failure_detail?: string; /** * * @type {PersonHandle} * @memberof SDKEventAuthenticationFailedV1 */ handle?: PersonHandle; /** * * @type {string} * @memberof SDKEventAuthenticationFailedV1 */ challenge_id?: string; } /** * * @export * @interface SDKEventAuthenticationSucceededV1 */ interface SDKEventAuthenticationSucceededV1 { /** * * @type {EventName} * @memberof SDKEventAuthenticationSucceededV1 */ event_name: EventName; /** * Person ID * @type {string} * @memberof SDKEventAuthenticationSucceededV1 */ person_id: string; /** * * @type {FactorMethod} * @memberof SDKEventAuthenticationSucceededV1 */ success_authn_method: _FactorMethod1; /** * * @type {Array<FactorMethod>} * @memberof SDKEventAuthenticationSucceededV1 */ authenticated_methods: Array<_FactorMethod1>; /** * * @type {PersonHandle} * @memberof SDKEventAuthenticationSucceededV1 */ handle?: PersonHandle; } /** * * @export * @interface SDKEventPersonIdentifiedV1 */ interface SDKEventPersonIdentifiedV1 { /** * * @type {EventName} * @memberof SDKEventPersonIdentifiedV1 */ event_name: EventName; /** * Person ID * @type {string} * @memberof SDKEventPersonIdentifiedV1 */ person_id: string; } /** * * @export * @interface SDKEventPersonLoggedOutV1 */ interface SDKEventPersonLoggedOutV1 { /** * * @type {EventName} * @memberof SDKEventPersonLoggedOutV1 */ event_name: EventName; /** * Person ID * @type {string} * @memberof SDKEventPersonLoggedOutV1 */ person_id: string; } /** * * @export * @interface SDKEventSlashIDSDKLoadedV1 */ interface SDKEventSlashIDSDKLoadedV1 { /** * * @type {EventName} * @memberof SDKEventSlashIDSDKLoadedV1 */ event_name: EventName; } /** * * @export * @interface SDKEventVirtualPageLoadedV1 */ interface SDKEventVirtualPageLoadedV1 { /** * * @type {EventName} * @memberof SDKEventVirtualPageLoadedV1 */ event_name: EventName; /** * Person ID * @type {string} * @memberof SDKEventVirtualPageLoadedV1 */ person_id?: string; } /** * @type EventPostRequestEventData * * @export */ type EventPostRequestEventData = ({ event_name: 'AuthenticationFailed_v1'; } & SDKEventAuthenticationFailedV1) | ({ event_name: 'AuthenticationSucceeded_v1'; } & SDKEventAuthenticationSucceededV1) | ({ event_name: 'PersonIdentified_v1'; } & SDKEventPersonIdentifiedV1) | ({ event_name: 'PersonLoggedOut_v1'; } & SDKEventPersonLoggedOutV1) | ({ event_name: 'SlashIDSDKLoaded_v1'; } & SDKEventSlashIDSDKLoadedV1) | ({ event_name: 'VirtualPageLoaded_v1'; } & SDKEventVirtualPageLoadedV1); /** * * @export * @interface EventPostRequest */ interface EventPostRequest { /** * * @type {string} * @memberof EventPostRequest */ organization_id: string; /** * * @type {string} * @memberof EventPostRequest */ analytics_correlation_id: string; /** * * @type {string} * @memberof EventPostRequest */ window_location: string; /** * * @type {string} * @memberof EventPostRequest */ user_agent: string; /** * * @type {EventPostRequestEventData} * @memberof EventPostRequest */ event_data: EventPostRequestEventData; } /** * * @export * @interface PasswordCredentialParams */ interface PasswordCredentialParams { /** * A hash of a password, in the one of the formats accepts by SlashID. * SlashID supports the following hashing functions: * - pbkdf2 * - bcrypt * - argon2i * - argon2id * Hashes created using a function not listed here will be rejected. * In all of these cases, SlashID accepts hashes in the format described [here](https://github.com/P-H-C/phc-string-format/blob/master/phc-sf-spec.md). * The only departure from the specification described is that the hashing function version can include the characters [a-z0-9], to accommodate bcrypt versions (2, 2a, 2b, 2x, 2y). * SlashID also accepts password hashes in the format used by [bcrypt](https://www.usenix.org/legacy/events/usenix99/provos/provos.pdf). * If a password hash matches this format, it is assumed that the hashing function used was bcrypt. * If any other hashing function was used to hash the password, the hash must be in the SlashID hash format. * @type {string} * @memberof PasswordCredentialParams */ password_hash: string; } /** * * @export * @interface ExportedPasswordCredential */ interface ExportedPasswordCredential { /** * The ID of the credential * @type {string} * @memberof ExportedPasswordCredential */ id: string; /** * The time when the credential was last used to authenticate successfully * @type {Date} * @memberof ExportedPasswordCredential */ last_used?: Date; /** * * @type {CredentialType} * @memberof ExportedPasswordCredential */ type: CredentialType; /** * * @type {PasswordCredentialParams} * @memberof ExportedPasswordCredential */ params: PasswordCredentialParams; /** * * @type {string} * @memberof ExportedPasswordCredential */ label?: string; } /** * * @export * @interface PublicKeyAuthenticator */ interface PublicKeyAuthenticator { /** * Base64-encoded AAGUID of the authenticator device * @type {string} * @memberof PublicKeyAuthenticator */ aaguid: string; /** * * @type {number} * @memberof PublicKeyAuthenticator */ sign_count?: number; /** * * @type {boolean} * @memberof PublicKeyAuthenticator */ clone_warning?: boolean; } /** * * @export * @interface PublicKeyCredentialParams */ interface PublicKeyCredentialParams { /** * The ID of the webauthn credential * @type {string} * @memberof PublicKeyCredentialParams */ webauthn_credential_id: string; /** * Base64-encoded public key * @type {string} * @memberof PublicKeyCredentialParams */ public_key: string; /** * The attestation type for the public key (defaults to "none") * @type {string} * @memberof PublicKeyCredentialParams */ attestation_type: string; /** * * @type {PublicKeyAuthenticator} * @memberof PublicKeyCredentialParams */ authenticator: PublicKeyAuthenticator; } /** * * @export * @interface ExportedPublicKeyCredential */ interface ExportedPublicKeyCredential { /** * The ID of the credential * @type {string} * @memberof ExportedPublicKeyCredential */ id: string; /** * The time when the credential was last used to authenticate successfully * @type {Date} * @memberof ExportedPublicKeyCredential */ last_used?: Date; /** * * @type {CredentialType} * @memberof ExportedPublicKeyCredential */ type: CredentialType; /** * * @type {PublicKeyCredentialParams} * @memberof ExportedPublicKeyCredential */ params: PublicKeyCredentialParams; /** * * @type {string} * @memberof ExportedPublicKeyCredential */ label?: string; } /** * * @export * @interface ExportedTOTPCredentialParams */ interface ExportedTOTPCredentialParams { /** * The total number of recovery codes originally issued to the given person. * @type {number} * @memberof ExportedTOTPCredentialParams */ recovery_codes_total: number; /** * The total number of recovery codes still unused by the given person. * @type {number} * @memberof ExportedTOTPCredentialParams */ recovery_codes_unused: number; } /** * * @export * @interface ExportedTOTPCredential */ interface ExportedTOTPCredential { /** * The ID of the credential * @type {string} * @memberof ExportedTOTPCredential */ id: string; /** * The time when the credential was last used to authenticate successfully * @type {Date} * @memberof ExportedTOTPCredential */ last_used?: Date; /** * * @type {CredentialType} * @memberof ExportedTOTPCredential */ type: CredentialType; /** * * @type {ExportedTOTPCredentialParams} * @memberof ExportedTOTPCredential */ params: ExportedTOTPCredentialParams; /** * * @type {string} * @memberof ExportedTOTPCredential */ label?: string; } /** * @type ExportedCredential * * @export */ type ExportedCredential = ({ type: 'password'; } & ExportedPasswordCredential) | ({ type: 'public-key'; } & ExportedPublicKeyCredential) | ({ type: 'totp'; } & ExportedTOTPCredential); /** * SlashID API v1.1 * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * Do not edit the class manually. */ /** * * @export */ declare const GDPRConsentLevel: { readonly None: "none"; readonly Necessary: "necessary"; readonly Analytics: "analytics"; readonly Marketing: "marketing"; readonly Retargeting: "retargeting"; readonly Tracking: "tracking"; }; type GDPRConsentLevel = (typeof GDPRConsentLevel)[keyof typeof GDPRConsentLevel]; /** * * @export * @interface GDPRConsent */ interface GDPRConsent { /** * * @type {GDPRConsentLevel} * @memberof GDPRConsent */ consent_level: GDPRConsentLevel; /** * Time when this consent was first created for this person * @type {Date} * @memberof GDPRConsent */