Class: Rafflesia::Auth
- Inherits:
-
Object
- Object
- Rafflesia::Auth
- Defined in:
- lib/rafflesia/auth.rb
Instance Method Summary collapse
-
#cliAuthorize(redirect_uri: nil, state: nil, code_challenge: nil, code_challenge_method: nil, provider: nil, connection_id: nil, organization_id: nil, login_hint: nil, domain_hint: nil, request_options: {}) ⇒ Rafflesia::AuthEnvelopeCliAuthorizeData
Start a CLI sign-in and return the AuthKit authorization URL.
-
#cliRefresh(refresh_token:, organization_id: nil, request_options: {}) ⇒ Rafflesia::AuthEnvelopeCliTokenData
Refresh a CLI access token.
-
#cliToken(code:, code_verifier:, redirect_uri: nil, request_options: {}) ⇒ Rafflesia::AuthEnvelopeCliTokenData
Exchange a CLI authorization code for an access token.
-
#csrfTokenGet(request_options: {}) ⇒ Rafflesia::AuthEnvelopeCsrfTokenData
Issue a CSRF token and set its HMAC cookie.
-
#googleStart(return_to: nil, email: nil, origin: nil, request_options: {}) ⇒ Rafflesia::AuthEnvelopePasskeyStartData
Start a hosted Google sign-in and return the authorization URL.
-
#initialize(client) ⇒ Auth
constructor
A new instance of Auth.
-
#invitationsByToken(token: nil, request_options: {}) ⇒ Rafflesia::AuthEnvelopeInvitationPreviewResponse
Resolve the invitation behind an invitation token.
-
#magicAuthCreate(email:, request_options: {}) ⇒ Rafflesia::AuthEnvelopeMagicAuthStartData
Email a six-digit sign-in code.
-
#magicAuthVerify(code:, email:, request_options: {}) ⇒ Rafflesia::AuthEnvelopeSessionPayload
Exchange an emailed sign-in code for a dashboard session.
-
#organizationsCreate(name:, request_options: {}) ⇒ Rafflesia::AuthEnvelopeSessionPayload
Create an organization, administer it, and re-scope the session to it.
-
#organizationSelectionCreate(organization_id:, pending_authentication_token: nil, request_options: {}) ⇒ Rafflesia::AuthEnvelopeSessionPayload
Finish a sign-in that WorkOS paused on an organization choice.
-
#organizationSelectionGet(request_options: {}) ⇒ Rafflesia::AuthEnvelopePendingOrganizationSelectionData
Report the organization choice a redirect sign-in is waiting on.
-
#organizationsList(request_options: {}) ⇒ Rafflesia::AuthEnvelopeOrganizationListResponse
List the organizations the signed-in user may act as.
-
#organizationsSwitch(organization_id:, request_options: {}) ⇒ Rafflesia::AuthEnvelopeSessionPayload
Re-scope the session to another organization the caller belongs to.
-
#passkeysDelete(credential_id:, request_options: {}) ⇒ Rafflesia::AuthEnvelopePasskeySuccessData
Remove one of the signed-in user's passkeys.
-
#passkeysList(request_options: {}) ⇒ Rafflesia::AuthEnvelopeListPasskeySummary
List the signed-in user's registered passkeys.
-
#passwordResetConfirm(new_password:, token:, request_options: {}) ⇒ Rafflesia::AuthEnvelopeSessionPayload
Set a new password from a reset token and sign in with it.
-
#passwordResetCreate(email:, request_options: {}) ⇒ Rafflesia::AuthEnvelopePasswordResetStartData
Email a password reset link.
-
#profileUpdate(first_name:, last_name:, request_options: {}) ⇒ Rafflesia::AuthEnvelopeSessionPayload
Set the signed-in user's own first and last name.
-
#sessionGet(request_options: {}) ⇒ Rafflesia::AuthEnvelopeSessionPayload
Report who the current dashboard session belongs to.
-
#signIn(email:, password:, invitation_token: nil, request_options: {}) ⇒ Rafflesia::AuthEnvelopeSessionPayload
Exchange an email and password for a dashboard session.
-
#signOut(request_options: {}) ⇒ Rafflesia::AuthEnvelopeSignedOutData
Clear the dashboard session.
-
#signUp(email:, password:, invitation_token: nil, name: nil, request_options: {}) ⇒ Rafflesia::AuthEnvelopeSessionPayload
Create an account and sign it in.
-
#teamAccessGet(request_options: {}) ⇒ Rafflesia::AuthEnvelopeTeamAccessResponse
List the organization's members and pending invitations together.
-
#teamInvitationsCreate(email:, role: nil, request_options: {}) ⇒ Rafflesia::AuthEnvelopeTeamInvitationResponse
Invite someone to the organization.
-
#teamInvitationsList(request_options: {}) ⇒ Rafflesia::AuthEnvelopeListTeamInvitationResponse
List the organization's pending invitations.
-
#teamInvitationsRevoke(invitation_id:, request_options: {}) ⇒ Rafflesia::AuthEnvelopeTeamSuccessData
Revoke a pending invitation.
-
#teamMembersList(request_options: {}) ⇒ Rafflesia::AuthEnvelopeListTeamMemberResponse
List the organization's members.
-
#teamMembersPermissions(member_id:, request_options: {}) ⇒ Rafflesia::AuthEnvelopeMemberPermissionsResponse
List a member's per-resource grants.
-
#teamMembersRemove(member_id:, request_options: {}) ⇒ Rafflesia::AuthEnvelopeTeamSuccessData
Remove a member from the organization.
-
#teamMembersUpdateRole(member_id:, role: nil, request_options: {}) ⇒ Rafflesia::AuthEnvelopeTeamMemberResponse
Change a member's role.
Constructor Details
#initialize(client) ⇒ Auth
Returns a new instance of Auth.
9 10 11 |
# File 'lib/rafflesia/auth.rb', line 9 def initialize(client) @client = client end |
Instance Method Details
#cliAuthorize(redirect_uri: nil, state: nil, code_challenge: nil, code_challenge_method: nil, provider: nil, connection_id: nil, organization_id: nil, login_hint: nil, domain_hint: nil, request_options: {}) ⇒ Rafflesia::AuthEnvelopeCliAuthorizeData
Start a CLI sign-in and return the AuthKit authorization URL.
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/rafflesia/auth.rb', line 25 def cliAuthorize( redirect_uri: nil, state: nil, code_challenge: nil, code_challenge_method: nil, provider: nil, connection_id: nil, organization_id: nil, login_hint: nil, domain_hint: nil, request_options: {} ) params = { 'redirect_uri' => redirect_uri, 'state' => state, 'code_challenge' => code_challenge, 'code_challenge_method' => code_challenge_method, 'provider' => provider, 'connection_id' => connection_id, 'organization_id' => organization_id, 'login_hint' => login_hint, 'domain_hint' => domain_hint }.compact response = @client.request( method: :get, path: '/v1/auth/cli/authorize', auth: true, params: params, request_options: ) result = Rafflesia::AuthEnvelopeCliAuthorizeData.new(response.body) result.last_response = Rafflesia::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"]) result end |
#cliRefresh(refresh_token:, organization_id: nil, request_options: {}) ⇒ Rafflesia::AuthEnvelopeCliTokenData
Refresh a CLI access token.
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/rafflesia/auth.rb', line 65 def cliRefresh( refresh_token:, organization_id: nil, request_options: {} ) body = { 'organization_id' => organization_id, 'refresh_token' => refresh_token }.compact response = @client.request( method: :post, path: '/v1/auth/cli/refresh', auth: true, body: body, request_options: ) result = Rafflesia::AuthEnvelopeCliTokenData.new(response.body) result.last_response = Rafflesia::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"]) result end |
#cliToken(code:, code_verifier:, redirect_uri: nil, request_options: {}) ⇒ Rafflesia::AuthEnvelopeCliTokenData
Exchange a CLI authorization code for an access token.
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 |
# File 'lib/rafflesia/auth.rb', line 92 def cliToken( code:, code_verifier:, redirect_uri: nil, request_options: {} ) body = { 'code' => code, 'code_verifier' => code_verifier, 'redirect_uri' => redirect_uri }.compact response = @client.request( method: :post, path: '/v1/auth/cli/token', auth: true, body: body, request_options: ) result = Rafflesia::AuthEnvelopeCliTokenData.new(response.body) result.last_response = Rafflesia::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"]) result end |
#csrfTokenGet(request_options: {}) ⇒ Rafflesia::AuthEnvelopeCsrfTokenData
Issue a CSRF token and set its HMAC cookie.
118 119 120 121 122 123 124 125 126 127 128 |
# File 'lib/rafflesia/auth.rb', line 118 def csrfTokenGet(request_options: {}) response = @client.request( method: :get, path: '/v1/auth/csrf-token', auth: true, request_options: ) result = Rafflesia::AuthEnvelopeCsrfTokenData.new(response.body) result.last_response = Rafflesia::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"]) result end |
#googleStart(return_to: nil, email: nil, origin: nil, request_options: {}) ⇒ Rafflesia::AuthEnvelopePasskeyStartData
Start a hosted Google sign-in and return the authorization URL.
136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 |
# File 'lib/rafflesia/auth.rb', line 136 def googleStart( return_to: nil, email: nil, origin: nil, request_options: {} ) params = { 'return_to' => return_to, 'email' => email, 'origin' => origin }.compact response = @client.request( method: :get, path: '/v1/auth/google', auth: true, params: params, request_options: ) result = Rafflesia::AuthEnvelopePasskeyStartData.new(response.body) result.last_response = Rafflesia::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"]) result end |
#invitationsByToken(token: nil, request_options: {}) ⇒ Rafflesia::AuthEnvelopeInvitationPreviewResponse
Resolve the invitation behind an invitation token.
163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 |
# File 'lib/rafflesia/auth.rb', line 163 def invitationsByToken( token: nil, request_options: {} ) params = { 'token' => token }.compact response = @client.request( method: :get, path: '/v1/auth/invitations/by-token', auth: true, params: params, request_options: ) result = Rafflesia::AuthEnvelopeInvitationPreviewResponse.new(response.body) result.last_response = Rafflesia::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"]) result end |
#magicAuthCreate(email:, request_options: {}) ⇒ Rafflesia::AuthEnvelopeMagicAuthStartData
Email a six-digit sign-in code.
186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 |
# File 'lib/rafflesia/auth.rb', line 186 def magicAuthCreate( email:, request_options: {} ) body = { 'email' => email } response = @client.request( method: :post, path: '/v1/auth/magic-auth', auth: true, body: body, request_options: ) result = Rafflesia::AuthEnvelopeMagicAuthStartData.new(response.body) result.last_response = Rafflesia::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"]) result end |
#magicAuthVerify(code:, email:, request_options: {}) ⇒ Rafflesia::AuthEnvelopeSessionPayload
Exchange an emailed sign-in code for a dashboard session.
210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 |
# File 'lib/rafflesia/auth.rb', line 210 def magicAuthVerify( code:, email:, request_options: {} ) body = { 'code' => code, 'email' => email } response = @client.request( method: :post, path: '/v1/auth/magic-auth/verify', auth: true, body: body, request_options: ) result = Rafflesia::AuthEnvelopeSessionPayload.new(response.body) result.last_response = Rafflesia::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"]) result end |
#organizationsCreate(name:, request_options: {}) ⇒ Rafflesia::AuthEnvelopeSessionPayload
Create an organization, administer it, and re-scope the session to it.
291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 |
# File 'lib/rafflesia/auth.rb', line 291 def organizationsCreate( name:, request_options: {} ) body = { 'name' => name } response = @client.request( method: :post, path: '/v1/auth/organizations', auth: true, body: body, request_options: ) result = Rafflesia::AuthEnvelopeSessionPayload.new(response.body) result.last_response = Rafflesia::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"]) result end |
#organizationSelectionCreate(organization_id:, pending_authentication_token: nil, request_options: {}) ⇒ Rafflesia::AuthEnvelopeSessionPayload
Finish a sign-in that WorkOS paused on an organization choice.
251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 |
# File 'lib/rafflesia/auth.rb', line 251 def organizationSelectionCreate( organization_id:, pending_authentication_token: nil, request_options: {} ) body = { 'organization_id' => organization_id, 'pending_authentication_token' => pending_authentication_token }.compact response = @client.request( method: :post, path: '/v1/auth/organization-selection', auth: true, body: body, request_options: ) result = Rafflesia::AuthEnvelopeSessionPayload.new(response.body) result.last_response = Rafflesia::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"]) result end |
#organizationSelectionGet(request_options: {}) ⇒ Rafflesia::AuthEnvelopePendingOrganizationSelectionData
Report the organization choice a redirect sign-in is waiting on.
234 235 236 237 238 239 240 241 242 243 244 |
# File 'lib/rafflesia/auth.rb', line 234 def organizationSelectionGet(request_options: {}) response = @client.request( method: :get, path: '/v1/auth/organization-selection', auth: true, request_options: ) result = Rafflesia::AuthEnvelopePendingOrganizationSelectionData.new(response.body) result.last_response = Rafflesia::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"]) result end |
#organizationsList(request_options: {}) ⇒ Rafflesia::AuthEnvelopeOrganizationListResponse
List the organizations the signed-in user may act as.
275 276 277 278 279 280 281 282 283 284 285 |
# File 'lib/rafflesia/auth.rb', line 275 def organizationsList(request_options: {}) response = @client.request( method: :get, path: '/v1/auth/organizations', auth: true, request_options: ) result = Rafflesia::AuthEnvelopeOrganizationListResponse.new(response.body) result.last_response = Rafflesia::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"]) result end |
#organizationsSwitch(organization_id:, request_options: {}) ⇒ Rafflesia::AuthEnvelopeSessionPayload
Re-scope the session to another organization the caller belongs to.
314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 |
# File 'lib/rafflesia/auth.rb', line 314 def organizationsSwitch( organization_id:, request_options: {} ) body = { 'organization_id' => organization_id } response = @client.request( method: :post, path: '/v1/auth/organizations/switch', auth: true, body: body, request_options: ) result = Rafflesia::AuthEnvelopeSessionPayload.new(response.body) result.last_response = Rafflesia::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"]) result end |
#passkeysDelete(credential_id:, request_options: {}) ⇒ Rafflesia::AuthEnvelopePasskeySuccessData
Remove one of the signed-in user's passkeys.
352 353 354 355 356 357 358 359 360 361 362 363 364 365 |
# File 'lib/rafflesia/auth.rb', line 352 def passkeysDelete( credential_id:, request_options: {} ) response = @client.request( method: :delete, path: "/v1/auth/passkeys/#{Rafflesia::Util.encode_path(credential_id)}", auth: true, request_options: ) result = Rafflesia::AuthEnvelopePasskeySuccessData.new(response.body) result.last_response = Rafflesia::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"]) result end |
#passkeysList(request_options: {}) ⇒ Rafflesia::AuthEnvelopeListPasskeySummary
List the signed-in user's registered passkeys.
336 337 338 339 340 341 342 343 344 345 346 |
# File 'lib/rafflesia/auth.rb', line 336 def passkeysList(request_options: {}) response = @client.request( method: :get, path: '/v1/auth/passkeys', auth: true, request_options: ) result = Rafflesia::AuthEnvelopeListPasskeySummary.new(response.body) result.last_response = Rafflesia::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"]) result end |
#passwordResetConfirm(new_password:, token:, request_options: {}) ⇒ Rafflesia::AuthEnvelopeSessionPayload
Set a new password from a reset token and sign in with it.
395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 |
# File 'lib/rafflesia/auth.rb', line 395 def passwordResetConfirm( new_password:, token:, request_options: {} ) body = { 'new_password' => new_password, 'token' => token } response = @client.request( method: :post, path: '/v1/auth/password-reset/confirm', auth: true, body: body, request_options: ) result = Rafflesia::AuthEnvelopeSessionPayload.new(response.body) result.last_response = Rafflesia::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"]) result end |
#passwordResetCreate(email:, request_options: {}) ⇒ Rafflesia::AuthEnvelopePasswordResetStartData
Email a password reset link.
371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 |
# File 'lib/rafflesia/auth.rb', line 371 def passwordResetCreate( email:, request_options: {} ) body = { 'email' => email } response = @client.request( method: :post, path: '/v1/auth/password-reset', auth: true, body: body, request_options: ) result = Rafflesia::AuthEnvelopePasswordResetStartData.new(response.body) result.last_response = Rafflesia::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"]) result end |
#profileUpdate(first_name:, last_name:, request_options: {}) ⇒ Rafflesia::AuthEnvelopeSessionPayload
Set the signed-in user's own first and last name.
421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 |
# File 'lib/rafflesia/auth.rb', line 421 def profileUpdate( first_name:, last_name:, request_options: {} ) body = { 'first_name' => first_name, 'last_name' => last_name } response = @client.request( method: :patch, path: '/v1/auth/profile', auth: true, body: body, request_options: ) result = Rafflesia::AuthEnvelopeSessionPayload.new(response.body) result.last_response = Rafflesia::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"]) result end |
#sessionGet(request_options: {}) ⇒ Rafflesia::AuthEnvelopeSessionPayload
Report who the current dashboard session belongs to.
445 446 447 448 449 450 451 452 453 454 455 |
# File 'lib/rafflesia/auth.rb', line 445 def sessionGet(request_options: {}) response = @client.request( method: :get, path: '/v1/auth/session', auth: true, request_options: ) result = Rafflesia::AuthEnvelopeSessionPayload.new(response.body) result.last_response = Rafflesia::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"]) result end |
#signIn(email:, password:, invitation_token: nil, request_options: {}) ⇒ Rafflesia::AuthEnvelopeSessionPayload
Exchange an email and password for a dashboard session.
463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 |
# File 'lib/rafflesia/auth.rb', line 463 def signIn( email:, password:, invitation_token: nil, request_options: {} ) body = { 'email' => email, 'invitation_token' => invitation_token, 'password' => password }.compact response = @client.request( method: :post, path: '/v1/auth/sign-in', auth: true, body: body, request_options: ) result = Rafflesia::AuthEnvelopeSessionPayload.new(response.body) result.last_response = Rafflesia::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"]) result end |
#signOut(request_options: {}) ⇒ Rafflesia::AuthEnvelopeSignedOutData
Clear the dashboard session.
489 490 491 492 493 494 495 496 497 498 499 |
# File 'lib/rafflesia/auth.rb', line 489 def signOut(request_options: {}) response = @client.request( method: :post, path: '/v1/auth/sign-out', auth: true, request_options: ) result = Rafflesia::AuthEnvelopeSignedOutData.new(response.body) result.last_response = Rafflesia::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"]) result end |
#signUp(email:, password:, invitation_token: nil, name: nil, request_options: {}) ⇒ Rafflesia::AuthEnvelopeSessionPayload
Create an account and sign it in.
508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 |
# File 'lib/rafflesia/auth.rb', line 508 def signUp( email:, password:, invitation_token: nil, name: nil, request_options: {} ) body = { 'email' => email, 'invitation_token' => invitation_token, 'name' => name, 'password' => password }.compact response = @client.request( method: :post, path: '/v1/auth/sign-up', auth: true, body: body, request_options: ) result = Rafflesia::AuthEnvelopeSessionPayload.new(response.body) result.last_response = Rafflesia::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"]) result end |
#teamAccessGet(request_options: {}) ⇒ Rafflesia::AuthEnvelopeTeamAccessResponse
List the organization's members and pending invitations together.
536 537 538 539 540 541 542 543 544 545 546 |
# File 'lib/rafflesia/auth.rb', line 536 def teamAccessGet(request_options: {}) response = @client.request( method: :get, path: '/v1/auth/team-access', auth: true, request_options: ) result = Rafflesia::AuthEnvelopeTeamAccessResponse.new(response.body) result.last_response = Rafflesia::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"]) result end |
#teamInvitationsCreate(email:, role: nil, request_options: {}) ⇒ Rafflesia::AuthEnvelopeTeamInvitationResponse
Invite someone to the organization.
568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 |
# File 'lib/rafflesia/auth.rb', line 568 def teamInvitationsCreate( email:, role: nil, request_options: {} ) body = { 'email' => email, 'role' => role }.compact response = @client.request( method: :post, path: '/v1/auth/team/invitations', auth: true, body: body, request_options: ) result = Rafflesia::AuthEnvelopeTeamInvitationResponse.new(response.body) result.last_response = Rafflesia::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"]) result end |
#teamInvitationsList(request_options: {}) ⇒ Rafflesia::AuthEnvelopeListTeamInvitationResponse
List the organization's pending invitations.
551 552 553 554 555 556 557 558 559 560 561 |
# File 'lib/rafflesia/auth.rb', line 551 def teamInvitationsList(request_options: {}) response = @client.request( method: :get, path: '/v1/auth/team/invitations', auth: true, request_options: ) result = Rafflesia::AuthEnvelopeListTeamInvitationResponse.new(response.body) result.last_response = Rafflesia::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"]) result end |
#teamInvitationsRevoke(invitation_id:, request_options: {}) ⇒ Rafflesia::AuthEnvelopeTeamSuccessData
Revoke a pending invitation.
593 594 595 596 597 598 599 600 601 602 603 604 605 606 |
# File 'lib/rafflesia/auth.rb', line 593 def teamInvitationsRevoke( invitation_id:, request_options: {} ) response = @client.request( method: :delete, path: "/v1/auth/team/invitations/#{Rafflesia::Util.encode_path(invitation_id)}", auth: true, request_options: ) result = Rafflesia::AuthEnvelopeTeamSuccessData.new(response.body) result.last_response = Rafflesia::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"]) result end |
#teamMembersList(request_options: {}) ⇒ Rafflesia::AuthEnvelopeListTeamMemberResponse
List the organization's members.
611 612 613 614 615 616 617 618 619 620 621 |
# File 'lib/rafflesia/auth.rb', line 611 def teamMembersList(request_options: {}) response = @client.request( method: :get, path: '/v1/auth/team/members', auth: true, request_options: ) result = Rafflesia::AuthEnvelopeListTeamMemberResponse.new(response.body) result.last_response = Rafflesia::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"]) result end |
#teamMembersPermissions(member_id:, request_options: {}) ⇒ Rafflesia::AuthEnvelopeMemberPermissionsResponse
List a member's per-resource grants.
646 647 648 649 650 651 652 653 654 655 656 657 658 659 |
# File 'lib/rafflesia/auth.rb', line 646 def teamMembersPermissions( member_id:, request_options: {} ) response = @client.request( method: :get, path: "/v1/auth/team/members/#{Rafflesia::Util.encode_path(member_id)}/permissions", auth: true, request_options: ) result = Rafflesia::AuthEnvelopeMemberPermissionsResponse.new(response.body) result.last_response = Rafflesia::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"]) result end |
#teamMembersRemove(member_id:, request_options: {}) ⇒ Rafflesia::AuthEnvelopeTeamSuccessData
Remove a member from the organization.
627 628 629 630 631 632 633 634 635 636 637 638 639 640 |
# File 'lib/rafflesia/auth.rb', line 627 def teamMembersRemove( member_id:, request_options: {} ) response = @client.request( method: :delete, path: "/v1/auth/team/members/#{Rafflesia::Util.encode_path(member_id)}", auth: true, request_options: ) result = Rafflesia::AuthEnvelopeTeamSuccessData.new(response.body) result.last_response = Rafflesia::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"]) result end |
#teamMembersUpdateRole(member_id:, role: nil, request_options: {}) ⇒ Rafflesia::AuthEnvelopeTeamMemberResponse
Change a member's role.
666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 |
# File 'lib/rafflesia/auth.rb', line 666 def teamMembersUpdateRole( member_id:, role: nil, request_options: {} ) body = { 'role' => role }.compact response = @client.request( method: :patch, path: "/v1/auth/team/members/#{Rafflesia::Util.encode_path(member_id)}/role", auth: true, body: body, request_options: ) result = Rafflesia::AuthEnvelopeTeamMemberResponse.new(response.body) result.last_response = Rafflesia::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"]) result end |