open ai api

This commit is contained in:
2025-09-16 09:38:01 +08:00
parent c71c3ab417
commit 5f9a2bc78c
7168 changed files with 352600 additions and 209 deletions

View File

@@ -0,0 +1,6 @@
export declare const SignInScenario: {
readonly SignInAfterSignUp: "SignInAfterSignUp";
readonly SignInAfterPasswordReset: "SignInAfterPasswordReset";
};
export type SignInScenarioType = (typeof SignInScenario)[keyof typeof SignInScenario];
//# sourceMappingURL=SignInScenario.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"SignInScenario.d.ts","sourceRoot":"","sources":["../../../../src/custom_auth/sign_in/auth_flow/SignInScenario.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,cAAc;;;CAGjB,CAAC;AAEX,MAAM,MAAM,kBAAkB,GAC1B,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,OAAO,cAAc,CAAC,CAAC"}

View File

@@ -0,0 +1,45 @@
import { AuthActionErrorBase } from "../../../core/auth_flow/AuthFlowErrorBase.js";
export declare class SignInError extends AuthActionErrorBase {
/**
* Checks if the error is due to the user not being found.
* @returns true if the error is due to the user not being found, false otherwise.
*/
isUserNotFound(): boolean;
/**
* Checks if the error is due to the username being invalid.
* @returns true if the error is due to the username being invalid, false otherwise.
*/
isInvalidUsername(): boolean;
/**
* Checks if the error is due to the provided password being incorrect.
* @returns true if the error is due to the provided password being incorrect, false otherwise.
*/
isPasswordIncorrect(): boolean;
/**
* Checks if the error is due to password reset being required.
* @returns true if the error is due to password reset being required, false otherwise.
*/
isPasswordResetRequired(): boolean;
/**
* Checks if the error is due to the provided challenge type is not supported.
* @returns {boolean} True if the error is due to the provided challenge type is not supported, false otherwise.
*/
isUnsupportedChallengeType(): boolean;
}
export declare class SignInSubmitPasswordError extends AuthActionErrorBase {
/**
* Checks if the password submitted during sign-in is incorrect.
* @returns {boolean} True if the error is due to the password being invalid, false otherwise.
*/
isInvalidPassword(): boolean;
}
export declare class SignInSubmitCodeError extends AuthActionErrorBase {
/**
* Checks if the code submitted during sign-in is invalid.
* @returns {boolean} True if the error is due to the code being invalid, false otherwise.
*/
isInvalidCode(): boolean;
}
export declare class SignInResendCodeError extends AuthActionErrorBase {
}
//# sourceMappingURL=SignInError.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"SignInError.d.ts","sourceRoot":"","sources":["../../../../../src/custom_auth/sign_in/auth_flow/error_type/SignInError.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,mBAAmB,EAAE,MAAM,8CAA8C,CAAC;AAGnF,qBAAa,WAAY,SAAQ,mBAAmB;IAChD;;;OAGG;IACH,cAAc,IAAI,OAAO;IAIzB;;;OAGG;IACH,iBAAiB,IAAI,OAAO;IAI5B;;;OAGG;IACH,mBAAmB,IAAI,OAAO;IAI9B;;;OAGG;IACH,uBAAuB,IAAI,OAAO;IAIlC;;;OAGG;IACH,0BAA0B,IAAI,OAAO;CAGxC;AAED,qBAAa,yBAA0B,SAAQ,mBAAmB;IAC9D;;;OAGG;IACH,iBAAiB,IAAI,OAAO;CAG/B;AAED,qBAAa,qBAAsB,SAAQ,mBAAmB;IAC1D;;;OAGG;IACH,aAAa,IAAI,OAAO;CAG3B;AAED,qBAAa,qBAAsB,SAAQ,mBAAmB;CAAG"}

View File

@@ -0,0 +1,37 @@
import { AuthFlowResultBase } from "../../../core/auth_flow/AuthFlowResultBase.js";
import { SignInResendCodeError } from "../error_type/SignInError.js";
import type { SignInCodeRequiredState } from "../state/SignInCodeRequiredState.js";
import { SignInFailedState } from "../state/SignInFailedState.js";
export declare class SignInResendCodeResult extends AuthFlowResultBase<SignInResendCodeResultState, SignInResendCodeError, void> {
/**
* Creates a new instance of SignInResendCodeResult.
* @param state The state of the result.
*/
constructor(state: SignInResendCodeResultState);
/**
* Creates a new instance of SignInResendCodeResult with an error.
* @param error The error that occurred.
* @returns {SignInResendCodeResult} A new instance of SignInResendCodeResult with the error set.
*/
static createWithError(error: unknown): SignInResendCodeResult;
/**
* Checks if the result is in a failed state.
*/
isFailed(): this is SignInResendCodeResult & {
state: SignInFailedState;
};
/**
* Checks if the result is in a code required state.
*/
isCodeRequired(): this is SignInResendCodeResult & {
state: SignInCodeRequiredState;
};
}
/**
* The possible states for the SignInResendCodeResult.
* This includes:
* - SignInCodeRequiredState: The sign-in process requires a code.
* - SignInFailedState: The sign-in process has failed.
*/
export type SignInResendCodeResultState = SignInCodeRequiredState | SignInFailedState;
//# sourceMappingURL=SignInResendCodeResult.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"SignInResendCodeResult.d.ts","sourceRoot":"","sources":["../../../../../src/custom_auth/sign_in/auth_flow/result/SignInResendCodeResult.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,kBAAkB,EAAE,MAAM,+CAA+C,CAAC;AACnF,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AACnF,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAElE,qBAAa,sBAAuB,SAAQ,kBAAkB,CAC1D,2BAA2B,EAC3B,qBAAqB,EACrB,IAAI,CACP;IACG;;;OAGG;gBACS,KAAK,EAAE,2BAA2B;IAI9C;;;;OAIG;IACH,MAAM,CAAC,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,sBAAsB;IAS9D;;OAEG;IACH,QAAQ,IAAI,IAAI,IAAI,sBAAsB,GAAG;QAAE,KAAK,EAAE,iBAAiB,CAAA;KAAE;IAIzE;;OAEG;IACH,cAAc,IAAI,IAAI,IAAI,sBAAsB,GAAG;QAC/C,KAAK,EAAE,uBAAuB,CAAC;KAClC;CAOJ;AAED;;;;;GAKG;AACH,MAAM,MAAM,2BAA2B,GACjC,uBAAuB,GACvB,iBAAiB,CAAC"}

View File

@@ -0,0 +1,54 @@
import { CustomAuthAccountData } from "../../../get_account/auth_flow/CustomAuthAccountData.js";
import { AuthFlowResultBase } from "../../../core/auth_flow/AuthFlowResultBase.js";
import { SignInError } from "../error_type/SignInError.js";
import { SignInCodeRequiredState } from "../state/SignInCodeRequiredState.js";
import { SignInPasswordRequiredState } from "../state/SignInPasswordRequiredState.js";
import { SignInFailedState } from "../state/SignInFailedState.js";
import { SignInCompletedState } from "../state/SignInCompletedState.js";
export declare class SignInResult extends AuthFlowResultBase<SignInResultState, SignInError, CustomAuthAccountData> {
/**
* Creates a new instance of SignInResultState.
* @param state The state of the result.
*/
constructor(state: SignInResultState, resultData?: CustomAuthAccountData);
/**
* Creates a new instance of SignInResult with an error.
* @param error The error that occurred.
* @returns {SignInResult} A new instance of SignInResult with the error set.
*/
static createWithError(error: unknown): SignInResult;
/**
* Checks if the result is in a failed state.
*/
isFailed(): this is SignInResult & {
state: SignInFailedState;
};
/**
* Checks if the result is in a code required state.
*/
isCodeRequired(): this is SignInResult & {
state: SignInCodeRequiredState;
};
/**
* Checks if the result is in a password required state.
*/
isPasswordRequired(): this is SignInResult & {
state: SignInPasswordRequiredState;
};
/**
* Checks if the result is in a completed state.
*/
isCompleted(): this is SignInResult & {
state: SignInCompletedState;
};
}
/**
* The possible states for the SignInResult.
* This includes:
* - SignInCodeRequiredState: The sign-in process requires a code.
* - SignInPasswordRequiredState: The sign-in process requires a password.
* - SignInFailedState: The sign-in process has failed.
* - SignInCompletedState: The sign-in process is completed.
*/
export type SignInResultState = SignInCodeRequiredState | SignInPasswordRequiredState | SignInFailedState | SignInCompletedState;
//# sourceMappingURL=SignInResult.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"SignInResult.d.ts","sourceRoot":"","sources":["../../../../../src/custom_auth/sign_in/auth_flow/result/SignInResult.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yDAAyD,CAAC;AAChG,OAAO,EAAE,kBAAkB,EAAE,MAAM,+CAA+C,CAAC;AACnF,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAC9E,OAAO,EAAE,2BAA2B,EAAE,MAAM,yCAAyC,CAAC;AACtF,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAKxE,qBAAa,YAAa,SAAQ,kBAAkB,CAChD,iBAAiB,EACjB,WAAW,EACX,qBAAqB,CACxB;IACG;;;OAGG;gBACS,KAAK,EAAE,iBAAiB,EAAE,UAAU,CAAC,EAAE,qBAAqB;IAIxE;;;;OAIG;IACH,MAAM,CAAC,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,YAAY;IAOpD;;OAEG;IACH,QAAQ,IAAI,IAAI,IAAI,YAAY,GAAG;QAAE,KAAK,EAAE,iBAAiB,CAAA;KAAE;IAI/D;;OAEG;IACH,cAAc,IAAI,IAAI,IAAI,YAAY,GAAG;QACrC,KAAK,EAAE,uBAAuB,CAAC;KAClC;IAID;;OAEG;IACH,kBAAkB,IAAI,IAAI,IAAI,YAAY,GAAG;QACzC,KAAK,EAAE,2BAA2B,CAAC;KACtC;IAID;;OAEG;IACH,WAAW,IAAI,IAAI,IAAI,YAAY,GAAG;QAAE,KAAK,EAAE,oBAAoB,CAAA;KAAE;CAGxE;AAED;;;;;;;GAOG;AACH,MAAM,MAAM,iBAAiB,GACvB,uBAAuB,GACvB,2BAA2B,GAC3B,iBAAiB,GACjB,oBAAoB,CAAC"}

View File

@@ -0,0 +1,25 @@
import { SignInSubmitCodeError } from "../error_type/SignInError.js";
import { SignInCompletedState } from "../state/SignInCompletedState.js";
import { SignInFailedState } from "../state/SignInFailedState.js";
import { SignInSubmitCredentialResult } from "./SignInSubmitCredentialResult.js";
export declare class SignInSubmitCodeResult extends SignInSubmitCredentialResult<SignInSubmitCodeError> {
/**
* Creates a new instance of SignInSubmitCodeResult with error data.
* @param error The error that occurred.
* @returns {SignInSubmitCodeResult} A new instance of SignInSubmitCodeResult with the error set.
*/
static createWithError(error: unknown): SignInSubmitCodeResult;
/**
* Checks if the result is in a failed state.
*/
isFailed(): this is SignInSubmitCodeResult & {
state: SignInFailedState;
};
/**
* Checks if the result is in a completed state.
*/
isCompleted(): this is SignInSubmitCodeResult & {
state: SignInCompletedState;
};
}
//# sourceMappingURL=SignInSubmitCodeResult.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"SignInSubmitCodeResult.d.ts","sourceRoot":"","sources":["../../../../../src/custom_auth/sign_in/auth_flow/result/SignInSubmitCodeResult.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AAKjF,qBAAa,sBAAuB,SAAQ,4BAA4B,CAAC,qBAAqB,CAAC;IAC3F;;;;OAIG;IACH,MAAM,CAAC,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,sBAAsB;IAS9D;;OAEG;IACH,QAAQ,IAAI,IAAI,IAAI,sBAAsB,GAAG;QAAE,KAAK,EAAE,iBAAiB,CAAA;KAAE;IAIzE;;OAEG;IACH,WAAW,IAAI,IAAI,IAAI,sBAAsB,GAAG;QAC5C,KAAK,EAAE,oBAAoB,CAAC;KAC/B;CAGJ"}

View File

@@ -0,0 +1,21 @@
import { CustomAuthAccountData } from "../../../get_account/auth_flow/CustomAuthAccountData.js";
import { AuthFlowErrorBase } from "../../../core/auth_flow/AuthFlowErrorBase.js";
import { AuthFlowResultBase } from "../../../core/auth_flow/AuthFlowResultBase.js";
import { SignInFailedState } from "../state/SignInFailedState.js";
import { SignInCompletedState } from "../state/SignInCompletedState.js";
export declare abstract class SignInSubmitCredentialResult<TError extends AuthFlowErrorBase> extends AuthFlowResultBase<SignInSubmitCredentialResultState, TError, CustomAuthAccountData> {
/**
* Creates a new instance of SignInSubmitCredentialResult.
* @param state The state of the result.
* @param resultData The result data.
*/
constructor(state: SignInSubmitCredentialResultState, resultData?: CustomAuthAccountData);
}
/**
* The possible states of the SignInSubmitCredentialResult.
* This includes:
* - SignInCompletedState: The sign-in process has completed successfully.
* - SignInFailedState: The sign-in process has failed.
*/
export type SignInSubmitCredentialResultState = SignInCompletedState | SignInFailedState;
//# sourceMappingURL=SignInSubmitCredentialResult.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"SignInSubmitCredentialResult.d.ts","sourceRoot":"","sources":["../../../../../src/custom_auth/sign_in/auth_flow/result/SignInSubmitCredentialResult.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yDAAyD,CAAC;AAChG,OAAO,EAAE,iBAAiB,EAAE,MAAM,8CAA8C,CAAC;AACjF,OAAO,EAAE,kBAAkB,EAAE,MAAM,+CAA+C,CAAC;AACnF,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAKxE,8BAAsB,4BAA4B,CAC9C,MAAM,SAAS,iBAAiB,CAClC,SAAQ,kBAAkB,CACxB,iCAAiC,EACjC,MAAM,EACN,qBAAqB,CACxB;IACG;;;;OAIG;gBAEC,KAAK,EAAE,iCAAiC,EACxC,UAAU,CAAC,EAAE,qBAAqB;CAIzC;AAED;;;;;GAKG;AACH,MAAM,MAAM,iCAAiC,GACvC,oBAAoB,GACpB,iBAAiB,CAAC"}

View File

@@ -0,0 +1,20 @@
import { SignInSubmitPasswordError } from "../error_type/SignInError.js";
import { SignInCompletedState } from "../state/SignInCompletedState.js";
import { SignInFailedState } from "../state/SignInFailedState.js";
import { SignInSubmitCredentialResult } from "./SignInSubmitCredentialResult.js";
export declare class SignInSubmitPasswordResult extends SignInSubmitCredentialResult<SignInSubmitPasswordError> {
static createWithError(error: unknown): SignInSubmitPasswordResult;
/**
* Checks if the result is in a failed state.
*/
isFailed(): this is SignInSubmitPasswordResult & {
state: SignInFailedState;
};
/**
* Checks if the result is in a completed state.
*/
isCompleted(): this is SignInSubmitPasswordResult & {
state: SignInCompletedState;
};
}
//# sourceMappingURL=SignInSubmitPasswordResult.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"SignInSubmitPasswordResult.d.ts","sourceRoot":"","sources":["../../../../../src/custom_auth/sign_in/auth_flow/result/SignInSubmitPasswordResult.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AACzE,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AAKjF,qBAAa,0BAA2B,SAAQ,4BAA4B,CAAC,yBAAyB,CAAC;IACnG,MAAM,CAAC,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,0BAA0B;IASlE;;OAEG;IACH,QAAQ,IAAI,IAAI,IAAI,0BAA0B,GAAG;QAC7C,KAAK,EAAE,iBAAiB,CAAC;KAC5B;IAID;;OAEG;IACH,WAAW,IAAI,IAAI,IAAI,0BAA0B,GAAG;QAChD,KAAK,EAAE,oBAAoB,CAAC;KAC/B;CAGJ"}

View File

@@ -0,0 +1,29 @@
import { SignInResendCodeResult } from "../result/SignInResendCodeResult.js";
import { SignInSubmitCodeResult } from "../result/SignInSubmitCodeResult.js";
import { SignInCodeRequiredStateParameters } from "./SignInStateParameters.js";
import { SignInState } from "./SignInState.js";
export declare class SignInCodeRequiredState extends SignInState<SignInCodeRequiredStateParameters> {
/**
* Once user configures email one-time passcode as a authentication method in Microsoft Entra, a one-time passcode will be sent to the user’s email.
* Submit this one-time passcode to continue sign-in flow.
* @param {string} code - The code to submit.
* @returns {Promise<SignInSubmitCodeResult>} The result of the operation.
*/
submitCode(code: string): Promise<SignInSubmitCodeResult>;
/**
* Resends the another one-time passcode for sign-in flow if the previous one hasn't been verified.
* @returns {Promise<SignInResendCodeResult>} The result of the operation.
*/
resendCode(): Promise<SignInResendCodeResult>;
/**
* Gets the sent code length.
* @returns {number} The length of the code.
*/
getCodeLength(): number;
/**
* Gets the scopes to request.
* @returns {string[] | undefined} The scopes to request.
*/
getScopes(): string[] | undefined;
}
//# sourceMappingURL=SignInCodeRequiredState.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"SignInCodeRequiredState.d.ts","sourceRoot":"","sources":["../../../../../src/custom_auth/sign_in/auth_flow/state/SignInCodeRequiredState.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAC7E,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAC7E,OAAO,EAAE,iCAAiC,EAAE,MAAM,4BAA4B,CAAC;AAC/E,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAM/C,qBAAa,uBAAwB,SAAQ,WAAW,CAAC,iCAAiC,CAAC;IACvF;;;;;OAKG;IACG,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,sBAAsB,CAAC;IAqD/D;;;OAGG;IACG,UAAU,IAAI,OAAO,CAAC,sBAAsB,CAAC;IA2CnD;;;OAGG;IACH,aAAa,IAAI,MAAM;IAIvB;;;OAGG;IACH,SAAS,IAAI,MAAM,EAAE,GAAG,SAAS;CAGpC"}

View File

@@ -0,0 +1,8 @@
import { AuthFlowStateBase } from "../../../core/auth_flow/AuthFlowState.js";
/**
* Represents the completed state of the sign-in operation.
* This state indicates that the sign-in process has finished successfully.
*/
export declare class SignInCompletedState extends AuthFlowStateBase {
}
//# sourceMappingURL=SignInCompletedState.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"SignInCompletedState.d.ts","sourceRoot":"","sources":["../../../../../src/custom_auth/sign_in/auth_flow/state/SignInCompletedState.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAC;AAE7E;;;GAGG;AACH,qBAAa,oBAAqB,SAAQ,iBAAiB;CAAG"}

View File

@@ -0,0 +1,13 @@
import { SignInResult } from "../result/SignInResult.js";
import { SignInWithContinuationTokenInputs } from "../../../CustomAuthActionInputs.js";
import { SignInContinuationStateParameters } from "./SignInStateParameters.js";
import { SignInState } from "./SignInState.js";
export declare class SignInContinuationState extends SignInState<SignInContinuationStateParameters> {
/**
* Initiates the sign-in flow with continuation token.
* @param {SignInWithContinuationTokenInputs} signInWithContinuationTokenInputs - The result of the operation.
* @returns {Promise<SignInResult>} The result of the operation.
*/
signIn(signInWithContinuationTokenInputs?: SignInWithContinuationTokenInputs): Promise<SignInResult>;
}
//# sourceMappingURL=SignInContinuationState.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"SignInContinuationState.d.ts","sourceRoot":"","sources":["../../../../../src/custom_auth/sign_in/auth_flow/state/SignInContinuationState.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,iCAAiC,EAAE,MAAM,oCAAoC,CAAC;AACvF,OAAO,EAAE,iCAAiC,EAAE,MAAM,4BAA4B,CAAC;AAC/E,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAO/C,qBAAa,uBAAwB,SAAQ,WAAW,CAAC,iCAAiC,CAAC;IACvF;;;;OAIG;IACG,MAAM,CACR,iCAAiC,CAAC,EAAE,iCAAiC,GACtE,OAAO,CAAC,YAAY,CAAC;CAuD3B"}

View File

@@ -0,0 +1,7 @@
import { AuthFlowStateBase } from "../../../core/auth_flow/AuthFlowState.js";
/**
* Represents the state of a sign-in operation that has been failed.
*/
export declare class SignInFailedState extends AuthFlowStateBase {
}
//# sourceMappingURL=SignInFailedState.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"SignInFailedState.d.ts","sourceRoot":"","sources":["../../../../../src/custom_auth/sign_in/auth_flow/state/SignInFailedState.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAC;AAE7E;;GAEG;AACH,qBAAa,iBAAkB,SAAQ,iBAAiB;CAAG"}

View File

@@ -0,0 +1,17 @@
import { SignInSubmitPasswordResult } from "../result/SignInSubmitPasswordResult.js";
import { SignInState } from "./SignInState.js";
import { SignInPasswordRequiredStateParameters } from "./SignInStateParameters.js";
export declare class SignInPasswordRequiredState extends SignInState<SignInPasswordRequiredStateParameters> {
/**
* Once user configures email with password as a authentication method in Microsoft Entra, user submits a password to continue sign-in flow.
* @param {string} password - The password to submit.
* @returns {Promise<SignInSubmitPasswordResult>} The result of the operation.
*/
submitPassword(password: string): Promise<SignInSubmitPasswordResult>;
/**
* Gets the scopes to request.
* @returns {string[] | undefined} The scopes to request.
*/
getScopes(): string[] | undefined;
}
//# sourceMappingURL=SignInPasswordRequiredState.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"SignInPasswordRequiredState.d.ts","sourceRoot":"","sources":["../../../../../src/custom_auth/sign_in/auth_flow/state/SignInPasswordRequiredState.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAC;AAErF,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,qCAAqC,EAAE,MAAM,4BAA4B,CAAC;AAKnF,qBAAa,2BAA4B,SAAQ,WAAW,CAAC,qCAAqC,CAAC;IAC/F;;;;OAIG;IACG,cAAc,CAChB,QAAQ,EAAE,MAAM,GACjB,OAAO,CAAC,0BAA0B,CAAC;IAqDtC;;;OAGG;IACH,SAAS,IAAI,MAAM,EAAE,GAAG,SAAS;CAGpC"}

View File

@@ -0,0 +1,6 @@
import { AuthFlowActionRequiredStateBase } from "../../../core/auth_flow/AuthFlowState.js";
import { SignInStateParameters } from "./SignInStateParameters.js";
export declare abstract class SignInState<TParameters extends SignInStateParameters> extends AuthFlowActionRequiredStateBase<TParameters> {
constructor(stateParameters: TParameters);
}
//# sourceMappingURL=SignInState.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"SignInState.d.ts","sourceRoot":"","sources":["../../../../../src/custom_auth/sign_in/auth_flow/state/SignInState.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,+BAA+B,EAAE,MAAM,0CAA0C,CAAC;AAE3F,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAKnE,8BAAsB,WAAW,CAC7B,WAAW,SAAS,qBAAqB,CAC3C,SAAQ,+BAA+B,CAAC,WAAW,CAAC;gBAKtC,eAAe,EAAE,WAAW;CAc3C"}

View File

@@ -0,0 +1,21 @@
import { AuthFlowActionRequiredStateParameters } from "../../../core/auth_flow/AuthFlowState.js";
import { CustomAuthSilentCacheClient } from "../../../get_account/interaction_client/CustomAuthSilentCacheClient.js";
import { SignInClient } from "../../interaction_client/SignInClient.js";
import { SignInScenarioType } from "../SignInScenario.js";
export interface SignInStateParameters extends AuthFlowActionRequiredStateParameters {
username: string;
signInClient: SignInClient;
cacheClient: CustomAuthSilentCacheClient;
claims?: string;
}
export interface SignInPasswordRequiredStateParameters extends SignInStateParameters {
scopes?: string[];
}
export interface SignInCodeRequiredStateParameters extends SignInStateParameters {
codeLength: number;
scopes?: string[];
}
export interface SignInContinuationStateParameters extends SignInStateParameters {
signInScenario: SignInScenarioType;
}
//# sourceMappingURL=SignInStateParameters.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"SignInStateParameters.d.ts","sourceRoot":"","sources":["../../../../../src/custom_auth/sign_in/auth_flow/state/SignInStateParameters.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,qCAAqC,EAAE,MAAM,0CAA0C,CAAC;AACjG,OAAO,EAAE,2BAA2B,EAAE,MAAM,wEAAwE,CAAC;AACrH,OAAO,EAAE,YAAY,EAAE,MAAM,0CAA0C,CAAC;AACxE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,MAAM,WAAW,qBACb,SAAQ,qCAAqC;IAC7C,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,YAAY,CAAC;IAC3B,WAAW,EAAE,2BAA2B,CAAC;IACzC,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,qCACb,SAAQ,qBAAqB;IAC7B,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACrB;AAED,MAAM,WAAW,iCACb,SAAQ,qBAAqB;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACrB;AAED,MAAM,WAAW,iCACb,SAAQ,qBAAqB;IAC7B,cAAc,EAAE,kBAAkB,CAAC;CACtC"}

View File

@@ -0,0 +1,48 @@
import { CustomAuthInteractionClientBase } from "../../core/interaction_client/CustomAuthInteractionClientBase.js";
import { SignInStartParams, SignInResendCodeParams, SignInSubmitCodeParams, SignInSubmitPasswordParams, SignInContinuationTokenParams } from "./parameter/SignInParams.js";
import { SignInCodeSendResult, SignInCompletedResult, SignInPasswordRequiredResult } from "./result/SignInActionResult.js";
import { ICustomAuthApiClient } from "../../core/network_client/custom_auth_api/ICustomAuthApiClient.js";
import { CustomAuthAuthority } from "../../core/CustomAuthAuthority.js";
import { ICrypto, IPerformanceClient, Logger } from "@azure/msal-common/browser";
import { BrowserConfiguration } from "../../../config/Configuration.js";
import { BrowserCacheManager } from "../../../cache/BrowserCacheManager.js";
import { EventHandler } from "../../../event/EventHandler.js";
import { INavigationClient } from "../../../navigation/INavigationClient.js";
export declare class SignInClient extends CustomAuthInteractionClientBase {
private readonly tokenResponseHandler;
constructor(config: BrowserConfiguration, storageImpl: BrowserCacheManager, browserCrypto: ICrypto, logger: Logger, eventHandler: EventHandler, navigationClient: INavigationClient, performanceClient: IPerformanceClient, customAuthApiClient: ICustomAuthApiClient, customAuthAuthority: CustomAuthAuthority);
/**
* Starts the signin flow.
* @param parameters The parameters required to start the sign-in flow.
* @returns The result of the sign-in start operation.
*/
start(parameters: SignInStartParams): Promise<SignInPasswordRequiredResult | SignInCodeSendResult>;
/**
* Resends the code for sign-in flow.
* @param parameters The parameters required to resend the code.
* @returns The result of the sign-in resend code action.
*/
resendCode(parameters: SignInResendCodeParams): Promise<SignInCodeSendResult>;
/**
* Submits the code for sign-in flow.
* @param parameters The parameters required to submit the code.
* @returns The result of the sign-in submit code action.
*/
submitCode(parameters: SignInSubmitCodeParams): Promise<SignInCompletedResult>;
/**
* Submits the password for sign-in flow.
* @param parameters The parameters required to submit the password.
* @returns The result of the sign-in submit password action.
*/
submitPassword(parameters: SignInSubmitPasswordParams): Promise<SignInCompletedResult>;
/**
* Signs in with continuation token.
* @param parameters The parameters required to sign in with continuation token.
* @returns The result of the sign-in complete action.
*/
signInWithContinuationToken(parameters: SignInContinuationTokenParams): Promise<SignInCompletedResult>;
private performTokenRequest;
private performChallengeRequest;
private getPublicApiIdBySignInScenario;
}
//# sourceMappingURL=SignInClient.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"SignInClient.d.ts","sourceRoot":"","sources":["../../../../src/custom_auth/sign_in/interaction_client/SignInClient.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,+BAA+B,EAAE,MAAM,kEAAkE,CAAC;AACnH,OAAO,EACH,iBAAiB,EACjB,sBAAsB,EACtB,sBAAsB,EACtB,0BAA0B,EAC1B,6BAA6B,EAChC,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAKH,oBAAoB,EACpB,qBAAqB,EACrB,4BAA4B,EAC/B,MAAM,gCAAgC,CAAC;AAexC,OAAO,EAAE,oBAAoB,EAAE,MAAM,mEAAmE,CAAC;AACzG,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EACH,OAAO,EACP,kBAAkB,EAClB,MAAM,EAET,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAC;AAI7E,qBAAa,YAAa,SAAQ,+BAA+B;IAC7D,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAAkB;gBAGnD,MAAM,EAAE,oBAAoB,EAC5B,WAAW,EAAE,mBAAmB,EAChC,aAAa,EAAE,OAAO,EACtB,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,YAAY,EAC1B,gBAAgB,EAAE,iBAAiB,EACnC,iBAAiB,EAAE,kBAAkB,EACrC,mBAAmB,EAAE,oBAAoB,EACzC,mBAAmB,EAAE,mBAAmB;IAwB5C;;;;OAIG;IACG,KAAK,CACP,UAAU,EAAE,iBAAiB,GAC9B,OAAO,CAAC,4BAA4B,GAAG,oBAAoB,CAAC;IAoC/D;;;;OAIG;IACG,UAAU,CACZ,UAAU,EAAE,sBAAsB,GACnC,OAAO,CAAC,oBAAoB,CAAC;IA6BhC;;;;OAIG;IACG,UAAU,CACZ,UAAU,EAAE,sBAAsB,GACnC,OAAO,CAAC,qBAAqB,CAAC;IA+BjC;;;;OAIG;IACG,cAAc,CAChB,UAAU,EAAE,0BAA0B,GACvC,OAAO,CAAC,qBAAqB,CAAC;IA+BjC;;;;OAIG;IACG,2BAA2B,CAC7B,UAAU,EAAE,6BAA6B,GAC1C,OAAO,CAAC,qBAAqB,CAAC;YA8BnB,mBAAmB;YAyCnB,uBAAuB;IA6DrC,OAAO,CAAC,8BAA8B;CAgBzC"}

View File

@@ -0,0 +1,32 @@
import { SignInScenarioType } from "../../auth_flow/SignInScenario.js";
export interface SignInParamsBase {
clientId: string;
correlationId: string;
challengeType: Array<string>;
username: string;
}
export interface SignInResendCodeParams extends SignInParamsBase {
continuationToken: string;
}
export interface SignInStartParams extends SignInParamsBase {
password?: string;
}
export interface SignInSubmitCodeParams extends SignInParamsBase {
continuationToken: string;
code: string;
scopes: Array<string>;
claims?: string;
}
export interface SignInSubmitPasswordParams extends SignInParamsBase {
continuationToken: string;
password: string;
scopes: Array<string>;
claims?: string;
}
export interface SignInContinuationTokenParams extends SignInParamsBase {
continuationToken: string;
signInScenario: SignInScenarioType;
scopes: Array<string>;
claims?: string;
}
//# sourceMappingURL=SignInParams.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"SignInParams.d.ts","sourceRoot":"","sources":["../../../../../src/custom_auth/sign_in/interaction_client/parameter/SignInParams.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAEvE,MAAM,WAAW,gBAAgB;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,sBAAuB,SAAQ,gBAAgB;IAC5D,iBAAiB,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,iBAAkB,SAAQ,gBAAgB;IACvD,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,sBAAuB,SAAQ,gBAAgB;IAC5D,iBAAiB,EAAE,MAAM,CAAC;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,0BAA2B,SAAQ,gBAAgB;IAChE,iBAAiB,EAAE,MAAM,CAAC;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,6BAA8B,SAAQ,gBAAgB;IACnE,iBAAiB,EAAE,MAAM,CAAC;IAC1B,cAAc,EAAE,kBAAkB,CAAC;IACnC,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB"}

View File

@@ -0,0 +1,30 @@
import { AuthenticationResult } from "../../../../response/AuthenticationResult.js";
interface SignInActionResult {
type: string;
correlationId: string;
}
interface SignInContinuationTokenResult extends SignInActionResult {
continuationToken: string;
}
export interface SignInCompletedResult extends SignInActionResult {
type: typeof SIGN_IN_COMPLETED_RESULT_TYPE;
authenticationResult: AuthenticationResult;
}
export interface SignInPasswordRequiredResult extends SignInContinuationTokenResult {
type: typeof SIGN_IN_PASSWORD_REQUIRED_RESULT_TYPE;
}
export interface SignInCodeSendResult extends SignInContinuationTokenResult {
type: typeof SIGN_IN_CODE_SEND_RESULT_TYPE;
challengeChannel: string;
challengeTargetLabel: string;
codeLength: number;
bindingMethod: string;
}
export declare const SIGN_IN_CODE_SEND_RESULT_TYPE = "SignInCodeSendResult";
export declare const SIGN_IN_PASSWORD_REQUIRED_RESULT_TYPE = "SignInPasswordRequiredResult";
export declare const SIGN_IN_COMPLETED_RESULT_TYPE = "SignInCompletedResult";
export declare function createSignInCompleteResult(input: Omit<SignInCompletedResult, "type">): SignInCompletedResult;
export declare function createSignInPasswordRequiredResult(input: Omit<SignInPasswordRequiredResult, "type">): SignInPasswordRequiredResult;
export declare function createSignInCodeSendResult(input: Omit<SignInCodeSendResult, "type">): SignInCodeSendResult;
export {};
//# sourceMappingURL=SignInActionResult.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"SignInActionResult.d.ts","sourceRoot":"","sources":["../../../../../src/custom_auth/sign_in/interaction_client/result/SignInActionResult.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,oBAAoB,EAAE,MAAM,8CAA8C,CAAC;AAEpF,UAAU,kBAAkB;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,MAAM,CAAC;CACzB;AAED,UAAU,6BAA8B,SAAQ,kBAAkB;IAC9D,iBAAiB,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,qBAAsB,SAAQ,kBAAkB;IAC7D,IAAI,EAAE,OAAO,6BAA6B,CAAC;IAC3C,oBAAoB,EAAE,oBAAoB,CAAC;CAC9C;AAED,MAAM,WAAW,4BACb,SAAQ,6BAA6B;IACrC,IAAI,EAAE,OAAO,qCAAqC,CAAC;CACtD;AAED,MAAM,WAAW,oBAAqB,SAAQ,6BAA6B;IACvE,IAAI,EAAE,OAAO,6BAA6B,CAAC;IAC3C,gBAAgB,EAAE,MAAM,CAAC;IACzB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;CACzB;AAED,eAAO,MAAM,6BAA6B,yBAAyB,CAAC;AACpE,eAAO,MAAM,qCAAqC,iCAChB,CAAC;AACnC,eAAO,MAAM,6BAA6B,0BAA0B,CAAC;AAErE,wBAAgB,0BAA0B,CACtC,KAAK,EAAE,IAAI,CAAC,qBAAqB,EAAE,MAAM,CAAC,GAC3C,qBAAqB,CAKvB;AAED,wBAAgB,kCAAkC,CAC9C,KAAK,EAAE,IAAI,CAAC,4BAA4B,EAAE,MAAM,CAAC,GAClD,4BAA4B,CAK9B;AAED,wBAAgB,0BAA0B,CACtC,KAAK,EAAE,IAAI,CAAC,oBAAoB,EAAE,MAAM,CAAC,GAC1C,oBAAoB,CAKtB"}