ory-client 1.9.0__py3-none-any.whl → 1.11.7__py3-none-any.whl

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 (565) hide show
  1. ory_client/__init__.py +279 -10
  2. ory_client/api/__init__.py +16 -3
  3. ory_client/api/courier_api.py +576 -287
  4. ory_client/api/events_api.py +1147 -576
  5. ory_client/api/frontend_api.py +8736 -4145
  6. ory_client/api/identity_api.py +5219 -2605
  7. ory_client/api/jwk_api.py +1881 -939
  8. ory_client/api/metadata_api.py +245 -376
  9. ory_client/api/o_auth2_api.py +7763 -3858
  10. ory_client/api/oidc_api.py +2071 -1034
  11. ory_client/api/permission_api.py +1675 -776
  12. ory_client/api/project_api.py +5314 -2638
  13. ory_client/api/relationship_api.py +1844 -860
  14. ory_client/api/wellknown_api.py +250 -131
  15. ory_client/api_client.py +520 -658
  16. ory_client/api_response.py +21 -0
  17. ory_client/configuration.py +65 -75
  18. ory_client/exceptions.py +73 -32
  19. ory_client/models/__init__.py +266 -291
  20. ory_client/models/accept_o_auth2_consent_request.py +118 -0
  21. ory_client/models/accept_o_auth2_consent_request_session.py +113 -0
  22. ory_client/models/accept_o_auth2_login_request.py +117 -0
  23. ory_client/models/active_project_in_console.py +101 -0
  24. ory_client/models/attribute.py +103 -0
  25. ory_client/models/attribute_filter.py +115 -0
  26. ory_client/models/attributes_count_datapoint.py +103 -0
  27. ory_client/models/authenticator_assurance_level.py +40 -0
  28. ory_client/models/batch_patch_identities_response.py +109 -0
  29. ory_client/models/check_opl_syntax_result.py +109 -0
  30. ory_client/models/check_permission_result.py +101 -0
  31. ory_client/models/cloud_account.py +105 -0
  32. ory_client/models/consistency_request_parameters.py +111 -0
  33. ory_client/models/continue_with.py +214 -0
  34. ory_client/models/continue_with_recovery_ui.py +114 -0
  35. ory_client/models/continue_with_recovery_ui_flow.py +103 -0
  36. ory_client/models/continue_with_set_ory_session_token.py +110 -0
  37. ory_client/models/continue_with_settings_ui.py +114 -0
  38. ory_client/models/continue_with_settings_ui_flow.py +101 -0
  39. ory_client/models/continue_with_verification_ui.py +114 -0
  40. ory_client/models/continue_with_verification_ui_flow.py +105 -0
  41. ory_client/models/courier_message_status.py +40 -0
  42. ory_client/models/courier_message_type.py +38 -0
  43. ory_client/models/create_custom_domain_body.py +109 -0
  44. ory_client/models/create_event_stream_body.py +112 -0
  45. ory_client/models/create_identity_body.py +155 -0
  46. ory_client/models/create_invite_response.py +114 -0
  47. ory_client/models/create_json_web_key_set.py +105 -0
  48. ory_client/models/create_project_api_key_request.py +101 -0
  49. ory_client/models/create_project_body.py +112 -0
  50. ory_client/models/create_project_branding.py +115 -0
  51. ory_client/models/create_project_member_invite_body.py +101 -0
  52. ory_client/models/create_project_normalized_payload.py +685 -0
  53. ory_client/models/create_recovery_code_for_identity_body.py +114 -0
  54. ory_client/models/create_recovery_link_for_identity_body.py +114 -0
  55. ory_client/models/create_relationship_body.py +113 -0
  56. ory_client/models/create_subscription_body.py +126 -0
  57. ory_client/models/create_subscription_common.py +124 -0
  58. ory_client/models/create_verifiable_credential_request_body.py +109 -0
  59. ory_client/models/create_workspace_member_invite_body.py +101 -0
  60. ory_client/models/create_workspace_payload.py +101 -0
  61. ory_client/models/create_workspace_subscription_body.py +124 -0
  62. ory_client/models/credential_supported_draft00.py +107 -0
  63. ory_client/models/custom_domain.py +132 -0
  64. ory_client/models/delete_my_sessions_count.py +101 -0
  65. ory_client/models/email_template_data.py +107 -0
  66. ory_client/models/email_template_data_body.py +103 -0
  67. ory_client/models/error_authenticator_assurance_level_not_satisfied.py +107 -0
  68. ory_client/models/error_browser_location_change_required.py +107 -0
  69. ory_client/models/error_flow_replaced.py +107 -0
  70. ory_client/models/error_generic.py +105 -0
  71. ory_client/models/error_o_auth2.py +109 -0
  72. ory_client/models/event_stream.py +112 -0
  73. ory_client/models/expanded_permission_tree.py +125 -0
  74. ory_client/models/flow_error.py +108 -0
  75. ory_client/models/generic_error.py +126 -0
  76. ory_client/models/generic_error_content.py +109 -0
  77. ory_client/models/generic_usage.py +103 -0
  78. ory_client/models/get_attributes_count_response.py +111 -0
  79. ory_client/models/get_managed_identity_schema_location.py +101 -0
  80. ory_client/models/get_metrics_event_attributes_response.py +103 -0
  81. ory_client/models/get_metrics_event_types_response.py +103 -0
  82. ory_client/models/get_organization_response.py +105 -0
  83. ory_client/models/get_project_events_body.py +120 -0
  84. ory_client/models/get_project_events_response.py +115 -0
  85. ory_client/models/get_project_metrics_response.py +111 -0
  86. ory_client/models/get_session_activity_response.py +111 -0
  87. ory_client/models/get_version200_response.py +101 -0
  88. ory_client/models/health_not_ready_status.py +101 -0
  89. ory_client/models/health_status.py +101 -0
  90. ory_client/models/identity.py +187 -0
  91. ory_client/models/identity_credentials.py +122 -0
  92. ory_client/models/identity_credentials_code.py +109 -0
  93. ory_client/models/identity_credentials_oidc.py +109 -0
  94. ory_client/models/identity_credentials_oidc_provider.py +111 -0
  95. ory_client/models/identity_credentials_password.py +101 -0
  96. ory_client/models/identity_patch.py +107 -0
  97. ory_client/models/identity_patch_response.py +115 -0
  98. ory_client/models/identity_schema_container.py +103 -0
  99. ory_client/models/identity_schema_preset.py +103 -0
  100. ory_client/models/identity_with_credentials.py +111 -0
  101. ory_client/models/identity_with_credentials_oidc.py +105 -0
  102. ory_client/models/identity_with_credentials_oidc_config.py +115 -0
  103. ory_client/models/identity_with_credentials_oidc_config_provider.py +103 -0
  104. ory_client/models/identity_with_credentials_password.py +105 -0
  105. ory_client/models/identity_with_credentials_password_config.py +103 -0
  106. ory_client/models/internal_get_project_branding_body.py +101 -0
  107. ory_client/models/internal_is_ax_welcome_screen_enabled_for_project_body.py +103 -0
  108. ory_client/models/internal_is_owner_for_project_by_slug_body.py +114 -0
  109. ory_client/models/internal_is_owner_for_project_by_slug_response.py +101 -0
  110. ory_client/models/introspected_o_auth2_token.py +127 -0
  111. ory_client/models/is_owner_for_project_by_slug.py +103 -0
  112. ory_client/models/json_patch.py +119 -0
  113. ory_client/models/json_web_key.py +133 -0
  114. ory_client/models/json_web_key_set.py +109 -0
  115. ory_client/models/keto_namespace.py +103 -0
  116. ory_client/models/list_event_streams.py +109 -0
  117. ory_client/models/list_my_workspaces_response.py +113 -0
  118. ory_client/models/list_organizations_response.py +109 -0
  119. ory_client/models/list_workspace_projects_response.py +113 -0
  120. ory_client/models/login_flow.py +165 -0
  121. ory_client/models/login_flow_state.py +39 -0
  122. ory_client/models/logout_flow.py +103 -0
  123. ory_client/models/managed_identity_schema.py +120 -0
  124. ory_client/models/managed_identity_schema_validation_result.py +103 -0
  125. ory_client/models/member_invite.py +148 -0
  126. ory_client/models/message.py +141 -0
  127. ory_client/models/message_dispatch.py +119 -0
  128. ory_client/models/metrics_datapoint.py +104 -0
  129. ory_client/models/migration_options.py +117 -0
  130. ory_client/models/namespace.py +101 -0
  131. ory_client/models/needs_privileged_session_error.py +107 -0
  132. ory_client/models/normalized_project.py +171 -0
  133. ory_client/models/normalized_project_revision.py +674 -0
  134. ory_client/models/normalized_project_revision_courier_channel.py +145 -0
  135. ory_client/models/normalized_project_revision_hook.py +140 -0
  136. ory_client/models/normalized_project_revision_identity_schema.py +133 -0
  137. ory_client/models/normalized_project_revision_third_party_provider.py +187 -0
  138. ory_client/models/normalized_project_revision_tokenizer_template.py +133 -0
  139. ory_client/models/o_auth2_client.py +352 -0
  140. ory_client/models/o_auth2_client_token_lifespans.py +270 -0
  141. ory_client/models/o_auth2_consent_request.py +133 -0
  142. ory_client/models/o_auth2_consent_request_open_id_connect_context.py +109 -0
  143. ory_client/models/o_auth2_consent_session.py +130 -0
  144. ory_client/models/o_auth2_consent_session_expires_at.py +110 -0
  145. ory_client/models/o_auth2_login_request.py +125 -0
  146. ory_client/models/o_auth2_logout_request.py +115 -0
  147. ory_client/models/o_auth2_redirect_to.py +101 -0
  148. ory_client/models/o_auth2_token_exchange.py +111 -0
  149. ory_client/models/oidc_configuration.py +169 -0
  150. ory_client/models/oidc_user_info.py +137 -0
  151. ory_client/models/organization.py +116 -0
  152. ory_client/models/organization_body.py +103 -0
  153. ory_client/models/pagination.py +104 -0
  154. ory_client/models/pagination_headers.py +103 -0
  155. ory_client/models/parse_error.py +112 -0
  156. ory_client/models/patch_identities_body.py +109 -0
  157. ory_client/models/perform_native_logout_body.py +101 -0
  158. ory_client/models/permissions_on_workpace_response.py +101 -0
  159. ory_client/models/plan.py +103 -0
  160. ory_client/models/plan_details.py +128 -0
  161. ory_client/models/post_check_permission_body.py +113 -0
  162. ory_client/models/post_check_permission_or_error_body.py +113 -0
  163. ory_client/models/project.py +148 -0
  164. ory_client/models/project_api_key.py +126 -0
  165. ory_client/models/project_branding.py +129 -0
  166. ory_client/models/project_branding_colors.py +157 -0
  167. ory_client/models/project_branding_theme.py +182 -0
  168. ory_client/models/project_cors.py +103 -0
  169. ory_client/models/project_events_datapoint.py +114 -0
  170. ory_client/models/project_host.py +107 -0
  171. ory_client/models/project_member.py +107 -0
  172. ory_client/models/project_metadata.py +161 -0
  173. ory_client/models/project_service_identity.py +101 -0
  174. ory_client/models/project_service_o_auth2.py +101 -0
  175. ory_client/models/project_service_permission.py +101 -0
  176. ory_client/models/project_services.py +117 -0
  177. ory_client/models/quota_usage.py +118 -0
  178. ory_client/models/recovery_code_for_identity.py +106 -0
  179. ory_client/models/recovery_flow.py +139 -0
  180. ory_client/models/recovery_flow_state.py +39 -0
  181. ory_client/models/recovery_identity_address.py +110 -0
  182. ory_client/models/recovery_link_for_identity.py +104 -0
  183. ory_client/models/registration_flow.py +156 -0
  184. ory_client/models/registration_flow_state.py +39 -0
  185. ory_client/models/reject_o_auth2_request.py +109 -0
  186. ory_client/models/relation_query.py +113 -0
  187. ory_client/models/relationship.py +113 -0
  188. ory_client/models/relationship_namespaces.py +109 -0
  189. ory_client/models/relationship_patch.py +117 -0
  190. ory_client/models/relationships.py +111 -0
  191. ory_client/models/rfc6749_error_json.py +109 -0
  192. ory_client/models/schema_patch.py +103 -0
  193. ory_client/models/self_service_flow_expired_error.py +112 -0
  194. ory_client/models/session.py +141 -0
  195. ory_client/models/session_activity_datapoint.py +105 -0
  196. ory_client/models/session_authentication_method.py +121 -0
  197. ory_client/models/session_device.py +107 -0
  198. ory_client/models/set_active_project_in_console_body.py +101 -0
  199. ory_client/models/set_custom_domain_body.py +109 -0
  200. ory_client/models/set_event_stream_body.py +112 -0
  201. ory_client/models/set_project.py +118 -0
  202. ory_client/models/set_project_branding_theme_body.py +115 -0
  203. ory_client/models/settings_flow.py +145 -0
  204. ory_client/models/settings_flow_state.py +38 -0
  205. ory_client/models/source_position.py +103 -0
  206. ory_client/models/subject_set.py +105 -0
  207. ory_client/models/subscription.py +179 -0
  208. ory_client/models/successful_code_exchange_response.py +107 -0
  209. ory_client/models/successful_native_login.py +117 -0
  210. ory_client/models/successful_native_registration.py +123 -0
  211. ory_client/models/successful_project_update.py +115 -0
  212. ory_client/models/token_pagination.py +104 -0
  213. ory_client/models/token_pagination_headers.py +103 -0
  214. ory_client/models/token_pagination_request_parameters.py +104 -0
  215. ory_client/models/token_pagination_response_headers.py +103 -0
  216. ory_client/models/trust_o_auth2_jwt_grant_issuer.py +116 -0
  217. ory_client/models/trusted_o_auth2_jwt_grant_issuer.py +120 -0
  218. ory_client/models/trusted_o_auth2_jwt_grant_json_web_key.py +103 -0
  219. ory_client/models/ui_container.py +123 -0
  220. ory_client/models/ui_node.py +139 -0
  221. ory_client/models/ui_node_anchor_attributes.py +118 -0
  222. ory_client/models/ui_node_attributes.py +238 -0
  223. ory_client/models/ui_node_image_attributes.py +116 -0
  224. ory_client/models/ui_node_input_attributes.py +154 -0
  225. ory_client/models/ui_node_meta.py +105 -0
  226. ory_client/models/ui_node_script_attributes.py +124 -0
  227. ory_client/models/ui_node_text_attributes.py +116 -0
  228. ory_client/models/ui_text.py +114 -0
  229. ory_client/models/update_identity_body.py +132 -0
  230. ory_client/models/update_login_flow_body.py +286 -0
  231. ory_client/models/update_login_flow_with_code_method.py +111 -0
  232. ory_client/models/update_login_flow_with_lookup_secret_method.py +105 -0
  233. ory_client/models/update_login_flow_with_oidc_method.py +115 -0
  234. ory_client/models/update_login_flow_with_passkey_method.py +105 -0
  235. ory_client/models/update_login_flow_with_password_method.py +111 -0
  236. ory_client/models/update_login_flow_with_totp_method.py +107 -0
  237. ory_client/models/update_login_flow_with_web_authn_method.py +109 -0
  238. ory_client/models/update_recovery_flow_body.py +166 -0
  239. ory_client/models/update_recovery_flow_with_code_method.py +116 -0
  240. ory_client/models/update_recovery_flow_with_link_method.py +114 -0
  241. ory_client/models/update_registration_flow_body.py +238 -0
  242. ory_client/models/update_registration_flow_with_code_method.py +111 -0
  243. ory_client/models/update_registration_flow_with_oidc_method.py +115 -0
  244. ory_client/models/update_registration_flow_with_passkey_method.py +109 -0
  245. ory_client/models/update_registration_flow_with_password_method.py +109 -0
  246. ory_client/models/update_registration_flow_with_profile_method.py +109 -0
  247. ory_client/models/update_registration_flow_with_web_authn_method.py +111 -0
  248. ory_client/models/update_settings_flow_body.py +286 -0
  249. ory_client/models/update_settings_flow_with_lookup_method.py +113 -0
  250. ory_client/models/update_settings_flow_with_oidc_method.py +113 -0
  251. ory_client/models/update_settings_flow_with_passkey_method.py +107 -0
  252. ory_client/models/update_settings_flow_with_password_method.py +107 -0
  253. ory_client/models/update_settings_flow_with_profile_method.py +107 -0
  254. ory_client/models/update_settings_flow_with_totp_method.py +109 -0
  255. ory_client/models/update_settings_flow_with_web_authn_method.py +111 -0
  256. ory_client/models/update_subscription_body.py +112 -0
  257. ory_client/models/update_verification_flow_body.py +166 -0
  258. ory_client/models/update_verification_flow_with_code_method.py +116 -0
  259. ory_client/models/update_verification_flow_with_link_method.py +114 -0
  260. ory_client/models/update_workspace_payload.py +101 -0
  261. ory_client/models/usage.py +105 -0
  262. ory_client/models/verifiable_credential_priming_response.py +115 -0
  263. ory_client/models/verifiable_credential_proof.py +103 -0
  264. ory_client/models/verifiable_credential_response.py +103 -0
  265. ory_client/models/verifiable_identity_address.py +123 -0
  266. ory_client/models/verification_flow.py +129 -0
  267. ory_client/models/verification_flow_state.py +39 -0
  268. ory_client/models/version.py +101 -0
  269. ory_client/models/warning.py +103 -0
  270. ory_client/models/workspace.py +115 -0
  271. ory_client/models/workspace_meta.py +122 -0
  272. ory_client/py.typed +0 -0
  273. ory_client/rest.py +139 -236
  274. {ory_client-1.9.0.dist-info → ory_client-1.11.7.dist-info}/METADATA +6 -4
  275. ory_client-1.11.7.dist-info/RECORD +278 -0
  276. ory_client/apis/__init__.py +0 -28
  277. ory_client/model/__init__.py +0 -5
  278. ory_client/model/accept_o_auth2_consent_request.py +0 -296
  279. ory_client/model/accept_o_auth2_consent_request_session.py +0 -268
  280. ory_client/model/accept_o_auth2_login_request.py +0 -308
  281. ory_client/model/active_project_in_console.py +0 -264
  282. ory_client/model/attribute.py +0 -268
  283. ory_client/model/attribute_filter.py +0 -282
  284. ory_client/model/attributes_count_datapoint.py +0 -276
  285. ory_client/model/authenticator_assurance_level.py +0 -293
  286. ory_client/model/batch_patch_identities_response.py +0 -270
  287. ory_client/model/check_opl_syntax_result.py +0 -270
  288. ory_client/model/check_permission_result.py +0 -270
  289. ory_client/model/cloud_account.py +0 -282
  290. ory_client/model/consistency_request_parameters.py +0 -269
  291. ory_client/model/continue_with.py +0 -356
  292. ory_client/model/continue_with_recovery_ui.py +0 -287
  293. ory_client/model/continue_with_recovery_ui_flow.py +0 -274
  294. ory_client/model/continue_with_set_ory_session_token.py +0 -281
  295. ory_client/model/continue_with_settings_ui.py +0 -287
  296. ory_client/model/continue_with_settings_ui_flow.py +0 -270
  297. ory_client/model/continue_with_verification_ui.py +0 -287
  298. ory_client/model/continue_with_verification_ui_flow.py +0 -280
  299. ory_client/model/courier_message_status.py +0 -293
  300. ory_client/model/courier_message_type.py +0 -291
  301. ory_client/model/create_custom_domain_body.py +0 -280
  302. ory_client/model/create_event_stream_body.py +0 -287
  303. ory_client/model/create_identity_body.py +0 -314
  304. ory_client/model/create_invite_response.py +0 -282
  305. ory_client/model/create_json_web_key_set.py +0 -282
  306. ory_client/model/create_member_invite_response.py +0 -287
  307. ory_client/model/create_project_api_key_request.py +0 -270
  308. ory_client/model/create_project_body.py +0 -284
  309. ory_client/model/create_project_branding.py +0 -290
  310. ory_client/model/create_project_member_invite_body.py +0 -264
  311. ory_client/model/create_project_normalized_payload.py +0 -1119
  312. ory_client/model/create_recovery_code_for_identity_body.py +0 -279
  313. ory_client/model/create_recovery_link_for_identity_body.py +0 -279
  314. ory_client/model/create_relationship_body.py +0 -286
  315. ory_client/model/create_subscription_body.py +0 -298
  316. ory_client/model/create_subscription_common.py +0 -292
  317. ory_client/model/create_verifiable_credential_request_body.py +0 -278
  318. ory_client/model/create_workspace_member_invite_body.py +0 -264
  319. ory_client/model/create_workspace_payload.py +0 -270
  320. ory_client/model/create_workspace_subscription_body.py +0 -292
  321. ory_client/model/credential_supported_draft00.py +0 -276
  322. ory_client/model/custom_domain.py +0 -334
  323. ory_client/model/delete_my_sessions_count.py +0 -264
  324. ory_client/model/email_template_data.py +0 -282
  325. ory_client/model/email_template_data_body.py +0 -276
  326. ory_client/model/error_authenticator_assurance_level_not_satisfied.py +0 -274
  327. ory_client/model/error_browser_location_change_required.py +0 -274
  328. ory_client/model/error_flow_replaced.py +0 -274
  329. ory_client/model/error_generic.py +0 -276
  330. ory_client/model/error_o_auth2.py +0 -280
  331. ory_client/model/event_stream.py +0 -284
  332. ory_client/model/expanded_permission_tree.py +0 -294
  333. ory_client/model/flow_error.py +0 -282
  334. ory_client/model/generic_error.py +0 -308
  335. ory_client/model/generic_error_content.py +0 -280
  336. ory_client/model/generic_usage.py +0 -276
  337. ory_client/model/get_attributes_count_response.py +0 -273
  338. ory_client/model/get_managed_identity_schema_location.py +0 -264
  339. ory_client/model/get_metrics_event_attributes_response.py +0 -267
  340. ory_client/model/get_metrics_event_types_response.py +0 -267
  341. ory_client/model/get_organization_response.py +0 -276
  342. ory_client/model/get_project_events_body.py +0 -298
  343. ory_client/model/get_project_events_response.py +0 -278
  344. ory_client/model/get_project_metrics_response.py +0 -273
  345. ory_client/model/get_session_activity_response.py +0 -273
  346. ory_client/model/get_version200_response.py +0 -270
  347. ory_client/model/health_not_ready_status.py +0 -264
  348. ory_client/model/health_status.py +0 -264
  349. ory_client/model/identity.py +0 -342
  350. ory_client/model/identity_credentials.py +0 -294
  351. ory_client/model/identity_credentials_code.py +0 -268
  352. ory_client/model/identity_credentials_oidc.py +0 -270
  353. ory_client/model/identity_credentials_oidc_provider.py +0 -284
  354. ory_client/model/identity_credentials_password.py +0 -264
  355. ory_client/model/identity_patch.py +0 -274
  356. ory_client/model/identity_patch_response.py +0 -275
  357. ory_client/model/identity_schema_container.py +0 -268
  358. ory_client/model/identity_schema_preset.py +0 -276
  359. ory_client/model/identity_schema_presets.py +0 -292
  360. ory_client/model/identity_schemas.py +0 -292
  361. ory_client/model/identity_with_credentials.py +0 -276
  362. ory_client/model/identity_with_credentials_oidc.py +0 -270
  363. ory_client/model/identity_with_credentials_oidc_config.py +0 -276
  364. ory_client/model/identity_with_credentials_oidc_config_provider.py +0 -276
  365. ory_client/model/identity_with_credentials_password.py +0 -270
  366. ory_client/model/identity_with_credentials_password_config.py +0 -268
  367. ory_client/model/internal_get_project_branding_body.py +0 -264
  368. ory_client/model/internal_is_ax_welcome_screen_enabled_for_project_body.py +0 -276
  369. ory_client/model/internal_is_owner_for_project_by_slug_body.py +0 -290
  370. ory_client/model/internal_is_owner_for_project_by_slug_response.py +0 -270
  371. ory_client/model/introspected_o_auth2_token.py +0 -322
  372. ory_client/model/is_owner_for_project_by_slug.py +0 -276
  373. ory_client/model/is_ready200_response.py +0 -270
  374. ory_client/model/is_ready503_response.py +0 -270
  375. ory_client/model/json_patch.py +0 -292
  376. ory_client/model/json_patch_document.py +0 -292
  377. ory_client/model/json_web_key.py +0 -340
  378. ory_client/model/json_web_key_set.py +0 -270
  379. ory_client/model/keto_namespace.py +0 -268
  380. ory_client/model/keto_namespaces.py +0 -292
  381. ory_client/model/list_custom_domains.py +0 -292
  382. ory_client/model/list_event_streams.py +0 -270
  383. ory_client/model/list_my_workspaces_response.py +0 -288
  384. ory_client/model/list_organizations_response.py +0 -276
  385. ory_client/model/list_workspace_projects_response.py +0 -288
  386. ory_client/model/login_flow.py +0 -370
  387. ory_client/model/login_flow_state.py +0 -292
  388. ory_client/model/logout_flow.py +0 -276
  389. ory_client/model/managed_identity_schema.py +0 -300
  390. ory_client/model/managed_identity_schema_validation_result.py +0 -268
  391. ory_client/model/managed_identity_schemas.py +0 -292
  392. ory_client/model/member_invite.py +0 -321
  393. ory_client/model/member_invites.py +0 -292
  394. ory_client/model/message.py +0 -355
  395. ory_client/model/message_dispatch.py +0 -302
  396. ory_client/model/metrics_datapoint.py +0 -276
  397. ory_client/model/migration_options.py +0 -284
  398. ory_client/model/namespace.py +0 -264
  399. ory_client/model/needs_privileged_session_error.py +0 -280
  400. ory_client/model/normalized_project.py +0 -337
  401. ory_client/model/normalized_project_revision.py +0 -1105
  402. ory_client/model/normalized_project_revision_courier_channel.py +0 -328
  403. ory_client/model/normalized_project_revision_hook.py +0 -342
  404. ory_client/model/normalized_project_revision_identity_schema.py +0 -308
  405. ory_client/model/normalized_project_revision_identity_schemas.py +0 -292
  406. ory_client/model/normalized_project_revision_third_party_provider.py +0 -368
  407. ory_client/model/normalized_project_revision_tokenizer_template.py +0 -300
  408. ory_client/model/normalized_project_revision_tokenizer_templates.py +0 -292
  409. ory_client/model/normalized_projects.py +0 -292
  410. ory_client/model/null_duration.py +0 -292
  411. ory_client/model/o_auth2_client.py +0 -460
  412. ory_client/model/o_auth2_client_token_lifespans.py +0 -306
  413. ory_client/model/o_auth2_consent_request.py +0 -328
  414. ory_client/model/o_auth2_consent_request_open_id_connect_context.py +0 -280
  415. ory_client/model/o_auth2_consent_session.py +0 -308
  416. ory_client/model/o_auth2_consent_session_expires_at.py +0 -280
  417. ory_client/model/o_auth2_consent_sessions.py +0 -292
  418. ory_client/model/o_auth2_login_request.py +0 -320
  419. ory_client/model/o_auth2_logout_request.py +0 -290
  420. ory_client/model/o_auth2_redirect_to.py +0 -270
  421. ory_client/model/o_auth2_token_exchange.py +0 -284
  422. ory_client/model/oidc_configuration.py +0 -412
  423. ory_client/model/oidc_user_info.py +0 -336
  424. ory_client/model/organization.py +0 -302
  425. ory_client/model/organization_body.py +0 -268
  426. ory_client/model/pagination.py +0 -274
  427. ory_client/model/pagination_headers.py +0 -268
  428. ory_client/model/parse_error.py +0 -278
  429. ory_client/model/patch_identities_body.py +0 -270
  430. ory_client/model/perform_native_logout_body.py +0 -270
  431. ory_client/model/permissions_on_project.py +0 -260
  432. ory_client/model/permissions_on_workpace_response.py +0 -264
  433. ory_client/model/plan.py +0 -276
  434. ory_client/model/plan_details.py +0 -316
  435. ory_client/model/plan_features.py +0 -266
  436. ory_client/model/plans.py +0 -287
  437. ory_client/model/post_check_permission_body.py +0 -286
  438. ory_client/model/post_check_permission_or_error_body.py +0 -286
  439. ory_client/model/pricing.py +0 -292
  440. ory_client/model/project.py +0 -319
  441. ory_client/model/project_api_key.py +0 -298
  442. ory_client/model/project_api_keys.py +0 -292
  443. ory_client/model/project_branding.py +0 -303
  444. ory_client/model/project_branding_colors.py +0 -376
  445. ory_client/model/project_branding_theme.py +0 -421
  446. ory_client/model/project_branding_themes.py +0 -292
  447. ory_client/model/project_cors.py +0 -268
  448. ory_client/model/project_events_datapoint.py +0 -288
  449. ory_client/model/project_host.py +0 -281
  450. ory_client/model/project_member.py +0 -288
  451. ory_client/model/project_members.py +0 -292
  452. ory_client/model/project_metadata.py +0 -337
  453. ory_client/model/project_metadata_list.py +0 -292
  454. ory_client/model/project_revision_hooks.py +0 -292
  455. ory_client/model/project_revision_identity_schemas.py +0 -292
  456. ory_client/model/project_revision_third_party_login_providers.py +0 -292
  457. ory_client/model/project_revisions.py +0 -292
  458. ory_client/model/project_service_identity.py +0 -270
  459. ory_client/model/project_service_o_auth2.py +0 -270
  460. ory_client/model/project_service_permission.py +0 -270
  461. ory_client/model/project_services.py +0 -282
  462. ory_client/model/projects.py +0 -292
  463. ory_client/model/quota_usage.py +0 -328
  464. ory_client/model/recovery_code_for_identity.py +0 -280
  465. ory_client/model/recovery_flow.py +0 -330
  466. ory_client/model/recovery_flow_state.py +0 -292
  467. ory_client/model/recovery_identity_address.py +0 -290
  468. ory_client/model/recovery_link_for_identity.py +0 -274
  469. ory_client/model/registration_flow.py +0 -352
  470. ory_client/model/registration_flow_state.py +0 -292
  471. ory_client/model/reject_o_auth2_request.py +0 -280
  472. ory_client/model/relation_query.py +0 -286
  473. ory_client/model/relationship.py +0 -296
  474. ory_client/model/relationship_namespaces.py +0 -270
  475. ory_client/model/relationship_patch.py +0 -278
  476. ory_client/model/relationships.py +0 -274
  477. ory_client/model/revision_courier_channels.py +0 -292
  478. ory_client/model/rfc6749_error_json.py +0 -280
  479. ory_client/model/schema_patch.py +0 -276
  480. ory_client/model/self_service_flow_expired_error.py +0 -282
  481. ory_client/model/session.py +0 -318
  482. ory_client/model/session_activity_datapoint.py +0 -282
  483. ory_client/model/session_authentication_method.py +0 -297
  484. ory_client/model/session_authentication_methods.py +0 -292
  485. ory_client/model/session_device.py +0 -282
  486. ory_client/model/set_active_project_in_console_body.py +0 -270
  487. ory_client/model/set_custom_domain_body.py +0 -280
  488. ory_client/model/set_event_stream_body.py +0 -287
  489. ory_client/model/set_project.py +0 -296
  490. ory_client/model/set_project_branding_theme_body.py +0 -290
  491. ory_client/model/settings_flow.py +0 -338
  492. ory_client/model/settings_flow_state.py +0 -291
  493. ory_client/model/source_position.py +0 -268
  494. ory_client/model/string_slice_json_format.py +0 -287
  495. ory_client/model/subject_set.py +0 -282
  496. ory_client/model/subscription.py +0 -350
  497. ory_client/model/successful_code_exchange_response.py +0 -280
  498. ory_client/model/successful_native_login.py +0 -280
  499. ory_client/model/successful_native_registration.py +0 -292
  500. ory_client/model/successful_project_update.py +0 -284
  501. ory_client/model/token_pagination.py +0 -274
  502. ory_client/model/token_pagination_headers.py +0 -268
  503. ory_client/model/token_pagination_request_parameters.py +0 -274
  504. ory_client/model/token_pagination_response_headers.py +0 -268
  505. ory_client/model/trust_o_auth2_jwt_grant_issuer.py +0 -302
  506. ory_client/model/trusted_o_auth2_jwt_grant_issuer.py +0 -298
  507. ory_client/model/trusted_o_auth2_jwt_grant_issuers.py +0 -292
  508. ory_client/model/trusted_o_auth2_jwt_grant_json_web_key.py +0 -268
  509. ory_client/model/ui_container.py +0 -294
  510. ory_client/model/ui_node.py +0 -322
  511. ory_client/model/ui_node_anchor_attributes.py +0 -294
  512. ory_client/model/ui_node_attributes.py +0 -440
  513. ory_client/model/ui_node_image_attributes.py +0 -294
  514. ory_client/model/ui_node_input_attributes.py +0 -340
  515. ory_client/model/ui_node_meta.py +0 -270
  516. ory_client/model/ui_node_script_attributes.py +0 -318
  517. ory_client/model/ui_node_text_attributes.py +0 -288
  518. ory_client/model/ui_nodes.py +0 -292
  519. ory_client/model/ui_text.py +0 -291
  520. ory_client/model/ui_texts.py +0 -292
  521. ory_client/model/update_identity_body.py +0 -304
  522. ory_client/model/update_login_flow_body.py +0 -411
  523. ory_client/model/update_login_flow_with_code_method.py +0 -292
  524. ory_client/model/update_login_flow_with_lookup_secret_method.py +0 -280
  525. ory_client/model/update_login_flow_with_oidc_method.py +0 -300
  526. ory_client/model/update_login_flow_with_password_method.py +0 -294
  527. ory_client/model/update_login_flow_with_totp_method.py +0 -284
  528. ory_client/model/update_login_flow_with_web_authn_method.py +0 -288
  529. ory_client/model/update_recovery_flow_body.py +0 -351
  530. ory_client/model/update_recovery_flow_with_code_method.py +0 -290
  531. ory_client/model/update_recovery_flow_with_link_method.py +0 -288
  532. ory_client/model/update_registration_flow_body.py +0 -389
  533. ory_client/model/update_registration_flow_with_code_method.py +0 -292
  534. ory_client/model/update_registration_flow_with_oidc_method.py +0 -300
  535. ory_client/model/update_registration_flow_with_password_method.py +0 -290
  536. ory_client/model/update_registration_flow_with_web_authn_method.py +0 -292
  537. ory_client/model/update_settings_flow_body.py +0 -419
  538. ory_client/model/update_settings_flow_with_lookup_method.py +0 -294
  539. ory_client/model/update_settings_flow_with_oidc_method.py +0 -294
  540. ory_client/model/update_settings_flow_with_password_method.py +0 -284
  541. ory_client/model/update_settings_flow_with_profile_method.py +0 -284
  542. ory_client/model/update_settings_flow_with_totp_method.py +0 -286
  543. ory_client/model/update_settings_flow_with_web_authn_method.py +0 -290
  544. ory_client/model/update_subscription_body.py +0 -284
  545. ory_client/model/update_verification_flow_body.py +0 -351
  546. ory_client/model/update_verification_flow_with_code_method.py +0 -290
  547. ory_client/model/update_verification_flow_with_link_method.py +0 -288
  548. ory_client/model/update_workspace_payload.py +0 -270
  549. ory_client/model/usage.py +0 -270
  550. ory_client/model/verifiable_credential_priming_response.py +0 -292
  551. ory_client/model/verifiable_credential_proof.py +0 -268
  552. ory_client/model/verifiable_credential_response.py +0 -268
  553. ory_client/model/verifiable_identity_address.py +0 -308
  554. ory_client/model/verification_flow.py +0 -318
  555. ory_client/model/verification_flow_state.py +0 -292
  556. ory_client/model/version.py +0 -264
  557. ory_client/model/warning.py +0 -268
  558. ory_client/model/workspace.py +0 -292
  559. ory_client/model/workspace_meta.py +0 -296
  560. ory_client/model/workspaces.py +0 -292
  561. ory_client/model_utils.py +0 -2059
  562. ory_client-1.9.0.dist-info/RECORD +0 -310
  563. {ory_client-1.9.0.dist-info → ory_client-1.11.7.dist-info}/LICENSE +0 -0
  564. {ory_client-1.9.0.dist-info → ory_client-1.11.7.dist-info}/WHEEL +0 -0
  565. {ory_client-1.9.0.dist-info → ory_client-1.11.7.dist-info}/top_level.txt +0 -0
ory_client/rest.py CHANGED
@@ -1,55 +1,69 @@
1
+ # coding: utf-8
2
+
1
3
  """
2
4
  Ory APIs
3
5
 
4
- Documentation for all public and administrative Ory APIs. Administrative APIs can only be accessed with a valid Personal Access Token. Public APIs are mostly used in browsers. # noqa: E501
6
+ Documentation for all public and administrative Ory APIs. Administrative APIs can only be accessed with a valid Personal Access Token. Public APIs are mostly used in browsers.
5
7
 
6
- The version of the OpenAPI document: v1.9.0
8
+ The version of the OpenAPI document: v1.11.7
7
9
  Contact: support@ory.sh
8
- Generated by: https://openapi-generator.tech
9
- """
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
13
+ """ # noqa: E501
10
14
 
11
15
 
12
16
  import io
13
17
  import json
14
- import logging
15
18
  import re
16
19
  import ssl
17
- from urllib.parse import urlencode
18
- from urllib.parse import urlparse
19
- from urllib.request import proxy_bypass_environment
20
+
20
21
  import urllib3
21
- import ipaddress
22
22
 
23
- from ory_client.exceptions import ApiException, UnauthorizedException, ForbiddenException, NotFoundException, ServiceException, ApiValueError
23
+ from ory_client.exceptions import ApiException, ApiValueError
24
24
 
25
+ SUPPORTED_SOCKS_PROXIES = {"socks5", "socks5h", "socks4", "socks4a"}
26
+ RESTResponseType = urllib3.HTTPResponse
25
27
 
26
- logger = logging.getLogger(__name__)
28
+
29
+ def is_socks_proxy_url(url):
30
+ if url is None:
31
+ return False
32
+ split_section = url.split("://")
33
+ if len(split_section) < 2:
34
+ return False
35
+ else:
36
+ return split_section[0].lower() in SUPPORTED_SOCKS_PROXIES
27
37
 
28
38
 
29
39
  class RESTResponse(io.IOBase):
30
40
 
31
- def __init__(self, resp):
32
- self.urllib3_response = resp
41
+ def __init__(self, resp) -> None:
42
+ self.response = resp
33
43
  self.status = resp.status
34
44
  self.reason = resp.reason
35
- self.data = resp.data
45
+ self.data = None
46
+
47
+ def read(self):
48
+ if self.data is None:
49
+ self.data = self.response.data
50
+ return self.data
36
51
 
37
52
  def getheaders(self):
38
53
  """Returns a dictionary of the response headers."""
39
- return self.urllib3_response.getheaders()
54
+ return self.response.headers
40
55
 
41
56
  def getheader(self, name, default=None):
42
57
  """Returns a given response header."""
43
- return self.urllib3_response.getheader(name, default)
58
+ return self.response.headers.get(name, default)
44
59
 
45
60
 
46
- class RESTClientObject(object):
61
+ class RESTClientObject:
47
62
 
48
- def __init__(self, configuration, pools_size=4, maxsize=None):
63
+ def __init__(self, configuration) -> None:
49
64
  # urllib3.PoolManager will pass all kw parameters to connectionpool
50
65
  # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501
51
66
  # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501
52
- # maxsize is the number of requests to host that are allowed in parallel # noqa: E501
53
67
  # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501
54
68
 
55
69
  # cert_reqs
@@ -58,71 +72,79 @@ class RESTClientObject(object):
58
72
  else:
59
73
  cert_reqs = ssl.CERT_NONE
60
74
 
61
- addition_pool_args = {}
75
+ pool_args = {
76
+ "cert_reqs": cert_reqs,
77
+ "ca_certs": configuration.ssl_ca_cert,
78
+ "cert_file": configuration.cert_file,
79
+ "key_file": configuration.key_file,
80
+ }
62
81
  if configuration.assert_hostname is not None:
63
- addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501
82
+ pool_args['assert_hostname'] = (
83
+ configuration.assert_hostname
84
+ )
64
85
 
65
86
  if configuration.retries is not None:
66
- addition_pool_args['retries'] = configuration.retries
87
+ pool_args['retries'] = configuration.retries
88
+
89
+ if configuration.tls_server_name:
90
+ pool_args['server_hostname'] = configuration.tls_server_name
91
+
67
92
 
68
93
  if configuration.socket_options is not None:
69
- addition_pool_args['socket_options'] = configuration.socket_options
94
+ pool_args['socket_options'] = configuration.socket_options
70
95
 
71
- if maxsize is None:
72
- if configuration.connection_pool_maxsize is not None:
73
- maxsize = configuration.connection_pool_maxsize
74
- else:
75
- maxsize = 4
96
+ if configuration.connection_pool_maxsize is not None:
97
+ pool_args['maxsize'] = configuration.connection_pool_maxsize
76
98
 
77
99
  # https pool manager
78
- if configuration.proxy and not should_bypass_proxies(
79
- configuration.host, no_proxy=configuration.no_proxy or ''):
80
- self.pool_manager = urllib3.ProxyManager(
81
- num_pools=pools_size,
82
- maxsize=maxsize,
83
- cert_reqs=cert_reqs,
84
- ca_certs=configuration.ssl_ca_cert,
85
- cert_file=configuration.cert_file,
86
- key_file=configuration.key_file,
87
- proxy_url=configuration.proxy,
88
- proxy_headers=configuration.proxy_headers,
89
- **addition_pool_args
90
- )
100
+ self.pool_manager: urllib3.PoolManager
101
+
102
+ if configuration.proxy:
103
+ if is_socks_proxy_url(configuration.proxy):
104
+ from urllib3.contrib.socks import SOCKSProxyManager
105
+ pool_args["proxy_url"] = configuration.proxy
106
+ pool_args["headers"] = configuration.proxy_headers
107
+ self.pool_manager = SOCKSProxyManager(**pool_args)
108
+ else:
109
+ pool_args["proxy_url"] = configuration.proxy
110
+ pool_args["proxy_headers"] = configuration.proxy_headers
111
+ self.pool_manager = urllib3.ProxyManager(**pool_args)
91
112
  else:
92
- self.pool_manager = urllib3.PoolManager(
93
- num_pools=pools_size,
94
- maxsize=maxsize,
95
- cert_reqs=cert_reqs,
96
- ca_certs=configuration.ssl_ca_cert,
97
- cert_file=configuration.cert_file,
98
- key_file=configuration.key_file,
99
- **addition_pool_args
100
- )
101
-
102
- def request(self, method, url, query_params=None, headers=None,
103
- body=None, post_params=None, _preload_content=True,
104
- _request_timeout=None):
113
+ self.pool_manager = urllib3.PoolManager(**pool_args)
114
+
115
+ def request(
116
+ self,
117
+ method,
118
+ url,
119
+ headers=None,
120
+ body=None,
121
+ post_params=None,
122
+ _request_timeout=None
123
+ ):
105
124
  """Perform requests.
106
125
 
107
126
  :param method: http request method
108
127
  :param url: http request url
109
- :param query_params: query parameters in the url
110
128
  :param headers: http request headers
111
129
  :param body: request json body, for `application/json`
112
130
  :param post_params: request post parameters,
113
131
  `application/x-www-form-urlencoded`
114
132
  and `multipart/form-data`
115
- :param _preload_content: if False, the urllib3.HTTPResponse object will
116
- be returned without reading/decoding response
117
- data. Default is True.
118
133
  :param _request_timeout: timeout setting for this request. If one
119
134
  number provided, it will be total request
120
135
  timeout. It can also be a pair (tuple) of
121
136
  (connection, read) timeouts.
122
137
  """
123
138
  method = method.upper()
124
- assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT',
125
- 'PATCH', 'OPTIONS']
139
+ assert method in [
140
+ 'GET',
141
+ 'HEAD',
142
+ 'DELETE',
143
+ 'POST',
144
+ 'PUT',
145
+ 'PATCH',
146
+ 'OPTIONS'
147
+ ]
126
148
 
127
149
  if post_params and body:
128
150
  raise ApiValueError(
@@ -134,61 +156,81 @@ class RESTClientObject(object):
134
156
 
135
157
  timeout = None
136
158
  if _request_timeout:
137
- if isinstance(_request_timeout, (int, float)): # noqa: E501,F821
159
+ if isinstance(_request_timeout, (int, float)):
138
160
  timeout = urllib3.Timeout(total=_request_timeout)
139
- elif (isinstance(_request_timeout, tuple) and
140
- len(_request_timeout) == 2):
161
+ elif (
162
+ isinstance(_request_timeout, tuple)
163
+ and len(_request_timeout) == 2
164
+ ):
141
165
  timeout = urllib3.Timeout(
142
- connect=_request_timeout[0], read=_request_timeout[1])
166
+ connect=_request_timeout[0],
167
+ read=_request_timeout[1]
168
+ )
143
169
 
144
170
  try:
145
171
  # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE`
146
172
  if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']:
147
- # Only set a default Content-Type for POST, PUT, PATCH and OPTIONS requests
148
- if (method != 'DELETE') and ('Content-Type' not in headers):
149
- headers['Content-Type'] = 'application/json'
150
- if query_params:
151
- url += '?' + urlencode(query_params)
152
- if ('Content-Type' not in headers) or (re.search('json',
153
- headers['Content-Type'], re.IGNORECASE)):
173
+
174
+ # no content type provided or payload is json
175
+ content_type = headers.get('Content-Type')
176
+ if (
177
+ not content_type
178
+ or re.search('json', content_type, re.IGNORECASE)
179
+ ):
154
180
  request_body = None
155
181
  if body is not None:
156
182
  request_body = json.dumps(body)
157
183
  r = self.pool_manager.request(
158
- method, url,
184
+ method,
185
+ url,
159
186
  body=request_body,
160
- preload_content=_preload_content,
161
187
  timeout=timeout,
162
- headers=headers)
163
- elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501
188
+ headers=headers,
189
+ preload_content=False
190
+ )
191
+ elif content_type == 'application/x-www-form-urlencoded':
164
192
  r = self.pool_manager.request(
165
- method, url,
193
+ method,
194
+ url,
166
195
  fields=post_params,
167
196
  encode_multipart=False,
168
- preload_content=_preload_content,
169
197
  timeout=timeout,
170
- headers=headers)
171
- elif headers['Content-Type'] == 'multipart/form-data':
198
+ headers=headers,
199
+ preload_content=False
200
+ )
201
+ elif content_type == 'multipart/form-data':
172
202
  # must del headers['Content-Type'], or the correct
173
203
  # Content-Type which generated by urllib3 will be
174
204
  # overwritten.
175
205
  del headers['Content-Type']
176
206
  r = self.pool_manager.request(
177
- method, url,
207
+ method,
208
+ url,
178
209
  fields=post_params,
179
210
  encode_multipart=True,
180
- preload_content=_preload_content,
181
211
  timeout=timeout,
182
- headers=headers)
212
+ headers=headers,
213
+ preload_content=False
214
+ )
183
215
  # Pass a `string` parameter directly in the body to support
184
- # other content types than Json when `body` argument is
185
- # provided in serialized form
216
+ # other content types than JSON when `body` argument is
217
+ # provided in serialized form.
186
218
  elif isinstance(body, str) or isinstance(body, bytes):
187
- request_body = body
188
219
  r = self.pool_manager.request(
189
- method, url,
220
+ method,
221
+ url,
222
+ body=body,
223
+ timeout=timeout,
224
+ headers=headers,
225
+ preload_content=False
226
+ )
227
+ elif headers['Content-Type'] == 'text/plain' and isinstance(body, bool):
228
+ request_body = "true" if body else "false"
229
+ r = self.pool_manager.request(
230
+ method,
231
+ url,
190
232
  body=request_body,
191
- preload_content=_preload_content,
233
+ preload_content=False,
192
234
  timeout=timeout,
193
235
  headers=headers)
194
236
  else:
@@ -199,155 +241,16 @@ class RESTClientObject(object):
199
241
  raise ApiException(status=0, reason=msg)
200
242
  # For `GET`, `HEAD`
201
243
  else:
202
- r = self.pool_manager.request(method, url,
203
- fields=query_params,
204
- preload_content=_preload_content,
205
- timeout=timeout,
206
- headers=headers)
244
+ r = self.pool_manager.request(
245
+ method,
246
+ url,
247
+ fields={},
248
+ timeout=timeout,
249
+ headers=headers,
250
+ preload_content=False
251
+ )
207
252
  except urllib3.exceptions.SSLError as e:
208
- msg = "{0}\n{1}".format(type(e).__name__, str(e))
253
+ msg = "\n".join([type(e).__name__, str(e)])
209
254
  raise ApiException(status=0, reason=msg)
210
255
 
211
- if _preload_content:
212
- r = RESTResponse(r)
213
-
214
- # log response body
215
- logger.debug("response body: %s", r.data)
216
-
217
- if not 200 <= r.status <= 299:
218
- if r.status == 401:
219
- raise UnauthorizedException(http_resp=r)
220
-
221
- if r.status == 403:
222
- raise ForbiddenException(http_resp=r)
223
-
224
- if r.status == 404:
225
- raise NotFoundException(http_resp=r)
226
-
227
- if 500 <= r.status <= 599:
228
- raise ServiceException(http_resp=r)
229
-
230
- raise ApiException(http_resp=r)
231
-
232
- return r
233
-
234
- def GET(self, url, headers=None, query_params=None, _preload_content=True,
235
- _request_timeout=None):
236
- return self.request("GET", url,
237
- headers=headers,
238
- _preload_content=_preload_content,
239
- _request_timeout=_request_timeout,
240
- query_params=query_params)
241
-
242
- def HEAD(self, url, headers=None, query_params=None, _preload_content=True,
243
- _request_timeout=None):
244
- return self.request("HEAD", url,
245
- headers=headers,
246
- _preload_content=_preload_content,
247
- _request_timeout=_request_timeout,
248
- query_params=query_params)
249
-
250
- def OPTIONS(self, url, headers=None, query_params=None, post_params=None,
251
- body=None, _preload_content=True, _request_timeout=None):
252
- return self.request("OPTIONS", url,
253
- headers=headers,
254
- query_params=query_params,
255
- post_params=post_params,
256
- _preload_content=_preload_content,
257
- _request_timeout=_request_timeout,
258
- body=body)
259
-
260
- def DELETE(self, url, headers=None, query_params=None, body=None,
261
- _preload_content=True, _request_timeout=None):
262
- return self.request("DELETE", url,
263
- headers=headers,
264
- query_params=query_params,
265
- _preload_content=_preload_content,
266
- _request_timeout=_request_timeout,
267
- body=body)
268
-
269
- def POST(self, url, headers=None, query_params=None, post_params=None,
270
- body=None, _preload_content=True, _request_timeout=None):
271
- return self.request("POST", url,
272
- headers=headers,
273
- query_params=query_params,
274
- post_params=post_params,
275
- _preload_content=_preload_content,
276
- _request_timeout=_request_timeout,
277
- body=body)
278
-
279
- def PUT(self, url, headers=None, query_params=None, post_params=None,
280
- body=None, _preload_content=True, _request_timeout=None):
281
- return self.request("PUT", url,
282
- headers=headers,
283
- query_params=query_params,
284
- post_params=post_params,
285
- _preload_content=_preload_content,
286
- _request_timeout=_request_timeout,
287
- body=body)
288
-
289
- def PATCH(self, url, headers=None, query_params=None, post_params=None,
290
- body=None, _preload_content=True, _request_timeout=None):
291
- return self.request("PATCH", url,
292
- headers=headers,
293
- query_params=query_params,
294
- post_params=post_params,
295
- _preload_content=_preload_content,
296
- _request_timeout=_request_timeout,
297
- body=body)
298
-
299
- # end of class RESTClientObject
300
-
301
-
302
- def is_ipv4(target):
303
- """ Test if IPv4 address or not
304
- """
305
- try:
306
- chk = ipaddress.IPv4Address(target)
307
- return True
308
- except ipaddress.AddressValueError:
309
- return False
310
-
311
-
312
- def in_ipv4net(target, net):
313
- """ Test if target belongs to given IPv4 network
314
- """
315
- try:
316
- nw = ipaddress.IPv4Network(net)
317
- ip = ipaddress.IPv4Address(target)
318
- if ip in nw:
319
- return True
320
- return False
321
- except ipaddress.AddressValueError:
322
- return False
323
- except ipaddress.NetmaskValueError:
324
- return False
325
-
326
-
327
- def should_bypass_proxies(url, no_proxy=None):
328
- """ Yet another requests.should_bypass_proxies
329
- Test if proxies should not be used for a particular url.
330
- """
331
-
332
- parsed = urlparse(url)
333
-
334
- # special cases
335
- if parsed.hostname in [None, '']:
336
- return True
337
-
338
- # special cases
339
- if no_proxy in [None, '']:
340
- return False
341
- if no_proxy == '*':
342
- return True
343
-
344
- no_proxy = no_proxy.lower().replace(' ', '');
345
- entries = (
346
- host for host in no_proxy.split(',') if host
347
- )
348
-
349
- if is_ipv4(parsed.hostname):
350
- for item in entries:
351
- if in_ipv4net(parsed.hostname, item):
352
- return True
353
- return proxy_bypass_environment(parsed.hostname, {'no': no_proxy})
256
+ return RESTResponse(r)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ory-client
3
- Version: 1.9.0
3
+ Version: 1.11.7
4
4
  Summary: Ory APIs
5
5
  Home-page: https://github.com/ory/sdk
6
6
  Author: API Support
@@ -8,10 +8,12 @@ Author-email: support@ory.sh
8
8
  License: Apache 2.0
9
9
  Keywords: OpenAPI,OpenAPI-Generator,Ory APIs
10
10
  Platform: UNKNOWN
11
- Requires-Python: >=3.6
11
+ Description-Content-Type: text/markdown
12
+ Requires-Dist: pydantic (>=2)
12
13
  Requires-Dist: python-dateutil
13
- Requires-Dist: urllib3 (>=1.25.3)
14
+ Requires-Dist: typing-extensions (>=4.7.1)
15
+ Requires-Dist: urllib3 (<2.1.0,>=1.25.3)
14
16
 
15
- Documentation for all public and administrative Ory APIs. Administrative APIs can only be accessed with a valid Personal Access Token. Public APIs are mostly used in browsers. # noqa: E501
17
+ Documentation for all public and administrative Ory APIs. Administrative APIs can only be accessed with a valid Personal Access Token. Public APIs are mostly used in browsers.
16
18
 
17
19