vortex-ruby-sdk 1.6.0 → 1.8.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 +4 -4
- data/README.md +3 -3
- data/lib/vortex/client.rb +21 -0
- data/lib/vortex/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d8b96f994327d61bfa1cb19ee512a9da227762c0212413cb3de3871e9bc26b56
|
|
4
|
+
data.tar.gz: f3750eb0f15fd83a76d5b15da5adf1b39f004b657abb3ac79b811ba56980dce3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 73d8968550bb227d4c49fa888e454e3307c8797a33b6812f6cff9b00e48ee144a0396c32492f858e5c8ae02e2a558ecdc56ca192a18dfc4f0d17d81cd57654ea
|
|
7
|
+
data.tar.gz: ab1f06dea51572aa0853ad271cdff44afdb2d502bddedaef32d4c9e3502c74810006af768fe670a8e1a7f8094c9516557e7f006fc0513e3c9764e6d57472c731
|
data/README.md
CHANGED
|
@@ -58,8 +58,8 @@ jwt = client.generate_jwt(user: user)
|
|
|
58
58
|
# Get invitations by target
|
|
59
59
|
invitations = client.get_invitations_by_target('email', 'user@example.com')
|
|
60
60
|
|
|
61
|
-
# Accept
|
|
62
|
-
client.
|
|
61
|
+
# Accept an invitation
|
|
62
|
+
client.accept_invitation('inv-123', { email: 'user@example.com' })
|
|
63
63
|
|
|
64
64
|
# Get invitations by group
|
|
65
65
|
group_invitations = client.get_invitations_by_group('team', 'team1')
|
|
@@ -170,7 +170,7 @@ All methods match the functionality of other Vortex SDKs:
|
|
|
170
170
|
- `get_invitations_by_target(target_type, target_value)` - Get invitations by target
|
|
171
171
|
- `get_invitation(invitation_id)` - Get specific invitation
|
|
172
172
|
- `revoke_invitation(invitation_id)` - Revoke invitation
|
|
173
|
-
- `
|
|
173
|
+
- `accept_invitation(invitation_id, user)` - Accept an invitation
|
|
174
174
|
- `get_invitations_by_group(group_type, group_id)` - Get group invitations
|
|
175
175
|
- `delete_invitations_by_group(group_type, group_id)` - Delete group invitations
|
|
176
176
|
- `reinvite(invitation_id)` - Reinvite user
|
data/lib/vortex/client.rb
CHANGED
|
@@ -95,6 +95,11 @@ module Vortex
|
|
|
95
95
|
payload[:adminScopes] = user[:admin_scopes]
|
|
96
96
|
end
|
|
97
97
|
|
|
98
|
+
# Add allowedEmailDomains if present (for domain-restricted invitations)
|
|
99
|
+
if user[:allowed_email_domains] && !user[:allowed_email_domains].empty?
|
|
100
|
+
payload[:allowedEmailDomains] = user[:allowed_email_domains]
|
|
101
|
+
end
|
|
102
|
+
|
|
98
103
|
# Add any additional properties from attributes
|
|
99
104
|
if attributes && !attributes.empty?
|
|
100
105
|
payload.merge!(attributes)
|
|
@@ -248,6 +253,22 @@ module Vortex
|
|
|
248
253
|
raise VortexError, "Failed to accept invitations: #{e.message}"
|
|
249
254
|
end
|
|
250
255
|
|
|
256
|
+
# Accept a single invitation (recommended method)
|
|
257
|
+
#
|
|
258
|
+
# This is the recommended method for accepting invitations.
|
|
259
|
+
#
|
|
260
|
+
# @param invitation_id [String] Single invitation ID to accept
|
|
261
|
+
# @param user [Hash] User hash with :email and/or :phone
|
|
262
|
+
# @return [Hash] The accepted invitation result
|
|
263
|
+
# @raise [VortexError] If the request fails
|
|
264
|
+
#
|
|
265
|
+
# @example
|
|
266
|
+
# user = { email: 'user@example.com', name: 'John Doe' }
|
|
267
|
+
# result = client.accept_invitation('inv-123', user)
|
|
268
|
+
def accept_invitation(invitation_id, user)
|
|
269
|
+
accept_invitations([invitation_id], user)
|
|
270
|
+
end
|
|
271
|
+
|
|
251
272
|
# Get invitations by group
|
|
252
273
|
#
|
|
253
274
|
# @param group_type [String] The group type
|
data/lib/vortex/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: vortex-ruby-sdk
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.8.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Vortex Software
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-02-
|
|
11
|
+
date: 2026-02-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|