workos 7.0.0 → 7.1.1
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/.github/workflows/ci.yml +1 -1
- data/.github/workflows/lint.yml +1 -1
- data/.github/workflows/release-please.yml +30 -2
- data/.github/workflows/release.yml +1 -1
- data/.last-synced-sha +1 -0
- data/.oagen-manifest.json +739 -4
- data/.release-please-manifest.json +1 -1
- data/CHANGELOG.md +23 -0
- data/Gemfile.lock +2 -2
- data/README.md +0 -1
- data/lib/workos/admin_portal/domain_verification_intent_options.rb +18 -0
- data/lib/workos/admin_portal/generate_link.rb +3 -3
- data/lib/workos/admin_portal/intent_options.rb +6 -2
- data/lib/workos/admin_portal.rb +3 -3
- data/lib/workos/authorization.rb +61 -67
- data/lib/workos/client.rb +8 -0
- data/lib/workos/directory_sync/directory_user_with_groups.rb +10 -2
- data/lib/workos/groups/create_group.rb +22 -0
- data/lib/workos/groups/create_group_membership.rb +18 -0
- data/lib/workos/groups/update_group.rb +7 -0
- data/lib/workos/groups.rb +256 -0
- data/lib/workos/session.rb +16 -5
- data/lib/workos/shared/waitlist_user.rb +37 -0
- data/lib/workos/shared/waitlist_user_approved.rb +34 -0
- data/lib/workos/shared/waitlist_user_created.rb +34 -0
- data/lib/workos/shared/waitlist_user_denied.rb +34 -0
- data/lib/workos/types/create_webhook_endpoint_events.rb +4 -1
- data/lib/workos/types/groups_order.rb +9 -0
- data/lib/workos/types/sso_provider.rb +10 -1
- data/lib/workos/types/user_management_authentication_provider.rb +10 -1
- data/lib/workos/types/user_management_organization_membership_groups_order.rb +9 -0
- data/lib/workos/types/waitlist_user_state.rb +14 -0
- data/lib/workos/user_management/invitation.rb +3 -0
- data/lib/workos/user_management/invitation_accepted_data.rb +3 -0
- data/lib/workos/user_management/invitation_created_data.rb +3 -0
- data/lib/workos/user_management/invitation_resent_data.rb +3 -0
- data/lib/workos/user_management/invitation_revoked_data.rb +3 -0
- data/lib/workos/user_management/user_invite.rb +3 -0
- data/lib/workos/user_management.rb +32 -40
- data/lib/workos/user_management_organization_membership_groups.rb +60 -0
- data/lib/workos/version.rb +1 -1
- data/lib/workos.rb +4 -0
- data/rbi/workos/admin_portal.rbi +2 -2
- data/rbi/workos/authorization.rbi +13 -12
- data/rbi/workos/client.rbi +6 -0
- data/rbi/workos/create_group.rbi +30 -0
- data/rbi/workos/create_group_membership.rbi +24 -0
- data/rbi/workos/domain_verification_intent_options.rbi +24 -0
- data/rbi/workos/generate_link.rbi +2 -2
- data/rbi/workos/groups.rbi +97 -0
- data/rbi/workos/intent_options.rbi +8 -2
- data/rbi/workos/invitation.rbi +6 -0
- data/rbi/workos/invitation_accepted_data.rbi +6 -0
- data/rbi/workos/invitation_created_data.rbi +6 -0
- data/rbi/workos/invitation_resent_data.rbi +6 -0
- data/rbi/workos/invitation_revoked_data.rbi +6 -0
- data/rbi/workos/update_group.rbi +30 -0
- data/rbi/workos/user_invite.rbi +6 -0
- data/rbi/workos/user_management_organization_membership_groups.rbi +25 -0
- data/rbi/workos/waitlist_user.rbi +60 -0
- data/rbi/workos/waitlist_user_approved.rbi +54 -0
- data/rbi/workos/waitlist_user_created.rbi +54 -0
- data/rbi/workos/waitlist_user_denied.rbi +54 -0
- data/test/workos/test_authorization.rb +33 -33
- data/test/workos/test_groups.rb +89 -0
- data/test/workos/test_model_round_trip.rb +153 -24
- data/test/workos/test_session.rb +125 -0
- data/test/workos/test_user_management_organization_membership_groups.rb +33 -0
- metadata +29 -8
- data/lib/workos/user_management/urn_ietf_params_oauth_grant_type_device_code_session_authenticate_request.rb +0 -8
- data/lib/workos/user_management/urn_workos_oauth_grant_type_email_verification_code_session_authenticate_request.rb +0 -8
- data/lib/workos/user_management/urn_workos_oauth_grant_type_magic_auth_code_session_authenticate_request.rb +0 -8
- data/lib/workos/user_management/urn_workos_oauth_grant_type_mfa_totp_session_authenticate_request.rb +0 -8
- data/lib/workos/user_management/urn_workos_oauth_grant_type_organization_selection_session_authenticate_request.rb +0 -8
- /data/lib/workos/{shared → groups}/group.rb +0 -0
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
require "json"
|
|
6
|
+
|
|
7
|
+
module WorkOS
|
|
8
|
+
class Groups
|
|
9
|
+
def initialize(client)
|
|
10
|
+
@client = client
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
# List groups
|
|
14
|
+
# @param organization_id [String] The ID of the organization.
|
|
15
|
+
# @param before [String, nil] An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `before="obj_123"` to fetch a new batch of objects before `"obj_123"`.
|
|
16
|
+
# @param after [String, nil] An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `after="obj_123"` to fetch a new batch of objects after `"obj_123"`.
|
|
17
|
+
# @param limit [Integer, nil] Upper limit on the number of objects to return, between `1` and `100`.
|
|
18
|
+
# @param order [WorkOS::Types::GroupsOrder, nil] Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to descending.
|
|
19
|
+
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
20
|
+
# @return [WorkOS::Types::ListStruct<WorkOS::Group>]
|
|
21
|
+
def list_organization_groups(
|
|
22
|
+
organization_id:,
|
|
23
|
+
before: nil,
|
|
24
|
+
after: nil,
|
|
25
|
+
limit: nil,
|
|
26
|
+
order: "desc",
|
|
27
|
+
request_options: {}
|
|
28
|
+
)
|
|
29
|
+
params = {
|
|
30
|
+
"before" => before,
|
|
31
|
+
"after" => after,
|
|
32
|
+
"limit" => limit,
|
|
33
|
+
"order" => order
|
|
34
|
+
}.compact
|
|
35
|
+
response = @client.request(
|
|
36
|
+
method: :get,
|
|
37
|
+
path: "/organizations/#{WorkOS::Util.encode_path(organization_id)}/groups",
|
|
38
|
+
auth: true,
|
|
39
|
+
params: params,
|
|
40
|
+
request_options: request_options
|
|
41
|
+
)
|
|
42
|
+
fetch_next = ->(cursor) {
|
|
43
|
+
list_organization_groups(
|
|
44
|
+
organization_id: organization_id,
|
|
45
|
+
before: before,
|
|
46
|
+
after: cursor,
|
|
47
|
+
limit: limit,
|
|
48
|
+
order: order,
|
|
49
|
+
request_options: request_options
|
|
50
|
+
)
|
|
51
|
+
}
|
|
52
|
+
WorkOS::Types::ListStruct.from_response(
|
|
53
|
+
response,
|
|
54
|
+
model: WorkOS::Group,
|
|
55
|
+
filters: {organization_id: organization_id, before: before, limit: limit, order: order},
|
|
56
|
+
fetch_next: fetch_next
|
|
57
|
+
)
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Create a group
|
|
61
|
+
# @param organization_id [String] The ID of the organization.
|
|
62
|
+
# @param name [String] The name of the Group.
|
|
63
|
+
# @param description [String, nil] An optional description of the Group.
|
|
64
|
+
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
65
|
+
# @return [WorkOS::Group]
|
|
66
|
+
def create_organization_group(
|
|
67
|
+
organization_id:,
|
|
68
|
+
name:,
|
|
69
|
+
description: nil,
|
|
70
|
+
request_options: {}
|
|
71
|
+
)
|
|
72
|
+
body = {
|
|
73
|
+
"name" => name,
|
|
74
|
+
"description" => description
|
|
75
|
+
}.compact
|
|
76
|
+
response = @client.request(
|
|
77
|
+
method: :post,
|
|
78
|
+
path: "/organizations/#{WorkOS::Util.encode_path(organization_id)}/groups",
|
|
79
|
+
auth: true,
|
|
80
|
+
body: body,
|
|
81
|
+
request_options: request_options
|
|
82
|
+
)
|
|
83
|
+
result = WorkOS::Group.new(response.body)
|
|
84
|
+
result.last_response = WorkOS::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"])
|
|
85
|
+
result
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Get a group
|
|
89
|
+
# @param organization_id [String] The ID of the organization.
|
|
90
|
+
# @param group_id [String] The ID of the group.
|
|
91
|
+
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
92
|
+
# @return [WorkOS::Group]
|
|
93
|
+
def get_organization_group(
|
|
94
|
+
organization_id:,
|
|
95
|
+
group_id:,
|
|
96
|
+
request_options: {}
|
|
97
|
+
)
|
|
98
|
+
response = @client.request(
|
|
99
|
+
method: :get,
|
|
100
|
+
path: "/organizations/#{WorkOS::Util.encode_path(organization_id)}/groups/#{WorkOS::Util.encode_path(group_id)}",
|
|
101
|
+
auth: true,
|
|
102
|
+
request_options: request_options
|
|
103
|
+
)
|
|
104
|
+
result = WorkOS::Group.new(response.body)
|
|
105
|
+
result.last_response = WorkOS::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"])
|
|
106
|
+
result
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# Update a group
|
|
110
|
+
# @param organization_id [String] The ID of the organization.
|
|
111
|
+
# @param group_id [String] The ID of the group.
|
|
112
|
+
# @param name [String, nil] The name of the Group.
|
|
113
|
+
# @param description [String, nil] An optional description of the Group.
|
|
114
|
+
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
115
|
+
# @return [WorkOS::Group]
|
|
116
|
+
def update_organization_group(
|
|
117
|
+
organization_id:,
|
|
118
|
+
group_id:,
|
|
119
|
+
name: nil,
|
|
120
|
+
description: nil,
|
|
121
|
+
request_options: {}
|
|
122
|
+
)
|
|
123
|
+
body = {
|
|
124
|
+
"name" => name,
|
|
125
|
+
"description" => description
|
|
126
|
+
}.compact
|
|
127
|
+
response = @client.request(
|
|
128
|
+
method: :patch,
|
|
129
|
+
path: "/organizations/#{WorkOS::Util.encode_path(organization_id)}/groups/#{WorkOS::Util.encode_path(group_id)}",
|
|
130
|
+
auth: true,
|
|
131
|
+
body: body,
|
|
132
|
+
request_options: request_options
|
|
133
|
+
)
|
|
134
|
+
result = WorkOS::Group.new(response.body)
|
|
135
|
+
result.last_response = WorkOS::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"])
|
|
136
|
+
result
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
# Delete a group
|
|
140
|
+
# @param organization_id [String] The ID of the organization.
|
|
141
|
+
# @param group_id [String] The ID of the group.
|
|
142
|
+
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
143
|
+
# @return [void]
|
|
144
|
+
def delete_organization_group(
|
|
145
|
+
organization_id:,
|
|
146
|
+
group_id:,
|
|
147
|
+
request_options: {}
|
|
148
|
+
)
|
|
149
|
+
@client.request(
|
|
150
|
+
method: :delete,
|
|
151
|
+
path: "/organizations/#{WorkOS::Util.encode_path(organization_id)}/groups/#{WorkOS::Util.encode_path(group_id)}",
|
|
152
|
+
auth: true,
|
|
153
|
+
request_options: request_options
|
|
154
|
+
)
|
|
155
|
+
nil
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
# List Group members
|
|
159
|
+
# @param organization_id [String] Unique identifier of the Organization.
|
|
160
|
+
# @param group_id [String] Unique identifier of the Group.
|
|
161
|
+
# @param before [String, nil] An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `before="obj_123"` to fetch a new batch of objects before `"obj_123"`.
|
|
162
|
+
# @param after [String, nil] An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `after="obj_123"` to fetch a new batch of objects after `"obj_123"`.
|
|
163
|
+
# @param limit [Integer, nil] Upper limit on the number of objects to return, between `1` and `100`.
|
|
164
|
+
# @param order [WorkOS::Types::GroupsOrder, nil] Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to descending.
|
|
165
|
+
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
166
|
+
# @return [WorkOS::Types::ListStruct<WorkOS::UserOrganizationMembershipBaseListData>]
|
|
167
|
+
def list_group_organization_memberships(
|
|
168
|
+
organization_id:,
|
|
169
|
+
group_id:,
|
|
170
|
+
before: nil,
|
|
171
|
+
after: nil,
|
|
172
|
+
limit: nil,
|
|
173
|
+
order: "desc",
|
|
174
|
+
request_options: {}
|
|
175
|
+
)
|
|
176
|
+
params = {
|
|
177
|
+
"before" => before,
|
|
178
|
+
"after" => after,
|
|
179
|
+
"limit" => limit,
|
|
180
|
+
"order" => order
|
|
181
|
+
}.compact
|
|
182
|
+
response = @client.request(
|
|
183
|
+
method: :get,
|
|
184
|
+
path: "/organizations/#{WorkOS::Util.encode_path(organization_id)}/groups/#{WorkOS::Util.encode_path(group_id)}/organization-memberships",
|
|
185
|
+
auth: true,
|
|
186
|
+
params: params,
|
|
187
|
+
request_options: request_options
|
|
188
|
+
)
|
|
189
|
+
fetch_next = ->(cursor) {
|
|
190
|
+
list_group_organization_memberships(
|
|
191
|
+
organization_id: organization_id,
|
|
192
|
+
group_id: group_id,
|
|
193
|
+
before: before,
|
|
194
|
+
after: cursor,
|
|
195
|
+
limit: limit,
|
|
196
|
+
order: order,
|
|
197
|
+
request_options: request_options
|
|
198
|
+
)
|
|
199
|
+
}
|
|
200
|
+
WorkOS::Types::ListStruct.from_response(
|
|
201
|
+
response,
|
|
202
|
+
model: WorkOS::UserOrganizationMembershipBaseListData,
|
|
203
|
+
filters: {organization_id: organization_id, group_id: group_id, before: before, limit: limit, order: order},
|
|
204
|
+
fetch_next: fetch_next
|
|
205
|
+
)
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
# Add a member to a Group
|
|
209
|
+
# @param organization_id [String] Unique identifier of the Organization.
|
|
210
|
+
# @param group_id [String] Unique identifier of the Group.
|
|
211
|
+
# @param organization_membership_id [String] The ID of the Organization Membership to add to the group.
|
|
212
|
+
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
213
|
+
# @return [WorkOS::Group]
|
|
214
|
+
def create_group_organization_membership(
|
|
215
|
+
organization_id:,
|
|
216
|
+
group_id:,
|
|
217
|
+
organization_membership_id:,
|
|
218
|
+
request_options: {}
|
|
219
|
+
)
|
|
220
|
+
body = {
|
|
221
|
+
"organization_membership_id" => organization_membership_id
|
|
222
|
+
}.compact
|
|
223
|
+
response = @client.request(
|
|
224
|
+
method: :post,
|
|
225
|
+
path: "/organizations/#{WorkOS::Util.encode_path(organization_id)}/groups/#{WorkOS::Util.encode_path(group_id)}/organization-memberships",
|
|
226
|
+
auth: true,
|
|
227
|
+
body: body,
|
|
228
|
+
request_options: request_options
|
|
229
|
+
)
|
|
230
|
+
result = WorkOS::Group.new(response.body)
|
|
231
|
+
result.last_response = WorkOS::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"])
|
|
232
|
+
result
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
# Remove a member from a Group
|
|
236
|
+
# @param organization_id [String] Unique identifier of the Organization.
|
|
237
|
+
# @param group_id [String] Unique identifier of the Group.
|
|
238
|
+
# @param om_id [String] Unique identifier of the Organization Membership.
|
|
239
|
+
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
240
|
+
# @return [void]
|
|
241
|
+
def delete_group_organization_membership(
|
|
242
|
+
organization_id:,
|
|
243
|
+
group_id:,
|
|
244
|
+
om_id:,
|
|
245
|
+
request_options: {}
|
|
246
|
+
)
|
|
247
|
+
@client.request(
|
|
248
|
+
method: :delete,
|
|
249
|
+
path: "/organizations/#{WorkOS::Util.encode_path(organization_id)}/groups/#{WorkOS::Util.encode_path(group_id)}/organization-memberships/#{WorkOS::Util.encode_path(om_id)}",
|
|
250
|
+
auth: true,
|
|
251
|
+
request_options: request_options
|
|
252
|
+
)
|
|
253
|
+
nil
|
|
254
|
+
end
|
|
255
|
+
end
|
|
256
|
+
end
|
data/lib/workos/session.rb
CHANGED
|
@@ -90,18 +90,27 @@ module WorkOS
|
|
|
90
90
|
body = {
|
|
91
91
|
"grant_type" => "refresh_token",
|
|
92
92
|
"client_id" => @client.client_id,
|
|
93
|
-
"refresh_token" => session["refresh_token"]
|
|
94
|
-
"session" => {"seal_session" => true, "cookie_password" => effective_password}
|
|
93
|
+
"refresh_token" => session["refresh_token"]
|
|
95
94
|
}
|
|
96
95
|
body["organization_id"] = organization_id if organization_id
|
|
97
96
|
|
|
98
97
|
response = @client.request(method: :post, path: "/user_management/authenticate", auth: true, body: body)
|
|
99
98
|
auth_response = JSON.parse(response.body)
|
|
100
|
-
sealed = auth_response["sealed_session"].to_s
|
|
101
|
-
@seal_data = sealed
|
|
102
|
-
@cookie_password = effective_password
|
|
103
99
|
|
|
100
|
+
sealed = @manager.seal_session_from_auth_response(
|
|
101
|
+
access_token: auth_response["access_token"],
|
|
102
|
+
refresh_token: auth_response["refresh_token"],
|
|
103
|
+
cookie_password: effective_password,
|
|
104
|
+
user: auth_response["user"],
|
|
105
|
+
impersonator: auth_response["impersonator"]
|
|
106
|
+
)
|
|
107
|
+
|
|
108
|
+
# Decode before mutating session state so a malformed access_token
|
|
109
|
+
# doesn't leave the Session half-updated.
|
|
104
110
|
decoded = @manager.decode_jwt(auth_response["access_token"])
|
|
111
|
+
|
|
112
|
+
@seal_data = sealed
|
|
113
|
+
@cookie_password = effective_password
|
|
105
114
|
SessionManager::RefreshSuccess.new(
|
|
106
115
|
authenticated: true,
|
|
107
116
|
sealed_session: sealed,
|
|
@@ -117,6 +126,8 @@ module WorkOS
|
|
|
117
126
|
)
|
|
118
127
|
rescue WorkOS::AuthenticationError, WorkOS::InvalidRequestError => e
|
|
119
128
|
SessionManager::RefreshError.new(authenticated: false, reason: e.message)
|
|
129
|
+
rescue JWT::DecodeError => e
|
|
130
|
+
SessionManager::RefreshError.new(authenticated: false, reason: e.message)
|
|
120
131
|
end
|
|
121
132
|
|
|
122
133
|
# Build the WorkOS session-logout URL for the currently authenticated session.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
module WorkOS
|
|
6
|
+
class WaitlistUser < WorkOS::Types::BaseModel
|
|
7
|
+
HASH_ATTRS = {
|
|
8
|
+
object: :object,
|
|
9
|
+
id: :id,
|
|
10
|
+
email: :email,
|
|
11
|
+
state: :state,
|
|
12
|
+
approved_at: :approved_at,
|
|
13
|
+
created_at: :created_at,
|
|
14
|
+
updated_at: :updated_at
|
|
15
|
+
}.freeze
|
|
16
|
+
|
|
17
|
+
attr_accessor \
|
|
18
|
+
:object,
|
|
19
|
+
:id,
|
|
20
|
+
:email,
|
|
21
|
+
:state,
|
|
22
|
+
:approved_at,
|
|
23
|
+
:created_at,
|
|
24
|
+
:updated_at
|
|
25
|
+
|
|
26
|
+
def initialize(json)
|
|
27
|
+
hash = self.class.normalize(json)
|
|
28
|
+
@object = hash[:object]
|
|
29
|
+
@id = hash[:id]
|
|
30
|
+
@email = hash[:email]
|
|
31
|
+
@state = hash[:state]
|
|
32
|
+
@approved_at = hash[:approved_at]
|
|
33
|
+
@created_at = hash[:created_at]
|
|
34
|
+
@updated_at = hash[:updated_at]
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
module WorkOS
|
|
6
|
+
class WaitlistUserApproved < WorkOS::Types::BaseModel
|
|
7
|
+
HASH_ATTRS = {
|
|
8
|
+
id: :id,
|
|
9
|
+
event: :event,
|
|
10
|
+
data: :data,
|
|
11
|
+
created_at: :created_at,
|
|
12
|
+
context: :context,
|
|
13
|
+
object: :object
|
|
14
|
+
}.freeze
|
|
15
|
+
|
|
16
|
+
attr_accessor \
|
|
17
|
+
:id,
|
|
18
|
+
:event,
|
|
19
|
+
:data,
|
|
20
|
+
:created_at,
|
|
21
|
+
:context,
|
|
22
|
+
:object
|
|
23
|
+
|
|
24
|
+
def initialize(json)
|
|
25
|
+
hash = self.class.normalize(json)
|
|
26
|
+
@id = hash[:id]
|
|
27
|
+
@event = hash[:event]
|
|
28
|
+
@data = hash[:data] ? WorkOS::WaitlistUser.new(hash[:data]) : nil
|
|
29
|
+
@created_at = hash[:created_at]
|
|
30
|
+
@context = hash[:context] ? WorkOS::EventContext.new(hash[:context]) : nil
|
|
31
|
+
@object = hash[:object]
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
module WorkOS
|
|
6
|
+
class WaitlistUserCreated < WorkOS::Types::BaseModel
|
|
7
|
+
HASH_ATTRS = {
|
|
8
|
+
id: :id,
|
|
9
|
+
event: :event,
|
|
10
|
+
data: :data,
|
|
11
|
+
created_at: :created_at,
|
|
12
|
+
context: :context,
|
|
13
|
+
object: :object
|
|
14
|
+
}.freeze
|
|
15
|
+
|
|
16
|
+
attr_accessor \
|
|
17
|
+
:id,
|
|
18
|
+
:event,
|
|
19
|
+
:data,
|
|
20
|
+
:created_at,
|
|
21
|
+
:context,
|
|
22
|
+
:object
|
|
23
|
+
|
|
24
|
+
def initialize(json)
|
|
25
|
+
hash = self.class.normalize(json)
|
|
26
|
+
@id = hash[:id]
|
|
27
|
+
@event = hash[:event]
|
|
28
|
+
@data = hash[:data] ? WorkOS::WaitlistUser.new(hash[:data]) : nil
|
|
29
|
+
@created_at = hash[:created_at]
|
|
30
|
+
@context = hash[:context] ? WorkOS::EventContext.new(hash[:context]) : nil
|
|
31
|
+
@object = hash[:object]
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
module WorkOS
|
|
6
|
+
class WaitlistUserDenied < WorkOS::Types::BaseModel
|
|
7
|
+
HASH_ATTRS = {
|
|
8
|
+
id: :id,
|
|
9
|
+
event: :event,
|
|
10
|
+
data: :data,
|
|
11
|
+
created_at: :created_at,
|
|
12
|
+
context: :context,
|
|
13
|
+
object: :object
|
|
14
|
+
}.freeze
|
|
15
|
+
|
|
16
|
+
attr_accessor \
|
|
17
|
+
:id,
|
|
18
|
+
:event,
|
|
19
|
+
:data,
|
|
20
|
+
:created_at,
|
|
21
|
+
:context,
|
|
22
|
+
:object
|
|
23
|
+
|
|
24
|
+
def initialize(json)
|
|
25
|
+
hash = self.class.normalize(json)
|
|
26
|
+
@id = hash[:id]
|
|
27
|
+
@event = hash[:event]
|
|
28
|
+
@data = hash[:data] ? WorkOS::WaitlistUser.new(hash[:data]) : nil
|
|
29
|
+
@created_at = hash[:created_at]
|
|
30
|
+
@context = hash[:context] ? WorkOS::EventContext.new(hash[:context]) : nil
|
|
31
|
+
@object = hash[:object]
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
@@ -79,7 +79,10 @@ module WorkOS
|
|
|
79
79
|
PERMISSION_UPDATED = "permission.updated"
|
|
80
80
|
SESSION_CREATED = "session.created"
|
|
81
81
|
SESSION_REVOKED = "session.revoked"
|
|
82
|
-
|
|
82
|
+
WAITLIST_USER_APPROVED = "waitlist_user.approved"
|
|
83
|
+
WAITLIST_USER_CREATED = "waitlist_user.created"
|
|
84
|
+
WAITLIST_USER_DENIED = "waitlist_user.denied"
|
|
85
|
+
ALL = [AUTHENTICATION_EMAIL_VERIFICATION_SUCCEEDED, AUTHENTICATION_MAGIC_AUTH_FAILED, AUTHENTICATION_MAGIC_AUTH_SUCCEEDED, AUTHENTICATION_MFA_SUCCEEDED, AUTHENTICATION_OAUTH_FAILED, AUTHENTICATION_OAUTH_SUCCEEDED, AUTHENTICATION_PASSWORD_FAILED, AUTHENTICATION_PASSWORD_SUCCEEDED, AUTHENTICATION_PASSKEY_FAILED, AUTHENTICATION_PASSKEY_SUCCEEDED, AUTHENTICATION_SSO_FAILED, AUTHENTICATION_SSO_STARTED, AUTHENTICATION_SSO_SUCCEEDED, AUTHENTICATION_SSO_TIMED_OUT, AUTHENTICATION_RADAR_RISK_DETECTED, API_KEY_CREATED, API_KEY_REVOKED, CONNECTION_ACTIVATED, CONNECTION_DEACTIVATED, CONNECTION_SAML_CERTIFICATE_RENEWAL_REQUIRED, CONNECTION_SAML_CERTIFICATE_RENEWED, CONNECTION_DELETED, DSYNC_ACTIVATED, DSYNC_DELETED, DSYNC_GROUP_CREATED, DSYNC_GROUP_DELETED, DSYNC_GROUP_UPDATED, DSYNC_GROUP_USER_ADDED, DSYNC_GROUP_USER_REMOVED, DSYNC_USER_CREATED, DSYNC_USER_DELETED, DSYNC_USER_UPDATED, EMAIL_VERIFICATION_CREATED, GROUP_CREATED, GROUP_DELETED, GROUP_MEMBER_ADDED, GROUP_MEMBER_REMOVED, GROUP_UPDATED, FLAG_CREATED, FLAG_DELETED, FLAG_UPDATED, FLAG_RULE_UPDATED, INVITATION_ACCEPTED, INVITATION_CREATED, INVITATION_RESENT, INVITATION_REVOKED, MAGIC_AUTH_CREATED, ORGANIZATION_CREATED, ORGANIZATION_DELETED, ORGANIZATION_UPDATED, ORGANIZATION_DOMAIN_CREATED, ORGANIZATION_DOMAIN_DELETED, ORGANIZATION_DOMAIN_UPDATED, ORGANIZATION_DOMAIN_VERIFIED, ORGANIZATION_DOMAIN_VERIFICATION_FAILED, PASSWORD_RESET_CREATED, PASSWORD_RESET_SUCCEEDED, USER_CREATED, USER_UPDATED, USER_DELETED, ORGANIZATION_MEMBERSHIP_CREATED, ORGANIZATION_MEMBERSHIP_DELETED, ORGANIZATION_MEMBERSHIP_UPDATED, ROLE_CREATED, ROLE_DELETED, ROLE_UPDATED, ORGANIZATION_ROLE_CREATED, ORGANIZATION_ROLE_DELETED, ORGANIZATION_ROLE_UPDATED, PERMISSION_CREATED, PERMISSION_DELETED, PERMISSION_UPDATED, SESSION_CREATED, SESSION_REVOKED, WAITLIST_USER_APPROVED, WAITLIST_USER_CREATED, WAITLIST_USER_DENIED].freeze
|
|
83
86
|
end
|
|
84
87
|
end
|
|
85
88
|
end
|
|
@@ -6,10 +6,19 @@ module WorkOS
|
|
|
6
6
|
module Types
|
|
7
7
|
class SSOProvider
|
|
8
8
|
APPLE_OAUTH = "AppleOAuth"
|
|
9
|
+
BITBUCKET_OAUTH = "BitbucketOAuth"
|
|
9
10
|
GIT_HUB_OAUTH = "GitHubOAuth"
|
|
11
|
+
GIT_LAB_OAUTH = "GitLabOAuth"
|
|
10
12
|
GOOGLE_OAUTH = "GoogleOAuth"
|
|
13
|
+
INTUIT_OAUTH = "IntuitOAuth"
|
|
14
|
+
LINKED_IN_OAUTH = "LinkedInOAuth"
|
|
11
15
|
MICROSOFT_OAUTH = "MicrosoftOAuth"
|
|
12
|
-
|
|
16
|
+
SALESFORCE_OAUTH = "SalesforceOAuth"
|
|
17
|
+
SLACK_OAUTH = "SlackOAuth"
|
|
18
|
+
VERCEL_MARKETPLACE_OAUTH = "VercelMarketplaceOAuth"
|
|
19
|
+
VERCEL_OAUTH = "VercelOAuth"
|
|
20
|
+
XERO_OAUTH = "XeroOAuth"
|
|
21
|
+
ALL = [APPLE_OAUTH, BITBUCKET_OAUTH, GIT_HUB_OAUTH, GIT_LAB_OAUTH, GOOGLE_OAUTH, INTUIT_OAUTH, LINKED_IN_OAUTH, MICROSOFT_OAUTH, SALESFORCE_OAUTH, SLACK_OAUTH, VERCEL_MARKETPLACE_OAUTH, VERCEL_OAUTH, XERO_OAUTH].freeze
|
|
13
22
|
end
|
|
14
23
|
end
|
|
15
24
|
end
|
|
@@ -7,10 +7,19 @@ module WorkOS
|
|
|
7
7
|
class UserManagementAuthenticationProvider
|
|
8
8
|
AUTHKIT = "authkit"
|
|
9
9
|
APPLE_OAUTH = "AppleOAuth"
|
|
10
|
+
BITBUCKET_OAUTH = "BitbucketOAuth"
|
|
10
11
|
GIT_HUB_OAUTH = "GitHubOAuth"
|
|
12
|
+
GIT_LAB_OAUTH = "GitLabOAuth"
|
|
11
13
|
GOOGLE_OAUTH = "GoogleOAuth"
|
|
14
|
+
INTUIT_OAUTH = "IntuitOAuth"
|
|
15
|
+
LINKED_IN_OAUTH = "LinkedInOAuth"
|
|
12
16
|
MICROSOFT_OAUTH = "MicrosoftOAuth"
|
|
13
|
-
|
|
17
|
+
SALESFORCE_OAUTH = "SalesforceOAuth"
|
|
18
|
+
SLACK_OAUTH = "SlackOAuth"
|
|
19
|
+
VERCEL_MARKETPLACE_OAUTH = "VercelMarketplaceOAuth"
|
|
20
|
+
VERCEL_OAUTH = "VercelOAuth"
|
|
21
|
+
XERO_OAUTH = "XeroOAuth"
|
|
22
|
+
ALL = [AUTHKIT, APPLE_OAUTH, BITBUCKET_OAUTH, GIT_HUB_OAUTH, GIT_LAB_OAUTH, GOOGLE_OAUTH, INTUIT_OAUTH, LINKED_IN_OAUTH, MICROSOFT_OAUTH, SALESFORCE_OAUTH, SLACK_OAUTH, VERCEL_MARKETPLACE_OAUTH, VERCEL_OAUTH, XERO_OAUTH].freeze
|
|
14
23
|
end
|
|
15
24
|
end
|
|
16
25
|
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
module WorkOS
|
|
6
|
+
module Types
|
|
7
|
+
class WaitlistUserState
|
|
8
|
+
PENDING = "pending"
|
|
9
|
+
APPROVED = "approved"
|
|
10
|
+
DENIED = "denied"
|
|
11
|
+
ALL = [PENDING, APPROVED, DENIED].freeze
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -15,6 +15,7 @@ module WorkOS
|
|
|
15
15
|
organization_id: :organization_id,
|
|
16
16
|
inviter_user_id: :inviter_user_id,
|
|
17
17
|
accepted_user_id: :accepted_user_id,
|
|
18
|
+
role_slug: :role_slug,
|
|
18
19
|
created_at: :created_at,
|
|
19
20
|
updated_at: :updated_at,
|
|
20
21
|
token: :token,
|
|
@@ -32,6 +33,7 @@ module WorkOS
|
|
|
32
33
|
:organization_id,
|
|
33
34
|
:inviter_user_id,
|
|
34
35
|
:accepted_user_id,
|
|
36
|
+
:role_slug,
|
|
35
37
|
:created_at,
|
|
36
38
|
:updated_at,
|
|
37
39
|
:token,
|
|
@@ -49,6 +51,7 @@ module WorkOS
|
|
|
49
51
|
@organization_id = hash[:organization_id]
|
|
50
52
|
@inviter_user_id = hash[:inviter_user_id]
|
|
51
53
|
@accepted_user_id = hash[:accepted_user_id]
|
|
54
|
+
@role_slug = hash[:role_slug]
|
|
52
55
|
@created_at = hash[:created_at]
|
|
53
56
|
@updated_at = hash[:updated_at]
|
|
54
57
|
@token = hash[:token]
|
|
@@ -15,6 +15,7 @@ module WorkOS
|
|
|
15
15
|
organization_id: :organization_id,
|
|
16
16
|
inviter_user_id: :inviter_user_id,
|
|
17
17
|
accepted_user_id: :accepted_user_id,
|
|
18
|
+
role_slug: :role_slug,
|
|
18
19
|
created_at: :created_at,
|
|
19
20
|
updated_at: :updated_at
|
|
20
21
|
}.freeze
|
|
@@ -30,6 +31,7 @@ module WorkOS
|
|
|
30
31
|
:organization_id,
|
|
31
32
|
:inviter_user_id,
|
|
32
33
|
:accepted_user_id,
|
|
34
|
+
:role_slug,
|
|
33
35
|
:created_at,
|
|
34
36
|
:updated_at
|
|
35
37
|
|
|
@@ -45,6 +47,7 @@ module WorkOS
|
|
|
45
47
|
@organization_id = hash[:organization_id]
|
|
46
48
|
@inviter_user_id = hash[:inviter_user_id]
|
|
47
49
|
@accepted_user_id = hash[:accepted_user_id]
|
|
50
|
+
@role_slug = hash[:role_slug]
|
|
48
51
|
@created_at = hash[:created_at]
|
|
49
52
|
@updated_at = hash[:updated_at]
|
|
50
53
|
end
|
|
@@ -15,6 +15,7 @@ module WorkOS
|
|
|
15
15
|
organization_id: :organization_id,
|
|
16
16
|
inviter_user_id: :inviter_user_id,
|
|
17
17
|
accepted_user_id: :accepted_user_id,
|
|
18
|
+
role_slug: :role_slug,
|
|
18
19
|
created_at: :created_at,
|
|
19
20
|
updated_at: :updated_at
|
|
20
21
|
}.freeze
|
|
@@ -30,6 +31,7 @@ module WorkOS
|
|
|
30
31
|
:organization_id,
|
|
31
32
|
:inviter_user_id,
|
|
32
33
|
:accepted_user_id,
|
|
34
|
+
:role_slug,
|
|
33
35
|
:created_at,
|
|
34
36
|
:updated_at
|
|
35
37
|
|
|
@@ -45,6 +47,7 @@ module WorkOS
|
|
|
45
47
|
@organization_id = hash[:organization_id]
|
|
46
48
|
@inviter_user_id = hash[:inviter_user_id]
|
|
47
49
|
@accepted_user_id = hash[:accepted_user_id]
|
|
50
|
+
@role_slug = hash[:role_slug]
|
|
48
51
|
@created_at = hash[:created_at]
|
|
49
52
|
@updated_at = hash[:updated_at]
|
|
50
53
|
end
|
|
@@ -15,6 +15,7 @@ module WorkOS
|
|
|
15
15
|
organization_id: :organization_id,
|
|
16
16
|
inviter_user_id: :inviter_user_id,
|
|
17
17
|
accepted_user_id: :accepted_user_id,
|
|
18
|
+
role_slug: :role_slug,
|
|
18
19
|
created_at: :created_at,
|
|
19
20
|
updated_at: :updated_at
|
|
20
21
|
}.freeze
|
|
@@ -30,6 +31,7 @@ module WorkOS
|
|
|
30
31
|
:organization_id,
|
|
31
32
|
:inviter_user_id,
|
|
32
33
|
:accepted_user_id,
|
|
34
|
+
:role_slug,
|
|
33
35
|
:created_at,
|
|
34
36
|
:updated_at
|
|
35
37
|
|
|
@@ -45,6 +47,7 @@ module WorkOS
|
|
|
45
47
|
@organization_id = hash[:organization_id]
|
|
46
48
|
@inviter_user_id = hash[:inviter_user_id]
|
|
47
49
|
@accepted_user_id = hash[:accepted_user_id]
|
|
50
|
+
@role_slug = hash[:role_slug]
|
|
48
51
|
@created_at = hash[:created_at]
|
|
49
52
|
@updated_at = hash[:updated_at]
|
|
50
53
|
end
|
|
@@ -15,6 +15,7 @@ module WorkOS
|
|
|
15
15
|
organization_id: :organization_id,
|
|
16
16
|
inviter_user_id: :inviter_user_id,
|
|
17
17
|
accepted_user_id: :accepted_user_id,
|
|
18
|
+
role_slug: :role_slug,
|
|
18
19
|
created_at: :created_at,
|
|
19
20
|
updated_at: :updated_at
|
|
20
21
|
}.freeze
|
|
@@ -30,6 +31,7 @@ module WorkOS
|
|
|
30
31
|
:organization_id,
|
|
31
32
|
:inviter_user_id,
|
|
32
33
|
:accepted_user_id,
|
|
34
|
+
:role_slug,
|
|
33
35
|
:created_at,
|
|
34
36
|
:updated_at
|
|
35
37
|
|
|
@@ -45,6 +47,7 @@ module WorkOS
|
|
|
45
47
|
@organization_id = hash[:organization_id]
|
|
46
48
|
@inviter_user_id = hash[:inviter_user_id]
|
|
47
49
|
@accepted_user_id = hash[:accepted_user_id]
|
|
50
|
+
@role_slug = hash[:role_slug]
|
|
48
51
|
@created_at = hash[:created_at]
|
|
49
52
|
@updated_at = hash[:updated_at]
|
|
50
53
|
end
|