From b4a91465f8d5d40295b84b3a139af17cd0f631f2 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Tue, 18 Nov 2025 15:24:50 +0000 Subject: [PATCH 1/2] ## Python SDK Changes Detected: * `clerk.beta_features.update_instance_settings()`: * `request.enhanced_email_deliverability` **Removed** **Breaking** :warning: * `clerk.instance_settings.update()`: * `request.enhanced_email_deliverability` **Removed** **Breaking** :warning: * `clerk.users.bulk_unban()`: `response.[]` **Changed** * `clerk.organization_invitations.list_pending()`: `response.data.[].inviter_id` **Added** * `clerk.commerce.list_subscription_items()`: **Deleted** **Breaking** :warning: * `clerk.commerce.cancel_subscription_item()`: **Deleted** **Breaking** :warning: * `clerk.users.unlock()`: `response` **Changed** * `clerk.users.list()`: `response.[]` **Changed** * `clerk.users.create()`: `response` **Changed** * `clerk.users.get()`: `response` **Changed** * `clerk.users.update()`: `response` **Changed** * `clerk.users.ban()`: `response` **Changed** * `clerk.users.unban()`: `response` **Changed** * `clerk.users.bulk_ban()`: `response.[]` **Changed** * `clerk.commerce.list_plans()`: **Deleted** **Breaking** :warning: * `clerk.billing.list_plans()`: **Added** * `clerk.sessions.create()`: * `request.active_organization_id` **Added** * `clerk.users.set_profile_image()`: `response` **Changed** * `clerk.users.delete_profile_image()`: `response` **Changed** * `clerk.users.update_metadata()`: `response` **Changed** * `clerk.users.get_organization_invitations()`: `response.data.[].inviter_id` **Added** * `clerk.organization_invitations.get_all()`: `response.data.[].inviter_id` **Added** * `clerk.organization_invitations.create()`: `response.inviter_id` **Added** * `clerk.organization_invitations.list()`: `response.data.[].inviter_id` **Added** * `clerk.organization_invitations.bulk_create()`: `response.data.[].inviter_id` **Added** * `clerk.users.lock()`: `response` **Changed** * `clerk.organization_invitations.get()`: `response.inviter_id` **Added** * `clerk.organization_invitations.revoke()`: `response.inviter_id` **Added** * `clerk.billing.cancel_subscription_item()`: **Added** * `clerk.billing.list_subscription_items()`: **Added** --- .speakeasy/gen.lock | 86 ++- .speakeasy/gen.yaml | 3 +- .speakeasy/workflow.lock | 14 +- README.md | 17 +- RELEASES.md | 12 +- USAGE.md | 4 - .../clerkerrorerrorenterpriseaccountmeta.md | 7 + ...rerrorenterpriseaccountverificationmeta.md | 7 + docs/models/commerceplan.md | 40 +- docs/models/createsessionrequestbody.md | 7 +- docs/models/enterpriseaccount.md | 21 + docs/models/enterpriseaccountobject.md | 11 + docs/models/enterpriseaccountverification.md | 23 + docs/models/enterpriseconnection.md | 11 + docs/models/enterpriseconnection1.md | 21 + docs/models/enterpriseconnection2.md | 21 + ...nterpriseconnectionenterpriseconnection.md | 17 + docs/models/organizationinvitation.md | 1 + ...ioninvitationwithpublicorganizationdata.md | 1 + docs/models/plan.md | 40 +- docs/models/protocol.md | 12 + .../updateinstanceauthconfigrequestbody.md | 1 - docs/models/updateinstancerequestbody.md | 1 - docs/models/user.md | 3 + docs/models/verificationoauth.md | 15 + ...onoautherrorenterpriseaccountclerkerror.md | 11 + ...oauthverificationenterpriseaccounterror.md | 11 + ...authverificationenterpriseaccountobject.md | 8 + ...authverificationenterpriseaccountstatus.md | 12 + ...ionsamlerrorenterpriseaccountclerkerror.md | 11 + ...nsamlverificationenterpriseaccounterror.md | 11 + ...samlverificationenterpriseaccountobject.md | 8 + ...samlverificationenterpriseaccountstatus.md | 12 + ...mlverificationenterpriseaccountstrategy.md | 8 + .../verificationsamlverificationsaml.md | 15 + ...cketverificationenterpriseaccountobject.md | 8 + ...cketverificationenterpriseaccountstatus.md | 10 + ...etverificationenterpriseaccountstrategy.md | 8 + .../verificationticketverificationticket.md | 13 + docs/sdks/actortokens/README.md | 4 - docs/sdks/allowlistidentifiers/README.md | 6 - docs/sdks/betafeatures/README.md | 3 - docs/sdks/billing/README.md | 149 +++- docs/sdks/blocklistidentifierssdk/README.md | 6 - docs/sdks/clients/README.md | 6 - docs/sdks/commerce/README.md | 154 ---- docs/sdks/domainssdk/README.md | 8 - docs/sdks/emailaddresses/README.md | 8 - docs/sdks/emailandsmstemplates/README.md | 2 - docs/sdks/emailsmstemplates/README.md | 8 - docs/sdks/instancesettingssdk/README.md | 7 - docs/sdks/invitations/README.md | 10 +- docs/sdks/jwkssdk/README.md | 2 - docs/sdks/jwttemplates/README.md | 10 - docs/sdks/m2m/README.md | 8 - docs/sdks/machines/README.md | 18 - docs/sdks/oauthaccesstokens/README.md | 2 - docs/sdks/oauthapplicationssdk/README.md | 12 - docs/sdks/organizationdomainssdk/README.md | 10 - .../sdks/organizationinvitationssdk/README.md | 17 +- .../sdks/organizationmembershipssdk/README.md | 10 - docs/sdks/organizationssdk/README.md | 18 - docs/sdks/phonenumbers/README.md | 8 - docs/sdks/proxychecks/README.md | 2 - docs/sdks/redirecturls/README.md | 8 - docs/sdks/samlconnectionssdk/README.md | 10 - docs/sdks/sessions/README.md | 15 +- docs/sdks/signintokens/README.md | 4 - docs/sdks/signups/README.md | 4 - docs/sdks/templates/README.md | 2 - docs/sdks/testingtokens/README.md | 2 - docs/sdks/users/README.md | 56 -- docs/sdks/waitlistentriessdk/README.md | 10 - docs/sdks/webhooks/README.md | 4 - poetry.lock | 37 +- pyproject.toml | 3 +- src/clerk_backend_api/_version.py | 6 +- src/clerk_backend_api/actortokens.py | 16 +- src/clerk_backend_api/allowlistidentifiers.py | 32 +- src/clerk_backend_api/betafeatures.py | 8 +- src/clerk_backend_api/billing.py | 686 ++++++++++++++++- .../blocklistidentifiers_sdk.py | 32 +- src/clerk_backend_api/clients.py | 24 +- src/clerk_backend_api/commerce.py | 668 ----------------- src/clerk_backend_api/domains_sdk.py | 32 +- src/clerk_backend_api/emailaddresses.py | 32 +- src/clerk_backend_api/emailandsmstemplates.py | 8 +- src/clerk_backend_api/emailsmstemplates.py | 32 +- src/clerk_backend_api/instancesettings_sdk.py | 32 +- src/clerk_backend_api/invitations.py | 36 +- src/clerk_backend_api/jwks_sdk.py | 8 +- src/clerk_backend_api/jwttemplates.py | 40 +- src/clerk_backend_api/m2m.py | 48 +- src/clerk_backend_api/machines.py | 76 +- src/clerk_backend_api/models/__init__.py | 122 +++ src/clerk_backend_api/models/commerceplan.py | 10 +- .../models/commercesubscriptionitem.py | 7 +- .../models/createsessionop.py | 8 +- .../models/enterpriseaccount.py | 707 ++++++++++++++++++ .../models/organizationinvitation.py | 5 +- ...ioninvitationwithpublicorganizationdata.py | 5 +- .../models/updateinstanceauthconfigop.py | 11 - .../models/updateinstanceop.py | 11 - src/clerk_backend_api/models/user.py | 23 + src/clerk_backend_api/oauthaccesstokens.py | 8 +- .../oauthapplications_sdk.py | 56 +- .../organizationdomains_sdk.py | 56 +- .../organizationinvitations_sdk.py | 88 +-- .../organizationmemberships_sdk.py | 60 +- src/clerk_backend_api/organizations_sdk.py | 80 +- src/clerk_backend_api/phonenumbers.py | 32 +- src/clerk_backend_api/proxychecks.py | 8 +- src/clerk_backend_api/redirecturls.py | 32 +- src/clerk_backend_api/samlconnections_sdk.py | 52 +- src/clerk_backend_api/sdk.py | 3 - src/clerk_backend_api/sessions.py | 56 +- src/clerk_backend_api/signintokens.py | 16 +- src/clerk_backend_api/signups.py | 16 +- src/clerk_backend_api/templates.py | 12 +- src/clerk_backend_api/testingtokens.py | 8 +- src/clerk_backend_api/users.py | 258 +++---- .../utils/unmarshal_json_response.py | 16 +- src/clerk_backend_api/waitlistentries_sdk.py | 40 +- src/clerk_backend_api/webhooks.py | 16 +- 124 files changed, 2786 insertions(+), 2037 deletions(-) create mode 100644 docs/models/clerkerrorerrorenterpriseaccountmeta.md create mode 100644 docs/models/clerkerrorerrorenterpriseaccountverificationmeta.md create mode 100644 docs/models/enterpriseaccount.md create mode 100644 docs/models/enterpriseaccountobject.md create mode 100644 docs/models/enterpriseaccountverification.md create mode 100644 docs/models/enterpriseconnection.md create mode 100644 docs/models/enterpriseconnection1.md create mode 100644 docs/models/enterpriseconnection2.md create mode 100644 docs/models/enterpriseconnectionenterpriseconnection.md create mode 100644 docs/models/protocol.md create mode 100644 docs/models/verificationoauth.md create mode 100644 docs/models/verificationoautherrorenterpriseaccountclerkerror.md create mode 100644 docs/models/verificationoauthverificationenterpriseaccounterror.md create mode 100644 docs/models/verificationoauthverificationenterpriseaccountobject.md create mode 100644 docs/models/verificationoauthverificationenterpriseaccountstatus.md create mode 100644 docs/models/verificationsamlerrorenterpriseaccountclerkerror.md create mode 100644 docs/models/verificationsamlverificationenterpriseaccounterror.md create mode 100644 docs/models/verificationsamlverificationenterpriseaccountobject.md create mode 100644 docs/models/verificationsamlverificationenterpriseaccountstatus.md create mode 100644 docs/models/verificationsamlverificationenterpriseaccountstrategy.md create mode 100644 docs/models/verificationsamlverificationsaml.md create mode 100644 docs/models/verificationticketverificationenterpriseaccountobject.md create mode 100644 docs/models/verificationticketverificationenterpriseaccountstatus.md create mode 100644 docs/models/verificationticketverificationenterpriseaccountstrategy.md create mode 100644 docs/models/verificationticketverificationticket.md delete mode 100644 docs/sdks/commerce/README.md delete mode 100644 src/clerk_backend_api/commerce.py create mode 100644 src/clerk_backend_api/models/enterpriseaccount.py diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index ca32abab..3811cb2a 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: bfe29c99-6e67-43fe-b928-64d6a5ed6aa8 management: - docChecksum: 29fc46d3113de4d86668f56bc1f14b25 + docChecksum: 3effb0cfaf5771e826b8a10b3ab89670 docVersion: "2025-11-10" - speakeasyVersion: 1.653.0 - generationVersion: 2.748.0 - releaseVersion: 4.0.0 - configChecksum: 41d88658273843aed53bc5e7696d0521 + speakeasyVersion: 1.658.2 + generationVersion: 2.755.9 + releaseVersion: 4.0.1 + configChecksum: 20afa9e13f930ceaa37797748ce7e712 repoURL: https://github.com/clerk/clerk-sdk-python.git installationURL: https://github.com/clerk/clerk-sdk-python.git published: true @@ -15,7 +15,7 @@ features: additionalDependencies: 1.0.0 additionalProperties: 1.0.1 constsAndDefaults: 1.0.5 - core: 5.23.5 + core: 5.23.9 customCodeRegions: 0.1.1 defaultEnabledRetries: 0.2.0 deprecations: 3.0.2 @@ -72,6 +72,8 @@ generatedFiles: - docs/models/changeproductioninstancedomainrequestbody.md - docs/models/claims.md - docs/models/clerkerror.md + - docs/models/clerkerrorerrorenterpriseaccountmeta.md + - docs/models/clerkerrorerrorenterpriseaccountverificationmeta.md - docs/models/clerkerrorerrorexternalaccountwithverificationmeta.md - docs/models/clerkerrorerrorexternalaccountwithverificationverificationmeta.md - docs/models/clerkerrorerrormeta.md @@ -182,6 +184,13 @@ generatedFiles: - docs/models/emailaddressobject.md - docs/models/emaillink.md - docs/models/enrollmentmode.md + - docs/models/enterpriseaccount.md + - docs/models/enterpriseaccountobject.md + - docs/models/enterpriseaccountverification.md + - docs/models/enterpriseconnection.md + - docs/models/enterpriseconnection1.md + - docs/models/enterpriseconnection2.md + - docs/models/enterpriseconnectionenterpriseconnection.md - docs/models/error.md - docs/models/errorclerkerror.md - docs/models/errormeta.md @@ -361,6 +370,7 @@ generatedFiles: - docs/models/previewtemplaterequest.md - docs/models/previewtemplaterequestbody.md - docs/models/previewtemplateresponsebody.md + - docs/models/protocol.md - docs/models/provider.md - docs/models/proxycheck.md - docs/models/proxycheckobject.md @@ -535,7 +545,12 @@ generatedFiles: - docs/models/verificationgoogleonetapverificationobject.md - docs/models/verificationgoogleonetapverificationstatus.md - docs/models/verificationgoogleonetapverificationstrategy.md + - docs/models/verificationoauth.md - docs/models/verificationoautherrorclerkerror.md + - docs/models/verificationoautherrorenterpriseaccountclerkerror.md + - docs/models/verificationoauthverificationenterpriseaccounterror.md + - docs/models/verificationoauthverificationenterpriseaccountobject.md + - docs/models/verificationoauthverificationenterpriseaccountstatus.md - docs/models/verificationoauthverificationerror.md - docs/models/verificationoauthverificationobject.md - docs/models/verificationoauthverificationstatus.md @@ -550,9 +565,15 @@ generatedFiles: - docs/models/verificationpasskeyverificationstrategy.md - docs/models/verificationsaml.md - docs/models/verificationsamlerrorclerkerror.md + - docs/models/verificationsamlerrorenterpriseaccountclerkerror.md - docs/models/verificationsamlerrorsamlaccountclerkerror.md + - docs/models/verificationsamlverificationenterpriseaccounterror.md + - docs/models/verificationsamlverificationenterpriseaccountobject.md + - docs/models/verificationsamlverificationenterpriseaccountstatus.md + - docs/models/verificationsamlverificationenterpriseaccountstrategy.md - docs/models/verificationsamlverificationerror.md - docs/models/verificationsamlverificationobject.md + - docs/models/verificationsamlverificationsaml.md - docs/models/verificationsamlverificationsamlaccountobject.md - docs/models/verificationsamlverificationsamlaccountstatus.md - docs/models/verificationsamlverificationsamlaccountstrategy.md @@ -561,12 +582,16 @@ generatedFiles: - docs/models/verificationstatus.md - docs/models/verificationstrategy.md - docs/models/verificationticket.md + - docs/models/verificationticketverificationenterpriseaccountobject.md + - docs/models/verificationticketverificationenterpriseaccountstatus.md + - docs/models/verificationticketverificationenterpriseaccountstrategy.md - docs/models/verificationticketverificationobject.md - docs/models/verificationticketverificationsamlaccountobject.md - docs/models/verificationticketverificationsamlaccountstatus.md - docs/models/verificationticketverificationsamlaccountstrategy.md - docs/models/verificationticketverificationstatus.md - docs/models/verificationticketverificationstrategy.md + - docs/models/verificationticketverificationticket.md - docs/models/verificationweb3verificationobject.md - docs/models/verificationweb3verificationstatus.md - docs/models/verificationweb3verificationstrategy.md @@ -610,7 +635,6 @@ generatedFiles: - docs/sdks/billing/README.md - docs/sdks/blocklistidentifierssdk/README.md - docs/sdks/clients/README.md - - docs/sdks/commerce/README.md - docs/sdks/domainssdk/README.md - docs/sdks/emailaddresses/README.md - docs/sdks/emailandsmstemplates/README.md @@ -658,7 +682,6 @@ generatedFiles: - src/clerk_backend_api/billing.py - src/clerk_backend_api/blocklistidentifiers_sdk.py - src/clerk_backend_api/clients.py - - src/clerk_backend_api/commerce.py - src/clerk_backend_api/domains_sdk.py - src/clerk_backend_api/emailaddresses.py - src/clerk_backend_api/emailandsmstemplates.py @@ -747,6 +770,7 @@ generatedFiles: - src/clerk_backend_api/models/domain.py - src/clerk_backend_api/models/domains.py - src/clerk_backend_api/models/emailaddress.py + - src/clerk_backend_api/models/enterpriseaccount.py - src/clerk_backend_api/models/extendbillingsubscriptionitemfreetrialop.py - src/clerk_backend_api/models/extendfreetrialrequest.py - src/clerk_backend_api/models/externalaccountwithverification.py @@ -1104,7 +1128,7 @@ examples: createSession: speakeasy-default-create-session: requestBody: - application/json: {"user_id": ""} + application/json: {"user_id": "", "active_organization_id": ""} responses: "200": application/json: {"object": "session", "id": "sess_123456789abcd", "user_id": "user_123456789abcd", "client_id": "client_123456789abcd", "actor": null, "status": "active", "last_active_organization_id": "org_123456789abcd", "last_active_at": 1622471123, "latest_activity": {"object": "", "id": "", "device_type": "", "is_mobile": false, "browser_name": "", "browser_version": "", "ip_address": "8a1c:ae84:cd0b:daad:9ab5:1e4e:cabc:d1c1", "city": "Boston", "country": "Maldives"}, "expire_at": 1685471123, "abandon_at": 1630471123, "updated_at": 1622532323, "created_at": 1622470000, "tasks": [{"key": ""}, {"key": ""}, {"key": ""}]} @@ -1322,7 +1346,7 @@ examples: order_by: "-created_at" responses: "200": - application/json: [{"id": "user_id_123", "object": "user", "external_id": "external_user_id_123", "primary_email_address_id": "email_id_123", "primary_phone_number_id": "phone_id_123", "primary_web3_wallet_id": "wallet_id_123", "username": "john_doe", "first_name": "John", "last_name": "Doe", "locale": "zh", "image_url": "https://example.com/new-profile.jpg", "has_image": true, "public_metadata": {"role": "admin"}, "private_metadata": {"ssn": "123-45-6789"}, "unsafe_metadata": {"theme": "dark"}, "email_addresses": [{"id": "email_id_123", "object": "email_address", "email_address": "john.doe@example.com", "reserved": false, "verification": {"object": "verification_admin", "status": "verified", "strategy": "admin", "attempts": 840489, "expire_at": 779542, "verified_at_client": ""}, "linked_to": [{"type": "oauth_google", "id": "link_12345"}], "matches_sso_connection": false, "created_at": 1609459200, "updated_at": 1609459200}], "phone_numbers": [{"id": "phone_id_123", "object": "phone_number", "phone_number": "+12345678901", "reserved_for_second_factor": false, "default_second_factor": true, "reserved": false, "verification": {"object": "verification_otp", "status": "unverified", "strategy": "phone_code", "attempts": 905234, "expire_at": 563928, "verified_at_client": ""}, "linked_to": [{"type": "oauth_google", "id": "link_id_123"}], "backup_codes": ["code1", "code2", "code3"], "created_at": 1609459200, "updated_at": 1609459200}], "web3_wallets": [{"id": "wallet_id_123", "object": "web3_wallet", "web3_wallet": "0x123456789abcdef", "verification": {"object": "verification_admin", "status": "verified", "strategy": "admin", "attempts": null, "expire_at": 682381, "verified_at_client": ""}, "created_at": 1609459200, "updated_at": 1609459200}], "passkeys": [{"id": "passkey_id_123", "object": "passkey", "name": "My Passkey", "last_used_at": 1615852800, "verification": {"object": "verification_passkey", "status": "verified", "strategy": "passkey", "nonce": "nonce", "message": null, "attempts": 634404, "expire_at": 583086, "verified_at_client": ""}}], "password_enabled": true, "two_factor_enabled": true, "totp_enabled": true, "backup_code_enabled": true, "mfa_enabled_at": 1615852800, "mfa_disabled_at": null, "external_accounts": [{"object": "external_account", "id": "ext_account_id_123", "provider": "Facebook", "identification_id": "", "provider_user_id": "", "approved_scopes": "", "email_address": "Timothy_Armstrong@yahoo.com", "first_name": "Amya", "last_name": "Nicolas", "image_url": "https://sore-patroller.name", "username": "Thurman.Smith90", "phone_number": "(690) 819-2224 x7382", "public_metadata": {}, "label": "", "created_at": 470136, "updated_at": 761414, "verification": {"object": "verification_google_one_tap", "status": "unverified", "strategy": "google_one_tap", "expire_at": 827691, "attempts": 307866, "verified_at_client": "", "error": {"message": "Error message", "long_message": "Longer error message with more details", "code": "error_code", "meta": {}}}, "user_id": "user_id_at_provider"}], "saml_accounts": [{"id": "saml_account_id_123", "object": "saml_account", "provider": "SAML Provider", "active": true, "email_address": "user@example.com", "first_name": "John", "last_name": "Doe", "provider_user_id": "prov_user_id_123", "last_authenticated_at": 790596, "public_metadata": {"department": "IT"}, "verification": {"object": "verification_saml", "status": "unverified", "strategy": "saml", "external_verification_redirect_url": "https://tricky-mousse.com/", "error": {"message": "Error message", "long_message": "Longer error message with more details", "code": "error_code", "meta": {}}, "expire_at": 682430, "attempts": 419582, "verified_at_client": ""}, "saml_connection": null}], "last_sign_in_at": 1622852400, "banned": false, "locked": false, "lockout_expires_in_seconds": null, "verification_attempts_remaining": 5, "updated_at": 1622852400, "created_at": 1609459200, "delete_self_enabled": true, "create_organization_enabled": true, "create_organizations_limit": 908237, "last_active_at": 1700690400000, "legal_accepted_at": 1700690400000}] + application/json: [{"id": "user_id_123", "object": "user", "external_id": "external_user_id_123", "primary_email_address_id": "email_id_123", "primary_phone_number_id": "phone_id_123", "primary_web3_wallet_id": "wallet_id_123", "username": "john_doe", "first_name": "John", "last_name": "Doe", "locale": "zh", "image_url": "https://example.com/new-profile.jpg", "has_image": true, "public_metadata": {"role": "admin"}, "private_metadata": {"ssn": "123-45-6789"}, "unsafe_metadata": {"theme": "dark"}, "email_addresses": [{"id": "email_id_123", "object": "email_address", "email_address": "john.doe@example.com", "reserved": false, "verification": {"object": "verification_admin", "status": "verified", "strategy": "admin", "attempts": 840489, "expire_at": 779542, "verified_at_client": ""}, "linked_to": [{"type": "oauth_google", "id": "link_12345"}], "matches_sso_connection": false, "created_at": 1609459200, "updated_at": 1609459200}], "phone_numbers": [{"id": "phone_id_123", "object": "phone_number", "phone_number": "+12345678901", "reserved_for_second_factor": false, "default_second_factor": true, "reserved": false, "verification": {"object": "verification_otp", "status": "unverified", "strategy": "phone_code", "attempts": 905234, "expire_at": 563928, "verified_at_client": ""}, "linked_to": [{"type": "oauth_google", "id": "link_id_123"}], "backup_codes": ["code1", "code2", "code3"], "created_at": 1609459200, "updated_at": 1609459200}], "web3_wallets": [{"id": "wallet_id_123", "object": "web3_wallet", "web3_wallet": "0x123456789abcdef", "verification": {"object": "verification_admin", "status": "verified", "strategy": "admin", "attempts": null, "expire_at": 682381, "verified_at_client": ""}, "created_at": 1609459200, "updated_at": 1609459200}], "passkeys": [{"id": "passkey_id_123", "object": "passkey", "name": "My Passkey", "last_used_at": 1615852800, "verification": {"object": "verification_passkey", "status": "verified", "strategy": "passkey", "nonce": "nonce", "message": null, "attempts": 634404, "expire_at": 583086, "verified_at_client": ""}}], "password_enabled": true, "two_factor_enabled": true, "totp_enabled": true, "backup_code_enabled": true, "mfa_enabled_at": 1615852800, "mfa_disabled_at": null, "password_last_updated_at": 462651, "external_accounts": [{"object": "external_account", "id": "ext_account_id_123", "provider": "Facebook", "identification_id": "", "provider_user_id": "", "approved_scopes": "", "email_address": "Timothy_Armstrong@yahoo.com", "first_name": "Amya", "last_name": "Nicolas", "image_url": "https://sore-patroller.name", "username": "Thurman.Smith90", "phone_number": "(690) 819-2224 x7382", "public_metadata": {}, "label": "", "created_at": 470136, "updated_at": 761414, "verification": {"object": "verification_google_one_tap", "status": "unverified", "strategy": "google_one_tap", "expire_at": 827691, "attempts": 307866, "verified_at_client": "", "error": {"message": "Error message", "long_message": "Longer error message with more details", "code": "error_code", "meta": {}}}, "user_id": "user_id_at_provider"}], "saml_accounts": [{"id": "saml_account_id_123", "object": "saml_account", "provider": "SAML Provider", "active": true, "email_address": "user@example.com", "first_name": "John", "last_name": "Doe", "provider_user_id": "prov_user_id_123", "last_authenticated_at": 790596, "public_metadata": {"department": "IT"}, "verification": {"object": "verification_saml", "status": "unverified", "strategy": "saml", "external_verification_redirect_url": "https://tricky-mousse.com/", "error": {"message": "Error message", "long_message": "Longer error message with more details", "code": "error_code", "meta": {}}, "expire_at": 682430, "attempts": 419582, "verified_at_client": ""}, "saml_connection": null}], "enterprise_accounts": [{"id": "", "object": "enterprise_account", "protocol": "saml", "provider": "", "active": false, "email_address": "Edison.Brekke90@hotmail.com", "first_name": "Timothy", "last_name": "Schneider", "provider_user_id": "", "enterprise_connection_id": "", "public_metadata": {"key": ""}, "verification": {"object": "verification_saml", "status": "verified", "strategy": "saml", "external_verification_redirect_url": "https://pushy-mythology.name", "error": {"message": "Error message", "long_message": "Longer error message with more details", "code": "error_code", "meta": {}}, "expire_at": null, "attempts": 171073, "verified_at_client": ""}, "enterprise_connection": {"id": "", "protocol": "", "provider": "", "name": "", "logo_public_url": "https://smug-finding.org/", "domain": "elegant-napkin.com", "domains": [""], "active": false, "sync_user_attributes": false, "allow_subdomains": true, "allow_idp_initiated": true, "disable_additional_identifications": true, "created_at": 35715, "updated_at": 148555}, "last_authenticated_at": 50025}], "organization_memberships": [{"id": "org_mem_123", "object": "organization_membership", "role": "member", "role_name": "", "permissions": ["read", "write"], "public_metadata": {}, "private_metadata": {}, "organization": {"object": "organization", "id": "org_123", "name": "Acme Corp", "slug": "acme-corp", "image_url": "https://palatable-backburn.name", "has_image": false, "members_count": 150, "missing_member_with_elevated_permissions": true, "pending_invitations_count": 419582, "max_allowed_memberships": 300, "admin_delete_enabled": true, "public_metadata": {"public_info": "Info visible to everyone"}, "private_metadata": {"internal_use_only": "Sensitive data"}, "created_by": "user_123456", "created_at": 1625078400, "updated_at": 1625164800}, "public_user_data": {"user_id": "", "first_name": "Martine", "last_name": null, "profile_image_url": "https://rotating-hubris.net/", "image_url": "https://small-daddy.info/", "has_image": true, "identifier": "", "username": "Bradford18"}, "created_at": 1625078400, "updated_at": 1625164800}], "last_sign_in_at": 1622852400, "banned": false, "locked": false, "lockout_expires_in_seconds": null, "verification_attempts_remaining": 5, "updated_at": 1622852400, "created_at": 1609459200, "delete_self_enabled": true, "create_organization_enabled": true, "create_organizations_limit": 908237, "last_active_at": 1700690400000, "legal_accepted_at": 1700690400000}] "400": application/json: {"errors": [{"message": "Invalid input", "long_message": "The input provided does not meet the requirements.", "code": "400_bad_request", "meta": {}}], "meta": {}} CreateUser: @@ -1331,7 +1355,7 @@ examples: application/json: {"external_id": "ext-id-001", "first_name": "John", "last_name": "Doe", "locale": "en", "email_address": ["john.doe@example.com"], "phone_number": ["+12345678901"], "web3_wallet": ["0x123456789abcdef0x123456789abcdef"], "username": "johndoe123", "password": "Secure*Pass4", "password_digest": "$argon2i$v=19$m=4096,t=3,p=1$4t6CL3P7YiHBtwESXawI8Hm20zJj4cs7/4/G3c187e0$m7RQFczcKr5bIR0IIxbpO2P0tyrLjf3eUW3M3QSwnLc", "password_hasher": "", "skip_password_checks": false, "skip_password_requirement": false, "totp_secret": "base32totpsecretkey", "backup_codes": ["123456", "654321"], "public_metadata": {"role": "user"}, "private_metadata": {"internal_id": "789"}, "unsafe_metadata": {"preferences": {"theme": "dark"}}, "delete_self_enabled": true, "legal_accepted_at": "", "skip_legal_checks": false, "create_organization_enabled": null, "create_organizations_limit": 81560, "created_at": "2023-03-15T07:15:20.902Z"} responses: "200": - application/json: {"id": "user_id_123", "object": "user", "external_id": "external_user_id_123", "primary_email_address_id": "email_id_123", "primary_phone_number_id": "phone_id_123", "primary_web3_wallet_id": "wallet_id_123", "username": "john_doe", "first_name": "John", "last_name": "Doe", "locale": "nl", "image_url": "https://example.com/new-profile.jpg", "has_image": true, "public_metadata": {"role": "admin"}, "private_metadata": {"ssn": "123-45-6789"}, "unsafe_metadata": {"theme": "dark"}, "email_addresses": [{"id": "email_id_123", "object": "email_address", "email_address": "john.doe@example.com", "reserved": false, "verification": {"object": "verification_ticket", "status": "verified", "strategy": "ticket", "attempts": null, "expire_at": null, "verified_at_client": ""}, "linked_to": [{"type": "oauth_google", "id": "link_12345"}], "matches_sso_connection": true, "created_at": 1609459200, "updated_at": 1609459200}], "phone_numbers": [{"id": "phone_id_123", "object": "phone_number", "phone_number": "+12345678901", "reserved_for_second_factor": false, "default_second_factor": true, "reserved": false, "verification": {"object": "verification_otp", "status": "verified", "strategy": "phone_code", "attempts": 2, "expire_at": 1622852400, "verified_at_client": ""}, "linked_to": [{"type": "oauth_google", "id": "link_id_123"}], "backup_codes": ["code1", "code2", "code3"], "created_at": 1609459200, "updated_at": 1609459200}], "web3_wallets": [{"id": "wallet_id_123", "object": "web3_wallet", "web3_wallet": "0x123456789abcdef", "verification": {"object": "verification_admin", "status": "verified", "strategy": "admin", "attempts": 0, "expire_at": 1620000000, "verified_at_client": ""}, "created_at": 1609459200, "updated_at": 1609459200}], "passkeys": [{"id": "passkey_id_123", "object": "passkey", "name": "My Passkey", "last_used_at": 1615852800, "verification": {"object": "verification_passkey", "status": "verified", "strategy": "passkey", "nonce": "nonce", "message": "", "attempts": null, "expire_at": null, "verified_at_client": ""}}], "password_enabled": true, "two_factor_enabled": true, "totp_enabled": true, "backup_code_enabled": true, "mfa_enabled_at": 1615852800, "mfa_disabled_at": null, "external_accounts": [{"object": "facebook_account", "id": "ext_account_id_123", "provider": "Facebook", "identification_id": "", "provider_user_id": "", "approved_scopes": "", "email_address": "Jordi_Considine@hotmail.com", "first_name": "Nova", "last_name": "Barrows", "image_url": null, "username": "Peggie1", "phone_number": "(240) 834-3897 x5758", "public_metadata": {"key": "", "key1": ""}, "label": null, "created_at": 149561, "updated_at": 182730, "verification": {"object": "verification_google_one_tap", "status": "unverified", "strategy": "google_one_tap", "expire_at": 432680, "attempts": 818362, "verified_at_client": "", "error": {"message": "Error message", "long_message": "Longer error message with more details", "code": "error_code", "meta": {}}}, "user_id": "user_id_at_provider"}], "saml_accounts": [{"id": "saml_account_id_123", "object": "saml_account", "provider": "SAML Provider", "active": true, "email_address": "user@example.com", "first_name": "John", "last_name": "Doe", "provider_user_id": "prov_user_id_123", "last_authenticated_at": 35779, "public_metadata": {"department": "IT"}, "verification": {"object": "verification_ticket", "status": "verified", "strategy": "ticket", "attempts": null, "expire_at": 1622852400, "verified_at_client": ""}, "saml_connection": {"id": "sc_1234567890", "name": "My Company SAML Config", "domain": "mycompany.com", "domains": [""], "active": true, "provider": "saml_custom", "sync_user_attributes": true, "allow_subdomains": false, "allow_idp_initiated": true, "disable_additional_identifications": true, "created_at": 1614768000, "updated_at": 1622540800}}], "last_sign_in_at": 1622852400, "banned": false, "locked": false, "lockout_expires_in_seconds": null, "verification_attempts_remaining": 5, "updated_at": 1622852400, "created_at": 1609459200, "delete_self_enabled": true, "create_organization_enabled": true, "create_organizations_limit": 476222, "last_active_at": 1700690400000, "legal_accepted_at": 1700690400000} + application/json: {"id": "user_id_123", "object": "user", "external_id": "external_user_id_123", "primary_email_address_id": "email_id_123", "primary_phone_number_id": "phone_id_123", "primary_web3_wallet_id": "wallet_id_123", "username": "john_doe", "first_name": "John", "last_name": "Doe", "locale": "nl", "image_url": "https://example.com/new-profile.jpg", "has_image": true, "public_metadata": {"role": "admin"}, "private_metadata": {"ssn": "123-45-6789"}, "unsafe_metadata": {"theme": "dark"}, "email_addresses": [{"id": "email_id_123", "object": "email_address", "email_address": "john.doe@example.com", "reserved": false, "verification": {"object": "verification_ticket", "status": "verified", "strategy": "ticket", "attempts": null, "expire_at": null, "verified_at_client": ""}, "linked_to": [{"type": "oauth_google", "id": "link_12345"}], "matches_sso_connection": true, "created_at": 1609459200, "updated_at": 1609459200}], "phone_numbers": [{"id": "phone_id_123", "object": "phone_number", "phone_number": "+12345678901", "reserved_for_second_factor": false, "default_second_factor": true, "reserved": false, "verification": {"object": "verification_otp", "status": "verified", "strategy": "phone_code", "attempts": 2, "expire_at": 1622852400, "verified_at_client": ""}, "linked_to": [{"type": "oauth_google", "id": "link_id_123"}], "backup_codes": ["code1", "code2", "code3"], "created_at": 1609459200, "updated_at": 1609459200}], "web3_wallets": [{"id": "wallet_id_123", "object": "web3_wallet", "web3_wallet": "0x123456789abcdef", "verification": {"object": "verification_admin", "status": "verified", "strategy": "admin", "attempts": 0, "expire_at": 1620000000, "verified_at_client": ""}, "created_at": 1609459200, "updated_at": 1609459200}], "passkeys": [{"id": "passkey_id_123", "object": "passkey", "name": "My Passkey", "last_used_at": 1615852800, "verification": {"object": "verification_passkey", "status": "verified", "strategy": "passkey", "nonce": "nonce", "message": "", "attempts": null, "expire_at": null, "verified_at_client": ""}}], "password_enabled": true, "two_factor_enabled": true, "totp_enabled": true, "backup_code_enabled": true, "mfa_enabled_at": 1615852800, "mfa_disabled_at": null, "password_last_updated_at": 15137, "external_accounts": [{"object": "facebook_account", "id": "ext_account_id_123", "provider": "Facebook", "identification_id": "", "provider_user_id": "", "approved_scopes": "", "email_address": "Jordi_Considine@hotmail.com", "first_name": "Nova", "last_name": "Barrows", "image_url": null, "username": "Peggie1", "phone_number": "(240) 834-3897 x5758", "public_metadata": {"key": "", "key1": ""}, "label": null, "created_at": 149561, "updated_at": 182730, "verification": {"object": "verification_google_one_tap", "status": "unverified", "strategy": "google_one_tap", "expire_at": 432680, "attempts": 818362, "verified_at_client": "", "error": {"message": "Error message", "long_message": "Longer error message with more details", "code": "error_code", "meta": {}}}, "user_id": "user_id_at_provider"}], "saml_accounts": [{"id": "saml_account_id_123", "object": "saml_account", "provider": "SAML Provider", "active": true, "email_address": "user@example.com", "first_name": "John", "last_name": "Doe", "provider_user_id": "prov_user_id_123", "last_authenticated_at": 35779, "public_metadata": {"department": "IT"}, "verification": {"object": "verification_ticket", "status": "verified", "strategy": "ticket", "attempts": null, "expire_at": 1622852400, "verified_at_client": ""}, "saml_connection": {"id": "sc_1234567890", "name": "My Company SAML Config", "domain": "mycompany.com", "domains": [""], "active": true, "provider": "saml_custom", "sync_user_attributes": true, "allow_subdomains": false, "allow_idp_initiated": true, "disable_additional_identifications": true, "created_at": 1614768000, "updated_at": 1622540800}}], "enterprise_accounts": [{"id": "", "object": "enterprise_account", "protocol": "saml", "provider": "", "active": false, "email_address": "Jay.Schmitt@gmail.com", "first_name": "Vincenza", "last_name": "Rosenbaum", "provider_user_id": "", "enterprise_connection_id": "", "public_metadata": {"key": "", "key1": ""}, "verification": {"object": "verification_ticket", "status": "expired", "strategy": "ticket", "attempts": 485856, "expire_at": 538593, "verified_at_client": null}, "enterprise_connection": null, "last_authenticated_at": 793877}], "organization_memberships": [{"id": "org_mem_123", "object": "organization_membership", "role": "member", "role_name": "", "permissions": ["read", "write"], "public_metadata": {}, "private_metadata": {}, "organization": {"object": "organization", "id": "org_123", "name": "Acme Corp", "slug": "acme-corp", "image_url": "https://any-pension.com", "has_image": false, "members_count": 150, "missing_member_with_elevated_permissions": false, "pending_invitations_count": 8333, "max_allowed_memberships": 300, "admin_delete_enabled": true, "public_metadata": {"public_info": "Info visible to everyone"}, "private_metadata": {"internal_use_only": "Sensitive data"}, "created_by": "user_123456", "created_at": 1625078400, "updated_at": 1625164800}, "public_user_data": {"user_id": "", "first_name": "Christ", "last_name": "Frami", "profile_image_url": "https://drab-skyline.biz/", "image_url": "https://focused-distinction.name", "has_image": true, "identifier": "", "username": "Kris92"}, "created_at": 1625078400, "updated_at": 1625164800}], "last_sign_in_at": 1622852400, "banned": false, "locked": false, "lockout_expires_in_seconds": null, "verification_attempts_remaining": 5, "updated_at": 1622852400, "created_at": 1609459200, "delete_self_enabled": true, "create_organization_enabled": true, "create_organizations_limit": 476222, "last_active_at": 1700690400000, "legal_accepted_at": 1700690400000} "400": application/json: {"errors": [{"message": "Invalid input", "long_message": "The input provided does not meet the requirements.", "code": "400_bad_request", "meta": {}}], "meta": {}} GetUsersCount: @@ -1393,7 +1417,7 @@ examples: user_id: "usr_1" responses: "200": - application/json: {"id": "user_id_123", "object": "user", "external_id": "external_user_id_123", "primary_email_address_id": "email_id_123", "primary_phone_number_id": "phone_id_123", "primary_web3_wallet_id": "wallet_id_123", "username": "john_doe", "first_name": "John", "last_name": "Doe", "locale": "sv", "image_url": "https://example.com/new-profile.jpg", "has_image": true, "public_metadata": {"role": "admin"}, "private_metadata": {"ssn": "123-45-6789"}, "unsafe_metadata": {"theme": "dark"}, "email_addresses": [{"id": "email_id_123", "object": "email_address", "email_address": "john.doe@example.com", "reserved": false, "verification": {"object": "verification_ticket", "status": "verified", "strategy": "ticket", "attempts": null, "expire_at": null, "verified_at_client": ""}, "linked_to": [{"type": "oauth_google", "id": "link_12345"}], "matches_sso_connection": false, "created_at": 1609459200, "updated_at": 1609459200}], "phone_numbers": [{"id": "phone_id_123", "object": "phone_number", "phone_number": "+12345678901", "reserved_for_second_factor": false, "default_second_factor": true, "reserved": false, "verification": {"object": "verification_admin", "status": "verified", "strategy": "admin", "attempts": 2, "expire_at": 1622852400, "verified_at_client": ""}, "linked_to": [{"type": "oauth_google", "id": "link_id_123"}], "backup_codes": ["code1", "code2", "code3"], "created_at": 1609459200, "updated_at": 1609459200}], "web3_wallets": [{"id": "wallet_id_123", "object": "web3_wallet", "web3_wallet": "0x123456789abcdef", "verification": {"object": "verification_admin", "status": "verified", "strategy": "admin", "attempts": 0, "expire_at": 1620000000, "verified_at_client": ""}, "created_at": 1609459200, "updated_at": 1609459200}], "passkeys": [{"id": "passkey_id_123", "object": "passkey", "name": "My Passkey", "last_used_at": 1615852800, "verification": {"object": "verification_passkey", "status": "verified", "strategy": "passkey", "nonce": "nonce", "message": "", "attempts": null, "expire_at": null, "verified_at_client": ""}}], "password_enabled": true, "two_factor_enabled": true, "totp_enabled": true, "backup_code_enabled": true, "mfa_enabled_at": 1615852800, "mfa_disabled_at": null, "external_accounts": [{"object": "facebook_account", "id": "ext_account_id_123", "provider": "Facebook", "identification_id": "", "provider_user_id": "", "approved_scopes": "", "email_address": "Kristofer22@yahoo.com", "first_name": "Godfrey", "last_name": "Leffler", "image_url": "https://monthly-mobility.com/", "username": "Melisa.Strosin59", "phone_number": "786.245.5997", "public_metadata": {"key": ""}, "label": "", "created_at": 887303, "updated_at": 879970, "verification": null, "user_id": "user_id_at_provider"}], "saml_accounts": [{"id": "saml_account_id_123", "object": "saml_account", "provider": "SAML Provider", "active": true, "email_address": "user@example.com", "first_name": "John", "last_name": "Doe", "provider_user_id": "prov_user_id_123", "last_authenticated_at": 549440, "public_metadata": {"department": "IT"}, "verification": {"object": "verification_saml", "status": "verified", "strategy": "saml", "external_verification_redirect_url": "https://immediate-goodwill.name", "error": {"message": "Error message", "long_message": "Longer error message with more details", "code": "error_code", "meta": {}}, "expire_at": 484271, "attempts": null, "verified_at_client": ""}, "saml_connection": null}], "last_sign_in_at": 1622852400, "banned": false, "locked": false, "lockout_expires_in_seconds": null, "verification_attempts_remaining": 5, "updated_at": 1622852400, "created_at": 1609459200, "delete_self_enabled": true, "create_organization_enabled": true, "create_organizations_limit": 346719, "last_active_at": 1700690400000, "legal_accepted_at": 1700690400000} + application/json: {"id": "user_id_123", "object": "user", "external_id": "external_user_id_123", "primary_email_address_id": "email_id_123", "primary_phone_number_id": "phone_id_123", "primary_web3_wallet_id": "wallet_id_123", "username": "john_doe", "first_name": "John", "last_name": "Doe", "locale": "sv", "image_url": "https://example.com/new-profile.jpg", "has_image": true, "public_metadata": {"role": "admin"}, "private_metadata": {"ssn": "123-45-6789"}, "unsafe_metadata": {"theme": "dark"}, "email_addresses": [{"id": "email_id_123", "object": "email_address", "email_address": "john.doe@example.com", "reserved": false, "verification": {"object": "verification_ticket", "status": "verified", "strategy": "ticket", "attempts": null, "expire_at": null, "verified_at_client": ""}, "linked_to": [{"type": "oauth_google", "id": "link_12345"}], "matches_sso_connection": false, "created_at": 1609459200, "updated_at": 1609459200}], "phone_numbers": [{"id": "phone_id_123", "object": "phone_number", "phone_number": "+12345678901", "reserved_for_second_factor": false, "default_second_factor": true, "reserved": false, "verification": {"object": "verification_admin", "status": "verified", "strategy": "admin", "attempts": 2, "expire_at": 1622852400, "verified_at_client": ""}, "linked_to": [{"type": "oauth_google", "id": "link_id_123"}], "backup_codes": ["code1", "code2", "code3"], "created_at": 1609459200, "updated_at": 1609459200}], "web3_wallets": [{"id": "wallet_id_123", "object": "web3_wallet", "web3_wallet": "0x123456789abcdef", "verification": {"object": "verification_admin", "status": "verified", "strategy": "admin", "attempts": 0, "expire_at": 1620000000, "verified_at_client": ""}, "created_at": 1609459200, "updated_at": 1609459200}], "passkeys": [{"id": "passkey_id_123", "object": "passkey", "name": "My Passkey", "last_used_at": 1615852800, "verification": {"object": "verification_passkey", "status": "verified", "strategy": "passkey", "nonce": "nonce", "message": "", "attempts": null, "expire_at": null, "verified_at_client": ""}}], "password_enabled": true, "two_factor_enabled": true, "totp_enabled": true, "backup_code_enabled": true, "mfa_enabled_at": 1615852800, "mfa_disabled_at": null, "password_last_updated_at": 664708, "external_accounts": [{"object": "facebook_account", "id": "ext_account_id_123", "provider": "Facebook", "identification_id": "", "provider_user_id": "", "approved_scopes": "", "email_address": "Kristofer22@yahoo.com", "first_name": "Godfrey", "last_name": "Leffler", "image_url": "https://monthly-mobility.com/", "username": "Melisa.Strosin59", "phone_number": "786.245.5997", "public_metadata": {"key": ""}, "label": "", "created_at": 887303, "updated_at": 879970, "verification": null, "user_id": "user_id_at_provider"}], "saml_accounts": [{"id": "saml_account_id_123", "object": "saml_account", "provider": "SAML Provider", "active": true, "email_address": "user@example.com", "first_name": "John", "last_name": "Doe", "provider_user_id": "prov_user_id_123", "last_authenticated_at": 549440, "public_metadata": {"department": "IT"}, "verification": {"object": "verification_saml", "status": "verified", "strategy": "saml", "external_verification_redirect_url": "https://immediate-goodwill.name", "error": {"message": "Error message", "long_message": "Longer error message with more details", "code": "error_code", "meta": {}}, "expire_at": 484271, "attempts": null, "verified_at_client": ""}, "saml_connection": null}], "enterprise_accounts": [{"id": "", "object": "enterprise_account", "protocol": "saml", "provider": "", "active": true, "email_address": "Raymundo.Carroll@hotmail.com", "first_name": "Vicente", "last_name": "Farrell", "provider_user_id": "", "enterprise_connection_id": "", "public_metadata": {"key": "", "key1": ""}, "verification": {"object": "verification_oauth", "status": "failed", "strategy": "", "external_verification_redirect_url": "https://ornate-best-seller.biz", "error": {"message": "Error message", "long_message": "Longer error message with more details", "code": "error_code", "meta": {}}, "expire_at": 706654, "attempts": 452888, "verified_at_client": ""}, "enterprise_connection": {"id": "", "protocol": "", "provider": "", "name": "", "logo_public_url": "https://uncomfortable-bend.org", "domain": "robust-appliance.org", "domains": ["", ""], "active": false, "sync_user_attributes": false, "allow_subdomains": false, "allow_idp_initiated": false, "disable_additional_identifications": true, "created_at": 134514, "updated_at": 373210}, "last_authenticated_at": 664608}], "organization_memberships": [{"id": "org_mem_123", "object": "organization_membership", "role": "member", "role_name": "", "permissions": ["read", "write"], "public_metadata": {}, "private_metadata": {}, "organization": {"object": "organization", "id": "org_123", "name": "Acme Corp", "slug": "acme-corp", "image_url": "https://wrong-warming.biz/", "has_image": true, "members_count": 150, "missing_member_with_elevated_permissions": true, "pending_invitations_count": 65195, "max_allowed_memberships": 300, "admin_delete_enabled": true, "public_metadata": {"public_info": "Info visible to everyone"}, "private_metadata": {"internal_use_only": "Sensitive data"}, "created_by": "user_123456", "created_at": 1625078400, "updated_at": 1625164800}, "public_user_data": {"user_id": "", "first_name": "Tavares", "last_name": "Volkman", "profile_image_url": "https://willing-lace.org", "image_url": "https://forsaken-making.info/", "has_image": true, "identifier": null, "username": "Lelia96"}, "created_at": 1625078400, "updated_at": 1625164800}], "last_sign_in_at": 1622852400, "banned": false, "locked": false, "lockout_expires_in_seconds": null, "verification_attempts_remaining": 5, "updated_at": 1622852400, "created_at": 1609459200, "delete_self_enabled": true, "create_organization_enabled": true, "create_organizations_limit": 346719, "last_active_at": 1700690400000, "legal_accepted_at": 1700690400000} "400": application/json: {"errors": [{"message": "Invalid input", "long_message": "The input provided does not meet the requirements.", "code": "400_bad_request", "meta": {}}], "meta": {}} UpdateUser: @@ -1405,7 +1429,7 @@ examples: application/json: {"external_id": "ext_123", "first_name": "Jane", "last_name": "Doe", "locale": "nl", "primary_email_address_id": "eml_12345", "notify_primary_email_address_changed": true, "primary_phone_number_id": "phn_67890", "primary_web3_wallet_id": "wlt_123", "username": "janedoe", "profile_image_id": "img_789", "password": "secretPass123!", "password_digest": "$argon2i$v=19$m=4096,t=3,p=1$4t6CL3P7YiHBtwESXawI8Hm20zJj4cs7/4/G3c187e0$m7RQFczcKr5bIR0IIxbpO2P0tyrLjf3eUW3M3QSwnLc", "password_hasher": "", "skip_password_checks": false, "sign_out_of_other_sessions": true, "totp_secret": "ABCD1234EFGH5678", "backup_codes": ["123456", "654321"], "public_metadata": {"theme": "dark"}, "private_metadata": {"vip": true}, "unsafe_metadata": {"age": 30}, "delete_self_enabled": true, "create_organization_enabled": false, "legal_accepted_at": "", "skip_legal_checks": false, "create_organizations_limit": 824457, "created_at": "2021-04-05T14:30:00.000Z"} responses: "200": - application/json: {"id": "user_id_123", "object": "user", "external_id": "external_user_id_123", "primary_email_address_id": "email_id_123", "primary_phone_number_id": "phone_id_123", "primary_web3_wallet_id": "wallet_id_123", "username": "john_doe", "first_name": "John", "last_name": "Doe", "locale": "da", "image_url": "https://example.com/new-profile.jpg", "has_image": true, "public_metadata": {"role": "admin"}, "private_metadata": {"ssn": "123-45-6789"}, "unsafe_metadata": {"theme": "dark"}, "email_addresses": [{"id": "email_id_123", "object": "email_address", "email_address": "john.doe@example.com", "reserved": false, "verification": {"object": "verification_admin", "status": "verified", "strategy": "admin", "attempts": 232556, "expire_at": 715922, "verified_at_client": ""}, "linked_to": [{"type": "oauth_google", "id": "link_12345"}], "matches_sso_connection": false, "created_at": 1609459200, "updated_at": 1609459200}], "phone_numbers": [{"id": "phone_id_123", "object": "phone_number", "phone_number": "+12345678901", "reserved_for_second_factor": false, "default_second_factor": true, "reserved": false, "verification": {"object": "verification_admin", "status": "verified", "strategy": "admin", "attempts": 2, "expire_at": 1622852400, "verified_at_client": ""}, "linked_to": [{"type": "oauth_google", "id": "link_id_123"}], "backup_codes": ["code1", "code2", "code3"], "created_at": 1609459200, "updated_at": 1609459200}], "web3_wallets": [{"id": "wallet_id_123", "object": "web3_wallet", "web3_wallet": "0x123456789abcdef", "verification": {"object": "verification_admin", "status": "verified", "strategy": "admin", "attempts": null, "expire_at": null, "verified_at_client": ""}, "created_at": 1609459200, "updated_at": 1609459200}], "passkeys": [{"id": "passkey_id_123", "object": "passkey", "name": "My Passkey", "last_used_at": 1615852800, "verification": {"object": "verification_passkey", "status": "verified", "strategy": "passkey", "nonce": "nonce", "message": "", "attempts": null, "expire_at": null, "verified_at_client": ""}}], "password_enabled": true, "two_factor_enabled": true, "totp_enabled": true, "backup_code_enabled": true, "mfa_enabled_at": 1615852800, "mfa_disabled_at": null, "external_accounts": [{"object": "facebook_account", "id": "ext_account_id_123", "provider": "Facebook", "identification_id": "", "provider_user_id": "", "approved_scopes": "", "email_address": "Aubree_Ernser44@gmail.com", "first_name": "Wilson", "last_name": "Dicki", "image_url": "https://interesting-airline.org", "username": "Giovani56", "phone_number": "(648) 722-7745 x34591", "public_metadata": {}, "label": "", "created_at": 713891, "updated_at": 906707, "verification": {"object": "verification_google_one_tap", "status": "verified", "strategy": "google_one_tap", "expire_at": 1615462399, "attempts": 1, "verified_at_client": "", "error": null}, "user_id": "user_id_at_provider"}], "saml_accounts": [{"id": "saml_account_id_123", "object": "saml_account", "provider": "SAML Provider", "active": true, "email_address": "user@example.com", "first_name": "John", "last_name": "Doe", "provider_user_id": "prov_user_id_123", "last_authenticated_at": 549643, "public_metadata": {"department": "IT"}, "verification": {"object": "verification_saml", "status": "verified", "strategy": "saml", "external_verification_redirect_url": "https://example.com/saml_callback", "error": null, "expire_at": 1622852400, "attempts": null, "verified_at_client": ""}, "saml_connection": null}], "last_sign_in_at": 1622852400, "banned": false, "locked": false, "lockout_expires_in_seconds": null, "verification_attempts_remaining": 5, "updated_at": 1622852400, "created_at": 1609459200, "delete_self_enabled": true, "create_organization_enabled": true, "create_organizations_limit": 940474, "last_active_at": 1700690400000, "legal_accepted_at": 1700690400000} + application/json: {"id": "user_id_123", "object": "user", "external_id": "external_user_id_123", "primary_email_address_id": "email_id_123", "primary_phone_number_id": "phone_id_123", "primary_web3_wallet_id": "wallet_id_123", "username": "john_doe", "first_name": "John", "last_name": "Doe", "locale": "da", "image_url": "https://example.com/new-profile.jpg", "has_image": true, "public_metadata": {"role": "admin"}, "private_metadata": {"ssn": "123-45-6789"}, "unsafe_metadata": {"theme": "dark"}, "email_addresses": [{"id": "email_id_123", "object": "email_address", "email_address": "john.doe@example.com", "reserved": false, "verification": {"object": "verification_admin", "status": "verified", "strategy": "admin", "attempts": 232556, "expire_at": 715922, "verified_at_client": ""}, "linked_to": [{"type": "oauth_google", "id": "link_12345"}], "matches_sso_connection": false, "created_at": 1609459200, "updated_at": 1609459200}], "phone_numbers": [{"id": "phone_id_123", "object": "phone_number", "phone_number": "+12345678901", "reserved_for_second_factor": false, "default_second_factor": true, "reserved": false, "verification": {"object": "verification_admin", "status": "verified", "strategy": "admin", "attempts": 2, "expire_at": 1622852400, "verified_at_client": ""}, "linked_to": [{"type": "oauth_google", "id": "link_id_123"}], "backup_codes": ["code1", "code2", "code3"], "created_at": 1609459200, "updated_at": 1609459200}], "web3_wallets": [{"id": "wallet_id_123", "object": "web3_wallet", "web3_wallet": "0x123456789abcdef", "verification": {"object": "verification_admin", "status": "verified", "strategy": "admin", "attempts": null, "expire_at": null, "verified_at_client": ""}, "created_at": 1609459200, "updated_at": 1609459200}], "passkeys": [{"id": "passkey_id_123", "object": "passkey", "name": "My Passkey", "last_used_at": 1615852800, "verification": {"object": "verification_passkey", "status": "verified", "strategy": "passkey", "nonce": "nonce", "message": "", "attempts": null, "expire_at": null, "verified_at_client": ""}}], "password_enabled": true, "two_factor_enabled": true, "totp_enabled": true, "backup_code_enabled": true, "mfa_enabled_at": 1615852800, "mfa_disabled_at": null, "password_last_updated_at": 625102, "external_accounts": [{"object": "facebook_account", "id": "ext_account_id_123", "provider": "Facebook", "identification_id": "", "provider_user_id": "", "approved_scopes": "", "email_address": "Aubree_Ernser44@gmail.com", "first_name": "Wilson", "last_name": "Dicki", "image_url": "https://interesting-airline.org", "username": "Giovani56", "phone_number": "(648) 722-7745 x34591", "public_metadata": {}, "label": "", "created_at": 713891, "updated_at": 906707, "verification": {"object": "verification_google_one_tap", "status": "verified", "strategy": "google_one_tap", "expire_at": 1615462399, "attempts": 1, "verified_at_client": "", "error": null}, "user_id": "user_id_at_provider"}], "saml_accounts": [{"id": "saml_account_id_123", "object": "saml_account", "provider": "SAML Provider", "active": true, "email_address": "user@example.com", "first_name": "John", "last_name": "Doe", "provider_user_id": "prov_user_id_123", "last_authenticated_at": 549643, "public_metadata": {"department": "IT"}, "verification": {"object": "verification_saml", "status": "verified", "strategy": "saml", "external_verification_redirect_url": "https://example.com/saml_callback", "error": null, "expire_at": 1622852400, "attempts": null, "verified_at_client": ""}, "saml_connection": null}], "enterprise_accounts": [{"id": "", "object": "enterprise_account", "protocol": "saml", "provider": "", "active": false, "email_address": "Heath23@yahoo.com", "first_name": "Jason", "last_name": "Jaskolski", "provider_user_id": "", "enterprise_connection_id": "", "public_metadata": {"key": ""}, "verification": {"object": "verification_ticket", "status": "unverified", "strategy": "ticket", "attempts": null, "expire_at": 935960, "verified_at_client": ""}, "enterprise_connection": {"id": "", "protocol": "", "provider": "", "name": "", "logo_public_url": "https://reckless-patroller.info/", "domains": [], "active": false, "sync_user_attributes": false, "allow_subdomains": true, "allow_idp_initiated": false, "disable_additional_identifications": false, "created_at": 870621, "updated_at": 566438}, "last_authenticated_at": 176125}], "organization_memberships": [{"id": "org_mem_123", "object": "organization_membership", "role": "member", "role_name": "", "permissions": ["read", "write"], "public_metadata": {}, "private_metadata": {}, "organization": {"object": "organization", "id": "org_123", "name": "Acme Corp", "slug": "acme-corp", "image_url": "https://scornful-testing.biz/", "has_image": true, "members_count": 150, "missing_member_with_elevated_permissions": false, "pending_invitations_count": 170674, "max_allowed_memberships": 300, "admin_delete_enabled": true, "public_metadata": {"public_info": "Info visible to everyone"}, "private_metadata": {"internal_use_only": "Sensitive data"}, "created_by": "user_123456", "created_at": 1625078400, "updated_at": 1625164800}, "public_user_data": {"user_id": "", "first_name": "Anderson", "last_name": "Smitham", "profile_image_url": "https://wee-jacket.com", "image_url": "https://shoddy-cassava.org", "has_image": true, "identifier": "", "username": "Bruce61"}, "created_at": 1625078400, "updated_at": 1625164800}], "last_sign_in_at": 1622852400, "banned": false, "locked": false, "lockout_expires_in_seconds": null, "verification_attempts_remaining": 5, "updated_at": 1622852400, "created_at": 1609459200, "delete_self_enabled": true, "create_organization_enabled": true, "create_organizations_limit": 940474, "last_active_at": 1700690400000, "legal_accepted_at": 1700690400000} "400": application/json: {"errors": [{"message": "Invalid input", "long_message": "The input provided does not meet the requirements.", "code": "400_bad_request", "meta": {}}], "meta": {}} DeleteUser: @@ -1425,7 +1449,7 @@ examples: user_id: "user_12345" responses: "200": - application/json: {"id": "user_id_123", "object": "user", "external_id": "external_user_id_123", "primary_email_address_id": "email_id_123", "primary_phone_number_id": "phone_id_123", "primary_web3_wallet_id": "wallet_id_123", "username": "john_doe", "first_name": "John", "last_name": "Doe", "locale": "en", "image_url": "https://example.com/new-profile.jpg", "has_image": true, "public_metadata": {"role": "admin"}, "private_metadata": {"ssn": "123-45-6789"}, "unsafe_metadata": {"theme": "dark"}, "email_addresses": [{"id": "email_id_123", "object": "email_address", "email_address": "john.doe@example.com", "reserved": false, "verification": {"object": "verification_from_oauth", "status": "verified", "strategy": "admin", "error": null, "expire_at": 117089, "attempts": 222590, "verified_at_client": null}, "linked_to": [{"type": "oauth_google", "id": "link_12345"}], "matches_sso_connection": false, "created_at": 1609459200, "updated_at": 1609459200}], "phone_numbers": [{"id": "phone_id_123", "object": "phone_number", "phone_number": "+12345678901", "reserved_for_second_factor": false, "default_second_factor": true, "reserved": false, "verification": {"object": "verification_otp", "status": "verified", "strategy": "email_code", "attempts": 2, "expire_at": 1622852400, "verified_at_client": null}, "linked_to": [{"type": "oauth_google", "id": "link_id_123"}], "backup_codes": ["code1", "code2", "code3"], "created_at": 1609459200, "updated_at": 1609459200}], "web3_wallets": [{"id": "wallet_id_123", "object": "web3_wallet", "web3_wallet": "0x123456789abcdef", "verification": {"object": "verification_web3", "status": "verified", "strategy": "web3_metamask_signature", "nonce": "nonce_value", "message": "", "attempts": null, "expire_at": null, "verified_at_client": ""}, "created_at": 1609459200, "updated_at": 1609459200}], "passkeys": [{"id": "passkey_id_123", "object": "passkey", "name": "My Passkey", "last_used_at": 1615852800, "verification": {"object": "verification_passkey", "status": "verified", "strategy": "passkey", "nonce": "nonce", "message": "", "attempts": null, "expire_at": null, "verified_at_client": ""}}], "password_enabled": true, "two_factor_enabled": true, "totp_enabled": true, "backup_code_enabled": true, "mfa_enabled_at": 1615852800, "mfa_disabled_at": null, "external_accounts": [{"object": "external_account", "id": "ext_account_id_123", "provider": "Facebook", "identification_id": "", "provider_user_id": "", "approved_scopes": "", "email_address": "Tyreek31@gmail.com", "first_name": "Freda", "last_name": "Larkin", "image_url": "https://aggravating-creature.org/", "username": "Taya.Kessler90", "phone_number": "256.205.2962", "public_metadata": {"key": "", "key1": ""}, "label": null, "created_at": 228824, "updated_at": 409743, "verification": {"object": "verification_oauth", "status": "verified", "strategy": "oauth_google", "external_verification_redirect_url": "https://oauth.google.com/verify", "error": null, "expire_at": 1615462399, "attempts": 1, "verified_at_client": ""}, "user_id": "user_id_at_provider"}], "saml_accounts": [{"id": "saml_account_id_123", "object": "saml_account", "provider": "SAML Provider", "active": true, "email_address": "user@example.com", "first_name": "John", "last_name": "Doe", "provider_user_id": "prov_user_id_123", "last_authenticated_at": 117089, "public_metadata": {"department": "IT"}, "verification": {"object": "verification_ticket", "status": "verified", "strategy": "ticket", "attempts": null, "expire_at": 1622852400, "verified_at_client": ""}, "saml_connection": {"id": "sc_1234567890", "name": "My Company SAML Config", "domain": "mycompany.com", "domains": [""], "active": true, "provider": "saml_custom", "sync_user_attributes": true, "allow_subdomains": false, "allow_idp_initiated": true, "disable_additional_identifications": true, "created_at": 1614768000, "updated_at": 1622540800}}], "last_sign_in_at": 1622852400, "banned": false, "locked": false, "lockout_expires_in_seconds": null, "verification_attempts_remaining": 5, "updated_at": 1622852400, "created_at": 1609459200, "delete_self_enabled": true, "create_organization_enabled": true, "create_organizations_limit": 589544, "last_active_at": 1700690400000, "legal_accepted_at": 1700690400000} + application/json: {"id": "user_id_123", "object": "user", "external_id": "external_user_id_123", "primary_email_address_id": "email_id_123", "primary_phone_number_id": "phone_id_123", "primary_web3_wallet_id": "wallet_id_123", "username": "john_doe", "first_name": "John", "last_name": "Doe", "locale": "en", "image_url": "https://example.com/new-profile.jpg", "has_image": true, "public_metadata": {"role": "admin"}, "private_metadata": {"ssn": "123-45-6789"}, "unsafe_metadata": {"theme": "dark"}, "email_addresses": [{"id": "email_id_123", "object": "email_address", "email_address": "john.doe@example.com", "reserved": false, "verification": {"object": "verification_from_oauth", "status": "verified", "strategy": "admin", "error": null, "expire_at": 117089, "attempts": 222590, "verified_at_client": null}, "linked_to": [{"type": "oauth_google", "id": "link_12345"}], "matches_sso_connection": false, "created_at": 1609459200, "updated_at": 1609459200}], "phone_numbers": [{"id": "phone_id_123", "object": "phone_number", "phone_number": "+12345678901", "reserved_for_second_factor": false, "default_second_factor": true, "reserved": false, "verification": {"object": "verification_otp", "status": "verified", "strategy": "email_code", "attempts": 2, "expire_at": 1622852400, "verified_at_client": null}, "linked_to": [{"type": "oauth_google", "id": "link_id_123"}], "backup_codes": ["code1", "code2", "code3"], "created_at": 1609459200, "updated_at": 1609459200}], "web3_wallets": [{"id": "wallet_id_123", "object": "web3_wallet", "web3_wallet": "0x123456789abcdef", "verification": {"object": "verification_web3", "status": "verified", "strategy": "web3_metamask_signature", "nonce": "nonce_value", "message": "", "attempts": null, "expire_at": null, "verified_at_client": ""}, "created_at": 1609459200, "updated_at": 1609459200}], "passkeys": [{"id": "passkey_id_123", "object": "passkey", "name": "My Passkey", "last_used_at": 1615852800, "verification": {"object": "verification_passkey", "status": "verified", "strategy": "passkey", "nonce": "nonce", "message": "", "attempts": null, "expire_at": null, "verified_at_client": ""}}], "password_enabled": true, "two_factor_enabled": true, "totp_enabled": true, "backup_code_enabled": true, "mfa_enabled_at": 1615852800, "mfa_disabled_at": null, "password_last_updated_at": 49333, "external_accounts": [{"object": "external_account", "id": "ext_account_id_123", "provider": "Facebook", "identification_id": "", "provider_user_id": "", "approved_scopes": "", "email_address": "Tyreek31@gmail.com", "first_name": "Freda", "last_name": "Larkin", "image_url": "https://aggravating-creature.org/", "username": "Taya.Kessler90", "phone_number": "256.205.2962", "public_metadata": {"key": "", "key1": ""}, "label": null, "created_at": 228824, "updated_at": 409743, "verification": {"object": "verification_oauth", "status": "verified", "strategy": "oauth_google", "external_verification_redirect_url": "https://oauth.google.com/verify", "error": null, "expire_at": 1615462399, "attempts": 1, "verified_at_client": ""}, "user_id": "user_id_at_provider"}], "saml_accounts": [{"id": "saml_account_id_123", "object": "saml_account", "provider": "SAML Provider", "active": true, "email_address": "user@example.com", "first_name": "John", "last_name": "Doe", "provider_user_id": "prov_user_id_123", "last_authenticated_at": 117089, "public_metadata": {"department": "IT"}, "verification": {"object": "verification_ticket", "status": "verified", "strategy": "ticket", "attempts": null, "expire_at": 1622852400, "verified_at_client": ""}, "saml_connection": {"id": "sc_1234567890", "name": "My Company SAML Config", "domain": "mycompany.com", "domains": [""], "active": true, "provider": "saml_custom", "sync_user_attributes": true, "allow_subdomains": false, "allow_idp_initiated": true, "disable_additional_identifications": true, "created_at": 1614768000, "updated_at": 1622540800}}], "enterprise_accounts": [{"id": "", "object": "enterprise_account", "protocol": "oauth", "provider": "", "active": true, "email_address": "Autumn.Pfannerstill@gmail.com", "first_name": "Vern", "last_name": "Gulgowski", "provider_user_id": "", "enterprise_connection_id": "", "public_metadata": {"key": "", "key1": ""}, "verification": {"object": "verification_ticket", "status": "expired", "strategy": "ticket", "attempts": 383637, "expire_at": 230067, "verified_at_client": ""}, "enterprise_connection": null, "last_authenticated_at": 847387}], "organization_memberships": [{"id": "org_mem_123", "object": "organization_membership", "role": "member", "role_name": "", "permissions": ["read", "write"], "public_metadata": {}, "private_metadata": {}, "organization": {"object": "organization", "id": "org_123", "name": "Acme Corp", "slug": "acme-corp", "image_url": "https://upbeat-editor.info/", "has_image": true, "members_count": 150, "missing_member_with_elevated_permissions": false, "pending_invitations_count": 198918, "max_allowed_memberships": 300, "admin_delete_enabled": true, "public_metadata": {"public_info": "Info visible to everyone"}, "private_metadata": {"internal_use_only": "Sensitive data"}, "created_by": "user_123456", "created_at": 1625078400, "updated_at": 1625164800}, "public_user_data": {"user_id": "", "first_name": "Aida", "last_name": "Haley", "profile_image_url": null, "image_url": "https://frightened-marketplace.info/", "has_image": true, "identifier": "", "username": "Richard_Wehner3"}, "created_at": 1625078400, "updated_at": 1625164800}], "last_sign_in_at": 1622852400, "banned": false, "locked": false, "lockout_expires_in_seconds": null, "verification_attempts_remaining": 5, "updated_at": 1622852400, "created_at": 1609459200, "delete_self_enabled": true, "create_organization_enabled": true, "create_organizations_limit": 589544, "last_active_at": 1700690400000, "legal_accepted_at": 1700690400000} "402": application/json: {"errors": [{"message": "Invalid input", "long_message": "The input provided does not meet the requirements.", "code": "400_bad_request", "meta": {}}], "meta": {}} UnbanUser: @@ -1435,7 +1459,7 @@ examples: user_id: "user_12345" responses: "200": - application/json: {"id": "user_id_123", "object": "user", "external_id": "external_user_id_123", "primary_email_address_id": "email_id_123", "primary_phone_number_id": "phone_id_123", "primary_web3_wallet_id": "wallet_id_123", "username": "john_doe", "first_name": "John", "last_name": "Doe", "locale": "ru", "image_url": "https://example.com/new-profile.jpg", "has_image": true, "public_metadata": {"role": "admin"}, "private_metadata": {"ssn": "123-45-6789"}, "unsafe_metadata": {"theme": "dark"}, "email_addresses": [{"id": "email_id_123", "object": "email_address", "email_address": "john.doe@example.com", "reserved": false, "verification": {"object": "verification_otp", "status": "verified", "strategy": "email_code", "attempts": 1, "expire_at": 1615462399, "verified_at_client": ""}, "linked_to": [{"type": "oauth_google", "id": "link_12345"}], "matches_sso_connection": false, "created_at": 1609459200, "updated_at": 1609459200}], "phone_numbers": [{"id": "phone_id_123", "object": "phone_number", "phone_number": "+12345678901", "reserved_for_second_factor": false, "default_second_factor": true, "reserved": false, "verification": {"object": "verification_otp", "status": "verified", "strategy": "email_code", "attempts": 2, "expire_at": 1622852400, "verified_at_client": ""}, "linked_to": [{"type": "oauth_google", "id": "link_id_123"}], "backup_codes": ["code1", "code2", "code3"], "created_at": 1609459200, "updated_at": 1609459200}], "web3_wallets": [{"id": "wallet_id_123", "object": "web3_wallet", "web3_wallet": "0x123456789abcdef", "verification": {"object": "verification_admin", "status": "verified", "strategy": "admin", "attempts": 0, "expire_at": 1620000000, "verified_at_client": ""}, "created_at": 1609459200, "updated_at": 1609459200}], "passkeys": [{"id": "passkey_id_123", "object": "passkey", "name": "My Passkey", "last_used_at": 1615852800, "verification": {"object": "verification_passkey", "status": "verified", "strategy": "passkey", "nonce": "nonce", "message": "", "attempts": null, "expire_at": null, "verified_at_client": ""}}], "password_enabled": true, "two_factor_enabled": true, "totp_enabled": true, "backup_code_enabled": true, "mfa_enabled_at": 1615852800, "mfa_disabled_at": null, "external_accounts": [{"object": "external_account", "id": "ext_account_id_123", "provider": "Facebook", "identification_id": "", "provider_user_id": "", "approved_scopes": "", "email_address": "Willa_Lesch@yahoo.com", "first_name": "Lafayette", "last_name": "Emard", "image_url": "https://stale-skean.biz", "username": null, "phone_number": "686.924.9156", "public_metadata": {"key": "", "key1": "", "key2": ""}, "label": "", "created_at": 987413, "updated_at": 267247, "verification": {"object": "verification_oauth", "status": "verified", "strategy": "oauth_google", "external_verification_redirect_url": "https://oauth.google.com/verify", "error": null, "expire_at": 1615462399, "attempts": 1, "verified_at_client": ""}, "user_id": "user_id_at_provider"}], "saml_accounts": [{"id": "saml_account_id_123", "object": "saml_account", "provider": "SAML Provider", "active": true, "email_address": "user@example.com", "first_name": "John", "last_name": "Doe", "provider_user_id": "prov_user_id_123", "last_authenticated_at": 648874, "public_metadata": {"department": "IT"}, "verification": {"object": "verification_ticket", "status": "verified", "strategy": "ticket", "attempts": null, "expire_at": 1622852400, "verified_at_client": ""}, "saml_connection": {"id": "sc_1234567890", "name": "My Company SAML Config", "domain": "mycompany.com", "domains": ["", ""], "active": true, "provider": "saml_custom", "sync_user_attributes": true, "allow_subdomains": false, "allow_idp_initiated": true, "disable_additional_identifications": false, "created_at": 1614768000, "updated_at": 1622540800}}], "last_sign_in_at": 1622852400, "banned": false, "locked": false, "lockout_expires_in_seconds": null, "verification_attempts_remaining": 5, "updated_at": 1622852400, "created_at": 1609459200, "delete_self_enabled": true, "create_organization_enabled": true, "create_organizations_limit": 412656, "last_active_at": 1700690400000, "legal_accepted_at": 1700690400000} + application/json: {"id": "user_id_123", "object": "user", "external_id": "external_user_id_123", "primary_email_address_id": "email_id_123", "primary_phone_number_id": "phone_id_123", "primary_web3_wallet_id": "wallet_id_123", "username": "john_doe", "first_name": "John", "last_name": "Doe", "locale": "ru", "image_url": "https://example.com/new-profile.jpg", "has_image": true, "public_metadata": {"role": "admin"}, "private_metadata": {"ssn": "123-45-6789"}, "unsafe_metadata": {"theme": "dark"}, "email_addresses": [{"id": "email_id_123", "object": "email_address", "email_address": "john.doe@example.com", "reserved": false, "verification": {"object": "verification_otp", "status": "verified", "strategy": "email_code", "attempts": 1, "expire_at": 1615462399, "verified_at_client": ""}, "linked_to": [{"type": "oauth_google", "id": "link_12345"}], "matches_sso_connection": false, "created_at": 1609459200, "updated_at": 1609459200}], "phone_numbers": [{"id": "phone_id_123", "object": "phone_number", "phone_number": "+12345678901", "reserved_for_second_factor": false, "default_second_factor": true, "reserved": false, "verification": {"object": "verification_otp", "status": "verified", "strategy": "email_code", "attempts": 2, "expire_at": 1622852400, "verified_at_client": ""}, "linked_to": [{"type": "oauth_google", "id": "link_id_123"}], "backup_codes": ["code1", "code2", "code3"], "created_at": 1609459200, "updated_at": 1609459200}], "web3_wallets": [{"id": "wallet_id_123", "object": "web3_wallet", "web3_wallet": "0x123456789abcdef", "verification": {"object": "verification_admin", "status": "verified", "strategy": "admin", "attempts": 0, "expire_at": 1620000000, "verified_at_client": ""}, "created_at": 1609459200, "updated_at": 1609459200}], "passkeys": [{"id": "passkey_id_123", "object": "passkey", "name": "My Passkey", "last_used_at": 1615852800, "verification": {"object": "verification_passkey", "status": "verified", "strategy": "passkey", "nonce": "nonce", "message": "", "attempts": null, "expire_at": null, "verified_at_client": ""}}], "password_enabled": true, "two_factor_enabled": true, "totp_enabled": true, "backup_code_enabled": true, "mfa_enabled_at": 1615852800, "mfa_disabled_at": null, "password_last_updated_at": 340622, "external_accounts": [{"object": "external_account", "id": "ext_account_id_123", "provider": "Facebook", "identification_id": "", "provider_user_id": "", "approved_scopes": "", "email_address": "Willa_Lesch@yahoo.com", "first_name": "Lafayette", "last_name": "Emard", "image_url": "https://stale-skean.biz", "username": null, "phone_number": "686.924.9156", "public_metadata": {"key": "", "key1": "", "key2": ""}, "label": "", "created_at": 987413, "updated_at": 267247, "verification": {"object": "verification_oauth", "status": "verified", "strategy": "oauth_google", "external_verification_redirect_url": "https://oauth.google.com/verify", "error": null, "expire_at": 1615462399, "attempts": 1, "verified_at_client": ""}, "user_id": "user_id_at_provider"}], "saml_accounts": [{"id": "saml_account_id_123", "object": "saml_account", "provider": "SAML Provider", "active": true, "email_address": "user@example.com", "first_name": "John", "last_name": "Doe", "provider_user_id": "prov_user_id_123", "last_authenticated_at": 648874, "public_metadata": {"department": "IT"}, "verification": {"object": "verification_ticket", "status": "verified", "strategy": "ticket", "attempts": null, "expire_at": 1622852400, "verified_at_client": ""}, "saml_connection": {"id": "sc_1234567890", "name": "My Company SAML Config", "domain": "mycompany.com", "domains": ["", ""], "active": true, "provider": "saml_custom", "sync_user_attributes": true, "allow_subdomains": false, "allow_idp_initiated": true, "disable_additional_identifications": false, "created_at": 1614768000, "updated_at": 1622540800}}], "enterprise_accounts": [], "organization_memberships": [{"id": "org_mem_123", "object": "organization_membership", "role": "member", "role_name": "", "permissions": ["read", "write"], "public_metadata": {}, "private_metadata": {}, "organization": {"object": "organization", "id": "org_123", "name": "Acme Corp", "slug": "acme-corp", "image_url": "https://swift-developing.name", "has_image": false, "members_count": 150, "missing_member_with_elevated_permissions": false, "pending_invitations_count": 881019, "max_allowed_memberships": 300, "admin_delete_enabled": true, "public_metadata": {"public_info": "Info visible to everyone"}, "private_metadata": {"internal_use_only": "Sensitive data"}, "created_by": "user_123456", "created_at": 1625078400, "updated_at": 1625164800}, "public_user_data": {"user_id": "", "first_name": "Haskell", "last_name": "Lesch", "profile_image_url": "https://present-mortise.com/", "image_url": "https://wrathful-wilderness.net/", "has_image": false, "identifier": "", "username": null}, "created_at": 1625078400, "updated_at": 1625164800}], "last_sign_in_at": 1622852400, "banned": false, "locked": false, "lockout_expires_in_seconds": null, "verification_attempts_remaining": 5, "updated_at": 1622852400, "created_at": 1609459200, "delete_self_enabled": true, "create_organization_enabled": true, "create_organizations_limit": 412656, "last_active_at": 1700690400000, "legal_accepted_at": 1700690400000} "402": application/json: {"errors": [{"message": "Invalid input", "long_message": "The input provided does not meet the requirements.", "code": "400_bad_request", "meta": {}}], "meta": {}} LockUser: @@ -1445,7 +1469,7 @@ examples: user_id: "user_123456789" responses: "200": - application/json: {"id": "user_id_123", "object": "user", "external_id": "external_user_id_123", "primary_email_address_id": "email_id_123", "primary_phone_number_id": "phone_id_123", "primary_web3_wallet_id": "wallet_id_123", "username": "john_doe", "first_name": "John", "last_name": "Doe", "locale": "it", "image_url": "https://example.com/new-profile.jpg", "has_image": true, "public_metadata": {"role": "admin"}, "private_metadata": {"ssn": "123-45-6789"}, "unsafe_metadata": {"theme": "dark"}, "email_addresses": [{"id": "email_id_123", "object": "email_address", "email_address": "john.doe@example.com", "reserved": false, "verification": {"object": "verification_otp", "status": "verified", "strategy": "phone_code", "attempts": 1, "expire_at": 1615462399, "verified_at_client": ""}, "linked_to": [{"type": "oauth_google", "id": "link_12345"}], "matches_sso_connection": false, "created_at": 1609459200, "updated_at": 1609459200}], "phone_numbers": [{"id": "phone_id_123", "object": "phone_number", "phone_number": "+12345678901", "reserved_for_second_factor": false, "default_second_factor": true, "reserved": false, "verification": {"object": "verification_otp", "status": "verified", "strategy": "phone_code", "attempts": 2, "expire_at": 1622852400, "verified_at_client": ""}, "linked_to": [{"type": "oauth_google", "id": "link_id_123"}], "backup_codes": ["code1", "code2", "code3"], "created_at": 1609459200, "updated_at": 1609459200}], "web3_wallets": [{"id": "wallet_id_123", "object": "web3_wallet", "web3_wallet": "0x123456789abcdef", "verification": {"object": "verification_admin", "status": "verified", "strategy": "admin", "attempts": null, "expire_at": null, "verified_at_client": ""}, "created_at": 1609459200, "updated_at": 1609459200}], "passkeys": [{"id": "passkey_id_123", "object": "passkey", "name": "My Passkey", "last_used_at": 1615852800, "verification": {"object": "verification_passkey", "status": "verified", "strategy": "passkey", "nonce": "nonce", "message": "", "attempts": null, "expire_at": null, "verified_at_client": ""}}], "password_enabled": true, "two_factor_enabled": true, "totp_enabled": true, "backup_code_enabled": true, "mfa_enabled_at": 1615852800, "mfa_disabled_at": null, "external_accounts": [{"object": "facebook_account", "id": "ext_account_id_123", "provider": "Facebook", "identification_id": "", "provider_user_id": "", "approved_scopes": "", "email_address": "Don.West@gmail.com", "first_name": "Chesley", "last_name": "Shanahan", "image_url": "https://muddy-cuckoo.biz", "username": "Vernon59", "phone_number": "824-825-4224 x937", "public_metadata": {}, "label": "", "created_at": 869240, "updated_at": 610510, "verification": {"object": "verification_oauth", "status": "unverified", "strategy": "google_one_tap", "external_verification_redirect_url": "https://square-smoke.net/", "error": {"message": "Error message", "long_message": "Longer error message with more details", "code": "error_code", "meta": {}}, "expire_at": 656786, "attempts": 769139, "verified_at_client": ""}, "user_id": "user_id_at_provider"}], "saml_accounts": [{"id": "saml_account_id_123", "object": "saml_account", "provider": "SAML Provider", "active": true, "email_address": "user@example.com", "first_name": "John", "last_name": "Doe", "provider_user_id": "prov_user_id_123", "last_authenticated_at": 887294, "public_metadata": {"department": "IT"}, "verification": {"object": "verification_ticket", "status": "verified", "strategy": "ticket", "attempts": null, "expire_at": null, "verified_at_client": ""}, "saml_connection": {"id": "sc_1234567890", "name": "My Company SAML Config", "domain": "mycompany.com", "domains": [""], "active": true, "provider": "saml_custom", "sync_user_attributes": true, "allow_subdomains": false, "allow_idp_initiated": true, "disable_additional_identifications": true, "created_at": 1614768000, "updated_at": 1622540800}}], "last_sign_in_at": 1622852400, "banned": false, "locked": false, "lockout_expires_in_seconds": null, "verification_attempts_remaining": 5, "updated_at": 1622852400, "created_at": 1609459200, "delete_self_enabled": true, "create_organization_enabled": true, "create_organizations_limit": 825654, "last_active_at": 1700690400000, "legal_accepted_at": 1700690400000} + application/json: {"id": "user_id_123", "object": "user", "external_id": "external_user_id_123", "primary_email_address_id": "email_id_123", "primary_phone_number_id": "phone_id_123", "primary_web3_wallet_id": "wallet_id_123", "username": "john_doe", "first_name": "John", "last_name": "Doe", "locale": "it", "image_url": "https://example.com/new-profile.jpg", "has_image": true, "public_metadata": {"role": "admin"}, "private_metadata": {"ssn": "123-45-6789"}, "unsafe_metadata": {"theme": "dark"}, "email_addresses": [{"id": "email_id_123", "object": "email_address", "email_address": "john.doe@example.com", "reserved": false, "verification": {"object": "verification_otp", "status": "verified", "strategy": "phone_code", "attempts": 1, "expire_at": 1615462399, "verified_at_client": ""}, "linked_to": [{"type": "oauth_google", "id": "link_12345"}], "matches_sso_connection": false, "created_at": 1609459200, "updated_at": 1609459200}], "phone_numbers": [{"id": "phone_id_123", "object": "phone_number", "phone_number": "+12345678901", "reserved_for_second_factor": false, "default_second_factor": true, "reserved": false, "verification": {"object": "verification_otp", "status": "verified", "strategy": "phone_code", "attempts": 2, "expire_at": 1622852400, "verified_at_client": ""}, "linked_to": [{"type": "oauth_google", "id": "link_id_123"}], "backup_codes": ["code1", "code2", "code3"], "created_at": 1609459200, "updated_at": 1609459200}], "web3_wallets": [{"id": "wallet_id_123", "object": "web3_wallet", "web3_wallet": "0x123456789abcdef", "verification": {"object": "verification_admin", "status": "verified", "strategy": "admin", "attempts": null, "expire_at": null, "verified_at_client": ""}, "created_at": 1609459200, "updated_at": 1609459200}], "passkeys": [{"id": "passkey_id_123", "object": "passkey", "name": "My Passkey", "last_used_at": 1615852800, "verification": {"object": "verification_passkey", "status": "verified", "strategy": "passkey", "nonce": "nonce", "message": "", "attempts": null, "expire_at": null, "verified_at_client": ""}}], "password_enabled": true, "two_factor_enabled": true, "totp_enabled": true, "backup_code_enabled": true, "mfa_enabled_at": 1615852800, "mfa_disabled_at": null, "password_last_updated_at": 230185, "external_accounts": [{"object": "facebook_account", "id": "ext_account_id_123", "provider": "Facebook", "identification_id": "", "provider_user_id": "", "approved_scopes": "", "email_address": "Don.West@gmail.com", "first_name": "Chesley", "last_name": "Shanahan", "image_url": "https://muddy-cuckoo.biz", "username": "Vernon59", "phone_number": "824-825-4224 x937", "public_metadata": {}, "label": "", "created_at": 869240, "updated_at": 610510, "verification": {"object": "verification_oauth", "status": "unverified", "strategy": "google_one_tap", "external_verification_redirect_url": "https://square-smoke.net/", "error": {"message": "Error message", "long_message": "Longer error message with more details", "code": "error_code", "meta": {}}, "expire_at": 656786, "attempts": 769139, "verified_at_client": ""}, "user_id": "user_id_at_provider"}], "saml_accounts": [{"id": "saml_account_id_123", "object": "saml_account", "provider": "SAML Provider", "active": true, "email_address": "user@example.com", "first_name": "John", "last_name": "Doe", "provider_user_id": "prov_user_id_123", "last_authenticated_at": 887294, "public_metadata": {"department": "IT"}, "verification": {"object": "verification_ticket", "status": "verified", "strategy": "ticket", "attempts": null, "expire_at": null, "verified_at_client": ""}, "saml_connection": {"id": "sc_1234567890", "name": "My Company SAML Config", "domain": "mycompany.com", "domains": [""], "active": true, "provider": "saml_custom", "sync_user_attributes": true, "allow_subdomains": false, "allow_idp_initiated": true, "disable_additional_identifications": true, "created_at": 1614768000, "updated_at": 1622540800}}], "enterprise_accounts": [{"id": "", "object": "enterprise_account", "protocol": "saml", "provider": "", "active": true, "email_address": "Dora.Rolfson@hotmail.com", "first_name": "Don", "last_name": "Haley", "provider_user_id": "", "enterprise_connection_id": "", "public_metadata": {"key": ""}, "verification": {"object": "verification_oauth", "status": "transferable", "strategy": "", "external_verification_redirect_url": "https://muddy-cuckoo.biz", "error": {"message": "Error message", "long_message": "Longer error message with more details", "code": "error_code", "meta": {}}, "expire_at": 958342, "attempts": 520911, "verified_at_client": null}, "enterprise_connection": {"id": "", "protocol": "", "provider": "", "name": "", "logo_public_url": null, "domains": ["", "", ""], "active": false, "sync_user_attributes": false, "allow_subdomains": false, "allow_idp_initiated": false, "disable_additional_identifications": true, "created_at": 25659, "updated_at": 330463}, "last_authenticated_at": 114694}], "organization_memberships": [{"id": "org_mem_123", "object": "organization_membership", "role": "member", "role_name": "", "permissions": ["read", "write"], "public_metadata": {}, "private_metadata": {}, "organization": {"object": "organization", "id": "org_123", "name": "Acme Corp", "slug": "acme-corp", "image_url": "https://urban-marketplace.name/", "has_image": true, "members_count": 150, "missing_member_with_elevated_permissions": false, "pending_invitations_count": 825654, "max_allowed_memberships": 300, "admin_delete_enabled": true, "public_metadata": {"public_info": "Info visible to everyone"}, "private_metadata": {"internal_use_only": "Sensitive data"}, "created_by": "user_123456", "created_at": 1625078400, "updated_at": 1625164800}, "public_user_data": {"user_id": "", "first_name": "Irwin", "last_name": "Ferry", "profile_image_url": "https://dental-spring.net/", "image_url": "https://antique-heating.info/", "has_image": false, "identifier": null, "username": "Kaela_Jakubowski45"}, "created_at": 1625078400, "updated_at": 1625164800}], "last_sign_in_at": 1622852400, "banned": false, "locked": false, "lockout_expires_in_seconds": null, "verification_attempts_remaining": 5, "updated_at": 1622852400, "created_at": 1609459200, "delete_self_enabled": true, "create_organization_enabled": true, "create_organizations_limit": 825654, "last_active_at": 1700690400000, "legal_accepted_at": 1700690400000} "403": application/json: {"errors": [{"message": "Invalid input", "long_message": "The input provided does not meet the requirements.", "code": "400_bad_request", "meta": {}}], "meta": {}} UnlockUser: @@ -1455,7 +1479,7 @@ examples: user_id: "user_12345" responses: "200": - application/json: {"id": "user_id_123", "object": "user", "external_id": "external_user_id_123", "primary_email_address_id": "email_id_123", "primary_phone_number_id": "phone_id_123", "primary_web3_wallet_id": "wallet_id_123", "username": "john_doe", "first_name": "John", "last_name": "Doe", "locale": "sv", "image_url": "https://example.com/new-profile.jpg", "has_image": true, "public_metadata": {"role": "admin"}, "private_metadata": {"ssn": "123-45-6789"}, "unsafe_metadata": {"theme": "dark"}, "email_addresses": [{"id": "email_id_123", "object": "email_address", "email_address": "john.doe@example.com", "reserved": false, "verification": {"object": "verification_otp", "status": "verified", "strategy": "email_code", "attempts": 1, "expire_at": 1615462399, "verified_at_client": ""}, "linked_to": [{"type": "oauth_google", "id": "link_12345"}], "matches_sso_connection": false, "created_at": 1609459200, "updated_at": 1609459200}], "phone_numbers": [{"id": "phone_id_123", "object": "phone_number", "phone_number": "+12345678901", "reserved_for_second_factor": false, "default_second_factor": true, "reserved": false, "verification": {"object": "verification_admin", "status": "verified", "strategy": "admin", "attempts": 2, "expire_at": 1622852400, "verified_at_client": ""}, "linked_to": [{"type": "oauth_google", "id": "link_id_123"}], "backup_codes": ["code1", "code2", "code3"], "created_at": 1609459200, "updated_at": 1609459200}], "web3_wallets": [{"id": "wallet_id_123", "object": "web3_wallet", "web3_wallet": "0x123456789abcdef", "verification": {"object": "verification_admin", "status": "verified", "strategy": "admin", "attempts": null, "expire_at": null, "verified_at_client": ""}, "created_at": 1609459200, "updated_at": 1609459200}], "passkeys": [{"id": "passkey_id_123", "object": "passkey", "name": "My Passkey", "last_used_at": 1615852800, "verification": {"object": "verification_passkey", "status": "verified", "strategy": "passkey", "nonce": "nonce", "message": "", "attempts": null, "expire_at": null, "verified_at_client": ""}}], "password_enabled": true, "two_factor_enabled": true, "totp_enabled": true, "backup_code_enabled": true, "mfa_enabled_at": 1615852800, "mfa_disabled_at": null, "external_accounts": [{"object": "facebook_account", "id": "ext_account_id_123", "provider": "Facebook", "identification_id": "", "provider_user_id": "", "approved_scopes": "", "email_address": "Javier.Bechtelar-Bartoletti61@yahoo.com", "first_name": "Edd", "last_name": "McCullough", "image_url": null, "username": "Shannon9", "phone_number": "907-845-3349 x0026", "public_metadata": {"key": ""}, "label": "", "created_at": 259844, "updated_at": 982099, "verification": {"object": "verification_oauth", "status": "verified", "strategy": "oauth_google", "external_verification_redirect_url": "https://oauth.google.com/verify", "error": null, "expire_at": 1615462399, "attempts": 1, "verified_at_client": null}, "user_id": "user_id_at_provider"}], "saml_accounts": [{"id": "saml_account_id_123", "object": "saml_account", "provider": "SAML Provider", "active": true, "email_address": "user@example.com", "first_name": "John", "last_name": "Doe", "provider_user_id": "prov_user_id_123", "last_authenticated_at": 649637, "public_metadata": {"department": "IT"}, "verification": {"object": "verification_saml", "status": "verified", "strategy": "saml", "external_verification_redirect_url": "https://buzzing-freckle.org", "error": {"message": "Error message", "long_message": "Longer error message with more details", "code": "error_code", "meta": {}}, "expire_at": 250489, "attempts": null, "verified_at_client": null}, "saml_connection": null}], "last_sign_in_at": 1622852400, "banned": false, "locked": false, "lockout_expires_in_seconds": null, "verification_attempts_remaining": 5, "updated_at": 1622852400, "created_at": 1609459200, "delete_self_enabled": true, "create_organization_enabled": true, "create_organizations_limit": 200899, "last_active_at": 1700690400000, "legal_accepted_at": 1700690400000} + application/json: {"id": "user_id_123", "object": "user", "external_id": "external_user_id_123", "primary_email_address_id": "email_id_123", "primary_phone_number_id": "phone_id_123", "primary_web3_wallet_id": "wallet_id_123", "username": "john_doe", "first_name": "John", "last_name": "Doe", "locale": "sv", "image_url": "https://example.com/new-profile.jpg", "has_image": true, "public_metadata": {"role": "admin"}, "private_metadata": {"ssn": "123-45-6789"}, "unsafe_metadata": {"theme": "dark"}, "email_addresses": [{"id": "email_id_123", "object": "email_address", "email_address": "john.doe@example.com", "reserved": false, "verification": {"object": "verification_otp", "status": "verified", "strategy": "email_code", "attempts": 1, "expire_at": 1615462399, "verified_at_client": ""}, "linked_to": [{"type": "oauth_google", "id": "link_12345"}], "matches_sso_connection": false, "created_at": 1609459200, "updated_at": 1609459200}], "phone_numbers": [{"id": "phone_id_123", "object": "phone_number", "phone_number": "+12345678901", "reserved_for_second_factor": false, "default_second_factor": true, "reserved": false, "verification": {"object": "verification_admin", "status": "verified", "strategy": "admin", "attempts": 2, "expire_at": 1622852400, "verified_at_client": ""}, "linked_to": [{"type": "oauth_google", "id": "link_id_123"}], "backup_codes": ["code1", "code2", "code3"], "created_at": 1609459200, "updated_at": 1609459200}], "web3_wallets": [{"id": "wallet_id_123", "object": "web3_wallet", "web3_wallet": "0x123456789abcdef", "verification": {"object": "verification_admin", "status": "verified", "strategy": "admin", "attempts": null, "expire_at": null, "verified_at_client": ""}, "created_at": 1609459200, "updated_at": 1609459200}], "passkeys": [{"id": "passkey_id_123", "object": "passkey", "name": "My Passkey", "last_used_at": 1615852800, "verification": {"object": "verification_passkey", "status": "verified", "strategy": "passkey", "nonce": "nonce", "message": "", "attempts": null, "expire_at": null, "verified_at_client": ""}}], "password_enabled": true, "two_factor_enabled": true, "totp_enabled": true, "backup_code_enabled": true, "mfa_enabled_at": 1615852800, "mfa_disabled_at": null, "password_last_updated_at": 664479, "external_accounts": [{"object": "facebook_account", "id": "ext_account_id_123", "provider": "Facebook", "identification_id": "", "provider_user_id": "", "approved_scopes": "", "email_address": "Javier.Bechtelar-Bartoletti61@yahoo.com", "first_name": "Edd", "last_name": "McCullough", "image_url": null, "username": "Shannon9", "phone_number": "907-845-3349 x0026", "public_metadata": {"key": ""}, "label": "", "created_at": 259844, "updated_at": 982099, "verification": {"object": "verification_oauth", "status": "verified", "strategy": "oauth_google", "external_verification_redirect_url": "https://oauth.google.com/verify", "error": null, "expire_at": 1615462399, "attempts": 1, "verified_at_client": null}, "user_id": "user_id_at_provider"}], "saml_accounts": [{"id": "saml_account_id_123", "object": "saml_account", "provider": "SAML Provider", "active": true, "email_address": "user@example.com", "first_name": "John", "last_name": "Doe", "provider_user_id": "prov_user_id_123", "last_authenticated_at": 649637, "public_metadata": {"department": "IT"}, "verification": {"object": "verification_saml", "status": "verified", "strategy": "saml", "external_verification_redirect_url": "https://buzzing-freckle.org", "error": {"message": "Error message", "long_message": "Longer error message with more details", "code": "error_code", "meta": {}}, "expire_at": 250489, "attempts": null, "verified_at_client": null}, "saml_connection": null}], "enterprise_accounts": [{"id": "", "object": "enterprise_account", "protocol": "saml", "provider": "", "active": false, "email_address": "Ashlynn.Stroman@hotmail.com", "first_name": "Javier", "last_name": "Bartoletti", "provider_user_id": "", "enterprise_connection_id": "", "public_metadata": {"key": ""}, "verification": {"object": "verification_ticket", "status": "verified", "strategy": "ticket", "attempts": null, "expire_at": 881795, "verified_at_client": ""}, "enterprise_connection": {"id": "", "protocol": "", "provider": "", "name": "", "logo_public_url": null, "domains": ["", ""], "active": true, "sync_user_attributes": true, "allow_subdomains": true, "allow_idp_initiated": false, "disable_additional_identifications": false, "created_at": 365844, "updated_at": 85440}, "last_authenticated_at": 10111}], "organization_memberships": [{"id": "org_mem_123", "object": "organization_membership", "role": "member", "role_name": "", "permissions": ["read", "write"], "public_metadata": {}, "private_metadata": {}, "organization": {"object": "organization", "id": "org_123", "name": "Acme Corp", "slug": "acme-corp", "image_url": "https://thin-countess.com/", "has_image": false, "members_count": 150, "missing_member_with_elevated_permissions": true, "pending_invitations_count": 646443, "max_allowed_memberships": 300, "admin_delete_enabled": true, "public_metadata": {"public_info": "Info visible to everyone"}, "private_metadata": {"internal_use_only": "Sensitive data"}, "created_by": "user_123456", "created_at": 1625078400, "updated_at": 1625164800}, "public_user_data": {"user_id": "", "first_name": "Markus", "last_name": "Kling", "profile_image_url": null, "image_url": "https://sparse-pear.org/", "has_image": true, "identifier": "", "username": "Marquis65"}, "created_at": 1625078400, "updated_at": 1625164800}], "last_sign_in_at": 1622852400, "banned": false, "locked": false, "lockout_expires_in_seconds": null, "verification_attempts_remaining": 5, "updated_at": 1622852400, "created_at": 1609459200, "delete_self_enabled": true, "create_organization_enabled": true, "create_organizations_limit": 200899, "last_active_at": 1700690400000, "legal_accepted_at": 1700690400000} "403": application/json: {"errors": [{"message": "Invalid input", "long_message": "The input provided does not meet the requirements.", "code": "400_bad_request", "meta": {}}], "meta": {}} SetUserProfileImage: @@ -1467,7 +1491,7 @@ examples: multipart/form-data: {"file": "x-file: example.file"} responses: "200": - application/json: {"id": "user_id_123", "object": "user", "external_id": "external_user_id_123", "primary_email_address_id": "email_id_123", "primary_phone_number_id": "phone_id_123", "primary_web3_wallet_id": "wallet_id_123", "username": "john_doe", "first_name": "John", "last_name": "Doe", "locale": "hi", "image_url": "https://example.com/new-profile.jpg", "has_image": true, "public_metadata": {"role": "admin"}, "private_metadata": {"ssn": "123-45-6789"}, "unsafe_metadata": {"theme": "dark"}, "email_addresses": [{"id": "email_id_123", "object": "email_address", "email_address": "john.doe@example.com", "reserved": false, "verification": {"object": "verification_ticket", "status": "verified", "strategy": "ticket", "attempts": null, "expire_at": null, "verified_at_client": ""}, "linked_to": [{"type": "oauth_google", "id": "link_12345"}], "matches_sso_connection": true, "created_at": 1609459200, "updated_at": 1609459200}], "phone_numbers": [{"id": "phone_id_123", "object": "phone_number", "phone_number": "+12345678901", "reserved_for_second_factor": false, "default_second_factor": true, "reserved": false, "verification": {"object": "verification_admin", "status": "verified", "strategy": "admin", "attempts": 2, "expire_at": 1622852400, "verified_at_client": ""}, "linked_to": [{"type": "oauth_google", "id": "link_id_123"}], "backup_codes": ["code1", "code2", "code3"], "created_at": 1609459200, "updated_at": 1609459200}], "web3_wallets": [{"id": "wallet_id_123", "object": "web3_wallet", "web3_wallet": "0x123456789abcdef", "verification": {"object": "verification_web3", "status": "verified", "strategy": "web3_metamask_signature", "nonce": "nonce_value", "message": "", "attempts": null, "expire_at": null, "verified_at_client": ""}, "created_at": 1609459200, "updated_at": 1609459200}], "passkeys": [{"id": "passkey_id_123", "object": "passkey", "name": "My Passkey", "last_used_at": 1615852800, "verification": {"object": "verification_passkey", "status": "verified", "strategy": "passkey", "nonce": "nonce", "message": null, "attempts": null, "expire_at": null, "verified_at_client": ""}}], "password_enabled": true, "two_factor_enabled": true, "totp_enabled": true, "backup_code_enabled": true, "mfa_enabled_at": 1615852800, "mfa_disabled_at": null, "external_accounts": [{"object": "facebook_account", "id": "ext_account_id_123", "provider": "Facebook", "identification_id": "", "provider_user_id": "", "approved_scopes": "", "email_address": "Evalyn13@hotmail.com", "first_name": "Jewel", "last_name": "Hackett", "image_url": "https://rare-iridescence.name", "username": "Hollis45", "phone_number": "275.296.7398 x121", "public_metadata": {"key": ""}, "label": "", "created_at": 947362, "updated_at": 25796, "verification": {"object": "verification_google_one_tap", "status": "verified", "strategy": "google_one_tap", "expire_at": 1615462399, "attempts": 1, "verified_at_client": "", "error": null}, "user_id": "user_id_at_provider"}], "saml_accounts": [{"id": "saml_account_id_123", "object": "saml_account", "provider": "SAML Provider", "active": true, "email_address": "user@example.com", "first_name": "John", "last_name": "Doe", "provider_user_id": "prov_user_id_123", "last_authenticated_at": 813862, "public_metadata": {"department": "IT"}, "verification": {"object": "verification_ticket", "status": "verified", "strategy": "ticket", "attempts": null, "expire_at": 1622852400, "verified_at_client": null}, "saml_connection": {"id": "sc_1234567890", "name": "My Company SAML Config", "domain": "mycompany.com", "domains": ["", ""], "active": true, "provider": "saml_custom", "sync_user_attributes": true, "allow_subdomains": false, "allow_idp_initiated": true, "disable_additional_identifications": false, "created_at": 1614768000, "updated_at": 1622540800}}], "last_sign_in_at": 1622852400, "banned": false, "locked": false, "lockout_expires_in_seconds": null, "verification_attempts_remaining": 5, "updated_at": 1622852400, "created_at": 1609459200, "delete_self_enabled": true, "create_organization_enabled": true, "create_organizations_limit": 830110, "last_active_at": 1700690400000, "legal_accepted_at": 1700690400000} + application/json: {"id": "user_id_123", "object": "user", "external_id": "external_user_id_123", "primary_email_address_id": "email_id_123", "primary_phone_number_id": "phone_id_123", "primary_web3_wallet_id": "wallet_id_123", "username": "john_doe", "first_name": "John", "last_name": "Doe", "locale": "hi", "image_url": "https://example.com/new-profile.jpg", "has_image": true, "public_metadata": {"role": "admin"}, "private_metadata": {"ssn": "123-45-6789"}, "unsafe_metadata": {"theme": "dark"}, "email_addresses": [{"id": "email_id_123", "object": "email_address", "email_address": "john.doe@example.com", "reserved": false, "verification": {"object": "verification_ticket", "status": "verified", "strategy": "ticket", "attempts": null, "expire_at": null, "verified_at_client": ""}, "linked_to": [{"type": "oauth_google", "id": "link_12345"}], "matches_sso_connection": true, "created_at": 1609459200, "updated_at": 1609459200}], "phone_numbers": [{"id": "phone_id_123", "object": "phone_number", "phone_number": "+12345678901", "reserved_for_second_factor": false, "default_second_factor": true, "reserved": false, "verification": {"object": "verification_admin", "status": "verified", "strategy": "admin", "attempts": 2, "expire_at": 1622852400, "verified_at_client": ""}, "linked_to": [{"type": "oauth_google", "id": "link_id_123"}], "backup_codes": ["code1", "code2", "code3"], "created_at": 1609459200, "updated_at": 1609459200}], "web3_wallets": [{"id": "wallet_id_123", "object": "web3_wallet", "web3_wallet": "0x123456789abcdef", "verification": {"object": "verification_web3", "status": "verified", "strategy": "web3_metamask_signature", "nonce": "nonce_value", "message": "", "attempts": null, "expire_at": null, "verified_at_client": ""}, "created_at": 1609459200, "updated_at": 1609459200}], "passkeys": [{"id": "passkey_id_123", "object": "passkey", "name": "My Passkey", "last_used_at": 1615852800, "verification": {"object": "verification_passkey", "status": "verified", "strategy": "passkey", "nonce": "nonce", "message": null, "attempts": null, "expire_at": null, "verified_at_client": ""}}], "password_enabled": true, "two_factor_enabled": true, "totp_enabled": true, "backup_code_enabled": true, "mfa_enabled_at": 1615852800, "mfa_disabled_at": null, "password_last_updated_at": 571350, "external_accounts": [{"object": "facebook_account", "id": "ext_account_id_123", "provider": "Facebook", "identification_id": "", "provider_user_id": "", "approved_scopes": "", "email_address": "Evalyn13@hotmail.com", "first_name": "Jewel", "last_name": "Hackett", "image_url": "https://rare-iridescence.name", "username": "Hollis45", "phone_number": "275.296.7398 x121", "public_metadata": {"key": ""}, "label": "", "created_at": 947362, "updated_at": 25796, "verification": {"object": "verification_google_one_tap", "status": "verified", "strategy": "google_one_tap", "expire_at": 1615462399, "attempts": 1, "verified_at_client": "", "error": null}, "user_id": "user_id_at_provider"}], "saml_accounts": [{"id": "saml_account_id_123", "object": "saml_account", "provider": "SAML Provider", "active": true, "email_address": "user@example.com", "first_name": "John", "last_name": "Doe", "provider_user_id": "prov_user_id_123", "last_authenticated_at": 813862, "public_metadata": {"department": "IT"}, "verification": {"object": "verification_ticket", "status": "verified", "strategy": "ticket", "attempts": null, "expire_at": 1622852400, "verified_at_client": null}, "saml_connection": {"id": "sc_1234567890", "name": "My Company SAML Config", "domain": "mycompany.com", "domains": ["", ""], "active": true, "provider": "saml_custom", "sync_user_attributes": true, "allow_subdomains": false, "allow_idp_initiated": true, "disable_additional_identifications": false, "created_at": 1614768000, "updated_at": 1622540800}}], "enterprise_accounts": [], "organization_memberships": [{"id": "org_mem_123", "object": "organization_membership", "role": "member", "role_name": "", "permissions": ["read", "write"], "public_metadata": {}, "private_metadata": {}, "organization": {"object": "organization", "id": "org_123", "name": "Acme Corp", "slug": "acme-corp", "image_url": "https://juicy-barracks.net", "has_image": false, "members_count": 150, "missing_member_with_elevated_permissions": true, "pending_invitations_count": 978454, "max_allowed_memberships": 300, "admin_delete_enabled": true, "public_metadata": {"public_info": "Info visible to everyone"}, "private_metadata": {"internal_use_only": "Sensitive data"}, "created_by": "user_123456", "created_at": 1625078400, "updated_at": 1625164800}, "public_user_data": {"user_id": "", "first_name": "Mckenzie", "last_name": "Skiles-Buckridge", "profile_image_url": "https://untried-knickers.name/", "image_url": "https://monumental-yogurt.name/", "has_image": true, "identifier": "", "username": "Hollis45"}, "created_at": 1625078400, "updated_at": 1625164800}], "last_sign_in_at": 1622852400, "banned": false, "locked": false, "lockout_expires_in_seconds": null, "verification_attempts_remaining": 5, "updated_at": 1622852400, "created_at": 1609459200, "delete_self_enabled": true, "create_organization_enabled": true, "create_organizations_limit": 830110, "last_active_at": 1700690400000, "legal_accepted_at": 1700690400000} "400": application/json: {"errors": [{"message": "Invalid input", "long_message": "The input provided does not meet the requirements.", "code": "400_bad_request", "meta": {}}], "meta": {}} DeleteUserProfileImage: @@ -1477,7 +1501,7 @@ examples: user_id: "usr_test123" responses: "200": - application/json: {"id": "user_id_123", "object": "user", "external_id": "external_user_id_123", "primary_email_address_id": "email_id_123", "primary_phone_number_id": "phone_id_123", "primary_web3_wallet_id": "wallet_id_123", "username": "john_doe", "first_name": "John", "last_name": "Doe", "locale": "zh", "image_url": "https://example.com/new-profile.jpg", "has_image": true, "public_metadata": {"role": "admin"}, "private_metadata": {"ssn": "123-45-6789"}, "unsafe_metadata": {"theme": "dark"}, "email_addresses": [{"id": "email_id_123", "object": "email_address", "email_address": "john.doe@example.com", "reserved": false, "verification": {"object": "verification_ticket", "status": "verified", "strategy": "ticket", "attempts": null, "expire_at": null, "verified_at_client": ""}, "linked_to": [{"type": "oauth_google", "id": "link_12345"}], "matches_sso_connection": false, "created_at": 1609459200, "updated_at": 1609459200}], "phone_numbers": [{"id": "phone_id_123", "object": "phone_number", "phone_number": "+12345678901", "reserved_for_second_factor": false, "default_second_factor": true, "reserved": false, "verification": {"object": "verification_otp", "status": "verified", "strategy": "phone_code", "attempts": 2, "expire_at": 1622852400, "verified_at_client": ""}, "linked_to": [{"type": "oauth_google", "id": "link_id_123"}], "backup_codes": ["code1", "code2", "code3"], "created_at": 1609459200, "updated_at": 1609459200}], "web3_wallets": [{"id": "wallet_id_123", "object": "web3_wallet", "web3_wallet": "0x123456789abcdef", "verification": {"object": "verification_admin", "status": "verified", "strategy": "admin", "attempts": 0, "expire_at": 1620000000, "verified_at_client": ""}, "created_at": 1609459200, "updated_at": 1609459200}], "passkeys": [{"id": "passkey_id_123", "object": "passkey", "name": "My Passkey", "last_used_at": 1615852800, "verification": {"object": "verification_passkey", "status": "verified", "strategy": "passkey", "nonce": "nonce", "message": null, "attempts": null, "expire_at": null, "verified_at_client": ""}}], "password_enabled": true, "two_factor_enabled": true, "totp_enabled": true, "backup_code_enabled": true, "mfa_enabled_at": 1615852800, "mfa_disabled_at": null, "external_accounts": [{"object": "google_account", "id": "ext_account_id_123", "provider": "Facebook", "identification_id": "", "provider_user_id": "", "approved_scopes": "", "email_address": "Leda.Howell23@hotmail.com", "first_name": "Georgette", "last_name": "Veum", "image_url": "https://wobbly-allocation.biz/", "username": "Clifford88", "phone_number": "920.998.6934", "public_metadata": {"key": "", "key1": ""}, "label": "", "created_at": 355458, "updated_at": 464532, "verification": {"object": "verification_oauth", "status": "verified", "strategy": "oauth_google", "external_verification_redirect_url": "https://oauth.google.com/verify", "error": null, "expire_at": 1615462399, "attempts": 1, "verified_at_client": ""}, "user_id": "user_id_at_provider"}], "saml_accounts": [{"id": "saml_account_id_123", "object": "saml_account", "provider": "SAML Provider", "active": true, "email_address": "user@example.com", "first_name": "John", "last_name": "Doe", "provider_user_id": "prov_user_id_123", "last_authenticated_at": 169267, "public_metadata": {"department": "IT"}, "verification": {"object": "verification_saml", "status": "verified", "strategy": "saml", "external_verification_redirect_url": "https://unwieldy-place.biz", "error": {"message": "Error message", "long_message": "Longer error message with more details", "code": "error_code", "meta": {}}, "expire_at": 32121, "attempts": null, "verified_at_client": ""}, "saml_connection": {"id": "sc_1234567890", "name": "My Company SAML Config", "domain": "mycompany.com", "domains": [""], "active": true, "provider": "saml_custom", "sync_user_attributes": true, "allow_subdomains": false, "allow_idp_initiated": true, "disable_additional_identifications": true, "created_at": 1614768000, "updated_at": 1622540800}}], "last_sign_in_at": 1622852400, "banned": false, "locked": false, "lockout_expires_in_seconds": null, "verification_attempts_remaining": 5, "updated_at": 1622852400, "created_at": 1609459200, "delete_self_enabled": true, "create_organization_enabled": true, "create_organizations_limit": 776566, "last_active_at": 1700690400000, "legal_accepted_at": 1700690400000} + application/json: {"id": "user_id_123", "object": "user", "external_id": "external_user_id_123", "primary_email_address_id": "email_id_123", "primary_phone_number_id": "phone_id_123", "primary_web3_wallet_id": "wallet_id_123", "username": "john_doe", "first_name": "John", "last_name": "Doe", "locale": "zh", "image_url": "https://example.com/new-profile.jpg", "has_image": true, "public_metadata": {"role": "admin"}, "private_metadata": {"ssn": "123-45-6789"}, "unsafe_metadata": {"theme": "dark"}, "email_addresses": [{"id": "email_id_123", "object": "email_address", "email_address": "john.doe@example.com", "reserved": false, "verification": {"object": "verification_ticket", "status": "verified", "strategy": "ticket", "attempts": null, "expire_at": null, "verified_at_client": ""}, "linked_to": [{"type": "oauth_google", "id": "link_12345"}], "matches_sso_connection": false, "created_at": 1609459200, "updated_at": 1609459200}], "phone_numbers": [{"id": "phone_id_123", "object": "phone_number", "phone_number": "+12345678901", "reserved_for_second_factor": false, "default_second_factor": true, "reserved": false, "verification": {"object": "verification_otp", "status": "verified", "strategy": "phone_code", "attempts": 2, "expire_at": 1622852400, "verified_at_client": ""}, "linked_to": [{"type": "oauth_google", "id": "link_id_123"}], "backup_codes": ["code1", "code2", "code3"], "created_at": 1609459200, "updated_at": 1609459200}], "web3_wallets": [{"id": "wallet_id_123", "object": "web3_wallet", "web3_wallet": "0x123456789abcdef", "verification": {"object": "verification_admin", "status": "verified", "strategy": "admin", "attempts": 0, "expire_at": 1620000000, "verified_at_client": ""}, "created_at": 1609459200, "updated_at": 1609459200}], "passkeys": [{"id": "passkey_id_123", "object": "passkey", "name": "My Passkey", "last_used_at": 1615852800, "verification": {"object": "verification_passkey", "status": "verified", "strategy": "passkey", "nonce": "nonce", "message": null, "attempts": null, "expire_at": null, "verified_at_client": ""}}], "password_enabled": true, "two_factor_enabled": true, "totp_enabled": true, "backup_code_enabled": true, "mfa_enabled_at": 1615852800, "mfa_disabled_at": null, "password_last_updated_at": 494195, "external_accounts": [{"object": "google_account", "id": "ext_account_id_123", "provider": "Facebook", "identification_id": "", "provider_user_id": "", "approved_scopes": "", "email_address": "Leda.Howell23@hotmail.com", "first_name": "Georgette", "last_name": "Veum", "image_url": "https://wobbly-allocation.biz/", "username": "Clifford88", "phone_number": "920.998.6934", "public_metadata": {"key": "", "key1": ""}, "label": "", "created_at": 355458, "updated_at": 464532, "verification": {"object": "verification_oauth", "status": "verified", "strategy": "oauth_google", "external_verification_redirect_url": "https://oauth.google.com/verify", "error": null, "expire_at": 1615462399, "attempts": 1, "verified_at_client": ""}, "user_id": "user_id_at_provider"}], "saml_accounts": [{"id": "saml_account_id_123", "object": "saml_account", "provider": "SAML Provider", "active": true, "email_address": "user@example.com", "first_name": "John", "last_name": "Doe", "provider_user_id": "prov_user_id_123", "last_authenticated_at": 169267, "public_metadata": {"department": "IT"}, "verification": {"object": "verification_saml", "status": "verified", "strategy": "saml", "external_verification_redirect_url": "https://unwieldy-place.biz", "error": {"message": "Error message", "long_message": "Longer error message with more details", "code": "error_code", "meta": {}}, "expire_at": 32121, "attempts": null, "verified_at_client": ""}, "saml_connection": {"id": "sc_1234567890", "name": "My Company SAML Config", "domain": "mycompany.com", "domains": [""], "active": true, "provider": "saml_custom", "sync_user_attributes": true, "allow_subdomains": false, "allow_idp_initiated": true, "disable_additional_identifications": true, "created_at": 1614768000, "updated_at": 1622540800}}], "enterprise_accounts": [{"id": "", "object": "enterprise_account", "protocol": "oauth", "provider": "", "active": true, "email_address": "Derek_Volkman@hotmail.com", "first_name": "Gianni", "last_name": "Balistreri", "provider_user_id": "", "enterprise_connection_id": "", "public_metadata": {"key": "", "key1": "", "key2": ""}, "verification": {"object": "verification_ticket", "status": "expired", "strategy": "ticket", "attempts": null, "expire_at": 132240, "verified_at_client": ""}, "enterprise_connection": {"id": "", "protocol": "", "provider": "", "name": "", "logo_public_url": "https://scented-poppy.name", "domains": [""], "active": true, "sync_user_attributes": false, "allow_subdomains": true, "allow_idp_initiated": false, "disable_additional_identifications": false, "created_at": 219490, "updated_at": 680799}, "last_authenticated_at": 345760}], "organization_memberships": [{"id": "org_mem_123", "object": "organization_membership", "role": "member", "role_name": "", "permissions": ["read", "write"], "public_metadata": {}, "private_metadata": {}, "organization": {"object": "organization", "id": "org_123", "name": "Acme Corp", "slug": "acme-corp", "image_url": "https://acclaimed-charm.org", "has_image": true, "members_count": 150, "missing_member_with_elevated_permissions": true, "pending_invitations_count": 892410, "max_allowed_memberships": 300, "admin_delete_enabled": true, "public_metadata": {"public_info": "Info visible to everyone"}, "private_metadata": {"internal_use_only": "Sensitive data"}, "created_by": "user_123456", "created_at": 1625078400, "updated_at": 1625164800}, "public_user_data": {"user_id": "", "first_name": "Brenna", "last_name": null, "profile_image_url": "https://negative-earth.net", "image_url": "https://rewarding-coordination.org", "has_image": false, "identifier": "", "username": "Elza.Wintheiser"}, "created_at": 1625078400, "updated_at": 1625164800}], "last_sign_in_at": 1622852400, "banned": false, "locked": false, "lockout_expires_in_seconds": null, "verification_attempts_remaining": 5, "updated_at": 1622852400, "created_at": 1609459200, "delete_self_enabled": true, "create_organization_enabled": true, "create_organizations_limit": 776566, "last_active_at": 1700690400000, "legal_accepted_at": 1700690400000} "404": application/json: {"errors": [{"message": "Invalid input", "long_message": "The input provided does not meet the requirements.", "code": "400_bad_request", "meta": {}}], "meta": {}} UpdateUserMetadata: @@ -1489,7 +1513,7 @@ examples: application/json: {"public_metadata": {"key": ""}, "private_metadata": {"key": "", "key1": ""}, "unsafe_metadata": {"key": "", "key1": ""}} responses: "200": - application/json: {"id": "user_id_123", "object": "user", "external_id": "external_user_id_123", "primary_email_address_id": "email_id_123", "primary_phone_number_id": "phone_id_123", "primary_web3_wallet_id": "wallet_id_123", "username": "john_doe", "first_name": "John", "last_name": "Doe", "locale": "ja", "image_url": "https://example.com/new-profile.jpg", "has_image": true, "public_metadata": {"role": "admin"}, "private_metadata": {"ssn": "123-45-6789"}, "unsafe_metadata": {"theme": "dark"}, "email_addresses": [{"id": "email_id_123", "object": "email_address", "email_address": "john.doe@example.com", "reserved": false, "verification": {"object": "verification_otp", "status": "verified", "strategy": "email_code", "attempts": null, "expire_at": null, "verified_at_client": ""}, "linked_to": [{"type": "oauth_google", "id": "link_12345"}], "matches_sso_connection": false, "created_at": 1609459200, "updated_at": 1609459200}], "phone_numbers": [{"id": "phone_id_123", "object": "phone_number", "phone_number": "+12345678901", "reserved_for_second_factor": false, "default_second_factor": true, "reserved": false, "verification": {"object": "verification_otp", "status": "verified", "strategy": "phone_code", "attempts": 2, "expire_at": 1622852400, "verified_at_client": ""}, "linked_to": [{"type": "oauth_google", "id": "link_id_123"}], "backup_codes": ["code1", "code2", "code3"], "created_at": 1609459200, "updated_at": 1609459200}], "web3_wallets": [{"id": "wallet_id_123", "object": "web3_wallet", "web3_wallet": "0x123456789abcdef", "verification": {"object": "verification_admin", "status": "verified", "strategy": "admin", "attempts": null, "expire_at": null, "verified_at_client": ""}, "created_at": 1609459200, "updated_at": 1609459200}], "passkeys": [{"id": "passkey_id_123", "object": "passkey", "name": "My Passkey", "last_used_at": 1615852800, "verification": {"object": "verification_passkey", "status": "verified", "strategy": "passkey", "nonce": "nonce", "message": "", "attempts": null, "expire_at": null, "verified_at_client": ""}}], "password_enabled": true, "two_factor_enabled": true, "totp_enabled": true, "backup_code_enabled": true, "mfa_enabled_at": 1615852800, "mfa_disabled_at": null, "external_accounts": [{"object": "google_account", "id": "ext_account_id_123", "provider": "Facebook", "identification_id": "", "provider_user_id": "", "approved_scopes": "", "email_address": "Sherman_Stanton@yahoo.com", "first_name": "Kristian", "last_name": "Bartell", "image_url": "https://ecstatic-juggernaut.org", "username": "Alayna_McLaughlin", "phone_number": "1-281-985-7838 x38866", "public_metadata": {"key": ""}, "label": "", "created_at": 24797, "updated_at": 885925, "verification": {"object": "verification_google_one_tap", "status": "verified", "strategy": "google_one_tap", "expire_at": 1615462399, "attempts": 1, "verified_at_client": "", "error": null}, "user_id": "user_id_at_provider"}], "saml_accounts": [{"id": "saml_account_id_123", "object": "saml_account", "provider": "SAML Provider", "active": true, "email_address": "user@example.com", "first_name": "John", "last_name": "Doe", "provider_user_id": "prov_user_id_123", "last_authenticated_at": 849797, "public_metadata": {"department": "IT"}, "verification": {"object": "verification_saml", "status": "verified", "strategy": "saml", "external_verification_redirect_url": null, "error": {"message": "Error message", "long_message": "Longer error message with more details", "code": "error_code", "meta": {}}, "expire_at": 613304, "attempts": null, "verified_at_client": ""}, "saml_connection": {"id": "sc_1234567890", "name": "My Company SAML Config", "domain": "mycompany.com", "domains": [""], "active": true, "provider": "saml_custom", "sync_user_attributes": true, "allow_subdomains": false, "allow_idp_initiated": true, "disable_additional_identifications": false, "created_at": 1614768000, "updated_at": 1622540800}}], "last_sign_in_at": 1622852400, "banned": false, "locked": false, "lockout_expires_in_seconds": null, "verification_attempts_remaining": 5, "updated_at": 1622852400, "created_at": 1609459200, "delete_self_enabled": true, "create_organization_enabled": true, "create_organizations_limit": 466423, "last_active_at": 1700690400000, "legal_accepted_at": 1700690400000} + application/json: {"id": "user_id_123", "object": "user", "external_id": "external_user_id_123", "primary_email_address_id": "email_id_123", "primary_phone_number_id": "phone_id_123", "primary_web3_wallet_id": "wallet_id_123", "username": "john_doe", "first_name": "John", "last_name": "Doe", "locale": "ja", "image_url": "https://example.com/new-profile.jpg", "has_image": true, "public_metadata": {"role": "admin"}, "private_metadata": {"ssn": "123-45-6789"}, "unsafe_metadata": {"theme": "dark"}, "email_addresses": [{"id": "email_id_123", "object": "email_address", "email_address": "john.doe@example.com", "reserved": false, "verification": {"object": "verification_otp", "status": "verified", "strategy": "email_code", "attempts": null, "expire_at": null, "verified_at_client": ""}, "linked_to": [{"type": "oauth_google", "id": "link_12345"}], "matches_sso_connection": false, "created_at": 1609459200, "updated_at": 1609459200}], "phone_numbers": [{"id": "phone_id_123", "object": "phone_number", "phone_number": "+12345678901", "reserved_for_second_factor": false, "default_second_factor": true, "reserved": false, "verification": {"object": "verification_otp", "status": "verified", "strategy": "phone_code", "attempts": 2, "expire_at": 1622852400, "verified_at_client": ""}, "linked_to": [{"type": "oauth_google", "id": "link_id_123"}], "backup_codes": ["code1", "code2", "code3"], "created_at": 1609459200, "updated_at": 1609459200}], "web3_wallets": [{"id": "wallet_id_123", "object": "web3_wallet", "web3_wallet": "0x123456789abcdef", "verification": {"object": "verification_admin", "status": "verified", "strategy": "admin", "attempts": null, "expire_at": null, "verified_at_client": ""}, "created_at": 1609459200, "updated_at": 1609459200}], "passkeys": [{"id": "passkey_id_123", "object": "passkey", "name": "My Passkey", "last_used_at": 1615852800, "verification": {"object": "verification_passkey", "status": "verified", "strategy": "passkey", "nonce": "nonce", "message": "", "attempts": null, "expire_at": null, "verified_at_client": ""}}], "password_enabled": true, "two_factor_enabled": true, "totp_enabled": true, "backup_code_enabled": true, "mfa_enabled_at": 1615852800, "mfa_disabled_at": null, "password_last_updated_at": 387811, "external_accounts": [{"object": "google_account", "id": "ext_account_id_123", "provider": "Facebook", "identification_id": "", "provider_user_id": "", "approved_scopes": "", "email_address": "Sherman_Stanton@yahoo.com", "first_name": "Kristian", "last_name": "Bartell", "image_url": "https://ecstatic-juggernaut.org", "username": "Alayna_McLaughlin", "phone_number": "1-281-985-7838 x38866", "public_metadata": {"key": ""}, "label": "", "created_at": 24797, "updated_at": 885925, "verification": {"object": "verification_google_one_tap", "status": "verified", "strategy": "google_one_tap", "expire_at": 1615462399, "attempts": 1, "verified_at_client": "", "error": null}, "user_id": "user_id_at_provider"}], "saml_accounts": [{"id": "saml_account_id_123", "object": "saml_account", "provider": "SAML Provider", "active": true, "email_address": "user@example.com", "first_name": "John", "last_name": "Doe", "provider_user_id": "prov_user_id_123", "last_authenticated_at": 849797, "public_metadata": {"department": "IT"}, "verification": {"object": "verification_saml", "status": "verified", "strategy": "saml", "external_verification_redirect_url": null, "error": {"message": "Error message", "long_message": "Longer error message with more details", "code": "error_code", "meta": {}}, "expire_at": 613304, "attempts": null, "verified_at_client": ""}, "saml_connection": {"id": "sc_1234567890", "name": "My Company SAML Config", "domain": "mycompany.com", "domains": [""], "active": true, "provider": "saml_custom", "sync_user_attributes": true, "allow_subdomains": false, "allow_idp_initiated": true, "disable_additional_identifications": false, "created_at": 1614768000, "updated_at": 1622540800}}], "enterprise_accounts": [], "organization_memberships": [{"id": "org_mem_123", "object": "organization_membership", "role": "member", "role_name": "", "permissions": ["read", "write"], "public_metadata": {}, "private_metadata": {}, "organization": {"object": "organization", "id": "org_123", "name": "Acme Corp", "slug": "acme-corp", "image_url": "https://harmful-thorn.com", "has_image": false, "members_count": 150, "missing_member_with_elevated_permissions": true, "pending_invitations_count": 898302, "max_allowed_memberships": 300, "admin_delete_enabled": true, "public_metadata": {"public_info": "Info visible to everyone"}, "private_metadata": {"internal_use_only": "Sensitive data"}, "created_by": "user_123456", "created_at": 1625078400, "updated_at": 1625164800}, "public_user_data": {"user_id": "", "first_name": "Julie", "last_name": "Howell", "profile_image_url": "https://thin-skyscraper.name/", "image_url": "https://other-curl.com", "has_image": false, "identifier": "", "username": "Jeffrey.Hodkiewicz-Bahringer"}, "created_at": 1625078400, "updated_at": 1625164800}], "last_sign_in_at": 1622852400, "banned": false, "locked": false, "lockout_expires_in_seconds": null, "verification_attempts_remaining": 5, "updated_at": 1622852400, "created_at": 1609459200, "delete_self_enabled": true, "create_organization_enabled": true, "create_organizations_limit": 466423, "last_active_at": 1700690400000, "legal_accepted_at": 1700690400000} "400": application/json: {"errors": [{"message": "Invalid input", "long_message": "The input provided does not meet the requirements.", "code": "400_bad_request", "meta": {}}], "meta": {}} GetOAuthAccessToken: @@ -1713,7 +1737,7 @@ examples: application/json: {"email_address": "user@example.com", "inviter_user_id": "user_67890", "role": "admin", "public_metadata": {"key": "value"}, "private_metadata": {"private_key": "secret_value"}, "redirect_url": "https://example.com/welcome", "expires_in_days": 785754} responses: "200": - application/json: {"object": "organization_invitation", "id": "inv_12345", "email_address": "user@example.com", "role": "admin", "role_name": "", "organization_id": "org_12345", "status": "pending", "public_metadata": {"key": "value"}, "private_metadata": {"private_key": "secret_value"}, "url": "https://watery-knitting.name", "expires_at": 56370, "created_at": 1622547600, "updated_at": 1622551200} + application/json: {"object": "organization_invitation", "id": "inv_12345", "email_address": "user@example.com", "role": "admin", "role_name": "", "organization_id": "org_12345", "inviter_id": "", "status": "pending", "public_metadata": {"key": "value"}, "private_metadata": {"private_key": "secret_value"}, "url": "https://watery-knitting.name", "expires_at": 56370, "created_at": 1622547600, "updated_at": 1622551200} "400": application/json: {"errors": [{"message": "Invalid input", "long_message": "The input provided does not meet the requirements.", "code": "400_bad_request", "meta": {}}], "meta": {}} ListOrganizationInvitations: @@ -1729,7 +1753,7 @@ examples: order_by: "pending" responses: "200": - application/json: {"data": [{"object": "organization_invitation", "id": "inv_12345", "email_address": "user@example.com", "role": "member", "role_name": "", "organization_id": "org_12345", "status": "pending", "public_metadata": {"key": "value"}, "private_metadata": {"private_key": "secret_value"}, "url": "https://heavenly-scenario.com/", "expires_at": 515101, "created_at": 1617981379, "updated_at": 1625581379}], "total_count": 10} + application/json: {"data": [{"object": "organization_invitation", "id": "inv_12345", "email_address": "user@example.com", "role": "member", "role_name": "", "organization_id": "org_12345", "inviter_id": "", "status": "pending", "public_metadata": {"key": "value"}, "private_metadata": {"private_key": "secret_value"}, "url": "https://heavenly-scenario.com/", "expires_at": 515101, "created_at": 1617981379, "updated_at": 1625581379}], "total_count": 10} "400": application/json: {"errors": [{"message": "Invalid input", "long_message": "The input provided does not meet the requirements.", "code": "400_bad_request", "meta": {}}], "meta": {}} CreateOrganizationInvitationBulk: @@ -1741,7 +1765,7 @@ examples: application/json: [{"email_address": "newmember@example.com", "inviter_user_id": "user_67890", "role": "admin", "public_metadata": {}, "private_metadata": {}, "redirect_url": "https://example.com/welcome", "expires_in_days": 488764}, {"email_address": "newmember@example.com", "inviter_user_id": "user_67890", "role": "admin", "public_metadata": {}, "private_metadata": {}, "redirect_url": "https://example.com/welcome", "expires_in_days": 488764}] responses: "200": - application/json: {"data": [{"object": "organization_invitation", "id": "inv_12345", "email_address": "user@example.com", "role": "member", "role_name": "", "organization_id": "org_12345", "status": "pending", "public_metadata": {"key": "value"}, "private_metadata": {"private_key": "secret_value"}, "url": "https://cooperative-dress.biz", "expires_at": 715454, "created_at": 1617981379, "updated_at": 1625581379}], "total_count": 10} + application/json: {"data": [{"object": "organization_invitation", "id": "inv_12345", "email_address": "user@example.com", "role": "member", "role_name": "", "organization_id": "org_12345", "inviter_id": "", "status": "pending", "public_metadata": {"key": "value"}, "private_metadata": {"private_key": "secret_value"}, "url": "https://cooperative-dress.biz", "expires_at": 715454, "created_at": 1617981379, "updated_at": 1625581379}], "total_count": 10} "400": application/json: {"errors": [{"message": "Invalid input", "long_message": "The input provided does not meet the requirements.", "code": "400_bad_request", "meta": {}}], "meta": {}} ListPendingOrganizationInvitations: @@ -1766,7 +1790,7 @@ examples: offset: 10 responses: "200": - application/json: {"data": [{"object": "organization_invitation", "id": "inv_12345", "email_address": "user@example.com", "role": "member", "role_name": "", "organization_id": "org_12345", "status": "pending", "public_metadata": {"key": "value"}, "private_metadata": {"private_key": "secret_value"}, "url": "https://junior-tribe.com", "expires_at": 713465, "created_at": 1617981379, "updated_at": 1625581379}], "total_count": 10} + application/json: {"data": [{"object": "organization_invitation", "id": "inv_12345", "email_address": "user@example.com", "role": "member", "role_name": "", "organization_id": "org_12345", "inviter_id": "", "status": "pending", "public_metadata": {"key": "value"}, "private_metadata": {"private_key": "secret_value"}, "url": "https://junior-tribe.com", "expires_at": 713465, "created_at": 1617981379, "updated_at": 1625581379}], "total_count": 10} "400": application/json: {"errors": [{"message": "Invalid input", "long_message": "The input provided does not meet the requirements.", "code": "400_bad_request", "meta": {}}], "meta": {}} GetOrganizationInvitation: @@ -1777,7 +1801,7 @@ examples: invitation_id: "inv_987654321" responses: "200": - application/json: {"object": "organization_invitation", "id": "inv_12345", "email_address": "user@example.com", "role": "admin", "role_name": "", "organization_id": "org_12345", "status": "pending", "public_metadata": {"key": "value"}, "private_metadata": {"private_key": "secret_value"}, "url": "https://weekly-humor.net/", "expires_at": 585405, "created_at": 1622547600, "updated_at": 1622551200} + application/json: {"object": "organization_invitation", "id": "inv_12345", "email_address": "user@example.com", "role": "admin", "role_name": "", "organization_id": "org_12345", "inviter_id": "", "status": "pending", "public_metadata": {"key": "value"}, "private_metadata": {"private_key": "secret_value"}, "url": "https://weekly-humor.net/", "expires_at": 585405, "created_at": 1622547600, "updated_at": 1622551200} "400": application/json: {"errors": [{"message": "Invalid input", "long_message": "The input provided does not meet the requirements.", "code": "400_bad_request", "meta": {}}], "meta": {}} RevokeOrganizationInvitation: @@ -1790,7 +1814,7 @@ examples: application/json: {"requesting_user_id": "usr_12345"} responses: "200": - application/json: {"object": "organization_invitation", "id": "inv_12345", "email_address": "user@example.com", "role": "admin", "role_name": "", "organization_id": "org_12345", "status": "pending", "public_metadata": {"key": "value"}, "private_metadata": {"private_key": "secret_value"}, "url": null, "expires_at": 45978, "created_at": 1622547600, "updated_at": 1622551200} + application/json: {"object": "organization_invitation", "id": "inv_12345", "email_address": "user@example.com", "role": "admin", "role_name": "", "organization_id": "org_12345", "inviter_id": null, "status": "pending", "public_metadata": {"key": "value"}, "private_metadata": {"private_key": "secret_value"}, "url": null, "expires_at": 45978, "created_at": 1622547600, "updated_at": 1622551200} "400": application/json: {"errors": [{"message": "Invalid input", "long_message": "The input provided does not meet the requirements.", "code": "400_bad_request", "meta": {}}], "meta": {}} ListAllowlistIdentifiers: @@ -1853,7 +1877,7 @@ examples: UpdateInstanceAuthConfig: speakeasy-default-update-instance-auth-config: requestBody: - application/json: {"restricted_to_allowlist": false, "from_email_address": "noreply", "progressive_sign_up": true, "enhanced_email_deliverability": true, "test_mode": true} + application/json: {"restricted_to_allowlist": false, "from_email_address": "noreply", "progressive_sign_up": true, "test_mode": true} responses: "200": application/json: {"object": "instance_settings", "id": "inst_123456789", "restricted_to_allowlist": false, "from_email_address": "noreply@clerk.dev", "progressive_sign_up": true, "enhanced_email_deliverability": true} @@ -1929,7 +1953,7 @@ examples: UpdateInstance: speakeasy-default-update-instance: requestBody: - application/json: {"test_mode": true, "hibp": false, "enhanced_email_deliverability": true, "support_email": "support@example.com", "clerk_js_version": "2.3.1", "development_origin": "http://localhost:3000", "allowed_origins": ["http://localhost:3000", "chrome-extension://extension_uiid", "capacitor://localhost"], "url_based_session_syncing": true} + application/json: {"test_mode": true, "hibp": false, "support_email": "support@example.com", "clerk_js_version": "2.3.1", "development_origin": "http://localhost:3000", "allowed_origins": ["http://localhost:3000", "chrome-extension://extension_uiid", "capacitor://localhost"], "url_based_session_syncing": true} responses: "422": application/json: {"errors": [{"message": "Invalid input", "long_message": "The input provided does not meet the requirements.", "code": "400_bad_request", "meta": {}}], "meta": {}} @@ -2580,7 +2604,7 @@ examples: application/json: {"user_ids": ["", "", ""]} responses: "200": - application/json: [{"id": "user_id_123", "object": "user", "external_id": "external_user_id_123", "primary_email_address_id": "email_id_123", "primary_phone_number_id": "phone_id_123", "primary_web3_wallet_id": "wallet_id_123", "username": "john_doe", "first_name": "John", "last_name": "Doe", "locale": "fi", "image_url": "https://example.com/new-profile.jpg", "has_image": true, "public_metadata": {"role": "admin"}, "private_metadata": {"ssn": "123-45-6789"}, "unsafe_metadata": {"theme": "dark"}, "email_addresses": [{"id": "email_id_123", "object": "email_address", "email_address": "john.doe@example.com", "reserved": false, "verification": {"object": "verification_ticket", "status": "verified", "strategy": "ticket", "attempts": 91086, "expire_at": 708739, "verified_at_client": null}, "linked_to": [{"type": "oauth_google", "id": "link_12345"}], "matches_sso_connection": true, "created_at": 1609459200, "updated_at": 1609459200}], "phone_numbers": [{"id": "phone_id_123", "object": "phone_number", "phone_number": "+12345678901", "reserved_for_second_factor": false, "default_second_factor": true, "reserved": false, "verification": {"object": "verification_otp", "status": "verified", "strategy": "reset_password_email_code", "attempts": 350529, "expire_at": 403378, "verified_at_client": ""}, "linked_to": [{"type": "oauth_google", "id": "link_id_123"}], "backup_codes": ["code1", "code2", "code3"], "created_at": 1609459200, "updated_at": 1609459200}], "web3_wallets": [{"id": "wallet_id_123", "object": "web3_wallet", "web3_wallet": "0x123456789abcdef", "verification": {"object": "verification_web3", "status": "expired", "strategy": "web3_metamask_signature", "nonce": "", "message": "", "attempts": 38170, "expire_at": 791456, "verified_at_client": ""}, "created_at": 1609459200, "updated_at": 1609459200}], "passkeys": [{"id": "passkey_id_123", "object": "passkey", "name": "My Passkey", "last_used_at": 1615852800, "verification": {"object": "verification_passkey", "status": "verified", "strategy": "passkey", "nonce": "nonce", "message": "", "attempts": 959813, "expire_at": 33571, "verified_at_client": ""}}], "password_enabled": true, "two_factor_enabled": true, "totp_enabled": true, "backup_code_enabled": true, "mfa_enabled_at": 1615852800, "mfa_disabled_at": null, "external_accounts": [{"object": "google_account", "id": "ext_account_id_123", "provider": "Facebook", "identification_id": "", "provider_user_id": "", "approved_scopes": "", "email_address": "Kelly90@yahoo.com", "first_name": "Eleazar", "last_name": "Labadie", "image_url": null, "username": null, "phone_number": "829.350.0802 x78343", "public_metadata": {"key": "", "key1": ""}, "label": "", "created_at": 15742, "updated_at": 356726, "verification": {"object": "verification_oauth", "status": "transferable", "strategy": "", "external_verification_redirect_url": "https://corny-elver.org", "error": {"message": "Error message", "long_message": "Longer error message with more details", "code": "error_code", "meta": {}}, "expire_at": 400231, "attempts": 698888, "verified_at_client": ""}, "user_id": "user_id_at_provider"}], "saml_accounts": [{"id": "saml_account_id_123", "object": "saml_account", "provider": "SAML Provider", "active": true, "email_address": "user@example.com", "first_name": "John", "last_name": "Doe", "provider_user_id": "prov_user_id_123", "last_authenticated_at": 433371, "public_metadata": {"department": "IT"}, "verification": {"object": "verification_ticket", "status": "verified", "strategy": "ticket", "attempts": 236111, "expire_at": null, "verified_at_client": null}, "saml_connection": {"id": "sc_1234567890", "name": "My Company SAML Config", "domains": ["", "", ""], "active": true, "provider": "saml_custom", "sync_user_attributes": true, "allow_subdomains": false, "allow_idp_initiated": true, "disable_additional_identifications": false, "created_at": 1614768000, "updated_at": 1622540800}}], "last_sign_in_at": 1622852400, "banned": false, "locked": false, "lockout_expires_in_seconds": null, "verification_attempts_remaining": 5, "updated_at": 1622852400, "created_at": 1609459200, "delete_self_enabled": true, "create_organization_enabled": true, "create_organizations_limit": 378428, "last_active_at": 1700690400000, "legal_accepted_at": 1700690400000}] + application/json: [{"id": "user_id_123", "object": "user", "external_id": "external_user_id_123", "primary_email_address_id": "email_id_123", "primary_phone_number_id": "phone_id_123", "primary_web3_wallet_id": "wallet_id_123", "username": "john_doe", "first_name": "John", "last_name": "Doe", "locale": "fi", "image_url": "https://example.com/new-profile.jpg", "has_image": true, "public_metadata": {"role": "admin"}, "private_metadata": {"ssn": "123-45-6789"}, "unsafe_metadata": {"theme": "dark"}, "email_addresses": [{"id": "email_id_123", "object": "email_address", "email_address": "john.doe@example.com", "reserved": false, "verification": {"object": "verification_ticket", "status": "verified", "strategy": "ticket", "attempts": 91086, "expire_at": 708739, "verified_at_client": null}, "linked_to": [{"type": "oauth_google", "id": "link_12345"}], "matches_sso_connection": true, "created_at": 1609459200, "updated_at": 1609459200}], "phone_numbers": [{"id": "phone_id_123", "object": "phone_number", "phone_number": "+12345678901", "reserved_for_second_factor": false, "default_second_factor": true, "reserved": false, "verification": {"object": "verification_otp", "status": "verified", "strategy": "reset_password_email_code", "attempts": 350529, "expire_at": 403378, "verified_at_client": ""}, "linked_to": [{"type": "oauth_google", "id": "link_id_123"}], "backup_codes": ["code1", "code2", "code3"], "created_at": 1609459200, "updated_at": 1609459200}], "web3_wallets": [{"id": "wallet_id_123", "object": "web3_wallet", "web3_wallet": "0x123456789abcdef", "verification": {"object": "verification_web3", "status": "expired", "strategy": "web3_metamask_signature", "nonce": "", "message": "", "attempts": 38170, "expire_at": 791456, "verified_at_client": ""}, "created_at": 1609459200, "updated_at": 1609459200}], "passkeys": [{"id": "passkey_id_123", "object": "passkey", "name": "My Passkey", "last_used_at": 1615852800, "verification": {"object": "verification_passkey", "status": "verified", "strategy": "passkey", "nonce": "nonce", "message": "", "attempts": 959813, "expire_at": 33571, "verified_at_client": ""}}], "password_enabled": true, "two_factor_enabled": true, "totp_enabled": true, "backup_code_enabled": true, "mfa_enabled_at": 1615852800, "mfa_disabled_at": null, "password_last_updated_at": 889326, "external_accounts": [{"object": "google_account", "id": "ext_account_id_123", "provider": "Facebook", "identification_id": "", "provider_user_id": "", "approved_scopes": "", "email_address": "Kelly90@yahoo.com", "first_name": "Eleazar", "last_name": "Labadie", "image_url": null, "username": null, "phone_number": "829.350.0802 x78343", "public_metadata": {"key": "", "key1": ""}, "label": "", "created_at": 15742, "updated_at": 356726, "verification": {"object": "verification_oauth", "status": "transferable", "strategy": "", "external_verification_redirect_url": "https://corny-elver.org", "error": {"message": "Error message", "long_message": "Longer error message with more details", "code": "error_code", "meta": {}}, "expire_at": 400231, "attempts": 698888, "verified_at_client": ""}, "user_id": "user_id_at_provider"}], "saml_accounts": [{"id": "saml_account_id_123", "object": "saml_account", "provider": "SAML Provider", "active": true, "email_address": "user@example.com", "first_name": "John", "last_name": "Doe", "provider_user_id": "prov_user_id_123", "last_authenticated_at": 433371, "public_metadata": {"department": "IT"}, "verification": {"object": "verification_ticket", "status": "verified", "strategy": "ticket", "attempts": 236111, "expire_at": null, "verified_at_client": null}, "saml_connection": {"id": "sc_1234567890", "name": "My Company SAML Config", "domains": ["", "", ""], "active": true, "provider": "saml_custom", "sync_user_attributes": true, "allow_subdomains": false, "allow_idp_initiated": true, "disable_additional_identifications": false, "created_at": 1614768000, "updated_at": 1622540800}}], "enterprise_accounts": [{"id": "", "object": "enterprise_account", "protocol": "oauth", "provider": "", "active": true, "email_address": "Melody48@gmail.com", "first_name": "Felicia", "last_name": "Jakubowski", "provider_user_id": "", "enterprise_connection_id": "", "public_metadata": {"key": ""}, "verification": {"object": "verification_oauth", "status": "unverified", "strategy": "", "external_verification_redirect_url": "https://measly-scratch.name/", "error": {"message": "Error message", "long_message": "Longer error message with more details", "code": "error_code", "meta": {}}, "expire_at": 878936, "attempts": 243637, "verified_at_client": null}, "enterprise_connection": {"id": "", "protocol": "", "provider": "", "name": "", "logo_public_url": "https://dutiful-exasperation.name", "domains": ["", "", ""], "active": false, "sync_user_attributes": true, "allow_subdomains": false, "allow_idp_initiated": false, "disable_additional_identifications": true, "created_at": 3029, "updated_at": 993605}, "last_authenticated_at": 803167}], "organization_memberships": [{"id": "org_mem_123", "object": "organization_membership", "role": "member", "role_name": "", "permissions": ["read", "write"], "public_metadata": {}, "private_metadata": {}, "organization": {"object": "organization", "id": "org_123", "name": "Acme Corp", "slug": "acme-corp", "image_url": "https://victorious-chow.name/", "has_image": true, "members_count": 150, "missing_member_with_elevated_permissions": true, "pending_invitations_count": 837086, "max_allowed_memberships": 300, "admin_delete_enabled": true, "public_metadata": {"public_info": "Info visible to everyone"}, "private_metadata": {"internal_use_only": "Sensitive data"}, "created_by": "user_123456", "created_at": 1625078400, "updated_at": 1625164800}, "public_user_data": {"user_id": "", "first_name": null, "last_name": "Senger", "profile_image_url": "https://fruitful-popularity.biz/", "image_url": "https://hard-to-find-gloom.com/", "has_image": false, "identifier": "", "username": "Eladio31"}, "created_at": 1625078400, "updated_at": 1625164800}], "last_sign_in_at": 1622852400, "banned": false, "locked": false, "lockout_expires_in_seconds": null, "verification_attempts_remaining": 5, "updated_at": 1622852400, "created_at": 1609459200, "delete_self_enabled": true, "create_organization_enabled": true, "create_organizations_limit": 378428, "last_active_at": 1700690400000, "legal_accepted_at": 1700690400000}] "400": application/json: {"errors": [{"message": "Invalid input", "long_message": "The input provided does not meet the requirements.", "code": "400_bad_request", "meta": {}}], "meta": {}} UsersUnban: @@ -2589,7 +2613,7 @@ examples: application/json: {"user_ids": ["", "", ""]} responses: "200": - application/json: [{"id": "user_id_123", "object": "user", "external_id": "external_user_id_123", "primary_email_address_id": "email_id_123", "primary_phone_number_id": "phone_id_123", "primary_web3_wallet_id": "wallet_id_123", "username": "john_doe", "first_name": "John", "last_name": "Doe", "locale": "pt", "image_url": "https://example.com/new-profile.jpg", "has_image": true, "public_metadata": {"role": "admin"}, "private_metadata": {"ssn": "123-45-6789"}, "unsafe_metadata": {"theme": "dark"}, "email_addresses": [{"id": "email_id_123", "object": "email_address", "email_address": "john.doe@example.com", "reserved": false, "verification": {"object": "verification_admin", "status": "verified", "strategy": "admin", "attempts": 932013, "expire_at": 43591, "verified_at_client": ""}, "linked_to": [{"type": "oauth_google", "id": "link_12345"}], "matches_sso_connection": true, "created_at": 1609459200, "updated_at": 1609459200}], "phone_numbers": [{"id": "phone_id_123", "object": "phone_number", "phone_number": "+12345678901", "reserved_for_second_factor": false, "default_second_factor": true, "reserved": false, "verification": {"object": "verification_otp", "status": "verified", "strategy": "phone_code", "attempts": null, "expire_at": 332407, "verified_at_client": ""}, "linked_to": [{"type": "oauth_google", "id": "link_id_123"}], "backup_codes": ["code1", "code2", "code3"], "created_at": 1609459200, "updated_at": 1609459200}], "web3_wallets": [{"id": "wallet_id_123", "object": "web3_wallet", "web3_wallet": "0x123456789abcdef", "verification": {"object": "verification_admin", "status": "verified", "strategy": "admin", "attempts": 794368, "expire_at": 602166, "verified_at_client": ""}, "created_at": 1609459200, "updated_at": 1609459200}], "passkeys": [{"id": "passkey_id_123", "object": "passkey", "name": "My Passkey", "last_used_at": 1615852800, "verification": {"object": "verification_passkey", "status": "verified", "strategy": "passkey", "nonce": "nonce", "message": "", "attempts": 872873, "expire_at": 160820, "verified_at_client": ""}}], "password_enabled": true, "two_factor_enabled": true, "totp_enabled": true, "backup_code_enabled": true, "mfa_enabled_at": 1615852800, "mfa_disabled_at": null, "external_accounts": [{"object": "facebook_account", "id": "ext_account_id_123", "provider": "Facebook", "identification_id": "", "provider_user_id": "", "approved_scopes": "", "email_address": "Jermain_Kemmer64@yahoo.com", "first_name": "Loraine", "last_name": "Murray", "image_url": "https://good-natured-finding.name/", "username": "Alaina.Green64", "phone_number": "1-275-973-4414", "public_metadata": {}, "label": null, "created_at": 768653, "updated_at": 470874, "verification": {"object": "verification_google_one_tap", "status": "unverified", "strategy": "google_one_tap", "expire_at": 176015, "attempts": 486916, "verified_at_client": "", "error": {"message": "Error message", "long_message": "Longer error message with more details", "code": "error_code", "meta": {}}}, "user_id": "user_id_at_provider"}], "saml_accounts": [{"id": "saml_account_id_123", "object": "saml_account", "provider": "SAML Provider", "active": true, "email_address": "user@example.com", "first_name": "John", "last_name": "Doe", "provider_user_id": "prov_user_id_123", "last_authenticated_at": 932013, "public_metadata": {"department": "IT"}, "verification": {"object": "verification_ticket", "status": "verified", "strategy": "ticket", "attempts": 664797, "expire_at": 820435, "verified_at_client": ""}, "saml_connection": {"id": "sc_1234567890", "name": "My Company SAML Config", "domains": [""], "active": true, "provider": "saml_custom", "sync_user_attributes": true, "allow_subdomains": false, "allow_idp_initiated": true, "disable_additional_identifications": false, "created_at": 1614768000, "updated_at": 1622540800}}], "last_sign_in_at": 1622852400, "banned": false, "locked": false, "lockout_expires_in_seconds": null, "verification_attempts_remaining": 5, "updated_at": 1622852400, "created_at": 1609459200, "delete_self_enabled": true, "create_organization_enabled": true, "create_organizations_limit": 294300, "last_active_at": 1700690400000, "legal_accepted_at": 1700690400000}] + application/json: [{"id": "user_id_123", "object": "user", "external_id": "external_user_id_123", "primary_email_address_id": "email_id_123", "primary_phone_number_id": "phone_id_123", "primary_web3_wallet_id": "wallet_id_123", "username": "john_doe", "first_name": "John", "last_name": "Doe", "locale": "pt", "image_url": "https://example.com/new-profile.jpg", "has_image": true, "public_metadata": {"role": "admin"}, "private_metadata": {"ssn": "123-45-6789"}, "unsafe_metadata": {"theme": "dark"}, "email_addresses": [{"id": "email_id_123", "object": "email_address", "email_address": "john.doe@example.com", "reserved": false, "verification": {"object": "verification_admin", "status": "verified", "strategy": "admin", "attempts": 932013, "expire_at": 43591, "verified_at_client": ""}, "linked_to": [{"type": "oauth_google", "id": "link_12345"}], "matches_sso_connection": true, "created_at": 1609459200, "updated_at": 1609459200}], "phone_numbers": [{"id": "phone_id_123", "object": "phone_number", "phone_number": "+12345678901", "reserved_for_second_factor": false, "default_second_factor": true, "reserved": false, "verification": {"object": "verification_otp", "status": "verified", "strategy": "phone_code", "attempts": null, "expire_at": 332407, "verified_at_client": ""}, "linked_to": [{"type": "oauth_google", "id": "link_id_123"}], "backup_codes": ["code1", "code2", "code3"], "created_at": 1609459200, "updated_at": 1609459200}], "web3_wallets": [{"id": "wallet_id_123", "object": "web3_wallet", "web3_wallet": "0x123456789abcdef", "verification": {"object": "verification_admin", "status": "verified", "strategy": "admin", "attempts": 794368, "expire_at": 602166, "verified_at_client": ""}, "created_at": 1609459200, "updated_at": 1609459200}], "passkeys": [{"id": "passkey_id_123", "object": "passkey", "name": "My Passkey", "last_used_at": 1615852800, "verification": {"object": "verification_passkey", "status": "verified", "strategy": "passkey", "nonce": "nonce", "message": "", "attempts": 872873, "expire_at": 160820, "verified_at_client": ""}}], "password_enabled": true, "two_factor_enabled": true, "totp_enabled": true, "backup_code_enabled": true, "mfa_enabled_at": 1615852800, "mfa_disabled_at": null, "password_last_updated_at": 286479, "external_accounts": [{"object": "facebook_account", "id": "ext_account_id_123", "provider": "Facebook", "identification_id": "", "provider_user_id": "", "approved_scopes": "", "email_address": "Jermain_Kemmer64@yahoo.com", "first_name": "Loraine", "last_name": "Murray", "image_url": "https://good-natured-finding.name/", "username": "Alaina.Green64", "phone_number": "1-275-973-4414", "public_metadata": {}, "label": null, "created_at": 768653, "updated_at": 470874, "verification": {"object": "verification_google_one_tap", "status": "unverified", "strategy": "google_one_tap", "expire_at": 176015, "attempts": 486916, "verified_at_client": "", "error": {"message": "Error message", "long_message": "Longer error message with more details", "code": "error_code", "meta": {}}}, "user_id": "user_id_at_provider"}], "saml_accounts": [{"id": "saml_account_id_123", "object": "saml_account", "provider": "SAML Provider", "active": true, "email_address": "user@example.com", "first_name": "John", "last_name": "Doe", "provider_user_id": "prov_user_id_123", "last_authenticated_at": 932013, "public_metadata": {"department": "IT"}, "verification": {"object": "verification_ticket", "status": "verified", "strategy": "ticket", "attempts": 664797, "expire_at": 820435, "verified_at_client": ""}, "saml_connection": {"id": "sc_1234567890", "name": "My Company SAML Config", "domains": [""], "active": true, "provider": "saml_custom", "sync_user_attributes": true, "allow_subdomains": false, "allow_idp_initiated": true, "disable_additional_identifications": false, "created_at": 1614768000, "updated_at": 1622540800}}], "enterprise_accounts": [{"id": "", "object": "enterprise_account", "protocol": "saml", "provider": "", "active": true, "email_address": "Kristopher.Cummerata0@gmail.com", "first_name": "Esta", "last_name": "Ryan", "provider_user_id": "", "enterprise_connection_id": "", "public_metadata": {"key": "", "key1": ""}, "verification": {"object": "verification_oauth", "status": "unverified", "strategy": "", "external_verification_redirect_url": "https://free-coast.net", "error": {"message": "Error message", "long_message": "Longer error message with more details", "code": "error_code", "meta": {}}, "expire_at": 424998, "attempts": 787261, "verified_at_client": ""}, "enterprise_connection": {"id": "", "protocol": "", "provider": "", "name": "", "logo_public_url": "https://corrupt-outlaw.biz", "domains": [], "active": true, "sync_user_attributes": true, "allow_subdomains": false, "allow_idp_initiated": false, "disable_additional_identifications": true, "created_at": 513160, "updated_at": 288253}, "last_authenticated_at": 640467}], "organization_memberships": [{"id": "org_mem_123", "object": "organization_membership", "role": "member", "role_name": "", "permissions": ["read", "write"], "public_metadata": {}, "private_metadata": {}, "organization": {"object": "organization", "id": "org_123", "name": "Acme Corp", "slug": "acme-corp", "image_url": "https://pushy-celsius.com/", "has_image": false, "members_count": 150, "missing_member_with_elevated_permissions": false, "pending_invitations_count": 956546, "max_allowed_memberships": 300, "admin_delete_enabled": true, "public_metadata": {"public_info": "Info visible to everyone"}, "private_metadata": {"internal_use_only": "Sensitive data"}, "created_by": "user_123456", "created_at": 1625078400, "updated_at": 1625164800}, "public_user_data": {"user_id": "", "first_name": "Garrett", "last_name": "Deckow", "profile_image_url": "https://apt-rule.info/", "image_url": "https://sociable-depot.info/", "has_image": true, "identifier": "", "username": "Rocio.Mitchell"}, "created_at": 1625078400, "updated_at": 1625164800}], "last_sign_in_at": 1622852400, "banned": false, "locked": false, "lockout_expires_in_seconds": null, "verification_attempts_remaining": 5, "updated_at": 1622852400, "created_at": 1609459200, "delete_self_enabled": true, "create_organization_enabled": true, "create_organizations_limit": 294300, "last_active_at": 1700690400000, "legal_accepted_at": 1700690400000}] "400": application/json: {"errors": [{"message": "Invalid input", "long_message": "The input provided does not meet the requirements.", "code": "400_bad_request", "meta": {}}], "meta": {}} CreateMachineToken: @@ -2986,4 +3010,4 @@ examples: application/json: {"errors": [{"message": "Invalid input", "long_message": "The input provided does not meet the requirements.", "code": "400_bad_request", "meta": {}}], "meta": {}} examplesVersion: 1.0.2 generatedTests: {} -releaseNotes: "## Python SDK Changes Detected:\n* `clerk.actor_tokens.create()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.phone_numbers.create()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.clients.list()`: \n * `response.[].last_authentication_strategy` **Added**\n * `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.email_addresses.create()`: \n * `response.verification` **Changed** **Breaking** :warning:\n * `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.email_addresses.get()`: \n * `response.verification` **Changed** **Breaking** :warning:\n * `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.commerce.cancel_subscription_item()`: \n * `response` **Changed** **Breaking** :warning:\n * `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.commerce.list_subscription_items()`: \n * `request` **Changed** **Breaking** :warning:\n * `response.data.[]` **Changed** **Breaking** :warning:\n * `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.commerce.list_plans()`: \n * `response.data.[]` **Changed** **Breaking** :warning:\n * `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.waitlist_entries.reject()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.email_addresses.delete()`: \n * `response.external_id` **Added**\n * `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.email_addresses.update()`: \n * `response.verification` **Changed** **Breaking** :warning:\n * `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.actor_tokens.revoke()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.phone_numbers.get()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.phone_numbers.delete()`: \n * `response.external_id` **Added**\n * `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.phone_numbers.update()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.sessions.list()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.sessions.create()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.sessions.get()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.sessions.refresh()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.sessions.revoke()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.sessions.create_token()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.sessions.create_token_from_template()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.email_sms_templates.list()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.email_sms_templates.get()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.email_sms_templates.revert()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.email_sms_templates.toggle_template_delivery()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.email_and_sms_templates.upsert()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.templates.preview()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.users.list()`: \n * `response.[]` **Changed** **Breaking** :warning:\n * `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.users.create()`: \n * `request.locale` **Added**\n * `response` **Changed** **Breaking** :warning:\n * `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.users.count()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.users.get()`: \n * `response` **Changed** **Breaking** :warning:\n * `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.users.update()`: \n * `request.locale` **Added**\n * `response` **Changed** **Breaking** :warning:\n * `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.users.delete()`: \n * `response.external_id` **Added**\n * `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.users.ban()`: \n * `response` **Changed** **Breaking** :warning:\n * `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.users.unban()`: \n * `response` **Changed** **Breaking** :warning:\n * `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.users.bulk_ban()`: \n * `response.[]` **Changed** **Breaking** :warning:\n * `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.users.bulk_unban()`: \n * `response.[]` **Changed** **Breaking** :warning:\n * `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.users.lock()`: \n * `response` **Changed** **Breaking** :warning:\n * `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.users.unlock()`: \n * `response` **Changed** **Breaking** :warning:\n * `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.users.set_profile_image()`: \n * `response` **Changed** **Breaking** :warning:\n * `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.users.delete_profile_image()`: \n * `response` **Changed** **Breaking** :warning:\n * `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.users.update_metadata()`: \n * `response` **Changed** **Breaking** :warning:\n * `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.users.get_billing_subscription()`: \n * `response` **Changed** **Breaking** :warning:\n * `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.users.get_o_auth_access_token()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.users.get_organization_memberships()`: \n * `response.data.[].public_user_data.username` **Added**\n * `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.users.get_organization_invitations()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.users.verify_password()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.users.verify_totp()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.users.disable_mfa()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.users.delete_backup_codes()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.users.delete_passkey()`: \n * `response.external_id` **Added**\n * `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.users.delete_web3wallet()`: \n * `response.external_id` **Added**\n * `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.users.delete_totp()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.users.delete_external_account()`: \n * `response.external_id` **Added**\n * `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.users.get_instance_organization_memberships()`: \n * `response.data.[].public_user_data.username` **Added**\n * `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.invitations.create()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.invitations.bulk_create()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.invitations.revoke()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.organization_invitations.get_all()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.organization_invitations.create()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.organization_invitations.list()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.domains.add()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.organization_invitations.list_pending()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.organization_invitations.get()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.organization_invitations.revoke()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.allowlist_identifiers.list()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.allowlist_identifiers.create()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.allowlist_identifiers.delete()`: \n * `response.external_id` **Added**\n * `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.blocklist_identifiers.list()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.blocklist_identifiers.create()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.blocklist_identifiers.delete()`: \n * `response.external_id` **Added**\n * `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.beta_features.update_instance_settings()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.beta_features.update_production_instance_domain()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.clients.get()`: \n * `response.last_authentication_strategy` **Added**\n * `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.clients.verify()`: \n * `response.last_authentication_strategy` **Added**\n * `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.organization_invitations.bulk_create()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.domains.delete()`: \n * `response.external_id` **Added**\n * `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.domains.update()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.instance_settings.update()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.instance_settings.update_restrictions()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.instance_settings.change_domain()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.instance_settings.update_organization_settings()`: \n * `request.slug_disabled` **Added**\n * `response` **Changed**\n * `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.webhooks.create_svix_app()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.webhooks.delete_svix_app()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.webhooks.generate_svix_auth_url()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.jwt_templates.create()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.jwt_templates.get()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.jwt_templates.update()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.jwt_templates.delete()`: \n * `response.external_id` **Added**\n * `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.machines.list()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.machines.create()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.machines.get()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.machines.update()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.machines.delete()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.machines.get_secret_key()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.machines.rotate_secret_key()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.machines.create_scope()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.machines.delete_scope()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.organizations.list()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.organizations.create()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.organizations.get()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.organizations.update()`: `error` **Changed** **Breaking** :warning:\n* `clerk.organizations.delete()`: \n * `response.external_id` **Added**\n * `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.organizations.merge_metadata()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.organizations.upload_logo()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.organizations.delete_logo()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.organizations.get_billing_subscription()`: \n * `response` **Changed** **Breaking** :warning:\n * `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.organization_memberships.create()`: \n * `response.public_user_data.username` **Added**\n * `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.organization_memberships.list()`: \n * `response.data.[].public_user_data.username` **Added**\n * `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.organization_memberships.update()`: \n * `response.public_user_data.username` **Added**\n * `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.organization_memberships.delete()`: \n * `response.public_user_data.username` **Added**\n * `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.organization_memberships.update_metadata()`: \n * `response.public_user_data.username` **Added**\n * `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.organization_domains.create()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.organization_domains.list()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.organization_domains.update()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.organization_domains.delete()`: \n * `response.external_id` **Added**\n * `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.organization_domains.list_all()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.proxy_checks.verify()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.redirect_urls.create()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.redirect_urls.get()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.redirect_urls.delete()`: \n * `response.external_id` **Added**\n * `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.sign_in_tokens.create()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.sign_in_tokens.revoke()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.sign_ups.get()`: \n * `response.locale` **Added**\n * `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.sign_ups.update()`: \n * `response.locale` **Added**\n * `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.oauth_applications.list()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.oauth_applications.create()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.oauth_applications.get()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.oauth_applications.update()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.oauth_applications.delete()`: \n * `response.external_id` **Added**\n * `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.oauth_applications.rotate_secret()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.saml_connections.list()`: \n * `response.data.[]` **Changed**\n * `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.saml_connections.create()`: \n * `request` **Changed**\n * `response` **Changed**\n * `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.saml_connections.get()`: \n * `response` **Changed**\n * `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.saml_connections.update()`: \n * `request.force_authn` **Added**\n * `response` **Changed**\n * `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.saml_connections.delete()`: \n * `response.external_id` **Added**\n * `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.waitlist_entries.create()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.waitlist_entries.delete()`: \n * `response.external_id` **Added**\n * `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.waitlist_entries.invite()`: `errors.[].clerk_trace_id` **Removed** **Breaking** :warning:\n* `clerk.billing.get_statement_payment_attempts()`: **Added**\n* `clerk.billing.get_statement()`: **Added**\n* `clerk.billing.list_statements()`: **Added**\n* `clerk.billing.extend_subscription_item_free_trial()`: **Added**\n* `clerk.aws_credentials.delete()`: **Deleted** **Breaking** :warning:\n* `clerk.aws_credentials.update()`: **Deleted** **Breaking** :warning:\n* `clerk.experimental_accountless_applications.create()`: **Deleted** **Breaking** :warning:\n* `clerk.experimental_accountless_applications.complete()`: **Deleted** **Breaking** :warning:\n* `clerk.commerce.extend_subscription_item_free_trial()`: **Deleted** **Breaking** :warning:\n" +releaseNotes: "## Python SDK Changes Detected:\n* `clerk.beta_features.update_instance_settings()`: \n * `request.enhanced_email_deliverability` **Removed** **Breaking** :warning:\n* `clerk.instance_settings.update()`: \n * `request.enhanced_email_deliverability` **Removed** **Breaking** :warning:\n* `clerk.users.bulk_unban()`: `response.[]` **Changed**\n* `clerk.organization_invitations.list_pending()`: `response.data.[].inviter_id` **Added**\n* `clerk.commerce.list_subscription_items()`: **Deleted** **Breaking** :warning:\n* `clerk.commerce.cancel_subscription_item()`: **Deleted** **Breaking** :warning:\n* `clerk.users.unlock()`: `response` **Changed**\n* `clerk.users.list()`: `response.[]` **Changed**\n* `clerk.users.create()`: `response` **Changed**\n* `clerk.users.get()`: `response` **Changed**\n* `clerk.users.update()`: `response` **Changed**\n* `clerk.users.ban()`: `response` **Changed**\n* `clerk.users.unban()`: `response` **Changed**\n* `clerk.users.bulk_ban()`: `response.[]` **Changed**\n* `clerk.commerce.list_plans()`: **Deleted** **Breaking** :warning:\n* `clerk.billing.list_plans()`: **Added**\n* `clerk.sessions.create()`: \n * `request.active_organization_id` **Added**\n* `clerk.users.set_profile_image()`: `response` **Changed**\n* `clerk.users.delete_profile_image()`: `response` **Changed**\n* `clerk.users.update_metadata()`: `response` **Changed**\n* `clerk.users.get_organization_invitations()`: `response.data.[].inviter_id` **Added**\n* `clerk.organization_invitations.get_all()`: `response.data.[].inviter_id` **Added**\n* `clerk.organization_invitations.create()`: `response.inviter_id` **Added**\n* `clerk.organization_invitations.list()`: `response.data.[].inviter_id` **Added**\n* `clerk.organization_invitations.bulk_create()`: `response.data.[].inviter_id` **Added**\n* `clerk.users.lock()`: `response` **Changed**\n* `clerk.organization_invitations.get()`: `response.inviter_id` **Added**\n* `clerk.organization_invitations.revoke()`: `response.inviter_id` **Added**\n* `clerk.billing.cancel_subscription_item()`: **Added**\n* `clerk.billing.list_subscription_items()`: **Added**\n" diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 636a3d00..02bf1bb1 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -25,7 +25,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false python: - version: 4.0.0 + version: 4.0.1 additionalDependencies: dev: pytest: ^8.3.3 @@ -60,6 +60,7 @@ python: webhooks: "" inputModelSuffix: input legacyPyright: true + license: "" maxMethodParams: 20 methodArguments: infer-optional-args moduleName: "" diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 6c959755..64f6c1b5 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,21 +1,21 @@ -speakeasyVersion: 1.653.0 +speakeasyVersion: 1.658.2 sources: clerk-openapi: sourceNamespace: clerk-openapi - sourceRevisionDigest: sha256:0ad1ab10e9dc7635ff065c7eea5cf70ed2049cc5eebca5e85278cd446d42606c - sourceBlobDigest: sha256:b3995c2bca4313402799b1179ab92208ee1e784309bec497e06110b42933f48c + sourceRevisionDigest: sha256:07e65c01a719ba72c42a868fd0c08267849c6b2bc52eb5f6c4ff226d829d59e6 + sourceBlobDigest: sha256:95031745ebff8f1aafd86d389e1524a449d53cf53203f4b2ba99db442dcbd8cb tags: - latest - - speakeasy-sdk-regen-lamone-update-sdk-version-1762792475 + - speakeasy-sdk-regen-dc-trusted-publishing-1763479403 - "2025-11-10" targets: clerk-sdk-python: source: clerk-openapi sourceNamespace: clerk-openapi - sourceRevisionDigest: sha256:0ad1ab10e9dc7635ff065c7eea5cf70ed2049cc5eebca5e85278cd446d42606c - sourceBlobDigest: sha256:b3995c2bca4313402799b1179ab92208ee1e784309bec497e06110b42933f48c + sourceRevisionDigest: sha256:07e65c01a719ba72c42a868fd0c08267849c6b2bc52eb5f6c4ff226d829d59e6 + sourceBlobDigest: sha256:95031745ebff8f1aafd86d389e1524a449d53cf53203f4b2ba99db442dcbd8cb codeSamplesNamespace: clerk-openapi-python-code-samples - codeSamplesRevisionDigest: sha256:9220c7eb7f21688c8de2a25887058cbaf96c1da1860848f4966e0384dd8c36b8 + codeSamplesRevisionDigest: sha256:d761dfe32088e3abd19e0dba1ca14ef39ead1e73bb0622f0c70be0596d6b67c9 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README.md b/README.md index 13064d83..f9df2a23 100644 --- a/README.md +++ b/README.md @@ -143,8 +143,6 @@ with Clerk( res = clerk.email_addresses.get(email_address_id="email_address_id_example") - assert res is not None - # Handle response print(res) ``` @@ -166,8 +164,6 @@ async def main(): res = await clerk.email_addresses.get_async(email_address_id="email_address_id_example") - assert res is not None - # Handle response print(res) @@ -272,6 +268,9 @@ def verify_machine_token(request: httpx.Request): ### [billing](docs/sdks/billing/README.md) +* [list_plans](docs/sdks/billing/README.md#list_plans) - List all billing plans +* [list_subscription_items](docs/sdks/billing/README.md#list_subscription_items) - List all subscription items +* [cancel_subscription_item](docs/sdks/billing/README.md#cancel_subscription_item) - Cancel a subscription item * [extend_subscription_item_free_trial](docs/sdks/billing/README.md#extend_subscription_item_free_trial) - Extend free trial for a subscription item * [list_statements](docs/sdks/billing/README.md#list_statements) - List all billing statements * [get_statement](docs/sdks/billing/README.md#get_statement) - Retrieve a billing statement @@ -289,12 +288,6 @@ def verify_machine_token(request: httpx.Request): * [verify](docs/sdks/clients/README.md#verify) - Verify a client * [get](docs/sdks/clients/README.md#get) - Get a client -### [commerce](docs/sdks/commerce/README.md) - -* [list_plans](docs/sdks/commerce/README.md#list_plans) - List all commerce plans -* [list_subscription_items](docs/sdks/commerce/README.md#list_subscription_items) - List all subscription items -* [cancel_subscription_item](docs/sdks/commerce/README.md#cancel_subscription_item) - Cancel a subscription item - ### [domains](docs/sdks/domainssdk/README.md) * [list](docs/sdks/domainssdk/README.md#list) - List all instance domains @@ -546,8 +539,6 @@ with Clerk( "content": open("example.file", "rb"), }) - assert res is not None - # Handle response print(res) @@ -621,8 +612,6 @@ with Clerk( "token": "jwt_token_example", }) - assert res is not None - # Handle response print(res) diff --git a/RELEASES.md b/RELEASES.md index 5e62934e..ddc10b84 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -478,4 +478,14 @@ Based on: ### Generated - [python v4.0.0] . ### Releases -- [PyPI v4.0.0] https://pypi.org/project/clerk-backend-api/4.0.0 - . \ No newline at end of file +- [PyPI v4.0.0] https://pypi.org/project/clerk-backend-api/4.0.0 - . + +## 2025-11-18 15:23:05 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.658.2 (2.755.9) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v4.0.1] . +### Releases +- [PyPI v4.0.1] https://pypi.org/project/clerk-backend-api/4.0.1 - . \ No newline at end of file diff --git a/USAGE.md b/USAGE.md index 0e79cd89..4639eab7 100644 --- a/USAGE.md +++ b/USAGE.md @@ -10,8 +10,6 @@ with Clerk( res = clerk.email_addresses.get(email_address_id="email_address_id_example") - assert res is not None - # Handle response print(res) ``` @@ -33,8 +31,6 @@ async def main(): res = await clerk.email_addresses.get_async(email_address_id="email_address_id_example") - assert res is not None - # Handle response print(res) diff --git a/docs/models/clerkerrorerrorenterpriseaccountmeta.md b/docs/models/clerkerrorerrorenterpriseaccountmeta.md new file mode 100644 index 00000000..e12e48d2 --- /dev/null +++ b/docs/models/clerkerrorerrorenterpriseaccountmeta.md @@ -0,0 +1,7 @@ +# ClerkErrorErrorEnterpriseAccountMeta + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/clerkerrorerrorenterpriseaccountverificationmeta.md b/docs/models/clerkerrorerrorenterpriseaccountverificationmeta.md new file mode 100644 index 00000000..af28d7d0 --- /dev/null +++ b/docs/models/clerkerrorerrorenterpriseaccountverificationmeta.md @@ -0,0 +1,7 @@ +# ClerkErrorErrorEnterpriseAccountVerificationMeta + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/commerceplan.md b/docs/models/commerceplan.md index 05fb08a6..b06af6d1 100644 --- a/docs/models/commerceplan.md +++ b/docs/models/commerceplan.md @@ -3,23 +3,23 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `object` | [models.CommercePlanObject](../models/commerceplanobject.md) | :heavy_check_mark: | String representing the object's type. Objects of the same type share the same value. | -| `id` | *str* | :heavy_check_mark: | Unique identifier for the plan. | -| `name` | *str* | :heavy_check_mark: | The name of the plan. | -| `fee` | [models.CommerceMoneyResponse](../models/commercemoneyresponse.md) | :heavy_check_mark: | N/A | -| `annual_monthly_fee` | [Nullable[models.AnnualMonthlyFee]](../models/annualmonthlyfee.md) | :heavy_check_mark: | N/A | -| `annual_fee` | [Nullable[models.AnnualFee]](../models/annualfee.md) | :heavy_check_mark: | N/A | -| `description` | *Nullable[str]* | :heavy_check_mark: | The description of the plan. | -| `product_id` | *str* | :heavy_check_mark: | The ID of the product this plan belongs to. | -| `is_default` | *bool* | :heavy_check_mark: | Whether this is the default plan. | -| `is_recurring` | *bool* | :heavy_check_mark: | Whether this is a recurring plan. | -| `publicly_visible` | *bool* | :heavy_check_mark: | Whether this plan is publicly visible. | -| `has_base_fee` | *bool* | :heavy_check_mark: | Whether this plan has a base fee. | -| `for_payer_type` | *str* | :heavy_check_mark: | The payer type this plan is designed for. | -| `slug` | *str* | :heavy_check_mark: | The URL-friendly slug for the plan. | -| `avatar_url` | *Nullable[str]* | :heavy_check_mark: | The URL of the plan's avatar image. | -| `features` | List[[models.FeatureResponse](../models/featureresponse.md)] | :heavy_minus_sign: | The features included in this plan. | -| `free_trial_enabled` | *bool* | :heavy_check_mark: | Whether free trial is enabled for this plan. | -| `free_trial_days` | *Nullable[int]* | :heavy_check_mark: | Number of free trial days for this plan. | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `object` | [models.CommercePlanObject](../models/commerceplanobject.md) | :heavy_check_mark: | String representing the object's type. Objects of the same type share the same value. | +| `id` | *str* | :heavy_check_mark: | Unique identifier for the plan. | +| `name` | *str* | :heavy_check_mark: | The name of the plan. | +| `fee` | [models.CommerceMoneyResponse](../models/commercemoneyresponse.md) | :heavy_check_mark: | N/A | +| `annual_monthly_fee` | [Nullable[models.AnnualMonthlyFee]](../models/annualmonthlyfee.md) | :heavy_check_mark: | N/A | +| `annual_fee` | [Nullable[models.AnnualFee]](../models/annualfee.md) | :heavy_check_mark: | N/A | +| `description` | *Nullable[str]* | :heavy_check_mark: | The description of the plan. | +| ~~`product_id`~~ | *str* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The ID of the product this plan belongs to. | +| `is_default` | *bool* | :heavy_check_mark: | Whether this is the default plan. | +| `is_recurring` | *bool* | :heavy_check_mark: | Whether this is a recurring plan. | +| `publicly_visible` | *bool* | :heavy_check_mark: | Whether this plan is publicly visible. | +| `has_base_fee` | *bool* | :heavy_check_mark: | Whether this plan has a base fee. | +| `for_payer_type` | *str* | :heavy_check_mark: | The payer type this plan is designed for. | +| `slug` | *str* | :heavy_check_mark: | The URL-friendly slug for the plan. | +| `avatar_url` | *Nullable[str]* | :heavy_check_mark: | The URL of the plan's avatar image. | +| `features` | List[[models.FeatureResponse](../models/featureresponse.md)] | :heavy_minus_sign: | The features included in this plan. | +| `free_trial_enabled` | *bool* | :heavy_check_mark: | Whether free trial is enabled for this plan. | +| `free_trial_days` | *Nullable[int]* | :heavy_check_mark: | Number of free trial days for this plan. | \ No newline at end of file diff --git a/docs/models/createsessionrequestbody.md b/docs/models/createsessionrequestbody.md index f96abfe9..fa4228bf 100644 --- a/docs/models/createsessionrequestbody.md +++ b/docs/models/createsessionrequestbody.md @@ -3,6 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | -| `user_id` | *str* | :heavy_check_mark: | The ID representing the user | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `user_id` | *str* | :heavy_check_mark: | The ID representing the user | +| `active_organization_id` | *Optional[str]* | :heavy_minus_sign: | The ID of the organization to set as active for this session | \ No newline at end of file diff --git a/docs/models/enterpriseaccount.md b/docs/models/enterpriseaccount.md new file mode 100644 index 00000000..20628b6b --- /dev/null +++ b/docs/models/enterpriseaccount.md @@ -0,0 +1,21 @@ +# EnterpriseAccount + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | N/A | +| `object` | [models.EnterpriseAccountObject](../models/enterpriseaccountobject.md) | :heavy_check_mark: | String representing the object's type. Objects of the same type share the same value.
| +| `protocol` | [Optional[models.Protocol]](../models/protocol.md) | :heavy_minus_sign: | The authentication protocol used to sign in.
| +| `provider` | *str* | :heavy_check_mark: | N/A | +| `active` | *bool* | :heavy_check_mark: | N/A | +| `email_address` | *str* | :heavy_check_mark: | N/A | +| `first_name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `last_name` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `provider_user_id` | *OptionalNullable[str]* | :heavy_minus_sign: | The unique ID of the user in the external provider's system | +| `enterprise_connection_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `public_metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | +| `verification` | [Nullable[models.EnterpriseAccountVerification]](../models/enterpriseaccountverification.md) | :heavy_check_mark: | N/A | +| `enterprise_connection` | [OptionalNullable[models.EnterpriseConnection]](../models/enterpriseconnection.md) | :heavy_minus_sign: | N/A | +| `last_authenticated_at` | *OptionalNullable[int]* | :heavy_minus_sign: | Unix timestamp of last authentication.
| \ No newline at end of file diff --git a/docs/models/enterpriseaccountobject.md b/docs/models/enterpriseaccountobject.md new file mode 100644 index 00000000..af4241d3 --- /dev/null +++ b/docs/models/enterpriseaccountobject.md @@ -0,0 +1,11 @@ +# EnterpriseAccountObject + +String representing the object's type. Objects of the same type share the same value. + + + +## Values + +| Name | Value | +| -------------------- | -------------------- | +| `ENTERPRISE_ACCOUNT` | enterprise_account | \ No newline at end of file diff --git a/docs/models/enterpriseaccountverification.md b/docs/models/enterpriseaccountverification.md new file mode 100644 index 00000000..cded84ab --- /dev/null +++ b/docs/models/enterpriseaccountverification.md @@ -0,0 +1,23 @@ +# EnterpriseAccountVerification + + +## Supported Types + +### `models.VerificationTicketVerificationTicket` + +```python +value: models.VerificationTicketVerificationTicket = /* values here */ +``` + +### `models.VerificationSAMLVerificationSAML` + +```python +value: models.VerificationSAMLVerificationSAML = /* values here */ +``` + +### `models.VerificationOauth` + +```python +value: models.VerificationOauth = /* values here */ +``` + diff --git a/docs/models/enterpriseconnection.md b/docs/models/enterpriseconnection.md new file mode 100644 index 00000000..a9675674 --- /dev/null +++ b/docs/models/enterpriseconnection.md @@ -0,0 +1,11 @@ +# EnterpriseConnection + + +## Supported Types + +### `models.EnterpriseConnectionEnterpriseConnection` + +```python +value: models.EnterpriseConnectionEnterpriseConnection = /* values here */ +``` + diff --git a/docs/models/enterpriseconnection1.md b/docs/models/enterpriseconnection1.md new file mode 100644 index 00000000..7eb6a81e --- /dev/null +++ b/docs/models/enterpriseconnection1.md @@ -0,0 +1,21 @@ +# EnterpriseConnection1 + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | N/A | +| `protocol` | *str* | :heavy_check_mark: | N/A | +| `provider` | *str* | :heavy_check_mark: | N/A | +| `name` | *str* | :heavy_check_mark: | N/A | +| `logo_public_url` | *Nullable[str]* | :heavy_check_mark: | N/A | +| ~~`domain`~~ | *str* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | +| `domains` | List[*str*] | :heavy_minus_sign: | N/A | +| `active` | *bool* | :heavy_check_mark: | N/A | +| `sync_user_attributes` | *bool* | :heavy_check_mark: | N/A | +| `allow_subdomains` | *bool* | :heavy_check_mark: | N/A | +| `allow_idp_initiated` | *bool* | :heavy_check_mark: | N/A | +| `disable_additional_identifications` | *bool* | :heavy_check_mark: | N/A | +| `created_at` | *int* | :heavy_check_mark: | Unix timestamp of creation.
| +| `updated_at` | *int* | :heavy_check_mark: | Unix timestamp of last update.
| \ No newline at end of file diff --git a/docs/models/enterpriseconnection2.md b/docs/models/enterpriseconnection2.md new file mode 100644 index 00000000..389c816b --- /dev/null +++ b/docs/models/enterpriseconnection2.md @@ -0,0 +1,21 @@ +# EnterpriseConnection2 + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | N/A | +| `protocol` | *str* | :heavy_check_mark: | N/A | +| `provider` | *str* | :heavy_check_mark: | N/A | +| `name` | *str* | :heavy_check_mark: | N/A | +| `logo_public_url` | *Nullable[str]* | :heavy_check_mark: | N/A | +| ~~`domain`~~ | *Optional[str]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | +| `domains` | List[*str*] | :heavy_check_mark: | N/A | +| `active` | *bool* | :heavy_check_mark: | N/A | +| `sync_user_attributes` | *bool* | :heavy_check_mark: | N/A | +| `allow_subdomains` | *bool* | :heavy_check_mark: | N/A | +| `allow_idp_initiated` | *bool* | :heavy_check_mark: | N/A | +| `disable_additional_identifications` | *bool* | :heavy_check_mark: | N/A | +| `created_at` | *int* | :heavy_check_mark: | Unix timestamp of creation.
| +| `updated_at` | *int* | :heavy_check_mark: | Unix timestamp of last update.
| \ No newline at end of file diff --git a/docs/models/enterpriseconnectionenterpriseconnection.md b/docs/models/enterpriseconnectionenterpriseconnection.md new file mode 100644 index 00000000..933622e2 --- /dev/null +++ b/docs/models/enterpriseconnectionenterpriseconnection.md @@ -0,0 +1,17 @@ +# EnterpriseConnectionEnterpriseConnection + + +## Supported Types + +### `models.EnterpriseConnection1` + +```python +value: models.EnterpriseConnection1 = /* values here */ +``` + +### `models.EnterpriseConnection2` + +```python +value: models.EnterpriseConnection2 = /* values here */ +``` + diff --git a/docs/models/organizationinvitation.md b/docs/models/organizationinvitation.md index 2f6d0030..01d0333c 100644 --- a/docs/models/organizationinvitation.md +++ b/docs/models/organizationinvitation.md @@ -13,6 +13,7 @@ An organization invitation | `role` | *str* | :heavy_check_mark: | N/A | admin | | `role_name` | *str* | :heavy_check_mark: | N/A | | | `organization_id` | *Optional[str]* | :heavy_minus_sign: | N/A | org_12345 | +| `inviter_id` | *Nullable[str]* | :heavy_check_mark: | N/A | | | `status` | *Optional[str]* | :heavy_minus_sign: | N/A | pending | | `public_metadata` | Dict[str, *Any*] | :heavy_check_mark: | N/A | {
"key": "value"
} | | `private_metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | {
"private_key": "secret_value"
} | diff --git a/docs/models/organizationinvitationwithpublicorganizationdata.md b/docs/models/organizationinvitationwithpublicorganizationdata.md index 3e541831..87b2efaa 100644 --- a/docs/models/organizationinvitationwithpublicorganizationdata.md +++ b/docs/models/organizationinvitationwithpublicorganizationdata.md @@ -13,6 +13,7 @@ An organization invitation with public organization data populated | `role` | *str* | :heavy_check_mark: | N/A | | `role_name` | *str* | :heavy_check_mark: | N/A | | `organization_id` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `inviter_id` | *Nullable[str]* | :heavy_check_mark: | N/A | | `status` | *Optional[str]* | :heavy_minus_sign: | N/A | | `public_metadata` | Dict[str, *Any*] | :heavy_check_mark: | N/A | | `private_metadata` | Dict[str, *Any*] | :heavy_minus_sign: | N/A | diff --git a/docs/models/plan.md b/docs/models/plan.md index 863456ff..b2e5b272 100644 --- a/docs/models/plan.md +++ b/docs/models/plan.md @@ -5,23 +5,23 @@ The associated plan. ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | -| `object` | [models.CommerceSubscriptionItemPlanObject](../models/commercesubscriptionitemplanobject.md) | :heavy_check_mark: | String representing the object's type. Objects of the same type share the same value. | -| `id` | *str* | :heavy_check_mark: | Unique identifier for the plan. | -| `name` | *str* | :heavy_check_mark: | The name of the plan. | -| `fee` | [models.CommerceMoneyResponse](../models/commercemoneyresponse.md) | :heavy_check_mark: | N/A | -| `annual_monthly_fee` | [Nullable[models.CommerceSubscriptionItemAnnualMonthlyFee]](../models/commercesubscriptionitemannualmonthlyfee.md) | :heavy_check_mark: | N/A | -| `annual_fee` | [Nullable[models.CommerceSubscriptionItemAnnualFee]](../models/commercesubscriptionitemannualfee.md) | :heavy_check_mark: | N/A | -| `description` | *Nullable[str]* | :heavy_check_mark: | The description of the plan. | -| `product_id` | *str* | :heavy_check_mark: | The ID of the product this plan belongs to. | -| `is_default` | *bool* | :heavy_check_mark: | Whether this is the default plan. | -| `is_recurring` | *bool* | :heavy_check_mark: | Whether this is a recurring plan. | -| `publicly_visible` | *bool* | :heavy_check_mark: | Whether this plan is publicly visible. | -| `has_base_fee` | *bool* | :heavy_check_mark: | Whether this plan has a base fee. | -| `for_payer_type` | *str* | :heavy_check_mark: | The payer type this plan is designed for. | -| `slug` | *str* | :heavy_check_mark: | The URL-friendly slug for the plan. | -| `avatar_url` | *Nullable[str]* | :heavy_check_mark: | The URL of the plan's avatar image. | -| `features` | List[[models.FeatureResponse](../models/featureresponse.md)] | :heavy_minus_sign: | The features included in this plan. | -| `free_trial_enabled` | *bool* | :heavy_check_mark: | Whether free trial is enabled for this plan. | -| `free_trial_days` | *Nullable[int]* | :heavy_check_mark: | Number of free trial days for this plan. | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `object` | [models.CommerceSubscriptionItemPlanObject](../models/commercesubscriptionitemplanobject.md) | :heavy_check_mark: | String representing the object's type. Objects of the same type share the same value. | +| `id` | *str* | :heavy_check_mark: | Unique identifier for the plan. | +| `name` | *str* | :heavy_check_mark: | The name of the plan. | +| `fee` | [models.CommerceMoneyResponse](../models/commercemoneyresponse.md) | :heavy_check_mark: | N/A | +| `annual_monthly_fee` | [Nullable[models.CommerceSubscriptionItemAnnualMonthlyFee]](../models/commercesubscriptionitemannualmonthlyfee.md) | :heavy_check_mark: | N/A | +| `annual_fee` | [Nullable[models.CommerceSubscriptionItemAnnualFee]](../models/commercesubscriptionitemannualfee.md) | :heavy_check_mark: | N/A | +| `description` | *Nullable[str]* | :heavy_check_mark: | The description of the plan. | +| ~~`product_id`~~ | *str* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The ID of the product this plan belongs to. | +| `is_default` | *bool* | :heavy_check_mark: | Whether this is the default plan. | +| `is_recurring` | *bool* | :heavy_check_mark: | Whether this is a recurring plan. | +| `publicly_visible` | *bool* | :heavy_check_mark: | Whether this plan is publicly visible. | +| `has_base_fee` | *bool* | :heavy_check_mark: | Whether this plan has a base fee. | +| `for_payer_type` | *str* | :heavy_check_mark: | The payer type this plan is designed for. | +| `slug` | *str* | :heavy_check_mark: | The URL-friendly slug for the plan. | +| `avatar_url` | *Nullable[str]* | :heavy_check_mark: | The URL of the plan's avatar image. | +| `features` | List[[models.FeatureResponse](../models/featureresponse.md)] | :heavy_minus_sign: | The features included in this plan. | +| `free_trial_enabled` | *bool* | :heavy_check_mark: | Whether free trial is enabled for this plan. | +| `free_trial_days` | *Nullable[int]* | :heavy_check_mark: | Number of free trial days for this plan. | \ No newline at end of file diff --git a/docs/models/protocol.md b/docs/models/protocol.md new file mode 100644 index 00000000..caea7e3f --- /dev/null +++ b/docs/models/protocol.md @@ -0,0 +1,12 @@ +# Protocol + +The authentication protocol used to sign in. + + + +## Values + +| Name | Value | +| ------- | ------- | +| `OAUTH` | oauth | +| `SAML` | saml | \ No newline at end of file diff --git a/docs/models/updateinstanceauthconfigrequestbody.md b/docs/models/updateinstanceauthconfigrequestbody.md index 2f4ae289..fb47df6e 100644 --- a/docs/models/updateinstanceauthconfigrequestbody.md +++ b/docs/models/updateinstanceauthconfigrequestbody.md @@ -8,5 +8,4 @@ | `restricted_to_allowlist` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether sign up is restricted to email addresses, phone numbers and usernames that are on the allowlist. | false | | `from_email_address` | *OptionalNullable[str]* | :heavy_minus_sign: | The local part of the email address from which authentication-related emails (e.g. OTP code, magic links) will be sent.
Only alphanumeric values are allowed.
Note that this value should contain only the local part of the address (e.g. `foo` for `foo@example.com`). | noreply | | `progressive_sign_up` | *OptionalNullable[bool]* | :heavy_minus_sign: | Enable the Progressive Sign Up algorithm. Refer to the [docs](https://clerk.com/docs/upgrade-guides/progressive-sign-up) for more info. | true | -| `enhanced_email_deliverability` | *OptionalNullable[bool]* | :heavy_minus_sign: | The "enhanced_email_deliverability" feature will send emails from "verifications@clerk.dev" instead of your domain.
This can be helpful if you do not have a high domain reputation. | true | | `test_mode` | *OptionalNullable[bool]* | :heavy_minus_sign: | Toggles test mode for this instance, allowing the use of test email addresses and phone numbers.
Defaults to true for development instances. | true | \ No newline at end of file diff --git a/docs/models/updateinstancerequestbody.md b/docs/models/updateinstancerequestbody.md index 0015cca4..99a5cb2d 100644 --- a/docs/models/updateinstancerequestbody.md +++ b/docs/models/updateinstancerequestbody.md @@ -7,7 +7,6 @@ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `test_mode` | *OptionalNullable[bool]* | :heavy_minus_sign: | Toggles test mode for this instance, allowing the use of test email addresses and phone numbers.
Defaults to true for development instances. | true | | `hibp` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether the instance should be using the HIBP service to check passwords for breaches | false | -| `enhanced_email_deliverability` | *OptionalNullable[bool]* | :heavy_minus_sign: | The "enhanced_email_deliverability" feature will send emails from "verifications@clerk.dev" instead of your domain.
This can be helpful if you do not have a high domain reputation. | true | | `support_email` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | support@example.com | | `clerk_js_version` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | 2.3.1 | | `development_origin` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | http://localhost:3000 | diff --git a/docs/models/user.md b/docs/models/user.md index d0f45adc..f4e4fba6 100644 --- a/docs/models/user.md +++ b/docs/models/user.md @@ -33,8 +33,11 @@ Success | `backup_code_enabled` | *bool* | :heavy_check_mark: | N/A | true | | `mfa_enabled_at` | *Nullable[int]* | :heavy_check_mark: | Unix timestamp of when MFA was last enabled for this user. It should be noted that this field is not nullified if MFA is disabled.
| 1615852800 | | `mfa_disabled_at` | *Nullable[int]* | :heavy_check_mark: | Unix timestamp of when MFA was last disabled for this user. It should be noted that this field is not nullified if MFA is enabled again.
| | +| `password_last_updated_at` | *OptionalNullable[int]* | :heavy_minus_sign: | Unix timestamp of when the user's password was last updated.
| | | `external_accounts` | List[[models.ExternalAccountWithVerification](../models/externalaccountwithverification.md)] | :heavy_check_mark: | N/A | [
{
"id": "ext_account_id_123",
"provider": "Facebook",
"user_id": "user_id_at_provider"
}
] | | `saml_accounts` | List[[models.SAMLAccount](../models/samlaccount.md)] | :heavy_check_mark: | N/A | [
{
"id": "saml_account_id_123",
"object": "saml_account",
"provider": "SAML Provider",
"active": true,
"email_address": "user@example.com",
"public_metadata": {
"department": "IT"
},
"verification": {
"status": "verified",
"strategy": "saml"
}
}
] | +| `enterprise_accounts` | List[[models.EnterpriseAccount](../models/enterpriseaccount.md)] | :heavy_check_mark: | N/A | | +| `organization_memberships` | List[[models.OrganizationMembership](../models/organizationmembership.md)] | :heavy_minus_sign: | N/A | | | `last_sign_in_at` | *Nullable[int]* | :heavy_check_mark: | Unix timestamp of last sign-in.
| 1622852400 | | `banned` | *bool* | :heavy_check_mark: | Flag to denote whether user is banned or not.
| false | | `locked` | *bool* | :heavy_check_mark: | Flag to denote whether user is currently locked, i.e. restricted from signing in or not.
| false | diff --git a/docs/models/verificationoauth.md b/docs/models/verificationoauth.md new file mode 100644 index 00000000..f152e68b --- /dev/null +++ b/docs/models/verificationoauth.md @@ -0,0 +1,15 @@ +# VerificationOauth + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | +| `object` | [Optional[models.VerificationOauthVerificationEnterpriseAccountObject]](../models/verificationoauthverificationenterpriseaccountobject.md) | :heavy_minus_sign: | N/A | +| `status` | [models.VerificationOauthVerificationEnterpriseAccountStatus](../models/verificationoauthverificationenterpriseaccountstatus.md) | :heavy_check_mark: | N/A | +| `strategy` | *str* | :heavy_check_mark: | N/A | +| `external_verification_redirect_url` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `error` | [OptionalNullable[models.VerificationOauthVerificationEnterpriseAccountError]](../models/verificationoauthverificationenterpriseaccounterror.md) | :heavy_minus_sign: | N/A | +| `expire_at` | *int* | :heavy_check_mark: | N/A | +| `attempts` | *Nullable[int]* | :heavy_check_mark: | N/A | +| `verified_at_client` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/verificationoautherrorenterpriseaccountclerkerror.md b/docs/models/verificationoautherrorenterpriseaccountclerkerror.md new file mode 100644 index 00000000..a4ed5d6a --- /dev/null +++ b/docs/models/verificationoautherrorenterpriseaccountclerkerror.md @@ -0,0 +1,11 @@ +# VerificationOauthErrorEnterpriseAccountClerkError + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | +| `message` | *str* | :heavy_check_mark: | N/A | Invalid input | +| `long_message` | *str* | :heavy_check_mark: | N/A | The input provided does not meet the requirements. | +| `code` | *str* | :heavy_check_mark: | N/A | 400_bad_request | +| `meta` | [Optional[models.ClerkErrorErrorEnterpriseAccountVerificationMeta]](../models/clerkerrorerrorenterpriseaccountverificationmeta.md) | :heavy_minus_sign: | N/A | {} | \ No newline at end of file diff --git a/docs/models/verificationoauthverificationenterpriseaccounterror.md b/docs/models/verificationoauthverificationenterpriseaccounterror.md new file mode 100644 index 00000000..fb06e038 --- /dev/null +++ b/docs/models/verificationoauthverificationenterpriseaccounterror.md @@ -0,0 +1,11 @@ +# VerificationOauthVerificationEnterpriseAccountError + + +## Supported Types + +### `models.VerificationOauthErrorEnterpriseAccountClerkError` + +```python +value: models.VerificationOauthErrorEnterpriseAccountClerkError = /* values here */ +``` + diff --git a/docs/models/verificationoauthverificationenterpriseaccountobject.md b/docs/models/verificationoauthverificationenterpriseaccountobject.md new file mode 100644 index 00000000..e25ace1b --- /dev/null +++ b/docs/models/verificationoauthverificationenterpriseaccountobject.md @@ -0,0 +1,8 @@ +# VerificationOauthVerificationEnterpriseAccountObject + + +## Values + +| Name | Value | +| -------------------- | -------------------- | +| `VERIFICATION_OAUTH` | verification_oauth | \ No newline at end of file diff --git a/docs/models/verificationoauthverificationenterpriseaccountstatus.md b/docs/models/verificationoauthverificationenterpriseaccountstatus.md new file mode 100644 index 00000000..e6f4a7a1 --- /dev/null +++ b/docs/models/verificationoauthverificationenterpriseaccountstatus.md @@ -0,0 +1,12 @@ +# VerificationOauthVerificationEnterpriseAccountStatus + + +## Values + +| Name | Value | +| -------------- | -------------- | +| `UNVERIFIED` | unverified | +| `VERIFIED` | verified | +| `FAILED` | failed | +| `EXPIRED` | expired | +| `TRANSFERABLE` | transferable | \ No newline at end of file diff --git a/docs/models/verificationsamlerrorenterpriseaccountclerkerror.md b/docs/models/verificationsamlerrorenterpriseaccountclerkerror.md new file mode 100644 index 00000000..6ae3d8e1 --- /dev/null +++ b/docs/models/verificationsamlerrorenterpriseaccountclerkerror.md @@ -0,0 +1,11 @@ +# VerificationSamlErrorEnterpriseAccountClerkError + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | +| `message` | *str* | :heavy_check_mark: | N/A | Invalid input | +| `long_message` | *str* | :heavy_check_mark: | N/A | The input provided does not meet the requirements. | +| `code` | *str* | :heavy_check_mark: | N/A | 400_bad_request | +| `meta` | [Optional[models.ClerkErrorErrorEnterpriseAccountMeta]](../models/clerkerrorerrorenterpriseaccountmeta.md) | :heavy_minus_sign: | N/A | {} | \ No newline at end of file diff --git a/docs/models/verificationsamlverificationenterpriseaccounterror.md b/docs/models/verificationsamlverificationenterpriseaccounterror.md new file mode 100644 index 00000000..bf58e86e --- /dev/null +++ b/docs/models/verificationsamlverificationenterpriseaccounterror.md @@ -0,0 +1,11 @@ +# VerificationSamlVerificationEnterpriseAccountError + + +## Supported Types + +### `models.VerificationSamlErrorEnterpriseAccountClerkError` + +```python +value: models.VerificationSamlErrorEnterpriseAccountClerkError = /* values here */ +``` + diff --git a/docs/models/verificationsamlverificationenterpriseaccountobject.md b/docs/models/verificationsamlverificationenterpriseaccountobject.md new file mode 100644 index 00000000..91e4385a --- /dev/null +++ b/docs/models/verificationsamlverificationenterpriseaccountobject.md @@ -0,0 +1,8 @@ +# VerificationSamlVerificationEnterpriseAccountObject + + +## Values + +| Name | Value | +| ------------------- | ------------------- | +| `VERIFICATION_SAML` | verification_saml | \ No newline at end of file diff --git a/docs/models/verificationsamlverificationenterpriseaccountstatus.md b/docs/models/verificationsamlverificationenterpriseaccountstatus.md new file mode 100644 index 00000000..ff668f0d --- /dev/null +++ b/docs/models/verificationsamlverificationenterpriseaccountstatus.md @@ -0,0 +1,12 @@ +# VerificationSamlVerificationEnterpriseAccountStatus + + +## Values + +| Name | Value | +| -------------- | -------------- | +| `UNVERIFIED` | unverified | +| `VERIFIED` | verified | +| `FAILED` | failed | +| `EXPIRED` | expired | +| `TRANSFERABLE` | transferable | \ No newline at end of file diff --git a/docs/models/verificationsamlverificationenterpriseaccountstrategy.md b/docs/models/verificationsamlverificationenterpriseaccountstrategy.md new file mode 100644 index 00000000..6c97a442 --- /dev/null +++ b/docs/models/verificationsamlverificationenterpriseaccountstrategy.md @@ -0,0 +1,8 @@ +# VerificationSamlVerificationEnterpriseAccountStrategy + + +## Values + +| Name | Value | +| ------ | ------ | +| `SAML` | saml | \ No newline at end of file diff --git a/docs/models/verificationsamlverificationsaml.md b/docs/models/verificationsamlverificationsaml.md new file mode 100644 index 00000000..d7b9c7a9 --- /dev/null +++ b/docs/models/verificationsamlverificationsaml.md @@ -0,0 +1,15 @@ +# VerificationSAMLVerificationSAML + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | +| `object` | [Optional[models.VerificationSamlVerificationEnterpriseAccountObject]](../models/verificationsamlverificationenterpriseaccountobject.md) | :heavy_minus_sign: | N/A | +| `status` | [models.VerificationSamlVerificationEnterpriseAccountStatus](../models/verificationsamlverificationenterpriseaccountstatus.md) | :heavy_check_mark: | N/A | +| `strategy` | [models.VerificationSamlVerificationEnterpriseAccountStrategy](../models/verificationsamlverificationenterpriseaccountstrategy.md) | :heavy_check_mark: | N/A | +| `external_verification_redirect_url` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | +| `error` | [OptionalNullable[models.VerificationSamlVerificationEnterpriseAccountError]](../models/verificationsamlverificationenterpriseaccounterror.md) | :heavy_minus_sign: | N/A | +| `expire_at` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | +| `attempts` | *Nullable[int]* | :heavy_check_mark: | N/A | +| `verified_at_client` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/verificationticketverificationenterpriseaccountobject.md b/docs/models/verificationticketverificationenterpriseaccountobject.md new file mode 100644 index 00000000..c110276f --- /dev/null +++ b/docs/models/verificationticketverificationenterpriseaccountobject.md @@ -0,0 +1,8 @@ +# VerificationTicketVerificationEnterpriseAccountObject + + +## Values + +| Name | Value | +| --------------------- | --------------------- | +| `VERIFICATION_TICKET` | verification_ticket | \ No newline at end of file diff --git a/docs/models/verificationticketverificationenterpriseaccountstatus.md b/docs/models/verificationticketverificationenterpriseaccountstatus.md new file mode 100644 index 00000000..f3bb0a4e --- /dev/null +++ b/docs/models/verificationticketverificationenterpriseaccountstatus.md @@ -0,0 +1,10 @@ +# VerificationTicketVerificationEnterpriseAccountStatus + + +## Values + +| Name | Value | +| ------------ | ------------ | +| `UNVERIFIED` | unverified | +| `VERIFIED` | verified | +| `EXPIRED` | expired | \ No newline at end of file diff --git a/docs/models/verificationticketverificationenterpriseaccountstrategy.md b/docs/models/verificationticketverificationenterpriseaccountstrategy.md new file mode 100644 index 00000000..6c7faca7 --- /dev/null +++ b/docs/models/verificationticketverificationenterpriseaccountstrategy.md @@ -0,0 +1,8 @@ +# VerificationTicketVerificationEnterpriseAccountStrategy + + +## Values + +| Name | Value | +| -------- | -------- | +| `TICKET` | ticket | \ No newline at end of file diff --git a/docs/models/verificationticketverificationticket.md b/docs/models/verificationticketverificationticket.md new file mode 100644 index 00000000..c9db8df9 --- /dev/null +++ b/docs/models/verificationticketverificationticket.md @@ -0,0 +1,13 @@ +# VerificationTicketVerificationTicket + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | +| `object` | [Optional[models.VerificationTicketVerificationEnterpriseAccountObject]](../models/verificationticketverificationenterpriseaccountobject.md) | :heavy_minus_sign: | N/A | +| `status` | [models.VerificationTicketVerificationEnterpriseAccountStatus](../models/verificationticketverificationenterpriseaccountstatus.md) | :heavy_check_mark: | N/A | +| `strategy` | [models.VerificationTicketVerificationEnterpriseAccountStrategy](../models/verificationticketverificationenterpriseaccountstrategy.md) | :heavy_check_mark: | N/A | +| `attempts` | *Nullable[int]* | :heavy_check_mark: | N/A | +| `expire_at` | *Nullable[int]* | :heavy_check_mark: | N/A | +| `verified_at_client` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/sdks/actortokens/README.md b/docs/sdks/actortokens/README.md index d4333fdc..9ad79e4b 100644 --- a/docs/sdks/actortokens/README.md +++ b/docs/sdks/actortokens/README.md @@ -32,8 +32,6 @@ with Clerk( ), )) - assert res is not None - # Handle response print(res) @@ -74,8 +72,6 @@ with Clerk( res = clerk.actor_tokens.revoke(actor_token_id="act_tok_abcdefghijk") - assert res is not None - # Handle response print(res) diff --git a/docs/sdks/allowlistidentifiers/README.md b/docs/sdks/allowlistidentifiers/README.md index c2d3513b..cf2bfa60 100644 --- a/docs/sdks/allowlistidentifiers/README.md +++ b/docs/sdks/allowlistidentifiers/README.md @@ -26,8 +26,6 @@ with Clerk( res = clerk.allowlist_identifiers.list(paginated=False, limit=20, offset=10) - assert res is not None - # Handle response print(res) @@ -73,8 +71,6 @@ with Clerk( "notify": True, }) - assert res is not None - # Handle response print(res) @@ -115,8 +111,6 @@ with Clerk( res = clerk.allowlist_identifiers.delete(identifier_id="example_identifier_id") - assert res is not None - # Handle response print(res) diff --git a/docs/sdks/betafeatures/README.md b/docs/sdks/betafeatures/README.md index 6aac9f9d..a51a5774 100644 --- a/docs/sdks/betafeatures/README.md +++ b/docs/sdks/betafeatures/README.md @@ -26,12 +26,9 @@ with Clerk( res = clerk.beta_features.update_instance_settings(request={ "from_email_address": "noreply", "progressive_sign_up": True, - "enhanced_email_deliverability": True, "test_mode": True, }) - assert res is not None - # Handle response print(res) diff --git a/docs/sdks/billing/README.md b/docs/sdks/billing/README.md index ea14130a..2f9341ef 100644 --- a/docs/sdks/billing/README.md +++ b/docs/sdks/billing/README.md @@ -5,11 +5,152 @@ ### Available Operations +* [list_plans](#list_plans) - List all billing plans +* [list_subscription_items](#list_subscription_items) - List all subscription items +* [cancel_subscription_item](#cancel_subscription_item) - Cancel a subscription item * [extend_subscription_item_free_trial](#extend_subscription_item_free_trial) - Extend free trial for a subscription item * [list_statements](#list_statements) - List all billing statements * [get_statement](#get_statement) - Retrieve a billing statement * [get_statement_payment_attempts](#get_statement_payment_attempts) - List payment attempts for a billing statement +## list_plans + +Returns a list of all billing plans for the instance. The plans are returned sorted by creation date, +with the newest plans appearing first. This includes both free and paid plans. Pagination is supported. + +### Example Usage + + +```python +import clerk_backend_api +from clerk_backend_api import Clerk + + +with Clerk( + bearer_auth="", +) as clerk: + + res = clerk.billing.list_plans(paginated=True, limit=20, offset=10, payer_type=clerk_backend_api.PayerType.ORG) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | +| `paginated` | *Optional[bool]* | :heavy_minus_sign: | Whether to paginate the results.
If true, the results will be paginated.
If false, the results will not be paginated. | | +| `limit` | *Optional[int]* | :heavy_minus_sign: | Applies a limit to the number of results returned.
Can be used for paginating the results together with `offset`. | 20 | +| `offset` | *Optional[int]* | :heavy_minus_sign: | Skip the first `offset` results when paginating.
Needs to be an integer greater or equal to zero.
To be used in conjunction with `limit`. | 10 | +| `payer_type` | [Optional[models.PayerType]](../../models/payertype.md) | :heavy_minus_sign: | Filter plans by payer type | | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | + +### Response + +**[models.PaginatedCommercePlanResponse](../../models/paginatedcommerceplanresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| models.ClerkErrors | 400, 401, 422 | application/json | +| models.ClerkErrors | 500 | application/json | +| models.SDKError | 4XX, 5XX | \*/\* | + +## list_subscription_items + +Returns a list of all subscription items for the instance. The subscription items are returned sorted by creation date, +with the newest appearing first. This includes subscriptions for both users and organizations. Pagination is supported. + +### Example Usage + + +```python +import clerk_backend_api +from clerk_backend_api import Clerk + + +with Clerk( + bearer_auth="", +) as clerk: + + res = clerk.billing.list_subscription_items(paginated=False, limit=20, offset=10, status=clerk_backend_api.GetCommerceSubscriptionItemListQueryParamStatus.FREE_TRIAL, payer_type=clerk_backend_api.QueryParamPayerType.ORG, plan_id="", include_free=False, query="") + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | +| `paginated` | *Optional[bool]* | :heavy_minus_sign: | Whether to paginate the results.
If true, the results will be paginated.
If false, the results will not be paginated. | | +| `limit` | *Optional[int]* | :heavy_minus_sign: | Applies a limit to the number of results returned.
Can be used for paginating the results together with `offset`. | 20 | +| `offset` | *Optional[int]* | :heavy_minus_sign: | Skip the first `offset` results when paginating.
Needs to be an integer greater or equal to zero.
To be used in conjunction with `limit`. | 10 | +| `status` | [Optional[models.GetCommerceSubscriptionItemListQueryParamStatus]](../../models/getcommercesubscriptionitemlistqueryparamstatus.md) | :heavy_minus_sign: | Filter subscription items by status | | +| `payer_type` | [Optional[models.QueryParamPayerType]](../../models/queryparampayertype.md) | :heavy_minus_sign: | Filter subscription items by payer type | | +| `plan_id` | *Optional[str]* | :heavy_minus_sign: | Filter subscription items by plan ID | | +| `include_free` | *Optional[bool]* | :heavy_minus_sign: | Whether to include free plan subscription items | | +| `query` | *Optional[str]* | :heavy_minus_sign: | Search query to filter subscription items | | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | + +### Response + +**[models.PaginatedCommerceSubscriptionItemResponse](../../models/paginatedcommercesubscriptionitemresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------ | ------------------ | ------------------ | +| models.ClerkErrors | 400, 401, 422 | application/json | +| models.ClerkErrors | 500 | application/json | +| models.SDKError | 4XX, 5XX | \*/\* | + +## cancel_subscription_item + +Cancel a specific subscription item. The subscription item can be canceled immediately or at the end of the current billing period. + +### Example Usage + + +```python +from clerk_backend_api import Clerk + + +with Clerk( + bearer_auth="", +) as clerk: + + res = clerk.billing.cancel_subscription_item(subscription_item_id="", end_now=False) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | +| `subscription_item_id` | *str* | :heavy_check_mark: | The ID of the subscription item to cancel | +| `end_now` | *Optional[bool]* | :heavy_minus_sign: | Whether to cancel the subscription immediately (true) or at the end of the current billing period (false, default) | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.CommerceSubscriptionItem](../../models/commercesubscriptionitem.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------- | ----------------------- | ----------------------- | +| models.ClerkErrors | 400, 401, 403, 404, 422 | application/json | +| models.ClerkErrors | 500 | application/json | +| models.SDKError | 4XX, 5XX | \*/\* | + ## extend_subscription_item_free_trial Extends the free trial period for a specific subscription item to the specified timestamp. @@ -31,8 +172,6 @@ with Clerk( res = clerk.billing.extend_subscription_item_free_trial(subscription_item_id="", extend_to=parse_datetime("2026-01-08T00:00:00Z")) - assert res is not None - # Handle response print(res) @@ -76,8 +215,6 @@ with Clerk( res = clerk.billing.list_statements(paginated=False, limit=20, offset=10) - assert res is not None - # Handle response print(res) @@ -121,8 +258,6 @@ with Clerk( res = clerk.billing.get_statement(statement_id="") - assert res is not None - # Handle response print(res) @@ -165,8 +300,6 @@ with Clerk( res = clerk.billing.get_statement_payment_attempts(statement_id="", paginated=True, limit=20, offset=10) - assert res is not None - # Handle response print(res) diff --git a/docs/sdks/blocklistidentifierssdk/README.md b/docs/sdks/blocklistidentifierssdk/README.md index 52502dc8..5000077e 100644 --- a/docs/sdks/blocklistidentifierssdk/README.md +++ b/docs/sdks/blocklistidentifierssdk/README.md @@ -26,8 +26,6 @@ with Clerk( res = clerk.blocklist_identifiers.list() - assert res is not None - # Handle response print(res) @@ -69,8 +67,6 @@ with Clerk( "identifier": "example@example.com", }) - assert res is not None - # Handle response print(res) @@ -111,8 +107,6 @@ with Clerk( res = clerk.blocklist_identifiers.delete(identifier_id="identifier123") - assert res is not None - # Handle response print(res) diff --git a/docs/sdks/clients/README.md b/docs/sdks/clients/README.md index 610d373a..61e3a6d0 100644 --- a/docs/sdks/clients/README.md +++ b/docs/sdks/clients/README.md @@ -30,8 +30,6 @@ with Clerk( res = clerk.clients.list(paginated=False, limit=20, offset=10) - assert res is not None - # Handle response print(res) @@ -76,8 +74,6 @@ with Clerk( "token": "jwt_token_example", }) - assert res is not None - # Handle response print(res) @@ -118,8 +114,6 @@ with Clerk( res = clerk.clients.get(client_id="cli_123456789") - assert res is not None - # Handle response print(res) diff --git a/docs/sdks/commerce/README.md b/docs/sdks/commerce/README.md deleted file mode 100644 index 167e2a3c..00000000 --- a/docs/sdks/commerce/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Commerce -(*commerce*) - -## Overview - -### Available Operations - -* [list_plans](#list_plans) - List all commerce plans -* [list_subscription_items](#list_subscription_items) - List all subscription items -* [cancel_subscription_item](#cancel_subscription_item) - Cancel a subscription item - -## list_plans - -Returns a list of all commerce plans for the instance. The plans are returned sorted by creation date, -with the newest plans appearing first. This includes both free and paid plans. Pagination is supported. - -### Example Usage - - -```python -import clerk_backend_api -from clerk_backend_api import Clerk - - -with Clerk( - bearer_auth="", -) as clerk: - - res = clerk.commerce.list_plans(paginated=True, limit=20, offset=10, payer_type=clerk_backend_api.PayerType.ORG) - - assert res is not None - - # Handle response - print(res) - -``` - -### Parameters - -| Parameter | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | -| `paginated` | *Optional[bool]* | :heavy_minus_sign: | Whether to paginate the results.
If true, the results will be paginated.
If false, the results will not be paginated. | | -| `limit` | *Optional[int]* | :heavy_minus_sign: | Applies a limit to the number of results returned.
Can be used for paginating the results together with `offset`. | 20 | -| `offset` | *Optional[int]* | :heavy_minus_sign: | Skip the first `offset` results when paginating.
Needs to be an integer greater or equal to zero.
To be used in conjunction with `limit`. | 10 | -| `payer_type` | [Optional[models.PayerType]](../../models/payertype.md) | :heavy_minus_sign: | Filter plans by payer type | | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | - -### Response - -**[models.PaginatedCommercePlanResponse](../../models/paginatedcommerceplanresponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| ------------------ | ------------------ | ------------------ | -| models.ClerkErrors | 400, 401, 422 | application/json | -| models.ClerkErrors | 500 | application/json | -| models.SDKError | 4XX, 5XX | \*/\* | - -## list_subscription_items - -Returns a list of all subscription items for the instance. The subscription items are returned sorted by creation date, -with the newest appearing first. This includes subscriptions for both users and organizations. Pagination is supported. - -### Example Usage - - -```python -import clerk_backend_api -from clerk_backend_api import Clerk - - -with Clerk( - bearer_auth="", -) as clerk: - - res = clerk.commerce.list_subscription_items(paginated=False, limit=20, offset=10, status=clerk_backend_api.GetCommerceSubscriptionItemListQueryParamStatus.FREE_TRIAL, payer_type=clerk_backend_api.QueryParamPayerType.ORG, plan_id="", include_free=False, query="") - - assert res is not None - - # Handle response - print(res) - -``` - -### Parameters - -| Parameter | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | -| `paginated` | *Optional[bool]* | :heavy_minus_sign: | Whether to paginate the results.
If true, the results will be paginated.
If false, the results will not be paginated. | | -| `limit` | *Optional[int]* | :heavy_minus_sign: | Applies a limit to the number of results returned.
Can be used for paginating the results together with `offset`. | 20 | -| `offset` | *Optional[int]* | :heavy_minus_sign: | Skip the first `offset` results when paginating.
Needs to be an integer greater or equal to zero.
To be used in conjunction with `limit`. | 10 | -| `status` | [Optional[models.GetCommerceSubscriptionItemListQueryParamStatus]](../../models/getcommercesubscriptionitemlistqueryparamstatus.md) | :heavy_minus_sign: | Filter subscription items by status | | -| `payer_type` | [Optional[models.QueryParamPayerType]](../../models/queryparampayertype.md) | :heavy_minus_sign: | Filter subscription items by payer type | | -| `plan_id` | *Optional[str]* | :heavy_minus_sign: | Filter subscription items by plan ID | | -| `include_free` | *Optional[bool]* | :heavy_minus_sign: | Whether to include free plan subscription items | | -| `query` | *Optional[str]* | :heavy_minus_sign: | Search query to filter subscription items | | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | - -### Response - -**[models.PaginatedCommerceSubscriptionItemResponse](../../models/paginatedcommercesubscriptionitemresponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| ------------------ | ------------------ | ------------------ | -| models.ClerkErrors | 400, 401, 422 | application/json | -| models.ClerkErrors | 500 | application/json | -| models.SDKError | 4XX, 5XX | \*/\* | - -## cancel_subscription_item - -Cancel a specific subscription item. The subscription item can be canceled immediately or at the end of the current billing period. - -### Example Usage - - -```python -from clerk_backend_api import Clerk - - -with Clerk( - bearer_auth="", -) as clerk: - - res = clerk.commerce.cancel_subscription_item(subscription_item_id="", end_now=False) - - assert res is not None - - # Handle response - print(res) - -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | -| `subscription_item_id` | *str* | :heavy_check_mark: | The ID of the subscription item to cancel | -| `end_now` | *Optional[bool]* | :heavy_minus_sign: | Whether to cancel the subscription immediately (true) or at the end of the current billing period (false, default) | -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | - -### Response - -**[models.CommerceSubscriptionItem](../../models/commercesubscriptionitem.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| ----------------------- | ----------------------- | ----------------------- | -| models.ClerkErrors | 400, 401, 403, 404, 422 | application/json | -| models.ClerkErrors | 500 | application/json | -| models.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/domainssdk/README.md b/docs/sdks/domainssdk/README.md index e7b89a12..eb04d030 100644 --- a/docs/sdks/domainssdk/README.md +++ b/docs/sdks/domainssdk/README.md @@ -28,8 +28,6 @@ with Clerk( res = clerk.domains.list() - assert res is not None - # Handle response print(res) @@ -76,8 +74,6 @@ with Clerk( "proxy_url": "https://proxy.example.com", }) - assert res is not None - # Handle response print(res) @@ -119,8 +115,6 @@ with Clerk( res = clerk.domains.delete(domain_id="domain_12345") - assert res is not None - # Handle response print(res) @@ -168,8 +162,6 @@ with Clerk( res = clerk.domains.update(domain_id="domain_12345", name="example.com", proxy_url="http://proxy.example.com", is_secondary=False) - assert res is not None - # Handle response print(res) diff --git a/docs/sdks/emailaddresses/README.md b/docs/sdks/emailaddresses/README.md index 06dc84e7..ab7c11f6 100644 --- a/docs/sdks/emailaddresses/README.md +++ b/docs/sdks/emailaddresses/README.md @@ -32,8 +32,6 @@ with Clerk( "primary": True, }) - assert res is not None - # Handle response print(res) @@ -74,8 +72,6 @@ with Clerk( res = clerk.email_addresses.get(email_address_id="email_address_id_example") - assert res is not None - # Handle response print(res) @@ -116,8 +112,6 @@ with Clerk( res = clerk.email_addresses.delete(email_address_id="email_address_id_example") - assert res is not None - # Handle response print(res) @@ -158,8 +152,6 @@ with Clerk( res = clerk.email_addresses.update(email_address_id="email_address_id_example", verified=False, primary=True) - assert res is not None - # Handle response print(res) diff --git a/docs/sdks/emailandsmstemplates/README.md b/docs/sdks/emailandsmstemplates/README.md index 1f916f3b..f1a693a9 100644 --- a/docs/sdks/emailandsmstemplates/README.md +++ b/docs/sdks/emailandsmstemplates/README.md @@ -27,8 +27,6 @@ with Clerk( res = clerk.email_and_sms_templates.upsert(template_type=clerk_backend_api.UpsertTemplatePathParamTemplateType.SMS, slug="verification-code", name="Verification Code", subject="Your Verification Code", markup="

Your code: {{code}}

", body="Use this code to verify your email: {{code}}", delivered_by_clerk=True, from_email_name="hello", reply_to_email_name="support") - assert res is not None - # Handle response print(res) diff --git a/docs/sdks/emailsmstemplates/README.md b/docs/sdks/emailsmstemplates/README.md index 8af0c088..74761e51 100644 --- a/docs/sdks/emailsmstemplates/README.md +++ b/docs/sdks/emailsmstemplates/README.md @@ -31,8 +31,6 @@ with Clerk( res = clerk.email_sms_templates.list(template_type=clerk_backend_api.TemplateType.EMAIL, paginated=True, limit=20, offset=10) - assert res is not None - # Handle response print(res) @@ -79,8 +77,6 @@ with Clerk( res = clerk.email_sms_templates.get(template_type=clerk_backend_api.PathParamTemplateType.EMAIL, slug="welcome-email") - assert res is not None - # Handle response print(res) @@ -125,8 +121,6 @@ with Clerk( res = clerk.email_sms_templates.revert(template_type=clerk_backend_api.RevertTemplatePathParamTemplateType.EMAIL, slug="welcome-email") - assert res is not None - # Handle response print(res) @@ -173,8 +167,6 @@ with Clerk( res = clerk.email_sms_templates.toggle_template_delivery(template_type=clerk_backend_api.ToggleTemplateDeliveryPathParamTemplateType.EMAIL, slug="welcome-email", delivered_by_clerk=True) - assert res is not None - # Handle response print(res) diff --git a/docs/sdks/instancesettingssdk/README.md b/docs/sdks/instancesettingssdk/README.md index 67a7ac69..1b18c7b2 100644 --- a/docs/sdks/instancesettingssdk/README.md +++ b/docs/sdks/instancesettingssdk/README.md @@ -28,8 +28,6 @@ with Clerk( res = clerk.instance_settings.get() - assert res is not None - # Handle response print(res) @@ -69,7 +67,6 @@ with Clerk( clerk.instance_settings.update(request={ "test_mode": True, "hibp": False, - "enhanced_email_deliverability": True, "support_email": "support@example.com", "clerk_js_version": "2.3.1", "development_origin": "http://localhost:3000", @@ -122,8 +119,6 @@ with Clerk( "block_disposable_email_domains": True, }) - assert res is not None - # Handle response print(res) @@ -218,8 +213,6 @@ with Clerk( "domains_default_role_id": "member_role", }) - assert res is not None - # Handle response print(res) diff --git a/docs/sdks/invitations/README.md b/docs/sdks/invitations/README.md index 701483f7..06b5d6e5 100644 --- a/docs/sdks/invitations/README.md +++ b/docs/sdks/invitations/README.md @@ -38,8 +38,6 @@ with Clerk( "template_slug": clerk_backend_api.TemplateSlug.INVITATION, }) - assert res is not None - # Handle response print(res) @@ -81,8 +79,6 @@ with Clerk( res = clerk.invitations.list(status=clerk_backend_api.ListInvitationsQueryParamStatus.ACCEPTED, query="", order_by="pending", paginated=False, limit=20, offset=10) - assert res is not None - # Handle response print(res) @@ -117,6 +113,8 @@ invitations as emails by setting the `notify` parameter to `true`. There cannot of the email addresses you provide unless you set `ignore_existing` to `true` for specific email addresses. Please note that there must be no existing user for any of the email addresses you provide, and this rule cannot be bypassed. +This endpoint is limited to a maximum of 10 invitations per API call. If you need to send more invitations, please make multiple requests. + ### Example Usage @@ -147,8 +145,6 @@ with Clerk( }, ]) - assert res is not None - # Handle response print(res) @@ -192,8 +188,6 @@ with Clerk( res = clerk.invitations.revoke(invitation_id="inv_123") - assert res is not None - # Handle response print(res) diff --git a/docs/sdks/jwkssdk/README.md b/docs/sdks/jwkssdk/README.md index 9557959f..7bbef53b 100644 --- a/docs/sdks/jwkssdk/README.md +++ b/docs/sdks/jwkssdk/README.md @@ -24,8 +24,6 @@ with Clerk( res = clerk.jwks.get_jwks() - assert res is not None - # Handle response print(res) diff --git a/docs/sdks/jwttemplates/README.md b/docs/sdks/jwttemplates/README.md index 42a3f9ca..476bf864 100644 --- a/docs/sdks/jwttemplates/README.md +++ b/docs/sdks/jwttemplates/README.md @@ -28,8 +28,6 @@ with Clerk( res = clerk.jwt_templates.list(paginated=True, limit=20, offset=10) - assert res is not None - # Handle response print(res) @@ -79,8 +77,6 @@ with Clerk( "signing_key": "PRIVATE_KEY_PLACEHOLDER", }) - assert res is not None - # Handle response print(res) @@ -121,8 +117,6 @@ with Clerk( res = clerk.jwt_templates.get(template_id="template_123") - assert res is not None - # Handle response print(res) @@ -163,8 +157,6 @@ with Clerk( res = clerk.jwt_templates.update(template_id="", name="", claims={}, lifetime=62.24, allowed_clock_skew=258.27, custom_signing_key=False, signing_algorithm="", signing_key=None) - assert res is not None - # Handle response print(res) @@ -212,8 +204,6 @@ with Clerk( res = clerk.jwt_templates.delete(template_id="") - assert res is not None - # Handle response print(res) diff --git a/docs/sdks/m2m/README.md b/docs/sdks/m2m/README.md index b48f3d19..b60cd756 100644 --- a/docs/sdks/m2m/README.md +++ b/docs/sdks/m2m/README.md @@ -27,8 +27,6 @@ with Clerk( res = clerk.m2m.create_token(seconds_until_expiration=9240.85, claims="") - assert res is not None - # Handle response print(res) @@ -76,8 +74,6 @@ with Clerk( res = clerk.m2m.list_tokens(subject="", revoked=False, expired=False, limit=10, offset=0) - assert res is not None - # Handle response print(res) @@ -129,8 +125,6 @@ with Clerk( res = clerk.m2m.revoke_token(m2m_token_id="", revocation_reason="") - assert res is not None - # Handle response print(res) @@ -178,8 +172,6 @@ with Clerk( res = clerk.m2m.verify_token(token="") - assert res is not None - # Handle response print(res) diff --git a/docs/sdks/machines/README.md b/docs/sdks/machines/README.md index 5ac40279..757acccb 100644 --- a/docs/sdks/machines/README.md +++ b/docs/sdks/machines/README.md @@ -34,8 +34,6 @@ with Clerk( res = clerk.machines.list(limit=20, offset=10, query="", order_by="-created_at") - assert res is not None - # Handle response print(res) @@ -86,8 +84,6 @@ with Clerk( ], }) - assert res is not None - # Handle response print(res) @@ -128,8 +124,6 @@ with Clerk( res = clerk.machines.get(machine_id="") - assert res is not None - # Handle response print(res) @@ -171,8 +165,6 @@ with Clerk( res = clerk.machines.update(machine_id="", name="", default_token_ttl=754540) - assert res is not None - # Handle response print(res) @@ -215,8 +207,6 @@ with Clerk( res = clerk.machines.delete(machine_id="") - assert res is not None - # Handle response print(res) @@ -257,8 +247,6 @@ with Clerk( res = clerk.machines.get_secret_key(machine_id="") - assert res is not None - # Handle response print(res) @@ -301,8 +289,6 @@ with Clerk( res = clerk.machines.rotate_secret_key(machine_id="", previous_token_ttl=632625) - assert res is not None - # Handle response print(res) @@ -345,8 +331,6 @@ with Clerk( res = clerk.machines.create_scope(machine_id="", to_machine_id="") - assert res is not None - # Handle response print(res) @@ -388,8 +372,6 @@ with Clerk( res = clerk.machines.delete_scope(machine_id="", other_machine_id="") - assert res is not None - # Handle response print(res) diff --git a/docs/sdks/oauthaccesstokens/README.md b/docs/sdks/oauthaccesstokens/README.md index 952fe91a..f292910d 100644 --- a/docs/sdks/oauthaccesstokens/README.md +++ b/docs/sdks/oauthaccesstokens/README.md @@ -24,8 +24,6 @@ with Clerk( res = clerk.oauth_access_tokens.verify(access_token="XXXXXXXXXXXXXX") - assert res is not None - # Handle response print(res) diff --git a/docs/sdks/oauthapplicationssdk/README.md b/docs/sdks/oauthapplicationssdk/README.md index 2d568b09..c7c81ec8 100644 --- a/docs/sdks/oauthapplicationssdk/README.md +++ b/docs/sdks/oauthapplicationssdk/README.md @@ -32,8 +32,6 @@ with Clerk( res = clerk.oauth_applications.list(limit=20, offset=10, order_by="+created_at", name_query="") - assert res is not None - # Handle response print(res) @@ -86,8 +84,6 @@ with Clerk( "public": True, }) - assert res is not None - # Handle response print(res) @@ -128,8 +124,6 @@ with Clerk( res = clerk.oauth_applications.get(oauth_application_id="oauth_app_12345") - assert res is not None - # Handle response print(res) @@ -170,8 +164,6 @@ with Clerk( res = clerk.oauth_applications.update(oauth_application_id="oauth_app_67890", name="Updated OAuth App Name", redirect_uris=None, scopes="profile email public_metadata private_metadata", consent_screen_enabled=None, pkce_required=None, public=None) - assert res is not None - # Handle response print(res) @@ -220,8 +212,6 @@ with Clerk( res = clerk.oauth_applications.delete(oauth_application_id="oauth_app_09876") - assert res is not None - # Handle response print(res) @@ -263,8 +253,6 @@ with Clerk( res = clerk.oauth_applications.rotate_secret(oauth_application_id="oauth_application_12345") - assert res is not None - # Handle response print(res) diff --git a/docs/sdks/organizationdomainssdk/README.md b/docs/sdks/organizationdomainssdk/README.md index 3fa4b164..ecf144b0 100644 --- a/docs/sdks/organizationdomainssdk/README.md +++ b/docs/sdks/organizationdomainssdk/README.md @@ -28,8 +28,6 @@ with Clerk( res = clerk.organization_domains.create(organization_id="", name="", enrollment_mode="", verified=False) - assert res is not None - # Handle response print(res) @@ -73,8 +71,6 @@ with Clerk( res = clerk.organization_domains.list(organization_id="", verified="", enrollment_mode="", limit=20, offset=10) - assert res is not None - # Handle response print(res) @@ -119,8 +115,6 @@ with Clerk( res = clerk.organization_domains.update(organization_id="", domain_id="", enrollment_mode="", verified=True) - assert res is not None - # Handle response print(res) @@ -164,8 +158,6 @@ with Clerk( res = clerk.organization_domains.delete(organization_id="", domain_id="") - assert res is not None - # Handle response print(res) @@ -216,8 +208,6 @@ with Clerk( clerk_backend_api.QueryParamEnrollmentMode.AUTOMATIC_SUGGESTION, ], query="", order_by="-created_at", offset=10, limit=20) - assert res is not None - # Handle response print(res) diff --git a/docs/sdks/organizationinvitationssdk/README.md b/docs/sdks/organizationinvitationssdk/README.md index 10399d6d..b05fffcb 100644 --- a/docs/sdks/organizationinvitationssdk/README.md +++ b/docs/sdks/organizationinvitationssdk/README.md @@ -36,8 +36,6 @@ with Clerk( res = clerk.organization_invitations.get_all(order_by="-created_at", status=clerk_backend_api.ListInstanceOrganizationInvitationsQueryParamStatus.ACCEPTED, query="", limit=20, offset=10) - assert res is not None - # Handle response print(res) @@ -102,8 +100,6 @@ with Clerk( "private_key": "secret_value", }, redirect_url="https://example.com/welcome", expires_in_days=785754) - assert res is not None - # Handle response print(res) @@ -157,8 +153,6 @@ with Clerk( res = clerk.organization_invitations.list(organization_id="org_12345", status=clerk_backend_api.ListOrganizationInvitationsQueryParamStatus.ACCEPTED, email_address="Theresa13@yahoo.com", order_by="pending", limit=20, offset=10) - assert res is not None - # Handle response print(res) @@ -190,6 +184,9 @@ with Clerk( ## bulk_create Creates new organization invitations in bulk and sends out emails to the provided email addresses with a link to accept the invitation and join the organization. + +This endpoint is limited to a maximum of 10 invitations per API call. If you need to send more invitations, please make multiple requests. + You can specify a different `role` for each invited organization member. New organization invitations get a "pending" status until they are revoked by an organization administrator or accepted by the invitee. The request body supports passing an optional `redirect_url` parameter for each invitation. @@ -243,8 +240,6 @@ with Clerk( }, ]) - assert res is not None - # Handle response print(res) @@ -293,8 +288,6 @@ with Clerk( res = clerk.organization_invitations.list_pending(organization_id="org_12345", limit=20, offset=10) - assert res is not None - # Handle response print(res) @@ -337,8 +330,6 @@ with Clerk( res = clerk.organization_invitations.get(organization_id="org_123456789", invitation_id="inv_987654321") - assert res is not None - # Handle response print(res) @@ -384,8 +375,6 @@ with Clerk( res = clerk.organization_invitations.revoke(organization_id="org_123456", invitation_id="inv_123456", requesting_user_id="usr_12345") - assert res is not None - # Handle response print(res) diff --git a/docs/sdks/organizationmembershipssdk/README.md b/docs/sdks/organizationmembershipssdk/README.md index 8811e1a9..fd9a61a3 100644 --- a/docs/sdks/organizationmembershipssdk/README.md +++ b/docs/sdks/organizationmembershipssdk/README.md @@ -28,8 +28,6 @@ with Clerk( res = clerk.organization_memberships.create(organization_id="org_123", user_id="user_456", role="admin") - assert res is not None - # Handle response print(res) @@ -86,8 +84,6 @@ with Clerk( "", ], query="", email_address_query="", phone_number_query="", username_query="", name_query="", last_active_at_before=1700690400000, last_active_at_after=1700690400000, created_at_before=1730160000000, created_at_after=1730160000000, limit=20, offset=10) - assert res is not None - # Handle response print(res) @@ -146,8 +142,6 @@ with Clerk( res = clerk.organization_memberships.update(organization_id="org_12345", user_id="user_67890", role="admin") - assert res is not None - # Handle response print(res) @@ -190,8 +184,6 @@ with Clerk( res = clerk.organization_memberships.delete(organization_id="org_12345", user_id="user_67890") - assert res is not None - # Handle response print(res) @@ -239,8 +231,6 @@ with Clerk( }) - assert res is not None - # Handle response print(res) diff --git a/docs/sdks/organizationssdk/README.md b/docs/sdks/organizationssdk/README.md index 078c8075..8f5418dc 100644 --- a/docs/sdks/organizationssdk/README.md +++ b/docs/sdks/organizationssdk/README.md @@ -39,8 +39,6 @@ with Clerk( "-name", ], order_by="-created_at", limit=20, offset=10) - assert res is not None - # Handle response print(res) @@ -109,8 +107,6 @@ with Clerk( "created_at": "1718855032267", }) - assert res is not None - # Handle response print(res) @@ -151,8 +147,6 @@ with Clerk( res = clerk.organizations.get(organization_id="org_123", include_members_count=False, include_missing_member_with_elevated_permissions=False) - assert res is not None - # Handle response print(res) @@ -199,8 +193,6 @@ with Clerk( }, name="New Organization Name", slug="new-org-slug", max_allowed_memberships=100, admin_delete_enabled=True, created_at="1720203056033") - assert res is not None - # Handle response print(res) @@ -250,8 +242,6 @@ with Clerk( res = clerk.organizations.delete(organization_id="org_321_delete") - assert res is not None - # Handle response print(res) @@ -299,8 +289,6 @@ with Clerk( "internal_use_only": "Future plans discussion.", }) - assert res is not None - # Handle response print(res) @@ -349,8 +337,6 @@ with Clerk( "content": open("example.file", "rb"), }, uploader_user_id="user_67890") - assert res is not None - # Handle response print(res) @@ -393,8 +379,6 @@ with Clerk( res = clerk.organizations.delete_logo(organization_id="org_12345") - assert res is not None - # Handle response print(res) @@ -437,8 +421,6 @@ with Clerk( res = clerk.organizations.get_billing_subscription(organization_id="") - assert res is not None - # Handle response print(res) diff --git a/docs/sdks/phonenumbers/README.md b/docs/sdks/phonenumbers/README.md index b02c1984..6ac16b9f 100644 --- a/docs/sdks/phonenumbers/README.md +++ b/docs/sdks/phonenumbers/README.md @@ -33,8 +33,6 @@ with Clerk( "reserved_for_second_factor": False, }) - assert res is not None - # Handle response print(res) @@ -75,8 +73,6 @@ with Clerk( res = clerk.phone_numbers.get(phone_number_id="phone_12345") - assert res is not None - # Handle response print(res) @@ -117,8 +113,6 @@ with Clerk( res = clerk.phone_numbers.delete(phone_number_id="phone_12345") - assert res is not None - # Handle response print(res) @@ -159,8 +153,6 @@ with Clerk( res = clerk.phone_numbers.update(phone_number_id="phone_12345", verified=False, primary=True, reserved_for_second_factor=True) - assert res is not None - # Handle response print(res) diff --git a/docs/sdks/proxychecks/README.md b/docs/sdks/proxychecks/README.md index f105a843..5df7e4d8 100644 --- a/docs/sdks/proxychecks/README.md +++ b/docs/sdks/proxychecks/README.md @@ -34,8 +34,6 @@ with Clerk( "proxy_url": "https://example.com/__clerk", }) - assert res is not None - # Handle response print(res) diff --git a/docs/sdks/redirecturls/README.md b/docs/sdks/redirecturls/README.md index 103f99e6..2e062d40 100644 --- a/docs/sdks/redirecturls/README.md +++ b/docs/sdks/redirecturls/README.md @@ -27,8 +27,6 @@ with Clerk( res = clerk.redirect_urls.list(paginated=True, limit=20, offset=10) - assert res is not None - # Handle response print(res) @@ -72,8 +70,6 @@ with Clerk( "url": "https://my-app.com/oauth-callback", }) - assert res is not None - # Handle response print(res) @@ -114,8 +110,6 @@ with Clerk( res = clerk.redirect_urls.get(id="redir_01FG4K9G5NWSQ4ZPT4TQE4Z7G3") - assert res is not None - # Handle response print(res) @@ -156,8 +150,6 @@ with Clerk( res = clerk.redirect_urls.delete(id="redir_01FG4K9G5NWSQ4ZPT4TQE4Z7G3") - assert res is not None - # Handle response print(res) diff --git a/docs/sdks/samlconnectionssdk/README.md b/docs/sdks/samlconnectionssdk/README.md index 6ac02921..67a61785 100644 --- a/docs/sdks/samlconnectionssdk/README.md +++ b/docs/sdks/samlconnectionssdk/README.md @@ -32,8 +32,6 @@ with Clerk( "", ]) - assert res is not None - # Handle response print(res) @@ -101,8 +99,6 @@ with Clerk( "force_authn": False, }) - assert res is not None - # Handle response print(res) @@ -143,8 +139,6 @@ with Clerk( res = clerk.saml_connections.get(saml_connection_id="saml_conn_123") - assert res is not None - # Handle response print(res) @@ -194,8 +188,6 @@ with Clerk( "last_name": "Doe", }, active=True, sync_user_attributes=False, allow_subdomains=True, allow_idp_initiated=False, disable_additional_identifications=False, force_authn=True) - assert res is not None - # Handle response print(res) @@ -252,8 +244,6 @@ with Clerk( res = clerk.saml_connections.delete(saml_connection_id="saml_conn_123_delete") - assert res is not None - # Handle response print(res) diff --git a/docs/sdks/sessions/README.md b/docs/sdks/sessions/README.md index 8e188df3..03b50bff 100644 --- a/docs/sdks/sessions/README.md +++ b/docs/sdks/sessions/README.md @@ -34,8 +34,6 @@ with Clerk( res = clerk.sessions.list(client_id="client_123", user_id="user_456", status=clerk_backend_api.QueryParamStatus.ACTIVE, paginated=True, limit=20, offset=10) - assert res is not None - # Handle response print(res) @@ -84,10 +82,9 @@ with Clerk( res = clerk.sessions.create(request={ "user_id": "", + "active_organization_id": "", }) - assert res is not None - # Handle response print(res) @@ -128,8 +125,6 @@ with Clerk( res = clerk.sessions.get(session_id="sess_1234567890abcdef") - assert res is not None - # Handle response print(res) @@ -176,8 +171,6 @@ with Clerk( "key2": "", }, format_=clerk_backend_api.Format.TOKEN, request_originating_ip="") - assert res is not None - # Handle response print(res) @@ -225,8 +218,6 @@ with Clerk( res = clerk.sessions.revoke(session_id="sess_1234567890abcdef") - assert res is not None - # Handle response print(res) @@ -267,8 +258,6 @@ with Clerk( res = clerk.sessions.create_token(session_id="", expires_in_seconds=None) - assert res is not None - # Handle response print(res) @@ -310,8 +299,6 @@ with Clerk( res = clerk.sessions.create_token_from_template(session_id="ses_123abcd4567", template_name="custom_hasura", expires_in_seconds=1880.22) - assert res is not None - # Handle response print(res) diff --git a/docs/sdks/signintokens/README.md b/docs/sdks/signintokens/README.md index f9e0304a..2166c6f7 100644 --- a/docs/sdks/signintokens/README.md +++ b/docs/sdks/signintokens/README.md @@ -29,8 +29,6 @@ with Clerk( "user_id": "user_12345", }) - assert res is not None - # Handle response print(res) @@ -71,8 +69,6 @@ with Clerk( res = clerk.sign_in_tokens.revoke(sign_in_token_id="tok_test_1234567890") - assert res is not None - # Handle response print(res) diff --git a/docs/sdks/signups/README.md b/docs/sdks/signups/README.md index dc052949..92176cb9 100644 --- a/docs/sdks/signups/README.md +++ b/docs/sdks/signups/README.md @@ -25,8 +25,6 @@ with Clerk( res = clerk.sign_ups.get(id="") - assert res is not None - # Handle response print(res) @@ -67,8 +65,6 @@ with Clerk( res = clerk.sign_ups.update(id="signup_1234567890abcdef", external_id="ext_id_7890abcdef123456", custom_action=False) - assert res is not None - # Handle response print(res) diff --git a/docs/sdks/templates/README.md b/docs/sdks/templates/README.md index b0f3ca35..5c3b4da3 100644 --- a/docs/sdks/templates/README.md +++ b/docs/sdks/templates/README.md @@ -26,8 +26,6 @@ with Clerk( res = clerk.templates.preview(template_type="email", slug="welcome-email", subject="Welcome to our service!", body="Hi, thank you for joining our service.", from_email_name="hello", reply_to_email_name="support") - assert res is not None - # Handle response print(res) diff --git a/docs/sdks/testingtokens/README.md b/docs/sdks/testingtokens/README.md index fbdc5300..d2859e2f 100644 --- a/docs/sdks/testingtokens/README.md +++ b/docs/sdks/testingtokens/README.md @@ -24,8 +24,6 @@ with Clerk( res = clerk.testing_tokens.create() - assert res is not None - # Handle response print(res) diff --git a/docs/sdks/users/README.md b/docs/sdks/users/README.md index 2945f276..8752472c 100644 --- a/docs/sdks/users/README.md +++ b/docs/sdks/users/README.md @@ -87,8 +87,6 @@ with Clerk( "offset": 10, }) - assert res is not None - # Handle response print(res) @@ -152,8 +150,6 @@ with Clerk( }, }, delete_self_enabled=True, legal_accepted_at="", skip_legal_checks=False, create_organization_enabled=None, create_organizations_limit=81560, created_at="2023-03-15T07:15:20.902Z") - assert res is not None - # Handle response print(res) @@ -231,8 +227,6 @@ with Clerk( "John Doe", ], query="", email_address_query="", phone_number_query="", username_query="", name_query="", banned=True, last_active_at_before=1700690400000, last_active_at_after=1700690400000, last_active_at_since=1700690400000, created_at_before=1730160000000, created_at_after=1730160000000) - assert res is not None - # Handle response print(res) @@ -290,8 +284,6 @@ with Clerk( res = clerk.users.get(user_id="usr_1") - assert res is not None - # Handle response print(res) @@ -352,8 +344,6 @@ with Clerk( "age": 30, }, delete_self_enabled=True, create_organization_enabled=False, legal_accepted_at="", skip_legal_checks=False, create_organizations_limit=824457, created_at="2021-04-05T14:30:00.000Z") - assert res is not None - # Handle response print(res) @@ -420,8 +410,6 @@ with Clerk( res = clerk.users.delete(user_id="usr_1") - assert res is not None - # Handle response print(res) @@ -462,8 +450,6 @@ with Clerk( res = clerk.users.ban(user_id="user_12345") - assert res is not None - # Handle response print(res) @@ -504,8 +490,6 @@ with Clerk( res = clerk.users.unban(user_id="user_12345") - assert res is not None - # Handle response print(res) @@ -550,8 +534,6 @@ with Clerk( "", ]) - assert res is not None - # Handle response print(res) @@ -596,8 +578,6 @@ with Clerk( "", ]) - assert res is not None - # Handle response print(res) @@ -639,8 +619,6 @@ with Clerk( res = clerk.users.lock(user_id="user_123456789") - assert res is not None - # Handle response print(res) @@ -681,8 +659,6 @@ with Clerk( res = clerk.users.unlock(user_id="user_12345") - assert res is not None - # Handle response print(res) @@ -726,8 +702,6 @@ with Clerk( "content": open("example.file", "rb"), }) - assert res is not None - # Handle response print(res) @@ -769,8 +743,6 @@ with Clerk( res = clerk.users.delete_profile_image(user_id="usr_test123") - assert res is not None - # Handle response print(res) @@ -826,8 +798,6 @@ with Clerk( "key1": "", }) - assert res is not None - # Handle response print(res) @@ -873,8 +843,6 @@ with Clerk( res = clerk.users.get_billing_subscription(user_id="") - assert res is not None - # Handle response print(res) @@ -917,8 +885,6 @@ with Clerk( res = clerk.users.get_o_auth_access_token(user_id="user_123", provider="oauth_google", paginated=True, limit=20, offset=10) - assert res is not None - # Handle response print(res) @@ -963,8 +929,6 @@ with Clerk( res = clerk.users.get_organization_memberships(user_id="usr_1234567890", limit=20, offset=10) - assert res is not None - # Handle response print(res) @@ -1008,8 +972,6 @@ with Clerk( res = clerk.users.get_organization_invitations(user_id="", limit=20, offset=10, status=clerk_backend_api.UsersGetOrganizationInvitationsQueryParamStatus.PENDING) - assert res is not None - # Handle response print(res) @@ -1054,8 +1016,6 @@ with Clerk( res = clerk.users.verify_password(user_id="user_123", password="securepassword123") - assert res is not None - # Handle response print(res) @@ -1100,8 +1060,6 @@ with Clerk( res = clerk.users.verify_totp(user_id="usr_1a2b3c", code="123456") - assert res is not None - # Handle response print(res) @@ -1143,8 +1101,6 @@ with Clerk( res = clerk.users.disable_mfa(user_id="user_123456") - assert res is not None - # Handle response print(res) @@ -1186,8 +1142,6 @@ with Clerk( res = clerk.users.delete_backup_codes(user_id="") - assert res is not None - # Handle response print(res) @@ -1229,8 +1183,6 @@ with Clerk( res = clerk.users.delete_passkey(user_id="", passkey_identification_id="") - assert res is not None - # Handle response print(res) @@ -1273,8 +1225,6 @@ with Clerk( res = clerk.users.delete_web3_wallet(user_id="", web3_wallet_identification_id="") - assert res is not None - # Handle response print(res) @@ -1317,8 +1267,6 @@ with Clerk( res = clerk.users.delete_totp(user_id="") - assert res is not None - # Handle response print(res) @@ -1360,8 +1308,6 @@ with Clerk( res = clerk.users.delete_external_account(user_id="", external_account_id="") - assert res is not None - # Handle response print(res) @@ -1404,8 +1350,6 @@ with Clerk( res = clerk.users.get_instance_organization_memberships(order_by="", limit=20, offset=10) - assert res is not None - # Handle response print(res) diff --git a/docs/sdks/waitlistentriessdk/README.md b/docs/sdks/waitlistentriessdk/README.md index ea60d369..9c7284d4 100644 --- a/docs/sdks/waitlistentriessdk/README.md +++ b/docs/sdks/waitlistentriessdk/README.md @@ -31,8 +31,6 @@ with Clerk( res = clerk.waitlist_entries.list(limit=20, offset=10, query="", status=clerk_backend_api.ListWaitlistEntriesQueryParamStatus.INVITED, order_by="-created_at") - assert res is not None - # Handle response print(res) @@ -79,8 +77,6 @@ with Clerk( "email_address": "Victoria21@gmail.com", }) - assert res is not None - # Handle response print(res) @@ -121,8 +117,6 @@ with Clerk( res = clerk.waitlist_entries.delete(waitlist_entry_id="") - assert res is not None - # Handle response print(res) @@ -163,8 +157,6 @@ with Clerk( res = clerk.waitlist_entries.invite(waitlist_entry_id="", ignore_existing=False) - assert res is not None - # Handle response print(res) @@ -206,8 +198,6 @@ with Clerk( res = clerk.waitlist_entries.reject(waitlist_entry_id="") - assert res is not None - # Handle response print(res) diff --git a/docs/sdks/webhooks/README.md b/docs/sdks/webhooks/README.md index 027add97..95fe07be 100644 --- a/docs/sdks/webhooks/README.md +++ b/docs/sdks/webhooks/README.md @@ -26,8 +26,6 @@ with Clerk( res = clerk.webhooks.create_svix_app() - assert res is not None - # Handle response print(res) @@ -101,8 +99,6 @@ with Clerk( res = clerk.webhooks.generate_svix_auth_url() - assert res is not None - # Handle response print(res) diff --git a/poetry.lock b/poetry.lock index 01dec296..e7369437 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 2.1.3 and should not be changed by hand. +# This file is automatically @generated by Poetry 2.2.1 and should not be changed by hand. [[package]] name = "annotated-types" @@ -427,6 +427,18 @@ files = [ {file = "mypy_extensions-1.0.0.tar.gz", hash = "sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782"}, ] +[[package]] +name = "nodeenv" +version = "1.9.1" +description = "Node.js virtual environment builder" +optional = false +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" +groups = ["dev"] +files = [ + {file = "nodeenv-1.9.1-py2.py3-none-any.whl", hash = "sha256:ba11c9782d29c27c70ffbdda2d7415098754709be8a7056d79a737cd901155c9"}, + {file = "nodeenv-1.9.1.tar.gz", hash = "sha256:6ec12890a2dab7946721edbfbcd91f3319c6ccc9aec47be7c7e6b7011ee6645f"}, +] + [[package]] name = "packaging" version = "24.1" @@ -668,6 +680,27 @@ typing-extensions = {version = ">=3.10.0", markers = "python_version < \"3.10\"" spelling = ["pyenchant (>=3.2,<4.0)"] testutils = ["gitpython (>3)"] +[[package]] +name = "pyright" +version = "1.1.398" +description = "Command line wrapper for pyright" +optional = false +python-versions = ">=3.7" +groups = ["dev"] +files = [ + {file = "pyright-1.1.398-py3-none-any.whl", hash = "sha256:0a70bfd007d9ea7de1cf9740e1ad1a40a122592cfe22a3f6791b06162ad08753"}, + {file = "pyright-1.1.398.tar.gz", hash = "sha256:357a13edd9be8082dc73be51190913e475fa41a6efb6ec0d4b7aab3bc11638d8"}, +] + +[package.dependencies] +nodeenv = ">=1.6.0" +typing-extensions = ">=4.1" + +[package.extras] +all = ["nodejs-wheel-binaries", "twine (>=3.4.1)"] +dev = ["twine (>=3.4.1)"] +nodejs = ["nodejs-wheel-binaries"] + [[package]] name = "pytest" version = "8.3.3" @@ -758,4 +791,4 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.1" python-versions = ">=3.9.2" -content-hash = "a3dde568f1a0ba09750f7fab272c59cae26720de6490f4618381d2cf3aa83e01" +content-hash = "056ccb95dcb841ee4e8a7ab832606860dd535c3915d951a75c2be9e1b767729f" diff --git a/pyproject.toml b/pyproject.toml index 44c705b1..7d42a976 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "clerk-backend-api" -version = "4.0.0" +version = "4.0.1" description = "Python Client SDK for clerk.dev" authors = [{ name = "Clerk" },] readme = "README-PYPI.md" @@ -30,6 +30,7 @@ in-project = true [tool.poetry.group.dev.dependencies] mypy = "==1.15.0" pylint = "==3.2.3" +pyright = "==1.1.398" pytest = "^8.3.3" [build-system] diff --git a/src/clerk_backend_api/_version.py b/src/clerk_backend_api/_version.py index ef54a373..552a58cf 100644 --- a/src/clerk_backend_api/_version.py +++ b/src/clerk_backend_api/_version.py @@ -3,10 +3,10 @@ import importlib.metadata __title__: str = "clerk-backend-api" -__version__: str = "4.0.0" +__version__: str = "4.0.1" __openapi_doc_version__: str = "2025-11-10" -__gen_version__: str = "2.748.0" -__user_agent__: str = "speakeasy-sdk/python 4.0.0 2.748.0 2025-11-10 clerk-backend-api" +__gen_version__: str = "2.755.9" +__user_agent__: str = "speakeasy-sdk/python 4.0.1 2.755.9 2025-11-10 clerk-backend-api" try: if __package__ is not None: diff --git a/src/clerk_backend_api/actortokens.py b/src/clerk_backend_api/actortokens.py index 1ac5ff82..fb0fb4e0 100644 --- a/src/clerk_backend_api/actortokens.py +++ b/src/clerk_backend_api/actortokens.py @@ -22,7 +22,7 @@ def create( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.ActorToken]: + ) -> models.ActorToken: r"""Create actor token Create an actor token that can be used to impersonate the given user. @@ -100,7 +100,7 @@ def create( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.ActorToken], http_res) + return unmarshal_json_response(models.ActorToken, http_res) if utils.match_response(http_res, ["400", "402", "422"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -126,7 +126,7 @@ async def create_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.ActorToken]: + ) -> models.ActorToken: r"""Create actor token Create an actor token that can be used to impersonate the given user. @@ -204,7 +204,7 @@ async def create_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.ActorToken], http_res) + return unmarshal_json_response(models.ActorToken, http_res) if utils.match_response(http_res, ["400", "402", "422"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -225,7 +225,7 @@ def revoke( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.ActorToken]: + ) -> models.ActorToken: r"""Revoke actor token Revokes a pending actor token. @@ -293,7 +293,7 @@ def revoke( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.ActorToken], http_res) + return unmarshal_json_response(models.ActorToken, http_res) if utils.match_response(http_res, ["400", "404"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -314,7 +314,7 @@ async def revoke_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.ActorToken]: + ) -> models.ActorToken: r"""Revoke actor token Revokes a pending actor token. @@ -382,7 +382,7 @@ async def revoke_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.ActorToken], http_res) + return unmarshal_json_response(models.ActorToken, http_res) if utils.match_response(http_res, ["400", "404"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) diff --git a/src/clerk_backend_api/allowlistidentifiers.py b/src/clerk_backend_api/allowlistidentifiers.py index 68a66667..70789bb0 100644 --- a/src/clerk_backend_api/allowlistidentifiers.py +++ b/src/clerk_backend_api/allowlistidentifiers.py @@ -19,7 +19,7 @@ def list( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[List[models.AllowlistIdentifier]]: + ) -> List[models.AllowlistIdentifier]: r"""List all identifiers on the allow-list Get a list of all identifiers allowed to sign up to an instance @@ -96,9 +96,7 @@ def list( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[List[models.AllowlistIdentifier]], http_res - ) + return unmarshal_json_response(List[models.AllowlistIdentifier], http_res) if utils.match_response(http_res, ["401", "402"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -121,7 +119,7 @@ async def list_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[List[models.AllowlistIdentifier]]: + ) -> List[models.AllowlistIdentifier]: r"""List all identifiers on the allow-list Get a list of all identifiers allowed to sign up to an instance @@ -198,9 +196,7 @@ async def list_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[List[models.AllowlistIdentifier]], http_res - ) + return unmarshal_json_response(List[models.AllowlistIdentifier], http_res) if utils.match_response(http_res, ["401", "402"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -226,7 +222,7 @@ def create( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.AllowlistIdentifier]: + ) -> models.AllowlistIdentifier: r"""Add identifier to the allow-list Create an identifier allowed to sign up to an instance @@ -303,9 +299,7 @@ def create( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.AllowlistIdentifier], http_res - ) + return unmarshal_json_response(models.AllowlistIdentifier, http_res) if utils.match_response(http_res, ["400", "402", "422"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -331,7 +325,7 @@ async def create_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.AllowlistIdentifier]: + ) -> models.AllowlistIdentifier: r"""Add identifier to the allow-list Create an identifier allowed to sign up to an instance @@ -408,9 +402,7 @@ async def create_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.AllowlistIdentifier], http_res - ) + return unmarshal_json_response(models.AllowlistIdentifier, http_res) if utils.match_response(http_res, ["400", "402", "422"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -431,7 +423,7 @@ def delete( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.DeletedObject]: + ) -> models.DeletedObject: r"""Delete identifier from allow-list Delete an identifier from the instance allow-list @@ -499,7 +491,7 @@ def delete( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.DeletedObject], http_res) + return unmarshal_json_response(models.DeletedObject, http_res) if utils.match_response(http_res, ["402", "404"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -520,7 +512,7 @@ async def delete_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.DeletedObject]: + ) -> models.DeletedObject: r"""Delete identifier from allow-list Delete an identifier from the instance allow-list @@ -588,7 +580,7 @@ async def delete_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.DeletedObject], http_res) + return unmarshal_json_response(models.DeletedObject, http_res) if utils.match_response(http_res, ["402", "404"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) diff --git a/src/clerk_backend_api/betafeatures.py b/src/clerk_backend_api/betafeatures.py index df2bb30e..35108431 100644 --- a/src/clerk_backend_api/betafeatures.py +++ b/src/clerk_backend_api/betafeatures.py @@ -23,7 +23,7 @@ def update_instance_settings( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.InstanceSettings]: + ) -> models.InstanceSettings: r"""Update instance settings Updates the settings of an instance @@ -100,7 +100,7 @@ def update_instance_settings( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.InstanceSettings], http_res) + return unmarshal_json_response(models.InstanceSettings, http_res) if utils.match_response(http_res, ["402", "422"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -126,7 +126,7 @@ async def update_instance_settings_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.InstanceSettings]: + ) -> models.InstanceSettings: r"""Update instance settings Updates the settings of an instance @@ -203,7 +203,7 @@ async def update_instance_settings_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.InstanceSettings], http_res) + return unmarshal_json_response(models.InstanceSettings, http_res) if utils.match_response(http_res, ["402", "422"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) diff --git a/src/clerk_backend_api/billing.py b/src/clerk_backend_api/billing.py index a2f61f40..8dc07b5b 100644 --- a/src/clerk_backend_api/billing.py +++ b/src/clerk_backend_api/billing.py @@ -10,6 +10,660 @@ class Billing(BaseSDK): + def list_plans( + self, + *, + paginated: Optional[bool] = None, + limit: Optional[int] = 10, + offset: Optional[int] = 0, + payer_type: Optional[models.PayerType] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.PaginatedCommercePlanResponse: + r"""List all billing plans + + Returns a list of all billing plans for the instance. The plans are returned sorted by creation date, + with the newest plans appearing first. This includes both free and paid plans. Pagination is supported. + + :param paginated: Whether to paginate the results. + If true, the results will be paginated. + If false, the results will not be paginated. + :param limit: Applies a limit to the number of results returned. + Can be used for paginating the results together with `offset`. + :param offset: Skip the first `offset` results when paginating. + Needs to be an integer greater or equal to zero. + To be used in conjunction with `limit`. + :param payer_type: Filter plans by payer type + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetCommercePlanListRequest( + paginated=paginated, + limit=limit, + offset=offset, + payer_type=payer_type, + ) + + req = self._build_request( + method="GET", + path="/billing/plans", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["5XX"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="GetCommercePlanList", + oauth2_scopes=None, + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "422", "4XX", "500", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + models.PaginatedCommercePlanResponse, http_res + ) + if utils.match_response(http_res, ["400", "401", "422"], "application/json"): + response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) + raise models.ClerkErrors(response_data, http_res) + if utils.match_response(http_res, "500", "application/json"): + response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) + raise models.ClerkErrors(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.SDKError("API error occurred", http_res, http_res_text) + + raise models.SDKError("Unexpected response received", http_res) + + async def list_plans_async( + self, + *, + paginated: Optional[bool] = None, + limit: Optional[int] = 10, + offset: Optional[int] = 0, + payer_type: Optional[models.PayerType] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.PaginatedCommercePlanResponse: + r"""List all billing plans + + Returns a list of all billing plans for the instance. The plans are returned sorted by creation date, + with the newest plans appearing first. This includes both free and paid plans. Pagination is supported. + + :param paginated: Whether to paginate the results. + If true, the results will be paginated. + If false, the results will not be paginated. + :param limit: Applies a limit to the number of results returned. + Can be used for paginating the results together with `offset`. + :param offset: Skip the first `offset` results when paginating. + Needs to be an integer greater or equal to zero. + To be used in conjunction with `limit`. + :param payer_type: Filter plans by payer type + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetCommercePlanListRequest( + paginated=paginated, + limit=limit, + offset=offset, + payer_type=payer_type, + ) + + req = self._build_request_async( + method="GET", + path="/billing/plans", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["5XX"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="GetCommercePlanList", + oauth2_scopes=None, + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "422", "4XX", "500", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + models.PaginatedCommercePlanResponse, http_res + ) + if utils.match_response(http_res, ["400", "401", "422"], "application/json"): + response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) + raise models.ClerkErrors(response_data, http_res) + if utils.match_response(http_res, "500", "application/json"): + response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) + raise models.ClerkErrors(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.SDKError("API error occurred", http_res, http_res_text) + + raise models.SDKError("Unexpected response received", http_res) + + def list_subscription_items( + self, + *, + paginated: Optional[bool] = None, + limit: Optional[int] = 10, + offset: Optional[int] = 0, + status: Optional[models.GetCommerceSubscriptionItemListQueryParamStatus] = None, + payer_type: Optional[models.QueryParamPayerType] = None, + plan_id: Optional[str] = None, + include_free: Optional[bool] = False, + query: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.PaginatedCommerceSubscriptionItemResponse: + r"""List all subscription items + + Returns a list of all subscription items for the instance. The subscription items are returned sorted by creation date, + with the newest appearing first. This includes subscriptions for both users and organizations. Pagination is supported. + + :param paginated: Whether to paginate the results. + If true, the results will be paginated. + If false, the results will not be paginated. + :param limit: Applies a limit to the number of results returned. + Can be used for paginating the results together with `offset`. + :param offset: Skip the first `offset` results when paginating. + Needs to be an integer greater or equal to zero. + To be used in conjunction with `limit`. + :param status: Filter subscription items by status + :param payer_type: Filter subscription items by payer type + :param plan_id: Filter subscription items by plan ID + :param include_free: Whether to include free plan subscription items + :param query: Search query to filter subscription items + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetCommerceSubscriptionItemListRequest( + paginated=paginated, + limit=limit, + offset=offset, + status=status, + payer_type=payer_type, + plan_id=plan_id, + include_free=include_free, + query=query, + ) + + req = self._build_request( + method="GET", + path="/billing/subscription_items", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["5XX"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="GetCommerceSubscriptionItemList", + oauth2_scopes=None, + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "422", "4XX", "500", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + models.PaginatedCommerceSubscriptionItemResponse, http_res + ) + if utils.match_response(http_res, ["400", "401", "422"], "application/json"): + response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) + raise models.ClerkErrors(response_data, http_res) + if utils.match_response(http_res, "500", "application/json"): + response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) + raise models.ClerkErrors(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.SDKError("API error occurred", http_res, http_res_text) + + raise models.SDKError("Unexpected response received", http_res) + + async def list_subscription_items_async( + self, + *, + paginated: Optional[bool] = None, + limit: Optional[int] = 10, + offset: Optional[int] = 0, + status: Optional[models.GetCommerceSubscriptionItemListQueryParamStatus] = None, + payer_type: Optional[models.QueryParamPayerType] = None, + plan_id: Optional[str] = None, + include_free: Optional[bool] = False, + query: Optional[str] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.PaginatedCommerceSubscriptionItemResponse: + r"""List all subscription items + + Returns a list of all subscription items for the instance. The subscription items are returned sorted by creation date, + with the newest appearing first. This includes subscriptions for both users and organizations. Pagination is supported. + + :param paginated: Whether to paginate the results. + If true, the results will be paginated. + If false, the results will not be paginated. + :param limit: Applies a limit to the number of results returned. + Can be used for paginating the results together with `offset`. + :param offset: Skip the first `offset` results when paginating. + Needs to be an integer greater or equal to zero. + To be used in conjunction with `limit`. + :param status: Filter subscription items by status + :param payer_type: Filter subscription items by payer type + :param plan_id: Filter subscription items by plan ID + :param include_free: Whether to include free plan subscription items + :param query: Search query to filter subscription items + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.GetCommerceSubscriptionItemListRequest( + paginated=paginated, + limit=limit, + offset=offset, + status=status, + payer_type=payer_type, + plan_id=plan_id, + include_free=include_free, + query=query, + ) + + req = self._build_request_async( + method="GET", + path="/billing/subscription_items", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["5XX"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="GetCommerceSubscriptionItemList", + oauth2_scopes=None, + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "422", "4XX", "500", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + models.PaginatedCommerceSubscriptionItemResponse, http_res + ) + if utils.match_response(http_res, ["400", "401", "422"], "application/json"): + response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) + raise models.ClerkErrors(response_data, http_res) + if utils.match_response(http_res, "500", "application/json"): + response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) + raise models.ClerkErrors(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.SDKError("API error occurred", http_res, http_res_text) + + raise models.SDKError("Unexpected response received", http_res) + + def cancel_subscription_item( + self, + *, + subscription_item_id: str, + end_now: Optional[bool] = False, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.CommerceSubscriptionItem: + r"""Cancel a subscription item + + Cancel a specific subscription item. The subscription item can be canceled immediately or at the end of the current billing period. + + :param subscription_item_id: The ID of the subscription item to cancel + :param end_now: Whether to cancel the subscription immediately (true) or at the end of the current billing period (false, default) + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.CancelCommerceSubscriptionItemRequest( + subscription_item_id=subscription_item_id, + end_now=end_now, + ) + + req = self._build_request( + method="DELETE", + path="/billing/subscription_items/{subscription_item_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["5XX"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="CancelCommerceSubscriptionItem", + oauth2_scopes=None, + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "403", "404", "422", "4XX", "500", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.CommerceSubscriptionItem, http_res) + if utils.match_response( + http_res, ["400", "401", "403", "404", "422"], "application/json" + ): + response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) + raise models.ClerkErrors(response_data, http_res) + if utils.match_response(http_res, "500", "application/json"): + response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) + raise models.ClerkErrors(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.SDKError("API error occurred", http_res, http_res_text) + + raise models.SDKError("Unexpected response received", http_res) + + async def cancel_subscription_item_async( + self, + *, + subscription_item_id: str, + end_now: Optional[bool] = False, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.CommerceSubscriptionItem: + r"""Cancel a subscription item + + Cancel a specific subscription item. The subscription item can be canceled immediately or at the end of the current billing period. + + :param subscription_item_id: The ID of the subscription item to cancel + :param end_now: Whether to cancel the subscription immediately (true) or at the end of the current billing period (false, default) + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.CancelCommerceSubscriptionItemRequest( + subscription_item_id=subscription_item_id, + end_now=end_now, + ) + + req = self._build_request_async( + method="DELETE", + path="/billing/subscription_items/{subscription_item_id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["5XX"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="CancelCommerceSubscriptionItem", + oauth2_scopes=None, + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "403", "404", "422", "4XX", "500", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.CommerceSubscriptionItem, http_res) + if utils.match_response( + http_res, ["400", "401", "403", "404", "422"], "application/json" + ): + response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) + raise models.ClerkErrors(response_data, http_res) + if utils.match_response(http_res, "500", "application/json"): + response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) + raise models.ClerkErrors(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.SDKError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.SDKError("API error occurred", http_res, http_res_text) + + raise models.SDKError("Unexpected response received", http_res) + def extend_subscription_item_free_trial( self, *, @@ -19,7 +673,7 @@ def extend_subscription_item_free_trial( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.SchemasCommerceSubscriptionItem]: + ) -> models.SchemasCommerceSubscriptionItem: r"""Extend free trial for a subscription item Extends the free trial period for a specific subscription item to the specified timestamp. @@ -103,7 +757,7 @@ def extend_subscription_item_free_trial( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): return unmarshal_json_response( - Optional[models.SchemasCommerceSubscriptionItem], http_res + models.SchemasCommerceSubscriptionItem, http_res ) if utils.match_response( http_res, ["400", "401", "403", "404", "422"], "application/json" @@ -131,7 +785,7 @@ async def extend_subscription_item_free_trial_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.SchemasCommerceSubscriptionItem]: + ) -> models.SchemasCommerceSubscriptionItem: r"""Extend free trial for a subscription item Extends the free trial period for a specific subscription item to the specified timestamp. @@ -215,7 +869,7 @@ async def extend_subscription_item_free_trial_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): return unmarshal_json_response( - Optional[models.SchemasCommerceSubscriptionItem], http_res + models.SchemasCommerceSubscriptionItem, http_res ) if utils.match_response( http_res, ["400", "401", "403", "404", "422"], "application/json" @@ -244,7 +898,7 @@ def list_statements( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.PaginatedBillingStatementResponse]: + ) -> models.PaginatedBillingStatementResponse: r"""List all billing statements Returns a list of all billing statements for the instance. The statements are returned sorted by creation date, @@ -323,7 +977,7 @@ def list_statements( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): return unmarshal_json_response( - Optional[models.PaginatedBillingStatementResponse], http_res + models.PaginatedBillingStatementResponse, http_res ) if utils.match_response(http_res, ["400", "401", "422"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) @@ -350,7 +1004,7 @@ async def list_statements_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.PaginatedBillingStatementResponse]: + ) -> models.PaginatedBillingStatementResponse: r"""List all billing statements Returns a list of all billing statements for the instance. The statements are returned sorted by creation date, @@ -429,7 +1083,7 @@ async def list_statements_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): return unmarshal_json_response( - Optional[models.PaginatedBillingStatementResponse], http_res + models.PaginatedBillingStatementResponse, http_res ) if utils.match_response(http_res, ["400", "401", "422"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) @@ -454,7 +1108,7 @@ def get_statement( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.BillingStatement]: + ) -> models.BillingStatement: r"""Retrieve a billing statement Retrieves the details of a billing statement. @@ -522,7 +1176,7 @@ def get_statement( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.BillingStatement], http_res) + return unmarshal_json_response(models.BillingStatement, http_res) if utils.match_response( http_res, ["400", "401", "404", "422"], "application/json" ): @@ -548,7 +1202,7 @@ async def get_statement_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.BillingStatement]: + ) -> models.BillingStatement: r"""Retrieve a billing statement Retrieves the details of a billing statement. @@ -616,7 +1270,7 @@ async def get_statement_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.BillingStatement], http_res) + return unmarshal_json_response(models.BillingStatement, http_res) if utils.match_response( http_res, ["400", "401", "404", "422"], "application/json" ): @@ -645,7 +1299,7 @@ def get_statement_payment_attempts( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.PaginatedBillingPaymentAttemptResponse]: + ) -> models.PaginatedBillingPaymentAttemptResponse: r"""List payment attempts for a billing statement Returns a list of all payment attempts for a specific billing statement. The payment attempts are returned sorted by creation date, @@ -726,7 +1380,7 @@ def get_statement_payment_attempts( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): return unmarshal_json_response( - Optional[models.PaginatedBillingPaymentAttemptResponse], http_res + models.PaginatedBillingPaymentAttemptResponse, http_res ) if utils.match_response( http_res, ["400", "401", "404", "422"], "application/json" @@ -756,7 +1410,7 @@ async def get_statement_payment_attempts_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.PaginatedBillingPaymentAttemptResponse]: + ) -> models.PaginatedBillingPaymentAttemptResponse: r"""List payment attempts for a billing statement Returns a list of all payment attempts for a specific billing statement. The payment attempts are returned sorted by creation date, @@ -837,7 +1491,7 @@ async def get_statement_payment_attempts_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): return unmarshal_json_response( - Optional[models.PaginatedBillingPaymentAttemptResponse], http_res + models.PaginatedBillingPaymentAttemptResponse, http_res ) if utils.match_response( http_res, ["400", "401", "404", "422"], "application/json" diff --git a/src/clerk_backend_api/blocklistidentifiers_sdk.py b/src/clerk_backend_api/blocklistidentifiers_sdk.py index e7e3294f..3cfa09be 100644 --- a/src/clerk_backend_api/blocklistidentifiers_sdk.py +++ b/src/clerk_backend_api/blocklistidentifiers_sdk.py @@ -16,7 +16,7 @@ def list( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.BlocklistIdentifiers]: + ) -> models.BlocklistIdentifiers: r"""List all identifiers on the block-list Get a list of all identifiers which are not allowed to access an instance @@ -78,9 +78,7 @@ def list( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.BlocklistIdentifiers], http_res - ) + return unmarshal_json_response(models.BlocklistIdentifiers, http_res) if utils.match_response(http_res, ["401", "402"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -100,7 +98,7 @@ async def list_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.BlocklistIdentifiers]: + ) -> models.BlocklistIdentifiers: r"""List all identifiers on the block-list Get a list of all identifiers which are not allowed to access an instance @@ -162,9 +160,7 @@ async def list_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.BlocklistIdentifiers], http_res - ) + return unmarshal_json_response(models.BlocklistIdentifiers, http_res) if utils.match_response(http_res, ["401", "402"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -190,7 +186,7 @@ def create( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.BlocklistIdentifier]: + ) -> models.BlocklistIdentifier: r"""Add identifier to the block-list Create an identifier that is blocked from accessing an instance @@ -267,9 +263,7 @@ def create( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.BlocklistIdentifier], http_res - ) + return unmarshal_json_response(models.BlocklistIdentifier, http_res) if utils.match_response(http_res, ["400", "402", "422"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -295,7 +289,7 @@ async def create_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.BlocklistIdentifier]: + ) -> models.BlocklistIdentifier: r"""Add identifier to the block-list Create an identifier that is blocked from accessing an instance @@ -372,9 +366,7 @@ async def create_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.BlocklistIdentifier], http_res - ) + return unmarshal_json_response(models.BlocklistIdentifier, http_res) if utils.match_response(http_res, ["400", "402", "422"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -395,7 +387,7 @@ def delete( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.DeletedObject]: + ) -> models.DeletedObject: r"""Delete identifier from block-list Delete an identifier from the instance block-list @@ -463,7 +455,7 @@ def delete( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.DeletedObject], http_res) + return unmarshal_json_response(models.DeletedObject, http_res) if utils.match_response(http_res, ["402", "404"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -484,7 +476,7 @@ async def delete_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.DeletedObject]: + ) -> models.DeletedObject: r"""Delete identifier from block-list Delete an identifier from the instance block-list @@ -552,7 +544,7 @@ async def delete_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.DeletedObject], http_res) + return unmarshal_json_response(models.DeletedObject, http_res) if utils.match_response(http_res, ["402", "404"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) diff --git a/src/clerk_backend_api/clients.py b/src/clerk_backend_api/clients.py index d6a71935..55e7849a 100644 --- a/src/clerk_backend_api/clients.py +++ b/src/clerk_backend_api/clients.py @@ -23,7 +23,7 @@ def list( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[List[models.Client]]: + ) -> List[models.Client]: r"""List all clients Returns a list of all clients. The clients are returned sorted by creation date, @@ -102,7 +102,7 @@ def list( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[List[models.Client]], http_res) + return unmarshal_json_response(List[models.Client], http_res) if utils.match_response( http_res, ["400", "401", "410", "422"], "application/json" ): @@ -130,7 +130,7 @@ async def list_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[List[models.Client]]: + ) -> List[models.Client]: r"""List all clients Returns a list of all clients. The clients are returned sorted by creation date, @@ -209,7 +209,7 @@ async def list_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[List[models.Client]], http_res) + return unmarshal_json_response(List[models.Client], http_res) if utils.match_response( http_res, ["400", "401", "410", "422"], "application/json" ): @@ -236,7 +236,7 @@ def verify( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.Client]: + ) -> models.Client: r"""Verify a client Verifies the client in the provided token @@ -307,7 +307,7 @@ def verify( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.Client], http_res) + return unmarshal_json_response(models.Client, http_res) if utils.match_response(http_res, ["400", "401", "404"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -332,7 +332,7 @@ async def verify_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.Client]: + ) -> models.Client: r"""Verify a client Verifies the client in the provided token @@ -403,7 +403,7 @@ async def verify_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.Client], http_res) + return unmarshal_json_response(models.Client, http_res) if utils.match_response(http_res, ["400", "401", "404"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -424,7 +424,7 @@ def get( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.Client]: + ) -> models.Client: r"""Get a client Returns the details of a client. @@ -492,7 +492,7 @@ def get( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.Client], http_res) + return unmarshal_json_response(models.Client, http_res) if utils.match_response(http_res, ["400", "401", "404"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -513,7 +513,7 @@ async def get_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.Client]: + ) -> models.Client: r"""Get a client Returns the details of a client. @@ -581,7 +581,7 @@ async def get_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.Client], http_res) + return unmarshal_json_response(models.Client, http_res) if utils.match_response(http_res, ["400", "401", "404"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) diff --git a/src/clerk_backend_api/commerce.py b/src/clerk_backend_api/commerce.py deleted file mode 100644 index 5e6bafb5..00000000 --- a/src/clerk_backend_api/commerce.py +++ /dev/null @@ -1,668 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from .basesdk import BaseSDK -from clerk_backend_api import models, utils -from clerk_backend_api._hooks import HookContext -from clerk_backend_api.types import OptionalNullable, UNSET -from clerk_backend_api.utils.unmarshal_json_response import unmarshal_json_response -from typing import Any, Mapping, Optional - - -class Commerce(BaseSDK): - def list_plans( - self, - *, - paginated: Optional[bool] = None, - limit: Optional[int] = 10, - offset: Optional[int] = 0, - payer_type: Optional[models.PayerType] = None, - retries: OptionalNullable[utils.RetryConfig] = UNSET, - server_url: Optional[str] = None, - timeout_ms: Optional[int] = None, - http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.PaginatedCommercePlanResponse]: - r"""List all commerce plans - - Returns a list of all commerce plans for the instance. The plans are returned sorted by creation date, - with the newest plans appearing first. This includes both free and paid plans. Pagination is supported. - - :param paginated: Whether to paginate the results. - If true, the results will be paginated. - If false, the results will not be paginated. - :param limit: Applies a limit to the number of results returned. - Can be used for paginating the results together with `offset`. - :param offset: Skip the first `offset` results when paginating. - Needs to be an integer greater or equal to zero. - To be used in conjunction with `limit`. - :param payer_type: Filter plans by payer type - :param retries: Override the default retry configuration for this method - :param server_url: Override the default server URL for this method - :param timeout_ms: Override the default request timeout configuration for this method in milliseconds - :param http_headers: Additional headers to set or replace on requests. - """ - base_url = None - url_variables = None - if timeout_ms is None: - timeout_ms = self.sdk_configuration.timeout_ms - - if server_url is not None: - base_url = server_url - else: - base_url = self._get_url(base_url, url_variables) - - request = models.GetCommercePlanListRequest( - paginated=paginated, - limit=limit, - offset=offset, - payer_type=payer_type, - ) - - req = self._build_request( - method="GET", - path="/commerce/plans", - base_url=base_url, - url_variables=url_variables, - request=request, - request_body_required=False, - request_has_path_params=False, - request_has_query_params=True, - user_agent_header="user-agent", - accept_header_value="application/json", - http_headers=http_headers, - security=self.sdk_configuration.security, - timeout_ms=timeout_ms, - ) - - if retries == UNSET: - if self.sdk_configuration.retry_config is not UNSET: - retries = self.sdk_configuration.retry_config - else: - retries = utils.RetryConfig( - "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True - ) - - retry_config = None - if isinstance(retries, utils.RetryConfig): - retry_config = (retries, ["5XX"]) - - http_res = self.do_request( - hook_ctx=HookContext( - config=self.sdk_configuration, - base_url=base_url or "", - operation_id="GetCommercePlanList", - oauth2_scopes=None, - security_source=self.sdk_configuration.security, - ), - request=req, - error_status_codes=["400", "401", "422", "4XX", "500", "5XX"], - retry_config=retry_config, - ) - - response_data: Any = None - if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.PaginatedCommercePlanResponse], http_res - ) - if utils.match_response(http_res, ["400", "401", "422"], "application/json"): - response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) - raise models.ClerkErrors(response_data, http_res) - if utils.match_response(http_res, "500", "application/json"): - response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) - raise models.ClerkErrors(response_data, http_res) - if utils.match_response(http_res, "4XX", "*"): - http_res_text = utils.stream_to_text(http_res) - raise models.SDKError("API error occurred", http_res, http_res_text) - if utils.match_response(http_res, "5XX", "*"): - http_res_text = utils.stream_to_text(http_res) - raise models.SDKError("API error occurred", http_res, http_res_text) - - raise models.SDKError("Unexpected response received", http_res) - - async def list_plans_async( - self, - *, - paginated: Optional[bool] = None, - limit: Optional[int] = 10, - offset: Optional[int] = 0, - payer_type: Optional[models.PayerType] = None, - retries: OptionalNullable[utils.RetryConfig] = UNSET, - server_url: Optional[str] = None, - timeout_ms: Optional[int] = None, - http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.PaginatedCommercePlanResponse]: - r"""List all commerce plans - - Returns a list of all commerce plans for the instance. The plans are returned sorted by creation date, - with the newest plans appearing first. This includes both free and paid plans. Pagination is supported. - - :param paginated: Whether to paginate the results. - If true, the results will be paginated. - If false, the results will not be paginated. - :param limit: Applies a limit to the number of results returned. - Can be used for paginating the results together with `offset`. - :param offset: Skip the first `offset` results when paginating. - Needs to be an integer greater or equal to zero. - To be used in conjunction with `limit`. - :param payer_type: Filter plans by payer type - :param retries: Override the default retry configuration for this method - :param server_url: Override the default server URL for this method - :param timeout_ms: Override the default request timeout configuration for this method in milliseconds - :param http_headers: Additional headers to set or replace on requests. - """ - base_url = None - url_variables = None - if timeout_ms is None: - timeout_ms = self.sdk_configuration.timeout_ms - - if server_url is not None: - base_url = server_url - else: - base_url = self._get_url(base_url, url_variables) - - request = models.GetCommercePlanListRequest( - paginated=paginated, - limit=limit, - offset=offset, - payer_type=payer_type, - ) - - req = self._build_request_async( - method="GET", - path="/commerce/plans", - base_url=base_url, - url_variables=url_variables, - request=request, - request_body_required=False, - request_has_path_params=False, - request_has_query_params=True, - user_agent_header="user-agent", - accept_header_value="application/json", - http_headers=http_headers, - security=self.sdk_configuration.security, - timeout_ms=timeout_ms, - ) - - if retries == UNSET: - if self.sdk_configuration.retry_config is not UNSET: - retries = self.sdk_configuration.retry_config - else: - retries = utils.RetryConfig( - "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True - ) - - retry_config = None - if isinstance(retries, utils.RetryConfig): - retry_config = (retries, ["5XX"]) - - http_res = await self.do_request_async( - hook_ctx=HookContext( - config=self.sdk_configuration, - base_url=base_url or "", - operation_id="GetCommercePlanList", - oauth2_scopes=None, - security_source=self.sdk_configuration.security, - ), - request=req, - error_status_codes=["400", "401", "422", "4XX", "500", "5XX"], - retry_config=retry_config, - ) - - response_data: Any = None - if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.PaginatedCommercePlanResponse], http_res - ) - if utils.match_response(http_res, ["400", "401", "422"], "application/json"): - response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) - raise models.ClerkErrors(response_data, http_res) - if utils.match_response(http_res, "500", "application/json"): - response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) - raise models.ClerkErrors(response_data, http_res) - if utils.match_response(http_res, "4XX", "*"): - http_res_text = await utils.stream_to_text_async(http_res) - raise models.SDKError("API error occurred", http_res, http_res_text) - if utils.match_response(http_res, "5XX", "*"): - http_res_text = await utils.stream_to_text_async(http_res) - raise models.SDKError("API error occurred", http_res, http_res_text) - - raise models.SDKError("Unexpected response received", http_res) - - def list_subscription_items( - self, - *, - paginated: Optional[bool] = None, - limit: Optional[int] = 10, - offset: Optional[int] = 0, - status: Optional[models.GetCommerceSubscriptionItemListQueryParamStatus] = None, - payer_type: Optional[models.QueryParamPayerType] = None, - plan_id: Optional[str] = None, - include_free: Optional[bool] = False, - query: Optional[str] = None, - retries: OptionalNullable[utils.RetryConfig] = UNSET, - server_url: Optional[str] = None, - timeout_ms: Optional[int] = None, - http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.PaginatedCommerceSubscriptionItemResponse]: - r"""List all subscription items - - Returns a list of all subscription items for the instance. The subscription items are returned sorted by creation date, - with the newest appearing first. This includes subscriptions for both users and organizations. Pagination is supported. - - :param paginated: Whether to paginate the results. - If true, the results will be paginated. - If false, the results will not be paginated. - :param limit: Applies a limit to the number of results returned. - Can be used for paginating the results together with `offset`. - :param offset: Skip the first `offset` results when paginating. - Needs to be an integer greater or equal to zero. - To be used in conjunction with `limit`. - :param status: Filter subscription items by status - :param payer_type: Filter subscription items by payer type - :param plan_id: Filter subscription items by plan ID - :param include_free: Whether to include free plan subscription items - :param query: Search query to filter subscription items - :param retries: Override the default retry configuration for this method - :param server_url: Override the default server URL for this method - :param timeout_ms: Override the default request timeout configuration for this method in milliseconds - :param http_headers: Additional headers to set or replace on requests. - """ - base_url = None - url_variables = None - if timeout_ms is None: - timeout_ms = self.sdk_configuration.timeout_ms - - if server_url is not None: - base_url = server_url - else: - base_url = self._get_url(base_url, url_variables) - - request = models.GetCommerceSubscriptionItemListRequest( - paginated=paginated, - limit=limit, - offset=offset, - status=status, - payer_type=payer_type, - plan_id=plan_id, - include_free=include_free, - query=query, - ) - - req = self._build_request( - method="GET", - path="/commerce/subscription_items", - base_url=base_url, - url_variables=url_variables, - request=request, - request_body_required=False, - request_has_path_params=False, - request_has_query_params=True, - user_agent_header="user-agent", - accept_header_value="application/json", - http_headers=http_headers, - security=self.sdk_configuration.security, - timeout_ms=timeout_ms, - ) - - if retries == UNSET: - if self.sdk_configuration.retry_config is not UNSET: - retries = self.sdk_configuration.retry_config - else: - retries = utils.RetryConfig( - "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True - ) - - retry_config = None - if isinstance(retries, utils.RetryConfig): - retry_config = (retries, ["5XX"]) - - http_res = self.do_request( - hook_ctx=HookContext( - config=self.sdk_configuration, - base_url=base_url or "", - operation_id="GetCommerceSubscriptionItemList", - oauth2_scopes=None, - security_source=self.sdk_configuration.security, - ), - request=req, - error_status_codes=["400", "401", "422", "4XX", "500", "5XX"], - retry_config=retry_config, - ) - - response_data: Any = None - if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.PaginatedCommerceSubscriptionItemResponse], http_res - ) - if utils.match_response(http_res, ["400", "401", "422"], "application/json"): - response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) - raise models.ClerkErrors(response_data, http_res) - if utils.match_response(http_res, "500", "application/json"): - response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) - raise models.ClerkErrors(response_data, http_res) - if utils.match_response(http_res, "4XX", "*"): - http_res_text = utils.stream_to_text(http_res) - raise models.SDKError("API error occurred", http_res, http_res_text) - if utils.match_response(http_res, "5XX", "*"): - http_res_text = utils.stream_to_text(http_res) - raise models.SDKError("API error occurred", http_res, http_res_text) - - raise models.SDKError("Unexpected response received", http_res) - - async def list_subscription_items_async( - self, - *, - paginated: Optional[bool] = None, - limit: Optional[int] = 10, - offset: Optional[int] = 0, - status: Optional[models.GetCommerceSubscriptionItemListQueryParamStatus] = None, - payer_type: Optional[models.QueryParamPayerType] = None, - plan_id: Optional[str] = None, - include_free: Optional[bool] = False, - query: Optional[str] = None, - retries: OptionalNullable[utils.RetryConfig] = UNSET, - server_url: Optional[str] = None, - timeout_ms: Optional[int] = None, - http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.PaginatedCommerceSubscriptionItemResponse]: - r"""List all subscription items - - Returns a list of all subscription items for the instance. The subscription items are returned sorted by creation date, - with the newest appearing first. This includes subscriptions for both users and organizations. Pagination is supported. - - :param paginated: Whether to paginate the results. - If true, the results will be paginated. - If false, the results will not be paginated. - :param limit: Applies a limit to the number of results returned. - Can be used for paginating the results together with `offset`. - :param offset: Skip the first `offset` results when paginating. - Needs to be an integer greater or equal to zero. - To be used in conjunction with `limit`. - :param status: Filter subscription items by status - :param payer_type: Filter subscription items by payer type - :param plan_id: Filter subscription items by plan ID - :param include_free: Whether to include free plan subscription items - :param query: Search query to filter subscription items - :param retries: Override the default retry configuration for this method - :param server_url: Override the default server URL for this method - :param timeout_ms: Override the default request timeout configuration for this method in milliseconds - :param http_headers: Additional headers to set or replace on requests. - """ - base_url = None - url_variables = None - if timeout_ms is None: - timeout_ms = self.sdk_configuration.timeout_ms - - if server_url is not None: - base_url = server_url - else: - base_url = self._get_url(base_url, url_variables) - - request = models.GetCommerceSubscriptionItemListRequest( - paginated=paginated, - limit=limit, - offset=offset, - status=status, - payer_type=payer_type, - plan_id=plan_id, - include_free=include_free, - query=query, - ) - - req = self._build_request_async( - method="GET", - path="/commerce/subscription_items", - base_url=base_url, - url_variables=url_variables, - request=request, - request_body_required=False, - request_has_path_params=False, - request_has_query_params=True, - user_agent_header="user-agent", - accept_header_value="application/json", - http_headers=http_headers, - security=self.sdk_configuration.security, - timeout_ms=timeout_ms, - ) - - if retries == UNSET: - if self.sdk_configuration.retry_config is not UNSET: - retries = self.sdk_configuration.retry_config - else: - retries = utils.RetryConfig( - "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True - ) - - retry_config = None - if isinstance(retries, utils.RetryConfig): - retry_config = (retries, ["5XX"]) - - http_res = await self.do_request_async( - hook_ctx=HookContext( - config=self.sdk_configuration, - base_url=base_url or "", - operation_id="GetCommerceSubscriptionItemList", - oauth2_scopes=None, - security_source=self.sdk_configuration.security, - ), - request=req, - error_status_codes=["400", "401", "422", "4XX", "500", "5XX"], - retry_config=retry_config, - ) - - response_data: Any = None - if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.PaginatedCommerceSubscriptionItemResponse], http_res - ) - if utils.match_response(http_res, ["400", "401", "422"], "application/json"): - response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) - raise models.ClerkErrors(response_data, http_res) - if utils.match_response(http_res, "500", "application/json"): - response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) - raise models.ClerkErrors(response_data, http_res) - if utils.match_response(http_res, "4XX", "*"): - http_res_text = await utils.stream_to_text_async(http_res) - raise models.SDKError("API error occurred", http_res, http_res_text) - if utils.match_response(http_res, "5XX", "*"): - http_res_text = await utils.stream_to_text_async(http_res) - raise models.SDKError("API error occurred", http_res, http_res_text) - - raise models.SDKError("Unexpected response received", http_res) - - def cancel_subscription_item( - self, - *, - subscription_item_id: str, - end_now: Optional[bool] = False, - retries: OptionalNullable[utils.RetryConfig] = UNSET, - server_url: Optional[str] = None, - timeout_ms: Optional[int] = None, - http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.CommerceSubscriptionItem]: - r"""Cancel a subscription item - - Cancel a specific subscription item. The subscription item can be canceled immediately or at the end of the current billing period. - - :param subscription_item_id: The ID of the subscription item to cancel - :param end_now: Whether to cancel the subscription immediately (true) or at the end of the current billing period (false, default) - :param retries: Override the default retry configuration for this method - :param server_url: Override the default server URL for this method - :param timeout_ms: Override the default request timeout configuration for this method in milliseconds - :param http_headers: Additional headers to set or replace on requests. - """ - base_url = None - url_variables = None - if timeout_ms is None: - timeout_ms = self.sdk_configuration.timeout_ms - - if server_url is not None: - base_url = server_url - else: - base_url = self._get_url(base_url, url_variables) - - request = models.CancelCommerceSubscriptionItemRequest( - subscription_item_id=subscription_item_id, - end_now=end_now, - ) - - req = self._build_request( - method="DELETE", - path="/commerce/subscription_items/{subscription_item_id}", - base_url=base_url, - url_variables=url_variables, - request=request, - request_body_required=False, - request_has_path_params=True, - request_has_query_params=True, - user_agent_header="user-agent", - accept_header_value="application/json", - http_headers=http_headers, - security=self.sdk_configuration.security, - timeout_ms=timeout_ms, - ) - - if retries == UNSET: - if self.sdk_configuration.retry_config is not UNSET: - retries = self.sdk_configuration.retry_config - else: - retries = utils.RetryConfig( - "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True - ) - - retry_config = None - if isinstance(retries, utils.RetryConfig): - retry_config = (retries, ["5XX"]) - - http_res = self.do_request( - hook_ctx=HookContext( - config=self.sdk_configuration, - base_url=base_url or "", - operation_id="CancelCommerceSubscriptionItem", - oauth2_scopes=None, - security_source=self.sdk_configuration.security, - ), - request=req, - error_status_codes=["400", "401", "403", "404", "422", "4XX", "500", "5XX"], - retry_config=retry_config, - ) - - response_data: Any = None - if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.CommerceSubscriptionItem], http_res - ) - if utils.match_response( - http_res, ["400", "401", "403", "404", "422"], "application/json" - ): - response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) - raise models.ClerkErrors(response_data, http_res) - if utils.match_response(http_res, "500", "application/json"): - response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) - raise models.ClerkErrors(response_data, http_res) - if utils.match_response(http_res, "4XX", "*"): - http_res_text = utils.stream_to_text(http_res) - raise models.SDKError("API error occurred", http_res, http_res_text) - if utils.match_response(http_res, "5XX", "*"): - http_res_text = utils.stream_to_text(http_res) - raise models.SDKError("API error occurred", http_res, http_res_text) - - raise models.SDKError("Unexpected response received", http_res) - - async def cancel_subscription_item_async( - self, - *, - subscription_item_id: str, - end_now: Optional[bool] = False, - retries: OptionalNullable[utils.RetryConfig] = UNSET, - server_url: Optional[str] = None, - timeout_ms: Optional[int] = None, - http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.CommerceSubscriptionItem]: - r"""Cancel a subscription item - - Cancel a specific subscription item. The subscription item can be canceled immediately or at the end of the current billing period. - - :param subscription_item_id: The ID of the subscription item to cancel - :param end_now: Whether to cancel the subscription immediately (true) or at the end of the current billing period (false, default) - :param retries: Override the default retry configuration for this method - :param server_url: Override the default server URL for this method - :param timeout_ms: Override the default request timeout configuration for this method in milliseconds - :param http_headers: Additional headers to set or replace on requests. - """ - base_url = None - url_variables = None - if timeout_ms is None: - timeout_ms = self.sdk_configuration.timeout_ms - - if server_url is not None: - base_url = server_url - else: - base_url = self._get_url(base_url, url_variables) - - request = models.CancelCommerceSubscriptionItemRequest( - subscription_item_id=subscription_item_id, - end_now=end_now, - ) - - req = self._build_request_async( - method="DELETE", - path="/commerce/subscription_items/{subscription_item_id}", - base_url=base_url, - url_variables=url_variables, - request=request, - request_body_required=False, - request_has_path_params=True, - request_has_query_params=True, - user_agent_header="user-agent", - accept_header_value="application/json", - http_headers=http_headers, - security=self.sdk_configuration.security, - timeout_ms=timeout_ms, - ) - - if retries == UNSET: - if self.sdk_configuration.retry_config is not UNSET: - retries = self.sdk_configuration.retry_config - else: - retries = utils.RetryConfig( - "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True - ) - - retry_config = None - if isinstance(retries, utils.RetryConfig): - retry_config = (retries, ["5XX"]) - - http_res = await self.do_request_async( - hook_ctx=HookContext( - config=self.sdk_configuration, - base_url=base_url or "", - operation_id="CancelCommerceSubscriptionItem", - oauth2_scopes=None, - security_source=self.sdk_configuration.security, - ), - request=req, - error_status_codes=["400", "401", "403", "404", "422", "4XX", "500", "5XX"], - retry_config=retry_config, - ) - - response_data: Any = None - if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.CommerceSubscriptionItem], http_res - ) - if utils.match_response( - http_res, ["400", "401", "403", "404", "422"], "application/json" - ): - response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) - raise models.ClerkErrors(response_data, http_res) - if utils.match_response(http_res, "500", "application/json"): - response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) - raise models.ClerkErrors(response_data, http_res) - if utils.match_response(http_res, "4XX", "*"): - http_res_text = await utils.stream_to_text_async(http_res) - raise models.SDKError("API error occurred", http_res, http_res_text) - if utils.match_response(http_res, "5XX", "*"): - http_res_text = await utils.stream_to_text_async(http_res) - raise models.SDKError("API error occurred", http_res, http_res_text) - - raise models.SDKError("Unexpected response received", http_res) diff --git a/src/clerk_backend_api/domains_sdk.py b/src/clerk_backend_api/domains_sdk.py index f2431ce1..5f6dcc71 100644 --- a/src/clerk_backend_api/domains_sdk.py +++ b/src/clerk_backend_api/domains_sdk.py @@ -16,7 +16,7 @@ def list( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.Domains]: + ) -> models.Domains: r"""List all instance domains Use this endpoint to get a list of all domains for an instance. @@ -78,7 +78,7 @@ def list( ) if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.Domains], http_res) + return unmarshal_json_response(models.Domains, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) raise models.SDKError("API error occurred", http_res, http_res_text) @@ -95,7 +95,7 @@ async def list_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.Domains]: + ) -> models.Domains: r"""List all instance domains Use this endpoint to get a list of all domains for an instance. @@ -157,7 +157,7 @@ async def list_async( ) if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.Domains], http_res) + return unmarshal_json_response(models.Domains, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise models.SDKError("API error occurred", http_res, http_res_text) @@ -177,7 +177,7 @@ def add( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.Domain]: + ) -> models.Domain: r"""Add a domain Add a new domain for your instance. @@ -252,7 +252,7 @@ def add( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.Domain], http_res) + return unmarshal_json_response(models.Domain, http_res) if utils.match_response(http_res, ["400", "402", "422"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -275,7 +275,7 @@ async def add_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.Domain]: + ) -> models.Domain: r"""Add a domain Add a new domain for your instance. @@ -350,7 +350,7 @@ async def add_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.Domain], http_res) + return unmarshal_json_response(models.Domain, http_res) if utils.match_response(http_res, ["400", "402", "422"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -371,7 +371,7 @@ def delete( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.DeletedObject]: + ) -> models.DeletedObject: r"""Delete a satellite domain Deletes a satellite domain for the instance. @@ -440,7 +440,7 @@ def delete( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.DeletedObject], http_res) + return unmarshal_json_response(models.DeletedObject, http_res) if utils.match_response(http_res, ["403", "404"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -461,7 +461,7 @@ async def delete_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.DeletedObject]: + ) -> models.DeletedObject: r"""Delete a satellite domain Deletes a satellite domain for the instance. @@ -530,7 +530,7 @@ async def delete_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.DeletedObject], http_res) + return unmarshal_json_response(models.DeletedObject, http_res) if utils.match_response(http_res, ["403", "404"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -554,7 +554,7 @@ def update( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.Domain]: + ) -> models.Domain: r"""Update a domain The `proxy_url` can be updated only for production instances. @@ -649,7 +649,7 @@ def update( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.Domain], http_res) + return unmarshal_json_response(models.Domain, http_res) if utils.match_response(http_res, ["400", "404", "422"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -673,7 +673,7 @@ async def update_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.Domain]: + ) -> models.Domain: r"""Update a domain The `proxy_url` can be updated only for production instances. @@ -768,7 +768,7 @@ async def update_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.Domain], http_res) + return unmarshal_json_response(models.Domain, http_res) if utils.match_response(http_res, ["400", "404", "422"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) diff --git a/src/clerk_backend_api/emailaddresses.py b/src/clerk_backend_api/emailaddresses.py index 8362095b..ea765fd0 100644 --- a/src/clerk_backend_api/emailaddresses.py +++ b/src/clerk_backend_api/emailaddresses.py @@ -22,7 +22,7 @@ def create( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.EmailAddress]: + ) -> models.EmailAddress: r"""Create an email address Create a new email address @@ -99,7 +99,7 @@ def create( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.EmailAddress], http_res) + return unmarshal_json_response(models.EmailAddress, http_res) if utils.match_response( http_res, ["400", "401", "403", "404", "422"], "application/json" ): @@ -127,7 +127,7 @@ async def create_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.EmailAddress]: + ) -> models.EmailAddress: r"""Create an email address Create a new email address @@ -204,7 +204,7 @@ async def create_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.EmailAddress], http_res) + return unmarshal_json_response(models.EmailAddress, http_res) if utils.match_response( http_res, ["400", "401", "403", "404", "422"], "application/json" ): @@ -227,7 +227,7 @@ def get( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.EmailAddress]: + ) -> models.EmailAddress: r"""Retrieve an email address Returns the details of an email address. @@ -295,7 +295,7 @@ def get( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.EmailAddress], http_res) + return unmarshal_json_response(models.EmailAddress, http_res) if utils.match_response( http_res, ["400", "401", "403", "404"], "application/json" ): @@ -318,7 +318,7 @@ async def get_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.EmailAddress]: + ) -> models.EmailAddress: r"""Retrieve an email address Returns the details of an email address. @@ -386,7 +386,7 @@ async def get_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.EmailAddress], http_res) + return unmarshal_json_response(models.EmailAddress, http_res) if utils.match_response( http_res, ["400", "401", "403", "404"], "application/json" ): @@ -409,7 +409,7 @@ def delete( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.DeletedObject]: + ) -> models.DeletedObject: r"""Delete an email address Delete the email address with the given ID @@ -477,7 +477,7 @@ def delete( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.DeletedObject], http_res) + return unmarshal_json_response(models.DeletedObject, http_res) if utils.match_response( http_res, ["400", "401", "403", "404"], "application/json" ): @@ -500,7 +500,7 @@ async def delete_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.DeletedObject]: + ) -> models.DeletedObject: r"""Delete an email address Delete the email address with the given ID @@ -568,7 +568,7 @@ async def delete_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.DeletedObject], http_res) + return unmarshal_json_response(models.DeletedObject, http_res) if utils.match_response( http_res, ["400", "401", "403", "404"], "application/json" ): @@ -593,7 +593,7 @@ def update( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.EmailAddress]: + ) -> models.EmailAddress: r"""Update an email address Updates an email address. @@ -674,7 +674,7 @@ def update( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.EmailAddress], http_res) + return unmarshal_json_response(models.EmailAddress, http_res) if utils.match_response( http_res, ["400", "401", "403", "404"], "application/json" ): @@ -699,7 +699,7 @@ async def update_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.EmailAddress]: + ) -> models.EmailAddress: r"""Update an email address Updates an email address. @@ -780,7 +780,7 @@ async def update_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.EmailAddress], http_res) + return unmarshal_json_response(models.EmailAddress, http_res) if utils.match_response( http_res, ["400", "401", "403", "404"], "application/json" ): diff --git a/src/clerk_backend_api/emailandsmstemplates.py b/src/clerk_backend_api/emailandsmstemplates.py index dca14582..2a9f6178 100644 --- a/src/clerk_backend_api/emailandsmstemplates.py +++ b/src/clerk_backend_api/emailandsmstemplates.py @@ -29,7 +29,7 @@ def upsert( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.Template]: + ) -> models.Template: r"""Update a template for a given type and slug Updates the existing template of the given type and slug @@ -127,7 +127,7 @@ def upsert( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.Template], http_res) + return unmarshal_json_response(models.Template, http_res) if utils.match_response( http_res, ["400", "401", "402", "403", "404", "422"], "application/json" ): @@ -161,7 +161,7 @@ async def upsert_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.Template]: + ) -> models.Template: r"""Update a template for a given type and slug Updates the existing template of the given type and slug @@ -259,7 +259,7 @@ async def upsert_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.Template], http_res) + return unmarshal_json_response(models.Template, http_res) if utils.match_response( http_res, ["400", "401", "402", "403", "404", "422"], "application/json" ): diff --git a/src/clerk_backend_api/emailsmstemplates.py b/src/clerk_backend_api/emailsmstemplates.py index 497829a6..f92cd323 100644 --- a/src/clerk_backend_api/emailsmstemplates.py +++ b/src/clerk_backend_api/emailsmstemplates.py @@ -24,7 +24,7 @@ def list( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[List[models.Template]]: + ) -> List[models.Template]: r"""List all templates Returns a list of all templates. @@ -104,7 +104,7 @@ def list( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[List[models.Template]], http_res) + return unmarshal_json_response(List[models.Template], http_res) if utils.match_response(http_res, ["400", "401", "422"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -131,7 +131,7 @@ async def list_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[List[models.Template]]: + ) -> List[models.Template]: r"""List all templates Returns a list of all templates. @@ -211,7 +211,7 @@ async def list_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[List[models.Template]], http_res) + return unmarshal_json_response(List[models.Template], http_res) if utils.match_response(http_res, ["400", "401", "422"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -236,7 +236,7 @@ def get( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.Template]: + ) -> models.Template: r"""Retrieve a template Returns the details of a template @@ -306,7 +306,7 @@ def get( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.Template], http_res) + return unmarshal_json_response(models.Template, http_res) if utils.match_response(http_res, ["400", "401", "404"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -331,7 +331,7 @@ async def get_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.Template]: + ) -> models.Template: r"""Retrieve a template Returns the details of a template @@ -401,7 +401,7 @@ async def get_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.Template], http_res) + return unmarshal_json_response(models.Template, http_res) if utils.match_response(http_res, ["400", "401", "404"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -426,7 +426,7 @@ def revert( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.Template]: + ) -> models.Template: r"""Revert a template Reverts an updated template to its default state @@ -496,7 +496,7 @@ def revert( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.Template], http_res) + return unmarshal_json_response(models.Template, http_res) if utils.match_response( http_res, ["400", "401", "402", "404"], "application/json" ): @@ -523,7 +523,7 @@ async def revert_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.Template]: + ) -> models.Template: r"""Revert a template Reverts an updated template to its default state @@ -593,7 +593,7 @@ async def revert_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.Template], http_res) + return unmarshal_json_response(models.Template, http_res) if utils.match_response( http_res, ["400", "401", "402", "404"], "application/json" ): @@ -621,7 +621,7 @@ def toggle_template_delivery( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.Template]: + ) -> models.Template: r"""Toggle the delivery by Clerk for a template of a given type and slug Toggles the delivery by Clerk for a template of a given type and slug. @@ -704,7 +704,7 @@ def toggle_template_delivery( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.Template], http_res) + return unmarshal_json_response(models.Template, http_res) if utils.match_response(http_res, ["400", "401", "404"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -730,7 +730,7 @@ async def toggle_template_delivery_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.Template]: + ) -> models.Template: r"""Toggle the delivery by Clerk for a template of a given type and slug Toggles the delivery by Clerk for a template of a given type and slug. @@ -813,7 +813,7 @@ async def toggle_template_delivery_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.Template], http_res) + return unmarshal_json_response(models.Template, http_res) if utils.match_response(http_res, ["400", "401", "404"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) diff --git a/src/clerk_backend_api/instancesettings_sdk.py b/src/clerk_backend_api/instancesettings_sdk.py index 39f859a2..b54812f5 100644 --- a/src/clerk_backend_api/instancesettings_sdk.py +++ b/src/clerk_backend_api/instancesettings_sdk.py @@ -16,7 +16,7 @@ def get( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.Instance]: + ) -> models.Instance: r"""Fetch the current instance Fetches the current instance @@ -77,7 +77,7 @@ def get( ) if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.Instance], http_res) + return unmarshal_json_response(models.Instance, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) raise models.SDKError("API error occurred", http_res, http_res_text) @@ -94,7 +94,7 @@ async def get_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.Instance]: + ) -> models.Instance: r"""Fetch the current instance Fetches the current instance @@ -155,7 +155,7 @@ async def get_async( ) if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.Instance], http_res) + return unmarshal_json_response(models.Instance, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise models.SDKError("API error occurred", http_res, http_res_text) @@ -376,7 +376,7 @@ def update_restrictions( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.InstanceRestrictions]: + ) -> models.InstanceRestrictions: r"""Update instance restrictions Updates the restriction settings of an instance @@ -453,9 +453,7 @@ def update_restrictions( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.InstanceRestrictions], http_res - ) + return unmarshal_json_response(models.InstanceRestrictions, http_res) if utils.match_response(http_res, ["402", "422"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -481,7 +479,7 @@ async def update_restrictions_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.InstanceRestrictions]: + ) -> models.InstanceRestrictions: r"""Update instance restrictions Updates the restriction settings of an instance @@ -558,9 +556,7 @@ async def update_restrictions_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.InstanceRestrictions], http_res - ) + return unmarshal_json_response(models.InstanceRestrictions, http_res) if utils.match_response(http_res, ["402", "422"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -804,7 +800,7 @@ def update_organization_settings( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.OrganizationSettings]: + ) -> models.OrganizationSettings: r"""Update instance organization settings Updates the organization settings of the instance @@ -883,9 +879,7 @@ def update_organization_settings( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.OrganizationSettings], http_res - ) + return unmarshal_json_response(models.OrganizationSettings, http_res) if utils.match_response( http_res, ["400", "402", "404", "422"], "application/json" ): @@ -913,7 +907,7 @@ async def update_organization_settings_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.OrganizationSettings]: + ) -> models.OrganizationSettings: r"""Update instance organization settings Updates the organization settings of the instance @@ -992,9 +986,7 @@ async def update_organization_settings_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.OrganizationSettings], http_res - ) + return unmarshal_json_response(models.OrganizationSettings, http_res) if utils.match_response( http_res, ["400", "402", "404", "422"], "application/json" ): diff --git a/src/clerk_backend_api/invitations.py b/src/clerk_backend_api/invitations.py index 2f8a922a..63236606 100644 --- a/src/clerk_backend_api/invitations.py +++ b/src/clerk_backend_api/invitations.py @@ -22,7 +22,7 @@ def create( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.Invitation]: + ) -> models.Invitation: r"""Create an invitation Creates a new invitation for the given email address and sends the invitation email. @@ -101,7 +101,7 @@ def create( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.Invitation], http_res) + return unmarshal_json_response(models.Invitation, http_res) if utils.match_response(http_res, ["400", "422"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -127,7 +127,7 @@ async def create_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.Invitation]: + ) -> models.Invitation: r"""Create an invitation Creates a new invitation for the given email address and sends the invitation email. @@ -206,7 +206,7 @@ async def create_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.Invitation], http_res) + return unmarshal_json_response(models.Invitation, http_res) if utils.match_response(http_res, ["400", "422"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -232,7 +232,7 @@ def list( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[List[models.Invitation]]: + ) -> List[models.Invitation]: r"""List all invitations Returns all non-revoked invitations for your application, sorted by creation date @@ -319,7 +319,7 @@ def list( ) if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[List[models.Invitation]], http_res) + return unmarshal_json_response(List[models.Invitation], http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) raise models.SDKError("API error occurred", http_res, http_res_text) @@ -342,7 +342,7 @@ async def list_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[List[models.Invitation]]: + ) -> List[models.Invitation]: r"""List all invitations Returns all non-revoked invitations for your application, sorted by creation date @@ -429,7 +429,7 @@ async def list_async( ) if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[List[models.Invitation]], http_res) + return unmarshal_json_response(List[models.Invitation], http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise models.SDKError("API error occurred", http_res, http_res_text) @@ -449,7 +449,7 @@ def bulk_create( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[List[models.Invitation]]: + ) -> List[models.Invitation]: r"""Create multiple invitations Use this API operation to create multiple invitations for the provided email addresses. You can choose to send the @@ -457,6 +457,8 @@ def bulk_create( of the email addresses you provide unless you set `ignore_existing` to `true` for specific email addresses. Please note that there must be no existing user for any of the email addresses you provide, and this rule cannot be bypassed. + This endpoint is limited to a maximum of 10 invitations per API call. If you need to send more invitations, please make multiple requests. + :param request: The request object to send. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -523,7 +525,7 @@ def bulk_create( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[List[models.Invitation]], http_res) + return unmarshal_json_response(List[models.Invitation], http_res) if utils.match_response(http_res, ["400", "422"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -546,7 +548,7 @@ async def bulk_create_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[List[models.Invitation]]: + ) -> List[models.Invitation]: r"""Create multiple invitations Use this API operation to create multiple invitations for the provided email addresses. You can choose to send the @@ -554,6 +556,8 @@ async def bulk_create_async( of the email addresses you provide unless you set `ignore_existing` to `true` for specific email addresses. Please note that there must be no existing user for any of the email addresses you provide, and this rule cannot be bypassed. + This endpoint is limited to a maximum of 10 invitations per API call. If you need to send more invitations, please make multiple requests. + :param request: The request object to send. :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -620,7 +624,7 @@ async def bulk_create_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[List[models.Invitation]], http_res) + return unmarshal_json_response(List[models.Invitation], http_res) if utils.match_response(http_res, ["400", "422"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -641,7 +645,7 @@ def revoke( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.InvitationRevoked]: + ) -> models.InvitationRevoked: r"""Revokes an invitation Revokes the given invitation. @@ -712,7 +716,7 @@ def revoke( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.InvitationRevoked], http_res) + return unmarshal_json_response(models.InvitationRevoked, http_res) if utils.match_response(http_res, ["400", "404"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -733,7 +737,7 @@ async def revoke_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.InvitationRevoked]: + ) -> models.InvitationRevoked: r"""Revokes an invitation Revokes the given invitation. @@ -804,7 +808,7 @@ async def revoke_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.InvitationRevoked], http_res) + return unmarshal_json_response(models.InvitationRevoked, http_res) if utils.match_response(http_res, ["400", "404"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) diff --git a/src/clerk_backend_api/jwks_sdk.py b/src/clerk_backend_api/jwks_sdk.py index 79affe07..60c54a71 100644 --- a/src/clerk_backend_api/jwks_sdk.py +++ b/src/clerk_backend_api/jwks_sdk.py @@ -16,7 +16,7 @@ def get_jwks( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.Jwks]: + ) -> models.Jwks: r"""Retrieve the JSON Web Key Set of the instance Retrieve the JSON Web Key Set of the instance @@ -77,7 +77,7 @@ def get_jwks( ) if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.Jwks], http_res) + return unmarshal_json_response(models.Jwks, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) raise models.SDKError("API error occurred", http_res, http_res_text) @@ -94,7 +94,7 @@ async def get_jwks_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.Jwks]: + ) -> models.Jwks: r"""Retrieve the JSON Web Key Set of the instance Retrieve the JSON Web Key Set of the instance @@ -155,7 +155,7 @@ async def get_jwks_async( ) if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.Jwks], http_res) + return unmarshal_json_response(models.Jwks, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise models.SDKError("API error occurred", http_res, http_res_text) diff --git a/src/clerk_backend_api/jwttemplates.py b/src/clerk_backend_api/jwttemplates.py index e4eb08b7..91c683e3 100644 --- a/src/clerk_backend_api/jwttemplates.py +++ b/src/clerk_backend_api/jwttemplates.py @@ -19,7 +19,7 @@ def list( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[List[models.JWTTemplate]]: + ) -> List[models.JWTTemplate]: r"""List all templates :param paginated: Whether to paginate the results. @@ -93,7 +93,7 @@ def list( ) if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[List[models.JWTTemplate]], http_res) + return unmarshal_json_response(List[models.JWTTemplate], http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) raise models.SDKError("API error occurred", http_res, http_res_text) @@ -113,7 +113,7 @@ async def list_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[List[models.JWTTemplate]]: + ) -> List[models.JWTTemplate]: r"""List all templates :param paginated: Whether to paginate the results. @@ -187,7 +187,7 @@ async def list_async( ) if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[List[models.JWTTemplate]], http_res) + return unmarshal_json_response(List[models.JWTTemplate], http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise models.SDKError("API error occurred", http_res, http_res_text) @@ -210,7 +210,7 @@ def create( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.JWTTemplate]: + ) -> models.JWTTemplate: r"""Create a JWT template Create a new JWT template @@ -287,7 +287,7 @@ def create( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.JWTTemplate], http_res) + return unmarshal_json_response(models.JWTTemplate, http_res) if utils.match_response(http_res, ["400", "402", "422"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -313,7 +313,7 @@ async def create_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.JWTTemplate]: + ) -> models.JWTTemplate: r"""Create a JWT template Create a new JWT template @@ -390,7 +390,7 @@ async def create_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.JWTTemplate], http_res) + return unmarshal_json_response(models.JWTTemplate, http_res) if utils.match_response(http_res, ["400", "402", "422"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -411,7 +411,7 @@ def get( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.JWTTemplate]: + ) -> models.JWTTemplate: r"""Retrieve a template Retrieve the details of a given JWT template @@ -479,7 +479,7 @@ def get( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.JWTTemplate], http_res) + return unmarshal_json_response(models.JWTTemplate, http_res) if utils.match_response(http_res, "404", "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -500,7 +500,7 @@ async def get_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.JWTTemplate]: + ) -> models.JWTTemplate: r"""Retrieve a template Retrieve the details of a given JWT template @@ -568,7 +568,7 @@ async def get_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.JWTTemplate], http_res) + return unmarshal_json_response(models.JWTTemplate, http_res) if utils.match_response(http_res, "404", "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -598,7 +598,7 @@ def update( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.JWTTemplate]: + ) -> models.JWTTemplate: r"""Update a JWT template Updates an existing JWT template @@ -689,7 +689,7 @@ def update( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.JWTTemplate], http_res) + return unmarshal_json_response(models.JWTTemplate, http_res) if utils.match_response(http_res, ["400", "402", "422"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -719,7 +719,7 @@ async def update_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.JWTTemplate]: + ) -> models.JWTTemplate: r"""Update a JWT template Updates an existing JWT template @@ -810,7 +810,7 @@ async def update_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.JWTTemplate], http_res) + return unmarshal_json_response(models.JWTTemplate, http_res) if utils.match_response(http_res, ["400", "402", "422"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -831,7 +831,7 @@ def delete( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.DeletedObject]: + ) -> models.DeletedObject: r"""Delete a Template :param template_id: JWT Template ID @@ -897,7 +897,7 @@ def delete( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.DeletedObject], http_res) + return unmarshal_json_response(models.DeletedObject, http_res) if utils.match_response(http_res, ["403", "404"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -918,7 +918,7 @@ async def delete_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.DeletedObject]: + ) -> models.DeletedObject: r"""Delete a Template :param template_id: JWT Template ID @@ -984,7 +984,7 @@ async def delete_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.DeletedObject], http_res) + return unmarshal_json_response(models.DeletedObject, http_res) if utils.match_response(http_res, ["403", "404"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) diff --git a/src/clerk_backend_api/m2m.py b/src/clerk_backend_api/m2m.py index b423632a..a57c0d9a 100644 --- a/src/clerk_backend_api/m2m.py +++ b/src/clerk_backend_api/m2m.py @@ -18,7 +18,7 @@ def create_token( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.CreateM2MTokenResponseBody]: + ) -> models.CreateM2MTokenResponseBody: r"""Create a M2M Token Creates a new M2M Token. Must be authenticated via a Machine Secret Key. @@ -91,9 +91,7 @@ def create_token( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return unmarshal_json_response( - Optional[models.CreateM2MTokenResponseBody], http_res - ) + return unmarshal_json_response(models.CreateM2MTokenResponseBody, http_res) if utils.match_response(http_res, "400", "application/json"): response_data = unmarshal_json_response( models.CreateM2MTokenM2mResponseBodyData, http_res @@ -122,7 +120,7 @@ async def create_token_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.CreateM2MTokenResponseBody]: + ) -> models.CreateM2MTokenResponseBody: r"""Create a M2M Token Creates a new M2M Token. Must be authenticated via a Machine Secret Key. @@ -195,9 +193,7 @@ async def create_token_async( response_data: Any = None if utils.match_response(http_res, "201", "application/json"): - return unmarshal_json_response( - Optional[models.CreateM2MTokenResponseBody], http_res - ) + return unmarshal_json_response(models.CreateM2MTokenResponseBody, http_res) if utils.match_response(http_res, "400", "application/json"): response_data = unmarshal_json_response( models.CreateM2MTokenM2mResponseBodyData, http_res @@ -229,7 +225,7 @@ def list_tokens( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.GetM2MTokensResponseBody]: + ) -> models.GetM2MTokensResponseBody: r"""Get M2M Tokens Fetches M2M tokens for a specific machine. @@ -310,9 +306,7 @@ def list_tokens( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.GetM2MTokensResponseBody], http_res - ) + return unmarshal_json_response(models.GetM2MTokensResponseBody, http_res) if utils.match_response(http_res, "400", "application/json"): response_data = unmarshal_json_response( models.GetM2MTokensM2mResponseBodyData, http_res @@ -349,7 +343,7 @@ async def list_tokens_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.GetM2MTokensResponseBody]: + ) -> models.GetM2MTokensResponseBody: r"""Get M2M Tokens Fetches M2M tokens for a specific machine. @@ -430,9 +424,7 @@ async def list_tokens_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.GetM2MTokensResponseBody], http_res - ) + return unmarshal_json_response(models.GetM2MTokensResponseBody, http_res) if utils.match_response(http_res, "400", "application/json"): response_data = unmarshal_json_response( models.GetM2MTokensM2mResponseBodyData, http_res @@ -466,7 +458,7 @@ def revoke_token( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.RevokeM2MTokenResponseBody]: + ) -> models.RevokeM2MTokenResponseBody: r"""Revoke a M2M Token Revokes a M2M Token. @@ -550,9 +542,7 @@ def revoke_token( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.RevokeM2MTokenResponseBody], http_res - ) + return unmarshal_json_response(models.RevokeM2MTokenResponseBody, http_res) if utils.match_response(http_res, "400", "application/json"): response_data = unmarshal_json_response( models.RevokeM2MTokenM2mResponseBodyData, http_res @@ -581,7 +571,7 @@ async def revoke_token_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.RevokeM2MTokenResponseBody]: + ) -> models.RevokeM2MTokenResponseBody: r"""Revoke a M2M Token Revokes a M2M Token. @@ -665,9 +655,7 @@ async def revoke_token_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.RevokeM2MTokenResponseBody], http_res - ) + return unmarshal_json_response(models.RevokeM2MTokenResponseBody, http_res) if utils.match_response(http_res, "400", "application/json"): response_data = unmarshal_json_response( models.RevokeM2MTokenM2mResponseBodyData, http_res @@ -695,7 +683,7 @@ def verify_token( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.VerifyM2MTokenResponseBody]: + ) -> models.VerifyM2MTokenResponseBody: r"""Verify a M2M Token Verifies a M2M Token. @@ -771,9 +759,7 @@ def verify_token( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.VerifyM2MTokenResponseBody], http_res - ) + return unmarshal_json_response(models.VerifyM2MTokenResponseBody, http_res) if utils.match_response(http_res, "400", "application/json"): response_data = unmarshal_json_response( models.VerifyM2MTokenM2mResponseBodyData, http_res @@ -801,7 +787,7 @@ async def verify_token_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.VerifyM2MTokenResponseBody]: + ) -> models.VerifyM2MTokenResponseBody: r"""Verify a M2M Token Verifies a M2M Token. @@ -877,9 +863,7 @@ async def verify_token_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.VerifyM2MTokenResponseBody], http_res - ) + return unmarshal_json_response(models.VerifyM2MTokenResponseBody, http_res) if utils.match_response(http_res, "400", "application/json"): response_data = unmarshal_json_response( models.VerifyM2MTokenM2mResponseBodyData, http_res diff --git a/src/clerk_backend_api/machines.py b/src/clerk_backend_api/machines.py index 271638d4..bc465979 100644 --- a/src/clerk_backend_api/machines.py +++ b/src/clerk_backend_api/machines.py @@ -20,7 +20,7 @@ def list( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.MachineList]: + ) -> models.MachineList: r"""Get a list of machines for an instance This request returns the list of machines for an instance. The machines are @@ -104,7 +104,7 @@ def list( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.MachineList], http_res) + return unmarshal_json_response(models.MachineList, http_res) if utils.match_response( http_res, ["400", "401", "403", "422"], "application/json" ): @@ -130,7 +130,7 @@ async def list_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.MachineList]: + ) -> models.MachineList: r"""Get a list of machines for an instance This request returns the list of machines for an instance. The machines are @@ -214,7 +214,7 @@ async def list_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.MachineList], http_res) + return unmarshal_json_response(models.MachineList, http_res) if utils.match_response( http_res, ["400", "401", "403", "422"], "application/json" ): @@ -242,7 +242,7 @@ def create( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.MachineCreated]: + ) -> models.MachineCreated: r"""Create a machine Creates a new machine. @@ -315,7 +315,7 @@ def create( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.MachineCreated], http_res) + return unmarshal_json_response(models.MachineCreated, http_res) if utils.match_response( http_res, ["400", "401", "403", "422"], "application/json" ): @@ -343,7 +343,7 @@ async def create_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.MachineCreated]: + ) -> models.MachineCreated: r"""Create a machine Creates a new machine. @@ -416,7 +416,7 @@ async def create_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.MachineCreated], http_res) + return unmarshal_json_response(models.MachineCreated, http_res) if utils.match_response( http_res, ["400", "401", "403", "422"], "application/json" ): @@ -439,7 +439,7 @@ def get( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.Machine]: + ) -> models.Machine: r"""Retrieve a machine Returns the details of a machine. @@ -507,7 +507,7 @@ def get( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.Machine], http_res) + return unmarshal_json_response(models.Machine, http_res) if utils.match_response( http_res, ["400", "401", "403", "404", "422"], "application/json" ): @@ -530,7 +530,7 @@ async def get_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.Machine]: + ) -> models.Machine: r"""Retrieve a machine Returns the details of a machine. @@ -598,7 +598,7 @@ async def get_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.Machine], http_res) + return unmarshal_json_response(models.Machine, http_res) if utils.match_response( http_res, ["400", "401", "403", "404", "422"], "application/json" ): @@ -623,7 +623,7 @@ def update( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.Machine]: + ) -> models.Machine: r"""Update a machine Updates an existing machine. @@ -705,7 +705,7 @@ def update( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.Machine], http_res) + return unmarshal_json_response(models.Machine, http_res) if utils.match_response( http_res, ["400", "401", "403", "404", "422"], "application/json" ): @@ -730,7 +730,7 @@ async def update_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.Machine]: + ) -> models.Machine: r"""Update a machine Updates an existing machine. @@ -812,7 +812,7 @@ async def update_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.Machine], http_res) + return unmarshal_json_response(models.Machine, http_res) if utils.match_response( http_res, ["400", "401", "403", "404", "422"], "application/json" ): @@ -835,7 +835,7 @@ def delete( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.MachineDeleted]: + ) -> models.MachineDeleted: r"""Delete a machine Deletes a machine. @@ -903,7 +903,7 @@ def delete( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.MachineDeleted], http_res) + return unmarshal_json_response(models.MachineDeleted, http_res) if utils.match_response( http_res, ["400", "401", "403", "404", "422"], "application/json" ): @@ -926,7 +926,7 @@ async def delete_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.MachineDeleted]: + ) -> models.MachineDeleted: r"""Delete a machine Deletes a machine. @@ -994,7 +994,7 @@ async def delete_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.MachineDeleted], http_res) + return unmarshal_json_response(models.MachineDeleted, http_res) if utils.match_response( http_res, ["400", "401", "403", "404", "422"], "application/json" ): @@ -1017,7 +1017,7 @@ def get_secret_key( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.MachineSecretKey]: + ) -> models.MachineSecretKey: r"""Retrieve a machine secret key Returns the secret key for a machine. @@ -1085,7 +1085,7 @@ def get_secret_key( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.MachineSecretKey], http_res) + return unmarshal_json_response(models.MachineSecretKey, http_res) if utils.match_response( http_res, ["400", "401", "403", "404"], "application/json" ): @@ -1108,7 +1108,7 @@ async def get_secret_key_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.MachineSecretKey]: + ) -> models.MachineSecretKey: r"""Retrieve a machine secret key Returns the secret key for a machine. @@ -1176,7 +1176,7 @@ async def get_secret_key_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.MachineSecretKey], http_res) + return unmarshal_json_response(models.MachineSecretKey, http_res) if utils.match_response( http_res, ["400", "401", "403", "404"], "application/json" ): @@ -1200,7 +1200,7 @@ def rotate_secret_key( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.MachineSecretKey]: + ) -> models.MachineSecretKey: r"""Rotate a machine's secret key Rotates the machine's secret key. @@ -1283,7 +1283,7 @@ def rotate_secret_key( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.MachineSecretKey], http_res) + return unmarshal_json_response(models.MachineSecretKey, http_res) if utils.match_response( http_res, ["400", "401", "403", "404", "422"], "application/json" ): @@ -1307,7 +1307,7 @@ async def rotate_secret_key_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.MachineSecretKey]: + ) -> models.MachineSecretKey: r"""Rotate a machine's secret key Rotates the machine's secret key. @@ -1390,7 +1390,7 @@ async def rotate_secret_key_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.MachineSecretKey], http_res) + return unmarshal_json_response(models.MachineSecretKey, http_res) if utils.match_response( http_res, ["400", "401", "403", "404", "422"], "application/json" ): @@ -1414,7 +1414,7 @@ def create_scope( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.MachineScope]: + ) -> models.MachineScope: r"""Create a machine scope Creates a new machine scope, allowing the specified machine to access another machine. @@ -1494,7 +1494,7 @@ def create_scope( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.MachineScope], http_res) + return unmarshal_json_response(models.MachineScope, http_res) if utils.match_response( http_res, ["400", "401", "403", "404", "409", "422"], "application/json" ): @@ -1518,7 +1518,7 @@ async def create_scope_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.MachineScope]: + ) -> models.MachineScope: r"""Create a machine scope Creates a new machine scope, allowing the specified machine to access another machine. @@ -1598,7 +1598,7 @@ async def create_scope_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.MachineScope], http_res) + return unmarshal_json_response(models.MachineScope, http_res) if utils.match_response( http_res, ["400", "401", "403", "404", "409", "422"], "application/json" ): @@ -1622,7 +1622,7 @@ def delete_scope( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.MachineScopeDeleted]: + ) -> models.MachineScopeDeleted: r"""Delete a machine scope Deletes a machine scope, removing access from one machine to another. @@ -1692,9 +1692,7 @@ def delete_scope( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.MachineScopeDeleted], http_res - ) + return unmarshal_json_response(models.MachineScopeDeleted, http_res) if utils.match_response( http_res, ["400", "401", "403", "404", "422"], "application/json" ): @@ -1718,7 +1716,7 @@ async def delete_scope_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.MachineScopeDeleted]: + ) -> models.MachineScopeDeleted: r"""Delete a machine scope Deletes a machine scope, removing access from one machine to another. @@ -1788,9 +1786,7 @@ async def delete_scope_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.MachineScopeDeleted], http_res - ) + return unmarshal_json_response(models.MachineScopeDeleted, http_res) if utils.match_response( http_res, ["400", "401", "403", "404", "422"], "application/json" ): diff --git a/src/clerk_backend_api/models/__init__.py b/src/clerk_backend_api/models/__init__.py index f5c7ae30..abca7136 100644 --- a/src/clerk_backend_api/models/__init__.py +++ b/src/clerk_backend_api/models/__init__.py @@ -411,6 +411,48 @@ VerificationTicketVerificationStrategy, VerificationTypedDict, ) + from .enterpriseaccount import ( + ClerkErrorErrorEnterpriseAccountMeta, + ClerkErrorErrorEnterpriseAccountMetaTypedDict, + ClerkErrorErrorEnterpriseAccountVerificationMeta, + ClerkErrorErrorEnterpriseAccountVerificationMetaTypedDict, + EnterpriseAccount, + EnterpriseAccountObject, + EnterpriseAccountTypedDict, + EnterpriseAccountVerification, + EnterpriseAccountVerificationTypedDict, + EnterpriseConnection, + EnterpriseConnection1, + EnterpriseConnection1TypedDict, + EnterpriseConnection2, + EnterpriseConnection2TypedDict, + EnterpriseConnectionEnterpriseConnection, + EnterpriseConnectionEnterpriseConnectionTypedDict, + EnterpriseConnectionTypedDict, + Protocol, + VerificationOauth, + VerificationOauthErrorEnterpriseAccountClerkError, + VerificationOauthErrorEnterpriseAccountClerkErrorTypedDict, + VerificationOauthTypedDict, + VerificationOauthVerificationEnterpriseAccountError, + VerificationOauthVerificationEnterpriseAccountErrorTypedDict, + VerificationOauthVerificationEnterpriseAccountObject, + VerificationOauthVerificationEnterpriseAccountStatus, + VerificationSAMLVerificationSAML, + VerificationSAMLVerificationSAMLTypedDict, + VerificationSamlErrorEnterpriseAccountClerkError, + VerificationSamlErrorEnterpriseAccountClerkErrorTypedDict, + VerificationSamlVerificationEnterpriseAccountError, + VerificationSamlVerificationEnterpriseAccountErrorTypedDict, + VerificationSamlVerificationEnterpriseAccountObject, + VerificationSamlVerificationEnterpriseAccountStatus, + VerificationSamlVerificationEnterpriseAccountStrategy, + VerificationTicketVerificationEnterpriseAccountObject, + VerificationTicketVerificationEnterpriseAccountStatus, + VerificationTicketVerificationEnterpriseAccountStrategy, + VerificationTicketVerificationTicket, + VerificationTicketVerificationTicketTypedDict, + ) from .extendbillingsubscriptionitemfreetrialop import ( ExtendBillingSubscriptionItemFreeTrialRequest, ExtendBillingSubscriptionItemFreeTrialRequestTypedDict, @@ -1322,6 +1364,10 @@ "ClaimsTypedDict", "ClerkBaseError", "ClerkError", + "ClerkErrorErrorEnterpriseAccountMeta", + "ClerkErrorErrorEnterpriseAccountMetaTypedDict", + "ClerkErrorErrorEnterpriseAccountVerificationMeta", + "ClerkErrorErrorEnterpriseAccountVerificationMetaTypedDict", "ClerkErrorErrorExternalAccountWithVerificationMeta", "ClerkErrorErrorExternalAccountWithVerificationMetaTypedDict", "ClerkErrorErrorExternalAccountWithVerificationVerificationMeta", @@ -1522,6 +1568,19 @@ "EmailLink", "EmailLinkTypedDict", "EnrollmentMode", + "EnterpriseAccount", + "EnterpriseAccountObject", + "EnterpriseAccountTypedDict", + "EnterpriseAccountVerification", + "EnterpriseAccountVerificationTypedDict", + "EnterpriseConnection", + "EnterpriseConnection1", + "EnterpriseConnection1TypedDict", + "EnterpriseConnection2", + "EnterpriseConnection2TypedDict", + "EnterpriseConnectionEnterpriseConnection", + "EnterpriseConnectionEnterpriseConnectionTypedDict", + "EnterpriseConnectionTypedDict", "Error", "ErrorClerkError", "ErrorClerkErrorTypedDict", @@ -1834,6 +1893,7 @@ "PreviewTemplateRequestTypedDict", "PreviewTemplateResponseBody", "PreviewTemplateResponseBodyTypedDict", + "Protocol", "Provider", "ProxyCheck", "ProxyCheckObject", @@ -2131,8 +2191,16 @@ "VerificationGoogleOneTapVerificationStrategy", "VerificationOTP", "VerificationOTPTypedDict", + "VerificationOauth", "VerificationOauthErrorClerkError", "VerificationOauthErrorClerkErrorTypedDict", + "VerificationOauthErrorEnterpriseAccountClerkError", + "VerificationOauthErrorEnterpriseAccountClerkErrorTypedDict", + "VerificationOauthTypedDict", + "VerificationOauthVerificationEnterpriseAccountError", + "VerificationOauthVerificationEnterpriseAccountErrorTypedDict", + "VerificationOauthVerificationEnterpriseAccountObject", + "VerificationOauthVerificationEnterpriseAccountStatus", "VerificationOauthVerificationError", "VerificationOauthVerificationErrorTypedDict", "VerificationOauthVerificationObject", @@ -2150,11 +2218,20 @@ "VerificationSAMLErrorSAMLAccountClerkError", "VerificationSAMLErrorSAMLAccountClerkErrorTypedDict", "VerificationSAMLTypedDict", + "VerificationSAMLVerificationSAML", "VerificationSAMLVerificationSAMLAccountObject", "VerificationSAMLVerificationSAMLAccountStatus", "VerificationSAMLVerificationSAMLAccountStrategy", + "VerificationSAMLVerificationSAMLTypedDict", "VerificationSamlErrorClerkError", "VerificationSamlErrorClerkErrorTypedDict", + "VerificationSamlErrorEnterpriseAccountClerkError", + "VerificationSamlErrorEnterpriseAccountClerkErrorTypedDict", + "VerificationSamlVerificationEnterpriseAccountError", + "VerificationSamlVerificationEnterpriseAccountErrorTypedDict", + "VerificationSamlVerificationEnterpriseAccountObject", + "VerificationSamlVerificationEnterpriseAccountStatus", + "VerificationSamlVerificationEnterpriseAccountStrategy", "VerificationSamlVerificationError", "VerificationSamlVerificationErrorTypedDict", "VerificationSamlVerificationObject", @@ -2164,12 +2241,17 @@ "VerificationStrategy", "VerificationTicket", "VerificationTicketTypedDict", + "VerificationTicketVerificationEnterpriseAccountObject", + "VerificationTicketVerificationEnterpriseAccountStatus", + "VerificationTicketVerificationEnterpriseAccountStrategy", "VerificationTicketVerificationObject", "VerificationTicketVerificationSAMLAccountObject", "VerificationTicketVerificationSAMLAccountStatus", "VerificationTicketVerificationSAMLAccountStrategy", "VerificationTicketVerificationStatus", "VerificationTicketVerificationStrategy", + "VerificationTicketVerificationTicket", + "VerificationTicketVerificationTicketTypedDict", "VerificationTypedDict", "VerificationWeb3VerificationObject", "VerificationWeb3VerificationStatus", @@ -2537,6 +2619,46 @@ "VerificationTicketVerificationStatus": ".emailaddress", "VerificationTicketVerificationStrategy": ".emailaddress", "VerificationTypedDict": ".emailaddress", + "ClerkErrorErrorEnterpriseAccountMeta": ".enterpriseaccount", + "ClerkErrorErrorEnterpriseAccountMetaTypedDict": ".enterpriseaccount", + "ClerkErrorErrorEnterpriseAccountVerificationMeta": ".enterpriseaccount", + "ClerkErrorErrorEnterpriseAccountVerificationMetaTypedDict": ".enterpriseaccount", + "EnterpriseAccount": ".enterpriseaccount", + "EnterpriseAccountObject": ".enterpriseaccount", + "EnterpriseAccountTypedDict": ".enterpriseaccount", + "EnterpriseAccountVerification": ".enterpriseaccount", + "EnterpriseAccountVerificationTypedDict": ".enterpriseaccount", + "EnterpriseConnection": ".enterpriseaccount", + "EnterpriseConnection1": ".enterpriseaccount", + "EnterpriseConnection1TypedDict": ".enterpriseaccount", + "EnterpriseConnection2": ".enterpriseaccount", + "EnterpriseConnection2TypedDict": ".enterpriseaccount", + "EnterpriseConnectionEnterpriseConnection": ".enterpriseaccount", + "EnterpriseConnectionEnterpriseConnectionTypedDict": ".enterpriseaccount", + "EnterpriseConnectionTypedDict": ".enterpriseaccount", + "Protocol": ".enterpriseaccount", + "VerificationOauth": ".enterpriseaccount", + "VerificationOauthErrorEnterpriseAccountClerkError": ".enterpriseaccount", + "VerificationOauthErrorEnterpriseAccountClerkErrorTypedDict": ".enterpriseaccount", + "VerificationOauthTypedDict": ".enterpriseaccount", + "VerificationOauthVerificationEnterpriseAccountError": ".enterpriseaccount", + "VerificationOauthVerificationEnterpriseAccountErrorTypedDict": ".enterpriseaccount", + "VerificationOauthVerificationEnterpriseAccountObject": ".enterpriseaccount", + "VerificationOauthVerificationEnterpriseAccountStatus": ".enterpriseaccount", + "VerificationSAMLVerificationSAML": ".enterpriseaccount", + "VerificationSAMLVerificationSAMLTypedDict": ".enterpriseaccount", + "VerificationSamlErrorEnterpriseAccountClerkError": ".enterpriseaccount", + "VerificationSamlErrorEnterpriseAccountClerkErrorTypedDict": ".enterpriseaccount", + "VerificationSamlVerificationEnterpriseAccountError": ".enterpriseaccount", + "VerificationSamlVerificationEnterpriseAccountErrorTypedDict": ".enterpriseaccount", + "VerificationSamlVerificationEnterpriseAccountObject": ".enterpriseaccount", + "VerificationSamlVerificationEnterpriseAccountStatus": ".enterpriseaccount", + "VerificationSamlVerificationEnterpriseAccountStrategy": ".enterpriseaccount", + "VerificationTicketVerificationEnterpriseAccountObject": ".enterpriseaccount", + "VerificationTicketVerificationEnterpriseAccountStatus": ".enterpriseaccount", + "VerificationTicketVerificationEnterpriseAccountStrategy": ".enterpriseaccount", + "VerificationTicketVerificationTicket": ".enterpriseaccount", + "VerificationTicketVerificationTicketTypedDict": ".enterpriseaccount", "ExtendBillingSubscriptionItemFreeTrialRequest": ".extendbillingsubscriptionitemfreetrialop", "ExtendBillingSubscriptionItemFreeTrialRequestTypedDict": ".extendbillingsubscriptionitemfreetrialop", "ExtendFreeTrialRequest": ".extendfreetrialrequest", diff --git a/src/clerk_backend_api/models/commerceplan.py b/src/clerk_backend_api/models/commerceplan.py index 5fd6d66c..f3f50047 100644 --- a/src/clerk_backend_api/models/commerceplan.py +++ b/src/clerk_backend_api/models/commerceplan.py @@ -5,9 +5,10 @@ from .featureresponse import FeatureResponse, FeatureResponseTypedDict from clerk_backend_api.types import BaseModel, Nullable, UNSET_SENTINEL from enum import Enum +import pydantic from pydantic import model_serializer from typing import List, Optional -from typing_extensions import NotRequired, TypedDict +from typing_extensions import Annotated, NotRequired, TypedDict class CommercePlanObject(str, Enum): @@ -121,7 +122,12 @@ class CommercePlan(BaseModel): description: Nullable[str] r"""The description of the plan.""" - product_id: str + product_id: Annotated[ + str, + pydantic.Field( + deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." + ), + ] r"""The ID of the product this plan belongs to.""" is_default: bool diff --git a/src/clerk_backend_api/models/commercesubscriptionitem.py b/src/clerk_backend_api/models/commercesubscriptionitem.py index b8cedc92..77a1a6ff 100644 --- a/src/clerk_backend_api/models/commercesubscriptionitem.py +++ b/src/clerk_backend_api/models/commercesubscriptionitem.py @@ -161,7 +161,12 @@ class Plan(BaseModel): description: Nullable[str] r"""The description of the plan.""" - product_id: str + product_id: Annotated[ + str, + pydantic.Field( + deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." + ), + ] r"""The ID of the product this plan belongs to.""" is_default: bool diff --git a/src/clerk_backend_api/models/createsessionop.py b/src/clerk_backend_api/models/createsessionop.py index 64d74e1e..a626c15f 100644 --- a/src/clerk_backend_api/models/createsessionop.py +++ b/src/clerk_backend_api/models/createsessionop.py @@ -2,14 +2,20 @@ from __future__ import annotations from clerk_backend_api.types import BaseModel -from typing_extensions import TypedDict +from typing import Optional +from typing_extensions import NotRequired, TypedDict class CreateSessionRequestBodyTypedDict(TypedDict): user_id: str r"""The ID representing the user""" + active_organization_id: NotRequired[str] + r"""The ID of the organization to set as active for this session""" class CreateSessionRequestBody(BaseModel): user_id: str r"""The ID representing the user""" + + active_organization_id: Optional[str] = None + r"""The ID of the organization to set as active for this session""" diff --git a/src/clerk_backend_api/models/enterpriseaccount.py b/src/clerk_backend_api/models/enterpriseaccount.py new file mode 100644 index 00000000..0a4dbad2 --- /dev/null +++ b/src/clerk_backend_api/models/enterpriseaccount.py @@ -0,0 +1,707 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from clerk_backend_api import models, utils +from clerk_backend_api.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from clerk_backend_api.utils import get_discriminator, validate_open_enum +from enum import Enum +import pydantic +from pydantic import Discriminator, Tag, field_serializer, model_serializer +from pydantic.functional_validators import PlainValidator +from typing import Any, Dict, List, Optional, Union +from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict + + +class EnterpriseAccountObject(str, Enum): + r"""String representing the object's type. Objects of the same type share the same value.""" + + ENTERPRISE_ACCOUNT = "enterprise_account" + + +class Protocol(str, Enum): + r"""The authentication protocol used to sign in.""" + + OAUTH = "oauth" + SAML = "saml" + + +class VerificationOauthVerificationEnterpriseAccountObject(str, Enum): + VERIFICATION_OAUTH = "verification_oauth" + + +class VerificationOauthVerificationEnterpriseAccountStatus( + str, Enum, metaclass=utils.OpenEnumMeta +): + UNVERIFIED = "unverified" + VERIFIED = "verified" + FAILED = "failed" + EXPIRED = "expired" + TRANSFERABLE = "transferable" + + +class ClerkErrorErrorEnterpriseAccountVerificationMetaTypedDict(TypedDict): + pass + + +class ClerkErrorErrorEnterpriseAccountVerificationMeta(BaseModel): + pass + + +class VerificationOauthErrorEnterpriseAccountClerkErrorTypedDict(TypedDict): + message: str + long_message: str + code: str + meta: NotRequired[ClerkErrorErrorEnterpriseAccountVerificationMetaTypedDict] + + +class VerificationOauthErrorEnterpriseAccountClerkError(BaseModel): + message: str + + long_message: str + + code: str + + meta: Optional[ClerkErrorErrorEnterpriseAccountVerificationMeta] = None + + +VerificationOauthVerificationEnterpriseAccountErrorTypedDict = ( + VerificationOauthErrorEnterpriseAccountClerkErrorTypedDict +) + + +VerificationOauthVerificationEnterpriseAccountError = ( + VerificationOauthErrorEnterpriseAccountClerkError +) + + +class VerificationOauthTypedDict(TypedDict): + status: VerificationOauthVerificationEnterpriseAccountStatus + strategy: str + expire_at: int + attempts: Nullable[int] + object: NotRequired[VerificationOauthVerificationEnterpriseAccountObject] + external_verification_redirect_url: NotRequired[str] + error: NotRequired[ + Nullable[VerificationOauthVerificationEnterpriseAccountErrorTypedDict] + ] + verified_at_client: NotRequired[Nullable[str]] + + +class VerificationOauth(BaseModel): + status: Annotated[ + VerificationOauthVerificationEnterpriseAccountStatus, + PlainValidator(validate_open_enum(False)), + ] + + strategy: str + + expire_at: int + + attempts: Nullable[int] + + object: Optional[VerificationOauthVerificationEnterpriseAccountObject] = None + + external_verification_redirect_url: Optional[str] = None + + error: OptionalNullable[VerificationOauthVerificationEnterpriseAccountError] = UNSET + + verified_at_client: OptionalNullable[str] = UNSET + + @field_serializer("status") + def serialize_status(self, value): + if isinstance(value, str): + try: + return models.VerificationOauthVerificationEnterpriseAccountStatus( + value + ) + except ValueError: + return value + return value + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "object", + "external_verification_redirect_url", + "error", + "verified_at_client", + ] + nullable_fields = ["error", "attempts", "verified_at_client"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m + + +class VerificationSamlVerificationEnterpriseAccountObject(str, Enum): + VERIFICATION_SAML = "verification_saml" + + +class VerificationSamlVerificationEnterpriseAccountStatus(str, Enum): + UNVERIFIED = "unverified" + VERIFIED = "verified" + FAILED = "failed" + EXPIRED = "expired" + TRANSFERABLE = "transferable" + + +class VerificationSamlVerificationEnterpriseAccountStrategy(str, Enum): + SAML = "saml" + + +class ClerkErrorErrorEnterpriseAccountMetaTypedDict(TypedDict): + pass + + +class ClerkErrorErrorEnterpriseAccountMeta(BaseModel): + pass + + +class VerificationSamlErrorEnterpriseAccountClerkErrorTypedDict(TypedDict): + message: str + long_message: str + code: str + meta: NotRequired[ClerkErrorErrorEnterpriseAccountMetaTypedDict] + + +class VerificationSamlErrorEnterpriseAccountClerkError(BaseModel): + message: str + + long_message: str + + code: str + + meta: Optional[ClerkErrorErrorEnterpriseAccountMeta] = None + + +VerificationSamlVerificationEnterpriseAccountErrorTypedDict = ( + VerificationSamlErrorEnterpriseAccountClerkErrorTypedDict +) + + +VerificationSamlVerificationEnterpriseAccountError = ( + VerificationSamlErrorEnterpriseAccountClerkError +) + + +class VerificationSAMLVerificationSAMLTypedDict(TypedDict): + status: VerificationSamlVerificationEnterpriseAccountStatus + strategy: VerificationSamlVerificationEnterpriseAccountStrategy + attempts: Nullable[int] + object: NotRequired[VerificationSamlVerificationEnterpriseAccountObject] + external_verification_redirect_url: NotRequired[Nullable[str]] + error: NotRequired[ + Nullable[VerificationSamlVerificationEnterpriseAccountErrorTypedDict] + ] + expire_at: NotRequired[Nullable[int]] + verified_at_client: NotRequired[Nullable[str]] + + +class VerificationSAMLVerificationSAML(BaseModel): + status: VerificationSamlVerificationEnterpriseAccountStatus + + strategy: VerificationSamlVerificationEnterpriseAccountStrategy + + attempts: Nullable[int] + + object: Optional[VerificationSamlVerificationEnterpriseAccountObject] = None + + external_verification_redirect_url: OptionalNullable[str] = UNSET + + error: OptionalNullable[VerificationSamlVerificationEnterpriseAccountError] = UNSET + + expire_at: OptionalNullable[int] = UNSET + + verified_at_client: OptionalNullable[str] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "object", + "external_verification_redirect_url", + "error", + "expire_at", + "verified_at_client", + ] + nullable_fields = [ + "external_verification_redirect_url", + "error", + "expire_at", + "attempts", + "verified_at_client", + ] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m + + +class VerificationTicketVerificationEnterpriseAccountObject(str, Enum): + VERIFICATION_TICKET = "verification_ticket" + + +class VerificationTicketVerificationEnterpriseAccountStatus(str, Enum): + UNVERIFIED = "unverified" + VERIFIED = "verified" + EXPIRED = "expired" + + +class VerificationTicketVerificationEnterpriseAccountStrategy( + str, Enum, metaclass=utils.OpenEnumMeta +): + TICKET = "ticket" + + +class VerificationTicketVerificationTicketTypedDict(TypedDict): + status: VerificationTicketVerificationEnterpriseAccountStatus + strategy: VerificationTicketVerificationEnterpriseAccountStrategy + attempts: Nullable[int] + expire_at: Nullable[int] + object: NotRequired[VerificationTicketVerificationEnterpriseAccountObject] + verified_at_client: NotRequired[Nullable[str]] + + +class VerificationTicketVerificationTicket(BaseModel): + status: VerificationTicketVerificationEnterpriseAccountStatus + + strategy: Annotated[ + VerificationTicketVerificationEnterpriseAccountStrategy, + PlainValidator(validate_open_enum(False)), + ] + + attempts: Nullable[int] + + expire_at: Nullable[int] + + object: Optional[VerificationTicketVerificationEnterpriseAccountObject] = None + + verified_at_client: OptionalNullable[str] = UNSET + + @field_serializer("strategy") + def serialize_strategy(self, value): + if isinstance(value, str): + try: + return models.VerificationTicketVerificationEnterpriseAccountStrategy( + value + ) + except ValueError: + return value + return value + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["object", "verified_at_client"] + nullable_fields = ["attempts", "expire_at", "verified_at_client"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m + + +EnterpriseAccountVerificationTypedDict = TypeAliasType( + "EnterpriseAccountVerificationTypedDict", + Union[ + VerificationTicketVerificationTicketTypedDict, + VerificationSAMLVerificationSAMLTypedDict, + VerificationOauthTypedDict, + ], +) + + +EnterpriseAccountVerification = Annotated[ + Union[ + Annotated[VerificationTicketVerificationTicket, Tag("verification_ticket")], + Annotated[VerificationSAMLVerificationSAML, Tag("verification_saml")], + Annotated[VerificationOauth, Tag("verification_oauth")], + ], + Discriminator(lambda m: get_discriminator(m, "object", "object")), +] + + +class EnterpriseConnection2TypedDict(TypedDict): + id: str + protocol: str + provider: str + name: str + logo_public_url: Nullable[str] + domains: List[str] + active: bool + sync_user_attributes: bool + allow_subdomains: bool + allow_idp_initiated: bool + disable_additional_identifications: bool + created_at: int + r"""Unix timestamp of creation. + + """ + updated_at: int + r"""Unix timestamp of last update. + + """ + domain: NotRequired[str] + + +class EnterpriseConnection2(BaseModel): + id: str + + protocol: str + + provider: str + + name: str + + logo_public_url: Nullable[str] + + domains: List[str] + + active: bool + + sync_user_attributes: bool + + allow_subdomains: bool + + allow_idp_initiated: bool + + disable_additional_identifications: bool + + created_at: int + r"""Unix timestamp of creation. + + """ + + updated_at: int + r"""Unix timestamp of last update. + + """ + + domain: Annotated[ + Optional[str], + pydantic.Field( + deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." + ), + ] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["domain"] + nullable_fields = ["logo_public_url"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m + + +class EnterpriseConnection1TypedDict(TypedDict): + id: str + protocol: str + provider: str + name: str + logo_public_url: Nullable[str] + domain: str + active: bool + sync_user_attributes: bool + allow_subdomains: bool + allow_idp_initiated: bool + disable_additional_identifications: bool + created_at: int + r"""Unix timestamp of creation. + + """ + updated_at: int + r"""Unix timestamp of last update. + + """ + domains: NotRequired[List[str]] + + +class EnterpriseConnection1(BaseModel): + id: str + + protocol: str + + provider: str + + name: str + + logo_public_url: Nullable[str] + + domain: Annotated[ + str, + pydantic.Field( + deprecated="warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." + ), + ] + + active: bool + + sync_user_attributes: bool + + allow_subdomains: bool + + allow_idp_initiated: bool + + disable_additional_identifications: bool + + created_at: int + r"""Unix timestamp of creation. + + """ + + updated_at: int + r"""Unix timestamp of last update. + + """ + + domains: Optional[List[str]] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["domains"] + nullable_fields = ["logo_public_url"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m + + +EnterpriseConnectionEnterpriseConnectionTypedDict = TypeAliasType( + "EnterpriseConnectionEnterpriseConnectionTypedDict", + Union[EnterpriseConnection1TypedDict, EnterpriseConnection2TypedDict], +) + + +EnterpriseConnectionEnterpriseConnection = TypeAliasType( + "EnterpriseConnectionEnterpriseConnection", + Union[EnterpriseConnection1, EnterpriseConnection2], +) + + +EnterpriseConnectionTypedDict = EnterpriseConnectionEnterpriseConnectionTypedDict + + +EnterpriseConnection = EnterpriseConnectionEnterpriseConnection + + +class EnterpriseAccountTypedDict(TypedDict): + id: str + object: EnterpriseAccountObject + r"""String representing the object's type. Objects of the same type share the same value. + + """ + provider: str + active: bool + email_address: str + verification: Nullable[EnterpriseAccountVerificationTypedDict] + protocol: NotRequired[Protocol] + r"""The authentication protocol used to sign in. + + """ + first_name: NotRequired[Nullable[str]] + last_name: NotRequired[Nullable[str]] + provider_user_id: NotRequired[Nullable[str]] + r"""The unique ID of the user in the external provider's system""" + enterprise_connection_id: NotRequired[Nullable[str]] + public_metadata: NotRequired[Dict[str, Any]] + enterprise_connection: NotRequired[Nullable[EnterpriseConnectionTypedDict]] + last_authenticated_at: NotRequired[Nullable[int]] + r"""Unix timestamp of last authentication. + + """ + + +class EnterpriseAccount(BaseModel): + id: str + + object: EnterpriseAccountObject + r"""String representing the object's type. Objects of the same type share the same value. + + """ + + provider: str + + active: bool + + email_address: str + + verification: Nullable[EnterpriseAccountVerification] + + protocol: Optional[Protocol] = None + r"""The authentication protocol used to sign in. + + """ + + first_name: OptionalNullable[str] = UNSET + + last_name: OptionalNullable[str] = UNSET + + provider_user_id: OptionalNullable[str] = UNSET + r"""The unique ID of the user in the external provider's system""" + + enterprise_connection_id: OptionalNullable[str] = UNSET + + public_metadata: Optional[Dict[str, Any]] = None + + enterprise_connection: OptionalNullable[EnterpriseConnection] = UNSET + + last_authenticated_at: OptionalNullable[int] = UNSET + r"""Unix timestamp of last authentication. + + """ + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "protocol", + "first_name", + "last_name", + "provider_user_id", + "enterprise_connection_id", + "public_metadata", + "enterprise_connection", + "last_authenticated_at", + ] + nullable_fields = [ + "first_name", + "last_name", + "provider_user_id", + "enterprise_connection_id", + "verification", + "enterprise_connection", + "last_authenticated_at", + ] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/src/clerk_backend_api/models/organizationinvitation.py b/src/clerk_backend_api/models/organizationinvitation.py index e6947dc8..5807394b 100644 --- a/src/clerk_backend_api/models/organizationinvitation.py +++ b/src/clerk_backend_api/models/organizationinvitation.py @@ -25,6 +25,7 @@ class OrganizationInvitationTypedDict(TypedDict): email_address: str role: str role_name: str + inviter_id: Nullable[str] public_metadata: Dict[str, Any] url: Nullable[str] expires_at: Nullable[int] @@ -54,6 +55,8 @@ class OrganizationInvitation(BaseModel): role_name: str + inviter_id: Nullable[str] + public_metadata: Dict[str, Any] url: Nullable[str] @@ -76,7 +79,7 @@ class OrganizationInvitation(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = ["organization_id", "status", "private_metadata"] - nullable_fields = ["url", "expires_at"] + nullable_fields = ["inviter_id", "url", "expires_at"] null_default_fields = [] serialized = handler(self) diff --git a/src/clerk_backend_api/models/organizationinvitationwithpublicorganizationdata.py b/src/clerk_backend_api/models/organizationinvitationwithpublicorganizationdata.py index 090db294..3f0b0140 100644 --- a/src/clerk_backend_api/models/organizationinvitationwithpublicorganizationdata.py +++ b/src/clerk_backend_api/models/organizationinvitationwithpublicorganizationdata.py @@ -29,6 +29,7 @@ class OrganizationInvitationWithPublicOrganizationDataTypedDict(TypedDict): email_address: str role: str role_name: str + inviter_id: Nullable[str] public_metadata: Dict[str, Any] url: Nullable[str] expires_at: Nullable[int] @@ -61,6 +62,8 @@ class OrganizationInvitationWithPublicOrganizationData(BaseModel): role_name: str + inviter_id: Nullable[str] + public_metadata: Dict[str, Any] url: Nullable[str] @@ -92,7 +95,7 @@ def serialize_model(self, handler): "private_metadata", "public_organization_data", ] - nullable_fields = ["url", "expires_at"] + nullable_fields = ["inviter_id", "url", "expires_at"] null_default_fields = [] serialized = handler(self) diff --git a/src/clerk_backend_api/models/updateinstanceauthconfigop.py b/src/clerk_backend_api/models/updateinstanceauthconfigop.py index 302bcc94..8ec758c3 100644 --- a/src/clerk_backend_api/models/updateinstanceauthconfigop.py +++ b/src/clerk_backend_api/models/updateinstanceauthconfigop.py @@ -22,10 +22,6 @@ class UpdateInstanceAuthConfigRequestBodyTypedDict(TypedDict): """ progressive_sign_up: NotRequired[Nullable[bool]] r"""Enable the Progressive Sign Up algorithm. Refer to the [docs](https://clerk.com/docs/upgrade-guides/progressive-sign-up) for more info.""" - enhanced_email_deliverability: NotRequired[Nullable[bool]] - r"""The \"enhanced_email_deliverability\" feature will send emails from \"verifications@clerk.dev\" instead of your domain. - This can be helpful if you do not have a high domain reputation. - """ test_mode: NotRequired[Nullable[bool]] r"""Toggles test mode for this instance, allowing the use of test email addresses and phone numbers. Defaults to true for development instances. @@ -45,11 +41,6 @@ class UpdateInstanceAuthConfigRequestBody(BaseModel): progressive_sign_up: OptionalNullable[bool] = UNSET r"""Enable the Progressive Sign Up algorithm. Refer to the [docs](https://clerk.com/docs/upgrade-guides/progressive-sign-up) for more info.""" - enhanced_email_deliverability: OptionalNullable[bool] = UNSET - r"""The \"enhanced_email_deliverability\" feature will send emails from \"verifications@clerk.dev\" instead of your domain. - This can be helpful if you do not have a high domain reputation. - """ - test_mode: OptionalNullable[bool] = UNSET r"""Toggles test mode for this instance, allowing the use of test email addresses and phone numbers. Defaults to true for development instances. @@ -61,14 +52,12 @@ def serialize_model(self, handler): "restricted_to_allowlist", "from_email_address", "progressive_sign_up", - "enhanced_email_deliverability", "test_mode", ] nullable_fields = [ "restricted_to_allowlist", "from_email_address", "progressive_sign_up", - "enhanced_email_deliverability", "test_mode", ] null_default_fields = [] diff --git a/src/clerk_backend_api/models/updateinstanceop.py b/src/clerk_backend_api/models/updateinstanceop.py index 48cf30b5..b8bf6a3b 100644 --- a/src/clerk_backend_api/models/updateinstanceop.py +++ b/src/clerk_backend_api/models/updateinstanceop.py @@ -21,10 +21,6 @@ class UpdateInstanceRequestBodyTypedDict(TypedDict): """ hibp: NotRequired[Nullable[bool]] r"""Whether the instance should be using the HIBP service to check passwords for breaches""" - enhanced_email_deliverability: NotRequired[Nullable[bool]] - r"""The \"enhanced_email_deliverability\" feature will send emails from \"verifications@clerk.dev\" instead of your domain. - This can be helpful if you do not have a high domain reputation. - """ support_email: NotRequired[Nullable[str]] clerk_js_version: NotRequired[Nullable[str]] development_origin: NotRequired[Nullable[str]] @@ -47,11 +43,6 @@ class UpdateInstanceRequestBody(BaseModel): hibp: OptionalNullable[bool] = UNSET r"""Whether the instance should be using the HIBP service to check passwords for breaches""" - enhanced_email_deliverability: OptionalNullable[bool] = UNSET - r"""The \"enhanced_email_deliverability\" feature will send emails from \"verifications@clerk.dev\" instead of your domain. - This can be helpful if you do not have a high domain reputation. - """ - support_email: OptionalNullable[str] = UNSET clerk_js_version: OptionalNullable[str] = UNSET @@ -79,7 +70,6 @@ def serialize_model(self, handler): optional_fields = [ "test_mode", "hibp", - "enhanced_email_deliverability", "support_email", "clerk_js_version", "development_origin", @@ -90,7 +80,6 @@ def serialize_model(self, handler): nullable_fields = [ "test_mode", "hibp", - "enhanced_email_deliverability", "support_email", "clerk_js_version", "development_origin", diff --git a/src/clerk_backend_api/models/user.py b/src/clerk_backend_api/models/user.py index dfafd4ae..272ab2c3 100644 --- a/src/clerk_backend_api/models/user.py +++ b/src/clerk_backend_api/models/user.py @@ -2,10 +2,15 @@ from __future__ import annotations from .emailaddress import EmailAddress, EmailAddressTypedDict +from .enterpriseaccount import EnterpriseAccount, EnterpriseAccountTypedDict from .externalaccountwithverification import ( ExternalAccountWithVerification, ExternalAccountWithVerificationTypedDict, ) +from .organizationmembership import ( + OrganizationMembership, + OrganizationMembershipTypedDict, +) from .passkey import Passkey, PasskeyTypedDict from .phonenumber import PhoneNumber, PhoneNumberTypedDict from .samlaccount import SAMLAccount, SAMLAccountTypedDict @@ -65,6 +70,7 @@ class UserTypedDict(TypedDict): """ external_accounts: List[ExternalAccountWithVerificationTypedDict] saml_accounts: List[SAMLAccountTypedDict] + enterprise_accounts: List[EnterpriseAccountTypedDict] last_sign_in_at: Nullable[int] r"""Unix timestamp of last sign-in. @@ -114,6 +120,11 @@ class UserTypedDict(TypedDict): image_url: NotRequired[str] private_metadata: NotRequired[Nullable[Dict[str, Any]]] unsafe_metadata: NotRequired[Dict[str, Any]] + password_last_updated_at: NotRequired[Nullable[int]] + r"""Unix timestamp of when the user's password was last updated. + + """ + organization_memberships: NotRequired[List[OrganizationMembershipTypedDict]] create_organizations_limit: NotRequired[Nullable[int]] r"""The maximum number of organizations the user can create. 0 means unlimited. @@ -178,6 +189,8 @@ class User(BaseModel): saml_accounts: List[SAMLAccount] + enterprise_accounts: List[EnterpriseAccount] + last_sign_in_at: Nullable[int] r"""Unix timestamp of last sign-in. @@ -248,6 +261,13 @@ class User(BaseModel): unsafe_metadata: Optional[Dict[str, Any]] = None + password_last_updated_at: OptionalNullable[int] = UNSET + r"""Unix timestamp of when the user's password was last updated. + + """ + + organization_memberships: Optional[List[OrganizationMembership]] = None + create_organizations_limit: OptionalNullable[int] = UNSET r"""The maximum number of organizations the user can create. 0 means unlimited. @@ -261,6 +281,8 @@ def serialize_model(self, handler): "image_url", "private_metadata", "unsafe_metadata", + "password_last_updated_at", + "organization_memberships", "create_organizations_limit", ] nullable_fields = [ @@ -275,6 +297,7 @@ def serialize_model(self, handler): "private_metadata", "mfa_enabled_at", "mfa_disabled_at", + "password_last_updated_at", "last_sign_in_at", "lockout_expires_in_seconds", "verification_attempts_remaining", diff --git a/src/clerk_backend_api/oauthaccesstokens.py b/src/clerk_backend_api/oauthaccesstokens.py index f025888a..46abaf73 100644 --- a/src/clerk_backend_api/oauthaccesstokens.py +++ b/src/clerk_backend_api/oauthaccesstokens.py @@ -18,7 +18,7 @@ def verify( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.VerifyOAuthAccessTokenResponseBody]: + ) -> models.VerifyOAuthAccessTokenResponseBody: r"""Verify an OAuth Access Token :param access_token: The access token to verify. @@ -90,7 +90,7 @@ def verify( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): return unmarshal_json_response( - Optional[models.VerifyOAuthAccessTokenResponseBody], http_res + models.VerifyOAuthAccessTokenResponseBody, http_res ) if utils.match_response(http_res, "400", "application/json"): response_data = unmarshal_json_response( @@ -125,7 +125,7 @@ async def verify_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.VerifyOAuthAccessTokenResponseBody]: + ) -> models.VerifyOAuthAccessTokenResponseBody: r"""Verify an OAuth Access Token :param access_token: The access token to verify. @@ -197,7 +197,7 @@ async def verify_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): return unmarshal_json_response( - Optional[models.VerifyOAuthAccessTokenResponseBody], http_res + models.VerifyOAuthAccessTokenResponseBody, http_res ) if utils.match_response(http_res, "400", "application/json"): response_data = unmarshal_json_response( diff --git a/src/clerk_backend_api/oauthapplications_sdk.py b/src/clerk_backend_api/oauthapplications_sdk.py index bf8ee622..9a352b2d 100644 --- a/src/clerk_backend_api/oauthapplications_sdk.py +++ b/src/clerk_backend_api/oauthapplications_sdk.py @@ -20,7 +20,7 @@ def list( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.OAuthApplications]: + ) -> models.OAuthApplications: r"""Get a list of OAuth applications for an instance This request returns the list of OAuth applications for an instance. @@ -105,7 +105,7 @@ def list( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.OAuthApplications], http_res) + return unmarshal_json_response(models.OAuthApplications, http_res) if utils.match_response(http_res, ["400", "403", "422"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -129,7 +129,7 @@ async def list_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.OAuthApplications]: + ) -> models.OAuthApplications: r"""Get a list of OAuth applications for an instance This request returns the list of OAuth applications for an instance. @@ -214,7 +214,7 @@ async def list_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.OAuthApplications], http_res) + return unmarshal_json_response(models.OAuthApplications, http_res) if utils.match_response(http_res, ["400", "403", "422"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -240,7 +240,7 @@ def create( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.OAuthApplicationWithSecret]: + ) -> models.OAuthApplicationWithSecret: r"""Create an OAuth application Creates a new OAuth application with the given name and callback URL for an instance. @@ -319,9 +319,7 @@ def create( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.OAuthApplicationWithSecret], http_res - ) + return unmarshal_json_response(models.OAuthApplicationWithSecret, http_res) if utils.match_response(http_res, ["400", "403", "422"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -347,7 +345,7 @@ async def create_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.OAuthApplicationWithSecret]: + ) -> models.OAuthApplicationWithSecret: r"""Create an OAuth application Creates a new OAuth application with the given name and callback URL for an instance. @@ -426,9 +424,7 @@ async def create_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.OAuthApplicationWithSecret], http_res - ) + return unmarshal_json_response(models.OAuthApplicationWithSecret, http_res) if utils.match_response(http_res, ["400", "403", "422"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -449,7 +445,7 @@ def get( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.OAuthApplication]: + ) -> models.OAuthApplication: r"""Retrieve an OAuth application by ID Fetches the OAuth application whose ID matches the provided `id` in the path. @@ -517,7 +513,7 @@ def get( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.OAuthApplication], http_res) + return unmarshal_json_response(models.OAuthApplication, http_res) if utils.match_response(http_res, ["403", "404"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -538,7 +534,7 @@ async def get_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.OAuthApplication]: + ) -> models.OAuthApplication: r"""Retrieve an OAuth application by ID Fetches the OAuth application whose ID matches the provided `id` in the path. @@ -606,7 +602,7 @@ async def get_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.OAuthApplication], http_res) + return unmarshal_json_response(models.OAuthApplication, http_res) if utils.match_response(http_res, ["403", "404"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -634,7 +630,7 @@ def update( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.OAuthApplication]: + ) -> models.OAuthApplication: r"""Update an OAuth application Updates an existing OAuth application @@ -726,7 +722,7 @@ def update( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.OAuthApplication], http_res) + return unmarshal_json_response(models.OAuthApplication, http_res) if utils.match_response( http_res, ["400", "403", "404", "422"], "application/json" ): @@ -756,7 +752,7 @@ async def update_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.OAuthApplication]: + ) -> models.OAuthApplication: r"""Update an OAuth application Updates an existing OAuth application @@ -848,7 +844,7 @@ async def update_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.OAuthApplication], http_res) + return unmarshal_json_response(models.OAuthApplication, http_res) if utils.match_response( http_res, ["400", "403", "404", "422"], "application/json" ): @@ -871,7 +867,7 @@ def delete( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.DeletedObject]: + ) -> models.DeletedObject: r"""Delete an OAuth application Deletes the given OAuth application. @@ -940,7 +936,7 @@ def delete( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.DeletedObject], http_res) + return unmarshal_json_response(models.DeletedObject, http_res) if utils.match_response(http_res, ["403", "404"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -961,7 +957,7 @@ async def delete_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.DeletedObject]: + ) -> models.DeletedObject: r"""Delete an OAuth application Deletes the given OAuth application. @@ -1030,7 +1026,7 @@ async def delete_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.DeletedObject], http_res) + return unmarshal_json_response(models.DeletedObject, http_res) if utils.match_response(http_res, ["403", "404"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -1051,7 +1047,7 @@ def rotate_secret( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.OAuthApplicationWithSecret]: + ) -> models.OAuthApplicationWithSecret: r"""Rotate the client secret of the given OAuth application Rotates the OAuth application's client secret. @@ -1120,9 +1116,7 @@ def rotate_secret( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.OAuthApplicationWithSecret], http_res - ) + return unmarshal_json_response(models.OAuthApplicationWithSecret, http_res) if utils.match_response(http_res, ["403", "404"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -1143,7 +1137,7 @@ async def rotate_secret_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.OAuthApplicationWithSecret]: + ) -> models.OAuthApplicationWithSecret: r"""Rotate the client secret of the given OAuth application Rotates the OAuth application's client secret. @@ -1212,9 +1206,7 @@ async def rotate_secret_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.OAuthApplicationWithSecret], http_res - ) + return unmarshal_json_response(models.OAuthApplicationWithSecret, http_res) if utils.match_response(http_res, ["403", "404"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) diff --git a/src/clerk_backend_api/organizationdomains_sdk.py b/src/clerk_backend_api/organizationdomains_sdk.py index df4fffa5..e012a208 100644 --- a/src/clerk_backend_api/organizationdomains_sdk.py +++ b/src/clerk_backend_api/organizationdomains_sdk.py @@ -20,7 +20,7 @@ def create( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.OrganizationDomain]: + ) -> models.OrganizationDomain: r"""Create a new organization domain. Creates a new organization domain. By default the domain is verified, but can be optionally set to unverified. @@ -103,9 +103,7 @@ def create( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.OrganizationDomain], http_res - ) + return unmarshal_json_response(models.OrganizationDomain, http_res) if utils.match_response( http_res, ["400", "403", "404", "422"], "application/json" ): @@ -131,7 +129,7 @@ async def create_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.OrganizationDomain]: + ) -> models.OrganizationDomain: r"""Create a new organization domain. Creates a new organization domain. By default the domain is verified, but can be optionally set to unverified. @@ -214,9 +212,7 @@ async def create_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.OrganizationDomain], http_res - ) + return unmarshal_json_response(models.OrganizationDomain, http_res) if utils.match_response( http_res, ["400", "403", "404", "422"], "application/json" ): @@ -243,7 +239,7 @@ def list( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.OrganizationDomains]: + ) -> models.OrganizationDomains: r"""Get a list of all domains of an organization. Get a list of all domains of an organization. @@ -322,9 +318,7 @@ def list( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.OrganizationDomains], http_res - ) + return unmarshal_json_response(models.OrganizationDomains, http_res) if utils.match_response(http_res, ["401", "422"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -349,7 +343,7 @@ async def list_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.OrganizationDomains]: + ) -> models.OrganizationDomains: r"""Get a list of all domains of an organization. Get a list of all domains of an organization. @@ -428,9 +422,7 @@ async def list_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.OrganizationDomains], http_res - ) + return unmarshal_json_response(models.OrganizationDomains, http_res) if utils.match_response(http_res, ["401", "422"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -454,7 +446,7 @@ def update( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.OrganizationDomain]: + ) -> models.OrganizationDomain: r"""Update an organization domain. Updates the properties of an existing organization domain. @@ -537,9 +529,7 @@ def update( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.OrganizationDomain], http_res - ) + return unmarshal_json_response(models.OrganizationDomain, http_res) if utils.match_response(http_res, ["400", "404", "422"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -563,7 +553,7 @@ async def update_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.OrganizationDomain]: + ) -> models.OrganizationDomain: r"""Update an organization domain. Updates the properties of an existing organization domain. @@ -646,9 +636,7 @@ async def update_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.OrganizationDomain], http_res - ) + return unmarshal_json_response(models.OrganizationDomain, http_res) if utils.match_response(http_res, ["400", "404", "422"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -670,7 +658,7 @@ def delete( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.DeletedObject]: + ) -> models.DeletedObject: r"""Remove a domain from an organization. Removes the given domain from the organization. @@ -740,7 +728,7 @@ def delete( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.DeletedObject], http_res) + return unmarshal_json_response(models.DeletedObject, http_res) if utils.match_response(http_res, ["400", "401", "404"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -762,7 +750,7 @@ async def delete_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.DeletedObject]: + ) -> models.DeletedObject: r"""Remove a domain from an organization. Removes the given domain from the organization. @@ -832,7 +820,7 @@ async def delete_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.DeletedObject], http_res) + return unmarshal_json_response(models.DeletedObject, http_res) if utils.match_response(http_res, ["400", "401", "404"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -859,7 +847,7 @@ def list_all( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.OrganizationDomains]: + ) -> models.OrganizationDomains: r"""List all organization domains Retrieves a list of all organization domains within the current instance. @@ -959,9 +947,7 @@ def list_all( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.OrganizationDomains], http_res - ) + return unmarshal_json_response(models.OrganizationDomains, http_res) if utils.match_response(http_res, ["401", "403", "422"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -988,7 +974,7 @@ async def list_all_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.OrganizationDomains]: + ) -> models.OrganizationDomains: r"""List all organization domains Retrieves a list of all organization domains within the current instance. @@ -1088,9 +1074,7 @@ async def list_all_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.OrganizationDomains], http_res - ) + return unmarshal_json_response(models.OrganizationDomains, http_res) if utils.match_response(http_res, ["401", "403", "422"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) diff --git a/src/clerk_backend_api/organizationinvitations_sdk.py b/src/clerk_backend_api/organizationinvitations_sdk.py index 10afc1d4..32f32fed 100644 --- a/src/clerk_backend_api/organizationinvitations_sdk.py +++ b/src/clerk_backend_api/organizationinvitations_sdk.py @@ -24,7 +24,7 @@ def get_all( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.OrganizationInvitationsWithPublicOrganizationData]: + ) -> models.OrganizationInvitationsWithPublicOrganizationData: r"""Get a list of organization invitations for the current instance This request returns the list of organization invitations for the instance. @@ -114,8 +114,7 @@ def get_all( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): return unmarshal_json_response( - Optional[models.OrganizationInvitationsWithPublicOrganizationData], - http_res, + models.OrganizationInvitationsWithPublicOrganizationData, http_res ) if utils.match_response(http_res, ["400", "404", "422"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) @@ -146,7 +145,7 @@ async def get_all_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.OrganizationInvitationsWithPublicOrganizationData]: + ) -> models.OrganizationInvitationsWithPublicOrganizationData: r"""Get a list of organization invitations for the current instance This request returns the list of organization invitations for the instance. @@ -236,8 +235,7 @@ async def get_all_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): return unmarshal_json_response( - Optional[models.OrganizationInvitationsWithPublicOrganizationData], - http_res, + models.OrganizationInvitationsWithPublicOrganizationData, http_res ) if utils.match_response(http_res, ["400", "404", "422"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) @@ -269,7 +267,7 @@ def create( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.OrganizationInvitation]: + ) -> models.OrganizationInvitation: r"""Create and send an organization invitation Creates a new organization invitation and sends an email to the provided `email_address` with a link to accept the invitation and join the organization. @@ -378,9 +376,7 @@ def create( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.OrganizationInvitation], http_res - ) + return unmarshal_json_response(models.OrganizationInvitation, http_res) if utils.match_response( http_res, ["400", "403", "404", "422"], "application/json" ): @@ -410,7 +406,7 @@ async def create_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.OrganizationInvitation]: + ) -> models.OrganizationInvitation: r"""Create and send an organization invitation Creates a new organization invitation and sends an email to the provided `email_address` with a link to accept the invitation and join the organization. @@ -519,9 +515,7 @@ async def create_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.OrganizationInvitation], http_res - ) + return unmarshal_json_response(models.OrganizationInvitation, http_res) if utils.match_response( http_res, ["400", "403", "404", "422"], "application/json" ): @@ -549,7 +543,7 @@ def list( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.OrganizationInvitations]: + ) -> models.OrganizationInvitations: r"""Get a list of organization invitations This request returns the list of organization invitations. @@ -640,9 +634,7 @@ def list( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.OrganizationInvitations], http_res - ) + return unmarshal_json_response(models.OrganizationInvitations, http_res) if utils.match_response(http_res, ["400", "404", "422"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -668,7 +660,7 @@ async def list_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.OrganizationInvitations]: + ) -> models.OrganizationInvitations: r"""Get a list of organization invitations This request returns the list of organization invitations. @@ -759,9 +751,7 @@ async def list_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.OrganizationInvitations], http_res - ) + return unmarshal_json_response(models.OrganizationInvitations, http_res) if utils.match_response(http_res, ["400", "404", "422"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -786,10 +776,13 @@ def bulk_create( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.OrganizationInvitations]: + ) -> models.OrganizationInvitations: r"""Bulk create and send organization invitations Creates new organization invitations in bulk and sends out emails to the provided email addresses with a link to accept the invitation and join the organization. + + This endpoint is limited to a maximum of 10 invitations per API call. If you need to send more invitations, please make multiple requests. + You can specify a different `role` for each invited organization member. New organization invitations get a \"pending\" status until they are revoked by an organization administrator or accepted by the invitee. The request body supports passing an optional `redirect_url` parameter for each invitation. @@ -877,9 +870,7 @@ def bulk_create( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.OrganizationInvitations], http_res - ) + return unmarshal_json_response(models.OrganizationInvitations, http_res) if utils.match_response( http_res, ["400", "403", "404", "422"], "application/json" ): @@ -906,10 +897,13 @@ async def bulk_create_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.OrganizationInvitations]: + ) -> models.OrganizationInvitations: r"""Bulk create and send organization invitations Creates new organization invitations in bulk and sends out emails to the provided email addresses with a link to accept the invitation and join the organization. + + This endpoint is limited to a maximum of 10 invitations per API call. If you need to send more invitations, please make multiple requests. + You can specify a different `role` for each invited organization member. New organization invitations get a \"pending\" status until they are revoked by an organization administrator or accepted by the invitee. The request body supports passing an optional `redirect_url` parameter for each invitation. @@ -997,9 +991,7 @@ async def bulk_create_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.OrganizationInvitations], http_res - ) + return unmarshal_json_response(models.OrganizationInvitations, http_res) if utils.match_response( http_res, ["400", "403", "404", "422"], "application/json" ): @@ -1027,7 +1019,7 @@ def list_pending( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.OrganizationInvitations]: + ) -> models.OrganizationInvitations: r"""Get a list of pending organization invitations This request returns the list of organization invitations with \"pending\" status. @@ -1107,9 +1099,7 @@ def list_pending( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.OrganizationInvitations], http_res - ) + return unmarshal_json_response(models.OrganizationInvitations, http_res) if utils.match_response(http_res, ["400", "404"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -1135,7 +1125,7 @@ async def list_pending_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.OrganizationInvitations]: + ) -> models.OrganizationInvitations: r"""Get a list of pending organization invitations This request returns the list of organization invitations with \"pending\" status. @@ -1215,9 +1205,7 @@ async def list_pending_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.OrganizationInvitations], http_res - ) + return unmarshal_json_response(models.OrganizationInvitations, http_res) if utils.match_response(http_res, ["400", "404"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -1239,7 +1227,7 @@ def get( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.OrganizationInvitation]: + ) -> models.OrganizationInvitation: r"""Retrieve an organization invitation by ID Use this request to get an existing organization invitation by ID. @@ -1309,9 +1297,7 @@ def get( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.OrganizationInvitation], http_res - ) + return unmarshal_json_response(models.OrganizationInvitation, http_res) if utils.match_response(http_res, ["400", "403", "404"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -1333,7 +1319,7 @@ async def get_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.OrganizationInvitation]: + ) -> models.OrganizationInvitation: r"""Retrieve an organization invitation by ID Use this request to get an existing organization invitation by ID. @@ -1403,9 +1389,7 @@ async def get_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.OrganizationInvitation], http_res - ) + return unmarshal_json_response(models.OrganizationInvitation, http_res) if utils.match_response(http_res, ["400", "403", "404"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -1428,7 +1412,7 @@ def revoke( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.OrganizationInvitation]: + ) -> models.OrganizationInvitation: r"""Revoke a pending organization invitation Use this request to revoke a previously issued organization invitation. @@ -1514,9 +1498,7 @@ def revoke( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.OrganizationInvitation], http_res - ) + return unmarshal_json_response(models.OrganizationInvitation, http_res) if utils.match_response(http_res, ["400", "403", "404"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -1539,7 +1521,7 @@ async def revoke_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.OrganizationInvitation]: + ) -> models.OrganizationInvitation: r"""Revoke a pending organization invitation Use this request to revoke a previously issued organization invitation. @@ -1625,9 +1607,7 @@ async def revoke_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.OrganizationInvitation], http_res - ) + return unmarshal_json_response(models.OrganizationInvitation, http_res) if utils.match_response(http_res, ["400", "403", "404"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) diff --git a/src/clerk_backend_api/organizationmemberships_sdk.py b/src/clerk_backend_api/organizationmemberships_sdk.py index 8060e774..66d34538 100644 --- a/src/clerk_backend_api/organizationmemberships_sdk.py +++ b/src/clerk_backend_api/organizationmemberships_sdk.py @@ -19,7 +19,7 @@ def create( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.OrganizationMembership]: + ) -> models.OrganizationMembership: r"""Create a new organization membership Adds a user as a member to the given organization. @@ -100,9 +100,7 @@ def create( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.OrganizationMembership], http_res - ) + return unmarshal_json_response(models.OrganizationMembership, http_res) if utils.match_response( http_res, ["400", "403", "404", "422"], "application/json" ): @@ -127,7 +125,7 @@ async def create_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.OrganizationMembership]: + ) -> models.OrganizationMembership: r"""Create a new organization membership Adds a user as a member to the given organization. @@ -208,9 +206,7 @@ async def create_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.OrganizationMembership], http_res - ) + return unmarshal_json_response(models.OrganizationMembership, http_res) if utils.match_response( http_res, ["400", "403", "404", "422"], "application/json" ): @@ -251,7 +247,7 @@ def list( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.OrganizationMemberships]: + ) -> models.OrganizationMemberships: r"""Get a list of all members of an organization Retrieves all user memberships for the given organization @@ -374,9 +370,7 @@ def list( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.OrganizationMemberships], http_res - ) + return unmarshal_json_response(models.OrganizationMemberships, http_res) if utils.match_response(http_res, ["401", "422"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -415,7 +409,7 @@ async def list_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.OrganizationMemberships]: + ) -> models.OrganizationMemberships: r"""Get a list of all members of an organization Retrieves all user memberships for the given organization @@ -538,9 +532,7 @@ async def list_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.OrganizationMemberships], http_res - ) + return unmarshal_json_response(models.OrganizationMemberships, http_res) if utils.match_response(http_res, ["401", "422"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -563,7 +555,7 @@ def update( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.OrganizationMembership]: + ) -> models.OrganizationMembership: r"""Update an organization membership Updates the properties of an existing organization membership @@ -644,9 +636,7 @@ def update( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.OrganizationMembership], http_res - ) + return unmarshal_json_response(models.OrganizationMembership, http_res) if utils.match_response(http_res, ["404", "422"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -669,7 +659,7 @@ async def update_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.OrganizationMembership]: + ) -> models.OrganizationMembership: r"""Update an organization membership Updates the properties of an existing organization membership @@ -750,9 +740,7 @@ async def update_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.OrganizationMembership], http_res - ) + return unmarshal_json_response(models.OrganizationMembership, http_res) if utils.match_response(http_res, ["404", "422"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -774,7 +762,7 @@ def delete( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.OrganizationMembership]: + ) -> models.OrganizationMembership: r"""Remove a member from an organization Removes the given membership from the organization @@ -844,9 +832,7 @@ def delete( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.OrganizationMembership], http_res - ) + return unmarshal_json_response(models.OrganizationMembership, http_res) if utils.match_response(http_res, ["401", "404", "422"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -868,7 +854,7 @@ async def delete_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.OrganizationMembership]: + ) -> models.OrganizationMembership: r"""Remove a member from an organization Removes the given membership from the organization @@ -938,9 +924,7 @@ async def delete_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.OrganizationMembership], http_res - ) + return unmarshal_json_response(models.OrganizationMembership, http_res) if utils.match_response(http_res, ["401", "404", "422"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -964,7 +948,7 @@ def update_metadata( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.OrganizationMembership]: + ) -> models.OrganizationMembership: r"""Merge and update organization membership metadata Update an organization membership's metadata attributes by merging existing values with the provided parameters. @@ -1051,9 +1035,7 @@ def update_metadata( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.OrganizationMembership], http_res - ) + return unmarshal_json_response(models.OrganizationMembership, http_res) if utils.match_response(http_res, ["400", "404", "422"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -1077,7 +1059,7 @@ async def update_metadata_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.OrganizationMembership]: + ) -> models.OrganizationMembership: r"""Merge and update organization membership metadata Update an organization membership's metadata attributes by merging existing values with the provided parameters. @@ -1164,9 +1146,7 @@ async def update_metadata_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.OrganizationMembership], http_res - ) + return unmarshal_json_response(models.OrganizationMembership, http_res) if utils.match_response(http_res, ["400", "404", "422"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) diff --git a/src/clerk_backend_api/organizations_sdk.py b/src/clerk_backend_api/organizations_sdk.py index 31cb9587..0cc6e00e 100644 --- a/src/clerk_backend_api/organizations_sdk.py +++ b/src/clerk_backend_api/organizations_sdk.py @@ -24,7 +24,7 @@ def list( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.Organizations]: + ) -> models.Organizations: r"""Get a list of organizations for an instance This request returns the list of organizations for an instance. @@ -123,7 +123,7 @@ def list( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.Organizations], http_res) + return unmarshal_json_response(models.Organizations, http_res) if utils.match_response(http_res, ["400", "403", "422"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -151,7 +151,7 @@ async def list_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.Organizations]: + ) -> models.Organizations: r"""Get a list of organizations for an instance This request returns the list of organizations for an instance. @@ -250,7 +250,7 @@ async def list_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.Organizations], http_res) + return unmarshal_json_response(models.Organizations, http_res) if utils.match_response(http_res, ["400", "403", "422"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -276,7 +276,7 @@ def create( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.Organization]: + ) -> models.Organization: r"""Create an organization Creates a new organization with the given name for an instance. @@ -362,7 +362,7 @@ def create( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.Organization], http_res) + return unmarshal_json_response(models.Organization, http_res) if utils.match_response(http_res, ["400", "403", "422"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -388,7 +388,7 @@ async def create_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.Organization]: + ) -> models.Organization: r"""Create an organization Creates a new organization with the given name for an instance. @@ -474,7 +474,7 @@ async def create_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.Organization], http_res) + return unmarshal_json_response(models.Organization, http_res) if utils.match_response(http_res, ["400", "403", "422"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -497,7 +497,7 @@ def get( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.Organization]: + ) -> models.Organization: r"""Retrieve an organization by ID or slug Fetches the organization whose ID or slug matches the provided `id_or_slug` URL query parameter. @@ -569,7 +569,7 @@ def get( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.Organization], http_res) + return unmarshal_json_response(models.Organization, http_res) if utils.match_response(http_res, ["403", "404"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -592,7 +592,7 @@ async def get_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.Organization]: + ) -> models.Organization: r"""Retrieve an organization by ID or slug Fetches the organization whose ID or slug matches the provided `id_or_slug` URL query parameter. @@ -664,7 +664,7 @@ async def get_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.Organization], http_res) + return unmarshal_json_response(models.Organization, http_res) if utils.match_response(http_res, ["403", "404"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -692,7 +692,7 @@ def update( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.Organization]: + ) -> models.Organization: r"""Update an organization Updates an existing organization @@ -785,7 +785,7 @@ def update( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.Organization], http_res) + return unmarshal_json_response(models.Organization, http_res) if utils.match_response( http_res, ["402", "403", "404", "422"], "application/json" ): @@ -815,7 +815,7 @@ async def update_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.Organization]: + ) -> models.Organization: r"""Update an organization Updates an existing organization @@ -908,7 +908,7 @@ async def update_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.Organization], http_res) + return unmarshal_json_response(models.Organization, http_res) if utils.match_response( http_res, ["402", "403", "404", "422"], "application/json" ): @@ -931,7 +931,7 @@ def delete( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.DeletedObject]: + ) -> models.DeletedObject: r"""Delete an organization Deletes the given organization. @@ -1001,7 +1001,7 @@ def delete( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.DeletedObject], http_res) + return unmarshal_json_response(models.DeletedObject, http_res) if utils.match_response(http_res, "404", "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -1022,7 +1022,7 @@ async def delete_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.DeletedObject]: + ) -> models.DeletedObject: r"""Delete an organization Deletes the given organization. @@ -1092,7 +1092,7 @@ async def delete_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.DeletedObject], http_res) + return unmarshal_json_response(models.DeletedObject, http_res) if utils.match_response(http_res, "404", "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -1115,7 +1115,7 @@ def merge_metadata( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.Organization]: + ) -> models.Organization: r"""Merge and update metadata for an organization Update organization metadata attributes by merging existing values with the provided parameters. @@ -1201,7 +1201,7 @@ def merge_metadata( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.Organization], http_res) + return unmarshal_json_response(models.Organization, http_res) if utils.match_response( http_res, ["400", "401", "404", "422"], "application/json" ): @@ -1226,7 +1226,7 @@ async def merge_metadata_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.Organization]: + ) -> models.Organization: r"""Merge and update metadata for an organization Update organization metadata attributes by merging existing values with the provided parameters. @@ -1312,7 +1312,7 @@ async def merge_metadata_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.Organization], http_res) + return unmarshal_json_response(models.Organization, http_res) if utils.match_response( http_res, ["400", "401", "404", "422"], "application/json" ): @@ -1340,7 +1340,7 @@ def upload_logo( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.OrganizationWithLogo]: + ) -> models.OrganizationWithLogo: r"""Upload a logo for the organization Set or replace an organization's logo, by uploading an image file. @@ -1424,9 +1424,7 @@ def upload_logo( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.OrganizationWithLogo], http_res - ) + return unmarshal_json_response(models.OrganizationWithLogo, http_res) if utils.match_response( http_res, ["400", "403", "404", "413"], "application/json" ): @@ -1454,7 +1452,7 @@ async def upload_logo_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.OrganizationWithLogo]: + ) -> models.OrganizationWithLogo: r"""Upload a logo for the organization Set or replace an organization's logo, by uploading an image file. @@ -1538,9 +1536,7 @@ async def upload_logo_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.OrganizationWithLogo], http_res - ) + return unmarshal_json_response(models.OrganizationWithLogo, http_res) if utils.match_response( http_res, ["400", "403", "404", "413"], "application/json" ): @@ -1563,7 +1559,7 @@ def delete_logo( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.Organization]: + ) -> models.Organization: r"""Delete the organization's logo. Delete the organization's logo. @@ -1631,7 +1627,7 @@ def delete_logo( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.Organization], http_res) + return unmarshal_json_response(models.Organization, http_res) if utils.match_response(http_res, "404", "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -1652,7 +1648,7 @@ async def delete_logo_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.Organization]: + ) -> models.Organization: r"""Delete the organization's logo. Delete the organization's logo. @@ -1720,7 +1716,7 @@ async def delete_logo_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.Organization], http_res) + return unmarshal_json_response(models.Organization, http_res) if utils.match_response(http_res, "404", "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -1741,7 +1737,7 @@ def get_billing_subscription( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.CommerceSubscription]: + ) -> models.CommerceSubscription: r"""Retrieve an organization's billing subscription Retrieves the billing subscription for the specified organization. @@ -1811,9 +1807,7 @@ def get_billing_subscription( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.CommerceSubscription], http_res - ) + return unmarshal_json_response(models.CommerceSubscription, http_res) if utils.match_response( http_res, ["400", "401", "403", "404", "422"], "application/json" ): @@ -1839,7 +1833,7 @@ async def get_billing_subscription_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.CommerceSubscription]: + ) -> models.CommerceSubscription: r"""Retrieve an organization's billing subscription Retrieves the billing subscription for the specified organization. @@ -1909,9 +1903,7 @@ async def get_billing_subscription_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.CommerceSubscription], http_res - ) + return unmarshal_json_response(models.CommerceSubscription, http_res) if utils.match_response( http_res, ["400", "401", "403", "404", "422"], "application/json" ): diff --git a/src/clerk_backend_api/phonenumbers.py b/src/clerk_backend_api/phonenumbers.py index 07973354..fd7d17b3 100644 --- a/src/clerk_backend_api/phonenumbers.py +++ b/src/clerk_backend_api/phonenumbers.py @@ -22,7 +22,7 @@ def create( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.PhoneNumber]: + ) -> models.PhoneNumber: r"""Create a phone number Create a new phone number @@ -99,7 +99,7 @@ def create( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.PhoneNumber], http_res) + return unmarshal_json_response(models.PhoneNumber, http_res) if utils.match_response( http_res, ["400", "401", "403", "404", "422"], "application/json" ): @@ -127,7 +127,7 @@ async def create_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.PhoneNumber]: + ) -> models.PhoneNumber: r"""Create a phone number Create a new phone number @@ -204,7 +204,7 @@ async def create_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.PhoneNumber], http_res) + return unmarshal_json_response(models.PhoneNumber, http_res) if utils.match_response( http_res, ["400", "401", "403", "404", "422"], "application/json" ): @@ -227,7 +227,7 @@ def get( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.PhoneNumber]: + ) -> models.PhoneNumber: r"""Retrieve a phone number Returns the details of a phone number @@ -295,7 +295,7 @@ def get( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.PhoneNumber], http_res) + return unmarshal_json_response(models.PhoneNumber, http_res) if utils.match_response( http_res, ["400", "401", "403", "404"], "application/json" ): @@ -318,7 +318,7 @@ async def get_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.PhoneNumber]: + ) -> models.PhoneNumber: r"""Retrieve a phone number Returns the details of a phone number @@ -386,7 +386,7 @@ async def get_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.PhoneNumber], http_res) + return unmarshal_json_response(models.PhoneNumber, http_res) if utils.match_response( http_res, ["400", "401", "403", "404"], "application/json" ): @@ -409,7 +409,7 @@ def delete( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.DeletedObject]: + ) -> models.DeletedObject: r"""Delete a phone number Delete the phone number with the given ID @@ -477,7 +477,7 @@ def delete( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.DeletedObject], http_res) + return unmarshal_json_response(models.DeletedObject, http_res) if utils.match_response( http_res, ["400", "401", "403", "404"], "application/json" ): @@ -500,7 +500,7 @@ async def delete_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.DeletedObject]: + ) -> models.DeletedObject: r"""Delete a phone number Delete the phone number with the given ID @@ -568,7 +568,7 @@ async def delete_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.DeletedObject], http_res) + return unmarshal_json_response(models.DeletedObject, http_res) if utils.match_response( http_res, ["400", "401", "403", "404"], "application/json" ): @@ -594,7 +594,7 @@ def update( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.PhoneNumber]: + ) -> models.PhoneNumber: r"""Update a phone number Updates a phone number @@ -679,7 +679,7 @@ def update( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.PhoneNumber], http_res) + return unmarshal_json_response(models.PhoneNumber, http_res) if utils.match_response( http_res, ["400", "401", "403", "404"], "application/json" ): @@ -705,7 +705,7 @@ async def update_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.PhoneNumber]: + ) -> models.PhoneNumber: r"""Update a phone number Updates a phone number @@ -790,7 +790,7 @@ async def update_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.PhoneNumber], http_res) + return unmarshal_json_response(models.PhoneNumber, http_res) if utils.match_response( http_res, ["400", "401", "403", "404"], "application/json" ): diff --git a/src/clerk_backend_api/proxychecks.py b/src/clerk_backend_api/proxychecks.py index 474cbbb9..69ca1af6 100644 --- a/src/clerk_backend_api/proxychecks.py +++ b/src/clerk_backend_api/proxychecks.py @@ -22,7 +22,7 @@ def verify( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.ProxyCheck]: + ) -> models.ProxyCheck: r"""Verify the proxy configuration for your domain This endpoint can be used to validate that a proxy-enabled domain is operational. @@ -106,7 +106,7 @@ def verify( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.ProxyCheck], http_res) + return unmarshal_json_response(models.ProxyCheck, http_res) if utils.match_response(http_res, ["400", "422"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -132,7 +132,7 @@ async def verify_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.ProxyCheck]: + ) -> models.ProxyCheck: r"""Verify the proxy configuration for your domain This endpoint can be used to validate that a proxy-enabled domain is operational. @@ -216,7 +216,7 @@ async def verify_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.ProxyCheck], http_res) + return unmarshal_json_response(models.ProxyCheck, http_res) if utils.match_response(http_res, ["400", "422"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) diff --git a/src/clerk_backend_api/redirecturls.py b/src/clerk_backend_api/redirecturls.py index 21ca59e2..fe72e02f 100644 --- a/src/clerk_backend_api/redirecturls.py +++ b/src/clerk_backend_api/redirecturls.py @@ -19,7 +19,7 @@ def list( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[List[models.RedirectURL]]: + ) -> List[models.RedirectURL]: r"""List all redirect URLs Lists all whitelisted redirect_urls for the instance @@ -95,7 +95,7 @@ def list( ) if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[List[models.RedirectURL]], http_res) + return unmarshal_json_response(List[models.RedirectURL], http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) raise models.SDKError("API error occurred", http_res, http_res_text) @@ -115,7 +115,7 @@ async def list_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[List[models.RedirectURL]]: + ) -> List[models.RedirectURL]: r"""List all redirect URLs Lists all whitelisted redirect_urls for the instance @@ -191,7 +191,7 @@ async def list_async( ) if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[List[models.RedirectURL]], http_res) + return unmarshal_json_response(List[models.RedirectURL], http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise models.SDKError("API error occurred", http_res, http_res_text) @@ -214,7 +214,7 @@ def create( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.RedirectURL]: + ) -> models.RedirectURL: r"""Create a redirect URL Create a redirect URL @@ -291,7 +291,7 @@ def create( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.RedirectURL], http_res) + return unmarshal_json_response(models.RedirectURL, http_res) if utils.match_response(http_res, ["400", "422"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -317,7 +317,7 @@ async def create_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.RedirectURL]: + ) -> models.RedirectURL: r"""Create a redirect URL Create a redirect URL @@ -394,7 +394,7 @@ async def create_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.RedirectURL], http_res) + return unmarshal_json_response(models.RedirectURL, http_res) if utils.match_response(http_res, ["400", "422"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -415,7 +415,7 @@ def get( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.RedirectURL]: + ) -> models.RedirectURL: r"""Retrieve a redirect URL Retrieve the details of the redirect URL with the given ID @@ -483,7 +483,7 @@ def get( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.RedirectURL], http_res) + return unmarshal_json_response(models.RedirectURL, http_res) if utils.match_response(http_res, "404", "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -504,7 +504,7 @@ async def get_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.RedirectURL]: + ) -> models.RedirectURL: r"""Retrieve a redirect URL Retrieve the details of the redirect URL with the given ID @@ -572,7 +572,7 @@ async def get_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.RedirectURL], http_res) + return unmarshal_json_response(models.RedirectURL, http_res) if utils.match_response(http_res, "404", "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -593,7 +593,7 @@ def delete( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.DeletedObject]: + ) -> models.DeletedObject: r"""Delete a redirect URL Remove the selected redirect URL from the whitelist of the instance @@ -661,7 +661,7 @@ def delete( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.DeletedObject], http_res) + return unmarshal_json_response(models.DeletedObject, http_res) if utils.match_response(http_res, "404", "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -682,7 +682,7 @@ async def delete_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.DeletedObject]: + ) -> models.DeletedObject: r"""Delete a redirect URL Remove the selected redirect URL from the whitelist of the instance @@ -750,7 +750,7 @@ async def delete_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.DeletedObject], http_res) + return unmarshal_json_response(models.DeletedObject, http_res) if utils.match_response(http_res, "404", "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) diff --git a/src/clerk_backend_api/samlconnections_sdk.py b/src/clerk_backend_api/samlconnections_sdk.py index f53b1394..e211e439 100644 --- a/src/clerk_backend_api/samlconnections_sdk.py +++ b/src/clerk_backend_api/samlconnections_sdk.py @@ -21,7 +21,7 @@ def list( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.SAMLConnections]: + ) -> models.SAMLConnections: r"""Get a list of SAML Connections for an instance Returns the list of SAML Connections for an instance. @@ -110,7 +110,7 @@ def list( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.SAMLConnections], http_res) + return unmarshal_json_response(models.SAMLConnections, http_res) if utils.match_response(http_res, ["402", "403", "422"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -135,7 +135,7 @@ async def list_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.SAMLConnections]: + ) -> models.SAMLConnections: r"""Get a list of SAML Connections for an instance Returns the list of SAML Connections for an instance. @@ -224,7 +224,7 @@ async def list_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.SAMLConnections], http_res) + return unmarshal_json_response(models.SAMLConnections, http_res) if utils.match_response(http_res, ["402", "403", "422"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -250,7 +250,7 @@ def create( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.SchemasSAMLConnection]: + ) -> models.SchemasSAMLConnection: r"""Create a SAML Connection Create a new SAML Connection. @@ -327,9 +327,7 @@ def create( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.SchemasSAMLConnection], http_res - ) + return unmarshal_json_response(models.SchemasSAMLConnection, http_res) if utils.match_response( http_res, ["402", "403", "404", "422"], "application/json" ): @@ -357,7 +355,7 @@ async def create_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.SchemasSAMLConnection]: + ) -> models.SchemasSAMLConnection: r"""Create a SAML Connection Create a new SAML Connection. @@ -434,9 +432,7 @@ async def create_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.SchemasSAMLConnection], http_res - ) + return unmarshal_json_response(models.SchemasSAMLConnection, http_res) if utils.match_response( http_res, ["402", "403", "404", "422"], "application/json" ): @@ -459,7 +455,7 @@ def get( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.SchemasSAMLConnection]: + ) -> models.SchemasSAMLConnection: r"""Retrieve a SAML Connection by ID Fetches the SAML Connection whose ID matches the provided `saml_connection_id` in the path. @@ -527,9 +523,7 @@ def get( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.SchemasSAMLConnection], http_res - ) + return unmarshal_json_response(models.SchemasSAMLConnection, http_res) if utils.match_response(http_res, ["402", "403", "404"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -550,7 +544,7 @@ async def get_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.SchemasSAMLConnection]: + ) -> models.SchemasSAMLConnection: r"""Retrieve a SAML Connection by ID Fetches the SAML Connection whose ID matches the provided `saml_connection_id` in the path. @@ -618,9 +612,7 @@ async def get_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.SchemasSAMLConnection], http_res - ) + return unmarshal_json_response(models.SchemasSAMLConnection, http_res) if utils.match_response(http_res, ["402", "403", "404"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -659,7 +651,7 @@ def update( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.SchemasSAMLConnection]: + ) -> models.SchemasSAMLConnection: r"""Update a SAML Connection Updates the SAML Connection whose ID matches the provided `id` in the path. @@ -770,9 +762,7 @@ def update( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.SchemasSAMLConnection], http_res - ) + return unmarshal_json_response(models.SchemasSAMLConnection, http_res) if utils.match_response( http_res, ["402", "403", "404", "422"], "application/json" ): @@ -813,7 +803,7 @@ async def update_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.SchemasSAMLConnection]: + ) -> models.SchemasSAMLConnection: r"""Update a SAML Connection Updates the SAML Connection whose ID matches the provided `id` in the path. @@ -924,9 +914,7 @@ async def update_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.SchemasSAMLConnection], http_res - ) + return unmarshal_json_response(models.SchemasSAMLConnection, http_res) if utils.match_response( http_res, ["402", "403", "404", "422"], "application/json" ): @@ -949,7 +937,7 @@ def delete( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.DeletedObject]: + ) -> models.DeletedObject: r"""Delete a SAML Connection Deletes the SAML Connection whose ID matches the provided `id` in the path. @@ -1017,7 +1005,7 @@ def delete( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.DeletedObject], http_res) + return unmarshal_json_response(models.DeletedObject, http_res) if utils.match_response(http_res, ["402", "403", "404"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -1038,7 +1026,7 @@ async def delete_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.DeletedObject]: + ) -> models.DeletedObject: r"""Delete a SAML Connection Deletes the SAML Connection whose ID matches the provided `id` in the path. @@ -1106,7 +1094,7 @@ async def delete_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.DeletedObject], http_res) + return unmarshal_json_response(models.DeletedObject, http_res) if utils.match_response(http_res, ["402", "403", "404"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) diff --git a/src/clerk_backend_api/sdk.py b/src/clerk_backend_api/sdk.py index 9bb86fae..96b13f36 100644 --- a/src/clerk_backend_api/sdk.py +++ b/src/clerk_backend_api/sdk.py @@ -30,7 +30,6 @@ from clerk_backend_api.billing import Billing from clerk_backend_api.blocklistidentifiers_sdk import BlocklistIdentifiersSDK from clerk_backend_api.clients import Clients - from clerk_backend_api.commerce import Commerce from clerk_backend_api.domains_sdk import DomainsSDK from clerk_backend_api.emailaddresses import EmailAddresses from clerk_backend_api.emailandsmstemplates import EmailAndSmsTemplates @@ -106,7 +105,6 @@ class Clerk(BaseSDK): saml_connections: "SamlConnectionsSDK" testing_tokens: "TestingTokens" waitlist_entries: "WaitlistEntriesSDK" - commerce: "Commerce" billing: "Billing" m2m: "M2m" oauth_access_tokens: "OauthAccessTokens" @@ -176,7 +174,6 @@ class Clerk(BaseSDK): "clerk_backend_api.waitlistentries_sdk", "WaitlistEntriesSDK", ), - "commerce": ("clerk_backend_api.commerce", "Commerce"), "billing": ("clerk_backend_api.billing", "Billing"), "m2m": ("clerk_backend_api.m2m", "M2m"), "oauth_access_tokens": ( diff --git a/src/clerk_backend_api/sessions.py b/src/clerk_backend_api/sessions.py index 140cf7cc..7c3a08f7 100644 --- a/src/clerk_backend_api/sessions.py +++ b/src/clerk_backend_api/sessions.py @@ -22,7 +22,7 @@ def list( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[List[models.Session]]: + ) -> List[models.Session]: r"""List all sessions Returns a list of all sessions. @@ -108,7 +108,7 @@ def list( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[List[models.Session]], http_res) + return unmarshal_json_response(List[models.Session], http_res) if utils.match_response(http_res, ["400", "401", "422"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -134,7 +134,7 @@ async def list_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[List[models.Session]]: + ) -> List[models.Session]: r"""List all sessions Returns a list of all sessions. @@ -220,7 +220,7 @@ async def list_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[List[models.Session]], http_res) + return unmarshal_json_response(List[models.Session], http_res) if utils.match_response(http_res, ["400", "401", "422"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -246,7 +246,7 @@ def create( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.Session]: + ) -> models.Session: r"""Create a new active session Create a new active session for the provided user ID. @@ -322,7 +322,7 @@ def create( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.Session], http_res) + return unmarshal_json_response(models.Session, http_res) if utils.match_response( http_res, ["400", "401", "404", "422"], "application/json" ): @@ -350,7 +350,7 @@ async def create_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.Session]: + ) -> models.Session: r"""Create a new active session Create a new active session for the provided user ID. @@ -426,7 +426,7 @@ async def create_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.Session], http_res) + return unmarshal_json_response(models.Session, http_res) if utils.match_response( http_res, ["400", "401", "404", "422"], "application/json" ): @@ -449,7 +449,7 @@ def get( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.Session]: + ) -> models.Session: r"""Retrieve a session Retrieve the details of a session @@ -517,7 +517,7 @@ def get( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.Session], http_res) + return unmarshal_json_response(models.Session, http_res) if utils.match_response(http_res, ["400", "401", "404"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -538,7 +538,7 @@ async def get_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.Session]: + ) -> models.Session: r"""Retrieve a session Retrieve the details of a session @@ -606,7 +606,7 @@ async def get_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.Session], http_res) + return unmarshal_json_response(models.Session, http_res) if utils.match_response(http_res, ["400", "401", "404"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -633,7 +633,7 @@ def refresh( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.SessionRefresh]: + ) -> models.SessionRefresh: r"""Refresh a session Refreshes a session by creating a new session token. A 401 is returned when there @@ -724,7 +724,7 @@ def refresh( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.SessionRefresh], http_res) + return unmarshal_json_response(models.SessionRefresh, http_res) if utils.match_response(http_res, ["400", "401"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -751,7 +751,7 @@ async def refresh_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.SessionRefresh]: + ) -> models.SessionRefresh: r"""Refresh a session Refreshes a session by creating a new session token. A 401 is returned when there @@ -842,7 +842,7 @@ async def refresh_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.SessionRefresh], http_res) + return unmarshal_json_response(models.SessionRefresh, http_res) if utils.match_response(http_res, ["400", "401"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -863,7 +863,7 @@ def revoke( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.Session]: + ) -> models.Session: r"""Revoke a session Sets the status of a session as \"revoked\", which is an unauthenticated state. @@ -932,7 +932,7 @@ def revoke( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.Session], http_res) + return unmarshal_json_response(models.Session, http_res) if utils.match_response(http_res, ["400", "401", "404"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -953,7 +953,7 @@ async def revoke_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.Session]: + ) -> models.Session: r"""Revoke a session Sets the status of a session as \"revoked\", which is an unauthenticated state. @@ -1022,7 +1022,7 @@ async def revoke_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.Session], http_res) + return unmarshal_json_response(models.Session, http_res) if utils.match_response(http_res, ["400", "401", "404"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -1044,7 +1044,7 @@ def create_token( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.CreateSessionTokenResponseBody]: + ) -> models.CreateSessionTokenResponseBody: r"""Create a session token Creates a session JSON Web Token (JWT) based on a session. @@ -1124,7 +1124,7 @@ def create_token( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): return unmarshal_json_response( - Optional[models.CreateSessionTokenResponseBody], http_res + models.CreateSessionTokenResponseBody, http_res ) if utils.match_response(http_res, ["401", "404"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) @@ -1147,7 +1147,7 @@ async def create_token_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.CreateSessionTokenResponseBody]: + ) -> models.CreateSessionTokenResponseBody: r"""Create a session token Creates a session JSON Web Token (JWT) based on a session. @@ -1227,7 +1227,7 @@ async def create_token_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): return unmarshal_json_response( - Optional[models.CreateSessionTokenResponseBody], http_res + models.CreateSessionTokenResponseBody, http_res ) if utils.match_response(http_res, ["401", "404"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) @@ -1251,7 +1251,7 @@ def create_token_from_template( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.CreateSessionTokenFromTemplateResponseBody]: + ) -> models.CreateSessionTokenFromTemplateResponseBody: r"""Create a session token from a JWT template Creates a JSON Web Token (JWT) based on a session and a JWT Template name defined for your instance @@ -1333,7 +1333,7 @@ def create_token_from_template( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): return unmarshal_json_response( - Optional[models.CreateSessionTokenFromTemplateResponseBody], http_res + models.CreateSessionTokenFromTemplateResponseBody, http_res ) if utils.match_response(http_res, ["401", "404"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) @@ -1357,7 +1357,7 @@ async def create_token_from_template_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.CreateSessionTokenFromTemplateResponseBody]: + ) -> models.CreateSessionTokenFromTemplateResponseBody: r"""Create a session token from a JWT template Creates a JSON Web Token (JWT) based on a session and a JWT Template name defined for your instance @@ -1439,7 +1439,7 @@ async def create_token_from_template_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): return unmarshal_json_response( - Optional[models.CreateSessionTokenFromTemplateResponseBody], http_res + models.CreateSessionTokenFromTemplateResponseBody, http_res ) if utils.match_response(http_res, ["401", "404"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) diff --git a/src/clerk_backend_api/signintokens.py b/src/clerk_backend_api/signintokens.py index b8331292..98753d32 100644 --- a/src/clerk_backend_api/signintokens.py +++ b/src/clerk_backend_api/signintokens.py @@ -22,7 +22,7 @@ def create( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.SignInToken]: + ) -> models.SignInToken: r"""Create sign-in token Creates a new sign-in token and associates it with the given user. @@ -101,7 +101,7 @@ def create( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.SignInToken], http_res) + return unmarshal_json_response(models.SignInToken, http_res) if utils.match_response(http_res, ["404", "422"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -127,7 +127,7 @@ async def create_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.SignInToken]: + ) -> models.SignInToken: r"""Create sign-in token Creates a new sign-in token and associates it with the given user. @@ -206,7 +206,7 @@ async def create_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.SignInToken], http_res) + return unmarshal_json_response(models.SignInToken, http_res) if utils.match_response(http_res, ["404", "422"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -227,7 +227,7 @@ def revoke( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.SignInToken]: + ) -> models.SignInToken: r"""Revoke the given sign-in token Revokes a pending sign-in token @@ -295,7 +295,7 @@ def revoke( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.SignInToken], http_res) + return unmarshal_json_response(models.SignInToken, http_res) if utils.match_response(http_res, ["400", "404"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -316,7 +316,7 @@ async def revoke_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.SignInToken]: + ) -> models.SignInToken: r"""Revoke the given sign-in token Revokes a pending sign-in token @@ -384,7 +384,7 @@ async def revoke_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.SignInToken], http_res) + return unmarshal_json_response(models.SignInToken, http_res) if utils.match_response(http_res, ["400", "404"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) diff --git a/src/clerk_backend_api/signups.py b/src/clerk_backend_api/signups.py index eb889552..707da306 100644 --- a/src/clerk_backend_api/signups.py +++ b/src/clerk_backend_api/signups.py @@ -17,7 +17,7 @@ def get( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.SignUp]: + ) -> models.SignUp: r"""Retrieve a sign-up by ID Retrieve the details of the sign-up with the given ID @@ -85,7 +85,7 @@ def get( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.SignUp], http_res) + return unmarshal_json_response(models.SignUp, http_res) if utils.match_response(http_res, "403", "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -106,7 +106,7 @@ async def get_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.SignUp]: + ) -> models.SignUp: r"""Retrieve a sign-up by ID Retrieve the details of the sign-up with the given ID @@ -174,7 +174,7 @@ async def get_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.SignUp], http_res) + return unmarshal_json_response(models.SignUp, http_res) if utils.match_response(http_res, "403", "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -197,7 +197,7 @@ def update( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.SignUp]: + ) -> models.SignUp: r"""Update a sign-up Update the sign-up with the given ID @@ -279,7 +279,7 @@ def update( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.SignUp], http_res) + return unmarshal_json_response(models.SignUp, http_res) if utils.match_response(http_res, "403", "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -302,7 +302,7 @@ async def update_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.SignUp]: + ) -> models.SignUp: r"""Update a sign-up Update the sign-up with the given ID @@ -384,7 +384,7 @@ async def update_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.SignUp], http_res) + return unmarshal_json_response(models.SignUp, http_res) if utils.match_response(http_res, "403", "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) diff --git a/src/clerk_backend_api/templates.py b/src/clerk_backend_api/templates.py index ec125e6a..d186b3c9 100644 --- a/src/clerk_backend_api/templates.py +++ b/src/clerk_backend_api/templates.py @@ -26,7 +26,7 @@ def preview( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.PreviewTemplateResponseBody]: + ) -> models.PreviewTemplateResponseBody: r"""Preview changes to a template Returns a preview of a template for a given template_type, slug and body @@ -118,9 +118,7 @@ def preview( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.PreviewTemplateResponseBody], http_res - ) + return unmarshal_json_response(models.PreviewTemplateResponseBody, http_res) if utils.match_response( http_res, ["400", "401", "404", "422"], "application/json" ): @@ -151,7 +149,7 @@ async def preview_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.PreviewTemplateResponseBody]: + ) -> models.PreviewTemplateResponseBody: r"""Preview changes to a template Returns a preview of a template for a given template_type, slug and body @@ -243,9 +241,7 @@ async def preview_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.PreviewTemplateResponseBody], http_res - ) + return unmarshal_json_response(models.PreviewTemplateResponseBody, http_res) if utils.match_response( http_res, ["400", "401", "404", "422"], "application/json" ): diff --git a/src/clerk_backend_api/testingtokens.py b/src/clerk_backend_api/testingtokens.py index ebb3fb2a..11ffcf4f 100644 --- a/src/clerk_backend_api/testingtokens.py +++ b/src/clerk_backend_api/testingtokens.py @@ -16,7 +16,7 @@ def create( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.TestingToken]: + ) -> models.TestingToken: r"""Retrieve a new testing token Retrieve a new testing token. @@ -77,7 +77,7 @@ def create( ) if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.TestingToken], http_res) + return unmarshal_json_response(models.TestingToken, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) raise models.SDKError("API error occurred", http_res, http_res_text) @@ -94,7 +94,7 @@ async def create_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.TestingToken]: + ) -> models.TestingToken: r"""Retrieve a new testing token Retrieve a new testing token. @@ -155,7 +155,7 @@ async def create_async( ) if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.TestingToken], http_res) + return unmarshal_json_response(models.TestingToken, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise models.SDKError("API error occurred", http_res, http_res_text) diff --git a/src/clerk_backend_api/users.py b/src/clerk_backend_api/users.py index af18fb1b..c5bdcfac 100644 --- a/src/clerk_backend_api/users.py +++ b/src/clerk_backend_api/users.py @@ -19,7 +19,7 @@ def list( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[List[models.User]]: + ) -> List[models.User]: r"""List all users Returns a list of all users. @@ -88,7 +88,7 @@ def list( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[List[models.User]], http_res) + return unmarshal_json_response(List[models.User], http_res) if utils.match_response(http_res, ["400", "401", "422"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -111,7 +111,7 @@ async def list_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[List[models.User]]: + ) -> List[models.User]: r"""List all users Returns a list of all users. @@ -180,7 +180,7 @@ async def list_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[List[models.User]], http_res) + return unmarshal_json_response(List[models.User], http_res) if utils.match_response(http_res, ["400", "401", "422"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -224,7 +224,7 @@ def create( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.User]: + ) -> models.User: r"""Create a new user Creates a new user. Your user management settings determine how you should setup your user model. @@ -379,7 +379,7 @@ def create( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.User], http_res) + return unmarshal_json_response(models.User, http_res) if utils.match_response( http_res, ["400", "401", "403", "422"], "application/json" ): @@ -425,7 +425,7 @@ async def create_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.User]: + ) -> models.User: r"""Create a new user Creates a new user. Your user management settings determine how you should setup your user model. @@ -580,7 +580,7 @@ async def create_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.User], http_res) + return unmarshal_json_response(models.User, http_res) if utils.match_response( http_res, ["400", "401", "403", "422"], "application/json" ): @@ -620,7 +620,7 @@ def count( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.TotalCount]: + ) -> models.TotalCount: r"""Count users Returns a total count of all users that match the given filtering criteria. @@ -750,7 +750,7 @@ def count( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.TotalCount], http_res) + return unmarshal_json_response(models.TotalCount, http_res) if utils.match_response(http_res, "422", "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -788,7 +788,7 @@ async def count_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.TotalCount]: + ) -> models.TotalCount: r"""Count users Returns a total count of all users that match the given filtering criteria. @@ -918,7 +918,7 @@ async def count_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.TotalCount], http_res) + return unmarshal_json_response(models.TotalCount, http_res) if utils.match_response(http_res, "422", "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -939,7 +939,7 @@ def get( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.User]: + ) -> models.User: r"""Retrieve a user Retrieve the details of a user @@ -1007,7 +1007,7 @@ def get( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.User], http_res) + return unmarshal_json_response(models.User, http_res) if utils.match_response(http_res, ["400", "401", "404"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -1028,7 +1028,7 @@ async def get_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.User]: + ) -> models.User: r"""Retrieve a user Retrieve the details of a user @@ -1096,7 +1096,7 @@ async def get_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.User], http_res) + return unmarshal_json_response(models.User, http_res) if utils.match_response(http_res, ["400", "401", "404"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -1143,7 +1143,7 @@ def update( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.User]: + ) -> models.User: r"""Update a user Update a user's attributes. @@ -1302,7 +1302,7 @@ def update( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.User], http_res) + return unmarshal_json_response(models.User, http_res) if utils.match_response( http_res, ["400", "401", "404", "422"], "application/json" ): @@ -1351,7 +1351,7 @@ async def update_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.User]: + ) -> models.User: r"""Update a user Update a user's attributes. @@ -1510,7 +1510,7 @@ async def update_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.User], http_res) + return unmarshal_json_response(models.User, http_res) if utils.match_response( http_res, ["400", "401", "404", "422"], "application/json" ): @@ -1533,7 +1533,7 @@ def delete( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.DeletedObject]: + ) -> models.DeletedObject: r"""Delete a user Delete the specified user @@ -1601,7 +1601,7 @@ def delete( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.DeletedObject], http_res) + return unmarshal_json_response(models.DeletedObject, http_res) if utils.match_response(http_res, ["400", "401", "404"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -1622,7 +1622,7 @@ async def delete_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.DeletedObject]: + ) -> models.DeletedObject: r"""Delete a user Delete the specified user @@ -1690,7 +1690,7 @@ async def delete_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.DeletedObject], http_res) + return unmarshal_json_response(models.DeletedObject, http_res) if utils.match_response(http_res, ["400", "401", "404"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -1711,7 +1711,7 @@ def ban( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.User]: + ) -> models.User: r"""Ban a user Marks the given user as banned, which means that all their sessions are revoked and they are not allowed to sign in again. @@ -1779,7 +1779,7 @@ def ban( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.User], http_res) + return unmarshal_json_response(models.User, http_res) if utils.match_response(http_res, "402", "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -1800,7 +1800,7 @@ async def ban_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.User]: + ) -> models.User: r"""Ban a user Marks the given user as banned, which means that all their sessions are revoked and they are not allowed to sign in again. @@ -1868,7 +1868,7 @@ async def ban_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.User], http_res) + return unmarshal_json_response(models.User, http_res) if utils.match_response(http_res, "402", "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -1889,7 +1889,7 @@ def unban( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.User]: + ) -> models.User: r"""Unban a user Removes the ban mark from the given user. @@ -1957,7 +1957,7 @@ def unban( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.User], http_res) + return unmarshal_json_response(models.User, http_res) if utils.match_response(http_res, "402", "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -1978,7 +1978,7 @@ async def unban_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.User]: + ) -> models.User: r"""Unban a user Removes the ban mark from the given user. @@ -2046,7 +2046,7 @@ async def unban_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.User], http_res) + return unmarshal_json_response(models.User, http_res) if utils.match_response(http_res, "402", "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -2067,7 +2067,7 @@ def bulk_ban( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[List[models.User]]: + ) -> List[models.User]: r"""Ban multiple users Marks multiple users as banned, which means that all their sessions are revoked and they are not allowed to sign in again. @@ -2138,7 +2138,7 @@ def bulk_ban( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[List[models.User]], http_res) + return unmarshal_json_response(List[models.User], http_res) if utils.match_response(http_res, ["400", "402"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -2159,7 +2159,7 @@ async def bulk_ban_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[List[models.User]]: + ) -> List[models.User]: r"""Ban multiple users Marks multiple users as banned, which means that all their sessions are revoked and they are not allowed to sign in again. @@ -2230,7 +2230,7 @@ async def bulk_ban_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[List[models.User]], http_res) + return unmarshal_json_response(List[models.User], http_res) if utils.match_response(http_res, ["400", "402"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -2251,7 +2251,7 @@ def bulk_unban( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[List[models.User]]: + ) -> List[models.User]: r"""Unban multiple users Removes the ban mark from multiple users. @@ -2322,7 +2322,7 @@ def bulk_unban( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[List[models.User]], http_res) + return unmarshal_json_response(List[models.User], http_res) if utils.match_response(http_res, ["400", "402"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -2343,7 +2343,7 @@ async def bulk_unban_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[List[models.User]]: + ) -> List[models.User]: r"""Unban multiple users Removes the ban mark from multiple users. @@ -2414,7 +2414,7 @@ async def bulk_unban_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[List[models.User]], http_res) + return unmarshal_json_response(List[models.User], http_res) if utils.match_response(http_res, ["400", "402"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -2435,7 +2435,7 @@ def lock( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.User]: + ) -> models.User: r"""Lock a user Marks the given user as locked, which means they are not allowed to sign in again until the lock expires. @@ -2504,7 +2504,7 @@ def lock( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.User], http_res) + return unmarshal_json_response(models.User, http_res) if utils.match_response(http_res, "403", "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -2525,7 +2525,7 @@ async def lock_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.User]: + ) -> models.User: r"""Lock a user Marks the given user as locked, which means they are not allowed to sign in again until the lock expires. @@ -2594,7 +2594,7 @@ async def lock_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.User], http_res) + return unmarshal_json_response(models.User, http_res) if utils.match_response(http_res, "403", "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -2615,7 +2615,7 @@ def unlock( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.User]: + ) -> models.User: r"""Unlock a user Removes the lock from the given user. @@ -2683,7 +2683,7 @@ def unlock( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.User], http_res) + return unmarshal_json_response(models.User, http_res) if utils.match_response(http_res, "403", "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -2704,7 +2704,7 @@ async def unlock_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.User]: + ) -> models.User: r"""Unlock a user Removes the lock from the given user. @@ -2772,7 +2772,7 @@ async def unlock_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.User], http_res) + return unmarshal_json_response(models.User, http_res) if utils.match_response(http_res, "403", "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -2794,7 +2794,7 @@ def set_profile_image( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.User]: + ) -> models.User: r"""Set user profile image Update a user's profile image @@ -2873,7 +2873,7 @@ def set_profile_image( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.User], http_res) + return unmarshal_json_response(models.User, http_res) if utils.match_response(http_res, ["400", "401", "404"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -2895,7 +2895,7 @@ async def set_profile_image_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.User]: + ) -> models.User: r"""Set user profile image Update a user's profile image @@ -2974,7 +2974,7 @@ async def set_profile_image_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.User], http_res) + return unmarshal_json_response(models.User, http_res) if utils.match_response(http_res, ["400", "401", "404"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -2995,7 +2995,7 @@ def delete_profile_image( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.User]: + ) -> models.User: r"""Delete user profile image Delete a user's profile image @@ -3063,7 +3063,7 @@ def delete_profile_image( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.User], http_res) + return unmarshal_json_response(models.User, http_res) if utils.match_response(http_res, "404", "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -3084,7 +3084,7 @@ async def delete_profile_image_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.User]: + ) -> models.User: r"""Delete user profile image Delete a user's profile image @@ -3152,7 +3152,7 @@ async def delete_profile_image_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.User], http_res) + return unmarshal_json_response(models.User, http_res) if utils.match_response(http_res, "404", "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -3176,7 +3176,7 @@ def update_metadata( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.User]: + ) -> models.User: r"""Merge and update a user's metadata Update a user's metadata attributes by merging existing values with the provided parameters. @@ -3271,7 +3271,7 @@ def update_metadata( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.User], http_res) + return unmarshal_json_response(models.User, http_res) if utils.match_response( http_res, ["400", "401", "404", "422"], "application/json" ): @@ -3297,7 +3297,7 @@ async def update_metadata_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.User]: + ) -> models.User: r"""Merge and update a user's metadata Update a user's metadata attributes by merging existing values with the provided parameters. @@ -3392,7 +3392,7 @@ async def update_metadata_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.User], http_res) + return unmarshal_json_response(models.User, http_res) if utils.match_response( http_res, ["400", "401", "404", "422"], "application/json" ): @@ -3415,7 +3415,7 @@ def get_billing_subscription( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.CommerceSubscription]: + ) -> models.CommerceSubscription: r"""Retrieve a user's billing subscription Retrieves the billing subscription for the specified user. @@ -3485,9 +3485,7 @@ def get_billing_subscription( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.CommerceSubscription], http_res - ) + return unmarshal_json_response(models.CommerceSubscription, http_res) if utils.match_response( http_res, ["400", "401", "403", "404", "422"], "application/json" ): @@ -3513,7 +3511,7 @@ async def get_billing_subscription_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.CommerceSubscription]: + ) -> models.CommerceSubscription: r"""Retrieve a user's billing subscription Retrieves the billing subscription for the specified user. @@ -3583,9 +3581,7 @@ async def get_billing_subscription_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.CommerceSubscription], http_res - ) + return unmarshal_json_response(models.CommerceSubscription, http_res) if utils.match_response( http_res, ["400", "401", "403", "404", "422"], "application/json" ): @@ -3615,7 +3611,7 @@ def get_o_auth_access_token( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[List[models.OAuthAccessToken]]: + ) -> List[models.OAuthAccessToken]: r"""Retrieve the OAuth access token of a user Fetch the corresponding OAuth access token for a user that has previously authenticated with a particular OAuth provider. @@ -3697,9 +3693,7 @@ def get_o_auth_access_token( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[List[models.OAuthAccessToken]], http_res - ) + return unmarshal_json_response(List[models.OAuthAccessToken], http_res) if utils.match_response(http_res, ["400", "404", "422"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -3724,7 +3718,7 @@ async def get_o_auth_access_token_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[List[models.OAuthAccessToken]]: + ) -> List[models.OAuthAccessToken]: r"""Retrieve the OAuth access token of a user Fetch the corresponding OAuth access token for a user that has previously authenticated with a particular OAuth provider. @@ -3806,9 +3800,7 @@ async def get_o_auth_access_token_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[List[models.OAuthAccessToken]], http_res - ) + return unmarshal_json_response(List[models.OAuthAccessToken], http_res) if utils.match_response(http_res, ["400", "404", "422"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -3831,7 +3823,7 @@ def get_organization_memberships( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.OrganizationMemberships]: + ) -> models.OrganizationMemberships: r"""Retrieve all memberships for a user Retrieve a paginated list of the user's organization memberships @@ -3906,9 +3898,7 @@ def get_organization_memberships( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.OrganizationMemberships], http_res - ) + return unmarshal_json_response(models.OrganizationMemberships, http_res) if utils.match_response(http_res, "403", "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -3931,7 +3921,7 @@ async def get_organization_memberships_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.OrganizationMemberships]: + ) -> models.OrganizationMemberships: r"""Retrieve all memberships for a user Retrieve a paginated list of the user's organization memberships @@ -4006,9 +3996,7 @@ async def get_organization_memberships_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.OrganizationMemberships], http_res - ) + return unmarshal_json_response(models.OrganizationMemberships, http_res) if utils.match_response(http_res, "403", "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -4032,7 +4020,7 @@ def get_organization_invitations( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.OrganizationInvitationsWithPublicOrganizationData]: + ) -> models.OrganizationInvitationsWithPublicOrganizationData: r"""Retrieve all invitations for a user Retrieve a paginated list of the user's organization invitations @@ -4110,8 +4098,7 @@ def get_organization_invitations( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): return unmarshal_json_response( - Optional[models.OrganizationInvitationsWithPublicOrganizationData], - http_res, + models.OrganizationInvitationsWithPublicOrganizationData, http_res ) if utils.match_response(http_res, ["400", "403", "404"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) @@ -4136,7 +4123,7 @@ async def get_organization_invitations_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.OrganizationInvitationsWithPublicOrganizationData]: + ) -> models.OrganizationInvitationsWithPublicOrganizationData: r"""Retrieve all invitations for a user Retrieve a paginated list of the user's organization invitations @@ -4214,8 +4201,7 @@ async def get_organization_invitations_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): return unmarshal_json_response( - Optional[models.OrganizationInvitationsWithPublicOrganizationData], - http_res, + models.OrganizationInvitationsWithPublicOrganizationData, http_res ) if utils.match_response(http_res, ["400", "403", "404"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) @@ -4238,7 +4224,7 @@ def verify_password( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.VerifyPasswordResponseBody]: + ) -> models.VerifyPasswordResponseBody: r"""Verify the password of a user Check that the user's password matches the supplied input. @@ -4318,9 +4304,7 @@ def verify_password( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.VerifyPasswordResponseBody], http_res - ) + return unmarshal_json_response(models.VerifyPasswordResponseBody, http_res) if utils.match_response(http_res, "500", "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -4342,7 +4326,7 @@ async def verify_password_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.VerifyPasswordResponseBody]: + ) -> models.VerifyPasswordResponseBody: r"""Verify the password of a user Check that the user's password matches the supplied input. @@ -4422,9 +4406,7 @@ async def verify_password_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.VerifyPasswordResponseBody], http_res - ) + return unmarshal_json_response(models.VerifyPasswordResponseBody, http_res) if utils.match_response(http_res, "500", "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -4446,7 +4428,7 @@ def verify_totp( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.VerifyTOTPResponseBody]: + ) -> models.VerifyTOTPResponseBody: r"""Verify a TOTP or backup code for a user Verify that the provided TOTP or backup code is valid for the user. @@ -4528,9 +4510,7 @@ def verify_totp( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.VerifyTOTPResponseBody], http_res - ) + return unmarshal_json_response(models.VerifyTOTPResponseBody, http_res) if utils.match_response(http_res, "500", "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -4552,7 +4532,7 @@ async def verify_totp_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.VerifyTOTPResponseBody]: + ) -> models.VerifyTOTPResponseBody: r"""Verify a TOTP or backup code for a user Verify that the provided TOTP or backup code is valid for the user. @@ -4634,9 +4614,7 @@ async def verify_totp_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.VerifyTOTPResponseBody], http_res - ) + return unmarshal_json_response(models.VerifyTOTPResponseBody, http_res) if utils.match_response(http_res, "500", "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -4657,7 +4635,7 @@ def disable_mfa( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.DisableMFAResponseBody]: + ) -> models.DisableMFAResponseBody: r"""Disable a user's MFA methods Disable all of a user's MFA methods (e.g. OTP sent via SMS, TOTP on their authenticator app) at once. @@ -4725,9 +4703,7 @@ def disable_mfa( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.DisableMFAResponseBody], http_res - ) + return unmarshal_json_response(models.DisableMFAResponseBody, http_res) if utils.match_response(http_res, "404", "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -4751,7 +4727,7 @@ async def disable_mfa_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.DisableMFAResponseBody]: + ) -> models.DisableMFAResponseBody: r"""Disable a user's MFA methods Disable all of a user's MFA methods (e.g. OTP sent via SMS, TOTP on their authenticator app) at once. @@ -4819,9 +4795,7 @@ async def disable_mfa_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.DisableMFAResponseBody], http_res - ) + return unmarshal_json_response(models.DisableMFAResponseBody, http_res) if utils.match_response(http_res, "404", "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -4845,7 +4819,7 @@ def delete_backup_codes( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.DeleteBackupCodeResponseBody]: + ) -> models.DeleteBackupCodeResponseBody: r"""Disable all user's Backup codes Disable all of a user's backup codes. @@ -4914,7 +4888,7 @@ def delete_backup_codes( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): return unmarshal_json_response( - Optional[models.DeleteBackupCodeResponseBody], http_res + models.DeleteBackupCodeResponseBody, http_res ) if utils.match_response(http_res, "404", "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) @@ -4939,7 +4913,7 @@ async def delete_backup_codes_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.DeleteBackupCodeResponseBody]: + ) -> models.DeleteBackupCodeResponseBody: r"""Disable all user's Backup codes Disable all of a user's backup codes. @@ -5008,7 +4982,7 @@ async def delete_backup_codes_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): return unmarshal_json_response( - Optional[models.DeleteBackupCodeResponseBody], http_res + models.DeleteBackupCodeResponseBody, http_res ) if utils.match_response(http_res, "404", "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) @@ -5034,7 +5008,7 @@ def delete_passkey( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.DeletedObject]: + ) -> models.DeletedObject: r"""Delete a user passkey Delete the passkey identification for a given user and notify them through email. @@ -5104,7 +5078,7 @@ def delete_passkey( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.DeletedObject], http_res) + return unmarshal_json_response(models.DeletedObject, http_res) if utils.match_response(http_res, ["403", "404"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -5129,7 +5103,7 @@ async def delete_passkey_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.DeletedObject]: + ) -> models.DeletedObject: r"""Delete a user passkey Delete the passkey identification for a given user and notify them through email. @@ -5199,7 +5173,7 @@ async def delete_passkey_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.DeletedObject], http_res) + return unmarshal_json_response(models.DeletedObject, http_res) if utils.match_response(http_res, ["403", "404"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -5224,7 +5198,7 @@ def delete_web3_wallet( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.DeletedObject]: + ) -> models.DeletedObject: r"""Delete a user web3 wallet Delete the web3 wallet identification for a given user. @@ -5294,7 +5268,7 @@ def delete_web3_wallet( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.DeletedObject], http_res) + return unmarshal_json_response(models.DeletedObject, http_res) if utils.match_response(http_res, ["400", "403", "404"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -5319,7 +5293,7 @@ async def delete_web3_wallet_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.DeletedObject]: + ) -> models.DeletedObject: r"""Delete a user web3 wallet Delete the web3 wallet identification for a given user. @@ -5389,7 +5363,7 @@ async def delete_web3_wallet_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.DeletedObject], http_res) + return unmarshal_json_response(models.DeletedObject, http_res) if utils.match_response(http_res, ["400", "403", "404"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -5413,7 +5387,7 @@ def delete_totp( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.DeleteTOTPResponseBody]: + ) -> models.DeleteTOTPResponseBody: r"""Delete all the user's TOTPs Deletes all of the user's TOTPs. @@ -5481,9 +5455,7 @@ def delete_totp( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.DeleteTOTPResponseBody], http_res - ) + return unmarshal_json_response(models.DeleteTOTPResponseBody, http_res) if utils.match_response(http_res, "404", "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -5507,7 +5479,7 @@ async def delete_totp_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.DeleteTOTPResponseBody]: + ) -> models.DeleteTOTPResponseBody: r"""Delete all the user's TOTPs Deletes all of the user's TOTPs. @@ -5575,9 +5547,7 @@ async def delete_totp_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.DeleteTOTPResponseBody], http_res - ) + return unmarshal_json_response(models.DeleteTOTPResponseBody, http_res) if utils.match_response(http_res, "404", "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -5602,7 +5572,7 @@ def delete_external_account( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.DeletedObject]: + ) -> models.DeletedObject: r"""Delete External Account Delete an external account by ID. @@ -5672,7 +5642,7 @@ def delete_external_account( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.DeletedObject], http_res) + return unmarshal_json_response(models.DeletedObject, http_res) if utils.match_response(http_res, ["400", "403", "404"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -5697,7 +5667,7 @@ async def delete_external_account_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.DeletedObject]: + ) -> models.DeletedObject: r"""Delete External Account Delete an external account by ID. @@ -5767,7 +5737,7 @@ async def delete_external_account_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.DeletedObject], http_res) + return unmarshal_json_response(models.DeletedObject, http_res) if utils.match_response(http_res, ["400", "403", "404"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -5793,7 +5763,7 @@ def get_instance_organization_memberships( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.OrganizationMemberships]: + ) -> models.OrganizationMemberships: r"""Get a list of all organization memberships within an instance. Retrieves all organization user memberships for the given instance. @@ -5870,9 +5840,7 @@ def get_instance_organization_memberships( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.OrganizationMemberships], http_res - ) + return unmarshal_json_response(models.OrganizationMemberships, http_res) if utils.match_response(http_res, ["400", "401", "422"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -5898,7 +5866,7 @@ async def get_instance_organization_memberships_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.OrganizationMemberships]: + ) -> models.OrganizationMemberships: r"""Get a list of all organization memberships within an instance. Retrieves all organization user memberships for the given instance. @@ -5975,9 +5943,7 @@ async def get_instance_organization_memberships_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response( - Optional[models.OrganizationMemberships], http_res - ) + return unmarshal_json_response(models.OrganizationMemberships, http_res) if utils.match_response(http_res, ["400", "401", "422"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) diff --git a/src/clerk_backend_api/utils/unmarshal_json_response.py b/src/clerk_backend_api/utils/unmarshal_json_response.py index 7c93a703..4171551b 100644 --- a/src/clerk_backend_api/utils/unmarshal_json_response.py +++ b/src/clerk_backend_api/utils/unmarshal_json_response.py @@ -1,12 +1,26 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -from typing import Any, Optional +from typing import Any, Optional, Type, TypeVar, overload import httpx from .serializers import unmarshal_json from clerk_backend_api import models +T = TypeVar("T") + + +@overload +def unmarshal_json_response( + typ: Type[T], http_res: httpx.Response, body: Optional[str] = None +) -> T: ... + + +@overload +def unmarshal_json_response( + typ: Any, http_res: httpx.Response, body: Optional[str] = None +) -> Any: ... + def unmarshal_json_response( typ: Any, http_res: httpx.Response, body: Optional[str] = None diff --git a/src/clerk_backend_api/waitlistentries_sdk.py b/src/clerk_backend_api/waitlistentries_sdk.py index 97c61fee..6e7b8257 100644 --- a/src/clerk_backend_api/waitlistentries_sdk.py +++ b/src/clerk_backend_api/waitlistentries_sdk.py @@ -21,7 +21,7 @@ def list( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.WaitlistEntries]: + ) -> models.WaitlistEntries: r"""List all waitlist entries Retrieve a list of waitlist entries for the instance. @@ -106,7 +106,7 @@ def list( ) if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.WaitlistEntries], http_res) + return unmarshal_json_response(models.WaitlistEntries, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) raise models.SDKError("API error occurred", http_res, http_res_text) @@ -128,7 +128,7 @@ async def list_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.WaitlistEntries]: + ) -> models.WaitlistEntries: r"""List all waitlist entries Retrieve a list of waitlist entries for the instance. @@ -213,7 +213,7 @@ async def list_async( ) if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.WaitlistEntries], http_res) + return unmarshal_json_response(models.WaitlistEntries, http_res) if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise models.SDKError("API error occurred", http_res, http_res_text) @@ -236,7 +236,7 @@ def create( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.WaitlistEntry]: + ) -> models.WaitlistEntry: r"""Create a waitlist entry Creates a new waitlist entry for the given email address. @@ -314,7 +314,7 @@ def create( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.WaitlistEntry], http_res) + return unmarshal_json_response(models.WaitlistEntry, http_res) if utils.match_response(http_res, ["400", "422"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -340,7 +340,7 @@ async def create_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.WaitlistEntry]: + ) -> models.WaitlistEntry: r"""Create a waitlist entry Creates a new waitlist entry for the given email address. @@ -418,7 +418,7 @@ async def create_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.WaitlistEntry], http_res) + return unmarshal_json_response(models.WaitlistEntry, http_res) if utils.match_response(http_res, ["400", "422"], "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -439,7 +439,7 @@ def delete( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.DeletedObject]: + ) -> models.DeletedObject: r"""Delete a pending waitlist entry Delete a pending waitlist entry. @@ -507,7 +507,7 @@ def delete( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.DeletedObject], http_res) + return unmarshal_json_response(models.DeletedObject, http_res) if utils.match_response( http_res, ["400", "404", "409", "422"], "application/json" ): @@ -530,7 +530,7 @@ async def delete_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.DeletedObject]: + ) -> models.DeletedObject: r"""Delete a pending waitlist entry Delete a pending waitlist entry. @@ -598,7 +598,7 @@ async def delete_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.DeletedObject], http_res) + return unmarshal_json_response(models.DeletedObject, http_res) if utils.match_response( http_res, ["400", "404", "409", "422"], "application/json" ): @@ -622,7 +622,7 @@ def invite( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.WaitlistEntry]: + ) -> models.WaitlistEntry: r"""Invite a waitlist entry Send an invite to the email address in a waitlist entry. @@ -701,7 +701,7 @@ def invite( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.WaitlistEntry], http_res) + return unmarshal_json_response(models.WaitlistEntry, http_res) if utils.match_response( http_res, ["400", "404", "409", "422"], "application/json" ): @@ -725,7 +725,7 @@ async def invite_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.WaitlistEntry]: + ) -> models.WaitlistEntry: r"""Invite a waitlist entry Send an invite to the email address in a waitlist entry. @@ -804,7 +804,7 @@ async def invite_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.WaitlistEntry], http_res) + return unmarshal_json_response(models.WaitlistEntry, http_res) if utils.match_response( http_res, ["400", "404", "409", "422"], "application/json" ): @@ -827,7 +827,7 @@ def reject( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.WaitlistEntry]: + ) -> models.WaitlistEntry: r"""Reject a waitlist entry Reject a waitlist entry. @@ -895,7 +895,7 @@ def reject( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.WaitlistEntry], http_res) + return unmarshal_json_response(models.WaitlistEntry, http_res) if utils.match_response( http_res, ["400", "404", "409", "422"], "application/json" ): @@ -918,7 +918,7 @@ async def reject_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.WaitlistEntry]: + ) -> models.WaitlistEntry: r"""Reject a waitlist entry Reject a waitlist entry. @@ -986,7 +986,7 @@ async def reject_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.WaitlistEntry], http_res) + return unmarshal_json_response(models.WaitlistEntry, http_res) if utils.match_response( http_res, ["400", "404", "409", "422"], "application/json" ): diff --git a/src/clerk_backend_api/webhooks.py b/src/clerk_backend_api/webhooks.py index f0df2bfe..08ad146f 100644 --- a/src/clerk_backend_api/webhooks.py +++ b/src/clerk_backend_api/webhooks.py @@ -16,7 +16,7 @@ def create_svix_app( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.SvixURL]: + ) -> models.SvixURL: r"""Create a Svix app Create a Svix app and associate it with the current instance @@ -78,7 +78,7 @@ def create_svix_app( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.SvixURL], http_res) + return unmarshal_json_response(models.SvixURL, http_res) if utils.match_response(http_res, "400", "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -98,7 +98,7 @@ async def create_svix_app_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.SvixURL]: + ) -> models.SvixURL: r"""Create a Svix app Create a Svix app and associate it with the current instance @@ -160,7 +160,7 @@ async def create_svix_app_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.SvixURL], http_res) + return unmarshal_json_response(models.SvixURL, http_res) if utils.match_response(http_res, "400", "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -344,7 +344,7 @@ def generate_svix_auth_url( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.SvixURL]: + ) -> models.SvixURL: r"""Create a Svix Dashboard URL Generate a new URL for accessing the Svix's management dashboard for that particular instance @@ -406,7 +406,7 @@ def generate_svix_auth_url( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.SvixURL], http_res) + return unmarshal_json_response(models.SvixURL, http_res) if utils.match_response(http_res, "400", "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) @@ -426,7 +426,7 @@ async def generate_svix_auth_url_async( server_url: Optional[str] = None, timeout_ms: Optional[int] = None, http_headers: Optional[Mapping[str, str]] = None, - ) -> Optional[models.SvixURL]: + ) -> models.SvixURL: r"""Create a Svix Dashboard URL Generate a new URL for accessing the Svix's management dashboard for that particular instance @@ -488,7 +488,7 @@ async def generate_svix_auth_url_async( response_data: Any = None if utils.match_response(http_res, "200", "application/json"): - return unmarshal_json_response(Optional[models.SvixURL], http_res) + return unmarshal_json_response(models.SvixURL, http_res) if utils.match_response(http_res, "400", "application/json"): response_data = unmarshal_json_response(models.ClerkErrorsData, http_res) raise models.ClerkErrors(response_data, http_res) From f87abd72d1963c3370e5938c3387b3b2748fcfdf Mon Sep 17 00:00:00 2001 From: "speakeasy-github[bot]" <128539517+speakeasy-github[bot]@users.noreply.github.com> Date: Tue, 18 Nov 2025 15:25:01 +0000 Subject: [PATCH 2/2] empty commit to trigger [run-tests] workflow