fusionauth_client 1.23.0 → 1.27.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 901106d6e42c1e5947921a497721383bdde3c3e30bd8bb32c4a91d3eadb10bb0
4
- data.tar.gz: 9bc0db80a01b4a087fe8e59e404cd0db340264468ffea2232e5bea3db93f215c
3
+ metadata.gz: f26b3196d0f70ea66c579837b5cea413e1930955d274e4a1fbe05649fa91bf72
4
+ data.tar.gz: 84a46f0b0fd1d29317248331849b130d1ca1c2ddaf06cc8f5fc1b269739d88a5
5
5
  SHA512:
6
- metadata.gz: f1624445dc5a4e337215773eb1e41da2e6595b6e0919ca193bf60b064c4ac2e3eff874ce8c671871a18288ea8b94b8fb42f416e1473a871281fa28091dafda22
7
- data.tar.gz: ab28ab63292f91635e0ed36411d7993358eb9196a21cc509868f58e2eac7644b38825c7a06a7f6dfb9c4c3074b4cf6ddc9379b128701051bad8cb9d82859a003
6
+ metadata.gz: ec45895afd74ba5353c8473a56ce5f6722eb2f8afa8e70bc6504e78f200569749f063c4bef9f30457b8605be003f8d046d053eab1e0475556d3a58737d8d48e2
7
+ data.tar.gz: 404071ebf5121e3675dbe748261d983dd4b448bc105c7632994ba5f6861638f6656ffdd7b0f5914fcd53f9e7bf691285c2bad4b4175d1922f082e87842b881a3
data/.gitignore CHANGED
@@ -1,6 +1,5 @@
1
1
  /.bundle/
2
2
  /.yardoc
3
- /Gemfile.lock
4
3
  /_yardoc/
5
4
  /coverage/
6
5
  /doc/
data/Gemfile.lock ADDED
@@ -0,0 +1,27 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ fusionauth_client (1.27.1)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ minitest (5.8.3)
10
+ rake (12.3.3)
11
+
12
+ PLATFORMS
13
+ ruby
14
+ x86_64-darwin-19
15
+ x86_64-darwin-20
16
+ x86_64-linux
17
+
18
+ DEPENDENCIES
19
+ fusionauth_client!
20
+ minitest (= 5.8.3)
21
+ rake (= 12.3.3)
22
+
23
+ RUBY VERSION
24
+ ruby 2.5.1p57
25
+
26
+ BUNDLED WITH
27
+ 2.2.5
data/README.md CHANGED
@@ -59,12 +59,19 @@ response = client.login({
59
59
  user = response.success.response.user
60
60
  ```
61
61
 
62
- ## Contributing
62
+ ## Questions and support
63
+
64
+ If you have a question or support issue regarding this client library, we'd love to hear from you.
65
+
66
+ If you have a paid edition with support included, please [open a ticket in your account portal](https://account.fusionauth.io/account/support/). Learn more about [paid editions here](https://fusionauth.io/pricing/).
63
67
 
64
- Bug reports and pull requests are welcome on GitHub at https://github.com/FusionAuth/fusionauth-ruby-client. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
68
+ Otherwise, please [post your question in the community forum](https://fusionauth.io/community/forum/).
69
+
70
+ ## Contributing
65
71
 
72
+ Bug reports and pull requests are welcome on GitHub at https://github.com/FusionAuth/fusionauth-ruby-client.
66
73
 
67
74
  ## License
68
75
 
69
- The gem is available as open source under the terms of the [Apache v2.0 License](https://opensource.org/licenses/Apache-2.0).
76
+ This code is available as open source under the terms of the [Apache v2.0 License](https://opensource.org/licenses/Apache-2.0).
70
77
 
data/build.savant CHANGED
@@ -16,7 +16,7 @@
16
16
  savantVersion = "1.0.0"
17
17
 
18
18
  pubVersion = ""
19
- project(group: "io.fusionauth", name: "fusionauth-ruby-client", version: "1.23.0", licenses: ["ApacheV2_0"]) {
19
+ project(group: "io.fusionauth", name: "fusionauth-ruby-client", version: "1.27.1", licenses: ["ApacheV2_0"]) {
20
20
  workflow {
21
21
  standard()
22
22
  }
@@ -8,8 +8,36 @@
8
8
  </content>
9
9
  <orderEntry type="jdk" jdkName="rbenv: 2.5.1" jdkType="RUBY_SDK" />
10
10
  <orderEntry type="sourceFolder" forTests="false" />
11
- <orderEntry type="library" scope="PROVIDED" name="bundler (v2.1.4, rbenv: 2.5.1) [gem]" level="application" />
11
+ <orderEntry type="library" scope="PROVIDED" name="bundler (v2.2.5, rbenv: 2.5.1) [gem]" level="application" />
12
12
  <orderEntry type="library" scope="PROVIDED" name="minitest (v5.8.3, rbenv: 2.5.1) [gem]" level="application" />
13
13
  <orderEntry type="library" scope="PROVIDED" name="rake (v12.3.3, rbenv: 2.5.1) [gem]" level="application" />
14
14
  </component>
15
+ <component name="RakeTasksCache">
16
+ <option name="myRootTask">
17
+ <RakeTaskImpl id="rake">
18
+ <subtasks>
19
+ <RakeTaskImpl description="Build fusionauth_client-1.26.0.gem into the pkg directory" fullCommand="build" id="build" />
20
+ <RakeTaskImpl description="Remove any temporary products" fullCommand="clean" id="clean" />
21
+ <RakeTaskImpl description="Remove any generated files" fullCommand="clobber" id="clobber" />
22
+ <RakeTaskImpl description="Build and install fusionauth_client-1.26.0.gem into system gems" fullCommand="install" id="install" />
23
+ <RakeTaskImpl id="install">
24
+ <subtasks>
25
+ <RakeTaskImpl description="Build and install fusionauth_client-1.26.0.gem into system gems without network access" fullCommand="install:local" id="local" />
26
+ </subtasks>
27
+ </RakeTaskImpl>
28
+ <RakeTaskImpl description="Create tag v1.26.0 and build and push fusionauth_client-1.26.0.gem to https://rubygems.org" fullCommand="release[remote]" id="release[remote]" />
29
+ <RakeTaskImpl description="Run tests" fullCommand="test" id="test" />
30
+ <RakeTaskImpl description="" fullCommand="default" id="default" />
31
+ <RakeTaskImpl description="" fullCommand="release" id="release" />
32
+ <RakeTaskImpl id="release">
33
+ <subtasks>
34
+ <RakeTaskImpl description="" fullCommand="release:guard_clean" id="guard_clean" />
35
+ <RakeTaskImpl description="" fullCommand="release:rubygem_push" id="rubygem_push" />
36
+ <RakeTaskImpl description="" fullCommand="release:source_control_push" id="source_control_push" />
37
+ </subtasks>
38
+ </RakeTaskImpl>
39
+ </subtasks>
40
+ </RakeTaskImpl>
41
+ </option>
42
+ </component>
15
43
  </module>
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = 'fusionauth_client'
7
- spec.version = '1.23.0'
7
+ spec.version = '1.27.1'
8
8
  spec.authors = ['Brian Pontarelli', 'Daniel DeGroff']
9
9
  spec.email = %w(brian@fusionauth.io daniel@fusionauth.io)
10
10
 
@@ -55,6 +55,18 @@ module FusionAuth
55
55
  .go()
56
56
  end
57
57
 
58
+ #
59
+ # Activates the FusionAuth Reactor using a license id and optionally a license text (for air-gapped deployments)
60
+ #
61
+ # @param request [OpenStruct, Hash] An optional request that contains the license text to activate Reactor (useful for air-gap deployments of FusionAuth).
62
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
63
+ def activate_reactor(request)
64
+ start.uri('/api/reactor')
65
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
66
+ .post()
67
+ .go()
68
+ end
69
+
58
70
  #
59
71
  # Adds a user to an existing family. The family id must be specified.
60
72
  #
@@ -124,6 +136,24 @@ module FusionAuth
124
136
  .go()
125
137
  end
126
138
 
139
+ #
140
+ # Creates an API key. You can optionally specify a unique Id for the key, if not provided one will be generated.
141
+ # an API key can only be created with equal or lesser authority. An API key cannot create another API key unless it is granted
142
+ # to that API key.
143
+ #
144
+ # If an API key is locked to a tenant, it can only create API Keys for that same tenant.
145
+ #
146
+ # @param key_id [string] (Optional) The unique Id of the API key. If not provided a secure random Id will be generated.
147
+ # @param request [OpenStruct, Hash] The request object that contains all of the information needed to create the APIKey.
148
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
149
+ def create_api_key(key_id, request)
150
+ start.uri('/api/api-key')
151
+ .url_segment(key_id)
152
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
153
+ .post()
154
+ .go()
155
+ end
156
+
127
157
  #
128
158
  # Creates an application. You can optionally specify an Id for the application, if not provided one will be generated.
129
159
  #
@@ -212,6 +242,52 @@ module FusionAuth
212
242
  .go()
213
243
  end
214
244
 
245
+ #
246
+ # Creates an Entity. You can optionally specify an Id for the Entity. If not provided one will be generated.
247
+ #
248
+ # @param entity_id [string] (Optional) The Id for the Entity. If not provided a secure random UUID will be generated.
249
+ # @param request [OpenStruct, Hash] The request object that contains all of the information used to create the Entity.
250
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
251
+ def create_entity(entity_id, request)
252
+ start.uri('/api/entity')
253
+ .url_segment(entity_id)
254
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
255
+ .post()
256
+ .go()
257
+ end
258
+
259
+ #
260
+ # Creates a Entity Type. You can optionally specify an Id for the Entity Type, if not provided one will be generated.
261
+ #
262
+ # @param entity_type_id [string] (Optional) The Id for the Entity Type. If not provided a secure random UUID will be generated.
263
+ # @param request [OpenStruct, Hash] The request object that contains all of the information used to create the Entity Type.
264
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
265
+ def create_entity_type(entity_type_id, request)
266
+ start.uri('/api/entity/type')
267
+ .url_segment(entity_type_id)
268
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
269
+ .post()
270
+ .go()
271
+ end
272
+
273
+ #
274
+ # Creates a new permission for an entity type. You must specify the id of the entity type you are creating the permission for.
275
+ # You can optionally specify an Id for the permission inside the EntityTypePermission object itself, if not provided one will be generated.
276
+ #
277
+ # @param entity_type_id [string] The Id of the entity type to create the permission on.
278
+ # @param permission_id [string] (Optional) The Id of the permission. If not provided a secure random UUID will be generated.
279
+ # @param request [OpenStruct, Hash] The request object that contains all of the information used to create the permission.
280
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
281
+ def create_entity_type_permission(entity_type_id, permission_id, request)
282
+ start.uri('/api/entity/type')
283
+ .url_segment(entity_type_id)
284
+ .url_segment("permission")
285
+ .url_segment(permission_id)
286
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
287
+ .post()
288
+ .go()
289
+ end
290
+
215
291
  #
216
292
  # 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
217
293
  # family, if not provided one will be generated.
@@ -309,6 +385,34 @@ module FusionAuth
309
385
  .go()
310
386
  end
311
387
 
388
+ #
389
+ # Creates an message template. You can optionally specify an Id for the template, if not provided one will be generated.
390
+ #
391
+ # @param message_template_id [string] (Optional) The Id for the template. If not provided a secure random UUID will be generated.
392
+ # @param request [OpenStruct, Hash] The request object that contains all of the information used to create the message template.
393
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
394
+ def create_message_template(message_template_id, request)
395
+ start.uri('/api/message/template')
396
+ .url_segment(message_template_id)
397
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
398
+ .post()
399
+ .go()
400
+ end
401
+
402
+ #
403
+ # Creates a messenger. You can optionally specify an Id for the messenger, if not provided one will be generated.
404
+ #
405
+ # @param messenger_id [string] (Optional) The Id for the messenger. If not provided a secure random UUID will be generated.
406
+ # @param request [OpenStruct, Hash] The request object that contains all of the information used to create the messenger.
407
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
408
+ def create_messenger(messenger_id, request)
409
+ start.uri('/api/messenger')
410
+ .url_segment(messenger_id)
411
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
412
+ .post()
413
+ .go()
414
+ end
415
+
312
416
  #
313
417
  # Creates a tenant. You can optionally specify an Id for the tenant, if not provided one will be generated.
314
418
  #
@@ -421,6 +525,16 @@ module FusionAuth
421
525
  .go()
422
526
  end
423
527
 
528
+ #
529
+ # Deactivates the FusionAuth Reactor.
530
+ #
531
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
532
+ def deactivate_reactor()
533
+ start.uri('/api/reactor')
534
+ .delete()
535
+ .go()
536
+ end
537
+
424
538
  #
425
539
  # Deactivates the user with the given Id.
426
540
  #
@@ -474,6 +588,18 @@ module FusionAuth
474
588
  .go()
475
589
  end
476
590
 
591
+ #
592
+ # Deletes the API key for the given Id.
593
+ #
594
+ # @param key_id [string] The Id of the authentication API key to delete.
595
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
596
+ def delete_api_key(key_id)
597
+ start.uri('/api/api-key')
598
+ .url_segment(key_id)
599
+ .delete()
600
+ .go()
601
+ end
602
+
477
603
  #
478
604
  # Hard deletes an application. This is a dangerous operation and should not be used in most circumstances. This will
479
605
  # delete the application, any registrations for that application, metrics and reports for the application, all the
@@ -542,6 +668,63 @@ module FusionAuth
542
668
  .go()
543
669
  end
544
670
 
671
+ #
672
+ # Deletes the Entity for the given Id.
673
+ #
674
+ # @param entity_id [string] The Id of the Entity to delete.
675
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
676
+ def delete_entity(entity_id)
677
+ start.uri('/api/entity')
678
+ .url_segment(entity_id)
679
+ .delete()
680
+ .go()
681
+ end
682
+
683
+ #
684
+ # Deletes an Entity Grant for the given User or Entity.
685
+ #
686
+ # @param entity_id [string] The Id of the Entity that the Entity Grant is being deleted for.
687
+ # @param recipient_entity_id [string] (Optional) The Id of the Entity that the Entity Grant is for.
688
+ # @param user_id [string] (Optional) The Id of the User that the Entity Grant is for.
689
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
690
+ def delete_entity_grant(entity_id, recipient_entity_id, user_id)
691
+ start.uri('/api/entity')
692
+ .url_segment(entity_id)
693
+ .url_segment("grant")
694
+ .url_parameter('recipientEntityId', recipient_entity_id)
695
+ .url_parameter('userId', user_id)
696
+ .delete()
697
+ .go()
698
+ end
699
+
700
+ #
701
+ # Deletes the Entity Type for the given Id.
702
+ #
703
+ # @param entity_type_id [string] The Id of the Entity Type to delete.
704
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
705
+ def delete_entity_type(entity_type_id)
706
+ start.uri('/api/entity/type')
707
+ .url_segment(entity_type_id)
708
+ .delete()
709
+ .go()
710
+ end
711
+
712
+ #
713
+ # Hard deletes a permission. This is a dangerous operation and should not be used in most circumstances. This
714
+ # permanently removes the given permission from all grants that had it.
715
+ #
716
+ # @param entity_type_id [string] The Id of the entityType the the permission belongs to.
717
+ # @param permission_id [string] The Id of the permission to delete.
718
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
719
+ def delete_entity_type_permission(entity_type_id, permission_id)
720
+ start.uri('/api/entity/type')
721
+ .url_segment(entity_type_id)
722
+ .url_segment("permission")
723
+ .url_segment(permission_id)
724
+ .delete()
725
+ .go()
726
+ end
727
+
545
728
  #
546
729
  # Deletes the form for the given Id.
547
730
  #
@@ -626,6 +809,30 @@ module FusionAuth
626
809
  .go()
627
810
  end
628
811
 
812
+ #
813
+ # Deletes the message template for the given Id.
814
+ #
815
+ # @param message_template_id [string] The Id of the message template to delete.
816
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
817
+ def delete_message_template(message_template_id)
818
+ start.uri('/api/message/template')
819
+ .url_segment(message_template_id)
820
+ .delete()
821
+ .go()
822
+ end
823
+
824
+ #
825
+ # Deletes the messenger for the given Id.
826
+ #
827
+ # @param messenger_id [string] The Id of the messenger to delete.
828
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
829
+ def delete_messenger(messenger_id)
830
+ start.uri('/api/messenger')
831
+ .url_segment(messenger_id)
832
+ .delete()
833
+ .go()
834
+ end
835
+
629
836
  #
630
837
  # Deletes the user registration for the given user and application.
631
838
  #
@@ -767,11 +974,13 @@ module FusionAuth
767
974
  # Disable Two Factor authentication for a user.
768
975
  #
769
976
  # @param user_id [string] The Id of the User for which you're disabling Two Factor authentication.
977
+ # @param method_id [string] The two-factor method identifier you wish to disable
770
978
  # @param code [string] The Two Factor code used verify the the caller knows the Two Factor secret.
771
979
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
772
- def disable_two_factor(user_id, code)
980
+ def disable_two_factor(user_id, method_id, code)
773
981
  start.uri('/api/user/two-factor')
774
982
  .url_parameter('userId', user_id)
983
+ .url_parameter('methodId', method_id)
775
984
  .url_parameter('code', code)
776
985
  .delete()
777
986
  .go()
@@ -959,6 +1168,18 @@ module FusionAuth
959
1168
  .go()
960
1169
  end
961
1170
 
1171
+ #
1172
+ # Generate two-factor recovery codes for a user. Generating two-factor recovery codes will invalidate any existing recovery codes.
1173
+ #
1174
+ # @param user_id [string] The Id of the user to generate new Two Factor recovery codes.
1175
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
1176
+ def generate_two_factor_recovery_codes(user_id)
1177
+ start.uri('/api/user/two-factor/recovery-code')
1178
+ .url_segment(user_id)
1179
+ .post()
1180
+ .go()
1181
+ end
1182
+
962
1183
  #
963
1184
  # Generate a Two Factor secret that can be used to enable Two Factor authentication for a User. The response will contain
964
1185
  # both the secret and a Base32 encoded form of the secret which can be shown to a User when using a 2 Step Authentication
@@ -1182,6 +1403,20 @@ module FusionAuth
1182
1403
  .go()
1183
1404
  end
1184
1405
 
1406
+ #
1407
+ # Updates an authentication API key by given id
1408
+ #
1409
+ # @param key_id [string] The Id of the authentication key. If not provided a secure random api key will be generated.
1410
+ # @param request [OpenStruct, Hash] The request object that contains all of the information needed to create the APIKey.
1411
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
1412
+ def patch_api_key(key_id, request)
1413
+ start.uri('/api/api-key')
1414
+ .url_segment(key_id)
1415
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
1416
+ .post()
1417
+ .go()
1418
+ end
1419
+
1185
1420
  #
1186
1421
  # Updates, via PATCH, the application with the given Id.
1187
1422
  #
@@ -1255,6 +1490,20 @@ module FusionAuth
1255
1490
  .go()
1256
1491
  end
1257
1492
 
1493
+ #
1494
+ # Updates, via PATCH, the Entity Type with the given Id.
1495
+ #
1496
+ # @param entity_type_id [string] The Id of the Entity Type to update.
1497
+ # @param request [OpenStruct, Hash] The request that contains just the new Entity Type information.
1498
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
1499
+ def patch_entity_type(entity_type_id, request)
1500
+ start.uri('/api/entity/type')
1501
+ .url_segment(entity_type_id)
1502
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
1503
+ .patch()
1504
+ .go()
1505
+ end
1506
+
1258
1507
  #
1259
1508
  # Updates, via PATCH, the group with the given Id.
1260
1509
  #
@@ -1309,6 +1558,34 @@ module FusionAuth
1309
1558
  .go()
1310
1559
  end
1311
1560
 
1561
+ #
1562
+ # Updates, via PATCH, the message template with the given Id.
1563
+ #
1564
+ # @param message_template_id [string] The Id of the message template to update.
1565
+ # @param request [OpenStruct, Hash] The request that contains just the new message template information.
1566
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
1567
+ def patch_message_template(message_template_id, request)
1568
+ start.uri('/api/message/template')
1569
+ .url_segment(message_template_id)
1570
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
1571
+ .patch()
1572
+ .go()
1573
+ end
1574
+
1575
+ #
1576
+ # Updates, via PATCH, the messenger with the given Id.
1577
+ #
1578
+ # @param messenger_id [string] The Id of the messenger to update.
1579
+ # @param request [OpenStruct, Hash] The request that contains just the new messenger information.
1580
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
1581
+ def patch_messenger(messenger_id, request)
1582
+ start.uri('/api/messenger')
1583
+ .url_segment(messenger_id)
1584
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
1585
+ .patch()
1586
+ .go()
1587
+ end
1588
+
1312
1589
  #
1313
1590
  # Updates, via PATCH, the registration for the user with the given id and the application defined in the request.
1314
1591
  #
@@ -1470,6 +1747,19 @@ module FusionAuth
1470
1747
  .go()
1471
1748
  end
1472
1749
 
1750
+ #
1751
+ # Request a refresh of the Entity search index. This API is not generally necessary and the search index will become consistent in a
1752
+ # reasonable amount of time. There may be scenarios where you may wish to manually request an index refresh. One example may be
1753
+ # if you are using the Search API or Delete Tenant API immediately following a Entity Create etc, you may wish to request a refresh to
1754
+ # ensure the index immediately current before making a query request to the search index.
1755
+ #
1756
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
1757
+ def refresh_entity_search_index()
1758
+ start.uri('/api/entity/search')
1759
+ .put()
1760
+ .go()
1761
+ end
1762
+
1473
1763
  #
1474
1764
  # Request a refresh of the User search index. This API is not generally necessary and the search index will become consistent in a
1475
1765
  # reasonable amount of time. There may be scenarios where you may wish to manually request an index refresh. One example may be
@@ -1483,6 +1773,16 @@ module FusionAuth
1483
1773
  .go()
1484
1774
  end
1485
1775
 
1776
+ #
1777
+ # Regenerates any keys that are used by the FusionAuth Reactor.
1778
+ #
1779
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
1780
+ def regenerate_reactor_keys()
1781
+ start.uri('/api/reactor')
1782
+ .put()
1783
+ .go()
1784
+ end
1785
+
1486
1786
  #
1487
1787
  # Registers a user for an application. If you provide the User and the UserRegistration object on this request, it
1488
1788
  # will create the user as well as register them for the application. This is called a Full Registration. However, if
@@ -1556,6 +1856,18 @@ module FusionAuth
1556
1856
  .go()
1557
1857
  end
1558
1858
 
1859
+ #
1860
+ # Retrieves an authentication API key for the given id
1861
+ #
1862
+ # @param key_id [string] The Id of the API key to retrieve.
1863
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
1864
+ def retrieve_api_key(key_id)
1865
+ start.uri('/api/api-key')
1866
+ .url_segment(key_id)
1867
+ .get()
1868
+ .go()
1869
+ end
1870
+
1559
1871
  #
1560
1872
  # Retrieves a single action log (the log of a user action that was taken on a user previously) for the given Id.
1561
1873
  #
@@ -1739,6 +2051,57 @@ module FusionAuth
1739
2051
  .go()
1740
2052
  end
1741
2053
 
2054
+ #
2055
+ # Retrieves the Entity for the given Id.
2056
+ #
2057
+ # @param entity_id [string] The Id of the Entity.
2058
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
2059
+ def retrieve_entity(entity_id)
2060
+ start.uri('/api/entity')
2061
+ .url_segment(entity_id)
2062
+ .get()
2063
+ .go()
2064
+ end
2065
+
2066
+ #
2067
+ # Retrieves an Entity Grant for the given Entity and User/Entity.
2068
+ #
2069
+ # @param entity_id [string] The Id of the Entity.
2070
+ # @param recipient_entity_id [string] (Optional) The Id of the Entity that the Entity Grant is for.
2071
+ # @param user_id [string] (Optional) The Id of the User that the Entity Grant is for.
2072
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
2073
+ def retrieve_entity_grant(entity_id, recipient_entity_id, user_id)
2074
+ start.uri('/api/entity')
2075
+ .url_segment(entity_id)
2076
+ .url_segment("grant")
2077
+ .url_parameter('recipientEntityId', recipient_entity_id)
2078
+ .url_parameter('userId', user_id)
2079
+ .get()
2080
+ .go()
2081
+ end
2082
+
2083
+ #
2084
+ # Retrieves the Entity Type for the given Id.
2085
+ #
2086
+ # @param entity_type_id [string] The Id of the Entity Type.
2087
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
2088
+ def retrieve_entity_type(entity_type_id)
2089
+ start.uri('/api/entity/type')
2090
+ .url_segment(entity_type_id)
2091
+ .get()
2092
+ .go()
2093
+ end
2094
+
2095
+ #
2096
+ # Retrieves all of the Entity Types.
2097
+ #
2098
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
2099
+ def retrieve_entity_types()
2100
+ start.uri('/api/entity/type')
2101
+ .get()
2102
+ .go()
2103
+ end
2104
+
1742
2105
  #
1743
2106
  # Retrieves a single event log for the given Id.
1744
2107
  #
@@ -1844,7 +2207,7 @@ module FusionAuth
1844
2207
  #
1845
2208
  # Retrieves the identity provider for the given id or all of the identity providers if the id is null.
1846
2209
  #
1847
- # @param identity_provider_id [string] (Optional) The identity provider id.
2210
+ # @param identity_provider_id [string] The identity provider Id.
1848
2211
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
1849
2212
  def retrieve_identity_provider(identity_provider_id)
1850
2213
  start.uri('/api/identity-provider')
@@ -1853,6 +2216,20 @@ module FusionAuth
1853
2216
  .go()
1854
2217
  end
1855
2218
 
2219
+ #
2220
+ # Retrieves one or more identity provider for the given type. For types such as Google, Facebook, Twitter and LinkedIn, only a single
2221
+ # identity provider can exist. For types such as OpenID Connect and SAMLv2 more than one identity provider can be configured so this request
2222
+ # may return multiple identity providers.
2223
+ #
2224
+ # @param type [OpenStruct, Hash] The type of the identity provider.
2225
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
2226
+ def retrieve_identity_provider_by_type(type)
2227
+ start.uri('/api/identity-provider')
2228
+ .url_parameter('type', type)
2229
+ .get()
2230
+ .go()
2231
+ end
2232
+
1856
2233
  #
1857
2234
  # Retrieves all of the identity providers.
1858
2235
  #
@@ -2026,6 +2403,62 @@ module FusionAuth
2026
2403
  .go()
2027
2404
  end
2028
2405
 
2406
+ #
2407
+ # Retrieves the message template for the given Id. If you don't specify the id, this will return all of the message templates.
2408
+ #
2409
+ # @param message_template_id [string] (Optional) The Id of the message template.
2410
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
2411
+ def retrieve_message_template(message_template_id)
2412
+ start.uri('/api/message/template')
2413
+ .url_segment(message_template_id)
2414
+ .get()
2415
+ .go()
2416
+ end
2417
+
2418
+ #
2419
+ # Creates a preview of the message template provided in the request, normalized to a given locale.
2420
+ #
2421
+ # @param request [OpenStruct, Hash] The request that contains the email template and optionally a locale to render it in.
2422
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
2423
+ def retrieve_message_template_preview(request)
2424
+ start.uri('/api/message/template/preview')
2425
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
2426
+ .post()
2427
+ .go()
2428
+ end
2429
+
2430
+ #
2431
+ # Retrieves all of the message templates.
2432
+ #
2433
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
2434
+ def retrieve_message_templates()
2435
+ start.uri('/api/message/template')
2436
+ .get()
2437
+ .go()
2438
+ end
2439
+
2440
+ #
2441
+ # Retrieves the messenger with the given Id.
2442
+ #
2443
+ # @param messenger_id [string] The Id of the messenger.
2444
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
2445
+ def retrieve_messenger(messenger_id)
2446
+ start.uri('/api/messenger')
2447
+ .url_segment(messenger_id)
2448
+ .get()
2449
+ .go()
2450
+ end
2451
+
2452
+ #
2453
+ # Retrieves all of the messengers.
2454
+ #
2455
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
2456
+ def retrieve_messengers()
2457
+ start.uri('/api/messenger')
2458
+ .get()
2459
+ .go()
2460
+ end
2461
+
2029
2462
  #
2030
2463
  # Retrieves the monthly active user report between the two instants. If you specify an application id, it will only
2031
2464
  # return the monthly active counts for that application.
@@ -2105,6 +2538,16 @@ module FusionAuth
2105
2538
  .go()
2106
2539
  end
2107
2540
 
2541
+ #
2542
+ # Retrieves the FusionAuth Reactor status.
2543
+ #
2544
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
2545
+ def retrieve_reactor_status()
2546
+ start.uri('/api/reactor')
2547
+ .get()
2548
+ .go()
2549
+ end
2550
+
2108
2551
  #
2109
2552
  # Retrieves the last number of login records.
2110
2553
  #
@@ -2119,6 +2562,18 @@ module FusionAuth
2119
2562
  .go()
2120
2563
  end
2121
2564
 
2565
+ #
2566
+ # Retrieves a single refresh token by unique Id. This is not the same thing as the string value of the refresh token, if you have that, you already have what you need..
2567
+ #
2568
+ # @param user_id [string] The Id of the user.
2569
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
2570
+ def retrieve_refresh_token_by_id(user_id)
2571
+ start.uri('/api/jwt/refresh')
2572
+ .url_segment(user_id)
2573
+ .get()
2574
+ .go()
2575
+ end
2576
+
2122
2577
  #
2123
2578
  # Retrieves the refresh tokens that belong to the user with the given Id.
2124
2579
  #
@@ -2227,6 +2682,18 @@ module FusionAuth
2227
2682
  .go()
2228
2683
  end
2229
2684
 
2685
+ #
2686
+ # Retrieve two-factor recovery codes for a user.
2687
+ #
2688
+ # @param user_id [string] The Id of the user to retrieve Two Factor recovery codes.
2689
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
2690
+ def retrieve_two_factor_recovery_codes(user_id)
2691
+ start.uri('/api/user/two-factor/recovery-code')
2692
+ .url_segment(user_id)
2693
+ .get()
2694
+ .go()
2695
+ end
2696
+
2230
2697
  #
2231
2698
  # Retrieves the user for the given Id.
2232
2699
  #
@@ -2461,6 +2928,16 @@ module FusionAuth
2461
2928
  .go()
2462
2929
  end
2463
2930
 
2931
+ #
2932
+ # Retrieves the FusionAuth version string.
2933
+ #
2934
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
2935
+ def retrieve_version()
2936
+ start.uri('/api/system/version')
2937
+ .get()
2938
+ .go()
2939
+ end
2940
+
2464
2941
  #
2465
2942
  # Retrieves the webhook for the given Id. If you pass in null for the id, this will return all the webhooks.
2466
2943
  #
@@ -2484,8 +2961,30 @@ module FusionAuth
2484
2961
  end
2485
2962
 
2486
2963
  #
2487
- # Revokes a single refresh token, all tokens for a user or all tokens for an application. If you provide a user id
2488
- # and an application id, this will delete all the refresh tokens for that user for that application.
2964
+ # Revokes refresh tokens.
2965
+ #
2966
+ # Usage examples:
2967
+ # - Delete a single refresh token, pass in only the token.
2968
+ # revokeRefreshToken(token)
2969
+ #
2970
+ # - Delete all refresh tokens for a user, pass in only the userId.
2971
+ # revokeRefreshToken(null, userId)
2972
+ #
2973
+ # - Delete all refresh tokens for a user for a specific application, pass in both the userId and the applicationId.
2974
+ # revokeRefreshToken(null, userId, applicationId)
2975
+ #
2976
+ # - Delete all refresh tokens for an application
2977
+ # revokeRefreshToken(null, null, applicationId)
2978
+ #
2979
+ # Note: <code>null</code> may be handled differently depending upon the programming language.
2980
+ #
2981
+ # See also: (method names may vary by language... but you'll figure it out)
2982
+ #
2983
+ # - revokeRefreshTokenById
2984
+ # - revokeRefreshTokenByToken
2985
+ # - revokeRefreshTokensByUserId
2986
+ # - revokeRefreshTokensByApplicationId
2987
+ # - revokeRefreshTokensByUserIdForApplication
2489
2988
  #
2490
2989
  # @param token [string] (Optional) The refresh token to delete.
2491
2990
  # @param user_id [string] (Optional) The user id whose tokens to delete.
@@ -2500,6 +2999,68 @@ module FusionAuth
2500
2999
  .go()
2501
3000
  end
2502
3001
 
3002
+ #
3003
+ # Revokes a single refresh token by the unique Id. The unique Id is not sensitive as it cannot be used to obtain another JWT.
3004
+ #
3005
+ # @param token_id [string] The unique Id of the token to delete.
3006
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3007
+ def revoke_refresh_token_by_id(token_id)
3008
+ start.uri('/api/jwt/refresh')
3009
+ .url_segment(token_id)
3010
+ .delete()
3011
+ .go()
3012
+ end
3013
+
3014
+ #
3015
+ # Revokes a single refresh token by using the actual refresh token value. This refresh token value is sensitive, so be careful with this API request.
3016
+ #
3017
+ # @param token [string] The refresh token to delete.
3018
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3019
+ def revoke_refresh_token_by_token(token)
3020
+ start.uri('/api/jwt/refresh')
3021
+ .url_parameter('token', token)
3022
+ .delete()
3023
+ .go()
3024
+ end
3025
+
3026
+ #
3027
+ # Revoke all refresh tokens that belong to an application by applicationId.
3028
+ #
3029
+ # @param application_id [string] The unique Id of the application that you want to delete all refresh tokens for.
3030
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3031
+ def revoke_refresh_tokens_by_application_id(application_id)
3032
+ start.uri('/api/jwt/refresh')
3033
+ .url_parameter('applicationId', application_id)
3034
+ .delete()
3035
+ .go()
3036
+ end
3037
+
3038
+ #
3039
+ # Revoke all refresh tokens that belong to a user by user Id.
3040
+ #
3041
+ # @param user_id [string] The unique Id of the user that you want to delete all refresh tokens for.
3042
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3043
+ def revoke_refresh_tokens_by_user_id(user_id)
3044
+ start.uri('/api/jwt/refresh')
3045
+ .url_parameter('userId', user_id)
3046
+ .delete()
3047
+ .go()
3048
+ end
3049
+
3050
+ #
3051
+ # Revoke all refresh tokens that belong to a user by user Id for a specific application by applicationId.
3052
+ #
3053
+ # @param user_id [string] The unique Id of the user that you want to delete all refresh tokens for.
3054
+ # @param application_id [string] The unique Id of the application that you want to delete refresh tokens for.
3055
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3056
+ def revoke_refresh_tokens_by_user_id_for_application(user_id, application_id)
3057
+ start.uri('/api/jwt/refresh')
3058
+ .url_parameter('userId', user_id)
3059
+ .url_parameter('applicationId', application_id)
3060
+ .delete()
3061
+ .go()
3062
+ end
3063
+
2503
3064
  #
2504
3065
  # Revokes a single User consent by Id.
2505
3066
  #
@@ -2524,6 +3085,54 @@ module FusionAuth
2524
3085
  .go()
2525
3086
  end
2526
3087
 
3088
+ #
3089
+ # Searches entities with the specified criteria and pagination.
3090
+ #
3091
+ # @param request [OpenStruct, Hash] The search criteria and pagination information.
3092
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3093
+ def search_entities(request)
3094
+ start.uri('/api/entity/search')
3095
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
3096
+ .post()
3097
+ .go()
3098
+ end
3099
+
3100
+ #
3101
+ # Retrieves the entities for the given ids. If any id is invalid, it is ignored.
3102
+ #
3103
+ # @param ids [Array] The entity ids to search for.
3104
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3105
+ def search_entities_by_ids(ids)
3106
+ start.uri('/api/entity/search')
3107
+ .url_parameter('ids', ids)
3108
+ .get()
3109
+ .go()
3110
+ end
3111
+
3112
+ #
3113
+ # Searches Entity Grants with the specified criteria and pagination.
3114
+ #
3115
+ # @param request [OpenStruct, Hash] The search criteria and pagination information.
3116
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3117
+ def search_entity_grants(request)
3118
+ start.uri('/api/entity/grant/search')
3119
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
3120
+ .post()
3121
+ .go()
3122
+ end
3123
+
3124
+ #
3125
+ # Searches the entity types with the specified criteria and pagination.
3126
+ #
3127
+ # @param request [OpenStruct, Hash] The search criteria and pagination information.
3128
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3129
+ def search_entity_types(request)
3130
+ start.uri('/api/entity/type/search')
3131
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
3132
+ .post()
3133
+ .go()
3134
+ end
3135
+
2527
3136
  #
2528
3137
  # Searches the event logs with the specified criteria and pagination.
2529
3138
  #
@@ -2644,6 +3253,7 @@ module FusionAuth
2644
3253
  #
2645
3254
  # @param request [OpenStruct, Hash] The request object that contains all of the information used to send the code.
2646
3255
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
3256
+ # @deprecated This method has been renamed to send_two_factor_code_for_enable_disable, use that method instead.
2647
3257
  def send_two_factor_code(request)
2648
3258
  start.uri('/api/two-factor/send')
2649
3259
  .body_handler(FusionAuth::JSONBodyHandler.new(request))
@@ -2651,11 +3261,24 @@ module FusionAuth
2651
3261
  .go()
2652
3262
  end
2653
3263
 
3264
+ #
3265
+ # Send a Two Factor authentication code to assist in setting up Two Factor authentication or disabling.
3266
+ #
3267
+ # @param request [OpenStruct, Hash] The request object that contains all of the information used to send the code.
3268
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3269
+ def send_two_factor_code_for_enable_disable(request)
3270
+ start.uri('/api/two-factor/send')
3271
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
3272
+ .post()
3273
+ .go()
3274
+ end
3275
+
2654
3276
  #
2655
3277
  # Send a Two Factor authentication code to allow the completion of Two Factor authentication.
2656
3278
  #
2657
3279
  # @param two_factor_id [string] The Id returned by the Login API necessary to complete Two Factor authentication.
2658
3280
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
3281
+ # @deprecated This method has been renamed to send_two_factor_code_for_login_using_method, use that method instead.
2659
3282
  def send_two_factor_code_for_login(two_factor_id)
2660
3283
  startAnonymous.uri('/api/two-factor/send')
2661
3284
  .url_segment(two_factor_id)
@@ -2663,6 +3286,20 @@ module FusionAuth
2663
3286
  .go()
2664
3287
  end
2665
3288
 
3289
+ #
3290
+ # Send a Two Factor authentication code to allow the completion of Two Factor authentication.
3291
+ #
3292
+ # @param two_factor_id [string] The Id returned by the Login API necessary to complete Two Factor authentication.
3293
+ # @param request [OpenStruct, Hash] The Two Factor send request that contains all of the information used to send the Two Factor code to the user.
3294
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3295
+ def send_two_factor_code_for_login_using_method(two_factor_id, request)
3296
+ startAnonymous.uri('/api/two-factor/send')
3297
+ .url_segment(two_factor_id)
3298
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
3299
+ .post()
3300
+ .go()
3301
+ end
3302
+
2666
3303
  #
2667
3304
  # Begins a login request for a 3rd party login that requires user interaction such as HYPR.
2668
3305
  #
@@ -2689,6 +3326,23 @@ module FusionAuth
2689
3326
  .go()
2690
3327
  end
2691
3328
 
3329
+ #
3330
+ # Start a Two-Factor login request by generating a two-factor identifier. This code can then be sent to the Two Factor Send
3331
+ # API (/api/two-factor/send)in order to send a one-time use code to a user. You can also use one-time use code returned
3332
+ # to send the code out-of-band. The Two-Factor login is completed by making a request to the Two-Factor Login
3333
+ # API (/api/two-factor/login). with the two-factor identifier and the one-time use code.
3334
+ #
3335
+ # This API is intended to allow you to begin a Two-Factor login outside of a normal login that originated from the Login API (/api/login).
3336
+ #
3337
+ # @param request [OpenStruct, Hash] The Two-Factor start request that contains all of the information used to begin the Two-Factor login request.
3338
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3339
+ def start_two_factor_login(request)
3340
+ start.uri('/api/two-factor/start')
3341
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
3342
+ .post()
3343
+ .go()
3344
+ end
3345
+
2692
3346
  #
2693
3347
  # Complete login using a 2FA challenge
2694
3348
  #
@@ -2701,6 +3355,20 @@ module FusionAuth
2701
3355
  .go()
2702
3356
  end
2703
3357
 
3358
+ #
3359
+ # Updates an API key by given id
3360
+ #
3361
+ # @param api_key_id [string] The Id of the API key to update.
3362
+ # @param request [OpenStruct, Hash] The request object that contains all of the information used to create the API Key.
3363
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3364
+ def update_api_key(api_key_id, request)
3365
+ start.uri('/api/api-key')
3366
+ .url_segment(api_key_id)
3367
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
3368
+ .put()
3369
+ .go()
3370
+ end
3371
+
2704
3372
  #
2705
3373
  # Updates the application with the given Id.
2706
3374
  #
@@ -2774,6 +3442,51 @@ module FusionAuth
2774
3442
  .go()
2775
3443
  end
2776
3444
 
3445
+ #
3446
+ # Updates the Entity with the given Id.
3447
+ #
3448
+ # @param entity_id [string] The Id of the Entity to update.
3449
+ # @param request [OpenStruct, Hash] The request that contains all of the new Entity information.
3450
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3451
+ def update_entity(entity_id, request)
3452
+ start.uri('/api/entity')
3453
+ .url_segment(entity_id)
3454
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
3455
+ .put()
3456
+ .go()
3457
+ end
3458
+
3459
+ #
3460
+ # Updates the Entity Type with the given Id.
3461
+ #
3462
+ # @param entity_type_id [string] The Id of the Entity Type to update.
3463
+ # @param request [OpenStruct, Hash] The request that contains all of the new Entity Type information.
3464
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3465
+ def update_entity_type(entity_type_id, request)
3466
+ start.uri('/api/entity/type')
3467
+ .url_segment(entity_type_id)
3468
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
3469
+ .put()
3470
+ .go()
3471
+ end
3472
+
3473
+ #
3474
+ # Updates the permission with the given id for the entity type.
3475
+ #
3476
+ # @param entity_type_id [string] The Id of the entityType that the permission belongs to.
3477
+ # @param permission_id [string] The Id of the permission to update.
3478
+ # @param request [OpenStruct, Hash] The request that contains all of the new permission information.
3479
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3480
+ def update_entity_type_permission(entity_type_id, permission_id, request)
3481
+ start.uri('/api/entity/type')
3482
+ .url_segment(entity_type_id)
3483
+ .url_segment("permission")
3484
+ .url_segment(permission_id)
3485
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
3486
+ .put()
3487
+ .go()
3488
+ end
3489
+
2777
3490
  #
2778
3491
  # Updates the form with the given Id.
2779
3492
  #
@@ -2870,6 +3583,34 @@ module FusionAuth
2870
3583
  .go()
2871
3584
  end
2872
3585
 
3586
+ #
3587
+ # Updates the message template with the given Id.
3588
+ #
3589
+ # @param message_template_id [string] The Id of the message template to update.
3590
+ # @param request [OpenStruct, Hash] The request that contains all of the new message template information.
3591
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3592
+ def update_message_template(message_template_id, request)
3593
+ start.uri('/api/message/template')
3594
+ .url_segment(message_template_id)
3595
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
3596
+ .put()
3597
+ .go()
3598
+ end
3599
+
3600
+ #
3601
+ # Updates the messenger with the given Id.
3602
+ #
3603
+ # @param messenger_id [string] The Id of the messenger to update.
3604
+ # @param request [OpenStruct, Hash] The request object that contains all of the new messenger information.
3605
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3606
+ def update_messenger(messenger_id, request)
3607
+ start.uri('/api/messenger')
3608
+ .url_segment(messenger_id)
3609
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
3610
+ .put()
3611
+ .go()
3612
+ end
3613
+
2873
3614
  #
2874
3615
  # Updates the registration for the user with the given id and the application defined in the request.
2875
3616
  #
@@ -2994,6 +3735,21 @@ module FusionAuth
2994
3735
  .go()
2995
3736
  end
2996
3737
 
3738
+ #
3739
+ # Creates or updates an Entity Grant. This is when a User/Entity is granted permissions to an Entity.
3740
+ #
3741
+ # @param entity_id [string] The Id of the Entity that the User/Entity is being granted access to.
3742
+ # @param request [OpenStruct, Hash] The request object that contains all of the information used to create the Entity Grant.
3743
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3744
+ def upsert_entity_grant(entity_id, request)
3745
+ start.uri('/api/entity')
3746
+ .url_segment(entity_id)
3747
+ .url_segment("grant")
3748
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
3749
+ .post()
3750
+ .go()
3751
+ end
3752
+
2997
3753
  #
2998
3754
  # Validates the end-user provided user_code from the user-interaction of the Device Authorization Grant.
2999
3755
  # If you build your own activation form you should validate the user provided code prior to beginning the Authorization grant.
@@ -3029,6 +3785,7 @@ module FusionAuth
3029
3785
  #
3030
3786
  # @param verification_id [string] The email verification id sent to the user.
3031
3787
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
3788
+ # @deprecated This method has been renamed to verify_email_address and changed to take a JSON request body, use that method instead.
3032
3789
  def verify_email(verification_id)
3033
3790
  startAnonymous.uri('/api/user/verify-email')
3034
3791
  .url_segment(verification_id)
@@ -3036,11 +3793,29 @@ module FusionAuth
3036
3793
  .go()
3037
3794
  end
3038
3795
 
3796
+ #
3797
+ # Confirms a user's email address.
3798
+ #
3799
+ # The request body will contain the verificationId. You may also be required to send a one-time use code based upon your configuration. When
3800
+ # the tenant is configured to gate a user until their email address is verified, this procedures requires two values instead of one.
3801
+ # The verificationId is a high entropy value and the one-time use code is a low entropy value that is easily entered in a user interactive form. The
3802
+ # two values together are able to confirm a user's email address and mark the user's email address as verified.
3803
+ #
3804
+ # @param request [OpenStruct, Hash] The request that contains the verificationId and optional one-time use code paired with the verificationId.
3805
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3806
+ def verify_email_address(request)
3807
+ startAnonymous.uri('/api/user/verify-email')
3808
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
3809
+ .post()
3810
+ .go()
3811
+ end
3812
+
3039
3813
  #
3040
3814
  # Confirms an application registration. The Id given is usually from an email sent to the user.
3041
3815
  #
3042
3816
  # @param verification_id [string] The registration verification Id sent to the user.
3043
3817
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
3818
+ # @deprecated This method has been renamed to verify_user_registration and changed to take a JSON request body, use that method instead.
3044
3819
  def verify_registration(verification_id)
3045
3820
  startAnonymous.uri('/api/user/verify-registration')
3046
3821
  .url_segment(verification_id)
@@ -3048,6 +3823,23 @@ module FusionAuth
3048
3823
  .go()
3049
3824
  end
3050
3825
 
3826
+ #
3827
+ # Confirms a user's registration.
3828
+ #
3829
+ # The request body will contain the verificationId. You may also be required to send a one-time use code based upon your configuration. When
3830
+ # the application is configured to gate a user until their registration is verified, this procedures requires two values instead of one.
3831
+ # The verificationId is a high entropy value and the one-time use code is a low entropy value that is easily entered in a user interactive form. The
3832
+ # two values together are able to confirm a user's registration and mark the user's registration as verified.
3833
+ #
3834
+ # @param request [OpenStruct, Hash] The request that contains the verificationId and optional one-time use code paired with the verificationId.
3835
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3836
+ def verify_user_registration(request)
3837
+ startAnonymous.uri('/api/user/verify-registration')
3838
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
3839
+ .post()
3840
+ .go()
3841
+ end
3842
+
3051
3843
  #
3052
3844
  # Starts the HTTP call
3053
3845
  #
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fusionauth_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.23.0
4
+ version: 1.27.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Pontarelli
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2021-01-11 00:00:00.000000000 Z
12
+ date: 2021-05-07 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: This library contains the Ruby client library that helps you connect
15
15
  your application to FusionAuth.
@@ -23,6 +23,7 @@ files:
23
23
  - ".gitignore"
24
24
  - ".ruby-version"
25
25
  - Gemfile
26
+ - Gemfile.lock
26
27
  - LICENSE.txt
27
28
  - README.md
28
29
  - Rakefile