From b1f926d85f437661e5ed270dcc85a7c4b8e09c86 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Tue, 19 Aug 2025 14:44:53 +0000 Subject: [PATCH 1/2] ## SDK Changes Detected: * `clerk.commerce.list_subscription_items()`: **Added** * `clerk.email_addresses.create()`: `response.verification` **Changed** * `clerk.email_addresses.get()`: `response.verification` **Changed** * `clerk.email_addresses.update()`: `response.verification` **Changed** * `clerk.users.list()`: `response.[].email_addresses.[].verification` **Changed** * `clerk.users.create()`: `response.email_addresses.[].verification` **Changed** * `clerk.users.get()`: `response.email_addresses.[].verification` **Changed** * `clerk.users.update()`: `response.email_addresses.[].verification` **Changed** * `clerk.users.ban()`: `response.email_addresses.[].verification` **Changed** * `clerk.users.unban()`: `response.email_addresses.[].verification` **Changed** * `clerk.users.bulk_ban()`: `response.[].email_addresses.[].verification` **Changed** * `clerk.users.bulk_unban()`: `response.[].email_addresses.[].verification` **Changed** * `clerk.users.lock()`: `response.email_addresses.[].verification` **Changed** * `clerk.users.unlock()`: `response.email_addresses.[].verification` **Changed** * `clerk.users.set_profile_image()`: `response.email_addresses.[].verification` **Changed** * `clerk.users.delete_profile_image()`: `response.email_addresses.[].verification` **Changed** * `clerk.users.update_metadata()`: `response.email_addresses.[].verification` **Changed** * `clerk.commerce.list_plans()`: `response.data.[]` **Changed** --- .speakeasy/gen.lock | 90 +- .speakeasy/gen.yaml | 2 +- .speakeasy/workflow.lock | 14 +- README.md | 23 +- RELEASES.md | 12 +- docs/models/amount.md | 13 + ...accountwithverificationverificationmeta.md | 7 + docs/models/commerceplan.md | 4 +- docs/models/commercesubscriptionitem.md | 32 + docs/models/commercesubscriptionitemamount.md | 13 + ...mmercesubscriptionitemnextinvoiceamount.md | 13 + ...mmercesubscriptionitemnextpaymentamount.md | 13 + docs/models/commercesubscriptionitemobject.md | 10 + .../commercesubscriptionitempayerobject.md | 10 + ...ercesubscriptionitempaymentsourceobject.md | 10 + ...ercesubscriptionitempaymentsourcestatus.md | 11 + .../commercesubscriptionitemplanobject.md | 10 + docs/models/commercesubscriptionitemstatus.md | 15 + docs/models/credit.md | 11 + docs/models/emaillink.md | 13 + ...rcesubscriptionitemlistqueryparamstatus.md | 14 + .../getcommercesubscriptionitemlistrequest.md | 15 + docs/models/lifetimepaid.md | 13 + docs/models/nextinvoice.md | 11 + docs/models/nextpayment.md | 11 + docs/models/oauth.md | 20 +- ...ginatedcommercesubscriptionitemresponse.md | 11 + docs/models/payer.md | 21 + docs/models/paymentmethod.md | 12 + docs/models/paymentsource.md | 26 + docs/models/plan.md | 38 + docs/models/planperiod.md | 11 + docs/models/queryparampayertype.md | 11 + docs/models/saml.md | 20 +- docs/models/samlaccountverification.md | 4 +- docs/models/verification.md | 12 + ...verificationemaillinkverificationobject.md | 8 + ...verificationemaillinkverificationstatus.md | 11 + ...rificationemaillinkverificationstrategy.md | 8 + docs/models/verificationerror.md | 4 +- ...verificationgoogleonetaperrorclerkerror.md | 14 +- .../verificationoautherrorclerkerror.md | 14 +- .../verificationoauthverificationerror.md | 11 + docs/models/verificationsaml.md | 15 + .../models/verificationsamlerrorclerkerror.md | 14 +- ...ificationsamlerrorsamlaccountclerkerror.md | 12 + .../verificationsamlverificationerror.md | 4 +- ...cationsamlverificationsamlaccountobject.md | 8 + ...cationsamlverificationsamlaccountstatus.md | 12 + ...tionsamlverificationsamlaccountstrategy.md | 8 + docs/sdks/betafeatures/README.md | 2 +- docs/sdks/commerce/README.md | 53 + docs/sdks/instancesettingssdk/README.md | 2 +- docs/sdks/organizationssdk/README.md | 2 +- pyproject.toml | 2 +- src/clerk_backend_api/_version.py | 6 +- src/clerk_backend_api/betafeatures.py | 4 +- src/clerk_backend_api/commerce.py | 232 +++++ src/clerk_backend_api/instancesettings_sdk.py | 4 +- src/clerk_backend_api/models/__init__.py | 212 +++- src/clerk_backend_api/models/commerceplan.py | 54 +- .../models/commercesubscriptionitem.py | 935 ++++++++++++++++++ src/clerk_backend_api/models/emailaddress.py | 193 +++- .../models/externalaccountwithverification.py | 30 +- .../getcommercesubscriptionitemlistop.py | 110 +++ ...ginatedcommercesubscriptionitemresponse.py | 29 + src/clerk_backend_api/models/samlaccount.py | 36 +- src/clerk_backend_api/organizations_sdk.py | 4 +- 68 files changed, 2488 insertions(+), 141 deletions(-) create mode 100644 docs/models/amount.md create mode 100644 docs/models/clerkerrorerrorexternalaccountwithverificationverificationmeta.md create mode 100644 docs/models/commercesubscriptionitem.md create mode 100644 docs/models/commercesubscriptionitemamount.md create mode 100644 docs/models/commercesubscriptionitemnextinvoiceamount.md create mode 100644 docs/models/commercesubscriptionitemnextpaymentamount.md create mode 100644 docs/models/commercesubscriptionitemobject.md create mode 100644 docs/models/commercesubscriptionitempayerobject.md create mode 100644 docs/models/commercesubscriptionitempaymentsourceobject.md create mode 100644 docs/models/commercesubscriptionitempaymentsourcestatus.md create mode 100644 docs/models/commercesubscriptionitemplanobject.md create mode 100644 docs/models/commercesubscriptionitemstatus.md create mode 100644 docs/models/credit.md create mode 100644 docs/models/emaillink.md create mode 100644 docs/models/getcommercesubscriptionitemlistqueryparamstatus.md create mode 100644 docs/models/getcommercesubscriptionitemlistrequest.md create mode 100644 docs/models/lifetimepaid.md create mode 100644 docs/models/nextinvoice.md create mode 100644 docs/models/nextpayment.md create mode 100644 docs/models/paginatedcommercesubscriptionitemresponse.md create mode 100644 docs/models/payer.md create mode 100644 docs/models/paymentmethod.md create mode 100644 docs/models/paymentsource.md create mode 100644 docs/models/plan.md create mode 100644 docs/models/planperiod.md create mode 100644 docs/models/queryparampayertype.md create mode 100644 docs/models/verificationemaillinkverificationobject.md create mode 100644 docs/models/verificationemaillinkverificationstatus.md create mode 100644 docs/models/verificationemaillinkverificationstrategy.md create mode 100644 docs/models/verificationoauthverificationerror.md create mode 100644 docs/models/verificationsaml.md create mode 100644 docs/models/verificationsamlerrorsamlaccountclerkerror.md create mode 100644 docs/models/verificationsamlverificationsamlaccountobject.md create mode 100644 docs/models/verificationsamlverificationsamlaccountstatus.md create mode 100644 docs/models/verificationsamlverificationsamlaccountstrategy.md create mode 100644 src/clerk_backend_api/models/commercesubscriptionitem.py create mode 100644 src/clerk_backend_api/models/getcommercesubscriptionitemlistop.py create mode 100644 src/clerk_backend_api/models/paginatedcommercesubscriptionitemresponse.py diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index fc34e674..8065d924 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: 5a5f39c7afdc37aeea3fa559ad548f89 + docChecksum: e5d8200d045bc9bf8fc8cb5c2bb4b89a docVersion: "2025-04-10" - speakeasyVersion: 1.605.1 - generationVersion: 2.684.0 - releaseVersion: 3.2.0 - configChecksum: 082ee01153c6a9a5a597b3bbc29676c8 + speakeasyVersion: 1.606.0 + generationVersion: 2.686.7 + releaseVersion: 3.2.1 + configChecksum: 9503895f2d5820fa42b417a9fe97bab2 repoURL: https://github.com/clerk/clerk-sdk-python.git installationURL: https://github.com/clerk/clerk-sdk-python.git published: true @@ -54,6 +54,7 @@ generatedFiles: - docs/models/admin.md - docs/models/allowlistidentifier.md - docs/models/allowlistidentifierobject.md + - docs/models/amount.md - docs/models/attributemapping.md - docs/models/awscredential.md - docs/models/banuserrequest.md @@ -65,6 +66,7 @@ generatedFiles: - docs/models/claims.md - docs/models/clerkerror.md - docs/models/clerkerrorerrorexternalaccountwithverificationmeta.md + - docs/models/clerkerrorerrorexternalaccountwithverificationverificationmeta.md - docs/models/clerkerrorerrormeta.md - docs/models/clerkerrorerrorsamlaccountmeta.md - docs/models/clerkerrors.md @@ -76,6 +78,16 @@ generatedFiles: - docs/models/commercemoneyresponse.md - docs/models/commerceplan.md - docs/models/commerceplanobject.md + - docs/models/commercesubscriptionitem.md + - docs/models/commercesubscriptionitemamount.md + - docs/models/commercesubscriptionitemnextinvoiceamount.md + - docs/models/commercesubscriptionitemnextpaymentamount.md + - docs/models/commercesubscriptionitemobject.md + - docs/models/commercesubscriptionitempayerobject.md + - docs/models/commercesubscriptionitempaymentsourceobject.md + - docs/models/commercesubscriptionitempaymentsourcestatus.md + - docs/models/commercesubscriptionitemplanobject.md + - docs/models/commercesubscriptionitemstatus.md - docs/models/cookies.md - docs/models/cookiesobject.md - docs/models/createactortokenactor.md @@ -122,6 +134,7 @@ generatedFiles: - docs/models/createsignintokenrequestbody.md - docs/models/createuserrequestbody.md - docs/models/createwaitlistentryrequestbody.md + - docs/models/credit.md - docs/models/deleteallowlistidentifierrequest.md - docs/models/deleteawscredentialrequest.md - docs/models/deletebackupcoderequest.md @@ -154,6 +167,7 @@ generatedFiles: - docs/models/domainsenrollmentmodes.md - docs/models/emailaddress.md - docs/models/emailaddressobject.md + - docs/models/emaillink.md - docs/models/enrollmentmode.md - docs/models/error.md - docs/models/errorclerkerror.md @@ -171,6 +185,8 @@ generatedFiles: - docs/models/getclientlistrequest.md - docs/models/getclientrequest.md - docs/models/getcommerceplanlistrequest.md + - docs/models/getcommercesubscriptionitemlistqueryparamstatus.md + - docs/models/getcommercesubscriptionitemlistrequest.md - docs/models/getemailaddressrequest.md - docs/models/getjwttemplaterequest.md - docs/models/getm2mtokenserrors.md @@ -220,6 +236,7 @@ generatedFiles: - docs/models/jwttemplate.md - docs/models/jwttemplateobject.md - docs/models/keys.md + - docs/models/lifetimepaid.md - docs/models/listallorganizationdomainsrequest.md - docs/models/listallowlistidentifiersrequest.md - docs/models/listinstanceorganizationinvitationsqueryparamstatus.md @@ -260,6 +277,8 @@ generatedFiles: - docs/models/mergeorganizationmetadatarequestbody.md - docs/models/meta.md - docs/models/nextaction.md + - docs/models/nextinvoice.md + - docs/models/nextpayment.md - docs/models/nonce.md - docs/models/oauth.md - docs/models/oauthaccesstoken.md @@ -298,14 +317,20 @@ generatedFiles: - docs/models/organizationwithlogoobject.md - docs/models/otp.md - docs/models/paginatedcommerceplanresponse.md + - docs/models/paginatedcommercesubscriptionitemresponse.md - docs/models/passkey.md - docs/models/passkeyobject.md - docs/models/passkeyverification.md - docs/models/pathparamtemplatetype.md + - docs/models/payer.md - docs/models/payertype.md + - docs/models/paymentmethod.md + - docs/models/paymentsource.md - docs/models/phonenumber.md - docs/models/phonenumberobject.md - docs/models/phonenumberverification.md + - docs/models/plan.md + - docs/models/planperiod.md - docs/models/previewtemplaterequest.md - docs/models/previewtemplaterequestbody.md - docs/models/previewtemplateresponsebody.md @@ -314,6 +339,7 @@ generatedFiles: - docs/models/proxycheckobject.md - docs/models/publicorganizationdata.md - docs/models/queryparamenrollmentmode.md + - docs/models/queryparampayertype.md - docs/models/queryparamstatus.md - docs/models/redirecturl.md - docs/models/redirecturlobject.md @@ -454,6 +480,9 @@ generatedFiles: - docs/models/verificationadminverificationweb3walletobject.md - docs/models/verificationadminverificationweb3walletstatus.md - docs/models/verificationadminverificationweb3walletstrategy.md + - docs/models/verificationemaillinkverificationobject.md + - docs/models/verificationemaillinkverificationstatus.md + - docs/models/verificationemaillinkverificationstrategy.md - docs/models/verificationerror.md - docs/models/verificationfromoauthverificationobject.md - docs/models/verificationfromoauthverificationstatus.md @@ -463,6 +492,7 @@ generatedFiles: - docs/models/verificationgoogleonetapverificationstatus.md - docs/models/verificationgoogleonetapverificationstrategy.md - docs/models/verificationoautherrorclerkerror.md + - docs/models/verificationoauthverificationerror.md - docs/models/verificationoauthverificationobject.md - docs/models/verificationoauthverificationstatus.md - docs/models/verificationobject.md @@ -474,9 +504,14 @@ generatedFiles: - docs/models/verificationpasskeyverificationobject.md - docs/models/verificationpasskeyverificationstatus.md - docs/models/verificationpasskeyverificationstrategy.md + - docs/models/verificationsaml.md - docs/models/verificationsamlerrorclerkerror.md + - docs/models/verificationsamlerrorsamlaccountclerkerror.md - docs/models/verificationsamlverificationerror.md - docs/models/verificationsamlverificationobject.md + - docs/models/verificationsamlverificationsamlaccountobject.md + - docs/models/verificationsamlverificationsamlaccountstatus.md + - docs/models/verificationsamlverificationsamlaccountstrategy.md - docs/models/verificationsamlverificationstatus.md - docs/models/verificationsamlverificationstrategy.md - docs/models/verificationstatus.md @@ -612,6 +647,7 @@ generatedFiles: - src/clerk_backend_api/models/cnametarget.py - src/clerk_backend_api/models/commercemoneyresponse.py - src/clerk_backend_api/models/commerceplan.py + - src/clerk_backend_api/models/commercesubscriptionitem.py - src/clerk_backend_api/models/cookies.py - src/clerk_backend_api/models/createactortokenop.py - src/clerk_backend_api/models/createallowlistidentifierop.py @@ -669,6 +705,7 @@ generatedFiles: - src/clerk_backend_api/models/getclientlistop.py - src/clerk_backend_api/models/getclientop.py - src/clerk_backend_api/models/getcommerceplanlistop.py + - src/clerk_backend_api/models/getcommercesubscriptionitemlistop.py - src/clerk_backend_api/models/getemailaddressop.py - src/clerk_backend_api/models/getjwttemplateop.py - src/clerk_backend_api/models/getm2mtokensop.py @@ -744,6 +781,7 @@ generatedFiles: - src/clerk_backend_api/models/organizationsettings.py - src/clerk_backend_api/models/organizationwithlogo.py - src/clerk_backend_api/models/paginatedcommerceplanresponse.py + - src/clerk_backend_api/models/paginatedcommercesubscriptionitemresponse.py - src/clerk_backend_api/models/passkey.py - src/clerk_backend_api/models/phonenumber.py - src/clerk_backend_api/models/previewtemplateop.py @@ -2654,7 +2692,7 @@ examples: payer_type: "org" responses: "200": - application/json: {"data": [{"object": "commerce_plan", "id": "", "name": "", "fee": {"amount": 420774, "amount_formatted": "", "currency": "Surinam Dollar", "currency_symbol": "﷼"}, "annual_monthly_fee": {"amount": 401591, "amount_formatted": "", "currency": "Euro", "currency_symbol": "Db"}, "annual_fee": {"amount": 183271, "amount_formatted": "", "currency": "Azerbaijanian Manat", "currency_symbol": "₱"}, "amount": 409300, "amount_formatted": "", "annual_monthly_amount": 81384, "annual_monthly_amount_formatted": "", "annual_amount": 410286, "annual_amount_formatted": "", "currency_symbol": "₨", "currency": "New Leu", "description": "off finally meanwhile tame", "product_id": "", "is_default": false, "is_recurring": false, "publicly_visible": false, "has_base_fee": true, "payer_type": ["", "", ""], "for_payer_type": "", "slug": "", "avatar_url": "https://enchanted-impostor.com", "period": "", "interval": 846111, "features": []}], "total_count": 381334} + application/json: {"data": [{"object": "commerce_plan", "id": "", "name": "", "fee": {"amount": 420774, "amount_formatted": "", "currency": "Surinam Dollar", "currency_symbol": "﷼"}, "annual_monthly_fee": {"amount": 401591, "amount_formatted": "", "currency": "Euro", "currency_symbol": "Db"}, "annual_fee": {"amount": 183271, "amount_formatted": "", "currency": "Azerbaijanian Manat", "currency_symbol": "₱"}, "amount": 409300, "amount_formatted": "", "annual_monthly_amount": 81384, "annual_monthly_amount_formatted": "", "annual_amount": 410286, "annual_amount_formatted": "", "currency_symbol": "₨", "currency": "New Leu", "description": "off finally meanwhile tame", "product_id": "", "is_default": false, "is_recurring": false, "publicly_visible": false, "has_base_fee": true, "payer_type": ["", "", ""], "for_payer_type": "", "slug": "", "avatar_url": "https://enchanted-impostor.com", "period": "", "interval": 846111, "features": [], "free_trial_enabled": true, "free_trial_days": 916690}], "total_count": 381334} "400": application/json: {"errors": [{"message": "Invalid input", "long_message": "The input provided does not meet the requirements.", "code": "400_bad_request", "meta": {}, "clerk_trace_id": "trace_123456789abcd"}], "meta": {}} "500": @@ -2713,6 +2751,44 @@ examples: application/json: {"errors": []} "404": application/json: {"errors": [{"message": "some details about the error", "long_message": "some details about the error", "code": "some_error_code"}]} + GetCommerceSubscriptionItemList: + speakeasy-default-get-commerce-subscription-item-list: + parameters: + query: + paginated: false + limit: 20 + offset: 10 + status: "free_trial" + payer_type: "org" + plan_id: "" + include_free: false + query: "" + responses: + "200": + application/json: {"data": [{"object": "commerce_subscription_item", "id": "", "instance_id": "", "status": "upcoming", "credit": {"amount": {"amount": 115692, "amount_formatted": "", "currency": "Denar", "currency_symbol": "K"}, "cycle_remaining_percent": 5890.09}, "plan_id": "", "plan": {"object": "commerce_plan", "id": "", "name": "", "fee": {"amount": 349721, "amount_formatted": "", "currency": "Iceland Krona", "currency_symbol": "₪"}, "annual_monthly_fee": {"amount": 500878, "amount_formatted": "", "currency": "Pakistan Rupee", "currency_symbol": "$"}, "annual_fee": {"amount": 13059, "amount_formatted": "", "currency": "Uzbekistan Sum", "currency_symbol": "$"}, "amount": 551667, "amount_formatted": "", "annual_monthly_amount": 790012, "annual_monthly_amount_formatted": "", "annual_amount": 676339, "annual_amount_formatted": "", "currency_symbol": "£", "currency": "Tugrik", "description": "tennis husband meanwhile duh uh-huh chap provided stained wry uncomfortable", "product_id": "", "is_default": false, "is_recurring": true, "publicly_visible": true, "has_base_fee": true, "payer_type": ["", ""], "for_payer_type": "", "slug": "", "avatar_url": "https://monthly-lace.org", "period": "", "interval": 97072, "features": [], "free_trial_enabled": true, "free_trial_days": 520556}, "plan_period": "month", "payment_source_id": "", "payment_source": {"object": "commerce_source", "id": "", "payer_id": "", "payment_method": "apple_pay", "is_default": false, "gateway": "", "gateway_external_id": "", "gateway_external_account_id": "", "last4": "", "status": "active", "wallet_type": "", "card_type": "", "expiry_year": 274365, "expiry_month": 871157, "created_at": 956516, "updated_at": 70418, "is_removable": false}, "lifetime_paid": {"amount": 42923, "amount_formatted": "", "currency": "Swiss Franc", "currency_symbol": "лв"}, "amount": {"amount": 176943, "amount_formatted": "", "currency": "Rand", "currency_symbol": "ƒ"}, "next_invoice": {"amount": {"amount": 353605, "amount_formatted": "", "currency": "Boliviano boliviano", "currency_symbol": "ƒ"}, "date": null}, "next_payment": null, "payer_id": "", "payer": {"object": "commerce_payer", "id": "", "instance_id": "", "user_id": "", "first_name": "Mathew", "last_name": "McLaughlin", "email": "Zetta_Wilderman39@gmail.com", "organization_id": "", "organization_name": "", "image_url": "https://queasy-charlatan.net/", "created_at": 905937, "updated_at": 777337}, "is_free_trial": false, "period_start": 543438, "period_end": 271235, "proration_date": "", "canceled_at": 232920, "past_due_at": null, "ended_at": 743580, "created_at": 762052, "updated_at": 856930}], "total_count": 699308} + "400": + application/json: {"errors": [{"message": "Invalid input", "long_message": "The input provided does not meet the requirements.", "code": "400_bad_request", "meta": {}, "clerk_trace_id": "trace_123456789abcd"}], "meta": {}} + "500": + application/json: {"errors": [{"message": "Invalid input", "long_message": "The input provided does not meet the requirements.", "code": "400_bad_request", "meta": {}, "clerk_trace_id": "trace_123456789abcd"}], "meta": {}} examplesVersion: 1.0.2 generatedTests: {} -releaseNotes: "## SDK Changes Detected:\n* `clerk.commerce.list_plans()`: **Added**\n* `clerk.m2m.create_token()`: **Added**\n* `clerk.m2m.list_tokens()`: **Added**\n* `clerk.m2m.revoke_token()`: **Added**\n* `clerk.m2m.verify_token()`: **Added**\n* `clerk.aws_credentials.list()`: **Deleted** **Breaking** :warning:\n* `clerk.aws_credentials.create()`: **Deleted** **Breaking** :warning:\n* `clerk.aws_credentials.get()`: **Deleted** **Breaking** :warning:\n* `clerk.machine_tokens.create()`: **Deleted** **Breaking** :warning:\n* `clerk.management.upsert_user()`: **Deleted** **Breaking** :warning:\n* `clerk.management.create_organization()`: **Deleted** **Breaking** :warning:\n* `clerk.management.create_application()`: **Deleted** **Breaking** :warning:\n* `clerk.email_sms_templates.list()`: `response.[].flagged_as_suspicious` **Added**\n* `clerk.email_sms_templates.get()`: `response.flagged_as_suspicious` **Added**\n* `clerk.email_sms_templates.revert()`: `response.flagged_as_suspicious` **Added**\n* `clerk.email_sms_templates.toggle_template_delivery()`: `response.flagged_as_suspicious` **Added**\n* `clerk.email_and_sms_templates.upsert()`: `response.flagged_as_suspicious` **Added**\n* `clerk.instance_settings.update_restrictions()`: \n * `request.allowlist_blocklist_disabled_on_sign_in` **Added**\n * `response.allowlist_blocklist_disabled_on_sign_in` **Added**\n* `clerk.instance_settings.update_organization_settings()`: `response.max_allowed_permissions` **Changed**\n* `clerk.organization_domains.create()`: `response.public_organization_data` **Added**\n* `clerk.organization_domains.list()`: `response.data.[].public_organization_data` **Added**\n* `clerk.organization_domains.update()`: `response.public_organization_data` **Added**\n* `clerk.organization_domains.list_all()`: `response.data.[].public_organization_data` **Added**\n" +releaseNotes: | + ## SDK Changes Detected: + * `clerk.commerce.list_subscription_items()`: **Added** + * `clerk.email_addresses.create()`: `response.verification` **Changed** + * `clerk.email_addresses.get()`: `response.verification` **Changed** + * `clerk.email_addresses.update()`: `response.verification` **Changed** + * `clerk.users.list()`: `response.[].email_addresses.[].verification` **Changed** + * `clerk.users.create()`: `response.email_addresses.[].verification` **Changed** + * `clerk.users.get()`: `response.email_addresses.[].verification` **Changed** + * `clerk.users.update()`: `response.email_addresses.[].verification` **Changed** + * `clerk.users.ban()`: `response.email_addresses.[].verification` **Changed** + * `clerk.users.unban()`: `response.email_addresses.[].verification` **Changed** + * `clerk.users.bulk_ban()`: `response.[].email_addresses.[].verification` **Changed** + * `clerk.users.bulk_unban()`: `response.[].email_addresses.[].verification` **Changed** + * `clerk.users.lock()`: `response.email_addresses.[].verification` **Changed** + * `clerk.users.unlock()`: `response.email_addresses.[].verification` **Changed** + * `clerk.users.set_profile_image()`: `response.email_addresses.[].verification` **Changed** + * `clerk.users.delete_profile_image()`: `response.email_addresses.[].verification` **Changed** + * `clerk.users.update_metadata()`: `response.email_addresses.[].verification` **Changed** + * `clerk.commerce.list_plans()`: `response.data.[]` **Changed** diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 5c5cec7c..36961a65 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -21,7 +21,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false python: - version: 3.2.0 + version: 3.2.1 additionalDependencies: dev: pytest: ^8.3.3 diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 2c7070f6..de1fcb85 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,21 +1,21 @@ -speakeasyVersion: 1.605.1 +speakeasyVersion: 1.606.0 sources: clerk-openapi: sourceNamespace: clerk-openapi - sourceRevisionDigest: sha256:dc37ff73645239e44986b77d73315a42d1b2e7e777a3a0863037511ddf7f59dc - sourceBlobDigest: sha256:4e87f65be278420e3a0616d588f5207e8e88bba3519ebd5722ab10b28be85338 + sourceRevisionDigest: sha256:9967946318f596b18f5ca9ec87ca7451e553e758302ebd54410cca2624a541e6 + sourceBlobDigest: sha256:b61c1d450eba9814305ea3b98661edb3d57a49706633dd56c3874c58c38c2532 tags: - latest - - speakeasy-sdk-regen-1753921443 + - speakeasy-sdk-regen-1755562956 - "2025-04-10" targets: clerk-sdk-python: source: clerk-openapi sourceNamespace: clerk-openapi - sourceRevisionDigest: sha256:dc37ff73645239e44986b77d73315a42d1b2e7e777a3a0863037511ddf7f59dc - sourceBlobDigest: sha256:4e87f65be278420e3a0616d588f5207e8e88bba3519ebd5722ab10b28be85338 + sourceRevisionDigest: sha256:9967946318f596b18f5ca9ec87ca7451e553e758302ebd54410cca2624a541e6 + sourceBlobDigest: sha256:b61c1d450eba9814305ea3b98661edb3d57a49706633dd56c3874c58c38c2532 codeSamplesNamespace: clerk-openapi-python-code-samples - codeSamplesRevisionDigest: sha256:c51a91d70cc4e8f1dec0bfc133301a7e011b02c9416216911f92a53dd707c1c3 + codeSamplesRevisionDigest: sha256:388e8979cd1e09156e2e19ca9554f47faca1fad1a5c1f6995f5cd4467e1d5808 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README.md b/README.md index 37bd5835..f1be2cb5 100644 --- a/README.md +++ b/README.md @@ -290,6 +290,7 @@ def verify_machine_token(request: httpx.Request): ### [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 ### [domains](docs/sdks/domainssdk/README.md) @@ -650,17 +651,17 @@ with Clerk( **Inherit from [`ClerkBaseError`](./src/clerk_backend_api/models/clerkbaseerror.py)**: -* [`CreateM2MTokenM2mResponseBody`](./src/clerk_backend_api/models/createm2mtokenm2mresponsebody.py): 400 Bad Request. Status code `400`. Applicable to 1 of 150 methods.* -* [`GetM2MTokensM2mResponseBody`](./src/clerk_backend_api/models/getm2mtokensm2mresponsebody.py): 400 Bad Request. Status code `400`. Applicable to 1 of 150 methods.* -* [`RevokeM2MTokenM2mResponseBody`](./src/clerk_backend_api/models/revokem2mtokenm2mresponsebody.py): 400 Bad Request. Status code `400`. Applicable to 1 of 150 methods.* -* [`VerifyM2MTokenM2mResponseBody`](./src/clerk_backend_api/models/verifym2mtokenm2mresponsebody.py): 400 Bad Request. Status code `400`. Applicable to 1 of 150 methods.* -* [`VerifyOAuthAccessTokenOauthAccessTokensResponseBody`](./src/clerk_backend_api/models/verifyoauthaccesstokenoauthaccesstokensresponsebody.py): 400 Bad Request. Status code `400`. Applicable to 1 of 150 methods.* -* [`GetM2MTokensM2mResponseResponseBody`](./src/clerk_backend_api/models/getm2mtokensm2mresponseresponsebody.py): 403 Forbidden. Status code `403`. Applicable to 1 of 150 methods.* -* [`GetM2MTokensM2mResponse404ResponseBody`](./src/clerk_backend_api/models/getm2mtokensm2mresponse404responsebody.py): 404 Not Found. Status code `404`. Applicable to 1 of 150 methods.* -* [`RevokeM2MTokenM2mResponseResponseBody`](./src/clerk_backend_api/models/revokem2mtokenm2mresponseresponsebody.py): 404 Not Found. Status code `404`. Applicable to 1 of 150 methods.* -* [`VerifyM2MTokenM2mResponseResponseBody`](./src/clerk_backend_api/models/verifym2mtokenm2mresponseresponsebody.py): 404 Not Found. Status code `404`. Applicable to 1 of 150 methods.* -* [`VerifyOAuthAccessTokenOauthAccessTokensResponseResponseBody`](./src/clerk_backend_api/models/verifyoauthaccesstokenoauthaccesstokensresponseresponsebody.py): 404 Not Found. Status code `404`. Applicable to 1 of 150 methods.* -* [`CreateM2MTokenM2mResponseResponseBody`](./src/clerk_backend_api/models/createm2mtokenm2mresponseresponsebody.py): 409 Conflict. Status code `409`. Applicable to 1 of 150 methods.* +* [`CreateM2MTokenM2mResponseBody`](./src/clerk_backend_api/models/createm2mtokenm2mresponsebody.py): 400 Bad Request. Status code `400`. Applicable to 1 of 151 methods.* +* [`GetM2MTokensM2mResponseBody`](./src/clerk_backend_api/models/getm2mtokensm2mresponsebody.py): 400 Bad Request. Status code `400`. Applicable to 1 of 151 methods.* +* [`RevokeM2MTokenM2mResponseBody`](./src/clerk_backend_api/models/revokem2mtokenm2mresponsebody.py): 400 Bad Request. Status code `400`. Applicable to 1 of 151 methods.* +* [`VerifyM2MTokenM2mResponseBody`](./src/clerk_backend_api/models/verifym2mtokenm2mresponsebody.py): 400 Bad Request. Status code `400`. Applicable to 1 of 151 methods.* +* [`VerifyOAuthAccessTokenOauthAccessTokensResponseBody`](./src/clerk_backend_api/models/verifyoauthaccesstokenoauthaccesstokensresponsebody.py): 400 Bad Request. Status code `400`. Applicable to 1 of 151 methods.* +* [`GetM2MTokensM2mResponseResponseBody`](./src/clerk_backend_api/models/getm2mtokensm2mresponseresponsebody.py): 403 Forbidden. Status code `403`. Applicable to 1 of 151 methods.* +* [`GetM2MTokensM2mResponse404ResponseBody`](./src/clerk_backend_api/models/getm2mtokensm2mresponse404responsebody.py): 404 Not Found. Status code `404`. Applicable to 1 of 151 methods.* +* [`RevokeM2MTokenM2mResponseResponseBody`](./src/clerk_backend_api/models/revokem2mtokenm2mresponseresponsebody.py): 404 Not Found. Status code `404`. Applicable to 1 of 151 methods.* +* [`VerifyM2MTokenM2mResponseResponseBody`](./src/clerk_backend_api/models/verifym2mtokenm2mresponseresponsebody.py): 404 Not Found. Status code `404`. Applicable to 1 of 151 methods.* +* [`VerifyOAuthAccessTokenOauthAccessTokensResponseResponseBody`](./src/clerk_backend_api/models/verifyoauthaccesstokenoauthaccesstokensresponseresponsebody.py): 404 Not Found. Status code `404`. Applicable to 1 of 151 methods.* +* [`CreateM2MTokenM2mResponseResponseBody`](./src/clerk_backend_api/models/createm2mtokenm2mresponseresponsebody.py): 409 Conflict. Status code `409`. Applicable to 1 of 151 methods.* * [`ResponseValidationError`](./src/clerk_backend_api/models/responsevalidationerror.py): Type mismatch between the response data and the expected Pydantic model. Provides access to the Pydantic validation error via the `cause` attribute. diff --git a/RELEASES.md b/RELEASES.md index 05007ea9..fbcfb9a9 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -438,4 +438,14 @@ Based on: ### Generated - [python v3.2.0] . ### Releases -- [PyPI v3.2.0] https://pypi.org/project/clerk-backend-api/3.2.0 - . \ No newline at end of file +- [PyPI v3.2.0] https://pypi.org/project/clerk-backend-api/3.2.0 - . + +## 2025-08-19 14:43:16 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.606.0 (2.686.7) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v3.2.1] . +### Releases +- [PyPI v3.2.1] https://pypi.org/project/clerk-backend-api/3.2.1 - . \ No newline at end of file diff --git a/docs/models/amount.md b/docs/models/amount.md new file mode 100644 index 00000000..f5b5e251 --- /dev/null +++ b/docs/models/amount.md @@ -0,0 +1,13 @@ +# Amount + +Current amount for this subscription. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | +| `amount` | *int* | :heavy_check_mark: | The amount in cents. | +| `amount_formatted` | *str* | :heavy_check_mark: | The formatted amount as a string (e.g., "$49.99"). | +| `currency` | *str* | :heavy_check_mark: | The currency code (e.g., "USD"). | +| `currency_symbol` | *str* | :heavy_check_mark: | The currency symbol (e.g., "$"). | \ No newline at end of file diff --git a/docs/models/clerkerrorerrorexternalaccountwithverificationverificationmeta.md b/docs/models/clerkerrorerrorexternalaccountwithverificationverificationmeta.md new file mode 100644 index 00000000..ef070e0d --- /dev/null +++ b/docs/models/clerkerrorerrorexternalaccountwithverificationverificationmeta.md @@ -0,0 +1,7 @@ +# ClerkErrorErrorExternalAccountWithVerificationVerificationMeta + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/commerceplan.md b/docs/models/commerceplan.md index 326d3a18..88014dec 100644 --- a/docs/models/commerceplan.md +++ b/docs/models/commerceplan.md @@ -31,4 +31,6 @@ | `avatar_url` | *str* | :heavy_check_mark: | The URL of the plan's avatar image. | | `period` | *Optional[str]* | :heavy_minus_sign: | The billing period for the plan. | | `interval` | *Optional[int]* | :heavy_minus_sign: | The billing interval. | -| `features` | List[[models.FeatureResponse](../models/featureresponse.md)] | :heavy_check_mark: | The features included in this plan. | \ No newline at end of file +| `features` | List[[models.FeatureResponse](../models/featureresponse.md)] | :heavy_check_mark: | The features included in this plan. | +| `free_trial_enabled` | *Optional[bool]* | :heavy_minus_sign: | Whether free trial is enabled for this plan. | +| `free_trial_days` | *OptionalNullable[int]* | :heavy_minus_sign: | Number of free trial days for this plan. | \ No newline at end of file diff --git a/docs/models/commercesubscriptionitem.md b/docs/models/commercesubscriptionitem.md new file mode 100644 index 00000000..3d56a020 --- /dev/null +++ b/docs/models/commercesubscriptionitem.md @@ -0,0 +1,32 @@ +# CommerceSubscriptionItem + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `object` | [models.CommerceSubscriptionItemObject](../models/commercesubscriptionitemobject.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 subscription item. | +| `instance_id` | *str* | :heavy_check_mark: | Unique identifier for the Clerk instance. | +| `status` | [models.CommerceSubscriptionItemStatus](../models/commercesubscriptionitemstatus.md) | :heavy_check_mark: | Current status of the subscription item. | +| `credit` | [OptionalNullable[models.Credit]](../models/credit.md) | :heavy_minus_sign: | Credit information (only available in PaymentAttempt events). | +| `plan_id` | *str* | :heavy_check_mark: | Unique identifier for the associated plan. | +| `plan` | [Nullable[models.Plan]](../models/plan.md) | :heavy_check_mark: | The associated commerce plan. | +| `plan_period` | [models.PlanPeriod](../models/planperiod.md) | :heavy_check_mark: | The billing period for this subscription. | +| `payment_source_id` | *str* | :heavy_check_mark: | Unique identifier for the payment source. | +| `payment_source` | [OptionalNullable[models.PaymentSource]](../models/paymentsource.md) | :heavy_minus_sign: | The payment source associated with this subscription. | +| `lifetime_paid` | [OptionalNullable[models.LifetimePaid]](../models/lifetimepaid.md) | :heavy_minus_sign: | Total amount paid over the lifetime of this subscription. | +| `amount` | [OptionalNullable[models.Amount]](../models/amount.md) | :heavy_minus_sign: | Current amount for this subscription. | +| `next_invoice` | [OptionalNullable[models.NextInvoice]](../models/nextinvoice.md) | :heavy_minus_sign: | Information about the next invoice. | +| `next_payment` | [OptionalNullable[models.NextPayment]](../models/nextpayment.md) | :heavy_minus_sign: | Information about the next payment. | +| `payer_id` | *str* | :heavy_check_mark: | Unique identifier for the payer. | +| `payer` | [OptionalNullable[models.Payer]](../models/payer.md) | :heavy_minus_sign: | The payer associated with this subscription. | +| `is_free_trial` | *bool* | :heavy_check_mark: | Whether this subscription is currently on a free trial. | +| `period_start` | *OptionalNullable[int]* | :heavy_minus_sign: | Unix timestamp (in milliseconds) when the current period started. | +| `period_end` | *OptionalNullable[int]* | :heavy_minus_sign: | Unix timestamp (in milliseconds) when the current period ends. | +| `proration_date` | *str* | :heavy_check_mark: | Date used for proration calculations. | +| `canceled_at` | *OptionalNullable[int]* | :heavy_minus_sign: | Unix timestamp (in milliseconds) when the subscription was canceled. | +| `past_due_at` | *OptionalNullable[int]* | :heavy_minus_sign: | Unix timestamp (in milliseconds) when the subscription became past due. | +| `ended_at` | *OptionalNullable[int]* | :heavy_minus_sign: | Unix timestamp (in milliseconds) when the subscription ended. | +| `created_at` | *int* | :heavy_check_mark: | Unix timestamp (in milliseconds) when the subscription was created. | +| `updated_at` | *int* | :heavy_check_mark: | Unix timestamp (in milliseconds) when the subscription was last updated. | \ No newline at end of file diff --git a/docs/models/commercesubscriptionitemamount.md b/docs/models/commercesubscriptionitemamount.md new file mode 100644 index 00000000..31120d82 --- /dev/null +++ b/docs/models/commercesubscriptionitemamount.md @@ -0,0 +1,13 @@ +# CommerceSubscriptionItemAmount + +Credit amount. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | +| `amount` | *int* | :heavy_check_mark: | The amount in cents. | +| `amount_formatted` | *str* | :heavy_check_mark: | The formatted amount as a string (e.g., "$49.99"). | +| `currency` | *str* | :heavy_check_mark: | The currency code (e.g., "USD"). | +| `currency_symbol` | *str* | :heavy_check_mark: | The currency symbol (e.g., "$"). | \ No newline at end of file diff --git a/docs/models/commercesubscriptionitemnextinvoiceamount.md b/docs/models/commercesubscriptionitemnextinvoiceamount.md new file mode 100644 index 00000000..c7a368c3 --- /dev/null +++ b/docs/models/commercesubscriptionitemnextinvoiceamount.md @@ -0,0 +1,13 @@ +# CommerceSubscriptionItemNextInvoiceAmount + +Amount for the next payment. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | +| `amount` | *int* | :heavy_check_mark: | The amount in cents. | +| `amount_formatted` | *str* | :heavy_check_mark: | The formatted amount as a string (e.g., "$49.99"). | +| `currency` | *str* | :heavy_check_mark: | The currency code (e.g., "USD"). | +| `currency_symbol` | *str* | :heavy_check_mark: | The currency symbol (e.g., "$"). | \ No newline at end of file diff --git a/docs/models/commercesubscriptionitemnextpaymentamount.md b/docs/models/commercesubscriptionitemnextpaymentamount.md new file mode 100644 index 00000000..41f95e4d --- /dev/null +++ b/docs/models/commercesubscriptionitemnextpaymentamount.md @@ -0,0 +1,13 @@ +# CommerceSubscriptionItemNextPaymentAmount + +Amount for the next payment. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | +| `amount` | *int* | :heavy_check_mark: | The amount in cents. | +| `amount_formatted` | *str* | :heavy_check_mark: | The formatted amount as a string (e.g., "$49.99"). | +| `currency` | *str* | :heavy_check_mark: | The currency code (e.g., "USD"). | +| `currency_symbol` | *str* | :heavy_check_mark: | The currency symbol (e.g., "$"). | \ No newline at end of file diff --git a/docs/models/commercesubscriptionitemobject.md b/docs/models/commercesubscriptionitemobject.md new file mode 100644 index 00000000..25773afb --- /dev/null +++ b/docs/models/commercesubscriptionitemobject.md @@ -0,0 +1,10 @@ +# CommerceSubscriptionItemObject + +String representing the object's type. Objects of the same type share the same value. + + +## Values + +| Name | Value | +| ---------------------------- | ---------------------------- | +| `COMMERCE_SUBSCRIPTION_ITEM` | commerce_subscription_item | \ No newline at end of file diff --git a/docs/models/commercesubscriptionitempayerobject.md b/docs/models/commercesubscriptionitempayerobject.md new file mode 100644 index 00000000..5fffe685 --- /dev/null +++ b/docs/models/commercesubscriptionitempayerobject.md @@ -0,0 +1,10 @@ +# CommerceSubscriptionItemPayerObject + +String representing the object's type. Objects of the same type share the same value. + + +## Values + +| Name | Value | +| ---------------- | ---------------- | +| `COMMERCE_PAYER` | commerce_payer | \ No newline at end of file diff --git a/docs/models/commercesubscriptionitempaymentsourceobject.md b/docs/models/commercesubscriptionitempaymentsourceobject.md new file mode 100644 index 00000000..a568b16f --- /dev/null +++ b/docs/models/commercesubscriptionitempaymentsourceobject.md @@ -0,0 +1,10 @@ +# CommerceSubscriptionItemPaymentSourceObject + +String representing the object's type. Objects of the same type share the same value. + + +## Values + +| Name | Value | +| ----------------- | ----------------- | +| `COMMERCE_SOURCE` | commerce_source | \ No newline at end of file diff --git a/docs/models/commercesubscriptionitempaymentsourcestatus.md b/docs/models/commercesubscriptionitempaymentsourcestatus.md new file mode 100644 index 00000000..187c8d06 --- /dev/null +++ b/docs/models/commercesubscriptionitempaymentsourcestatus.md @@ -0,0 +1,11 @@ +# CommerceSubscriptionItemPaymentSourceStatus + +Status of the payment source. + + +## Values + +| Name | Value | +| -------------- | -------------- | +| `ACTIVE` | active | +| `DISCONNECTED` | disconnected | \ No newline at end of file diff --git a/docs/models/commercesubscriptionitemplanobject.md b/docs/models/commercesubscriptionitemplanobject.md new file mode 100644 index 00000000..1a050d3f --- /dev/null +++ b/docs/models/commercesubscriptionitemplanobject.md @@ -0,0 +1,10 @@ +# CommerceSubscriptionItemPlanObject + +String representing the object's type. Objects of the same type share the same value. + + +## Values + +| Name | Value | +| --------------- | --------------- | +| `COMMERCE_PLAN` | commerce_plan | \ No newline at end of file diff --git a/docs/models/commercesubscriptionitemstatus.md b/docs/models/commercesubscriptionitemstatus.md new file mode 100644 index 00000000..f6b6fa28 --- /dev/null +++ b/docs/models/commercesubscriptionitemstatus.md @@ -0,0 +1,15 @@ +# CommerceSubscriptionItemStatus + +Current status of the subscription item. + + +## Values + +| Name | Value | +| ------------ | ------------ | +| `ACTIVE` | active | +| `ENDED` | ended | +| `PAST_DUE` | past_due | +| `UPCOMING` | upcoming | +| `INCOMPLETE` | incomplete | +| `ABANDONED` | abandoned | \ No newline at end of file diff --git a/docs/models/credit.md b/docs/models/credit.md new file mode 100644 index 00000000..9b1a5b36 --- /dev/null +++ b/docs/models/credit.md @@ -0,0 +1,11 @@ +# Credit + +Credit information (only available in PaymentAttempt events). + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | +| `amount` | [OptionalNullable[models.CommerceSubscriptionItemAmount]](../models/commercesubscriptionitemamount.md) | :heavy_minus_sign: | Credit amount. | +| `cycle_remaining_percent` | *Optional[float]* | :heavy_minus_sign: | Percentage of the billing cycle remaining. | \ No newline at end of file diff --git a/docs/models/emaillink.md b/docs/models/emaillink.md new file mode 100644 index 00000000..8b480db4 --- /dev/null +++ b/docs/models/emaillink.md @@ -0,0 +1,13 @@ +# EmailLink + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | +| `object` | [Optional[models.VerificationEmailLinkVerificationObject]](../models/verificationemaillinkverificationobject.md) | :heavy_minus_sign: | N/A | +| `status` | [models.VerificationEmailLinkVerificationStatus](../models/verificationemaillinkverificationstatus.md) | :heavy_check_mark: | N/A | +| `strategy` | [models.VerificationEmailLinkVerificationStrategy](../models/verificationemaillinkverificationstrategy.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/models/getcommercesubscriptionitemlistqueryparamstatus.md b/docs/models/getcommercesubscriptionitemlistqueryparamstatus.md new file mode 100644 index 00000000..409ddfa0 --- /dev/null +++ b/docs/models/getcommercesubscriptionitemlistqueryparamstatus.md @@ -0,0 +1,14 @@ +# GetCommerceSubscriptionItemListQueryParamStatus + +Filter subscription items by status + + +## Values + +| Name | Value | +| ------------ | ------------ | +| `ACTIVE` | active | +| `ENDED` | ended | +| `PAST_DUE` | past_due | +| `UPCOMING` | upcoming | +| `FREE_TRIAL` | free_trial | \ No newline at end of file diff --git a/docs/models/getcommercesubscriptionitemlistrequest.md b/docs/models/getcommercesubscriptionitemlistrequest.md new file mode 100644 index 00000000..97f753d0 --- /dev/null +++ b/docs/models/getcommercesubscriptionitemlistrequest.md @@ -0,0 +1,15 @@ +# GetCommerceSubscriptionItemListRequest + + +## Fields + +| Field | 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 | | \ No newline at end of file diff --git a/docs/models/lifetimepaid.md b/docs/models/lifetimepaid.md new file mode 100644 index 00000000..6f3654f4 --- /dev/null +++ b/docs/models/lifetimepaid.md @@ -0,0 +1,13 @@ +# LifetimePaid + +Total amount paid over the lifetime of this subscription. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | +| `amount` | *int* | :heavy_check_mark: | The amount in cents. | +| `amount_formatted` | *str* | :heavy_check_mark: | The formatted amount as a string (e.g., "$49.99"). | +| `currency` | *str* | :heavy_check_mark: | The currency code (e.g., "USD"). | +| `currency_symbol` | *str* | :heavy_check_mark: | The currency symbol (e.g., "$"). | \ No newline at end of file diff --git a/docs/models/nextinvoice.md b/docs/models/nextinvoice.md new file mode 100644 index 00000000..7d8d405d --- /dev/null +++ b/docs/models/nextinvoice.md @@ -0,0 +1,11 @@ +# NextInvoice + +Information about the next invoice. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | +| `amount` | [OptionalNullable[models.CommerceSubscriptionItemNextInvoiceAmount]](../models/commercesubscriptionitemnextinvoiceamount.md) | :heavy_minus_sign: | Amount for the next payment. | +| `date_` | *OptionalNullable[int]* | :heavy_minus_sign: | Unix timestamp (in milliseconds) for the next payment date. | \ No newline at end of file diff --git a/docs/models/nextpayment.md b/docs/models/nextpayment.md new file mode 100644 index 00000000..a8ad6f48 --- /dev/null +++ b/docs/models/nextpayment.md @@ -0,0 +1,11 @@ +# NextPayment + +Information about the next payment. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | +| `amount` | [OptionalNullable[models.CommerceSubscriptionItemNextPaymentAmount]](../models/commercesubscriptionitemnextpaymentamount.md) | :heavy_minus_sign: | Amount for the next payment. | +| `date_` | *OptionalNullable[int]* | :heavy_minus_sign: | Unix timestamp (in milliseconds) for the next payment date. | \ No newline at end of file diff --git a/docs/models/oauth.md b/docs/models/oauth.md index b01538a2..6bf45991 100644 --- a/docs/models/oauth.md +++ b/docs/models/oauth.md @@ -3,13 +3,13 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -| `object` | [Optional[models.VerificationOauthVerificationObject]](../models/verificationoauthverificationobject.md) | :heavy_minus_sign: | N/A | -| `status` | [models.VerificationOauthVerificationStatus](../models/verificationoauthverificationstatus.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.VerificationError]](../models/verificationerror.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 +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | +| `object` | [Optional[models.VerificationOauthVerificationObject]](../models/verificationoauthverificationobject.md) | :heavy_minus_sign: | N/A | +| `status` | [models.VerificationOauthVerificationStatus](../models/verificationoauthverificationstatus.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.VerificationOauthVerificationError]](../models/verificationoauthverificationerror.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/paginatedcommercesubscriptionitemresponse.md b/docs/models/paginatedcommercesubscriptionitemresponse.md new file mode 100644 index 00000000..05ebef37 --- /dev/null +++ b/docs/models/paginatedcommercesubscriptionitemresponse.md @@ -0,0 +1,11 @@ +# PaginatedCommerceSubscriptionItemResponse + +A list of commerce subscription items. + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `data` | List[[models.CommerceSubscriptionItem](../models/commercesubscriptionitem.md)] | :heavy_check_mark: | Array of commerce subscription items. | +| `total_count` | *int* | :heavy_check_mark: | Total number of commerce subscription items. | \ No newline at end of file diff --git a/docs/models/payer.md b/docs/models/payer.md new file mode 100644 index 00000000..53d70b4a --- /dev/null +++ b/docs/models/payer.md @@ -0,0 +1,21 @@ +# Payer + +The payer associated with this subscription. + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| `object` | [models.CommerceSubscriptionItemPayerObject](../models/commercesubscriptionitempayerobject.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 payer. | +| `instance_id` | *str* | :heavy_check_mark: | Unique identifier for the Clerk instance. | +| `user_id` | *Optional[str]* | :heavy_minus_sign: | User ID for user-type payers. | +| `first_name` | *str* | :heavy_check_mark: | First name of the payer. | +| `last_name` | *str* | :heavy_check_mark: | Last name of the payer. | +| `email` | *str* | :heavy_check_mark: | Email address of the payer. | +| `organization_id` | *Optional[str]* | :heavy_minus_sign: | Organization ID for org-type payers. | +| `organization_name` | *Optional[str]* | :heavy_minus_sign: | Organization name for org-type payers. | +| `image_url` | *str* | :heavy_check_mark: | URL of the payer's image/avatar. | +| `created_at` | *int* | :heavy_check_mark: | Unix timestamp (in milliseconds) when the payer was created. | +| `updated_at` | *int* | :heavy_check_mark: | Unix timestamp (in milliseconds) when the payer was last updated. | \ No newline at end of file diff --git a/docs/models/paymentmethod.md b/docs/models/paymentmethod.md new file mode 100644 index 00000000..da0b507b --- /dev/null +++ b/docs/models/paymentmethod.md @@ -0,0 +1,12 @@ +# PaymentMethod + +The payment method type. + + +## Values + +| Name | Value | +| ------------ | ------------ | +| `CARD` | card | +| `APPLE_PAY` | apple_pay | +| `GOOGLE_PAY` | google_pay | \ No newline at end of file diff --git a/docs/models/paymentsource.md b/docs/models/paymentsource.md new file mode 100644 index 00000000..f9a99f07 --- /dev/null +++ b/docs/models/paymentsource.md @@ -0,0 +1,26 @@ +# PaymentSource + +The payment source associated with this subscription. + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | +| `object` | [models.CommerceSubscriptionItemPaymentSourceObject](../models/commercesubscriptionitempaymentsourceobject.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 payment source. | +| `payer_id` | *str* | :heavy_check_mark: | Unique identifier for the payer. | +| `payment_method` | [models.PaymentMethod](../models/paymentmethod.md) | :heavy_check_mark: | The payment method type. | +| `is_default` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether this is the default payment source for the payer. | +| `gateway` | *str* | :heavy_check_mark: | The payment gateway. | +| `gateway_external_id` | *str* | :heavy_check_mark: | External ID in the payment gateway. | +| `gateway_external_account_id` | *OptionalNullable[str]* | :heavy_minus_sign: | External account ID in the payment gateway. | +| `last4` | *str* | :heavy_check_mark: | Last 4 digits of the card (for card payment sources). | +| `status` | [models.CommerceSubscriptionItemPaymentSourceStatus](../models/commercesubscriptionitempaymentsourcestatus.md) | :heavy_check_mark: | Status of the payment source. | +| `wallet_type` | *str* | :heavy_check_mark: | Type of wallet (if applicable). | +| `card_type` | *str* | :heavy_check_mark: | Type of card (if applicable). | +| `expiry_year` | *Optional[int]* | :heavy_minus_sign: | Card expiration year (for card payment sources). | +| `expiry_month` | *Optional[int]* | :heavy_minus_sign: | Card expiration month (for card payment sources). | +| `created_at` | *int* | :heavy_check_mark: | Unix timestamp (in milliseconds) when the payment source was created. | +| `updated_at` | *int* | :heavy_check_mark: | Unix timestamp (in milliseconds) when the payment source was last updated. | +| `is_removable` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether this payment source can be removed. | \ No newline at end of file diff --git a/docs/models/plan.md b/docs/models/plan.md new file mode 100644 index 00000000..73cd0b59 --- /dev/null +++ b/docs/models/plan.md @@ -0,0 +1,38 @@ +# Plan + +The associated commerce 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 commerce plan. | +| `name` | *str* | :heavy_check_mark: | The name of the commerce plan. | +| `fee` | [models.CommerceMoneyResponse](../models/commercemoneyresponse.md) | :heavy_check_mark: | N/A | +| `annual_monthly_fee` | [models.CommerceMoneyResponse](../models/commercemoneyresponse.md) | :heavy_check_mark: | N/A | +| `annual_fee` | [models.CommerceMoneyResponse](../models/commercemoneyresponse.md) | :heavy_check_mark: | N/A | +| `amount` | *int* | :heavy_check_mark: | The amount in cents for the plan. | +| `amount_formatted` | *str* | :heavy_check_mark: | The formatted amount as a string (e.g., "$49.99"). | +| `annual_monthly_amount` | *int* | :heavy_check_mark: | The monthly amount in cents when billed annually. | +| `annual_monthly_amount_formatted` | *str* | :heavy_check_mark: | The formatted annual monthly amount as a string. | +| `annual_amount` | *int* | :heavy_check_mark: | The total annual amount in cents. | +| `annual_amount_formatted` | *str* | :heavy_check_mark: | The formatted annual amount as a string. | +| `currency_symbol` | *str* | :heavy_check_mark: | The currency symbol (e.g., "$"). | +| `currency` | *str* | :heavy_check_mark: | The currency code (e.g., "USD"). | +| `description` | *str* | :heavy_check_mark: | The description of the commerce 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. | +| `payer_type` | List[*str*] | :heavy_check_mark: | The types of payers that can use this plan. | +| `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` | *str* | :heavy_check_mark: | The URL of the plan's avatar image. | +| `period` | *Optional[str]* | :heavy_minus_sign: | The billing period for the plan. | +| `interval` | *Optional[int]* | :heavy_minus_sign: | The billing interval. | +| `features` | List[[models.FeatureResponse](../models/featureresponse.md)] | :heavy_check_mark: | The features included in this plan. | +| `free_trial_enabled` | *Optional[bool]* | :heavy_minus_sign: | Whether free trial is enabled for this plan. | +| `free_trial_days` | *OptionalNullable[int]* | :heavy_minus_sign: | Number of free trial days for this plan. | \ No newline at end of file diff --git a/docs/models/planperiod.md b/docs/models/planperiod.md new file mode 100644 index 00000000..6c73b2ca --- /dev/null +++ b/docs/models/planperiod.md @@ -0,0 +1,11 @@ +# PlanPeriod + +The billing period for this subscription. + + +## Values + +| Name | Value | +| -------- | -------- | +| `MONTH` | month | +| `ANNUAL` | annual | \ No newline at end of file diff --git a/docs/models/queryparampayertype.md b/docs/models/queryparampayertype.md new file mode 100644 index 00000000..b1d66d8b --- /dev/null +++ b/docs/models/queryparampayertype.md @@ -0,0 +1,11 @@ +# QueryParamPayerType + +Filter subscription items by payer type + + +## Values + +| Name | Value | +| ------ | ------ | +| `USER` | user | +| `ORG` | org | \ No newline at end of file diff --git a/docs/models/saml.md b/docs/models/saml.md index 1f565049..b34505a1 100644 --- a/docs/models/saml.md +++ b/docs/models/saml.md @@ -3,13 +3,13 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | -| `object` | [Optional[models.VerificationSamlVerificationObject]](../models/verificationsamlverificationobject.md) | :heavy_minus_sign: | N/A | -| `status` | [models.VerificationSamlVerificationStatus](../models/verificationsamlverificationstatus.md) | :heavy_check_mark: | N/A | -| `strategy` | [models.VerificationSamlVerificationStrategy](../models/verificationsamlverificationstrategy.md) | :heavy_check_mark: | N/A | -| `external_verification_redirect_url` | *Nullable[str]* | :heavy_check_mark: | N/A | -| `error` | [OptionalNullable[models.VerificationSamlVerificationError]](../models/verificationsamlverificationerror.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 +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | +| `object` | [Optional[models.VerificationSamlVerificationObject]](../models/verificationsamlverificationobject.md) | :heavy_minus_sign: | N/A | +| `status` | [models.VerificationSamlVerificationStatus](../models/verificationsamlverificationstatus.md) | :heavy_check_mark: | N/A | +| `strategy` | [models.VerificationSamlVerificationStrategy](../models/verificationsamlverificationstrategy.md) | :heavy_check_mark: | N/A | +| `external_verification_redirect_url` | *Nullable[str]* | :heavy_check_mark: | N/A | +| `error` | [OptionalNullable[models.VerificationError]](../models/verificationerror.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/samlaccountverification.md b/docs/models/samlaccountverification.md index 400f9a3d..5a0b06db 100644 --- a/docs/models/samlaccountverification.md +++ b/docs/models/samlaccountverification.md @@ -3,10 +3,10 @@ ## Supported Types -### `models.Saml` +### `models.VerificationSAML` ```python -value: models.Saml = /* values here */ +value: models.VerificationSAML = /* values here */ ``` ### `models.VerificationTicket` diff --git a/docs/models/verification.md b/docs/models/verification.md index 5a43d187..8fd02d5c 100644 --- a/docs/models/verification.md +++ b/docs/models/verification.md @@ -27,3 +27,15 @@ value: models.FromOAuth = /* values here */ value: models.Ticket = /* values here */ ``` +### `models.Saml` + +```python +value: models.Saml = /* values here */ +``` + +### `models.EmailLink` + +```python +value: models.EmailLink = /* values here */ +``` + diff --git a/docs/models/verificationemaillinkverificationobject.md b/docs/models/verificationemaillinkverificationobject.md new file mode 100644 index 00000000..7267283e --- /dev/null +++ b/docs/models/verificationemaillinkverificationobject.md @@ -0,0 +1,8 @@ +# VerificationEmailLinkVerificationObject + + +## Values + +| Name | Value | +| ------------------------- | ------------------------- | +| `VERIFICATION_EMAIL_LINK` | verification_email_link | \ No newline at end of file diff --git a/docs/models/verificationemaillinkverificationstatus.md b/docs/models/verificationemaillinkverificationstatus.md new file mode 100644 index 00000000..8d568203 --- /dev/null +++ b/docs/models/verificationemaillinkverificationstatus.md @@ -0,0 +1,11 @@ +# VerificationEmailLinkVerificationStatus + + +## Values + +| Name | Value | +| ------------ | ------------ | +| `UNVERIFIED` | unverified | +| `VERIFIED` | verified | +| `FAILED` | failed | +| `EXPIRED` | expired | \ No newline at end of file diff --git a/docs/models/verificationemaillinkverificationstrategy.md b/docs/models/verificationemaillinkverificationstrategy.md new file mode 100644 index 00000000..acee69d8 --- /dev/null +++ b/docs/models/verificationemaillinkverificationstrategy.md @@ -0,0 +1,8 @@ +# VerificationEmailLinkVerificationStrategy + + +## Values + +| Name | Value | +| ------------ | ------------ | +| `EMAIL_LINK` | email_link | \ No newline at end of file diff --git a/docs/models/verificationerror.md b/docs/models/verificationerror.md index 188313c5..5ab1d2c7 100644 --- a/docs/models/verificationerror.md +++ b/docs/models/verificationerror.md @@ -3,9 +3,9 @@ ## Supported Types -### `models.VerificationOauthErrorClerkError` +### `models.VerificationSamlErrorClerkError` ```python -value: models.VerificationOauthErrorClerkError = /* values here */ +value: models.VerificationSamlErrorClerkError = /* values here */ ``` diff --git a/docs/models/verificationgoogleonetaperrorclerkerror.md b/docs/models/verificationgoogleonetaperrorclerkerror.md index c63e26e2..4ad77b04 100644 --- a/docs/models/verificationgoogleonetaperrorclerkerror.md +++ b/docs/models/verificationgoogleonetaperrorclerkerror.md @@ -3,10 +3,10 @@ ## 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.ClerkErrorErrorExternalAccountWithVerificationMeta]](../models/clerkerrorerrorexternalaccountwithverificationmeta.md) | :heavy_minus_sign: | N/A | {} | -| `clerk_trace_id` | *Optional[str]* | :heavy_minus_sign: | N/A | trace_123456789abcd | \ No newline at end of file +| 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.ClerkErrorErrorExternalAccountWithVerificationVerificationMeta]](../models/clerkerrorerrorexternalaccountwithverificationverificationmeta.md) | :heavy_minus_sign: | N/A | {} | +| `clerk_trace_id` | *Optional[str]* | :heavy_minus_sign: | N/A | trace_123456789abcd | \ No newline at end of file diff --git a/docs/models/verificationoautherrorclerkerror.md b/docs/models/verificationoautherrorclerkerror.md index c456b918..47a8b3ed 100644 --- a/docs/models/verificationoautherrorclerkerror.md +++ b/docs/models/verificationoautherrorclerkerror.md @@ -3,10 +3,10 @@ ## 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.ClerkErrorErrorMeta]](../models/clerkerrorerrormeta.md) | :heavy_minus_sign: | N/A | {} | -| `clerk_trace_id` | *Optional[str]* | :heavy_minus_sign: | N/A | trace_123456789abcd | \ No newline at end of file +| 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.ClerkErrorErrorExternalAccountWithVerificationMeta]](../models/clerkerrorerrorexternalaccountwithverificationmeta.md) | :heavy_minus_sign: | N/A | {} | +| `clerk_trace_id` | *Optional[str]* | :heavy_minus_sign: | N/A | trace_123456789abcd | \ No newline at end of file diff --git a/docs/models/verificationoauthverificationerror.md b/docs/models/verificationoauthverificationerror.md new file mode 100644 index 00000000..11f0b7b9 --- /dev/null +++ b/docs/models/verificationoauthverificationerror.md @@ -0,0 +1,11 @@ +# VerificationOauthVerificationError + + +## Supported Types + +### `models.VerificationOauthErrorClerkError` + +```python +value: models.VerificationOauthErrorClerkError = /* values here */ +``` + diff --git a/docs/models/verificationsaml.md b/docs/models/verificationsaml.md new file mode 100644 index 00000000..808794dc --- /dev/null +++ b/docs/models/verificationsaml.md @@ -0,0 +1,15 @@ +# VerificationSAML + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | +| `object` | [Optional[models.VerificationSAMLVerificationSAMLAccountObject]](../models/verificationsamlverificationsamlaccountobject.md) | :heavy_minus_sign: | N/A | +| `status` | [models.VerificationSAMLVerificationSAMLAccountStatus](../models/verificationsamlverificationsamlaccountstatus.md) | :heavy_check_mark: | N/A | +| `strategy` | [models.VerificationSAMLVerificationSAMLAccountStrategy](../models/verificationsamlverificationsamlaccountstrategy.md) | :heavy_check_mark: | N/A | +| `external_verification_redirect_url` | *Nullable[str]* | :heavy_check_mark: | N/A | +| `error` | [OptionalNullable[models.VerificationSamlVerificationError]](../models/verificationsamlverificationerror.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/verificationsamlerrorclerkerror.md b/docs/models/verificationsamlerrorclerkerror.md index fb1d7c75..4acc5fd8 100644 --- a/docs/models/verificationsamlerrorclerkerror.md +++ b/docs/models/verificationsamlerrorclerkerror.md @@ -3,10 +3,10 @@ ## 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.ClerkErrorErrorSAMLAccountMeta]](../models/clerkerrorerrorsamlaccountmeta.md) | :heavy_minus_sign: | N/A | {} | -| `clerk_trace_id` | *Optional[str]* | :heavy_minus_sign: | N/A | trace_123456789abcd | \ No newline at end of file +| 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.ClerkErrorErrorMeta]](../models/clerkerrorerrormeta.md) | :heavy_minus_sign: | N/A | {} | +| `clerk_trace_id` | *Optional[str]* | :heavy_minus_sign: | N/A | trace_123456789abcd | \ No newline at end of file diff --git a/docs/models/verificationsamlerrorsamlaccountclerkerror.md b/docs/models/verificationsamlerrorsamlaccountclerkerror.md new file mode 100644 index 00000000..17498dee --- /dev/null +++ b/docs/models/verificationsamlerrorsamlaccountclerkerror.md @@ -0,0 +1,12 @@ +# VerificationSAMLErrorSAMLAccountClerkError + + +## 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.ClerkErrorErrorSAMLAccountMeta]](../models/clerkerrorerrorsamlaccountmeta.md) | :heavy_minus_sign: | N/A | {} | +| `clerk_trace_id` | *Optional[str]* | :heavy_minus_sign: | N/A | trace_123456789abcd | \ No newline at end of file diff --git a/docs/models/verificationsamlverificationerror.md b/docs/models/verificationsamlverificationerror.md index d2e2dc14..66ed2ad5 100644 --- a/docs/models/verificationsamlverificationerror.md +++ b/docs/models/verificationsamlverificationerror.md @@ -3,9 +3,9 @@ ## Supported Types -### `models.VerificationSamlErrorClerkError` +### `models.VerificationSAMLErrorSAMLAccountClerkError` ```python -value: models.VerificationSamlErrorClerkError = /* values here */ +value: models.VerificationSAMLErrorSAMLAccountClerkError = /* values here */ ``` diff --git a/docs/models/verificationsamlverificationsamlaccountobject.md b/docs/models/verificationsamlverificationsamlaccountobject.md new file mode 100644 index 00000000..79a9ebfd --- /dev/null +++ b/docs/models/verificationsamlverificationsamlaccountobject.md @@ -0,0 +1,8 @@ +# VerificationSAMLVerificationSAMLAccountObject + + +## Values + +| Name | Value | +| ------------------- | ------------------- | +| `VERIFICATION_SAML` | verification_saml | \ No newline at end of file diff --git a/docs/models/verificationsamlverificationsamlaccountstatus.md b/docs/models/verificationsamlverificationsamlaccountstatus.md new file mode 100644 index 00000000..645ee851 --- /dev/null +++ b/docs/models/verificationsamlverificationsamlaccountstatus.md @@ -0,0 +1,12 @@ +# VerificationSAMLVerificationSAMLAccountStatus + + +## Values + +| Name | Value | +| -------------- | -------------- | +| `UNVERIFIED` | unverified | +| `VERIFIED` | verified | +| `FAILED` | failed | +| `EXPIRED` | expired | +| `TRANSFERABLE` | transferable | \ No newline at end of file diff --git a/docs/models/verificationsamlverificationsamlaccountstrategy.md b/docs/models/verificationsamlverificationsamlaccountstrategy.md new file mode 100644 index 00000000..4aa285a1 --- /dev/null +++ b/docs/models/verificationsamlverificationsamlaccountstrategy.md @@ -0,0 +1,8 @@ +# VerificationSAMLVerificationSAMLAccountStrategy + + +## Values + +| Name | Value | +| ------ | ------ | +| `SAML` | saml | \ No newline at end of file diff --git a/docs/sdks/betafeatures/README.md b/docs/sdks/betafeatures/README.md index d4fd3541..6aac9f9d 100644 --- a/docs/sdks/betafeatures/README.md +++ b/docs/sdks/betafeatures/README.md @@ -59,7 +59,7 @@ with Clerk( Change the domain of a production instance. -Changing the domain requires updating the [DNS records](https://clerk.com/docs/deployments/overview#dns-records) accordingly, deploying new [SSL certificates](https://clerk.com/docs/deployments/overview#deploy), updating your Social Connection's redirect URLs and setting the new keys in your code. +Changing the domain requires updating the [DNS records](https://clerk.com/docs/deployments/overview#dns-records) accordingly, deploying new [SSL certificates](https://clerk.com/docs/deployments/overview#deploy-certificates), updating your Social Connection's redirect URLs and setting the new keys in your code. WARNING: Changing your domain will invalidate all current user sessions (i.e. users will be logged out). Also, while your application is being deployed, a small downtime is expected to occur. diff --git a/docs/sdks/commerce/README.md b/docs/sdks/commerce/README.md index 9b6de012..34f7dd8f 100644 --- a/docs/sdks/commerce/README.md +++ b/docs/sdks/commerce/README.md @@ -6,6 +6,7 @@ ### Available Operations * [list_plans](#list_plans) - List all commerce plans +* [list_subscription_items](#list_subscription_items) - List all subscription items ## list_plans @@ -49,6 +50,58 @@ with Clerk( ### 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 | diff --git a/docs/sdks/instancesettingssdk/README.md b/docs/sdks/instancesettingssdk/README.md index e2dbc6ba..c592724a 100644 --- a/docs/sdks/instancesettingssdk/README.md +++ b/docs/sdks/instancesettingssdk/README.md @@ -151,7 +151,7 @@ with Clerk( Change the domain of a production instance. -Changing the domain requires updating the [DNS records](https://clerk.com/docs/deployments/overview#dns-records) accordingly, deploying new [SSL certificates](https://clerk.com/docs/deployments/overview#deploy), updating your Social Connection's redirect URLs and setting the new keys in your code. +Changing the domain requires updating the [DNS records](https://clerk.com/docs/deployments/overview#dns-records) accordingly, deploying new [SSL certificates](https://clerk.com/docs/deployments/overview#deploy-certificates), updating your Social Connection's redirect URLs and setting the new keys in your code. WARNING: Changing your domain will invalidate all current user sessions (i.e. users will be logged out). Also, while your application is being deployed, a small downtime is expected to occur. diff --git a/docs/sdks/organizationssdk/README.md b/docs/sdks/organizationssdk/README.md index cc7988cf..eb4092b0 100644 --- a/docs/sdks/organizationssdk/README.md +++ b/docs/sdks/organizationssdk/README.md @@ -80,7 +80,7 @@ You can provide additional metadata for the organization and set any custom attr Organizations support private and public metadata. Private metadata can only be accessed from the Backend API. Public metadata can be accessed from the Backend API, and are read-only from the Frontend API. -The `created_by` user will see this as their [active organization] (https://clerk.com/docs/organizations/overview#active-organization) +The `created_by` user will see this as their [active organization](https://clerk.com/docs/organizations/overview#active-organization) the next time they create a session, presuming they don't explicitly set a different organization as active before then. ### Example Usage diff --git a/pyproject.toml b/pyproject.toml index 88e14138..abc31165 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "clerk-backend-api" -version = "3.2.0" +version = "3.2.1" description = "Python Client SDK for clerk.dev" authors = [{ name = "Clerk" },] readme = "README-PYPI.md" diff --git a/src/clerk_backend_api/_version.py b/src/clerk_backend_api/_version.py index e8fda756..8b233aaa 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 = "3.2.0" +__version__: str = "3.2.1" __openapi_doc_version__: str = "2025-04-10" -__gen_version__: str = "2.684.0" -__user_agent__: str = "speakeasy-sdk/python 3.2.0 2.684.0 2025-04-10 clerk-backend-api" +__gen_version__: str = "2.686.7" +__user_agent__: str = "speakeasy-sdk/python 3.2.1 2.686.7 2025-04-10 clerk-backend-api" try: if __package__ is not None: diff --git a/src/clerk_backend_api/betafeatures.py b/src/clerk_backend_api/betafeatures.py index e4946045..59386b2d 100644 --- a/src/clerk_backend_api/betafeatures.py +++ b/src/clerk_backend_api/betafeatures.py @@ -237,7 +237,7 @@ def update_production_instance_domain( Change the domain of a production instance. - Changing the domain requires updating the [DNS records](https://clerk.com/docs/deployments/overview#dns-records) accordingly, deploying new [SSL certificates](https://clerk.com/docs/deployments/overview#deploy), updating your Social Connection's redirect URLs and setting the new keys in your code. + Changing the domain requires updating the [DNS records](https://clerk.com/docs/deployments/overview#dns-records) accordingly, deploying new [SSL certificates](https://clerk.com/docs/deployments/overview#deploy-certificates), updating your Social Connection's redirect URLs and setting the new keys in your code. WARNING: Changing your domain will invalidate all current user sessions (i.e. users will be logged out). Also, while your application is being deployed, a small downtime is expected to occur. @@ -349,7 +349,7 @@ async def update_production_instance_domain_async( Change the domain of a production instance. - Changing the domain requires updating the [DNS records](https://clerk.com/docs/deployments/overview#dns-records) accordingly, deploying new [SSL certificates](https://clerk.com/docs/deployments/overview#deploy), updating your Social Connection's redirect URLs and setting the new keys in your code. + Changing the domain requires updating the [DNS records](https://clerk.com/docs/deployments/overview#dns-records) accordingly, deploying new [SSL certificates](https://clerk.com/docs/deployments/overview#deploy-certificates), updating your Social Connection's redirect URLs and setting the new keys in your code. WARNING: Changing your domain will invalidate all current user sessions (i.e. users will be logged out). Also, while your application is being deployed, a small downtime is expected to occur. diff --git a/src/clerk_backend_api/commerce.py b/src/clerk_backend_api/commerce.py index 6c22a34f..e68772a3 100644 --- a/src/clerk_backend_api/commerce.py +++ b/src/clerk_backend_api/commerce.py @@ -216,3 +216,235 @@ async def list_plans_async( 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=[], + 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=[], + 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) diff --git a/src/clerk_backend_api/instancesettings_sdk.py b/src/clerk_backend_api/instancesettings_sdk.py index 80bc472e..240630f4 100644 --- a/src/clerk_backend_api/instancesettings_sdk.py +++ b/src/clerk_backend_api/instancesettings_sdk.py @@ -591,7 +591,7 @@ def change_domain( Change the domain of a production instance. - Changing the domain requires updating the [DNS records](https://clerk.com/docs/deployments/overview#dns-records) accordingly, deploying new [SSL certificates](https://clerk.com/docs/deployments/overview#deploy), updating your Social Connection's redirect URLs and setting the new keys in your code. + Changing the domain requires updating the [DNS records](https://clerk.com/docs/deployments/overview#dns-records) accordingly, deploying new [SSL certificates](https://clerk.com/docs/deployments/overview#deploy-certificates), updating your Social Connection's redirect URLs and setting the new keys in your code. WARNING: Changing your domain will invalidate all current user sessions (i.e. users will be logged out). Also, while your application is being deployed, a small downtime is expected to occur. @@ -700,7 +700,7 @@ async def change_domain_async( Change the domain of a production instance. - Changing the domain requires updating the [DNS records](https://clerk.com/docs/deployments/overview#dns-records) accordingly, deploying new [SSL certificates](https://clerk.com/docs/deployments/overview#deploy), updating your Social Connection's redirect URLs and setting the new keys in your code. + Changing the domain requires updating the [DNS records](https://clerk.com/docs/deployments/overview#dns-records) accordingly, deploying new [SSL certificates](https://clerk.com/docs/deployments/overview#deploy-certificates), updating your Social Connection's redirect URLs and setting the new keys in your code. WARNING: Changing your domain will invalidate all current user sessions (i.e. users will be logged out). Also, while your application is being deployed, a small downtime is expected to occur. diff --git a/src/clerk_backend_api/models/__init__.py b/src/clerk_backend_api/models/__init__.py index 9c4495e5..776e0eb4 100644 --- a/src/clerk_backend_api/models/__init__.py +++ b/src/clerk_backend_api/models/__init__.py @@ -56,6 +56,40 @@ CommerceMoneyResponseTypedDict, ) from .commerceplan import CommercePlan, CommercePlanObject, CommercePlanTypedDict + from .commercesubscriptionitem import ( + Amount, + AmountTypedDict, + CommerceSubscriptionItem, + CommerceSubscriptionItemAmount, + CommerceSubscriptionItemAmountTypedDict, + CommerceSubscriptionItemNextInvoiceAmount, + CommerceSubscriptionItemNextInvoiceAmountTypedDict, + CommerceSubscriptionItemNextPaymentAmount, + CommerceSubscriptionItemNextPaymentAmountTypedDict, + CommerceSubscriptionItemObject, + CommerceSubscriptionItemPayerObject, + CommerceSubscriptionItemPaymentSourceObject, + CommerceSubscriptionItemPaymentSourceStatus, + CommerceSubscriptionItemPlanObject, + CommerceSubscriptionItemStatus, + CommerceSubscriptionItemTypedDict, + Credit, + CreditTypedDict, + LifetimePaid, + LifetimePaidTypedDict, + NextInvoice, + NextInvoiceTypedDict, + NextPayment, + NextPaymentTypedDict, + Payer, + PayerTypedDict, + PaymentMethod, + PaymentSource, + PaymentSourceTypedDict, + Plan, + PlanPeriod, + PlanTypedDict, + ) from .cookies import Cookies, CookiesObject, CookiesTypedDict from .createactortokenop import ( CreateActorTokenActor, @@ -292,9 +326,13 @@ from .emailaddress import ( Admin, AdminTypedDict, + ClerkErrorErrorMeta, + ClerkErrorErrorMetaTypedDict, EmailAddress, EmailAddressObject, EmailAddressTypedDict, + EmailLink, + EmailLinkTypedDict, Error, ErrorClerkError, ErrorClerkErrorTypedDict, @@ -305,15 +343,27 @@ FromOAuthTypedDict, Otp, OtpTypedDict, + Saml, + SamlTypedDict, Strategy, Ticket, TicketTypedDict, Verification, VerificationAdminVerificationObject, VerificationAdminVerificationStatus, + VerificationEmailLinkVerificationObject, + VerificationEmailLinkVerificationStatus, + VerificationEmailLinkVerificationStrategy, + VerificationError, + VerificationErrorTypedDict, VerificationFromOauthVerificationObject, VerificationFromOauthVerificationStatus, VerificationObject, + VerificationSamlErrorClerkError, + VerificationSamlErrorClerkErrorTypedDict, + VerificationSamlVerificationObject, + VerificationSamlVerificationStatus, + VerificationSamlVerificationStrategy, VerificationStatus, VerificationStrategy, VerificationTicketVerificationObject, @@ -324,8 +374,8 @@ from .externalaccountwithverification import ( ClerkErrorErrorExternalAccountWithVerificationMeta, ClerkErrorErrorExternalAccountWithVerificationMetaTypedDict, - ClerkErrorErrorMeta, - ClerkErrorErrorMetaTypedDict, + ClerkErrorErrorExternalAccountWithVerificationVerificationMeta, + ClerkErrorErrorExternalAccountWithVerificationVerificationMetaTypedDict, ExternalAccountWithVerification, ExternalAccountWithVerificationObject, ExternalAccountWithVerificationTypedDict, @@ -335,8 +385,6 @@ GoogleOneTapTypedDict, Oauth, OauthTypedDict, - VerificationError, - VerificationErrorTypedDict, VerificationGoogleOneTapErrorClerkError, VerificationGoogleOneTapErrorClerkErrorTypedDict, VerificationGoogleOneTapVerificationError, @@ -346,6 +394,8 @@ VerificationGoogleOneTapVerificationStrategy, VerificationOauthErrorClerkError, VerificationOauthErrorClerkErrorTypedDict, + VerificationOauthVerificationError, + VerificationOauthVerificationErrorTypedDict, VerificationOauthVerificationObject, VerificationOauthVerificationStatus, ) @@ -361,6 +411,12 @@ GetCommercePlanListRequestTypedDict, PayerType, ) + from .getcommercesubscriptionitemlistop import ( + GetCommerceSubscriptionItemListQueryParamStatus, + GetCommerceSubscriptionItemListRequest, + GetCommerceSubscriptionItemListRequestTypedDict, + QueryParamPayerType, + ) from .getemailaddressop import ( GetEmailAddressRequest, GetEmailAddressRequestTypedDict, @@ -656,6 +712,10 @@ PaginatedCommercePlanResponse, PaginatedCommercePlanResponseTypedDict, ) + from .paginatedcommercesubscriptionitemresponse import ( + PaginatedCommerceSubscriptionItemResponse, + PaginatedCommerceSubscriptionItemResponseTypedDict, + ) from .passkey import ( Nonce, Passkey, @@ -763,17 +823,17 @@ SAMLConnection2TypedDict, SAMLConnectionSAMLConnection, SAMLConnectionSAMLConnectionTypedDict, - Saml, SamlConnection, SamlConnectionTypedDict, - SamlTypedDict, - VerificationSamlErrorClerkError, - VerificationSamlErrorClerkErrorTypedDict, + VerificationSAML, + VerificationSAMLErrorSAMLAccountClerkError, + VerificationSAMLErrorSAMLAccountClerkErrorTypedDict, + VerificationSAMLTypedDict, + VerificationSAMLVerificationSAMLAccountObject, + VerificationSAMLVerificationSAMLAccountStatus, + VerificationSAMLVerificationSAMLAccountStrategy, VerificationSamlVerificationError, VerificationSamlVerificationErrorTypedDict, - VerificationSamlVerificationObject, - VerificationSamlVerificationStatus, - VerificationSamlVerificationStrategy, VerificationTicket, VerificationTicketTypedDict, VerificationTicketVerificationSAMLAccountObject, @@ -1112,6 +1172,8 @@ "AllowlistIdentifier", "AllowlistIdentifierObject", "AllowlistIdentifierTypedDict", + "Amount", + "AmountTypedDict", "AttributeMapping", "AttributeMappingTypedDict", "BanUserRequest", @@ -1132,6 +1194,8 @@ "ClerkError", "ClerkErrorErrorExternalAccountWithVerificationMeta", "ClerkErrorErrorExternalAccountWithVerificationMetaTypedDict", + "ClerkErrorErrorExternalAccountWithVerificationVerificationMeta", + "ClerkErrorErrorExternalAccountWithVerificationVerificationMetaTypedDict", "ClerkErrorErrorMeta", "ClerkErrorErrorMetaTypedDict", "ClerkErrorErrorSAMLAccountMeta", @@ -1150,6 +1214,20 @@ "CommercePlan", "CommercePlanObject", "CommercePlanTypedDict", + "CommerceSubscriptionItem", + "CommerceSubscriptionItemAmount", + "CommerceSubscriptionItemAmountTypedDict", + "CommerceSubscriptionItemNextInvoiceAmount", + "CommerceSubscriptionItemNextInvoiceAmountTypedDict", + "CommerceSubscriptionItemNextPaymentAmount", + "CommerceSubscriptionItemNextPaymentAmountTypedDict", + "CommerceSubscriptionItemObject", + "CommerceSubscriptionItemPayerObject", + "CommerceSubscriptionItemPaymentSourceObject", + "CommerceSubscriptionItemPaymentSourceStatus", + "CommerceSubscriptionItemPlanObject", + "CommerceSubscriptionItemStatus", + "CommerceSubscriptionItemTypedDict", "Cookies", "CookiesObject", "CookiesTypedDict", @@ -1237,6 +1315,8 @@ "CreateUserRequestBodyTypedDict", "CreateWaitlistEntryRequestBody", "CreateWaitlistEntryRequestBodyTypedDict", + "Credit", + "CreditTypedDict", "DeleteAWSCredentialRequest", "DeleteAWSCredentialRequestTypedDict", "DeleteAllowlistIdentifierRequest", @@ -1298,6 +1378,8 @@ "EmailAddress", "EmailAddressObject", "EmailAddressTypedDict", + "EmailLink", + "EmailLinkTypedDict", "EnrollmentMode", "Error", "ErrorClerkError", @@ -1328,6 +1410,9 @@ "GetClientRequestTypedDict", "GetCommercePlanListRequest", "GetCommercePlanListRequestTypedDict", + "GetCommerceSubscriptionItemListQueryParamStatus", + "GetCommerceSubscriptionItemListRequest", + "GetCommerceSubscriptionItemListRequestTypedDict", "GetEmailAddressRequest", "GetEmailAddressRequestTypedDict", "GetJWTTemplateRequest", @@ -1416,6 +1501,8 @@ "JwksTypedDict", "Keys", "KeysTypedDict", + "LifetimePaid", + "LifetimePaidTypedDict", "ListAllOrganizationDomainsRequest", "ListAllOrganizationDomainsRequestTypedDict", "ListAllowlistIdentifiersRequest", @@ -1484,6 +1571,10 @@ "Meta", "MetaTypedDict", "NextAction", + "NextInvoice", + "NextInvoiceTypedDict", + "NextPayment", + "NextPaymentTypedDict", "NoResponseError", "Nonce", "OAuthAccessToken", @@ -1547,18 +1638,28 @@ "OtpTypedDict", "PaginatedCommercePlanResponse", "PaginatedCommercePlanResponseTypedDict", + "PaginatedCommerceSubscriptionItemResponse", + "PaginatedCommerceSubscriptionItemResponseTypedDict", "Passkey", "PasskeyObject", "PasskeyTypedDict", "PasskeyVerification", "PasskeyVerificationTypedDict", "PathParamTemplateType", + "Payer", "PayerType", + "PayerTypedDict", + "PaymentMethod", + "PaymentSource", + "PaymentSourceTypedDict", "PhoneNumber", "PhoneNumberObject", "PhoneNumberTypedDict", "PhoneNumberVerification", "PhoneNumberVerificationTypedDict", + "Plan", + "PlanPeriod", + "PlanTypedDict", "PreviewTemplateRequest", "PreviewTemplateRequestBody", "PreviewTemplateRequestBodyTypedDict", @@ -1572,6 +1673,7 @@ "PublicOrganizationData", "PublicOrganizationDataTypedDict", "QueryParamEnrollmentMode", + "QueryParamPayerType", "QueryParamStatus", "RedirectURL", "RedirectURLObject", @@ -1818,6 +1920,9 @@ "VerificationAdminVerificationWeb3WalletObject", "VerificationAdminVerificationWeb3WalletStatus", "VerificationAdminVerificationWeb3WalletStrategy", + "VerificationEmailLinkVerificationObject", + "VerificationEmailLinkVerificationStatus", + "VerificationEmailLinkVerificationStrategy", "VerificationError", "VerificationErrorTypedDict", "VerificationFromOauthVerificationObject", @@ -1833,6 +1938,8 @@ "VerificationOTPTypedDict", "VerificationOauthErrorClerkError", "VerificationOauthErrorClerkErrorTypedDict", + "VerificationOauthVerificationError", + "VerificationOauthVerificationErrorTypedDict", "VerificationOauthVerificationObject", "VerificationOauthVerificationStatus", "VerificationObject", @@ -1844,6 +1951,13 @@ "VerificationPasskeyVerificationObject", "VerificationPasskeyVerificationStatus", "VerificationPasskeyVerificationStrategy", + "VerificationSAML", + "VerificationSAMLErrorSAMLAccountClerkError", + "VerificationSAMLErrorSAMLAccountClerkErrorTypedDict", + "VerificationSAMLTypedDict", + "VerificationSAMLVerificationSAMLAccountObject", + "VerificationSAMLVerificationSAMLAccountStatus", + "VerificationSAMLVerificationSAMLAccountStrategy", "VerificationSamlErrorClerkError", "VerificationSamlErrorClerkErrorTypedDict", "VerificationSamlVerificationError", @@ -1975,6 +2089,38 @@ "CommercePlan": ".commerceplan", "CommercePlanObject": ".commerceplan", "CommercePlanTypedDict": ".commerceplan", + "Amount": ".commercesubscriptionitem", + "AmountTypedDict": ".commercesubscriptionitem", + "CommerceSubscriptionItem": ".commercesubscriptionitem", + "CommerceSubscriptionItemAmount": ".commercesubscriptionitem", + "CommerceSubscriptionItemAmountTypedDict": ".commercesubscriptionitem", + "CommerceSubscriptionItemNextInvoiceAmount": ".commercesubscriptionitem", + "CommerceSubscriptionItemNextInvoiceAmountTypedDict": ".commercesubscriptionitem", + "CommerceSubscriptionItemNextPaymentAmount": ".commercesubscriptionitem", + "CommerceSubscriptionItemNextPaymentAmountTypedDict": ".commercesubscriptionitem", + "CommerceSubscriptionItemObject": ".commercesubscriptionitem", + "CommerceSubscriptionItemPayerObject": ".commercesubscriptionitem", + "CommerceSubscriptionItemPaymentSourceObject": ".commercesubscriptionitem", + "CommerceSubscriptionItemPaymentSourceStatus": ".commercesubscriptionitem", + "CommerceSubscriptionItemPlanObject": ".commercesubscriptionitem", + "CommerceSubscriptionItemStatus": ".commercesubscriptionitem", + "CommerceSubscriptionItemTypedDict": ".commercesubscriptionitem", + "Credit": ".commercesubscriptionitem", + "CreditTypedDict": ".commercesubscriptionitem", + "LifetimePaid": ".commercesubscriptionitem", + "LifetimePaidTypedDict": ".commercesubscriptionitem", + "NextInvoice": ".commercesubscriptionitem", + "NextInvoiceTypedDict": ".commercesubscriptionitem", + "NextPayment": ".commercesubscriptionitem", + "NextPaymentTypedDict": ".commercesubscriptionitem", + "Payer": ".commercesubscriptionitem", + "PayerTypedDict": ".commercesubscriptionitem", + "PaymentMethod": ".commercesubscriptionitem", + "PaymentSource": ".commercesubscriptionitem", + "PaymentSourceTypedDict": ".commercesubscriptionitem", + "Plan": ".commercesubscriptionitem", + "PlanPeriod": ".commercesubscriptionitem", + "PlanTypedDict": ".commercesubscriptionitem", "Cookies": ".cookies", "CookiesObject": ".cookies", "CookiesTypedDict": ".cookies", @@ -2134,9 +2280,13 @@ "DomainsTypedDict": ".domains", "Admin": ".emailaddress", "AdminTypedDict": ".emailaddress", + "ClerkErrorErrorMeta": ".emailaddress", + "ClerkErrorErrorMetaTypedDict": ".emailaddress", "EmailAddress": ".emailaddress", "EmailAddressObject": ".emailaddress", "EmailAddressTypedDict": ".emailaddress", + "EmailLink": ".emailaddress", + "EmailLinkTypedDict": ".emailaddress", "Error": ".emailaddress", "ErrorClerkError": ".emailaddress", "ErrorClerkErrorTypedDict": ".emailaddress", @@ -2147,15 +2297,27 @@ "FromOAuthTypedDict": ".emailaddress", "Otp": ".emailaddress", "OtpTypedDict": ".emailaddress", + "Saml": ".emailaddress", + "SamlTypedDict": ".emailaddress", "Strategy": ".emailaddress", "Ticket": ".emailaddress", "TicketTypedDict": ".emailaddress", "Verification": ".emailaddress", "VerificationAdminVerificationObject": ".emailaddress", "VerificationAdminVerificationStatus": ".emailaddress", + "VerificationEmailLinkVerificationObject": ".emailaddress", + "VerificationEmailLinkVerificationStatus": ".emailaddress", + "VerificationEmailLinkVerificationStrategy": ".emailaddress", + "VerificationError": ".emailaddress", + "VerificationErrorTypedDict": ".emailaddress", "VerificationFromOauthVerificationObject": ".emailaddress", "VerificationFromOauthVerificationStatus": ".emailaddress", "VerificationObject": ".emailaddress", + "VerificationSamlErrorClerkError": ".emailaddress", + "VerificationSamlErrorClerkErrorTypedDict": ".emailaddress", + "VerificationSamlVerificationObject": ".emailaddress", + "VerificationSamlVerificationStatus": ".emailaddress", + "VerificationSamlVerificationStrategy": ".emailaddress", "VerificationStatus": ".emailaddress", "VerificationStrategy": ".emailaddress", "VerificationTicketVerificationObject": ".emailaddress", @@ -2164,8 +2326,8 @@ "VerificationTypedDict": ".emailaddress", "ClerkErrorErrorExternalAccountWithVerificationMeta": ".externalaccountwithverification", "ClerkErrorErrorExternalAccountWithVerificationMetaTypedDict": ".externalaccountwithverification", - "ClerkErrorErrorMeta": ".externalaccountwithverification", - "ClerkErrorErrorMetaTypedDict": ".externalaccountwithverification", + "ClerkErrorErrorExternalAccountWithVerificationVerificationMeta": ".externalaccountwithverification", + "ClerkErrorErrorExternalAccountWithVerificationVerificationMetaTypedDict": ".externalaccountwithverification", "ExternalAccountWithVerification": ".externalaccountwithverification", "ExternalAccountWithVerificationObject": ".externalaccountwithverification", "ExternalAccountWithVerificationTypedDict": ".externalaccountwithverification", @@ -2175,8 +2337,6 @@ "GoogleOneTapTypedDict": ".externalaccountwithverification", "Oauth": ".externalaccountwithverification", "OauthTypedDict": ".externalaccountwithverification", - "VerificationError": ".externalaccountwithverification", - "VerificationErrorTypedDict": ".externalaccountwithverification", "VerificationGoogleOneTapErrorClerkError": ".externalaccountwithverification", "VerificationGoogleOneTapErrorClerkErrorTypedDict": ".externalaccountwithverification", "VerificationGoogleOneTapVerificationError": ".externalaccountwithverification", @@ -2186,6 +2346,8 @@ "VerificationGoogleOneTapVerificationStrategy": ".externalaccountwithverification", "VerificationOauthErrorClerkError": ".externalaccountwithverification", "VerificationOauthErrorClerkErrorTypedDict": ".externalaccountwithverification", + "VerificationOauthVerificationError": ".externalaccountwithverification", + "VerificationOauthVerificationErrorTypedDict": ".externalaccountwithverification", "VerificationOauthVerificationObject": ".externalaccountwithverification", "VerificationOauthVerificationStatus": ".externalaccountwithverification", "FeatureResponse": ".featureresponse", @@ -2198,6 +2360,10 @@ "GetCommercePlanListRequest": ".getcommerceplanlistop", "GetCommercePlanListRequestTypedDict": ".getcommerceplanlistop", "PayerType": ".getcommerceplanlistop", + "GetCommerceSubscriptionItemListQueryParamStatus": ".getcommercesubscriptionitemlistop", + "GetCommerceSubscriptionItemListRequest": ".getcommercesubscriptionitemlistop", + "GetCommerceSubscriptionItemListRequestTypedDict": ".getcommercesubscriptionitemlistop", + "QueryParamPayerType": ".getcommercesubscriptionitemlistop", "GetEmailAddressRequest": ".getemailaddressop", "GetEmailAddressRequestTypedDict": ".getemailaddressop", "GetJWTTemplateRequest": ".getjwttemplateop", @@ -2414,6 +2580,8 @@ "OrganizationWithLogoTypedDict": ".organizationwithlogo", "PaginatedCommercePlanResponse": ".paginatedcommerceplanresponse", "PaginatedCommercePlanResponseTypedDict": ".paginatedcommerceplanresponse", + "PaginatedCommerceSubscriptionItemResponse": ".paginatedcommercesubscriptionitemresponse", + "PaginatedCommerceSubscriptionItemResponseTypedDict": ".paginatedcommercesubscriptionitemresponse", "Nonce": ".passkey", "Passkey": ".passkey", "PasskeyObject": ".passkey", @@ -2503,17 +2671,17 @@ "SAMLConnection2TypedDict": ".samlaccount", "SAMLConnectionSAMLConnection": ".samlaccount", "SAMLConnectionSAMLConnectionTypedDict": ".samlaccount", - "Saml": ".samlaccount", "SamlConnection": ".samlaccount", "SamlConnectionTypedDict": ".samlaccount", - "SamlTypedDict": ".samlaccount", - "VerificationSamlErrorClerkError": ".samlaccount", - "VerificationSamlErrorClerkErrorTypedDict": ".samlaccount", + "VerificationSAML": ".samlaccount", + "VerificationSAMLErrorSAMLAccountClerkError": ".samlaccount", + "VerificationSAMLErrorSAMLAccountClerkErrorTypedDict": ".samlaccount", + "VerificationSAMLTypedDict": ".samlaccount", + "VerificationSAMLVerificationSAMLAccountObject": ".samlaccount", + "VerificationSAMLVerificationSAMLAccountStatus": ".samlaccount", + "VerificationSAMLVerificationSAMLAccountStrategy": ".samlaccount", "VerificationSamlVerificationError": ".samlaccount", "VerificationSamlVerificationErrorTypedDict": ".samlaccount", - "VerificationSamlVerificationObject": ".samlaccount", - "VerificationSamlVerificationStatus": ".samlaccount", - "VerificationSamlVerificationStrategy": ".samlaccount", "VerificationTicket": ".samlaccount", "VerificationTicketTypedDict": ".samlaccount", "VerificationTicketVerificationSAMLAccountObject": ".samlaccount", diff --git a/src/clerk_backend_api/models/commerceplan.py b/src/clerk_backend_api/models/commerceplan.py index c0ba7d99..7432d996 100644 --- a/src/clerk_backend_api/models/commerceplan.py +++ b/src/clerk_backend_api/models/commerceplan.py @@ -3,8 +3,15 @@ from __future__ import annotations from .commercemoneyresponse import CommerceMoneyResponse, CommerceMoneyResponseTypedDict from .featureresponse import FeatureResponse, FeatureResponseTypedDict -from clerk_backend_api.types import BaseModel +from clerk_backend_api.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) from enum import Enum +from pydantic import model_serializer from typing import List, Optional from typing_extensions import NotRequired, TypedDict @@ -67,6 +74,10 @@ class CommercePlanTypedDict(TypedDict): r"""The billing period for the plan.""" interval: NotRequired[int] r"""The billing interval.""" + free_trial_enabled: NotRequired[bool] + r"""Whether free trial is enabled for this plan.""" + free_trial_days: NotRequired[Nullable[int]] + r"""Number of free trial days for this plan.""" class CommercePlan(BaseModel): @@ -147,3 +158,44 @@ class CommercePlan(BaseModel): interval: Optional[int] = None r"""The billing interval.""" + + free_trial_enabled: Optional[bool] = None + r"""Whether free trial is enabled for this plan.""" + + free_trial_days: OptionalNullable[int] = UNSET + r"""Number of free trial days for this plan.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "period", + "interval", + "free_trial_enabled", + "free_trial_days", + ] + nullable_fields = ["free_trial_days"] + 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/commercesubscriptionitem.py b/src/clerk_backend_api/models/commercesubscriptionitem.py new file mode 100644 index 00000000..1267a95f --- /dev/null +++ b/src/clerk_backend_api/models/commercesubscriptionitem.py @@ -0,0 +1,935 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .commercemoneyresponse import CommerceMoneyResponse, CommerceMoneyResponseTypedDict +from .featureresponse import FeatureResponse, FeatureResponseTypedDict +from clerk_backend_api.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from enum import Enum +import pydantic +from pydantic import model_serializer +from typing import List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class CommerceSubscriptionItemObject(str, Enum): + r"""String representing the object's type. Objects of the same type share the same value.""" + + COMMERCE_SUBSCRIPTION_ITEM = "commerce_subscription_item" + + +class CommerceSubscriptionItemStatus(str, Enum): + r"""Current status of the subscription item.""" + + ACTIVE = "active" + ENDED = "ended" + PAST_DUE = "past_due" + UPCOMING = "upcoming" + INCOMPLETE = "incomplete" + ABANDONED = "abandoned" + + +class CommerceSubscriptionItemAmountTypedDict(TypedDict): + r"""Credit amount.""" + + amount: int + r"""The amount in cents.""" + amount_formatted: str + r"""The formatted amount as a string (e.g., \"$49.99\").""" + currency: str + r"""The currency code (e.g., \"USD\").""" + currency_symbol: str + r"""The currency symbol (e.g., \"$\").""" + + +class CommerceSubscriptionItemAmount(BaseModel): + r"""Credit amount.""" + + amount: int + r"""The amount in cents.""" + + amount_formatted: str + r"""The formatted amount as a string (e.g., \"$49.99\").""" + + currency: str + r"""The currency code (e.g., \"USD\").""" + + currency_symbol: str + r"""The currency symbol (e.g., \"$\").""" + + +class CreditTypedDict(TypedDict): + r"""Credit information (only available in PaymentAttempt events).""" + + amount: NotRequired[Nullable[CommerceSubscriptionItemAmountTypedDict]] + r"""Credit amount.""" + cycle_remaining_percent: NotRequired[float] + r"""Percentage of the billing cycle remaining.""" + + +class Credit(BaseModel): + r"""Credit information (only available in PaymentAttempt events).""" + + amount: OptionalNullable[CommerceSubscriptionItemAmount] = UNSET + r"""Credit amount.""" + + cycle_remaining_percent: Optional[float] = None + r"""Percentage of the billing cycle remaining.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["amount", "cycle_remaining_percent"] + nullable_fields = ["amount"] + 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 CommerceSubscriptionItemPlanObject(str, Enum): + r"""String representing the object's type. Objects of the same type share the same value.""" + + COMMERCE_PLAN = "commerce_plan" + + +class PlanTypedDict(TypedDict): + r"""The associated commerce plan.""" + + object: CommerceSubscriptionItemPlanObject + r"""String representing the object's type. Objects of the same type share the same value.""" + id: str + r"""Unique identifier for the commerce plan.""" + name: str + r"""The name of the commerce plan.""" + fee: CommerceMoneyResponseTypedDict + annual_monthly_fee: CommerceMoneyResponseTypedDict + annual_fee: CommerceMoneyResponseTypedDict + amount: int + r"""The amount in cents for the plan.""" + amount_formatted: str + r"""The formatted amount as a string (e.g., \"$49.99\").""" + annual_monthly_amount: int + r"""The monthly amount in cents when billed annually.""" + annual_monthly_amount_formatted: str + r"""The formatted annual monthly amount as a string.""" + annual_amount: int + r"""The total annual amount in cents.""" + annual_amount_formatted: str + r"""The formatted annual amount as a string.""" + currency_symbol: str + r"""The currency symbol (e.g., \"$\").""" + currency: str + r"""The currency code (e.g., \"USD\").""" + description: str + r"""The description of the commerce plan.""" + product_id: str + r"""The ID of the product this plan belongs to.""" + is_default: bool + r"""Whether this is the default plan.""" + is_recurring: bool + r"""Whether this is a recurring plan.""" + publicly_visible: bool + r"""Whether this plan is publicly visible.""" + has_base_fee: bool + r"""Whether this plan has a base fee.""" + payer_type: List[str] + r"""The types of payers that can use this plan.""" + for_payer_type: str + r"""The payer type this plan is designed for.""" + slug: str + r"""The URL-friendly slug for the plan.""" + avatar_url: str + r"""The URL of the plan's avatar image.""" + features: List[FeatureResponseTypedDict] + r"""The features included in this plan.""" + period: NotRequired[str] + r"""The billing period for the plan.""" + interval: NotRequired[int] + r"""The billing interval.""" + free_trial_enabled: NotRequired[bool] + r"""Whether free trial is enabled for this plan.""" + free_trial_days: NotRequired[Nullable[int]] + r"""Number of free trial days for this plan.""" + + +class Plan(BaseModel): + r"""The associated commerce plan.""" + + object: CommerceSubscriptionItemPlanObject + r"""String representing the object's type. Objects of the same type share the same value.""" + + id: str + r"""Unique identifier for the commerce plan.""" + + name: str + r"""The name of the commerce plan.""" + + fee: CommerceMoneyResponse + + annual_monthly_fee: CommerceMoneyResponse + + annual_fee: CommerceMoneyResponse + + amount: int + r"""The amount in cents for the plan.""" + + amount_formatted: str + r"""The formatted amount as a string (e.g., \"$49.99\").""" + + annual_monthly_amount: int + r"""The monthly amount in cents when billed annually.""" + + annual_monthly_amount_formatted: str + r"""The formatted annual monthly amount as a string.""" + + annual_amount: int + r"""The total annual amount in cents.""" + + annual_amount_formatted: str + r"""The formatted annual amount as a string.""" + + currency_symbol: str + r"""The currency symbol (e.g., \"$\").""" + + currency: str + r"""The currency code (e.g., \"USD\").""" + + description: str + r"""The description of the commerce plan.""" + + product_id: str + r"""The ID of the product this plan belongs to.""" + + is_default: bool + r"""Whether this is the default plan.""" + + is_recurring: bool + r"""Whether this is a recurring plan.""" + + publicly_visible: bool + r"""Whether this plan is publicly visible.""" + + has_base_fee: bool + r"""Whether this plan has a base fee.""" + + payer_type: List[str] + r"""The types of payers that can use this plan.""" + + for_payer_type: str + r"""The payer type this plan is designed for.""" + + slug: str + r"""The URL-friendly slug for the plan.""" + + avatar_url: str + r"""The URL of the plan's avatar image.""" + + features: List[FeatureResponse] + r"""The features included in this plan.""" + + period: Optional[str] = None + r"""The billing period for the plan.""" + + interval: Optional[int] = None + r"""The billing interval.""" + + free_trial_enabled: Optional[bool] = None + r"""Whether free trial is enabled for this plan.""" + + free_trial_days: OptionalNullable[int] = UNSET + r"""Number of free trial days for this plan.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "period", + "interval", + "free_trial_enabled", + "free_trial_days", + ] + nullable_fields = ["free_trial_days"] + 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 PlanPeriod(str, Enum): + r"""The billing period for this subscription.""" + + MONTH = "month" + ANNUAL = "annual" + + +class CommerceSubscriptionItemPaymentSourceObject(str, Enum): + r"""String representing the object's type. Objects of the same type share the same value.""" + + COMMERCE_SOURCE = "commerce_source" + + +class PaymentMethod(str, Enum): + r"""The payment method type.""" + + CARD = "card" + APPLE_PAY = "apple_pay" + GOOGLE_PAY = "google_pay" + + +class CommerceSubscriptionItemPaymentSourceStatus(str, Enum): + r"""Status of the payment source.""" + + ACTIVE = "active" + DISCONNECTED = "disconnected" + + +class PaymentSourceTypedDict(TypedDict): + r"""The payment source associated with this subscription.""" + + object: CommerceSubscriptionItemPaymentSourceObject + r"""String representing the object's type. Objects of the same type share the same value.""" + id: str + r"""Unique identifier for the payment source.""" + payer_id: str + r"""Unique identifier for the payer.""" + payment_method: PaymentMethod + r"""The payment method type.""" + gateway: str + r"""The payment gateway.""" + gateway_external_id: str + r"""External ID in the payment gateway.""" + last4: str + r"""Last 4 digits of the card (for card payment sources).""" + status: CommerceSubscriptionItemPaymentSourceStatus + r"""Status of the payment source.""" + wallet_type: str + r"""Type of wallet (if applicable).""" + card_type: str + r"""Type of card (if applicable).""" + created_at: int + r"""Unix timestamp (in milliseconds) when the payment source was created.""" + updated_at: int + r"""Unix timestamp (in milliseconds) when the payment source was last updated.""" + is_default: NotRequired[Nullable[bool]] + r"""Whether this is the default payment source for the payer.""" + gateway_external_account_id: NotRequired[Nullable[str]] + r"""External account ID in the payment gateway.""" + expiry_year: NotRequired[int] + r"""Card expiration year (for card payment sources).""" + expiry_month: NotRequired[int] + r"""Card expiration month (for card payment sources).""" + is_removable: NotRequired[Nullable[bool]] + r"""Whether this payment source can be removed.""" + + +class PaymentSource(BaseModel): + r"""The payment source associated with this subscription.""" + + object: CommerceSubscriptionItemPaymentSourceObject + r"""String representing the object's type. Objects of the same type share the same value.""" + + id: str + r"""Unique identifier for the payment source.""" + + payer_id: str + r"""Unique identifier for the payer.""" + + payment_method: PaymentMethod + r"""The payment method type.""" + + gateway: str + r"""The payment gateway.""" + + gateway_external_id: str + r"""External ID in the payment gateway.""" + + last4: str + r"""Last 4 digits of the card (for card payment sources).""" + + status: CommerceSubscriptionItemPaymentSourceStatus + r"""Status of the payment source.""" + + wallet_type: str + r"""Type of wallet (if applicable).""" + + card_type: str + r"""Type of card (if applicable).""" + + created_at: int + r"""Unix timestamp (in milliseconds) when the payment source was created.""" + + updated_at: int + r"""Unix timestamp (in milliseconds) when the payment source was last updated.""" + + is_default: OptionalNullable[bool] = UNSET + r"""Whether this is the default payment source for the payer.""" + + gateway_external_account_id: OptionalNullable[str] = UNSET + r"""External account ID in the payment gateway.""" + + expiry_year: Optional[int] = None + r"""Card expiration year (for card payment sources).""" + + expiry_month: Optional[int] = None + r"""Card expiration month (for card payment sources).""" + + is_removable: OptionalNullable[bool] = UNSET + r"""Whether this payment source can be removed.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "is_default", + "gateway_external_account_id", + "expiry_year", + "expiry_month", + "is_removable", + ] + nullable_fields = ["is_default", "gateway_external_account_id", "is_removable"] + 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 LifetimePaidTypedDict(TypedDict): + r"""Total amount paid over the lifetime of this subscription.""" + + amount: int + r"""The amount in cents.""" + amount_formatted: str + r"""The formatted amount as a string (e.g., \"$49.99\").""" + currency: str + r"""The currency code (e.g., \"USD\").""" + currency_symbol: str + r"""The currency symbol (e.g., \"$\").""" + + +class LifetimePaid(BaseModel): + r"""Total amount paid over the lifetime of this subscription.""" + + amount: int + r"""The amount in cents.""" + + amount_formatted: str + r"""The formatted amount as a string (e.g., \"$49.99\").""" + + currency: str + r"""The currency code (e.g., \"USD\").""" + + currency_symbol: str + r"""The currency symbol (e.g., \"$\").""" + + +class AmountTypedDict(TypedDict): + r"""Current amount for this subscription.""" + + amount: int + r"""The amount in cents.""" + amount_formatted: str + r"""The formatted amount as a string (e.g., \"$49.99\").""" + currency: str + r"""The currency code (e.g., \"USD\").""" + currency_symbol: str + r"""The currency symbol (e.g., \"$\").""" + + +class Amount(BaseModel): + r"""Current amount for this subscription.""" + + amount: int + r"""The amount in cents.""" + + amount_formatted: str + r"""The formatted amount as a string (e.g., \"$49.99\").""" + + currency: str + r"""The currency code (e.g., \"USD\").""" + + currency_symbol: str + r"""The currency symbol (e.g., \"$\").""" + + +class CommerceSubscriptionItemNextInvoiceAmountTypedDict(TypedDict): + r"""Amount for the next payment.""" + + amount: int + r"""The amount in cents.""" + amount_formatted: str + r"""The formatted amount as a string (e.g., \"$49.99\").""" + currency: str + r"""The currency code (e.g., \"USD\").""" + currency_symbol: str + r"""The currency symbol (e.g., \"$\").""" + + +class CommerceSubscriptionItemNextInvoiceAmount(BaseModel): + r"""Amount for the next payment.""" + + amount: int + r"""The amount in cents.""" + + amount_formatted: str + r"""The formatted amount as a string (e.g., \"$49.99\").""" + + currency: str + r"""The currency code (e.g., \"USD\").""" + + currency_symbol: str + r"""The currency symbol (e.g., \"$\").""" + + +class NextInvoiceTypedDict(TypedDict): + r"""Information about the next invoice.""" + + amount: NotRequired[Nullable[CommerceSubscriptionItemNextInvoiceAmountTypedDict]] + r"""Amount for the next payment.""" + date_: NotRequired[Nullable[int]] + r"""Unix timestamp (in milliseconds) for the next payment date.""" + + +class NextInvoice(BaseModel): + r"""Information about the next invoice.""" + + amount: OptionalNullable[CommerceSubscriptionItemNextInvoiceAmount] = UNSET + r"""Amount for the next payment.""" + + date_: Annotated[OptionalNullable[int], pydantic.Field(alias="date")] = UNSET + r"""Unix timestamp (in milliseconds) for the next payment date.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["amount", "date"] + nullable_fields = ["amount", "date"] + 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 CommerceSubscriptionItemNextPaymentAmountTypedDict(TypedDict): + r"""Amount for the next payment.""" + + amount: int + r"""The amount in cents.""" + amount_formatted: str + r"""The formatted amount as a string (e.g., \"$49.99\").""" + currency: str + r"""The currency code (e.g., \"USD\").""" + currency_symbol: str + r"""The currency symbol (e.g., \"$\").""" + + +class CommerceSubscriptionItemNextPaymentAmount(BaseModel): + r"""Amount for the next payment.""" + + amount: int + r"""The amount in cents.""" + + amount_formatted: str + r"""The formatted amount as a string (e.g., \"$49.99\").""" + + currency: str + r"""The currency code (e.g., \"USD\").""" + + currency_symbol: str + r"""The currency symbol (e.g., \"$\").""" + + +class NextPaymentTypedDict(TypedDict): + r"""Information about the next payment.""" + + amount: NotRequired[Nullable[CommerceSubscriptionItemNextPaymentAmountTypedDict]] + r"""Amount for the next payment.""" + date_: NotRequired[Nullable[int]] + r"""Unix timestamp (in milliseconds) for the next payment date.""" + + +class NextPayment(BaseModel): + r"""Information about the next payment.""" + + amount: OptionalNullable[CommerceSubscriptionItemNextPaymentAmount] = UNSET + r"""Amount for the next payment.""" + + date_: Annotated[OptionalNullable[int], pydantic.Field(alias="date")] = UNSET + r"""Unix timestamp (in milliseconds) for the next payment date.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["amount", "date"] + nullable_fields = ["amount", "date"] + 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 CommerceSubscriptionItemPayerObject(str, Enum): + r"""String representing the object's type. Objects of the same type share the same value.""" + + COMMERCE_PAYER = "commerce_payer" + + +class PayerTypedDict(TypedDict): + r"""The payer associated with this subscription.""" + + object: CommerceSubscriptionItemPayerObject + r"""String representing the object's type. Objects of the same type share the same value.""" + id: str + r"""Unique identifier for the payer.""" + instance_id: str + r"""Unique identifier for the Clerk instance.""" + first_name: str + r"""First name of the payer.""" + last_name: str + r"""Last name of the payer.""" + email: str + r"""Email address of the payer.""" + image_url: str + r"""URL of the payer's image/avatar.""" + created_at: int + r"""Unix timestamp (in milliseconds) when the payer was created.""" + updated_at: int + r"""Unix timestamp (in milliseconds) when the payer was last updated.""" + user_id: NotRequired[str] + r"""User ID for user-type payers.""" + organization_id: NotRequired[str] + r"""Organization ID for org-type payers.""" + organization_name: NotRequired[str] + r"""Organization name for org-type payers.""" + + +class Payer(BaseModel): + r"""The payer associated with this subscription.""" + + object: CommerceSubscriptionItemPayerObject + r"""String representing the object's type. Objects of the same type share the same value.""" + + id: str + r"""Unique identifier for the payer.""" + + instance_id: str + r"""Unique identifier for the Clerk instance.""" + + first_name: str + r"""First name of the payer.""" + + last_name: str + r"""Last name of the payer.""" + + email: str + r"""Email address of the payer.""" + + image_url: str + r"""URL of the payer's image/avatar.""" + + created_at: int + r"""Unix timestamp (in milliseconds) when the payer was created.""" + + updated_at: int + r"""Unix timestamp (in milliseconds) when the payer was last updated.""" + + user_id: Optional[str] = None + r"""User ID for user-type payers.""" + + organization_id: Optional[str] = None + r"""Organization ID for org-type payers.""" + + organization_name: Optional[str] = None + r"""Organization name for org-type payers.""" + + +class CommerceSubscriptionItemTypedDict(TypedDict): + object: CommerceSubscriptionItemObject + r"""String representing the object's type. Objects of the same type share the same value.""" + id: str + r"""Unique identifier for the subscription item.""" + instance_id: str + r"""Unique identifier for the Clerk instance.""" + status: CommerceSubscriptionItemStatus + r"""Current status of the subscription item.""" + plan_id: str + r"""Unique identifier for the associated plan.""" + plan: Nullable[PlanTypedDict] + r"""The associated commerce plan.""" + plan_period: PlanPeriod + r"""The billing period for this subscription.""" + payment_source_id: str + r"""Unique identifier for the payment source.""" + payer_id: str + r"""Unique identifier for the payer.""" + is_free_trial: bool + r"""Whether this subscription is currently on a free trial.""" + proration_date: str + r"""Date used for proration calculations.""" + created_at: int + r"""Unix timestamp (in milliseconds) when the subscription was created.""" + updated_at: int + r"""Unix timestamp (in milliseconds) when the subscription was last updated.""" + credit: NotRequired[Nullable[CreditTypedDict]] + r"""Credit information (only available in PaymentAttempt events).""" + payment_source: NotRequired[Nullable[PaymentSourceTypedDict]] + r"""The payment source associated with this subscription.""" + lifetime_paid: NotRequired[Nullable[LifetimePaidTypedDict]] + r"""Total amount paid over the lifetime of this subscription.""" + amount: NotRequired[Nullable[AmountTypedDict]] + r"""Current amount for this subscription.""" + next_invoice: NotRequired[Nullable[NextInvoiceTypedDict]] + r"""Information about the next invoice.""" + next_payment: NotRequired[Nullable[NextPaymentTypedDict]] + r"""Information about the next payment.""" + payer: NotRequired[Nullable[PayerTypedDict]] + r"""The payer associated with this subscription.""" + period_start: NotRequired[Nullable[int]] + r"""Unix timestamp (in milliseconds) when the current period started.""" + period_end: NotRequired[Nullable[int]] + r"""Unix timestamp (in milliseconds) when the current period ends.""" + canceled_at: NotRequired[Nullable[int]] + r"""Unix timestamp (in milliseconds) when the subscription was canceled.""" + past_due_at: NotRequired[Nullable[int]] + r"""Unix timestamp (in milliseconds) when the subscription became past due.""" + ended_at: NotRequired[Nullable[int]] + r"""Unix timestamp (in milliseconds) when the subscription ended.""" + + +class CommerceSubscriptionItem(BaseModel): + object: CommerceSubscriptionItemObject + r"""String representing the object's type. Objects of the same type share the same value.""" + + id: str + r"""Unique identifier for the subscription item.""" + + instance_id: str + r"""Unique identifier for the Clerk instance.""" + + status: CommerceSubscriptionItemStatus + r"""Current status of the subscription item.""" + + plan_id: str + r"""Unique identifier for the associated plan.""" + + plan: Nullable[Plan] + r"""The associated commerce plan.""" + + plan_period: PlanPeriod + r"""The billing period for this subscription.""" + + payment_source_id: str + r"""Unique identifier for the payment source.""" + + payer_id: str + r"""Unique identifier for the payer.""" + + is_free_trial: bool + r"""Whether this subscription is currently on a free trial.""" + + proration_date: str + r"""Date used for proration calculations.""" + + created_at: int + r"""Unix timestamp (in milliseconds) when the subscription was created.""" + + updated_at: int + r"""Unix timestamp (in milliseconds) when the subscription was last updated.""" + + credit: OptionalNullable[Credit] = UNSET + r"""Credit information (only available in PaymentAttempt events).""" + + payment_source: OptionalNullable[PaymentSource] = UNSET + r"""The payment source associated with this subscription.""" + + lifetime_paid: OptionalNullable[LifetimePaid] = UNSET + r"""Total amount paid over the lifetime of this subscription.""" + + amount: OptionalNullable[Amount] = UNSET + r"""Current amount for this subscription.""" + + next_invoice: OptionalNullable[NextInvoice] = UNSET + r"""Information about the next invoice.""" + + next_payment: OptionalNullable[NextPayment] = UNSET + r"""Information about the next payment.""" + + payer: OptionalNullable[Payer] = UNSET + r"""The payer associated with this subscription.""" + + period_start: OptionalNullable[int] = UNSET + r"""Unix timestamp (in milliseconds) when the current period started.""" + + period_end: OptionalNullable[int] = UNSET + r"""Unix timestamp (in milliseconds) when the current period ends.""" + + canceled_at: OptionalNullable[int] = UNSET + r"""Unix timestamp (in milliseconds) when the subscription was canceled.""" + + past_due_at: OptionalNullable[int] = UNSET + r"""Unix timestamp (in milliseconds) when the subscription became past due.""" + + ended_at: OptionalNullable[int] = UNSET + r"""Unix timestamp (in milliseconds) when the subscription ended.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "credit", + "payment_source", + "lifetime_paid", + "amount", + "next_invoice", + "next_payment", + "payer", + "period_start", + "period_end", + "canceled_at", + "past_due_at", + "ended_at", + ] + nullable_fields = [ + "credit", + "plan", + "payment_source", + "lifetime_paid", + "amount", + "next_invoice", + "next_payment", + "payer", + "period_start", + "period_end", + "canceled_at", + "past_due_at", + "ended_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/emailaddress.py b/src/clerk_backend_api/models/emailaddress.py index 37da0eac..2209e829 100644 --- a/src/clerk_backend_api/models/emailaddress.py +++ b/src/clerk_backend_api/models/emailaddress.py @@ -24,6 +24,188 @@ class EmailAddressObject(str, Enum, metaclass=utils.OpenEnumMeta): EMAIL_ADDRESS = "email_address" +class VerificationEmailLinkVerificationObject(str, Enum): + VERIFICATION_EMAIL_LINK = "verification_email_link" + + +class VerificationEmailLinkVerificationStatus(str, Enum): + UNVERIFIED = "unverified" + VERIFIED = "verified" + FAILED = "failed" + EXPIRED = "expired" + + +class VerificationEmailLinkVerificationStrategy(str, Enum): + EMAIL_LINK = "email_link" + + +class EmailLinkTypedDict(TypedDict): + status: VerificationEmailLinkVerificationStatus + strategy: VerificationEmailLinkVerificationStrategy + attempts: Nullable[int] + expire_at: Nullable[int] + object: NotRequired[VerificationEmailLinkVerificationObject] + verified_at_client: NotRequired[Nullable[str]] + + +class EmailLink(BaseModel): + status: VerificationEmailLinkVerificationStatus + + strategy: VerificationEmailLinkVerificationStrategy + + attempts: Nullable[int] + + expire_at: Nullable[int] + + object: Optional[VerificationEmailLinkVerificationObject] = None + + verified_at_client: OptionalNullable[str] = UNSET + + @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 + + +class VerificationSamlVerificationObject(str, Enum): + VERIFICATION_SAML = "verification_saml" + + +class VerificationSamlVerificationStatus(str, Enum): + UNVERIFIED = "unverified" + VERIFIED = "verified" + FAILED = "failed" + EXPIRED = "expired" + TRANSFERABLE = "transferable" + + +class VerificationSamlVerificationStrategy(str, Enum): + SAML = "saml" + + +class ClerkErrorErrorMetaTypedDict(TypedDict): + pass + + +class ClerkErrorErrorMeta(BaseModel): + pass + + +class VerificationSamlErrorClerkErrorTypedDict(TypedDict): + message: str + long_message: str + code: str + meta: NotRequired[ClerkErrorErrorMetaTypedDict] + clerk_trace_id: NotRequired[str] + + +class VerificationSamlErrorClerkError(BaseModel): + message: str + + long_message: str + + code: str + + meta: Optional[ClerkErrorErrorMeta] = None + + clerk_trace_id: Optional[str] = None + + +VerificationErrorTypedDict = VerificationSamlErrorClerkErrorTypedDict + + +VerificationError = VerificationSamlErrorClerkError + + +class SamlTypedDict(TypedDict): + status: VerificationSamlVerificationStatus + strategy: VerificationSamlVerificationStrategy + external_verification_redirect_url: Nullable[str] + expire_at: int + attempts: Nullable[int] + object: NotRequired[VerificationSamlVerificationObject] + error: NotRequired[Nullable[VerificationErrorTypedDict]] + verified_at_client: NotRequired[Nullable[str]] + + +class Saml(BaseModel): + status: VerificationSamlVerificationStatus + + strategy: VerificationSamlVerificationStrategy + + external_verification_redirect_url: Nullable[str] + + expire_at: int + + attempts: Nullable[int] + + object: Optional[VerificationSamlVerificationObject] = None + + error: OptionalNullable[VerificationError] = UNSET + + verified_at_client: OptionalNullable[str] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["object", "error", "verified_at_client"] + nullable_fields = [ + "external_verification_redirect_url", + "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 VerificationTicketVerificationObject(str, Enum): VERIFICATION_TICKET = "verification_ticket" @@ -330,7 +512,14 @@ def serialize_model(self, handler): VerificationTypedDict = TypeAliasType( "VerificationTypedDict", - Union[OtpTypedDict, AdminTypedDict, TicketTypedDict, FromOAuthTypedDict], + Union[ + OtpTypedDict, + AdminTypedDict, + TicketTypedDict, + EmailLinkTypedDict, + FromOAuthTypedDict, + SamlTypedDict, + ], ) @@ -340,6 +529,8 @@ def serialize_model(self, handler): Annotated[Admin, Tag("verification_admin")], Annotated[FromOAuth, Tag("verification_from_oauth")], Annotated[Ticket, Tag("verification_ticket")], + Annotated[Saml, Tag("verification_saml")], + Annotated[EmailLink, Tag("verification_email_link")], ], Discriminator(lambda m: get_discriminator(m, "object", "object")), ] diff --git a/src/clerk_backend_api/models/externalaccountwithverification.py b/src/clerk_backend_api/models/externalaccountwithverification.py index 41b4b97d..72a53509 100644 --- a/src/clerk_backend_api/models/externalaccountwithverification.py +++ b/src/clerk_backend_api/models/externalaccountwithverification.py @@ -39,11 +39,13 @@ class VerificationGoogleOneTapVerificationStrategy(str, Enum): GOOGLE_ONE_TAP = "google_one_tap" -class ClerkErrorErrorExternalAccountWithVerificationMetaTypedDict(TypedDict): +class ClerkErrorErrorExternalAccountWithVerificationVerificationMetaTypedDict( + TypedDict +): pass -class ClerkErrorErrorExternalAccountWithVerificationMeta(BaseModel): +class ClerkErrorErrorExternalAccountWithVerificationVerificationMeta(BaseModel): pass @@ -51,7 +53,9 @@ class VerificationGoogleOneTapErrorClerkErrorTypedDict(TypedDict): message: str long_message: str code: str - meta: NotRequired[ClerkErrorErrorExternalAccountWithVerificationMetaTypedDict] + meta: NotRequired[ + ClerkErrorErrorExternalAccountWithVerificationVerificationMetaTypedDict + ] clerk_trace_id: NotRequired[str] @@ -62,7 +66,9 @@ class VerificationGoogleOneTapErrorClerkError(BaseModel): code: str - meta: Optional[ClerkErrorErrorExternalAccountWithVerificationMeta] = None + meta: Optional[ClerkErrorErrorExternalAccountWithVerificationVerificationMeta] = ( + None + ) clerk_trace_id: Optional[str] = None @@ -143,11 +149,11 @@ class VerificationOauthVerificationStatus(str, Enum, metaclass=utils.OpenEnumMet TRANSFERABLE = "transferable" -class ClerkErrorErrorMetaTypedDict(TypedDict): +class ClerkErrorErrorExternalAccountWithVerificationMetaTypedDict(TypedDict): pass -class ClerkErrorErrorMeta(BaseModel): +class ClerkErrorErrorExternalAccountWithVerificationMeta(BaseModel): pass @@ -155,7 +161,7 @@ class VerificationOauthErrorClerkErrorTypedDict(TypedDict): message: str long_message: str code: str - meta: NotRequired[ClerkErrorErrorMetaTypedDict] + meta: NotRequired[ClerkErrorErrorExternalAccountWithVerificationMetaTypedDict] clerk_trace_id: NotRequired[str] @@ -166,15 +172,15 @@ class VerificationOauthErrorClerkError(BaseModel): code: str - meta: Optional[ClerkErrorErrorMeta] = None + meta: Optional[ClerkErrorErrorExternalAccountWithVerificationMeta] = None clerk_trace_id: Optional[str] = None -VerificationErrorTypedDict = VerificationOauthErrorClerkErrorTypedDict +VerificationOauthVerificationErrorTypedDict = VerificationOauthErrorClerkErrorTypedDict -VerificationError = VerificationOauthErrorClerkError +VerificationOauthVerificationError = VerificationOauthErrorClerkError class OauthTypedDict(TypedDict): @@ -184,7 +190,7 @@ class OauthTypedDict(TypedDict): attempts: Nullable[int] object: NotRequired[VerificationOauthVerificationObject] external_verification_redirect_url: NotRequired[str] - error: NotRequired[Nullable[VerificationErrorTypedDict]] + error: NotRequired[Nullable[VerificationOauthVerificationErrorTypedDict]] verified_at_client: NotRequired[Nullable[str]] @@ -203,7 +209,7 @@ class Oauth(BaseModel): external_verification_redirect_url: Optional[str] = None - error: OptionalNullable[VerificationError] = UNSET + error: OptionalNullable[VerificationOauthVerificationError] = UNSET verified_at_client: OptionalNullable[str] = UNSET diff --git a/src/clerk_backend_api/models/getcommercesubscriptionitemlistop.py b/src/clerk_backend_api/models/getcommercesubscriptionitemlistop.py new file mode 100644 index 00000000..35354d99 --- /dev/null +++ b/src/clerk_backend_api/models/getcommercesubscriptionitemlistop.py @@ -0,0 +1,110 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from clerk_backend_api.types import BaseModel +from clerk_backend_api.utils import FieldMetadata, QueryParamMetadata +from enum import Enum +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class GetCommerceSubscriptionItemListQueryParamStatus(str, Enum): + r"""Filter subscription items by status""" + + ACTIVE = "active" + ENDED = "ended" + PAST_DUE = "past_due" + UPCOMING = "upcoming" + FREE_TRIAL = "free_trial" + + +class QueryParamPayerType(str, Enum): + r"""Filter subscription items by payer type""" + + USER = "user" + ORG = "org" + + +class GetCommerceSubscriptionItemListRequestTypedDict(TypedDict): + paginated: NotRequired[bool] + r"""Whether to paginate the results. + If true, the results will be paginated. + If false, the results will not be paginated. + """ + limit: NotRequired[int] + r"""Applies a limit to the number of results returned. + Can be used for paginating the results together with `offset`. + """ + offset: NotRequired[int] + r"""Skip the first `offset` results when paginating. + Needs to be an integer greater or equal to zero. + To be used in conjunction with `limit`. + """ + status: NotRequired[GetCommerceSubscriptionItemListQueryParamStatus] + r"""Filter subscription items by status""" + payer_type: NotRequired[QueryParamPayerType] + r"""Filter subscription items by payer type""" + plan_id: NotRequired[str] + r"""Filter subscription items by plan ID""" + include_free: NotRequired[bool] + r"""Whether to include free plan subscription items""" + query: NotRequired[str] + r"""Search query to filter subscription items""" + + +class GetCommerceSubscriptionItemListRequest(BaseModel): + paginated: Annotated[ + Optional[bool], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Whether to paginate the results. + If true, the results will be paginated. + If false, the results will not be paginated. + """ + + limit: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = 10 + r"""Applies a limit to the number of results returned. + Can be used for paginating the results together with `offset`. + """ + + offset: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = 0 + r"""Skip the first `offset` results when paginating. + Needs to be an integer greater or equal to zero. + To be used in conjunction with `limit`. + """ + + status: Annotated[ + Optional[GetCommerceSubscriptionItemListQueryParamStatus], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Filter subscription items by status""" + + payer_type: Annotated[ + Optional[QueryParamPayerType], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Filter subscription items by payer type""" + + plan_id: Annotated[ + Optional[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Filter subscription items by plan ID""" + + include_free: Annotated[ + Optional[bool], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = False + r"""Whether to include free plan subscription items""" + + query: Annotated[ + Optional[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Search query to filter subscription items""" diff --git a/src/clerk_backend_api/models/paginatedcommercesubscriptionitemresponse.py b/src/clerk_backend_api/models/paginatedcommercesubscriptionitemresponse.py new file mode 100644 index 00000000..c23c12f3 --- /dev/null +++ b/src/clerk_backend_api/models/paginatedcommercesubscriptionitemresponse.py @@ -0,0 +1,29 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .commercesubscriptionitem import ( + CommerceSubscriptionItem, + CommerceSubscriptionItemTypedDict, +) +from clerk_backend_api.types import BaseModel +from typing import List +from typing_extensions import TypedDict + + +class PaginatedCommerceSubscriptionItemResponseTypedDict(TypedDict): + r"""A list of commerce subscription items.""" + + data: List[CommerceSubscriptionItemTypedDict] + r"""Array of commerce subscription items.""" + total_count: int + r"""Total number of commerce subscription items.""" + + +class PaginatedCommerceSubscriptionItemResponse(BaseModel): + r"""A list of commerce subscription items.""" + + data: List[CommerceSubscriptionItem] + r"""Array of commerce subscription items.""" + + total_count: int + r"""Total number of commerce subscription items.""" diff --git a/src/clerk_backend_api/models/samlaccount.py b/src/clerk_backend_api/models/samlaccount.py index 7b9e116b..e95e5e62 100644 --- a/src/clerk_backend_api/models/samlaccount.py +++ b/src/clerk_backend_api/models/samlaccount.py @@ -96,11 +96,11 @@ def serialize_model(self, handler): return m -class VerificationSamlVerificationObject(str, Enum): +class VerificationSAMLVerificationSAMLAccountObject(str, Enum): VERIFICATION_SAML = "verification_saml" -class VerificationSamlVerificationStatus(str, Enum): +class VerificationSAMLVerificationSAMLAccountStatus(str, Enum): UNVERIFIED = "unverified" VERIFIED = "verified" FAILED = "failed" @@ -108,7 +108,7 @@ class VerificationSamlVerificationStatus(str, Enum): TRANSFERABLE = "transferable" -class VerificationSamlVerificationStrategy(str, Enum): +class VerificationSAMLVerificationSAMLAccountStrategy(str, Enum): SAML = "saml" @@ -120,7 +120,7 @@ class ClerkErrorErrorSAMLAccountMeta(BaseModel): pass -class VerificationSamlErrorClerkErrorTypedDict(TypedDict): +class VerificationSAMLErrorSAMLAccountClerkErrorTypedDict(TypedDict): message: str long_message: str code: str @@ -128,7 +128,7 @@ class VerificationSamlErrorClerkErrorTypedDict(TypedDict): clerk_trace_id: NotRequired[str] -class VerificationSamlErrorClerkError(BaseModel): +class VerificationSAMLErrorSAMLAccountClerkError(BaseModel): message: str long_message: str @@ -140,27 +140,29 @@ class VerificationSamlErrorClerkError(BaseModel): clerk_trace_id: Optional[str] = None -VerificationSamlVerificationErrorTypedDict = VerificationSamlErrorClerkErrorTypedDict +VerificationSamlVerificationErrorTypedDict = ( + VerificationSAMLErrorSAMLAccountClerkErrorTypedDict +) -VerificationSamlVerificationError = VerificationSamlErrorClerkError +VerificationSamlVerificationError = VerificationSAMLErrorSAMLAccountClerkError -class SamlTypedDict(TypedDict): - status: VerificationSamlVerificationStatus - strategy: VerificationSamlVerificationStrategy +class VerificationSAMLTypedDict(TypedDict): + status: VerificationSAMLVerificationSAMLAccountStatus + strategy: VerificationSAMLVerificationSAMLAccountStrategy external_verification_redirect_url: Nullable[str] expire_at: int attempts: Nullable[int] - object: NotRequired[VerificationSamlVerificationObject] + object: NotRequired[VerificationSAMLVerificationSAMLAccountObject] error: NotRequired[Nullable[VerificationSamlVerificationErrorTypedDict]] verified_at_client: NotRequired[Nullable[str]] -class Saml(BaseModel): - status: VerificationSamlVerificationStatus +class VerificationSAML(BaseModel): + status: VerificationSAMLVerificationSAMLAccountStatus - strategy: VerificationSamlVerificationStrategy + strategy: VerificationSAMLVerificationSAMLAccountStrategy external_verification_redirect_url: Nullable[str] @@ -168,7 +170,7 @@ class Saml(BaseModel): attempts: Nullable[int] - object: Optional[VerificationSamlVerificationObject] = None + object: Optional[VerificationSAMLVerificationSAMLAccountObject] = None error: OptionalNullable[VerificationSamlVerificationError] = UNSET @@ -212,13 +214,13 @@ def serialize_model(self, handler): SAMLAccountVerificationTypedDict = TypeAliasType( "SAMLAccountVerificationTypedDict", - Union[VerificationTicketTypedDict, SamlTypedDict], + Union[VerificationTicketTypedDict, VerificationSAMLTypedDict], ) SAMLAccountVerification = Annotated[ Union[ - Annotated[Saml, Tag("verification_saml")], + Annotated[VerificationSAML, Tag("verification_saml")], Annotated[VerificationTicket, Tag("verification_ticket")], ], Discriminator(lambda m: get_discriminator(m, "object", "object")), diff --git a/src/clerk_backend_api/organizations_sdk.py b/src/clerk_backend_api/organizations_sdk.py index 78d7da94..77f3f0a4 100644 --- a/src/clerk_backend_api/organizations_sdk.py +++ b/src/clerk_backend_api/organizations_sdk.py @@ -259,7 +259,7 @@ def create( Organizations support private and public metadata. Private metadata can only be accessed from the Backend API. Public metadata can be accessed from the Backend API, and are read-only from the Frontend API. - The `created_by` user will see this as their [active organization] (https://clerk.com/docs/organizations/overview#active-organization) + The `created_by` user will see this as their [active organization](https://clerk.com/docs/organizations/overview#active-organization) the next time they create a session, presuming they don't explicitly set a different organization as active before then. :param request: The request object to send. @@ -371,7 +371,7 @@ async def create_async( Organizations support private and public metadata. Private metadata can only be accessed from the Backend API. Public metadata can be accessed from the Backend API, and are read-only from the Frontend API. - The `created_by` user will see this as their [active organization] (https://clerk.com/docs/organizations/overview#active-organization) + The `created_by` user will see this as their [active organization](https://clerk.com/docs/organizations/overview#active-organization) the next time they create a session, presuming they don't explicitly set a different organization as active before then. :param request: The request object to send. From 6612694cbde75a79e865c70b6759c1537bb9eca8 Mon Sep 17 00:00:00 2001 From: "speakeasy-github[bot]" <128539517+speakeasy-github[bot]@users.noreply.github.com> Date: Tue, 19 Aug 2025 14:45:01 +0000 Subject: [PATCH 2/2] empty commit to trigger [run-tests] workflow