@fusionauth/typescript-client 1.32.1 → 1.36.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 +1 -1
- package/build/src/FusionAuthClient.d.ts +191 -36
- package/build/src/FusionAuthClient.js +124 -30
- package/build/src/FusionAuthClient.js.map +1 -1
- package/dist/fusionauth-typescript-client.js +125 -31
- package/dist/fusionauth-typescript-client.min.js +1 -1
- package/dist/fusionauth-typescript-client.min.js.map +1 -1
- package/package.json +3 -3
|
@@ -106,6 +106,9 @@ class FusionAuthClient {
|
|
|
106
106
|
* Changes a user's password using the change password Id. This usually occurs after an email has been sent to the user
|
|
107
107
|
* and they clicked on a link to reset their password.
|
|
108
108
|
*
|
|
109
|
+
* As of version 1.32.2, prefer sending the changePasswordId in the request body. To do this, omit the first parameter, and set
|
|
110
|
+
* the value in the request body.
|
|
111
|
+
*
|
|
109
112
|
* @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.
|
|
110
113
|
* @param {ChangePasswordRequest} request The change password request that contains all of the information used to change the password.
|
|
111
114
|
* @returns {Promise<ClientResponse<ChangePasswordResponse>>}
|
|
@@ -133,6 +136,57 @@ class FusionAuthClient {
|
|
|
133
136
|
.withMethod("POST")
|
|
134
137
|
.go();
|
|
135
138
|
}
|
|
139
|
+
/**
|
|
140
|
+
* Check to see if the user must obtain a Trust Token Id in order to complete a change password request.
|
|
141
|
+
* When a user has enabled Two-Factor authentication, before you are allowed to use the Change Password API to change
|
|
142
|
+
* your password, you must obtain a Truest Token by completing a Two-Factor Step-Up authentication.
|
|
143
|
+
*
|
|
144
|
+
* An HTTP status code of 412 indicates that a Trust Token is required to make a POST request to this API.
|
|
145
|
+
*
|
|
146
|
+
* @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.
|
|
147
|
+
* @returns {Promise<ClientResponse<void>>}
|
|
148
|
+
*/
|
|
149
|
+
checkChangePasswordUsingId(changePasswordId) {
|
|
150
|
+
return this.startAnonymous()
|
|
151
|
+
.withUri('/api/user/change-password')
|
|
152
|
+
.withUriSegment(changePasswordId)
|
|
153
|
+
.withMethod("GET")
|
|
154
|
+
.go();
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Check to see if the user must obtain a Trust Token Id in order to complete a change password request.
|
|
158
|
+
* When a user has enabled Two-Factor authentication, before you are allowed to use the Change Password API to change
|
|
159
|
+
* your password, you must obtain a Truest Token by completing a Two-Factor Step-Up authentication.
|
|
160
|
+
*
|
|
161
|
+
* An HTTP status code of 412 indicates that a Trust Token is required to make a POST request to this API.
|
|
162
|
+
*
|
|
163
|
+
* @param {string} encodedJWT The encoded JWT (access token).
|
|
164
|
+
* @returns {Promise<ClientResponse<void>>}
|
|
165
|
+
*/
|
|
166
|
+
checkChangePasswordUsingJWT(encodedJWT) {
|
|
167
|
+
return this.startAnonymous()
|
|
168
|
+
.withUri('/api/user/change-password')
|
|
169
|
+
.withAuthorization('Bearer ' + encodedJWT)
|
|
170
|
+
.withMethod("GET")
|
|
171
|
+
.go();
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Check to see if the user must obtain a Trust Request Id in order to complete a change password request.
|
|
175
|
+
* When a user has enabled Two-Factor authentication, before you are allowed to use the Change Password API to change
|
|
176
|
+
* your password, you must obtain a Truest Request Id by completing a Two-Factor Step-Up authentication.
|
|
177
|
+
*
|
|
178
|
+
* An HTTP status code of 412 indicates that a Trust Token is required to make a POST request to this API.
|
|
179
|
+
*
|
|
180
|
+
* @param {string} loginId The loginId of the User that you intend to change the password for.
|
|
181
|
+
* @returns {Promise<ClientResponse<void>>}
|
|
182
|
+
*/
|
|
183
|
+
checkChangePasswordUsingLoginId(loginId) {
|
|
184
|
+
return this.start()
|
|
185
|
+
.withUri('/api/user/change-password')
|
|
186
|
+
.withParameter('username', loginId)
|
|
187
|
+
.withMethod("GET")
|
|
188
|
+
.go();
|
|
189
|
+
}
|
|
136
190
|
/**
|
|
137
191
|
* Adds a comment to the user's account.
|
|
138
192
|
*
|
|
@@ -2166,7 +2220,7 @@ class FusionAuthClient {
|
|
|
2166
2220
|
.go();
|
|
2167
2221
|
}
|
|
2168
2222
|
/**
|
|
2169
|
-
* Retrieves all
|
|
2223
|
+
* Retrieves all the actions for the user with the given Id. This will return all time based actions that are active,
|
|
2170
2224
|
* and inactive as well as non-time based actions.
|
|
2171
2225
|
*
|
|
2172
2226
|
* @param {UUID} userId The Id of the user to fetch the actions for.
|
|
@@ -2180,7 +2234,7 @@ class FusionAuthClient {
|
|
|
2180
2234
|
.go();
|
|
2181
2235
|
}
|
|
2182
2236
|
/**
|
|
2183
|
-
* Retrieves all
|
|
2237
|
+
* Retrieves all the actions for the user with the given Id that are currently preventing the User from logging in.
|
|
2184
2238
|
*
|
|
2185
2239
|
* @param {UUID} userId The Id of the user to fetch the actions for.
|
|
2186
2240
|
* @returns {Promise<ClientResponse<ActionResponse>>}
|
|
@@ -2194,7 +2248,7 @@ class FusionAuthClient {
|
|
|
2194
2248
|
.go();
|
|
2195
2249
|
}
|
|
2196
2250
|
/**
|
|
2197
|
-
* Retrieves all
|
|
2251
|
+
* Retrieves all the actions for the user with the given Id that are currently active.
|
|
2198
2252
|
* An active action means one that is time based and has not been canceled, and has not ended.
|
|
2199
2253
|
*
|
|
2200
2254
|
* @param {UUID} userId The Id of the user to fetch the actions for.
|
|
@@ -2222,7 +2276,7 @@ class FusionAuthClient {
|
|
|
2222
2276
|
.go();
|
|
2223
2277
|
}
|
|
2224
2278
|
/**
|
|
2225
|
-
* Retrieves all
|
|
2279
|
+
* Retrieves all the applications.
|
|
2226
2280
|
*
|
|
2227
2281
|
* @returns {Promise<ClientResponse<ApplicationResponse>>}
|
|
2228
2282
|
*/
|
|
@@ -2259,7 +2313,7 @@ class FusionAuthClient {
|
|
|
2259
2313
|
.go();
|
|
2260
2314
|
}
|
|
2261
2315
|
/**
|
|
2262
|
-
* Retrieves all
|
|
2316
|
+
* Retrieves all the connectors.
|
|
2263
2317
|
*
|
|
2264
2318
|
* @returns {Promise<ClientResponse<ConnectorResponse>>}
|
|
2265
2319
|
*/
|
|
@@ -2283,7 +2337,7 @@ class FusionAuthClient {
|
|
|
2283
2337
|
.go();
|
|
2284
2338
|
}
|
|
2285
2339
|
/**
|
|
2286
|
-
* Retrieves all
|
|
2340
|
+
* Retrieves all the consent.
|
|
2287
2341
|
*
|
|
2288
2342
|
* @returns {Promise<ClientResponse<ConsentResponse>>}
|
|
2289
2343
|
*/
|
|
@@ -2340,7 +2394,7 @@ class FusionAuthClient {
|
|
|
2340
2394
|
.go();
|
|
2341
2395
|
}
|
|
2342
2396
|
/**
|
|
2343
|
-
* Retrieves all
|
|
2397
|
+
* Retrieves all the email templates.
|
|
2344
2398
|
*
|
|
2345
2399
|
* @returns {Promise<ClientResponse<EmailTemplateResponse>>}
|
|
2346
2400
|
*/
|
|
@@ -2395,7 +2449,7 @@ class FusionAuthClient {
|
|
|
2395
2449
|
.go();
|
|
2396
2450
|
}
|
|
2397
2451
|
/**
|
|
2398
|
-
* Retrieves all
|
|
2452
|
+
* Retrieves all the Entity Types.
|
|
2399
2453
|
*
|
|
2400
2454
|
* @returns {Promise<ClientResponse<EntityTypeResponse>>}
|
|
2401
2455
|
*/
|
|
@@ -2419,7 +2473,7 @@ class FusionAuthClient {
|
|
|
2419
2473
|
.go();
|
|
2420
2474
|
}
|
|
2421
2475
|
/**
|
|
2422
|
-
* Retrieves all
|
|
2476
|
+
* Retrieves all the families that a user belongs to.
|
|
2423
2477
|
*
|
|
2424
2478
|
* @param {UUID} userId The User's id
|
|
2425
2479
|
* @returns {Promise<ClientResponse<FamilyResponse>>}
|
|
@@ -2432,7 +2486,7 @@ class FusionAuthClient {
|
|
|
2432
2486
|
.go();
|
|
2433
2487
|
}
|
|
2434
2488
|
/**
|
|
2435
|
-
* Retrieves all
|
|
2489
|
+
* Retrieves all the members of a family by the unique Family Id.
|
|
2436
2490
|
*
|
|
2437
2491
|
* @param {UUID} familyId The unique Id of the Family.
|
|
2438
2492
|
* @returns {Promise<ClientResponse<FamilyResponse>>}
|
|
@@ -2471,7 +2525,7 @@ class FusionAuthClient {
|
|
|
2471
2525
|
.go();
|
|
2472
2526
|
}
|
|
2473
2527
|
/**
|
|
2474
|
-
* Retrieves all
|
|
2528
|
+
* Retrieves all the forms fields
|
|
2475
2529
|
*
|
|
2476
2530
|
* @returns {Promise<ClientResponse<FormFieldResponse>>}
|
|
2477
2531
|
*/
|
|
@@ -2482,7 +2536,7 @@ class FusionAuthClient {
|
|
|
2482
2536
|
.go();
|
|
2483
2537
|
}
|
|
2484
2538
|
/**
|
|
2485
|
-
* Retrieves all
|
|
2539
|
+
* Retrieves all the forms.
|
|
2486
2540
|
*
|
|
2487
2541
|
* @returns {Promise<ClientResponse<FormResponse>>}
|
|
2488
2542
|
*/
|
|
@@ -2506,7 +2560,7 @@ class FusionAuthClient {
|
|
|
2506
2560
|
.go();
|
|
2507
2561
|
}
|
|
2508
2562
|
/**
|
|
2509
|
-
* Retrieves all
|
|
2563
|
+
* Retrieves all the groups.
|
|
2510
2564
|
*
|
|
2511
2565
|
* @returns {Promise<ClientResponse<GroupResponse>>}
|
|
2512
2566
|
*/
|
|
@@ -2558,7 +2612,7 @@ class FusionAuthClient {
|
|
|
2558
2612
|
.go();
|
|
2559
2613
|
}
|
|
2560
2614
|
/**
|
|
2561
|
-
* Retrieves all
|
|
2615
|
+
* Retrieves all the identity providers.
|
|
2562
2616
|
*
|
|
2563
2617
|
* @returns {Promise<ClientResponse<IdentityProviderResponse>>}
|
|
2564
2618
|
*/
|
|
@@ -2569,7 +2623,7 @@ class FusionAuthClient {
|
|
|
2569
2623
|
.go();
|
|
2570
2624
|
}
|
|
2571
2625
|
/**
|
|
2572
|
-
* Retrieves all
|
|
2626
|
+
* Retrieves all the actions for the user with the given Id that are currently inactive.
|
|
2573
2627
|
* An inactive action means one that is time based and has been canceled or has expired, or is not time based.
|
|
2574
2628
|
*
|
|
2575
2629
|
* @param {UUID} userId The Id of the user to fetch the actions for.
|
|
@@ -2584,7 +2638,7 @@ class FusionAuthClient {
|
|
|
2584
2638
|
.go();
|
|
2585
2639
|
}
|
|
2586
2640
|
/**
|
|
2587
|
-
* Retrieves all
|
|
2641
|
+
* Retrieves all the applications that are currently inactive.
|
|
2588
2642
|
*
|
|
2589
2643
|
* @returns {Promise<ClientResponse<ApplicationResponse>>}
|
|
2590
2644
|
*/
|
|
@@ -2596,7 +2650,7 @@ class FusionAuthClient {
|
|
|
2596
2650
|
.go();
|
|
2597
2651
|
}
|
|
2598
2652
|
/**
|
|
2599
|
-
* Retrieves all
|
|
2653
|
+
* Retrieves all the user actions that are currently inactive.
|
|
2600
2654
|
*
|
|
2601
2655
|
* @returns {Promise<ClientResponse<UserActionResponse>>}
|
|
2602
2656
|
*/
|
|
@@ -2680,7 +2734,7 @@ class FusionAuthClient {
|
|
|
2680
2734
|
.go();
|
|
2681
2735
|
}
|
|
2682
2736
|
/**
|
|
2683
|
-
* Retrieves all
|
|
2737
|
+
* Retrieves all the keys.
|
|
2684
2738
|
*
|
|
2685
2739
|
* @returns {Promise<ClientResponse<KeyResponse>>}
|
|
2686
2740
|
*/
|
|
@@ -2704,7 +2758,7 @@ class FusionAuthClient {
|
|
|
2704
2758
|
.go();
|
|
2705
2759
|
}
|
|
2706
2760
|
/**
|
|
2707
|
-
* Retrieves all
|
|
2761
|
+
* Retrieves all the lambdas.
|
|
2708
2762
|
*
|
|
2709
2763
|
* @returns {Promise<ClientResponse<LambdaResponse>>}
|
|
2710
2764
|
*/
|
|
@@ -2715,7 +2769,7 @@ class FusionAuthClient {
|
|
|
2715
2769
|
.go();
|
|
2716
2770
|
}
|
|
2717
2771
|
/**
|
|
2718
|
-
* Retrieves all
|
|
2772
|
+
* Retrieves all the lambdas for the provided type.
|
|
2719
2773
|
*
|
|
2720
2774
|
* @param {LambdaType} type The type of the lambda to return.
|
|
2721
2775
|
* @returns {Promise<ClientResponse<LambdaResponse>>}
|
|
@@ -2772,7 +2826,7 @@ class FusionAuthClient {
|
|
|
2772
2826
|
.go();
|
|
2773
2827
|
}
|
|
2774
2828
|
/**
|
|
2775
|
-
* Retrieves all
|
|
2829
|
+
* Retrieves all the message templates.
|
|
2776
2830
|
*
|
|
2777
2831
|
* @returns {Promise<ClientResponse<MessageTemplateResponse>>}
|
|
2778
2832
|
*/
|
|
@@ -2796,7 +2850,7 @@ class FusionAuthClient {
|
|
|
2796
2850
|
.go();
|
|
2797
2851
|
}
|
|
2798
2852
|
/**
|
|
2799
|
-
* Retrieves all
|
|
2853
|
+
* Retrieves all the messengers.
|
|
2800
2854
|
*
|
|
2801
2855
|
* @returns {Promise<ClientResponse<MessengerResponse>>}
|
|
2802
2856
|
*/
|
|
@@ -2879,7 +2933,7 @@ class FusionAuthClient {
|
|
|
2879
2933
|
.go();
|
|
2880
2934
|
}
|
|
2881
2935
|
/**
|
|
2882
|
-
* Retrieves all
|
|
2936
|
+
* Retrieves all the children for the given parent email address.
|
|
2883
2937
|
*
|
|
2884
2938
|
* @param {string} parentEmail The email of the parent.
|
|
2885
2939
|
* @returns {Promise<ClientResponse<PendingResponse>>}
|
|
@@ -3024,7 +3078,7 @@ class FusionAuthClient {
|
|
|
3024
3078
|
.go();
|
|
3025
3079
|
}
|
|
3026
3080
|
/**
|
|
3027
|
-
* Retrieves all
|
|
3081
|
+
* Retrieves all the tenants.
|
|
3028
3082
|
*
|
|
3029
3083
|
* @returns {Promise<ClientResponse<TenantResponse>>}
|
|
3030
3084
|
*/
|
|
@@ -3048,7 +3102,7 @@ class FusionAuthClient {
|
|
|
3048
3102
|
.go();
|
|
3049
3103
|
}
|
|
3050
3104
|
/**
|
|
3051
|
-
* Retrieves all
|
|
3105
|
+
* Retrieves all the themes.
|
|
3052
3106
|
*
|
|
3053
3107
|
* @returns {Promise<ClientResponse<ThemeResponse>>}
|
|
3054
3108
|
*/
|
|
@@ -3136,7 +3190,7 @@ class FusionAuthClient {
|
|
|
3136
3190
|
.go();
|
|
3137
3191
|
}
|
|
3138
3192
|
/**
|
|
3139
|
-
* Retrieves all
|
|
3193
|
+
* Retrieves all the user actions.
|
|
3140
3194
|
*
|
|
3141
3195
|
* @returns {Promise<ClientResponse<UserActionResponse>>}
|
|
3142
3196
|
*/
|
|
@@ -3214,7 +3268,7 @@ class FusionAuthClient {
|
|
|
3214
3268
|
.go();
|
|
3215
3269
|
}
|
|
3216
3270
|
/**
|
|
3217
|
-
* Retrieves all
|
|
3271
|
+
* Retrieves all the comments for the user with the given Id.
|
|
3218
3272
|
*
|
|
3219
3273
|
* @param {UUID} userId The Id of the user.
|
|
3220
3274
|
* @returns {Promise<ClientResponse<UserCommentResponse>>}
|
|
@@ -3240,7 +3294,7 @@ class FusionAuthClient {
|
|
|
3240
3294
|
.go();
|
|
3241
3295
|
}
|
|
3242
3296
|
/**
|
|
3243
|
-
* Retrieves all
|
|
3297
|
+
* Retrieves all the consents for a User.
|
|
3244
3298
|
*
|
|
3245
3299
|
* @param {UUID} userId The User's Id
|
|
3246
3300
|
* @returns {Promise<ClientResponse<UserConsentResponse>>}
|
|
@@ -3614,6 +3668,19 @@ class FusionAuthClient {
|
|
|
3614
3668
|
.withMethod("POST")
|
|
3615
3669
|
.go();
|
|
3616
3670
|
}
|
|
3671
|
+
/**
|
|
3672
|
+
* Searches group members with the specified criteria and pagination.
|
|
3673
|
+
*
|
|
3674
|
+
* @param {GroupMemberSearchRequest} request The search criteria and pagination information.
|
|
3675
|
+
* @returns {Promise<ClientResponse<GroupMemberSearchResponse>>}
|
|
3676
|
+
*/
|
|
3677
|
+
searchGroupMembers(request) {
|
|
3678
|
+
return this.start()
|
|
3679
|
+
.withUri('/api/group/member/search')
|
|
3680
|
+
.withJSONBody(request)
|
|
3681
|
+
.withMethod("POST")
|
|
3682
|
+
.go();
|
|
3683
|
+
}
|
|
3617
3684
|
/**
|
|
3618
3685
|
* Searches the IP Access Control Lists with the specified criteria and pagination.
|
|
3619
3686
|
*
|
|
@@ -4044,6 +4111,19 @@ class FusionAuthClient {
|
|
|
4044
4111
|
.withMethod("PUT")
|
|
4045
4112
|
.go();
|
|
4046
4113
|
}
|
|
4114
|
+
/**
|
|
4115
|
+
* Creates a member in a group.
|
|
4116
|
+
*
|
|
4117
|
+
* @param {MemberRequest} request The request object that contains all the information used to create the group member(s).
|
|
4118
|
+
* @returns {Promise<ClientResponse<MemberResponse>>}
|
|
4119
|
+
*/
|
|
4120
|
+
updateGroupMembers(request) {
|
|
4121
|
+
return this.start()
|
|
4122
|
+
.withUri('/api/group/member')
|
|
4123
|
+
.withJSONBody(request)
|
|
4124
|
+
.withMethod("PUT")
|
|
4125
|
+
.go();
|
|
4126
|
+
}
|
|
4047
4127
|
/**
|
|
4048
4128
|
* Updates the IP Access Control List with the given Id.
|
|
4049
4129
|
*
|
|
@@ -4620,10 +4700,12 @@ var EventType;
|
|
|
4620
4700
|
EventType["UserDeactivate"] = "user.deactivate";
|
|
4621
4701
|
EventType["UserDelete"] = "user.delete";
|
|
4622
4702
|
EventType["UserDeleteComplete"] = "user.delete.complete";
|
|
4623
|
-
EventType["UserLoginIdDuplicateOnCreate"] = "user.loginId.duplicate.create";
|
|
4624
|
-
EventType["UserLoginIdDuplicateOnUpdate"] = "user.loginId.duplicate.update";
|
|
4625
4703
|
EventType["UserEmailUpdate"] = "user.email.update";
|
|
4626
4704
|
EventType["UserEmailVerified"] = "user.email.verified";
|
|
4705
|
+
EventType["UserIdentityProviderLink"] = "user.identity-provider.link";
|
|
4706
|
+
EventType["UserIdentityProviderUnlink"] = "user.identity-provider.unlink";
|
|
4707
|
+
EventType["UserLoginIdDuplicateOnCreate"] = "user.loginId.duplicate.create";
|
|
4708
|
+
EventType["UserLoginIdDuplicateOnUpdate"] = "user.loginId.duplicate.update";
|
|
4627
4709
|
EventType["UserLoginFailed"] = "user.login.failed";
|
|
4628
4710
|
EventType["UserLoginNewDevice"] = "user.login.new-device";
|
|
4629
4711
|
EventType["UserLoginSuccess"] = "user.login.success";
|
|
@@ -4822,6 +4904,14 @@ var KeyUse;
|
|
|
4822
4904
|
KeyUse["SignAndVerify"] = "SignAndVerify";
|
|
4823
4905
|
KeyUse["VerifyOnly"] = "VerifyOnly";
|
|
4824
4906
|
})(KeyUse = exports.KeyUse || (exports.KeyUse = {}));
|
|
4907
|
+
/**
|
|
4908
|
+
* @author Daniel DeGroff
|
|
4909
|
+
*/
|
|
4910
|
+
var LambdaEngineType;
|
|
4911
|
+
(function (LambdaEngineType) {
|
|
4912
|
+
LambdaEngineType["GraalJS"] = "GraalJS";
|
|
4913
|
+
LambdaEngineType["Nashorn"] = "Nashorn";
|
|
4914
|
+
})(LambdaEngineType = exports.LambdaEngineType || (exports.LambdaEngineType = {}));
|
|
4825
4915
|
/**
|
|
4826
4916
|
* The types of lambdas that indicate how they are invoked by FusionAuth.
|
|
4827
4917
|
*
|
|
@@ -4848,6 +4938,10 @@ var LambdaType;
|
|
|
4848
4938
|
LambdaType["TwitchReconcile"] = "TwitchReconcile";
|
|
4849
4939
|
LambdaType["XboxReconcile"] = "XboxReconcile";
|
|
4850
4940
|
LambdaType["ClientCredentialsJWTPopulate"] = "ClientCredentialsJWTPopulate";
|
|
4941
|
+
LambdaType["SCIMServerGroupRequestConverter"] = "SCIMServerGroupRequestConverter";
|
|
4942
|
+
LambdaType["SCIMServerGroupResponseConverter"] = "SCIMServerGroupResponseConverter";
|
|
4943
|
+
LambdaType["SCIMServerUserRequestConverter"] = "SCIMServerUserRequestConverter";
|
|
4944
|
+
LambdaType["SCIMServerUserResponseConverter"] = "SCIMServerUserResponseConverter";
|
|
4851
4945
|
})(LambdaType = exports.LambdaType || (exports.LambdaType = {}));
|
|
4852
4946
|
var LDAPSecurityMethod;
|
|
4853
4947
|
(function (LDAPSecurityMethod) {
|