@fusionauth/typescript-client 1.60.0 → 1.62.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -56,6 +56,13 @@ export declare class FusionAuthClient {
56
56
  * @returns {Promise<ClientResponse<DeviceApprovalResponse>>}
57
57
  */
58
58
  approveDevice(client_id: string, client_secret: string, token: string, user_code: string): Promise<ClientResponse<DeviceApprovalResponse>>;
59
+ /**
60
+ * Approve a device grant.
61
+ *
62
+ * @param {DeviceApprovalRequest} request The request object containing the device approval information and optional tenantId.
63
+ * @returns {Promise<ClientResponse<DeviceApprovalResponse>>}
64
+ */
65
+ approveDeviceWithRequest(request: DeviceApprovalRequest): Promise<ClientResponse<DeviceApprovalResponse>>;
59
66
  /**
60
67
  * Cancels the user action.
61
68
  *
@@ -120,6 +127,18 @@ export declare class FusionAuthClient {
120
127
  * @returns {Promise<ClientResponse<void>>}
121
128
  */
122
129
  checkChangePasswordUsingId(changePasswordId: string): Promise<ClientResponse<void>>;
130
+ /**
131
+ * Check to see if the user must obtain a Trust Token Id in order to complete a change password request.
132
+ * When a user has enabled Two-Factor authentication, before you are allowed to use the Change Password API to change
133
+ * your password, you must obtain a Trust Token by completing a Two-Factor Step-Up authentication.
134
+ *
135
+ * An HTTP status code of 400 with a general error code of [TrustTokenRequired] indicates that a Trust Token is required to make a POST request to this API.
136
+ *
137
+ * @param {string} changePasswordId The change password Id used to find the user. This value is generated by FusionAuth once the change password workflow has been initiated.
138
+ * @param {string} ipAddress (Optional) IP address of the user changing their password. This is used for MFA risk assessment.
139
+ * @returns {Promise<ClientResponse<void>>}
140
+ */
141
+ checkChangePasswordUsingIdAndIPAddress(changePasswordId: string, ipAddress: string): Promise<ClientResponse<void>>;
123
142
  /**
124
143
  * Check to see if the user must obtain a Trust Token Id in order to complete a change password request.
125
144
  * When a user has enabled Two-Factor authentication, before you are allowed to use the Change Password API to change
@@ -131,6 +150,18 @@ export declare class FusionAuthClient {
131
150
  * @returns {Promise<ClientResponse<void>>}
132
151
  */
133
152
  checkChangePasswordUsingJWT(encodedJWT: string): Promise<ClientResponse<void>>;
153
+ /**
154
+ * Check to see if the user must obtain a Trust Token Id in order to complete a change password request.
155
+ * When a user has enabled Two-Factor authentication, before you are allowed to use the Change Password API to change
156
+ * your password, you must obtain a Trust Token by completing a Two-Factor Step-Up authentication.
157
+ *
158
+ * An HTTP status code of 400 with a general error code of [TrustTokenRequired] indicates that a Trust Token is required to make a POST request to this API.
159
+ *
160
+ * @param {string} encodedJWT The encoded JWT (access token).
161
+ * @param {string} ipAddress (Optional) IP address of the user changing their password. This is used for MFA risk assessment.
162
+ * @returns {Promise<ClientResponse<void>>}
163
+ */
164
+ checkChangePasswordUsingJWTAndIPAddress(encodedJWT: string, ipAddress: string): Promise<ClientResponse<void>>;
134
165
  /**
135
166
  * Check to see if the user must obtain a Trust Request Id in order to complete a change password request.
136
167
  * When a user has enabled Two-Factor authentication, before you are allowed to use the Change Password API to change
@@ -138,10 +169,47 @@ export declare class FusionAuthClient {
138
169
  *
139
170
  * An HTTP status code of 400 with a general error code of [TrustTokenRequired] indicates that a Trust Token is required to make a POST request to this API.
140
171
  *
141
- * @param {string} loginId The loginId of the User that you intend to change the password for.
172
+ * @param {string} loginId The loginId (email or username) of the User that you intend to change the password for.
142
173
  * @returns {Promise<ClientResponse<void>>}
143
174
  */
144
175
  checkChangePasswordUsingLoginId(loginId: string): Promise<ClientResponse<void>>;
176
+ /**
177
+ * Check to see if the user must obtain a Trust Request Id in order to complete a change password request.
178
+ * When a user has enabled Two-Factor authentication, before you are allowed to use the Change Password API to change
179
+ * your password, you must obtain a Trust Request Id by completing a Two-Factor Step-Up authentication.
180
+ *
181
+ * An HTTP status code of 400 with a general error code of [TrustTokenRequired] indicates that a Trust Token is required to make a POST request to this API.
182
+ *
183
+ * @param {string} loginId The loginId (email or username) of the User that you intend to change the password for.
184
+ * @param {string} ipAddress (Optional) IP address of the user changing their password. This is used for MFA risk assessment.
185
+ * @returns {Promise<ClientResponse<void>>}
186
+ */
187
+ checkChangePasswordUsingLoginIdAndIPAddress(loginId: string, ipAddress: string): Promise<ClientResponse<void>>;
188
+ /**
189
+ * Check to see if the user must obtain a Trust Request Id in order to complete a change password request.
190
+ * When a user has enabled Two-Factor authentication, before you are allowed to use the Change Password API to change
191
+ * your password, you must obtain a Trust Request Id by completing a Two-Factor Step-Up authentication.
192
+ *
193
+ * An HTTP status code of 400 with a general error code of [TrustTokenRequired] indicates that a Trust Token is required to make a POST request to this API.
194
+ *
195
+ * @param {string} loginId The loginId of the User that you intend to change the password for.
196
+ * @param {Array<String>} loginIdTypes The identity types that FusionAuth will compare the loginId to.
197
+ * @returns {Promise<ClientResponse<void>>}
198
+ */
199
+ checkChangePasswordUsingLoginIdAndLoginIdTypes(loginId: string, loginIdTypes: Array<String>): Promise<ClientResponse<void>>;
200
+ /**
201
+ * Check to see if the user must obtain a Trust Request Id in order to complete a change password request.
202
+ * When a user has enabled Two-Factor authentication, before you are allowed to use the Change Password API to change
203
+ * your password, you must obtain a Trust Request Id by completing a Two-Factor Step-Up authentication.
204
+ *
205
+ * An HTTP status code of 400 with a general error code of [TrustTokenRequired] indicates that a Trust Token is required to make a POST request to this API.
206
+ *
207
+ * @param {string} loginId The loginId of the User that you intend to change the password for.
208
+ * @param {Array<String>} loginIdTypes The identity types that FusionAuth will compare the loginId to.
209
+ * @param {string} ipAddress (Optional) IP address of the user changing their password. This is used for MFA risk assessment.
210
+ * @returns {Promise<ClientResponse<void>>}
211
+ */
212
+ checkChangePasswordUsingLoginIdAndLoginIdTypesAndIPAddress(loginId: string, loginIdTypes: Array<String>, ipAddress: string): Promise<ClientResponse<void>>;
145
213
  /**
146
214
  * Make a Client Credentials grant request to obtain an access token.
147
215
  *
@@ -153,6 +221,13 @@ export declare class FusionAuthClient {
153
221
  * @returns {Promise<ClientResponse<AccessToken>>}
154
222
  */
155
223
  clientCredentialsGrant(client_id: string, client_secret: string, scope: string): Promise<ClientResponse<AccessToken>>;
224
+ /**
225
+ * Make a Client Credentials grant request to obtain an access token.
226
+ *
227
+ * @param {ClientCredentialsGrantRequest} request The client credentials grant request containing client authentication, scope and optional tenantId.
228
+ * @returns {Promise<ClientResponse<AccessToken>>}
229
+ */
230
+ clientCredentialsGrantWithRequest(request: ClientCredentialsGrantRequest): Promise<ClientResponse<AccessToken>>;
156
231
  /**
157
232
  * Adds a comment to the user's account.
158
233
  *
@@ -761,6 +836,22 @@ export declare class FusionAuthClient {
761
836
  * @returns {Promise<ClientResponse<void>>}
762
837
  */
763
838
  deleteWebhook(webhookId: UUID): Promise<ClientResponse<void>>;
839
+ /**
840
+ * Start the Device Authorization flow using form-encoded parameters
841
+ *
842
+ * @param {string} client_id The unique client identifier. The client Id is the Id of the FusionAuth Application in which you are attempting to authenticate.
843
+ * @param {string} client_secret (Optional) The client secret. This value may optionally be provided in the request body instead of the Authorization header.
844
+ * @param {string} scope (Optional) A space-delimited string of the requested scopes. Defaults to all scopes configured in the Application's OAuth configuration.
845
+ * @returns {Promise<ClientResponse<DeviceResponse>>}
846
+ */
847
+ deviceAuthorize(client_id: string, client_secret: string, scope: string): Promise<ClientResponse<DeviceResponse>>;
848
+ /**
849
+ * Start the Device Authorization flow using a request body
850
+ *
851
+ * @param {DeviceAuthorizationRequest} request The device authorization request containing client authentication, scope, and optional device metadata.
852
+ * @returns {Promise<ClientResponse<DeviceResponse>>}
853
+ */
854
+ deviceAuthorizeWithRequest(request: DeviceAuthorizationRequest): Promise<ClientResponse<DeviceResponse>>;
764
855
  /**
765
856
  * Disable two-factor authentication for a user.
766
857
  *
@@ -811,6 +902,22 @@ export declare class FusionAuthClient {
811
902
  * @returns {Promise<ClientResponse<AccessToken>>}
812
903
  */
813
904
  exchangeOAuthCodeForAccessTokenUsingPKCE(code: string, client_id: string, client_secret: string, redirect_uri: string, code_verifier: string): Promise<ClientResponse<AccessToken>>;
905
+ /**
906
+ * Exchanges an OAuth authorization code and code_verifier for an access token.
907
+ * Makes a request to the Token endpoint to exchange the authorization code returned from the Authorize endpoint and a code_verifier for an access token.
908
+ *
909
+ * @param {OAuthCodePKCEAccessTokenRequest} request The PKCE OAuth code access token exchange request.
910
+ * @returns {Promise<ClientResponse<AccessToken>>}
911
+ */
912
+ exchangeOAuthCodeForAccessTokenUsingPKCEWithRequest(request: OAuthCodePKCEAccessTokenRequest): Promise<ClientResponse<AccessToken>>;
913
+ /**
914
+ * Exchanges an OAuth authorization code for an access token.
915
+ * Makes a request to the Token endpoint to exchange the authorization code returned from the Authorize endpoint for an access token.
916
+ *
917
+ * @param {OAuthCodeAccessTokenRequest} request The OAuth code access token exchange request.
918
+ * @returns {Promise<ClientResponse<AccessToken>>}
919
+ */
920
+ exchangeOAuthCodeForAccessTokenWithRequest(request: OAuthCodeAccessTokenRequest): Promise<ClientResponse<AccessToken>>;
814
921
  /**
815
922
  * Exchange a Refresh Token for an Access Token.
816
923
  * If you will be using the Refresh Token Grant, you will make a request to the Token endpoint to exchange the user’s refresh token for an access token.
@@ -824,6 +931,14 @@ export declare class FusionAuthClient {
824
931
  * @returns {Promise<ClientResponse<AccessToken>>}
825
932
  */
826
933
  exchangeRefreshTokenForAccessToken(refresh_token: string, client_id: string, client_secret: string, scope: string, user_code: string): Promise<ClientResponse<AccessToken>>;
934
+ /**
935
+ * Exchange a Refresh Token for an Access Token.
936
+ * If you will be using the Refresh Token Grant, you will make a request to the Token endpoint to exchange the user’s refresh token for an access token.
937
+ *
938
+ * @param {RefreshTokenAccessTokenRequest} request The refresh token access token exchange request.
939
+ * @returns {Promise<ClientResponse<AccessToken>>}
940
+ */
941
+ exchangeRefreshTokenForAccessTokenWithRequest(request: RefreshTokenAccessTokenRequest): Promise<ClientResponse<AccessToken>>;
827
942
  /**
828
943
  * Exchange a refresh token for a new JWT.
829
944
  *
@@ -845,6 +960,14 @@ export declare class FusionAuthClient {
845
960
  * @returns {Promise<ClientResponse<AccessToken>>}
846
961
  */
847
962
  exchangeUserCredentialsForAccessToken(username: string, password: string, client_id: string, client_secret: string, scope: string, user_code: string): Promise<ClientResponse<AccessToken>>;
963
+ /**
964
+ * Exchange User Credentials for a Token.
965
+ * If you will be using the Resource Owner Password Credential Grant, you will make a request to the Token endpoint to exchange the user’s email and password for an access token.
966
+ *
967
+ * @param {UserCredentialsAccessTokenRequest} request The user credentials access token exchange request.
968
+ * @returns {Promise<ClientResponse<AccessToken>>}
969
+ */
970
+ exchangeUserCredentialsForAccessTokenWithRequest(request: UserCredentialsAccessTokenRequest): Promise<ClientResponse<AccessToken>>;
848
971
  /**
849
972
  * Begins the forgot password sequence, which kicks off an email to the user so that they can reset their password.
850
973
  *
@@ -961,6 +1084,13 @@ export declare class FusionAuthClient {
961
1084
  * @returns {Promise<ClientResponse<IntrospectResponse>>}
962
1085
  */
963
1086
  introspectAccessToken(client_id: string, token: string): Promise<ClientResponse<IntrospectResponse>>;
1087
+ /**
1088
+ * Inspect an access token issued as the result of the User based grant such as the Authorization Code Grant, Implicit Grant, the User Credentials Grant or the Refresh Grant.
1089
+ *
1090
+ * @param {AccessTokenIntrospectRequest} request The access token introspection request.
1091
+ * @returns {Promise<ClientResponse<IntrospectResponse>>}
1092
+ */
1093
+ introspectAccessTokenWithRequest(request: AccessTokenIntrospectRequest): Promise<ClientResponse<IntrospectResponse>>;
964
1094
  /**
965
1095
  * Inspect an access token issued as the result of the Client Credentials Grant.
966
1096
  *
@@ -968,6 +1098,13 @@ export declare class FusionAuthClient {
968
1098
  * @returns {Promise<ClientResponse<IntrospectResponse>>}
969
1099
  */
970
1100
  introspectClientCredentialsAccessToken(token: string): Promise<ClientResponse<IntrospectResponse>>;
1101
+ /**
1102
+ * Inspect an access token issued as the result of the Client Credentials Grant.
1103
+ *
1104
+ * @param {ClientCredentialsAccessTokenIntrospectRequest} request The client credentials access token.
1105
+ * @returns {Promise<ClientResponse<IntrospectResponse>>}
1106
+ */
1107
+ introspectClientCredentialsAccessTokenWithRequest(request: ClientCredentialsAccessTokenIntrospectRequest): Promise<ClientResponse<IntrospectResponse>>;
971
1108
  /**
972
1109
  * Issue a new access token (JWT) for the requested Application after ensuring the provided JWT is valid. A valid
973
1110
  * access token is properly signed and not expired.
@@ -1932,6 +2069,13 @@ export declare class FusionAuthClient {
1932
2069
  * @returns {Promise<ClientResponse<TotalsReportResponse>>}
1933
2070
  */
1934
2071
  retrieveTotalReport(): Promise<ClientResponse<TotalsReportResponse>>;
2072
+ /**
2073
+ * Retrieves the totals report. This allows excluding applicationTotals from the report. An empty list will include the applicationTotals.
2074
+ *
2075
+ * @param {Array<String>} excludes List of fields to exclude in the response. Currently only allows applicationTotals.
2076
+ * @returns {Promise<ClientResponse<TotalsReportResponse>>}
2077
+ */
2078
+ retrieveTotalReportWithExcludes(excludes: Array<String>): Promise<ClientResponse<TotalsReportResponse>>;
1935
2079
  /**
1936
2080
  * Retrieve two-factor recovery codes for a user.
1937
2081
  *
@@ -1951,6 +2095,17 @@ export declare class FusionAuthClient {
1951
2095
  * @returns {Promise<ClientResponse<TwoFactorStatusResponse>>}
1952
2096
  */
1953
2097
  retrieveTwoFactorStatus(userId: UUID, applicationId: UUID, twoFactorTrustId: string): Promise<ClientResponse<TwoFactorStatusResponse>>;
2098
+ /**
2099
+ * Retrieve a user's two-factor status.
2100
+ *
2101
+ * This can be used to see if a user will need to complete a two-factor challenge to complete a login,
2102
+ * and optionally identify the state of the two-factor trust across various applications. This operation
2103
+ * provides more payload options than retrieveTwoFactorStatus.
2104
+ *
2105
+ * @param {TwoFactorStatusRequest} request The request object that contains all the information used to check the status.
2106
+ * @returns {Promise<ClientResponse<TwoFactorStatusResponse>>}
2107
+ */
2108
+ retrieveTwoFactorStatusWithRequest(request: TwoFactorStatusRequest): Promise<ClientResponse<TwoFactorStatusResponse>>;
1954
2109
  /**
1955
2110
  * Retrieves the user for the given Id.
1956
2111
  *
@@ -2012,7 +2167,7 @@ export declare class FusionAuthClient {
2012
2167
  * Retrieves the user for the loginId, using specific loginIdTypes.
2013
2168
  *
2014
2169
  * @param {string} loginId The email or username of the user.
2015
- * @param {Array<String>} loginIdTypes the identity types that FusionAuth will compare the loginId to.
2170
+ * @param {Array<String>} loginIdTypes The identity types that FusionAuth will compare the loginId to.
2016
2171
  * @returns {Promise<ClientResponse<UserResponse>>}
2017
2172
  */
2018
2173
  retrieveUserByLoginIdWithLoginIdTypes(loginId: string, loginIdTypes: Array<String>): Promise<ClientResponse<UserResponse>>;
@@ -2053,6 +2208,26 @@ export declare class FusionAuthClient {
2053
2208
  * @returns {Promise<ClientResponse<void>>}
2054
2209
  */
2055
2210
  retrieveUserCodeUsingAPIKey(user_code: string): Promise<ClientResponse<void>>;
2211
+ /**
2212
+ * Retrieve a user_code that is part of an in-progress Device Authorization Grant.
2213
+ *
2214
+ * This API is useful if you want to build your own login workflow to complete a device grant.
2215
+ *
2216
+ * This request will require an API key.
2217
+ *
2218
+ * @param {RetrieveUserCodeUsingAPIKeyRequest} request The user code retrieval request including optional tenantId.
2219
+ * @returns {Promise<ClientResponse<void>>}
2220
+ */
2221
+ retrieveUserCodeUsingAPIKeyWithRequest(request: RetrieveUserCodeUsingAPIKeyRequest): Promise<ClientResponse<void>>;
2222
+ /**
2223
+ * Retrieve a user_code that is part of an in-progress Device Authorization Grant.
2224
+ *
2225
+ * This API is useful if you want to build your own login workflow to complete a device grant.
2226
+ *
2227
+ * @param {RetrieveUserCodeRequest} request The user code retrieval request.
2228
+ * @returns {Promise<ClientResponse<void>>}
2229
+ */
2230
+ retrieveUserCodeWithRequest(request: RetrieveUserCodeRequest): Promise<ClientResponse<void>>;
2056
2231
  /**
2057
2232
  * Retrieves all the comments for the user with the given Id.
2058
2233
  *
@@ -2128,7 +2303,7 @@ export declare class FusionAuthClient {
2128
2303
  * @param {string} loginId The userId id.
2129
2304
  * @param {number} start The start instant as UTC milliseconds since Epoch.
2130
2305
  * @param {number} end The end instant as UTC milliseconds since Epoch.
2131
- * @param {Array<String>} loginIdTypes the identity types that FusionAuth will compare the loginId to.
2306
+ * @param {Array<String>} loginIdTypes The identity types that FusionAuth will compare the loginId to.
2132
2307
  * @returns {Promise<ClientResponse<LoginReportResponse>>}
2133
2308
  */
2134
2309
  retrieveUserLoginReportByLoginIdAndLoginIdTypes(applicationId: UUID, loginId: string, start: number, end: number, loginIdTypes: Array<String>): Promise<ClientResponse<LoginReportResponse>>;
@@ -2844,6 +3019,14 @@ export declare class FusionAuthClient {
2844
3019
  * @returns {Promise<ClientResponse<void>>}
2845
3020
  */
2846
3021
  validateDevice(user_code: string, client_id: string): Promise<ClientResponse<void>>;
3022
+ /**
3023
+ * Validates the end-user provided user_code from the user-interaction of the Device Authorization Grant.
3024
+ * If you build your own activation form you should validate the user provided code prior to beginning the Authorization grant.
3025
+ *
3026
+ * @param {ValidateDeviceRequest} request The device validation request.
3027
+ * @returns {Promise<ClientResponse<void>>}
3028
+ */
3029
+ validateDeviceWithRequest(request: ValidateDeviceRequest): Promise<ClientResponse<void>>;
2847
3030
  /**
2848
3031
  * Validates the provided JWT (encoded JWT string) to ensure the token is valid. A valid access token is properly
2849
3032
  * signed and not expired.
@@ -2996,6 +3179,16 @@ export interface AccessToken {
2996
3179
  token_type?: TokenType;
2997
3180
  userId?: UUID;
2998
3181
  }
3182
+ /**
3183
+ * The request object for introspecting an access token.
3184
+ *
3185
+ * @author Lyle Schemmerling
3186
+ */
3187
+ export interface AccessTokenIntrospectRequest {
3188
+ client_id?: string;
3189
+ tenantId?: string;
3190
+ token?: string;
3191
+ }
2999
3192
  /**
3000
3193
  * The user action request object.
3001
3194
  *
@@ -3127,6 +3320,7 @@ export interface AuthenticationTokenConfiguration extends Enableable {
3127
3320
  export interface LambdaConfiguration {
3128
3321
  accessTokenPopulateId?: UUID;
3129
3322
  idTokenPopulateId?: UUID;
3323
+ multiFactorRequirementId?: UUID;
3130
3324
  samlv2PopulateId?: UUID;
3131
3325
  selfServiceRegistrationValidationId?: UUID;
3132
3326
  userinfoPopulateId?: UUID;
@@ -3611,6 +3805,7 @@ export interface BaseIdentityProvider<D extends BaseIdentityProviderApplicationC
3611
3805
  linkingStrategy?: IdentityProviderLinkingStrategy;
3612
3806
  name?: string;
3613
3807
  tenantConfiguration?: Record<UUID, IdentityProviderTenantConfiguration>;
3808
+ tenantId?: UUID;
3614
3809
  type?: IdentityProviderType;
3615
3810
  }
3616
3811
  export interface LambdaConfiguration {
@@ -3783,6 +3978,27 @@ export declare enum ClientAuthenticationPolicy {
3783
3978
  NotRequired = "NotRequired",
3784
3979
  NotRequiredWhenUsingPKCE = "NotRequiredWhenUsingPKCE"
3785
3980
  }
3981
+ /**
3982
+ * Contains the parameters used to introspect an access token that was obtained via the client credentials grant.
3983
+ *
3984
+ * @author Lyle Schemmerling
3985
+ */
3986
+ export interface ClientCredentialsAccessTokenIntrospectRequest {
3987
+ tenantId?: string;
3988
+ token?: string;
3989
+ }
3990
+ /**
3991
+ * The request object to make a Client Credentials grant request to obtain an access token.
3992
+ *
3993
+ * @author Lyle Schemmerling
3994
+ */
3995
+ export interface ClientCredentialsGrantRequest {
3996
+ client_id?: string;
3997
+ client_secret?: string;
3998
+ grant_type?: string;
3999
+ scope?: string;
4000
+ tenantId?: string;
4001
+ }
3786
4002
  /**
3787
4003
  * @author Trevor Smith
3788
4004
  */
@@ -3899,6 +4115,18 @@ export declare enum ContentStatus {
3899
4115
  PENDING = "PENDING",
3900
4116
  REJECTED = "REJECTED"
3901
4117
  }
4118
+ /**
4119
+ * Represents the inbound lambda parameter 'context' for MFA Required lambdas.
4120
+ */
4121
+ export interface Context {
4122
+ accessToken?: string;
4123
+ action?: MultiFactorAction;
4124
+ application?: Application;
4125
+ authenticationThreats?: Array<AuthenticationThreats>;
4126
+ eventInfo?: EventInfo;
4127
+ mfaTrust?: Trust;
4128
+ policies?: Policies;
4129
+ }
3902
4130
  /**
3903
4131
  * A number identifying a cryptographic algorithm. Values should be registered with the <a
3904
4132
  * href="https://www.iana.org/assignments/cose/cose.xhtml#algorithms">IANA COSE Algorithms registry</a>
@@ -3968,6 +4196,18 @@ export interface DailyActiveUserReportResponse {
3968
4196
  dailyActiveUsers?: Array<Count>;
3969
4197
  total?: number;
3970
4198
  }
4199
+ /**
4200
+ * The request object to approve a device grant.
4201
+ *
4202
+ * @author Lyle Schemmerling
4203
+ */
4204
+ export interface DeviceApprovalRequest {
4205
+ client_id?: string;
4206
+ client_secret?: string;
4207
+ tenantId?: UUID;
4208
+ token?: string;
4209
+ user_code?: string;
4210
+ }
3971
4211
  /**
3972
4212
  * @author Daniel DeGroff
3973
4213
  */
@@ -3978,6 +4218,15 @@ export interface DeviceApprovalResponse {
3978
4218
  tenantId?: UUID;
3979
4219
  userId?: UUID;
3980
4220
  }
4221
+ /**
4222
+ * @author Lyle Schemmerling
4223
+ */
4224
+ export interface DeviceAuthorizationRequest {
4225
+ client_id?: string;
4226
+ client_secret?: string;
4227
+ scope?: string;
4228
+ tenantId?: UUID;
4229
+ }
3981
4230
  /**
3982
4231
  * @author Daniel DeGroff
3983
4232
  */
@@ -4578,6 +4827,13 @@ export declare enum EventType {
4578
4827
  UserIdentityVerified = "user.identity.verified",
4579
4828
  UserIdentityUpdate = "user.identity.update"
4580
4829
  }
4830
+ /**
4831
+ * Represent the various states/expectations of a user in the context of starting verification
4832
+ */
4833
+ export declare enum ExistingUserStrategy {
4834
+ mustExist = "mustExist",
4835
+ mustNotExist = "mustNotExist"
4836
+ }
4581
4837
  /**
4582
4838
  * An expandable API request.
4583
4839
  *
@@ -4660,6 +4916,18 @@ export interface ExternalJWTIdentityProvider extends BaseIdentityProvider<Extern
4660
4916
  oauth2?: IdentityProviderOauth2Configuration;
4661
4917
  uniqueIdentityClaim?: string;
4662
4918
  }
4919
+ /**
4920
+ * Determines if FusionAuth is in FIPS mode based on the system property <code>fusionauth.fips.enabled</code>. This can only be enabled once and
4921
+ * should be enabled when the VM starts or as close to that point as possible.
4922
+ * <p>
4923
+ * Once this has been enabled, it cannot be disabled.
4924
+ * <p>
4925
+ * This also provides some helpers for FIPS things such as password length requirements.
4926
+ *
4927
+ * @author Brian Pontarelli and Daniel DeGroff
4928
+ */
4929
+ export interface FIPS {
4930
+ }
4663
4931
  /**
4664
4932
  * @author Daniel DeGroff
4665
4933
  */
@@ -4906,6 +5174,15 @@ export interface FormResponse {
4906
5174
  */
4907
5175
  export interface FormStep {
4908
5176
  fields?: Array<UUID>;
5177
+ type?: FormStepType;
5178
+ }
5179
+ /**
5180
+ * Denotes the type of form step. This is used to configure different behavior on form steps in the registration flow.
5181
+ */
5182
+ export declare enum FormStepType {
5183
+ collectData = "collectData",
5184
+ verifyEmail = "verifyEmail",
5185
+ verifyPhoneNumber = "verifyPhoneNumber"
4909
5186
  }
4910
5187
  /**
4911
5188
  * @author Daniel DeGroff
@@ -5401,6 +5678,7 @@ export interface IdentityProviderResponse {
5401
5678
  export interface IdentityProviderSearchCriteria extends BaseSearchCriteria {
5402
5679
  applicationId?: UUID;
5403
5680
  name?: string;
5681
+ tenantId?: UUID;
5404
5682
  type?: IdentityProviderType;
5405
5683
  }
5406
5684
  /**
@@ -5735,12 +6013,14 @@ export declare enum KeyAlgorithm {
5735
6013
  HS512 = "HS512",
5736
6014
  RS256 = "RS256",
5737
6015
  RS384 = "RS384",
5738
- RS512 = "RS512"
6016
+ RS512 = "RS512",
6017
+ Ed25519 = "Ed25519"
5739
6018
  }
5740
6019
  export declare enum KeyType {
5741
6020
  EC = "EC",
5742
6021
  RSA = "RSA",
5743
- HMAC = "HMAC"
6022
+ HMAC = "HMAC",
6023
+ OKP = "OKP"
5744
6024
  }
5745
6025
  /**
5746
6026
  * Key API request object.
@@ -5927,7 +6207,8 @@ export declare enum LambdaType {
5927
6207
  SCIMServerUserResponseConverter = "SCIMServerUserResponseConverter",
5928
6208
  SelfServiceRegistrationValidation = "SelfServiceRegistrationValidation",
5929
6209
  UserInfoPopulate = "UserInfoPopulate",
5930
- LoginValidation = "LoginValidation"
6210
+ LoginValidation = "LoginValidation",
6211
+ MFARequirement = "MFARequirement"
5931
6212
  }
5932
6213
  /**
5933
6214
  * @author Daniel DeGroff
@@ -6124,6 +6405,7 @@ export interface IdentityProviderDetails {
6124
6405
  idpEndpoint?: string;
6125
6406
  name?: string;
6126
6407
  oauth2?: IdentityProviderOauth2Configuration;
6408
+ tenantId?: UUID;
6127
6409
  type?: IdentityProviderType;
6128
6410
  }
6129
6411
  /**
@@ -6247,6 +6529,14 @@ export interface MonthlyActiveUserReportResponse {
6247
6529
  monthlyActiveUsers?: Array<Count>;
6248
6530
  total?: number;
6249
6531
  }
6532
+ /**
6533
+ * Communicate various actions/contexts in which multi-factor authentication can be used.
6534
+ */
6535
+ export declare enum MultiFactorAction {
6536
+ changePassword = "changePassword",
6537
+ login = "login",
6538
+ stepUp = "stepUp"
6539
+ }
6250
6540
  /**
6251
6541
  * @author Daniel DeGroff
6252
6542
  */
@@ -6323,6 +6613,34 @@ export declare enum OAuthApplicationRelationship {
6323
6613
  FirstParty = "FirstParty",
6324
6614
  ThirdParty = "ThirdParty"
6325
6615
  }
6616
+ /**
6617
+ * The request object for exchanging an OAuth authorization code for an access token.
6618
+ *
6619
+ * @author Lyle Schemmerling
6620
+ */
6621
+ export interface OAuthCodeAccessTokenRequest {
6622
+ client_id?: string;
6623
+ client_secret?: string;
6624
+ code?: string;
6625
+ grant_type?: string;
6626
+ redirect_uri?: string;
6627
+ tenantId?: string;
6628
+ }
6629
+ /**
6630
+ * The request object to make a request to the Token endpoint to exchange the authorization code returned from the Authorize endpoint and a
6631
+ * code_verifier for an access token.
6632
+ *
6633
+ * @author Lyle Schemmerling
6634
+ */
6635
+ export interface OAuthCodePKCEAccessTokenRequest {
6636
+ client_id?: string;
6637
+ client_secret?: string;
6638
+ code?: string;
6639
+ code_verifier?: string;
6640
+ grant_type?: string;
6641
+ redirect_uri?: string;
6642
+ tenantId?: UUID;
6643
+ }
6326
6644
  /**
6327
6645
  * @author Daniel DeGroff
6328
6646
  */
@@ -6658,6 +6976,14 @@ export interface PhoneUnverifiedOptions {
6658
6976
  allowPhoneNumberChangeWhenGated?: boolean;
6659
6977
  behavior?: UnverifiedBehavior;
6660
6978
  }
6979
+ /**
6980
+ * Represents the inbound lambda parameter 'policies' for MFA Required lambdas.
6981
+ */
6982
+ export interface Policies {
6983
+ applicationLoginPolicy?: MultiFactorLoginPolicy;
6984
+ applicationMultiFactorTrustPolicy?: ApplicationMultiFactorTrustPolicy;
6985
+ tenantLoginPolicy?: MultiFactorLoginPolicy;
6986
+ }
6661
6987
  /**
6662
6988
  * @author Michael Sleevi
6663
6989
  */
@@ -6866,6 +7192,7 @@ export interface ReactorStatus {
6866
7192
  expiration?: string;
6867
7193
  licenseAttributes?: Record<string, string>;
6868
7194
  licensed?: boolean;
7195
+ multiFactorLambdas?: ReactorFeatureStatus;
6869
7196
  scimServer?: ReactorFeatureStatus;
6870
7197
  tenantManagerApplication?: ReactorFeatureStatus;
6871
7198
  threatDetection?: ReactorFeatureStatus;
@@ -6916,6 +7243,20 @@ export interface MetaData {
6916
7243
  device?: DeviceInfo;
6917
7244
  scopes?: Array<string>;
6918
7245
  }
7246
+ /**
7247
+ * The request object to exchange a Refresh Token for an Access Token.
7248
+ *
7249
+ * @author Lyle Schemmerling
7250
+ */
7251
+ export interface RefreshTokenAccessTokenRequest {
7252
+ client_id?: string;
7253
+ client_secret?: string;
7254
+ grant_type?: string;
7255
+ refresh_token?: string;
7256
+ scope?: string;
7257
+ tenantId?: UUID;
7258
+ user_code?: string;
7259
+ }
6919
7260
  /**
6920
7261
  * @author Daniel DeGroff
6921
7262
  */
@@ -7013,6 +7354,7 @@ export interface RegistrationRequest extends BaseEventRequest {
7013
7354
  skipRegistrationVerification?: boolean;
7014
7355
  skipVerification?: boolean;
7015
7356
  user?: User;
7357
+ verificationIds?: Array<string>;
7016
7358
  }
7017
7359
  /**
7018
7360
  * Registration API request object.
@@ -7028,6 +7370,7 @@ export interface RegistrationResponse {
7028
7370
  token?: string;
7029
7371
  tokenExpirationInstant?: number;
7030
7372
  user?: User;
7373
+ verificationIds?: Array<VerificationId>;
7031
7374
  }
7032
7375
  /**
7033
7376
  * @author Daniel DeGroff
@@ -7064,6 +7407,13 @@ export interface RememberPreviousPasswords extends Enableable {
7064
7407
  export interface Requirable extends Enableable {
7065
7408
  required?: boolean;
7066
7409
  }
7410
+ /**
7411
+ * Represents the inbound lambda parameter 'result' for MFA Required lambdas.
7412
+ */
7413
+ export interface RequiredLambdaResult {
7414
+ required?: boolean;
7415
+ sendSuspiciousLoginEvent?: boolean;
7416
+ }
7067
7417
  /**
7068
7418
  * Interface describing the need for CORS configuration.
7069
7419
  *
@@ -7082,6 +7432,26 @@ export declare enum ResidentKeyRequirement {
7082
7432
  preferred = "preferred",
7083
7433
  required = "required"
7084
7434
  }
7435
+ /**
7436
+ * The request object for retrieving a user code that is part of an in-progress Device Authorization Grant.
7437
+ *
7438
+ * @author Lyle Schemmerling
7439
+ */
7440
+ export interface RetrieveUserCodeRequest {
7441
+ client_id?: string;
7442
+ client_secret?: string;
7443
+ tenantId?: UUID;
7444
+ user_code?: string;
7445
+ }
7446
+ /**
7447
+ * The request object for retrieving a user code that is part of an in-progress Device Authorization Grant using an API key
7448
+ *
7449
+ * @author Lyle Schemmerling
7450
+ */
7451
+ export interface RetrieveUserCodeUsingAPIKeyRequest {
7452
+ tenantId?: UUID;
7453
+ user_code?: string;
7454
+ }
7085
7455
  /**
7086
7456
  * @author Brian Pontarelli
7087
7457
  */
@@ -7563,6 +7933,7 @@ export interface TenantFormConfiguration {
7563
7933
  */
7564
7934
  export interface TenantLambdaConfiguration {
7565
7935
  loginValidationId?: UUID;
7936
+ multiFactorRequirementId?: UUID;
7566
7937
  scimEnterpriseUserRequestConverterId?: UUID;
7567
7938
  scimEnterpriseUserResponseConverterId?: UUID;
7568
7939
  scimGroupRequestConverterId?: UUID;
@@ -7926,6 +8297,24 @@ export declare enum TransactionType {
7926
8297
  SuperMajority = "SuperMajority",
7927
8298
  AbsoluteMajority = "AbsoluteMajority"
7928
8299
  }
8300
+ /**
8301
+ * Represents the inbound lambda parameter 'mfaTrust' inside the 'context' parameter for MFA Required lambdas.
8302
+ */
8303
+ export interface Trust {
8304
+ applicationId?: UUID;
8305
+ attributes?: Record<string, string>;
8306
+ expirationInstant?: number;
8307
+ id?: string;
8308
+ insertInstant?: number;
8309
+ startInstants?: StartInstant;
8310
+ state?: Record<string, any>;
8311
+ tenantId?: UUID;
8312
+ userId?: UUID;
8313
+ }
8314
+ export interface StartInstant {
8315
+ applications?: Record<UUID, number>;
8316
+ tenant?: number;
8317
+ }
7929
8318
  /**
7930
8319
  * @author Brett Guy
7931
8320
  */
@@ -8070,6 +8459,16 @@ export interface TwoFactorStartResponse {
8070
8459
  methods?: Array<TwoFactorMethod>;
8071
8460
  twoFactorId?: string;
8072
8461
  }
8462
+ /**
8463
+ * Check the status of two-factor authentication for a user, with more options than on a GET request.
8464
+ */
8465
+ export interface TwoFactorStatusRequest extends BaseEventRequest {
8466
+ accessToken?: string;
8467
+ action?: MultiFactorAction;
8468
+ applicationId?: UUID;
8469
+ twoFactorTrustId?: string;
8470
+ userId?: UUID;
8471
+ }
8073
8472
  /**
8074
8473
  * @author Daniel DeGroff
8075
8474
  */
@@ -8399,6 +8798,21 @@ export interface UserCreateCompleteEvent extends BaseUserEvent {
8399
8798
  */
8400
8799
  export interface UserCreateEvent extends BaseUserEvent {
8401
8800
  }
8801
+ /**
8802
+ * The request object for exchanging user credentials (username and password) for an access token.
8803
+ *
8804
+ * @author Lyle Schemmerling
8805
+ */
8806
+ export interface UserCredentialsAccessTokenRequest {
8807
+ client_id?: string;
8808
+ client_secret?: string;
8809
+ grant_type?: string;
8810
+ password?: string;
8811
+ scope?: string;
8812
+ tenantId?: string;
8813
+ user_code?: string;
8814
+ username?: string;
8815
+ }
8402
8816
  /**
8403
8817
  * Models the User Deactivate Event.
8404
8818
  *
@@ -8839,6 +9253,16 @@ export declare enum UserVerificationRequirement {
8839
9253
  */
8840
9254
  export interface UserinfoResponse extends Record<string, any> {
8841
9255
  }
9256
+ /**
9257
+ * The request object for validating an end-user provided user_code from the user-interaction of the Device Authorization Grant
9258
+ *
9259
+ * @author Lyle Schemmerling
9260
+ */
9261
+ export interface ValidateDeviceRequest {
9262
+ client_id?: string;
9263
+ tenantId?: UUID;
9264
+ user_code?: string;
9265
+ }
8842
9266
  /**
8843
9267
  * @author Daniel DeGroff
8844
9268
  */
@@ -8912,6 +9336,7 @@ export interface VerifySendRequest {
8912
9336
  */
8913
9337
  export interface VerifyStartRequest {
8914
9338
  applicationId?: UUID;
9339
+ existingUserStrategy?: ExistingUserStrategy;
8915
9340
  loginId?: string;
8916
9341
  loginIdType?: string;
8917
9342
  state?: Record<string, any>;