ory-client 1.12.2__py3-none-any.whl → 1.17.1__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.
- ory_client/__init__.py +16 -3
- ory_client/api/courier_api.py +21 -15
- ory_client/api/events_api.py +38 -26
- ory_client/api/frontend_api.py +1741 -1064
- ory_client/api/identity_api.py +197 -126
- ory_client/api/jwk_api.py +65 -44
- ory_client/api/metadata_api.py +11 -8
- ory_client/api/o_auth2_api.py +292 -191
- ory_client/api/oidc_api.py +68 -45
- ory_client/api/permission_api.py +343 -32
- ory_client/api/project_api.py +516 -145
- ory_client/api/relationship_api.py +56 -38
- ory_client/api/wellknown_api.py +14 -11
- ory_client/api/workspace_api.py +886 -34
- ory_client/api_client.py +71 -32
- ory_client/configuration.py +176 -42
- ory_client/exceptions.py +19 -2
- ory_client/models/__init__.py +15 -2
- ory_client/models/accept_o_auth2_consent_request.py +2 -2
- ory_client/models/accept_o_auth2_consent_request_session.py +2 -2
- ory_client/models/accept_o_auth2_login_request.py +2 -2
- ory_client/models/account_experience_colors.py +329 -0
- ory_client/models/account_experience_configuration.py +35 -13
- ory_client/models/account_experience_theme_variables.py +2 -2
- ory_client/models/active_project_in_console.py +2 -2
- ory_client/models/add_project_to_workspace_body.py +2 -2
- ory_client/models/attribute.py +2 -2
- ory_client/models/attribute_filter.py +2 -2
- ory_client/models/attributes_count_datapoint.py +2 -2
- ory_client/models/authenticator_assurance_level.py +2 -2
- ory_client/models/batch_check_permission_body.py +109 -0
- ory_client/models/batch_check_permission_result.py +109 -0
- ory_client/models/batch_patch_identities_response.py +5 -5
- ory_client/models/billing_period_bucket.py +5 -5
- ory_client/models/check_opl_syntax_result.py +5 -5
- ory_client/models/check_permission_result.py +2 -2
- ory_client/models/check_permission_result_with_error.py +103 -0
- ory_client/models/cloud_account.py +6 -4
- ory_client/models/consistency_request_parameters.py +2 -2
- ory_client/models/continue_with.py +35 -11
- ory_client/models/continue_with_recovery_ui.py +2 -2
- ory_client/models/continue_with_recovery_ui_flow.py +3 -3
- ory_client/models/continue_with_redirect_browser_to.py +110 -0
- ory_client/models/continue_with_set_ory_session_token.py +2 -2
- ory_client/models/continue_with_settings_ui.py +2 -2
- ory_client/models/continue_with_settings_ui_flow.py +7 -5
- ory_client/models/continue_with_verification_ui.py +2 -2
- ory_client/models/continue_with_verification_ui_flow.py +3 -3
- ory_client/models/courier_message_status.py +2 -2
- ory_client/models/courier_message_type.py +2 -2
- ory_client/models/create_custom_domain_body.py +2 -2
- ory_client/models/create_event_stream_body.py +2 -2
- ory_client/models/create_fedcm_flow_response.py +111 -0
- ory_client/models/create_identity_body.py +16 -9
- ory_client/models/create_invite_response.py +5 -5
- ory_client/models/create_json_web_key_set.py +2 -2
- ory_client/models/create_project_api_key_request.py +7 -4
- ory_client/models/create_project_body.py +5 -5
- ory_client/models/create_project_branding.py +2 -2
- ory_client/models/create_project_member_invite_body.py +2 -2
- ory_client/models/create_project_normalized_payload.py +60 -24
- ory_client/models/create_recovery_code_for_identity_body.py +2 -2
- ory_client/models/create_recovery_link_for_identity_body.py +2 -2
- ory_client/models/create_relationship_body.py +2 -2
- ory_client/models/create_subscription_body.py +2 -2
- ory_client/models/create_subscription_common.py +2 -2
- ory_client/models/create_verifiable_credential_request_body.py +2 -2
- ory_client/models/create_workspace_api_key_body.py +104 -0
- ory_client/models/create_workspace_body.py +2 -2
- ory_client/models/create_workspace_member_invite_body.py +16 -7
- ory_client/models/create_workspace_subscription_body.py +2 -2
- ory_client/models/credential_supported_draft00.py +2 -2
- ory_client/models/custom_domain.py +2 -2
- ory_client/models/delete_my_sessions_count.py +2 -2
- ory_client/models/email_template_data.py +2 -2
- ory_client/models/email_template_data_body.py +2 -2
- ory_client/models/error_authenticator_assurance_level_not_satisfied.py +2 -2
- ory_client/models/error_browser_location_change_required.py +2 -2
- ory_client/models/error_flow_replaced.py +2 -2
- ory_client/models/error_generic.py +2 -2
- ory_client/models/error_o_auth2.py +2 -2
- ory_client/models/event_stream.py +2 -2
- ory_client/models/expanded_permission_tree.py +5 -5
- ory_client/models/flow_error.py +2 -2
- ory_client/models/generic_error.py +2 -2
- ory_client/models/generic_error_content.py +2 -2
- ory_client/models/generic_usage.py +2 -2
- ory_client/models/get_attributes_count_response.py +5 -5
- ory_client/models/get_managed_identity_schema_location.py +2 -2
- ory_client/models/get_metrics_event_attributes_response.py +2 -2
- ory_client/models/get_metrics_event_types_response.py +2 -2
- ory_client/models/get_organization_response.py +2 -2
- ory_client/models/get_project_events_body.py +5 -5
- ory_client/models/get_project_events_response.py +5 -5
- ory_client/models/get_project_metrics_response.py +5 -5
- ory_client/models/get_session_activity_response.py +5 -5
- ory_client/models/get_version200_response.py +2 -2
- ory_client/models/health_not_ready_status.py +2 -2
- ory_client/models/health_status.py +2 -2
- ory_client/models/identity.py +11 -11
- ory_client/models/identity_credentials.py +5 -5
- ory_client/models/identity_credentials_code.py +14 -14
- ory_client/models/identity_credentials_code_address.py +103 -0
- ory_client/models/identity_credentials_oidc.py +5 -5
- ory_client/models/identity_credentials_oidc_provider.py +7 -5
- ory_client/models/identity_credentials_password.py +7 -5
- ory_client/models/identity_patch.py +2 -2
- ory_client/models/identity_patch_response.py +13 -6
- ory_client/models/identity_schema_container.py +2 -2
- ory_client/models/identity_schema_preset.py +2 -2
- ory_client/models/identity_with_credentials.py +2 -2
- ory_client/models/identity_with_credentials_oidc.py +2 -2
- ory_client/models/identity_with_credentials_oidc_config.py +5 -5
- ory_client/models/identity_with_credentials_oidc_config_provider.py +8 -6
- ory_client/models/identity_with_credentials_password.py +2 -2
- ory_client/models/identity_with_credentials_password_config.py +7 -5
- ory_client/models/internal_get_project_branding_body.py +2 -2
- ory_client/models/internal_is_ax_welcome_screen_enabled_for_project_body.py +2 -2
- ory_client/models/internal_is_owner_for_project_by_slug_body.py +3 -3
- ory_client/models/internal_is_owner_for_project_by_slug_response.py +2 -2
- ory_client/models/introspected_o_auth2_token.py +2 -2
- ory_client/models/invite_token_body.py +101 -0
- ory_client/models/invoice.py +3 -3
- ory_client/models/invoice_data_v1.py +12 -8
- ory_client/models/is_owner_for_project_by_slug.py +3 -3
- ory_client/models/json_patch.py +2 -2
- ory_client/models/json_web_key.py +2 -2
- ory_client/models/json_web_key_set.py +5 -5
- ory_client/models/keto_namespace.py +2 -2
- ory_client/models/line_item_v1.py +5 -5
- ory_client/models/list_event_streams.py +5 -5
- ory_client/models/list_invoices_response.py +5 -5
- ory_client/models/list_organizations_response.py +5 -5
- ory_client/models/list_workspace_projects.py +5 -5
- ory_client/models/list_workspaces.py +5 -5
- ory_client/models/login_flow.py +5 -5
- ory_client/models/login_flow_state.py +3 -3
- ory_client/models/logout_flow.py +2 -2
- ory_client/models/managed_identity_schema.py +2 -2
- ory_client/models/managed_identity_schema_validation_result.py +2 -2
- ory_client/models/member_invite.py +10 -3
- ory_client/models/message.py +5 -5
- ory_client/models/message_dispatch.py +2 -2
- ory_client/models/metrics_datapoint.py +2 -2
- ory_client/models/money.py +2 -2
- ory_client/models/namespace.py +2 -2
- ory_client/models/needs_privileged_session_error.py +2 -2
- ory_client/models/normalized_project.py +5 -5
- ory_client/models/normalized_project_revision.py +57 -21
- ory_client/models/normalized_project_revision_courier_channel.py +2 -2
- ory_client/models/normalized_project_revision_hook.py +2 -2
- ory_client/models/normalized_project_revision_identity_schema.py +2 -2
- ory_client/models/normalized_project_revision_saml_provider.py +148 -0
- ory_client/models/normalized_project_revision_third_party_provider.py +34 -3
- ory_client/models/normalized_project_revision_tokenizer_template.py +2 -2
- ory_client/models/o_auth2_client.py +3 -3
- ory_client/models/o_auth2_client_token_lifespans.py +2 -2
- ory_client/models/o_auth2_consent_request.py +6 -4
- ory_client/models/o_auth2_consent_request_open_id_connect_context.py +2 -2
- ory_client/models/o_auth2_consent_session.py +5 -3
- ory_client/models/o_auth2_consent_session_expires_at.py +2 -2
- ory_client/models/o_auth2_login_request.py +3 -3
- ory_client/models/o_auth2_logout_request.py +9 -4
- ory_client/models/o_auth2_redirect_to.py +2 -2
- ory_client/models/o_auth2_token_exchange.py +2 -2
- ory_client/models/oidc_configuration.py +5 -5
- ory_client/models/oidc_user_info.py +2 -2
- ory_client/models/organization.py +2 -2
- ory_client/models/organization_body.py +2 -2
- ory_client/models/pagination.py +2 -2
- ory_client/models/pagination_headers.py +2 -2
- ory_client/models/parse_error.py +2 -2
- ory_client/models/patch_identities_body.py +5 -5
- ory_client/models/perform_native_logout_body.py +2 -2
- ory_client/models/permissions_on_workspace.py +2 -2
- ory_client/models/plan.py +2 -2
- ory_client/models/plan_details.py +5 -5
- ory_client/models/post_check_permission_body.py +2 -2
- ory_client/models/post_check_permission_or_error_body.py +2 -2
- ory_client/models/project.py +5 -5
- ory_client/models/project_api_key.py +5 -3
- ory_client/models/project_branding.py +5 -5
- ory_client/models/project_branding_colors.py +2 -2
- ory_client/models/project_branding_theme.py +5 -5
- ory_client/models/project_cors.py +2 -2
- ory_client/models/project_events_datapoint.py +5 -5
- ory_client/models/project_host.py +2 -2
- ory_client/models/project_member.py +6 -4
- ory_client/models/project_metadata.py +5 -5
- ory_client/models/project_service_identity.py +2 -2
- ory_client/models/project_service_o_auth2.py +2 -2
- ory_client/models/project_service_permission.py +2 -2
- ory_client/models/project_services.py +2 -2
- ory_client/models/provider.py +113 -0
- ory_client/models/quota_usage.py +8 -6
- ory_client/models/recovery_code_for_identity.py +2 -2
- ory_client/models/recovery_flow.py +5 -5
- ory_client/models/recovery_flow_state.py +3 -3
- ory_client/models/recovery_identity_address.py +2 -2
- ory_client/models/recovery_link_for_identity.py +2 -2
- ory_client/models/registration_flow.py +5 -5
- ory_client/models/registration_flow_state.py +3 -3
- ory_client/models/reject_o_auth2_request.py +2 -2
- ory_client/models/relation_query.py +2 -2
- ory_client/models/relationship.py +2 -2
- ory_client/models/relationship_namespaces.py +5 -5
- ory_client/models/relationship_patch.py +2 -2
- ory_client/models/relationships.py +5 -5
- ory_client/models/rfc6749_error_json.py +2 -2
- ory_client/models/schema_patch.py +2 -2
- ory_client/models/self_service_flow_expired_error.py +2 -2
- ory_client/models/session.py +8 -8
- ory_client/models/session_activity_datapoint.py +2 -2
- ory_client/models/session_authentication_method.py +2 -2
- ory_client/models/session_device.py +2 -2
- ory_client/models/set_active_project_in_console_body.py +2 -2
- ory_client/models/set_custom_domain_body.py +2 -2
- ory_client/models/set_event_stream_body.py +2 -2
- ory_client/models/set_project.py +2 -2
- ory_client/models/set_project_branding_theme_body.py +2 -2
- ory_client/models/settings_flow.py +5 -5
- ory_client/models/settings_flow_state.py +3 -3
- ory_client/models/source_position.py +2 -2
- ory_client/models/subject_set.py +2 -2
- ory_client/models/subscription.py +2 -2
- ory_client/models/successful_code_exchange_response.py +2 -2
- ory_client/models/successful_native_login.py +5 -5
- ory_client/models/successful_native_registration.py +5 -5
- ory_client/models/successful_project_update.py +5 -5
- ory_client/models/tax_line_item.py +2 -2
- ory_client/models/time_interval.py +2 -2
- ory_client/models/token_pagination.py +2 -2
- ory_client/models/token_pagination_headers.py +2 -2
- ory_client/models/token_pagination_request_parameters.py +2 -2
- ory_client/models/token_pagination_response_headers.py +2 -2
- ory_client/models/trust_o_auth2_jwt_grant_issuer.py +2 -2
- ory_client/models/trusted_o_auth2_jwt_grant_issuer.py +2 -2
- ory_client/models/trusted_o_auth2_jwt_grant_json_web_key.py +2 -2
- ory_client/models/ui_container.py +8 -8
- ory_client/models/ui_node.py +8 -8
- ory_client/models/ui_node_anchor_attributes.py +2 -2
- ory_client/models/ui_node_attributes.py +4 -4
- ory_client/models/ui_node_image_attributes.py +2 -2
- ory_client/models/ui_node_input_attributes.py +32 -6
- ory_client/models/ui_node_meta.py +2 -2
- ory_client/models/ui_node_script_attributes.py +2 -2
- ory_client/models/ui_node_text_attributes.py +2 -2
- ory_client/models/ui_text.py +2 -2
- ory_client/models/update_fedcm_flow_body.py +105 -0
- ory_client/models/update_identity_body.py +2 -2
- ory_client/models/update_login_flow_body.py +35 -11
- ory_client/models/update_login_flow_with_code_method.py +5 -3
- ory_client/models/update_login_flow_with_identifier_first_method.py +107 -0
- ory_client/models/update_login_flow_with_lookup_secret_method.py +2 -2
- ory_client/models/update_login_flow_with_oidc_method.py +3 -3
- ory_client/models/update_login_flow_with_passkey_method.py +2 -2
- ory_client/models/update_login_flow_with_password_method.py +2 -2
- ory_client/models/update_login_flow_with_totp_method.py +2 -2
- ory_client/models/update_login_flow_with_web_authn_method.py +2 -2
- ory_client/models/update_recovery_flow_body.py +4 -4
- ory_client/models/update_recovery_flow_with_code_method.py +2 -2
- ory_client/models/update_recovery_flow_with_link_method.py +2 -2
- ory_client/models/update_registration_flow_body.py +36 -12
- ory_client/models/update_registration_flow_with_code_method.py +2 -2
- ory_client/models/update_registration_flow_with_oidc_method.py +3 -3
- ory_client/models/update_registration_flow_with_passkey_method.py +2 -2
- ory_client/models/update_registration_flow_with_password_method.py +2 -2
- ory_client/models/update_registration_flow_with_profile_method.py +14 -4
- ory_client/models/update_registration_flow_with_web_authn_method.py +2 -2
- ory_client/models/update_settings_flow_body.py +4 -4
- ory_client/models/update_settings_flow_with_lookup_method.py +2 -2
- ory_client/models/update_settings_flow_with_oidc_method.py +2 -2
- ory_client/models/update_settings_flow_with_passkey_method.py +2 -2
- ory_client/models/update_settings_flow_with_password_method.py +2 -2
- ory_client/models/update_settings_flow_with_profile_method.py +2 -2
- ory_client/models/update_settings_flow_with_totp_method.py +2 -2
- ory_client/models/update_settings_flow_with_web_authn_method.py +2 -2
- ory_client/models/update_subscription_body.py +2 -2
- ory_client/models/update_verification_flow_body.py +4 -4
- ory_client/models/update_verification_flow_with_code_method.py +2 -2
- ory_client/models/update_verification_flow_with_link_method.py +2 -2
- ory_client/models/update_workspace_body.py +2 -2
- ory_client/models/usage.py +2 -2
- ory_client/models/verifiable_credential_priming_response.py +2 -2
- ory_client/models/verifiable_credential_proof.py +2 -2
- ory_client/models/verifiable_credential_response.py +2 -2
- ory_client/models/verifiable_identity_address.py +2 -2
- ory_client/models/verification_flow.py +2 -2
- ory_client/models/verification_flow_state.py +3 -3
- ory_client/models/version.py +2 -2
- ory_client/models/warning.py +2 -2
- ory_client/models/workspace.py +2 -2
- ory_client/models/workspace_api_key.py +6 -4
- ory_client/rest.py +5 -3
- ory_client-1.17.1.dist-info/METADATA +18 -0
- ory_client-1.17.1.dist-info/RECORD +302 -0
- {ory_client-1.12.2.dist-info → ory_client-1.17.1.dist-info}/WHEEL +1 -1
- ory_client-1.12.2.dist-info/METADATA +0 -19
- ory_client-1.12.2.dist-info/RECORD +0 -289
- {ory_client-1.12.2.dist-info → ory_client-1.17.1.dist-info}/LICENSE +0 -0
- {ory_client-1.12.2.dist-info → ory_client-1.17.1.dist-info}/top_level.txt +0 -0
ory_client/api/workspace_api.py
CHANGED
@@ -3,9 +3,9 @@
|
|
3
3
|
"""
|
4
4
|
Ory APIs
|
5
5
|
|
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.
|
6
|
+
# Introduction 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. ## SDKs This document describes the APIs available in the Ory Network. The APIs are available as SDKs for the following languages: | Language | Download SDK | Documentation | | -------------- | ---------------------------------------------------------------- | ------------------------------------------------------------------------------------ | | Dart | [pub.dev](https://pub.dev/packages/ory_client) | [README](https://github.com/ory/sdk/blob/master/clients/client/dart/README.md) | | .NET | [nuget.org](https://www.nuget.org/packages/Ory.Client/) | [README](https://github.com/ory/sdk/blob/master/clients/client/dotnet/README.md) | | Elixir | [hex.pm](https://hex.pm/packages/ory_client) | [README](https://github.com/ory/sdk/blob/master/clients/client/elixir/README.md) | | Go | [github.com](https://github.com/ory/client-go) | [README](https://github.com/ory/sdk/blob/master/clients/client/go/README.md) | | Java | [maven.org](https://search.maven.org/artifact/sh.ory/ory-client) | [README](https://github.com/ory/sdk/blob/master/clients/client/java/README.md) | | JavaScript | [npmjs.com](https://www.npmjs.com/package/@ory/client) | [README](https://github.com/ory/sdk/blob/master/clients/client/typescript/README.md) | | JavaScript (With fetch) | [npmjs.com](https://www.npmjs.com/package/@ory/client-fetch) | [README](https://github.com/ory/sdk/blob/master/clients/client/typescript-fetch/README.md) | | PHP | [packagist.org](https://packagist.org/packages/ory/client) | [README](https://github.com/ory/sdk/blob/master/clients/client/php/README.md) | | Python | [pypi.org](https://pypi.org/project/ory-client/) | [README](https://github.com/ory/sdk/blob/master/clients/client/python/README.md) | | Ruby | [rubygems.org](https://rubygems.org/gems/ory-client) | [README](https://github.com/ory/sdk/blob/master/clients/client/ruby/README.md) | | Rust | [crates.io](https://crates.io/crates/ory-client) | [README](https://github.com/ory/sdk/blob/master/clients/client/rust/README.md) |
|
7
7
|
|
8
|
-
The version of the OpenAPI document: v1.
|
8
|
+
The version of the OpenAPI document: v1.17.1
|
9
9
|
Contact: support@ory.sh
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -18,13 +18,15 @@ from typing import Any, Dict, List, Optional, Tuple, Union
|
|
18
18
|
from typing_extensions import Annotated
|
19
19
|
|
20
20
|
from pydantic import Field, StrictStr
|
21
|
-
from typing import Optional
|
21
|
+
from typing import List, Optional
|
22
22
|
from typing_extensions import Annotated
|
23
|
+
from ory_client.models.create_workspace_api_key_body import CreateWorkspaceApiKeyBody
|
23
24
|
from ory_client.models.create_workspace_body import CreateWorkspaceBody
|
24
25
|
from ory_client.models.list_workspace_projects import ListWorkspaceProjects
|
25
26
|
from ory_client.models.list_workspaces import ListWorkspaces
|
26
27
|
from ory_client.models.update_workspace_body import UpdateWorkspaceBody
|
27
28
|
from ory_client.models.workspace import Workspace
|
29
|
+
from ory_client.models.workspace_api_key import WorkspaceApiKey
|
28
30
|
|
29
31
|
from ory_client.api_client import ApiClient, RequestSerialized
|
30
32
|
from ory_client.api_response import ApiResponse
|
@@ -271,7 +273,9 @@ class WorkspaceApi:
|
|
271
273
|
_query_params: List[Tuple[str, str]] = []
|
272
274
|
_header_params: Dict[str, Optional[str]] = _headers or {}
|
273
275
|
_form_params: List[Tuple[str, str]] = []
|
274
|
-
_files: Dict[
|
276
|
+
_files: Dict[
|
277
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
278
|
+
] = {}
|
275
279
|
_body_params: Optional[bytes] = None
|
276
280
|
|
277
281
|
# process the path parameters
|
@@ -284,11 +288,304 @@ class WorkspaceApi:
|
|
284
288
|
|
285
289
|
|
286
290
|
# set the HTTP header `Accept`
|
287
|
-
|
288
|
-
[
|
289
|
-
|
291
|
+
if 'Accept' not in _header_params:
|
292
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
293
|
+
[
|
294
|
+
'application/json'
|
295
|
+
]
|
296
|
+
)
|
297
|
+
|
298
|
+
# set the HTTP header `Content-Type`
|
299
|
+
if _content_type:
|
300
|
+
_header_params['Content-Type'] = _content_type
|
301
|
+
else:
|
302
|
+
_default_content_type = (
|
303
|
+
self.api_client.select_header_content_type(
|
304
|
+
[
|
305
|
+
'application/json'
|
306
|
+
]
|
307
|
+
)
|
308
|
+
)
|
309
|
+
if _default_content_type is not None:
|
310
|
+
_header_params['Content-Type'] = _default_content_type
|
311
|
+
|
312
|
+
# authentication setting
|
313
|
+
_auth_settings: List[str] = [
|
314
|
+
'oryWorkspaceApiKey'
|
315
|
+
]
|
316
|
+
|
317
|
+
return self.api_client.param_serialize(
|
318
|
+
method='POST',
|
319
|
+
resource_path='/workspaces',
|
320
|
+
path_params=_path_params,
|
321
|
+
query_params=_query_params,
|
322
|
+
header_params=_header_params,
|
323
|
+
body=_body_params,
|
324
|
+
post_params=_form_params,
|
325
|
+
files=_files,
|
326
|
+
auth_settings=_auth_settings,
|
327
|
+
collection_formats=_collection_formats,
|
328
|
+
_host=_host,
|
329
|
+
_request_auth=_request_auth
|
330
|
+
)
|
331
|
+
|
332
|
+
|
333
|
+
|
334
|
+
|
335
|
+
@validate_call
|
336
|
+
def create_workspace_api_key(
|
337
|
+
self,
|
338
|
+
workspace: Annotated[StrictStr, Field(description="The Workspace ID")],
|
339
|
+
create_workspace_api_key_body: Optional[CreateWorkspaceApiKeyBody] = None,
|
340
|
+
_request_timeout: Union[
|
341
|
+
None,
|
342
|
+
Annotated[StrictFloat, Field(gt=0)],
|
343
|
+
Tuple[
|
344
|
+
Annotated[StrictFloat, Field(gt=0)],
|
345
|
+
Annotated[StrictFloat, Field(gt=0)]
|
290
346
|
]
|
347
|
+
] = None,
|
348
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
349
|
+
_content_type: Optional[StrictStr] = None,
|
350
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
351
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=1)] = 0,
|
352
|
+
) -> WorkspaceApiKey:
|
353
|
+
"""Create workspace API key
|
354
|
+
|
355
|
+
Create an API key for a workspace.
|
356
|
+
|
357
|
+
:param workspace: The Workspace ID (required)
|
358
|
+
:type workspace: str
|
359
|
+
:param create_workspace_api_key_body:
|
360
|
+
:type create_workspace_api_key_body: CreateWorkspaceApiKeyBody
|
361
|
+
:param _request_timeout: timeout setting for this request. If one
|
362
|
+
number provided, it will be total request
|
363
|
+
timeout. It can also be a pair (tuple) of
|
364
|
+
(connection, read) timeouts.
|
365
|
+
:type _request_timeout: int, tuple(int, int), optional
|
366
|
+
:param _request_auth: set to override the auth_settings for an a single
|
367
|
+
request; this effectively ignores the
|
368
|
+
authentication in the spec for a single request.
|
369
|
+
:type _request_auth: dict, optional
|
370
|
+
:param _content_type: force content-type for the request.
|
371
|
+
:type _content_type: str, Optional
|
372
|
+
:param _headers: set to override the headers for a single
|
373
|
+
request; this effectively ignores the headers
|
374
|
+
in the spec for a single request.
|
375
|
+
:type _headers: dict, optional
|
376
|
+
:param _host_index: set to override the host_index for a single
|
377
|
+
request; this effectively ignores the host_index
|
378
|
+
in the spec for a single request.
|
379
|
+
:type _host_index: int, optional
|
380
|
+
:return: Returns the result object.
|
381
|
+
""" # noqa: E501
|
382
|
+
|
383
|
+
_param = self._create_workspace_api_key_serialize(
|
384
|
+
workspace=workspace,
|
385
|
+
create_workspace_api_key_body=create_workspace_api_key_body,
|
386
|
+
_request_auth=_request_auth,
|
387
|
+
_content_type=_content_type,
|
388
|
+
_headers=_headers,
|
389
|
+
_host_index=_host_index
|
390
|
+
)
|
391
|
+
|
392
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
393
|
+
'201': "WorkspaceApiKey",
|
394
|
+
}
|
395
|
+
response_data = self.api_client.call_api(
|
396
|
+
*_param,
|
397
|
+
_request_timeout=_request_timeout
|
291
398
|
)
|
399
|
+
response_data.read()
|
400
|
+
return self.api_client.response_deserialize(
|
401
|
+
response_data=response_data,
|
402
|
+
response_types_map=_response_types_map,
|
403
|
+
).data
|
404
|
+
|
405
|
+
|
406
|
+
@validate_call
|
407
|
+
def create_workspace_api_key_with_http_info(
|
408
|
+
self,
|
409
|
+
workspace: Annotated[StrictStr, Field(description="The Workspace ID")],
|
410
|
+
create_workspace_api_key_body: Optional[CreateWorkspaceApiKeyBody] = None,
|
411
|
+
_request_timeout: Union[
|
412
|
+
None,
|
413
|
+
Annotated[StrictFloat, Field(gt=0)],
|
414
|
+
Tuple[
|
415
|
+
Annotated[StrictFloat, Field(gt=0)],
|
416
|
+
Annotated[StrictFloat, Field(gt=0)]
|
417
|
+
]
|
418
|
+
] = None,
|
419
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
420
|
+
_content_type: Optional[StrictStr] = None,
|
421
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
422
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=1)] = 0,
|
423
|
+
) -> ApiResponse[WorkspaceApiKey]:
|
424
|
+
"""Create workspace API key
|
425
|
+
|
426
|
+
Create an API key for a workspace.
|
427
|
+
|
428
|
+
:param workspace: The Workspace ID (required)
|
429
|
+
:type workspace: str
|
430
|
+
:param create_workspace_api_key_body:
|
431
|
+
:type create_workspace_api_key_body: CreateWorkspaceApiKeyBody
|
432
|
+
:param _request_timeout: timeout setting for this request. If one
|
433
|
+
number provided, it will be total request
|
434
|
+
timeout. It can also be a pair (tuple) of
|
435
|
+
(connection, read) timeouts.
|
436
|
+
:type _request_timeout: int, tuple(int, int), optional
|
437
|
+
:param _request_auth: set to override the auth_settings for an a single
|
438
|
+
request; this effectively ignores the
|
439
|
+
authentication in the spec for a single request.
|
440
|
+
:type _request_auth: dict, optional
|
441
|
+
:param _content_type: force content-type for the request.
|
442
|
+
:type _content_type: str, Optional
|
443
|
+
:param _headers: set to override the headers for a single
|
444
|
+
request; this effectively ignores the headers
|
445
|
+
in the spec for a single request.
|
446
|
+
:type _headers: dict, optional
|
447
|
+
:param _host_index: set to override the host_index for a single
|
448
|
+
request; this effectively ignores the host_index
|
449
|
+
in the spec for a single request.
|
450
|
+
:type _host_index: int, optional
|
451
|
+
:return: Returns the result object.
|
452
|
+
""" # noqa: E501
|
453
|
+
|
454
|
+
_param = self._create_workspace_api_key_serialize(
|
455
|
+
workspace=workspace,
|
456
|
+
create_workspace_api_key_body=create_workspace_api_key_body,
|
457
|
+
_request_auth=_request_auth,
|
458
|
+
_content_type=_content_type,
|
459
|
+
_headers=_headers,
|
460
|
+
_host_index=_host_index
|
461
|
+
)
|
462
|
+
|
463
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
464
|
+
'201': "WorkspaceApiKey",
|
465
|
+
}
|
466
|
+
response_data = self.api_client.call_api(
|
467
|
+
*_param,
|
468
|
+
_request_timeout=_request_timeout
|
469
|
+
)
|
470
|
+
response_data.read()
|
471
|
+
return self.api_client.response_deserialize(
|
472
|
+
response_data=response_data,
|
473
|
+
response_types_map=_response_types_map,
|
474
|
+
)
|
475
|
+
|
476
|
+
|
477
|
+
@validate_call
|
478
|
+
def create_workspace_api_key_without_preload_content(
|
479
|
+
self,
|
480
|
+
workspace: Annotated[StrictStr, Field(description="The Workspace ID")],
|
481
|
+
create_workspace_api_key_body: Optional[CreateWorkspaceApiKeyBody] = None,
|
482
|
+
_request_timeout: Union[
|
483
|
+
None,
|
484
|
+
Annotated[StrictFloat, Field(gt=0)],
|
485
|
+
Tuple[
|
486
|
+
Annotated[StrictFloat, Field(gt=0)],
|
487
|
+
Annotated[StrictFloat, Field(gt=0)]
|
488
|
+
]
|
489
|
+
] = None,
|
490
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
491
|
+
_content_type: Optional[StrictStr] = None,
|
492
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
493
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=1)] = 0,
|
494
|
+
) -> RESTResponseType:
|
495
|
+
"""Create workspace API key
|
496
|
+
|
497
|
+
Create an API key for a workspace.
|
498
|
+
|
499
|
+
:param workspace: The Workspace ID (required)
|
500
|
+
:type workspace: str
|
501
|
+
:param create_workspace_api_key_body:
|
502
|
+
:type create_workspace_api_key_body: CreateWorkspaceApiKeyBody
|
503
|
+
:param _request_timeout: timeout setting for this request. If one
|
504
|
+
number provided, it will be total request
|
505
|
+
timeout. It can also be a pair (tuple) of
|
506
|
+
(connection, read) timeouts.
|
507
|
+
:type _request_timeout: int, tuple(int, int), optional
|
508
|
+
:param _request_auth: set to override the auth_settings for an a single
|
509
|
+
request; this effectively ignores the
|
510
|
+
authentication in the spec for a single request.
|
511
|
+
:type _request_auth: dict, optional
|
512
|
+
:param _content_type: force content-type for the request.
|
513
|
+
:type _content_type: str, Optional
|
514
|
+
:param _headers: set to override the headers for a single
|
515
|
+
request; this effectively ignores the headers
|
516
|
+
in the spec for a single request.
|
517
|
+
:type _headers: dict, optional
|
518
|
+
:param _host_index: set to override the host_index for a single
|
519
|
+
request; this effectively ignores the host_index
|
520
|
+
in the spec for a single request.
|
521
|
+
:type _host_index: int, optional
|
522
|
+
:return: Returns the result object.
|
523
|
+
""" # noqa: E501
|
524
|
+
|
525
|
+
_param = self._create_workspace_api_key_serialize(
|
526
|
+
workspace=workspace,
|
527
|
+
create_workspace_api_key_body=create_workspace_api_key_body,
|
528
|
+
_request_auth=_request_auth,
|
529
|
+
_content_type=_content_type,
|
530
|
+
_headers=_headers,
|
531
|
+
_host_index=_host_index
|
532
|
+
)
|
533
|
+
|
534
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
535
|
+
'201': "WorkspaceApiKey",
|
536
|
+
}
|
537
|
+
response_data = self.api_client.call_api(
|
538
|
+
*_param,
|
539
|
+
_request_timeout=_request_timeout
|
540
|
+
)
|
541
|
+
return response_data.response
|
542
|
+
|
543
|
+
|
544
|
+
def _create_workspace_api_key_serialize(
|
545
|
+
self,
|
546
|
+
workspace,
|
547
|
+
create_workspace_api_key_body,
|
548
|
+
_request_auth,
|
549
|
+
_content_type,
|
550
|
+
_headers,
|
551
|
+
_host_index,
|
552
|
+
) -> RequestSerialized:
|
553
|
+
|
554
|
+
_hosts = [
|
555
|
+
'https://api.console.ory.sh'
|
556
|
+
]
|
557
|
+
_host = _hosts[_host_index]
|
558
|
+
|
559
|
+
_collection_formats: Dict[str, str] = {
|
560
|
+
}
|
561
|
+
|
562
|
+
_path_params: Dict[str, str] = {}
|
563
|
+
_query_params: List[Tuple[str, str]] = []
|
564
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
565
|
+
_form_params: List[Tuple[str, str]] = []
|
566
|
+
_files: Dict[
|
567
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
568
|
+
] = {}
|
569
|
+
_body_params: Optional[bytes] = None
|
570
|
+
|
571
|
+
# process the path parameters
|
572
|
+
if workspace is not None:
|
573
|
+
_path_params['workspace'] = workspace
|
574
|
+
# process the query parameters
|
575
|
+
# process the header parameters
|
576
|
+
# process the form parameters
|
577
|
+
# process the body parameter
|
578
|
+
if create_workspace_api_key_body is not None:
|
579
|
+
_body_params = create_workspace_api_key_body
|
580
|
+
|
581
|
+
|
582
|
+
# set the HTTP header `Accept`
|
583
|
+
if 'Accept' not in _header_params:
|
584
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
585
|
+
[
|
586
|
+
'application/json'
|
587
|
+
]
|
588
|
+
)
|
292
589
|
|
293
590
|
# set the HTTP header `Content-Type`
|
294
591
|
if _content_type:
|
@@ -301,8 +598,287 @@ class WorkspaceApi:
|
|
301
598
|
]
|
302
599
|
)
|
303
600
|
)
|
304
|
-
if _default_content_type is not None:
|
305
|
-
_header_params['Content-Type'] = _default_content_type
|
601
|
+
if _default_content_type is not None:
|
602
|
+
_header_params['Content-Type'] = _default_content_type
|
603
|
+
|
604
|
+
# authentication setting
|
605
|
+
_auth_settings: List[str] = [
|
606
|
+
'oryWorkspaceApiKey'
|
607
|
+
]
|
608
|
+
|
609
|
+
return self.api_client.param_serialize(
|
610
|
+
method='POST',
|
611
|
+
resource_path='/workspaces/{workspace}/tokens',
|
612
|
+
path_params=_path_params,
|
613
|
+
query_params=_query_params,
|
614
|
+
header_params=_header_params,
|
615
|
+
body=_body_params,
|
616
|
+
post_params=_form_params,
|
617
|
+
files=_files,
|
618
|
+
auth_settings=_auth_settings,
|
619
|
+
collection_formats=_collection_formats,
|
620
|
+
_host=_host,
|
621
|
+
_request_auth=_request_auth
|
622
|
+
)
|
623
|
+
|
624
|
+
|
625
|
+
|
626
|
+
|
627
|
+
@validate_call
|
628
|
+
def delete_workspace_api_key(
|
629
|
+
self,
|
630
|
+
workspace: Annotated[StrictStr, Field(description="The Workspace ID or Workspace slug")],
|
631
|
+
token_id: Annotated[StrictStr, Field(description="The Token ID")],
|
632
|
+
_request_timeout: Union[
|
633
|
+
None,
|
634
|
+
Annotated[StrictFloat, Field(gt=0)],
|
635
|
+
Tuple[
|
636
|
+
Annotated[StrictFloat, Field(gt=0)],
|
637
|
+
Annotated[StrictFloat, Field(gt=0)]
|
638
|
+
]
|
639
|
+
] = None,
|
640
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
641
|
+
_content_type: Optional[StrictStr] = None,
|
642
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
643
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=1)] = 0,
|
644
|
+
) -> None:
|
645
|
+
"""Delete workspace API key
|
646
|
+
|
647
|
+
Deletes an API key and immediately removes it.
|
648
|
+
|
649
|
+
:param workspace: The Workspace ID or Workspace slug (required)
|
650
|
+
:type workspace: str
|
651
|
+
:param token_id: The Token ID (required)
|
652
|
+
:type token_id: str
|
653
|
+
:param _request_timeout: timeout setting for this request. If one
|
654
|
+
number provided, it will be total request
|
655
|
+
timeout. It can also be a pair (tuple) of
|
656
|
+
(connection, read) timeouts.
|
657
|
+
:type _request_timeout: int, tuple(int, int), optional
|
658
|
+
:param _request_auth: set to override the auth_settings for an a single
|
659
|
+
request; this effectively ignores the
|
660
|
+
authentication in the spec for a single request.
|
661
|
+
:type _request_auth: dict, optional
|
662
|
+
:param _content_type: force content-type for the request.
|
663
|
+
:type _content_type: str, Optional
|
664
|
+
:param _headers: set to override the headers for a single
|
665
|
+
request; this effectively ignores the headers
|
666
|
+
in the spec for a single request.
|
667
|
+
:type _headers: dict, optional
|
668
|
+
:param _host_index: set to override the host_index for a single
|
669
|
+
request; this effectively ignores the host_index
|
670
|
+
in the spec for a single request.
|
671
|
+
:type _host_index: int, optional
|
672
|
+
:return: Returns the result object.
|
673
|
+
""" # noqa: E501
|
674
|
+
|
675
|
+
_param = self._delete_workspace_api_key_serialize(
|
676
|
+
workspace=workspace,
|
677
|
+
token_id=token_id,
|
678
|
+
_request_auth=_request_auth,
|
679
|
+
_content_type=_content_type,
|
680
|
+
_headers=_headers,
|
681
|
+
_host_index=_host_index
|
682
|
+
)
|
683
|
+
|
684
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
685
|
+
'204': None,
|
686
|
+
}
|
687
|
+
response_data = self.api_client.call_api(
|
688
|
+
*_param,
|
689
|
+
_request_timeout=_request_timeout
|
690
|
+
)
|
691
|
+
response_data.read()
|
692
|
+
return self.api_client.response_deserialize(
|
693
|
+
response_data=response_data,
|
694
|
+
response_types_map=_response_types_map,
|
695
|
+
).data
|
696
|
+
|
697
|
+
|
698
|
+
@validate_call
|
699
|
+
def delete_workspace_api_key_with_http_info(
|
700
|
+
self,
|
701
|
+
workspace: Annotated[StrictStr, Field(description="The Workspace ID or Workspace slug")],
|
702
|
+
token_id: Annotated[StrictStr, Field(description="The Token ID")],
|
703
|
+
_request_timeout: Union[
|
704
|
+
None,
|
705
|
+
Annotated[StrictFloat, Field(gt=0)],
|
706
|
+
Tuple[
|
707
|
+
Annotated[StrictFloat, Field(gt=0)],
|
708
|
+
Annotated[StrictFloat, Field(gt=0)]
|
709
|
+
]
|
710
|
+
] = None,
|
711
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
712
|
+
_content_type: Optional[StrictStr] = None,
|
713
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
714
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=1)] = 0,
|
715
|
+
) -> ApiResponse[None]:
|
716
|
+
"""Delete workspace API key
|
717
|
+
|
718
|
+
Deletes an API key and immediately removes it.
|
719
|
+
|
720
|
+
:param workspace: The Workspace ID or Workspace slug (required)
|
721
|
+
:type workspace: str
|
722
|
+
:param token_id: The Token ID (required)
|
723
|
+
:type token_id: str
|
724
|
+
:param _request_timeout: timeout setting for this request. If one
|
725
|
+
number provided, it will be total request
|
726
|
+
timeout. It can also be a pair (tuple) of
|
727
|
+
(connection, read) timeouts.
|
728
|
+
:type _request_timeout: int, tuple(int, int), optional
|
729
|
+
:param _request_auth: set to override the auth_settings for an a single
|
730
|
+
request; this effectively ignores the
|
731
|
+
authentication in the spec for a single request.
|
732
|
+
:type _request_auth: dict, optional
|
733
|
+
:param _content_type: force content-type for the request.
|
734
|
+
:type _content_type: str, Optional
|
735
|
+
:param _headers: set to override the headers for a single
|
736
|
+
request; this effectively ignores the headers
|
737
|
+
in the spec for a single request.
|
738
|
+
:type _headers: dict, optional
|
739
|
+
:param _host_index: set to override the host_index for a single
|
740
|
+
request; this effectively ignores the host_index
|
741
|
+
in the spec for a single request.
|
742
|
+
:type _host_index: int, optional
|
743
|
+
:return: Returns the result object.
|
744
|
+
""" # noqa: E501
|
745
|
+
|
746
|
+
_param = self._delete_workspace_api_key_serialize(
|
747
|
+
workspace=workspace,
|
748
|
+
token_id=token_id,
|
749
|
+
_request_auth=_request_auth,
|
750
|
+
_content_type=_content_type,
|
751
|
+
_headers=_headers,
|
752
|
+
_host_index=_host_index
|
753
|
+
)
|
754
|
+
|
755
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
756
|
+
'204': None,
|
757
|
+
}
|
758
|
+
response_data = self.api_client.call_api(
|
759
|
+
*_param,
|
760
|
+
_request_timeout=_request_timeout
|
761
|
+
)
|
762
|
+
response_data.read()
|
763
|
+
return self.api_client.response_deserialize(
|
764
|
+
response_data=response_data,
|
765
|
+
response_types_map=_response_types_map,
|
766
|
+
)
|
767
|
+
|
768
|
+
|
769
|
+
@validate_call
|
770
|
+
def delete_workspace_api_key_without_preload_content(
|
771
|
+
self,
|
772
|
+
workspace: Annotated[StrictStr, Field(description="The Workspace ID or Workspace slug")],
|
773
|
+
token_id: Annotated[StrictStr, Field(description="The Token ID")],
|
774
|
+
_request_timeout: Union[
|
775
|
+
None,
|
776
|
+
Annotated[StrictFloat, Field(gt=0)],
|
777
|
+
Tuple[
|
778
|
+
Annotated[StrictFloat, Field(gt=0)],
|
779
|
+
Annotated[StrictFloat, Field(gt=0)]
|
780
|
+
]
|
781
|
+
] = None,
|
782
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
783
|
+
_content_type: Optional[StrictStr] = None,
|
784
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
785
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=1)] = 0,
|
786
|
+
) -> RESTResponseType:
|
787
|
+
"""Delete workspace API key
|
788
|
+
|
789
|
+
Deletes an API key and immediately removes it.
|
790
|
+
|
791
|
+
:param workspace: The Workspace ID or Workspace slug (required)
|
792
|
+
:type workspace: str
|
793
|
+
:param token_id: The Token ID (required)
|
794
|
+
:type token_id: str
|
795
|
+
:param _request_timeout: timeout setting for this request. If one
|
796
|
+
number provided, it will be total request
|
797
|
+
timeout. It can also be a pair (tuple) of
|
798
|
+
(connection, read) timeouts.
|
799
|
+
:type _request_timeout: int, tuple(int, int), optional
|
800
|
+
:param _request_auth: set to override the auth_settings for an a single
|
801
|
+
request; this effectively ignores the
|
802
|
+
authentication in the spec for a single request.
|
803
|
+
:type _request_auth: dict, optional
|
804
|
+
:param _content_type: force content-type for the request.
|
805
|
+
:type _content_type: str, Optional
|
806
|
+
:param _headers: set to override the headers for a single
|
807
|
+
request; this effectively ignores the headers
|
808
|
+
in the spec for a single request.
|
809
|
+
:type _headers: dict, optional
|
810
|
+
:param _host_index: set to override the host_index for a single
|
811
|
+
request; this effectively ignores the host_index
|
812
|
+
in the spec for a single request.
|
813
|
+
:type _host_index: int, optional
|
814
|
+
:return: Returns the result object.
|
815
|
+
""" # noqa: E501
|
816
|
+
|
817
|
+
_param = self._delete_workspace_api_key_serialize(
|
818
|
+
workspace=workspace,
|
819
|
+
token_id=token_id,
|
820
|
+
_request_auth=_request_auth,
|
821
|
+
_content_type=_content_type,
|
822
|
+
_headers=_headers,
|
823
|
+
_host_index=_host_index
|
824
|
+
)
|
825
|
+
|
826
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
827
|
+
'204': None,
|
828
|
+
}
|
829
|
+
response_data = self.api_client.call_api(
|
830
|
+
*_param,
|
831
|
+
_request_timeout=_request_timeout
|
832
|
+
)
|
833
|
+
return response_data.response
|
834
|
+
|
835
|
+
|
836
|
+
def _delete_workspace_api_key_serialize(
|
837
|
+
self,
|
838
|
+
workspace,
|
839
|
+
token_id,
|
840
|
+
_request_auth,
|
841
|
+
_content_type,
|
842
|
+
_headers,
|
843
|
+
_host_index,
|
844
|
+
) -> RequestSerialized:
|
845
|
+
|
846
|
+
_hosts = [
|
847
|
+
'https://api.console.ory.sh'
|
848
|
+
]
|
849
|
+
_host = _hosts[_host_index]
|
850
|
+
|
851
|
+
_collection_formats: Dict[str, str] = {
|
852
|
+
}
|
853
|
+
|
854
|
+
_path_params: Dict[str, str] = {}
|
855
|
+
_query_params: List[Tuple[str, str]] = []
|
856
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
857
|
+
_form_params: List[Tuple[str, str]] = []
|
858
|
+
_files: Dict[
|
859
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
860
|
+
] = {}
|
861
|
+
_body_params: Optional[bytes] = None
|
862
|
+
|
863
|
+
# process the path parameters
|
864
|
+
if workspace is not None:
|
865
|
+
_path_params['workspace'] = workspace
|
866
|
+
if token_id is not None:
|
867
|
+
_path_params['token_id'] = token_id
|
868
|
+
# process the query parameters
|
869
|
+
# process the header parameters
|
870
|
+
# process the form parameters
|
871
|
+
# process the body parameter
|
872
|
+
|
873
|
+
|
874
|
+
# set the HTTP header `Accept`
|
875
|
+
if 'Accept' not in _header_params:
|
876
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
877
|
+
[
|
878
|
+
'application/json'
|
879
|
+
]
|
880
|
+
)
|
881
|
+
|
306
882
|
|
307
883
|
# authentication setting
|
308
884
|
_auth_settings: List[str] = [
|
@@ -310,8 +886,8 @@ class WorkspaceApi:
|
|
310
886
|
]
|
311
887
|
|
312
888
|
return self.api_client.param_serialize(
|
313
|
-
method='
|
314
|
-
resource_path='/workspaces',
|
889
|
+
method='DELETE',
|
890
|
+
resource_path='/workspaces/{workspace}/tokens/{token_id}',
|
315
891
|
path_params=_path_params,
|
316
892
|
query_params=_query_params,
|
317
893
|
header_params=_header_params,
|
@@ -557,7 +1133,9 @@ class WorkspaceApi:
|
|
557
1133
|
_query_params: List[Tuple[str, str]] = []
|
558
1134
|
_header_params: Dict[str, Optional[str]] = _headers or {}
|
559
1135
|
_form_params: List[Tuple[str, str]] = []
|
560
|
-
_files: Dict[
|
1136
|
+
_files: Dict[
|
1137
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
1138
|
+
] = {}
|
561
1139
|
_body_params: Optional[bytes] = None
|
562
1140
|
|
563
1141
|
# process the path parameters
|
@@ -570,11 +1148,276 @@ class WorkspaceApi:
|
|
570
1148
|
|
571
1149
|
|
572
1150
|
# set the HTTP header `Accept`
|
573
|
-
|
574
|
-
[
|
575
|
-
|
1151
|
+
if 'Accept' not in _header_params:
|
1152
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
1153
|
+
[
|
1154
|
+
'application/json'
|
1155
|
+
]
|
1156
|
+
)
|
1157
|
+
|
1158
|
+
|
1159
|
+
# authentication setting
|
1160
|
+
_auth_settings: List[str] = [
|
1161
|
+
'oryWorkspaceApiKey'
|
1162
|
+
]
|
1163
|
+
|
1164
|
+
return self.api_client.param_serialize(
|
1165
|
+
method='GET',
|
1166
|
+
resource_path='/workspaces/{workspace}',
|
1167
|
+
path_params=_path_params,
|
1168
|
+
query_params=_query_params,
|
1169
|
+
header_params=_header_params,
|
1170
|
+
body=_body_params,
|
1171
|
+
post_params=_form_params,
|
1172
|
+
files=_files,
|
1173
|
+
auth_settings=_auth_settings,
|
1174
|
+
collection_formats=_collection_formats,
|
1175
|
+
_host=_host,
|
1176
|
+
_request_auth=_request_auth
|
1177
|
+
)
|
1178
|
+
|
1179
|
+
|
1180
|
+
|
1181
|
+
|
1182
|
+
@validate_call
|
1183
|
+
def list_workspace_api_keys(
|
1184
|
+
self,
|
1185
|
+
workspace: Annotated[StrictStr, Field(description="The Workspace ID or Workspace slug")],
|
1186
|
+
_request_timeout: Union[
|
1187
|
+
None,
|
1188
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1189
|
+
Tuple[
|
1190
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1191
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1192
|
+
]
|
1193
|
+
] = None,
|
1194
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1195
|
+
_content_type: Optional[StrictStr] = None,
|
1196
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1197
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=1)] = 0,
|
1198
|
+
) -> List[WorkspaceApiKey]:
|
1199
|
+
"""List a workspace's API keys
|
1200
|
+
|
1201
|
+
A list of all the workspace's API keys.
|
1202
|
+
|
1203
|
+
:param workspace: The Workspace ID or Workspace slug (required)
|
1204
|
+
:type workspace: str
|
1205
|
+
:param _request_timeout: timeout setting for this request. If one
|
1206
|
+
number provided, it will be total request
|
1207
|
+
timeout. It can also be a pair (tuple) of
|
1208
|
+
(connection, read) timeouts.
|
1209
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1210
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1211
|
+
request; this effectively ignores the
|
1212
|
+
authentication in the spec for a single request.
|
1213
|
+
:type _request_auth: dict, optional
|
1214
|
+
:param _content_type: force content-type for the request.
|
1215
|
+
:type _content_type: str, Optional
|
1216
|
+
:param _headers: set to override the headers for a single
|
1217
|
+
request; this effectively ignores the headers
|
1218
|
+
in the spec for a single request.
|
1219
|
+
:type _headers: dict, optional
|
1220
|
+
:param _host_index: set to override the host_index for a single
|
1221
|
+
request; this effectively ignores the host_index
|
1222
|
+
in the spec for a single request.
|
1223
|
+
:type _host_index: int, optional
|
1224
|
+
:return: Returns the result object.
|
1225
|
+
""" # noqa: E501
|
1226
|
+
|
1227
|
+
_param = self._list_workspace_api_keys_serialize(
|
1228
|
+
workspace=workspace,
|
1229
|
+
_request_auth=_request_auth,
|
1230
|
+
_content_type=_content_type,
|
1231
|
+
_headers=_headers,
|
1232
|
+
_host_index=_host_index
|
1233
|
+
)
|
1234
|
+
|
1235
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1236
|
+
'200': "List[WorkspaceApiKey]",
|
1237
|
+
}
|
1238
|
+
response_data = self.api_client.call_api(
|
1239
|
+
*_param,
|
1240
|
+
_request_timeout=_request_timeout
|
1241
|
+
)
|
1242
|
+
response_data.read()
|
1243
|
+
return self.api_client.response_deserialize(
|
1244
|
+
response_data=response_data,
|
1245
|
+
response_types_map=_response_types_map,
|
1246
|
+
).data
|
1247
|
+
|
1248
|
+
|
1249
|
+
@validate_call
|
1250
|
+
def list_workspace_api_keys_with_http_info(
|
1251
|
+
self,
|
1252
|
+
workspace: Annotated[StrictStr, Field(description="The Workspace ID or Workspace slug")],
|
1253
|
+
_request_timeout: Union[
|
1254
|
+
None,
|
1255
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1256
|
+
Tuple[
|
1257
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1258
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1259
|
+
]
|
1260
|
+
] = None,
|
1261
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1262
|
+
_content_type: Optional[StrictStr] = None,
|
1263
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1264
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=1)] = 0,
|
1265
|
+
) -> ApiResponse[List[WorkspaceApiKey]]:
|
1266
|
+
"""List a workspace's API keys
|
1267
|
+
|
1268
|
+
A list of all the workspace's API keys.
|
1269
|
+
|
1270
|
+
:param workspace: The Workspace ID or Workspace slug (required)
|
1271
|
+
:type workspace: str
|
1272
|
+
:param _request_timeout: timeout setting for this request. If one
|
1273
|
+
number provided, it will be total request
|
1274
|
+
timeout. It can also be a pair (tuple) of
|
1275
|
+
(connection, read) timeouts.
|
1276
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1277
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1278
|
+
request; this effectively ignores the
|
1279
|
+
authentication in the spec for a single request.
|
1280
|
+
:type _request_auth: dict, optional
|
1281
|
+
:param _content_type: force content-type for the request.
|
1282
|
+
:type _content_type: str, Optional
|
1283
|
+
:param _headers: set to override the headers for a single
|
1284
|
+
request; this effectively ignores the headers
|
1285
|
+
in the spec for a single request.
|
1286
|
+
:type _headers: dict, optional
|
1287
|
+
:param _host_index: set to override the host_index for a single
|
1288
|
+
request; this effectively ignores the host_index
|
1289
|
+
in the spec for a single request.
|
1290
|
+
:type _host_index: int, optional
|
1291
|
+
:return: Returns the result object.
|
1292
|
+
""" # noqa: E501
|
1293
|
+
|
1294
|
+
_param = self._list_workspace_api_keys_serialize(
|
1295
|
+
workspace=workspace,
|
1296
|
+
_request_auth=_request_auth,
|
1297
|
+
_content_type=_content_type,
|
1298
|
+
_headers=_headers,
|
1299
|
+
_host_index=_host_index
|
1300
|
+
)
|
1301
|
+
|
1302
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1303
|
+
'200': "List[WorkspaceApiKey]",
|
1304
|
+
}
|
1305
|
+
response_data = self.api_client.call_api(
|
1306
|
+
*_param,
|
1307
|
+
_request_timeout=_request_timeout
|
1308
|
+
)
|
1309
|
+
response_data.read()
|
1310
|
+
return self.api_client.response_deserialize(
|
1311
|
+
response_data=response_data,
|
1312
|
+
response_types_map=_response_types_map,
|
1313
|
+
)
|
1314
|
+
|
1315
|
+
|
1316
|
+
@validate_call
|
1317
|
+
def list_workspace_api_keys_without_preload_content(
|
1318
|
+
self,
|
1319
|
+
workspace: Annotated[StrictStr, Field(description="The Workspace ID or Workspace slug")],
|
1320
|
+
_request_timeout: Union[
|
1321
|
+
None,
|
1322
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1323
|
+
Tuple[
|
1324
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1325
|
+
Annotated[StrictFloat, Field(gt=0)]
|
576
1326
|
]
|
1327
|
+
] = None,
|
1328
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1329
|
+
_content_type: Optional[StrictStr] = None,
|
1330
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1331
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=1)] = 0,
|
1332
|
+
) -> RESTResponseType:
|
1333
|
+
"""List a workspace's API keys
|
1334
|
+
|
1335
|
+
A list of all the workspace's API keys.
|
1336
|
+
|
1337
|
+
:param workspace: The Workspace ID or Workspace slug (required)
|
1338
|
+
:type workspace: str
|
1339
|
+
:param _request_timeout: timeout setting for this request. If one
|
1340
|
+
number provided, it will be total request
|
1341
|
+
timeout. It can also be a pair (tuple) of
|
1342
|
+
(connection, read) timeouts.
|
1343
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1344
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1345
|
+
request; this effectively ignores the
|
1346
|
+
authentication in the spec for a single request.
|
1347
|
+
:type _request_auth: dict, optional
|
1348
|
+
:param _content_type: force content-type for the request.
|
1349
|
+
:type _content_type: str, Optional
|
1350
|
+
:param _headers: set to override the headers for a single
|
1351
|
+
request; this effectively ignores the headers
|
1352
|
+
in the spec for a single request.
|
1353
|
+
:type _headers: dict, optional
|
1354
|
+
:param _host_index: set to override the host_index for a single
|
1355
|
+
request; this effectively ignores the host_index
|
1356
|
+
in the spec for a single request.
|
1357
|
+
:type _host_index: int, optional
|
1358
|
+
:return: Returns the result object.
|
1359
|
+
""" # noqa: E501
|
1360
|
+
|
1361
|
+
_param = self._list_workspace_api_keys_serialize(
|
1362
|
+
workspace=workspace,
|
1363
|
+
_request_auth=_request_auth,
|
1364
|
+
_content_type=_content_type,
|
1365
|
+
_headers=_headers,
|
1366
|
+
_host_index=_host_index
|
1367
|
+
)
|
1368
|
+
|
1369
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1370
|
+
'200': "List[WorkspaceApiKey]",
|
1371
|
+
}
|
1372
|
+
response_data = self.api_client.call_api(
|
1373
|
+
*_param,
|
1374
|
+
_request_timeout=_request_timeout
|
577
1375
|
)
|
1376
|
+
return response_data.response
|
1377
|
+
|
1378
|
+
|
1379
|
+
def _list_workspace_api_keys_serialize(
|
1380
|
+
self,
|
1381
|
+
workspace,
|
1382
|
+
_request_auth,
|
1383
|
+
_content_type,
|
1384
|
+
_headers,
|
1385
|
+
_host_index,
|
1386
|
+
) -> RequestSerialized:
|
1387
|
+
|
1388
|
+
_hosts = [
|
1389
|
+
'https://api.console.ory.sh'
|
1390
|
+
]
|
1391
|
+
_host = _hosts[_host_index]
|
1392
|
+
|
1393
|
+
_collection_formats: Dict[str, str] = {
|
1394
|
+
}
|
1395
|
+
|
1396
|
+
_path_params: Dict[str, str] = {}
|
1397
|
+
_query_params: List[Tuple[str, str]] = []
|
1398
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
1399
|
+
_form_params: List[Tuple[str, str]] = []
|
1400
|
+
_files: Dict[
|
1401
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
1402
|
+
] = {}
|
1403
|
+
_body_params: Optional[bytes] = None
|
1404
|
+
|
1405
|
+
# process the path parameters
|
1406
|
+
if workspace is not None:
|
1407
|
+
_path_params['workspace'] = workspace
|
1408
|
+
# process the query parameters
|
1409
|
+
# process the header parameters
|
1410
|
+
# process the form parameters
|
1411
|
+
# process the body parameter
|
1412
|
+
|
1413
|
+
|
1414
|
+
# set the HTTP header `Accept`
|
1415
|
+
if 'Accept' not in _header_params:
|
1416
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
1417
|
+
[
|
1418
|
+
'application/json'
|
1419
|
+
]
|
1420
|
+
)
|
578
1421
|
|
579
1422
|
|
580
1423
|
# authentication setting
|
@@ -584,7 +1427,7 @@ class WorkspaceApi:
|
|
584
1427
|
|
585
1428
|
return self.api_client.param_serialize(
|
586
1429
|
method='GET',
|
587
|
-
resource_path='/workspaces/{workspace}',
|
1430
|
+
resource_path='/workspaces/{workspace}/tokens',
|
588
1431
|
path_params=_path_params,
|
589
1432
|
query_params=_query_params,
|
590
1433
|
header_params=_header_params,
|
@@ -830,7 +1673,9 @@ class WorkspaceApi:
|
|
830
1673
|
_query_params: List[Tuple[str, str]] = []
|
831
1674
|
_header_params: Dict[str, Optional[str]] = _headers or {}
|
832
1675
|
_form_params: List[Tuple[str, str]] = []
|
833
|
-
_files: Dict[
|
1676
|
+
_files: Dict[
|
1677
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
1678
|
+
] = {}
|
834
1679
|
_body_params: Optional[bytes] = None
|
835
1680
|
|
836
1681
|
# process the path parameters
|
@@ -843,11 +1688,12 @@ class WorkspaceApi:
|
|
843
1688
|
|
844
1689
|
|
845
1690
|
# set the HTTP header `Accept`
|
846
|
-
|
847
|
-
[
|
848
|
-
|
849
|
-
|
850
|
-
|
1691
|
+
if 'Accept' not in _header_params:
|
1692
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
1693
|
+
[
|
1694
|
+
'application/json'
|
1695
|
+
]
|
1696
|
+
)
|
851
1697
|
|
852
1698
|
|
853
1699
|
# authentication setting
|
@@ -1113,7 +1959,9 @@ class WorkspaceApi:
|
|
1113
1959
|
_query_params: List[Tuple[str, str]] = []
|
1114
1960
|
_header_params: Dict[str, Optional[str]] = _headers or {}
|
1115
1961
|
_form_params: List[Tuple[str, str]] = []
|
1116
|
-
_files: Dict[
|
1962
|
+
_files: Dict[
|
1963
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
1964
|
+
] = {}
|
1117
1965
|
_body_params: Optional[bytes] = None
|
1118
1966
|
|
1119
1967
|
# process the path parameters
|
@@ -1132,11 +1980,12 @@ class WorkspaceApi:
|
|
1132
1980
|
|
1133
1981
|
|
1134
1982
|
# set the HTTP header `Accept`
|
1135
|
-
|
1136
|
-
[
|
1137
|
-
|
1138
|
-
|
1139
|
-
|
1983
|
+
if 'Accept' not in _header_params:
|
1984
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
1985
|
+
[
|
1986
|
+
'application/json'
|
1987
|
+
]
|
1988
|
+
)
|
1140
1989
|
|
1141
1990
|
|
1142
1991
|
# authentication setting
|
@@ -1405,7 +2254,9 @@ class WorkspaceApi:
|
|
1405
2254
|
_query_params: List[Tuple[str, str]] = []
|
1406
2255
|
_header_params: Dict[str, Optional[str]] = _headers or {}
|
1407
2256
|
_form_params: List[Tuple[str, str]] = []
|
1408
|
-
_files: Dict[
|
2257
|
+
_files: Dict[
|
2258
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
2259
|
+
] = {}
|
1409
2260
|
_body_params: Optional[bytes] = None
|
1410
2261
|
|
1411
2262
|
# process the path parameters
|
@@ -1420,11 +2271,12 @@ class WorkspaceApi:
|
|
1420
2271
|
|
1421
2272
|
|
1422
2273
|
# set the HTTP header `Accept`
|
1423
|
-
|
1424
|
-
[
|
1425
|
-
|
1426
|
-
|
1427
|
-
|
2274
|
+
if 'Accept' not in _header_params:
|
2275
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
2276
|
+
[
|
2277
|
+
'application/json'
|
2278
|
+
]
|
2279
|
+
)
|
1428
2280
|
|
1429
2281
|
# set the HTTP header `Content-Type`
|
1430
2282
|
if _content_type:
|