clerk-sdk-ruby 8.0.1 → 9.0.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/lib/clerk/actortokens.rb +9 -9
- data/lib/clerk/admin_portal_link_tokens.rb +18 -18
- data/lib/clerk/agenttasks.rb +9 -9
- data/lib/clerk/allowlistidentifiers.rb +13 -13
- data/lib/clerk/api_keys.rb +48 -48
- data/lib/clerk/betafeatures.rb +12 -10
- data/lib/clerk/billing.rb +68 -68
- data/lib/clerk/blocklistidentifiers.rb +13 -13
- data/lib/clerk/clients.rb +13 -13
- data/lib/clerk/directories.rb +342 -46
- data/lib/clerk/domains.rb +23 -20
- data/lib/clerk/emailaddresses.rb +37 -37
- data/lib/clerk/emailandsmstemplates.rb +5 -5
- data/lib/clerk/emailsmstemplates.rb +17 -17
- data/lib/clerk/enterpriseconnections.rb +31 -31
- data/lib/clerk/instancesettings.rb +52 -50
- data/lib/clerk/invitations.rb +166 -18
- data/lib/clerk/jwks.rb +3 -3
- data/lib/clerk/jwttemplates.rb +21 -21
- data/lib/clerk/logs.rb +683 -0
- data/lib/clerk/m2m.rb +27 -27
- data/lib/clerk/machines.rb +41 -41
- data/lib/clerk/miscellaneous.rb +2 -2
- data/lib/clerk/models/components/clerkerror.rb +1 -1
- data/lib/clerk/models/components/data.rb +27 -0
- data/lib/clerk/models/components/{type.rbi → data.rbi} +2 -2
- data/lib/clerk/models/components/directory.rb +8 -2
- data/lib/clerk/models/components/directory.rbi +2 -0
- data/lib/clerk/models/components/directorygroup.rb +44 -0
- data/lib/clerk/models/components/{directory_group.rbi → directorygroup.rbi} +4 -0
- data/lib/clerk/models/components/directorygroup_object.rb +19 -0
- data/lib/clerk/models/components/directorygroup_object.rbi +11 -0
- data/lib/clerk/models/components/directorygroupmember.rb +40 -0
- data/lib/clerk/models/components/directorygroupmember.rbi +17 -0
- data/lib/clerk/models/components/directorygroupmember_list.rb +36 -0
- data/lib/clerk/models/components/directorygroupmember_list.rbi +15 -0
- data/lib/clerk/models/components/directorygroupmember_list_cursor.rb +40 -0
- data/lib/clerk/models/components/directorygroupmember_list_cursor.rbi +17 -0
- data/lib/clerk/models/components/directorygroupmember_object.rb +19 -0
- data/lib/clerk/models/components/directorygroupmember_object.rbi +11 -0
- data/lib/clerk/models/components/directorygrouprolemapping_deleted.rb +1 -1
- data/lib/clerk/models/components/emailaddress_verification_saml_clerkerror.rb +1 -1
- data/lib/clerk/models/components/enterpriseaccount.rb +1 -1
- data/lib/clerk/models/components/enterpriseaccount_verification_oauth_clerkerror.rb +1 -1
- data/lib/clerk/models/components/enterpriseaccount_verification_saml_clerkerror.rb +1 -1
- data/lib/clerk/models/components/enterpriseconnection_idp_certificate.rb +40 -0
- data/lib/clerk/models/components/enterpriseconnection_idp_certificate.rbi +17 -0
- data/lib/clerk/models/components/enterpriseconnection_saml_connection.rb +18 -1
- data/lib/clerk/models/components/enterpriseconnection_saml_connection.rbi +8 -0
- data/lib/clerk/models/components/enterpriseconnectiontestrun.rb +1 -1
- data/lib/clerk/models/components/enterpriseconnectiontestrun_log.rb +44 -0
- data/lib/clerk/models/components/enterpriseconnectiontestrun_log.rbi +19 -0
- data/lib/clerk/models/components/externalaccountwithverification.rb +2 -2
- data/lib/clerk/models/components/externalaccountwithverification_verification_oauth_clerkerror.rb +1 -1
- data/lib/clerk/models/components/first_event.rb +115 -0
- data/lib/clerk/models/components/first_event.rbi +49 -0
- data/lib/clerk/models/components/instance.rb +5 -1
- data/lib/clerk/models/components/instance.rbi +2 -0
- data/lib/clerk/models/components/instanceprotect.rb +1 -1
- data/lib/clerk/models/components/invitation.rb +1 -1
- data/lib/clerk/models/components/invitation_revoked.rb +2 -2
- data/lib/clerk/models/components/log.rb +87 -18
- data/lib/clerk/models/components/log.rbi +38 -8
- data/lib/clerk/models/components/log_impersonator.rb +32 -0
- data/lib/clerk/models/components/log_impersonator.rbi +13 -0
- data/lib/clerk/models/components/log_list.rb +39 -0
- data/lib/clerk/models/components/log_list.rbi +15 -0
- data/lib/clerk/models/components/log_list_cursor.rb +72 -0
- data/lib/clerk/models/components/log_list_cursor.rbi +29 -0
- data/lib/clerk/models/components/logapplicationcontext.rb +36 -0
- data/lib/clerk/models/components/logapplicationcontext.rbi +15 -0
- data/lib/clerk/models/components/logbrowsercontext.rb +36 -0
- data/lib/clerk/models/components/logbrowsercontext.rbi +15 -0
- data/lib/clerk/models/components/logcontext.rb +36 -0
- data/lib/clerk/models/components/logcontext.rbi +15 -0
- data/lib/clerk/models/components/logdevicecontext.rb +60 -0
- data/lib/clerk/models/components/logdevicecontext.rbi +27 -0
- data/lib/clerk/models/components/logdomaincontext.rb +36 -0
- data/lib/clerk/models/components/logdomaincontext.rbi +15 -0
- data/lib/clerk/models/components/logenvironmentcontext.rb +44 -0
- data/lib/clerk/models/components/logenvironmentcontext.rbi +19 -0
- data/lib/clerk/models/components/loggroup.rb +89 -0
- data/lib/clerk/models/components/loggroup.rbi +37 -0
- data/lib/clerk/models/components/loggroup_impersonator.rb +32 -0
- data/lib/clerk/models/components/loggroup_impersonator.rbi +13 -0
- data/lib/clerk/models/components/loggroup_object.rb +19 -0
- data/lib/clerk/models/components/loggroup_object.rbi +11 -0
- data/lib/clerk/models/components/loglocationcontext.rb +41 -0
- data/lib/clerk/models/components/loglocationcontext.rbi +17 -0
- data/lib/clerk/models/components/logschema.rb +68 -0
- data/lib/clerk/models/components/logschema.rbi +25 -0
- data/lib/clerk/models/components/logschemafield.rb +49 -0
- data/lib/clerk/models/components/logschemafield.rbi +19 -0
- data/lib/clerk/models/components/logschemafield_type.rb +22 -0
- data/lib/clerk/models/components/logschemafield_type.rbi +11 -0
- data/lib/clerk/models/components/logwithpayload.rb +110 -0
- data/lib/clerk/models/components/logwithpayload.rbi +49 -0
- data/lib/clerk/models/components/logwithpayload_impersonator.rb +32 -0
- data/lib/clerk/models/components/logwithpayload_impersonator.rbi +13 -0
- data/lib/clerk/models/components/machine_deleted.rb +1 -1
- data/lib/clerk/models/components/machinescope_deleted.rb +1 -1
- data/lib/clerk/models/components/next_page_status.rb +21 -0
- data/lib/clerk/models/components/next_page_status.rbi +11 -0
- data/lib/clerk/models/components/oauthaccesstoken.rb +1 -1
- data/lib/clerk/models/components/oauthapplication.rb +9 -1
- data/lib/clerk/models/components/oauthapplication.rbi +4 -0
- data/lib/clerk/models/components/oauthapplicationsettings.rb +9 -1
- data/lib/clerk/models/components/oauthapplicationsettings.rbi +4 -0
- data/lib/clerk/models/components/oauthapplicationwithsecret.rb +9 -1
- data/lib/clerk/models/components/oauthapplicationwithsecret.rbi +4 -0
- data/lib/clerk/models/components/organization.rb +13 -8
- data/lib/clerk/models/components/organization.rbi +4 -2
- data/lib/clerk/models/components/organizationinvitation.rb +2 -2
- data/lib/clerk/models/components/organizationinvitationwithpublicorganizationdata.rb +2 -2
- data/lib/clerk/models/components/organizationmembership.rb +2 -2
- data/lib/clerk/models/components/organizationmembership_organization.rb +13 -8
- data/lib/clerk/models/components/organizationmembership_organization.rbi +4 -2
- data/lib/clerk/models/components/organizationwithlogo.rb +13 -8
- data/lib/clerk/models/components/organizationwithlogo.rbi +4 -2
- data/lib/clerk/models/components/role_set_migration.rb +1 -1
- data/lib/clerk/models/components/roleset.rb +1 -1
- data/lib/clerk/models/components/{type.rb → roleset_type.rb} +2 -2
- data/lib/clerk/models/components/roleset_type.rbi +11 -0
- data/lib/clerk/models/components/samlaccount.rb +1 -1
- data/lib/clerk/models/components/samlaccount_clerkerror.rb +1 -1
- data/lib/clerk/models/components/samlconnection_1.rb +6 -1
- data/lib/clerk/models/components/samlconnection_1.rbi +2 -0
- data/lib/clerk/models/components/samlconnection_2.rb +6 -1
- data/lib/clerk/models/components/samlconnection_2.rbi +2 -0
- data/lib/clerk/models/components/samlconnection_idp_certificate_1.rb +40 -0
- data/lib/clerk/models/components/samlconnection_idp_certificate_1.rbi +17 -0
- data/lib/clerk/models/components/samlconnection_idp_certificate_2.rb +40 -0
- data/lib/clerk/models/components/samlconnection_idp_certificate_2.rbi +17 -0
- data/lib/clerk/models/components/scimdirectory.rb +8 -2
- data/lib/clerk/models/components/scimdirectory.rbi +2 -0
- data/lib/clerk/models/components/scimgrouprolemapping_deleted.rb +1 -1
- data/lib/clerk/models/components/session.rb +2 -2
- data/lib/clerk/models/components/signup.rb +7 -3
- data/lib/clerk/models/components/signup.rbi +2 -0
- data/lib/clerk/models/components/signupverification.rb +1 -1
- data/lib/clerk/models/components/ssobypassallowlistpublicuserdata.rb +58 -0
- data/lib/clerk/models/components/ssobypassallowlistpublicuserdata.rbi +25 -0
- data/lib/clerk/models/components/ssobypassallowlistuser.rb +49 -0
- data/lib/clerk/models/components/ssobypassallowlistuser.rbi +21 -0
- data/lib/clerk/models/components/ssobypassallowlistuser_object.rb +19 -0
- data/lib/clerk/models/components/ssobypassallowlistuser_object.rbi +11 -0
- data/lib/clerk/models/components/user.rb +8 -4
- data/lib/clerk/models/components/user.rbi +2 -0
- data/lib/clerk/models/components/user_directory.rb +1 -1
- data/lib/clerk/models/components/{directory_group.rb → user_directory_group.rb} +1 -1
- data/lib/clerk/models/components/user_directory_group.rbi +15 -0
- data/lib/clerk/models/components/verification_from_oauth_clerkerror.rb +1 -1
- data/lib/clerk/models/components/verification_google_one_tap_clerkerror.rb +1 -1
- data/lib/clerk/models/components/waitlistentry_invitation.rb +1 -1
- data/lib/clerk/models/components.rb +37 -3
- data/lib/clerk/models/errors/apierror.rb +3 -3
- data/lib/clerk/models/errors/clerkerrors.rb +2 -2
- data/lib/clerk/models/errors/createadminportallinktoken_badrequest_error.rb +1 -1
- data/lib/clerk/models/errors/createadminportallinktoken_conflict_error.rb +1 -1
- data/lib/clerk/models/errors/createadminportallinktoken_forbidden_error.rb +1 -1
- data/lib/clerk/models/errors/createadminportallinktoken_unauthorized_error.rb +1 -1
- data/lib/clerk/models/errors/createapikey_badrequest_error.rb +1 -1
- data/lib/clerk/models/errors/createapikey_conflict_error.rb +1 -1
- data/lib/clerk/models/errors/createm2mtoken_badrequest_error.rb +1 -1
- data/lib/clerk/models/errors/createm2mtoken_conflict_error.rb +1 -1
- data/lib/clerk/models/errors/deleteapikey_badrequest_error.rb +1 -1
- data/lib/clerk/models/errors/deleteapikey_notfound_error.rb +1 -1
- data/lib/clerk/models/errors/getapikey_badrequest_error.rb +1 -1
- data/lib/clerk/models/errors/getapikey_notfound_error.rb +1 -1
- data/lib/clerk/models/errors/getapikeys_badrequest_error.rb +1 -1
- data/lib/clerk/models/errors/getapikeys_notfound_error.rb +1 -1
- data/lib/clerk/models/errors/getapikeysecret_badrequest_error.rb +1 -1
- data/lib/clerk/models/errors/getapikeysecret_notfound_error.rb +1 -1
- data/lib/clerk/models/errors/getm2mtokens_badrequest_error.rb +1 -1
- data/lib/clerk/models/errors/getm2mtokens_forbidden_error.rb +1 -1
- data/lib/clerk/models/errors/getm2mtokens_notfound_error.rb +1 -1
- data/lib/clerk/models/errors/revokeadminportallinktoken_badrequest_error.rb +1 -1
- data/lib/clerk/models/errors/revokeadminportallinktoken_forbidden_error.rb +1 -1
- data/lib/clerk/models/errors/revokeadminportallinktoken_notfound_error.rb +1 -1
- data/lib/clerk/models/errors/revokeadminportallinktoken_unauthorized_error.rb +1 -1
- data/lib/clerk/models/errors/revokeapikey_badrequest_error.rb +1 -1
- data/lib/clerk/models/errors/revokeapikey_notfound_error.rb +1 -1
- data/lib/clerk/models/errors/revokem2mtoken_badrequest_error.rb +1 -1
- data/lib/clerk/models/errors/revokem2mtoken_notfound_error.rb +1 -1
- data/lib/clerk/models/errors/updateapikey_badrequest_error.rb +1 -1
- data/lib/clerk/models/errors/updateapikey_notfound_error.rb +1 -1
- data/lib/clerk/models/errors/verifyapikey_badrequest_error.rb +1 -1
- data/lib/clerk/models/errors/verifyapikey_notfound_error.rb +1 -1
- data/lib/clerk/models/errors/verifym2mtoken_badrequest_error.rb +1 -1
- data/lib/clerk/models/errors/verifym2mtoken_notfound_error.rb +1 -1
- data/lib/clerk/models/errors/verifyoauthaccesstoken_badrequest_error.rb +1 -1
- data/lib/clerk/models/errors/verifyoauthaccesstoken_notfound_error.rb +1 -1
- data/lib/clerk/models/operations/act.rb +40 -0
- data/lib/clerk/models/operations/act.rbi +17 -0
- data/lib/clerk/models/operations/act_act.rb +36 -0
- data/lib/clerk/models/operations/act_act.rbi +15 -0
- data/lib/clerk/models/operations/actor.rb +1 -1
- data/lib/clerk/models/operations/attemptemailaddressverification_requestbody.rb +7 -1
- data/lib/clerk/models/operations/attemptemailaddressverification_requestbody.rbi +2 -0
- data/lib/clerk/models/operations/attemptphonenumberverification_requestbody.rb +7 -1
- data/lib/clerk/models/operations/attemptphonenumberverification_requestbody.rbi +2 -0
- data/lib/clerk/models/operations/clerkidpoauthaccesstoken.rb +5 -1
- data/lib/clerk/models/operations/clerkidpoauthaccesstoken.rbi +2 -0
- data/lib/clerk/models/operations/createbulkinvitations_requestbody.rb +1 -1
- data/lib/clerk/models/operations/createenterpriseconnection_saml.rb +8 -2
- data/lib/clerk/models/operations/createenterpriseconnection_saml.rbi +2 -0
- data/lib/clerk/models/operations/createinvitation_request.rb +1 -1
- data/lib/clerk/models/operations/createoauthapplication_request.rb +13 -1
- data/lib/clerk/models/operations/createoauthapplication_request.rbi +6 -0
- data/lib/clerk/models/operations/createorganization_request.rb +2 -2
- data/lib/clerk/models/operations/createorganizationinvitation_requestbody.rb +2 -2
- data/lib/clerk/models/operations/createorganizationinvitationbulk_requestbody.rb +2 -2
- data/lib/clerk/models/operations/createorganizationmembership_requestbody.rb +2 -2
- data/lib/clerk/models/operations/createsamlconnection_requestbody_1.rb +8 -2
- data/lib/clerk/models/operations/createsamlconnection_requestbody_1.rbi +2 -0
- data/lib/clerk/models/operations/createsamlconnection_requestbody_2.rb +8 -2
- data/lib/clerk/models/operations/createsamlconnection_requestbody_2.rbi +2 -0
- data/lib/clerk/models/operations/createsignintoken_request.rb +17 -2
- data/lib/clerk/models/operations/createsignintoken_request.rbi +4 -0
- data/lib/clerk/models/operations/createssobypassallowlistuser_request.rb +32 -0
- data/lib/clerk/models/operations/createssobypassallowlistuser_request.rbi +13 -0
- data/lib/clerk/models/operations/createssobypassallowlistuser_response.rb +44 -0
- data/lib/clerk/models/operations/createssobypassallowlistuser_response.rbi +19 -0
- data/lib/clerk/models/operations/createuser_request.rb +8 -4
- data/lib/clerk/models/operations/createuser_request.rbi +2 -0
- data/lib/clerk/models/operations/deleteapikey_responsebody.rb +1 -1
- data/lib/clerk/models/operations/deleteinvitation_request.rb +32 -0
- data/lib/clerk/models/operations/deleteinvitation_request.rbi +13 -0
- data/lib/clerk/models/operations/deleteinvitation_response.rb +44 -0
- data/lib/clerk/models/operations/deleteinvitation_response.rbi +19 -0
- data/lib/clerk/models/operations/deletessobypassallowlistuser_request.rb +32 -0
- data/lib/clerk/models/operations/deletessobypassallowlistuser_request.rbi +13 -0
- data/lib/clerk/models/operations/deletessobypassallowlistuser_response.rb +44 -0
- data/lib/clerk/models/operations/deletessobypassallowlistuser_response.rbi +19 -0
- data/lib/clerk/models/operations/filter_match.rb +27 -0
- data/lib/clerk/models/operations/filter_match.rbi +11 -0
- data/lib/clerk/models/operations/getdirectorygroup_request.rb +36 -0
- data/lib/clerk/models/operations/getdirectorygroup_request.rbi +15 -0
- data/lib/clerk/models/operations/getdirectorygroup_response.rb +44 -0
- data/lib/clerk/models/operations/getdirectorygroup_response.rbi +19 -0
- data/lib/clerk/models/operations/getlog_request.rb +34 -0
- data/lib/clerk/models/operations/getlog_request.rbi +13 -0
- data/lib/clerk/models/operations/getlog_response.rb +44 -0
- data/lib/clerk/models/operations/getlog_response.rbi +19 -0
- data/lib/clerk/models/operations/getlogschema_request.rb +35 -0
- data/lib/clerk/models/operations/getlogschema_request.rbi +13 -0
- data/lib/clerk/models/operations/getlogschema_response.rb +44 -0
- data/lib/clerk/models/operations/getlogschema_response.rbi +19 -0
- data/lib/clerk/models/operations/listdirectorygroupmembers_request.rb +45 -0
- data/lib/clerk/models/operations/listdirectorygroupmembers_request.rbi +19 -0
- data/lib/clerk/models/operations/listdirectorygroupmembers_response.rb +44 -0
- data/lib/clerk/models/operations/listdirectorygroupmembers_response.rbi +19 -0
- data/lib/clerk/models/operations/listinvitations_request.rb +6 -1
- data/lib/clerk/models/operations/listinvitations_request.rbi +2 -0
- data/lib/clerk/models/operations/listloggroupevents_request.rb +47 -0
- data/lib/clerk/models/operations/listloggroupevents_request.rbi +19 -0
- data/lib/clerk/models/operations/listloggroupevents_response.rb +44 -0
- data/lib/clerk/models/operations/listloggroupevents_response.rbi +19 -0
- data/lib/clerk/models/operations/listlogs_request.rb +228 -0
- data/lib/clerk/models/operations/listlogs_request.rbi +55 -0
- data/lib/clerk/models/operations/listlogs_response.rb +44 -0
- data/lib/clerk/models/operations/listlogs_response.rbi +19 -0
- data/lib/clerk/models/operations/listssobypassallowlistusers_request.rb +32 -0
- data/lib/clerk/models/operations/listssobypassallowlistusers_request.rbi +13 -0
- data/lib/clerk/models/operations/listssobypassallowlistusers_response.rb +44 -0
- data/lib/clerk/models/operations/listssobypassallowlistusers_response.rbi +19 -0
- data/lib/clerk/models/operations/mergeorganizationmetadata_requestbody.rb +2 -2
- data/lib/clerk/models/operations/mergeuser_request.rb +36 -0
- data/lib/clerk/models/operations/mergeuser_request.rbi +15 -0
- data/lib/clerk/models/operations/mergeuser_requestbody.rb +36 -0
- data/lib/clerk/models/operations/mergeuser_requestbody.rbi +15 -0
- data/lib/clerk/models/operations/mergeuser_response.rb +44 -0
- data/lib/clerk/models/operations/mergeuser_response.rbi +19 -0
- data/lib/clerk/models/operations/mergeuser_responsebody.rb +36 -0
- data/lib/clerk/models/operations/mergeuser_responsebody.rbi +15 -0
- data/lib/clerk/models/operations/refreshsession_requestbody.rb +1 -1
- data/lib/clerk/models/operations/replaceorganizationmetadata_requestbody.rb +2 -2
- data/lib/clerk/models/operations/replaceroleset_requestbody.rb +1 -1
- data/lib/clerk/models/operations/replaceusermetadata_requestbody.rb +3 -3
- data/lib/clerk/models/operations/responsebody.rb +1 -1
- data/lib/clerk/models/operations/revokesession_request.rb +5 -1
- data/lib/clerk/models/operations/revokesession_request.rbi +2 -0
- data/lib/clerk/models/operations/revokesession_requestbody.rb +36 -0
- data/lib/clerk/models/operations/revokesession_requestbody.rbi +13 -0
- data/lib/clerk/models/operations/second_factor_verification.rb +25 -0
- data/lib/clerk/models/operations/second_factor_verification.rbi +11 -0
- data/lib/clerk/models/operations/updatedirectory_requestbody.rb +8 -2
- data/lib/clerk/models/operations/updatedirectory_requestbody.rbi +2 -0
- data/lib/clerk/models/operations/updateenterpriseconnection_saml.rb +8 -2
- data/lib/clerk/models/operations/updateenterpriseconnection_saml.rbi +2 -0
- data/lib/clerk/models/operations/updateinstance_request.rb +1 -1
- data/lib/clerk/models/operations/updateinstanceoauthapplicationsettings_request.rb +9 -1
- data/lib/clerk/models/operations/updateinstanceoauthapplicationsettings_request.rbi +4 -0
- data/lib/clerk/models/operations/updateinstanceprotect_request.rb +1 -5
- data/lib/clerk/models/operations/updateinstanceprotect_request.rbi +0 -2
- data/lib/clerk/models/operations/updateoauthapplication_requestbody.rb +13 -1
- data/lib/clerk/models/operations/updateoauthapplication_requestbody.rbi +6 -0
- data/lib/clerk/models/operations/updateorganization_requestbody.rb +12 -2
- data/lib/clerk/models/operations/updateorganization_requestbody.rbi +4 -0
- data/lib/clerk/models/operations/updateorganizationmembershipmetadata_requestbody.rb +2 -2
- data/lib/clerk/models/operations/updatesamlconnection_requestbody.rb +8 -2
- data/lib/clerk/models/operations/updatesamlconnection_requestbody.rbi +2 -0
- data/lib/clerk/models/operations/updatescimdirectory_requestbody.rb +8 -2
- data/lib/clerk/models/operations/updatescimdirectory_requestbody.rbi +2 -0
- data/lib/clerk/models/operations/updatesession_request.rb +36 -0
- data/lib/clerk/models/operations/updatesession_request.rbi +15 -0
- data/lib/clerk/models/operations/updatesession_requestbody.rb +33 -0
- data/lib/clerk/models/operations/updatesession_requestbody.rbi +13 -0
- data/lib/clerk/models/operations/updatesession_response.rb +44 -0
- data/lib/clerk/models/operations/updatesession_response.rbi +19 -0
- data/lib/clerk/models/operations/updateuser_requestbody.rb +5 -1
- data/lib/clerk/models/operations/updateuser_requestbody.rbi +2 -0
- data/lib/clerk/models/operations/updateusermetadata_requestbody.rb +3 -3
- data/lib/clerk/models/operations/verifypassword_requestbody.rb +7 -1
- data/lib/clerk/models/operations/verifypassword_requestbody.rbi +2 -0
- data/lib/clerk/models/operations/verifytotp_requestbody.rb +7 -1
- data/lib/clerk/models/operations/verifytotp_requestbody.rbi +2 -0
- data/lib/clerk/models/operations/view.rb +38 -0
- data/lib/clerk/models/operations/view.rbi +11 -0
- data/lib/clerk/models/operations.rb +33 -0
- data/lib/clerk/oauthaccesstokens.rb +7 -7
- data/lib/clerk/oauthapplications.rb +37 -37
- data/lib/clerk/openapiclient.rb +3 -1
- data/lib/clerk/organizationdomains.rb +28 -28
- data/lib/clerk/organizationinvitations.rb +35 -35
- data/lib/clerk/organizationmemberships.rb +25 -25
- data/lib/clerk/organizationpermissions.rb +24 -24
- data/lib/clerk/organizationroles.rb +32 -32
- data/lib/clerk/organizations.rb +61 -61
- data/lib/clerk/phonenumbers.rb +36 -36
- data/lib/clerk/proxychecks.rb +5 -5
- data/lib/clerk/redirecturls.rb +16 -16
- data/lib/clerk/rolesets.rb +38 -38
- data/lib/clerk/samlconnections.rb +23 -23
- data/lib/clerk/scimdirectories.rb +46 -46
- data/lib/clerk/sdk_hooks/types.rb +4 -4
- data/lib/clerk/sdkconfiguration.rb +4 -4
- data/lib/clerk/sessions.rb +219 -42
- data/lib/clerk/signintokens.rb +9 -9
- data/lib/clerk/signups.rb +9 -9
- data/lib/clerk/ssobypassallowlistusers.rb +477 -0
- data/lib/clerk/templates.rb +5 -5
- data/lib/clerk/testingtokens.rb +3 -3
- data/lib/clerk/users.rb +376 -189
- data/lib/clerk/utils/forms.rb +9 -9
- data/lib/clerk/utils/headers.rb +2 -2
- data/lib/clerk/utils/query_params.rb +6 -6
- data/lib/clerk/utils/request_bodies.rb +2 -2
- data/lib/clerk/utils/retries.rb +5 -5
- data/lib/clerk/utils/security.rb +4 -4
- data/lib/clerk/utils/utils.rb +13 -13
- data/lib/clerk/waitlistentries.rb +26 -26
- data/lib/clerk/webhooks.rb +11 -11
- data/lib/clerk-sdk-ruby.rb +6 -0
- data/lib/clerk_sdk_ruby.rb +2 -0
- metadata +143 -6
data/lib/clerk/directories.rb
CHANGED
|
@@ -67,7 +67,7 @@ module Clerk
|
|
|
67
67
|
retry_connection_errors: true,
|
|
68
68
|
strategy: 'backoff'
|
|
69
69
|
)
|
|
70
|
-
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
|
70
|
+
retry_options = retries.to_faraday_retry_options(initial_time: ::Time.now)
|
|
71
71
|
retry_options[:retry_statuses] = [500, 501, 502, 503, 504, 505]
|
|
72
72
|
|
|
73
73
|
security = @sdk_configuration.security_source&.call
|
|
@@ -108,7 +108,7 @@ module Clerk
|
|
|
108
108
|
request: req
|
|
109
109
|
)
|
|
110
110
|
end
|
|
111
|
-
rescue StandardError => e
|
|
111
|
+
rescue ::StandardError => e
|
|
112
112
|
error = e
|
|
113
113
|
ensure
|
|
114
114
|
if http_response.nil? || Utils.error_status?(http_response.status)
|
|
@@ -144,7 +144,7 @@ module Clerk
|
|
|
144
144
|
response: http_response
|
|
145
145
|
)
|
|
146
146
|
response_data = http_response.env.response_body
|
|
147
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Components::DirectoryList)
|
|
147
|
+
obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Components::DirectoryList)
|
|
148
148
|
response = Models::Operations::ListDirectoriesResponse.new(
|
|
149
149
|
status_code: http_response.status,
|
|
150
150
|
content_type: content_type,
|
|
@@ -165,7 +165,7 @@ module Clerk
|
|
|
165
165
|
response: http_response
|
|
166
166
|
)
|
|
167
167
|
response_data = http_response.env.response_body
|
|
168
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::ClerkErrors)
|
|
168
|
+
obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Errors::ClerkErrors)
|
|
169
169
|
obj.raw_response = http_response
|
|
170
170
|
raise obj
|
|
171
171
|
else
|
|
@@ -197,7 +197,7 @@ module Clerk
|
|
|
197
197
|
if form && !form.empty?
|
|
198
198
|
body = Utils.encode_form(form)
|
|
199
199
|
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
|
200
|
-
body = URI.encode_www_form(data)
|
|
200
|
+
body = ::URI.encode_www_form(data)
|
|
201
201
|
else
|
|
202
202
|
body = data
|
|
203
203
|
end
|
|
@@ -214,7 +214,7 @@ module Clerk
|
|
|
214
214
|
retry_connection_errors: true,
|
|
215
215
|
strategy: 'backoff'
|
|
216
216
|
)
|
|
217
|
-
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
|
217
|
+
retry_options = retries.to_faraday_retry_options(initial_time: ::Time.now)
|
|
218
218
|
retry_options[:retry_statuses] = [500, 501, 502, 503, 504, 505]
|
|
219
219
|
|
|
220
220
|
security = @sdk_configuration.security_source&.call
|
|
@@ -255,7 +255,7 @@ module Clerk
|
|
|
255
255
|
request: req
|
|
256
256
|
)
|
|
257
257
|
end
|
|
258
|
-
rescue StandardError => e
|
|
258
|
+
rescue ::StandardError => e
|
|
259
259
|
error = e
|
|
260
260
|
ensure
|
|
261
261
|
if http_response.nil? || Utils.error_status?(http_response.status)
|
|
@@ -291,7 +291,7 @@ module Clerk
|
|
|
291
291
|
response: http_response
|
|
292
292
|
)
|
|
293
293
|
response_data = http_response.env.response_body
|
|
294
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Components::Directory)
|
|
294
|
+
obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Components::Directory)
|
|
295
295
|
response = Models::Operations::CreateDirectoryResponse.new(
|
|
296
296
|
status_code: http_response.status,
|
|
297
297
|
content_type: content_type,
|
|
@@ -312,7 +312,7 @@ module Clerk
|
|
|
312
312
|
response: http_response
|
|
313
313
|
)
|
|
314
314
|
response_data = http_response.env.response_body
|
|
315
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::ClerkErrors)
|
|
315
|
+
obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Errors::ClerkErrors)
|
|
316
316
|
obj.raw_response = http_response
|
|
317
317
|
raise obj
|
|
318
318
|
else
|
|
@@ -359,7 +359,7 @@ module Clerk
|
|
|
359
359
|
retry_connection_errors: true,
|
|
360
360
|
strategy: 'backoff'
|
|
361
361
|
)
|
|
362
|
-
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
|
362
|
+
retry_options = retries.to_faraday_retry_options(initial_time: ::Time.now)
|
|
363
363
|
retry_options[:retry_statuses] = [500, 501, 502, 503, 504, 505]
|
|
364
364
|
|
|
365
365
|
security = @sdk_configuration.security_source&.call
|
|
@@ -399,7 +399,7 @@ module Clerk
|
|
|
399
399
|
request: req
|
|
400
400
|
)
|
|
401
401
|
end
|
|
402
|
-
rescue StandardError => e
|
|
402
|
+
rescue ::StandardError => e
|
|
403
403
|
error = e
|
|
404
404
|
ensure
|
|
405
405
|
if http_response.nil? || Utils.error_status?(http_response.status)
|
|
@@ -435,7 +435,7 @@ module Clerk
|
|
|
435
435
|
response: http_response
|
|
436
436
|
)
|
|
437
437
|
response_data = http_response.env.response_body
|
|
438
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Components::Directory)
|
|
438
|
+
obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Components::Directory)
|
|
439
439
|
response = Models::Operations::GetDirectoryResponse.new(
|
|
440
440
|
status_code: http_response.status,
|
|
441
441
|
content_type: content_type,
|
|
@@ -456,7 +456,7 @@ module Clerk
|
|
|
456
456
|
response: http_response
|
|
457
457
|
)
|
|
458
458
|
response_data = http_response.env.response_body
|
|
459
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::ClerkErrors)
|
|
459
|
+
obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Errors::ClerkErrors)
|
|
460
460
|
obj.raw_response = http_response
|
|
461
461
|
raise obj
|
|
462
462
|
else
|
|
@@ -497,7 +497,7 @@ module Clerk
|
|
|
497
497
|
if form && !form.empty?
|
|
498
498
|
body = Utils.encode_form(form)
|
|
499
499
|
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
|
500
|
-
body = URI.encode_www_form(data)
|
|
500
|
+
body = ::URI.encode_www_form(data)
|
|
501
501
|
else
|
|
502
502
|
body = data
|
|
503
503
|
end
|
|
@@ -514,7 +514,7 @@ module Clerk
|
|
|
514
514
|
retry_connection_errors: true,
|
|
515
515
|
strategy: 'backoff'
|
|
516
516
|
)
|
|
517
|
-
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
|
517
|
+
retry_options = retries.to_faraday_retry_options(initial_time: ::Time.now)
|
|
518
518
|
retry_options[:retry_statuses] = [500, 501, 502, 503, 504, 505]
|
|
519
519
|
|
|
520
520
|
security = @sdk_configuration.security_source&.call
|
|
@@ -555,7 +555,7 @@ module Clerk
|
|
|
555
555
|
request: req
|
|
556
556
|
)
|
|
557
557
|
end
|
|
558
|
-
rescue StandardError => e
|
|
558
|
+
rescue ::StandardError => e
|
|
559
559
|
error = e
|
|
560
560
|
ensure
|
|
561
561
|
if http_response.nil? || Utils.error_status?(http_response.status)
|
|
@@ -591,7 +591,7 @@ module Clerk
|
|
|
591
591
|
response: http_response
|
|
592
592
|
)
|
|
593
593
|
response_data = http_response.env.response_body
|
|
594
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Components::Directory)
|
|
594
|
+
obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Components::Directory)
|
|
595
595
|
response = Models::Operations::UpdateDirectoryResponse.new(
|
|
596
596
|
status_code: http_response.status,
|
|
597
597
|
content_type: content_type,
|
|
@@ -612,7 +612,7 @@ module Clerk
|
|
|
612
612
|
response: http_response
|
|
613
613
|
)
|
|
614
614
|
response_data = http_response.env.response_body
|
|
615
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::ClerkErrors)
|
|
615
|
+
obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Errors::ClerkErrors)
|
|
616
616
|
obj.raw_response = http_response
|
|
617
617
|
raise obj
|
|
618
618
|
else
|
|
@@ -660,7 +660,7 @@ module Clerk
|
|
|
660
660
|
retry_connection_errors: true,
|
|
661
661
|
strategy: 'backoff'
|
|
662
662
|
)
|
|
663
|
-
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
|
663
|
+
retry_options = retries.to_faraday_retry_options(initial_time: ::Time.now)
|
|
664
664
|
retry_options[:retry_statuses] = [500, 501, 502, 503, 504, 505]
|
|
665
665
|
|
|
666
666
|
security = @sdk_configuration.security_source&.call
|
|
@@ -700,7 +700,7 @@ module Clerk
|
|
|
700
700
|
request: req
|
|
701
701
|
)
|
|
702
702
|
end
|
|
703
|
-
rescue StandardError => e
|
|
703
|
+
rescue ::StandardError => e
|
|
704
704
|
error = e
|
|
705
705
|
ensure
|
|
706
706
|
if http_response.nil? || Utils.error_status?(http_response.status)
|
|
@@ -736,7 +736,7 @@ module Clerk
|
|
|
736
736
|
response: http_response
|
|
737
737
|
)
|
|
738
738
|
response_data = http_response.env.response_body
|
|
739
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Components::DeletedObject)
|
|
739
|
+
obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Components::DeletedObject)
|
|
740
740
|
response = Models::Operations::DeleteDirectoryResponse.new(
|
|
741
741
|
status_code: http_response.status,
|
|
742
742
|
content_type: content_type,
|
|
@@ -757,7 +757,7 @@ module Clerk
|
|
|
757
757
|
response: http_response
|
|
758
758
|
)
|
|
759
759
|
response_data = http_response.env.response_body
|
|
760
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::ClerkErrors)
|
|
760
|
+
obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Errors::ClerkErrors)
|
|
761
761
|
obj.raw_response = http_response
|
|
762
762
|
raise obj
|
|
763
763
|
else
|
|
@@ -807,7 +807,7 @@ module Clerk
|
|
|
807
807
|
retry_connection_errors: true,
|
|
808
808
|
strategy: 'backoff'
|
|
809
809
|
)
|
|
810
|
-
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
|
810
|
+
retry_options = retries.to_faraday_retry_options(initial_time: ::Time.now)
|
|
811
811
|
retry_options[:retry_statuses] = [500, 501, 502, 503, 504, 505]
|
|
812
812
|
|
|
813
813
|
security = @sdk_configuration.security_source&.call
|
|
@@ -847,7 +847,7 @@ module Clerk
|
|
|
847
847
|
request: req
|
|
848
848
|
)
|
|
849
849
|
end
|
|
850
|
-
rescue StandardError => e
|
|
850
|
+
rescue ::StandardError => e
|
|
851
851
|
error = e
|
|
852
852
|
ensure
|
|
853
853
|
if http_response.nil? || Utils.error_status?(http_response.status)
|
|
@@ -883,7 +883,7 @@ module Clerk
|
|
|
883
883
|
response: http_response
|
|
884
884
|
)
|
|
885
885
|
response_data = http_response.env.response_body
|
|
886
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Components::Directory)
|
|
886
|
+
obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Components::Directory)
|
|
887
887
|
response = Models::Operations::RotateDirectoryAPIKeyResponse.new(
|
|
888
888
|
status_code: http_response.status,
|
|
889
889
|
content_type: content_type,
|
|
@@ -904,7 +904,303 @@ module Clerk
|
|
|
904
904
|
response: http_response
|
|
905
905
|
)
|
|
906
906
|
response_data = http_response.env.response_body
|
|
907
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::ClerkErrors)
|
|
907
|
+
obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Errors::ClerkErrors)
|
|
908
|
+
obj.raw_response = http_response
|
|
909
|
+
raise obj
|
|
910
|
+
else
|
|
911
|
+
raise ::Clerk::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
912
|
+
end
|
|
913
|
+
elsif Utils.match_status_code(http_response.status, ['4XX'])
|
|
914
|
+
raise ::Clerk::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
915
|
+
elsif Utils.match_status_code(http_response.status, ['5XX'])
|
|
916
|
+
raise ::Clerk::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
917
|
+
else
|
|
918
|
+
raise ::Clerk::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received'
|
|
919
|
+
|
|
920
|
+
end
|
|
921
|
+
end
|
|
922
|
+
|
|
923
|
+
|
|
924
|
+
|
|
925
|
+
def get_group(directory_id:, group_id:, retries: nil, timeout_ms: nil, http_headers: nil)
|
|
926
|
+
# get_group - Retrieve a directory group
|
|
927
|
+
# Returns one group of the directory, as reported by the identity provider.
|
|
928
|
+
# Responds with 404 once the identity provider has deleted the group.
|
|
929
|
+
request = Models::Operations::GetDirectoryGroupRequest.new(
|
|
930
|
+
directory_id: directory_id,
|
|
931
|
+
group_id: group_id
|
|
932
|
+
)
|
|
933
|
+
url, params = @sdk_configuration.get_server_details
|
|
934
|
+
base_url = Utils.template_url(url, params)
|
|
935
|
+
url = Utils.generate_url(
|
|
936
|
+
Models::Operations::GetDirectoryGroupRequest,
|
|
937
|
+
base_url,
|
|
938
|
+
'/directories/{directory_id}/groups/{group_id}',
|
|
939
|
+
request
|
|
940
|
+
)
|
|
941
|
+
headers = {}
|
|
942
|
+
|
|
943
|
+
headers['Accept'] = 'application/json'
|
|
944
|
+
headers['user-agent'] = @sdk_configuration.user_agent
|
|
945
|
+
retries ||= @sdk_configuration.retry_config
|
|
946
|
+
retries ||= Utils::RetryConfig.new(
|
|
947
|
+
backoff: Utils::BackoffStrategy.new(
|
|
948
|
+
exponent: 1.5,
|
|
949
|
+
initial_interval: 500,
|
|
950
|
+
max_elapsed_time: 3_600_000,
|
|
951
|
+
max_interval: 60_000
|
|
952
|
+
),
|
|
953
|
+
retry_connection_errors: true,
|
|
954
|
+
strategy: 'backoff'
|
|
955
|
+
)
|
|
956
|
+
retry_options = retries.to_faraday_retry_options(initial_time: ::Time.now)
|
|
957
|
+
retry_options[:retry_statuses] = [500, 501, 502, 503, 504, 505]
|
|
958
|
+
|
|
959
|
+
security = @sdk_configuration.security_source&.call
|
|
960
|
+
|
|
961
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
|
962
|
+
timeout ||= @sdk_configuration.timeout
|
|
963
|
+
|
|
964
|
+
|
|
965
|
+
connection = @sdk_configuration.client.dup
|
|
966
|
+
connection.use Utils::RetryMiddleware, retry_options
|
|
967
|
+
|
|
968
|
+
hook_ctx = SDKHooks::HookContext.new(
|
|
969
|
+
config: @sdk_configuration,
|
|
970
|
+
base_url: base_url,
|
|
971
|
+
oauth2_scopes: nil,
|
|
972
|
+
operation_id: 'GetDirectoryGroup',
|
|
973
|
+
security_source: @sdk_configuration.security_source
|
|
974
|
+
)
|
|
975
|
+
|
|
976
|
+
error = nil
|
|
977
|
+
http_response = nil
|
|
978
|
+
|
|
979
|
+
|
|
980
|
+
begin
|
|
981
|
+
http_response = connection.get(url) do |req|
|
|
982
|
+
req.headers.merge!(headers)
|
|
983
|
+
req.options.timeout = timeout unless timeout.nil?
|
|
984
|
+
Utils.configure_request_security(req, security)
|
|
985
|
+
http_headers&.each do |key, value|
|
|
986
|
+
req.headers[key.to_s] = value
|
|
987
|
+
end
|
|
988
|
+
|
|
989
|
+
@sdk_configuration.hooks.before_request(
|
|
990
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
991
|
+
hook_ctx: hook_ctx
|
|
992
|
+
),
|
|
993
|
+
request: req
|
|
994
|
+
)
|
|
995
|
+
end
|
|
996
|
+
rescue ::StandardError => e
|
|
997
|
+
error = e
|
|
998
|
+
ensure
|
|
999
|
+
if http_response.nil? || Utils.error_status?(http_response.status)
|
|
1000
|
+
http_response = @sdk_configuration.hooks.after_error(
|
|
1001
|
+
error: error,
|
|
1002
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
|
1003
|
+
hook_ctx: hook_ctx
|
|
1004
|
+
),
|
|
1005
|
+
response: http_response
|
|
1006
|
+
)
|
|
1007
|
+
else
|
|
1008
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
1009
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
1010
|
+
hook_ctx: hook_ctx
|
|
1011
|
+
),
|
|
1012
|
+
response: http_response
|
|
1013
|
+
)
|
|
1014
|
+
end
|
|
1015
|
+
|
|
1016
|
+
if http_response.nil?
|
|
1017
|
+
raise error if !error.nil?
|
|
1018
|
+
raise 'no response'
|
|
1019
|
+
end
|
|
1020
|
+
end
|
|
1021
|
+
|
|
1022
|
+
content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
|
|
1023
|
+
if Utils.match_status_code(http_response.status, ['200'])
|
|
1024
|
+
if Utils.match_content_type(content_type, 'application/json')
|
|
1025
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
1026
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
1027
|
+
hook_ctx: hook_ctx
|
|
1028
|
+
),
|
|
1029
|
+
response: http_response
|
|
1030
|
+
)
|
|
1031
|
+
response_data = http_response.env.response_body
|
|
1032
|
+
obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Components::DirectoryGroup)
|
|
1033
|
+
response = Models::Operations::GetDirectoryGroupResponse.new(
|
|
1034
|
+
status_code: http_response.status,
|
|
1035
|
+
content_type: content_type,
|
|
1036
|
+
raw_response: http_response,
|
|
1037
|
+
directory_group: obj
|
|
1038
|
+
)
|
|
1039
|
+
|
|
1040
|
+
return response
|
|
1041
|
+
else
|
|
1042
|
+
raise ::Clerk::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
1043
|
+
end
|
|
1044
|
+
elsif Utils.match_status_code(http_response.status, ['401', '403', '404'])
|
|
1045
|
+
if Utils.match_content_type(content_type, 'application/json')
|
|
1046
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
1047
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
1048
|
+
hook_ctx: hook_ctx
|
|
1049
|
+
),
|
|
1050
|
+
response: http_response
|
|
1051
|
+
)
|
|
1052
|
+
response_data = http_response.env.response_body
|
|
1053
|
+
obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Errors::ClerkErrors)
|
|
1054
|
+
obj.raw_response = http_response
|
|
1055
|
+
raise obj
|
|
1056
|
+
else
|
|
1057
|
+
raise ::Clerk::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
1058
|
+
end
|
|
1059
|
+
elsif Utils.match_status_code(http_response.status, ['4XX'])
|
|
1060
|
+
raise ::Clerk::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
1061
|
+
elsif Utils.match_status_code(http_response.status, ['5XX'])
|
|
1062
|
+
raise ::Clerk::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
1063
|
+
else
|
|
1064
|
+
raise ::Clerk::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received'
|
|
1065
|
+
|
|
1066
|
+
end
|
|
1067
|
+
end
|
|
1068
|
+
|
|
1069
|
+
|
|
1070
|
+
|
|
1071
|
+
def list_group_members(directory_id:, group_id:, limit: nil, starting_after: nil, retries: nil, timeout_ms: nil, http_headers: nil)
|
|
1072
|
+
# list_group_members - List directory group members
|
|
1073
|
+
# Returns the members of a group, as reported by the identity provider, using cursor-based pagination.
|
|
1074
|
+
# Each member carries the Clerk user it is linked to, or null until that user has been provisioned.
|
|
1075
|
+
request = Models::Operations::ListDirectoryGroupMembersRequest.new(
|
|
1076
|
+
directory_id: directory_id,
|
|
1077
|
+
group_id: group_id,
|
|
1078
|
+
limit: limit,
|
|
1079
|
+
starting_after: starting_after
|
|
1080
|
+
)
|
|
1081
|
+
url, params = @sdk_configuration.get_server_details
|
|
1082
|
+
base_url = Utils.template_url(url, params)
|
|
1083
|
+
url = Utils.generate_url(
|
|
1084
|
+
Models::Operations::ListDirectoryGroupMembersRequest,
|
|
1085
|
+
base_url,
|
|
1086
|
+
'/directories/{directory_id}/groups/{group_id}/members',
|
|
1087
|
+
request
|
|
1088
|
+
)
|
|
1089
|
+
headers = {}
|
|
1090
|
+
|
|
1091
|
+
query_params = Utils.get_query_params(Models::Operations::ListDirectoryGroupMembersRequest, request, nil)
|
|
1092
|
+
headers['Accept'] = 'application/json'
|
|
1093
|
+
headers['user-agent'] = @sdk_configuration.user_agent
|
|
1094
|
+
retries ||= @sdk_configuration.retry_config
|
|
1095
|
+
retries ||= Utils::RetryConfig.new(
|
|
1096
|
+
backoff: Utils::BackoffStrategy.new(
|
|
1097
|
+
exponent: 1.5,
|
|
1098
|
+
initial_interval: 500,
|
|
1099
|
+
max_elapsed_time: 3_600_000,
|
|
1100
|
+
max_interval: 60_000
|
|
1101
|
+
),
|
|
1102
|
+
retry_connection_errors: true,
|
|
1103
|
+
strategy: 'backoff'
|
|
1104
|
+
)
|
|
1105
|
+
retry_options = retries.to_faraday_retry_options(initial_time: ::Time.now)
|
|
1106
|
+
retry_options[:retry_statuses] = [500, 501, 502, 503, 504, 505]
|
|
1107
|
+
|
|
1108
|
+
security = @sdk_configuration.security_source&.call
|
|
1109
|
+
|
|
1110
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
|
1111
|
+
timeout ||= @sdk_configuration.timeout
|
|
1112
|
+
|
|
1113
|
+
|
|
1114
|
+
connection = @sdk_configuration.client.dup
|
|
1115
|
+
connection.use Utils::RetryMiddleware, retry_options
|
|
1116
|
+
|
|
1117
|
+
hook_ctx = SDKHooks::HookContext.new(
|
|
1118
|
+
config: @sdk_configuration,
|
|
1119
|
+
base_url: base_url,
|
|
1120
|
+
oauth2_scopes: nil,
|
|
1121
|
+
operation_id: 'ListDirectoryGroupMembers',
|
|
1122
|
+
security_source: @sdk_configuration.security_source
|
|
1123
|
+
)
|
|
1124
|
+
|
|
1125
|
+
error = nil
|
|
1126
|
+
http_response = nil
|
|
1127
|
+
|
|
1128
|
+
|
|
1129
|
+
begin
|
|
1130
|
+
http_response = connection.get(url) do |req|
|
|
1131
|
+
req.headers.merge!(headers)
|
|
1132
|
+
req.options.timeout = timeout unless timeout.nil?
|
|
1133
|
+
req.params = query_params
|
|
1134
|
+
Utils.configure_request_security(req, security)
|
|
1135
|
+
http_headers&.each do |key, value|
|
|
1136
|
+
req.headers[key.to_s] = value
|
|
1137
|
+
end
|
|
1138
|
+
|
|
1139
|
+
@sdk_configuration.hooks.before_request(
|
|
1140
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
1141
|
+
hook_ctx: hook_ctx
|
|
1142
|
+
),
|
|
1143
|
+
request: req
|
|
1144
|
+
)
|
|
1145
|
+
end
|
|
1146
|
+
rescue ::StandardError => e
|
|
1147
|
+
error = e
|
|
1148
|
+
ensure
|
|
1149
|
+
if http_response.nil? || Utils.error_status?(http_response.status)
|
|
1150
|
+
http_response = @sdk_configuration.hooks.after_error(
|
|
1151
|
+
error: error,
|
|
1152
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
|
1153
|
+
hook_ctx: hook_ctx
|
|
1154
|
+
),
|
|
1155
|
+
response: http_response
|
|
1156
|
+
)
|
|
1157
|
+
else
|
|
1158
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
1159
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
1160
|
+
hook_ctx: hook_ctx
|
|
1161
|
+
),
|
|
1162
|
+
response: http_response
|
|
1163
|
+
)
|
|
1164
|
+
end
|
|
1165
|
+
|
|
1166
|
+
if http_response.nil?
|
|
1167
|
+
raise error if !error.nil?
|
|
1168
|
+
raise 'no response'
|
|
1169
|
+
end
|
|
1170
|
+
end
|
|
1171
|
+
|
|
1172
|
+
content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
|
|
1173
|
+
if Utils.match_status_code(http_response.status, ['200'])
|
|
1174
|
+
if Utils.match_content_type(content_type, 'application/json')
|
|
1175
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
1176
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
1177
|
+
hook_ctx: hook_ctx
|
|
1178
|
+
),
|
|
1179
|
+
response: http_response
|
|
1180
|
+
)
|
|
1181
|
+
response_data = http_response.env.response_body
|
|
1182
|
+
obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Components::DirectoryGroupMemberList)
|
|
1183
|
+
response = Models::Operations::ListDirectoryGroupMembersResponse.new(
|
|
1184
|
+
status_code: http_response.status,
|
|
1185
|
+
content_type: content_type,
|
|
1186
|
+
raw_response: http_response,
|
|
1187
|
+
directory_group_member_list: obj
|
|
1188
|
+
)
|
|
1189
|
+
|
|
1190
|
+
return response
|
|
1191
|
+
else
|
|
1192
|
+
raise ::Clerk::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
1193
|
+
end
|
|
1194
|
+
elsif Utils.match_status_code(http_response.status, ['401', '403', '404'])
|
|
1195
|
+
if Utils.match_content_type(content_type, 'application/json')
|
|
1196
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
1197
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
1198
|
+
hook_ctx: hook_ctx
|
|
1199
|
+
),
|
|
1200
|
+
response: http_response
|
|
1201
|
+
)
|
|
1202
|
+
response_data = http_response.env.response_body
|
|
1203
|
+
obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Errors::ClerkErrors)
|
|
908
1204
|
obj.raw_response = http_response
|
|
909
1205
|
raise obj
|
|
910
1206
|
else
|
|
@@ -951,7 +1247,7 @@ module Clerk
|
|
|
951
1247
|
retry_connection_errors: true,
|
|
952
1248
|
strategy: 'backoff'
|
|
953
1249
|
)
|
|
954
|
-
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
|
1250
|
+
retry_options = retries.to_faraday_retry_options(initial_time: ::Time.now)
|
|
955
1251
|
retry_options[:retry_statuses] = [500, 501, 502, 503, 504, 505]
|
|
956
1252
|
|
|
957
1253
|
security = @sdk_configuration.security_source&.call
|
|
@@ -991,7 +1287,7 @@ module Clerk
|
|
|
991
1287
|
request: req
|
|
992
1288
|
)
|
|
993
1289
|
end
|
|
994
|
-
rescue StandardError => e
|
|
1290
|
+
rescue ::StandardError => e
|
|
995
1291
|
error = e
|
|
996
1292
|
ensure
|
|
997
1293
|
if http_response.nil? || Utils.error_status?(http_response.status)
|
|
@@ -1027,7 +1323,7 @@ module Clerk
|
|
|
1027
1323
|
response: http_response
|
|
1028
1324
|
)
|
|
1029
1325
|
response_data = http_response.env.response_body
|
|
1030
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Components::DirectoryGroupRoleMappingList)
|
|
1326
|
+
obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Components::DirectoryGroupRoleMappingList)
|
|
1031
1327
|
response = Models::Operations::ListDirectoryGroupRoleMappingsResponse.new(
|
|
1032
1328
|
status_code: http_response.status,
|
|
1033
1329
|
content_type: content_type,
|
|
@@ -1048,7 +1344,7 @@ module Clerk
|
|
|
1048
1344
|
response: http_response
|
|
1049
1345
|
)
|
|
1050
1346
|
response_data = http_response.env.response_body
|
|
1051
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::ClerkErrors)
|
|
1347
|
+
obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Errors::ClerkErrors)
|
|
1052
1348
|
obj.raw_response = http_response
|
|
1053
1349
|
raise obj
|
|
1054
1350
|
else
|
|
@@ -1087,12 +1383,12 @@ module Clerk
|
|
|
1087
1383
|
|
|
1088
1384
|
req_content_type, data, form = Utils.serialize_request_body(request, false, false, :body, :json)
|
|
1089
1385
|
headers['content-type'] = req_content_type
|
|
1090
|
-
raise StandardError, 'request body is required' if data.nil? && form.nil?
|
|
1386
|
+
raise ::StandardError, 'request body is required' if data.nil? && form.nil?
|
|
1091
1387
|
|
|
1092
1388
|
if form && !form.empty?
|
|
1093
1389
|
body = Utils.encode_form(form)
|
|
1094
1390
|
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
|
1095
|
-
body = URI.encode_www_form(data)
|
|
1391
|
+
body = ::URI.encode_www_form(data)
|
|
1096
1392
|
else
|
|
1097
1393
|
body = data
|
|
1098
1394
|
end
|
|
@@ -1109,7 +1405,7 @@ module Clerk
|
|
|
1109
1405
|
retry_connection_errors: true,
|
|
1110
1406
|
strategy: 'backoff'
|
|
1111
1407
|
)
|
|
1112
|
-
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
|
1408
|
+
retry_options = retries.to_faraday_retry_options(initial_time: ::Time.now)
|
|
1113
1409
|
retry_options[:retry_statuses] = [500, 501, 502, 503, 504, 505]
|
|
1114
1410
|
|
|
1115
1411
|
security = @sdk_configuration.security_source&.call
|
|
@@ -1150,7 +1446,7 @@ module Clerk
|
|
|
1150
1446
|
request: req
|
|
1151
1447
|
)
|
|
1152
1448
|
end
|
|
1153
|
-
rescue StandardError => e
|
|
1449
|
+
rescue ::StandardError => e
|
|
1154
1450
|
error = e
|
|
1155
1451
|
ensure
|
|
1156
1452
|
if http_response.nil? || Utils.error_status?(http_response.status)
|
|
@@ -1186,7 +1482,7 @@ module Clerk
|
|
|
1186
1482
|
response: http_response
|
|
1187
1483
|
)
|
|
1188
1484
|
response_data = http_response.env.response_body
|
|
1189
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Components::DirectoryGroupRoleMapping)
|
|
1485
|
+
obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Components::DirectoryGroupRoleMapping)
|
|
1190
1486
|
response = Models::Operations::CreateDirectoryGroupRoleMappingResponse.new(
|
|
1191
1487
|
status_code: http_response.status,
|
|
1192
1488
|
content_type: content_type,
|
|
@@ -1207,7 +1503,7 @@ module Clerk
|
|
|
1207
1503
|
response: http_response
|
|
1208
1504
|
)
|
|
1209
1505
|
response_data = http_response.env.response_body
|
|
1210
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::ClerkErrors)
|
|
1506
|
+
obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Errors::ClerkErrors)
|
|
1211
1507
|
obj.raw_response = http_response
|
|
1212
1508
|
raise obj
|
|
1213
1509
|
else
|
|
@@ -1248,12 +1544,12 @@ module Clerk
|
|
|
1248
1544
|
|
|
1249
1545
|
req_content_type, data, form = Utils.serialize_request_body(request, false, false, :body, :json)
|
|
1250
1546
|
headers['content-type'] = req_content_type
|
|
1251
|
-
raise StandardError, 'request body is required' if data.nil? && form.nil?
|
|
1547
|
+
raise ::StandardError, 'request body is required' if data.nil? && form.nil?
|
|
1252
1548
|
|
|
1253
1549
|
if form && !form.empty?
|
|
1254
1550
|
body = Utils.encode_form(form)
|
|
1255
1551
|
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
|
1256
|
-
body = URI.encode_www_form(data)
|
|
1552
|
+
body = ::URI.encode_www_form(data)
|
|
1257
1553
|
else
|
|
1258
1554
|
body = data
|
|
1259
1555
|
end
|
|
@@ -1270,7 +1566,7 @@ module Clerk
|
|
|
1270
1566
|
retry_connection_errors: true,
|
|
1271
1567
|
strategy: 'backoff'
|
|
1272
1568
|
)
|
|
1273
|
-
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
|
1569
|
+
retry_options = retries.to_faraday_retry_options(initial_time: ::Time.now)
|
|
1274
1570
|
retry_options[:retry_statuses] = [500, 501, 502, 503, 504, 505]
|
|
1275
1571
|
|
|
1276
1572
|
security = @sdk_configuration.security_source&.call
|
|
@@ -1311,7 +1607,7 @@ module Clerk
|
|
|
1311
1607
|
request: req
|
|
1312
1608
|
)
|
|
1313
1609
|
end
|
|
1314
|
-
rescue StandardError => e
|
|
1610
|
+
rescue ::StandardError => e
|
|
1315
1611
|
error = e
|
|
1316
1612
|
ensure
|
|
1317
1613
|
if http_response.nil? || Utils.error_status?(http_response.status)
|
|
@@ -1347,7 +1643,7 @@ module Clerk
|
|
|
1347
1643
|
response: http_response
|
|
1348
1644
|
)
|
|
1349
1645
|
response_data = http_response.env.response_body
|
|
1350
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Components::DirectoryGroupRoleMappingList)
|
|
1646
|
+
obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Components::DirectoryGroupRoleMappingList)
|
|
1351
1647
|
response = Models::Operations::ReplaceDirectoryGroupRoleMappingsResponse.new(
|
|
1352
1648
|
status_code: http_response.status,
|
|
1353
1649
|
content_type: content_type,
|
|
@@ -1368,7 +1664,7 @@ module Clerk
|
|
|
1368
1664
|
response: http_response
|
|
1369
1665
|
)
|
|
1370
1666
|
response_data = http_response.env.response_body
|
|
1371
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::ClerkErrors)
|
|
1667
|
+
obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Errors::ClerkErrors)
|
|
1372
1668
|
obj.raw_response = http_response
|
|
1373
1669
|
raise obj
|
|
1374
1670
|
else
|
|
@@ -1418,7 +1714,7 @@ module Clerk
|
|
|
1418
1714
|
retry_connection_errors: true,
|
|
1419
1715
|
strategy: 'backoff'
|
|
1420
1716
|
)
|
|
1421
|
-
retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
|
|
1717
|
+
retry_options = retries.to_faraday_retry_options(initial_time: ::Time.now)
|
|
1422
1718
|
retry_options[:retry_statuses] = [500, 501, 502, 503, 504, 505]
|
|
1423
1719
|
|
|
1424
1720
|
security = @sdk_configuration.security_source&.call
|
|
@@ -1458,7 +1754,7 @@ module Clerk
|
|
|
1458
1754
|
request: req
|
|
1459
1755
|
)
|
|
1460
1756
|
end
|
|
1461
|
-
rescue StandardError => e
|
|
1757
|
+
rescue ::StandardError => e
|
|
1462
1758
|
error = e
|
|
1463
1759
|
ensure
|
|
1464
1760
|
if http_response.nil? || Utils.error_status?(http_response.status)
|
|
@@ -1494,7 +1790,7 @@ module Clerk
|
|
|
1494
1790
|
response: http_response
|
|
1495
1791
|
)
|
|
1496
1792
|
response_data = http_response.env.response_body
|
|
1497
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Components::DirectoryGroupRoleMappingDeleted)
|
|
1793
|
+
obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Components::DirectoryGroupRoleMappingDeleted)
|
|
1498
1794
|
response = Models::Operations::DeleteDirectoryGroupRoleMappingResponse.new(
|
|
1499
1795
|
status_code: http_response.status,
|
|
1500
1796
|
content_type: content_type,
|
|
@@ -1515,7 +1811,7 @@ module Clerk
|
|
|
1515
1811
|
response: http_response
|
|
1516
1812
|
)
|
|
1517
1813
|
response_data = http_response.env.response_body
|
|
1518
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::ClerkErrors)
|
|
1814
|
+
obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Errors::ClerkErrors)
|
|
1519
1815
|
obj.raw_response = http_response
|
|
1520
1816
|
raise obj
|
|
1521
1817
|
else
|