vortex-ruby-sdk 1.9.0 → 1.18.0.pre.20260427181620
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/.claude/implementation-guide.md +55 -29
- data/README.md +679 -210
- data/examples/basic_usage.rb +1 -1
- data/examples/rails_app.rb +6 -6
- data/examples/sinatra_app.rb +4 -4
- data/lib/vortex/client.rb +324 -36
- data/lib/vortex/rails.rb +14 -14
- data/lib/vortex/sinatra.rb +10 -10
- data/lib/vortex/types.rb +11 -7
- data/lib/vortex/version.rb +1 -1
- metadata +4 -4
data/lib/vortex/sinatra.rb
CHANGED
|
@@ -142,8 +142,8 @@ module Vortex
|
|
|
142
142
|
end
|
|
143
143
|
|
|
144
144
|
# Get invitations by group
|
|
145
|
-
# GET /api/vortex/invitations/by-
|
|
146
|
-
app.get '/api/vortex/invitations/by-
|
|
145
|
+
# GET /api/vortex/invitations/by-scope/:scope_type/:scope
|
|
146
|
+
app.get '/api/vortex/invitations/by-scope/:scope_type/:scope' do
|
|
147
147
|
with_vortex_error_handling do
|
|
148
148
|
user = authenticate_vortex_user
|
|
149
149
|
return render_unauthorized('Authentication required') unless user
|
|
@@ -152,17 +152,17 @@ module Vortex
|
|
|
152
152
|
return render_forbidden('Not authorized to get group invitations')
|
|
153
153
|
end
|
|
154
154
|
|
|
155
|
-
|
|
156
|
-
|
|
155
|
+
scope_type = params['scope_type']
|
|
156
|
+
scope = params['scope']
|
|
157
157
|
|
|
158
|
-
invitations = vortex_client.
|
|
158
|
+
invitations = vortex_client.get_invitations_by_scope(scope_type, scope)
|
|
159
159
|
render_json({ invitations: invitations })
|
|
160
160
|
end
|
|
161
161
|
end
|
|
162
162
|
|
|
163
163
|
# Delete invitations by group
|
|
164
|
-
# DELETE /api/vortex/invitations/by-
|
|
165
|
-
app.delete '/api/vortex/invitations/by-
|
|
164
|
+
# DELETE /api/vortex/invitations/by-scope/:scope_type/:scope
|
|
165
|
+
app.delete '/api/vortex/invitations/by-scope/:scope_type/:scope' do
|
|
166
166
|
with_vortex_error_handling do
|
|
167
167
|
user = authenticate_vortex_user
|
|
168
168
|
return render_unauthorized('Authentication required') unless user
|
|
@@ -171,10 +171,10 @@ module Vortex
|
|
|
171
171
|
return render_forbidden('Not authorized to delete group invitations')
|
|
172
172
|
end
|
|
173
173
|
|
|
174
|
-
|
|
175
|
-
|
|
174
|
+
scope_type = params['scope_type']
|
|
175
|
+
scope = params['scope']
|
|
176
176
|
|
|
177
|
-
vortex_client.
|
|
177
|
+
vortex_client.delete_invitations_by_scope(scope_type, scope)
|
|
178
178
|
render_json({ success: true })
|
|
179
179
|
end
|
|
180
180
|
end
|
data/lib/vortex/types.rb
CHANGED
|
@@ -19,7 +19,7 @@ module Vortex
|
|
|
19
19
|
name: String # Required: Group name
|
|
20
20
|
}.freeze
|
|
21
21
|
|
|
22
|
-
#
|
|
22
|
+
# InvitationScope structure from API responses
|
|
23
23
|
# This matches the MemberGroups table structure from the API
|
|
24
24
|
# @example
|
|
25
25
|
# {
|
|
@@ -44,12 +44,14 @@ module Vortex
|
|
|
44
44
|
# {
|
|
45
45
|
# email: 'user@example.com',
|
|
46
46
|
# phone: '+1234567890', # Optional
|
|
47
|
-
# name: 'John Doe'
|
|
47
|
+
# name: 'John Doe', # Optional
|
|
48
|
+
# is_existing: true # Optional - whether user was already registered
|
|
48
49
|
# }
|
|
49
50
|
ACCEPT_USER = {
|
|
50
|
-
email: String,
|
|
51
|
-
phone: String,
|
|
52
|
-
name: String
|
|
51
|
+
email: String, # Optional but either email or phone must be provided
|
|
52
|
+
phone: String, # Optional but either email or phone must be provided
|
|
53
|
+
name: String, # Optional
|
|
54
|
+
is_existing: 'Boolean (true/false/nil)' # Optional - true if existing user, false if new signup, nil if unknown
|
|
53
55
|
}.freeze
|
|
54
56
|
|
|
55
57
|
# Invitation structure from API responses
|
|
@@ -79,6 +81,9 @@ module Vortex
|
|
|
79
81
|
id: String,
|
|
80
82
|
accountId: String,
|
|
81
83
|
clickThroughs: Integer,
|
|
84
|
+
# Invitation form data submitted by the user, including email addresses of invitees and the values of any custom fields.
|
|
85
|
+
formSubmissionData: Hash,
|
|
86
|
+
# @deprecated Use formSubmissionData instead. Contains the same data.
|
|
82
87
|
configurationAttributes: Hash,
|
|
83
88
|
attributes: Hash,
|
|
84
89
|
createdAt: String,
|
|
@@ -92,9 +97,8 @@ module Vortex
|
|
|
92
97
|
target: Array, # of INVITATION_TARGET structures
|
|
93
98
|
views: Integer,
|
|
94
99
|
widgetConfigurationId: String,
|
|
95
|
-
projectId: String,
|
|
96
100
|
groups: Array, # of INVITATION_GROUP structures
|
|
97
|
-
accepts: Array, # of acceptance structures
|
|
101
|
+
accepts: Array, # of acceptance structures (optional)
|
|
98
102
|
expired: :boolean,
|
|
99
103
|
expires: String # ISO 8601 timestamp (optional)
|
|
100
104
|
}.freeze
|
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.18.0.pre.20260427181620
|
|
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-
|
|
11
|
+
date: 2026-04-27 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|
|
@@ -182,9 +182,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
182
182
|
version: 3.0.0
|
|
183
183
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
184
184
|
requirements:
|
|
185
|
-
- - "
|
|
185
|
+
- - ">"
|
|
186
186
|
- !ruby/object:Gem::Version
|
|
187
|
-
version:
|
|
187
|
+
version: 1.3.1
|
|
188
188
|
requirements: []
|
|
189
189
|
rubygems_version: 3.4.19
|
|
190
190
|
signing_key:
|