fusionauth_client 1.6.0 → 1.7.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: dc8683bec78042fd17d0ed2562955670a75ab9bdd27ceceb5bffb89a6654ee64
4
- data.tar.gz: 49e6fe7639264e156c6eaddeddfc64ab48dff2c7cab681e598b2f734816a729f
3
+ metadata.gz: 7e89b1ba98f8854aeee822471f967898b59d01fc16952e043a1fb1afeb4e3d53
4
+ data.tar.gz: f26f980b6da738bd591b696b8d895adb54f9c44af022efd30fc4a6fd4b4abe88
5
5
  SHA512:
6
- metadata.gz: b2419465cf01b55dbaea773b8f60ac996ab9028911a785fbfb508caa858ca0d11805d37bcb614c69a6e12d291f8b40daabd26e57bf86ce746f8b014be2f46c63
7
- data.tar.gz: c3ade115fec4b7e2aceb1038aa8e168ecd7780b616e8a44e9a05d3fbfb71f19603fec9e83f4d236e3620799c8ae4e06c1234755442317db74eeb21cf7e05c284
6
+ metadata.gz: 7d0e48bfa77c02437e3701dbb758954abe2a78a3bb42bf5856d0c3a13e891966e0518f38563a93142361e33c42692513c62e86418d3d4293c3c9b5c4644e5235
7
+ data.tar.gz: fc2429be921c05710d30e9cbdf7ee2f9f04fd7a239ea4d32ebb821643fb7588db4c318e77e3bd3b6cf8b59971dd73e35b70c55322f164edf3b6cc5d2bce17a34
@@ -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.6.0", licenses: ["ApacheV2_0"]) {
19
+ project(group: "io.fusionauth", name: "fusionauth-ruby-client", version: "1.7.0", licenses: ["ApacheV2_0"]) {
20
20
  workflow {
21
21
  standard()
22
22
  }
@@ -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.6.0'
7
+ spec.version = '1.7.0'
8
8
  spec.authors = ['Brian Pontarelli', 'Daniel DeGroff']
9
9
  spec.email = %w(brian@fusionauth.io daniel@fusionauth.io)
10
10
 
@@ -54,6 +54,21 @@ module FusionAuth
54
54
  .go()
55
55
  end
56
56
 
57
+ #
58
+ # Adds a user to an existing family. The family id must be specified.
59
+ #
60
+ # @param family_id [string] The id of the family.
61
+ # @param request [OpenStruct, Hash] The request object that contains all of the information used to determine which user to add to the family.
62
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
63
+ #
64
+ def add_user_to_family(family_id, request)
65
+ start.uri('/api/user/family')
66
+ .url_segment(family_id)
67
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
68
+ .put()
69
+ .go()
70
+ end
71
+
57
72
  #
58
73
  # Cancels the user action.
59
74
  #
@@ -162,6 +177,21 @@ module FusionAuth
162
177
  .go()
163
178
  end
164
179
 
180
+ #
181
+ # Creates a user consent type. You can optionally specify an Id for the consent type, if not provided one will be generated.
182
+ #
183
+ # @param consent_id [string] (Optional) The Id for the consent. If not provided a secure random UUID will be generated.
184
+ # @param request [OpenStruct, Hash] The request object that contains all of the information used to create the consent.
185
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
186
+ #
187
+ def create_consent(consent_id, request)
188
+ start.uri('/api/consent')
189
+ .url_segment(consent_id)
190
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
191
+ .post()
192
+ .go()
193
+ end
194
+
165
195
  #
166
196
  # Creates an email template. You can optionally specify an Id for the template, if not provided one will be generated.
167
197
  #
@@ -177,6 +207,22 @@ module FusionAuth
177
207
  .go()
178
208
  end
179
209
 
210
+ #
211
+ # 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
212
+ # family, if not provided one will be generated.
213
+ #
214
+ # @param family_id [string] (Optional) The id for the family. If not provided a secure random UUID will be generated.
215
+ # @param request [OpenStruct, Hash] The request object that contains all of the information used to create the family.
216
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
217
+ #
218
+ def create_family(family_id, request)
219
+ start.uri('/api/user/family')
220
+ .url_segment(family_id)
221
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
222
+ .post()
223
+ .go()
224
+ end
225
+
180
226
  #
181
227
  # Creates a group. You can optionally specify an Id for the group, if not provided one will be generated.
182
228
  #
@@ -297,6 +343,21 @@ module FusionAuth
297
343
  .go()
298
344
  end
299
345
 
346
+ #
347
+ # Creates a single User consent.
348
+ #
349
+ # @param user_consent_id [string] (Optional) The Id for the User consent. If not provided a secure random UUID will be generated.
350
+ # @param request [OpenStruct, Hash] The request that contains the user consent information.
351
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
352
+ #
353
+ def create_user_consent(user_consent_id, request)
354
+ start.uri('/api/user/consent')
355
+ .url_segment(user_consent_id)
356
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
357
+ .post()
358
+ .go()
359
+ end
360
+
300
361
  #
301
362
  # Creates a webhook. You can optionally specify an Id for the webhook, if not provided one will be generated.
302
363
  #
@@ -398,6 +459,19 @@ module FusionAuth
398
459
  .go()
399
460
  end
400
461
 
462
+ #
463
+ # Deletes the consent for the given Id.
464
+ #
465
+ # @param consent_id [string] The Id of the consent to delete.
466
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
467
+ #
468
+ def delete_consent(consent_id)
469
+ start.uri('/api/consent')
470
+ .url_segment(consent_id)
471
+ .delete()
472
+ .go()
473
+ end
474
+
401
475
  #
402
476
  # Deletes the email template for the given Id.
403
477
  #
@@ -938,6 +1012,21 @@ module FusionAuth
938
1012
  .go()
939
1013
  end
940
1014
 
1015
+ #
1016
+ # Removes a user from the family with the given id.
1017
+ #
1018
+ # @param family_id [string] The id of the family to remove the user from.
1019
+ # @param user_id [string] The id of the user to remove from the family.
1020
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
1021
+ #
1022
+ def remove_user_from_family(family_id, user_id)
1023
+ start.uri('/api/user/family')
1024
+ .url_segment(family_id)
1025
+ .url_segment(user_id)
1026
+ .delete()
1027
+ .go()
1028
+ end
1029
+
941
1030
  #
942
1031
  # Re-sends the verification email to the user.
943
1032
  #
@@ -1059,6 +1148,30 @@ module FusionAuth
1059
1148
  .go()
1060
1149
  end
1061
1150
 
1151
+ #
1152
+ # Retrieves the Consent for the given Id.
1153
+ #
1154
+ # @param consent_id [string] The Id of the consent.
1155
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
1156
+ #
1157
+ def retrieve_consent(consent_id)
1158
+ start.uri('/api/consent')
1159
+ .url_segment(consent_id)
1160
+ .get()
1161
+ .go()
1162
+ end
1163
+
1164
+ #
1165
+ # Retrieves all of the consent.
1166
+ #
1167
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
1168
+ #
1169
+ def retrieve_consents()
1170
+ start.uri('/api/consent')
1171
+ .get()
1172
+ .go()
1173
+ end
1174
+
1062
1175
  #
1063
1176
  # Retrieves the daily active user report between the two instants. If you specify an application id, it will only
1064
1177
  # return the daily active counts for that application.
@@ -1129,6 +1242,32 @@ module FusionAuth
1129
1242
  .go()
1130
1243
  end
1131
1244
 
1245
+ #
1246
+ # Retrieves all of the families that a user belongs to.
1247
+ #
1248
+ # @param user_id [string] The User's id
1249
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
1250
+ #
1251
+ def retrieve_families(user_id)
1252
+ start.uri('/api/user/family')
1253
+ .url_parameter('userId', user_id)
1254
+ .get()
1255
+ .go()
1256
+ end
1257
+
1258
+ #
1259
+ # Retrieves all of the members of a family by the unique Family Id.
1260
+ #
1261
+ # @param family_id [string] The unique Id of the Family.
1262
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
1263
+ #
1264
+ def retrieve_family_members_by_family_id(family_id)
1265
+ start.uri('/api/user/family')
1266
+ .url_segment(family_id)
1267
+ .get()
1268
+ .go()
1269
+ end
1270
+
1132
1271
  #
1133
1272
  # Retrieves the group for the given Id.
1134
1273
  #
@@ -1375,6 +1514,19 @@ module FusionAuth
1375
1514
  .go()
1376
1515
  end
1377
1516
 
1517
+ #
1518
+ # Retrieves all of the children for the given parent email address.
1519
+ #
1520
+ # @param parent_email [string] The email of the parent.
1521
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
1522
+ #
1523
+ def retrieve_pending_children(parent_email)
1524
+ start.uri('/api/user/family/pending')
1525
+ .url_parameter('parentEmail', parent_email)
1526
+ .get()
1527
+ .go()
1528
+ end
1529
+
1378
1530
  #
1379
1531
  # Retrieves the last number of login records.
1380
1532
  #
@@ -1626,6 +1778,32 @@ module FusionAuth
1626
1778
  .go()
1627
1779
  end
1628
1780
 
1781
+ #
1782
+ # Retrieve a single User consent by Id.
1783
+ #
1784
+ # @param user_consent_id [string] The User consent Id
1785
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
1786
+ #
1787
+ def retrieve_user_consent(user_consent_id)
1788
+ start.uri('/api/user/consent')
1789
+ .url_segment(user_consent_id)
1790
+ .get()
1791
+ .go()
1792
+ end
1793
+
1794
+ #
1795
+ # Retrieves all of the consents for a User.
1796
+ #
1797
+ # @param user_id [string] The User's Id
1798
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
1799
+ #
1800
+ def retrieve_user_consents(user_id)
1801
+ start.uri('/api/user/consent')
1802
+ .url_parameter('userId', user_id)
1803
+ .get()
1804
+ .go()
1805
+ end
1806
+
1629
1807
  #
1630
1808
  # Retrieves the login report between the two instants for a particular user by Id. If you specify an application id, it will only return the
1631
1809
  # login counts for that application.
@@ -1738,6 +1916,19 @@ module FusionAuth
1738
1916
  .go()
1739
1917
  end
1740
1918
 
1919
+ #
1920
+ # Revokes a single User consent by Id.
1921
+ #
1922
+ # @param user_consent_id [string] The User Consent Id
1923
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
1924
+ #
1925
+ def revoke_user_consent(user_consent_id)
1926
+ start.uri('/api/user/consent')
1927
+ .url_segment(user_consent_id)
1928
+ .delete()
1929
+ .go()
1930
+ end
1931
+
1741
1932
  #
1742
1933
  # Searches the audit logs with the specified criteria and pagination.
1743
1934
  #
@@ -1764,6 +1955,19 @@ module FusionAuth
1764
1955
  .go()
1765
1956
  end
1766
1957
 
1958
+ #
1959
+ # Searches the login records with the specified criteria and pagination.
1960
+ #
1961
+ # @param request [OpenStruct, Hash] The search criteria and pagination information.
1962
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
1963
+ #
1964
+ def search_login_records(request)
1965
+ start.uri('/api/system/login-record/search')
1966
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
1967
+ .post()
1968
+ .go()
1969
+ end
1970
+
1767
1971
  #
1768
1972
  # Retrieves the users for the given ids. If any id is invalid, it is ignored.
1769
1973
  #
@@ -1807,6 +2011,19 @@ module FusionAuth
1807
2011
  .go()
1808
2012
  end
1809
2013
 
2014
+ #
2015
+ # Sends out an email to a parent that they need to register and create a family or need to log in and add a child to their existing family.
2016
+ #
2017
+ # @param request [OpenStruct, Hash] The request object that contains the parent email.
2018
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
2019
+ #
2020
+ def send_family_request_email(request)
2021
+ start.uri('/api/user/family/request')
2022
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
2023
+ .post()
2024
+ .go()
2025
+ end
2026
+
1810
2027
  #
1811
2028
  # Send a passwordless authentication code in an email to complete login.
1812
2029
  #
@@ -1892,6 +2109,21 @@ module FusionAuth
1892
2109
  .go()
1893
2110
  end
1894
2111
 
2112
+ #
2113
+ # Updates the consent with the given Id.
2114
+ #
2115
+ # @param consent_id [string] The Id of the consent to update.
2116
+ # @param request [OpenStruct, Hash] The request that contains all of the new consent information.
2117
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
2118
+ #
2119
+ def update_consent(consent_id, request)
2120
+ start.uri('/api/consent')
2121
+ .url_segment(consent_id)
2122
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
2123
+ .put()
2124
+ .go()
2125
+ end
2126
+
1895
2127
  #
1896
2128
  # Updates the email template with the given Id.
1897
2129
  #
@@ -2068,6 +2300,21 @@ module FusionAuth
2068
2300
  .go()
2069
2301
  end
2070
2302
 
2303
+ #
2304
+ # Updates a single User consent by Id.
2305
+ #
2306
+ # @param user_consent_id [string] The User Consent Id
2307
+ # @param request [OpenStruct, Hash] The request that contains the user consent information.
2308
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
2309
+ #
2310
+ def update_user_consent(user_consent_id, request)
2311
+ start.uri('/api/user/consent')
2312
+ .url_segment(user_consent_id)
2313
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
2314
+ .put()
2315
+ .go()
2316
+ end
2317
+
2071
2318
  #
2072
2319
  # Updates the webhook with the given Id.
2073
2320
  #
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.6.0
4
+ version: 1.7.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: 2019-04-29 00:00:00.000000000 Z
12
+ date: 2019-06-13 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.