@fusionauth/typescript-client 1.48.0 → 1.50.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/README.md +8 -0
- package/build/src/DefaultRESTClient.d.ts +14 -14
- package/build/src/DefaultRESTClient.js +47 -38
- package/build/src/DefaultRESTClient.js.map +1 -1
- package/build/src/FusionAuthClient.d.ts +205 -45
- package/build/src/FusionAuthClient.js +178 -31
- package/build/src/FusionAuthClient.js.map +1 -1
- package/dist/fusionauth-typescript-client.js +247 -87
- package/dist/fusionauth-typescript-client.min.js +1 -1
- package/dist/fusionauth-typescript-client.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* language governing permissions and limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.IdentityProviderLoginMethod = exports.ClientAuthenticationMethod = exports.OAuthErrorReason = exports.WebAuthnWorkflow = exports.Oauth2AuthorizedURLValidationPolicy = exports.LogoutBehavior = exports.RateLimitedRequestType = exports.CanonicalizationMethod = exports.SecureGeneratorType = exports.VerificationStrategy = exports.UniqueUsernameStrategy = exports.LDAPSecurityMethod = exports.TOTPAlgorithm = exports.EventType = exports.IdentityProviderType = exports.MessengerType = exports.ExpiryUnit = exports.EmailSecurityType = exports.ChangePasswordReason = exports.SteamAPIMode = exports.UserVerificationRequirement = exports.TransactionType = exports.FamilyRole = exports.KeyUse = exports.Algorithm = exports.EventLogType = exports.BreachAction = exports.IdentityProviderLinkingStrategy = exports.SAMLLogoutBehavior = exports.Sort = exports.OAuthErrorType = exports.LambdaEngineType = exports.UserActionPhase = exports.UnverifiedBehavior = exports.RefreshTokenExpirationPolicy = exports.RegistrationType = exports.LoginIdType = exports.CoseEllipticCurve = exports.AuthenticatorAttachment = exports.MultiFactorLoginPolicy = exports.ConnectorType = exports.KeyType = exports.AttestationType = exports.FormType = exports.KeyAlgorithm = exports.CaptchaMethod = exports.DeviceType = exports.RefreshTokenUsagePolicy = exports.ClientAuthenticationPolicy = exports.ResidentKeyRequirement = exports.AuthenticationThreats = exports.ObjectState = exports.AttestationConveyancePreference = exports.LambdaType = exports.CoseAlgorithmIdentifier = exports.HTTPMethod = exports.FormFieldAdminPolicy = exports.PublicKeyCredentialType = exports.SAMLv2DestinationAssertionPolicy = exports.CoseKeyType = exports.BreachMatchMode = exports.FormControl = exports.ContentStatus = exports.MessageType = exports.IPAccessControlEntryAction = exports.AuthenticatorAttachmentPreference = exports.XMLSignatureLocation = exports.TokenType = exports.ProofKeyForCodeExchangePolicy = exports.ReactorFeatureStatus = exports.GrantType = exports.UserState = exports.ApplicationMultiFactorTrustPolicy = exports.ConsentStatus = exports.BreachedPasswordStatus = exports.FormDataType = exports.FusionAuthClient = void 0;
|
|
18
|
+
exports.IdentityProviderLoginMethod = exports.OAuthScopeConsentMode = exports.ClientAuthenticationMethod = exports.OAuthErrorReason = exports.UnknownScopePolicy = exports.WebAuthnWorkflow = exports.Oauth2AuthorizedURLValidationPolicy = exports.LogoutBehavior = exports.OAuthScopeHandlingPolicy = exports.RateLimitedRequestType = exports.CanonicalizationMethod = exports.SecureGeneratorType = exports.VerificationStrategy = exports.UniqueUsernameStrategy = exports.LDAPSecurityMethod = exports.TOTPAlgorithm = exports.EventType = exports.SystemTrustedProxyConfigurationPolicy = exports.IdentityProviderType = exports.MessengerType = exports.ExpiryUnit = exports.EmailSecurityType = exports.ChangePasswordReason = exports.SteamAPIMode = exports.UserVerificationRequirement = exports.TransactionType = exports.FamilyRole = exports.KeyUse = exports.Algorithm = exports.EventLogType = exports.BreachAction = exports.IdentityProviderLinkingStrategy = exports.SAMLLogoutBehavior = exports.Sort = exports.OAuthErrorType = exports.LambdaEngineType = exports.UserActionPhase = exports.UnverifiedBehavior = exports.RefreshTokenExpirationPolicy = exports.RegistrationType = exports.LoginIdType = exports.CoseEllipticCurve = exports.AuthenticatorAttachment = exports.MultiFactorLoginPolicy = exports.ConnectorType = exports.KeyType = exports.AttestationType = exports.FormType = exports.KeyAlgorithm = exports.CaptchaMethod = exports.DeviceType = exports.RefreshTokenUsagePolicy = exports.ClientAuthenticationPolicy = exports.ResidentKeyRequirement = exports.AuthenticationThreats = exports.ObjectState = exports.AttestationConveyancePreference = exports.LambdaType = exports.CoseAlgorithmIdentifier = exports.HTTPMethod = exports.FormFieldAdminPolicy = exports.PublicKeyCredentialType = exports.SAMLv2DestinationAssertionPolicy = exports.CoseKeyType = exports.BreachMatchMode = exports.FormControl = exports.ContentStatus = exports.MessageType = exports.IPAccessControlEntryAction = exports.AuthenticatorAttachmentPreference = exports.XMLSignatureLocation = exports.TokenType = exports.ProofKeyForCodeExchangePolicy = exports.ReactorFeatureStatus = exports.OAuthApplicationRelationship = exports.GrantType = exports.UserState = exports.ApplicationMultiFactorTrustPolicy = exports.ConsentStatus = exports.BreachedPasswordStatus = exports.FormDataType = exports.FusionAuthClient = void 0;
|
|
19
19
|
const DefaultRESTClientBuilder_1 = require("./DefaultRESTClientBuilder");
|
|
20
20
|
const url_1 = require("url");
|
|
21
21
|
class FusionAuthClient {
|
|
@@ -50,7 +50,7 @@ class FusionAuthClient {
|
|
|
50
50
|
* "actioner". Both user ids are required in the request object.
|
|
51
51
|
*
|
|
52
52
|
* @param {ActionRequest} request The action request that includes all the information about the action being taken including
|
|
53
|
-
* the
|
|
53
|
+
* the Id of the action, any options and the duration (if applicable).
|
|
54
54
|
* @returns {Promise<ClientResponse<ActionResponse>>}
|
|
55
55
|
*/
|
|
56
56
|
actionUser(request) {
|
|
@@ -61,7 +61,7 @@ class FusionAuthClient {
|
|
|
61
61
|
.go();
|
|
62
62
|
}
|
|
63
63
|
/**
|
|
64
|
-
* Activates the FusionAuth Reactor using a license
|
|
64
|
+
* Activates the FusionAuth Reactor using a license Id and optionally a license text (for air-gapped deployments)
|
|
65
65
|
*
|
|
66
66
|
* @param {ReactorRequest} request An optional request that contains the license text to activate Reactor (useful for air-gap deployments of FusionAuth).
|
|
67
67
|
* @returns {Promise<ClientResponse<void>>}
|
|
@@ -74,9 +74,9 @@ class FusionAuthClient {
|
|
|
74
74
|
.go();
|
|
75
75
|
}
|
|
76
76
|
/**
|
|
77
|
-
* Adds a user to an existing family. The family
|
|
77
|
+
* Adds a user to an existing family. The family Id must be specified.
|
|
78
78
|
*
|
|
79
|
-
* @param {UUID} familyId The
|
|
79
|
+
* @param {UUID} familyId The Id of the family.
|
|
80
80
|
* @param {FamilyRequest} request The request object that contains all the information used to determine which user to add to the family.
|
|
81
81
|
* @returns {Promise<ClientResponse<FamilyResponse>>}
|
|
82
82
|
*/
|
|
@@ -112,7 +112,7 @@ class FusionAuthClient {
|
|
|
112
112
|
/**
|
|
113
113
|
* Cancels the user action.
|
|
114
114
|
*
|
|
115
|
-
* @param {UUID} actionId The action
|
|
115
|
+
* @param {UUID} actionId The action Id of the action to cancel.
|
|
116
116
|
* @param {ActionRequest} request The action request that contains the information about the cancellation.
|
|
117
117
|
* @returns {Promise<ClientResponse<ActionResponse>>}
|
|
118
118
|
*/
|
|
@@ -144,7 +144,7 @@ class FusionAuthClient {
|
|
|
144
144
|
.go();
|
|
145
145
|
}
|
|
146
146
|
/**
|
|
147
|
-
* Changes a user's password using their identity (
|
|
147
|
+
* Changes a user's password using their identity (loginId and password). Using a loginId instead of the changePasswordId
|
|
148
148
|
* bypasses the email verification and allows a password to be changed directly without first calling the #forgotPassword
|
|
149
149
|
* method.
|
|
150
150
|
*
|
|
@@ -235,7 +235,7 @@ class FusionAuthClient {
|
|
|
235
235
|
* Adds a comment to the user's account.
|
|
236
236
|
*
|
|
237
237
|
* @param {UserCommentRequest} request The request object that contains all the information used to create the user comment.
|
|
238
|
-
* @returns {Promise<ClientResponse<
|
|
238
|
+
* @returns {Promise<ClientResponse<UserCommentResponse>>}
|
|
239
239
|
*/
|
|
240
240
|
commentOnUser(request) {
|
|
241
241
|
return this.start()
|
|
@@ -318,7 +318,7 @@ class FusionAuthClient {
|
|
|
318
318
|
.go();
|
|
319
319
|
}
|
|
320
320
|
/**
|
|
321
|
-
* Creates a new role for an application. You must specify the
|
|
321
|
+
* Creates a new role for an application. You must specify the Id of the application you are creating the role for.
|
|
322
322
|
* You can optionally specify an Id for the role inside the ApplicationRole object itself, if not provided one will be generated.
|
|
323
323
|
*
|
|
324
324
|
* @param {UUID} applicationId The Id of the application to create the role on.
|
|
@@ -427,7 +427,7 @@ class FusionAuthClient {
|
|
|
427
427
|
.go();
|
|
428
428
|
}
|
|
429
429
|
/**
|
|
430
|
-
* Creates a new permission for an entity type. You must specify the
|
|
430
|
+
* Creates a new permission for an entity type. You must specify the Id of the entity type you are creating the permission for.
|
|
431
431
|
* You can optionally specify an Id for the permission inside the EntityTypePermission object itself, if not provided one will be generated.
|
|
432
432
|
*
|
|
433
433
|
* @param {UUID} entityTypeId The Id of the entity type to create the permission on.
|
|
@@ -446,10 +446,10 @@ class FusionAuthClient {
|
|
|
446
446
|
.go();
|
|
447
447
|
}
|
|
448
448
|
/**
|
|
449
|
-
* Creates a family with the user
|
|
449
|
+
* Creates a family with the user Id in the request as the owner and sole member of the family. You can optionally specify an Id for the
|
|
450
450
|
* family, if not provided one will be generated.
|
|
451
451
|
*
|
|
452
|
-
* @param {UUID} familyId (Optional) The
|
|
452
|
+
* @param {UUID} familyId (Optional) The Id for the family. If not provided a secure random UUID will be generated.
|
|
453
453
|
* @param {FamilyRequest} request The request object that contains all the information used to create the family.
|
|
454
454
|
* @returns {Promise<ClientResponse<FamilyResponse>>}
|
|
455
455
|
*/
|
|
@@ -594,6 +594,25 @@ class FusionAuthClient {
|
|
|
594
594
|
.withMethod("POST")
|
|
595
595
|
.go();
|
|
596
596
|
}
|
|
597
|
+
/**
|
|
598
|
+
* Creates a new custom OAuth scope for an application. You must specify the Id of the application you are creating the scope for.
|
|
599
|
+
* You can optionally specify an Id for the OAuth scope on the URL, if not provided one will be generated.
|
|
600
|
+
*
|
|
601
|
+
* @param {UUID} applicationId The Id of the application to create the OAuth scope on.
|
|
602
|
+
* @param {UUID} scopeId (Optional) The Id of the OAuth scope. If not provided a secure random UUID will be generated.
|
|
603
|
+
* @param {ApplicationOAuthScopeRequest} request The request object that contains all the information used to create the OAuth OAuth scope.
|
|
604
|
+
* @returns {Promise<ClientResponse<ApplicationOAuthScopeResponse>>}
|
|
605
|
+
*/
|
|
606
|
+
createOAuthScope(applicationId, scopeId, request) {
|
|
607
|
+
return this.start()
|
|
608
|
+
.withUri('/api/application')
|
|
609
|
+
.withUriSegment(applicationId)
|
|
610
|
+
.withUriSegment("scope")
|
|
611
|
+
.withUriSegment(scopeId)
|
|
612
|
+
.withJSONBody(request)
|
|
613
|
+
.withMethod("POST")
|
|
614
|
+
.go();
|
|
615
|
+
}
|
|
597
616
|
/**
|
|
598
617
|
* Creates a tenant. You can optionally specify an Id for the tenant, if not provided one will be generated.
|
|
599
618
|
*
|
|
@@ -830,7 +849,7 @@ class FusionAuthClient {
|
|
|
830
849
|
* Hard deletes an application role. This is a dangerous operation and should not be used in most circumstances. This
|
|
831
850
|
* permanently removes the given role from all users that had it.
|
|
832
851
|
*
|
|
833
|
-
* @param {UUID} applicationId The Id of the application to
|
|
852
|
+
* @param {UUID} applicationId The Id of the application that the role belongs to.
|
|
834
853
|
* @param {UUID} roleId The Id of the role to delete.
|
|
835
854
|
* @returns {Promise<ClientResponse<void>>}
|
|
836
855
|
*/
|
|
@@ -1073,6 +1092,23 @@ class FusionAuthClient {
|
|
|
1073
1092
|
.withMethod("DELETE")
|
|
1074
1093
|
.go();
|
|
1075
1094
|
}
|
|
1095
|
+
/**
|
|
1096
|
+
* Hard deletes a custom OAuth scope.
|
|
1097
|
+
* OAuth workflows that are still requesting the deleted OAuth scope may fail depending on the application's unknown scope policy.
|
|
1098
|
+
*
|
|
1099
|
+
* @param {UUID} applicationId The Id of the application that the OAuth scope belongs to.
|
|
1100
|
+
* @param {UUID} scopeId The Id of the OAuth scope to delete.
|
|
1101
|
+
* @returns {Promise<ClientResponse<void>>}
|
|
1102
|
+
*/
|
|
1103
|
+
deleteOAuthScope(applicationId, scopeId) {
|
|
1104
|
+
return this.start()
|
|
1105
|
+
.withUri('/api/application')
|
|
1106
|
+
.withUriSegment(applicationId)
|
|
1107
|
+
.withUriSegment("scope")
|
|
1108
|
+
.withUriSegment(scopeId)
|
|
1109
|
+
.withMethod("DELETE")
|
|
1110
|
+
.go();
|
|
1111
|
+
}
|
|
1076
1112
|
/**
|
|
1077
1113
|
* Deletes the user registration for the given user and application.
|
|
1078
1114
|
*
|
|
@@ -1865,7 +1901,7 @@ class FusionAuthClient {
|
|
|
1865
1901
|
.go();
|
|
1866
1902
|
}
|
|
1867
1903
|
/**
|
|
1868
|
-
* Updates, via PATCH, the application role with the given
|
|
1904
|
+
* Updates, via PATCH, the application role with the given Id for the application.
|
|
1869
1905
|
*
|
|
1870
1906
|
* @param {UUID} applicationId The Id of the application that the role belongs to.
|
|
1871
1907
|
* @param {UUID} roleId The Id of the role to update.
|
|
@@ -2031,7 +2067,25 @@ class FusionAuthClient {
|
|
|
2031
2067
|
.go();
|
|
2032
2068
|
}
|
|
2033
2069
|
/**
|
|
2034
|
-
* Updates, via PATCH, the
|
|
2070
|
+
* Updates, via PATCH, the custom OAuth scope with the given Id for the application.
|
|
2071
|
+
*
|
|
2072
|
+
* @param {UUID} applicationId The Id of the application that the OAuth scope belongs to.
|
|
2073
|
+
* @param {UUID} scopeId The Id of the OAuth scope to update.
|
|
2074
|
+
* @param {ApplicationOAuthScopeRequest} request The request that contains just the new OAuth scope information.
|
|
2075
|
+
* @returns {Promise<ClientResponse<ApplicationOAuthScopeResponse>>}
|
|
2076
|
+
*/
|
|
2077
|
+
patchOAuthScope(applicationId, scopeId, request) {
|
|
2078
|
+
return this.start()
|
|
2079
|
+
.withUri('/api/application')
|
|
2080
|
+
.withUriSegment(applicationId)
|
|
2081
|
+
.withUriSegment("scope")
|
|
2082
|
+
.withUriSegment(scopeId)
|
|
2083
|
+
.withJSONBody(request)
|
|
2084
|
+
.withMethod("PATCH")
|
|
2085
|
+
.go();
|
|
2086
|
+
}
|
|
2087
|
+
/**
|
|
2088
|
+
* Updates, via PATCH, the registration for the user with the given Id and the application defined in the request.
|
|
2035
2089
|
*
|
|
2036
2090
|
* @param {UUID} userId The Id of the user whose registration is going to be updated.
|
|
2037
2091
|
* @param {RegistrationRequest} request The request that contains just the new registration information.
|
|
@@ -2246,7 +2300,7 @@ class FusionAuthClient {
|
|
|
2246
2300
|
* Registers a user for an application. If you provide the User and the UserRegistration object on this request, it
|
|
2247
2301
|
* will create the user as well as register them for the application. This is called a Full Registration. However, if
|
|
2248
2302
|
* you only provide the UserRegistration object, then the user must already exist and they will be registered for the
|
|
2249
|
-
* application. The user
|
|
2303
|
+
* application. The user Id can also be provided and it will either be used to look up an existing user or it will be
|
|
2250
2304
|
* used for the newly created User.
|
|
2251
2305
|
*
|
|
2252
2306
|
* @param {UUID} userId (Optional) The Id of the user being registered for the application and optionally created.
|
|
@@ -2281,8 +2335,8 @@ class FusionAuthClient {
|
|
|
2281
2335
|
/**
|
|
2282
2336
|
* Removes a user from the family with the given id.
|
|
2283
2337
|
*
|
|
2284
|
-
* @param {UUID} familyId The
|
|
2285
|
-
* @param {UUID} userId The
|
|
2338
|
+
* @param {UUID} familyId The Id of the family to remove the user from.
|
|
2339
|
+
* @param {UUID} userId The Id of the user to remove from the family.
|
|
2286
2340
|
* @returns {Promise<ClientResponse<void>>}
|
|
2287
2341
|
*/
|
|
2288
2342
|
removeUserFromFamily(familyId, userId) {
|
|
@@ -2407,7 +2461,7 @@ class FusionAuthClient {
|
|
|
2407
2461
|
.go();
|
|
2408
2462
|
}
|
|
2409
2463
|
/**
|
|
2410
|
-
* Retrieves the application for the given
|
|
2464
|
+
* Retrieves the application for the given Id or all the applications if the Id is null.
|
|
2411
2465
|
*
|
|
2412
2466
|
* @param {UUID} applicationId (Optional) The application id.
|
|
2413
2467
|
* @returns {Promise<ClientResponse<ApplicationResponse>>}
|
|
@@ -2728,7 +2782,7 @@ class FusionAuthClient {
|
|
|
2728
2782
|
.go();
|
|
2729
2783
|
}
|
|
2730
2784
|
/**
|
|
2731
|
-
* Retrieves the identity provider for the given
|
|
2785
|
+
* Retrieves the identity provider for the given Id or all the identity providers if the Id is null.
|
|
2732
2786
|
*
|
|
2733
2787
|
* @param {UUID} identityProviderId The identity provider Id.
|
|
2734
2788
|
* @returns {Promise<ClientResponse<IdentityProviderResponse>>}
|
|
@@ -3022,6 +3076,22 @@ class FusionAuthClient {
|
|
|
3022
3076
|
.withMethod("GET")
|
|
3023
3077
|
.go();
|
|
3024
3078
|
}
|
|
3079
|
+
/**
|
|
3080
|
+
* Retrieves a custom OAuth scope.
|
|
3081
|
+
*
|
|
3082
|
+
* @param {UUID} applicationId The Id of the application that the OAuth scope belongs to.
|
|
3083
|
+
* @param {UUID} scopeId The Id of the OAuth scope to retrieve.
|
|
3084
|
+
* @returns {Promise<ClientResponse<ApplicationOAuthScopeResponse>>}
|
|
3085
|
+
*/
|
|
3086
|
+
retrieveOAuthScope(applicationId, scopeId) {
|
|
3087
|
+
return this.start()
|
|
3088
|
+
.withUri('/api/application')
|
|
3089
|
+
.withUriSegment(applicationId)
|
|
3090
|
+
.withUriSegment("scope")
|
|
3091
|
+
.withUriSegment(scopeId)
|
|
3092
|
+
.withMethod("GET")
|
|
3093
|
+
.go();
|
|
3094
|
+
}
|
|
3025
3095
|
/**
|
|
3026
3096
|
* Retrieves the Oauth2 configuration for the application for the given Application Id.
|
|
3027
3097
|
*
|
|
@@ -3168,7 +3238,7 @@ class FusionAuthClient {
|
|
|
3168
3238
|
.go();
|
|
3169
3239
|
}
|
|
3170
3240
|
/**
|
|
3171
|
-
* Retrieves the user registration for the user with the given
|
|
3241
|
+
* Retrieves the user registration for the user with the given Id and the given application id.
|
|
3172
3242
|
*
|
|
3173
3243
|
* @param {UUID} userId The Id of the user.
|
|
3174
3244
|
* @param {UUID} applicationId The Id of the application.
|
|
@@ -3728,8 +3798,8 @@ class FusionAuthClient {
|
|
|
3728
3798
|
* - revokeRefreshTokensByUserIdForApplication
|
|
3729
3799
|
*
|
|
3730
3800
|
* @param {string} token (Optional) The refresh token to delete.
|
|
3731
|
-
* @param {UUID} userId (Optional) The user
|
|
3732
|
-
* @param {UUID} applicationId (Optional) The application
|
|
3801
|
+
* @param {UUID} userId (Optional) The user Id whose tokens to delete.
|
|
3802
|
+
* @param {UUID} applicationId (Optional) The application Id of the tokens to delete.
|
|
3733
3803
|
* @returns {Promise<ClientResponse<void>>}
|
|
3734
3804
|
*/
|
|
3735
3805
|
revokeRefreshToken(token, userId, applicationId) {
|
|
@@ -3901,7 +3971,7 @@ class FusionAuthClient {
|
|
|
3901
3971
|
.go();
|
|
3902
3972
|
}
|
|
3903
3973
|
/**
|
|
3904
|
-
* Retrieves the entities for the given ids. If any
|
|
3974
|
+
* Retrieves the entities for the given ids. If any Id is invalid, it is ignored.
|
|
3905
3975
|
*
|
|
3906
3976
|
* @param {Array<string>} ids The entity ids to search for.
|
|
3907
3977
|
* @returns {Promise<ClientResponse<EntitySearchResponse>>}
|
|
@@ -4083,7 +4153,7 @@ class FusionAuthClient {
|
|
|
4083
4153
|
.go();
|
|
4084
4154
|
}
|
|
4085
4155
|
/**
|
|
4086
|
-
* Retrieves the users for the given ids. If any
|
|
4156
|
+
* Retrieves the users for the given ids. If any Id is invalid, it is ignored.
|
|
4087
4157
|
*
|
|
4088
4158
|
* @param {Array<string>} ids The user ids to search for.
|
|
4089
4159
|
* @returns {Promise<ClientResponse<SearchResponse>>}
|
|
@@ -4098,7 +4168,7 @@ class FusionAuthClient {
|
|
|
4098
4168
|
.go();
|
|
4099
4169
|
}
|
|
4100
4170
|
/**
|
|
4101
|
-
* Retrieves the users for the given ids. If any
|
|
4171
|
+
* Retrieves the users for the given ids. If any Id is invalid, it is ignored.
|
|
4102
4172
|
*
|
|
4103
4173
|
* @param {Array<string>} ids The user ids to search for.
|
|
4104
4174
|
* @returns {Promise<ClientResponse<SearchResponse>>}
|
|
@@ -4157,7 +4227,7 @@ class FusionAuthClient {
|
|
|
4157
4227
|
* Send an email using an email template id. You can optionally provide <code>requestData</code> to access key value
|
|
4158
4228
|
* pairs in the email template.
|
|
4159
4229
|
*
|
|
4160
|
-
* @param {UUID} emailTemplateId The
|
|
4230
|
+
* @param {UUID} emailTemplateId The Id for the template.
|
|
4161
4231
|
* @param {SendRequest} request The send email request that contains all the information used to send the email.
|
|
4162
4232
|
* @returns {Promise<ClientResponse<SendResponse>>}
|
|
4163
4233
|
*/
|
|
@@ -4370,7 +4440,7 @@ class FusionAuthClient {
|
|
|
4370
4440
|
.go();
|
|
4371
4441
|
}
|
|
4372
4442
|
/**
|
|
4373
|
-
* Updates the application role with the given
|
|
4443
|
+
* Updates the application role with the given Id for the application.
|
|
4374
4444
|
*
|
|
4375
4445
|
* @param {UUID} applicationId The Id of the application that the role belongs to.
|
|
4376
4446
|
* @param {UUID} roleId The Id of the role to update.
|
|
@@ -4463,7 +4533,7 @@ class FusionAuthClient {
|
|
|
4463
4533
|
.go();
|
|
4464
4534
|
}
|
|
4465
4535
|
/**
|
|
4466
|
-
* Updates the permission with the given
|
|
4536
|
+
* Updates the permission with the given Id for the entity type.
|
|
4467
4537
|
*
|
|
4468
4538
|
* @param {UUID} entityTypeId The Id of the entityType that the permission belongs to.
|
|
4469
4539
|
* @param {UUID} permissionId The Id of the permission to update.
|
|
@@ -4642,7 +4712,25 @@ class FusionAuthClient {
|
|
|
4642
4712
|
.go();
|
|
4643
4713
|
}
|
|
4644
4714
|
/**
|
|
4645
|
-
* Updates the
|
|
4715
|
+
* Updates the OAuth scope with the given Id for the application.
|
|
4716
|
+
*
|
|
4717
|
+
* @param {UUID} applicationId The Id of the application that the OAuth scope belongs to.
|
|
4718
|
+
* @param {UUID} scopeId The Id of the OAuth scope to update.
|
|
4719
|
+
* @param {ApplicationOAuthScopeRequest} request The request that contains all the new OAuth scope information.
|
|
4720
|
+
* @returns {Promise<ClientResponse<ApplicationOAuthScopeResponse>>}
|
|
4721
|
+
*/
|
|
4722
|
+
updateOAuthScope(applicationId, scopeId, request) {
|
|
4723
|
+
return this.start()
|
|
4724
|
+
.withUri('/api/application')
|
|
4725
|
+
.withUriSegment(applicationId)
|
|
4726
|
+
.withUriSegment("scope")
|
|
4727
|
+
.withUriSegment(scopeId)
|
|
4728
|
+
.withJSONBody(request)
|
|
4729
|
+
.withMethod("PUT")
|
|
4730
|
+
.go();
|
|
4731
|
+
}
|
|
4732
|
+
/**
|
|
4733
|
+
* Updates the registration for the user with the given Id and the application defined in the request.
|
|
4646
4734
|
*
|
|
4647
4735
|
* @param {UUID} userId The Id of the user whose registration is going to be updated.
|
|
4648
4736
|
* @param {RegistrationRequest} request The request that contains all the new registration information.
|
|
@@ -4846,7 +4934,7 @@ class FusionAuthClient {
|
|
|
4846
4934
|
/**
|
|
4847
4935
|
* Confirms a email verification. The Id given is usually from an email sent to the user.
|
|
4848
4936
|
*
|
|
4849
|
-
* @param {string} verificationId The email verification
|
|
4937
|
+
* @param {string} verificationId The email verification Id sent to the user.
|
|
4850
4938
|
* @returns {Promise<ClientResponse<void>>}
|
|
4851
4939
|
*
|
|
4852
4940
|
* @deprecated This method has been renamed to verifyEmailAddress and changed to take a JSON request body, use that method instead.
|
|
@@ -5023,6 +5111,17 @@ var GrantType;
|
|
|
5023
5111
|
GrantType["unknown"] = "unknown";
|
|
5024
5112
|
GrantType["device_code"] = "urn:ietf:params:oauth:grant-type:device_code";
|
|
5025
5113
|
})(GrantType = exports.GrantType || (exports.GrantType = {}));
|
|
5114
|
+
/**
|
|
5115
|
+
* The application's relationship to the authorization server. First-party applications will be granted implicit permission for requested scopes.
|
|
5116
|
+
* Third-party applications will use the {@link OAuthScopeConsentMode} policy.
|
|
5117
|
+
*
|
|
5118
|
+
* @author Spencer Witt
|
|
5119
|
+
*/
|
|
5120
|
+
var OAuthApplicationRelationship;
|
|
5121
|
+
(function (OAuthApplicationRelationship) {
|
|
5122
|
+
OAuthApplicationRelationship["FirstParty"] = "FirstParty";
|
|
5123
|
+
OAuthApplicationRelationship["ThirdParty"] = "ThirdParty";
|
|
5124
|
+
})(OAuthApplicationRelationship = exports.OAuthApplicationRelationship || (exports.OAuthApplicationRelationship = {}));
|
|
5026
5125
|
/**
|
|
5027
5126
|
* @author Brian Pontarelli
|
|
5028
5127
|
*/
|
|
@@ -5221,6 +5320,7 @@ var LambdaType;
|
|
|
5221
5320
|
LambdaType["SCIMServerUserRequestConverter"] = "SCIMServerUserRequestConverter";
|
|
5222
5321
|
LambdaType["SCIMServerUserResponseConverter"] = "SCIMServerUserResponseConverter";
|
|
5223
5322
|
LambdaType["SelfServiceRegistrationValidation"] = "SelfServiceRegistrationValidation";
|
|
5323
|
+
LambdaType["UserInfoPopulate"] = "UserInfoPopulate";
|
|
5224
5324
|
})(LambdaType = exports.LambdaType || (exports.LambdaType = {}));
|
|
5225
5325
|
/**
|
|
5226
5326
|
* Used to communicate whether and how authenticator attestation should be delivered to the Relying Party
|
|
@@ -5447,6 +5547,7 @@ var OAuthErrorType;
|
|
|
5447
5547
|
OAuthErrorType["server_error"] = "server_error";
|
|
5448
5548
|
OAuthErrorType["unsupported_grant_type"] = "unsupported_grant_type";
|
|
5449
5549
|
OAuthErrorType["unsupported_response_type"] = "unsupported_response_type";
|
|
5550
|
+
OAuthErrorType["access_denied"] = "access_denied";
|
|
5450
5551
|
OAuthErrorType["change_password_required"] = "change_password_required";
|
|
5451
5552
|
OAuthErrorType["not_licensed"] = "not_licensed";
|
|
5452
5553
|
OAuthErrorType["two_factor_required"] = "two_factor_required";
|
|
@@ -5633,6 +5734,14 @@ var IdentityProviderType;
|
|
|
5633
5734
|
IdentityProviderType["Twitter"] = "Twitter";
|
|
5634
5735
|
IdentityProviderType["Xbox"] = "Xbox";
|
|
5635
5736
|
})(IdentityProviderType = exports.IdentityProviderType || (exports.IdentityProviderType = {}));
|
|
5737
|
+
/**
|
|
5738
|
+
* @author Daniel DeGroff
|
|
5739
|
+
*/
|
|
5740
|
+
var SystemTrustedProxyConfigurationPolicy;
|
|
5741
|
+
(function (SystemTrustedProxyConfigurationPolicy) {
|
|
5742
|
+
SystemTrustedProxyConfigurationPolicy["All"] = "All";
|
|
5743
|
+
SystemTrustedProxyConfigurationPolicy["OnlyConfigured"] = "OnlyConfigured";
|
|
5744
|
+
})(SystemTrustedProxyConfigurationPolicy = exports.SystemTrustedProxyConfigurationPolicy || (exports.SystemTrustedProxyConfigurationPolicy = {}));
|
|
5636
5745
|
/**
|
|
5637
5746
|
* Models the event types that FusionAuth produces.
|
|
5638
5747
|
*
|
|
@@ -5753,6 +5862,17 @@ var RateLimitedRequestType;
|
|
|
5753
5862
|
RateLimitedRequestType["SendRegistrationVerification"] = "SendRegistrationVerification";
|
|
5754
5863
|
RateLimitedRequestType["SendTwoFactor"] = "SendTwoFactor";
|
|
5755
5864
|
})(RateLimitedRequestType = exports.RateLimitedRequestType || (exports.RateLimitedRequestType = {}));
|
|
5865
|
+
/**
|
|
5866
|
+
* Controls the policy for whether OAuth workflows will more strictly adhere to the OAuth and OIDC specification
|
|
5867
|
+
* or run in backwards compatibility mode.
|
|
5868
|
+
*
|
|
5869
|
+
* @author David Charles
|
|
5870
|
+
*/
|
|
5871
|
+
var OAuthScopeHandlingPolicy;
|
|
5872
|
+
(function (OAuthScopeHandlingPolicy) {
|
|
5873
|
+
OAuthScopeHandlingPolicy["Compatibility"] = "Compatibility";
|
|
5874
|
+
OAuthScopeHandlingPolicy["Strict"] = "Strict";
|
|
5875
|
+
})(OAuthScopeHandlingPolicy = exports.OAuthScopeHandlingPolicy || (exports.OAuthScopeHandlingPolicy = {}));
|
|
5756
5876
|
/**
|
|
5757
5877
|
* @author Matthew Altman
|
|
5758
5878
|
*/
|
|
@@ -5781,6 +5901,17 @@ var WebAuthnWorkflow;
|
|
|
5781
5901
|
WebAuthnWorkflow["general"] = "general";
|
|
5782
5902
|
WebAuthnWorkflow["reauthentication"] = "reauthentication";
|
|
5783
5903
|
})(WebAuthnWorkflow = exports.WebAuthnWorkflow || (exports.WebAuthnWorkflow = {}));
|
|
5904
|
+
/**
|
|
5905
|
+
* Policy for handling unknown OAuth scopes in the request
|
|
5906
|
+
*
|
|
5907
|
+
* @author Spencer Witt
|
|
5908
|
+
*/
|
|
5909
|
+
var UnknownScopePolicy;
|
|
5910
|
+
(function (UnknownScopePolicy) {
|
|
5911
|
+
UnknownScopePolicy["Allow"] = "Allow";
|
|
5912
|
+
UnknownScopePolicy["Remove"] = "Remove";
|
|
5913
|
+
UnknownScopePolicy["Reject"] = "Reject";
|
|
5914
|
+
})(UnknownScopePolicy = exports.UnknownScopePolicy || (exports.UnknownScopePolicy = {}));
|
|
5784
5915
|
var OAuthErrorReason;
|
|
5785
5916
|
(function (OAuthErrorReason) {
|
|
5786
5917
|
OAuthErrorReason["auth_code_not_found"] = "auth_code_not_found";
|
|
@@ -5789,6 +5920,7 @@ var OAuthErrorReason;
|
|
|
5789
5920
|
OAuthErrorReason["access_token_unavailable_for_processing"] = "access_token_unavailable_for_processing";
|
|
5790
5921
|
OAuthErrorReason["access_token_failed_processing"] = "access_token_failed_processing";
|
|
5791
5922
|
OAuthErrorReason["access_token_invalid"] = "access_token_invalid";
|
|
5923
|
+
OAuthErrorReason["access_token_required"] = "access_token_required";
|
|
5792
5924
|
OAuthErrorReason["refresh_token_not_found"] = "refresh_token_not_found";
|
|
5793
5925
|
OAuthErrorReason["refresh_token_type_not_supported"] = "refresh_token_type_not_supported";
|
|
5794
5926
|
OAuthErrorReason["invalid_client_id"] = "invalid_client_id";
|
|
@@ -5840,6 +5972,9 @@ var OAuthErrorReason;
|
|
|
5840
5972
|
OAuthErrorReason["change_password_expired"] = "change_password_expired";
|
|
5841
5973
|
OAuthErrorReason["change_password_validation"] = "change_password_validation";
|
|
5842
5974
|
OAuthErrorReason["unknown"] = "unknown";
|
|
5975
|
+
OAuthErrorReason["missing_required_scope"] = "missing_required_scope";
|
|
5976
|
+
OAuthErrorReason["unknown_scope"] = "unknown_scope";
|
|
5977
|
+
OAuthErrorReason["consent_canceled"] = "consent_canceled";
|
|
5843
5978
|
})(OAuthErrorReason = exports.OAuthErrorReason || (exports.OAuthErrorReason = {}));
|
|
5844
5979
|
var ClientAuthenticationMethod;
|
|
5845
5980
|
(function (ClientAuthenticationMethod) {
|
|
@@ -5847,6 +5982,18 @@ var ClientAuthenticationMethod;
|
|
|
5847
5982
|
ClientAuthenticationMethod["client_secret_basic"] = "client_secret_basic";
|
|
5848
5983
|
ClientAuthenticationMethod["client_secret_post"] = "client_secret_post";
|
|
5849
5984
|
})(ClientAuthenticationMethod = exports.ClientAuthenticationMethod || (exports.ClientAuthenticationMethod = {}));
|
|
5985
|
+
/**
|
|
5986
|
+
* Controls the policy for requesting user permission to grant access to requested scopes during an OAuth workflow
|
|
5987
|
+
* for a third-party application.
|
|
5988
|
+
*
|
|
5989
|
+
* @author Spencer Witt
|
|
5990
|
+
*/
|
|
5991
|
+
var OAuthScopeConsentMode;
|
|
5992
|
+
(function (OAuthScopeConsentMode) {
|
|
5993
|
+
OAuthScopeConsentMode["AlwaysPrompt"] = "AlwaysPrompt";
|
|
5994
|
+
OAuthScopeConsentMode["RememberDecision"] = "RememberDecision";
|
|
5995
|
+
OAuthScopeConsentMode["NeverPrompt"] = "NeverPrompt";
|
|
5996
|
+
})(OAuthScopeConsentMode = exports.OAuthScopeConsentMode || (exports.OAuthScopeConsentMode = {}));
|
|
5850
5997
|
/**
|
|
5851
5998
|
* @author Brett Pontarelli
|
|
5852
5999
|
*/
|