fusionauth_client 1.56.0 → 1.58.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 817271c704c56e0f62dfd5ee99c6dbdd79353377ff6ea836e5bad191e2c2c7fa
4
- data.tar.gz: 1f6aee97af885e67a85c3c01d304bd3db663cc178d9e652ded072026580344c4
3
+ metadata.gz: f06ceac18ef4f1734bc2d63657291958dae0b2591d336030826589f3801b5e2f
4
+ data.tar.gz: 28b3a2778f69f15ac5c0c850781a38ff38bb9c9717f3e0a9f29301ae1254faa2
5
5
  SHA512:
6
- metadata.gz: 483eca10733228fb337c283c964c37676d7e770cf365cfeefa90140766a52baa67d3b80ac45251b496978a36d6464435a16a585c91322e8507c01395ff74bed7
7
- data.tar.gz: d5a450ee453cf7987dd143841eb907c39fab24016f424dc131d51dae43c51265bec2fbfc71d5ddd3f4f3e244b17e8eaf99e18169a0b1d66a4a3accdb27db7aa8
6
+ metadata.gz: 858e37978cc8e31ee054164370719cfa78f9d40db41d33180df04035fe882472ba6704d24632e51fef33a5d3620355b8291a590858239c921049018314569e79
7
+ data.tar.gz: d66be2e746892494ac3d1fba0a333e70b02fa7d3950032c87e7ff0e54b2354b054011a87a93db1cd92dea87473d8b5da3e4eb9e8557d08f25ecf76b3f65b1713
@@ -1,10 +1,4 @@
1
- # Run locally with act:
2
- #
3
- # act pull_request [--input command=[command]] \
4
- # --platform fusionauth-standard=[ecr-repo-name]/fusionauth-standard:latest] \
5
- # --workflows ./.github/workflows/deploy.yaml \
6
- # --env-file <(aws configure export-credentials --profile [aws-profile] --format env)
7
-
1
+ ---
8
2
  name: Deploy
9
3
 
10
4
  on:
@@ -26,39 +20,57 @@ on:
26
20
 
27
21
  permissions:
28
22
  contents: read
23
+ id-token: write
29
24
 
30
25
  jobs:
31
- build:
32
- if: |
33
- github.event_name == 'pull_request' ||
34
- github.event_name == 'push' ||
35
- github.event_name == 'workflow_dispatch' && inputs.command == 'build'
36
- runs-on: fusionauth-standard
26
+ deploy:
27
+ runs-on: ubuntu-latest
28
+ defaults:
29
+ run:
30
+ shell: /usr/bin/bash -l -e -o pipefail {0}
37
31
  steps:
38
32
  - name: checkout
39
33
  uses: actions/checkout@v4
40
34
 
35
+ - name: setup java
36
+ uses: actions/setup-java@v4
37
+ with:
38
+ distribution: temurin
39
+ java-version: 21
40
+ java-package: jre
41
+
42
+ - name: install savant
43
+ run: |
44
+ curl -O https://repository.savantbuild.org/org/savantbuild/savant-core/2.0.0/savant-2.0.0.tar.gz
45
+ tar xzvf savant-2.0.0.tar.gz
46
+ savant-2.0.0/bin/sb --version
47
+ SAVANT_PATH=$(realpath -s "./savant-2.0.0/bin")
48
+ echo "${SAVANT_PATH}" >> $GITHUB_PATH
49
+ mkdir -p ~/.savant/plugins
50
+ cat << EOF > ~/.savant/plugins/org.savantbuild.plugin.java.properties
51
+ 21=${JAVA_HOME}
52
+ EOF
53
+
54
+ # Installs the version specified in the .ruby-version file in the repo root.
55
+ - name: install ruby
56
+ uses: ruby/setup-ruby@v1
57
+
41
58
  - name: compile
42
59
  shell: bash -l {0}
43
60
  run: sb compile
44
61
 
45
- deploy:
46
- if: |
47
- github.event_name == 'workflow_dispatch' &&
48
- (inputs.command == 'release' || inputs.command == 'publish')
49
- runs-on: fusionauth-standard
50
- steps:
51
- - name: checkout
52
- uses: actions/checkout@v4
62
+ ### Everything below this line will only run on a workflow_dispatch
53
63
 
54
64
  - name: set aws credentials
65
+ if: inputs.command == 'release' || inputs.command == 'publish'
55
66
  uses: aws-actions/configure-aws-credentials@v4
56
67
  with:
57
- role-to-assume: arn:aws:iam::752443094709:role/github-actions
68
+ role-to-assume: arn:aws:iam::752443094709:role/gha-fusionauth-ruby-client
58
69
  role-session-name: aws-auth-action
59
70
  aws-region: us-west-2
60
71
 
61
72
  - name: get secret
73
+ if: inputs.command == 'release' || inputs.command == 'publish'
62
74
  run: |
63
75
  while IFS=$'\t' read -r key value; do
64
76
  echo "::add-mask::${value}"
@@ -71,6 +83,7 @@ jobs:
71
83
  jq -r 'to_entries[] | [.key, .value] | @tsv')
72
84
 
73
85
  - name: set gem credentials
86
+ if: inputs.command == 'release' || inputs.command == 'publish'
74
87
  run: |
75
88
  mkdir -p ~/.gem
76
89
  echo ":rubygems_api_key: ${{ env.API_KEY }}" > ~/.gem/credentials
@@ -78,10 +91,8 @@ jobs:
78
91
 
79
92
  - name: release to svn
80
93
  if: inputs.command == 'release'
81
- shell: bash -l {0}
82
94
  run: sb release
83
95
 
84
96
  - name: publish to rubygems
85
97
  if: inputs.command == 'publish'
86
- shell: bash -l {0}
87
98
  run: sb publish
@@ -3,10 +3,13 @@ name: Test Library
3
3
  on:
4
4
  push:
5
5
  branches:
6
+ - develop
6
7
  - main
7
8
  pull_request:
8
9
  branches:
10
+ - develop
9
11
  - main
12
+ workflow_dispatch:
10
13
 
11
14
  permissions:
12
15
  contents: read
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.7.5
1
+ 3.4.2
data/Gemfile CHANGED
@@ -13,10 +13,10 @@
13
13
  # language governing permissions and limitations under the License.
14
14
 
15
15
  source 'https://rubygems.org'
16
- ruby '2.7.5'
16
+ ruby '3.4.2'
17
17
 
18
- gem 'minitest', '~> 5.22', '>= 5.22.3'
19
- gem 'rake', '~> 13.2', '>= 13.2.1'
18
+ gem 'minitest', '~> 5.25'
19
+ gem 'rake', '~> 13.2'
20
20
  gem 'rdoc-markdown', '~> 0.4.2'
21
21
 
22
22
  # Specify your gem's dependencies in fusionauth_client.gemspec
data/Gemfile.lock CHANGED
@@ -1,27 +1,39 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fusionauth_client (1.56.0)
4
+ fusionauth_client (1.58.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
- cgi (0.4.1)
9
+ cgi (0.4.2)
10
+ date (3.4.1)
10
11
  erb (2.2.3)
11
12
  cgi
12
13
  extralite-bundle (1.27)
13
- minitest (5.22.3)
14
- nokogiri (1.15.6-aarch64-linux)
14
+ minitest (5.25.5)
15
+ nokogiri (1.18.6-aarch64-linux-gnu)
15
16
  racc (~> 1.4)
16
- nokogiri (1.15.6-arm64-darwin)
17
+ nokogiri (1.18.6-aarch64-linux-musl)
17
18
  racc (~> 1.4)
18
- nokogiri (1.15.6-x86_64-linux)
19
+ nokogiri (1.18.6-arm-linux-gnu)
19
20
  racc (~> 1.4)
20
- psych (5.1.2)
21
+ nokogiri (1.18.6-arm-linux-musl)
22
+ racc (~> 1.4)
23
+ nokogiri (1.18.6-arm64-darwin)
24
+ racc (~> 1.4)
25
+ nokogiri (1.18.6-x86_64-darwin)
26
+ racc (~> 1.4)
27
+ nokogiri (1.18.6-x86_64-linux-gnu)
28
+ racc (~> 1.4)
29
+ nokogiri (1.18.6-x86_64-linux-musl)
30
+ racc (~> 1.4)
31
+ psych (5.2.3)
32
+ date
21
33
  stringio
22
- racc (1.7.3)
34
+ racc (1.8.1)
23
35
  rake (13.2.1)
24
- rdoc (6.6.3.1)
36
+ rdoc (6.13.0)
25
37
  psych (>= 4.0.0)
26
38
  rdoc-markdown (0.4.2)
27
39
  erb (~> 2.0)
@@ -31,22 +43,27 @@ GEM
31
43
  unindent (~> 1.0)
32
44
  reverse_markdown (2.1.1)
33
45
  nokogiri
34
- stringio (3.1.0)
46
+ stringio (3.1.6)
35
47
  unindent (1.0)
36
48
 
37
49
  PLATFORMS
38
- aarch64-linux
39
- arm64-darwin-23
40
- x86_64-linux
50
+ aarch64-linux-gnu
51
+ aarch64-linux-musl
52
+ arm-linux-gnu
53
+ arm-linux-musl
54
+ arm64-darwin
55
+ x86_64-darwin
56
+ x86_64-linux-gnu
57
+ x86_64-linux-musl
41
58
 
42
59
  DEPENDENCIES
43
60
  fusionauth_client!
44
- minitest (~> 5.22, >= 5.22.3)
45
- rake (~> 13.2, >= 13.2.1)
61
+ minitest (~> 5.25)
62
+ rake (~> 13.2)
46
63
  rdoc-markdown (~> 0.4.2)
47
64
 
48
65
  RUBY VERSION
49
- ruby 2.7.5p203
66
+ ruby 3.4.2p28
50
67
 
51
68
  BUNDLED WITH
52
- 2.4.22
69
+ 2.6.2
data/Rakefile CHANGED
@@ -1,10 +1,10 @@
1
1
  require "bundler/gem_tasks"
2
- require "rake/testtask"
2
+ require "minitest/test_task"
3
3
 
4
- Rake::TestTask.new(:test) do |t|
4
+ Minitest::TestTask.create(:test) do |t|
5
5
  t.libs << "test"
6
6
  t.libs << "lib"
7
- t.test_files = FileList['test/**/*test.rb']
7
+ t.test_globs = FileList['test/**/*test.rb']
8
8
  end
9
9
 
10
10
  task :default => :test
data/build.savant CHANGED
@@ -15,7 +15,7 @@
15
15
  */
16
16
 
17
17
  pubVersion = ""
18
- project(group: "io.fusionauth", name: "fusionauth-ruby-client", version: "1.56.0", licenses: ["ApacheV2_0"]) {
18
+ project(group: "io.fusionauth", name: "fusionauth-ruby-client", version: "1.58.0", licenses: ["ApacheV2_0"]) {
19
19
  workflow {
20
20
  fetch {
21
21
  cache()
@@ -6,11 +6,11 @@
6
6
  <sourceFolder url="file://$MODULE_DIR$/lib" isTestSource="false" />
7
7
  <sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
8
8
  </content>
9
- <orderEntry type="jdk" jdkName="rbenv: 2.7.5" jdkType="RUBY_SDK" />
9
+ <orderEntry type="jdk" jdkName="rbenv: 3.4.2" jdkType="RUBY_SDK" />
10
10
  <orderEntry type="sourceFolder" forTests="false" />
11
- <orderEntry type="library" scope="PROVIDED" name="bundler (v2.4.22, rbenv: 2.7.5) [gem]" level="application" />
12
- <orderEntry type="library" scope="PROVIDED" name="cgi (v0.4.1, rbenv: 2.7.5) [gem]" level="application" />
13
- <orderEntry type="library" scope="PROVIDED" name="psych (v5.1.2, rbenv: 2.7.5) [gem]" level="application" />
14
- <orderEntry type="library" scope="PROVIDED" name="rake (v13.2.1, rbenv: 2.7.5) [gem]" level="application" />
11
+ <orderEntry type="library" scope="PROVIDED" name="bundler (v2.6.2, rbenv: 3.4.2) [gem]" level="application" />
12
+ <orderEntry type="library" scope="PROVIDED" name="cgi (v0.4.2, rbenv: 3.4.2) [gem]" level="application" />
13
+ <orderEntry type="library" scope="PROVIDED" name="psych (v5.2.3, rbenv: 3.4.2) [gem]" level="application" />
14
+ <orderEntry type="library" scope="PROVIDED" name="rake (v13.2.1, rbenv: 3.4.2) [gem]" level="application" />
15
15
  </component>
16
- </module>
16
+ </module>
@@ -19,7 +19,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
19
19
 
20
20
  Gem::Specification.new do |spec|
21
21
  spec.name = 'fusionauth_client'
22
- spec.version = '1.56.0'
22
+ spec.version = '1.58.0'
23
23
  spec.authors = ['Brian Pontarelli', 'Daniel DeGroff']
24
24
  spec.email = %w(brian@fusionauth.io daniel@fusionauth.io)
25
25
 
@@ -2,7 +2,7 @@ require 'ostruct'
2
2
  require 'fusionauth/rest_client'
3
3
 
4
4
  #
5
- # Copyright (c) 2018-2023, FusionAuth, All Rights Reserved
5
+ # Copyright (c) 2018-2025, FusionAuth, All Rights Reserved
6
6
  #
7
7
  # Licensed under the Apache License, Version 2.0 (the "License");
8
8
  # you may not use this file except in compliance with the License.
@@ -134,6 +134,23 @@ module FusionAuth
134
134
  .go
135
135
  end
136
136
 
137
+ #
138
+ # Changes a user's password using their access token (JWT) instead of the changePasswordId
139
+ # A common use case for this method will be if you want to allow the user to change their own password.
140
+ #
141
+ # Remember to send refreshToken in the request body if you want to get a new refresh token when login using the returned oneTimePassword.
142
+ #
143
+ # @param encoded_jwt [string] The encoded JWT (access token).
144
+ # @param request [OpenStruct, Hash] The change password request that contains all the information used to change the password.
145
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
146
+ def change_password_by_jwt(encoded_jwt, request)
147
+ startAnonymous.uri('/api/user/change-password')
148
+ .authorization('Bearer ' + encoded_jwt)
149
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
150
+ .post
151
+ .go
152
+ end
153
+
137
154
  #
138
155
  # Changes a user's password using their identity (loginId and password). Using a loginId instead of the changePasswordId
139
156
  # bypasses the email verification and allows a password to be changed directly without first calling the #forgotPassword
@@ -734,7 +751,7 @@ module FusionAuth
734
751
  end
735
752
 
736
753
  #
737
- # Deactivates the users with the given ids.
754
+ # Deactivates the users with the given Ids.
738
755
  #
739
756
  # @param user_ids [Array] The ids of the users to deactivate.
740
757
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
@@ -749,7 +766,7 @@ module FusionAuth
749
766
  end
750
767
 
751
768
  #
752
- # Deactivates the users with the given ids.
769
+ # Deactivates the users with the given Ids.
753
770
  #
754
771
  # @param user_ids [Array] The ids of the users to deactivate.
755
772
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
@@ -1191,8 +1208,8 @@ module FusionAuth
1191
1208
  end
1192
1209
 
1193
1210
  #
1194
- # Deletes the users with the given ids, or users matching the provided JSON query or queryString.
1195
- # The order of preference is ids, query and then queryString, it is recommended to only provide one of the three for the request.
1211
+ # Deletes the users with the given Ids, or users matching the provided JSON query or queryString.
1212
+ # The order of preference is Ids, query and then queryString, it is recommended to only provide one of the three for the request.
1196
1213
  #
1197
1214
  # This method can be used to deactivate or permanently delete (hard-delete) users based upon the hardDelete boolean in the request body.
1198
1215
  # Using the dryRun parameter you may also request the result of the action without actually deleting or deactivating any users.
@@ -1208,8 +1225,8 @@ module FusionAuth
1208
1225
  end
1209
1226
 
1210
1227
  #
1211
- # Deletes the users with the given ids, or users matching the provided JSON query or queryString.
1212
- # The order of preference is ids, query and then queryString, it is recommended to only provide one of the three for the request.
1228
+ # Deletes the users with the given Ids, or users matching the provided JSON query or queryString.
1229
+ # The order of preference is Ids, query and then queryString, it is recommended to only provide one of the three for the request.
1213
1230
  #
1214
1231
  # This method can be used to deactivate or permanently delete (hard-delete) users based upon the hardDelete boolean in the request body.
1215
1232
  # Using the dryRun parameter you may also request the result of the action without actually deleting or deactivating any users.
@@ -1730,7 +1747,7 @@ module FusionAuth
1730
1747
  # Modifies a temporal user action by changing the expiration of the action and optionally adding a comment to the
1731
1748
  # action.
1732
1749
  #
1733
- # @param action_id [string] The Id of the action to modify. This is technically the user action log id.
1750
+ # @param action_id [string] The Id of the action to modify. This is technically the user action log Id.
1734
1751
  # @param request [OpenStruct, Hash] The request that contains all the information about the modification.
1735
1752
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
1736
1753
  def modify_action(action_id, request)
@@ -1754,16 +1771,16 @@ module FusionAuth
1754
1771
  end
1755
1772
 
1756
1773
  #
1757
- # Updates an authentication API key by given id
1774
+ # Updates an API key with the given Id.
1758
1775
  #
1759
- # @param key_id [string] The Id of the authentication key. If not provided a secure random api key will be generated.
1760
- # @param request [OpenStruct, Hash] The request object that contains all the information needed to create the APIKey.
1776
+ # @param key_id [string] The Id of the API key. If not provided a secure random api key will be generated.
1777
+ # @param request [OpenStruct, Hash] The request object that contains all the information needed to create the API key.
1761
1778
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
1762
1779
  def patch_api_key(key_id, request)
1763
1780
  start.uri('/api/api-key')
1764
1781
  .url_segment(key_id)
1765
1782
  .body_handler(FusionAuth::JSONBodyHandler.new(request))
1766
- .post
1783
+ .patch
1767
1784
  .go
1768
1785
  end
1769
1786
 
@@ -1840,6 +1857,20 @@ module FusionAuth
1840
1857
  .go
1841
1858
  end
1842
1859
 
1860
+ #
1861
+ # Updates, via PATCH, the Entity with the given Id.
1862
+ #
1863
+ # @param entity_id [string] The Id of the Entity Type to update.
1864
+ # @param request [OpenStruct, Hash] The request that contains just the new Entity information.
1865
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
1866
+ def patch_entity(entity_id, request)
1867
+ start.uri('/api/entity')
1868
+ .url_segment(entity_id)
1869
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
1870
+ .patch
1871
+ .go
1872
+ end
1873
+
1843
1874
  #
1844
1875
  # Updates, via PATCH, the Entity Type with the given Id.
1845
1876
  #
@@ -1854,6 +1885,51 @@ module FusionAuth
1854
1885
  .go
1855
1886
  end
1856
1887
 
1888
+ #
1889
+ # Patches the permission with the given Id for the entity type.
1890
+ #
1891
+ # @param entity_type_id [string] The Id of the entityType that the permission belongs to.
1892
+ # @param permission_id [string] The Id of the permission to patch.
1893
+ # @param request [OpenStruct, Hash] The request that contains the new permission information.
1894
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
1895
+ def patch_entity_type_permission(entity_type_id, permission_id, request)
1896
+ start.uri('/api/entity/type')
1897
+ .url_segment(entity_type_id)
1898
+ .url_segment("permission")
1899
+ .url_segment(permission_id)
1900
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
1901
+ .patch
1902
+ .go
1903
+ end
1904
+
1905
+ #
1906
+ # Patches the form with the given Id.
1907
+ #
1908
+ # @param form_id [string] The Id of the form to patch.
1909
+ # @param request [OpenStruct, Hash] The request object that contains the new form information.
1910
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
1911
+ def patch_form(form_id, request)
1912
+ start.uri('/api/form')
1913
+ .url_segment(form_id)
1914
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
1915
+ .patch
1916
+ .go
1917
+ end
1918
+
1919
+ #
1920
+ # Patches the form field with the given Id.
1921
+ #
1922
+ # @param field_id [string] The Id of the form field to patch.
1923
+ # @param request [OpenStruct, Hash] The request object that contains the new form field information.
1924
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
1925
+ def patch_form_field(field_id, request)
1926
+ start.uri('/api/form/field')
1927
+ .url_segment(field_id)
1928
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
1929
+ .patch
1930
+ .go
1931
+ end
1932
+
1857
1933
  #
1858
1934
  # Updates, via PATCH, the group with the given Id.
1859
1935
  #
@@ -1868,6 +1944,20 @@ module FusionAuth
1868
1944
  .go
1869
1945
  end
1870
1946
 
1947
+ #
1948
+ # Update the IP Access Control List with the given Id.
1949
+ #
1950
+ # @param access_control_list_id [string] The Id of the IP Access Control List to patch.
1951
+ # @param request [OpenStruct, Hash] The request that contains the new IP Access Control List information.
1952
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
1953
+ def patch_ip_access_control_list(access_control_list_id, request)
1954
+ start.uri('/api/ip-acl')
1955
+ .url_segment(access_control_list_id)
1956
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
1957
+ .patch
1958
+ .go
1959
+ end
1960
+
1871
1961
  #
1872
1962
  # Updates, via PATCH, the identity provider with the given Id.
1873
1963
  #
@@ -2063,6 +2153,20 @@ module FusionAuth
2063
2153
  .go
2064
2154
  end
2065
2155
 
2156
+ #
2157
+ # Patches the webhook with the given Id.
2158
+ #
2159
+ # @param webhook_id [string] The Id of the webhook to update.
2160
+ # @param request [OpenStruct, Hash] The request that contains the new webhook information.
2161
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
2162
+ def patch_webhook(webhook_id, request)
2163
+ start.uri('/api/webhook')
2164
+ .url_segment(webhook_id)
2165
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
2166
+ .patch
2167
+ .go
2168
+ end
2169
+
2066
2170
  #
2067
2171
  # Reactivates the application with the given Id.
2068
2172
  #
@@ -2185,7 +2289,7 @@ module FusionAuth
2185
2289
  end
2186
2290
 
2187
2291
  #
2188
- # Removes a user from the family with the given id.
2292
+ # Removes a user from the family with the given Id.
2189
2293
  #
2190
2294
  # @param family_id [string] The Id of the family to remove the user from.
2191
2295
  # @param user_id [string] The Id of the user to remove from the family.
@@ -2240,7 +2344,7 @@ module FusionAuth
2240
2344
  end
2241
2345
 
2242
2346
  #
2243
- # Retrieves an authentication API key for the given id
2347
+ # Retrieves an authentication API key for the given Id.
2244
2348
  #
2245
2349
  # @param key_id [string] The Id of the API key to retrieve.
2246
2350
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
@@ -2306,7 +2410,7 @@ module FusionAuth
2306
2410
  #
2307
2411
  # Retrieves the application for the given Id or all the applications if the Id is null.
2308
2412
  #
2309
- # @param application_id [string] (Optional) The application id.
2413
+ # @param application_id [string] (Optional) The application Id.
2310
2414
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
2311
2415
  def retrieve_application(application_id)
2312
2416
  start.uri('/api/application')
@@ -2382,10 +2486,10 @@ module FusionAuth
2382
2486
  end
2383
2487
 
2384
2488
  #
2385
- # Retrieves the daily active user report between the two instants. If you specify an application id, it will only
2489
+ # Retrieves the daily active user report between the two instants. If you specify an application Id, it will only
2386
2490
  # return the daily active counts for that application.
2387
2491
  #
2388
- # @param application_id [string] (Optional) The application id.
2492
+ # @param application_id [string] (Optional) The application Id.
2389
2493
  # @param start [OpenStruct, Hash] The start instant as UTC milliseconds since Epoch.
2390
2494
  # @param _end [OpenStruct, Hash] The end instant as UTC milliseconds since Epoch.
2391
2495
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
@@ -2399,7 +2503,7 @@ module FusionAuth
2399
2503
  end
2400
2504
 
2401
2505
  #
2402
- # Retrieves the email template for the given Id. If you don't specify the id, this will return all the email templates.
2506
+ # Retrieves the email template for the given Id. If you don't specify the Id, this will return all the email templates.
2403
2507
  #
2404
2508
  # @param email_template_id [string] (Optional) The Id of the email template.
2405
2509
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
@@ -2782,10 +2886,10 @@ module FusionAuth
2782
2886
  end
2783
2887
 
2784
2888
  #
2785
- # Retrieves the login report between the two instants. If you specify an application id, it will only return the
2889
+ # Retrieves the login report between the two instants. If you specify an application Id, it will only return the
2786
2890
  # login counts for that application.
2787
2891
  #
2788
- # @param application_id [string] (Optional) The application id.
2892
+ # @param application_id [string] (Optional) The application Id.
2789
2893
  # @param start [OpenStruct, Hash] The start instant as UTC milliseconds since Epoch.
2790
2894
  # @param _end [OpenStruct, Hash] The end instant as UTC milliseconds since Epoch.
2791
2895
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
@@ -2799,7 +2903,7 @@ module FusionAuth
2799
2903
  end
2800
2904
 
2801
2905
  #
2802
- # Retrieves the message template for the given Id. If you don't specify the id, this will return all the message templates.
2906
+ # Retrieves the message template for the given Id. If you don't specify the Id, this will return all the message templates.
2803
2907
  #
2804
2908
  # @param message_template_id [string] (Optional) The Id of the message template.
2805
2909
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
@@ -2855,10 +2959,10 @@ module FusionAuth
2855
2959
  end
2856
2960
 
2857
2961
  #
2858
- # Retrieves the monthly active user report between the two instants. If you specify an application id, it will only
2962
+ # Retrieves the monthly active user report between the two instants. If you specify an application Id, it will only
2859
2963
  # return the monthly active counts for that application.
2860
2964
  #
2861
- # @param application_id [string] (Optional) The application id.
2965
+ # @param application_id [string] (Optional) The application Id.
2862
2966
  # @param start [OpenStruct, Hash] The start instant as UTC milliseconds since Epoch.
2863
2967
  # @param _end [OpenStruct, Hash] The end instant as UTC milliseconds since Epoch.
2864
2968
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
@@ -3021,7 +3125,7 @@ module FusionAuth
3021
3125
  end
3022
3126
 
3023
3127
  #
3024
- # Retrieves the user registration for the user with the given Id and the given application id.
3128
+ # Retrieves the user registration for the user with the given Id and the given application Id.
3025
3129
  #
3026
3130
  # @param user_id [string] The Id of the user.
3027
3131
  # @param application_id [string] The Id of the application.
@@ -3035,10 +3139,10 @@ module FusionAuth
3035
3139
  end
3036
3140
 
3037
3141
  #
3038
- # Retrieves the registration report between the two instants. If you specify an application id, it will only return
3142
+ # Retrieves the registration report between the two instants. If you specify an application Id, it will only return
3039
3143
  # the registration counts for that application.
3040
3144
  #
3041
- # @param application_id [string] (Optional) The application id.
3145
+ # @param application_id [string] (Optional) The application Id.
3042
3146
  # @param start [OpenStruct, Hash] The start instant as UTC milliseconds since Epoch.
3043
3147
  # @param _end [OpenStruct, Hash] The end instant as UTC milliseconds since Epoch.
3044
3148
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
@@ -3201,7 +3305,7 @@ module FusionAuth
3201
3305
  end
3202
3306
 
3203
3307
  #
3204
- # Retrieves the user action for the given Id. If you pass in null for the id, this will return all the user
3308
+ # Retrieves the user action for the given Id. If you pass in null for the Id, this will return all the user
3205
3309
  # actions.
3206
3310
  #
3207
3311
  # @param user_action_id [string] (Optional) The Id of the user action.
@@ -3214,7 +3318,7 @@ module FusionAuth
3214
3318
  end
3215
3319
 
3216
3320
  #
3217
- # Retrieves the user action reason for the given Id. If you pass in null for the id, this will return all the user
3321
+ # Retrieves the user action reason for the given Id. If you pass in null for the Id, this will return all the user
3218
3322
  # action reasons.
3219
3323
  #
3220
3324
  # @param user_action_reason_id [string] (Optional) The Id of the user action reason.
@@ -3313,8 +3417,8 @@ module FusionAuth
3313
3417
  #
3314
3418
  # This API is useful if you want to build your own login workflow to complete a device grant.
3315
3419
  #
3316
- # @param client_id [string] The client id.
3317
- # @param client_secret [string] The client id.
3420
+ # @param client_id [string] The client Id.
3421
+ # @param client_secret [string] The client Id.
3318
3422
  # @param user_code [string] The end-user verification code.
3319
3423
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
3320
3424
  def retrieve_user_code(client_id, client_secret, user_code)
@@ -3427,11 +3531,11 @@ module FusionAuth
3427
3531
  end
3428
3532
 
3429
3533
  #
3430
- # 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
3534
+ # 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
3431
3535
  # login counts for that application.
3432
3536
  #
3433
- # @param application_id [string] (Optional) The application id.
3434
- # @param user_id [string] The userId id.
3537
+ # @param application_id [string] (Optional) The application Id.
3538
+ # @param user_id [string] The userId Id.
3435
3539
  # @param start [OpenStruct, Hash] The start instant as UTC milliseconds since Epoch.
3436
3540
  # @param _end [OpenStruct, Hash] The end instant as UTC milliseconds since Epoch.
3437
3541
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
@@ -3446,11 +3550,11 @@ module FusionAuth
3446
3550
  end
3447
3551
 
3448
3552
  #
3449
- # Retrieves the login report between the two instants for a particular user by login Id. If you specify an application id, it will only return the
3553
+ # Retrieves the login report between the two instants for a particular user by login Id. If you specify an application Id, it will only return the
3450
3554
  # login counts for that application.
3451
3555
  #
3452
- # @param application_id [string] (Optional) The application id.
3453
- # @param login_id [string] The userId id.
3556
+ # @param application_id [string] (Optional) The application Id.
3557
+ # @param login_id [string] The userId Id.
3454
3558
  # @param start [OpenStruct, Hash] The start instant as UTC milliseconds since Epoch.
3455
3559
  # @param _end [OpenStruct, Hash] The end instant as UTC milliseconds since Epoch.
3456
3560
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
@@ -3527,7 +3631,7 @@ module FusionAuth
3527
3631
  end
3528
3632
 
3529
3633
  #
3530
- # Retrieves the webhook for the given Id. If you pass in null for the id, this will return all the webhooks.
3634
+ # Retrieves the webhook for the given Id. If you pass in null for the Id, this will return all the webhooks.
3531
3635
  #
3532
3636
  # @param webhook_id [string] (Optional) The Id of the webhook.
3533
3637
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
@@ -3759,7 +3863,7 @@ module FusionAuth
3759
3863
  end
3760
3864
 
3761
3865
  #
3762
- # Retrieves the entities for the given ids. If any Id is invalid, it is ignored.
3866
+ # Retrieves the entities for the given Ids. If any Id is invalid, it is ignored.
3763
3867
  #
3764
3868
  # @param ids [Array] The entity ids to search for.
3765
3869
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
@@ -3927,7 +4031,7 @@ module FusionAuth
3927
4031
  end
3928
4032
 
3929
4033
  #
3930
- # Retrieves the users for the given ids. If any Id is invalid, it is ignored.
4034
+ # Retrieves the users for the given Ids. If any Id is invalid, it is ignored.
3931
4035
  #
3932
4036
  # @param ids [Array] The user ids to search for.
3933
4037
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
@@ -3940,9 +4044,9 @@ module FusionAuth
3940
4044
  end
3941
4045
 
3942
4046
  #
3943
- # Retrieves the users for the given ids. If any Id is invalid, it is ignored.
4047
+ # Retrieves the users for the given Ids. If any Id is invalid, it is ignored.
3944
4048
  #
3945
- # @param ids [Array] The user ids to search for.
4049
+ # @param ids [Array] The user Ids to search for.
3946
4050
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
3947
4051
  def search_users_by_ids(ids)
3948
4052
  start.uri('/api/user/search')
@@ -4003,7 +4107,7 @@ module FusionAuth
4003
4107
  end
4004
4108
 
4005
4109
  #
4006
- # Send an email using an email template id. You can optionally provide <code>requestData</code> to access key value
4110
+ # Send an email using an email template Id. You can optionally provide <code>requestData</code> to access key value
4007
4111
  # pairs in the email template.
4008
4112
  #
4009
4113
  # @param email_template_id [string] The Id for the template.
@@ -4173,14 +4277,14 @@ module FusionAuth
4173
4277
  end
4174
4278
 
4175
4279
  #
4176
- # Updates an API key by given id
4280
+ # Updates an API key with the given Id.
4177
4281
  #
4178
- # @param api_key_id [string] The Id of the API key to update.
4179
- # @param request [OpenStruct, Hash] The request object that contains all the information used to create the API Key.
4282
+ # @param key_id [string] The Id of the API key to update.
4283
+ # @param request [OpenStruct, Hash] The request that contains all the new API key information.
4180
4284
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
4181
- def update_api_key(api_key_id, request)
4285
+ def update_api_key(key_id, request)
4182
4286
  start.uri('/api/api-key')
4183
- .url_segment(api_key_id)
4287
+ .url_segment(key_id)
4184
4288
  .body_handler(FusionAuth::JSONBodyHandler.new(request))
4185
4289
  .put
4186
4290
  .go
@@ -4304,6 +4408,20 @@ module FusionAuth
4304
4408
  .go
4305
4409
  end
4306
4410
 
4411
+ #
4412
+ # Updates a family with a given Id.
4413
+ #
4414
+ # @param family_id [string] The Id of the family to update.
4415
+ # @param request [OpenStruct, Hash] The request object that contains all the new family information.
4416
+ # @return [FusionAuth::ClientResponse] The ClientResponse object.
4417
+ def update_family(family_id, request)
4418
+ start.uri('/api/user/family')
4419
+ .url_segment(family_id)
4420
+ .body_handler(FusionAuth::JSONBodyHandler.new(request))
4421
+ .put
4422
+ .go
4423
+ end
4424
+
4307
4425
  #
4308
4426
  # Updates the form with the given Id.
4309
4427
  #
@@ -4615,7 +4733,7 @@ module FusionAuth
4615
4733
  # If you build your own activation form you should validate the user provided code prior to beginning the Authorization grant.
4616
4734
  #
4617
4735
  # @param user_code [string] The end-user verification code.
4618
- # @param client_id [string] The client id.
4736
+ # @param client_id [string] The client Id.
4619
4737
  # @return [FusionAuth::ClientResponse] The ClientResponse object.
4620
4738
  def validate_device(user_code, client_id)
4621
4739
  startAnonymous.uri('/oauth2/device/validate')
data/run-act.sh ADDED
@@ -0,0 +1,130 @@
1
+ #!/usr/bin/env bash
2
+
3
+ set -o errexit
4
+ set -o nounset
5
+ set -o pipefail
6
+
7
+ EVENT="workflow_dispatch"
8
+ INPUTS=""
9
+ PARSED_INPUTS=()
10
+ PROFILE=""
11
+ VERBOSE=false
12
+ WORKFLOW=""
13
+
14
+ # Script metadata. Don't modify this.
15
+ MYDIR=$(cd -- "$(dirname "$0")" >/dev/null 2>&1; pwd -P)
16
+ cd "${MYDIR}"
17
+ MYNAME=$(basename "$0")
18
+
19
+ # Configure colorful messages.
20
+ GRAY=$(tput setaf 248)
21
+ GREEN=$(tput setaf 2)
22
+ RED=$(tput setaf 202)
23
+ RESET=$(tput sgr0)
24
+
25
+ # Output formatting.
26
+ function success() { echo -e "${GREEN}${1}${RESET}"; }
27
+ function info() { echo -e "${GRAY}${1}${RESET}"; }
28
+ function error() { echo -e "${RED}ERROR: ${1}${RESET}" >&2; }
29
+ function fail() { echo -e "\n${RED}ERROR: ${1}${RESET}" >&2; exit 1; }
30
+ function argerr() { echo -e "\n${RED}ERROR: ${1}${RESET}" >&2; show_help; }
31
+
32
+ # Helper functions.
33
+ function file_missing() { if [[ -f "${1}" ]]; then return 1; else return 0; fi }
34
+
35
+ function show_help() {
36
+ echo -e "\nUsage: ${MYNAME} --workflow [workflow-name.yaml] --profile [aws-profile-name]\n"
37
+ echo -e " Flags Description Req Default"
38
+ echo -e " ------------- ---------------------------- --- -------------------"
39
+ echo -e " -e --event Github event to simulate workflow_dispatch"
40
+ echo -e " -i --inputs CSV list of k/v pairs * ${GRAY}null${RESET}"
41
+ echo -e " -p --profile AWS profile to use for auth Y ${GRAY}null${RESET}"
42
+ echo -e " -v --verbose Enable verbose mode (set -xv) ${GRAY}disabled${RESET}"
43
+ echo -e " -w --workflow Path/file of workflow to run Y ${GRAY}null${RESET}"
44
+ echo -e " -h --help Show this message\n"
45
+ echo -e " * --inputs requirements are determined by the workflow.\n"
46
+ echo -e "See https://nektosact.com/ for more info about 'act'.\n"
47
+ exit
48
+ }
49
+
50
+
51
+ function parse_args() {
52
+ # Parse the args.
53
+ while [[ $# -gt 0 ]]; do
54
+ case $1 in
55
+ -e|--event) shift
56
+ if (( $# < 1 )); then argerr "--event requires an event type [push|pull_request|workflow_dispatch]"
57
+ else EVENT="${1}"; fi
58
+ shift;;
59
+ -i|--inputs) shift
60
+ if (( $# < 1 )); then argerr "--inputs requires a csv list of input args"
61
+ else INPUTS="${1}"; fi
62
+ shift;;
63
+ -p|--profile) shift
64
+ if (( $# < 1 )); then argerr "--profile requires an AWS profile name"
65
+ else PROFILE="${1}"; fi
66
+ shift;;
67
+ -w|--workflow) shift
68
+ if (( $# < 1 )); then argerr "--workflow requires a path to a workflow file"
69
+ else WORKFLOW="${1}"; fi
70
+ shift;;
71
+ -v|--verbose) VERBOSE=true; shift;;
72
+ -h|--help) show_help;;
73
+ *) argerr "Unknown argument '$1'";;
74
+ esac
75
+ done
76
+
77
+ # Enable verbose mode if requested.
78
+ if [ "${VERBOSE}" = true ]; then set -xv; fi
79
+
80
+ # Make sure --workflow is passed.
81
+ if [[ -z "${WORKFLOW}" ]]; then argerr "--workflow is required"; fi
82
+ # Make sure --workflow is passed.
83
+ if [[ -z "${PROFILE}" ]]; then argerr "--profile is required"; fi
84
+ # Make sure workflow file exists
85
+ if file_missing "${WORKFLOW}"; then fail "Workflow '${WORKFLOW}' does not exist"; fi
86
+ }
87
+
88
+
89
+ function validate_prereqs() {
90
+ local prereqs="act gh"
91
+ for p in ${prereqs}; do
92
+ if ! command -v "${p}" &>/dev/null; then
93
+ error "${p} not found. Install it and try again."
94
+ if [[ "${p}" == "gh" ]]; then
95
+ info "\nAfter installing gh, login:"
96
+ info " gh auth login"
97
+ info "\nMake sure you can get a token:"
98
+ info " gh auth token"
99
+ fi
100
+ exit 1
101
+ fi
102
+ done
103
+ }
104
+
105
+
106
+ function parse_inputs() {
107
+ if [[ -n "${INPUTS}" ]]; then
108
+ IFS=","
109
+ for i in ${INPUTS}; do
110
+ PARSED_INPUTS+=(--input "${i}")
111
+ done
112
+ fi
113
+ }
114
+
115
+
116
+ function main() {
117
+ parse_args "$@"
118
+ validate_prereqs
119
+ parse_inputs
120
+
121
+ act "${EVENT}" \
122
+ --secret GITHUB_TOKEN="$(gh auth token)" \
123
+ --secret-file .env \
124
+ --workflows "${WORKFLOW}" \
125
+ --env-file <(aws configure export-credentials --profile "${PROFILE}" --format env) \
126
+ "${PARSED_INPUTS[@]}"
127
+ }
128
+
129
+
130
+ main "$@"
metadata CHANGED
@@ -1,15 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fusionauth_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.56.0
4
+ version: 1.58.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Pontarelli
8
8
  - Daniel DeGroff
9
- autorequire:
10
9
  bindir: exe
11
10
  cert_chain: []
12
- date: 2025-03-07 00:00:00.000000000 Z
11
+ date: 2025-07-21 00:00:00.000000000 Z
13
12
  dependencies: []
14
13
  description: This library contains the Ruby client library that helps you connect
15
14
  your application to FusionAuth.
@@ -90,12 +89,12 @@ files:
90
89
  - fusionauth_client.gemspec
91
90
  - lib/fusionauth/fusionauth_client.rb
92
91
  - lib/fusionauth/rest_client.rb
92
+ - run-act.sh
93
93
  homepage: https://github.com/FusionAuth/fusionauth-ruby-client
94
94
  licenses:
95
95
  - Apache-2.0
96
96
  metadata:
97
97
  allowed_push_host: https://rubygems.org
98
- post_install_message:
99
98
  rdoc_options: []
100
99
  require_paths:
101
100
  - lib
@@ -110,8 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
110
109
  - !ruby/object:Gem::Version
111
110
  version: '0'
112
111
  requirements: []
113
- rubygems_version: 3.4.22
114
- signing_key:
112
+ rubygems_version: 3.6.2
115
113
  specification_version: 4
116
114
  summary: The Ruby client library for FusionAuth
117
115
  test_files: []