clerk-sdk-ruby 7.0.0 → 8.0.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/lib/clerk/actortokens.rb +11 -11
- data/lib/clerk/admin_portal_link_tokens.rb +10 -10
- data/lib/clerk/agenttasks.rb +10 -10
- data/lib/clerk/allowlistidentifiers.rb +15 -15
- data/lib/clerk/api_keys.rb +40 -40
- data/lib/clerk/betafeatures.rb +10 -10
- data/lib/clerk/billing.rb +388 -52
- data/lib/clerk/blocklistidentifiers.rb +15 -15
- data/lib/clerk/clients.rb +15 -15
- data/lib/clerk/directories.rb +1534 -0
- data/lib/clerk/domains.rb +27 -24
- data/lib/clerk/emailaddresses.rb +43 -36
- data/lib/clerk/emailandsmstemplates.rb +6 -6
- data/lib/clerk/emailsmstemplates.rb +21 -21
- data/lib/clerk/enterpriseconnections.rb +35 -35
- data/lib/clerk/instancesettings.rb +60 -60
- data/lib/clerk/invitations.rb +20 -20
- data/lib/clerk/jwks.rb +5 -5
- data/lib/clerk/jwttemplates.rb +25 -25
- data/lib/clerk/m2m.rb +20 -20
- data/lib/clerk/machines.rb +45 -45
- data/lib/clerk/miscellaneous.rb +5 -5
- data/lib/clerk/models/components/amount_off.rb +44 -0
- data/lib/clerk/models/components/{schemas_commerceplan_fee.rbi → amount_off.rbi} +2 -2
- data/lib/clerk/models/components/applycommercediscountrequest.rb +32 -0
- data/lib/clerk/models/components/applycommercediscountrequest.rbi +13 -0
- data/lib/clerk/models/components/automation_disposition.rb +21 -0
- data/lib/clerk/models/components/automation_disposition.rbi +11 -0
- data/lib/clerk/models/components/billingpaymentattempt_totals.rb +1 -1
- data/lib/clerk/models/components/billingstatement.rb +1 -1
- data/lib/clerk/models/components/{group.rb → billingstatement_group.rb} +1 -1
- data/lib/clerk/models/components/{group.rbi → billingstatement_group.rbi} +2 -2
- data/lib/clerk/models/components/biometriccredential.rb +72 -0
- data/lib/clerk/models/components/biometriccredential.rbi +33 -0
- data/lib/clerk/models/components/biometriccredential_algorithm.rb +19 -0
- data/lib/clerk/models/components/biometriccredential_algorithm.rbi +11 -0
- data/lib/clerk/models/components/biometriccredential_list.rb +36 -0
- data/lib/clerk/models/components/biometriccredential_list.rbi +15 -0
- data/lib/clerk/models/components/biometriccredential_object.rb +19 -0
- data/lib/clerk/models/components/biometriccredential_object.rbi +11 -0
- data/lib/clerk/models/components/biometriccredential_platform.rb +20 -0
- data/lib/clerk/models/components/biometriccredential_platform.rbi +11 -0
- data/lib/clerk/models/components/biometriccredential_status.rb +20 -0
- data/lib/clerk/models/components/biometriccredential_status.rbi +11 -0
- data/lib/clerk/models/components/clerkerror.rb +1 -1
- data/lib/clerk/models/components/commercecreditledgerresponse.rb +3 -7
- data/lib/clerk/models/components/commercecreditledgerresponse.rbi +0 -2
- data/lib/clerk/models/components/commercediscountredemptionresponse.rb +93 -0
- data/lib/clerk/models/components/commercediscountredemptionresponse.rbi +43 -0
- data/lib/clerk/models/components/commercediscountredemptionresponse_amount.rb +45 -0
- data/lib/clerk/models/components/{schemas_commercesubscriptionitem_amount.rbi → commercediscountredemptionresponse_amount.rbi} +2 -2
- data/lib/clerk/models/components/commercediscountredemptionresponse_object.rb +19 -0
- data/lib/clerk/models/components/commercediscountredemptionresponse_object.rbi +11 -0
- data/lib/clerk/models/components/commercediscountredemptionresponse_status.rb +21 -0
- data/lib/clerk/models/components/commercediscountredemptionresponse_status.rbi +11 -0
- data/lib/clerk/models/components/{schemas_commerceperunittotal.rb → commerceperunittotal_2.rb} +2 -2
- data/lib/clerk/models/components/{schemas_commerceperunittotal.rbi → commerceperunittotal_2.rbi} +2 -2
- data/lib/clerk/models/components/{schemas_commerceperunittotaltier.rb → commerceperunittotaltier_2.rb} +1 -1
- data/lib/clerk/models/components/{schemas_commerceperunittotaltier.rbi → commerceperunittotaltier_2.rbi} +2 -2
- data/lib/clerk/models/components/{schemas_commerceplan.rb → commerceplan_2.rb} +6 -6
- data/lib/clerk/models/components/{schemas_commerceplan.rbi → commerceplan_2.rbi} +2 -2
- data/lib/clerk/models/components/{schemas_commerceplan_fee.rb → commerceplan_2_annual_fee.rb} +1 -1
- data/lib/clerk/models/components/{schemas_commerceplan_annual_fee.rbi → commerceplan_2_annual_fee.rbi} +2 -2
- data/lib/clerk/models/components/{schemas_commercesubscriptionitem_fee.rb → commerceplan_2_annual_monthly_fee.rb} +1 -1
- data/lib/clerk/models/components/{schemas_commerceplan_annual_monthly_fee.rbi → commerceplan_2_annual_monthly_fee.rbi} +2 -2
- data/lib/clerk/models/components/{schemas_commerceplan_annual_fee.rb → commerceplan_2_fee.rb} +1 -1
- data/lib/clerk/models/components/commerceplan_2_fee.rbi +19 -0
- data/lib/clerk/models/components/{schemas_commerceplan_object.rb → commerceplan_2_object.rb} +2 -2
- data/lib/clerk/models/components/commerceplan_2_object.rbi +11 -0
- data/lib/clerk/models/components/commercepricetransitiondetails.rb +1 -1
- data/lib/clerk/models/components/commercepricetransitionresponse.rb +1 -1
- data/lib/clerk/models/components/{schemas_commercesubscriptionitem.rb → commercesubscriptionitem_2.rb} +7 -7
- data/lib/clerk/models/components/{schemas_commercesubscriptionitem.rbi → commercesubscriptionitem_2.rbi} +2 -2
- data/lib/clerk/models/components/{schemas_commercesubscriptionitem_amount.rb → commercesubscriptionitem_2_amount.rb} +1 -1
- data/lib/clerk/models/components/commercesubscriptionitem_2_amount.rbi +19 -0
- data/lib/clerk/models/components/{schemas_commerceplan_annual_monthly_fee.rb → commercesubscriptionitem_2_annual_fee.rb} +1 -1
- data/lib/clerk/models/components/{schemas_commercesubscriptionitem_fee.rbi → commercesubscriptionitem_2_annual_fee.rbi} +2 -2
- data/lib/clerk/models/components/{schemas_commercesubscriptionitem_annual_fee.rb → commercesubscriptionitem_2_annual_monthly_fee.rb} +1 -1
- data/lib/clerk/models/components/commercesubscriptionitem_2_annual_monthly_fee.rbi +19 -0
- data/lib/clerk/models/components/commercesubscriptionitem_2_fee.rb +44 -0
- data/lib/clerk/models/components/commercesubscriptionitem_2_fee.rbi +19 -0
- data/lib/clerk/models/components/{schemas_commercesubscriptionitem_next_payment.rb → commercesubscriptionitem_2_next_payment.rb} +3 -3
- data/lib/clerk/models/components/{schemas_commercesubscriptionitem_next_payment.rbi → commercesubscriptionitem_2_next_payment.rbi} +2 -2
- data/lib/clerk/models/components/{schemas_commercesubscriptionitem_next_payment_amount.rb → commercesubscriptionitem_2_next_payment_amount.rb} +1 -1
- data/lib/clerk/models/components/commercesubscriptionitem_2_next_payment_amount.rbi +19 -0
- data/lib/clerk/models/components/{schemas_commercesubscriptionitem_next_payment_credits.rb → commercesubscriptionitem_2_next_payment_credits.rb} +3 -3
- data/lib/clerk/models/components/{schemas_commercesubscriptionitem_next_payment_credits.rbi → commercesubscriptionitem_2_next_payment_credits.rbi} +2 -2
- data/lib/clerk/models/components/{schemas_commercesubscriptionitem_next_payment_credits_proration.rb → commercesubscriptionitem_2_next_payment_credits_proration.rb} +1 -1
- data/lib/clerk/models/components/{schemas_commercesubscriptionitem_next_payment_credits_proration.rbi → commercesubscriptionitem_2_next_payment_credits_proration.rbi} +2 -2
- data/lib/clerk/models/components/{schemas_commercesubscriptionitem_next_payment_discounts.rb → commercesubscriptionitem_2_next_payment_discounts.rb} +2 -2
- data/lib/clerk/models/components/{schemas_commercesubscriptionitem_next_payment_discounts.rbi → commercesubscriptionitem_2_next_payment_discounts.rbi} +2 -2
- data/lib/clerk/models/components/{schemas_commercesubscriptionitem_next_payment_discounts_proration.rb → commercesubscriptionitem_2_next_payment_discounts_proration.rb} +1 -1
- data/lib/clerk/models/components/{schemas_commercesubscriptionitem_next_payment_discounts_proration.rbi → commercesubscriptionitem_2_next_payment_discounts_proration.rbi} +2 -2
- data/lib/clerk/models/components/{schemas_commercesubscriptionitem_next_payment_payer.rb → commercesubscriptionitem_2_next_payment_payer.rb} +1 -1
- data/lib/clerk/models/components/{schemas_commercesubscriptionitem_next_payment_payer.rbi → commercesubscriptionitem_2_next_payment_payer.rbi} +2 -2
- data/lib/clerk/models/components/{schemas_commercesubscriptionitem_next_payment_totals.rb → commercesubscriptionitem_2_next_payment_totals.rb} +3 -3
- data/lib/clerk/models/components/{schemas_commercesubscriptionitem_next_payment_totals.rbi → commercesubscriptionitem_2_next_payment_totals.rbi} +2 -2
- data/lib/clerk/models/components/{schemas_commercesubscriptionitem_object_commercepayer.rb → commercesubscriptionitem_2_object_commercepayer.rb} +2 -2
- data/lib/clerk/models/components/commercesubscriptionitem_2_object_commercepayer.rbi +11 -0
- data/lib/clerk/models/components/{schemas_commercesubscriptionitem_object_commerceplan.rb → commercesubscriptionitem_2_object_commerceplan.rb} +2 -2
- data/lib/clerk/models/components/commercesubscriptionitem_2_object_commerceplan.rbi +11 -0
- data/lib/clerk/models/components/{schemas_commercesubscriptionitem_object_commercesubscriptionitem.rb → commercesubscriptionitem_2_object_commercesubscriptionitem.rb} +2 -2
- data/lib/clerk/models/components/commercesubscriptionitem_2_object_commercesubscriptionitem.rbi +11 -0
- data/lib/clerk/models/components/{schemas_commercesubscriptionitem_plan.rb → commercesubscriptionitem_2_plan.rb} +6 -6
- data/lib/clerk/models/components/{schemas_commercesubscriptionitem_plan.rbi → commercesubscriptionitem_2_plan.rbi} +2 -2
- data/lib/clerk/models/components/{schemas_commercesubscriptionitem_plan_period.rb → commercesubscriptionitem_2_plan_period.rb} +2 -2
- data/lib/clerk/models/components/commercesubscriptionitem_2_plan_period.rbi +11 -0
- data/lib/clerk/models/components/{schemas_commercesubscriptionitem_status.rb → commercesubscriptionitem_2_status.rb} +2 -2
- data/lib/clerk/models/components/commercesubscriptionitem_2_status.rbi +11 -0
- data/lib/clerk/models/components/commercesubscriptionitem_totals.rb +1 -1
- data/lib/clerk/models/components/commercesubscriptionnextpayment.rb +1 -1
- data/lib/clerk/models/components/commercesubscriptionnextpayment_totals.rb +1 -1
- data/lib/clerk/models/components/createbillingpricerequest.rb +2 -2
- data/lib/clerk/models/components/directory.rb +80 -0
- data/lib/clerk/models/components/directory.rbi +37 -0
- data/lib/clerk/models/components/directory_custom_attribute.rb +52 -0
- data/lib/clerk/models/components/{custom_attribute.rbi → directory_custom_attribute.rbi} +4 -2
- data/lib/clerk/models/components/directory_group.rb +36 -0
- data/lib/clerk/models/components/directory_group.rbi +15 -0
- data/lib/clerk/models/components/directory_list.rb +36 -0
- data/lib/clerk/models/components/directory_list.rbi +15 -0
- data/lib/clerk/models/components/directory_object.rb +19 -0
- data/lib/clerk/models/components/{samlaccount_meta.rbi → directory_object.rbi} +2 -2
- data/lib/clerk/models/components/directorygrouprolemapping.rb +76 -0
- data/lib/clerk/models/components/directorygrouprolemapping.rbi +35 -0
- data/lib/clerk/models/components/directorygrouprolemapping_deleted.rb +43 -0
- data/lib/clerk/models/components/directorygrouprolemapping_deleted.rbi +17 -0
- data/lib/clerk/models/components/directorygrouprolemapping_deleted_object.rb +19 -0
- data/lib/clerk/models/components/directorygrouprolemapping_deleted_object.rbi +11 -0
- data/lib/clerk/models/components/directorygrouprolemapping_list.rb +36 -0
- data/lib/clerk/models/components/directorygrouprolemapping_list.rbi +15 -0
- data/lib/clerk/models/components/directorygrouprolemapping_object.rb +19 -0
- data/lib/clerk/models/components/directorygrouprolemapping_object.rbi +11 -0
- data/lib/clerk/models/components/dnstarget.rb +49 -0
- data/lib/clerk/models/components/dnstarget.rbi +21 -0
- data/lib/clerk/models/components/domain.rb +7 -2
- data/lib/clerk/models/components/domain.rbi +2 -0
- data/lib/clerk/models/components/effect.rb +20 -0
- data/lib/clerk/models/components/{clerkerror_meta.rbi → effect.rbi} +2 -2
- data/lib/clerk/models/components/emailaddress_verification_saml_clerkerror.rb +1 -1
- data/lib/clerk/models/components/enrollment_mode.rb +1 -0
- 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.rb +6 -2
- data/lib/clerk/models/components/enterpriseconnection.rbi +2 -0
- data/lib/clerk/models/components/{custom_attribute.rb → enterpriseconnection_custom_attribute.rb} +6 -2
- data/lib/clerk/models/components/enterpriseconnection_custom_attribute.rbi +23 -0
- data/lib/clerk/models/components/enterpriseconnection_mode.rb +21 -0
- data/lib/clerk/models/components/enterpriseconnection_mode.rbi +11 -0
- data/lib/clerk/models/components/enterpriseconnection_object.rb +19 -0
- data/lib/clerk/models/components/enterpriseconnection_object.rbi +11 -0
- data/lib/clerk/models/components/enterpriseconnection_saml_connection.rb +5 -1
- data/lib/clerk/models/components/enterpriseconnection_saml_connection.rbi +2 -0
- data/lib/clerk/models/components/externalaccountwithverification_verification_oauth_clerkerror.rb +1 -1
- data/lib/clerk/models/components/{schemas_featureresponse.rb → featureresponse_2.rb} +2 -2
- data/lib/clerk/models/components/{schemas_featureresponse.rbi → featureresponse_2.rbi} +2 -2
- data/lib/clerk/models/components/{schemas_featureresponse_object.rb → featureresponse_2_object.rb} +2 -2
- data/lib/clerk/models/components/featureresponse_2_object.rbi +11 -0
- data/lib/clerk/models/components/instance.rb +13 -1
- data/lib/clerk/models/components/instance.rbi +6 -0
- data/lib/clerk/models/components/instanceprotect.rb +14 -2
- data/lib/clerk/models/components/instanceprotect.rbi +6 -0
- data/lib/clerk/models/components/instancesettings.rb +4 -1
- data/lib/clerk/models/components/level.rb +21 -0
- data/lib/clerk/models/components/{clerkerrors_meta.rbi → level.rbi} +2 -2
- data/lib/clerk/models/components/login_hint.rb +36 -0
- data/lib/clerk/models/components/login_hint.rbi +15 -0
- data/lib/clerk/models/components/oauthapplication.rb +7 -2
- data/lib/clerk/models/components/oauthapplication.rbi +2 -0
- data/lib/clerk/models/components/oauthapplicationsettings.rb +26 -1
- data/lib/clerk/models/components/oauthapplicationsettings.rbi +12 -0
- data/lib/clerk/models/components/oauthapplicationwithsecret.rb +7 -2
- data/lib/clerk/models/components/oauthapplicationwithsecret.rbi +2 -0
- data/lib/clerk/models/components/organization.rb +6 -1
- data/lib/clerk/models/components/organization.rbi +2 -0
- data/lib/clerk/models/components/organizationmembership_organization.rb +6 -1
- data/lib/clerk/models/components/organizationmembership_organization.rbi +2 -0
- data/lib/clerk/models/components/organizationmembershippublicuserdata.rb +5 -1
- data/lib/clerk/models/components/organizationmembershippublicuserdata.rbi +2 -0
- data/lib/clerk/models/components/organizationwithlogo.rb +6 -1
- data/lib/clerk/models/components/organizationwithlogo.rbi +2 -0
- data/lib/clerk/models/components/payer_commercepayer.rb +1 -1
- data/lib/clerk/models/components/payment_type.rb +1 -0
- data/lib/clerk/models/components/record_type.rb +20 -0
- data/lib/clerk/models/components/record_type.rbi +11 -0
- data/lib/clerk/models/components/reverification.rb +74 -0
- data/lib/clerk/models/components/reverification.rbi +31 -0
- data/lib/clerk/models/components/reverification_object.rb +20 -0
- data/lib/clerk/models/components/reverification_object.rbi +11 -0
- data/lib/clerk/models/components/reverification_status.rb +21 -0
- data/lib/clerk/models/components/reverification_status.rbi +11 -0
- data/lib/clerk/models/components/samlaccount_clerkerror.rb +1 -1
- data/lib/clerk/models/components/samlconnection_1.rb +15 -1
- data/lib/clerk/models/components/samlconnection_1.rbi +6 -0
- data/lib/clerk/models/components/samlconnection_2.rb +15 -1
- data/lib/clerk/models/components/samlconnection_2.rbi +6 -0
- data/lib/clerk/models/components/samlconnectionloginhint.rb +36 -0
- data/lib/clerk/models/components/samlconnectionloginhint.rbi +15 -0
- data/lib/clerk/models/components/samlconnectionloginhint_mode.rb +21 -0
- data/lib/clerk/models/components/samlconnectionloginhint_mode.rbi +11 -0
- data/lib/clerk/models/components/scim_group.rb +36 -0
- data/lib/clerk/models/components/scim_group.rbi +15 -0
- data/lib/clerk/models/components/scimdirectory.rb +80 -0
- data/lib/clerk/models/components/scimdirectory.rbi +37 -0
- data/lib/clerk/models/components/scimdirectory_custom_attribute.rb +52 -0
- data/lib/clerk/models/components/scimdirectory_custom_attribute.rbi +23 -0
- data/lib/clerk/models/components/scimdirectory_list.rb +36 -0
- data/lib/clerk/models/components/scimdirectory_list.rbi +15 -0
- data/lib/clerk/models/components/scimdirectory_object.rb +19 -0
- data/lib/clerk/models/components/scimdirectory_object.rbi +11 -0
- data/lib/clerk/models/components/scimgrouprolemapping.rb +76 -0
- data/lib/clerk/models/components/scimgrouprolemapping.rbi +35 -0
- data/lib/clerk/models/components/scimgrouprolemapping_deleted.rb +43 -0
- data/lib/clerk/models/components/scimgrouprolemapping_deleted.rbi +17 -0
- data/lib/clerk/models/components/scimgrouprolemapping_deleted_object.rb +19 -0
- data/lib/clerk/models/components/scimgrouprolemapping_deleted_object.rbi +11 -0
- data/lib/clerk/models/components/scimgrouprolemapping_list.rb +36 -0
- data/lib/clerk/models/components/scimgrouprolemapping_list.rbi +15 -0
- data/lib/clerk/models/components/scimgrouprolemapping_object.rb +19 -0
- data/lib/clerk/models/components/scimgrouprolemapping_object.rbi +11 -0
- data/lib/clerk/models/components/scimusermetadata.rb +64 -0
- data/lib/clerk/models/components/scimusermetadata.rbi +27 -0
- data/lib/clerk/models/components/scimusermetadata_group.rb +36 -0
- data/lib/clerk/models/components/scimusermetadata_group.rbi +15 -0
- data/lib/clerk/models/components/seats.rb +1 -1
- data/lib/clerk/models/components/source.rb +21 -0
- data/lib/clerk/models/components/source.rbi +11 -0
- data/lib/clerk/models/components/trusteddevice.rb +72 -0
- data/lib/clerk/models/components/trusteddevice.rbi +33 -0
- data/lib/clerk/models/components/trusteddevice_algorithm.rb +19 -0
- data/lib/clerk/models/components/trusteddevice_algorithm.rbi +11 -0
- data/lib/clerk/models/components/trusteddevice_list.rb +36 -0
- data/lib/clerk/models/components/trusteddevice_list.rbi +15 -0
- data/lib/clerk/models/components/trusteddevice_object.rb +19 -0
- data/lib/clerk/models/components/trusteddevice_object.rbi +11 -0
- data/lib/clerk/models/components/trusteddevice_platform.rb +20 -0
- data/lib/clerk/models/components/trusteddevice_platform.rbi +11 -0
- data/lib/clerk/models/components/trusteddevice_status.rb +20 -0
- data/lib/clerk/models/components/trusteddevice_status.rbi +11 -0
- data/lib/clerk/models/components/user.rb +16 -3
- data/lib/clerk/models/components/user.rbi +4 -0
- data/lib/clerk/models/components/user_directory.rb +65 -0
- data/lib/clerk/models/components/user_directory.rbi +27 -0
- data/lib/clerk/models/components/user_scim.rb +27 -6
- data/lib/clerk/models/components/user_scim.rbi +10 -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.rb +85 -39
- data/lib/clerk/models/errors/clerkerrors.rb +1 -1
- data/lib/clerk/models/operations/adddomain_request.rb +3 -6
- data/lib/clerk/models/operations/applybillingsubscriptionitemdiscount_request.rb +36 -0
- data/lib/clerk/models/operations/applybillingsubscriptionitemdiscount_request.rbi +15 -0
- data/lib/clerk/models/operations/applybillingsubscriptionitemdiscount_response.rb +44 -0
- data/lib/clerk/models/operations/applybillingsubscriptionitemdiscount_response.rbi +19 -0
- data/lib/clerk/models/operations/clerkidpoauthaccesstoken.rb +5 -1
- data/lib/clerk/models/operations/clerkidpoauthaccesstoken.rbi +2 -0
- data/lib/clerk/models/operations/createdirectory_group_role_mapping.rb +52 -0
- data/lib/clerk/models/operations/createdirectory_group_role_mapping.rbi +23 -0
- data/lib/clerk/models/operations/createdirectory_request.rb +44 -0
- data/lib/clerk/models/operations/createdirectory_request.rbi +19 -0
- data/lib/clerk/models/operations/createdirectory_response.rb +44 -0
- data/lib/clerk/models/operations/createdirectory_response.rbi +19 -0
- data/lib/clerk/models/operations/createdirectorygrouprolemapping_request.rb +36 -0
- data/lib/clerk/models/operations/createdirectorygrouprolemapping_request.rbi +15 -0
- data/lib/clerk/models/operations/createdirectorygrouprolemapping_requestbody.rb +46 -0
- data/lib/clerk/models/operations/createdirectorygrouprolemapping_requestbody.rbi +19 -0
- data/lib/clerk/models/operations/createdirectorygrouprolemapping_response.rb +44 -0
- data/lib/clerk/models/operations/createdirectorygrouprolemapping_response.rbi +19 -0
- data/lib/clerk/models/operations/createemailaddress_request.rb +7 -1
- data/lib/clerk/models/operations/createemailaddress_request.rbi +2 -0
- data/lib/clerk/models/operations/createenterpriseconnection_custom_attribute.rb +5 -1
- data/lib/clerk/models/operations/createenterpriseconnection_custom_attribute.rbi +2 -0
- data/lib/clerk/models/operations/createenterpriseconnection_login_hint.rb +36 -0
- data/lib/clerk/models/operations/createenterpriseconnection_login_hint.rbi +15 -0
- data/lib/clerk/models/operations/createenterpriseconnection_mode.rb +21 -0
- data/lib/clerk/models/operations/createenterpriseconnection_mode.rbi +11 -0
- data/lib/clerk/models/operations/createenterpriseconnection_saml.rb +5 -1
- data/lib/clerk/models/operations/createenterpriseconnection_saml.rbi +2 -0
- data/lib/clerk/models/operations/createoauthapplication_request.rb +6 -2
- data/lib/clerk/models/operations/createoauthapplication_request.rbi +2 -0
- data/lib/clerk/models/operations/createorganizationdomain_requestbody.rb +1 -1
- data/lib/clerk/models/operations/createsamlconnection_login_hint_1.rb +36 -0
- data/lib/clerk/models/operations/createsamlconnection_login_hint_1.rbi +15 -0
- data/lib/clerk/models/operations/createsamlconnection_login_hint_2.rb +36 -0
- data/lib/clerk/models/operations/createsamlconnection_login_hint_2.rbi +15 -0
- data/lib/clerk/models/operations/createsamlconnection_mode_1.rb +21 -0
- data/lib/clerk/models/operations/createsamlconnection_mode_1.rbi +11 -0
- data/lib/clerk/models/operations/createsamlconnection_mode_2.rb +21 -0
- data/lib/clerk/models/operations/createsamlconnection_mode_2.rbi +11 -0
- data/lib/clerk/models/operations/createsamlconnection_requestbody_1.rb +5 -1
- data/lib/clerk/models/operations/createsamlconnection_requestbody_1.rbi +2 -0
- data/lib/clerk/models/operations/createsamlconnection_requestbody_2.rb +5 -1
- data/lib/clerk/models/operations/createsamlconnection_requestbody_2.rbi +2 -0
- data/lib/clerk/models/operations/createscimdirectory_group_role_mapping.rb +44 -0
- data/lib/clerk/models/operations/createscimdirectory_group_role_mapping.rbi +19 -0
- data/lib/clerk/models/operations/createscimdirectory_request.rb +44 -0
- data/lib/clerk/models/operations/createscimdirectory_request.rbi +19 -0
- data/lib/clerk/models/operations/createscimdirectory_response.rb +44 -0
- data/lib/clerk/models/operations/createscimdirectory_response.rbi +19 -0
- data/lib/clerk/models/operations/createscimgrouprolemapping_request.rb +36 -0
- data/lib/clerk/models/operations/createscimgrouprolemapping_request.rbi +15 -0
- data/lib/clerk/models/operations/createscimgrouprolemapping_requestbody.rb +42 -0
- data/lib/clerk/models/operations/createscimgrouprolemapping_requestbody.rbi +17 -0
- data/lib/clerk/models/operations/createscimgrouprolemapping_response.rb +44 -0
- data/lib/clerk/models/operations/createscimgrouprolemapping_response.rbi +19 -0
- data/lib/clerk/models/operations/createsignintoken_request.rb +6 -1
- data/lib/clerk/models/operations/createsignintoken_request.rbi +2 -0
- data/lib/clerk/models/operations/createuser_request.rb +8 -2
- data/lib/clerk/models/operations/createuser_request.rbi +2 -0
- data/lib/clerk/models/operations/deletedirectory_request.rb +32 -0
- data/lib/clerk/models/operations/deletedirectory_request.rbi +13 -0
- data/lib/clerk/models/operations/deletedirectory_response.rb +44 -0
- data/lib/clerk/models/operations/deletedirectory_response.rbi +19 -0
- data/lib/clerk/models/operations/deletedirectorygrouprolemapping_request.rb +36 -0
- data/lib/clerk/models/operations/deletedirectorygrouprolemapping_request.rbi +15 -0
- data/lib/clerk/models/operations/deletedirectorygrouprolemapping_response.rb +44 -0
- data/lib/clerk/models/operations/deletedirectorygrouprolemapping_response.rbi +19 -0
- data/lib/clerk/models/operations/deletedomain_request.rb +1 -1
- data/lib/clerk/models/operations/deletescimdirectory_request.rb +32 -0
- data/lib/clerk/models/operations/deletescimdirectory_request.rbi +13 -0
- data/lib/clerk/models/operations/deletescimdirectory_response.rb +44 -0
- data/lib/clerk/models/operations/deletescimdirectory_response.rbi +19 -0
- data/lib/clerk/models/operations/deletescimgrouprolemapping_request.rb +36 -0
- data/lib/clerk/models/operations/deletescimgrouprolemapping_request.rbi +15 -0
- data/lib/clerk/models/operations/deletescimgrouprolemapping_response.rb +44 -0
- data/lib/clerk/models/operations/deletescimgrouprolemapping_response.rbi +19 -0
- data/lib/clerk/models/operations/enrollment_mode.rb +5 -0
- data/lib/clerk/models/operations/extendbillingsubscriptionitemfreetrial_response.rb +4 -4
- data/lib/clerk/models/operations/extendbillingsubscriptionitemfreetrial_response.rbi +2 -2
- data/lib/clerk/models/operations/getdirectory_request.rb +32 -0
- data/lib/clerk/models/operations/getdirectory_request.rbi +13 -0
- data/lib/clerk/models/operations/getdirectory_response.rb +44 -0
- data/lib/clerk/models/operations/getdirectory_response.rbi +19 -0
- data/lib/clerk/models/operations/getreverification_request.rb +36 -0
- data/lib/clerk/models/operations/getreverification_request.rbi +15 -0
- data/lib/clerk/models/operations/getreverification_response.rb +44 -0
- data/lib/clerk/models/operations/getreverification_response.rbi +19 -0
- data/lib/clerk/models/operations/getscimdirectory_request.rb +32 -0
- data/lib/clerk/models/operations/getscimdirectory_request.rbi +13 -0
- data/lib/clerk/models/operations/getscimdirectory_response.rb +44 -0
- data/lib/clerk/models/operations/getscimdirectory_response.rbi +19 -0
- data/lib/clerk/models/operations/getuserlist_request.rb +13 -1
- data/lib/clerk/models/operations/getuserlist_request.rbi +2 -0
- data/lib/clerk/models/operations/listallorganizationdomains_request.rb +2 -1
- data/lib/clerk/models/operations/listdirectories_request.rb +39 -0
- data/lib/clerk/models/operations/listdirectories_request.rbi +15 -0
- data/lib/clerk/models/operations/listdirectories_response.rb +44 -0
- data/lib/clerk/models/operations/listdirectories_response.rbi +19 -0
- data/lib/clerk/models/operations/listdirectorygrouprolemappings_request.rb +32 -0
- data/lib/clerk/models/operations/listdirectorygrouprolemappings_request.rbi +13 -0
- data/lib/clerk/models/operations/listdirectorygrouprolemappings_response.rb +44 -0
- data/lib/clerk/models/operations/listdirectorygrouprolemappings_response.rbi +19 -0
- data/lib/clerk/models/operations/listoauthapplications_request.rb +2 -0
- data/lib/clerk/models/operations/listorganizationdomains_request.rb +2 -1
- data/lib/clerk/models/operations/listscimdirectories_request.rb +39 -0
- data/lib/clerk/models/operations/listscimdirectories_request.rbi +15 -0
- data/lib/clerk/models/operations/listscimdirectories_response.rb +44 -0
- data/lib/clerk/models/operations/listscimdirectories_response.rbi +19 -0
- data/lib/clerk/models/operations/listscimgrouprolemappings_request.rb +32 -0
- data/lib/clerk/models/operations/listscimgrouprolemappings_request.rbi +13 -0
- data/lib/clerk/models/operations/listscimgrouprolemappings_response.rb +44 -0
- data/lib/clerk/models/operations/listscimgrouprolemappings_response.rbi +19 -0
- data/lib/clerk/models/operations/listuserbiometriccredentials_request.rb +32 -0
- data/lib/clerk/models/operations/listuserbiometriccredentials_request.rbi +13 -0
- data/lib/clerk/models/operations/listuserbiometriccredentials_response.rb +44 -0
- data/lib/clerk/models/operations/listuserbiometriccredentials_response.rbi +19 -0
- data/lib/clerk/models/operations/listusertrusteddevices_request.rb +32 -0
- data/lib/clerk/models/operations/listusertrusteddevices_request.rbi +13 -0
- data/lib/clerk/models/operations/listusertrusteddevices_response.rb +44 -0
- data/lib/clerk/models/operations/listusertrusteddevices_response.rbi +19 -0
- data/lib/clerk/models/operations/removebillingsubscriptionitemdiscount_request.rb +36 -0
- data/lib/clerk/models/operations/removebillingsubscriptionitemdiscount_request.rbi +15 -0
- data/lib/clerk/models/operations/removebillingsubscriptionitemdiscount_response.rb +44 -0
- data/lib/clerk/models/operations/removebillingsubscriptionitemdiscount_response.rbi +19 -0
- data/lib/clerk/models/operations/removeuserpassword_request.rb +36 -0
- data/lib/clerk/models/operations/removeuserpassword_request.rbi +15 -0
- data/lib/clerk/models/operations/removeuserpassword_requestbody.rb +32 -0
- data/lib/clerk/models/operations/removeuserpassword_requestbody.rbi +13 -0
- data/lib/clerk/models/operations/removeuserpassword_response.rb +44 -0
- data/lib/clerk/models/operations/removeuserpassword_response.rbi +19 -0
- data/lib/clerk/models/operations/replacedirectorygrouprolemappings_mapping.rb +40 -0
- data/lib/clerk/models/operations/replacedirectorygrouprolemappings_mapping.rbi +17 -0
- data/lib/clerk/models/operations/replacedirectorygrouprolemappings_request.rb +36 -0
- data/lib/clerk/models/operations/replacedirectorygrouprolemappings_request.rbi +15 -0
- data/lib/clerk/models/operations/replacedirectorygrouprolemappings_requestbody.rb +32 -0
- data/lib/clerk/models/operations/replacedirectorygrouprolemappings_requestbody.rbi +13 -0
- data/lib/clerk/models/operations/replacedirectorygrouprolemappings_response.rb +44 -0
- data/lib/clerk/models/operations/replacedirectorygrouprolemappings_response.rbi +19 -0
- data/lib/clerk/models/operations/replacescimgrouprolemappings_mapping.rb +36 -0
- data/lib/clerk/models/operations/replacescimgrouprolemappings_mapping.rbi +15 -0
- data/lib/clerk/models/operations/replacescimgrouprolemappings_request.rb +36 -0
- data/lib/clerk/models/operations/replacescimgrouprolemappings_request.rbi +15 -0
- data/lib/clerk/models/operations/replacescimgrouprolemappings_requestbody.rb +32 -0
- data/lib/clerk/models/operations/replacescimgrouprolemappings_requestbody.rbi +13 -0
- data/lib/clerk/models/operations/replacescimgrouprolemappings_response.rb +44 -0
- data/lib/clerk/models/operations/replacescimgrouprolemappings_response.rbi +19 -0
- data/lib/clerk/models/operations/replaceuseremailaddress_identification_status.rb +10 -2
- data/lib/clerk/models/operations/replaceuseremailaddress_requestbody.rb +16 -3
- data/lib/clerk/models/operations/replaceuseremailaddress_requestbody.rbi +2 -0
- data/lib/clerk/models/operations/replaceuserphonenumber_identification_status.rb +10 -2
- data/lib/clerk/models/operations/replaceuserphonenumber_requestbody.rb +9 -2
- data/lib/clerk/models/operations/revokeoauthapplicationtoken_request.rb +36 -0
- data/lib/clerk/models/operations/revokeoauthapplicationtoken_request.rbi +15 -0
- data/lib/clerk/models/operations/revokeoauthapplicationtoken_requestbody.rb +32 -0
- data/lib/clerk/models/operations/revokeoauthapplicationtoken_requestbody.rbi +13 -0
- data/lib/clerk/models/operations/revokeoauthapplicationtoken_response.rb +40 -0
- data/lib/clerk/models/operations/revokeoauthapplicationtoken_response.rbi +17 -0
- data/lib/clerk/models/operations/revokeuserbiometriccredential_request.rb +36 -0
- data/lib/clerk/models/operations/revokeuserbiometriccredential_request.rbi +15 -0
- data/lib/clerk/models/operations/revokeuserbiometriccredential_response.rb +44 -0
- data/lib/clerk/models/operations/revokeuserbiometriccredential_response.rbi +19 -0
- data/lib/clerk/models/operations/revokeusertrusteddevice_request.rb +36 -0
- data/lib/clerk/models/operations/revokeusertrusteddevice_request.rbi +15 -0
- data/lib/clerk/models/operations/revokeusertrusteddevice_response.rb +44 -0
- data/lib/clerk/models/operations/revokeusertrusteddevice_response.rbi +19 -0
- data/lib/clerk/models/operations/rotatedirectoryapikey_request.rb +32 -0
- data/lib/clerk/models/operations/rotatedirectoryapikey_request.rbi +13 -0
- data/lib/clerk/models/operations/rotatedirectoryapikey_response.rb +44 -0
- data/lib/clerk/models/operations/rotatedirectoryapikey_response.rbi +19 -0
- data/lib/clerk/models/operations/rotatescimdirectoryapikey_request.rb +32 -0
- data/lib/clerk/models/operations/rotatescimdirectoryapikey_request.rbi +13 -0
- data/lib/clerk/models/operations/rotatescimdirectoryapikey_response.rb +44 -0
- data/lib/clerk/models/operations/rotatescimdirectoryapikey_response.rbi +19 -0
- data/lib/clerk/models/operations/updatedirectory_request.rb +36 -0
- data/lib/clerk/models/operations/updatedirectory_request.rbi +15 -0
- data/lib/clerk/models/operations/updatedirectory_requestbody.rb +49 -0
- data/lib/clerk/models/operations/updatedirectory_requestbody.rbi +21 -0
- data/lib/clerk/models/operations/updatedirectory_response.rb +44 -0
- data/lib/clerk/models/operations/updatedirectory_response.rbi +19 -0
- data/lib/clerk/models/operations/updateemailaddress_requestbody.rb +7 -1
- data/lib/clerk/models/operations/updateemailaddress_requestbody.rbi +2 -0
- data/lib/clerk/models/operations/updateenterpriseconnection_custom_attribute.rb +5 -1
- data/lib/clerk/models/operations/updateenterpriseconnection_custom_attribute.rbi +2 -0
- data/lib/clerk/models/operations/updateenterpriseconnection_login_hint.rb +36 -0
- data/lib/clerk/models/operations/updateenterpriseconnection_login_hint.rbi +15 -0
- data/lib/clerk/models/operations/updateenterpriseconnection_mode.rb +21 -0
- data/lib/clerk/models/operations/updateenterpriseconnection_mode.rbi +11 -0
- data/lib/clerk/models/operations/updateenterpriseconnection_saml.rb +5 -1
- data/lib/clerk/models/operations/updateenterpriseconnection_saml.rbi +2 -0
- data/lib/clerk/models/operations/updateinstance_request.rb +15 -5
- data/lib/clerk/models/operations/updateinstance_request.rbi +6 -2
- data/lib/clerk/models/operations/updateinstanceoauthapplicationsettings_request.rb +26 -1
- data/lib/clerk/models/operations/updateinstanceoauthapplicationsettings_request.rbi +12 -0
- data/lib/clerk/models/operations/updateinstanceprotect_request.rb +1 -1
- data/lib/clerk/models/operations/updateoauthapplication_requestbody.rb +9 -5
- data/lib/clerk/models/operations/updateoauthapplication_requestbody.rbi +4 -2
- data/lib/clerk/models/operations/updateorganization_requestbody.rb +6 -1
- data/lib/clerk/models/operations/updateorganization_requestbody.rbi +2 -0
- data/lib/clerk/models/operations/updateorganizationdomain_requestbody.rb +1 -1
- data/lib/clerk/models/operations/updatesamlconnection_login_hint.rb +36 -0
- data/lib/clerk/models/operations/updatesamlconnection_login_hint.rbi +15 -0
- data/lib/clerk/models/operations/updatesamlconnection_mode.rb +21 -0
- data/lib/clerk/models/operations/updatesamlconnection_mode.rbi +11 -0
- data/lib/clerk/models/operations/updatesamlconnection_requestbody.rb +5 -1
- data/lib/clerk/models/operations/updatesamlconnection_requestbody.rbi +2 -0
- data/lib/clerk/models/operations/updatescimdirectory_request.rb +36 -0
- data/lib/clerk/models/operations/updatescimdirectory_request.rbi +15 -0
- data/lib/clerk/models/operations/updatescimdirectory_requestbody.rb +49 -0
- data/lib/clerk/models/operations/updatescimdirectory_requestbody.rbi +21 -0
- data/lib/clerk/models/operations/updatescimdirectory_response.rb +44 -0
- data/lib/clerk/models/operations/updatescimdirectory_response.rbi +19 -0
- data/lib/clerk/models/operations/updateuser_requestbody.rb +1 -1
- data/lib/clerk/models/operations.rb +80 -0
- data/lib/clerk/oauthaccesstokens.rb +5 -5
- data/lib/clerk/oauthapplications.rb +185 -35
- data/lib/clerk/openapiclient.rb +3 -1
- data/lib/clerk/organizationdomains.rb +32 -32
- data/lib/clerk/organizationinvitations.rb +35 -35
- data/lib/clerk/organizationmemberships.rb +25 -25
- data/lib/clerk/organizationpermissions.rb +25 -25
- data/lib/clerk/organizationroles.rb +35 -35
- data/lib/clerk/organizations.rb +60 -60
- data/lib/clerk/phonenumbers.rb +53 -38
- data/lib/clerk/proxy.rb +3 -3
- data/lib/clerk/proxychecks.rb +5 -5
- data/lib/clerk/redirecturls.rb +20 -20
- data/lib/clerk/rolesets.rb +35 -35
- data/lib/clerk/samlconnections.rb +25 -25
- data/lib/clerk/scimdirectories.rb +1534 -0
- data/lib/clerk/sdk.rb +44 -6
- data/lib/clerk/sdkconfiguration.rb +3 -3
- data/lib/clerk/sessions.rb +181 -35
- data/lib/clerk/signintokens.rb +11 -11
- data/lib/clerk/signups.rb +10 -10
- data/lib/clerk/templates.rb +5 -5
- data/lib/clerk/testingtokens.rb +5 -5
- data/lib/clerk/users.rb +1045 -223
- data/lib/clerk/utils/retries.rb +43 -1
- data/lib/clerk/utils/utils.rb +6 -2
- data/lib/clerk/waitlistentries.rb +30 -30
- data/lib/clerk/webhooks.rb +15 -15
- data/lib/clerk_sdk_ruby.rb +2 -0
- data/test/clerk/jwks_cache_scoping_test.rb +83 -0
- data/test/clerk/org_permissions_v2_test.rb +130 -0
- data/test/clerk/proxy_test.rb +108 -0
- metadata +339 -82
- data/lib/clerk/models/components/clerkerror_meta.rb +0 -27
- data/lib/clerk/models/components/clerkerrors_meta.rb +0 -27
- data/lib/clerk/models/components/emailaddress_verification_saml_meta.rb +0 -27
- data/lib/clerk/models/components/emailaddress_verification_saml_meta.rbi +0 -11
- data/lib/clerk/models/components/enterpriseaccount_verification_oauth_meta.rb +0 -27
- data/lib/clerk/models/components/enterpriseaccount_verification_oauth_meta.rbi +0 -11
- data/lib/clerk/models/components/enterpriseaccount_verification_saml_meta.rb +0 -27
- data/lib/clerk/models/components/enterpriseaccount_verification_saml_meta.rbi +0 -11
- data/lib/clerk/models/components/externalaccountwithverification_verification_oauth_meta.rb +0 -27
- data/lib/clerk/models/components/externalaccountwithverification_verification_oauth_meta.rbi +0 -11
- data/lib/clerk/models/components/samlaccount_meta.rb +0 -27
- data/lib/clerk/models/components/schemas_commerceplan_object.rbi +0 -11
- data/lib/clerk/models/components/schemas_commercesubscriptionitem_annual_fee.rbi +0 -19
- data/lib/clerk/models/components/schemas_commercesubscriptionitem_annual_monthly_fee.rb +0 -44
- data/lib/clerk/models/components/schemas_commercesubscriptionitem_annual_monthly_fee.rbi +0 -19
- data/lib/clerk/models/components/schemas_commercesubscriptionitem_next_payment_amount.rbi +0 -19
- data/lib/clerk/models/components/schemas_commercesubscriptionitem_object_commercepayer.rbi +0 -11
- data/lib/clerk/models/components/schemas_commercesubscriptionitem_object_commerceplan.rbi +0 -11
- data/lib/clerk/models/components/schemas_commercesubscriptionitem_object_commercesubscriptionitem.rbi +0 -11
- data/lib/clerk/models/components/schemas_commercesubscriptionitem_plan_period.rbi +0 -11
- data/lib/clerk/models/components/schemas_commercesubscriptionitem_status.rbi +0 -11
- data/lib/clerk/models/components/schemas_featureresponse_object.rbi +0 -11
- data/lib/clerk/models/components/verification_from_oauth_meta.rb +0 -27
- data/lib/clerk/models/components/verification_from_oauth_meta.rbi +0 -11
- data/lib/clerk/models/components/verification_google_one_tap_meta.rb +0 -27
- data/lib/clerk/models/components/verification_google_one_tap_meta.rbi +0 -11
data/lib/clerk/phonenumbers.rb
CHANGED
|
@@ -79,10 +79,10 @@ module Clerk
|
|
|
79
79
|
|
|
80
80
|
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
|
81
81
|
timeout ||= @sdk_configuration.timeout
|
|
82
|
-
|
|
82
|
+
|
|
83
83
|
|
|
84
84
|
connection = @sdk_configuration.client.dup
|
|
85
|
-
connection.
|
|
85
|
+
connection.use Utils::RetryMiddleware, retry_options
|
|
86
86
|
|
|
87
87
|
hook_ctx = SDKHooks::HookContext.new(
|
|
88
88
|
config: @sdk_configuration,
|
|
@@ -95,7 +95,7 @@ module Clerk
|
|
|
95
95
|
error = nil
|
|
96
96
|
http_response = nil
|
|
97
97
|
|
|
98
|
-
|
|
98
|
+
|
|
99
99
|
begin
|
|
100
100
|
http_response = connection.post(url) do |req|
|
|
101
101
|
req.body = body
|
|
@@ -132,13 +132,13 @@ module Clerk
|
|
|
132
132
|
response: http_response
|
|
133
133
|
)
|
|
134
134
|
end
|
|
135
|
-
|
|
135
|
+
|
|
136
136
|
if http_response.nil?
|
|
137
137
|
raise error if !error.nil?
|
|
138
138
|
raise 'no response'
|
|
139
139
|
end
|
|
140
140
|
end
|
|
141
|
-
|
|
141
|
+
|
|
142
142
|
content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
|
|
143
143
|
if Utils.match_status_code(http_response.status, ['200'])
|
|
144
144
|
if Utils.match_content_type(content_type, 'application/json')
|
|
@@ -224,10 +224,10 @@ module Clerk
|
|
|
224
224
|
|
|
225
225
|
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
|
226
226
|
timeout ||= @sdk_configuration.timeout
|
|
227
|
-
|
|
227
|
+
|
|
228
228
|
|
|
229
229
|
connection = @sdk_configuration.client.dup
|
|
230
|
-
connection.
|
|
230
|
+
connection.use Utils::RetryMiddleware, retry_options
|
|
231
231
|
|
|
232
232
|
hook_ctx = SDKHooks::HookContext.new(
|
|
233
233
|
config: @sdk_configuration,
|
|
@@ -240,7 +240,7 @@ module Clerk
|
|
|
240
240
|
error = nil
|
|
241
241
|
http_response = nil
|
|
242
242
|
|
|
243
|
-
|
|
243
|
+
|
|
244
244
|
begin
|
|
245
245
|
http_response = connection.get(url) do |req|
|
|
246
246
|
req.headers.merge!(headers)
|
|
@@ -276,13 +276,13 @@ module Clerk
|
|
|
276
276
|
response: http_response
|
|
277
277
|
)
|
|
278
278
|
end
|
|
279
|
-
|
|
279
|
+
|
|
280
280
|
if http_response.nil?
|
|
281
281
|
raise error if !error.nil?
|
|
282
282
|
raise 'no response'
|
|
283
283
|
end
|
|
284
284
|
end
|
|
285
|
-
|
|
285
|
+
|
|
286
286
|
content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
|
|
287
287
|
if Utils.match_status_code(http_response.status, ['200'])
|
|
288
288
|
if Utils.match_content_type(content_type, 'application/json')
|
|
@@ -368,10 +368,10 @@ module Clerk
|
|
|
368
368
|
|
|
369
369
|
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
|
370
370
|
timeout ||= @sdk_configuration.timeout
|
|
371
|
-
|
|
371
|
+
|
|
372
372
|
|
|
373
373
|
connection = @sdk_configuration.client.dup
|
|
374
|
-
connection.
|
|
374
|
+
connection.use Utils::RetryMiddleware, retry_options
|
|
375
375
|
|
|
376
376
|
hook_ctx = SDKHooks::HookContext.new(
|
|
377
377
|
config: @sdk_configuration,
|
|
@@ -384,7 +384,7 @@ module Clerk
|
|
|
384
384
|
error = nil
|
|
385
385
|
http_response = nil
|
|
386
386
|
|
|
387
|
-
|
|
387
|
+
|
|
388
388
|
begin
|
|
389
389
|
http_response = connection.delete(url) do |req|
|
|
390
390
|
req.headers.merge!(headers)
|
|
@@ -420,13 +420,13 @@ module Clerk
|
|
|
420
420
|
response: http_response
|
|
421
421
|
)
|
|
422
422
|
end
|
|
423
|
-
|
|
423
|
+
|
|
424
424
|
if http_response.nil?
|
|
425
425
|
raise error if !error.nil?
|
|
426
426
|
raise 'no response'
|
|
427
427
|
end
|
|
428
428
|
end
|
|
429
|
-
|
|
429
|
+
|
|
430
430
|
content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
|
|
431
431
|
if Utils.match_status_code(http_response.status, ['200'])
|
|
432
432
|
if Utils.match_content_type(content_type, 'application/json')
|
|
@@ -523,10 +523,10 @@ module Clerk
|
|
|
523
523
|
|
|
524
524
|
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
|
525
525
|
timeout ||= @sdk_configuration.timeout
|
|
526
|
-
|
|
526
|
+
|
|
527
527
|
|
|
528
528
|
connection = @sdk_configuration.client.dup
|
|
529
|
-
connection.
|
|
529
|
+
connection.use Utils::RetryMiddleware, retry_options
|
|
530
530
|
|
|
531
531
|
hook_ctx = SDKHooks::HookContext.new(
|
|
532
532
|
config: @sdk_configuration,
|
|
@@ -539,7 +539,7 @@ module Clerk
|
|
|
539
539
|
error = nil
|
|
540
540
|
http_response = nil
|
|
541
541
|
|
|
542
|
-
|
|
542
|
+
|
|
543
543
|
begin
|
|
544
544
|
http_response = connection.patch(url) do |req|
|
|
545
545
|
req.body = body
|
|
@@ -576,13 +576,13 @@ module Clerk
|
|
|
576
576
|
response: http_response
|
|
577
577
|
)
|
|
578
578
|
end
|
|
579
|
-
|
|
579
|
+
|
|
580
580
|
if http_response.nil?
|
|
581
581
|
raise error if !error.nil?
|
|
582
582
|
raise 'no response'
|
|
583
583
|
end
|
|
584
584
|
end
|
|
585
|
-
|
|
585
|
+
|
|
586
586
|
content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
|
|
587
587
|
if Utils.match_status_code(http_response.status, ['200'])
|
|
588
588
|
if Utils.match_content_type(content_type, 'application/json')
|
|
@@ -671,10 +671,10 @@ module Clerk
|
|
|
671
671
|
|
|
672
672
|
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
|
673
673
|
timeout ||= @sdk_configuration.timeout
|
|
674
|
-
|
|
674
|
+
|
|
675
675
|
|
|
676
676
|
connection = @sdk_configuration.client.dup
|
|
677
|
-
connection.
|
|
677
|
+
connection.use Utils::RetryMiddleware, retry_options
|
|
678
678
|
|
|
679
679
|
hook_ctx = SDKHooks::HookContext.new(
|
|
680
680
|
config: @sdk_configuration,
|
|
@@ -687,7 +687,7 @@ module Clerk
|
|
|
687
687
|
error = nil
|
|
688
688
|
http_response = nil
|
|
689
689
|
|
|
690
|
-
|
|
690
|
+
|
|
691
691
|
begin
|
|
692
692
|
http_response = connection.post(url) do |req|
|
|
693
693
|
req.headers.merge!(headers)
|
|
@@ -723,13 +723,13 @@ module Clerk
|
|
|
723
723
|
response: http_response
|
|
724
724
|
)
|
|
725
725
|
end
|
|
726
|
-
|
|
726
|
+
|
|
727
727
|
if http_response.nil?
|
|
728
728
|
raise error if !error.nil?
|
|
729
729
|
raise 'no response'
|
|
730
730
|
end
|
|
731
731
|
end
|
|
732
|
-
|
|
732
|
+
|
|
733
733
|
content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
|
|
734
734
|
if Utils.match_status_code(http_response.status, ['200'])
|
|
735
735
|
if Utils.match_content_type(content_type, 'application/json')
|
|
@@ -802,7 +802,15 @@ module Clerk
|
|
|
802
802
|
# backend driving its own frontend can react on every attempt — an incorrect
|
|
803
803
|
# or expired code is reported through the status, not as an error. Resubmitting
|
|
804
804
|
# a verification whose code was already accepted is rejected with a
|
|
805
|
-
# `verification_already_verified` error. If the code
|
|
805
|
+
# `verification_already_verified` error. If the code for this verification
|
|
806
|
+
# could not be sent (the SMS provider refused or failed the send after
|
|
807
|
+
# prepare_verification had returned), the attempt is rejected with a
|
|
808
|
+
# `verification_code_not_sent` error and no attempt is counted; call
|
|
809
|
+
# prepare_verification again to send a new code. If too many codes have been
|
|
810
|
+
# checked for this phone number recently, the attempt is rejected with a
|
|
811
|
+
# `verification_code_too_many_attempts` error and no attempt is counted; the
|
|
812
|
+
# limit is per phone number, so wait for the `Retry-After` period rather than
|
|
813
|
+
# sending a new code. If the code
|
|
806
814
|
# is correct and the phone number is not already verified, it is also marked
|
|
807
815
|
# as verified as a side effect (just as it would be in a frontend verification
|
|
808
816
|
# flow); an already verified phone number is left unchanged. It never creates
|
|
@@ -852,10 +860,10 @@ module Clerk
|
|
|
852
860
|
|
|
853
861
|
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
|
854
862
|
timeout ||= @sdk_configuration.timeout
|
|
855
|
-
|
|
863
|
+
|
|
856
864
|
|
|
857
865
|
connection = @sdk_configuration.client.dup
|
|
858
|
-
connection.
|
|
866
|
+
connection.use Utils::RetryMiddleware, retry_options
|
|
859
867
|
|
|
860
868
|
hook_ctx = SDKHooks::HookContext.new(
|
|
861
869
|
config: @sdk_configuration,
|
|
@@ -868,7 +876,7 @@ module Clerk
|
|
|
868
876
|
error = nil
|
|
869
877
|
http_response = nil
|
|
870
878
|
|
|
871
|
-
|
|
879
|
+
|
|
872
880
|
begin
|
|
873
881
|
http_response = connection.post(url) do |req|
|
|
874
882
|
req.body = body
|
|
@@ -905,13 +913,13 @@ module Clerk
|
|
|
905
913
|
response: http_response
|
|
906
914
|
)
|
|
907
915
|
end
|
|
908
|
-
|
|
916
|
+
|
|
909
917
|
if http_response.nil?
|
|
910
918
|
raise error if !error.nil?
|
|
911
919
|
raise 'no response'
|
|
912
920
|
end
|
|
913
921
|
end
|
|
914
|
-
|
|
922
|
+
|
|
915
923
|
content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
|
|
916
924
|
if Utils.match_status_code(http_response.status, ['200'])
|
|
917
925
|
if Utils.match_content_type(content_type, 'application/json')
|
|
@@ -934,7 +942,7 @@ module Clerk
|
|
|
934
942
|
else
|
|
935
943
|
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'
|
|
936
944
|
end
|
|
937
|
-
elsif Utils.match_status_code(http_response.status, ['400', '401', '403', '404'])
|
|
945
|
+
elsif Utils.match_status_code(http_response.status, ['400', '401', '403', '404', '422', '429'])
|
|
938
946
|
if Utils.match_content_type(content_type, 'application/json')
|
|
939
947
|
http_response = @sdk_configuration.hooks.after_success(
|
|
940
948
|
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
@@ -981,9 +989,16 @@ module Clerk
|
|
|
981
989
|
# Replaces all of the user's phone numbers with a single primary phone number.
|
|
982
990
|
# By default the new phone number is created verified, with the admin verification strategy.
|
|
983
991
|
# When `identification_status` is `reserved` it is created reserved instead: unverified but usable
|
|
984
|
-
# for sign-in and locked so no other user can claim it.
|
|
992
|
+
# for sign-in and locked so no other user can claim it. When it is `unverified` the phone number is
|
|
993
|
+
# neither usable for sign-in nor locked. The new phone number is never reserved for
|
|
985
994
|
# second factor. Any existing phone numbers are deleted; replacing a phone number that is reserved
|
|
986
995
|
# for second factor disables the user's MFA.
|
|
996
|
+
#
|
|
997
|
+
# **Warning:** `identification_status: unverified` can lock the user out of their account. An
|
|
998
|
+
# unverified phone number cannot be used to sign in, so if the user has no other verified or
|
|
999
|
+
# reserved identifier, deleting their existing phone numbers leaves them unable to authenticate —
|
|
1000
|
+
# and unable to verify the new number, since that requires signing in. Recovery then requires
|
|
1001
|
+
# another admin API call.
|
|
987
1002
|
request = Models::Operations::ReplaceUserPhoneNumberRequest.new(
|
|
988
1003
|
user_id: user_id,
|
|
989
1004
|
body: body
|
|
@@ -1029,10 +1044,10 @@ module Clerk
|
|
|
1029
1044
|
|
|
1030
1045
|
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
|
1031
1046
|
timeout ||= @sdk_configuration.timeout
|
|
1032
|
-
|
|
1047
|
+
|
|
1033
1048
|
|
|
1034
1049
|
connection = @sdk_configuration.client.dup
|
|
1035
|
-
connection.
|
|
1050
|
+
connection.use Utils::RetryMiddleware, retry_options
|
|
1036
1051
|
|
|
1037
1052
|
hook_ctx = SDKHooks::HookContext.new(
|
|
1038
1053
|
config: @sdk_configuration,
|
|
@@ -1045,7 +1060,7 @@ module Clerk
|
|
|
1045
1060
|
error = nil
|
|
1046
1061
|
http_response = nil
|
|
1047
1062
|
|
|
1048
|
-
|
|
1063
|
+
|
|
1049
1064
|
begin
|
|
1050
1065
|
http_response = connection.put(url) do |req|
|
|
1051
1066
|
req.body = body
|
|
@@ -1082,13 +1097,13 @@ module Clerk
|
|
|
1082
1097
|
response: http_response
|
|
1083
1098
|
)
|
|
1084
1099
|
end
|
|
1085
|
-
|
|
1100
|
+
|
|
1086
1101
|
if http_response.nil?
|
|
1087
1102
|
raise error if !error.nil?
|
|
1088
1103
|
raise 'no response'
|
|
1089
1104
|
end
|
|
1090
1105
|
end
|
|
1091
|
-
|
|
1106
|
+
|
|
1092
1107
|
content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
|
|
1093
1108
|
if Utils.match_status_code(http_response.status, ['200'])
|
|
1094
1109
|
if Utils.match_content_type(content_type, 'application/json')
|
data/lib/clerk/proxy.rb
CHANGED
|
@@ -61,14 +61,14 @@ module Clerk
|
|
|
61
61
|
@session_claims['org_permissions']
|
|
62
62
|
end
|
|
63
63
|
|
|
64
|
-
# Returns true if the session
|
|
64
|
+
# Returns true if the session already satisfies the step up verification policy.
|
|
65
65
|
def user_reverified?(params)
|
|
66
66
|
return false unless user?
|
|
67
67
|
|
|
68
68
|
fva = @session_claims['fva']
|
|
69
69
|
|
|
70
|
-
#
|
|
71
|
-
return
|
|
70
|
+
# not a session token
|
|
71
|
+
return false if fva.nil?
|
|
72
72
|
|
|
73
73
|
level = params[:level]
|
|
74
74
|
after_minutes = params[:after_minutes].to_i
|
data/lib/clerk/proxychecks.rb
CHANGED
|
@@ -86,10 +86,10 @@ module Clerk
|
|
|
86
86
|
|
|
87
87
|
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
|
88
88
|
timeout ||= @sdk_configuration.timeout
|
|
89
|
-
|
|
89
|
+
|
|
90
90
|
|
|
91
91
|
connection = @sdk_configuration.client.dup
|
|
92
|
-
connection.
|
|
92
|
+
connection.use Utils::RetryMiddleware, retry_options
|
|
93
93
|
|
|
94
94
|
hook_ctx = SDKHooks::HookContext.new(
|
|
95
95
|
config: @sdk_configuration,
|
|
@@ -102,7 +102,7 @@ module Clerk
|
|
|
102
102
|
error = nil
|
|
103
103
|
http_response = nil
|
|
104
104
|
|
|
105
|
-
|
|
105
|
+
|
|
106
106
|
begin
|
|
107
107
|
http_response = connection.post(url) do |req|
|
|
108
108
|
req.body = body
|
|
@@ -139,13 +139,13 @@ module Clerk
|
|
|
139
139
|
response: http_response
|
|
140
140
|
)
|
|
141
141
|
end
|
|
142
|
-
|
|
142
|
+
|
|
143
143
|
if http_response.nil?
|
|
144
144
|
raise error if !error.nil?
|
|
145
145
|
raise 'no response'
|
|
146
146
|
end
|
|
147
147
|
end
|
|
148
|
-
|
|
148
|
+
|
|
149
149
|
content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
|
|
150
150
|
if Utils.match_status_code(http_response.status, ['200'])
|
|
151
151
|
if Utils.match_content_type(content_type, 'application/json')
|
data/lib/clerk/redirecturls.rb
CHANGED
|
@@ -75,10 +75,10 @@ module Clerk
|
|
|
75
75
|
|
|
76
76
|
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
|
77
77
|
timeout ||= @sdk_configuration.timeout
|
|
78
|
-
|
|
78
|
+
|
|
79
79
|
|
|
80
80
|
connection = @sdk_configuration.client.dup
|
|
81
|
-
connection.
|
|
81
|
+
connection.use Utils::RetryMiddleware, retry_options
|
|
82
82
|
|
|
83
83
|
hook_ctx = SDKHooks::HookContext.new(
|
|
84
84
|
config: @sdk_configuration,
|
|
@@ -91,7 +91,7 @@ module Clerk
|
|
|
91
91
|
error = nil
|
|
92
92
|
http_response = nil
|
|
93
93
|
|
|
94
|
-
|
|
94
|
+
|
|
95
95
|
begin
|
|
96
96
|
http_response = connection.get(url) do |req|
|
|
97
97
|
req.headers.merge!(headers)
|
|
@@ -128,13 +128,13 @@ module Clerk
|
|
|
128
128
|
response: http_response
|
|
129
129
|
)
|
|
130
130
|
end
|
|
131
|
-
|
|
131
|
+
|
|
132
132
|
if http_response.nil?
|
|
133
133
|
raise error if !error.nil?
|
|
134
134
|
raise 'no response'
|
|
135
135
|
end
|
|
136
136
|
end
|
|
137
|
-
|
|
137
|
+
|
|
138
138
|
content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
|
|
139
139
|
if Utils.match_status_code(http_response.status, ['200'])
|
|
140
140
|
if Utils.match_content_type(content_type, 'application/json')
|
|
@@ -207,10 +207,10 @@ module Clerk
|
|
|
207
207
|
|
|
208
208
|
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
|
209
209
|
timeout ||= @sdk_configuration.timeout
|
|
210
|
-
|
|
210
|
+
|
|
211
211
|
|
|
212
212
|
connection = @sdk_configuration.client.dup
|
|
213
|
-
connection.
|
|
213
|
+
connection.use Utils::RetryMiddleware, retry_options
|
|
214
214
|
|
|
215
215
|
hook_ctx = SDKHooks::HookContext.new(
|
|
216
216
|
config: @sdk_configuration,
|
|
@@ -223,7 +223,7 @@ module Clerk
|
|
|
223
223
|
error = nil
|
|
224
224
|
http_response = nil
|
|
225
225
|
|
|
226
|
-
|
|
226
|
+
|
|
227
227
|
begin
|
|
228
228
|
http_response = connection.post(url) do |req|
|
|
229
229
|
req.body = body
|
|
@@ -260,13 +260,13 @@ module Clerk
|
|
|
260
260
|
response: http_response
|
|
261
261
|
)
|
|
262
262
|
end
|
|
263
|
-
|
|
263
|
+
|
|
264
264
|
if http_response.nil?
|
|
265
265
|
raise error if !error.nil?
|
|
266
266
|
raise 'no response'
|
|
267
267
|
end
|
|
268
268
|
end
|
|
269
|
-
|
|
269
|
+
|
|
270
270
|
content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
|
|
271
271
|
if Utils.match_status_code(http_response.status, ['200'])
|
|
272
272
|
if Utils.match_content_type(content_type, 'application/json')
|
|
@@ -352,10 +352,10 @@ module Clerk
|
|
|
352
352
|
|
|
353
353
|
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
|
354
354
|
timeout ||= @sdk_configuration.timeout
|
|
355
|
-
|
|
355
|
+
|
|
356
356
|
|
|
357
357
|
connection = @sdk_configuration.client.dup
|
|
358
|
-
connection.
|
|
358
|
+
connection.use Utils::RetryMiddleware, retry_options
|
|
359
359
|
|
|
360
360
|
hook_ctx = SDKHooks::HookContext.new(
|
|
361
361
|
config: @sdk_configuration,
|
|
@@ -368,7 +368,7 @@ module Clerk
|
|
|
368
368
|
error = nil
|
|
369
369
|
http_response = nil
|
|
370
370
|
|
|
371
|
-
|
|
371
|
+
|
|
372
372
|
begin
|
|
373
373
|
http_response = connection.get(url) do |req|
|
|
374
374
|
req.headers.merge!(headers)
|
|
@@ -404,13 +404,13 @@ module Clerk
|
|
|
404
404
|
response: http_response
|
|
405
405
|
)
|
|
406
406
|
end
|
|
407
|
-
|
|
407
|
+
|
|
408
408
|
if http_response.nil?
|
|
409
409
|
raise error if !error.nil?
|
|
410
410
|
raise 'no response'
|
|
411
411
|
end
|
|
412
412
|
end
|
|
413
|
-
|
|
413
|
+
|
|
414
414
|
content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
|
|
415
415
|
if Utils.match_status_code(http_response.status, ['200'])
|
|
416
416
|
if Utils.match_content_type(content_type, 'application/json')
|
|
@@ -496,10 +496,10 @@ module Clerk
|
|
|
496
496
|
|
|
497
497
|
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
|
498
498
|
timeout ||= @sdk_configuration.timeout
|
|
499
|
-
|
|
499
|
+
|
|
500
500
|
|
|
501
501
|
connection = @sdk_configuration.client.dup
|
|
502
|
-
connection.
|
|
502
|
+
connection.use Utils::RetryMiddleware, retry_options
|
|
503
503
|
|
|
504
504
|
hook_ctx = SDKHooks::HookContext.new(
|
|
505
505
|
config: @sdk_configuration,
|
|
@@ -512,7 +512,7 @@ module Clerk
|
|
|
512
512
|
error = nil
|
|
513
513
|
http_response = nil
|
|
514
514
|
|
|
515
|
-
|
|
515
|
+
|
|
516
516
|
begin
|
|
517
517
|
http_response = connection.delete(url) do |req|
|
|
518
518
|
req.headers.merge!(headers)
|
|
@@ -548,13 +548,13 @@ module Clerk
|
|
|
548
548
|
response: http_response
|
|
549
549
|
)
|
|
550
550
|
end
|
|
551
|
-
|
|
551
|
+
|
|
552
552
|
if http_response.nil?
|
|
553
553
|
raise error if !error.nil?
|
|
554
554
|
raise 'no response'
|
|
555
555
|
end
|
|
556
556
|
end
|
|
557
|
-
|
|
557
|
+
|
|
558
558
|
content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
|
|
559
559
|
if Utils.match_status_code(http_response.status, ['200'])
|
|
560
560
|
if Utils.match_content_type(content_type, 'application/json')
|