ory-client 1.8.1__py3-none-any.whl → 1.11.6__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.8.1.dist-info → ory_client-1.11.6.dist-info}/METADATA +6 -4
  275. ory_client-1.11.6.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 -1115
  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 -1101
  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 -312
  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 -326
  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.8.1.dist-info/RECORD +0 -310
  563. {ory_client-1.8.1.dist-info → ory_client-1.11.6.dist-info}/LICENSE +0 -0
  564. {ory_client-1.8.1.dist-info → ory_client-1.11.6.dist-info}/WHEEL +0 -0
  565. {ory_client-1.8.1.dist-info → ory_client-1.11.6.dist-info}/top_level.txt +0 -0
@@ -1,813 +1,1712 @@
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.8.1
8
+ The version of the OpenAPI document: v1.11.6
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
 
15
+ import warnings
16
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
17
+ from typing import Any, Dict, List, Optional, Tuple, Union
18
+ from typing_extensions import Annotated
11
19
 
12
- import re # noqa: F401
13
- import sys # noqa: F401
20
+ from pydantic import Field, StrictInt, StrictStr
21
+ from typing import Optional
22
+ from typing_extensions import Annotated
23
+ from ory_client.models.check_permission_result import CheckPermissionResult
24
+ from ory_client.models.expanded_permission_tree import ExpandedPermissionTree
25
+ from ory_client.models.post_check_permission_body import PostCheckPermissionBody
26
+ from ory_client.models.post_check_permission_or_error_body import PostCheckPermissionOrErrorBody
14
27
 
15
- from ory_client.api_client import ApiClient, Endpoint as _Endpoint
16
- from ory_client.model_utils import ( # noqa: F401
17
- check_allowed_values,
18
- check_validations,
19
- date,
20
- datetime,
21
- file_type,
22
- none_type,
23
- validate_and_convert_types
24
- )
25
- from ory_client.model.check_permission_result import CheckPermissionResult
26
- from ory_client.model.error_generic import ErrorGeneric
27
- from ory_client.model.expanded_permission_tree import ExpandedPermissionTree
28
- from ory_client.model.post_check_permission_body import PostCheckPermissionBody
29
- from ory_client.model.post_check_permission_or_error_body import PostCheckPermissionOrErrorBody
28
+ from ory_client.api_client import ApiClient, RequestSerialized
29
+ from ory_client.api_response import ApiResponse
30
+ from ory_client.rest import RESTResponseType
30
31
 
31
32
 
32
- class PermissionApi(object):
33
+ class PermissionApi:
33
34
  """NOTE: This class is auto generated by OpenAPI Generator
34
35
  Ref: https://openapi-generator.tech
35
36
 
36
37
  Do not edit the class manually.
37
38
  """
38
39
 
39
- def __init__(self, api_client=None):
40
+ def __init__(self, api_client=None) -> None:
40
41
  if api_client is None:
41
- api_client = ApiClient()
42
+ api_client = ApiClient.get_default()
42
43
  self.api_client = api_client
43
- self.check_permission_endpoint = _Endpoint(
44
- settings={
45
- 'response_type': (CheckPermissionResult,),
46
- 'auth': [
47
- 'oryAccessToken'
48
- ],
49
- 'endpoint_path': '/relation-tuples/check/openapi',
50
- 'operation_id': 'check_permission',
51
- 'http_method': 'GET',
52
- 'servers': None,
53
- },
54
- params_map={
55
- 'all': [
56
- 'namespace',
57
- 'object',
58
- 'relation',
59
- 'subject_id',
60
- 'subject_set_namespace',
61
- 'subject_set_object',
62
- 'subject_set_relation',
63
- 'max_depth',
64
- ],
65
- 'required': [],
66
- 'nullable': [
67
- ],
68
- 'enum': [
69
- ],
70
- 'validation': [
71
- ]
72
- },
73
- root_map={
74
- 'validations': {
75
- },
76
- 'allowed_values': {
77
- },
78
- 'openapi_types': {
79
- 'namespace':
80
- (str,),
81
- 'object':
82
- (str,),
83
- 'relation':
84
- (str,),
85
- 'subject_id':
86
- (str,),
87
- 'subject_set_namespace':
88
- (str,),
89
- 'subject_set_object':
90
- (str,),
91
- 'subject_set_relation':
92
- (str,),
93
- 'max_depth':
94
- (int,),
95
- },
96
- 'attribute_map': {
97
- 'namespace': 'namespace',
98
- 'object': 'object',
99
- 'relation': 'relation',
100
- 'subject_id': 'subject_id',
101
- 'subject_set_namespace': 'subject_set.namespace',
102
- 'subject_set_object': 'subject_set.object',
103
- 'subject_set_relation': 'subject_set.relation',
104
- 'max_depth': 'max-depth',
105
- },
106
- 'location_map': {
107
- 'namespace': 'query',
108
- 'object': 'query',
109
- 'relation': 'query',
110
- 'subject_id': 'query',
111
- 'subject_set_namespace': 'query',
112
- 'subject_set_object': 'query',
113
- 'subject_set_relation': 'query',
114
- 'max_depth': 'query',
115
- },
116
- 'collection_format_map': {
117
- }
118
- },
119
- headers_map={
120
- 'accept': [
121
- 'application/json'
122
- ],
123
- 'content_type': [],
124
- },
125
- api_client=api_client
126
- )
127
- self.check_permission_or_error_endpoint = _Endpoint(
128
- settings={
129
- 'response_type': (CheckPermissionResult,),
130
- 'auth': [
131
- 'oryAccessToken'
132
- ],
133
- 'endpoint_path': '/relation-tuples/check',
134
- 'operation_id': 'check_permission_or_error',
135
- 'http_method': 'GET',
136
- 'servers': None,
137
- },
138
- params_map={
139
- 'all': [
140
- 'namespace',
141
- 'object',
142
- 'relation',
143
- 'subject_id',
144
- 'subject_set_namespace',
145
- 'subject_set_object',
146
- 'subject_set_relation',
147
- 'max_depth',
148
- ],
149
- 'required': [],
150
- 'nullable': [
151
- ],
152
- 'enum': [
153
- ],
154
- 'validation': [
155
- ]
156
- },
157
- root_map={
158
- 'validations': {
159
- },
160
- 'allowed_values': {
161
- },
162
- 'openapi_types': {
163
- 'namespace':
164
- (str,),
165
- 'object':
166
- (str,),
167
- 'relation':
168
- (str,),
169
- 'subject_id':
170
- (str,),
171
- 'subject_set_namespace':
172
- (str,),
173
- 'subject_set_object':
174
- (str,),
175
- 'subject_set_relation':
176
- (str,),
177
- 'max_depth':
178
- (int,),
179
- },
180
- 'attribute_map': {
181
- 'namespace': 'namespace',
182
- 'object': 'object',
183
- 'relation': 'relation',
184
- 'subject_id': 'subject_id',
185
- 'subject_set_namespace': 'subject_set.namespace',
186
- 'subject_set_object': 'subject_set.object',
187
- 'subject_set_relation': 'subject_set.relation',
188
- 'max_depth': 'max-depth',
189
- },
190
- 'location_map': {
191
- 'namespace': 'query',
192
- 'object': 'query',
193
- 'relation': 'query',
194
- 'subject_id': 'query',
195
- 'subject_set_namespace': 'query',
196
- 'subject_set_object': 'query',
197
- 'subject_set_relation': 'query',
198
- 'max_depth': 'query',
199
- },
200
- 'collection_format_map': {
201
- }
202
- },
203
- headers_map={
204
- 'accept': [
205
- 'application/json'
206
- ],
207
- 'content_type': [],
208
- },
209
- api_client=api_client
210
- )
211
- self.expand_permissions_endpoint = _Endpoint(
212
- settings={
213
- 'response_type': (ExpandedPermissionTree,),
214
- 'auth': [
215
- 'oryAccessToken'
216
- ],
217
- 'endpoint_path': '/relation-tuples/expand',
218
- 'operation_id': 'expand_permissions',
219
- 'http_method': 'GET',
220
- 'servers': None,
221
- },
222
- params_map={
223
- 'all': [
224
- 'namespace',
225
- 'object',
226
- 'relation',
227
- 'max_depth',
228
- ],
229
- 'required': [
230
- 'namespace',
231
- 'object',
232
- 'relation',
233
- ],
234
- 'nullable': [
235
- ],
236
- 'enum': [
237
- ],
238
- 'validation': [
239
- ]
240
- },
241
- root_map={
242
- 'validations': {
243
- },
244
- 'allowed_values': {
245
- },
246
- 'openapi_types': {
247
- 'namespace':
248
- (str,),
249
- 'object':
250
- (str,),
251
- 'relation':
252
- (str,),
253
- 'max_depth':
254
- (int,),
255
- },
256
- 'attribute_map': {
257
- 'namespace': 'namespace',
258
- 'object': 'object',
259
- 'relation': 'relation',
260
- 'max_depth': 'max-depth',
261
- },
262
- 'location_map': {
263
- 'namespace': 'query',
264
- 'object': 'query',
265
- 'relation': 'query',
266
- 'max_depth': 'query',
267
- },
268
- 'collection_format_map': {
269
- }
270
- },
271
- headers_map={
272
- 'accept': [
273
- 'application/json'
274
- ],
275
- 'content_type': [],
276
- },
277
- api_client=api_client
278
- )
279
- self.post_check_permission_endpoint = _Endpoint(
280
- settings={
281
- 'response_type': (CheckPermissionResult,),
282
- 'auth': [
283
- 'oryAccessToken'
284
- ],
285
- 'endpoint_path': '/relation-tuples/check/openapi',
286
- 'operation_id': 'post_check_permission',
287
- 'http_method': 'POST',
288
- 'servers': None,
289
- },
290
- params_map={
291
- 'all': [
292
- 'max_depth',
293
- 'post_check_permission_body',
294
- ],
295
- 'required': [],
296
- 'nullable': [
297
- ],
298
- 'enum': [
299
- ],
300
- 'validation': [
301
- ]
302
- },
303
- root_map={
304
- 'validations': {
305
- },
306
- 'allowed_values': {
307
- },
308
- 'openapi_types': {
309
- 'max_depth':
310
- (int,),
311
- 'post_check_permission_body':
312
- (PostCheckPermissionBody,),
313
- },
314
- 'attribute_map': {
315
- 'max_depth': 'max-depth',
316
- },
317
- 'location_map': {
318
- 'max_depth': 'query',
319
- 'post_check_permission_body': 'body',
320
- },
321
- 'collection_format_map': {
322
- }
323
- },
324
- headers_map={
325
- 'accept': [
326
- 'application/json'
327
- ],
328
- 'content_type': [
329
- 'application/json'
330
- ]
331
- },
332
- api_client=api_client
333
- )
334
- self.post_check_permission_or_error_endpoint = _Endpoint(
335
- settings={
336
- 'response_type': (CheckPermissionResult,),
337
- 'auth': [
338
- 'oryAccessToken'
339
- ],
340
- 'endpoint_path': '/relation-tuples/check',
341
- 'operation_id': 'post_check_permission_or_error',
342
- 'http_method': 'POST',
343
- 'servers': None,
344
- },
345
- params_map={
346
- 'all': [
347
- 'max_depth',
348
- 'post_check_permission_or_error_body',
349
- ],
350
- 'required': [],
351
- 'nullable': [
352
- ],
353
- 'enum': [
354
- ],
355
- 'validation': [
356
- ]
357
- },
358
- root_map={
359
- 'validations': {
360
- },
361
- 'allowed_values': {
362
- },
363
- 'openapi_types': {
364
- 'max_depth':
365
- (int,),
366
- 'post_check_permission_or_error_body':
367
- (PostCheckPermissionOrErrorBody,),
368
- },
369
- 'attribute_map': {
370
- 'max_depth': 'max-depth',
371
- },
372
- 'location_map': {
373
- 'max_depth': 'query',
374
- 'post_check_permission_or_error_body': 'body',
375
- },
376
- 'collection_format_map': {
377
- }
378
- },
379
- headers_map={
380
- 'accept': [
381
- 'application/json'
382
- ],
383
- 'content_type': [
384
- 'application/json'
385
- ]
386
- },
387
- api_client=api_client
388
- )
389
44
 
45
+
46
+ @validate_call
390
47
  def check_permission(
391
48
  self,
392
- **kwargs
393
- ):
394
- """Check a permission # noqa: E501
395
-
396
- To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.sh/docs/keto/concepts/api-overview). # noqa: E501
397
- This method makes a synchronous HTTP request by default. To make an
398
- asynchronous HTTP request, please pass async_req=True
399
-
400
- >>> thread = api.check_permission(async_req=True)
401
- >>> result = thread.get()
402
-
403
-
404
- Keyword Args:
405
- namespace (str): Namespace of the Relationship. [optional]
406
- object (str): Object of the Relationship. [optional]
407
- relation (str): Relation of the Relationship. [optional]
408
- subject_id (str): SubjectID of the Relationship. [optional]
409
- subject_set_namespace (str): Namespace of the Subject Set. [optional]
410
- subject_set_object (str): Object of the Subject Set. [optional]
411
- subject_set_relation (str): Relation of the Subject Set. [optional]
412
- max_depth (int): [optional]
413
- _return_http_data_only (bool): response data without head status
414
- code and headers. Default is True.
415
- _preload_content (bool): if False, the urllib3.HTTPResponse object
416
- will be returned without reading/decoding response data.
417
- Default is True.
418
- _request_timeout (int/float/tuple): timeout setting for this request. If
419
- one number provided, it will be total request timeout. It can also
420
- be a pair (tuple) of (connection, read) timeouts.
421
- Default is None.
422
- _check_input_type (bool): specifies if type checking
423
- should be done one the data sent to the server.
424
- Default is True.
425
- _check_return_type (bool): specifies if type checking
426
- should be done one the data received from the server.
427
- Default is True.
428
- _spec_property_naming (bool): True if the variable names in the input data
429
- are serialized names, as specified in the OpenAPI document.
430
- False if the variable names in the input data
431
- are pythonic names, e.g. snake case (default)
432
- _content_type (str/None): force body content-type.
433
- Default is None and content-type will be predicted by allowed
434
- content-types and body.
435
- _host_index (int/None): specifies the index of the server
436
- that we want to use.
437
- Default is read from the configuration.
438
- _request_auths (list): set to override the auth_settings for an a single
439
- request; this effectively ignores the authentication
440
- in the spec for a single request.
441
- Default is None
442
- async_req (bool): execute request asynchronously
443
-
444
- Returns:
445
- CheckPermissionResult
446
- If the method is called asynchronously, returns the request
447
- thread.
448
- """
449
- kwargs['async_req'] = kwargs.get(
450
- 'async_req', False
451
- )
452
- kwargs['_return_http_data_only'] = kwargs.get(
453
- '_return_http_data_only', True
454
- )
455
- kwargs['_preload_content'] = kwargs.get(
456
- '_preload_content', True
457
- )
458
- kwargs['_request_timeout'] = kwargs.get(
459
- '_request_timeout', None
460
- )
461
- kwargs['_check_input_type'] = kwargs.get(
462
- '_check_input_type', True
463
- )
464
- kwargs['_check_return_type'] = kwargs.get(
465
- '_check_return_type', True
466
- )
467
- kwargs['_spec_property_naming'] = kwargs.get(
468
- '_spec_property_naming', False
469
- )
470
- kwargs['_content_type'] = kwargs.get(
471
- '_content_type')
472
- kwargs['_host_index'] = kwargs.get('_host_index')
473
- kwargs['_request_auths'] = kwargs.get('_request_auths', None)
474
- return self.check_permission_endpoint.call_with_http_info(**kwargs)
49
+ namespace: Annotated[Optional[StrictStr], Field(description="Namespace of the Relationship")] = None,
50
+ object: Annotated[Optional[StrictStr], Field(description="Object of the Relationship")] = None,
51
+ relation: Annotated[Optional[StrictStr], Field(description="Relation of the Relationship")] = None,
52
+ subject_id: Annotated[Optional[StrictStr], Field(description="SubjectID of the Relationship")] = None,
53
+ subject_set_namespace: Annotated[Optional[StrictStr], Field(description="Namespace of the Subject Set")] = None,
54
+ subject_set_object: Annotated[Optional[StrictStr], Field(description="Object of the Subject Set")] = None,
55
+ subject_set_relation: Annotated[Optional[StrictStr], Field(description="Relation of the Subject Set")] = None,
56
+ max_depth: Optional[StrictInt] = None,
57
+ _request_timeout: Union[
58
+ None,
59
+ Annotated[StrictFloat, Field(gt=0)],
60
+ Tuple[
61
+ Annotated[StrictFloat, Field(gt=0)],
62
+ Annotated[StrictFloat, Field(gt=0)]
63
+ ]
64
+ ] = None,
65
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
66
+ _content_type: Optional[StrictStr] = None,
67
+ _headers: Optional[Dict[StrictStr, Any]] = None,
68
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
69
+ ) -> CheckPermissionResult:
70
+ """Check a permission
71
+
72
+ To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.sh/docs/keto/concepts/api-overview).
73
+
74
+ :param namespace: Namespace of the Relationship
75
+ :type namespace: str
76
+ :param object: Object of the Relationship
77
+ :type object: str
78
+ :param relation: Relation of the Relationship
79
+ :type relation: str
80
+ :param subject_id: SubjectID of the Relationship
81
+ :type subject_id: str
82
+ :param subject_set_namespace: Namespace of the Subject Set
83
+ :type subject_set_namespace: str
84
+ :param subject_set_object: Object of the Subject Set
85
+ :type subject_set_object: str
86
+ :param subject_set_relation: Relation of the Subject Set
87
+ :type subject_set_relation: str
88
+ :param max_depth:
89
+ :type max_depth: int
90
+ :param _request_timeout: timeout setting for this request. If one
91
+ number provided, it will be total request
92
+ timeout. It can also be a pair (tuple) of
93
+ (connection, read) timeouts.
94
+ :type _request_timeout: int, tuple(int, int), optional
95
+ :param _request_auth: set to override the auth_settings for an a single
96
+ request; this effectively ignores the
97
+ authentication in the spec for a single request.
98
+ :type _request_auth: dict, optional
99
+ :param _content_type: force content-type for the request.
100
+ :type _content_type: str, Optional
101
+ :param _headers: set to override the headers for a single
102
+ request; this effectively ignores the headers
103
+ in the spec for a single request.
104
+ :type _headers: dict, optional
105
+ :param _host_index: set to override the host_index for a single
106
+ request; this effectively ignores the host_index
107
+ in the spec for a single request.
108
+ :type _host_index: int, optional
109
+ :return: Returns the result object.
110
+ """ # noqa: E501
111
+
112
+ _param = self._check_permission_serialize(
113
+ namespace=namespace,
114
+ object=object,
115
+ relation=relation,
116
+ subject_id=subject_id,
117
+ subject_set_namespace=subject_set_namespace,
118
+ subject_set_object=subject_set_object,
119
+ subject_set_relation=subject_set_relation,
120
+ max_depth=max_depth,
121
+ _request_auth=_request_auth,
122
+ _content_type=_content_type,
123
+ _headers=_headers,
124
+ _host_index=_host_index
125
+ )
126
+
127
+ _response_types_map: Dict[str, Optional[str]] = {
128
+ '200': "CheckPermissionResult",
129
+ '400': "ErrorGeneric",
130
+ }
131
+ response_data = self.api_client.call_api(
132
+ *_param,
133
+ _request_timeout=_request_timeout
134
+ )
135
+ response_data.read()
136
+ return self.api_client.response_deserialize(
137
+ response_data=response_data,
138
+ response_types_map=_response_types_map,
139
+ ).data
140
+
141
+
142
+ @validate_call
143
+ def check_permission_with_http_info(
144
+ self,
145
+ namespace: Annotated[Optional[StrictStr], Field(description="Namespace of the Relationship")] = None,
146
+ object: Annotated[Optional[StrictStr], Field(description="Object of the Relationship")] = None,
147
+ relation: Annotated[Optional[StrictStr], Field(description="Relation of the Relationship")] = None,
148
+ subject_id: Annotated[Optional[StrictStr], Field(description="SubjectID of the Relationship")] = None,
149
+ subject_set_namespace: Annotated[Optional[StrictStr], Field(description="Namespace of the Subject Set")] = None,
150
+ subject_set_object: Annotated[Optional[StrictStr], Field(description="Object of the Subject Set")] = None,
151
+ subject_set_relation: Annotated[Optional[StrictStr], Field(description="Relation of the Subject Set")] = None,
152
+ max_depth: Optional[StrictInt] = None,
153
+ _request_timeout: Union[
154
+ None,
155
+ Annotated[StrictFloat, Field(gt=0)],
156
+ Tuple[
157
+ Annotated[StrictFloat, Field(gt=0)],
158
+ Annotated[StrictFloat, Field(gt=0)]
159
+ ]
160
+ ] = None,
161
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
162
+ _content_type: Optional[StrictStr] = None,
163
+ _headers: Optional[Dict[StrictStr, Any]] = None,
164
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
165
+ ) -> ApiResponse[CheckPermissionResult]:
166
+ """Check a permission
167
+
168
+ To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.sh/docs/keto/concepts/api-overview).
169
+
170
+ :param namespace: Namespace of the Relationship
171
+ :type namespace: str
172
+ :param object: Object of the Relationship
173
+ :type object: str
174
+ :param relation: Relation of the Relationship
175
+ :type relation: str
176
+ :param subject_id: SubjectID of the Relationship
177
+ :type subject_id: str
178
+ :param subject_set_namespace: Namespace of the Subject Set
179
+ :type subject_set_namespace: str
180
+ :param subject_set_object: Object of the Subject Set
181
+ :type subject_set_object: str
182
+ :param subject_set_relation: Relation of the Subject Set
183
+ :type subject_set_relation: str
184
+ :param max_depth:
185
+ :type max_depth: int
186
+ :param _request_timeout: timeout setting for this request. If one
187
+ number provided, it will be total request
188
+ timeout. It can also be a pair (tuple) of
189
+ (connection, read) timeouts.
190
+ :type _request_timeout: int, tuple(int, int), optional
191
+ :param _request_auth: set to override the auth_settings for an a single
192
+ request; this effectively ignores the
193
+ authentication in the spec for a single request.
194
+ :type _request_auth: dict, optional
195
+ :param _content_type: force content-type for the request.
196
+ :type _content_type: str, Optional
197
+ :param _headers: set to override the headers for a single
198
+ request; this effectively ignores the headers
199
+ in the spec for a single request.
200
+ :type _headers: dict, optional
201
+ :param _host_index: set to override the host_index for a single
202
+ request; this effectively ignores the host_index
203
+ in the spec for a single request.
204
+ :type _host_index: int, optional
205
+ :return: Returns the result object.
206
+ """ # noqa: E501
207
+
208
+ _param = self._check_permission_serialize(
209
+ namespace=namespace,
210
+ object=object,
211
+ relation=relation,
212
+ subject_id=subject_id,
213
+ subject_set_namespace=subject_set_namespace,
214
+ subject_set_object=subject_set_object,
215
+ subject_set_relation=subject_set_relation,
216
+ max_depth=max_depth,
217
+ _request_auth=_request_auth,
218
+ _content_type=_content_type,
219
+ _headers=_headers,
220
+ _host_index=_host_index
221
+ )
222
+
223
+ _response_types_map: Dict[str, Optional[str]] = {
224
+ '200': "CheckPermissionResult",
225
+ '400': "ErrorGeneric",
226
+ }
227
+ response_data = self.api_client.call_api(
228
+ *_param,
229
+ _request_timeout=_request_timeout
230
+ )
231
+ response_data.read()
232
+ return self.api_client.response_deserialize(
233
+ response_data=response_data,
234
+ response_types_map=_response_types_map,
235
+ )
236
+
237
+
238
+ @validate_call
239
+ def check_permission_without_preload_content(
240
+ self,
241
+ namespace: Annotated[Optional[StrictStr], Field(description="Namespace of the Relationship")] = None,
242
+ object: Annotated[Optional[StrictStr], Field(description="Object of the Relationship")] = None,
243
+ relation: Annotated[Optional[StrictStr], Field(description="Relation of the Relationship")] = None,
244
+ subject_id: Annotated[Optional[StrictStr], Field(description="SubjectID of the Relationship")] = None,
245
+ subject_set_namespace: Annotated[Optional[StrictStr], Field(description="Namespace of the Subject Set")] = None,
246
+ subject_set_object: Annotated[Optional[StrictStr], Field(description="Object of the Subject Set")] = None,
247
+ subject_set_relation: Annotated[Optional[StrictStr], Field(description="Relation of the Subject Set")] = None,
248
+ max_depth: Optional[StrictInt] = None,
249
+ _request_timeout: Union[
250
+ None,
251
+ Annotated[StrictFloat, Field(gt=0)],
252
+ Tuple[
253
+ Annotated[StrictFloat, Field(gt=0)],
254
+ Annotated[StrictFloat, Field(gt=0)]
255
+ ]
256
+ ] = None,
257
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
258
+ _content_type: Optional[StrictStr] = None,
259
+ _headers: Optional[Dict[StrictStr, Any]] = None,
260
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
261
+ ) -> RESTResponseType:
262
+ """Check a permission
475
263
 
264
+ To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.sh/docs/keto/concepts/api-overview).
265
+
266
+ :param namespace: Namespace of the Relationship
267
+ :type namespace: str
268
+ :param object: Object of the Relationship
269
+ :type object: str
270
+ :param relation: Relation of the Relationship
271
+ :type relation: str
272
+ :param subject_id: SubjectID of the Relationship
273
+ :type subject_id: str
274
+ :param subject_set_namespace: Namespace of the Subject Set
275
+ :type subject_set_namespace: str
276
+ :param subject_set_object: Object of the Subject Set
277
+ :type subject_set_object: str
278
+ :param subject_set_relation: Relation of the Subject Set
279
+ :type subject_set_relation: str
280
+ :param max_depth:
281
+ :type max_depth: int
282
+ :param _request_timeout: timeout setting for this request. If one
283
+ number provided, it will be total request
284
+ timeout. It can also be a pair (tuple) of
285
+ (connection, read) timeouts.
286
+ :type _request_timeout: int, tuple(int, int), optional
287
+ :param _request_auth: set to override the auth_settings for an a single
288
+ request; this effectively ignores the
289
+ authentication in the spec for a single request.
290
+ :type _request_auth: dict, optional
291
+ :param _content_type: force content-type for the request.
292
+ :type _content_type: str, Optional
293
+ :param _headers: set to override the headers for a single
294
+ request; this effectively ignores the headers
295
+ in the spec for a single request.
296
+ :type _headers: dict, optional
297
+ :param _host_index: set to override the host_index for a single
298
+ request; this effectively ignores the host_index
299
+ in the spec for a single request.
300
+ :type _host_index: int, optional
301
+ :return: Returns the result object.
302
+ """ # noqa: E501
303
+
304
+ _param = self._check_permission_serialize(
305
+ namespace=namespace,
306
+ object=object,
307
+ relation=relation,
308
+ subject_id=subject_id,
309
+ subject_set_namespace=subject_set_namespace,
310
+ subject_set_object=subject_set_object,
311
+ subject_set_relation=subject_set_relation,
312
+ max_depth=max_depth,
313
+ _request_auth=_request_auth,
314
+ _content_type=_content_type,
315
+ _headers=_headers,
316
+ _host_index=_host_index
317
+ )
318
+
319
+ _response_types_map: Dict[str, Optional[str]] = {
320
+ '200': "CheckPermissionResult",
321
+ '400': "ErrorGeneric",
322
+ }
323
+ response_data = self.api_client.call_api(
324
+ *_param,
325
+ _request_timeout=_request_timeout
326
+ )
327
+ return response_data.response
328
+
329
+
330
+ def _check_permission_serialize(
331
+ self,
332
+ namespace,
333
+ object,
334
+ relation,
335
+ subject_id,
336
+ subject_set_namespace,
337
+ subject_set_object,
338
+ subject_set_relation,
339
+ max_depth,
340
+ _request_auth,
341
+ _content_type,
342
+ _headers,
343
+ _host_index,
344
+ ) -> RequestSerialized:
345
+
346
+ _host = None
347
+
348
+ _collection_formats: Dict[str, str] = {
349
+ }
350
+
351
+ _path_params: Dict[str, str] = {}
352
+ _query_params: List[Tuple[str, str]] = []
353
+ _header_params: Dict[str, Optional[str]] = _headers or {}
354
+ _form_params: List[Tuple[str, str]] = []
355
+ _files: Dict[str, str] = {}
356
+ _body_params: Optional[bytes] = None
357
+
358
+ # process the path parameters
359
+ # process the query parameters
360
+ if namespace is not None:
361
+
362
+ _query_params.append(('namespace', namespace))
363
+
364
+ if object is not None:
365
+
366
+ _query_params.append(('object', object))
367
+
368
+ if relation is not None:
369
+
370
+ _query_params.append(('relation', relation))
371
+
372
+ if subject_id is not None:
373
+
374
+ _query_params.append(('subject_id', subject_id))
375
+
376
+ if subject_set_namespace is not None:
377
+
378
+ _query_params.append(('subject_set.namespace', subject_set_namespace))
379
+
380
+ if subject_set_object is not None:
381
+
382
+ _query_params.append(('subject_set.object', subject_set_object))
383
+
384
+ if subject_set_relation is not None:
385
+
386
+ _query_params.append(('subject_set.relation', subject_set_relation))
387
+
388
+ if max_depth is not None:
389
+
390
+ _query_params.append(('max-depth', max_depth))
391
+
392
+ # process the header parameters
393
+ # process the form parameters
394
+ # process the body parameter
395
+
396
+
397
+ # set the HTTP header `Accept`
398
+ _header_params['Accept'] = self.api_client.select_header_accept(
399
+ [
400
+ 'application/json'
401
+ ]
402
+ )
403
+
404
+
405
+ # authentication setting
406
+ _auth_settings: List[str] = [
407
+ 'oryAccessToken'
408
+ ]
409
+
410
+ return self.api_client.param_serialize(
411
+ method='GET',
412
+ resource_path='/relation-tuples/check/openapi',
413
+ path_params=_path_params,
414
+ query_params=_query_params,
415
+ header_params=_header_params,
416
+ body=_body_params,
417
+ post_params=_form_params,
418
+ files=_files,
419
+ auth_settings=_auth_settings,
420
+ collection_formats=_collection_formats,
421
+ _host=_host,
422
+ _request_auth=_request_auth
423
+ )
424
+
425
+
426
+
427
+
428
+ @validate_call
476
429
  def check_permission_or_error(
477
430
  self,
478
- **kwargs
479
- ):
480
- """Check a permission # noqa: E501
481
-
482
- To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.sh/docs/keto/concepts/api-overview). # noqa: E501
483
- This method makes a synchronous HTTP request by default. To make an
484
- asynchronous HTTP request, please pass async_req=True
485
-
486
- >>> thread = api.check_permission_or_error(async_req=True)
487
- >>> result = thread.get()
488
-
489
-
490
- Keyword Args:
491
- namespace (str): Namespace of the Relationship. [optional]
492
- object (str): Object of the Relationship. [optional]
493
- relation (str): Relation of the Relationship. [optional]
494
- subject_id (str): SubjectID of the Relationship. [optional]
495
- subject_set_namespace (str): Namespace of the Subject Set. [optional]
496
- subject_set_object (str): Object of the Subject Set. [optional]
497
- subject_set_relation (str): Relation of the Subject Set. [optional]
498
- max_depth (int): [optional]
499
- _return_http_data_only (bool): response data without head status
500
- code and headers. Default is True.
501
- _preload_content (bool): if False, the urllib3.HTTPResponse object
502
- will be returned without reading/decoding response data.
503
- Default is True.
504
- _request_timeout (int/float/tuple): timeout setting for this request. If
505
- one number provided, it will be total request timeout. It can also
506
- be a pair (tuple) of (connection, read) timeouts.
507
- Default is None.
508
- _check_input_type (bool): specifies if type checking
509
- should be done one the data sent to the server.
510
- Default is True.
511
- _check_return_type (bool): specifies if type checking
512
- should be done one the data received from the server.
513
- Default is True.
514
- _spec_property_naming (bool): True if the variable names in the input data
515
- are serialized names, as specified in the OpenAPI document.
516
- False if the variable names in the input data
517
- are pythonic names, e.g. snake case (default)
518
- _content_type (str/None): force body content-type.
519
- Default is None and content-type will be predicted by allowed
520
- content-types and body.
521
- _host_index (int/None): specifies the index of the server
522
- that we want to use.
523
- Default is read from the configuration.
524
- _request_auths (list): set to override the auth_settings for an a single
525
- request; this effectively ignores the authentication
526
- in the spec for a single request.
527
- Default is None
528
- async_req (bool): execute request asynchronously
529
-
530
- Returns:
531
- CheckPermissionResult
532
- If the method is called asynchronously, returns the request
533
- thread.
534
- """
535
- kwargs['async_req'] = kwargs.get(
536
- 'async_req', False
537
- )
538
- kwargs['_return_http_data_only'] = kwargs.get(
539
- '_return_http_data_only', True
540
- )
541
- kwargs['_preload_content'] = kwargs.get(
542
- '_preload_content', True
543
- )
544
- kwargs['_request_timeout'] = kwargs.get(
545
- '_request_timeout', None
546
- )
547
- kwargs['_check_input_type'] = kwargs.get(
548
- '_check_input_type', True
549
- )
550
- kwargs['_check_return_type'] = kwargs.get(
551
- '_check_return_type', True
552
- )
553
- kwargs['_spec_property_naming'] = kwargs.get(
554
- '_spec_property_naming', False
555
- )
556
- kwargs['_content_type'] = kwargs.get(
557
- '_content_type')
558
- kwargs['_host_index'] = kwargs.get('_host_index')
559
- kwargs['_request_auths'] = kwargs.get('_request_auths', None)
560
- return self.check_permission_or_error_endpoint.call_with_http_info(**kwargs)
431
+ namespace: Annotated[Optional[StrictStr], Field(description="Namespace of the Relationship")] = None,
432
+ object: Annotated[Optional[StrictStr], Field(description="Object of the Relationship")] = None,
433
+ relation: Annotated[Optional[StrictStr], Field(description="Relation of the Relationship")] = None,
434
+ subject_id: Annotated[Optional[StrictStr], Field(description="SubjectID of the Relationship")] = None,
435
+ subject_set_namespace: Annotated[Optional[StrictStr], Field(description="Namespace of the Subject Set")] = None,
436
+ subject_set_object: Annotated[Optional[StrictStr], Field(description="Object of the Subject Set")] = None,
437
+ subject_set_relation: Annotated[Optional[StrictStr], Field(description="Relation of the Subject Set")] = None,
438
+ max_depth: Optional[StrictInt] = None,
439
+ _request_timeout: Union[
440
+ None,
441
+ Annotated[StrictFloat, Field(gt=0)],
442
+ Tuple[
443
+ Annotated[StrictFloat, Field(gt=0)],
444
+ Annotated[StrictFloat, Field(gt=0)]
445
+ ]
446
+ ] = None,
447
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
448
+ _content_type: Optional[StrictStr] = None,
449
+ _headers: Optional[Dict[StrictStr, Any]] = None,
450
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
451
+ ) -> CheckPermissionResult:
452
+ """Check a permission
453
+
454
+ To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.sh/docs/keto/concepts/api-overview).
455
+
456
+ :param namespace: Namespace of the Relationship
457
+ :type namespace: str
458
+ :param object: Object of the Relationship
459
+ :type object: str
460
+ :param relation: Relation of the Relationship
461
+ :type relation: str
462
+ :param subject_id: SubjectID of the Relationship
463
+ :type subject_id: str
464
+ :param subject_set_namespace: Namespace of the Subject Set
465
+ :type subject_set_namespace: str
466
+ :param subject_set_object: Object of the Subject Set
467
+ :type subject_set_object: str
468
+ :param subject_set_relation: Relation of the Subject Set
469
+ :type subject_set_relation: str
470
+ :param max_depth:
471
+ :type max_depth: int
472
+ :param _request_timeout: timeout setting for this request. If one
473
+ number provided, it will be total request
474
+ timeout. It can also be a pair (tuple) of
475
+ (connection, read) timeouts.
476
+ :type _request_timeout: int, tuple(int, int), optional
477
+ :param _request_auth: set to override the auth_settings for an a single
478
+ request; this effectively ignores the
479
+ authentication in the spec for a single request.
480
+ :type _request_auth: dict, optional
481
+ :param _content_type: force content-type for the request.
482
+ :type _content_type: str, Optional
483
+ :param _headers: set to override the headers for a single
484
+ request; this effectively ignores the headers
485
+ in the spec for a single request.
486
+ :type _headers: dict, optional
487
+ :param _host_index: set to override the host_index for a single
488
+ request; this effectively ignores the host_index
489
+ in the spec for a single request.
490
+ :type _host_index: int, optional
491
+ :return: Returns the result object.
492
+ """ # noqa: E501
493
+
494
+ _param = self._check_permission_or_error_serialize(
495
+ namespace=namespace,
496
+ object=object,
497
+ relation=relation,
498
+ subject_id=subject_id,
499
+ subject_set_namespace=subject_set_namespace,
500
+ subject_set_object=subject_set_object,
501
+ subject_set_relation=subject_set_relation,
502
+ max_depth=max_depth,
503
+ _request_auth=_request_auth,
504
+ _content_type=_content_type,
505
+ _headers=_headers,
506
+ _host_index=_host_index
507
+ )
508
+
509
+ _response_types_map: Dict[str, Optional[str]] = {
510
+ '200': "CheckPermissionResult",
511
+ '400': "ErrorGeneric",
512
+ '403': "CheckPermissionResult",
513
+ }
514
+ response_data = self.api_client.call_api(
515
+ *_param,
516
+ _request_timeout=_request_timeout
517
+ )
518
+ response_data.read()
519
+ return self.api_client.response_deserialize(
520
+ response_data=response_data,
521
+ response_types_map=_response_types_map,
522
+ ).data
523
+
524
+
525
+ @validate_call
526
+ def check_permission_or_error_with_http_info(
527
+ self,
528
+ namespace: Annotated[Optional[StrictStr], Field(description="Namespace of the Relationship")] = None,
529
+ object: Annotated[Optional[StrictStr], Field(description="Object of the Relationship")] = None,
530
+ relation: Annotated[Optional[StrictStr], Field(description="Relation of the Relationship")] = None,
531
+ subject_id: Annotated[Optional[StrictStr], Field(description="SubjectID of the Relationship")] = None,
532
+ subject_set_namespace: Annotated[Optional[StrictStr], Field(description="Namespace of the Subject Set")] = None,
533
+ subject_set_object: Annotated[Optional[StrictStr], Field(description="Object of the Subject Set")] = None,
534
+ subject_set_relation: Annotated[Optional[StrictStr], Field(description="Relation of the Subject Set")] = None,
535
+ max_depth: Optional[StrictInt] = None,
536
+ _request_timeout: Union[
537
+ None,
538
+ Annotated[StrictFloat, Field(gt=0)],
539
+ Tuple[
540
+ Annotated[StrictFloat, Field(gt=0)],
541
+ Annotated[StrictFloat, Field(gt=0)]
542
+ ]
543
+ ] = None,
544
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
545
+ _content_type: Optional[StrictStr] = None,
546
+ _headers: Optional[Dict[StrictStr, Any]] = None,
547
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
548
+ ) -> ApiResponse[CheckPermissionResult]:
549
+ """Check a permission
550
+
551
+ To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.sh/docs/keto/concepts/api-overview).
552
+
553
+ :param namespace: Namespace of the Relationship
554
+ :type namespace: str
555
+ :param object: Object of the Relationship
556
+ :type object: str
557
+ :param relation: Relation of the Relationship
558
+ :type relation: str
559
+ :param subject_id: SubjectID of the Relationship
560
+ :type subject_id: str
561
+ :param subject_set_namespace: Namespace of the Subject Set
562
+ :type subject_set_namespace: str
563
+ :param subject_set_object: Object of the Subject Set
564
+ :type subject_set_object: str
565
+ :param subject_set_relation: Relation of the Subject Set
566
+ :type subject_set_relation: str
567
+ :param max_depth:
568
+ :type max_depth: int
569
+ :param _request_timeout: timeout setting for this request. If one
570
+ number provided, it will be total request
571
+ timeout. It can also be a pair (tuple) of
572
+ (connection, read) timeouts.
573
+ :type _request_timeout: int, tuple(int, int), optional
574
+ :param _request_auth: set to override the auth_settings for an a single
575
+ request; this effectively ignores the
576
+ authentication in the spec for a single request.
577
+ :type _request_auth: dict, optional
578
+ :param _content_type: force content-type for the request.
579
+ :type _content_type: str, Optional
580
+ :param _headers: set to override the headers for a single
581
+ request; this effectively ignores the headers
582
+ in the spec for a single request.
583
+ :type _headers: dict, optional
584
+ :param _host_index: set to override the host_index for a single
585
+ request; this effectively ignores the host_index
586
+ in the spec for a single request.
587
+ :type _host_index: int, optional
588
+ :return: Returns the result object.
589
+ """ # noqa: E501
590
+
591
+ _param = self._check_permission_or_error_serialize(
592
+ namespace=namespace,
593
+ object=object,
594
+ relation=relation,
595
+ subject_id=subject_id,
596
+ subject_set_namespace=subject_set_namespace,
597
+ subject_set_object=subject_set_object,
598
+ subject_set_relation=subject_set_relation,
599
+ max_depth=max_depth,
600
+ _request_auth=_request_auth,
601
+ _content_type=_content_type,
602
+ _headers=_headers,
603
+ _host_index=_host_index
604
+ )
605
+
606
+ _response_types_map: Dict[str, Optional[str]] = {
607
+ '200': "CheckPermissionResult",
608
+ '400': "ErrorGeneric",
609
+ '403': "CheckPermissionResult",
610
+ }
611
+ response_data = self.api_client.call_api(
612
+ *_param,
613
+ _request_timeout=_request_timeout
614
+ )
615
+ response_data.read()
616
+ return self.api_client.response_deserialize(
617
+ response_data=response_data,
618
+ response_types_map=_response_types_map,
619
+ )
620
+
621
+
622
+ @validate_call
623
+ def check_permission_or_error_without_preload_content(
624
+ self,
625
+ namespace: Annotated[Optional[StrictStr], Field(description="Namespace of the Relationship")] = None,
626
+ object: Annotated[Optional[StrictStr], Field(description="Object of the Relationship")] = None,
627
+ relation: Annotated[Optional[StrictStr], Field(description="Relation of the Relationship")] = None,
628
+ subject_id: Annotated[Optional[StrictStr], Field(description="SubjectID of the Relationship")] = None,
629
+ subject_set_namespace: Annotated[Optional[StrictStr], Field(description="Namespace of the Subject Set")] = None,
630
+ subject_set_object: Annotated[Optional[StrictStr], Field(description="Object of the Subject Set")] = None,
631
+ subject_set_relation: Annotated[Optional[StrictStr], Field(description="Relation of the Subject Set")] = None,
632
+ max_depth: Optional[StrictInt] = None,
633
+ _request_timeout: Union[
634
+ None,
635
+ Annotated[StrictFloat, Field(gt=0)],
636
+ Tuple[
637
+ Annotated[StrictFloat, Field(gt=0)],
638
+ Annotated[StrictFloat, Field(gt=0)]
639
+ ]
640
+ ] = None,
641
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
642
+ _content_type: Optional[StrictStr] = None,
643
+ _headers: Optional[Dict[StrictStr, Any]] = None,
644
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
645
+ ) -> RESTResponseType:
646
+ """Check a permission
647
+
648
+ To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.sh/docs/keto/concepts/api-overview).
649
+
650
+ :param namespace: Namespace of the Relationship
651
+ :type namespace: str
652
+ :param object: Object of the Relationship
653
+ :type object: str
654
+ :param relation: Relation of the Relationship
655
+ :type relation: str
656
+ :param subject_id: SubjectID of the Relationship
657
+ :type subject_id: str
658
+ :param subject_set_namespace: Namespace of the Subject Set
659
+ :type subject_set_namespace: str
660
+ :param subject_set_object: Object of the Subject Set
661
+ :type subject_set_object: str
662
+ :param subject_set_relation: Relation of the Subject Set
663
+ :type subject_set_relation: str
664
+ :param max_depth:
665
+ :type max_depth: int
666
+ :param _request_timeout: timeout setting for this request. If one
667
+ number provided, it will be total request
668
+ timeout. It can also be a pair (tuple) of
669
+ (connection, read) timeouts.
670
+ :type _request_timeout: int, tuple(int, int), optional
671
+ :param _request_auth: set to override the auth_settings for an a single
672
+ request; this effectively ignores the
673
+ authentication in the spec for a single request.
674
+ :type _request_auth: dict, optional
675
+ :param _content_type: force content-type for the request.
676
+ :type _content_type: str, Optional
677
+ :param _headers: set to override the headers for a single
678
+ request; this effectively ignores the headers
679
+ in the spec for a single request.
680
+ :type _headers: dict, optional
681
+ :param _host_index: set to override the host_index for a single
682
+ request; this effectively ignores the host_index
683
+ in the spec for a single request.
684
+ :type _host_index: int, optional
685
+ :return: Returns the result object.
686
+ """ # noqa: E501
687
+
688
+ _param = self._check_permission_or_error_serialize(
689
+ namespace=namespace,
690
+ object=object,
691
+ relation=relation,
692
+ subject_id=subject_id,
693
+ subject_set_namespace=subject_set_namespace,
694
+ subject_set_object=subject_set_object,
695
+ subject_set_relation=subject_set_relation,
696
+ max_depth=max_depth,
697
+ _request_auth=_request_auth,
698
+ _content_type=_content_type,
699
+ _headers=_headers,
700
+ _host_index=_host_index
701
+ )
702
+
703
+ _response_types_map: Dict[str, Optional[str]] = {
704
+ '200': "CheckPermissionResult",
705
+ '400': "ErrorGeneric",
706
+ '403': "CheckPermissionResult",
707
+ }
708
+ response_data = self.api_client.call_api(
709
+ *_param,
710
+ _request_timeout=_request_timeout
711
+ )
712
+ return response_data.response
713
+
714
+
715
+ def _check_permission_or_error_serialize(
716
+ self,
717
+ namespace,
718
+ object,
719
+ relation,
720
+ subject_id,
721
+ subject_set_namespace,
722
+ subject_set_object,
723
+ subject_set_relation,
724
+ max_depth,
725
+ _request_auth,
726
+ _content_type,
727
+ _headers,
728
+ _host_index,
729
+ ) -> RequestSerialized:
730
+
731
+ _host = None
561
732
 
733
+ _collection_formats: Dict[str, str] = {
734
+ }
735
+
736
+ _path_params: Dict[str, str] = {}
737
+ _query_params: List[Tuple[str, str]] = []
738
+ _header_params: Dict[str, Optional[str]] = _headers or {}
739
+ _form_params: List[Tuple[str, str]] = []
740
+ _files: Dict[str, str] = {}
741
+ _body_params: Optional[bytes] = None
742
+
743
+ # process the path parameters
744
+ # process the query parameters
745
+ if namespace is not None:
746
+
747
+ _query_params.append(('namespace', namespace))
748
+
749
+ if object is not None:
750
+
751
+ _query_params.append(('object', object))
752
+
753
+ if relation is not None:
754
+
755
+ _query_params.append(('relation', relation))
756
+
757
+ if subject_id is not None:
758
+
759
+ _query_params.append(('subject_id', subject_id))
760
+
761
+ if subject_set_namespace is not None:
762
+
763
+ _query_params.append(('subject_set.namespace', subject_set_namespace))
764
+
765
+ if subject_set_object is not None:
766
+
767
+ _query_params.append(('subject_set.object', subject_set_object))
768
+
769
+ if subject_set_relation is not None:
770
+
771
+ _query_params.append(('subject_set.relation', subject_set_relation))
772
+
773
+ if max_depth is not None:
774
+
775
+ _query_params.append(('max-depth', max_depth))
776
+
777
+ # process the header parameters
778
+ # process the form parameters
779
+ # process the body parameter
780
+
781
+
782
+ # set the HTTP header `Accept`
783
+ _header_params['Accept'] = self.api_client.select_header_accept(
784
+ [
785
+ 'application/json'
786
+ ]
787
+ )
788
+
789
+
790
+ # authentication setting
791
+ _auth_settings: List[str] = [
792
+ 'oryAccessToken'
793
+ ]
794
+
795
+ return self.api_client.param_serialize(
796
+ method='GET',
797
+ resource_path='/relation-tuples/check',
798
+ path_params=_path_params,
799
+ query_params=_query_params,
800
+ header_params=_header_params,
801
+ body=_body_params,
802
+ post_params=_form_params,
803
+ files=_files,
804
+ auth_settings=_auth_settings,
805
+ collection_formats=_collection_formats,
806
+ _host=_host,
807
+ _request_auth=_request_auth
808
+ )
809
+
810
+
811
+
812
+
813
+ @validate_call
562
814
  def expand_permissions(
815
+ self,
816
+ namespace: Annotated[StrictStr, Field(description="Namespace of the Subject Set")],
817
+ object: Annotated[StrictStr, Field(description="Object of the Subject Set")],
818
+ relation: Annotated[StrictStr, Field(description="Relation of the Subject Set")],
819
+ max_depth: Optional[StrictInt] = None,
820
+ _request_timeout: Union[
821
+ None,
822
+ Annotated[StrictFloat, Field(gt=0)],
823
+ Tuple[
824
+ Annotated[StrictFloat, Field(gt=0)],
825
+ Annotated[StrictFloat, Field(gt=0)]
826
+ ]
827
+ ] = None,
828
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
829
+ _content_type: Optional[StrictStr] = None,
830
+ _headers: Optional[Dict[StrictStr, Any]] = None,
831
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
832
+ ) -> ExpandedPermissionTree:
833
+ """Expand a Relationship into permissions.
834
+
835
+ Use this endpoint to expand a relationship tuple into permissions.
836
+
837
+ :param namespace: Namespace of the Subject Set (required)
838
+ :type namespace: str
839
+ :param object: Object of the Subject Set (required)
840
+ :type object: str
841
+ :param relation: Relation of the Subject Set (required)
842
+ :type relation: str
843
+ :param max_depth:
844
+ :type max_depth: int
845
+ :param _request_timeout: timeout setting for this request. If one
846
+ number provided, it will be total request
847
+ timeout. It can also be a pair (tuple) of
848
+ (connection, read) timeouts.
849
+ :type _request_timeout: int, tuple(int, int), optional
850
+ :param _request_auth: set to override the auth_settings for an a single
851
+ request; this effectively ignores the
852
+ authentication in the spec for a single request.
853
+ :type _request_auth: dict, optional
854
+ :param _content_type: force content-type for the request.
855
+ :type _content_type: str, Optional
856
+ :param _headers: set to override the headers for a single
857
+ request; this effectively ignores the headers
858
+ in the spec for a single request.
859
+ :type _headers: dict, optional
860
+ :param _host_index: set to override the host_index for a single
861
+ request; this effectively ignores the host_index
862
+ in the spec for a single request.
863
+ :type _host_index: int, optional
864
+ :return: Returns the result object.
865
+ """ # noqa: E501
866
+
867
+ _param = self._expand_permissions_serialize(
868
+ namespace=namespace,
869
+ object=object,
870
+ relation=relation,
871
+ max_depth=max_depth,
872
+ _request_auth=_request_auth,
873
+ _content_type=_content_type,
874
+ _headers=_headers,
875
+ _host_index=_host_index
876
+ )
877
+
878
+ _response_types_map: Dict[str, Optional[str]] = {
879
+ '200': "ExpandedPermissionTree",
880
+ '400': "ErrorGeneric",
881
+ '404': "ErrorGeneric",
882
+ }
883
+ response_data = self.api_client.call_api(
884
+ *_param,
885
+ _request_timeout=_request_timeout
886
+ )
887
+ response_data.read()
888
+ return self.api_client.response_deserialize(
889
+ response_data=response_data,
890
+ response_types_map=_response_types_map,
891
+ ).data
892
+
893
+
894
+ @validate_call
895
+ def expand_permissions_with_http_info(
896
+ self,
897
+ namespace: Annotated[StrictStr, Field(description="Namespace of the Subject Set")],
898
+ object: Annotated[StrictStr, Field(description="Object of the Subject Set")],
899
+ relation: Annotated[StrictStr, Field(description="Relation of the Subject Set")],
900
+ max_depth: Optional[StrictInt] = None,
901
+ _request_timeout: Union[
902
+ None,
903
+ Annotated[StrictFloat, Field(gt=0)],
904
+ Tuple[
905
+ Annotated[StrictFloat, Field(gt=0)],
906
+ Annotated[StrictFloat, Field(gt=0)]
907
+ ]
908
+ ] = None,
909
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
910
+ _content_type: Optional[StrictStr] = None,
911
+ _headers: Optional[Dict[StrictStr, Any]] = None,
912
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
913
+ ) -> ApiResponse[ExpandedPermissionTree]:
914
+ """Expand a Relationship into permissions.
915
+
916
+ Use this endpoint to expand a relationship tuple into permissions.
917
+
918
+ :param namespace: Namespace of the Subject Set (required)
919
+ :type namespace: str
920
+ :param object: Object of the Subject Set (required)
921
+ :type object: str
922
+ :param relation: Relation of the Subject Set (required)
923
+ :type relation: str
924
+ :param max_depth:
925
+ :type max_depth: int
926
+ :param _request_timeout: timeout setting for this request. If one
927
+ number provided, it will be total request
928
+ timeout. It can also be a pair (tuple) of
929
+ (connection, read) timeouts.
930
+ :type _request_timeout: int, tuple(int, int), optional
931
+ :param _request_auth: set to override the auth_settings for an a single
932
+ request; this effectively ignores the
933
+ authentication in the spec for a single request.
934
+ :type _request_auth: dict, optional
935
+ :param _content_type: force content-type for the request.
936
+ :type _content_type: str, Optional
937
+ :param _headers: set to override the headers for a single
938
+ request; this effectively ignores the headers
939
+ in the spec for a single request.
940
+ :type _headers: dict, optional
941
+ :param _host_index: set to override the host_index for a single
942
+ request; this effectively ignores the host_index
943
+ in the spec for a single request.
944
+ :type _host_index: int, optional
945
+ :return: Returns the result object.
946
+ """ # noqa: E501
947
+
948
+ _param = self._expand_permissions_serialize(
949
+ namespace=namespace,
950
+ object=object,
951
+ relation=relation,
952
+ max_depth=max_depth,
953
+ _request_auth=_request_auth,
954
+ _content_type=_content_type,
955
+ _headers=_headers,
956
+ _host_index=_host_index
957
+ )
958
+
959
+ _response_types_map: Dict[str, Optional[str]] = {
960
+ '200': "ExpandedPermissionTree",
961
+ '400': "ErrorGeneric",
962
+ '404': "ErrorGeneric",
963
+ }
964
+ response_data = self.api_client.call_api(
965
+ *_param,
966
+ _request_timeout=_request_timeout
967
+ )
968
+ response_data.read()
969
+ return self.api_client.response_deserialize(
970
+ response_data=response_data,
971
+ response_types_map=_response_types_map,
972
+ )
973
+
974
+
975
+ @validate_call
976
+ def expand_permissions_without_preload_content(
977
+ self,
978
+ namespace: Annotated[StrictStr, Field(description="Namespace of the Subject Set")],
979
+ object: Annotated[StrictStr, Field(description="Object of the Subject Set")],
980
+ relation: Annotated[StrictStr, Field(description="Relation of the Subject Set")],
981
+ max_depth: Optional[StrictInt] = None,
982
+ _request_timeout: Union[
983
+ None,
984
+ Annotated[StrictFloat, Field(gt=0)],
985
+ Tuple[
986
+ Annotated[StrictFloat, Field(gt=0)],
987
+ Annotated[StrictFloat, Field(gt=0)]
988
+ ]
989
+ ] = None,
990
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
991
+ _content_type: Optional[StrictStr] = None,
992
+ _headers: Optional[Dict[StrictStr, Any]] = None,
993
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
994
+ ) -> RESTResponseType:
995
+ """Expand a Relationship into permissions.
996
+
997
+ Use this endpoint to expand a relationship tuple into permissions.
998
+
999
+ :param namespace: Namespace of the Subject Set (required)
1000
+ :type namespace: str
1001
+ :param object: Object of the Subject Set (required)
1002
+ :type object: str
1003
+ :param relation: Relation of the Subject Set (required)
1004
+ :type relation: str
1005
+ :param max_depth:
1006
+ :type max_depth: int
1007
+ :param _request_timeout: timeout setting for this request. If one
1008
+ number provided, it will be total request
1009
+ timeout. It can also be a pair (tuple) of
1010
+ (connection, read) timeouts.
1011
+ :type _request_timeout: int, tuple(int, int), optional
1012
+ :param _request_auth: set to override the auth_settings for an a single
1013
+ request; this effectively ignores the
1014
+ authentication in the spec for a single request.
1015
+ :type _request_auth: dict, optional
1016
+ :param _content_type: force content-type for the request.
1017
+ :type _content_type: str, Optional
1018
+ :param _headers: set to override the headers for a single
1019
+ request; this effectively ignores the headers
1020
+ in the spec for a single request.
1021
+ :type _headers: dict, optional
1022
+ :param _host_index: set to override the host_index for a single
1023
+ request; this effectively ignores the host_index
1024
+ in the spec for a single request.
1025
+ :type _host_index: int, optional
1026
+ :return: Returns the result object.
1027
+ """ # noqa: E501
1028
+
1029
+ _param = self._expand_permissions_serialize(
1030
+ namespace=namespace,
1031
+ object=object,
1032
+ relation=relation,
1033
+ max_depth=max_depth,
1034
+ _request_auth=_request_auth,
1035
+ _content_type=_content_type,
1036
+ _headers=_headers,
1037
+ _host_index=_host_index
1038
+ )
1039
+
1040
+ _response_types_map: Dict[str, Optional[str]] = {
1041
+ '200': "ExpandedPermissionTree",
1042
+ '400': "ErrorGeneric",
1043
+ '404': "ErrorGeneric",
1044
+ }
1045
+ response_data = self.api_client.call_api(
1046
+ *_param,
1047
+ _request_timeout=_request_timeout
1048
+ )
1049
+ return response_data.response
1050
+
1051
+
1052
+ def _expand_permissions_serialize(
563
1053
  self,
564
1054
  namespace,
565
1055
  object,
566
1056
  relation,
567
- **kwargs
568
- ):
569
- """Expand a Relationship into permissions. # noqa: E501
570
-
571
- Use this endpoint to expand a relationship tuple into permissions. # noqa: E501
572
- This method makes a synchronous HTTP request by default. To make an
573
- asynchronous HTTP request, please pass async_req=True
574
-
575
- >>> thread = api.expand_permissions(namespace, object, relation, async_req=True)
576
- >>> result = thread.get()
577
-
578
- Args:
579
- namespace (str): Namespace of the Subject Set
580
- object (str): Object of the Subject Set
581
- relation (str): Relation of the Subject Set
582
-
583
- Keyword Args:
584
- max_depth (int): [optional]
585
- _return_http_data_only (bool): response data without head status
586
- code and headers. Default is True.
587
- _preload_content (bool): if False, the urllib3.HTTPResponse object
588
- will be returned without reading/decoding response data.
589
- Default is True.
590
- _request_timeout (int/float/tuple): timeout setting for this request. If
591
- one number provided, it will be total request timeout. It can also
592
- be a pair (tuple) of (connection, read) timeouts.
593
- Default is None.
594
- _check_input_type (bool): specifies if type checking
595
- should be done one the data sent to the server.
596
- Default is True.
597
- _check_return_type (bool): specifies if type checking
598
- should be done one the data received from the server.
599
- Default is True.
600
- _spec_property_naming (bool): True if the variable names in the input data
601
- are serialized names, as specified in the OpenAPI document.
602
- False if the variable names in the input data
603
- are pythonic names, e.g. snake case (default)
604
- _content_type (str/None): force body content-type.
605
- Default is None and content-type will be predicted by allowed
606
- content-types and body.
607
- _host_index (int/None): specifies the index of the server
608
- that we want to use.
609
- Default is read from the configuration.
610
- _request_auths (list): set to override the auth_settings for an a single
611
- request; this effectively ignores the authentication
612
- in the spec for a single request.
613
- Default is None
614
- async_req (bool): execute request asynchronously
615
-
616
- Returns:
617
- ExpandedPermissionTree
618
- If the method is called asynchronously, returns the request
619
- thread.
620
- """
621
- kwargs['async_req'] = kwargs.get(
622
- 'async_req', False
623
- )
624
- kwargs['_return_http_data_only'] = kwargs.get(
625
- '_return_http_data_only', True
626
- )
627
- kwargs['_preload_content'] = kwargs.get(
628
- '_preload_content', True
629
- )
630
- kwargs['_request_timeout'] = kwargs.get(
631
- '_request_timeout', None
632
- )
633
- kwargs['_check_input_type'] = kwargs.get(
634
- '_check_input_type', True
635
- )
636
- kwargs['_check_return_type'] = kwargs.get(
637
- '_check_return_type', True
638
- )
639
- kwargs['_spec_property_naming'] = kwargs.get(
640
- '_spec_property_naming', False
641
- )
642
- kwargs['_content_type'] = kwargs.get(
643
- '_content_type')
644
- kwargs['_host_index'] = kwargs.get('_host_index')
645
- kwargs['_request_auths'] = kwargs.get('_request_auths', None)
646
- kwargs['namespace'] = \
647
- namespace
648
- kwargs['object'] = \
649
- object
650
- kwargs['relation'] = \
651
- relation
652
- return self.expand_permissions_endpoint.call_with_http_info(**kwargs)
1057
+ max_depth,
1058
+ _request_auth,
1059
+ _content_type,
1060
+ _headers,
1061
+ _host_index,
1062
+ ) -> RequestSerialized:
1063
+
1064
+ _host = None
1065
+
1066
+ _collection_formats: Dict[str, str] = {
1067
+ }
1068
+
1069
+ _path_params: Dict[str, str] = {}
1070
+ _query_params: List[Tuple[str, str]] = []
1071
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1072
+ _form_params: List[Tuple[str, str]] = []
1073
+ _files: Dict[str, str] = {}
1074
+ _body_params: Optional[bytes] = None
1075
+
1076
+ # process the path parameters
1077
+ # process the query parameters
1078
+ if namespace is not None:
1079
+
1080
+ _query_params.append(('namespace', namespace))
1081
+
1082
+ if object is not None:
1083
+
1084
+ _query_params.append(('object', object))
1085
+
1086
+ if relation is not None:
1087
+
1088
+ _query_params.append(('relation', relation))
1089
+
1090
+ if max_depth is not None:
1091
+
1092
+ _query_params.append(('max-depth', max_depth))
1093
+
1094
+ # process the header parameters
1095
+ # process the form parameters
1096
+ # process the body parameter
1097
+
1098
+
1099
+ # set the HTTP header `Accept`
1100
+ _header_params['Accept'] = self.api_client.select_header_accept(
1101
+ [
1102
+ 'application/json'
1103
+ ]
1104
+ )
1105
+
1106
+
1107
+ # authentication setting
1108
+ _auth_settings: List[str] = [
1109
+ 'oryAccessToken'
1110
+ ]
1111
+
1112
+ return self.api_client.param_serialize(
1113
+ method='GET',
1114
+ resource_path='/relation-tuples/expand',
1115
+ path_params=_path_params,
1116
+ query_params=_query_params,
1117
+ header_params=_header_params,
1118
+ body=_body_params,
1119
+ post_params=_form_params,
1120
+ files=_files,
1121
+ auth_settings=_auth_settings,
1122
+ collection_formats=_collection_formats,
1123
+ _host=_host,
1124
+ _request_auth=_request_auth
1125
+ )
1126
+
1127
+
1128
+
653
1129
 
1130
+ @validate_call
654
1131
  def post_check_permission(
655
1132
  self,
656
- **kwargs
657
- ):
658
- """Check a permission # noqa: E501
659
-
660
- To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.sh/docs/keto/concepts/api-overview). # noqa: E501
661
- This method makes a synchronous HTTP request by default. To make an
662
- asynchronous HTTP request, please pass async_req=True
663
-
664
- >>> thread = api.post_check_permission(async_req=True)
665
- >>> result = thread.get()
666
-
667
-
668
- Keyword Args:
669
- max_depth (int): [optional]
670
- post_check_permission_body (PostCheckPermissionBody): [optional]
671
- _return_http_data_only (bool): response data without head status
672
- code and headers. Default is True.
673
- _preload_content (bool): if False, the urllib3.HTTPResponse object
674
- will be returned without reading/decoding response data.
675
- Default is True.
676
- _request_timeout (int/float/tuple): timeout setting for this request. If
677
- one number provided, it will be total request timeout. It can also
678
- be a pair (tuple) of (connection, read) timeouts.
679
- Default is None.
680
- _check_input_type (bool): specifies if type checking
681
- should be done one the data sent to the server.
682
- Default is True.
683
- _check_return_type (bool): specifies if type checking
684
- should be done one the data received from the server.
685
- Default is True.
686
- _spec_property_naming (bool): True if the variable names in the input data
687
- are serialized names, as specified in the OpenAPI document.
688
- False if the variable names in the input data
689
- are pythonic names, e.g. snake case (default)
690
- _content_type (str/None): force body content-type.
691
- Default is None and content-type will be predicted by allowed
692
- content-types and body.
693
- _host_index (int/None): specifies the index of the server
694
- that we want to use.
695
- Default is read from the configuration.
696
- _request_auths (list): set to override the auth_settings for an a single
697
- request; this effectively ignores the authentication
698
- in the spec for a single request.
699
- Default is None
700
- async_req (bool): execute request asynchronously
701
-
702
- Returns:
703
- CheckPermissionResult
704
- If the method is called asynchronously, returns the request
705
- thread.
706
- """
707
- kwargs['async_req'] = kwargs.get(
708
- 'async_req', False
709
- )
710
- kwargs['_return_http_data_only'] = kwargs.get(
711
- '_return_http_data_only', True
712
- )
713
- kwargs['_preload_content'] = kwargs.get(
714
- '_preload_content', True
715
- )
716
- kwargs['_request_timeout'] = kwargs.get(
717
- '_request_timeout', None
718
- )
719
- kwargs['_check_input_type'] = kwargs.get(
720
- '_check_input_type', True
721
- )
722
- kwargs['_check_return_type'] = kwargs.get(
723
- '_check_return_type', True
724
- )
725
- kwargs['_spec_property_naming'] = kwargs.get(
726
- '_spec_property_naming', False
727
- )
728
- kwargs['_content_type'] = kwargs.get(
729
- '_content_type')
730
- kwargs['_host_index'] = kwargs.get('_host_index')
731
- kwargs['_request_auths'] = kwargs.get('_request_auths', None)
732
- return self.post_check_permission_endpoint.call_with_http_info(**kwargs)
1133
+ max_depth: Optional[StrictInt] = None,
1134
+ post_check_permission_body: Optional[PostCheckPermissionBody] = None,
1135
+ _request_timeout: Union[
1136
+ None,
1137
+ Annotated[StrictFloat, Field(gt=0)],
1138
+ Tuple[
1139
+ Annotated[StrictFloat, Field(gt=0)],
1140
+ Annotated[StrictFloat, Field(gt=0)]
1141
+ ]
1142
+ ] = None,
1143
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1144
+ _content_type: Optional[StrictStr] = None,
1145
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1146
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1147
+ ) -> CheckPermissionResult:
1148
+ """Check a permission
1149
+
1150
+ To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.sh/docs/keto/concepts/api-overview).
1151
+
1152
+ :param max_depth:
1153
+ :type max_depth: int
1154
+ :param post_check_permission_body:
1155
+ :type post_check_permission_body: PostCheckPermissionBody
1156
+ :param _request_timeout: timeout setting for this request. If one
1157
+ number provided, it will be total request
1158
+ timeout. It can also be a pair (tuple) of
1159
+ (connection, read) timeouts.
1160
+ :type _request_timeout: int, tuple(int, int), optional
1161
+ :param _request_auth: set to override the auth_settings for an a single
1162
+ request; this effectively ignores the
1163
+ authentication in the spec for a single request.
1164
+ :type _request_auth: dict, optional
1165
+ :param _content_type: force content-type for the request.
1166
+ :type _content_type: str, Optional
1167
+ :param _headers: set to override the headers for a single
1168
+ request; this effectively ignores the headers
1169
+ in the spec for a single request.
1170
+ :type _headers: dict, optional
1171
+ :param _host_index: set to override the host_index for a single
1172
+ request; this effectively ignores the host_index
1173
+ in the spec for a single request.
1174
+ :type _host_index: int, optional
1175
+ :return: Returns the result object.
1176
+ """ # noqa: E501
1177
+
1178
+ _param = self._post_check_permission_serialize(
1179
+ max_depth=max_depth,
1180
+ post_check_permission_body=post_check_permission_body,
1181
+ _request_auth=_request_auth,
1182
+ _content_type=_content_type,
1183
+ _headers=_headers,
1184
+ _host_index=_host_index
1185
+ )
1186
+
1187
+ _response_types_map: Dict[str, Optional[str]] = {
1188
+ '200': "CheckPermissionResult",
1189
+ '400': "ErrorGeneric",
1190
+ }
1191
+ response_data = self.api_client.call_api(
1192
+ *_param,
1193
+ _request_timeout=_request_timeout
1194
+ )
1195
+ response_data.read()
1196
+ return self.api_client.response_deserialize(
1197
+ response_data=response_data,
1198
+ response_types_map=_response_types_map,
1199
+ ).data
1200
+
1201
+
1202
+ @validate_call
1203
+ def post_check_permission_with_http_info(
1204
+ self,
1205
+ max_depth: Optional[StrictInt] = None,
1206
+ post_check_permission_body: Optional[PostCheckPermissionBody] = None,
1207
+ _request_timeout: Union[
1208
+ None,
1209
+ Annotated[StrictFloat, Field(gt=0)],
1210
+ Tuple[
1211
+ Annotated[StrictFloat, Field(gt=0)],
1212
+ Annotated[StrictFloat, Field(gt=0)]
1213
+ ]
1214
+ ] = None,
1215
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1216
+ _content_type: Optional[StrictStr] = None,
1217
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1218
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1219
+ ) -> ApiResponse[CheckPermissionResult]:
1220
+ """Check a permission
1221
+
1222
+ To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.sh/docs/keto/concepts/api-overview).
1223
+
1224
+ :param max_depth:
1225
+ :type max_depth: int
1226
+ :param post_check_permission_body:
1227
+ :type post_check_permission_body: PostCheckPermissionBody
1228
+ :param _request_timeout: timeout setting for this request. If one
1229
+ number provided, it will be total request
1230
+ timeout. It can also be a pair (tuple) of
1231
+ (connection, read) timeouts.
1232
+ :type _request_timeout: int, tuple(int, int), optional
1233
+ :param _request_auth: set to override the auth_settings for an a single
1234
+ request; this effectively ignores the
1235
+ authentication in the spec for a single request.
1236
+ :type _request_auth: dict, optional
1237
+ :param _content_type: force content-type for the request.
1238
+ :type _content_type: str, Optional
1239
+ :param _headers: set to override the headers for a single
1240
+ request; this effectively ignores the headers
1241
+ in the spec for a single request.
1242
+ :type _headers: dict, optional
1243
+ :param _host_index: set to override the host_index for a single
1244
+ request; this effectively ignores the host_index
1245
+ in the spec for a single request.
1246
+ :type _host_index: int, optional
1247
+ :return: Returns the result object.
1248
+ """ # noqa: E501
1249
+
1250
+ _param = self._post_check_permission_serialize(
1251
+ max_depth=max_depth,
1252
+ post_check_permission_body=post_check_permission_body,
1253
+ _request_auth=_request_auth,
1254
+ _content_type=_content_type,
1255
+ _headers=_headers,
1256
+ _host_index=_host_index
1257
+ )
1258
+
1259
+ _response_types_map: Dict[str, Optional[str]] = {
1260
+ '200': "CheckPermissionResult",
1261
+ '400': "ErrorGeneric",
1262
+ }
1263
+ response_data = self.api_client.call_api(
1264
+ *_param,
1265
+ _request_timeout=_request_timeout
1266
+ )
1267
+ response_data.read()
1268
+ return self.api_client.response_deserialize(
1269
+ response_data=response_data,
1270
+ response_types_map=_response_types_map,
1271
+ )
1272
+
1273
+
1274
+ @validate_call
1275
+ def post_check_permission_without_preload_content(
1276
+ self,
1277
+ max_depth: Optional[StrictInt] = None,
1278
+ post_check_permission_body: Optional[PostCheckPermissionBody] = None,
1279
+ _request_timeout: Union[
1280
+ None,
1281
+ Annotated[StrictFloat, Field(gt=0)],
1282
+ Tuple[
1283
+ Annotated[StrictFloat, Field(gt=0)],
1284
+ Annotated[StrictFloat, Field(gt=0)]
1285
+ ]
1286
+ ] = None,
1287
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1288
+ _content_type: Optional[StrictStr] = None,
1289
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1290
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1291
+ ) -> RESTResponseType:
1292
+ """Check a permission
1293
+
1294
+ To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.sh/docs/keto/concepts/api-overview).
1295
+
1296
+ :param max_depth:
1297
+ :type max_depth: int
1298
+ :param post_check_permission_body:
1299
+ :type post_check_permission_body: PostCheckPermissionBody
1300
+ :param _request_timeout: timeout setting for this request. If one
1301
+ number provided, it will be total request
1302
+ timeout. It can also be a pair (tuple) of
1303
+ (connection, read) timeouts.
1304
+ :type _request_timeout: int, tuple(int, int), optional
1305
+ :param _request_auth: set to override the auth_settings for an a single
1306
+ request; this effectively ignores the
1307
+ authentication in the spec for a single request.
1308
+ :type _request_auth: dict, optional
1309
+ :param _content_type: force content-type for the request.
1310
+ :type _content_type: str, Optional
1311
+ :param _headers: set to override the headers for a single
1312
+ request; this effectively ignores the headers
1313
+ in the spec for a single request.
1314
+ :type _headers: dict, optional
1315
+ :param _host_index: set to override the host_index for a single
1316
+ request; this effectively ignores the host_index
1317
+ in the spec for a single request.
1318
+ :type _host_index: int, optional
1319
+ :return: Returns the result object.
1320
+ """ # noqa: E501
1321
+
1322
+ _param = self._post_check_permission_serialize(
1323
+ max_depth=max_depth,
1324
+ post_check_permission_body=post_check_permission_body,
1325
+ _request_auth=_request_auth,
1326
+ _content_type=_content_type,
1327
+ _headers=_headers,
1328
+ _host_index=_host_index
1329
+ )
1330
+
1331
+ _response_types_map: Dict[str, Optional[str]] = {
1332
+ '200': "CheckPermissionResult",
1333
+ '400': "ErrorGeneric",
1334
+ }
1335
+ response_data = self.api_client.call_api(
1336
+ *_param,
1337
+ _request_timeout=_request_timeout
1338
+ )
1339
+ return response_data.response
1340
+
1341
+
1342
+ def _post_check_permission_serialize(
1343
+ self,
1344
+ max_depth,
1345
+ post_check_permission_body,
1346
+ _request_auth,
1347
+ _content_type,
1348
+ _headers,
1349
+ _host_index,
1350
+ ) -> RequestSerialized:
1351
+
1352
+ _host = None
1353
+
1354
+ _collection_formats: Dict[str, str] = {
1355
+ }
1356
+
1357
+ _path_params: Dict[str, str] = {}
1358
+ _query_params: List[Tuple[str, str]] = []
1359
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1360
+ _form_params: List[Tuple[str, str]] = []
1361
+ _files: Dict[str, str] = {}
1362
+ _body_params: Optional[bytes] = None
1363
+
1364
+ # process the path parameters
1365
+ # process the query parameters
1366
+ if max_depth is not None:
1367
+
1368
+ _query_params.append(('max-depth', max_depth))
1369
+
1370
+ # process the header parameters
1371
+ # process the form parameters
1372
+ # process the body parameter
1373
+ if post_check_permission_body is not None:
1374
+ _body_params = post_check_permission_body
1375
+
1376
+
1377
+ # set the HTTP header `Accept`
1378
+ _header_params['Accept'] = self.api_client.select_header_accept(
1379
+ [
1380
+ 'application/json'
1381
+ ]
1382
+ )
1383
+
1384
+ # set the HTTP header `Content-Type`
1385
+ if _content_type:
1386
+ _header_params['Content-Type'] = _content_type
1387
+ else:
1388
+ _default_content_type = (
1389
+ self.api_client.select_header_content_type(
1390
+ [
1391
+ 'application/json'
1392
+ ]
1393
+ )
1394
+ )
1395
+ if _default_content_type is not None:
1396
+ _header_params['Content-Type'] = _default_content_type
1397
+
1398
+ # authentication setting
1399
+ _auth_settings: List[str] = [
1400
+ 'oryAccessToken'
1401
+ ]
1402
+
1403
+ return self.api_client.param_serialize(
1404
+ method='POST',
1405
+ resource_path='/relation-tuples/check/openapi',
1406
+ path_params=_path_params,
1407
+ query_params=_query_params,
1408
+ header_params=_header_params,
1409
+ body=_body_params,
1410
+ post_params=_form_params,
1411
+ files=_files,
1412
+ auth_settings=_auth_settings,
1413
+ collection_formats=_collection_formats,
1414
+ _host=_host,
1415
+ _request_auth=_request_auth
1416
+ )
1417
+
1418
+
733
1419
 
1420
+
1421
+ @validate_call
734
1422
  def post_check_permission_or_error(
735
1423
  self,
736
- **kwargs
737
- ):
738
- """Check a permission # noqa: E501
739
-
740
- To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.sh/docs/keto/concepts/api-overview). # noqa: E501
741
- This method makes a synchronous HTTP request by default. To make an
742
- asynchronous HTTP request, please pass async_req=True
743
-
744
- >>> thread = api.post_check_permission_or_error(async_req=True)
745
- >>> result = thread.get()
746
-
747
-
748
- Keyword Args:
749
- max_depth (int): [optional]
750
- post_check_permission_or_error_body (PostCheckPermissionOrErrorBody): [optional]
751
- _return_http_data_only (bool): response data without head status
752
- code and headers. Default is True.
753
- _preload_content (bool): if False, the urllib3.HTTPResponse object
754
- will be returned without reading/decoding response data.
755
- Default is True.
756
- _request_timeout (int/float/tuple): timeout setting for this request. If
757
- one number provided, it will be total request timeout. It can also
758
- be a pair (tuple) of (connection, read) timeouts.
759
- Default is None.
760
- _check_input_type (bool): specifies if type checking
761
- should be done one the data sent to the server.
762
- Default is True.
763
- _check_return_type (bool): specifies if type checking
764
- should be done one the data received from the server.
765
- Default is True.
766
- _spec_property_naming (bool): True if the variable names in the input data
767
- are serialized names, as specified in the OpenAPI document.
768
- False if the variable names in the input data
769
- are pythonic names, e.g. snake case (default)
770
- _content_type (str/None): force body content-type.
771
- Default is None and content-type will be predicted by allowed
772
- content-types and body.
773
- _host_index (int/None): specifies the index of the server
774
- that we want to use.
775
- Default is read from the configuration.
776
- _request_auths (list): set to override the auth_settings for an a single
777
- request; this effectively ignores the authentication
778
- in the spec for a single request.
779
- Default is None
780
- async_req (bool): execute request asynchronously
781
-
782
- Returns:
783
- CheckPermissionResult
784
- If the method is called asynchronously, returns the request
785
- thread.
786
- """
787
- kwargs['async_req'] = kwargs.get(
788
- 'async_req', False
789
- )
790
- kwargs['_return_http_data_only'] = kwargs.get(
791
- '_return_http_data_only', True
792
- )
793
- kwargs['_preload_content'] = kwargs.get(
794
- '_preload_content', True
795
- )
796
- kwargs['_request_timeout'] = kwargs.get(
797
- '_request_timeout', None
798
- )
799
- kwargs['_check_input_type'] = kwargs.get(
800
- '_check_input_type', True
801
- )
802
- kwargs['_check_return_type'] = kwargs.get(
803
- '_check_return_type', True
804
- )
805
- kwargs['_spec_property_naming'] = kwargs.get(
806
- '_spec_property_naming', False
807
- )
808
- kwargs['_content_type'] = kwargs.get(
809
- '_content_type')
810
- kwargs['_host_index'] = kwargs.get('_host_index')
811
- kwargs['_request_auths'] = kwargs.get('_request_auths', None)
812
- return self.post_check_permission_or_error_endpoint.call_with_http_info(**kwargs)
1424
+ max_depth: Optional[StrictInt] = None,
1425
+ post_check_permission_or_error_body: Optional[PostCheckPermissionOrErrorBody] = None,
1426
+ _request_timeout: Union[
1427
+ None,
1428
+ Annotated[StrictFloat, Field(gt=0)],
1429
+ Tuple[
1430
+ Annotated[StrictFloat, Field(gt=0)],
1431
+ Annotated[StrictFloat, Field(gt=0)]
1432
+ ]
1433
+ ] = None,
1434
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1435
+ _content_type: Optional[StrictStr] = None,
1436
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1437
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1438
+ ) -> CheckPermissionResult:
1439
+ """Check a permission
1440
+
1441
+ To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.sh/docs/keto/concepts/api-overview).
1442
+
1443
+ :param max_depth:
1444
+ :type max_depth: int
1445
+ :param post_check_permission_or_error_body:
1446
+ :type post_check_permission_or_error_body: PostCheckPermissionOrErrorBody
1447
+ :param _request_timeout: timeout setting for this request. If one
1448
+ number provided, it will be total request
1449
+ timeout. It can also be a pair (tuple) of
1450
+ (connection, read) timeouts.
1451
+ :type _request_timeout: int, tuple(int, int), optional
1452
+ :param _request_auth: set to override the auth_settings for an a single
1453
+ request; this effectively ignores the
1454
+ authentication in the spec for a single request.
1455
+ :type _request_auth: dict, optional
1456
+ :param _content_type: force content-type for the request.
1457
+ :type _content_type: str, Optional
1458
+ :param _headers: set to override the headers for a single
1459
+ request; this effectively ignores the headers
1460
+ in the spec for a single request.
1461
+ :type _headers: dict, optional
1462
+ :param _host_index: set to override the host_index for a single
1463
+ request; this effectively ignores the host_index
1464
+ in the spec for a single request.
1465
+ :type _host_index: int, optional
1466
+ :return: Returns the result object.
1467
+ """ # noqa: E501
1468
+
1469
+ _param = self._post_check_permission_or_error_serialize(
1470
+ max_depth=max_depth,
1471
+ post_check_permission_or_error_body=post_check_permission_or_error_body,
1472
+ _request_auth=_request_auth,
1473
+ _content_type=_content_type,
1474
+ _headers=_headers,
1475
+ _host_index=_host_index
1476
+ )
1477
+
1478
+ _response_types_map: Dict[str, Optional[str]] = {
1479
+ '200': "CheckPermissionResult",
1480
+ '400': "ErrorGeneric",
1481
+ '403': "CheckPermissionResult",
1482
+ }
1483
+ response_data = self.api_client.call_api(
1484
+ *_param,
1485
+ _request_timeout=_request_timeout
1486
+ )
1487
+ response_data.read()
1488
+ return self.api_client.response_deserialize(
1489
+ response_data=response_data,
1490
+ response_types_map=_response_types_map,
1491
+ ).data
1492
+
1493
+
1494
+ @validate_call
1495
+ def post_check_permission_or_error_with_http_info(
1496
+ self,
1497
+ max_depth: Optional[StrictInt] = None,
1498
+ post_check_permission_or_error_body: Optional[PostCheckPermissionOrErrorBody] = None,
1499
+ _request_timeout: Union[
1500
+ None,
1501
+ Annotated[StrictFloat, Field(gt=0)],
1502
+ Tuple[
1503
+ Annotated[StrictFloat, Field(gt=0)],
1504
+ Annotated[StrictFloat, Field(gt=0)]
1505
+ ]
1506
+ ] = None,
1507
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1508
+ _content_type: Optional[StrictStr] = None,
1509
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1510
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1511
+ ) -> ApiResponse[CheckPermissionResult]:
1512
+ """Check a permission
1513
+
1514
+ To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.sh/docs/keto/concepts/api-overview).
1515
+
1516
+ :param max_depth:
1517
+ :type max_depth: int
1518
+ :param post_check_permission_or_error_body:
1519
+ :type post_check_permission_or_error_body: PostCheckPermissionOrErrorBody
1520
+ :param _request_timeout: timeout setting for this request. If one
1521
+ number provided, it will be total request
1522
+ timeout. It can also be a pair (tuple) of
1523
+ (connection, read) timeouts.
1524
+ :type _request_timeout: int, tuple(int, int), optional
1525
+ :param _request_auth: set to override the auth_settings for an a single
1526
+ request; this effectively ignores the
1527
+ authentication in the spec for a single request.
1528
+ :type _request_auth: dict, optional
1529
+ :param _content_type: force content-type for the request.
1530
+ :type _content_type: str, Optional
1531
+ :param _headers: set to override the headers for a single
1532
+ request; this effectively ignores the headers
1533
+ in the spec for a single request.
1534
+ :type _headers: dict, optional
1535
+ :param _host_index: set to override the host_index for a single
1536
+ request; this effectively ignores the host_index
1537
+ in the spec for a single request.
1538
+ :type _host_index: int, optional
1539
+ :return: Returns the result object.
1540
+ """ # noqa: E501
1541
+
1542
+ _param = self._post_check_permission_or_error_serialize(
1543
+ max_depth=max_depth,
1544
+ post_check_permission_or_error_body=post_check_permission_or_error_body,
1545
+ _request_auth=_request_auth,
1546
+ _content_type=_content_type,
1547
+ _headers=_headers,
1548
+ _host_index=_host_index
1549
+ )
1550
+
1551
+ _response_types_map: Dict[str, Optional[str]] = {
1552
+ '200': "CheckPermissionResult",
1553
+ '400': "ErrorGeneric",
1554
+ '403': "CheckPermissionResult",
1555
+ }
1556
+ response_data = self.api_client.call_api(
1557
+ *_param,
1558
+ _request_timeout=_request_timeout
1559
+ )
1560
+ response_data.read()
1561
+ return self.api_client.response_deserialize(
1562
+ response_data=response_data,
1563
+ response_types_map=_response_types_map,
1564
+ )
1565
+
1566
+
1567
+ @validate_call
1568
+ def post_check_permission_or_error_without_preload_content(
1569
+ self,
1570
+ max_depth: Optional[StrictInt] = None,
1571
+ post_check_permission_or_error_body: Optional[PostCheckPermissionOrErrorBody] = None,
1572
+ _request_timeout: Union[
1573
+ None,
1574
+ Annotated[StrictFloat, Field(gt=0)],
1575
+ Tuple[
1576
+ Annotated[StrictFloat, Field(gt=0)],
1577
+ Annotated[StrictFloat, Field(gt=0)]
1578
+ ]
1579
+ ] = None,
1580
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1581
+ _content_type: Optional[StrictStr] = None,
1582
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1583
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1584
+ ) -> RESTResponseType:
1585
+ """Check a permission
1586
+
1587
+ To learn how relationship tuples and the check works, head over to [the documentation](https://www.ory.sh/docs/keto/concepts/api-overview).
1588
+
1589
+ :param max_depth:
1590
+ :type max_depth: int
1591
+ :param post_check_permission_or_error_body:
1592
+ :type post_check_permission_or_error_body: PostCheckPermissionOrErrorBody
1593
+ :param _request_timeout: timeout setting for this request. If one
1594
+ number provided, it will be total request
1595
+ timeout. It can also be a pair (tuple) of
1596
+ (connection, read) timeouts.
1597
+ :type _request_timeout: int, tuple(int, int), optional
1598
+ :param _request_auth: set to override the auth_settings for an a single
1599
+ request; this effectively ignores the
1600
+ authentication in the spec for a single request.
1601
+ :type _request_auth: dict, optional
1602
+ :param _content_type: force content-type for the request.
1603
+ :type _content_type: str, Optional
1604
+ :param _headers: set to override the headers for a single
1605
+ request; this effectively ignores the headers
1606
+ in the spec for a single request.
1607
+ :type _headers: dict, optional
1608
+ :param _host_index: set to override the host_index for a single
1609
+ request; this effectively ignores the host_index
1610
+ in the spec for a single request.
1611
+ :type _host_index: int, optional
1612
+ :return: Returns the result object.
1613
+ """ # noqa: E501
1614
+
1615
+ _param = self._post_check_permission_or_error_serialize(
1616
+ max_depth=max_depth,
1617
+ post_check_permission_or_error_body=post_check_permission_or_error_body,
1618
+ _request_auth=_request_auth,
1619
+ _content_type=_content_type,
1620
+ _headers=_headers,
1621
+ _host_index=_host_index
1622
+ )
1623
+
1624
+ _response_types_map: Dict[str, Optional[str]] = {
1625
+ '200': "CheckPermissionResult",
1626
+ '400': "ErrorGeneric",
1627
+ '403': "CheckPermissionResult",
1628
+ }
1629
+ response_data = self.api_client.call_api(
1630
+ *_param,
1631
+ _request_timeout=_request_timeout
1632
+ )
1633
+ return response_data.response
1634
+
1635
+
1636
+ def _post_check_permission_or_error_serialize(
1637
+ self,
1638
+ max_depth,
1639
+ post_check_permission_or_error_body,
1640
+ _request_auth,
1641
+ _content_type,
1642
+ _headers,
1643
+ _host_index,
1644
+ ) -> RequestSerialized:
1645
+
1646
+ _host = None
1647
+
1648
+ _collection_formats: Dict[str, str] = {
1649
+ }
1650
+
1651
+ _path_params: Dict[str, str] = {}
1652
+ _query_params: List[Tuple[str, str]] = []
1653
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1654
+ _form_params: List[Tuple[str, str]] = []
1655
+ _files: Dict[str, str] = {}
1656
+ _body_params: Optional[bytes] = None
1657
+
1658
+ # process the path parameters
1659
+ # process the query parameters
1660
+ if max_depth is not None:
1661
+
1662
+ _query_params.append(('max-depth', max_depth))
1663
+
1664
+ # process the header parameters
1665
+ # process the form parameters
1666
+ # process the body parameter
1667
+ if post_check_permission_or_error_body is not None:
1668
+ _body_params = post_check_permission_or_error_body
1669
+
1670
+
1671
+ # set the HTTP header `Accept`
1672
+ _header_params['Accept'] = self.api_client.select_header_accept(
1673
+ [
1674
+ 'application/json'
1675
+ ]
1676
+ )
1677
+
1678
+ # set the HTTP header `Content-Type`
1679
+ if _content_type:
1680
+ _header_params['Content-Type'] = _content_type
1681
+ else:
1682
+ _default_content_type = (
1683
+ self.api_client.select_header_content_type(
1684
+ [
1685
+ 'application/json'
1686
+ ]
1687
+ )
1688
+ )
1689
+ if _default_content_type is not None:
1690
+ _header_params['Content-Type'] = _default_content_type
1691
+
1692
+ # authentication setting
1693
+ _auth_settings: List[str] = [
1694
+ 'oryAccessToken'
1695
+ ]
1696
+
1697
+ return self.api_client.param_serialize(
1698
+ method='POST',
1699
+ resource_path='/relation-tuples/check',
1700
+ path_params=_path_params,
1701
+ query_params=_query_params,
1702
+ header_params=_header_params,
1703
+ body=_body_params,
1704
+ post_params=_form_params,
1705
+ files=_files,
1706
+ auth_settings=_auth_settings,
1707
+ collection_formats=_collection_formats,
1708
+ _host=_host,
1709
+ _request_auth=_request_auth
1710
+ )
1711
+
813
1712