ory-client 1.12.2__py3-none-any.whl → 1.16.10__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 +17 -15
- ory_client/api/events_api.py +30 -26
- ory_client/api/frontend_api.py +1677 -1064
- ory_client/api/identity_api.py +161 -126
- ory_client/api/jwk_api.py +51 -44
- ory_client/api/metadata_api.py +9 -8
- ory_client/api/o_auth2_api.py +236 -191
- ory_client/api/oidc_api.py +52 -45
- ory_client/api/permission_api.py +331 -32
- ory_client/api/project_api.py +482 -145
- ory_client/api/relationship_api.py +44 -38
- ory_client/api/wellknown_api.py +12 -11
- ory_client/api/workspace_api.py +870 -34
- ory_client/api_client.py +54 -31
- ory_client/configuration.py +23 -9
- ory_client/exceptions.py +2 -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 +2 -2
- ory_client/models/billing_period_bucket.py +2 -2
- ory_client/models/check_opl_syntax_result.py +2 -2
- 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 +10 -3
- ory_client/models/create_invite_response.py +2 -2
- 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 +42 -6
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- ory_client/models/get_project_events_response.py +2 -2
- ory_client/models/get_project_metrics_response.py +2 -2
- ory_client/models/get_session_activity_response.py +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +9 -5
- 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 +2 -2
- ory_client/models/keto_namespace.py +2 -2
- ory_client/models/line_item_v1.py +2 -2
- ory_client/models/list_event_streams.py +2 -2
- ory_client/models/list_invoices_response.py +2 -2
- ory_client/models/list_organizations_response.py +2 -2
- ory_client/models/list_workspace_projects.py +2 -2
- ory_client/models/list_workspaces.py +2 -2
- 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 +2 -2
- 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 +39 -3
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- ory_client/models/project_branding_colors.py +2 -2
- ory_client/models/project_branding_theme.py +2 -2
- ory_client/models/project_cors.py +2 -2
- ory_client/models/project_events_datapoint.py +2 -2
- 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 +2 -2
- 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 +2 -2
- ory_client/models/relationship_patch.py +2 -2
- ory_client/models/relationships.py +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- ory_client/models/successful_native_registration.py +2 -2
- ory_client/models/successful_project_update.py +2 -2
- 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 +2 -2
- ory_client/models/ui_node.py +5 -5
- 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 +4 -2
- ory_client-1.16.10.dist-info/METADATA +18 -0
- ory_client-1.16.10.dist-info/RECORD +302 -0
- {ory_client-1.12.2.dist-info → ory_client-1.16.10.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.16.10.dist-info}/LICENSE +0 -0
- {ory_client-1.12.2.dist-info → ory_client-1.16.10.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.16.10
|
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,7 @@ 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[str, str] = {}
|
276
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
275
277
|
_body_params: Optional[bytes] = None
|
276
278
|
|
277
279
|
# process the path parameters
|
@@ -284,11 +286,302 @@ class WorkspaceApi:
|
|
284
286
|
|
285
287
|
|
286
288
|
# set the HTTP header `Accept`
|
287
|
-
|
288
|
-
[
|
289
|
-
|
289
|
+
if 'Accept' not in _header_params:
|
290
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
291
|
+
[
|
292
|
+
'application/json'
|
293
|
+
]
|
294
|
+
)
|
295
|
+
|
296
|
+
# set the HTTP header `Content-Type`
|
297
|
+
if _content_type:
|
298
|
+
_header_params['Content-Type'] = _content_type
|
299
|
+
else:
|
300
|
+
_default_content_type = (
|
301
|
+
self.api_client.select_header_content_type(
|
302
|
+
[
|
303
|
+
'application/json'
|
304
|
+
]
|
305
|
+
)
|
306
|
+
)
|
307
|
+
if _default_content_type is not None:
|
308
|
+
_header_params['Content-Type'] = _default_content_type
|
309
|
+
|
310
|
+
# authentication setting
|
311
|
+
_auth_settings: List[str] = [
|
312
|
+
'oryWorkspaceApiKey'
|
313
|
+
]
|
314
|
+
|
315
|
+
return self.api_client.param_serialize(
|
316
|
+
method='POST',
|
317
|
+
resource_path='/workspaces',
|
318
|
+
path_params=_path_params,
|
319
|
+
query_params=_query_params,
|
320
|
+
header_params=_header_params,
|
321
|
+
body=_body_params,
|
322
|
+
post_params=_form_params,
|
323
|
+
files=_files,
|
324
|
+
auth_settings=_auth_settings,
|
325
|
+
collection_formats=_collection_formats,
|
326
|
+
_host=_host,
|
327
|
+
_request_auth=_request_auth
|
328
|
+
)
|
329
|
+
|
330
|
+
|
331
|
+
|
332
|
+
|
333
|
+
@validate_call
|
334
|
+
def create_workspace_api_key(
|
335
|
+
self,
|
336
|
+
workspace: Annotated[StrictStr, Field(description="The Workspace ID")],
|
337
|
+
create_workspace_api_key_body: Optional[CreateWorkspaceApiKeyBody] = None,
|
338
|
+
_request_timeout: Union[
|
339
|
+
None,
|
340
|
+
Annotated[StrictFloat, Field(gt=0)],
|
341
|
+
Tuple[
|
342
|
+
Annotated[StrictFloat, Field(gt=0)],
|
343
|
+
Annotated[StrictFloat, Field(gt=0)]
|
290
344
|
]
|
345
|
+
] = None,
|
346
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
347
|
+
_content_type: Optional[StrictStr] = None,
|
348
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
349
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=1)] = 0,
|
350
|
+
) -> WorkspaceApiKey:
|
351
|
+
"""Create workspace API key
|
352
|
+
|
353
|
+
Create an API key for a workspace.
|
354
|
+
|
355
|
+
:param workspace: The Workspace ID (required)
|
356
|
+
:type workspace: str
|
357
|
+
:param create_workspace_api_key_body:
|
358
|
+
:type create_workspace_api_key_body: CreateWorkspaceApiKeyBody
|
359
|
+
:param _request_timeout: timeout setting for this request. If one
|
360
|
+
number provided, it will be total request
|
361
|
+
timeout. It can also be a pair (tuple) of
|
362
|
+
(connection, read) timeouts.
|
363
|
+
:type _request_timeout: int, tuple(int, int), optional
|
364
|
+
:param _request_auth: set to override the auth_settings for an a single
|
365
|
+
request; this effectively ignores the
|
366
|
+
authentication in the spec for a single request.
|
367
|
+
:type _request_auth: dict, optional
|
368
|
+
:param _content_type: force content-type for the request.
|
369
|
+
:type _content_type: str, Optional
|
370
|
+
:param _headers: set to override the headers for a single
|
371
|
+
request; this effectively ignores the headers
|
372
|
+
in the spec for a single request.
|
373
|
+
:type _headers: dict, optional
|
374
|
+
:param _host_index: set to override the host_index for a single
|
375
|
+
request; this effectively ignores the host_index
|
376
|
+
in the spec for a single request.
|
377
|
+
:type _host_index: int, optional
|
378
|
+
:return: Returns the result object.
|
379
|
+
""" # noqa: E501
|
380
|
+
|
381
|
+
_param = self._create_workspace_api_key_serialize(
|
382
|
+
workspace=workspace,
|
383
|
+
create_workspace_api_key_body=create_workspace_api_key_body,
|
384
|
+
_request_auth=_request_auth,
|
385
|
+
_content_type=_content_type,
|
386
|
+
_headers=_headers,
|
387
|
+
_host_index=_host_index
|
388
|
+
)
|
389
|
+
|
390
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
391
|
+
'201': "WorkspaceApiKey",
|
392
|
+
}
|
393
|
+
response_data = self.api_client.call_api(
|
394
|
+
*_param,
|
395
|
+
_request_timeout=_request_timeout
|
291
396
|
)
|
397
|
+
response_data.read()
|
398
|
+
return self.api_client.response_deserialize(
|
399
|
+
response_data=response_data,
|
400
|
+
response_types_map=_response_types_map,
|
401
|
+
).data
|
402
|
+
|
403
|
+
|
404
|
+
@validate_call
|
405
|
+
def create_workspace_api_key_with_http_info(
|
406
|
+
self,
|
407
|
+
workspace: Annotated[StrictStr, Field(description="The Workspace ID")],
|
408
|
+
create_workspace_api_key_body: Optional[CreateWorkspaceApiKeyBody] = None,
|
409
|
+
_request_timeout: Union[
|
410
|
+
None,
|
411
|
+
Annotated[StrictFloat, Field(gt=0)],
|
412
|
+
Tuple[
|
413
|
+
Annotated[StrictFloat, Field(gt=0)],
|
414
|
+
Annotated[StrictFloat, Field(gt=0)]
|
415
|
+
]
|
416
|
+
] = None,
|
417
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
418
|
+
_content_type: Optional[StrictStr] = None,
|
419
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
420
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=1)] = 0,
|
421
|
+
) -> ApiResponse[WorkspaceApiKey]:
|
422
|
+
"""Create workspace API key
|
423
|
+
|
424
|
+
Create an API key for a workspace.
|
425
|
+
|
426
|
+
:param workspace: The Workspace ID (required)
|
427
|
+
:type workspace: str
|
428
|
+
:param create_workspace_api_key_body:
|
429
|
+
:type create_workspace_api_key_body: CreateWorkspaceApiKeyBody
|
430
|
+
:param _request_timeout: timeout setting for this request. If one
|
431
|
+
number provided, it will be total request
|
432
|
+
timeout. It can also be a pair (tuple) of
|
433
|
+
(connection, read) timeouts.
|
434
|
+
:type _request_timeout: int, tuple(int, int), optional
|
435
|
+
:param _request_auth: set to override the auth_settings for an a single
|
436
|
+
request; this effectively ignores the
|
437
|
+
authentication in the spec for a single request.
|
438
|
+
:type _request_auth: dict, optional
|
439
|
+
:param _content_type: force content-type for the request.
|
440
|
+
:type _content_type: str, Optional
|
441
|
+
:param _headers: set to override the headers for a single
|
442
|
+
request; this effectively ignores the headers
|
443
|
+
in the spec for a single request.
|
444
|
+
:type _headers: dict, optional
|
445
|
+
:param _host_index: set to override the host_index for a single
|
446
|
+
request; this effectively ignores the host_index
|
447
|
+
in the spec for a single request.
|
448
|
+
:type _host_index: int, optional
|
449
|
+
:return: Returns the result object.
|
450
|
+
""" # noqa: E501
|
451
|
+
|
452
|
+
_param = self._create_workspace_api_key_serialize(
|
453
|
+
workspace=workspace,
|
454
|
+
create_workspace_api_key_body=create_workspace_api_key_body,
|
455
|
+
_request_auth=_request_auth,
|
456
|
+
_content_type=_content_type,
|
457
|
+
_headers=_headers,
|
458
|
+
_host_index=_host_index
|
459
|
+
)
|
460
|
+
|
461
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
462
|
+
'201': "WorkspaceApiKey",
|
463
|
+
}
|
464
|
+
response_data = self.api_client.call_api(
|
465
|
+
*_param,
|
466
|
+
_request_timeout=_request_timeout
|
467
|
+
)
|
468
|
+
response_data.read()
|
469
|
+
return self.api_client.response_deserialize(
|
470
|
+
response_data=response_data,
|
471
|
+
response_types_map=_response_types_map,
|
472
|
+
)
|
473
|
+
|
474
|
+
|
475
|
+
@validate_call
|
476
|
+
def create_workspace_api_key_without_preload_content(
|
477
|
+
self,
|
478
|
+
workspace: Annotated[StrictStr, Field(description="The Workspace ID")],
|
479
|
+
create_workspace_api_key_body: Optional[CreateWorkspaceApiKeyBody] = None,
|
480
|
+
_request_timeout: Union[
|
481
|
+
None,
|
482
|
+
Annotated[StrictFloat, Field(gt=0)],
|
483
|
+
Tuple[
|
484
|
+
Annotated[StrictFloat, Field(gt=0)],
|
485
|
+
Annotated[StrictFloat, Field(gt=0)]
|
486
|
+
]
|
487
|
+
] = None,
|
488
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
489
|
+
_content_type: Optional[StrictStr] = None,
|
490
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
491
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=1)] = 0,
|
492
|
+
) -> RESTResponseType:
|
493
|
+
"""Create workspace API key
|
494
|
+
|
495
|
+
Create an API key for a workspace.
|
496
|
+
|
497
|
+
:param workspace: The Workspace ID (required)
|
498
|
+
:type workspace: str
|
499
|
+
:param create_workspace_api_key_body:
|
500
|
+
:type create_workspace_api_key_body: CreateWorkspaceApiKeyBody
|
501
|
+
:param _request_timeout: timeout setting for this request. If one
|
502
|
+
number provided, it will be total request
|
503
|
+
timeout. It can also be a pair (tuple) of
|
504
|
+
(connection, read) timeouts.
|
505
|
+
:type _request_timeout: int, tuple(int, int), optional
|
506
|
+
:param _request_auth: set to override the auth_settings for an a single
|
507
|
+
request; this effectively ignores the
|
508
|
+
authentication in the spec for a single request.
|
509
|
+
:type _request_auth: dict, optional
|
510
|
+
:param _content_type: force content-type for the request.
|
511
|
+
:type _content_type: str, Optional
|
512
|
+
:param _headers: set to override the headers for a single
|
513
|
+
request; this effectively ignores the headers
|
514
|
+
in the spec for a single request.
|
515
|
+
:type _headers: dict, optional
|
516
|
+
:param _host_index: set to override the host_index for a single
|
517
|
+
request; this effectively ignores the host_index
|
518
|
+
in the spec for a single request.
|
519
|
+
:type _host_index: int, optional
|
520
|
+
:return: Returns the result object.
|
521
|
+
""" # noqa: E501
|
522
|
+
|
523
|
+
_param = self._create_workspace_api_key_serialize(
|
524
|
+
workspace=workspace,
|
525
|
+
create_workspace_api_key_body=create_workspace_api_key_body,
|
526
|
+
_request_auth=_request_auth,
|
527
|
+
_content_type=_content_type,
|
528
|
+
_headers=_headers,
|
529
|
+
_host_index=_host_index
|
530
|
+
)
|
531
|
+
|
532
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
533
|
+
'201': "WorkspaceApiKey",
|
534
|
+
}
|
535
|
+
response_data = self.api_client.call_api(
|
536
|
+
*_param,
|
537
|
+
_request_timeout=_request_timeout
|
538
|
+
)
|
539
|
+
return response_data.response
|
540
|
+
|
541
|
+
|
542
|
+
def _create_workspace_api_key_serialize(
|
543
|
+
self,
|
544
|
+
workspace,
|
545
|
+
create_workspace_api_key_body,
|
546
|
+
_request_auth,
|
547
|
+
_content_type,
|
548
|
+
_headers,
|
549
|
+
_host_index,
|
550
|
+
) -> RequestSerialized:
|
551
|
+
|
552
|
+
_hosts = [
|
553
|
+
'https://api.console.ory.sh'
|
554
|
+
]
|
555
|
+
_host = _hosts[_host_index]
|
556
|
+
|
557
|
+
_collection_formats: Dict[str, str] = {
|
558
|
+
}
|
559
|
+
|
560
|
+
_path_params: Dict[str, str] = {}
|
561
|
+
_query_params: List[Tuple[str, str]] = []
|
562
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
563
|
+
_form_params: List[Tuple[str, str]] = []
|
564
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
565
|
+
_body_params: Optional[bytes] = None
|
566
|
+
|
567
|
+
# process the path parameters
|
568
|
+
if workspace is not None:
|
569
|
+
_path_params['workspace'] = workspace
|
570
|
+
# process the query parameters
|
571
|
+
# process the header parameters
|
572
|
+
# process the form parameters
|
573
|
+
# process the body parameter
|
574
|
+
if create_workspace_api_key_body is not None:
|
575
|
+
_body_params = create_workspace_api_key_body
|
576
|
+
|
577
|
+
|
578
|
+
# set the HTTP header `Accept`
|
579
|
+
if 'Accept' not in _header_params:
|
580
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
581
|
+
[
|
582
|
+
'application/json'
|
583
|
+
]
|
584
|
+
)
|
292
585
|
|
293
586
|
# set the HTTP header `Content-Type`
|
294
587
|
if _content_type:
|
@@ -301,8 +594,285 @@ class WorkspaceApi:
|
|
301
594
|
]
|
302
595
|
)
|
303
596
|
)
|
304
|
-
if _default_content_type is not None:
|
305
|
-
_header_params['Content-Type'] = _default_content_type
|
597
|
+
if _default_content_type is not None:
|
598
|
+
_header_params['Content-Type'] = _default_content_type
|
599
|
+
|
600
|
+
# authentication setting
|
601
|
+
_auth_settings: List[str] = [
|
602
|
+
'oryWorkspaceApiKey'
|
603
|
+
]
|
604
|
+
|
605
|
+
return self.api_client.param_serialize(
|
606
|
+
method='POST',
|
607
|
+
resource_path='/workspaces/{workspace}/tokens',
|
608
|
+
path_params=_path_params,
|
609
|
+
query_params=_query_params,
|
610
|
+
header_params=_header_params,
|
611
|
+
body=_body_params,
|
612
|
+
post_params=_form_params,
|
613
|
+
files=_files,
|
614
|
+
auth_settings=_auth_settings,
|
615
|
+
collection_formats=_collection_formats,
|
616
|
+
_host=_host,
|
617
|
+
_request_auth=_request_auth
|
618
|
+
)
|
619
|
+
|
620
|
+
|
621
|
+
|
622
|
+
|
623
|
+
@validate_call
|
624
|
+
def delete_workspace_api_key(
|
625
|
+
self,
|
626
|
+
workspace: Annotated[StrictStr, Field(description="The Workspace ID or Workspace slug")],
|
627
|
+
token_id: Annotated[StrictStr, Field(description="The Token ID")],
|
628
|
+
_request_timeout: Union[
|
629
|
+
None,
|
630
|
+
Annotated[StrictFloat, Field(gt=0)],
|
631
|
+
Tuple[
|
632
|
+
Annotated[StrictFloat, Field(gt=0)],
|
633
|
+
Annotated[StrictFloat, Field(gt=0)]
|
634
|
+
]
|
635
|
+
] = None,
|
636
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
637
|
+
_content_type: Optional[StrictStr] = None,
|
638
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
639
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=1)] = 0,
|
640
|
+
) -> None:
|
641
|
+
"""Delete workspace API key
|
642
|
+
|
643
|
+
Deletes an API key and immediately removes it.
|
644
|
+
|
645
|
+
:param workspace: The Workspace ID or Workspace slug (required)
|
646
|
+
:type workspace: str
|
647
|
+
:param token_id: The Token ID (required)
|
648
|
+
:type token_id: str
|
649
|
+
:param _request_timeout: timeout setting for this request. If one
|
650
|
+
number provided, it will be total request
|
651
|
+
timeout. It can also be a pair (tuple) of
|
652
|
+
(connection, read) timeouts.
|
653
|
+
:type _request_timeout: int, tuple(int, int), optional
|
654
|
+
:param _request_auth: set to override the auth_settings for an a single
|
655
|
+
request; this effectively ignores the
|
656
|
+
authentication in the spec for a single request.
|
657
|
+
:type _request_auth: dict, optional
|
658
|
+
:param _content_type: force content-type for the request.
|
659
|
+
:type _content_type: str, Optional
|
660
|
+
:param _headers: set to override the headers for a single
|
661
|
+
request; this effectively ignores the headers
|
662
|
+
in the spec for a single request.
|
663
|
+
:type _headers: dict, optional
|
664
|
+
:param _host_index: set to override the host_index for a single
|
665
|
+
request; this effectively ignores the host_index
|
666
|
+
in the spec for a single request.
|
667
|
+
:type _host_index: int, optional
|
668
|
+
:return: Returns the result object.
|
669
|
+
""" # noqa: E501
|
670
|
+
|
671
|
+
_param = self._delete_workspace_api_key_serialize(
|
672
|
+
workspace=workspace,
|
673
|
+
token_id=token_id,
|
674
|
+
_request_auth=_request_auth,
|
675
|
+
_content_type=_content_type,
|
676
|
+
_headers=_headers,
|
677
|
+
_host_index=_host_index
|
678
|
+
)
|
679
|
+
|
680
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
681
|
+
'204': None,
|
682
|
+
}
|
683
|
+
response_data = self.api_client.call_api(
|
684
|
+
*_param,
|
685
|
+
_request_timeout=_request_timeout
|
686
|
+
)
|
687
|
+
response_data.read()
|
688
|
+
return self.api_client.response_deserialize(
|
689
|
+
response_data=response_data,
|
690
|
+
response_types_map=_response_types_map,
|
691
|
+
).data
|
692
|
+
|
693
|
+
|
694
|
+
@validate_call
|
695
|
+
def delete_workspace_api_key_with_http_info(
|
696
|
+
self,
|
697
|
+
workspace: Annotated[StrictStr, Field(description="The Workspace ID or Workspace slug")],
|
698
|
+
token_id: Annotated[StrictStr, Field(description="The Token ID")],
|
699
|
+
_request_timeout: Union[
|
700
|
+
None,
|
701
|
+
Annotated[StrictFloat, Field(gt=0)],
|
702
|
+
Tuple[
|
703
|
+
Annotated[StrictFloat, Field(gt=0)],
|
704
|
+
Annotated[StrictFloat, Field(gt=0)]
|
705
|
+
]
|
706
|
+
] = None,
|
707
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
708
|
+
_content_type: Optional[StrictStr] = None,
|
709
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
710
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=1)] = 0,
|
711
|
+
) -> ApiResponse[None]:
|
712
|
+
"""Delete workspace API key
|
713
|
+
|
714
|
+
Deletes an API key and immediately removes it.
|
715
|
+
|
716
|
+
:param workspace: The Workspace ID or Workspace slug (required)
|
717
|
+
:type workspace: str
|
718
|
+
:param token_id: The Token ID (required)
|
719
|
+
:type token_id: str
|
720
|
+
:param _request_timeout: timeout setting for this request. If one
|
721
|
+
number provided, it will be total request
|
722
|
+
timeout. It can also be a pair (tuple) of
|
723
|
+
(connection, read) timeouts.
|
724
|
+
:type _request_timeout: int, tuple(int, int), optional
|
725
|
+
:param _request_auth: set to override the auth_settings for an a single
|
726
|
+
request; this effectively ignores the
|
727
|
+
authentication in the spec for a single request.
|
728
|
+
:type _request_auth: dict, optional
|
729
|
+
:param _content_type: force content-type for the request.
|
730
|
+
:type _content_type: str, Optional
|
731
|
+
:param _headers: set to override the headers for a single
|
732
|
+
request; this effectively ignores the headers
|
733
|
+
in the spec for a single request.
|
734
|
+
:type _headers: dict, optional
|
735
|
+
:param _host_index: set to override the host_index for a single
|
736
|
+
request; this effectively ignores the host_index
|
737
|
+
in the spec for a single request.
|
738
|
+
:type _host_index: int, optional
|
739
|
+
:return: Returns the result object.
|
740
|
+
""" # noqa: E501
|
741
|
+
|
742
|
+
_param = self._delete_workspace_api_key_serialize(
|
743
|
+
workspace=workspace,
|
744
|
+
token_id=token_id,
|
745
|
+
_request_auth=_request_auth,
|
746
|
+
_content_type=_content_type,
|
747
|
+
_headers=_headers,
|
748
|
+
_host_index=_host_index
|
749
|
+
)
|
750
|
+
|
751
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
752
|
+
'204': None,
|
753
|
+
}
|
754
|
+
response_data = self.api_client.call_api(
|
755
|
+
*_param,
|
756
|
+
_request_timeout=_request_timeout
|
757
|
+
)
|
758
|
+
response_data.read()
|
759
|
+
return self.api_client.response_deserialize(
|
760
|
+
response_data=response_data,
|
761
|
+
response_types_map=_response_types_map,
|
762
|
+
)
|
763
|
+
|
764
|
+
|
765
|
+
@validate_call
|
766
|
+
def delete_workspace_api_key_without_preload_content(
|
767
|
+
self,
|
768
|
+
workspace: Annotated[StrictStr, Field(description="The Workspace ID or Workspace slug")],
|
769
|
+
token_id: Annotated[StrictStr, Field(description="The Token ID")],
|
770
|
+
_request_timeout: Union[
|
771
|
+
None,
|
772
|
+
Annotated[StrictFloat, Field(gt=0)],
|
773
|
+
Tuple[
|
774
|
+
Annotated[StrictFloat, Field(gt=0)],
|
775
|
+
Annotated[StrictFloat, Field(gt=0)]
|
776
|
+
]
|
777
|
+
] = None,
|
778
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
779
|
+
_content_type: Optional[StrictStr] = None,
|
780
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
781
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=1)] = 0,
|
782
|
+
) -> RESTResponseType:
|
783
|
+
"""Delete workspace API key
|
784
|
+
|
785
|
+
Deletes an API key and immediately removes it.
|
786
|
+
|
787
|
+
:param workspace: The Workspace ID or Workspace slug (required)
|
788
|
+
:type workspace: str
|
789
|
+
:param token_id: The Token ID (required)
|
790
|
+
:type token_id: str
|
791
|
+
:param _request_timeout: timeout setting for this request. If one
|
792
|
+
number provided, it will be total request
|
793
|
+
timeout. It can also be a pair (tuple) of
|
794
|
+
(connection, read) timeouts.
|
795
|
+
:type _request_timeout: int, tuple(int, int), optional
|
796
|
+
:param _request_auth: set to override the auth_settings for an a single
|
797
|
+
request; this effectively ignores the
|
798
|
+
authentication in the spec for a single request.
|
799
|
+
:type _request_auth: dict, optional
|
800
|
+
:param _content_type: force content-type for the request.
|
801
|
+
:type _content_type: str, Optional
|
802
|
+
:param _headers: set to override the headers for a single
|
803
|
+
request; this effectively ignores the headers
|
804
|
+
in the spec for a single request.
|
805
|
+
:type _headers: dict, optional
|
806
|
+
:param _host_index: set to override the host_index for a single
|
807
|
+
request; this effectively ignores the host_index
|
808
|
+
in the spec for a single request.
|
809
|
+
:type _host_index: int, optional
|
810
|
+
:return: Returns the result object.
|
811
|
+
""" # noqa: E501
|
812
|
+
|
813
|
+
_param = self._delete_workspace_api_key_serialize(
|
814
|
+
workspace=workspace,
|
815
|
+
token_id=token_id,
|
816
|
+
_request_auth=_request_auth,
|
817
|
+
_content_type=_content_type,
|
818
|
+
_headers=_headers,
|
819
|
+
_host_index=_host_index
|
820
|
+
)
|
821
|
+
|
822
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
823
|
+
'204': None,
|
824
|
+
}
|
825
|
+
response_data = self.api_client.call_api(
|
826
|
+
*_param,
|
827
|
+
_request_timeout=_request_timeout
|
828
|
+
)
|
829
|
+
return response_data.response
|
830
|
+
|
831
|
+
|
832
|
+
def _delete_workspace_api_key_serialize(
|
833
|
+
self,
|
834
|
+
workspace,
|
835
|
+
token_id,
|
836
|
+
_request_auth,
|
837
|
+
_content_type,
|
838
|
+
_headers,
|
839
|
+
_host_index,
|
840
|
+
) -> RequestSerialized:
|
841
|
+
|
842
|
+
_hosts = [
|
843
|
+
'https://api.console.ory.sh'
|
844
|
+
]
|
845
|
+
_host = _hosts[_host_index]
|
846
|
+
|
847
|
+
_collection_formats: Dict[str, str] = {
|
848
|
+
}
|
849
|
+
|
850
|
+
_path_params: Dict[str, str] = {}
|
851
|
+
_query_params: List[Tuple[str, str]] = []
|
852
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
853
|
+
_form_params: List[Tuple[str, str]] = []
|
854
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
855
|
+
_body_params: Optional[bytes] = None
|
856
|
+
|
857
|
+
# process the path parameters
|
858
|
+
if workspace is not None:
|
859
|
+
_path_params['workspace'] = workspace
|
860
|
+
if token_id is not None:
|
861
|
+
_path_params['token_id'] = token_id
|
862
|
+
# process the query parameters
|
863
|
+
# process the header parameters
|
864
|
+
# process the form parameters
|
865
|
+
# process the body parameter
|
866
|
+
|
867
|
+
|
868
|
+
# set the HTTP header `Accept`
|
869
|
+
if 'Accept' not in _header_params:
|
870
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
871
|
+
[
|
872
|
+
'application/json'
|
873
|
+
]
|
874
|
+
)
|
875
|
+
|
306
876
|
|
307
877
|
# authentication setting
|
308
878
|
_auth_settings: List[str] = [
|
@@ -310,8 +880,8 @@ class WorkspaceApi:
|
|
310
880
|
]
|
311
881
|
|
312
882
|
return self.api_client.param_serialize(
|
313
|
-
method='
|
314
|
-
resource_path='/workspaces',
|
883
|
+
method='DELETE',
|
884
|
+
resource_path='/workspaces/{workspace}/tokens/{token_id}',
|
315
885
|
path_params=_path_params,
|
316
886
|
query_params=_query_params,
|
317
887
|
header_params=_header_params,
|
@@ -557,7 +1127,7 @@ class WorkspaceApi:
|
|
557
1127
|
_query_params: List[Tuple[str, str]] = []
|
558
1128
|
_header_params: Dict[str, Optional[str]] = _headers or {}
|
559
1129
|
_form_params: List[Tuple[str, str]] = []
|
560
|
-
_files: Dict[str, str] = {}
|
1130
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
561
1131
|
_body_params: Optional[bytes] = None
|
562
1132
|
|
563
1133
|
# process the path parameters
|
@@ -570,11 +1140,274 @@ class WorkspaceApi:
|
|
570
1140
|
|
571
1141
|
|
572
1142
|
# set the HTTP header `Accept`
|
573
|
-
|
574
|
-
[
|
575
|
-
|
1143
|
+
if 'Accept' not in _header_params:
|
1144
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
1145
|
+
[
|
1146
|
+
'application/json'
|
1147
|
+
]
|
1148
|
+
)
|
1149
|
+
|
1150
|
+
|
1151
|
+
# authentication setting
|
1152
|
+
_auth_settings: List[str] = [
|
1153
|
+
'oryWorkspaceApiKey'
|
1154
|
+
]
|
1155
|
+
|
1156
|
+
return self.api_client.param_serialize(
|
1157
|
+
method='GET',
|
1158
|
+
resource_path='/workspaces/{workspace}',
|
1159
|
+
path_params=_path_params,
|
1160
|
+
query_params=_query_params,
|
1161
|
+
header_params=_header_params,
|
1162
|
+
body=_body_params,
|
1163
|
+
post_params=_form_params,
|
1164
|
+
files=_files,
|
1165
|
+
auth_settings=_auth_settings,
|
1166
|
+
collection_formats=_collection_formats,
|
1167
|
+
_host=_host,
|
1168
|
+
_request_auth=_request_auth
|
1169
|
+
)
|
1170
|
+
|
1171
|
+
|
1172
|
+
|
1173
|
+
|
1174
|
+
@validate_call
|
1175
|
+
def list_workspace_api_keys(
|
1176
|
+
self,
|
1177
|
+
workspace: Annotated[StrictStr, Field(description="The Workspace ID or Workspace slug")],
|
1178
|
+
_request_timeout: Union[
|
1179
|
+
None,
|
1180
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1181
|
+
Tuple[
|
1182
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1183
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1184
|
+
]
|
1185
|
+
] = None,
|
1186
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1187
|
+
_content_type: Optional[StrictStr] = None,
|
1188
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1189
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=1)] = 0,
|
1190
|
+
) -> List[WorkspaceApiKey]:
|
1191
|
+
"""List a workspace's API keys
|
1192
|
+
|
1193
|
+
A list of all the workspace's API keys.
|
1194
|
+
|
1195
|
+
:param workspace: The Workspace ID or Workspace slug (required)
|
1196
|
+
:type workspace: str
|
1197
|
+
:param _request_timeout: timeout setting for this request. If one
|
1198
|
+
number provided, it will be total request
|
1199
|
+
timeout. It can also be a pair (tuple) of
|
1200
|
+
(connection, read) timeouts.
|
1201
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1202
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1203
|
+
request; this effectively ignores the
|
1204
|
+
authentication in the spec for a single request.
|
1205
|
+
:type _request_auth: dict, optional
|
1206
|
+
:param _content_type: force content-type for the request.
|
1207
|
+
:type _content_type: str, Optional
|
1208
|
+
:param _headers: set to override the headers for a single
|
1209
|
+
request; this effectively ignores the headers
|
1210
|
+
in the spec for a single request.
|
1211
|
+
:type _headers: dict, optional
|
1212
|
+
:param _host_index: set to override the host_index for a single
|
1213
|
+
request; this effectively ignores the host_index
|
1214
|
+
in the spec for a single request.
|
1215
|
+
:type _host_index: int, optional
|
1216
|
+
:return: Returns the result object.
|
1217
|
+
""" # noqa: E501
|
1218
|
+
|
1219
|
+
_param = self._list_workspace_api_keys_serialize(
|
1220
|
+
workspace=workspace,
|
1221
|
+
_request_auth=_request_auth,
|
1222
|
+
_content_type=_content_type,
|
1223
|
+
_headers=_headers,
|
1224
|
+
_host_index=_host_index
|
1225
|
+
)
|
1226
|
+
|
1227
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1228
|
+
'200': "List[WorkspaceApiKey]",
|
1229
|
+
}
|
1230
|
+
response_data = self.api_client.call_api(
|
1231
|
+
*_param,
|
1232
|
+
_request_timeout=_request_timeout
|
1233
|
+
)
|
1234
|
+
response_data.read()
|
1235
|
+
return self.api_client.response_deserialize(
|
1236
|
+
response_data=response_data,
|
1237
|
+
response_types_map=_response_types_map,
|
1238
|
+
).data
|
1239
|
+
|
1240
|
+
|
1241
|
+
@validate_call
|
1242
|
+
def list_workspace_api_keys_with_http_info(
|
1243
|
+
self,
|
1244
|
+
workspace: Annotated[StrictStr, Field(description="The Workspace ID or Workspace slug")],
|
1245
|
+
_request_timeout: Union[
|
1246
|
+
None,
|
1247
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1248
|
+
Tuple[
|
1249
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1250
|
+
Annotated[StrictFloat, Field(gt=0)]
|
1251
|
+
]
|
1252
|
+
] = None,
|
1253
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1254
|
+
_content_type: Optional[StrictStr] = None,
|
1255
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1256
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=1)] = 0,
|
1257
|
+
) -> ApiResponse[List[WorkspaceApiKey]]:
|
1258
|
+
"""List a workspace's API keys
|
1259
|
+
|
1260
|
+
A list of all the workspace's API keys.
|
1261
|
+
|
1262
|
+
:param workspace: The Workspace ID or Workspace slug (required)
|
1263
|
+
:type workspace: str
|
1264
|
+
:param _request_timeout: timeout setting for this request. If one
|
1265
|
+
number provided, it will be total request
|
1266
|
+
timeout. It can also be a pair (tuple) of
|
1267
|
+
(connection, read) timeouts.
|
1268
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1269
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1270
|
+
request; this effectively ignores the
|
1271
|
+
authentication in the spec for a single request.
|
1272
|
+
:type _request_auth: dict, optional
|
1273
|
+
:param _content_type: force content-type for the request.
|
1274
|
+
:type _content_type: str, Optional
|
1275
|
+
:param _headers: set to override the headers for a single
|
1276
|
+
request; this effectively ignores the headers
|
1277
|
+
in the spec for a single request.
|
1278
|
+
:type _headers: dict, optional
|
1279
|
+
:param _host_index: set to override the host_index for a single
|
1280
|
+
request; this effectively ignores the host_index
|
1281
|
+
in the spec for a single request.
|
1282
|
+
:type _host_index: int, optional
|
1283
|
+
:return: Returns the result object.
|
1284
|
+
""" # noqa: E501
|
1285
|
+
|
1286
|
+
_param = self._list_workspace_api_keys_serialize(
|
1287
|
+
workspace=workspace,
|
1288
|
+
_request_auth=_request_auth,
|
1289
|
+
_content_type=_content_type,
|
1290
|
+
_headers=_headers,
|
1291
|
+
_host_index=_host_index
|
1292
|
+
)
|
1293
|
+
|
1294
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1295
|
+
'200': "List[WorkspaceApiKey]",
|
1296
|
+
}
|
1297
|
+
response_data = self.api_client.call_api(
|
1298
|
+
*_param,
|
1299
|
+
_request_timeout=_request_timeout
|
1300
|
+
)
|
1301
|
+
response_data.read()
|
1302
|
+
return self.api_client.response_deserialize(
|
1303
|
+
response_data=response_data,
|
1304
|
+
response_types_map=_response_types_map,
|
1305
|
+
)
|
1306
|
+
|
1307
|
+
|
1308
|
+
@validate_call
|
1309
|
+
def list_workspace_api_keys_without_preload_content(
|
1310
|
+
self,
|
1311
|
+
workspace: Annotated[StrictStr, Field(description="The Workspace ID or Workspace slug")],
|
1312
|
+
_request_timeout: Union[
|
1313
|
+
None,
|
1314
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1315
|
+
Tuple[
|
1316
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1317
|
+
Annotated[StrictFloat, Field(gt=0)]
|
576
1318
|
]
|
1319
|
+
] = None,
|
1320
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1321
|
+
_content_type: Optional[StrictStr] = None,
|
1322
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1323
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=1)] = 0,
|
1324
|
+
) -> RESTResponseType:
|
1325
|
+
"""List a workspace's API keys
|
1326
|
+
|
1327
|
+
A list of all the workspace's API keys.
|
1328
|
+
|
1329
|
+
:param workspace: The Workspace ID or Workspace slug (required)
|
1330
|
+
:type workspace: str
|
1331
|
+
:param _request_timeout: timeout setting for this request. If one
|
1332
|
+
number provided, it will be total request
|
1333
|
+
timeout. It can also be a pair (tuple) of
|
1334
|
+
(connection, read) timeouts.
|
1335
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1336
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1337
|
+
request; this effectively ignores the
|
1338
|
+
authentication in the spec for a single request.
|
1339
|
+
:type _request_auth: dict, optional
|
1340
|
+
:param _content_type: force content-type for the request.
|
1341
|
+
:type _content_type: str, Optional
|
1342
|
+
:param _headers: set to override the headers for a single
|
1343
|
+
request; this effectively ignores the headers
|
1344
|
+
in the spec for a single request.
|
1345
|
+
:type _headers: dict, optional
|
1346
|
+
:param _host_index: set to override the host_index for a single
|
1347
|
+
request; this effectively ignores the host_index
|
1348
|
+
in the spec for a single request.
|
1349
|
+
:type _host_index: int, optional
|
1350
|
+
:return: Returns the result object.
|
1351
|
+
""" # noqa: E501
|
1352
|
+
|
1353
|
+
_param = self._list_workspace_api_keys_serialize(
|
1354
|
+
workspace=workspace,
|
1355
|
+
_request_auth=_request_auth,
|
1356
|
+
_content_type=_content_type,
|
1357
|
+
_headers=_headers,
|
1358
|
+
_host_index=_host_index
|
1359
|
+
)
|
1360
|
+
|
1361
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1362
|
+
'200': "List[WorkspaceApiKey]",
|
1363
|
+
}
|
1364
|
+
response_data = self.api_client.call_api(
|
1365
|
+
*_param,
|
1366
|
+
_request_timeout=_request_timeout
|
577
1367
|
)
|
1368
|
+
return response_data.response
|
1369
|
+
|
1370
|
+
|
1371
|
+
def _list_workspace_api_keys_serialize(
|
1372
|
+
self,
|
1373
|
+
workspace,
|
1374
|
+
_request_auth,
|
1375
|
+
_content_type,
|
1376
|
+
_headers,
|
1377
|
+
_host_index,
|
1378
|
+
) -> RequestSerialized:
|
1379
|
+
|
1380
|
+
_hosts = [
|
1381
|
+
'https://api.console.ory.sh'
|
1382
|
+
]
|
1383
|
+
_host = _hosts[_host_index]
|
1384
|
+
|
1385
|
+
_collection_formats: Dict[str, str] = {
|
1386
|
+
}
|
1387
|
+
|
1388
|
+
_path_params: Dict[str, str] = {}
|
1389
|
+
_query_params: List[Tuple[str, str]] = []
|
1390
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
1391
|
+
_form_params: List[Tuple[str, str]] = []
|
1392
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
1393
|
+
_body_params: Optional[bytes] = None
|
1394
|
+
|
1395
|
+
# process the path parameters
|
1396
|
+
if workspace is not None:
|
1397
|
+
_path_params['workspace'] = workspace
|
1398
|
+
# process the query parameters
|
1399
|
+
# process the header parameters
|
1400
|
+
# process the form parameters
|
1401
|
+
# process the body parameter
|
1402
|
+
|
1403
|
+
|
1404
|
+
# set the HTTP header `Accept`
|
1405
|
+
if 'Accept' not in _header_params:
|
1406
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
1407
|
+
[
|
1408
|
+
'application/json'
|
1409
|
+
]
|
1410
|
+
)
|
578
1411
|
|
579
1412
|
|
580
1413
|
# authentication setting
|
@@ -584,7 +1417,7 @@ class WorkspaceApi:
|
|
584
1417
|
|
585
1418
|
return self.api_client.param_serialize(
|
586
1419
|
method='GET',
|
587
|
-
resource_path='/workspaces/{workspace}',
|
1420
|
+
resource_path='/workspaces/{workspace}/tokens',
|
588
1421
|
path_params=_path_params,
|
589
1422
|
query_params=_query_params,
|
590
1423
|
header_params=_header_params,
|
@@ -830,7 +1663,7 @@ class WorkspaceApi:
|
|
830
1663
|
_query_params: List[Tuple[str, str]] = []
|
831
1664
|
_header_params: Dict[str, Optional[str]] = _headers or {}
|
832
1665
|
_form_params: List[Tuple[str, str]] = []
|
833
|
-
_files: Dict[str, str] = {}
|
1666
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
834
1667
|
_body_params: Optional[bytes] = None
|
835
1668
|
|
836
1669
|
# process the path parameters
|
@@ -843,11 +1676,12 @@ class WorkspaceApi:
|
|
843
1676
|
|
844
1677
|
|
845
1678
|
# set the HTTP header `Accept`
|
846
|
-
|
847
|
-
[
|
848
|
-
|
849
|
-
|
850
|
-
|
1679
|
+
if 'Accept' not in _header_params:
|
1680
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
1681
|
+
[
|
1682
|
+
'application/json'
|
1683
|
+
]
|
1684
|
+
)
|
851
1685
|
|
852
1686
|
|
853
1687
|
# authentication setting
|
@@ -1113,7 +1947,7 @@ class WorkspaceApi:
|
|
1113
1947
|
_query_params: List[Tuple[str, str]] = []
|
1114
1948
|
_header_params: Dict[str, Optional[str]] = _headers or {}
|
1115
1949
|
_form_params: List[Tuple[str, str]] = []
|
1116
|
-
_files: Dict[str, str] = {}
|
1950
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
1117
1951
|
_body_params: Optional[bytes] = None
|
1118
1952
|
|
1119
1953
|
# process the path parameters
|
@@ -1132,11 +1966,12 @@ class WorkspaceApi:
|
|
1132
1966
|
|
1133
1967
|
|
1134
1968
|
# set the HTTP header `Accept`
|
1135
|
-
|
1136
|
-
[
|
1137
|
-
|
1138
|
-
|
1139
|
-
|
1969
|
+
if 'Accept' not in _header_params:
|
1970
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
1971
|
+
[
|
1972
|
+
'application/json'
|
1973
|
+
]
|
1974
|
+
)
|
1140
1975
|
|
1141
1976
|
|
1142
1977
|
# authentication setting
|
@@ -1405,7 +2240,7 @@ class WorkspaceApi:
|
|
1405
2240
|
_query_params: List[Tuple[str, str]] = []
|
1406
2241
|
_header_params: Dict[str, Optional[str]] = _headers or {}
|
1407
2242
|
_form_params: List[Tuple[str, str]] = []
|
1408
|
-
_files: Dict[str, str] = {}
|
2243
|
+
_files: Dict[str, Union[str, bytes]] = {}
|
1409
2244
|
_body_params: Optional[bytes] = None
|
1410
2245
|
|
1411
2246
|
# process the path parameters
|
@@ -1420,11 +2255,12 @@ class WorkspaceApi:
|
|
1420
2255
|
|
1421
2256
|
|
1422
2257
|
# set the HTTP header `Accept`
|
1423
|
-
|
1424
|
-
[
|
1425
|
-
|
1426
|
-
|
1427
|
-
|
2258
|
+
if 'Accept' not in _header_params:
|
2259
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
2260
|
+
[
|
2261
|
+
'application/json'
|
2262
|
+
]
|
2263
|
+
)
|
1428
2264
|
|
1429
2265
|
# set the HTTP header `Content-Type`
|
1430
2266
|
if _content_type:
|