diff --git a/workos/audit_logs.py b/workos/audit_logs.py index cfaf27f9..73bacff8 100644 --- a/workos/audit_logs.py +++ b/workos/audit_logs.py @@ -44,11 +44,11 @@ def create_export( """Trigger the creation of an export of audit logs. Kwargs: - organization (str): Organization's unique identifier. + organization_id (str): Organization's unique identifier. range_start (str): Start date of the date range filter. range_end (str): End date of the date range filter. actions (list): Optional list of actions to filter. (Optional) - actors (list): Optional list of actors to filter. (Optional) + actor_names (list): Optional list of actors to filter by name. (Optional) targets (list): Optional list of targets to filter. (Optional) Returns: diff --git a/workos/events.py b/workos/events.py index 3d699dfa..e1c9e710 100644 --- a/workos/events.py +++ b/workos/events.py @@ -29,7 +29,7 @@ def list_events( Kwargs: events (Sequence[EventType]): Filter to only return events of particular types. limit (int): Maximum number of records to return. (Optional) - organization_id(str): Organization ID limits scope of events to a single organization. (Optional) + organization_id (str): Organization ID limits scope of events to a single organization. (Optional) after (str): Pagination cursor to receive records after a provided Event ID. (Optional) range_start (str): Date range start for stream of events. (Optional) range_end (str): Date range end for stream of events. (Optional) diff --git a/workos/mfa.py b/workos/mfa.py index 42177f8e..3cf62018 100644 --- a/workos/mfa.py +++ b/workos/mfa.py @@ -37,8 +37,8 @@ def enroll_factor( Kwargs: type (str): The type of factor to be enrolled (sms or totp). - totp_issuer (str): Name of the Organization. (Optional) - totp_user (str): email of user. (Optional) + totp_issuer (str): Name of the Organization. Required when type is totp, ignored otherwise. + totp_user (str): email of user. Required when type is totp, ignored otherwise. phone_number (str): phone number of the user. (Optional) Returns: diff --git a/workos/organizations.py b/workos/organizations.py index b806d3df..27744fb7 100644 --- a/workos/organizations.py +++ b/workos/organizations.py @@ -87,10 +87,10 @@ def update_organization( """Update an organization Kwargs: - organization(str) - Organization's unique identifier. - name (str) - A descriptive name for the organization. (Optional) - domains (list) - [Deprecated] Use domain_data instead. List of domains that belong to the organization. (Optional) - domain_data (Sequence[DomainDataInput]) - List of domains that belong to the organization. (Optional) + organization (str): Organization's unique identifier. + name (str): A descriptive name for the organization. (Optional) + domains (list): [Deprecated] Use domain_data instead. List of domains that belong to the organization. (Optional) + domain_data (Sequence[DomainDataInput]): List of domains that belong to the organization. (Optional) Returns: Organization: Updated Organization response from WorkOS. diff --git a/workos/passwordless.py b/workos/passwordless.py index c1d2d3e0..f3143551 100644 --- a/workos/passwordless.py +++ b/workos/passwordless.py @@ -20,7 +20,7 @@ def create_session( ) -> PasswordlessSession: """Create a Passwordless Session. - Args: + Kwargs: email (str): The email of the user to authenticate. type (PasswordlessSessionType): The type of Passwordless Session to create. Currently, the only supported value is 'MagicLink'. diff --git a/workos/portal.py b/workos/portal.py index 95e0e152..757ef3d7 100644 --- a/workos/portal.py +++ b/workos/portal.py @@ -21,7 +21,7 @@ def generate_link( Kwargs: intent (PortalLinkIntent): The access scope for the generated Admin Portal link. - organization_id (string): The ID of the organization the Admin Portal link will be generated for. + organization_id (str): The ID of the organization the Admin Portal link will be generated for. return_url (str): The URL that the end user will be redirected to upon exiting the generated Admin Portal. If none is provided, the default redirect link set in your WorkOS Dashboard will be used. (Optional) success_url (str): The URL to which WorkOS will redirect users to upon successfully viewing Audit Logs, diff --git a/workos/sso.py b/workos/sso.py index 8e8678b8..cff1d57e 100644 --- a/workos/sso.py +++ b/workos/sso.py @@ -62,12 +62,12 @@ def get_authorization_url( WorkOS. Kwargs: - redirect_uri (str) - A valid redirect URI, as specified on WorkOS - state (str) - An encoded string passed to WorkOS that'd be preserved through the authentication workflow, passed + redirect_uri (str) : A valid redirect URI, as specified on WorkOS + state (str) : An encoded string passed to WorkOS that'd be preserved through the authentication workflow, passed back as a query parameter - provider (SSOProviderType) - Authentication service provider descriptor - connection_id (string) - Unique identifier for a WorkOS Connection - organization_id (string) - Unique identifier for a WorkOS Organization + provider (SSOProviderType) : Authentication service provider descriptor + connection_id (string) : Unique identifier for a WorkOS Connection + organization_id (string) : Unique identifier for a WorkOS Organization Returns: str: URL to redirect a User to to begin the OAuth workflow with WorkOS diff --git a/workos/user_management.py b/workos/user_management.py index e4c03b00..1f781daf 100644 --- a/workos/user_management.py +++ b/workos/user_management.py @@ -113,7 +113,7 @@ def get_user(self, user_id: str) -> SyncOrAsync[User]: """Get the details of an existing user. Args: - user_id (str) - User unique identifier + user_id (str): User unique identifier Returns: User: User response from WorkOS. """ @@ -158,13 +158,13 @@ def create_user( """Create a new user. Kwargs: - email (str) - The email address of the user. - password (str) - The password to set for the user. (Optional) - password_hash (str) - The hashed password to set for the user. Mutually exclusive with password. (Optional) - password_hash_type (str) - The algorithm originally used to hash the password, used when providing a password_hash. Valid values are 'bcrypt', `firebase-scrypt`, and `ssha`. (Optional) - first_name (str) - The user's first name. (Optional) - last_name (str) - The user's last name. (Optional) - email_verified (bool) - Whether the user's email address was previously verified. (Optional) + email (str): The email address of the user. + password (str): The password to set for the user. (Optional) + password_hash (str): The hashed password to set for the user. Mutually exclusive with password. (Optional) + password_hash_type (str): The algorithm originally used to hash the password, used when providing a password_hash. Valid values are 'bcrypt', `firebase-scrypt`, and `ssha`. (Optional) + first_name (str): The user's first name. (Optional) + last_name (str): The user's last name. (Optional) + email_verified (bool): Whether the user's email address was previously verified. (Optional) Returns: User: Created User response from WorkOS. @@ -185,13 +185,13 @@ def update_user( """Update user attributes. Kwargs: - user_id (str) - The User unique identifier - first_name (str) - The user's first name. (Optional) - last_name (str) - The user's last name. (Optional) - email_verified (bool) - Whether the user's email address was previously verified. (Optional) - password (str) - The password to set for the user. (Optional) - password_hash (str) - The hashed password to set for the user, used when migrating from another user store. Mutually exclusive with password. (Optional) - password_hash_type (str) - The algorithm originally used to hash the password, used when providing a password_hash. Valid values are 'bcrypt', `firebase-scrypt`, and `ssha`. (Optional) + user_id (str): The User unique identifier + first_name (str): The user's first name. (Optional) + last_name (str): The user's last name. (Optional) + email_verified (bool): Whether the user's email address was previously verified. (Optional) + password (str): The password to set for the user. (Optional) + password_hash (str): The hashed password to set for the user, used when migrating from another user store. Mutually exclusive with password. (Optional) + password_hash_type (str): The algorithm originally used to hash the password, used when providing a password_hash. Valid values are 'bcrypt', `firebase-scrypt`, and `ssha`. (Optional) Returns: User: Updated User response from WorkOS. @@ -202,7 +202,7 @@ def delete_user(self, user_id: str) -> SyncOrAsync[None]: """Delete an existing user. Args: - user_id (str) - User unique identifier + user_id (str): User unique identifier Returns: None """ @@ -230,7 +230,7 @@ def update_organization_membership( """Updates an OrganizationMembership for the given id. Args: - organization_membership_id (str) - The unique ID of the Organization Membership. + organization_membership_id (str): The unique ID of the Organization Membership. role_slug: The Unique Slug of the Role to which to grant to this membership. If no slug is passed in, it will not be changed (Optional) @@ -245,7 +245,7 @@ def get_organization_membership( """Get the details of an organization membership. Args: - organization_membership_id (str) - The unique ID of the Organization Membership. + organization_membership_id (str): The unique ID of the Organization Membership. Returns: OrganizationMembership: OrganizationMembership response from WorkOS. """ @@ -284,7 +284,7 @@ def delete_organization_membership( """Delete an existing organization membership. Args: - organization_membership_id (str) - The unique ID of the Organization Membership. + organization_membership_id (str): The unique ID of the Organization Membership. Returns: None """ @@ -296,7 +296,7 @@ def deactivate_organization_membership( """Deactivate an organization membership. Args: - organization_membership_id (str) - The unique ID of the Organization Membership. + organization_membership_id (str): The unique ID of the Organization Membership. Returns: OrganizationMembership: OrganizationMembership response from WorkOS. """ @@ -308,7 +308,7 @@ def reactivate_organization_membership( """Reactivates an organization membership. Args: - organization_membership_id (str) - The unique ID of the Organization Membership. + organization_membership_id (str): The unique ID of the Organization Membership. Returns: OrganizationMembership: OrganizationMembership response from WorkOS. """ @@ -332,21 +332,21 @@ def get_authorization_url( WorkOS. Kwargs: - redirect_uri (str) - A Redirect URI to return an authorized user to. - connection_id (str) - The connection_id connection selector is used to initiate SSO for a Connection. + redirect_uri (str): A Redirect URI to return an authorized user to. + connection_id (str): The connection_id connection selector is used to initiate SSO for a Connection. The value of this parameter should be a WorkOS Connection ID. (Optional) - organization_id (str) - The organization_id connection selector is used to initiate SSO for an Organization. + organization_id (str): The organization_id connection selector is used to initiate SSO for an Organization. The value of this parameter should be a WorkOS Organization ID. (Optional) - provider (UserManagementProviderType) - The provider connection selector is used to initiate SSO using an OAuth-compatible provider. + provider (UserManagementProviderType): The provider connection selector is used to initiate SSO using an OAuth-compatible provider. Currently, the supported values for provider are 'authkit', 'AppleOAuth', 'GitHubOAuth, 'GoogleOAuth', and 'MicrosoftOAuth'. (Optional) - domain_hint (str) - Can be used to pre-fill the domain field when initiating authentication with Microsoft OAuth, + domain_hint (str): Can be used to pre-fill the domain field when initiating authentication with Microsoft OAuth, or with a GoogleSAML connection type. (Optional) - login_hint (str) - Can be used to pre-fill the username/email address field of the IdP sign-in page for the user, + login_hint (str): Can be used to pre-fill the username/email address field of the IdP sign-in page for the user, if you know their username ahead of time. Currently, this parameter is supported for OAuth, OpenID Connect, OktaSAML, and AzureSAML connection types. (Optional) - state (str) - An encoded string passed to WorkOS that'd be preserved through the authentication workflow, passed + state (str): An encoded string passed to WorkOS that'd be preserved through the authentication workflow, passed back as a query parameter. (Optional) - code_challenge (str) - Code challenge is derived from the code verifier used for the PKCE flow. (Optional) + code_challenge (str): Code challenge is derived from the code verifier used for the PKCE flow. (Optional) Returns: str: URL to redirect a User to to begin the OAuth workflow with WorkOS @@ -568,7 +568,7 @@ def get_password_reset(self, password_reset_id: str) -> SyncOrAsync[PasswordRese """Get the details of a password reset object. Args: - password_reset_id (str) - The unique ID of the password reset object. + password_reset_id (str): The unique ID of the password reset object. Returns: PasswordReset: PasswordReset response from WorkOS. @@ -605,7 +605,7 @@ def get_email_verification( """Get the details of an email verification object. Args: - email_verification_id (str) - The unique ID of the email verification object. + email_verification_id (str): The unique ID of the email verification object. Returns: EmailVerification: EmailVerification response from WorkOS. @@ -639,7 +639,7 @@ def get_magic_auth(self, magic_auth_id: str) -> SyncOrAsync[MagicAuth]: """Get the details of a Magic Auth object. Args: - magic_auth_id (str) - The unique ID of the Magic Auth object. + magic_auth_id (str): The unique ID of the Magic Auth object. Returns: MagicAuth: MagicAuth response from WorkOS. @@ -781,7 +781,7 @@ def revoke_invitation(self, invitation_id: str) -> SyncOrAsync[Invitation]: """Revokes an existing Invitation. Args: - invitation_id (str) - The unique ID of the Invitation. + invitation_id (str): The unique ID of the Invitation. Returns: Invitation: Invitation response from WorkOS.