@fusionauth/typescript-client 1.59.0 → 1.61.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.
- package/build/src/FusionAuthClient.d.ts +32 -6
- package/build/src/FusionAuthClient.js +39 -5
- package/build/src/FusionAuthClient.js.map +1 -1
- package/dist/fusionauth-typescript-client.js +40 -6
- package/dist/fusionauth-typescript-client.min.js +1 -1
- package/dist/fusionauth-typescript-client.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -138,10 +138,22 @@ export declare class FusionAuthClient {
|
|
|
138
138
|
*
|
|
139
139
|
* 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
140
|
*
|
|
141
|
-
* @param {string} loginId The loginId of the User that you intend to change the password for.
|
|
141
|
+
* @param {string} loginId The loginId (email or username) of the User that you intend to change the password for.
|
|
142
142
|
* @returns {Promise<ClientResponse<void>>}
|
|
143
143
|
*/
|
|
144
144
|
checkChangePasswordUsingLoginId(loginId: string): Promise<ClientResponse<void>>;
|
|
145
|
+
/**
|
|
146
|
+
* Check to see if the user must obtain a Trust Request Id in order to complete a change password request.
|
|
147
|
+
* When a user has enabled Two-Factor authentication, before you are allowed to use the Change Password API to change
|
|
148
|
+
* your password, you must obtain a Trust Request Id by completing a Two-Factor Step-Up authentication.
|
|
149
|
+
*
|
|
150
|
+
* 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.
|
|
151
|
+
*
|
|
152
|
+
* @param {string} loginId The loginId of the User that you intend to change the password for.
|
|
153
|
+
* @param {Array<String>} loginIdTypes The identity types that FusionAuth will compare the loginId to.
|
|
154
|
+
* @returns {Promise<ClientResponse<void>>}
|
|
155
|
+
*/
|
|
156
|
+
checkChangePasswordUsingLoginIdAndLoginIdTypes(loginId: string, loginIdTypes: Array<String>): Promise<ClientResponse<void>>;
|
|
145
157
|
/**
|
|
146
158
|
* Make a Client Credentials grant request to obtain an access token.
|
|
147
159
|
*
|
|
@@ -2012,7 +2024,7 @@ export declare class FusionAuthClient {
|
|
|
2012
2024
|
* Retrieves the user for the loginId, using specific loginIdTypes.
|
|
2013
2025
|
*
|
|
2014
2026
|
* @param {string} loginId The email or username of the user.
|
|
2015
|
-
* @param {Array<String>} loginIdTypes
|
|
2027
|
+
* @param {Array<String>} loginIdTypes The identity types that FusionAuth will compare the loginId to.
|
|
2016
2028
|
* @returns {Promise<ClientResponse<UserResponse>>}
|
|
2017
2029
|
*/
|
|
2018
2030
|
retrieveUserByLoginIdWithLoginIdTypes(loginId: string, loginIdTypes: Array<String>): Promise<ClientResponse<UserResponse>>;
|
|
@@ -2128,7 +2140,7 @@ export declare class FusionAuthClient {
|
|
|
2128
2140
|
* @param {string} loginId The userId id.
|
|
2129
2141
|
* @param {number} start The start instant as UTC milliseconds since Epoch.
|
|
2130
2142
|
* @param {number} end The end instant as UTC milliseconds since Epoch.
|
|
2131
|
-
* @param {Array<String>} loginIdTypes
|
|
2143
|
+
* @param {Array<String>} loginIdTypes The identity types that FusionAuth will compare the loginId to.
|
|
2132
2144
|
* @returns {Promise<ClientResponse<LoginReportResponse>>}
|
|
2133
2145
|
*/
|
|
2134
2146
|
retrieveUserLoginReportByLoginIdAndLoginIdTypes(applicationId: UUID, loginId: string, start: number, end: number, loginIdTypes: Array<String>): Promise<ClientResponse<LoginReportResponse>>;
|
|
@@ -4983,7 +4995,7 @@ export interface GoogleIdentityProviderProperties {
|
|
|
4983
4995
|
button?: string;
|
|
4984
4996
|
}
|
|
4985
4997
|
/**
|
|
4986
|
-
* Authorization Grant types as defined by the <a href="https://tools.ietf.org/html/rfc6749">
|
|
4998
|
+
* Authorization Grant types as defined by the <a href="https://tools.ietf.org/html/rfc6749">OAuth 2.0 Authorization
|
|
4987
4999
|
* Framework - RFC 6749</a>.
|
|
4988
5000
|
* <p>
|
|
4989
5001
|
* Specific names as defined by <a href="https://tools.ietf.org/html/rfc7591#section-4.1">
|
|
@@ -5050,7 +5062,6 @@ export interface GroupMember {
|
|
|
5050
5062
|
groupId?: UUID;
|
|
5051
5063
|
id?: UUID;
|
|
5052
5064
|
insertInstant?: number;
|
|
5053
|
-
user?: User;
|
|
5054
5065
|
userId?: UUID;
|
|
5055
5066
|
}
|
|
5056
5067
|
/**
|
|
@@ -6354,6 +6365,9 @@ export declare enum OAuthErrorReason {
|
|
|
6354
6365
|
access_token_required = "access_token_required",
|
|
6355
6366
|
refresh_token_not_found = "refresh_token_not_found",
|
|
6356
6367
|
refresh_token_type_not_supported = "refresh_token_type_not_supported",
|
|
6368
|
+
id_token_invalid = "id_token_invalid",
|
|
6369
|
+
unsupported_token_type = "unsupported_token_type",
|
|
6370
|
+
token_type_hint_mismatch = "token_type_hint_mismatch",
|
|
6357
6371
|
invalid_client_id = "invalid_client_id",
|
|
6358
6372
|
invalid_expires_in = "invalid_expires_in",
|
|
6359
6373
|
invalid_user_credentials = "invalid_user_credentials",
|
|
@@ -6363,6 +6377,7 @@ export declare enum OAuthErrorReason {
|
|
|
6363
6377
|
invalid_pkce_code_verifier = "invalid_pkce_code_verifier",
|
|
6364
6378
|
invalid_pkce_code_challenge = "invalid_pkce_code_challenge",
|
|
6365
6379
|
invalid_pkce_code_challenge_method = "invalid_pkce_code_challenge_method",
|
|
6380
|
+
invalid_prompt = "invalid_prompt",
|
|
6366
6381
|
invalid_redirect_uri = "invalid_redirect_uri",
|
|
6367
6382
|
invalid_response_mode = "invalid_response_mode",
|
|
6368
6383
|
invalid_response_type = "invalid_response_type",
|
|
@@ -6408,13 +6423,24 @@ export declare enum OAuthErrorReason {
|
|
|
6408
6423
|
unknown = "unknown",
|
|
6409
6424
|
missing_required_scope = "missing_required_scope",
|
|
6410
6425
|
unknown_scope = "unknown_scope",
|
|
6411
|
-
consent_canceled = "consent_canceled"
|
|
6426
|
+
consent_canceled = "consent_canceled",
|
|
6427
|
+
authentication_required = "authentication_required",
|
|
6428
|
+
email_verification_required = "email_verification_required",
|
|
6429
|
+
multi_factor_challenge_required = "multi_factor_challenge_required",
|
|
6430
|
+
phone_verification_required = "phone_verification_required",
|
|
6431
|
+
registration_missing_requirement = "registration_missing_requirement",
|
|
6432
|
+
registration_required = "registration_required",
|
|
6433
|
+
registration_verification_required = "registration_verification_required",
|
|
6434
|
+
consent_required = "consent_required"
|
|
6412
6435
|
}
|
|
6413
6436
|
export declare enum OAuthErrorType {
|
|
6414
6437
|
invalid_request = "invalid_request",
|
|
6415
6438
|
invalid_client = "invalid_client",
|
|
6416
6439
|
invalid_grant = "invalid_grant",
|
|
6417
6440
|
invalid_token = "invalid_token",
|
|
6441
|
+
consent_required = "consent_required",
|
|
6442
|
+
interaction_required = "interaction_required",
|
|
6443
|
+
login_required = "login_required",
|
|
6418
6444
|
unauthorized_client = "unauthorized_client",
|
|
6419
6445
|
invalid_scope = "invalid_scope",
|
|
6420
6446
|
server_error = "server_error",
|
|
@@ -237,13 +237,32 @@ class FusionAuthClient {
|
|
|
237
237
|
*
|
|
238
238
|
* 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.
|
|
239
239
|
*
|
|
240
|
-
* @param {string} loginId The loginId of the User that you intend to change the password for.
|
|
240
|
+
* @param {string} loginId The loginId (email or username) of the User that you intend to change the password for.
|
|
241
241
|
* @returns {Promise<ClientResponse<void>>}
|
|
242
242
|
*/
|
|
243
243
|
checkChangePasswordUsingLoginId(loginId) {
|
|
244
244
|
return this.start()
|
|
245
245
|
.withUri('/api/user/change-password')
|
|
246
|
-
.withParameter('
|
|
246
|
+
.withParameter('loginId', loginId)
|
|
247
|
+
.withMethod("GET")
|
|
248
|
+
.go();
|
|
249
|
+
}
|
|
250
|
+
/**
|
|
251
|
+
* Check to see if the user must obtain a Trust Request Id in order to complete a change password request.
|
|
252
|
+
* When a user has enabled Two-Factor authentication, before you are allowed to use the Change Password API to change
|
|
253
|
+
* your password, you must obtain a Trust Request Id by completing a Two-Factor Step-Up authentication.
|
|
254
|
+
*
|
|
255
|
+
* 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.
|
|
256
|
+
*
|
|
257
|
+
* @param {string} loginId The loginId of the User that you intend to change the password for.
|
|
258
|
+
* @param {Array<String>} loginIdTypes The identity types that FusionAuth will compare the loginId to.
|
|
259
|
+
* @returns {Promise<ClientResponse<void>>}
|
|
260
|
+
*/
|
|
261
|
+
checkChangePasswordUsingLoginIdAndLoginIdTypes(loginId, loginIdTypes) {
|
|
262
|
+
return this.start()
|
|
263
|
+
.withUri('/api/user/change-password')
|
|
264
|
+
.withParameter('loginId', loginId)
|
|
265
|
+
.withParameter('loginIdTypes', loginIdTypes)
|
|
247
266
|
.withMethod("GET")
|
|
248
267
|
.go();
|
|
249
268
|
}
|
|
@@ -3670,7 +3689,7 @@ class FusionAuthClient {
|
|
|
3670
3689
|
* Retrieves the user for the loginId, using specific loginIdTypes.
|
|
3671
3690
|
*
|
|
3672
3691
|
* @param {string} loginId The email or username of the user.
|
|
3673
|
-
* @param {Array<String>} loginIdTypes
|
|
3692
|
+
* @param {Array<String>} loginIdTypes The identity types that FusionAuth will compare the loginId to.
|
|
3674
3693
|
* @returns {Promise<ClientResponse<UserResponse>>}
|
|
3675
3694
|
*/
|
|
3676
3695
|
retrieveUserByLoginIdWithLoginIdTypes(loginId, loginIdTypes) {
|
|
@@ -3880,7 +3899,7 @@ class FusionAuthClient {
|
|
|
3880
3899
|
* @param {string} loginId The userId id.
|
|
3881
3900
|
* @param {number} start The start instant as UTC milliseconds since Epoch.
|
|
3882
3901
|
* @param {number} end The end instant as UTC milliseconds since Epoch.
|
|
3883
|
-
* @param {Array<String>} loginIdTypes
|
|
3902
|
+
* @param {Array<String>} loginIdTypes The identity types that FusionAuth will compare the loginId to.
|
|
3884
3903
|
* @returns {Promise<ClientResponse<LoginReportResponse>>}
|
|
3885
3904
|
*/
|
|
3886
3905
|
retrieveUserLoginReportByLoginIdAndLoginIdTypes(applicationId, loginId, start, end, loginIdTypes) {
|
|
@@ -5746,7 +5765,7 @@ var FormType;
|
|
|
5746
5765
|
FormType["selfServiceUser"] = "selfServiceUser";
|
|
5747
5766
|
})(FormType = exports.FormType || (exports.FormType = {}));
|
|
5748
5767
|
/**
|
|
5749
|
-
* Authorization Grant types as defined by the <a href="https://tools.ietf.org/html/rfc6749">
|
|
5768
|
+
* Authorization Grant types as defined by the <a href="https://tools.ietf.org/html/rfc6749">OAuth 2.0 Authorization
|
|
5750
5769
|
* Framework - RFC 6749</a>.
|
|
5751
5770
|
* <p>
|
|
5752
5771
|
* Specific names as defined by <a href="https://tools.ietf.org/html/rfc7591#section-4.1">
|
|
@@ -5987,6 +6006,9 @@ var OAuthErrorReason;
|
|
|
5987
6006
|
OAuthErrorReason["access_token_required"] = "access_token_required";
|
|
5988
6007
|
OAuthErrorReason["refresh_token_not_found"] = "refresh_token_not_found";
|
|
5989
6008
|
OAuthErrorReason["refresh_token_type_not_supported"] = "refresh_token_type_not_supported";
|
|
6009
|
+
OAuthErrorReason["id_token_invalid"] = "id_token_invalid";
|
|
6010
|
+
OAuthErrorReason["unsupported_token_type"] = "unsupported_token_type";
|
|
6011
|
+
OAuthErrorReason["token_type_hint_mismatch"] = "token_type_hint_mismatch";
|
|
5990
6012
|
OAuthErrorReason["invalid_client_id"] = "invalid_client_id";
|
|
5991
6013
|
OAuthErrorReason["invalid_expires_in"] = "invalid_expires_in";
|
|
5992
6014
|
OAuthErrorReason["invalid_user_credentials"] = "invalid_user_credentials";
|
|
@@ -5996,6 +6018,7 @@ var OAuthErrorReason;
|
|
|
5996
6018
|
OAuthErrorReason["invalid_pkce_code_verifier"] = "invalid_pkce_code_verifier";
|
|
5997
6019
|
OAuthErrorReason["invalid_pkce_code_challenge"] = "invalid_pkce_code_challenge";
|
|
5998
6020
|
OAuthErrorReason["invalid_pkce_code_challenge_method"] = "invalid_pkce_code_challenge_method";
|
|
6021
|
+
OAuthErrorReason["invalid_prompt"] = "invalid_prompt";
|
|
5999
6022
|
OAuthErrorReason["invalid_redirect_uri"] = "invalid_redirect_uri";
|
|
6000
6023
|
OAuthErrorReason["invalid_response_mode"] = "invalid_response_mode";
|
|
6001
6024
|
OAuthErrorReason["invalid_response_type"] = "invalid_response_type";
|
|
@@ -6042,6 +6065,14 @@ var OAuthErrorReason;
|
|
|
6042
6065
|
OAuthErrorReason["missing_required_scope"] = "missing_required_scope";
|
|
6043
6066
|
OAuthErrorReason["unknown_scope"] = "unknown_scope";
|
|
6044
6067
|
OAuthErrorReason["consent_canceled"] = "consent_canceled";
|
|
6068
|
+
OAuthErrorReason["authentication_required"] = "authentication_required";
|
|
6069
|
+
OAuthErrorReason["email_verification_required"] = "email_verification_required";
|
|
6070
|
+
OAuthErrorReason["multi_factor_challenge_required"] = "multi_factor_challenge_required";
|
|
6071
|
+
OAuthErrorReason["phone_verification_required"] = "phone_verification_required";
|
|
6072
|
+
OAuthErrorReason["registration_missing_requirement"] = "registration_missing_requirement";
|
|
6073
|
+
OAuthErrorReason["registration_required"] = "registration_required";
|
|
6074
|
+
OAuthErrorReason["registration_verification_required"] = "registration_verification_required";
|
|
6075
|
+
OAuthErrorReason["consent_required"] = "consent_required";
|
|
6045
6076
|
})(OAuthErrorReason = exports.OAuthErrorReason || (exports.OAuthErrorReason = {}));
|
|
6046
6077
|
var OAuthErrorType;
|
|
6047
6078
|
(function (OAuthErrorType) {
|
|
@@ -6049,6 +6080,9 @@ var OAuthErrorType;
|
|
|
6049
6080
|
OAuthErrorType["invalid_client"] = "invalid_client";
|
|
6050
6081
|
OAuthErrorType["invalid_grant"] = "invalid_grant";
|
|
6051
6082
|
OAuthErrorType["invalid_token"] = "invalid_token";
|
|
6083
|
+
OAuthErrorType["consent_required"] = "consent_required";
|
|
6084
|
+
OAuthErrorType["interaction_required"] = "interaction_required";
|
|
6085
|
+
OAuthErrorType["login_required"] = "login_required";
|
|
6052
6086
|
OAuthErrorType["unauthorized_client"] = "unauthorized_client";
|
|
6053
6087
|
OAuthErrorType["invalid_scope"] = "invalid_scope";
|
|
6054
6088
|
OAuthErrorType["server_error"] = "server_error";
|