clerk-sdk-ruby 7.0.0 → 8.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.
Files changed (335) hide show
  1. checksums.yaml +4 -4
  2. data/lib/clerk/actortokens.rb +10 -10
  3. data/lib/clerk/admin_portal_link_tokens.rb +10 -10
  4. data/lib/clerk/agenttasks.rb +10 -10
  5. data/lib/clerk/allowlistidentifiers.rb +15 -15
  6. data/lib/clerk/api_keys.rb +40 -40
  7. data/lib/clerk/betafeatures.rb +10 -10
  8. data/lib/clerk/billing.rb +52 -52
  9. data/lib/clerk/blocklistidentifiers.rb +15 -15
  10. data/lib/clerk/clients.rb +15 -15
  11. data/lib/clerk/domains.rb +20 -20
  12. data/lib/clerk/emailaddresses.rb +43 -36
  13. data/lib/clerk/emailandsmstemplates.rb +6 -6
  14. data/lib/clerk/emailsmstemplates.rb +21 -21
  15. data/lib/clerk/enterpriseconnections.rb +35 -35
  16. data/lib/clerk/instancesettings.rb +60 -60
  17. data/lib/clerk/invitations.rb +20 -20
  18. data/lib/clerk/jwks.rb +5 -5
  19. data/lib/clerk/jwttemplates.rb +25 -25
  20. data/lib/clerk/m2m.rb +20 -20
  21. data/lib/clerk/machines.rb +45 -45
  22. data/lib/clerk/miscellaneous.rb +5 -5
  23. data/lib/clerk/models/components/algorithm.rb +19 -0
  24. data/lib/clerk/models/components/{clerkerror_meta.rbi → algorithm.rbi} +2 -2
  25. data/lib/clerk/models/components/billingpaymentattempt_totals.rb +1 -1
  26. data/lib/clerk/models/components/clerkerror.rb +1 -1
  27. data/lib/clerk/models/components/commercecreditledgerresponse.rb +3 -7
  28. data/lib/clerk/models/components/commercecreditledgerresponse.rbi +0 -2
  29. data/lib/clerk/models/components/{schemas_commerceperunittotal.rb → commerceperunittotal_2.rb} +2 -2
  30. data/lib/clerk/models/components/{schemas_commerceperunittotal.rbi → commerceperunittotal_2.rbi} +2 -2
  31. data/lib/clerk/models/components/{schemas_commerceperunittotaltier.rb → commerceperunittotaltier_2.rb} +1 -1
  32. data/lib/clerk/models/components/{schemas_commerceperunittotaltier.rbi → commerceperunittotaltier_2.rbi} +2 -2
  33. data/lib/clerk/models/components/{schemas_commerceplan.rb → commerceplan_2.rb} +6 -6
  34. data/lib/clerk/models/components/{schemas_commerceplan.rbi → commerceplan_2.rbi} +2 -2
  35. data/lib/clerk/models/components/{schemas_commerceplan_fee.rb → commerceplan_2_annual_fee.rb} +1 -1
  36. data/lib/clerk/models/components/{schemas_commerceplan_fee.rbi → commerceplan_2_annual_fee.rbi} +2 -2
  37. data/lib/clerk/models/components/{schemas_commercesubscriptionitem_fee.rb → commerceplan_2_annual_monthly_fee.rb} +1 -1
  38. data/lib/clerk/models/components/{schemas_commerceplan_annual_monthly_fee.rbi → commerceplan_2_annual_monthly_fee.rbi} +2 -2
  39. data/lib/clerk/models/components/{schemas_commerceplan_annual_fee.rb → commerceplan_2_fee.rb} +1 -1
  40. data/lib/clerk/models/components/{schemas_commerceplan_annual_fee.rbi → commerceplan_2_fee.rbi} +2 -2
  41. data/lib/clerk/models/components/{schemas_commerceplan_object.rb → commerceplan_2_object.rb} +2 -2
  42. data/lib/clerk/models/components/{clerkerrors_meta.rbi → commerceplan_2_object.rbi} +2 -2
  43. data/lib/clerk/models/components/commercepricetransitiondetails.rb +1 -1
  44. data/lib/clerk/models/components/commercepricetransitionresponse.rb +1 -1
  45. data/lib/clerk/models/components/{schemas_commercesubscriptionitem.rb → commercesubscriptionitem_2.rb} +7 -7
  46. data/lib/clerk/models/components/{schemas_commercesubscriptionitem.rbi → commercesubscriptionitem_2.rbi} +2 -2
  47. data/lib/clerk/models/components/{schemas_commercesubscriptionitem_amount.rb → commercesubscriptionitem_2_amount.rb} +1 -1
  48. data/lib/clerk/models/components/commercesubscriptionitem_2_amount.rbi +19 -0
  49. data/lib/clerk/models/components/{schemas_commerceplan_annual_monthly_fee.rb → commercesubscriptionitem_2_annual_fee.rb} +1 -1
  50. data/lib/clerk/models/components/{schemas_commercesubscriptionitem_fee.rbi → commercesubscriptionitem_2_annual_fee.rbi} +2 -2
  51. data/lib/clerk/models/components/{schemas_commercesubscriptionitem_annual_fee.rb → commercesubscriptionitem_2_annual_monthly_fee.rb} +1 -1
  52. data/lib/clerk/models/components/{schemas_commercesubscriptionitem_amount.rbi → commercesubscriptionitem_2_annual_monthly_fee.rbi} +2 -2
  53. data/lib/clerk/models/components/commercesubscriptionitem_2_fee.rb +44 -0
  54. data/lib/clerk/models/components/commercesubscriptionitem_2_fee.rbi +19 -0
  55. data/lib/clerk/models/components/{schemas_commercesubscriptionitem_next_payment.rb → commercesubscriptionitem_2_next_payment.rb} +3 -3
  56. data/lib/clerk/models/components/{schemas_commercesubscriptionitem_next_payment.rbi → commercesubscriptionitem_2_next_payment.rbi} +2 -2
  57. data/lib/clerk/models/components/{schemas_commercesubscriptionitem_next_payment_amount.rb → commercesubscriptionitem_2_next_payment_amount.rb} +1 -1
  58. data/lib/clerk/models/components/commercesubscriptionitem_2_next_payment_amount.rbi +19 -0
  59. data/lib/clerk/models/components/{schemas_commercesubscriptionitem_next_payment_credits.rb → commercesubscriptionitem_2_next_payment_credits.rb} +3 -3
  60. data/lib/clerk/models/components/{schemas_commercesubscriptionitem_next_payment_credits.rbi → commercesubscriptionitem_2_next_payment_credits.rbi} +2 -2
  61. data/lib/clerk/models/components/{schemas_commercesubscriptionitem_next_payment_credits_proration.rb → commercesubscriptionitem_2_next_payment_credits_proration.rb} +1 -1
  62. data/lib/clerk/models/components/{schemas_commercesubscriptionitem_next_payment_credits_proration.rbi → commercesubscriptionitem_2_next_payment_credits_proration.rbi} +2 -2
  63. data/lib/clerk/models/components/{schemas_commercesubscriptionitem_next_payment_discounts.rb → commercesubscriptionitem_2_next_payment_discounts.rb} +2 -2
  64. data/lib/clerk/models/components/{schemas_commercesubscriptionitem_next_payment_discounts.rbi → commercesubscriptionitem_2_next_payment_discounts.rbi} +2 -2
  65. data/lib/clerk/models/components/{schemas_commercesubscriptionitem_next_payment_discounts_proration.rb → commercesubscriptionitem_2_next_payment_discounts_proration.rb} +1 -1
  66. data/lib/clerk/models/components/{schemas_commercesubscriptionitem_next_payment_discounts_proration.rbi → commercesubscriptionitem_2_next_payment_discounts_proration.rbi} +2 -2
  67. data/lib/clerk/models/components/{schemas_commercesubscriptionitem_next_payment_payer.rb → commercesubscriptionitem_2_next_payment_payer.rb} +1 -1
  68. data/lib/clerk/models/components/{schemas_commercesubscriptionitem_next_payment_payer.rbi → commercesubscriptionitem_2_next_payment_payer.rbi} +2 -2
  69. data/lib/clerk/models/components/{schemas_commercesubscriptionitem_next_payment_totals.rb → commercesubscriptionitem_2_next_payment_totals.rb} +3 -3
  70. data/lib/clerk/models/components/{schemas_commercesubscriptionitem_next_payment_totals.rbi → commercesubscriptionitem_2_next_payment_totals.rbi} +2 -2
  71. data/lib/clerk/models/components/{schemas_commercesubscriptionitem_object_commercepayer.rb → commercesubscriptionitem_2_object_commercepayer.rb} +2 -2
  72. data/lib/clerk/models/components/commercesubscriptionitem_2_object_commercepayer.rbi +11 -0
  73. data/lib/clerk/models/components/{schemas_commercesubscriptionitem_object_commerceplan.rb → commercesubscriptionitem_2_object_commerceplan.rb} +2 -2
  74. data/lib/clerk/models/components/commercesubscriptionitem_2_object_commerceplan.rbi +11 -0
  75. data/lib/clerk/models/components/{schemas_commercesubscriptionitem_object_commercesubscriptionitem.rb → commercesubscriptionitem_2_object_commercesubscriptionitem.rb} +2 -2
  76. data/lib/clerk/models/components/commercesubscriptionitem_2_object_commercesubscriptionitem.rbi +11 -0
  77. data/lib/clerk/models/components/{schemas_commercesubscriptionitem_plan.rb → commercesubscriptionitem_2_plan.rb} +6 -6
  78. data/lib/clerk/models/components/{schemas_commercesubscriptionitem_plan.rbi → commercesubscriptionitem_2_plan.rbi} +2 -2
  79. data/lib/clerk/models/components/{schemas_commercesubscriptionitem_plan_period.rb → commercesubscriptionitem_2_plan_period.rb} +2 -2
  80. data/lib/clerk/models/components/commercesubscriptionitem_2_plan_period.rbi +11 -0
  81. data/lib/clerk/models/components/{schemas_commercesubscriptionitem_status.rb → commercesubscriptionitem_2_status.rb} +2 -2
  82. data/lib/clerk/models/components/commercesubscriptionitem_2_status.rbi +11 -0
  83. data/lib/clerk/models/components/commercesubscriptionitem_totals.rb +1 -1
  84. data/lib/clerk/models/components/commercesubscriptionnextpayment.rb +1 -1
  85. data/lib/clerk/models/components/commercesubscriptionnextpayment_totals.rb +1 -1
  86. data/lib/clerk/models/components/emailaddress_verification_saml_clerkerror.rb +1 -1
  87. data/lib/clerk/models/components/enrollment_mode.rb +1 -0
  88. data/lib/clerk/models/components/enterpriseaccount_verification_oauth_clerkerror.rb +1 -1
  89. data/lib/clerk/models/components/enterpriseaccount_verification_saml_clerkerror.rb +1 -1
  90. data/lib/clerk/models/components/enterpriseconnection.rb +6 -2
  91. data/lib/clerk/models/components/enterpriseconnection.rbi +2 -0
  92. data/lib/clerk/models/components/{custom_attribute.rb → enterpriseconnection_custom_attribute.rb} +1 -1
  93. data/lib/clerk/models/components/enterpriseconnection_custom_attribute.rbi +21 -0
  94. data/lib/clerk/models/components/enterpriseconnection_mode.rb +21 -0
  95. data/lib/clerk/models/components/enterpriseconnection_mode.rbi +11 -0
  96. data/lib/clerk/models/components/enterpriseconnection_object.rb +19 -0
  97. data/lib/clerk/models/components/enterpriseconnection_object.rbi +11 -0
  98. data/lib/clerk/models/components/enterpriseconnection_saml_connection.rb +5 -1
  99. data/lib/clerk/models/components/enterpriseconnection_saml_connection.rbi +2 -0
  100. data/lib/clerk/models/components/externalaccountwithverification_verification_oauth_clerkerror.rb +1 -1
  101. data/lib/clerk/models/components/{schemas_featureresponse.rb → featureresponse_2.rb} +2 -2
  102. data/lib/clerk/models/components/{schemas_featureresponse.rbi → featureresponse_2.rbi} +2 -2
  103. data/lib/clerk/models/components/{schemas_featureresponse_object.rb → featureresponse_2_object.rb} +2 -2
  104. data/lib/clerk/models/components/featureresponse_2_object.rbi +11 -0
  105. data/lib/clerk/models/components/instanceprotect.rb +5 -1
  106. data/lib/clerk/models/components/instanceprotect.rbi +2 -0
  107. data/lib/clerk/models/components/instancesettings.rb +4 -1
  108. data/lib/clerk/models/components/login_hint.rb +36 -0
  109. data/lib/clerk/models/components/login_hint.rbi +15 -0
  110. data/lib/clerk/models/components/oauthapplicationsettings.rb +17 -1
  111. data/lib/clerk/models/components/oauthapplicationsettings.rbi +8 -0
  112. data/lib/clerk/models/components/organizationmembershippublicuserdata.rb +5 -1
  113. data/lib/clerk/models/components/organizationmembershippublicuserdata.rbi +2 -0
  114. data/lib/clerk/models/components/payer_commercepayer.rb +1 -1
  115. data/lib/clerk/models/components/payment_type.rb +1 -0
  116. data/lib/clerk/models/components/platform.rb +20 -0
  117. data/lib/clerk/models/components/{samlaccount_meta.rbi → platform.rbi} +2 -2
  118. data/lib/clerk/models/components/samlaccount_clerkerror.rb +1 -1
  119. data/lib/clerk/models/components/samlconnection_1.rb +15 -1
  120. data/lib/clerk/models/components/samlconnection_1.rbi +6 -0
  121. data/lib/clerk/models/components/samlconnection_2.rb +15 -1
  122. data/lib/clerk/models/components/samlconnection_2.rbi +6 -0
  123. data/lib/clerk/models/components/samlconnectionloginhint.rb +36 -0
  124. data/lib/clerk/models/components/samlconnectionloginhint.rbi +15 -0
  125. data/lib/clerk/models/components/samlconnectionloginhint_mode.rb +21 -0
  126. data/lib/clerk/models/components/samlconnectionloginhint_mode.rbi +11 -0
  127. data/lib/clerk/models/components/scimdirectory.rb +80 -0
  128. data/lib/clerk/models/components/scimdirectory.rbi +37 -0
  129. data/lib/clerk/models/components/scimdirectory_custom_attribute.rb +48 -0
  130. data/lib/clerk/models/components/{custom_attribute.rbi → scimdirectory_custom_attribute.rbi} +2 -2
  131. data/lib/clerk/models/components/scimdirectory_list.rb +36 -0
  132. data/lib/clerk/models/components/scimdirectory_list.rbi +15 -0
  133. data/lib/clerk/models/components/scimdirectory_object.rb +19 -0
  134. data/lib/clerk/models/components/scimdirectory_object.rbi +11 -0
  135. data/lib/clerk/models/components/scimgrouprolemapping.rb +64 -0
  136. data/lib/clerk/models/components/scimgrouprolemapping.rbi +29 -0
  137. data/lib/clerk/models/components/scimgrouprolemapping_deleted.rb +43 -0
  138. data/lib/clerk/models/components/scimgrouprolemapping_deleted.rbi +17 -0
  139. data/lib/clerk/models/components/scimgrouprolemapping_deleted_object.rb +19 -0
  140. data/lib/clerk/models/components/scimgrouprolemapping_deleted_object.rbi +11 -0
  141. data/lib/clerk/models/components/scimgrouprolemapping_list.rb +36 -0
  142. data/lib/clerk/models/components/scimgrouprolemapping_list.rbi +15 -0
  143. data/lib/clerk/models/components/scimgrouprolemapping_object.rb +19 -0
  144. data/lib/clerk/models/components/scimgrouprolemapping_object.rbi +11 -0
  145. data/lib/clerk/models/components/seats.rb +1 -1
  146. data/lib/clerk/models/components/trusteddevice.rb +72 -0
  147. data/lib/clerk/models/components/trusteddevice.rbi +33 -0
  148. data/lib/clerk/models/components/trusteddevice_list.rb +36 -0
  149. data/lib/clerk/models/components/trusteddevice_list.rbi +15 -0
  150. data/lib/clerk/models/components/trusteddevice_object.rb +19 -0
  151. data/lib/clerk/models/components/trusteddevice_object.rbi +11 -0
  152. data/lib/clerk/models/components/trusteddevice_status.rb +20 -0
  153. data/lib/clerk/models/components/trusteddevice_status.rbi +11 -0
  154. data/lib/clerk/models/components/verification_from_oauth_clerkerror.rb +1 -1
  155. data/lib/clerk/models/components/verification_google_one_tap_clerkerror.rb +1 -1
  156. data/lib/clerk/models/components.rb +49 -38
  157. data/lib/clerk/models/errors/clerkerrors.rb +1 -1
  158. data/lib/clerk/models/operations/createemailaddress_request.rb +7 -1
  159. data/lib/clerk/models/operations/createemailaddress_request.rbi +2 -0
  160. data/lib/clerk/models/operations/createenterpriseconnection_login_hint.rb +36 -0
  161. data/lib/clerk/models/operations/createenterpriseconnection_login_hint.rbi +15 -0
  162. data/lib/clerk/models/operations/createenterpriseconnection_mode.rb +21 -0
  163. data/lib/clerk/models/operations/createenterpriseconnection_mode.rbi +11 -0
  164. data/lib/clerk/models/operations/createenterpriseconnection_saml.rb +5 -1
  165. data/lib/clerk/models/operations/createenterpriseconnection_saml.rbi +2 -0
  166. data/lib/clerk/models/operations/createorganizationdomain_requestbody.rb +1 -1
  167. data/lib/clerk/models/operations/createsamlconnection_login_hint_1.rb +36 -0
  168. data/lib/clerk/models/operations/createsamlconnection_login_hint_1.rbi +15 -0
  169. data/lib/clerk/models/operations/createsamlconnection_login_hint_2.rb +36 -0
  170. data/lib/clerk/models/operations/createsamlconnection_login_hint_2.rbi +15 -0
  171. data/lib/clerk/models/operations/createsamlconnection_mode_1.rb +21 -0
  172. data/lib/clerk/models/operations/createsamlconnection_mode_1.rbi +11 -0
  173. data/lib/clerk/models/operations/createsamlconnection_mode_2.rb +21 -0
  174. data/lib/clerk/models/operations/createsamlconnection_mode_2.rbi +11 -0
  175. data/lib/clerk/models/operations/createsamlconnection_requestbody_1.rb +5 -1
  176. data/lib/clerk/models/operations/createsamlconnection_requestbody_1.rbi +2 -0
  177. data/lib/clerk/models/operations/createsamlconnection_requestbody_2.rb +5 -1
  178. data/lib/clerk/models/operations/createsamlconnection_requestbody_2.rbi +2 -0
  179. data/lib/clerk/models/operations/createscimdirectory_request.rb +44 -0
  180. data/lib/clerk/models/operations/createscimdirectory_request.rbi +19 -0
  181. data/lib/clerk/models/operations/createscimdirectory_response.rb +44 -0
  182. data/lib/clerk/models/operations/createscimdirectory_response.rbi +19 -0
  183. data/lib/clerk/models/operations/createscimgrouprolemapping_request.rb +36 -0
  184. data/lib/clerk/models/operations/createscimgrouprolemapping_request.rbi +15 -0
  185. data/lib/clerk/models/operations/createscimgrouprolemapping_requestbody.rb +42 -0
  186. data/lib/clerk/models/operations/createscimgrouprolemapping_requestbody.rbi +17 -0
  187. data/lib/clerk/models/operations/createscimgrouprolemapping_response.rb +44 -0
  188. data/lib/clerk/models/operations/createscimgrouprolemapping_response.rbi +19 -0
  189. data/lib/clerk/models/operations/createsignintoken_request.rb +6 -1
  190. data/lib/clerk/models/operations/createsignintoken_request.rbi +2 -0
  191. data/lib/clerk/models/operations/deletescimdirectory_request.rb +32 -0
  192. data/lib/clerk/models/operations/deletescimdirectory_request.rbi +13 -0
  193. data/lib/clerk/models/operations/deletescimdirectory_response.rb +44 -0
  194. data/lib/clerk/models/operations/deletescimdirectory_response.rbi +19 -0
  195. data/lib/clerk/models/operations/deletescimgrouprolemapping_request.rb +36 -0
  196. data/lib/clerk/models/operations/deletescimgrouprolemapping_request.rbi +15 -0
  197. data/lib/clerk/models/operations/deletescimgrouprolemapping_response.rb +44 -0
  198. data/lib/clerk/models/operations/deletescimgrouprolemapping_response.rbi +19 -0
  199. data/lib/clerk/models/operations/enrollment_mode.rb +5 -0
  200. data/lib/clerk/models/operations/extendbillingsubscriptionitemfreetrial_response.rb +4 -4
  201. data/lib/clerk/models/operations/extendbillingsubscriptionitemfreetrial_response.rbi +2 -2
  202. data/lib/clerk/models/operations/getscimdirectory_request.rb +32 -0
  203. data/lib/clerk/models/operations/getscimdirectory_request.rbi +13 -0
  204. data/lib/clerk/models/operations/getscimdirectory_response.rb +44 -0
  205. data/lib/clerk/models/operations/getscimdirectory_response.rbi +19 -0
  206. data/lib/clerk/models/operations/group_role_mapping.rb +44 -0
  207. data/lib/clerk/models/operations/group_role_mapping.rbi +19 -0
  208. data/lib/clerk/models/operations/listallorganizationdomains_request.rb +2 -1
  209. data/lib/clerk/models/operations/listorganizationdomains_request.rb +2 -1
  210. data/lib/clerk/models/operations/listscimdirectories_request.rb +39 -0
  211. data/lib/clerk/models/operations/listscimdirectories_request.rbi +15 -0
  212. data/lib/clerk/models/operations/listscimdirectories_response.rb +44 -0
  213. data/lib/clerk/models/operations/listscimdirectories_response.rbi +19 -0
  214. data/lib/clerk/models/operations/listscimgrouprolemappings_request.rb +32 -0
  215. data/lib/clerk/models/operations/listscimgrouprolemappings_request.rbi +13 -0
  216. data/lib/clerk/models/operations/listscimgrouprolemappings_response.rb +44 -0
  217. data/lib/clerk/models/operations/listscimgrouprolemappings_response.rbi +19 -0
  218. data/lib/clerk/models/operations/listusertrusteddevices_request.rb +32 -0
  219. data/lib/clerk/models/operations/listusertrusteddevices_request.rbi +13 -0
  220. data/lib/clerk/models/operations/listusertrusteddevices_response.rb +44 -0
  221. data/lib/clerk/models/operations/listusertrusteddevices_response.rbi +19 -0
  222. data/lib/clerk/models/operations/mapping.rb +36 -0
  223. data/lib/clerk/models/operations/mapping.rbi +15 -0
  224. data/lib/clerk/models/operations/removeuserpassword_request.rb +36 -0
  225. data/lib/clerk/models/operations/removeuserpassword_request.rbi +15 -0
  226. data/lib/clerk/models/operations/removeuserpassword_requestbody.rb +32 -0
  227. data/lib/clerk/models/operations/removeuserpassword_requestbody.rbi +13 -0
  228. data/lib/clerk/models/operations/removeuserpassword_response.rb +44 -0
  229. data/lib/clerk/models/operations/removeuserpassword_response.rbi +19 -0
  230. data/lib/clerk/models/operations/replacescimgrouprolemappings_request.rb +36 -0
  231. data/lib/clerk/models/operations/replacescimgrouprolemappings_request.rbi +15 -0
  232. data/lib/clerk/models/operations/replacescimgrouprolemappings_requestbody.rb +32 -0
  233. data/lib/clerk/models/operations/replacescimgrouprolemappings_requestbody.rbi +13 -0
  234. data/lib/clerk/models/operations/replacescimgrouprolemappings_response.rb +44 -0
  235. data/lib/clerk/models/operations/replacescimgrouprolemappings_response.rbi +19 -0
  236. data/lib/clerk/models/operations/replaceuseremailaddress_identification_status.rb +10 -2
  237. data/lib/clerk/models/operations/replaceuseremailaddress_requestbody.rb +16 -3
  238. data/lib/clerk/models/operations/replaceuseremailaddress_requestbody.rbi +2 -0
  239. data/lib/clerk/models/operations/replaceuserphonenumber_identification_status.rb +10 -2
  240. data/lib/clerk/models/operations/replaceuserphonenumber_requestbody.rb +9 -2
  241. data/lib/clerk/models/operations/revokeoauthapplicationtoken_request.rb +36 -0
  242. data/lib/clerk/models/operations/revokeoauthapplicationtoken_request.rbi +15 -0
  243. data/lib/clerk/models/operations/revokeoauthapplicationtoken_requestbody.rb +32 -0
  244. data/lib/clerk/models/operations/revokeoauthapplicationtoken_requestbody.rbi +13 -0
  245. data/lib/clerk/models/operations/revokeoauthapplicationtoken_response.rb +40 -0
  246. data/lib/clerk/models/operations/revokeoauthapplicationtoken_response.rbi +17 -0
  247. data/lib/clerk/models/operations/revokeusertrusteddevice_request.rb +36 -0
  248. data/lib/clerk/models/operations/revokeusertrusteddevice_request.rbi +15 -0
  249. data/lib/clerk/models/operations/revokeusertrusteddevice_response.rb +44 -0
  250. data/lib/clerk/models/operations/revokeusertrusteddevice_response.rbi +19 -0
  251. data/lib/clerk/models/operations/rotatescimdirectoryapikey_request.rb +32 -0
  252. data/lib/clerk/models/operations/rotatescimdirectoryapikey_request.rbi +13 -0
  253. data/lib/clerk/models/operations/rotatescimdirectoryapikey_response.rb +44 -0
  254. data/lib/clerk/models/operations/rotatescimdirectoryapikey_response.rbi +19 -0
  255. data/lib/clerk/models/operations/updateemailaddress_requestbody.rb +7 -1
  256. data/lib/clerk/models/operations/updateemailaddress_requestbody.rbi +2 -0
  257. data/lib/clerk/models/operations/updateenterpriseconnection_login_hint.rb +36 -0
  258. data/lib/clerk/models/operations/updateenterpriseconnection_login_hint.rbi +15 -0
  259. data/lib/clerk/models/operations/updateenterpriseconnection_mode.rb +21 -0
  260. data/lib/clerk/models/operations/updateenterpriseconnection_mode.rbi +11 -0
  261. data/lib/clerk/models/operations/updateenterpriseconnection_saml.rb +5 -1
  262. data/lib/clerk/models/operations/updateenterpriseconnection_saml.rbi +2 -0
  263. data/lib/clerk/models/operations/updateinstanceoauthapplicationsettings_request.rb +17 -1
  264. data/lib/clerk/models/operations/updateinstanceoauthapplicationsettings_request.rbi +8 -0
  265. data/lib/clerk/models/operations/updateorganizationdomain_requestbody.rb +1 -1
  266. data/lib/clerk/models/operations/updatesamlconnection_login_hint.rb +36 -0
  267. data/lib/clerk/models/operations/updatesamlconnection_login_hint.rbi +15 -0
  268. data/lib/clerk/models/operations/updatesamlconnection_mode.rb +21 -0
  269. data/lib/clerk/models/operations/updatesamlconnection_mode.rbi +11 -0
  270. data/lib/clerk/models/operations/updatesamlconnection_requestbody.rb +5 -1
  271. data/lib/clerk/models/operations/updatesamlconnection_requestbody.rbi +2 -0
  272. data/lib/clerk/models/operations/updatescimdirectory_request.rb +36 -0
  273. data/lib/clerk/models/operations/updatescimdirectory_request.rbi +15 -0
  274. data/lib/clerk/models/operations/updatescimdirectory_requestbody.rb +49 -0
  275. data/lib/clerk/models/operations/updatescimdirectory_requestbody.rbi +21 -0
  276. data/lib/clerk/models/operations/updatescimdirectory_response.rb +44 -0
  277. data/lib/clerk/models/operations/updatescimdirectory_response.rbi +19 -0
  278. data/lib/clerk/models/operations.rb +45 -0
  279. data/lib/clerk/oauthaccesstokens.rb +5 -5
  280. data/lib/clerk/oauthapplications.rb +185 -35
  281. data/lib/clerk/openapiclient.rb +2 -1
  282. data/lib/clerk/organizationdomains.rb +32 -32
  283. data/lib/clerk/organizationinvitations.rb +35 -35
  284. data/lib/clerk/organizationmemberships.rb +25 -25
  285. data/lib/clerk/organizationpermissions.rb +25 -25
  286. data/lib/clerk/organizationroles.rb +35 -35
  287. data/lib/clerk/organizations.rb +60 -60
  288. data/lib/clerk/phonenumbers.rb +43 -36
  289. data/lib/clerk/proxy.rb +3 -3
  290. data/lib/clerk/proxychecks.rb +5 -5
  291. data/lib/clerk/redirecturls.rb +20 -20
  292. data/lib/clerk/rolesets.rb +35 -35
  293. data/lib/clerk/samlconnections.rb +25 -25
  294. data/lib/clerk/scimdirectories.rb +1531 -0
  295. data/lib/clerk/sdk.rb +23 -5
  296. data/lib/clerk/sdkconfiguration.rb +3 -3
  297. data/lib/clerk/sessions.rb +35 -35
  298. data/lib/clerk/signintokens.rb +11 -11
  299. data/lib/clerk/signups.rb +10 -10
  300. data/lib/clerk/templates.rb +5 -5
  301. data/lib/clerk/testingtokens.rb +5 -5
  302. data/lib/clerk/users.rb +690 -196
  303. data/lib/clerk/utils/retries.rb +43 -1
  304. data/lib/clerk/waitlistentries.rb +30 -30
  305. data/lib/clerk/webhooks.rb +15 -15
  306. data/lib/clerk_sdk_ruby.rb +1 -0
  307. data/test/clerk/jwks_cache_scoping_test.rb +83 -0
  308. data/test/clerk/proxy_test.rb +108 -0
  309. metadata +195 -80
  310. data/lib/clerk/models/components/clerkerror_meta.rb +0 -27
  311. data/lib/clerk/models/components/clerkerrors_meta.rb +0 -27
  312. data/lib/clerk/models/components/emailaddress_verification_saml_meta.rb +0 -27
  313. data/lib/clerk/models/components/emailaddress_verification_saml_meta.rbi +0 -11
  314. data/lib/clerk/models/components/enterpriseaccount_verification_oauth_meta.rb +0 -27
  315. data/lib/clerk/models/components/enterpriseaccount_verification_oauth_meta.rbi +0 -11
  316. data/lib/clerk/models/components/enterpriseaccount_verification_saml_meta.rb +0 -27
  317. data/lib/clerk/models/components/enterpriseaccount_verification_saml_meta.rbi +0 -11
  318. data/lib/clerk/models/components/externalaccountwithverification_verification_oauth_meta.rb +0 -27
  319. data/lib/clerk/models/components/externalaccountwithverification_verification_oauth_meta.rbi +0 -11
  320. data/lib/clerk/models/components/samlaccount_meta.rb +0 -27
  321. data/lib/clerk/models/components/schemas_commerceplan_object.rbi +0 -11
  322. data/lib/clerk/models/components/schemas_commercesubscriptionitem_annual_fee.rbi +0 -19
  323. data/lib/clerk/models/components/schemas_commercesubscriptionitem_annual_monthly_fee.rb +0 -44
  324. data/lib/clerk/models/components/schemas_commercesubscriptionitem_annual_monthly_fee.rbi +0 -19
  325. data/lib/clerk/models/components/schemas_commercesubscriptionitem_next_payment_amount.rbi +0 -19
  326. data/lib/clerk/models/components/schemas_commercesubscriptionitem_object_commercepayer.rbi +0 -11
  327. data/lib/clerk/models/components/schemas_commercesubscriptionitem_object_commerceplan.rbi +0 -11
  328. data/lib/clerk/models/components/schemas_commercesubscriptionitem_object_commercesubscriptionitem.rbi +0 -11
  329. data/lib/clerk/models/components/schemas_commercesubscriptionitem_plan_period.rbi +0 -11
  330. data/lib/clerk/models/components/schemas_commercesubscriptionitem_status.rbi +0 -11
  331. data/lib/clerk/models/components/schemas_featureresponse_object.rbi +0 -11
  332. data/lib/clerk/models/components/verification_from_oauth_meta.rb +0 -27
  333. data/lib/clerk/models/components/verification_from_oauth_meta.rbi +0 -11
  334. data/lib/clerk/models/components/verification_google_one_tap_meta.rb +0 -27
  335. data/lib/clerk/models/components/verification_google_one_tap_meta.rbi +0 -11
data/lib/clerk/sdk.rb CHANGED
@@ -3,6 +3,7 @@
3
3
  require 'clerk/jwks_cache'
4
4
  require 'clerk/openapiclient'
5
5
  # require 'clerk/version'
6
+ require 'digest'
6
7
  require 'jwt'
7
8
 
8
9
  module Clerk
@@ -16,16 +17,33 @@ module Clerk
16
17
  # How often (in seconds) should JWKs be refreshed
17
18
  JWKS_CACHE_LIFETIME = 3600 # 1 hour
18
19
 
20
+ # One JWKS cache per Clerk instance. A single process-wide cache would let a
21
+ # token minted by one instance verify against another, since the keys it
22
+ # holds are whichever instance refreshed last and no issuer check runs.
23
+ # The cache still outlives individual SDK objects, because
24
+ # `authenticate_request` builds a fresh SDK per request.
19
25
  # rubocop:disable Style/ClassVars
20
- @@jwks_cache = JWKSCache.new(JWKS_CACHE_LIFETIME)
26
+ @@jwks_caches = {}
27
+ @@jwks_caches_mutex = Mutex.new
21
28
  # rubocop:enable Style/ClassVars
22
-
23
- def self.jwks_cache
24
- @@jwks_cache
29
+
30
+ # Returns the JWKS cache for a single Clerk instance. `scope` must identify
31
+ # that instance; see #jwks_cache_scope.
32
+ def self.jwks_cache(scope)
33
+ @@jwks_caches_mutex.synchronize do
34
+ @@jwks_caches[scope] ||= JWKSCache.new(JWKS_CACHE_LIFETIME)
35
+ end
25
36
  end
26
37
 
38
+ # Opaque identifier for the Clerk instance this SDK talks to. The secret key
39
+ # is hashed so it is never retained as a cache key.
40
+ attr_reader :jwks_cache_scope
41
+
27
42
  def initialize(client: nil, retry_config: nil, timeout_ms: nil, secret_key: nil, security_source: nil, server_idx: nil, server_url: nil, url_params: nil)
28
43
  secret_key ||= Clerk.configuration.secret_key
44
+ @jwks_cache_scope = Digest::SHA256.hexdigest(
45
+ [server_url, server_idx, secret_key].join("\0")
46
+ )
29
47
  super(
30
48
  client: client,
31
49
  retry_config: retry_config,
@@ -56,7 +74,7 @@ module Clerk
56
74
  jwk_loader = lambda do |options|
57
75
  # JWT.decode requires that the 'keys' key in the Hash is a symbol (as
58
76
  # opposed to a string which our SDK returns by default)
59
- {keys: SDK.jwks_cache.fetch(self, kid_not_found: options[:invalidate] || options[:kid_not_found], force_refresh: force_refresh_jwks)}
77
+ {keys: SDK.jwks_cache(@jwks_cache_scope).fetch(self, kid_not_found: options[:invalidate] || options[:kid_not_found], force_refresh: force_refresh_jwks)}
60
78
  end
61
79
 
62
80
  begin
@@ -76,9 +76,9 @@ module Clerk
76
76
  end
77
77
  @language = 'ruby'
78
78
  @openapi_doc_version = '2026-05-12'
79
- @sdk_version = '7.0.0'
80
- @gen_version = '2.903.0'
81
- @user_agent = 'speakeasy-sdk/ruby 7.0.0 2.903.0 2026-05-12 clerk-sdk-ruby'
79
+ @sdk_version = '8.0.0'
80
+ @gen_version = '2.928.0'
81
+ @user_agent = 'speakeasy-sdk/ruby 8.0.0 2.928.0 2026-05-12 clerk-sdk-ruby'
82
82
  end
83
83
 
84
84
 
@@ -76,10 +76,10 @@ module Clerk
76
76
 
77
77
  timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
78
78
  timeout ||= @sdk_configuration.timeout
79
-
79
+
80
80
 
81
81
  connection = @sdk_configuration.client.dup
82
- connection.request :retry, retry_options
82
+ connection.use Utils::RetryMiddleware, retry_options
83
83
 
84
84
  hook_ctx = SDKHooks::HookContext.new(
85
85
  config: @sdk_configuration,
@@ -92,7 +92,7 @@ module Clerk
92
92
  error = nil
93
93
  http_response = nil
94
94
 
95
-
95
+
96
96
  begin
97
97
  http_response = connection.get(url) do |req|
98
98
  req.headers.merge!(headers)
@@ -129,13 +129,13 @@ module Clerk
129
129
  response: http_response
130
130
  )
131
131
  end
132
-
132
+
133
133
  if http_response.nil?
134
134
  raise error if !error.nil?
135
135
  raise 'no response'
136
136
  end
137
137
  end
138
-
138
+
139
139
  content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
140
140
  if Utils.match_status_code(http_response.status, ['200'])
141
141
  if Utils.match_content_type(content_type, 'application/json')
@@ -226,10 +226,10 @@ module Clerk
226
226
 
227
227
  timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
228
228
  timeout ||= @sdk_configuration.timeout
229
-
229
+
230
230
 
231
231
  connection = @sdk_configuration.client.dup
232
- connection.request :retry, retry_options
232
+ connection.use Utils::RetryMiddleware, retry_options
233
233
 
234
234
  hook_ctx = SDKHooks::HookContext.new(
235
235
  config: @sdk_configuration,
@@ -242,7 +242,7 @@ module Clerk
242
242
  error = nil
243
243
  http_response = nil
244
244
 
245
-
245
+
246
246
  begin
247
247
  http_response = connection.post(url) do |req|
248
248
  req.body = body
@@ -279,13 +279,13 @@ module Clerk
279
279
  response: http_response
280
280
  )
281
281
  end
282
-
282
+
283
283
  if http_response.nil?
284
284
  raise error if !error.nil?
285
285
  raise 'no response'
286
286
  end
287
287
  end
288
-
288
+
289
289
  content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
290
290
  if Utils.match_status_code(http_response.status, ['200'])
291
291
  if Utils.match_content_type(content_type, 'application/json')
@@ -371,10 +371,10 @@ module Clerk
371
371
 
372
372
  timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
373
373
  timeout ||= @sdk_configuration.timeout
374
-
374
+
375
375
 
376
376
  connection = @sdk_configuration.client.dup
377
- connection.request :retry, retry_options
377
+ connection.use Utils::RetryMiddleware, retry_options
378
378
 
379
379
  hook_ctx = SDKHooks::HookContext.new(
380
380
  config: @sdk_configuration,
@@ -387,7 +387,7 @@ module Clerk
387
387
  error = nil
388
388
  http_response = nil
389
389
 
390
-
390
+
391
391
  begin
392
392
  http_response = connection.get(url) do |req|
393
393
  req.headers.merge!(headers)
@@ -423,13 +423,13 @@ module Clerk
423
423
  response: http_response
424
424
  )
425
425
  end
426
-
426
+
427
427
  if http_response.nil?
428
428
  raise error if !error.nil?
429
429
  raise 'no response'
430
430
  end
431
431
  end
432
-
432
+
433
433
  content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
434
434
  if Utils.match_status_code(http_response.status, ['200'])
435
435
  if Utils.match_content_type(content_type, 'application/json')
@@ -527,10 +527,10 @@ module Clerk
527
527
 
528
528
  timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
529
529
  timeout ||= @sdk_configuration.timeout
530
-
530
+
531
531
 
532
532
  connection = @sdk_configuration.client.dup
533
- connection.request :retry, retry_options
533
+ connection.use Utils::RetryMiddleware, retry_options
534
534
 
535
535
  hook_ctx = SDKHooks::HookContext.new(
536
536
  config: @sdk_configuration,
@@ -543,7 +543,7 @@ module Clerk
543
543
  error = nil
544
544
  http_response = nil
545
545
 
546
-
546
+
547
547
  begin
548
548
  http_response = connection.post(url) do |req|
549
549
  req.body = body
@@ -580,13 +580,13 @@ module Clerk
580
580
  response: http_response
581
581
  )
582
582
  end
583
-
583
+
584
584
  if http_response.nil?
585
585
  raise error if !error.nil?
586
586
  raise 'no response'
587
587
  end
588
588
  end
589
-
589
+
590
590
  content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
591
591
  if Utils.match_status_code(http_response.status, ['200'])
592
592
  if Utils.match_content_type(content_type, 'application/json')
@@ -673,10 +673,10 @@ module Clerk
673
673
 
674
674
  timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
675
675
  timeout ||= @sdk_configuration.timeout
676
-
676
+
677
677
 
678
678
  connection = @sdk_configuration.client.dup
679
- connection.request :retry, retry_options
679
+ connection.use Utils::RetryMiddleware, retry_options
680
680
 
681
681
  hook_ctx = SDKHooks::HookContext.new(
682
682
  config: @sdk_configuration,
@@ -689,7 +689,7 @@ module Clerk
689
689
  error = nil
690
690
  http_response = nil
691
691
 
692
-
692
+
693
693
  begin
694
694
  http_response = connection.post(url) do |req|
695
695
  req.headers.merge!(headers)
@@ -725,13 +725,13 @@ module Clerk
725
725
  response: http_response
726
726
  )
727
727
  end
728
-
728
+
729
729
  if http_response.nil?
730
730
  raise error if !error.nil?
731
731
  raise 'no response'
732
732
  end
733
733
  end
734
-
734
+
735
735
  content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
736
736
  if Utils.match_status_code(http_response.status, ['200'])
737
737
  if Utils.match_content_type(content_type, 'application/json')
@@ -828,10 +828,10 @@ module Clerk
828
828
 
829
829
  timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
830
830
  timeout ||= @sdk_configuration.timeout
831
-
831
+
832
832
 
833
833
  connection = @sdk_configuration.client.dup
834
- connection.request :retry, retry_options
834
+ connection.use Utils::RetryMiddleware, retry_options
835
835
 
836
836
  hook_ctx = SDKHooks::HookContext.new(
837
837
  config: @sdk_configuration,
@@ -844,7 +844,7 @@ module Clerk
844
844
  error = nil
845
845
  http_response = nil
846
846
 
847
-
847
+
848
848
  begin
849
849
  http_response = connection.post(url) do |req|
850
850
  req.body = body
@@ -881,13 +881,13 @@ module Clerk
881
881
  response: http_response
882
882
  )
883
883
  end
884
-
884
+
885
885
  if http_response.nil?
886
886
  raise error if !error.nil?
887
887
  raise 'no response'
888
888
  end
889
889
  end
890
-
890
+
891
891
  content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
892
892
  if Utils.match_status_code(http_response.status, ['200'])
893
893
  if Utils.match_content_type(content_type, 'application/json')
@@ -985,10 +985,10 @@ module Clerk
985
985
 
986
986
  timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
987
987
  timeout ||= @sdk_configuration.timeout
988
-
988
+
989
989
 
990
990
  connection = @sdk_configuration.client.dup
991
- connection.request :retry, retry_options
991
+ connection.use Utils::RetryMiddleware, retry_options
992
992
 
993
993
  hook_ctx = SDKHooks::HookContext.new(
994
994
  config: @sdk_configuration,
@@ -1001,7 +1001,7 @@ module Clerk
1001
1001
  error = nil
1002
1002
  http_response = nil
1003
1003
 
1004
-
1004
+
1005
1005
  begin
1006
1006
  http_response = connection.post(url) do |req|
1007
1007
  req.body = body
@@ -1038,13 +1038,13 @@ module Clerk
1038
1038
  response: http_response
1039
1039
  )
1040
1040
  end
1041
-
1041
+
1042
1042
  if http_response.nil?
1043
1043
  raise error if !error.nil?
1044
1044
  raise 'no response'
1045
1045
  end
1046
1046
  end
1047
-
1047
+
1048
1048
  content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
1049
1049
  if Utils.match_status_code(http_response.status, ['200'])
1050
1050
  if Utils.match_content_type(content_type, 'application/json')
@@ -81,10 +81,10 @@ module Clerk
81
81
 
82
82
  timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
83
83
  timeout ||= @sdk_configuration.timeout
84
-
84
+
85
85
 
86
86
  connection = @sdk_configuration.client.dup
87
- connection.request :retry, retry_options
87
+ connection.use Utils::RetryMiddleware, retry_options
88
88
 
89
89
  hook_ctx = SDKHooks::HookContext.new(
90
90
  config: @sdk_configuration,
@@ -97,7 +97,7 @@ module Clerk
97
97
  error = nil
98
98
  http_response = nil
99
99
 
100
-
100
+
101
101
  begin
102
102
  http_response = connection.post(url) do |req|
103
103
  req.body = body
@@ -134,13 +134,13 @@ module Clerk
134
134
  response: http_response
135
135
  )
136
136
  end
137
-
137
+
138
138
  if http_response.nil?
139
139
  raise error if !error.nil?
140
140
  raise 'no response'
141
141
  end
142
142
  end
143
-
143
+
144
144
  content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
145
145
  if Utils.match_status_code(http_response.status, ['200'])
146
146
  if Utils.match_content_type(content_type, 'application/json')
@@ -163,7 +163,7 @@ module Clerk
163
163
  else
164
164
  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'
165
165
  end
166
- elsif Utils.match_status_code(http_response.status, ['404', '422'])
166
+ elsif Utils.match_status_code(http_response.status, ['403', '404', '422'])
167
167
  if Utils.match_content_type(content_type, 'application/json')
168
168
  http_response = @sdk_configuration.hooks.after_success(
169
169
  hook_ctx: SDKHooks::AfterSuccessHookContext.new(
@@ -226,10 +226,10 @@ module Clerk
226
226
 
227
227
  timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
228
228
  timeout ||= @sdk_configuration.timeout
229
-
229
+
230
230
 
231
231
  connection = @sdk_configuration.client.dup
232
- connection.request :retry, retry_options
232
+ connection.use Utils::RetryMiddleware, retry_options
233
233
 
234
234
  hook_ctx = SDKHooks::HookContext.new(
235
235
  config: @sdk_configuration,
@@ -242,7 +242,7 @@ module Clerk
242
242
  error = nil
243
243
  http_response = nil
244
244
 
245
-
245
+
246
246
  begin
247
247
  http_response = connection.post(url) do |req|
248
248
  req.headers.merge!(headers)
@@ -278,13 +278,13 @@ module Clerk
278
278
  response: http_response
279
279
  )
280
280
  end
281
-
281
+
282
282
  if http_response.nil?
283
283
  raise error if !error.nil?
284
284
  raise 'no response'
285
285
  end
286
286
  end
287
-
287
+
288
288
  content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
289
289
  if Utils.match_status_code(http_response.status, ['200'])
290
290
  if Utils.match_content_type(content_type, 'application/json')
data/lib/clerk/signups.rb CHANGED
@@ -77,10 +77,10 @@ module Clerk
77
77
 
78
78
  timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
79
79
  timeout ||= @sdk_configuration.timeout
80
-
80
+
81
81
 
82
82
  connection = @sdk_configuration.client.dup
83
- connection.request :retry, retry_options
83
+ connection.use Utils::RetryMiddleware, retry_options
84
84
 
85
85
  hook_ctx = SDKHooks::HookContext.new(
86
86
  config: @sdk_configuration,
@@ -93,7 +93,7 @@ module Clerk
93
93
  error = nil
94
94
  http_response = nil
95
95
 
96
-
96
+
97
97
  begin
98
98
  http_response = connection.get(url) do |req|
99
99
  req.headers.merge!(headers)
@@ -129,13 +129,13 @@ module Clerk
129
129
  response: http_response
130
130
  )
131
131
  end
132
-
132
+
133
133
  if http_response.nil?
134
134
  raise error if !error.nil?
135
135
  raise 'no response'
136
136
  end
137
137
  end
138
-
138
+
139
139
  content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
140
140
  if Utils.match_status_code(http_response.status, ['200'])
141
141
  if Utils.match_content_type(content_type, 'application/json')
@@ -232,10 +232,10 @@ module Clerk
232
232
 
233
233
  timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
234
234
  timeout ||= @sdk_configuration.timeout
235
-
235
+
236
236
 
237
237
  connection = @sdk_configuration.client.dup
238
- connection.request :retry, retry_options
238
+ connection.use Utils::RetryMiddleware, retry_options
239
239
 
240
240
  hook_ctx = SDKHooks::HookContext.new(
241
241
  config: @sdk_configuration,
@@ -248,7 +248,7 @@ module Clerk
248
248
  error = nil
249
249
  http_response = nil
250
250
 
251
-
251
+
252
252
  begin
253
253
  http_response = connection.patch(url) do |req|
254
254
  req.body = body
@@ -285,13 +285,13 @@ module Clerk
285
285
  response: http_response
286
286
  )
287
287
  end
288
-
288
+
289
289
  if http_response.nil?
290
290
  raise error if !error.nil?
291
291
  raise 'no response'
292
292
  end
293
293
  end
294
-
294
+
295
295
  content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
296
296
  if Utils.match_status_code(http_response.status, ['200'])
297
297
  if Utils.match_content_type(content_type, 'application/json')
@@ -91,10 +91,10 @@ module Clerk
91
91
 
92
92
  timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
93
93
  timeout ||= @sdk_configuration.timeout
94
-
94
+
95
95
 
96
96
  connection = @sdk_configuration.client.dup
97
- connection.request :retry, retry_options
97
+ connection.use Utils::RetryMiddleware, retry_options
98
98
 
99
99
  hook_ctx = SDKHooks::HookContext.new(
100
100
  config: @sdk_configuration,
@@ -107,7 +107,7 @@ module Clerk
107
107
  error = nil
108
108
  http_response = nil
109
109
 
110
-
110
+
111
111
  begin
112
112
  http_response = connection.post(url) do |req|
113
113
  req.body = body
@@ -144,13 +144,13 @@ module Clerk
144
144
  response: http_response
145
145
  )
146
146
  end
147
-
147
+
148
148
  if http_response.nil?
149
149
  raise error if !error.nil?
150
150
  raise 'no response'
151
151
  end
152
152
  end
153
-
153
+
154
154
  content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
155
155
  if Utils.match_status_code(http_response.status, ['200'])
156
156
  if Utils.match_content_type(content_type, 'application/json')
@@ -69,10 +69,10 @@ module Clerk
69
69
 
70
70
  timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
71
71
  timeout ||= @sdk_configuration.timeout
72
-
72
+
73
73
 
74
74
  connection = @sdk_configuration.client.dup
75
- connection.request :retry, retry_options
75
+ connection.use Utils::RetryMiddleware, retry_options
76
76
 
77
77
  hook_ctx = SDKHooks::HookContext.new(
78
78
  config: @sdk_configuration,
@@ -85,7 +85,7 @@ module Clerk
85
85
  error = nil
86
86
  http_response = nil
87
87
 
88
-
88
+
89
89
  begin
90
90
  http_response = connection.post(url) do |req|
91
91
  req.headers.merge!(headers)
@@ -121,13 +121,13 @@ module Clerk
121
121
  response: http_response
122
122
  )
123
123
  end
124
-
124
+
125
125
  if http_response.nil?
126
126
  raise error if !error.nil?
127
127
  raise 'no response'
128
128
  end
129
129
  end
130
-
130
+
131
131
  content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
132
132
  if Utils.match_status_code(http_response.status, ['200'])
133
133
  if Utils.match_content_type(content_type, 'application/json')