fusionauth_client 1.25.0 → 1.26.0

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: 61ebe66291227393968cfd972f5668175aca99e0780bc45f5b69b17b99524a82
4
- data.tar.gz: 5579794527c8a3dfa909779b714cfe76c6f95e4561c8a01801d7b91595e45f47
3
+ metadata.gz: a950e65ea4b1b98b030175aa96aa10e60eaa283adffb60f940e7faaf03ea3db8
4
+ data.tar.gz: fb0218fa311d0c815042e7d062319827c5361a84831d42abd3be103886335a9e
5
5
  SHA512:
6
- metadata.gz: f925ced42b1e203af544a548260e120c944fede38dcaf9d785d5c59ee0ed7f3093044a8662136618e2c44d3e5815ba1be815a11c117d1b5e8b6bd4ef1b88d8a3
7
- data.tar.gz: a120d54a3319323474804b9514198dd05bf459c5eca9ffbffb57d710dfd7e3cfa98e99e457d7b306d4d27aac8e6131e2c5b24b9d65de4a1eff3c7c8d797fd35c
6
+ metadata.gz: 76a87d490167744f343858a59f416fcf97ecf351421d4b89463a8f523fe51bdd44c46724bf3824a5570ebf2e0db43287d8a256f4d5e581563716596560f9a8d8
7
+ data.tar.gz: cbe4905cd5fa7266e968a3fd506bcd0a7db27d1309ec03f11fe9c35a59f0e535ba20a400a7fbef1a089c4b05a8a8e724e1844daaf737db2263cfa03fd50d6b7e
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.26.0)
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/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.25.0", licenses: ["ApacheV2_0"]) {
19
+ project(group: "io.fusionauth", name: "fusionauth-ruby-client", version: "1.26.0", licenses: ["ApacheV2_0"]) {
20
20
  workflow {
21
21
  standard()
22
22
  }
@@ -16,16 +16,16 @@
16
16
  <option name="myRootTask">
17
17
  <RakeTaskImpl id="rake">
18
18
  <subtasks>
19
- <RakeTaskImpl description="Build fusionauth_client-1.24.1.gem into the pkg directory" fullCommand="build" id="build" />
19
+ <RakeTaskImpl description="Build fusionauth_client-1.26.0.gem into the pkg directory" fullCommand="build" id="build" />
20
20
  <RakeTaskImpl description="Remove any temporary products" fullCommand="clean" id="clean" />
21
21
  <RakeTaskImpl description="Remove any generated files" fullCommand="clobber" id="clobber" />
22
- <RakeTaskImpl description="Build and install fusionauth_client-1.24.1.gem into system gems" fullCommand="install" id="install" />
22
+ <RakeTaskImpl description="Build and install fusionauth_client-1.26.0.gem into system gems" fullCommand="install" id="install" />
23
23
  <RakeTaskImpl id="install">
24
24
  <subtasks>
25
- <RakeTaskImpl description="Build and install fusionauth_client-1.24.1.gem into system gems without network access" fullCommand="install:local" id="local" />
25
+ <RakeTaskImpl description="Build and install fusionauth_client-1.26.0.gem into system gems without network access" fullCommand="install:local" id="local" />
26
26
  </subtasks>
27
27
  </RakeTaskImpl>
28
- <RakeTaskImpl description="Create tag v1.24.1 and build and push fusionauth_client-1.24.1.gem to https://rubygems.org" fullCommand="release[remote]" id="release[remote]" />
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
29
  <RakeTaskImpl description="Run tests" fullCommand="test" id="test" />
30
30
  <RakeTaskImpl description="" fullCommand="default" id="default" />
31
31
  <RakeTaskImpl description="" fullCommand="release" id="release" />
@@ -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.25.0'
7
+ spec.version = '1.26.0'
8
8
  spec.authors = ['Brian Pontarelli', 'Daniel DeGroff']
9
9
  spec.email = %w(brian@fusionauth.io daniel@fusionauth.io)
10
10
 
@@ -55,6 +55,20 @@ 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 license_id [string] The license id
62
+ # @param request [OpenStruct, Hash] An optional request that contains the license text to activate Reactor (useful for air-gap deployments of FusionAuth).
63
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
64
+ def activate_reactor(license_id, request)
65
+ start.uri('/api/reactor')
66
+ .url_segment(license_id)
67
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
68
+ .post()
69
+ .go()
70
+ end
71
+
58
72
  #
59
73
  # Adds a user to an existing family. The family id must be specified.
60
74
  #
@@ -124,6 +138,24 @@ module FusionAuth
124
138
  .go()
125
139
  end
126
140
 
141
+ #
142
+ # Creates an API key. You can optionally specify a unique Id for the key, if not provided one will be generated.
143
+ # an API key can only be created with equal or lesser authority. An API key cannot create another API key unless it is granted
144
+ # to that API key.
145
+ #
146
+ # If an API key is locked to a tenant, it can only create API Keys for that same tenant.
147
+ #
148
+ # @param key_id [string] (Optional) The unique Id of the API key. If not provided a secure random Id will be generated.
149
+ # @param request [OpenStruct, Hash] The request object that contains all of the information needed to create the APIKey.
150
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
151
+ def create_api_key(key_id, request)
152
+ start.uri('/api/api-key')
153
+ .url_segment(key_id)
154
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
155
+ .post()
156
+ .go()
157
+ end
158
+
127
159
  #
128
160
  # Creates an application. You can optionally specify an Id for the application, if not provided one will be generated.
129
161
  #
@@ -212,6 +244,52 @@ module FusionAuth
212
244
  .go()
213
245
  end
214
246
 
247
+ #
248
+ # Creates an Entity. You can optionally specify an Id for the Entity. If not provided one will be generated.
249
+ #
250
+ # @param entity_id [string] (Optional) The Id for the Entity. If not provided a secure random UUID will be generated.
251
+ # @param request [OpenStruct, Hash] The request object that contains all of the information used to create the Entity.
252
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
253
+ def create_entity(entity_id, request)
254
+ start.uri('/api/entity')
255
+ .url_segment(entity_id)
256
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
257
+ .post()
258
+ .go()
259
+ end
260
+
261
+ #
262
+ # Creates a Entity Type. You can optionally specify an Id for the Entity Type, if not provided one will be generated.
263
+ #
264
+ # @param entity_type_id [string] (Optional) The Id for the Entity Type. If not provided a secure random UUID will be generated.
265
+ # @param request [OpenStruct, Hash] The request object that contains all of the information used to create the Entity Type.
266
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
267
+ def create_entity_type(entity_type_id, request)
268
+ start.uri('/api/entity/type')
269
+ .url_segment(entity_type_id)
270
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
271
+ .post()
272
+ .go()
273
+ end
274
+
275
+ #
276
+ # Creates a new permission for an entity type. You must specify the id of the entity type you are creating the permission for.
277
+ # You can optionally specify an Id for the permission inside the EntityTypePermission object itself, if not provided one will be generated.
278
+ #
279
+ # @param entity_type_id [string] The Id of the entity type to create the permission on.
280
+ # @param permission_id [string] (Optional) The Id of the permission. If not provided a secure random UUID will be generated.
281
+ # @param request [OpenStruct, Hash] The request object that contains all of the information used to create the permission.
282
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
283
+ def create_entity_type_permission(entity_type_id, permission_id, request)
284
+ start.uri('/api/entity/type')
285
+ .url_segment(entity_type_id)
286
+ .url_segment("permission")
287
+ .url_segment(permission_id)
288
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
289
+ .post()
290
+ .go()
291
+ end
292
+
215
293
  #
216
294
  # 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
295
  # family, if not provided one will be generated.
@@ -309,6 +387,34 @@ module FusionAuth
309
387
  .go()
310
388
  end
311
389
 
390
+ #
391
+ # Creates an message template. You can optionally specify an Id for the template, if not provided one will be generated.
392
+ #
393
+ # @param message_template_id [string] (Optional) The Id for the template. If not provided a secure random UUID will be generated.
394
+ # @param request [OpenStruct, Hash] The request object that contains all of the information used to create the message template.
395
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
396
+ def create_message_template(message_template_id, request)
397
+ start.uri('/api/message/template')
398
+ .url_segment(message_template_id)
399
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
400
+ .post()
401
+ .go()
402
+ end
403
+
404
+ #
405
+ # Creates a messenger. You can optionally specify an Id for the messenger, if not provided one will be generated.
406
+ #
407
+ # @param messenger_id [string] (Optional) The Id for the messenger. If not provided a secure random UUID will be generated.
408
+ # @param request [OpenStruct, Hash] The request object that contains all of the information used to create the messenger.
409
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
410
+ def create_messenger(messenger_id, request)
411
+ start.uri('/api/messenger')
412
+ .url_segment(messenger_id)
413
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
414
+ .post()
415
+ .go()
416
+ end
417
+
312
418
  #
313
419
  # Creates a tenant. You can optionally specify an Id for the tenant, if not provided one will be generated.
314
420
  #
@@ -421,6 +527,16 @@ module FusionAuth
421
527
  .go()
422
528
  end
423
529
 
530
+ #
531
+ # Deactivates the FusionAuth Reactor.
532
+ #
533
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
534
+ def deactivate_reactor()
535
+ start.uri('/api/reactor')
536
+ .delete()
537
+ .go()
538
+ end
539
+
424
540
  #
425
541
  # Deactivates the user with the given Id.
426
542
  #
@@ -474,6 +590,18 @@ module FusionAuth
474
590
  .go()
475
591
  end
476
592
 
593
+ #
594
+ # Deletes the API key for the given Id.
595
+ #
596
+ # @param key_id [string] The Id of the authentication API key to delete.
597
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
598
+ def delete_api_key(key_id)
599
+ start.uri('/api/api-key')
600
+ .url_segment(key_id)
601
+ .delete()
602
+ .go()
603
+ end
604
+
477
605
  #
478
606
  # Hard deletes an application. This is a dangerous operation and should not be used in most circumstances. This will
479
607
  # delete the application, any registrations for that application, metrics and reports for the application, all the
@@ -542,6 +670,63 @@ module FusionAuth
542
670
  .go()
543
671
  end
544
672
 
673
+ #
674
+ # Deletes the Entity for the given Id.
675
+ #
676
+ # @param entity_id [string] The Id of the Entity to delete.
677
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
678
+ def delete_entity(entity_id)
679
+ start.uri('/api/entity')
680
+ .url_segment(entity_id)
681
+ .delete()
682
+ .go()
683
+ end
684
+
685
+ #
686
+ # Deletes an Entity Grant for the given User or Entity.
687
+ #
688
+ # @param entity_id [string] The Id of the Entity that the Entity Grant is being deleted for.
689
+ # @param recipient_entity_id [string] (Optional) The Id of the Entity that the Entity Grant is for.
690
+ # @param user_id [string] (Optional) The Id of the User that the Entity Grant is for.
691
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
692
+ def delete_entity_grant(entity_id, recipient_entity_id, user_id)
693
+ start.uri('/api/entity')
694
+ .url_segment(entity_id)
695
+ .url_segment("grant")
696
+ .url_parameter('recipientEntityId', recipient_entity_id)
697
+ .url_parameter('userId', user_id)
698
+ .delete()
699
+ .go()
700
+ end
701
+
702
+ #
703
+ # Deletes the Entity Type for the given Id.
704
+ #
705
+ # @param entity_type_id [string] The Id of the Entity Type to delete.
706
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
707
+ def delete_entity_type(entity_type_id)
708
+ start.uri('/api/entity/type')
709
+ .url_segment(entity_type_id)
710
+ .delete()
711
+ .go()
712
+ end
713
+
714
+ #
715
+ # Hard deletes a permission. This is a dangerous operation and should not be used in most circumstances. This
716
+ # permanently removes the given permission from all grants that had it.
717
+ #
718
+ # @param entity_type_id [string] The Id of the entityType the the permission belongs to.
719
+ # @param permission_id [string] The Id of the permission to delete.
720
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
721
+ def delete_entity_type_permission(entity_type_id, permission_id)
722
+ start.uri('/api/entity/type')
723
+ .url_segment(entity_type_id)
724
+ .url_segment("permission")
725
+ .url_segment(permission_id)
726
+ .delete()
727
+ .go()
728
+ end
729
+
545
730
  #
546
731
  # Deletes the form for the given Id.
547
732
  #
@@ -626,6 +811,30 @@ module FusionAuth
626
811
  .go()
627
812
  end
628
813
 
814
+ #
815
+ # Deletes the message template for the given Id.
816
+ #
817
+ # @param message_template_id [string] The Id of the message template to delete.
818
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
819
+ def delete_message_template(message_template_id)
820
+ start.uri('/api/message/template')
821
+ .url_segment(message_template_id)
822
+ .delete()
823
+ .go()
824
+ end
825
+
826
+ #
827
+ # Deletes the messenger for the given Id.
828
+ #
829
+ # @param messenger_id [string] The Id of the messenger to delete.
830
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
831
+ def delete_messenger(messenger_id)
832
+ start.uri('/api/messenger')
833
+ .url_segment(messenger_id)
834
+ .delete()
835
+ .go()
836
+ end
837
+
629
838
  #
630
839
  # Deletes the user registration for the given user and application.
631
840
  #
@@ -767,11 +976,13 @@ module FusionAuth
767
976
  # Disable Two Factor authentication for a user.
768
977
  #
769
978
  # @param user_id [string] The Id of the User for which you're disabling Two Factor authentication.
979
+ # @param method_id [string] The two-factor method identifier you wish to disable
770
980
  # @param code [string] The Two Factor code used verify the the caller knows the Two Factor secret.
771
981
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
772
- def disable_two_factor(user_id, code)
982
+ def disable_two_factor(user_id, method_id, code)
773
983
  start.uri('/api/user/two-factor')
774
984
  .url_parameter('userId', user_id)
985
+ .url_parameter('methodId', method_id)
775
986
  .url_parameter('code', code)
776
987
  .delete()
777
988
  .go()
@@ -959,6 +1170,18 @@ module FusionAuth
959
1170
  .go()
960
1171
  end
961
1172
 
1173
+ #
1174
+ # Generate two-factor recovery codes for a user. Generating two-factor recovery codes will invalidate any existing recovery codes.
1175
+ #
1176
+ # @param user_id [string] The Id of the user to generate new Two Factor recovery codes.
1177
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
1178
+ def generate_two_factor_recovery_codes(user_id)
1179
+ start.uri('/api/user/two-factor/recovery-code')
1180
+ .url_segment(user_id)
1181
+ .post()
1182
+ .go()
1183
+ end
1184
+
962
1185
  #
963
1186
  # Generate a Two Factor secret that can be used to enable Two Factor authentication for a User. The response will contain
964
1187
  # 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 +1405,20 @@ module FusionAuth
1182
1405
  .go()
1183
1406
  end
1184
1407
 
1408
+ #
1409
+ # Updates an authentication API key by given id
1410
+ #
1411
+ # @param key_id [string] The Id of the authentication key. If not provided a secure random api key will be generated.
1412
+ # @param request [OpenStruct, Hash] The request object that contains all of the information needed to create the APIKey.
1413
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
1414
+ def patch_api_key(key_id, request)
1415
+ start.uri('/api/api-key')
1416
+ .url_segment(key_id)
1417
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
1418
+ .post()
1419
+ .go()
1420
+ end
1421
+
1185
1422
  #
1186
1423
  # Updates, via PATCH, the application with the given Id.
1187
1424
  #
@@ -1255,6 +1492,20 @@ module FusionAuth
1255
1492
  .go()
1256
1493
  end
1257
1494
 
1495
+ #
1496
+ # Updates, via PATCH, the Entity Type with the given Id.
1497
+ #
1498
+ # @param entity_type_id [string] The Id of the Entity Type to update.
1499
+ # @param request [OpenStruct, Hash] The request that contains just the new Entity Type information.
1500
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
1501
+ def patch_entity_type(entity_type_id, request)
1502
+ start.uri('/api/entity/type')
1503
+ .url_segment(entity_type_id)
1504
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
1505
+ .patch()
1506
+ .go()
1507
+ end
1508
+
1258
1509
  #
1259
1510
  # Updates, via PATCH, the group with the given Id.
1260
1511
  #
@@ -1309,6 +1560,34 @@ module FusionAuth
1309
1560
  .go()
1310
1561
  end
1311
1562
 
1563
+ #
1564
+ # Updates, via PATCH, the message template with the given Id.
1565
+ #
1566
+ # @param message_template_id [string] The Id of the message template to update.
1567
+ # @param request [OpenStruct, Hash] The request that contains just the new message template information.
1568
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
1569
+ def patch_message_template(message_template_id, request)
1570
+ start.uri('/api/message/template')
1571
+ .url_segment(message_template_id)
1572
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
1573
+ .patch()
1574
+ .go()
1575
+ end
1576
+
1577
+ #
1578
+ # Updates, via PATCH, the messenger with the given Id.
1579
+ #
1580
+ # @param messenger_id [string] The Id of the messenger to update.
1581
+ # @param request [OpenStruct, Hash] The request that contains just the new messenger information.
1582
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
1583
+ def patch_messenger(messenger_id, request)
1584
+ start.uri('/api/messenger')
1585
+ .url_segment(messenger_id)
1586
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
1587
+ .patch()
1588
+ .go()
1589
+ end
1590
+
1312
1591
  #
1313
1592
  # Updates, via PATCH, the registration for the user with the given id and the application defined in the request.
1314
1593
  #
@@ -1470,6 +1749,19 @@ module FusionAuth
1470
1749
  .go()
1471
1750
  end
1472
1751
 
1752
+ #
1753
+ # Request a refresh of the Entity search index. This API is not generally necessary and the search index will become consistent in a
1754
+ # reasonable amount of time. There may be scenarios where you may wish to manually request an index refresh. One example may be
1755
+ # 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
1756
+ # ensure the index immediately current before making a query request to the search index.
1757
+ #
1758
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
1759
+ def refresh_entity_search_index()
1760
+ start.uri('/api/entity/search')
1761
+ .put()
1762
+ .go()
1763
+ end
1764
+
1473
1765
  #
1474
1766
  # Request a refresh of the User search index. This API is not generally necessary and the search index will become consistent in a
1475
1767
  # reasonable amount of time. There may be scenarios where you may wish to manually request an index refresh. One example may be
@@ -1483,6 +1775,16 @@ module FusionAuth
1483
1775
  .go()
1484
1776
  end
1485
1777
 
1778
+ #
1779
+ # Regenerates any keys that are used by the FusionAuth Reactor.
1780
+ #
1781
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
1782
+ def regenerate_reactor_keys()
1783
+ start.uri('/api/reactor')
1784
+ .put()
1785
+ .go()
1786
+ end
1787
+
1486
1788
  #
1487
1789
  # Registers a user for an application. If you provide the User and the UserRegistration object on this request, it
1488
1790
  # will create the user as well as register them for the application. This is called a Full Registration. However, if
@@ -1556,6 +1858,18 @@ module FusionAuth
1556
1858
  .go()
1557
1859
  end
1558
1860
 
1861
+ #
1862
+ # Retrieves an authentication API key for the given id
1863
+ #
1864
+ # @param key_id [string] The Id of the API key to retrieve.
1865
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
1866
+ def retrieve_api_key(key_id)
1867
+ start.uri('/api/api-key')
1868
+ .url_segment(key_id)
1869
+ .get()
1870
+ .go()
1871
+ end
1872
+
1559
1873
  #
1560
1874
  # Retrieves a single action log (the log of a user action that was taken on a user previously) for the given Id.
1561
1875
  #
@@ -1739,6 +2053,57 @@ module FusionAuth
1739
2053
  .go()
1740
2054
  end
1741
2055
 
2056
+ #
2057
+ # Retrieves the Entity for the given Id.
2058
+ #
2059
+ # @param entity_id [string] The Id of the Entity.
2060
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
2061
+ def retrieve_entity(entity_id)
2062
+ start.uri('/api/entity')
2063
+ .url_segment(entity_id)
2064
+ .get()
2065
+ .go()
2066
+ end
2067
+
2068
+ #
2069
+ # Retrieves an Entity Grant for the given Entity and User/Entity.
2070
+ #
2071
+ # @param entity_id [string] The Id of the Entity.
2072
+ # @param recipient_entity_id [string] (Optional) The Id of the Entity that the Entity Grant is for.
2073
+ # @param user_id [string] (Optional) The Id of the User that the Entity Grant is for.
2074
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
2075
+ def retrieve_entity_grant(entity_id, recipient_entity_id, user_id)
2076
+ start.uri('/api/entity')
2077
+ .url_segment(entity_id)
2078
+ .url_segment("grant")
2079
+ .url_parameter('recipientEntityId', recipient_entity_id)
2080
+ .url_parameter('userId', user_id)
2081
+ .get()
2082
+ .go()
2083
+ end
2084
+
2085
+ #
2086
+ # Retrieves the Entity Type for the given Id.
2087
+ #
2088
+ # @param entity_type_id [string] The Id of the Entity Type.
2089
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
2090
+ def retrieve_entity_type(entity_type_id)
2091
+ start.uri('/api/entity/type')
2092
+ .url_segment(entity_type_id)
2093
+ .get()
2094
+ .go()
2095
+ end
2096
+
2097
+ #
2098
+ # Retrieves all of the Entity Types.
2099
+ #
2100
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
2101
+ def retrieve_entity_types()
2102
+ start.uri('/api/entity/type')
2103
+ .get()
2104
+ .go()
2105
+ end
2106
+
1742
2107
  #
1743
2108
  # Retrieves a single event log for the given Id.
1744
2109
  #
@@ -2040,6 +2405,62 @@ module FusionAuth
2040
2405
  .go()
2041
2406
  end
2042
2407
 
2408
+ #
2409
+ # Retrieves the message template for the given Id. If you don't specify the id, this will return all of the message templates.
2410
+ #
2411
+ # @param message_template_id [string] (Optional) The Id of the message template.
2412
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
2413
+ def retrieve_message_template(message_template_id)
2414
+ start.uri('/api/message/template')
2415
+ .url_segment(message_template_id)
2416
+ .get()
2417
+ .go()
2418
+ end
2419
+
2420
+ #
2421
+ # Creates a preview of the message template provided in the request, normalized to a given locale.
2422
+ #
2423
+ # @param request [OpenStruct, Hash] The request that contains the email template and optionally a locale to render it in.
2424
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
2425
+ def retrieve_message_template_preview(request)
2426
+ start.uri('/api/message/template/preview')
2427
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
2428
+ .post()
2429
+ .go()
2430
+ end
2431
+
2432
+ #
2433
+ # Retrieves all of the message templates.
2434
+ #
2435
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
2436
+ def retrieve_message_templates()
2437
+ start.uri('/api/message/template')
2438
+ .get()
2439
+ .go()
2440
+ end
2441
+
2442
+ #
2443
+ # Retrieves the messenger with the given Id.
2444
+ #
2445
+ # @param messenger_id [string] The Id of the messenger.
2446
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
2447
+ def retrieve_messenger(messenger_id)
2448
+ start.uri('/api/messenger')
2449
+ .url_segment(messenger_id)
2450
+ .get()
2451
+ .go()
2452
+ end
2453
+
2454
+ #
2455
+ # Retrieves all of the messengers.
2456
+ #
2457
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
2458
+ def retrieve_messengers()
2459
+ start.uri('/api/messenger')
2460
+ .get()
2461
+ .go()
2462
+ end
2463
+
2043
2464
  #
2044
2465
  # Retrieves the monthly active user report between the two instants. If you specify an application id, it will only
2045
2466
  # return the monthly active counts for that application.
@@ -2119,6 +2540,16 @@ module FusionAuth
2119
2540
  .go()
2120
2541
  end
2121
2542
 
2543
+ #
2544
+ # Retrieves the FusionAuth Reactor status.
2545
+ #
2546
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
2547
+ def retrieve_reactor_status()
2548
+ start.uri('/api/reactor')
2549
+ .get()
2550
+ .go()
2551
+ end
2552
+
2122
2553
  #
2123
2554
  # Retrieves the last number of login records.
2124
2555
  #
@@ -2253,6 +2684,18 @@ module FusionAuth
2253
2684
  .go()
2254
2685
  end
2255
2686
 
2687
+ #
2688
+ # Retrieve two-factor recovery codes for a user.
2689
+ #
2690
+ # @param user_id [string] The Id of the user to retrieve Two Factor recovery codes.
2691
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
2692
+ def retrieve_two_factor_recovery_codes(user_id)
2693
+ start.uri('/api/user/two-factor/recovery-code')
2694
+ .url_segment(user_id)
2695
+ .get()
2696
+ .go()
2697
+ end
2698
+
2256
2699
  #
2257
2700
  # Retrieves the user for the given Id.
2258
2701
  #
@@ -2634,6 +3077,54 @@ module FusionAuth
2634
3077
  .go()
2635
3078
  end
2636
3079
 
3080
+ #
3081
+ # Searches entities with the specified criteria and pagination.
3082
+ #
3083
+ # @param request [OpenStruct, Hash] The search criteria and pagination information.
3084
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3085
+ def search_entities(request)
3086
+ start.uri('/api/entity/search')
3087
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
3088
+ .post()
3089
+ .go()
3090
+ end
3091
+
3092
+ #
3093
+ # Retrieves the entities for the given ids. If any id is invalid, it is ignored.
3094
+ #
3095
+ # @param ids [Array] The entity ids to search for.
3096
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3097
+ def search_entities_by_ids(ids)
3098
+ start.uri('/api/entity/search')
3099
+ .url_parameter('ids', ids)
3100
+ .get()
3101
+ .go()
3102
+ end
3103
+
3104
+ #
3105
+ # Searches Entity Grants with the specified criteria and pagination.
3106
+ #
3107
+ # @param request [OpenStruct, Hash] The search criteria and pagination information.
3108
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3109
+ def search_entity_grants(request)
3110
+ start.uri('/api/entity/grant/search')
3111
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
3112
+ .post()
3113
+ .go()
3114
+ end
3115
+
3116
+ #
3117
+ # Searches the entity types with the specified criteria and pagination.
3118
+ #
3119
+ # @param request [OpenStruct, Hash] The search criteria and pagination information.
3120
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3121
+ def search_entity_types(request)
3122
+ start.uri('/api/entity/type/search')
3123
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
3124
+ .post()
3125
+ .go()
3126
+ end
3127
+
2637
3128
  #
2638
3129
  # Searches the event logs with the specified criteria and pagination.
2639
3130
  #
@@ -2754,6 +3245,7 @@ module FusionAuth
2754
3245
  #
2755
3246
  # @param request [OpenStruct, Hash] The request object that contains all of the information used to send the code.
2756
3247
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
3248
+ # @deprecated This method has been renamed to send_two_factor_code_for_enable_disable, use that method instead.
2757
3249
  def send_two_factor_code(request)
2758
3250
  start.uri('/api/two-factor/send')
2759
3251
  .body_handler(FusionAuth::JSONBodyHandler.new(request))
@@ -2761,11 +3253,24 @@ module FusionAuth
2761
3253
  .go()
2762
3254
  end
2763
3255
 
3256
+ #
3257
+ # Send a Two Factor authentication code to assist in setting up Two Factor authentication or disabling.
3258
+ #
3259
+ # @param request [OpenStruct, Hash] The request object that contains all of the information used to send the code.
3260
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3261
+ def send_two_factor_code_for_enable_disable(request)
3262
+ start.uri('/api/two-factor/send')
3263
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
3264
+ .post()
3265
+ .go()
3266
+ end
3267
+
2764
3268
  #
2765
3269
  # Send a Two Factor authentication code to allow the completion of Two Factor authentication.
2766
3270
  #
2767
3271
  # @param two_factor_id [string] The Id returned by the Login API necessary to complete Two Factor authentication.
2768
3272
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
3273
+ # @deprecated This method has been renamed to send_two_factor_code_for_login_using_method, use that method instead.
2769
3274
  def send_two_factor_code_for_login(two_factor_id)
2770
3275
  startAnonymous.uri('/api/two-factor/send')
2771
3276
  .url_segment(two_factor_id)
@@ -2773,6 +3278,20 @@ module FusionAuth
2773
3278
  .go()
2774
3279
  end
2775
3280
 
3281
+ #
3282
+ # Send a Two Factor authentication code to allow the completion of Two Factor authentication.
3283
+ #
3284
+ # @param two_factor_id [string] The Id returned by the Login API necessary to complete Two Factor authentication.
3285
+ # @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.
3286
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3287
+ def send_two_factor_code_for_login_using_method(two_factor_id, request)
3288
+ startAnonymous.uri('/api/two-factor/send')
3289
+ .url_segment(two_factor_id)
3290
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
3291
+ .post()
3292
+ .go()
3293
+ end
3294
+
2776
3295
  #
2777
3296
  # Begins a login request for a 3rd party login that requires user interaction such as HYPR.
2778
3297
  #
@@ -2799,6 +3318,23 @@ module FusionAuth
2799
3318
  .go()
2800
3319
  end
2801
3320
 
3321
+ #
3322
+ # Start a Two-Factor login request by generating a two-factor identifier. This code can then be sent to the Two Factor Send
3323
+ # 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
3324
+ # to send the code out-of-band. The Two-Factor login is completed by making a request to the Two-Factor Login
3325
+ # API (/api/two-factor/login). with the two-factor identifier and the one-time use code.
3326
+ #
3327
+ # 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).
3328
+ #
3329
+ # @param request [OpenStruct, Hash] The Two-Factor start request that contains all of the information used to begin the Two-Factor login request.
3330
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3331
+ def start_two_factor_login(request)
3332
+ start.uri('/api/two-factor/start')
3333
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
3334
+ .post()
3335
+ .go()
3336
+ end
3337
+
2802
3338
  #
2803
3339
  # Complete login using a 2FA challenge
2804
3340
  #
@@ -2811,6 +3347,20 @@ module FusionAuth
2811
3347
  .go()
2812
3348
  end
2813
3349
 
3350
+ #
3351
+ # Updates an API key by given id
3352
+ #
3353
+ # @param api_key_id [string] The Id of the API key to update.
3354
+ # @param request [OpenStruct, Hash] The request object that contains all of the information used to create the API Key.
3355
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3356
+ def update_api_key(api_key_id, request)
3357
+ start.uri('/api/api-key')
3358
+ .url_segment(api_key_id)
3359
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
3360
+ .put()
3361
+ .go()
3362
+ end
3363
+
2814
3364
  #
2815
3365
  # Updates the application with the given Id.
2816
3366
  #
@@ -2884,6 +3434,51 @@ module FusionAuth
2884
3434
  .go()
2885
3435
  end
2886
3436
 
3437
+ #
3438
+ # Updates the Entity with the given Id.
3439
+ #
3440
+ # @param entity_id [string] The Id of the Entity to update.
3441
+ # @param request [OpenStruct, Hash] The request that contains all of the new Entity information.
3442
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3443
+ def update_entity(entity_id, request)
3444
+ start.uri('/api/entity')
3445
+ .url_segment(entity_id)
3446
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
3447
+ .put()
3448
+ .go()
3449
+ end
3450
+
3451
+ #
3452
+ # Updates the Entity Type with the given Id.
3453
+ #
3454
+ # @param entity_type_id [string] The Id of the Entity Type to update.
3455
+ # @param request [OpenStruct, Hash] The request that contains all of the new Entity Type information.
3456
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3457
+ def update_entity_type(entity_type_id, request)
3458
+ start.uri('/api/entity/type')
3459
+ .url_segment(entity_type_id)
3460
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
3461
+ .put()
3462
+ .go()
3463
+ end
3464
+
3465
+ #
3466
+ # Updates the permission with the given id for the entity type.
3467
+ #
3468
+ # @param entity_type_id [string] The Id of the entityType that the permission belongs to.
3469
+ # @param permission_id [string] The Id of the permission to update.
3470
+ # @param request [OpenStruct, Hash] The request that contains all of the new permission information.
3471
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3472
+ def update_entity_type_permission(entity_type_id, permission_id, request)
3473
+ start.uri('/api/entity/type')
3474
+ .url_segment(entity_type_id)
3475
+ .url_segment("permission")
3476
+ .url_segment(permission_id)
3477
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
3478
+ .put()
3479
+ .go()
3480
+ end
3481
+
2887
3482
  #
2888
3483
  # Updates the form with the given Id.
2889
3484
  #
@@ -2980,6 +3575,34 @@ module FusionAuth
2980
3575
  .go()
2981
3576
  end
2982
3577
 
3578
+ #
3579
+ # Updates the message template with the given Id.
3580
+ #
3581
+ # @param message_template_id [string] The Id of the message template to update.
3582
+ # @param request [OpenStruct, Hash] The request that contains all of the new message template information.
3583
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3584
+ def update_message_template(message_template_id, request)
3585
+ start.uri('/api/message/template')
3586
+ .url_segment(message_template_id)
3587
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
3588
+ .put()
3589
+ .go()
3590
+ end
3591
+
3592
+ #
3593
+ # Updates the messenger with the given Id.
3594
+ #
3595
+ # @param messenger_id [string] The Id of the messenger to update.
3596
+ # @param request [OpenStruct, Hash] The request object that contains all of the new messenger information.
3597
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3598
+ def update_messenger(messenger_id, request)
3599
+ start.uri('/api/messenger')
3600
+ .url_segment(messenger_id)
3601
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
3602
+ .put()
3603
+ .go()
3604
+ end
3605
+
2983
3606
  #
2984
3607
  # Updates the registration for the user with the given id and the application defined in the request.
2985
3608
  #
@@ -3104,6 +3727,21 @@ module FusionAuth
3104
3727
  .go()
3105
3728
  end
3106
3729
 
3730
+ #
3731
+ # Creates or updates an Entity Grant. This is when a User/Entity is granted permissions to an Entity.
3732
+ #
3733
+ # @param entity_id [string] The Id of the Entity that the User/Entity is being granted access to.
3734
+ # @param request [OpenStruct, Hash] The request object that contains all of the information used to create the Entity Grant.
3735
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
3736
+ def upsert_entity_grant(entity_id, request)
3737
+ start.uri('/api/entity')
3738
+ .url_segment(entity_id)
3739
+ .url_segment("grant")
3740
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
3741
+ .post()
3742
+ .go()
3743
+ end
3744
+
3107
3745
  #
3108
3746
  # Validates the end-user provided user_code from the user-interaction of the Device Authorization Grant.
3109
3747
  # If you build your own activation form you should validate the user provided code prior to beginning the Authorization grant.
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.25.0
4
+ version: 1.26.0
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-03-11 00:00:00.000000000 Z
12
+ date: 2021-04-20 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