@fusionauth/typescript-client 1.29.1 → 1.32.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.
@@ -76,7 +76,7 @@ class FusionAuthClient {
76
76
  * Adds a user to an existing family. The family id must be specified.
77
77
  *
78
78
  * @param {UUID} familyId The id of the family.
79
- * @param {FamilyRequest} request The request object that contains all of the information used to determine which user to add to the family.
79
+ * @param {FamilyRequest} request The request object that contains all the information used to determine which user to add to the family.
80
80
  * @returns {Promise<ClientResponse<FamilyResponse>>}
81
81
  */
82
82
  addUserToFamily(familyId, request) {
@@ -136,7 +136,7 @@ class FusionAuthClient {
136
136
  /**
137
137
  * Adds a comment to the user's account.
138
138
  *
139
- * @param {UserCommentRequest} request The request object that contains all of the information used to create the user comment.
139
+ * @param {UserCommentRequest} request The request object that contains all the information used to create the user comment.
140
140
  * @returns {Promise<ClientResponse<void>>}
141
141
  */
142
142
  commentOnUser(request) {
@@ -169,7 +169,7 @@ class FusionAuthClient {
169
169
  * Creates an application. You can optionally specify an Id for the application, if not provided one will be generated.
170
170
  *
171
171
  * @param {UUID} applicationId (Optional) The Id to use for the application. If not provided a secure random UUID will be generated.
172
- * @param {ApplicationRequest} request The request object that contains all of the information used to create the application.
172
+ * @param {ApplicationRequest} request The request object that contains all the information used to create the application.
173
173
  * @returns {Promise<ClientResponse<ApplicationResponse>>}
174
174
  */
175
175
  createApplication(applicationId, request) {
@@ -186,7 +186,7 @@ class FusionAuthClient {
186
186
  *
187
187
  * @param {UUID} applicationId The Id of the application to create the role on.
188
188
  * @param {UUID} roleId (Optional) The Id of the role. If not provided a secure random UUID will be generated.
189
- * @param {ApplicationRequest} request The request object that contains all of the information used to create the application role.
189
+ * @param {ApplicationRequest} request The request object that contains all the information used to create the application role.
190
190
  * @returns {Promise<ClientResponse<ApplicationResponse>>}
191
191
  */
192
192
  createApplicationRole(applicationId, roleId, request) {
@@ -204,7 +204,7 @@ class FusionAuthClient {
204
204
  * make changes to the FusionAuth database. When using the FusionAuth App web interface, any changes are automatically
205
205
  * written to the audit log. However, if you are accessing the API, you must write the audit logs yourself.
206
206
  *
207
- * @param {AuditLogRequest} request The request object that contains all of the information used to create the audit log entry.
207
+ * @param {AuditLogRequest} request The request object that contains all the information used to create the audit log entry.
208
208
  * @returns {Promise<ClientResponse<AuditLogResponse>>}
209
209
  */
210
210
  createAuditLog(request) {
@@ -218,7 +218,7 @@ class FusionAuthClient {
218
218
  * Creates a connector. You can optionally specify an Id for the connector, if not provided one will be generated.
219
219
  *
220
220
  * @param {UUID} connectorId (Optional) The Id for the connector. If not provided a secure random UUID will be generated.
221
- * @param {ConnectorRequest} request The request object that contains all of the information used to create the connector.
221
+ * @param {ConnectorRequest} request The request object that contains all the information used to create the connector.
222
222
  * @returns {Promise<ClientResponse<ConnectorResponse>>}
223
223
  */
224
224
  createConnector(connectorId, request) {
@@ -233,7 +233,7 @@ class FusionAuthClient {
233
233
  * Creates a user consent type. You can optionally specify an Id for the consent type, if not provided one will be generated.
234
234
  *
235
235
  * @param {UUID} consentId (Optional) The Id for the consent. If not provided a secure random UUID will be generated.
236
- * @param {ConsentRequest} request The request object that contains all of the information used to create the consent.
236
+ * @param {ConsentRequest} request The request object that contains all the information used to create the consent.
237
237
  * @returns {Promise<ClientResponse<ConsentResponse>>}
238
238
  */
239
239
  createConsent(consentId, request) {
@@ -248,7 +248,7 @@ class FusionAuthClient {
248
248
  * Creates an email template. You can optionally specify an Id for the template, if not provided one will be generated.
249
249
  *
250
250
  * @param {UUID} emailTemplateId (Optional) The Id for the template. If not provided a secure random UUID will be generated.
251
- * @param {EmailTemplateRequest} request The request object that contains all of the information used to create the email template.
251
+ * @param {EmailTemplateRequest} request The request object that contains all the information used to create the email template.
252
252
  * @returns {Promise<ClientResponse<EmailTemplateResponse>>}
253
253
  */
254
254
  createEmailTemplate(emailTemplateId, request) {
@@ -263,7 +263,7 @@ class FusionAuthClient {
263
263
  * Creates an Entity. You can optionally specify an Id for the Entity. If not provided one will be generated.
264
264
  *
265
265
  * @param {UUID} entityId (Optional) The Id for the Entity. If not provided a secure random UUID will be generated.
266
- * @param {EntityRequest} request The request object that contains all of the information used to create the Entity.
266
+ * @param {EntityRequest} request The request object that contains all the information used to create the Entity.
267
267
  * @returns {Promise<ClientResponse<EntityResponse>>}
268
268
  */
269
269
  createEntity(entityId, request) {
@@ -278,7 +278,7 @@ class FusionAuthClient {
278
278
  * Creates a Entity Type. You can optionally specify an Id for the Entity Type, if not provided one will be generated.
279
279
  *
280
280
  * @param {UUID} entityTypeId (Optional) The Id for the Entity Type. If not provided a secure random UUID will be generated.
281
- * @param {EntityTypeRequest} request The request object that contains all of the information used to create the Entity Type.
281
+ * @param {EntityTypeRequest} request The request object that contains all the information used to create the Entity Type.
282
282
  * @returns {Promise<ClientResponse<EntityTypeResponse>>}
283
283
  */
284
284
  createEntityType(entityTypeId, request) {
@@ -295,7 +295,7 @@ class FusionAuthClient {
295
295
  *
296
296
  * @param {UUID} entityTypeId The Id of the entity type to create the permission on.
297
297
  * @param {UUID} permissionId (Optional) The Id of the permission. If not provided a secure random UUID will be generated.
298
- * @param {EntityTypeRequest} request The request object that contains all of the information used to create the permission.
298
+ * @param {EntityTypeRequest} request The request object that contains all the information used to create the permission.
299
299
  * @returns {Promise<ClientResponse<EntityTypeResponse>>}
300
300
  */
301
301
  createEntityTypePermission(entityTypeId, permissionId, request) {
@@ -313,7 +313,7 @@ class FusionAuthClient {
313
313
  * family, if not provided one will be generated.
314
314
  *
315
315
  * @param {UUID} familyId (Optional) The id for the family. If not provided a secure random UUID will be generated.
316
- * @param {FamilyRequest} request The request object that contains all of the information used to create the family.
316
+ * @param {FamilyRequest} request The request object that contains all the information used to create the family.
317
317
  * @returns {Promise<ClientResponse<FamilyResponse>>}
318
318
  */
319
319
  createFamily(familyId, request) {
@@ -328,7 +328,7 @@ class FusionAuthClient {
328
328
  * Creates a form. You can optionally specify an Id for the form, if not provided one will be generated.
329
329
  *
330
330
  * @param {UUID} formId (Optional) The Id for the form. If not provided a secure random UUID will be generated.
331
- * @param {FormRequest} request The request object that contains all of the information used to create the form.
331
+ * @param {FormRequest} request The request object that contains all the information used to create the form.
332
332
  * @returns {Promise<ClientResponse<FormResponse>>}
333
333
  */
334
334
  createForm(formId, request) {
@@ -343,7 +343,7 @@ class FusionAuthClient {
343
343
  * Creates a form field. You can optionally specify an Id for the form, if not provided one will be generated.
344
344
  *
345
345
  * @param {UUID} fieldId (Optional) The Id for the form field. If not provided a secure random UUID will be generated.
346
- * @param {FormFieldRequest} request The request object that contains all of the information used to create the form field.
346
+ * @param {FormFieldRequest} request The request object that contains all the information used to create the form field.
347
347
  * @returns {Promise<ClientResponse<FormFieldResponse>>}
348
348
  */
349
349
  createFormField(fieldId, request) {
@@ -358,7 +358,7 @@ class FusionAuthClient {
358
358
  * Creates a group. You can optionally specify an Id for the group, if not provided one will be generated.
359
359
  *
360
360
  * @param {UUID} groupId (Optional) The Id for the group. If not provided a secure random UUID will be generated.
361
- * @param {GroupRequest} request The request object that contains all of the information used to create the group.
361
+ * @param {GroupRequest} request The request object that contains all the information used to create the group.
362
362
  * @returns {Promise<ClientResponse<GroupResponse>>}
363
363
  */
364
364
  createGroup(groupId, request) {
@@ -372,7 +372,7 @@ class FusionAuthClient {
372
372
  /**
373
373
  * Creates a member in a group.
374
374
  *
375
- * @param {MemberRequest} request The request object that contains all of the information used to create the group member(s).
375
+ * @param {MemberRequest} request The request object that contains all the information used to create the group member(s).
376
376
  * @returns {Promise<ClientResponse<MemberResponse>>}
377
377
  */
378
378
  createGroupMembers(request) {
@@ -382,11 +382,26 @@ class FusionAuthClient {
382
382
  .withMethod("POST")
383
383
  .go();
384
384
  }
385
+ /**
386
+ * Creates an IP Access Control List. You can optionally specify an Id on this create request, if one is not provided one will be generated.
387
+ *
388
+ * @param {UUID} accessControlListId (Optional) The Id for the IP Access Control List. If not provided a secure random UUID will be generated.
389
+ * @param {IPAccessControlListRequest} request The request object that contains all the information used to create the IP Access Control List.
390
+ * @returns {Promise<ClientResponse<IPAccessControlListResponse>>}
391
+ */
392
+ createIPAccessControlList(accessControlListId, request) {
393
+ return this.start()
394
+ .withUri('/api/ip-acl')
395
+ .withUriSegment(accessControlListId)
396
+ .withJSONBody(request)
397
+ .withMethod("POST")
398
+ .go();
399
+ }
385
400
  /**
386
401
  * Creates an identity provider. You can optionally specify an Id for the identity provider, if not provided one will be generated.
387
402
  *
388
403
  * @param {UUID} identityProviderId (Optional) The Id of the identity provider. If not provided a secure random UUID will be generated.
389
- * @param {IdentityProviderRequest} request The request object that contains all of the information used to create the identity provider.
404
+ * @param {IdentityProviderRequest} request The request object that contains all the information used to create the identity provider.
390
405
  * @returns {Promise<ClientResponse<IdentityProviderResponse>>}
391
406
  */
392
407
  createIdentityProvider(identityProviderId, request) {
@@ -401,7 +416,7 @@ class FusionAuthClient {
401
416
  * Creates a Lambda. You can optionally specify an Id for the lambda, if not provided one will be generated.
402
417
  *
403
418
  * @param {UUID} lambdaId (Optional) The Id for the lambda. If not provided a secure random UUID will be generated.
404
- * @param {LambdaRequest} request The request object that contains all of the information used to create the lambda.
419
+ * @param {LambdaRequest} request The request object that contains all the information used to create the lambda.
405
420
  * @returns {Promise<ClientResponse<LambdaResponse>>}
406
421
  */
407
422
  createLambda(lambdaId, request) {
@@ -416,7 +431,7 @@ class FusionAuthClient {
416
431
  * Creates an message template. You can optionally specify an Id for the template, if not provided one will be generated.
417
432
  *
418
433
  * @param {UUID} messageTemplateId (Optional) The Id for the template. If not provided a secure random UUID will be generated.
419
- * @param {MessageTemplateRequest} request The request object that contains all of the information used to create the message template.
434
+ * @param {MessageTemplateRequest} request The request object that contains all the information used to create the message template.
420
435
  * @returns {Promise<ClientResponse<MessageTemplateResponse>>}
421
436
  */
422
437
  createMessageTemplate(messageTemplateId, request) {
@@ -431,7 +446,7 @@ class FusionAuthClient {
431
446
  * Creates a messenger. You can optionally specify an Id for the messenger, if not provided one will be generated.
432
447
  *
433
448
  * @param {UUID} messengerId (Optional) The Id for the messenger. If not provided a secure random UUID will be generated.
434
- * @param {MessengerRequest} request The request object that contains all of the information used to create the messenger.
449
+ * @param {MessengerRequest} request The request object that contains all the information used to create the messenger.
435
450
  * @returns {Promise<ClientResponse<MessengerResponse>>}
436
451
  */
437
452
  createMessenger(messengerId, request) {
@@ -446,7 +461,7 @@ class FusionAuthClient {
446
461
  * Creates a tenant. You can optionally specify an Id for the tenant, if not provided one will be generated.
447
462
  *
448
463
  * @param {UUID} tenantId (Optional) The Id for the tenant. If not provided a secure random UUID will be generated.
449
- * @param {TenantRequest} request The request object that contains all of the information used to create the tenant.
464
+ * @param {TenantRequest} request The request object that contains all the information used to create the tenant.
450
465
  * @returns {Promise<ClientResponse<TenantResponse>>}
451
466
  */
452
467
  createTenant(tenantId, request) {
@@ -461,7 +476,7 @@ class FusionAuthClient {
461
476
  * Creates a Theme. You can optionally specify an Id for the theme, if not provided one will be generated.
462
477
  *
463
478
  * @param {UUID} themeId (Optional) The Id for the theme. If not provided a secure random UUID will be generated.
464
- * @param {ThemeRequest} request The request object that contains all of the information used to create the theme.
479
+ * @param {ThemeRequest} request The request object that contains all the information used to create the theme.
465
480
  * @returns {Promise<ClientResponse<ThemeResponse>>}
466
481
  */
467
482
  createTheme(themeId, request) {
@@ -476,7 +491,7 @@ class FusionAuthClient {
476
491
  * Creates a user. You can optionally specify an Id for the user, if not provided one will be generated.
477
492
  *
478
493
  * @param {UUID} userId (Optional) The Id for the user. If not provided a secure random UUID will be generated.
479
- * @param {UserRequest} request The request object that contains all of the information used to create the user.
494
+ * @param {UserRequest} request The request object that contains all the information used to create the user.
480
495
  * @returns {Promise<ClientResponse<UserResponse>>}
481
496
  */
482
497
  createUser(userId, request) {
@@ -492,7 +507,7 @@ class FusionAuthClient {
492
507
  * that the user action can be applied to any user.
493
508
  *
494
509
  * @param {UUID} userActionId (Optional) The Id for the user action. If not provided a secure random UUID will be generated.
495
- * @param {UserActionRequest} request The request object that contains all of the information used to create the user action.
510
+ * @param {UserActionRequest} request The request object that contains all the information used to create the user action.
496
511
  * @returns {Promise<ClientResponse<UserActionResponse>>}
497
512
  */
498
513
  createUserAction(userActionId, request) {
@@ -508,7 +523,7 @@ class FusionAuthClient {
508
523
  * successfully. Anytime after that the user action reason can be used.
509
524
  *
510
525
  * @param {UUID} userActionReasonId (Optional) The Id for the user action reason. If not provided a secure random UUID will be generated.
511
- * @param {UserActionReasonRequest} request The request object that contains all of the information used to create the user action reason.
526
+ * @param {UserActionReasonRequest} request The request object that contains all the information used to create the user action reason.
512
527
  * @returns {Promise<ClientResponse<UserActionReasonResponse>>}
513
528
  */
514
529
  createUserActionReason(userActionReasonId, request) {
@@ -537,7 +552,7 @@ class FusionAuthClient {
537
552
  /**
538
553
  * Link an external user from a 3rd party identity provider to a FusionAuth user.
539
554
  *
540
- * @param {IdentityProviderLinkRequest} request The request object that contains all of the information used to link the FusionAuth user.
555
+ * @param {IdentityProviderLinkRequest} request The request object that contains all the information used to link the FusionAuth user.
541
556
  * @returns {Promise<ClientResponse<IdentityProviderLinkResponse>>}
542
557
  */
543
558
  createUserLink(request) {
@@ -551,7 +566,7 @@ class FusionAuthClient {
551
566
  * Creates a webhook. You can optionally specify an Id for the webhook, if not provided one will be generated.
552
567
  *
553
568
  * @param {UUID} webhookId (Optional) The Id for the webhook. If not provided a secure random UUID will be generated.
554
- * @param {WebhookRequest} request The request object that contains all of the information used to create the webhook.
569
+ * @param {WebhookRequest} request The request object that contains all the information used to create the webhook.
555
570
  * @returns {Promise<ClientResponse<WebhookResponse>>}
556
571
  */
557
572
  createWebhook(webhookId, request) {
@@ -843,6 +858,19 @@ class FusionAuthClient {
843
858
  .withMethod("DELETE")
844
859
  .go();
845
860
  }
861
+ /**
862
+ * Deletes the IP Access Control List for the given Id.
863
+ *
864
+ * @param {UUID} ipAccessControlListId The Id of the IP Access Control List to delete.
865
+ * @returns {Promise<ClientResponse<void>>}
866
+ */
867
+ deleteIPAccessControlList(ipAccessControlListId) {
868
+ return this.start()
869
+ .withUri('/api/ip-acl')
870
+ .withUriSegment(ipAccessControlListId)
871
+ .withMethod("DELETE")
872
+ .go();
873
+ }
846
874
  /**
847
875
  * Deletes the identity provider for the given Id.
848
876
  *
@@ -924,7 +952,25 @@ class FusionAuthClient {
924
952
  .go();
925
953
  }
926
954
  /**
927
- * Deletes the tenant for the given Id.
955
+ * Deletes the user registration for the given user and application along with the given JSON body that contains the event information.
956
+ *
957
+ * @param {UUID} userId The Id of the user whose registration is being deleted.
958
+ * @param {UUID} applicationId The Id of the application to remove the registration for.
959
+ * @param {RegistrationDeleteRequest} request The request body that contains the event information.
960
+ * @returns {Promise<ClientResponse<void>>}
961
+ */
962
+ deleteRegistrationWithRequest(userId, applicationId, request) {
963
+ return this.start()
964
+ .withUri('/api/user/registration')
965
+ .withUriSegment(userId)
966
+ .withUriSegment(applicationId)
967
+ .withJSONBody(request)
968
+ .withMethod("DELETE")
969
+ .go();
970
+ }
971
+ /**
972
+ * Deletes the tenant based on the given Id on the URL. This permanently deletes all information, metrics, reports and data associated
973
+ * with the tenant and everything under the tenant (applications, users, etc).
928
974
  *
929
975
  * @param {UUID} tenantId The Id of the tenant to delete.
930
976
  * @returns {Promise<ClientResponse<void>>}
@@ -951,6 +997,22 @@ class FusionAuthClient {
951
997
  .withMethod("DELETE")
952
998
  .go();
953
999
  }
1000
+ /**
1001
+ * Deletes the tenant based on the given request (sent to the API as JSON). This permanently deletes all information, metrics, reports and data associated
1002
+ * with the tenant and everything under the tenant (applications, users, etc).
1003
+ *
1004
+ * @param {UUID} tenantId The Id of the tenant to delete.
1005
+ * @param {TenantDeleteRequest} request The request object that contains all the information used to delete the user.
1006
+ * @returns {Promise<ClientResponse<void>>}
1007
+ */
1008
+ deleteTenantWithRequest(tenantId, request) {
1009
+ return this.start()
1010
+ .withUri('/api/tenant')
1011
+ .withUriSegment(tenantId)
1012
+ .withJSONBody(request)
1013
+ .withMethod("DELETE")
1014
+ .go();
1015
+ }
954
1016
  /**
955
1017
  * Deletes the theme for the given Id.
956
1018
  *
@@ -1024,6 +1086,22 @@ class FusionAuthClient {
1024
1086
  .withMethod("DELETE")
1025
1087
  .go();
1026
1088
  }
1089
+ /**
1090
+ * Deletes the user based on the given request (sent to the API as JSON). This permanently deletes all information, metrics, reports and data associated
1091
+ * with the user.
1092
+ *
1093
+ * @param {UUID} userId The Id of the user to delete (required).
1094
+ * @param {UserDeleteSingleRequest} request The request object that contains all the information used to delete the user.
1095
+ * @returns {Promise<ClientResponse<void>>}
1096
+ */
1097
+ deleteUserWithRequest(userId, request) {
1098
+ return this.start()
1099
+ .withUri('/api/user')
1100
+ .withUriSegment(userId)
1101
+ .withJSONBody(request)
1102
+ .withMethod("DELETE")
1103
+ .go();
1104
+ }
1027
1105
  /**
1028
1106
  * Deletes the users with the given ids, or users matching the provided JSON query or queryString.
1029
1107
  * The order of preference is ids, query and then queryString, it is recommended to only provide one of the three for the request.
@@ -1084,12 +1162,27 @@ class FusionAuthClient {
1084
1162
  disableTwoFactor(userId, methodId, code) {
1085
1163
  return this.start()
1086
1164
  .withUri('/api/user/two-factor')
1087
- .withParameter('userId', userId)
1165
+ .withUriSegment(userId)
1088
1166
  .withParameter('methodId', methodId)
1089
1167
  .withParameter('code', code)
1090
1168
  .withMethod("DELETE")
1091
1169
  .go();
1092
1170
  }
1171
+ /**
1172
+ * Disable Two Factor authentication for a user using a JSON body rather than URL parameters.
1173
+ *
1174
+ * @param {UUID} userId The Id of the User for which you're disabling Two Factor authentication.
1175
+ * @param {TwoFactorDisableRequest} request The request information that contains the code and methodId along with any event information.
1176
+ * @returns {Promise<ClientResponse<void>>}
1177
+ */
1178
+ disableTwoFactorWithRequest(userId, request) {
1179
+ return this.start()
1180
+ .withUri('/api/user/two-factor')
1181
+ .withUriSegment(userId)
1182
+ .withJSONBody(request)
1183
+ .withMethod("DELETE")
1184
+ .go();
1185
+ }
1093
1186
  /**
1094
1187
  * Enable Two Factor authentication for a user.
1095
1188
  *
@@ -1250,7 +1343,7 @@ class FusionAuthClient {
1250
1343
  * Generate a new RSA or EC key pair or an HMAC secret.
1251
1344
  *
1252
1345
  * @param {UUID} keyId (Optional) The Id for the key. If not provided a secure random UUID will be generated.
1253
- * @param {KeyRequest} request The request object that contains all of the information used to create the key.
1346
+ * @param {KeyRequest} request The request object that contains all the information used to create the key.
1254
1347
  * @returns {Promise<ClientResponse<KeyResponse>>}
1255
1348
  */
1256
1349
  generateKey(keyId, request) {
@@ -1339,7 +1432,7 @@ class FusionAuthClient {
1339
1432
  * Import an existing RSA or EC key pair or an HMAC secret.
1340
1433
  *
1341
1434
  * @param {UUID} keyId (Optional) The Id for the key. If not provided a secure random UUID will be generated.
1342
- * @param {KeyRequest} request The request object that contains all of the information used to create the key.
1435
+ * @param {KeyRequest} request The request object that contains all the information used to create the key.
1343
1436
  * @returns {Promise<ClientResponse<KeyResponse>>}
1344
1437
  */
1345
1438
  importKey(keyId, request) {
@@ -1486,6 +1579,20 @@ class FusionAuthClient {
1486
1579
  .withMethod("POST")
1487
1580
  .go();
1488
1581
  }
1582
+ /**
1583
+ * The Logout API is intended to be used to remove the refresh token and access token cookies if they exist on the
1584
+ * client and revoke the refresh token stored. This API takes the refresh token in the JSON body.
1585
+ *
1586
+ * @param {LogoutRequest} request The request object that contains all the information used to logout the user.
1587
+ * @returns {Promise<ClientResponse<void>>}
1588
+ */
1589
+ logoutWithRequest(request) {
1590
+ return this.startAnonymous()
1591
+ .withUri('/api/logout')
1592
+ .withJSONBody(request)
1593
+ .withMethod("POST")
1594
+ .go();
1595
+ }
1489
1596
  /**
1490
1597
  * Retrieves the identity provider for the given domain. A 200 response code indicates the domain is managed
1491
1598
  * by a registered identity provider. A 404 indicates the domain is not managed.
@@ -2409,6 +2516,19 @@ class FusionAuthClient {
2409
2516
  .withMethod("GET")
2410
2517
  .go();
2411
2518
  }
2519
+ /**
2520
+ * Retrieves the IP Access Control List with the given Id.
2521
+ *
2522
+ * @param {UUID} ipAccessControlListId The Id of the IP Access Control List.
2523
+ * @returns {Promise<ClientResponse<IPAccessControlListResponse>>}
2524
+ */
2525
+ retrieveIPAccessControlList(ipAccessControlListId) {
2526
+ return this.start()
2527
+ .withUri('/api/ip-acl')
2528
+ .withUriSegment(ipAccessControlListId)
2529
+ .withMethod("GET")
2530
+ .go();
2531
+ }
2412
2532
  /**
2413
2533
  * Retrieves the identity provider for the given id or all of the identity providers if the id is null.
2414
2534
  *
@@ -2771,6 +2891,17 @@ class FusionAuthClient {
2771
2891
  .withMethod("GET")
2772
2892
  .go();
2773
2893
  }
2894
+ /**
2895
+ * Retrieves the FusionAuth Reactor metrics.
2896
+ *
2897
+ * @returns {Promise<ClientResponse<ReactorMetricsResponse>>}
2898
+ */
2899
+ retrieveReactorMetrics() {
2900
+ return this.start()
2901
+ .withUri('/api/reactor/metrics')
2902
+ .withMethod("GET")
2903
+ .go();
2904
+ }
2774
2905
  /**
2775
2906
  * Retrieves the FusionAuth Reactor status.
2776
2907
  *
@@ -3378,6 +3509,20 @@ class FusionAuthClient {
3378
3509
  .withMethod("DELETE")
3379
3510
  .go();
3380
3511
  }
3512
+ /**
3513
+ * Revokes refresh tokens using the information in the JSON body. The handling for this method is the same as the revokeRefreshToken method
3514
+ * and is based on the information you provide in the RefreshDeleteRequest object. See that method for additional information.
3515
+ *
3516
+ * @param {RefreshTokenRevokeRequest} request The request information used to revoke the refresh tokens.
3517
+ * @returns {Promise<ClientResponse<void>>}
3518
+ */
3519
+ revokeRefreshTokensWithRequest(request) {
3520
+ return this.start()
3521
+ .withUri('/api/jwt/refresh')
3522
+ .withJSONBody(request)
3523
+ .withMethod("DELETE")
3524
+ .go();
3525
+ }
3381
3526
  /**
3382
3527
  * Revokes a single User consent by Id.
3383
3528
  *
@@ -3469,6 +3614,19 @@ class FusionAuthClient {
3469
3614
  .withMethod("POST")
3470
3615
  .go();
3471
3616
  }
3617
+ /**
3618
+ * Searches the IP Access Control Lists with the specified criteria and pagination.
3619
+ *
3620
+ * @param {IPAccessControlListSearchRequest} request The search criteria and pagination information.
3621
+ * @returns {Promise<ClientResponse<IPAccessControlListSearchResponse>>}
3622
+ */
3623
+ searchIPAccessControlLists(request) {
3624
+ return this.start()
3625
+ .withUri('/api/ip-acl/search')
3626
+ .withJSONBody(request)
3627
+ .withMethod("POST")
3628
+ .go();
3629
+ }
3472
3630
  /**
3473
3631
  * Searches the login records with the specified criteria and pagination.
3474
3632
  *
@@ -3585,7 +3743,7 @@ class FusionAuthClient {
3585
3743
  /**
3586
3744
  * Send a Two Factor authentication code to assist in setting up Two Factor authentication or disabling.
3587
3745
  *
3588
- * @param {TwoFactorSendRequest} request The request object that contains all of the information used to send the code.
3746
+ * @param {TwoFactorSendRequest} request The request object that contains all the information used to send the code.
3589
3747
  * @returns {Promise<ClientResponse<void>>}
3590
3748
  *
3591
3749
  * @deprecated This method has been renamed to sendTwoFactorCodeForEnableDisable, use that method instead.
@@ -3600,7 +3758,7 @@ class FusionAuthClient {
3600
3758
  /**
3601
3759
  * Send a Two Factor authentication code to assist in setting up Two Factor authentication or disabling.
3602
3760
  *
3603
- * @param {TwoFactorSendRequest} request The request object that contains all of the information used to send the code.
3761
+ * @param {TwoFactorSendRequest} request The request object that contains all the information used to send the code.
3604
3762
  * @returns {Promise<ClientResponse<void>>}
3605
3763
  */
3606
3764
  sendTwoFactorCodeForEnableDisable(request) {
@@ -3704,7 +3862,7 @@ class FusionAuthClient {
3704
3862
  * Updates an API key by given id
3705
3863
  *
3706
3864
  * @param {UUID} apiKeyId The Id of the API key to update.
3707
- * @param {APIKeyRequest} request The request object that contains all of the information used to create the API Key.
3865
+ * @param {APIKeyRequest} request The request object that contains all the information used to create the API Key.
3708
3866
  * @returns {Promise<ClientResponse<APIKeyResponse>>}
3709
3867
  */
3710
3868
  updateAPIKey(apiKeyId, request) {
@@ -3886,6 +4044,21 @@ class FusionAuthClient {
3886
4044
  .withMethod("PUT")
3887
4045
  .go();
3888
4046
  }
4047
+ /**
4048
+ * Updates the IP Access Control List with the given Id.
4049
+ *
4050
+ * @param {UUID} accessControlListId The Id of the IP Access Control List to update.
4051
+ * @param {IPAccessControlListRequest} request The request that contains all of the new IP Access Control List information.
4052
+ * @returns {Promise<ClientResponse<IPAccessControlListResponse>>}
4053
+ */
4054
+ updateIPAccessControlList(accessControlListId, request) {
4055
+ return this.start()
4056
+ .withUri('/api/ip-acl')
4057
+ .withUriSegment(accessControlListId)
4058
+ .withJSONBody(request)
4059
+ .withMethod("PUT")
4060
+ .go();
4061
+ }
3889
4062
  /**
3890
4063
  * Updates the identity provider with the given Id.
3891
4064
  *
@@ -4111,7 +4284,7 @@ class FusionAuthClient {
4111
4284
  * Creates or updates an Entity Grant. This is when a User/Entity is granted permissions to an Entity.
4112
4285
  *
4113
4286
  * @param {UUID} entityId The Id of the Entity that the User/Entity is being granted access to.
4114
- * @param {EntityGrantRequest} request The request object that contains all of the information used to create the Entity Grant.
4287
+ * @param {EntityGrantRequest} request The request object that contains all the information used to create the Entity Grant.
4115
4288
  * @returns {Promise<ClientResponse<void>>}
4116
4289
  */
4117
4290
  upsertEntityGrant(entityId, request) {
@@ -4155,6 +4328,27 @@ class FusionAuthClient {
4155
4328
  .withMethod("GET")
4156
4329
  .go();
4157
4330
  }
4331
+ /**
4332
+ * It's a JWT vending machine!
4333
+ *
4334
+ * Issue a new access token (JWT) with the provided claims in the request. This JWT is not scoped to a tenant or user, it is a free form
4335
+ * token that will contain what claims you provide.
4336
+ * <p>
4337
+ * The iat, exp and jti claims will be added by FusionAuth, all other claims must be provided by the caller.
4338
+ *
4339
+ * If a TTL is not provided in the request, the TTL will be retrieved from the default Tenant or the Tenant specified on the request either
4340
+ * by way of the X-FusionAuth-TenantId request header, or a tenant scoped API key.
4341
+ *
4342
+ * @param {JWTVendRequest} request The request that contains all of the claims for this JWT.
4343
+ * @returns {Promise<ClientResponse<JWTVendResponse>>}
4344
+ */
4345
+ vendJWT(request) {
4346
+ return this.start()
4347
+ .withUri('/api/jwt/vend')
4348
+ .withJSONBody(request)
4349
+ .withMethod("POST")
4350
+ .go();
4351
+ }
4158
4352
  /**
4159
4353
  * Confirms a email verification. The Id given is usually from an email sent to the user.
4160
4354
  *
@@ -4267,6 +4461,13 @@ var Algorithm;
4267
4461
  Algorithm["RS512"] = "RS512";
4268
4462
  Algorithm["none"] = "none";
4269
4463
  })(Algorithm = exports.Algorithm || (exports.Algorithm = {}));
4464
+ /**
4465
+ * @author Brett Pontarelli
4466
+ */
4467
+ var AuthenticationThreats;
4468
+ (function (AuthenticationThreats) {
4469
+ AuthenticationThreats["ImpossibleTravel"] = "ImpossibleTravel";
4470
+ })(AuthenticationThreats = exports.AuthenticationThreats || (exports.AuthenticationThreats = {}));
4270
4471
  var BreachAction;
4271
4472
  (function (BreachAction) {
4272
4473
  BreachAction["Off"] = "Off";
@@ -4303,6 +4504,16 @@ var CanonicalizationMethod;
4303
4504
  CanonicalizationMethod["inclusive"] = "inclusive";
4304
4505
  CanonicalizationMethod["inclusive_with_comments"] = "inclusive_with_comments";
4305
4506
  })(CanonicalizationMethod = exports.CanonicalizationMethod || (exports.CanonicalizationMethod = {}));
4507
+ /**
4508
+ * @author Brett Pontarelli
4509
+ */
4510
+ var CaptchaMethod;
4511
+ (function (CaptchaMethod) {
4512
+ CaptchaMethod["GoogleRecaptchaV2"] = "GoogleRecaptchaV2";
4513
+ CaptchaMethod["GoogleRecaptchaV3"] = "GoogleRecaptchaV3";
4514
+ CaptchaMethod["HCaptcha"] = "HCaptcha";
4515
+ CaptchaMethod["HCaptchaEnterprise"] = "HCaptchaEnterprise";
4516
+ })(CaptchaMethod = exports.CaptchaMethod || (exports.CaptchaMethod = {}));
4306
4517
  /**
4307
4518
  * @author Trevor Smith
4308
4519
  */
@@ -4396,24 +4607,44 @@ var EventLogType;
4396
4607
  */
4397
4608
  var EventType;
4398
4609
  (function (EventType) {
4399
- EventType["UserDelete"] = "user.delete";
4400
- EventType["UserCreate"] = "user.create";
4401
- EventType["UserUpdate"] = "user.update";
4402
- EventType["UserDeactivate"] = "user.deactivate";
4403
- EventType["UserBulkCreate"] = "user.bulk.create";
4404
- EventType["UserReactivate"] = "user.reactivate";
4405
- EventType["UserAction"] = "user.action";
4610
+ EventType["JWTPublicKeyUpdate"] = "jwt.public-key.update";
4406
4611
  EventType["JWTRefreshTokenRevoke"] = "jwt.refresh-token.revoke";
4407
4612
  EventType["JWTRefresh"] = "jwt.refresh";
4408
- EventType["JWTPublicKeyUpdate"] = "jwt.public-key.update";
4409
- EventType["UserLoginSuccess"] = "user.login.success";
4613
+ EventType["AuditLogCreate"] = "audit-log.create";
4614
+ EventType["EventLogCreate"] = "event-log.create";
4615
+ EventType["KickstartSuccess"] = "kickstart.success";
4616
+ EventType["UserAction"] = "user.action";
4617
+ EventType["UserBulkCreate"] = "user.bulk.create";
4618
+ EventType["UserCreate"] = "user.create";
4619
+ EventType["UserCreateComplete"] = "user.create.complete";
4620
+ EventType["UserDeactivate"] = "user.deactivate";
4621
+ EventType["UserDelete"] = "user.delete";
4622
+ EventType["UserDeleteComplete"] = "user.delete.complete";
4623
+ EventType["UserLoginIdDuplicateOnCreate"] = "user.loginId.duplicate.create";
4624
+ EventType["UserLoginIdDuplicateOnUpdate"] = "user.loginId.duplicate.update";
4625
+ EventType["UserEmailUpdate"] = "user.email.update";
4626
+ EventType["UserEmailVerified"] = "user.email.verified";
4410
4627
  EventType["UserLoginFailed"] = "user.login.failed";
4628
+ EventType["UserLoginNewDevice"] = "user.login.new-device";
4629
+ EventType["UserLoginSuccess"] = "user.login.success";
4630
+ EventType["UserLoginSuspicious"] = "user.login.suspicious";
4631
+ EventType["UserPasswordBreach"] = "user.password.breach";
4632
+ EventType["UserPasswordResetSend"] = "user.password.reset.send";
4633
+ EventType["UserPasswordResetStart"] = "user.password.reset.start";
4634
+ EventType["UserPasswordResetSuccess"] = "user.password.reset.success";
4635
+ EventType["UserPasswordUpdate"] = "user.password.update";
4636
+ EventType["UserReactivate"] = "user.reactivate";
4411
4637
  EventType["UserRegistrationCreate"] = "user.registration.create";
4412
- EventType["UserRegistrationUpdate"] = "user.registration.update";
4638
+ EventType["UserRegistrationCreateComplete"] = "user.registration.create.complete";
4413
4639
  EventType["UserRegistrationDelete"] = "user.registration.delete";
4640
+ EventType["UserRegistrationDeleteComplete"] = "user.registration.delete.complete";
4641
+ EventType["UserRegistrationUpdate"] = "user.registration.update";
4642
+ EventType["UserRegistrationUpdateComplete"] = "user.registration.update.complete";
4414
4643
  EventType["UserRegistrationVerified"] = "user.registration.verified";
4415
- EventType["UserEmailVerified"] = "user.email.verified";
4416
- EventType["UserPasswordBreach"] = "user.password.breach";
4644
+ EventType["UserTwoFactorMethodAdd"] = "user.two-factor.method.add";
4645
+ EventType["UserTwoFactorMethodRemove"] = "user.two-factor.method.remove";
4646
+ EventType["UserUpdate"] = "user.update";
4647
+ EventType["UserUpdateComplete"] = "user.update.complete";
4417
4648
  EventType["Test"] = "test";
4418
4649
  })(EventType = exports.EventType || (exports.EventType = {}));
4419
4650
  /**
@@ -4554,6 +4785,14 @@ var IdentityProviderType;
4554
4785
  IdentityProviderType["Twitter"] = "Twitter";
4555
4786
  IdentityProviderType["Xbox"] = "Xbox";
4556
4787
  })(IdentityProviderType = exports.IdentityProviderType || (exports.IdentityProviderType = {}));
4788
+ /**
4789
+ * @author Brett Guy
4790
+ */
4791
+ var IPAccessControlEntryAction;
4792
+ (function (IPAccessControlEntryAction) {
4793
+ IPAccessControlEntryAction["Allow"] = "Allow";
4794
+ IPAccessControlEntryAction["Block"] = "Block";
4795
+ })(IPAccessControlEntryAction = exports.IPAccessControlEntryAction || (exports.IPAccessControlEntryAction = {}));
4557
4796
  var KeyAlgorithm;
4558
4797
  (function (KeyAlgorithm) {
4559
4798
  KeyAlgorithm["ES256"] = "ES256";
@@ -4738,6 +4977,18 @@ var ProofKeyForCodeExchangePolicy;
4738
4977
  ProofKeyForCodeExchangePolicy["NotRequired"] = "NotRequired";
4739
4978
  ProofKeyForCodeExchangePolicy["NotRequiredWhenUsingClientAuthentication"] = "NotRequiredWhenUsingClientAuthentication";
4740
4979
  })(ProofKeyForCodeExchangePolicy = exports.ProofKeyForCodeExchangePolicy || (exports.ProofKeyForCodeExchangePolicy = {}));
4980
+ /**
4981
+ * @author Daniel DeGroff
4982
+ */
4983
+ var RateLimitedRequestType;
4984
+ (function (RateLimitedRequestType) {
4985
+ RateLimitedRequestType["FailedLogin"] = "FailedLogin";
4986
+ RateLimitedRequestType["ForgotPassword"] = "ForgotPassword";
4987
+ RateLimitedRequestType["SendEmailVerification"] = "SendEmailVerification";
4988
+ RateLimitedRequestType["SendPasswordless"] = "SendPasswordless";
4989
+ RateLimitedRequestType["SendRegistrationVerification"] = "SendRegistrationVerification";
4990
+ RateLimitedRequestType["SendTwoFactor"] = "SendTwoFactor";
4991
+ })(RateLimitedRequestType = exports.RateLimitedRequestType || (exports.RateLimitedRequestType = {}));
4741
4992
  /**
4742
4993
  * @author Brian Pontarelli
4743
4994
  */
@@ -4746,6 +4997,7 @@ var ReactorFeatureStatus;
4746
4997
  ReactorFeatureStatus["ACTIVE"] = "ACTIVE";
4747
4998
  ReactorFeatureStatus["DISCONNECTED"] = "DISCONNECTED";
4748
4999
  ReactorFeatureStatus["PENDING"] = "PENDING";
5000
+ ReactorFeatureStatus["DISABLED"] = "DISABLED";
4749
5001
  ReactorFeatureStatus["UNKNOWN"] = "UNKNOWN";
4750
5002
  })(ReactorFeatureStatus = exports.ReactorFeatureStatus || (exports.ReactorFeatureStatus = {}));
4751
5003
  /**