From d70e485e728988604af6dab1c304893d3c4ab2b8 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Wed, 3 Dec 2025 00:07:43 +0000 Subject: [PATCH] ## Csharp SDK Changes: * `ClerkBackendApi.BetaFeatures.UpdateInstanceSettings()`: * `request.EnhancedEmailDeliverability` **Removed** **Breaking** :warning: * `ClerkBackendApi.InstanceSettings.Update()`: * `request.EnhancedEmailDeliverability` **Removed** **Breaking** :warning: * `ClerkBackendApi.OrganizationPermissions.Delete()`: **Added** * `ClerkBackendApi.Organizations.Update()`: `response.lastActiveAt` **Added** * `ClerkBackendApi.OrganizationRoles.Delete()`: **Added** * `ClerkBackendApi.OrganizationRoles.AssignPermission()`: **Added** * `ClerkBackendApi.OrganizationRoles.RemovePermission()`: **Added** * `ClerkBackendApi.Billing.ListPlans()`: **Added** * `ClerkBackendApi.Billing.ListSubscriptionItems()`: **Added** * `ClerkBackendApi.Users.DeleteProfileImage()`: `response` **Changed** * `ClerkBackendApi.OrganizationPermissions.List()`: **Added** * `ClerkBackendApi.OrganizationPermissions.Create()`: **Added** * `ClerkBackendApi.OrganizationPermissions.Get()`: **Added** * `ClerkBackendApi.OrganizationPermissions.Update()`: **Added** * `ClerkBackendApi.OrganizationRoles.List()`: **Added** * `ClerkBackendApi.Commerce.ListPlans()`: **Deleted** **Breaking** :warning: * `ClerkBackendApi.Commerce.ListSubscriptionItems()`: **Deleted** **Breaking** :warning: * `ClerkBackendApi.Commerce.CancelSubscriptionItem()`: **Deleted** **Breaking** :warning: * `ClerkBackendApi.Sessions.Create()`: * `request.ActiveOrganizationId` **Added** * `ClerkBackendApi.Users.List()`: `response.[]` **Changed** * `ClerkBackendApi.Users.Create()`: `response` **Changed** * `ClerkBackendApi.Users.Get()`: `response` **Changed** * `ClerkBackendApi.Users.Update()`: `response` **Changed** * `ClerkBackendApi.Users.Ban()`: `response` **Changed** * `ClerkBackendApi.Users.Unban()`: `response` **Changed** * `ClerkBackendApi.Users.BulkBan()`: `response.[]` **Changed** * `ClerkBackendApi.Users.BulkUnban()`: `response.[]` **Changed** * `ClerkBackendApi.Users.Lock()`: `response` **Changed** * `ClerkBackendApi.OrganizationRoles.Update()`: **Added** * `ClerkBackendApi.Users.Unlock()`: `response` **Changed** * `ClerkBackendApi.Billing.CancelSubscriptionItem()`: **Added** * `ClerkBackendApi.Users.UpdateMetadata()`: `response` **Changed** * `ClerkBackendApi.Users.GetOrganizationMemberships()`: `response.data.[].Organization.LastActiveAt` **Added** * `ClerkBackendApi.Users.GetOrganizationInvitations()`: `response.data.[].InviterId` **Added** * `ClerkBackendApi.Users.GetInstanceOrganizationMemberships()`: `response.data.[].Organization.LastActiveAt` **Added** * `ClerkBackendApi.OrganizationInvitations.GetAll()`: `response.data.[].InviterId` **Added** * `ClerkBackendApi.OrganizationInvitations.Create()`: `response.inviterId` **Added** * `ClerkBackendApi.OrganizationInvitations.List()`: `response.data.[].InviterId` **Added** * `ClerkBackendApi.OrganizationInvitations.BulkCreate()`: `response.data.[].InviterId` **Added** * `ClerkBackendApi.OrganizationInvitations.ListPending()`: `response.data.[].InviterId` **Added** * `ClerkBackendApi.OrganizationInvitations.Get()`: `response.inviterId` **Added** * `ClerkBackendApi.OrganizationInvitations.Revoke()`: `response.inviterId` **Added** * `ClerkBackendApi.OrganizationRoles.Get()`: **Added** * `ClerkBackendApi.OrganizationRoles.Create()`: **Added** * `ClerkBackendApi.InstanceSettings.UpdateOrganizationSettings()`: `response.maxRoleSetsAllowed` **Added** * `ClerkBackendApi.Organizations.List()`: `response.data.[].LastActiveAt` **Added** * `ClerkBackendApi.Organizations.Create()`: `response.lastActiveAt` **Added** * `ClerkBackendApi.Organizations.Get()`: `response.lastActiveAt` **Added** * `ClerkBackendApi.Users.SetProfileImage()`: `response` **Changed** * `ClerkBackendApi.Organizations.MergeMetadata()`: `response.lastActiveAt` **Added** * `ClerkBackendApi.Organizations.UploadLogo()`: `response.lastActiveAt` **Added** * `ClerkBackendApi.Organizations.DeleteLogo()`: `response.lastActiveAt` **Added** * `ClerkBackendApi.OrganizationMemberships.Create()`: `response.organization.LastActiveAt` **Added** * `ClerkBackendApi.OrganizationMemberships.List()`: `response.data.[].Organization.LastActiveAt` **Added** * `ClerkBackendApi.OrganizationMemberships.Update()`: `response.organization.LastActiveAt` **Added** * `ClerkBackendApi.OrganizationMemberships.Delete()`: `response.organization.LastActiveAt` **Added** * `ClerkBackendApi.OrganizationMemberships.UpdateMetadata()`: `response.organization.LastActiveAt` **Added** --- .speakeasy/gen.lock | 310 ++++- .speakeasy/gen.yaml | 4 +- .speakeasy/workflow.lock | 14 +- NUGET.md | 22 +- README.md | 49 +- RELEASES.md | 12 +- .../ClerkErrorErrorEnterpriseAccountMeta.md | 7 + ...rErrorEnterpriseAccountVerificationMeta.md | 7 + docs/Models/Components/CommercePlan.md | 40 +- docs/Models/Components/EnterpriseAccount.md | 21 + .../Components/EnterpriseAccountObject.md | 11 + .../EnterpriseAccountVerification.md | 22 + .../Models/Components/EnterpriseConnection.md | 10 + .../Components/EnterpriseConnection1.md | 21 + .../Components/EnterpriseConnection2.md | 21 + ...nterpriseConnectionEnterpriseConnection.md | 16 + docs/Models/Components/Organization.md | 3 +- .../Components/OrganizationInvitation.md | 1 + ...ionInvitationWithPublicOrganizationData.md | 1 + .../OrganizationMembershipOrganization.md | 3 +- .../Models/Components/OrganizationSettings.md | 1 + .../Models/Components/OrganizationWithLogo.md | 1 + docs/Models/Components/Permission.md | 15 + docs/Models/Components/PermissionObject.md | 8 + docs/Models/Components/Permissions.md | 11 + docs/Models/Components/Plan.md | 40 +- docs/Models/Components/Protocol.md | 12 + docs/Models/Components/Role.md | 16 + docs/Models/Components/RoleObject.md | 8 + docs/Models/Components/Roles.md | 11 + docs/Models/Components/User.md | 3 + docs/Models/Components/VerificationOauth.md | 15 + ...onOauthErrorEnterpriseAccountClerkError.md | 11 + ...OauthVerificationEnterpriseAccountError.md | 10 + ...authVerificationEnterpriseAccountObject.md | 8 + ...authVerificationEnterpriseAccountStatus.md | 12 + .../VerificationSAMLVerificationSAML.md | 15 + ...ionSamlErrorEnterpriseAccountClerkError.md | 11 + ...nSamlVerificationEnterpriseAccountError.md | 10 + ...SamlVerificationEnterpriseAccountObject.md | 8 + ...SamlVerificationEnterpriseAccountStatus.md | 12 + ...mlVerificationEnterpriseAccountStrategy.md | 8 + ...cketVerificationEnterpriseAccountObject.md | 8 + ...cketVerificationEnterpriseAccountStatus.md | 10 + ...etVerificationEnterpriseAccountStrategy.md | 8 + .../VerificationTicketVerificationTicket.md | 13 + ...signPermissionToOrganizationRoleRequest.md | 9 + ...ignPermissionToOrganizationRoleResponse.md | 9 + ...CreateOrganizationPermissionRequestBody.md | 10 + .../CreateOrganizationPermissionResponse.md | 9 + .../CreateOrganizationRoleRequestBody.md | 12 + .../CreateOrganizationRoleResponse.md | 9 + .../Operations/CreateSessionRequestBody.md | 7 +- .../DeleteOrganizationPermissionRequest.md | 8 + .../DeleteOrganizationPermissionResponse.md | 9 + .../DeleteOrganizationRoleRequest.md | 8 + .../DeleteOrganizationRoleResponse.md | 9 + .../GetOrganizationPermissionRequest.md | 8 + .../GetOrganizationPermissionResponse.md | 9 + .../Operations/GetOrganizationRoleRequest.md | 8 + .../Operations/GetOrganizationRoleResponse.md | 9 + .../ListOrganizationPermissionsRequest.md | 11 + .../ListOrganizationPermissionsResponse.md | 9 + .../ListOrganizationRolesRequest.md | 11 + .../ListOrganizationRolesResponse.md | 9 + ...vePermissionFromOrganizationRoleRequest.md | 9 + ...ePermissionFromOrganizationRoleResponse.md | 9 + .../UpdateInstanceAuthConfigRequestBody.md | 1 - .../Operations/UpdateInstanceRequestBody.md | 1 - .../UpdateOrganizationPermissionRequest.md | 9 + ...UpdateOrganizationPermissionRequestBody.md | 10 + .../UpdateOrganizationPermissionResponse.md | 9 + .../UpdateOrganizationRoleRequest.md | 9 + .../UpdateOrganizationRoleRequestBody.md | 11 + .../UpdateOrganizationRoleResponse.md | 9 + docs/sdks/betafeatures/README.md | 1 - docs/sdks/billing/README.md | 129 ++ docs/sdks/commerce/README.md | 136 -- docs/sdks/instancesettings/README.md | 1 - docs/sdks/invitations/README.md | 2 + docs/sdks/organizationinvitations/README.md | 3 + docs/sdks/organizationpermissions/README.md | 206 +++ docs/sdks/organizationroles/README.md | 295 +++++ docs/sdks/organizations/README.md | 3 + src/Clerk/BackendAPI/ActorTokens.cs | 11 +- src/Clerk/BackendAPI/AllowlistIdentifiers.cs | 13 +- src/Clerk/BackendAPI/BetaFeatures.cs | 9 +- src/Clerk/BackendAPI/Billing.cs | 547 +++++++- src/Clerk/BackendAPI/BlocklistIdentifiers.cs | 11 +- src/Clerk/BackendAPI/Clerk.BackendAPI.csproj | 2 +- src/Clerk/BackendAPI/ClerkBackendApi.cs | 30 +- src/Clerk/BackendAPI/Clients.cs | 13 +- src/Clerk/BackendAPI/Domains.cs | 13 +- src/Clerk/BackendAPI/EmailAddresses.cs | 15 +- src/Clerk/BackendAPI/EmailAndSmsTemplates.cs | 11 +- src/Clerk/BackendAPI/EmailSMSTemplates.cs | 17 +- src/Clerk/BackendAPI/InstanceSettings.cs | 9 +- src/Clerk/BackendAPI/Invitations.cs | 17 +- src/Clerk/BackendAPI/Jwks.cs | 9 +- src/Clerk/BackendAPI/JwtTemplates.cs | 17 +- src/Clerk/BackendAPI/M2m.cs | 13 +- src/Clerk/BackendAPI/Machines.cs | 25 +- src/Clerk/BackendAPI/Miscellaneous.cs | 11 +- .../ClerkErrorErrorEnterpriseAccountMeta.cs | 17 + ...rErrorEnterpriseAccountVerificationMeta.cs | 17 + .../Models/Components/CommercePlan.cs | 2 + .../Models/Components/EnterpriseAccount.cs | 101 ++ .../Components/EnterpriseAccountObject.cs | 62 + .../EnterpriseAccountVerification.cs | 188 +++ .../Models/Components/EnterpriseConnection.cs | 167 +++ .../Components/EnterpriseConnection1.cs | 77 ++ .../Components/EnterpriseConnection2.cs | 77 ++ ...nterpriseConnectionEnterpriseConnection.cs | 207 +++ .../Models/Components/Organization.cs | 10 + .../Components/OrganizationInvitation.cs | 3 + ...ionInvitationWithPublicOrganizationData.cs | 3 + .../OrganizationMembershipOrganization.cs | 10 + .../Models/Components/OrganizationSettings.cs | 3 + .../Models/Components/OrganizationWithLogo.cs | 10 + .../Models/Components/Permission.cs | 57 + .../Models/Components/PermissionObject.cs | 55 + .../Models/Components/Permissions.cs | 36 + .../BackendAPI/Models/Components/Plan.cs | 2 + .../BackendAPI/Models/Components/Protocol.cs | 64 + .../BackendAPI/Models/Components/Role.cs | 64 + .../Models/Components/RoleObject.cs | 55 + .../BackendAPI/Models/Components/Roles.cs | 36 + .../BackendAPI/Models/Components/User.cs | 16 + .../Models/Components/VerificationOauth.cs | 47 + ...onOauthErrorEnterpriseAccountClerkError.cs | 31 + ...OauthVerificationEnterpriseAccountError.cs | 167 +++ ...authVerificationEnterpriseAccountObject.cs | 55 + ...authVerificationEnterpriseAccountStatus.cs | 81 ++ .../VerificationSAMLVerificationSAML.cs | 43 + ...ionSamlErrorEnterpriseAccountClerkError.cs | 31 + ...nSamlVerificationEnterpriseAccountError.cs | 167 +++ ...SamlVerificationEnterpriseAccountObject.cs | 55 + ...SamlVerificationEnterpriseAccountStatus.cs | 63 + ...mlVerificationEnterpriseAccountStrategy.cs | 55 + ...cketVerificationEnterpriseAccountObject.cs | 55 + ...cketVerificationEnterpriseAccountStatus.cs | 59 + ...etVerificationEnterpriseAccountStrategy.cs | 73 ++ .../VerificationTicketVerificationTicket.cs | 41 + ...signPermissionToOrganizationRoleRequest.cs | 29 + ...ignPermissionToOrganizationRoleResponse.cs | 27 + ...CreateOrganizationPermissionRequestBody.cs | 36 + .../CreateOrganizationPermissionResponse.cs | 27 + .../CreateOrganizationRoleRequestBody.cs | 49 + .../CreateOrganizationRoleResponse.cs | 27 + .../Operations/CreateSessionRequestBody.cs | 6 + .../DeleteOrganizationPermissionRequest.cs | 23 + .../DeleteOrganizationPermissionResponse.cs | 27 + .../DeleteOrganizationRoleRequest.cs | 23 + .../DeleteOrganizationRoleResponse.cs | 27 + .../GetOrganizationPermissionRequest.cs | 23 + .../GetOrganizationPermissionResponse.cs | 27 + .../Operations/GetOrganizationRoleRequest.cs | 23 + .../Operations/GetOrganizationRoleResponse.cs | 27 + .../ListOrganizationPermissionsRequest.cs | 60 + .../ListOrganizationPermissionsResponse.cs | 27 + .../ListOrganizationRolesRequest.cs | 62 + .../ListOrganizationRolesResponse.cs | 27 + ...vePermissionFromOrganizationRoleRequest.cs | 29 + ...ePermissionFromOrganizationRoleResponse.cs | 27 + .../UpdateInstanceAuthConfigRequestBody.cs | 10 - .../Operations/UpdateInstanceRequestBody.cs | 10 - .../UpdateOrganizationPermissionRequest.cs | 27 + ...UpdateOrganizationPermissionRequestBody.cs | 36 + .../UpdateOrganizationPermissionResponse.cs | 27 + .../UpdateOrganizationRoleRequest.cs | 27 + .../UpdateOrganizationRoleRequestBody.cs | 43 + .../UpdateOrganizationRoleResponse.cs | 27 + src/Clerk/BackendAPI/OauthAccessTokens.cs | 9 +- src/Clerk/BackendAPI/OauthApplications.cs | 19 +- src/Clerk/BackendAPI/OrganizationDomains.cs | 19 +- .../BackendAPI/OrganizationInvitations.cs | 26 +- .../BackendAPI/OrganizationMemberships.cs | 19 +- ...Commerce.cs => OrganizationPermissions.cs} | 422 ++++-- src/Clerk/BackendAPI/OrganizationRoles.cs | 1160 +++++++++++++++++ src/Clerk/BackendAPI/Organizations.cs | 30 +- src/Clerk/BackendAPI/PhoneNumbers.cs | 15 +- src/Clerk/BackendAPI/ProxyChecks.cs | 9 +- src/Clerk/BackendAPI/RedirectUrls.cs | 15 +- src/Clerk/BackendAPI/SDKConfig.cs | 2 +- src/Clerk/BackendAPI/SamlConnections.cs | 17 +- src/Clerk/BackendAPI/Sessions.cs | 21 +- src/Clerk/BackendAPI/SignInTokens.cs | 11 +- src/Clerk/BackendAPI/SignUps.cs | 13 +- src/Clerk/BackendAPI/Templates.cs | 11 +- src/Clerk/BackendAPI/TestingTokens.cs | 9 +- src/Clerk/BackendAPI/Users.cs | 59 +- src/Clerk/BackendAPI/Utils/Constants.cs | 38 + src/Clerk/BackendAPI/Utils/URLBuilder.cs | 96 +- src/Clerk/BackendAPI/WaitlistEntries.cs | 17 +- src/Clerk/BackendAPI/Webhooks.cs | 9 +- 195 files changed, 7293 insertions(+), 654 deletions(-) create mode 100644 docs/Models/Components/ClerkErrorErrorEnterpriseAccountMeta.md create mode 100644 docs/Models/Components/ClerkErrorErrorEnterpriseAccountVerificationMeta.md create mode 100644 docs/Models/Components/EnterpriseAccount.md create mode 100644 docs/Models/Components/EnterpriseAccountObject.md create mode 100644 docs/Models/Components/EnterpriseAccountVerification.md create mode 100644 docs/Models/Components/EnterpriseConnection.md create mode 100644 docs/Models/Components/EnterpriseConnection1.md create mode 100644 docs/Models/Components/EnterpriseConnection2.md create mode 100644 docs/Models/Components/EnterpriseConnectionEnterpriseConnection.md create mode 100644 docs/Models/Components/Permission.md create mode 100644 docs/Models/Components/PermissionObject.md create mode 100644 docs/Models/Components/Permissions.md create mode 100644 docs/Models/Components/Protocol.md create mode 100644 docs/Models/Components/Role.md create mode 100644 docs/Models/Components/RoleObject.md create mode 100644 docs/Models/Components/Roles.md create mode 100644 docs/Models/Components/VerificationOauth.md create mode 100644 docs/Models/Components/VerificationOauthErrorEnterpriseAccountClerkError.md create mode 100644 docs/Models/Components/VerificationOauthVerificationEnterpriseAccountError.md create mode 100644 docs/Models/Components/VerificationOauthVerificationEnterpriseAccountObject.md create mode 100644 docs/Models/Components/VerificationOauthVerificationEnterpriseAccountStatus.md create mode 100644 docs/Models/Components/VerificationSAMLVerificationSAML.md create mode 100644 docs/Models/Components/VerificationSamlErrorEnterpriseAccountClerkError.md create mode 100644 docs/Models/Components/VerificationSamlVerificationEnterpriseAccountError.md create mode 100644 docs/Models/Components/VerificationSamlVerificationEnterpriseAccountObject.md create mode 100644 docs/Models/Components/VerificationSamlVerificationEnterpriseAccountStatus.md create mode 100644 docs/Models/Components/VerificationSamlVerificationEnterpriseAccountStrategy.md create mode 100644 docs/Models/Components/VerificationTicketVerificationEnterpriseAccountObject.md create mode 100644 docs/Models/Components/VerificationTicketVerificationEnterpriseAccountStatus.md create mode 100644 docs/Models/Components/VerificationTicketVerificationEnterpriseAccountStrategy.md create mode 100644 docs/Models/Components/VerificationTicketVerificationTicket.md create mode 100644 docs/Models/Operations/AssignPermissionToOrganizationRoleRequest.md create mode 100644 docs/Models/Operations/AssignPermissionToOrganizationRoleResponse.md create mode 100644 docs/Models/Operations/CreateOrganizationPermissionRequestBody.md create mode 100644 docs/Models/Operations/CreateOrganizationPermissionResponse.md create mode 100644 docs/Models/Operations/CreateOrganizationRoleRequestBody.md create mode 100644 docs/Models/Operations/CreateOrganizationRoleResponse.md create mode 100644 docs/Models/Operations/DeleteOrganizationPermissionRequest.md create mode 100644 docs/Models/Operations/DeleteOrganizationPermissionResponse.md create mode 100644 docs/Models/Operations/DeleteOrganizationRoleRequest.md create mode 100644 docs/Models/Operations/DeleteOrganizationRoleResponse.md create mode 100644 docs/Models/Operations/GetOrganizationPermissionRequest.md create mode 100644 docs/Models/Operations/GetOrganizationPermissionResponse.md create mode 100644 docs/Models/Operations/GetOrganizationRoleRequest.md create mode 100644 docs/Models/Operations/GetOrganizationRoleResponse.md create mode 100644 docs/Models/Operations/ListOrganizationPermissionsRequest.md create mode 100644 docs/Models/Operations/ListOrganizationPermissionsResponse.md create mode 100644 docs/Models/Operations/ListOrganizationRolesRequest.md create mode 100644 docs/Models/Operations/ListOrganizationRolesResponse.md create mode 100644 docs/Models/Operations/RemovePermissionFromOrganizationRoleRequest.md create mode 100644 docs/Models/Operations/RemovePermissionFromOrganizationRoleResponse.md create mode 100644 docs/Models/Operations/UpdateOrganizationPermissionRequest.md create mode 100644 docs/Models/Operations/UpdateOrganizationPermissionRequestBody.md create mode 100644 docs/Models/Operations/UpdateOrganizationPermissionResponse.md create mode 100644 docs/Models/Operations/UpdateOrganizationRoleRequest.md create mode 100644 docs/Models/Operations/UpdateOrganizationRoleRequestBody.md create mode 100644 docs/Models/Operations/UpdateOrganizationRoleResponse.md delete mode 100644 docs/sdks/commerce/README.md create mode 100644 docs/sdks/organizationpermissions/README.md create mode 100644 docs/sdks/organizationroles/README.md create mode 100644 src/Clerk/BackendAPI/Models/Components/ClerkErrorErrorEnterpriseAccountMeta.cs create mode 100644 src/Clerk/BackendAPI/Models/Components/ClerkErrorErrorEnterpriseAccountVerificationMeta.cs create mode 100644 src/Clerk/BackendAPI/Models/Components/EnterpriseAccount.cs create mode 100644 src/Clerk/BackendAPI/Models/Components/EnterpriseAccountObject.cs create mode 100644 src/Clerk/BackendAPI/Models/Components/EnterpriseAccountVerification.cs create mode 100644 src/Clerk/BackendAPI/Models/Components/EnterpriseConnection.cs create mode 100644 src/Clerk/BackendAPI/Models/Components/EnterpriseConnection1.cs create mode 100644 src/Clerk/BackendAPI/Models/Components/EnterpriseConnection2.cs create mode 100644 src/Clerk/BackendAPI/Models/Components/EnterpriseConnectionEnterpriseConnection.cs create mode 100644 src/Clerk/BackendAPI/Models/Components/Permission.cs create mode 100644 src/Clerk/BackendAPI/Models/Components/PermissionObject.cs create mode 100644 src/Clerk/BackendAPI/Models/Components/Permissions.cs create mode 100644 src/Clerk/BackendAPI/Models/Components/Protocol.cs create mode 100644 src/Clerk/BackendAPI/Models/Components/Role.cs create mode 100644 src/Clerk/BackendAPI/Models/Components/RoleObject.cs create mode 100644 src/Clerk/BackendAPI/Models/Components/Roles.cs create mode 100644 src/Clerk/BackendAPI/Models/Components/VerificationOauth.cs create mode 100644 src/Clerk/BackendAPI/Models/Components/VerificationOauthErrorEnterpriseAccountClerkError.cs create mode 100644 src/Clerk/BackendAPI/Models/Components/VerificationOauthVerificationEnterpriseAccountError.cs create mode 100644 src/Clerk/BackendAPI/Models/Components/VerificationOauthVerificationEnterpriseAccountObject.cs create mode 100644 src/Clerk/BackendAPI/Models/Components/VerificationOauthVerificationEnterpriseAccountStatus.cs create mode 100644 src/Clerk/BackendAPI/Models/Components/VerificationSAMLVerificationSAML.cs create mode 100644 src/Clerk/BackendAPI/Models/Components/VerificationSamlErrorEnterpriseAccountClerkError.cs create mode 100644 src/Clerk/BackendAPI/Models/Components/VerificationSamlVerificationEnterpriseAccountError.cs create mode 100644 src/Clerk/BackendAPI/Models/Components/VerificationSamlVerificationEnterpriseAccountObject.cs create mode 100644 src/Clerk/BackendAPI/Models/Components/VerificationSamlVerificationEnterpriseAccountStatus.cs create mode 100644 src/Clerk/BackendAPI/Models/Components/VerificationSamlVerificationEnterpriseAccountStrategy.cs create mode 100644 src/Clerk/BackendAPI/Models/Components/VerificationTicketVerificationEnterpriseAccountObject.cs create mode 100644 src/Clerk/BackendAPI/Models/Components/VerificationTicketVerificationEnterpriseAccountStatus.cs create mode 100644 src/Clerk/BackendAPI/Models/Components/VerificationTicketVerificationEnterpriseAccountStrategy.cs create mode 100644 src/Clerk/BackendAPI/Models/Components/VerificationTicketVerificationTicket.cs create mode 100644 src/Clerk/BackendAPI/Models/Operations/AssignPermissionToOrganizationRoleRequest.cs create mode 100644 src/Clerk/BackendAPI/Models/Operations/AssignPermissionToOrganizationRoleResponse.cs create mode 100644 src/Clerk/BackendAPI/Models/Operations/CreateOrganizationPermissionRequestBody.cs create mode 100644 src/Clerk/BackendAPI/Models/Operations/CreateOrganizationPermissionResponse.cs create mode 100644 src/Clerk/BackendAPI/Models/Operations/CreateOrganizationRoleRequestBody.cs create mode 100644 src/Clerk/BackendAPI/Models/Operations/CreateOrganizationRoleResponse.cs create mode 100644 src/Clerk/BackendAPI/Models/Operations/DeleteOrganizationPermissionRequest.cs create mode 100644 src/Clerk/BackendAPI/Models/Operations/DeleteOrganizationPermissionResponse.cs create mode 100644 src/Clerk/BackendAPI/Models/Operations/DeleteOrganizationRoleRequest.cs create mode 100644 src/Clerk/BackendAPI/Models/Operations/DeleteOrganizationRoleResponse.cs create mode 100644 src/Clerk/BackendAPI/Models/Operations/GetOrganizationPermissionRequest.cs create mode 100644 src/Clerk/BackendAPI/Models/Operations/GetOrganizationPermissionResponse.cs create mode 100644 src/Clerk/BackendAPI/Models/Operations/GetOrganizationRoleRequest.cs create mode 100644 src/Clerk/BackendAPI/Models/Operations/GetOrganizationRoleResponse.cs create mode 100644 src/Clerk/BackendAPI/Models/Operations/ListOrganizationPermissionsRequest.cs create mode 100644 src/Clerk/BackendAPI/Models/Operations/ListOrganizationPermissionsResponse.cs create mode 100644 src/Clerk/BackendAPI/Models/Operations/ListOrganizationRolesRequest.cs create mode 100644 src/Clerk/BackendAPI/Models/Operations/ListOrganizationRolesResponse.cs create mode 100644 src/Clerk/BackendAPI/Models/Operations/RemovePermissionFromOrganizationRoleRequest.cs create mode 100644 src/Clerk/BackendAPI/Models/Operations/RemovePermissionFromOrganizationRoleResponse.cs create mode 100644 src/Clerk/BackendAPI/Models/Operations/UpdateOrganizationPermissionRequest.cs create mode 100644 src/Clerk/BackendAPI/Models/Operations/UpdateOrganizationPermissionRequestBody.cs create mode 100644 src/Clerk/BackendAPI/Models/Operations/UpdateOrganizationPermissionResponse.cs create mode 100644 src/Clerk/BackendAPI/Models/Operations/UpdateOrganizationRoleRequest.cs create mode 100644 src/Clerk/BackendAPI/Models/Operations/UpdateOrganizationRoleRequestBody.cs create mode 100644 src/Clerk/BackendAPI/Models/Operations/UpdateOrganizationRoleResponse.cs rename src/Clerk/BackendAPI/{Commerce.cs => OrganizationPermissions.cs} (57%) create mode 100644 src/Clerk/BackendAPI/OrganizationRoles.cs create mode 100644 src/Clerk/BackendAPI/Utils/Constants.cs diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index a28cb068..f9f13086 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: 248c4615-4118-44e3-9280-c0978ea11cf6 management: - docChecksum: e6cbe4fb907366d795e2adf13eb689d1 + docChecksum: 7bce93817b61cdd80db712a453e66afc docVersion: "2025-11-10" - speakeasyVersion: 1.653.0 - generationVersion: 2.748.0 - releaseVersion: 0.14.0 - configChecksum: 1da4fbd372b3315fbccbd06aeec61010 + speakeasyVersion: 1.666.2 + generationVersion: 2.768.1 + releaseVersion: 0.15.0 + configChecksum: 3e4a68c4f6b9999b601ca76b6bc1920d repoURL: https://github.com/clerk/clerk-sdk-csharp.git published: true features: @@ -14,7 +14,7 @@ features: additionalDependencies: 0.1.0 additionalProperties: 0.0.1 constsAndDefaults: 0.0.1 - core: 3.15.3 + core: 3.15.7 deprecations: 2.81.2 examples: 2.81.6 flattening: 2.81.3 @@ -30,7 +30,7 @@ features: openEnums: 0.1.1 responseFormat: 0.0.4 retries: 0.0.1 - sdkHooks: 0.2.0 + sdkHooks: 0.3.0 unions: 1.1.0 generatedFiles: - .gitattributes @@ -62,6 +62,8 @@ generatedFiles: - docs/Models/Components/CNameTarget.md - docs/Models/Components/Claims.md - docs/Models/Components/ClerkError.md + - docs/Models/Components/ClerkErrorErrorEnterpriseAccountMeta.md + - docs/Models/Components/ClerkErrorErrorEnterpriseAccountVerificationMeta.md - docs/Models/Components/ClerkErrorErrorExternalAccountWithVerificationMeta.md - docs/Models/Components/ClerkErrorErrorExternalAccountWithVerificationVerificationMeta.md - docs/Models/Components/ClerkErrorErrorMeta.md @@ -99,6 +101,13 @@ generatedFiles: - docs/Models/Components/EmailAddressObject.md - docs/Models/Components/EmailLink.md - docs/Models/Components/EnrollmentMode.md + - docs/Models/Components/EnterpriseAccount.md + - docs/Models/Components/EnterpriseAccountObject.md + - docs/Models/Components/EnterpriseAccountVerification.md + - docs/Models/Components/EnterpriseConnection.md + - docs/Models/Components/EnterpriseConnection1.md + - docs/Models/Components/EnterpriseConnection2.md + - docs/Models/Components/EnterpriseConnectionEnterpriseConnection.md - docs/Models/Components/Error.md - docs/Models/Components/ErrorClerkError.md - docs/Models/Components/ErrorMeta.md @@ -200,16 +209,23 @@ generatedFiles: - docs/Models/Components/PaymentMethod.md - docs/Models/Components/PaymentSource.md - docs/Models/Components/PaymentType.md + - docs/Models/Components/Permission.md + - docs/Models/Components/PermissionObject.md + - docs/Models/Components/Permissions.md - docs/Models/Components/PhoneNumber.md - docs/Models/Components/PhoneNumberObject.md - docs/Models/Components/PhoneNumberVerification.md - docs/Models/Components/Plan.md - docs/Models/Components/PlanPeriod.md + - docs/Models/Components/Protocol.md - docs/Models/Components/ProxyCheck.md - docs/Models/Components/ProxyCheckObject.md - docs/Models/Components/PublicOrganizationData.md - docs/Models/Components/RedirectURL.md - docs/Models/Components/RedirectURLObject.md + - docs/Models/Components/Role.md + - docs/Models/Components/RoleObject.md + - docs/Models/Components/Roles.md - docs/Models/Components/SAMLAccount.md - docs/Models/Components/SAMLAccountObject.md - docs/Models/Components/SAMLAccountVerification.md @@ -292,7 +308,12 @@ generatedFiles: - docs/Models/Components/VerificationGoogleOneTapVerificationStatus.md - docs/Models/Components/VerificationGoogleOneTapVerificationStrategy.md - docs/Models/Components/VerificationOTP.md + - docs/Models/Components/VerificationOauth.md - docs/Models/Components/VerificationOauthErrorClerkError.md + - docs/Models/Components/VerificationOauthErrorEnterpriseAccountClerkError.md + - docs/Models/Components/VerificationOauthVerificationEnterpriseAccountError.md + - docs/Models/Components/VerificationOauthVerificationEnterpriseAccountObject.md + - docs/Models/Components/VerificationOauthVerificationEnterpriseAccountStatus.md - docs/Models/Components/VerificationOauthVerificationError.md - docs/Models/Components/VerificationOauthVerificationObject.md - docs/Models/Components/VerificationOauthVerificationStatus.md @@ -306,10 +327,16 @@ generatedFiles: - docs/Models/Components/VerificationPasskeyVerificationStrategy.md - docs/Models/Components/VerificationSAML.md - docs/Models/Components/VerificationSAMLErrorSAMLAccountClerkError.md + - docs/Models/Components/VerificationSAMLVerificationSAML.md - docs/Models/Components/VerificationSAMLVerificationSAMLAccountObject.md - docs/Models/Components/VerificationSAMLVerificationSAMLAccountStatus.md - docs/Models/Components/VerificationSAMLVerificationSAMLAccountStrategy.md - docs/Models/Components/VerificationSamlErrorClerkError.md + - docs/Models/Components/VerificationSamlErrorEnterpriseAccountClerkError.md + - docs/Models/Components/VerificationSamlVerificationEnterpriseAccountError.md + - docs/Models/Components/VerificationSamlVerificationEnterpriseAccountObject.md + - docs/Models/Components/VerificationSamlVerificationEnterpriseAccountStatus.md + - docs/Models/Components/VerificationSamlVerificationEnterpriseAccountStrategy.md - docs/Models/Components/VerificationSamlVerificationError.md - docs/Models/Components/VerificationSamlVerificationObject.md - docs/Models/Components/VerificationSamlVerificationStatus.md @@ -317,12 +344,16 @@ generatedFiles: - docs/Models/Components/VerificationStatus.md - docs/Models/Components/VerificationStrategy.md - docs/Models/Components/VerificationTicket.md + - docs/Models/Components/VerificationTicketVerificationEnterpriseAccountObject.md + - docs/Models/Components/VerificationTicketVerificationEnterpriseAccountStatus.md + - docs/Models/Components/VerificationTicketVerificationEnterpriseAccountStrategy.md - docs/Models/Components/VerificationTicketVerificationObject.md - docs/Models/Components/VerificationTicketVerificationSAMLAccountObject.md - docs/Models/Components/VerificationTicketVerificationSAMLAccountStatus.md - docs/Models/Components/VerificationTicketVerificationSAMLAccountStrategy.md - docs/Models/Components/VerificationTicketVerificationStatus.md - docs/Models/Components/VerificationTicketVerificationStrategy.md + - docs/Models/Components/VerificationTicketVerificationTicket.md - docs/Models/Components/VerificationWeb3VerificationObject.md - docs/Models/Components/VerificationWeb3VerificationStatus.md - docs/Models/Components/VerificationWeb3VerificationStrategy.md @@ -364,6 +395,8 @@ generatedFiles: - docs/Models/Operations/Actor.md - docs/Models/Operations/AddDomainRequestBody.md - docs/Models/Operations/AddDomainResponse.md + - docs/Models/Operations/AssignPermissionToOrganizationRoleRequest.md + - docs/Models/Operations/AssignPermissionToOrganizationRoleResponse.md - docs/Models/Operations/AttributeMapping.md - docs/Models/Operations/BanUserRequest.md - docs/Models/Operations/BanUserResponse.md @@ -410,8 +443,12 @@ generatedFiles: - docs/Models/Operations/CreateOrganizationMembershipRequest.md - docs/Models/Operations/CreateOrganizationMembershipRequestBody.md - docs/Models/Operations/CreateOrganizationMembershipResponse.md + - docs/Models/Operations/CreateOrganizationPermissionRequestBody.md + - docs/Models/Operations/CreateOrganizationPermissionResponse.md - docs/Models/Operations/CreateOrganizationRequestBody.md - docs/Models/Operations/CreateOrganizationResponse.md + - docs/Models/Operations/CreateOrganizationRoleRequestBody.md + - docs/Models/Operations/CreateOrganizationRoleResponse.md - docs/Models/Operations/CreatePhoneNumberRequestBody.md - docs/Models/Operations/CreatePhoneNumberResponse.md - docs/Models/Operations/CreateRedirectURLRequestBody.md @@ -465,8 +502,12 @@ generatedFiles: - docs/Models/Operations/DeleteOrganizationLogoResponse.md - docs/Models/Operations/DeleteOrganizationMembershipRequest.md - docs/Models/Operations/DeleteOrganizationMembershipResponse.md + - docs/Models/Operations/DeleteOrganizationPermissionRequest.md + - docs/Models/Operations/DeleteOrganizationPermissionResponse.md - docs/Models/Operations/DeleteOrganizationRequest.md - docs/Models/Operations/DeleteOrganizationResponse.md + - docs/Models/Operations/DeleteOrganizationRoleRequest.md + - docs/Models/Operations/DeleteOrganizationRoleResponse.md - docs/Models/Operations/DeletePhoneNumberRequest.md - docs/Models/Operations/DeletePhoneNumberResponse.md - docs/Models/Operations/DeleteRedirectURLRequest.md @@ -529,8 +570,12 @@ generatedFiles: - docs/Models/Operations/GetOrganizationBillingSubscriptionResponse.md - docs/Models/Operations/GetOrganizationInvitationRequest.md - docs/Models/Operations/GetOrganizationInvitationResponse.md + - docs/Models/Operations/GetOrganizationPermissionRequest.md + - docs/Models/Operations/GetOrganizationPermissionResponse.md - docs/Models/Operations/GetOrganizationRequest.md - docs/Models/Operations/GetOrganizationResponse.md + - docs/Models/Operations/GetOrganizationRoleRequest.md + - docs/Models/Operations/GetOrganizationRoleResponse.md - docs/Models/Operations/GetPhoneNumberRequest.md - docs/Models/Operations/GetPhoneNumberResponse.md - docs/Models/Operations/GetPublicInterstitialRequest.md @@ -587,6 +632,10 @@ generatedFiles: - docs/Models/Operations/ListOrganizationInvitationsResponse.md - docs/Models/Operations/ListOrganizationMembershipsRequest.md - docs/Models/Operations/ListOrganizationMembershipsResponse.md + - docs/Models/Operations/ListOrganizationPermissionsRequest.md + - docs/Models/Operations/ListOrganizationPermissionsResponse.md + - docs/Models/Operations/ListOrganizationRolesRequest.md + - docs/Models/Operations/ListOrganizationRolesResponse.md - docs/Models/Operations/ListOrganizationsRequest.md - docs/Models/Operations/ListOrganizationsResponse.md - docs/Models/Operations/ListPendingOrganizationInvitationsRequest.md @@ -620,6 +669,8 @@ generatedFiles: - docs/Models/Operations/RefreshSessionResponse.md - docs/Models/Operations/RejectWaitlistEntryRequest.md - docs/Models/Operations/RejectWaitlistEntryResponse.md + - docs/Models/Operations/RemovePermissionFromOrganizationRoleRequest.md + - docs/Models/Operations/RemovePermissionFromOrganizationRoleResponse.md - docs/Models/Operations/RequestBody.md - docs/Models/Operations/RequestBodyAttributeMapping.md - docs/Models/Operations/RequestBodyProvider.md @@ -695,9 +746,15 @@ generatedFiles: - docs/Models/Operations/UpdateOrganizationMembershipRequest.md - docs/Models/Operations/UpdateOrganizationMembershipRequestBody.md - docs/Models/Operations/UpdateOrganizationMembershipResponse.md + - docs/Models/Operations/UpdateOrganizationPermissionRequest.md + - docs/Models/Operations/UpdateOrganizationPermissionRequestBody.md + - docs/Models/Operations/UpdateOrganizationPermissionResponse.md - docs/Models/Operations/UpdateOrganizationRequest.md - docs/Models/Operations/UpdateOrganizationRequestBody.md - docs/Models/Operations/UpdateOrganizationResponse.md + - docs/Models/Operations/UpdateOrganizationRoleRequest.md + - docs/Models/Operations/UpdateOrganizationRoleRequestBody.md + - docs/Models/Operations/UpdateOrganizationRoleResponse.md - docs/Models/Operations/UpdatePhoneNumberRequest.md - docs/Models/Operations/UpdatePhoneNumberRequestBody.md - docs/Models/Operations/UpdatePhoneNumberResponse.md @@ -762,7 +819,6 @@ generatedFiles: - docs/sdks/billing/README.md - docs/sdks/blocklistidentifiers/README.md - docs/sdks/clients/README.md - - docs/sdks/commerce/README.md - docs/sdks/domains/README.md - docs/sdks/emailaddresses/README.md - docs/sdks/emailandsmstemplates/README.md @@ -779,6 +835,8 @@ generatedFiles: - docs/sdks/organizationdomains/README.md - docs/sdks/organizationinvitations/README.md - docs/sdks/organizationmemberships/README.md + - docs/sdks/organizationpermissions/README.md + - docs/sdks/organizationroles/README.md - docs/sdks/organizations/README.md - docs/sdks/phonenumbers/README.md - docs/sdks/proxychecks/README.md @@ -801,7 +859,6 @@ generatedFiles: - src/Clerk/BackendAPI/Clerk.BackendAPI.csproj - src/Clerk/BackendAPI/ClerkBackendApi.cs - src/Clerk/BackendAPI/Clients.cs - - src/Clerk/BackendAPI/Commerce.cs - src/Clerk/BackendAPI/Domains.cs - src/Clerk/BackendAPI/EmailAddresses.cs - src/Clerk/BackendAPI/EmailAndSmsTemplates.cs @@ -840,6 +897,8 @@ generatedFiles: - src/Clerk/BackendAPI/Models/Components/CNameTarget.cs - src/Clerk/BackendAPI/Models/Components/Claims.cs - src/Clerk/BackendAPI/Models/Components/ClerkError.cs + - src/Clerk/BackendAPI/Models/Components/ClerkErrorErrorEnterpriseAccountMeta.cs + - src/Clerk/BackendAPI/Models/Components/ClerkErrorErrorEnterpriseAccountVerificationMeta.cs - src/Clerk/BackendAPI/Models/Components/ClerkErrorErrorExternalAccountWithVerificationMeta.cs - src/Clerk/BackendAPI/Models/Components/ClerkErrorErrorExternalAccountWithVerificationVerificationMeta.cs - src/Clerk/BackendAPI/Models/Components/ClerkErrorErrorMeta.cs @@ -877,6 +936,13 @@ generatedFiles: - src/Clerk/BackendAPI/Models/Components/EmailAddressObject.cs - src/Clerk/BackendAPI/Models/Components/EmailLink.cs - src/Clerk/BackendAPI/Models/Components/EnrollmentMode.cs + - src/Clerk/BackendAPI/Models/Components/EnterpriseAccount.cs + - src/Clerk/BackendAPI/Models/Components/EnterpriseAccountObject.cs + - src/Clerk/BackendAPI/Models/Components/EnterpriseAccountVerification.cs + - src/Clerk/BackendAPI/Models/Components/EnterpriseConnection.cs + - src/Clerk/BackendAPI/Models/Components/EnterpriseConnection1.cs + - src/Clerk/BackendAPI/Models/Components/EnterpriseConnection2.cs + - src/Clerk/BackendAPI/Models/Components/EnterpriseConnectionEnterpriseConnection.cs - src/Clerk/BackendAPI/Models/Components/Error.cs - src/Clerk/BackendAPI/Models/Components/ErrorClerkError.cs - src/Clerk/BackendAPI/Models/Components/ErrorMeta.cs @@ -978,16 +1044,23 @@ generatedFiles: - src/Clerk/BackendAPI/Models/Components/PaymentMethod.cs - src/Clerk/BackendAPI/Models/Components/PaymentSource.cs - src/Clerk/BackendAPI/Models/Components/PaymentType.cs + - src/Clerk/BackendAPI/Models/Components/Permission.cs + - src/Clerk/BackendAPI/Models/Components/PermissionObject.cs + - src/Clerk/BackendAPI/Models/Components/Permissions.cs - src/Clerk/BackendAPI/Models/Components/PhoneNumber.cs - src/Clerk/BackendAPI/Models/Components/PhoneNumberObject.cs - src/Clerk/BackendAPI/Models/Components/PhoneNumberVerification.cs - src/Clerk/BackendAPI/Models/Components/Plan.cs - src/Clerk/BackendAPI/Models/Components/PlanPeriod.cs + - src/Clerk/BackendAPI/Models/Components/Protocol.cs - src/Clerk/BackendAPI/Models/Components/ProxyCheck.cs - src/Clerk/BackendAPI/Models/Components/ProxyCheckObject.cs - src/Clerk/BackendAPI/Models/Components/PublicOrganizationData.cs - src/Clerk/BackendAPI/Models/Components/RedirectURL.cs - src/Clerk/BackendAPI/Models/Components/RedirectURLObject.cs + - src/Clerk/BackendAPI/Models/Components/Role.cs + - src/Clerk/BackendAPI/Models/Components/RoleObject.cs + - src/Clerk/BackendAPI/Models/Components/Roles.cs - src/Clerk/BackendAPI/Models/Components/SAMLAccount.cs - src/Clerk/BackendAPI/Models/Components/SAMLAccountObject.cs - src/Clerk/BackendAPI/Models/Components/SAMLAccountVerification.cs @@ -1070,7 +1143,12 @@ generatedFiles: - src/Clerk/BackendAPI/Models/Components/VerificationGoogleOneTapVerificationStatus.cs - src/Clerk/BackendAPI/Models/Components/VerificationGoogleOneTapVerificationStrategy.cs - src/Clerk/BackendAPI/Models/Components/VerificationOTP.cs + - src/Clerk/BackendAPI/Models/Components/VerificationOauth.cs - src/Clerk/BackendAPI/Models/Components/VerificationOauthErrorClerkError.cs + - src/Clerk/BackendAPI/Models/Components/VerificationOauthErrorEnterpriseAccountClerkError.cs + - src/Clerk/BackendAPI/Models/Components/VerificationOauthVerificationEnterpriseAccountError.cs + - src/Clerk/BackendAPI/Models/Components/VerificationOauthVerificationEnterpriseAccountObject.cs + - src/Clerk/BackendAPI/Models/Components/VerificationOauthVerificationEnterpriseAccountStatus.cs - src/Clerk/BackendAPI/Models/Components/VerificationOauthVerificationError.cs - src/Clerk/BackendAPI/Models/Components/VerificationOauthVerificationObject.cs - src/Clerk/BackendAPI/Models/Components/VerificationOauthVerificationStatus.cs @@ -1084,10 +1162,16 @@ generatedFiles: - src/Clerk/BackendAPI/Models/Components/VerificationPasskeyVerificationStrategy.cs - src/Clerk/BackendAPI/Models/Components/VerificationSAML.cs - src/Clerk/BackendAPI/Models/Components/VerificationSAMLErrorSAMLAccountClerkError.cs + - src/Clerk/BackendAPI/Models/Components/VerificationSAMLVerificationSAML.cs - src/Clerk/BackendAPI/Models/Components/VerificationSAMLVerificationSAMLAccountObject.cs - src/Clerk/BackendAPI/Models/Components/VerificationSAMLVerificationSAMLAccountStatus.cs - src/Clerk/BackendAPI/Models/Components/VerificationSAMLVerificationSAMLAccountStrategy.cs - src/Clerk/BackendAPI/Models/Components/VerificationSamlErrorClerkError.cs + - src/Clerk/BackendAPI/Models/Components/VerificationSamlErrorEnterpriseAccountClerkError.cs + - src/Clerk/BackendAPI/Models/Components/VerificationSamlVerificationEnterpriseAccountError.cs + - src/Clerk/BackendAPI/Models/Components/VerificationSamlVerificationEnterpriseAccountObject.cs + - src/Clerk/BackendAPI/Models/Components/VerificationSamlVerificationEnterpriseAccountStatus.cs + - src/Clerk/BackendAPI/Models/Components/VerificationSamlVerificationEnterpriseAccountStrategy.cs - src/Clerk/BackendAPI/Models/Components/VerificationSamlVerificationError.cs - src/Clerk/BackendAPI/Models/Components/VerificationSamlVerificationObject.cs - src/Clerk/BackendAPI/Models/Components/VerificationSamlVerificationStatus.cs @@ -1095,12 +1179,16 @@ generatedFiles: - src/Clerk/BackendAPI/Models/Components/VerificationStatus.cs - src/Clerk/BackendAPI/Models/Components/VerificationStrategy.cs - src/Clerk/BackendAPI/Models/Components/VerificationTicket.cs + - src/Clerk/BackendAPI/Models/Components/VerificationTicketVerificationEnterpriseAccountObject.cs + - src/Clerk/BackendAPI/Models/Components/VerificationTicketVerificationEnterpriseAccountStatus.cs + - src/Clerk/BackendAPI/Models/Components/VerificationTicketVerificationEnterpriseAccountStrategy.cs - src/Clerk/BackendAPI/Models/Components/VerificationTicketVerificationObject.cs - src/Clerk/BackendAPI/Models/Components/VerificationTicketVerificationSAMLAccountObject.cs - src/Clerk/BackendAPI/Models/Components/VerificationTicketVerificationSAMLAccountStatus.cs - src/Clerk/BackendAPI/Models/Components/VerificationTicketVerificationSAMLAccountStrategy.cs - src/Clerk/BackendAPI/Models/Components/VerificationTicketVerificationStatus.cs - src/Clerk/BackendAPI/Models/Components/VerificationTicketVerificationStrategy.cs + - src/Clerk/BackendAPI/Models/Components/VerificationTicketVerificationTicket.cs - src/Clerk/BackendAPI/Models/Components/VerificationWeb3VerificationObject.cs - src/Clerk/BackendAPI/Models/Components/VerificationWeb3VerificationStatus.cs - src/Clerk/BackendAPI/Models/Components/VerificationWeb3VerificationStrategy.cs @@ -1145,6 +1233,8 @@ generatedFiles: - src/Clerk/BackendAPI/Models/Operations/Actor.cs - src/Clerk/BackendAPI/Models/Operations/AddDomainRequestBody.cs - src/Clerk/BackendAPI/Models/Operations/AddDomainResponse.cs + - src/Clerk/BackendAPI/Models/Operations/AssignPermissionToOrganizationRoleRequest.cs + - src/Clerk/BackendAPI/Models/Operations/AssignPermissionToOrganizationRoleResponse.cs - src/Clerk/BackendAPI/Models/Operations/AttributeMapping.cs - src/Clerk/BackendAPI/Models/Operations/BanUserRequest.cs - src/Clerk/BackendAPI/Models/Operations/BanUserResponse.cs @@ -1191,8 +1281,12 @@ generatedFiles: - src/Clerk/BackendAPI/Models/Operations/CreateOrganizationMembershipRequest.cs - src/Clerk/BackendAPI/Models/Operations/CreateOrganizationMembershipRequestBody.cs - src/Clerk/BackendAPI/Models/Operations/CreateOrganizationMembershipResponse.cs + - src/Clerk/BackendAPI/Models/Operations/CreateOrganizationPermissionRequestBody.cs + - src/Clerk/BackendAPI/Models/Operations/CreateOrganizationPermissionResponse.cs - src/Clerk/BackendAPI/Models/Operations/CreateOrganizationRequestBody.cs - src/Clerk/BackendAPI/Models/Operations/CreateOrganizationResponse.cs + - src/Clerk/BackendAPI/Models/Operations/CreateOrganizationRoleRequestBody.cs + - src/Clerk/BackendAPI/Models/Operations/CreateOrganizationRoleResponse.cs - src/Clerk/BackendAPI/Models/Operations/CreatePhoneNumberRequestBody.cs - src/Clerk/BackendAPI/Models/Operations/CreatePhoneNumberResponse.cs - src/Clerk/BackendAPI/Models/Operations/CreateRedirectURLRequestBody.cs @@ -1246,8 +1340,12 @@ generatedFiles: - src/Clerk/BackendAPI/Models/Operations/DeleteOrganizationLogoResponse.cs - src/Clerk/BackendAPI/Models/Operations/DeleteOrganizationMembershipRequest.cs - src/Clerk/BackendAPI/Models/Operations/DeleteOrganizationMembershipResponse.cs + - src/Clerk/BackendAPI/Models/Operations/DeleteOrganizationPermissionRequest.cs + - src/Clerk/BackendAPI/Models/Operations/DeleteOrganizationPermissionResponse.cs - src/Clerk/BackendAPI/Models/Operations/DeleteOrganizationRequest.cs - src/Clerk/BackendAPI/Models/Operations/DeleteOrganizationResponse.cs + - src/Clerk/BackendAPI/Models/Operations/DeleteOrganizationRoleRequest.cs + - src/Clerk/BackendAPI/Models/Operations/DeleteOrganizationRoleResponse.cs - src/Clerk/BackendAPI/Models/Operations/DeletePhoneNumberRequest.cs - src/Clerk/BackendAPI/Models/Operations/DeletePhoneNumberResponse.cs - src/Clerk/BackendAPI/Models/Operations/DeleteRedirectURLRequest.cs @@ -1310,8 +1408,12 @@ generatedFiles: - src/Clerk/BackendAPI/Models/Operations/GetOrganizationBillingSubscriptionResponse.cs - src/Clerk/BackendAPI/Models/Operations/GetOrganizationInvitationRequest.cs - src/Clerk/BackendAPI/Models/Operations/GetOrganizationInvitationResponse.cs + - src/Clerk/BackendAPI/Models/Operations/GetOrganizationPermissionRequest.cs + - src/Clerk/BackendAPI/Models/Operations/GetOrganizationPermissionResponse.cs - src/Clerk/BackendAPI/Models/Operations/GetOrganizationRequest.cs - src/Clerk/BackendAPI/Models/Operations/GetOrganizationResponse.cs + - src/Clerk/BackendAPI/Models/Operations/GetOrganizationRoleRequest.cs + - src/Clerk/BackendAPI/Models/Operations/GetOrganizationRoleResponse.cs - src/Clerk/BackendAPI/Models/Operations/GetPhoneNumberRequest.cs - src/Clerk/BackendAPI/Models/Operations/GetPhoneNumberResponse.cs - src/Clerk/BackendAPI/Models/Operations/GetPublicInterstitialRequest.cs @@ -1368,6 +1470,10 @@ generatedFiles: - src/Clerk/BackendAPI/Models/Operations/ListOrganizationInvitationsResponse.cs - src/Clerk/BackendAPI/Models/Operations/ListOrganizationMembershipsRequest.cs - src/Clerk/BackendAPI/Models/Operations/ListOrganizationMembershipsResponse.cs + - src/Clerk/BackendAPI/Models/Operations/ListOrganizationPermissionsRequest.cs + - src/Clerk/BackendAPI/Models/Operations/ListOrganizationPermissionsResponse.cs + - src/Clerk/BackendAPI/Models/Operations/ListOrganizationRolesRequest.cs + - src/Clerk/BackendAPI/Models/Operations/ListOrganizationRolesResponse.cs - src/Clerk/BackendAPI/Models/Operations/ListOrganizationsRequest.cs - src/Clerk/BackendAPI/Models/Operations/ListOrganizationsResponse.cs - src/Clerk/BackendAPI/Models/Operations/ListPendingOrganizationInvitationsRequest.cs @@ -1401,6 +1507,8 @@ generatedFiles: - src/Clerk/BackendAPI/Models/Operations/RefreshSessionResponse.cs - src/Clerk/BackendAPI/Models/Operations/RejectWaitlistEntryRequest.cs - src/Clerk/BackendAPI/Models/Operations/RejectWaitlistEntryResponse.cs + - src/Clerk/BackendAPI/Models/Operations/RemovePermissionFromOrganizationRoleRequest.cs + - src/Clerk/BackendAPI/Models/Operations/RemovePermissionFromOrganizationRoleResponse.cs - src/Clerk/BackendAPI/Models/Operations/RequestBody.cs - src/Clerk/BackendAPI/Models/Operations/RequestBodyAttributeMapping.cs - src/Clerk/BackendAPI/Models/Operations/RequestBodyProvider.cs @@ -1476,9 +1584,15 @@ generatedFiles: - src/Clerk/BackendAPI/Models/Operations/UpdateOrganizationMembershipRequest.cs - src/Clerk/BackendAPI/Models/Operations/UpdateOrganizationMembershipRequestBody.cs - src/Clerk/BackendAPI/Models/Operations/UpdateOrganizationMembershipResponse.cs + - src/Clerk/BackendAPI/Models/Operations/UpdateOrganizationPermissionRequest.cs + - src/Clerk/BackendAPI/Models/Operations/UpdateOrganizationPermissionRequestBody.cs + - src/Clerk/BackendAPI/Models/Operations/UpdateOrganizationPermissionResponse.cs - src/Clerk/BackendAPI/Models/Operations/UpdateOrganizationRequest.cs - src/Clerk/BackendAPI/Models/Operations/UpdateOrganizationRequestBody.cs - src/Clerk/BackendAPI/Models/Operations/UpdateOrganizationResponse.cs + - src/Clerk/BackendAPI/Models/Operations/UpdateOrganizationRoleRequest.cs + - src/Clerk/BackendAPI/Models/Operations/UpdateOrganizationRoleRequestBody.cs + - src/Clerk/BackendAPI/Models/Operations/UpdateOrganizationRoleResponse.cs - src/Clerk/BackendAPI/Models/Operations/UpdatePhoneNumberRequest.cs - src/Clerk/BackendAPI/Models/Operations/UpdatePhoneNumberRequestBody.cs - src/Clerk/BackendAPI/Models/Operations/UpdatePhoneNumberResponse.cs @@ -1542,6 +1656,8 @@ generatedFiles: - src/Clerk/BackendAPI/OrganizationDomains.cs - src/Clerk/BackendAPI/OrganizationInvitations.cs - src/Clerk/BackendAPI/OrganizationMemberships.cs + - src/Clerk/BackendAPI/OrganizationPermissions.cs + - src/Clerk/BackendAPI/OrganizationRoles.cs - src/Clerk/BackendAPI/Organizations.cs - src/Clerk/BackendAPI/PhoneNumbers.cs - src/Clerk/BackendAPI/ProxyChecks.cs @@ -1556,6 +1672,7 @@ generatedFiles: - src/Clerk/BackendAPI/Users.cs - src/Clerk/BackendAPI/Utils/AnyDeserializer.cs - src/Clerk/BackendAPI/Utils/BigIntStrConverter.cs + - src/Clerk/BackendAPI/Utils/Constants.cs - src/Clerk/BackendAPI/Utils/DecimalStrConverter.cs - src/Clerk/BackendAPI/Utils/EnumConverter.cs - src/Clerk/BackendAPI/Utils/FlexibleObjectDeserializer.cs @@ -1913,7 +2030,7 @@ examples: order_by: "-created_at" responses: "200": - application/json: [{"id": "user_id_123", "object": "user", "external_id": "external_user_id_123", "primary_email_address_id": "email_id_123", "primary_phone_number_id": "phone_id_123", "primary_web3_wallet_id": "wallet_id_123", "username": "john_doe", "first_name": "John", "last_name": "Doe", "image_url": "https://example.com/new-profile.jpg", "has_image": true, "public_metadata": {"role": "admin"}, "private_metadata": {"ssn": "123-45-6789"}, "unsafe_metadata": {"theme": "dark"}, "email_addresses": [{"id": "email_id_123", "object": "email_address", "email_address": "john.doe@example.com", "reserved": false, "verification": {"object": "verification_admin", "status": "verified", "strategy": "admin", "attempts": 840489, "expire_at": 779542}, "linked_to": [{"type": "oauth_google", "id": "link_12345"}], "created_at": 1609459200, "updated_at": 1609459200}], "phone_numbers": [{"id": "phone_id_123", "object": "phone_number", "phone_number": "+12345678901", "reserved": false, "verification": {"object": "verification_admin", "status": "verified", "strategy": "admin", "attempts": 15551, "expire_at": 230417}, "linked_to": [{"type": "oauth_google", "id": "link_id_123"}], "created_at": 1609459200, "updated_at": 1609459200}], "web3_wallets": [{"id": "wallet_id_123", "object": "web3_wallet", "web3_wallet": "0x123456789abcdef", "verification": {"object": "verification_admin", "status": "verified", "strategy": "admin", "attempts": 563928, "expire_at": 564967}, "created_at": 1609459200, "updated_at": 1609459200}], "passkeys": [{"id": "passkey_id_123", "object": "passkey", "name": "My Passkey", "last_used_at": 1615852800, "verification": {"object": "verification_passkey", "status": "verified", "strategy": "passkey", "attempts": null, "expire_at": 682381}}], "password_enabled": true, "two_factor_enabled": true, "totp_enabled": true, "backup_code_enabled": true, "mfa_enabled_at": 1615852800, "mfa_disabled_at": null, "external_accounts": [{"object": "google_account", "id": "ext_account_id_123", "provider": "Facebook", "identification_id": "", "provider_user_id": "", "approved_scopes": "", "email_address": "Margie23@hotmail.com", "first_name": "Brionna", "last_name": "Walter", "public_metadata": {"key": "", "key1": ""}, "created_at": 14941, "updated_at": 805295, "verification": {"object": "verification_google_one_tap", "status": "unverified", "strategy": "google_one_tap", "expire_at": 634404, "attempts": 583086}, "user_id": "user_id_at_provider"}], "saml_accounts": [{"id": "saml_account_id_123", "object": "saml_account", "provider": "SAML Provider", "active": true, "email_address": "user@example.com", "public_metadata": {"department": "IT"}, "verification": {"object": "verification_ticket", "status": "verified", "strategy": "ticket", "attempts": 571330, "expire_at": 56012}}], "last_sign_in_at": 1622852400, "banned": false, "locked": false, "lockout_expires_in_seconds": null, "verification_attempts_remaining": 5, "updated_at": 1622852400, "created_at": 1609459200, "delete_self_enabled": true, "create_organization_enabled": true, "last_active_at": 1700690400000, "legal_accepted_at": 1700690400000}] + application/json: [{"id": "user_id_123", "object": "user", "external_id": "external_user_id_123", "primary_email_address_id": "email_id_123", "primary_phone_number_id": "phone_id_123", "primary_web3_wallet_id": "wallet_id_123", "username": "john_doe", "first_name": "John", "last_name": "Doe", "image_url": "https://example.com/new-profile.jpg", "has_image": true, "public_metadata": {"role": "admin"}, "private_metadata": {"ssn": "123-45-6789"}, "unsafe_metadata": {"theme": "dark"}, "email_addresses": [{"id": "email_id_123", "object": "email_address", "email_address": "john.doe@example.com", "reserved": false, "verification": {"object": "verification_admin", "status": "verified", "strategy": "admin", "attempts": 840489, "expire_at": 779542}, "linked_to": [{"type": "oauth_google", "id": "link_12345"}], "created_at": 1609459200, "updated_at": 1609459200}], "phone_numbers": [{"id": "phone_id_123", "object": "phone_number", "phone_number": "+12345678901", "reserved": false, "verification": {"object": "verification_admin", "status": "verified", "strategy": "admin", "attempts": 15551, "expire_at": 230417}, "linked_to": [{"type": "oauth_google", "id": "link_id_123"}], "created_at": 1609459200, "updated_at": 1609459200}], "web3_wallets": [{"id": "wallet_id_123", "object": "web3_wallet", "web3_wallet": "0x123456789abcdef", "verification": {"object": "verification_admin", "status": "verified", "strategy": "admin", "attempts": 563928, "expire_at": 564967}, "created_at": 1609459200, "updated_at": 1609459200}], "passkeys": [{"id": "passkey_id_123", "object": "passkey", "name": "My Passkey", "last_used_at": 1615852800, "verification": {"object": "verification_passkey", "status": "verified", "strategy": "passkey", "attempts": null, "expire_at": 682381}}], "password_enabled": true, "two_factor_enabled": true, "totp_enabled": true, "backup_code_enabled": true, "mfa_enabled_at": 1615852800, "mfa_disabled_at": null, "external_accounts": [{"object": "google_account", "id": "ext_account_id_123", "provider": "Facebook", "identification_id": "", "provider_user_id": "", "approved_scopes": "", "email_address": "Margie23@hotmail.com", "first_name": "Brionna", "last_name": "Walter", "public_metadata": {"key": "", "key1": ""}, "created_at": 14941, "updated_at": 805295, "verification": {"object": "verification_google_one_tap", "status": "unverified", "strategy": "google_one_tap", "expire_at": 634404, "attempts": 583086}, "user_id": "user_id_at_provider"}], "saml_accounts": [{"id": "saml_account_id_123", "object": "saml_account", "provider": "SAML Provider", "active": true, "email_address": "user@example.com", "public_metadata": {"department": "IT"}, "verification": {"object": "verification_ticket", "status": "verified", "strategy": "ticket", "attempts": 571330, "expire_at": 56012}}], "enterprise_accounts": [], "last_sign_in_at": 1622852400, "banned": false, "locked": false, "lockout_expires_in_seconds": null, "verification_attempts_remaining": 5, "updated_at": 1622852400, "created_at": 1609459200, "delete_self_enabled": true, "create_organization_enabled": true, "last_active_at": 1700690400000, "legal_accepted_at": 1700690400000}] "400": application/json: {"errors": [{"message": "Invalid input", "long_message": "The input provided does not meet the requirements.", "code": "400_bad_request"}], "meta": {}} CreateUser: @@ -1922,7 +2039,7 @@ examples: application/json: {"external_id": "ext-id-001", "first_name": "John", "last_name": "Doe", "email_address": ["john.doe@example.com"], "phone_number": ["+12345678901"], "web3_wallet": ["0x123456789abcdef0x123456789abcdef"], "username": "johndoe123", "password": "Secure*Pass4", "password_digest": "$argon2i$v=19$m=4096,t=3,p=1$4t6CL3P7YiHBtwESXawI8Hm20zJj4cs7/4/G3c187e0$m7RQFczcKr5bIR0IIxbpO2P0tyrLjf3eUW3M3QSwnLc", "skip_password_checks": false, "skip_password_requirement": false, "totp_secret": "base32totpsecretkey", "backup_codes": ["123456", "654321"], "public_metadata": {"role": "user"}, "private_metadata": {"internal_id": "789"}, "unsafe_metadata": {"preferences": {"theme": "dark"}}, "created_at": "2023-03-15T07:15:20.902Z"} responses: "200": - application/json: {"id": "user_id_123", "object": "user", "external_id": "external_user_id_123", "primary_email_address_id": "email_id_123", "primary_phone_number_id": "phone_id_123", "primary_web3_wallet_id": "wallet_id_123", "username": "john_doe", "first_name": "John", "last_name": "Doe", "image_url": "https://example.com/new-profile.jpg", "has_image": true, "public_metadata": {"role": "admin"}, "private_metadata": {"ssn": "123-45-6789"}, "unsafe_metadata": {"theme": "dark"}, "email_addresses": [{"id": "email_id_123", "object": "email_address", "email_address": "john.doe@example.com", "reserved": false, "verification": {"object": "verification_ticket", "status": "verified", "strategy": "ticket", "attempts": null, "expire_at": null}, "linked_to": [{"type": "oauth_google", "id": "link_12345"}], "created_at": 1609459200, "updated_at": 1609459200}], "phone_numbers": [{"id": "phone_id_123", "object": "phone_number", "phone_number": "+12345678901", "reserved": false, "verification": {"object": "verification_otp", "status": "verified", "strategy": "email_code", "attempts": 1, "expire_at": 1615462399}, "linked_to": [{"type": "oauth_google", "id": "link_id_123"}], "created_at": 1609459200, "updated_at": 1609459200}], "web3_wallets": [{"id": "wallet_id_123", "object": "web3_wallet", "web3_wallet": "0x123456789abcdef", "verification": {"object": "verification_admin", "status": "verified", "strategy": "admin", "attempts": null, "expire_at": null}, "created_at": 1609459200, "updated_at": 1609459200}], "passkeys": [{"id": "passkey_id_123", "object": "passkey", "name": "My Passkey", "last_used_at": 1615852800, "verification": {"object": "verification_passkey", "status": "verified", "strategy": "passkey", "attempts": null, "expire_at": null}}], "password_enabled": true, "two_factor_enabled": true, "totp_enabled": true, "backup_code_enabled": true, "mfa_enabled_at": 1615852800, "mfa_disabled_at": null, "external_accounts": [{"object": "facebook_account", "id": "ext_account_id_123", "provider": "Facebook", "identification_id": "", "provider_user_id": "", "approved_scopes": "", "email_address": "Laverne.Kris@yahoo.com", "first_name": "Jalen", "last_name": "Stark", "public_metadata": {"key": "", "key1": "", "key2": ""}, "created_at": 747519, "updated_at": 566975, "verification": {"object": "verification_google_one_tap", "status": "verified", "strategy": "google_one_tap", "expire_at": 852052, "attempts": 514772}, "user_id": "user_id_at_provider"}], "saml_accounts": [{"id": "saml_account_id_123", "object": "saml_account", "provider": "SAML Provider", "active": true, "email_address": "user@example.com", "public_metadata": {"department": "IT"}, "verification": {"object": "verification_ticket", "status": "verified", "strategy": "ticket", "attempts": null, "expire_at": null}}], "last_sign_in_at": 1622852400, "banned": false, "locked": false, "lockout_expires_in_seconds": null, "verification_attempts_remaining": 5, "updated_at": 1622852400, "created_at": 1609459200, "delete_self_enabled": true, "create_organization_enabled": true, "last_active_at": 1700690400000, "legal_accepted_at": 1700690400000} + application/json: {"id": "user_id_123", "object": "user", "external_id": "external_user_id_123", "primary_email_address_id": "email_id_123", "primary_phone_number_id": "phone_id_123", "primary_web3_wallet_id": "wallet_id_123", "username": "john_doe", "first_name": "John", "last_name": "Doe", "image_url": "https://example.com/new-profile.jpg", "has_image": true, "public_metadata": {"role": "admin"}, "private_metadata": {"ssn": "123-45-6789"}, "unsafe_metadata": {"theme": "dark"}, "email_addresses": [{"id": "email_id_123", "object": "email_address", "email_address": "john.doe@example.com", "reserved": false, "verification": {"object": "verification_ticket", "status": "verified", "strategy": "ticket", "attempts": null, "expire_at": null}, "linked_to": [{"type": "oauth_google", "id": "link_12345"}], "created_at": 1609459200, "updated_at": 1609459200}], "phone_numbers": [{"id": "phone_id_123", "object": "phone_number", "phone_number": "+12345678901", "reserved": false, "verification": {"object": "verification_otp", "status": "verified", "strategy": "email_code", "attempts": 1, "expire_at": 1615462399}, "linked_to": [{"type": "oauth_google", "id": "link_id_123"}], "created_at": 1609459200, "updated_at": 1609459200}], "web3_wallets": [{"id": "wallet_id_123", "object": "web3_wallet", "web3_wallet": "0x123456789abcdef", "verification": {"object": "verification_admin", "status": "verified", "strategy": "admin", "attempts": null, "expire_at": null}, "created_at": 1609459200, "updated_at": 1609459200}], "passkeys": [{"id": "passkey_id_123", "object": "passkey", "name": "My Passkey", "last_used_at": 1615852800, "verification": {"object": "verification_passkey", "status": "verified", "strategy": "passkey", "attempts": null, "expire_at": null}}], "password_enabled": true, "two_factor_enabled": true, "totp_enabled": true, "backup_code_enabled": true, "mfa_enabled_at": 1615852800, "mfa_disabled_at": null, "external_accounts": [{"object": "facebook_account", "id": "ext_account_id_123", "provider": "Facebook", "identification_id": "", "provider_user_id": "", "approved_scopes": "", "email_address": "Laverne.Kris@yahoo.com", "first_name": "Jalen", "last_name": "Stark", "public_metadata": {"key": "", "key1": "", "key2": ""}, "created_at": 747519, "updated_at": 566975, "verification": {"object": "verification_google_one_tap", "status": "verified", "strategy": "google_one_tap", "expire_at": 852052, "attempts": 514772}, "user_id": "user_id_at_provider"}], "saml_accounts": [{"id": "saml_account_id_123", "object": "saml_account", "provider": "SAML Provider", "active": true, "email_address": "user@example.com", "public_metadata": {"department": "IT"}, "verification": {"object": "verification_ticket", "status": "verified", "strategy": "ticket", "attempts": null, "expire_at": null}}], "enterprise_accounts": [{"id": "", "object": "enterprise_account", "provider": "", "active": true, "email_address": "Lilyan8@yahoo.com", "verification": {"object": "verification_saml", "status": "verified", "strategy": "saml", "attempts": 963304}}], "organization_memberships": [{"id": "org_mem_123", "object": "organization_membership", "role": "member", "permissions": ["read", "write"], "public_metadata": {}, "private_metadata": {}, "organization": {"object": "organization", "id": "org_123", "name": "Acme Corp", "slug": "acme-corp", "has_image": false, "members_count": 150, "max_allowed_memberships": 300, "admin_delete_enabled": true, "public_metadata": {"public_info": "Info visible to everyone"}, "private_metadata": {"internal_use_only": "Sensitive data"}, "created_by": "user_123456", "created_at": 1625078400, "updated_at": 1625164800}, "created_at": 1625078400, "updated_at": 1625164800}], "last_sign_in_at": 1622852400, "banned": false, "locked": false, "lockout_expires_in_seconds": null, "verification_attempts_remaining": 5, "updated_at": 1622852400, "created_at": 1609459200, "delete_self_enabled": true, "create_organization_enabled": true, "last_active_at": 1700690400000, "legal_accepted_at": 1700690400000} "400": application/json: {"errors": [{"message": "Invalid input", "long_message": "The input provided does not meet the requirements.", "code": "400_bad_request"}], "meta": {}} GetUsersCount: @@ -1972,7 +2089,7 @@ examples: user_id: "usr_1" responses: "200": - application/json: {"id": "user_id_123", "object": "user", "external_id": "external_user_id_123", "primary_email_address_id": "email_id_123", "primary_phone_number_id": "phone_id_123", "primary_web3_wallet_id": "wallet_id_123", "username": "john_doe", "first_name": "John", "last_name": "Doe", "image_url": "https://example.com/new-profile.jpg", "has_image": true, "public_metadata": {"role": "admin"}, "private_metadata": {"ssn": "123-45-6789"}, "unsafe_metadata": {"theme": "dark"}, "email_addresses": [{"id": "email_id_123", "object": "email_address", "email_address": "john.doe@example.com", "reserved": false, "verification": {"object": "verification_ticket", "status": "verified", "strategy": "ticket", "attempts": null, "expire_at": null}, "linked_to": [{"type": "oauth_google", "id": "link_12345"}], "created_at": 1609459200, "updated_at": 1609459200}], "phone_numbers": [{"id": "phone_id_123", "object": "phone_number", "phone_number": "+12345678901", "reserved": false, "verification": {"object": "verification_admin", "status": "verified", "strategy": "admin", "attempts": 1, "expire_at": 1615462399}, "linked_to": [{"type": "oauth_google", "id": "link_id_123"}], "created_at": 1609459200, "updated_at": 1609459200}], "web3_wallets": [{"id": "wallet_id_123", "object": "web3_wallet", "web3_wallet": "0x123456789abcdef", "verification": {"object": "verification_admin", "status": "verified", "strategy": "admin", "attempts": 0, "expire_at": 1620000000}, "created_at": 1609459200, "updated_at": 1609459200}], "passkeys": [{"id": "passkey_id_123", "object": "passkey", "name": "My Passkey", "last_used_at": 1615852800, "verification": {"object": "verification_passkey", "status": "verified", "strategy": "passkey", "attempts": null, "expire_at": null}}], "password_enabled": true, "two_factor_enabled": true, "totp_enabled": true, "backup_code_enabled": true, "mfa_enabled_at": 1615852800, "mfa_disabled_at": null, "external_accounts": [{"object": "google_account", "id": "ext_account_id_123", "provider": "Facebook", "identification_id": "", "provider_user_id": "", "approved_scopes": "", "email_address": "Cleo_Schumm@yahoo.com", "first_name": "Keira", "last_name": "Windler", "public_metadata": {"key": "", "key1": "", "key2": ""}, "created_at": 751395, "updated_at": 124518, "verification": {"object": "verification_google_one_tap", "status": "verified", "strategy": "google_one_tap", "expire_at": 1615462399, "attempts": 1}, "user_id": "user_id_at_provider"}], "saml_accounts": [{"id": "saml_account_id_123", "object": "saml_account", "provider": "SAML Provider", "active": true, "email_address": "user@example.com", "public_metadata": {"department": "IT"}, "verification": {"object": "verification_saml", "status": "verified", "strategy": "saml", "external_verification_redirect_url": "https://primary-caption.info", "expire_at": 560031, "attempts": null}}], "last_sign_in_at": 1622852400, "banned": false, "locked": false, "lockout_expires_in_seconds": null, "verification_attempts_remaining": 5, "updated_at": 1622852400, "created_at": 1609459200, "delete_self_enabled": true, "create_organization_enabled": true, "last_active_at": 1700690400000, "legal_accepted_at": 1700690400000} + application/json: {"id": "user_id_123", "object": "user", "external_id": "external_user_id_123", "primary_email_address_id": "email_id_123", "primary_phone_number_id": "phone_id_123", "primary_web3_wallet_id": "wallet_id_123", "username": "john_doe", "first_name": "John", "last_name": "Doe", "image_url": "https://example.com/new-profile.jpg", "has_image": true, "public_metadata": {"role": "admin"}, "private_metadata": {"ssn": "123-45-6789"}, "unsafe_metadata": {"theme": "dark"}, "email_addresses": [{"id": "email_id_123", "object": "email_address", "email_address": "john.doe@example.com", "reserved": false, "verification": {"object": "verification_ticket", "status": "verified", "strategy": "ticket", "attempts": null, "expire_at": null}, "linked_to": [{"type": "oauth_google", "id": "link_12345"}], "created_at": 1609459200, "updated_at": 1609459200}], "phone_numbers": [{"id": "phone_id_123", "object": "phone_number", "phone_number": "+12345678901", "reserved": false, "verification": {"object": "verification_admin", "status": "verified", "strategy": "admin", "attempts": 1, "expire_at": 1615462399}, "linked_to": [{"type": "oauth_google", "id": "link_id_123"}], "created_at": 1609459200, "updated_at": 1609459200}], "web3_wallets": [{"id": "wallet_id_123", "object": "web3_wallet", "web3_wallet": "0x123456789abcdef", "verification": {"object": "verification_admin", "status": "verified", "strategy": "admin", "attempts": 0, "expire_at": 1620000000}, "created_at": 1609459200, "updated_at": 1609459200}], "passkeys": [{"id": "passkey_id_123", "object": "passkey", "name": "My Passkey", "last_used_at": 1615852800, "verification": {"object": "verification_passkey", "status": "verified", "strategy": "passkey", "attempts": null, "expire_at": null}}], "password_enabled": true, "two_factor_enabled": true, "totp_enabled": true, "backup_code_enabled": true, "mfa_enabled_at": 1615852800, "mfa_disabled_at": null, "external_accounts": [{"object": "google_account", "id": "ext_account_id_123", "provider": "Facebook", "identification_id": "", "provider_user_id": "", "approved_scopes": "", "email_address": "Cleo_Schumm@yahoo.com", "first_name": "Keira", "last_name": "Windler", "public_metadata": {"key": "", "key1": "", "key2": ""}, "created_at": 751395, "updated_at": 124518, "verification": {"object": "verification_google_one_tap", "status": "verified", "strategy": "google_one_tap", "expire_at": 1615462399, "attempts": 1}, "user_id": "user_id_at_provider"}], "saml_accounts": [{"id": "saml_account_id_123", "object": "saml_account", "provider": "SAML Provider", "active": true, "email_address": "user@example.com", "public_metadata": {"department": "IT"}, "verification": {"object": "verification_saml", "status": "verified", "strategy": "saml", "external_verification_redirect_url": "https://primary-caption.info", "expire_at": 560031, "attempts": null}}], "enterprise_accounts": [{"id": "", "object": "enterprise_account", "provider": "", "active": false, "email_address": "Katheryn_Rogahn63@hotmail.com", "verification": {"object": "verification_saml", "status": "failed", "strategy": "saml", "attempts": 960027}}], "organization_memberships": [{"id": "org_mem_123", "object": "organization_membership", "role": "member", "permissions": ["read", "write"], "public_metadata": {}, "private_metadata": {}, "organization": {"object": "organization", "id": "org_123", "name": "Acme Corp", "slug": "acme-corp", "has_image": false, "members_count": 150, "max_allowed_memberships": 300, "admin_delete_enabled": true, "public_metadata": {"public_info": "Info visible to everyone"}, "private_metadata": {"internal_use_only": "Sensitive data"}, "created_by": "user_123456", "created_at": 1625078400, "updated_at": 1625164800}, "created_at": 1625078400, "updated_at": 1625164800}], "last_sign_in_at": 1622852400, "banned": false, "locked": false, "lockout_expires_in_seconds": null, "verification_attempts_remaining": 5, "updated_at": 1622852400, "created_at": 1609459200, "delete_self_enabled": true, "create_organization_enabled": true, "last_active_at": 1700690400000, "legal_accepted_at": 1700690400000} "400": application/json: {"errors": [{"message": "Invalid input", "long_message": "The input provided does not meet the requirements.", "code": "400_bad_request"}], "meta": {}} UpdateUser: @@ -1984,7 +2101,7 @@ examples: application/json: {"external_id": "ext_123", "first_name": "Jane", "last_name": "Doe", "primary_email_address_id": "eml_12345", "notify_primary_email_address_changed": true, "primary_phone_number_id": "phn_67890", "primary_web3_wallet_id": "wlt_123", "username": "janedoe", "profile_image_id": "img_789", "password": "secretPass123!", "password_digest": "$argon2i$v=19$m=4096,t=3,p=1$4t6CL3P7YiHBtwESXawI8Hm20zJj4cs7/4/G3c187e0$m7RQFczcKr5bIR0IIxbpO2P0tyrLjf3eUW3M3QSwnLc", "skip_password_checks": false, "sign_out_of_other_sessions": true, "totp_secret": "ABCD1234EFGH5678", "backup_codes": ["123456", "654321"], "public_metadata": {"theme": "dark"}, "private_metadata": {"vip": true}, "unsafe_metadata": {"age": 30}, "delete_self_enabled": true, "create_organization_enabled": false, "created_at": "2021-04-05T14:30:00.000Z"} responses: "200": - application/json: {"id": "user_id_123", "object": "user", "external_id": "external_user_id_123", "primary_email_address_id": "email_id_123", "primary_phone_number_id": "phone_id_123", "primary_web3_wallet_id": "wallet_id_123", "username": "john_doe", "first_name": "John", "last_name": "Doe", "image_url": "https://example.com/new-profile.jpg", "has_image": true, "public_metadata": {"role": "admin"}, "private_metadata": {"ssn": "123-45-6789"}, "unsafe_metadata": {"theme": "dark"}, "email_addresses": [{"id": "email_id_123", "object": "email_address", "email_address": "john.doe@example.com", "reserved": false, "verification": {"object": "verification_admin", "status": "verified", "strategy": "admin", "attempts": 0, "expire_at": 1620000000}, "linked_to": [{"type": "oauth_google", "id": "link_12345"}], "created_at": 1609459200, "updated_at": 1609459200}], "phone_numbers": [{"id": "phone_id_123", "object": "phone_number", "phone_number": "+12345678901", "reserved": false, "verification": {"object": "verification_admin", "status": "verified", "strategy": "admin", "attempts": 1, "expire_at": 1615462399}, "linked_to": [{"type": "oauth_google", "id": "link_id_123"}], "created_at": 1609459200, "updated_at": 1609459200}], "web3_wallets": [{"id": "wallet_id_123", "object": "web3_wallet", "web3_wallet": "0x123456789abcdef", "verification": {"object": "verification_admin", "status": "verified", "strategy": "admin", "attempts": 0, "expire_at": 1620000000}, "created_at": 1609459200, "updated_at": 1609459200}], "passkeys": [{"id": "passkey_id_123", "object": "passkey", "name": "My Passkey", "last_used_at": 1615852800, "verification": {"object": "verification_passkey", "status": "verified", "strategy": "passkey", "attempts": null, "expire_at": null}}], "password_enabled": true, "two_factor_enabled": true, "totp_enabled": true, "backup_code_enabled": true, "mfa_enabled_at": 1615852800, "mfa_disabled_at": null, "external_accounts": [{"object": "google_account", "id": "ext_account_id_123", "provider": "Facebook", "identification_id": "", "provider_user_id": "", "approved_scopes": "", "email_address": "Retta_Johnson71@hotmail.com", "first_name": "Darius", "last_name": "Russel", "public_metadata": {"key": ""}, "created_at": 580394, "updated_at": 356574, "verification": {"object": "verification_google_one_tap", "status": "verified", "strategy": "google_one_tap", "expire_at": 1615462399, "attempts": 1}, "user_id": "user_id_at_provider"}], "saml_accounts": [{"id": "saml_account_id_123", "object": "saml_account", "provider": "SAML Provider", "active": true, "email_address": "user@example.com", "public_metadata": {"department": "IT"}, "verification": {"object": "verification_ticket", "status": "verified", "strategy": "ticket", "attempts": null, "expire_at": null}}], "last_sign_in_at": 1622852400, "banned": false, "locked": false, "lockout_expires_in_seconds": null, "verification_attempts_remaining": 5, "updated_at": 1622852400, "created_at": 1609459200, "delete_self_enabled": true, "create_organization_enabled": true, "last_active_at": 1700690400000, "legal_accepted_at": 1700690400000} + application/json: {"id": "user_id_123", "object": "user", "external_id": "external_user_id_123", "primary_email_address_id": "email_id_123", "primary_phone_number_id": "phone_id_123", "primary_web3_wallet_id": "wallet_id_123", "username": "john_doe", "first_name": "John", "last_name": "Doe", "image_url": "https://example.com/new-profile.jpg", "has_image": true, "public_metadata": {"role": "admin"}, "private_metadata": {"ssn": "123-45-6789"}, "unsafe_metadata": {"theme": "dark"}, "email_addresses": [{"id": "email_id_123", "object": "email_address", "email_address": "john.doe@example.com", "reserved": false, "verification": {"object": "verification_admin", "status": "verified", "strategy": "admin", "attempts": 0, "expire_at": 1620000000}, "linked_to": [{"type": "oauth_google", "id": "link_12345"}], "created_at": 1609459200, "updated_at": 1609459200}], "phone_numbers": [{"id": "phone_id_123", "object": "phone_number", "phone_number": "+12345678901", "reserved": false, "verification": {"object": "verification_admin", "status": "verified", "strategy": "admin", "attempts": 1, "expire_at": 1615462399}, "linked_to": [{"type": "oauth_google", "id": "link_id_123"}], "created_at": 1609459200, "updated_at": 1609459200}], "web3_wallets": [{"id": "wallet_id_123", "object": "web3_wallet", "web3_wallet": "0x123456789abcdef", "verification": {"object": "verification_admin", "status": "verified", "strategy": "admin", "attempts": 0, "expire_at": 1620000000}, "created_at": 1609459200, "updated_at": 1609459200}], "passkeys": [{"id": "passkey_id_123", "object": "passkey", "name": "My Passkey", "last_used_at": 1615852800, "verification": {"object": "verification_passkey", "status": "verified", "strategy": "passkey", "attempts": null, "expire_at": null}}], "password_enabled": true, "two_factor_enabled": true, "totp_enabled": true, "backup_code_enabled": true, "mfa_enabled_at": 1615852800, "mfa_disabled_at": null, "external_accounts": [{"object": "google_account", "id": "ext_account_id_123", "provider": "Facebook", "identification_id": "", "provider_user_id": "", "approved_scopes": "", "email_address": "Retta_Johnson71@hotmail.com", "first_name": "Darius", "last_name": "Russel", "public_metadata": {"key": ""}, "created_at": 580394, "updated_at": 356574, "verification": {"object": "verification_google_one_tap", "status": "verified", "strategy": "google_one_tap", "expire_at": 1615462399, "attempts": 1}, "user_id": "user_id_at_provider"}], "saml_accounts": [{"id": "saml_account_id_123", "object": "saml_account", "provider": "SAML Provider", "active": true, "email_address": "user@example.com", "public_metadata": {"department": "IT"}, "verification": {"object": "verification_ticket", "status": "verified", "strategy": "ticket", "attempts": null, "expire_at": null}}], "enterprise_accounts": [], "organization_memberships": [{"id": "org_mem_123", "object": "organization_membership", "role": "member", "permissions": ["read", "write"], "public_metadata": {}, "private_metadata": {}, "organization": {"object": "organization", "id": "org_123", "name": "Acme Corp", "slug": "acme-corp", "has_image": false, "members_count": 150, "max_allowed_memberships": 300, "admin_delete_enabled": true, "public_metadata": {"public_info": "Info visible to everyone"}, "private_metadata": {"internal_use_only": "Sensitive data"}, "created_by": "user_123456", "created_at": 1625078400, "updated_at": 1625164800}, "created_at": 1625078400, "updated_at": 1625164800}], "last_sign_in_at": 1622852400, "banned": false, "locked": false, "lockout_expires_in_seconds": null, "verification_attempts_remaining": 5, "updated_at": 1622852400, "created_at": 1609459200, "delete_self_enabled": true, "create_organization_enabled": true, "last_active_at": 1700690400000, "legal_accepted_at": 1700690400000} "400": application/json: {"errors": [{"message": "Invalid input", "long_message": "The input provided does not meet the requirements.", "code": "400_bad_request"}], "meta": {}} DeleteUser: @@ -2004,7 +2121,7 @@ examples: user_id: "user_12345" responses: "200": - application/json: {"id": "user_id_123", "object": "user", "external_id": "external_user_id_123", "primary_email_address_id": "email_id_123", "primary_phone_number_id": "phone_id_123", "primary_web3_wallet_id": "wallet_id_123", "username": "john_doe", "first_name": "John", "last_name": "Doe", "image_url": "https://example.com/new-profile.jpg", "has_image": true, "public_metadata": {"role": "admin"}, "private_metadata": {"ssn": "123-45-6789"}, "unsafe_metadata": {"theme": "dark"}, "email_addresses": [{"id": "email_id_123", "object": "email_address", "email_address": "john.doe@example.com", "reserved": false, "verification": {"object": "verification_from_oauth", "status": "verified", "strategy": "admin", "expire_at": 49333, "attempts": 588226}, "linked_to": [{"type": "oauth_google", "id": "link_12345"}], "created_at": 1609459200, "updated_at": 1609459200}], "phone_numbers": [{"id": "phone_id_123", "object": "phone_number", "phone_number": "+12345678901", "reserved": false, "verification": {"object": "verification_otp", "status": "verified", "strategy": "email_code", "attempts": 1, "expire_at": 1615462399}, "linked_to": [{"type": "oauth_google", "id": "link_id_123"}], "created_at": 1609459200, "updated_at": 1609459200}], "web3_wallets": [{"id": "wallet_id_123", "object": "web3_wallet", "web3_wallet": "0x123456789abcdef", "verification": {"object": "verification_admin", "status": "verified", "strategy": "admin", "attempts": null, "expire_at": null}, "created_at": 1609459200, "updated_at": 1609459200}], "passkeys": [{"id": "passkey_id_123", "object": "passkey", "name": "My Passkey", "last_used_at": 1615852800, "verification": {"object": "verification_passkey", "status": "verified", "strategy": "passkey", "attempts": null, "expire_at": null}}], "password_enabled": true, "two_factor_enabled": true, "totp_enabled": true, "backup_code_enabled": true, "mfa_enabled_at": 1615852800, "mfa_disabled_at": null, "external_accounts": [{"object": "external_account", "id": "ext_account_id_123", "provider": "Facebook", "identification_id": "", "provider_user_id": "", "approved_scopes": "", "email_address": "Autumn.Pfannerstill@gmail.com", "first_name": "Cyrus", "last_name": "Predovic-Emmerich", "public_metadata": {"key": ""}, "created_at": 944262, "updated_at": 218113, "verification": {"object": "verification_oauth", "status": "verified", "strategy": "oauth_google", "expire_at": 1615462399, "attempts": 1}, "user_id": "user_id_at_provider"}], "saml_accounts": [{"id": "saml_account_id_123", "object": "saml_account", "provider": "SAML Provider", "active": true, "email_address": "user@example.com", "public_metadata": {"department": "IT"}, "verification": {"object": "verification_saml", "status": "verified", "strategy": "saml", "external_verification_redirect_url": "https://overcooked-pocket-watch.com/", "expire_at": 55159, "attempts": null}}], "last_sign_in_at": 1622852400, "banned": false, "locked": false, "lockout_expires_in_seconds": null, "verification_attempts_remaining": 5, "updated_at": 1622852400, "created_at": 1609459200, "delete_self_enabled": true, "create_organization_enabled": true, "last_active_at": 1700690400000, "legal_accepted_at": 1700690400000} + application/json: {"id": "user_id_123", "object": "user", "external_id": "external_user_id_123", "primary_email_address_id": "email_id_123", "primary_phone_number_id": "phone_id_123", "primary_web3_wallet_id": "wallet_id_123", "username": "john_doe", "first_name": "John", "last_name": "Doe", "image_url": "https://example.com/new-profile.jpg", "has_image": true, "public_metadata": {"role": "admin"}, "private_metadata": {"ssn": "123-45-6789"}, "unsafe_metadata": {"theme": "dark"}, "email_addresses": [{"id": "email_id_123", "object": "email_address", "email_address": "john.doe@example.com", "reserved": false, "verification": {"object": "verification_from_oauth", "status": "verified", "strategy": "admin", "expire_at": 49333, "attempts": 588226}, "linked_to": [{"type": "oauth_google", "id": "link_12345"}], "created_at": 1609459200, "updated_at": 1609459200}], "phone_numbers": [{"id": "phone_id_123", "object": "phone_number", "phone_number": "+12345678901", "reserved": false, "verification": {"object": "verification_otp", "status": "verified", "strategy": "email_code", "attempts": 1, "expire_at": 1615462399}, "linked_to": [{"type": "oauth_google", "id": "link_id_123"}], "created_at": 1609459200, "updated_at": 1609459200}], "web3_wallets": [{"id": "wallet_id_123", "object": "web3_wallet", "web3_wallet": "0x123456789abcdef", "verification": {"object": "verification_admin", "status": "verified", "strategy": "admin", "attempts": null, "expire_at": null}, "created_at": 1609459200, "updated_at": 1609459200}], "passkeys": [{"id": "passkey_id_123", "object": "passkey", "name": "My Passkey", "last_used_at": 1615852800, "verification": {"object": "verification_passkey", "status": "verified", "strategy": "passkey", "attempts": null, "expire_at": null}}], "password_enabled": true, "two_factor_enabled": true, "totp_enabled": true, "backup_code_enabled": true, "mfa_enabled_at": 1615852800, "mfa_disabled_at": null, "external_accounts": [{"object": "external_account", "id": "ext_account_id_123", "provider": "Facebook", "identification_id": "", "provider_user_id": "", "approved_scopes": "", "email_address": "Autumn.Pfannerstill@gmail.com", "first_name": "Cyrus", "last_name": "Predovic-Emmerich", "public_metadata": {"key": ""}, "created_at": 944262, "updated_at": 218113, "verification": {"object": "verification_oauth", "status": "verified", "strategy": "oauth_google", "expire_at": 1615462399, "attempts": 1}, "user_id": "user_id_at_provider"}], "saml_accounts": [{"id": "saml_account_id_123", "object": "saml_account", "provider": "SAML Provider", "active": true, "email_address": "user@example.com", "public_metadata": {"department": "IT"}, "verification": {"object": "verification_saml", "status": "verified", "strategy": "saml", "external_verification_redirect_url": "https://overcooked-pocket-watch.com/", "expire_at": 55159, "attempts": null}}], "enterprise_accounts": [{"id": "", "object": "enterprise_account", "provider": "", "active": true, "email_address": "Beverly58@yahoo.com", "verification": null}], "organization_memberships": [{"id": "org_mem_123", "object": "organization_membership", "role": "member", "permissions": ["read", "write"], "public_metadata": {}, "private_metadata": {}, "organization": {"object": "organization", "id": "org_123", "name": "Acme Corp", "slug": "acme-corp", "has_image": true, "members_count": 150, "max_allowed_memberships": 300, "admin_delete_enabled": true, "public_metadata": {"public_info": "Info visible to everyone"}, "private_metadata": {"internal_use_only": "Sensitive data"}, "created_by": "user_123456", "created_at": 1625078400, "updated_at": 1625164800}, "created_at": 1625078400, "updated_at": 1625164800}], "last_sign_in_at": 1622852400, "banned": false, "locked": false, "lockout_expires_in_seconds": null, "verification_attempts_remaining": 5, "updated_at": 1622852400, "created_at": 1609459200, "delete_self_enabled": true, "create_organization_enabled": true, "last_active_at": 1700690400000, "legal_accepted_at": 1700690400000} "402": application/json: {"errors": [{"message": "Invalid input", "long_message": "The input provided does not meet the requirements.", "code": "400_bad_request"}], "meta": {}} UnbanUser: @@ -2014,7 +2131,7 @@ examples: user_id: "user_12345" responses: "200": - application/json: {"id": "user_id_123", "object": "user", "external_id": "external_user_id_123", "primary_email_address_id": "email_id_123", "primary_phone_number_id": "phone_id_123", "primary_web3_wallet_id": "wallet_id_123", "username": "john_doe", "first_name": "John", "last_name": "Doe", "image_url": "https://example.com/new-profile.jpg", "has_image": true, "public_metadata": {"role": "admin"}, "private_metadata": {"ssn": "123-45-6789"}, "unsafe_metadata": {"theme": "dark"}, "email_addresses": [{"id": "email_id_123", "object": "email_address", "email_address": "john.doe@example.com", "reserved": false, "verification": {"object": "verification_otp", "status": "verified", "strategy": "email_code", "attempts": 1, "expire_at": 1615462399}, "linked_to": [{"type": "oauth_google", "id": "link_12345"}], "created_at": 1609459200, "updated_at": 1609459200}], "phone_numbers": [{"id": "phone_id_123", "object": "phone_number", "phone_number": "+12345678901", "reserved": false, "verification": {"object": "verification_otp", "status": "verified", "strategy": "email_code", "attempts": 1, "expire_at": 1615462399}, "linked_to": [{"type": "oauth_google", "id": "link_id_123"}], "created_at": 1609459200, "updated_at": 1609459200}], "web3_wallets": [{"id": "wallet_id_123", "object": "web3_wallet", "web3_wallet": "0x123456789abcdef", "verification": {"object": "verification_web3", "status": "verified", "strategy": "web3_metamask_signature", "attempts": null, "expire_at": null}, "created_at": 1609459200, "updated_at": 1609459200}], "passkeys": [{"id": "passkey_id_123", "object": "passkey", "name": "My Passkey", "last_used_at": 1615852800, "verification": {"object": "verification_passkey", "status": "verified", "strategy": "passkey", "attempts": null, "expire_at": null}}], "password_enabled": true, "two_factor_enabled": true, "totp_enabled": true, "backup_code_enabled": true, "mfa_enabled_at": 1615852800, "mfa_disabled_at": null, "external_accounts": [{"object": "facebook_account", "id": "ext_account_id_123", "provider": "Facebook", "identification_id": "", "provider_user_id": "", "approved_scopes": "", "email_address": "Ricky66@yahoo.com", "first_name": "Desmond", "last_name": "Wuckert", "public_metadata": {}, "created_at": 534276, "updated_at": 656424, "verification": {"object": "verification_google_one_tap", "status": "verified", "strategy": "google_one_tap", "expire_at": 1615462399, "attempts": 1}, "user_id": "user_id_at_provider"}], "saml_accounts": [{"id": "saml_account_id_123", "object": "saml_account", "provider": "SAML Provider", "active": true, "email_address": "user@example.com", "public_metadata": {"department": "IT"}, "verification": {"object": "verification_ticket", "status": "verified", "strategy": "ticket", "attempts": null, "expire_at": null}}], "last_sign_in_at": 1622852400, "banned": false, "locked": false, "lockout_expires_in_seconds": null, "verification_attempts_remaining": 5, "updated_at": 1622852400, "created_at": 1609459200, "delete_self_enabled": true, "create_organization_enabled": true, "last_active_at": 1700690400000, "legal_accepted_at": 1700690400000} + application/json: {"id": "user_id_123", "object": "user", "external_id": "external_user_id_123", "primary_email_address_id": "email_id_123", "primary_phone_number_id": "phone_id_123", "primary_web3_wallet_id": "wallet_id_123", "username": "john_doe", "first_name": "John", "last_name": "Doe", "image_url": "https://example.com/new-profile.jpg", "has_image": true, "public_metadata": {"role": "admin"}, "private_metadata": {"ssn": "123-45-6789"}, "unsafe_metadata": {"theme": "dark"}, "email_addresses": [{"id": "email_id_123", "object": "email_address", "email_address": "john.doe@example.com", "reserved": false, "verification": {"object": "verification_otp", "status": "verified", "strategy": "email_code", "attempts": 1, "expire_at": 1615462399}, "linked_to": [{"type": "oauth_google", "id": "link_12345"}], "created_at": 1609459200, "updated_at": 1609459200}], "phone_numbers": [{"id": "phone_id_123", "object": "phone_number", "phone_number": "+12345678901", "reserved": false, "verification": {"object": "verification_otp", "status": "verified", "strategy": "email_code", "attempts": 1, "expire_at": 1615462399}, "linked_to": [{"type": "oauth_google", "id": "link_id_123"}], "created_at": 1609459200, "updated_at": 1609459200}], "web3_wallets": [{"id": "wallet_id_123", "object": "web3_wallet", "web3_wallet": "0x123456789abcdef", "verification": {"object": "verification_web3", "status": "verified", "strategy": "web3_metamask_signature", "attempts": null, "expire_at": null}, "created_at": 1609459200, "updated_at": 1609459200}], "passkeys": [{"id": "passkey_id_123", "object": "passkey", "name": "My Passkey", "last_used_at": 1615852800, "verification": {"object": "verification_passkey", "status": "verified", "strategy": "passkey", "attempts": null, "expire_at": null}}], "password_enabled": true, "two_factor_enabled": true, "totp_enabled": true, "backup_code_enabled": true, "mfa_enabled_at": 1615852800, "mfa_disabled_at": null, "external_accounts": [{"object": "facebook_account", "id": "ext_account_id_123", "provider": "Facebook", "identification_id": "", "provider_user_id": "", "approved_scopes": "", "email_address": "Ricky66@yahoo.com", "first_name": "Desmond", "last_name": "Wuckert", "public_metadata": {}, "created_at": 534276, "updated_at": 656424, "verification": {"object": "verification_google_one_tap", "status": "verified", "strategy": "google_one_tap", "expire_at": 1615462399, "attempts": 1}, "user_id": "user_id_at_provider"}], "saml_accounts": [{"id": "saml_account_id_123", "object": "saml_account", "provider": "SAML Provider", "active": true, "email_address": "user@example.com", "public_metadata": {"department": "IT"}, "verification": {"object": "verification_ticket", "status": "verified", "strategy": "ticket", "attempts": null, "expire_at": null}}], "enterprise_accounts": [], "organization_memberships": [{"id": "org_mem_123", "object": "organization_membership", "role": "member", "permissions": ["read", "write"], "public_metadata": {}, "private_metadata": {}, "organization": {"object": "organization", "id": "org_123", "name": "Acme Corp", "slug": "acme-corp", "has_image": true, "members_count": 150, "max_allowed_memberships": 300, "admin_delete_enabled": true, "public_metadata": {"public_info": "Info visible to everyone"}, "private_metadata": {"internal_use_only": "Sensitive data"}, "created_by": "user_123456", "created_at": 1625078400, "updated_at": 1625164800}, "created_at": 1625078400, "updated_at": 1625164800}], "last_sign_in_at": 1622852400, "banned": false, "locked": false, "lockout_expires_in_seconds": null, "verification_attempts_remaining": 5, "updated_at": 1622852400, "created_at": 1609459200, "delete_self_enabled": true, "create_organization_enabled": true, "last_active_at": 1700690400000, "legal_accepted_at": 1700690400000} "402": application/json: {"errors": [{"message": "Invalid input", "long_message": "The input provided does not meet the requirements.", "code": "400_bad_request"}], "meta": {}} LockUser: @@ -2024,7 +2141,7 @@ examples: user_id: "user_123456789" responses: "200": - application/json: {"id": "user_id_123", "object": "user", "external_id": "external_user_id_123", "primary_email_address_id": "email_id_123", "primary_phone_number_id": "phone_id_123", "primary_web3_wallet_id": "wallet_id_123", "username": "john_doe", "first_name": "John", "last_name": "Doe", "image_url": "https://example.com/new-profile.jpg", "has_image": true, "public_metadata": {"role": "admin"}, "private_metadata": {"ssn": "123-45-6789"}, "unsafe_metadata": {"theme": "dark"}, "email_addresses": [{"id": "email_id_123", "object": "email_address", "email_address": "john.doe@example.com", "reserved": false, "verification": {"object": "verification_otp", "status": "verified", "strategy": "email_code", "attempts": 1, "expire_at": 1615462399}, "linked_to": [{"type": "oauth_google", "id": "link_12345"}], "created_at": 1609459200, "updated_at": 1609459200}], "phone_numbers": [{"id": "phone_id_123", "object": "phone_number", "phone_number": "+12345678901", "reserved": false, "verification": {"object": "verification_otp", "status": "verified", "strategy": "email_code", "attempts": 1, "expire_at": 1615462399}, "linked_to": [{"type": "oauth_google", "id": "link_id_123"}], "created_at": 1609459200, "updated_at": 1609459200}], "web3_wallets": [{"id": "wallet_id_123", "object": "web3_wallet", "web3_wallet": "0x123456789abcdef", "verification": {"object": "verification_admin", "status": "verified", "strategy": "admin", "attempts": null, "expire_at": null}, "created_at": 1609459200, "updated_at": 1609459200}], "passkeys": [{"id": "passkey_id_123", "object": "passkey", "name": "My Passkey", "last_used_at": 1615852800, "verification": {"object": "verification_passkey", "status": "verified", "strategy": "passkey", "attempts": null, "expire_at": null}}], "password_enabled": true, "two_factor_enabled": true, "totp_enabled": true, "backup_code_enabled": true, "mfa_enabled_at": 1615852800, "mfa_disabled_at": null, "external_accounts": [{"object": "facebook_account", "id": "ext_account_id_123", "provider": "Facebook", "identification_id": "", "provider_user_id": "", "approved_scopes": "", "email_address": "Drew.Goodwin75@hotmail.com", "first_name": "Jodie", "last_name": "Farrell", "public_metadata": {"key": ""}, "created_at": 499717, "updated_at": 945254, "verification": {"object": "verification_google_one_tap", "status": "verified", "strategy": "google_one_tap", "expire_at": 1615462399, "attempts": 1}, "user_id": "user_id_at_provider"}], "saml_accounts": [{"id": "saml_account_id_123", "object": "saml_account", "provider": "SAML Provider", "active": true, "email_address": "user@example.com", "public_metadata": {"department": "IT"}, "verification": {"object": "verification_saml", "status": "verified", "strategy": "saml", "external_verification_redirect_url": "https://intrepid-requirement.biz/", "expire_at": 505865, "attempts": null}}], "last_sign_in_at": 1622852400, "banned": false, "locked": false, "lockout_expires_in_seconds": null, "verification_attempts_remaining": 5, "updated_at": 1622852400, "created_at": 1609459200, "delete_self_enabled": true, "create_organization_enabled": true, "last_active_at": 1700690400000, "legal_accepted_at": 1700690400000} + application/json: {"id": "user_id_123", "object": "user", "external_id": "external_user_id_123", "primary_email_address_id": "email_id_123", "primary_phone_number_id": "phone_id_123", "primary_web3_wallet_id": "wallet_id_123", "username": "john_doe", "first_name": "John", "last_name": "Doe", "image_url": "https://example.com/new-profile.jpg", "has_image": true, "public_metadata": {"role": "admin"}, "private_metadata": {"ssn": "123-45-6789"}, "unsafe_metadata": {"theme": "dark"}, "email_addresses": [{"id": "email_id_123", "object": "email_address", "email_address": "john.doe@example.com", "reserved": false, "verification": {"object": "verification_otp", "status": "verified", "strategy": "email_code", "attempts": 1, "expire_at": 1615462399}, "linked_to": [{"type": "oauth_google", "id": "link_12345"}], "created_at": 1609459200, "updated_at": 1609459200}], "phone_numbers": [{"id": "phone_id_123", "object": "phone_number", "phone_number": "+12345678901", "reserved": false, "verification": {"object": "verification_otp", "status": "verified", "strategy": "email_code", "attempts": 1, "expire_at": 1615462399}, "linked_to": [{"type": "oauth_google", "id": "link_id_123"}], "created_at": 1609459200, "updated_at": 1609459200}], "web3_wallets": [{"id": "wallet_id_123", "object": "web3_wallet", "web3_wallet": "0x123456789abcdef", "verification": {"object": "verification_admin", "status": "verified", "strategy": "admin", "attempts": null, "expire_at": null}, "created_at": 1609459200, "updated_at": 1609459200}], "passkeys": [{"id": "passkey_id_123", "object": "passkey", "name": "My Passkey", "last_used_at": 1615852800, "verification": {"object": "verification_passkey", "status": "verified", "strategy": "passkey", "attempts": null, "expire_at": null}}], "password_enabled": true, "two_factor_enabled": true, "totp_enabled": true, "backup_code_enabled": true, "mfa_enabled_at": 1615852800, "mfa_disabled_at": null, "external_accounts": [{"object": "facebook_account", "id": "ext_account_id_123", "provider": "Facebook", "identification_id": "", "provider_user_id": "", "approved_scopes": "", "email_address": "Drew.Goodwin75@hotmail.com", "first_name": "Jodie", "last_name": "Farrell", "public_metadata": {"key": ""}, "created_at": 499717, "updated_at": 945254, "verification": {"object": "verification_google_one_tap", "status": "verified", "strategy": "google_one_tap", "expire_at": 1615462399, "attempts": 1}, "user_id": "user_id_at_provider"}], "saml_accounts": [{"id": "saml_account_id_123", "object": "saml_account", "provider": "SAML Provider", "active": true, "email_address": "user@example.com", "public_metadata": {"department": "IT"}, "verification": {"object": "verification_saml", "status": "verified", "strategy": "saml", "external_verification_redirect_url": "https://intrepid-requirement.biz/", "expire_at": 505865, "attempts": null}}], "enterprise_accounts": [], "organization_memberships": [{"id": "org_mem_123", "object": "organization_membership", "role": "member", "permissions": ["read", "write"], "public_metadata": {}, "private_metadata": {}, "organization": {"object": "organization", "id": "org_123", "name": "Acme Corp", "slug": "acme-corp", "has_image": true, "members_count": 150, "max_allowed_memberships": 300, "admin_delete_enabled": true, "public_metadata": {"public_info": "Info visible to everyone"}, "private_metadata": {"internal_use_only": "Sensitive data"}, "created_by": "user_123456", "created_at": 1625078400, "updated_at": 1625164800}, "created_at": 1625078400, "updated_at": 1625164800}], "last_sign_in_at": 1622852400, "banned": false, "locked": false, "lockout_expires_in_seconds": null, "verification_attempts_remaining": 5, "updated_at": 1622852400, "created_at": 1609459200, "delete_self_enabled": true, "create_organization_enabled": true, "last_active_at": 1700690400000, "legal_accepted_at": 1700690400000} "403": application/json: {"errors": [{"message": "Invalid input", "long_message": "The input provided does not meet the requirements.", "code": "400_bad_request"}], "meta": {}} UnlockUser: @@ -2034,7 +2151,7 @@ examples: user_id: "user_12345" responses: "200": - application/json: {"id": "user_id_123", "object": "user", "external_id": "external_user_id_123", "primary_email_address_id": "email_id_123", "primary_phone_number_id": "phone_id_123", "primary_web3_wallet_id": "wallet_id_123", "username": "john_doe", "first_name": "John", "last_name": "Doe", "image_url": "https://example.com/new-profile.jpg", "has_image": true, "public_metadata": {"role": "admin"}, "private_metadata": {"ssn": "123-45-6789"}, "unsafe_metadata": {"theme": "dark"}, "email_addresses": [{"id": "email_id_123", "object": "email_address", "email_address": "john.doe@example.com", "reserved": false, "verification": {"object": "verification_otp", "status": "verified", "strategy": "email_code", "attempts": 1, "expire_at": 1615462399}, "linked_to": [{"type": "oauth_google", "id": "link_12345"}], "created_at": 1609459200, "updated_at": 1609459200}], "phone_numbers": [{"id": "phone_id_123", "object": "phone_number", "phone_number": "+12345678901", "reserved": false, "verification": {"object": "verification_admin", "status": "verified", "strategy": "admin", "attempts": 1, "expire_at": 1615462399}, "linked_to": [{"type": "oauth_google", "id": "link_id_123"}], "created_at": 1609459200, "updated_at": 1609459200}], "web3_wallets": [{"id": "wallet_id_123", "object": "web3_wallet", "web3_wallet": "0x123456789abcdef", "verification": {"object": "verification_admin", "status": "verified", "strategy": "admin", "attempts": 0, "expire_at": 1620000000}, "created_at": 1609459200, "updated_at": 1609459200}], "passkeys": [{"id": "passkey_id_123", "object": "passkey", "name": "My Passkey", "last_used_at": 1615852800, "verification": {"object": "verification_passkey", "status": "verified", "strategy": "passkey", "attempts": null, "expire_at": null}}], "password_enabled": true, "two_factor_enabled": true, "totp_enabled": true, "backup_code_enabled": true, "mfa_enabled_at": 1615852800, "mfa_disabled_at": null, "external_accounts": [{"object": "google_account", "id": "ext_account_id_123", "provider": "Facebook", "identification_id": "", "provider_user_id": "", "approved_scopes": "", "email_address": "Kelley_Bogisich@yahoo.com", "first_name": "Kenton", "last_name": "Huels", "public_metadata": {"key": ""}, "created_at": 984576, "updated_at": 50898, "verification": {"object": "verification_google_one_tap", "status": "verified", "strategy": "google_one_tap", "expire_at": 1615462399, "attempts": 1}, "user_id": "user_id_at_provider"}], "saml_accounts": [{"id": "saml_account_id_123", "object": "saml_account", "provider": "SAML Provider", "active": true, "email_address": "user@example.com", "public_metadata": {"department": "IT"}, "verification": {"object": "verification_ticket", "status": "verified", "strategy": "ticket", "attempts": null, "expire_at": 1622852400}}], "last_sign_in_at": 1622852400, "banned": false, "locked": false, "lockout_expires_in_seconds": null, "verification_attempts_remaining": 5, "updated_at": 1622852400, "created_at": 1609459200, "delete_self_enabled": true, "create_organization_enabled": true, "last_active_at": 1700690400000, "legal_accepted_at": 1700690400000} + application/json: {"id": "user_id_123", "object": "user", "external_id": "external_user_id_123", "primary_email_address_id": "email_id_123", "primary_phone_number_id": "phone_id_123", "primary_web3_wallet_id": "wallet_id_123", "username": "john_doe", "first_name": "John", "last_name": "Doe", "image_url": "https://example.com/new-profile.jpg", "has_image": true, "public_metadata": {"role": "admin"}, "private_metadata": {"ssn": "123-45-6789"}, "unsafe_metadata": {"theme": "dark"}, "email_addresses": [{"id": "email_id_123", "object": "email_address", "email_address": "john.doe@example.com", "reserved": false, "verification": {"object": "verification_otp", "status": "verified", "strategy": "email_code", "attempts": 1, "expire_at": 1615462399}, "linked_to": [{"type": "oauth_google", "id": "link_12345"}], "created_at": 1609459200, "updated_at": 1609459200}], "phone_numbers": [{"id": "phone_id_123", "object": "phone_number", "phone_number": "+12345678901", "reserved": false, "verification": {"object": "verification_admin", "status": "verified", "strategy": "admin", "attempts": 1, "expire_at": 1615462399}, "linked_to": [{"type": "oauth_google", "id": "link_id_123"}], "created_at": 1609459200, "updated_at": 1609459200}], "web3_wallets": [{"id": "wallet_id_123", "object": "web3_wallet", "web3_wallet": "0x123456789abcdef", "verification": {"object": "verification_admin", "status": "verified", "strategy": "admin", "attempts": 0, "expire_at": 1620000000}, "created_at": 1609459200, "updated_at": 1609459200}], "passkeys": [{"id": "passkey_id_123", "object": "passkey", "name": "My Passkey", "last_used_at": 1615852800, "verification": {"object": "verification_passkey", "status": "verified", "strategy": "passkey", "attempts": null, "expire_at": null}}], "password_enabled": true, "two_factor_enabled": true, "totp_enabled": true, "backup_code_enabled": true, "mfa_enabled_at": 1615852800, "mfa_disabled_at": null, "external_accounts": [{"object": "google_account", "id": "ext_account_id_123", "provider": "Facebook", "identification_id": "", "provider_user_id": "", "approved_scopes": "", "email_address": "Kelley_Bogisich@yahoo.com", "first_name": "Kenton", "last_name": "Huels", "public_metadata": {"key": ""}, "created_at": 984576, "updated_at": 50898, "verification": {"object": "verification_google_one_tap", "status": "verified", "strategy": "google_one_tap", "expire_at": 1615462399, "attempts": 1}, "user_id": "user_id_at_provider"}], "saml_accounts": [{"id": "saml_account_id_123", "object": "saml_account", "provider": "SAML Provider", "active": true, "email_address": "user@example.com", "public_metadata": {"department": "IT"}, "verification": {"object": "verification_ticket", "status": "verified", "strategy": "ticket", "attempts": null, "expire_at": 1622852400}}], "enterprise_accounts": [], "organization_memberships": [{"id": "org_mem_123", "object": "organization_membership", "role": "member", "permissions": ["read", "write"], "public_metadata": {}, "private_metadata": {}, "organization": {"object": "organization", "id": "org_123", "name": "Acme Corp", "slug": "acme-corp", "has_image": false, "members_count": 150, "max_allowed_memberships": 300, "admin_delete_enabled": true, "public_metadata": {"public_info": "Info visible to everyone"}, "private_metadata": {"internal_use_only": "Sensitive data"}, "created_by": "user_123456", "created_at": 1625078400, "updated_at": 1625164800}, "created_at": 1625078400, "updated_at": 1625164800}], "last_sign_in_at": 1622852400, "banned": false, "locked": false, "lockout_expires_in_seconds": null, "verification_attempts_remaining": 5, "updated_at": 1622852400, "created_at": 1609459200, "delete_self_enabled": true, "create_organization_enabled": true, "last_active_at": 1700690400000, "legal_accepted_at": 1700690400000} "403": application/json: {"errors": [{"message": "Invalid input", "long_message": "The input provided does not meet the requirements.", "code": "400_bad_request"}], "meta": {}} SetUserProfileImage: @@ -2046,7 +2163,7 @@ examples: multipart/form-data: {} responses: "200": - application/json: {"id": "user_id_123", "object": "user", "external_id": "external_user_id_123", "primary_email_address_id": "email_id_123", "primary_phone_number_id": "phone_id_123", "primary_web3_wallet_id": "wallet_id_123", "username": "john_doe", "first_name": "John", "last_name": "Doe", "image_url": "https://example.com/new-profile.jpg", "has_image": true, "public_metadata": {"role": "admin"}, "private_metadata": {"ssn": "123-45-6789"}, "unsafe_metadata": {"theme": "dark"}, "email_addresses": [{"id": "email_id_123", "object": "email_address", "email_address": "john.doe@example.com", "reserved": false, "verification": {"object": "verification_ticket", "status": "verified", "strategy": "ticket", "attempts": null, "expire_at": null}, "linked_to": [{"type": "oauth_google", "id": "link_12345"}], "created_at": 1609459200, "updated_at": 1609459200}], "phone_numbers": [{"id": "phone_id_123", "object": "phone_number", "phone_number": "+12345678901", "reserved": false, "verification": {"object": "verification_admin", "status": "verified", "strategy": "admin", "attempts": 1, "expire_at": 1615462399}, "linked_to": [{"type": "oauth_google", "id": "link_id_123"}], "created_at": 1609459200, "updated_at": 1609459200}], "web3_wallets": [{"id": "wallet_id_123", "object": "web3_wallet", "web3_wallet": "0x123456789abcdef", "verification": {"object": "verification_web3", "status": "verified", "strategy": "web3_okx_wallet_signature", "attempts": 0, "expire_at": 1620000000}, "created_at": 1609459200, "updated_at": 1609459200}], "passkeys": [{"id": "passkey_id_123", "object": "passkey", "name": "My Passkey", "last_used_at": 1615852800, "verification": {"object": "verification_passkey", "status": "verified", "strategy": "passkey", "attempts": null, "expire_at": null}}], "password_enabled": true, "two_factor_enabled": true, "totp_enabled": true, "backup_code_enabled": true, "mfa_enabled_at": 1615852800, "mfa_disabled_at": null, "external_accounts": [{"object": "external_account", "id": "ext_account_id_123", "provider": "Facebook", "identification_id": "", "provider_user_id": "", "approved_scopes": "", "email_address": "Ines9@hotmail.com", "first_name": "Louvenia", "last_name": "Heaney", "public_metadata": {"key": "", "key1": "", "key2": ""}, "created_at": 833624, "updated_at": 114306, "verification": {"object": "verification_oauth", "status": "verified", "strategy": "oauth_google", "expire_at": 1615462399, "attempts": 1}, "user_id": "user_id_at_provider"}], "saml_accounts": [{"id": "saml_account_id_123", "object": "saml_account", "provider": "SAML Provider", "active": true, "email_address": "user@example.com", "public_metadata": {"department": "IT"}, "verification": {"object": "verification_saml", "status": "verified", "strategy": "saml", "external_verification_redirect_url": "https://example.com/saml_callback", "expire_at": 1622852400, "attempts": null}}], "last_sign_in_at": 1622852400, "banned": false, "locked": false, "lockout_expires_in_seconds": null, "verification_attempts_remaining": 5, "updated_at": 1622852400, "created_at": 1609459200, "delete_self_enabled": true, "create_organization_enabled": true, "last_active_at": 1700690400000, "legal_accepted_at": 1700690400000} + application/json: {"id": "user_id_123", "object": "user", "external_id": "external_user_id_123", "primary_email_address_id": "email_id_123", "primary_phone_number_id": "phone_id_123", "primary_web3_wallet_id": "wallet_id_123", "username": "john_doe", "first_name": "John", "last_name": "Doe", "image_url": "https://example.com/new-profile.jpg", "has_image": true, "public_metadata": {"role": "admin"}, "private_metadata": {"ssn": "123-45-6789"}, "unsafe_metadata": {"theme": "dark"}, "email_addresses": [{"id": "email_id_123", "object": "email_address", "email_address": "john.doe@example.com", "reserved": false, "verification": {"object": "verification_ticket", "status": "verified", "strategy": "ticket", "attempts": null, "expire_at": null}, "linked_to": [{"type": "oauth_google", "id": "link_12345"}], "created_at": 1609459200, "updated_at": 1609459200}], "phone_numbers": [{"id": "phone_id_123", "object": "phone_number", "phone_number": "+12345678901", "reserved": false, "verification": {"object": "verification_admin", "status": "verified", "strategy": "admin", "attempts": 1, "expire_at": 1615462399}, "linked_to": [{"type": "oauth_google", "id": "link_id_123"}], "created_at": 1609459200, "updated_at": 1609459200}], "web3_wallets": [{"id": "wallet_id_123", "object": "web3_wallet", "web3_wallet": "0x123456789abcdef", "verification": {"object": "verification_web3", "status": "verified", "strategy": "web3_okx_wallet_signature", "attempts": 0, "expire_at": 1620000000}, "created_at": 1609459200, "updated_at": 1609459200}], "passkeys": [{"id": "passkey_id_123", "object": "passkey", "name": "My Passkey", "last_used_at": 1615852800, "verification": {"object": "verification_passkey", "status": "verified", "strategy": "passkey", "attempts": null, "expire_at": null}}], "password_enabled": true, "two_factor_enabled": true, "totp_enabled": true, "backup_code_enabled": true, "mfa_enabled_at": 1615852800, "mfa_disabled_at": null, "external_accounts": [{"object": "external_account", "id": "ext_account_id_123", "provider": "Facebook", "identification_id": "", "provider_user_id": "", "approved_scopes": "", "email_address": "Ines9@hotmail.com", "first_name": "Louvenia", "last_name": "Heaney", "public_metadata": {"key": "", "key1": "", "key2": ""}, "created_at": 833624, "updated_at": 114306, "verification": {"object": "verification_oauth", "status": "verified", "strategy": "oauth_google", "expire_at": 1615462399, "attempts": 1}, "user_id": "user_id_at_provider"}], "saml_accounts": [{"id": "saml_account_id_123", "object": "saml_account", "provider": "SAML Provider", "active": true, "email_address": "user@example.com", "public_metadata": {"department": "IT"}, "verification": {"object": "verification_saml", "status": "verified", "strategy": "saml", "external_verification_redirect_url": "https://example.com/saml_callback", "expire_at": 1622852400, "attempts": null}}], "enterprise_accounts": [{"id": "", "object": "enterprise_account", "provider": "", "active": false, "email_address": "Raquel_Bergnaum58@gmail.com", "verification": {"object": "verification_saml", "status": "expired", "strategy": "saml", "attempts": 976448}}], "organization_memberships": [{"id": "org_mem_123", "object": "organization_membership", "role": "member", "permissions": ["read", "write"], "public_metadata": {}, "private_metadata": {}, "organization": {"object": "organization", "id": "org_123", "name": "Acme Corp", "slug": "acme-corp", "has_image": false, "members_count": 150, "max_allowed_memberships": 300, "admin_delete_enabled": true, "public_metadata": {"public_info": "Info visible to everyone"}, "private_metadata": {"internal_use_only": "Sensitive data"}, "created_by": "user_123456", "created_at": 1625078400, "updated_at": 1625164800}, "created_at": 1625078400, "updated_at": 1625164800}], "last_sign_in_at": 1622852400, "banned": false, "locked": false, "lockout_expires_in_seconds": null, "verification_attempts_remaining": 5, "updated_at": 1622852400, "created_at": 1609459200, "delete_self_enabled": true, "create_organization_enabled": true, "last_active_at": 1700690400000, "legal_accepted_at": 1700690400000} "400": application/json: {"errors": [{"message": "Invalid input", "long_message": "The input provided does not meet the requirements.", "code": "400_bad_request"}], "meta": {}} DeleteUserProfileImage: @@ -2056,7 +2173,7 @@ examples: user_id: "usr_test123" responses: "200": - application/json: {"id": "user_id_123", "object": "user", "external_id": "external_user_id_123", "primary_email_address_id": "email_id_123", "primary_phone_number_id": "phone_id_123", "primary_web3_wallet_id": "wallet_id_123", "username": "john_doe", "first_name": "John", "last_name": "Doe", "image_url": "https://example.com/new-profile.jpg", "has_image": true, "public_metadata": {"role": "admin"}, "private_metadata": {"ssn": "123-45-6789"}, "unsafe_metadata": {"theme": "dark"}, "email_addresses": [{"id": "email_id_123", "object": "email_address", "email_address": "john.doe@example.com", "reserved": false, "verification": {"object": "verification_ticket", "status": "verified", "strategy": "ticket", "attempts": null, "expire_at": null}, "linked_to": [{"type": "oauth_google", "id": "link_12345"}], "created_at": 1609459200, "updated_at": 1609459200}], "phone_numbers": [{"id": "phone_id_123", "object": "phone_number", "phone_number": "+12345678901", "reserved": false, "verification": {"object": "verification_otp", "status": "verified", "strategy": "email_code", "attempts": 1, "expire_at": 1615462399}, "linked_to": [{"type": "oauth_google", "id": "link_id_123"}], "created_at": 1609459200, "updated_at": 1609459200}], "web3_wallets": [{"id": "wallet_id_123", "object": "web3_wallet", "web3_wallet": "0x123456789abcdef", "verification": {"object": "verification_admin", "status": "verified", "strategy": "admin", "attempts": null, "expire_at": null}, "created_at": 1609459200, "updated_at": 1609459200}], "passkeys": [{"id": "passkey_id_123", "object": "passkey", "name": "My Passkey", "last_used_at": 1615852800, "verification": {"object": "verification_passkey", "status": "verified", "strategy": "passkey", "attempts": null, "expire_at": null}}], "password_enabled": true, "two_factor_enabled": true, "totp_enabled": true, "backup_code_enabled": true, "mfa_enabled_at": 1615852800, "mfa_disabled_at": null, "external_accounts": [{"object": "google_account", "id": "ext_account_id_123", "provider": "Facebook", "identification_id": "", "provider_user_id": "", "approved_scopes": "", "email_address": "Delphia91@gmail.com", "first_name": "Rodolfo", "last_name": "VonRueden", "public_metadata": {"key": ""}, "created_at": 437499, "updated_at": 230668, "verification": {"object": "verification_oauth", "status": "verified", "strategy": "oauth_google", "expire_at": 1615462399, "attempts": 1}, "user_id": "user_id_at_provider"}], "saml_accounts": [{"id": "saml_account_id_123", "object": "saml_account", "provider": "SAML Provider", "active": true, "email_address": "user@example.com", "public_metadata": {"department": "IT"}, "verification": {"object": "verification_saml", "status": "verified", "strategy": "saml", "external_verification_redirect_url": "https://example.com/saml_callback", "expire_at": 1622852400, "attempts": null}}], "last_sign_in_at": 1622852400, "banned": false, "locked": false, "lockout_expires_in_seconds": null, "verification_attempts_remaining": 5, "updated_at": 1622852400, "created_at": 1609459200, "delete_self_enabled": true, "create_organization_enabled": true, "last_active_at": 1700690400000, "legal_accepted_at": 1700690400000} + application/json: {"id": "user_id_123", "object": "user", "external_id": "external_user_id_123", "primary_email_address_id": "email_id_123", "primary_phone_number_id": "phone_id_123", "primary_web3_wallet_id": "wallet_id_123", "username": "john_doe", "first_name": "John", "last_name": "Doe", "image_url": "https://example.com/new-profile.jpg", "has_image": true, "public_metadata": {"role": "admin"}, "private_metadata": {"ssn": "123-45-6789"}, "unsafe_metadata": {"theme": "dark"}, "email_addresses": [{"id": "email_id_123", "object": "email_address", "email_address": "john.doe@example.com", "reserved": false, "verification": {"object": "verification_ticket", "status": "verified", "strategy": "ticket", "attempts": null, "expire_at": null}, "linked_to": [{"type": "oauth_google", "id": "link_12345"}], "created_at": 1609459200, "updated_at": 1609459200}], "phone_numbers": [{"id": "phone_id_123", "object": "phone_number", "phone_number": "+12345678901", "reserved": false, "verification": {"object": "verification_otp", "status": "verified", "strategy": "email_code", "attempts": 1, "expire_at": 1615462399}, "linked_to": [{"type": "oauth_google", "id": "link_id_123"}], "created_at": 1609459200, "updated_at": 1609459200}], "web3_wallets": [{"id": "wallet_id_123", "object": "web3_wallet", "web3_wallet": "0x123456789abcdef", "verification": {"object": "verification_admin", "status": "verified", "strategy": "admin", "attempts": null, "expire_at": null}, "created_at": 1609459200, "updated_at": 1609459200}], "passkeys": [{"id": "passkey_id_123", "object": "passkey", "name": "My Passkey", "last_used_at": 1615852800, "verification": {"object": "verification_passkey", "status": "verified", "strategy": "passkey", "attempts": null, "expire_at": null}}], "password_enabled": true, "two_factor_enabled": true, "totp_enabled": true, "backup_code_enabled": true, "mfa_enabled_at": 1615852800, "mfa_disabled_at": null, "external_accounts": [{"object": "google_account", "id": "ext_account_id_123", "provider": "Facebook", "identification_id": "", "provider_user_id": "", "approved_scopes": "", "email_address": "Delphia91@gmail.com", "first_name": "Rodolfo", "last_name": "VonRueden", "public_metadata": {"key": ""}, "created_at": 437499, "updated_at": 230668, "verification": {"object": "verification_oauth", "status": "verified", "strategy": "oauth_google", "expire_at": 1615462399, "attempts": 1}, "user_id": "user_id_at_provider"}], "saml_accounts": [{"id": "saml_account_id_123", "object": "saml_account", "provider": "SAML Provider", "active": true, "email_address": "user@example.com", "public_metadata": {"department": "IT"}, "verification": {"object": "verification_saml", "status": "verified", "strategy": "saml", "external_verification_redirect_url": "https://example.com/saml_callback", "expire_at": 1622852400, "attempts": null}}], "enterprise_accounts": [{"id": "", "object": "enterprise_account", "provider": "", "active": true, "email_address": "Cayla7@hotmail.com", "verification": {"object": "verification_oauth", "status": "expired", "strategy": "", "expire_at": 918977, "attempts": 437499}}], "organization_memberships": [{"id": "org_mem_123", "object": "organization_membership", "role": "member", "permissions": ["read", "write"], "public_metadata": {}, "private_metadata": {}, "organization": {"object": "organization", "id": "org_123", "name": "Acme Corp", "slug": "acme-corp", "has_image": true, "members_count": 150, "max_allowed_memberships": 300, "admin_delete_enabled": true, "public_metadata": {"public_info": "Info visible to everyone"}, "private_metadata": {"internal_use_only": "Sensitive data"}, "created_by": "user_123456", "created_at": 1625078400, "updated_at": 1625164800}, "created_at": 1625078400, "updated_at": 1625164800}], "last_sign_in_at": 1622852400, "banned": false, "locked": false, "lockout_expires_in_seconds": null, "verification_attempts_remaining": 5, "updated_at": 1622852400, "created_at": 1609459200, "delete_self_enabled": true, "create_organization_enabled": true, "last_active_at": 1700690400000, "legal_accepted_at": 1700690400000} "404": application/json: {"errors": [{"message": "Invalid input", "long_message": "The input provided does not meet the requirements.", "code": "400_bad_request"}], "meta": {}} UpdateUserMetadata: @@ -2066,7 +2183,7 @@ examples: user_id: "user_123456789" responses: "200": - application/json: {"id": "user_id_123", "object": "user", "external_id": "external_user_id_123", "primary_email_address_id": "email_id_123", "primary_phone_number_id": "phone_id_123", "primary_web3_wallet_id": "wallet_id_123", "username": "john_doe", "first_name": "John", "last_name": "Doe", "image_url": "https://example.com/new-profile.jpg", "has_image": true, "public_metadata": {"role": "admin"}, "private_metadata": {"ssn": "123-45-6789"}, "unsafe_metadata": {"theme": "dark"}, "email_addresses": [{"id": "email_id_123", "object": "email_address", "email_address": "john.doe@example.com", "reserved": false, "verification": {"object": "verification_otp", "status": "verified", "strategy": "email_code", "attempts": 1, "expire_at": 1615462399}, "linked_to": [{"type": "oauth_google", "id": "link_12345"}], "created_at": 1609459200, "updated_at": 1609459200}], "phone_numbers": [{"id": "phone_id_123", "object": "phone_number", "phone_number": "+12345678901", "reserved": false, "verification": {"object": "verification_otp", "status": "verified", "strategy": "email_code", "attempts": 1, "expire_at": 1615462399}, "linked_to": [{"type": "oauth_google", "id": "link_id_123"}], "created_at": 1609459200, "updated_at": 1609459200}], "web3_wallets": [{"id": "wallet_id_123", "object": "web3_wallet", "web3_wallet": "0x123456789abcdef", "verification": {"object": "verification_web3", "status": "verified", "strategy": "web3_metamask_signature", "attempts": null, "expire_at": null}, "created_at": 1609459200, "updated_at": 1609459200}], "passkeys": [{"id": "passkey_id_123", "object": "passkey", "name": "My Passkey", "last_used_at": 1615852800, "verification": {"object": "verification_passkey", "status": "verified", "strategy": "passkey", "attempts": null, "expire_at": null}}], "password_enabled": true, "two_factor_enabled": true, "totp_enabled": true, "backup_code_enabled": true, "mfa_enabled_at": 1615852800, "mfa_disabled_at": null, "external_accounts": [{"object": "facebook_account", "id": "ext_account_id_123", "provider": "Facebook", "identification_id": "", "provider_user_id": "", "approved_scopes": "", "email_address": "Florencio16@hotmail.com", "first_name": "Sherwood", "last_name": "Rice", "public_metadata": {"key": "", "key1": "", "key2": ""}, "created_at": 387756, "updated_at": 886972, "verification": {"object": "verification_google_one_tap", "status": "verified", "strategy": "google_one_tap", "expire_at": 1615462399, "attempts": 1}, "user_id": "user_id_at_provider"}], "saml_accounts": [{"id": "saml_account_id_123", "object": "saml_account", "provider": "SAML Provider", "active": true, "email_address": "user@example.com", "public_metadata": {"department": "IT"}, "verification": {"object": "verification_saml", "status": "verified", "strategy": "saml", "external_verification_redirect_url": "https://teeming-cod.org/", "expire_at": 887368, "attempts": null}}], "last_sign_in_at": 1622852400, "banned": false, "locked": false, "lockout_expires_in_seconds": null, "verification_attempts_remaining": 5, "updated_at": 1622852400, "created_at": 1609459200, "delete_self_enabled": true, "create_organization_enabled": true, "last_active_at": 1700690400000, "legal_accepted_at": 1700690400000} + application/json: {"id": "user_id_123", "object": "user", "external_id": "external_user_id_123", "primary_email_address_id": "email_id_123", "primary_phone_number_id": "phone_id_123", "primary_web3_wallet_id": "wallet_id_123", "username": "john_doe", "first_name": "John", "last_name": "Doe", "image_url": "https://example.com/new-profile.jpg", "has_image": true, "public_metadata": {"role": "admin"}, "private_metadata": {"ssn": "123-45-6789"}, "unsafe_metadata": {"theme": "dark"}, "email_addresses": [{"id": "email_id_123", "object": "email_address", "email_address": "john.doe@example.com", "reserved": false, "verification": {"object": "verification_otp", "status": "verified", "strategy": "email_code", "attempts": 1, "expire_at": 1615462399}, "linked_to": [{"type": "oauth_google", "id": "link_12345"}], "created_at": 1609459200, "updated_at": 1609459200}], "phone_numbers": [{"id": "phone_id_123", "object": "phone_number", "phone_number": "+12345678901", "reserved": false, "verification": {"object": "verification_otp", "status": "verified", "strategy": "email_code", "attempts": 1, "expire_at": 1615462399}, "linked_to": [{"type": "oauth_google", "id": "link_id_123"}], "created_at": 1609459200, "updated_at": 1609459200}], "web3_wallets": [{"id": "wallet_id_123", "object": "web3_wallet", "web3_wallet": "0x123456789abcdef", "verification": {"object": "verification_web3", "status": "verified", "strategy": "web3_metamask_signature", "attempts": null, "expire_at": null}, "created_at": 1609459200, "updated_at": 1609459200}], "passkeys": [{"id": "passkey_id_123", "object": "passkey", "name": "My Passkey", "last_used_at": 1615852800, "verification": {"object": "verification_passkey", "status": "verified", "strategy": "passkey", "attempts": null, "expire_at": null}}], "password_enabled": true, "two_factor_enabled": true, "totp_enabled": true, "backup_code_enabled": true, "mfa_enabled_at": 1615852800, "mfa_disabled_at": null, "external_accounts": [{"object": "facebook_account", "id": "ext_account_id_123", "provider": "Facebook", "identification_id": "", "provider_user_id": "", "approved_scopes": "", "email_address": "Florencio16@hotmail.com", "first_name": "Sherwood", "last_name": "Rice", "public_metadata": {"key": "", "key1": "", "key2": ""}, "created_at": 387756, "updated_at": 886972, "verification": {"object": "verification_google_one_tap", "status": "verified", "strategy": "google_one_tap", "expire_at": 1615462399, "attempts": 1}, "user_id": "user_id_at_provider"}], "saml_accounts": [{"id": "saml_account_id_123", "object": "saml_account", "provider": "SAML Provider", "active": true, "email_address": "user@example.com", "public_metadata": {"department": "IT"}, "verification": {"object": "verification_saml", "status": "verified", "strategy": "saml", "external_verification_redirect_url": "https://teeming-cod.org/", "expire_at": 887368, "attempts": null}}], "enterprise_accounts": [], "organization_memberships": [{"id": "org_mem_123", "object": "organization_membership", "role": "member", "permissions": ["read", "write"], "public_metadata": {}, "private_metadata": {}, "organization": {"object": "organization", "id": "org_123", "name": "Acme Corp", "slug": "acme-corp", "has_image": true, "members_count": 150, "max_allowed_memberships": 300, "admin_delete_enabled": true, "public_metadata": {"public_info": "Info visible to everyone"}, "private_metadata": {"internal_use_only": "Sensitive data"}, "created_by": "user_123456", "created_at": 1625078400, "updated_at": 1625164800}, "created_at": 1625078400, "updated_at": 1625164800}], "last_sign_in_at": 1622852400, "banned": false, "locked": false, "lockout_expires_in_seconds": null, "verification_attempts_remaining": 5, "updated_at": 1622852400, "created_at": 1609459200, "delete_self_enabled": true, "create_organization_enabled": true, "last_active_at": 1700690400000, "legal_accepted_at": 1700690400000} "400": application/json: {"errors": [{"message": "Invalid input", "long_message": "The input provided does not meet the requirements.", "code": "400_bad_request"}], "meta": {}} GetOAuthAccessToken: @@ -2106,7 +2223,7 @@ examples: offset: 10 responses: "200": - application/json: {"data": [{"object": "organization_invitation", "id": "", "email_address": "Zechariah88@gmail.com", "role": "", "role_name": "", "public_metadata": {}, "url": "https://serpentine-morning.net/", "expires_at": 762270, "created_at": 200458, "updated_at": 874805}], "total_count": 518000} + application/json: {"data": [{"object": "organization_invitation", "id": "", "email_address": "Zechariah88@gmail.com", "role": "", "role_name": "", "inviter_id": "", "public_metadata": {}, "url": "https://serpentine-morning.net/", "expires_at": 762270, "created_at": 200458, "updated_at": 874805}], "total_count": 518000} "400": application/json: {"errors": [{"message": "Invalid input", "long_message": "The input provided does not meet the requirements.", "code": "400_bad_request"}], "meta": {}} VerifyPassword: @@ -2266,7 +2383,7 @@ examples: offset: 10 responses: "200": - application/json: {"data": [{"object": "organization_invitation", "id": "", "email_address": "Jessyca43@gmail.com", "role": "", "role_name": "", "public_metadata": {"key": "", "key1": "", "key2": ""}, "url": "https://hopeful-opera.com", "expires_at": 284691, "created_at": 177802, "updated_at": 977122}], "total_count": 98446} + application/json: {"data": [{"object": "organization_invitation", "id": "", "email_address": "Jessyca43@gmail.com", "role": "", "role_name": "", "inviter_id": "", "public_metadata": {"key": "", "key1": "", "key2": ""}, "url": "https://hopeful-opera.com", "expires_at": 284691, "created_at": 177802, "updated_at": 977122}], "total_count": 98446} "400": application/json: {"errors": [{"message": "Invalid input", "long_message": "The input provided does not meet the requirements.", "code": "400_bad_request"}], "meta": {}} "500": @@ -2280,7 +2397,7 @@ examples: application/json: {"email_address": "user@example.com", "inviter_user_id": "user_67890", "role": "admin", "public_metadata": {"key": "value"}, "private_metadata": {"private_key": "secret_value"}, "redirect_url": "https://example.com/welcome"} responses: "200": - application/json: {"object": "organization_invitation", "id": "inv_12345", "email_address": "user@example.com", "role": "admin", "role_name": "", "organization_id": "org_12345", "status": "pending", "public_metadata": {"key": "value"}, "private_metadata": {"private_key": "secret_value"}, "url": "https://spirited-tentacle.net/", "expires_at": 942910, "created_at": 1622547600, "updated_at": 1622551200} + application/json: {"object": "organization_invitation", "id": "inv_12345", "email_address": "user@example.com", "role": "admin", "role_name": "", "organization_id": "org_12345", "inviter_id": "", "status": "pending", "public_metadata": {"key": "value"}, "private_metadata": {"private_key": "secret_value"}, "url": "https://spirited-tentacle.net/", "expires_at": 942910, "created_at": 1622547600, "updated_at": 1622551200} "400": application/json: {"errors": [{"message": "Invalid input", "long_message": "The input provided does not meet the requirements.", "code": "400_bad_request"}], "meta": {}} ListOrganizationInvitations: @@ -2294,7 +2411,7 @@ examples: order_by: "pending" responses: "200": - application/json: {"data": [{"object": "organization_invitation", "id": "inv_12345", "email_address": "user@example.com", "role": "member", "role_name": "", "organization_id": "org_12345", "status": "pending", "public_metadata": {"key": "value"}, "url": "https://utter-antelope.info/", "expires_at": 783375, "created_at": 1617981379, "updated_at": 1625581379}], "total_count": 10} + application/json: {"data": [{"object": "organization_invitation", "id": "inv_12345", "email_address": "user@example.com", "role": "member", "role_name": "", "organization_id": "org_12345", "inviter_id": "", "status": "pending", "public_metadata": {"key": "value"}, "url": "https://utter-antelope.info/", "expires_at": 783375, "created_at": 1617981379, "updated_at": 1625581379}], "total_count": 10} "400": application/json: {"errors": [{"message": "Invalid input", "long_message": "The input provided does not meet the requirements.", "code": "400_bad_request"}], "meta": {}} CreateOrganizationInvitationBulk: @@ -2306,7 +2423,7 @@ examples: application/json: [{"email_address": "newmember@example.com", "inviter_user_id": "user_67890", "role": "admin", "redirect_url": "https://example.com/welcome"}, {"email_address": "newmember@example.com", "inviter_user_id": "user_67890", "role": "admin", "redirect_url": "https://example.com/welcome"}] responses: "200": - application/json: {"data": [{"object": "organization_invitation", "id": "inv_12345", "email_address": "user@example.com", "role": "member", "role_name": "", "organization_id": "org_12345", "status": "pending", "public_metadata": {"key": "value"}, "url": "https://lumbering-litter.org", "expires_at": 140948, "created_at": 1617981379, "updated_at": 1625581379}], "total_count": 10} + application/json: {"data": [{"object": "organization_invitation", "id": "inv_12345", "email_address": "user@example.com", "role": "member", "role_name": "", "organization_id": "org_12345", "inviter_id": "", "status": "pending", "public_metadata": {"key": "value"}, "url": "https://lumbering-litter.org", "expires_at": 140948, "created_at": 1617981379, "updated_at": 1625581379}], "total_count": 10} "400": application/json: {"errors": [{"message": "Invalid input", "long_message": "The input provided does not meet the requirements.", "code": "400_bad_request"}], "meta": {}} ListPendingOrganizationInvitations: @@ -2331,7 +2448,7 @@ examples: offset: 10 responses: "200": - application/json: {"data": [{"object": "organization_invitation", "id": "inv_12345", "email_address": "user@example.com", "role": "member", "role_name": "", "organization_id": "org_12345", "status": "pending", "public_metadata": {"key": "value"}, "url": "https://junior-tribe.com", "expires_at": 713465, "created_at": 1617981379, "updated_at": 1625581379}], "total_count": 10} + application/json: {"data": [{"object": "organization_invitation", "id": "inv_12345", "email_address": "user@example.com", "role": "member", "role_name": "", "organization_id": "org_12345", "inviter_id": "", "status": "pending", "public_metadata": {"key": "value"}, "url": "https://junior-tribe.com", "expires_at": 713465, "created_at": 1617981379, "updated_at": 1625581379}], "total_count": 10} "400": application/json: {"errors": [{"message": "Invalid input", "long_message": "The input provided does not meet the requirements.", "code": "400_bad_request"}], "meta": {}} GetOrganizationInvitation: @@ -2342,7 +2459,7 @@ examples: invitation_id: "inv_987654321" responses: "200": - application/json: {"object": "organization_invitation", "id": "inv_12345", "email_address": "user@example.com", "role": "admin", "role_name": "", "organization_id": "org_12345", "status": "pending", "public_metadata": {"key": "value"}, "private_metadata": {"private_key": "secret_value"}, "url": "https://aggravating-unibody.info/", "expires_at": 828780, "created_at": 1622547600, "updated_at": 1622551200} + application/json: {"object": "organization_invitation", "id": "inv_12345", "email_address": "user@example.com", "role": "admin", "role_name": "", "organization_id": "org_12345", "inviter_id": "", "status": "pending", "public_metadata": {"key": "value"}, "private_metadata": {"private_key": "secret_value"}, "url": "https://aggravating-unibody.info/", "expires_at": 828780, "created_at": 1622547600, "updated_at": 1622551200} "400": application/json: {"errors": [{"message": "Invalid input", "long_message": "The input provided does not meet the requirements.", "code": "400_bad_request"}], "meta": {}} RevokeOrganizationInvitation: @@ -2355,7 +2472,7 @@ examples: application/json: {"requesting_user_id": "usr_12345"} responses: "200": - application/json: {"object": "organization_invitation", "id": "inv_12345", "email_address": "user@example.com", "role": "admin", "role_name": "", "organization_id": "org_12345", "status": "pending", "public_metadata": {"key": "value"}, "private_metadata": {"private_key": "secret_value"}, "url": "https://immense-arcade.info/", "expires_at": 147884, "created_at": 1622547600, "updated_at": 1622551200} + application/json: {"object": "organization_invitation", "id": "inv_12345", "email_address": "user@example.com", "role": "admin", "role_name": "", "organization_id": "org_12345", "inviter_id": null, "status": "pending", "public_metadata": {"key": "value"}, "private_metadata": {"private_key": "secret_value"}, "url": "https://immense-arcade.info/", "expires_at": 147884, "created_at": 1622547600, "updated_at": 1622551200} "400": application/json: {"errors": [{"message": "Invalid input", "long_message": "The input provided does not meet the requirements.", "code": "400_bad_request"}], "meta": {}} ListAllowlistIdentifiers: @@ -2417,7 +2534,7 @@ examples: UpdateInstanceAuthConfig: speakeasy-default-update-instance-auth-config: requestBody: - application/json: {"restricted_to_allowlist": false, "from_email_address": "noreply", "progressive_sign_up": true, "enhanced_email_deliverability": true, "test_mode": true} + application/json: {"restricted_to_allowlist": false, "from_email_address": "noreply", "progressive_sign_up": true, "test_mode": true} responses: "200": application/json: {"object": "instance_settings", "id": "inst_123456789", "restricted_to_allowlist": false, "from_email_address": "noreply@clerk.dev", "progressive_sign_up": true, "enhanced_email_deliverability": true} @@ -2493,7 +2610,7 @@ examples: UpdateInstance: speakeasy-default-update-instance: requestBody: - application/json: {"test_mode": true, "hibp": false, "enhanced_email_deliverability": true, "support_email": "support@example.com", "clerk_js_version": "2.3.1", "development_origin": "http://localhost:3000", "allowed_origins": ["http://localhost:3000", "chrome-extension://extension_uiid", "capacitor://localhost"], "url_based_session_syncing": true} + application/json: {"test_mode": true, "hibp": false, "support_email": "support@example.com", "clerk_js_version": "2.3.1", "development_origin": "http://localhost:3000", "allowed_origins": ["http://localhost:3000", "chrome-extension://extension_uiid", "capacitor://localhost"], "url_based_session_syncing": true} responses: "422": application/json: {"errors": [{"message": "Invalid input", "long_message": "The input provided does not meet the requirements.", "code": "400_bad_request"}], "meta": {}} @@ -3100,7 +3217,7 @@ examples: application/json: {"user_ids": ["", "", ""]} responses: "200": - application/json: [{"id": "user_id_123", "object": "user", "external_id": "external_user_id_123", "primary_email_address_id": "email_id_123", "primary_phone_number_id": "phone_id_123", "primary_web3_wallet_id": "wallet_id_123", "username": "john_doe", "first_name": "John", "last_name": "Doe", "image_url": "https://example.com/new-profile.jpg", "has_image": true, "public_metadata": {"role": "admin"}, "private_metadata": {"ssn": "123-45-6789"}, "unsafe_metadata": {"theme": "dark"}, "email_addresses": [{"id": "email_id_123", "object": "email_address", "email_address": "john.doe@example.com", "reserved": false, "verification": {"object": "verification_ticket", "status": "verified", "strategy": "ticket", "attempts": 91086, "expire_at": 708739}, "linked_to": [{"type": "oauth_google", "id": "link_12345"}], "created_at": 1609459200, "updated_at": 1609459200}], "phone_numbers": [{"id": "phone_id_123", "object": "phone_number", "phone_number": "+12345678901", "reserved": false, "verification": {"object": "verification_otp", "status": "unverified", "strategy": "phone_code", "attempts": 893614, "expire_at": 350529}, "linked_to": [{"type": "oauth_google", "id": "link_id_123"}], "created_at": 1609459200, "updated_at": 1609459200}], "web3_wallets": [{"id": "wallet_id_123", "object": "web3_wallet", "web3_wallet": "0x123456789abcdef", "verification": {"object": "verification_admin", "status": "verified", "strategy": "admin", "attempts": 404836, "expire_at": 750499}, "created_at": 1609459200, "updated_at": 1609459200}], "passkeys": [{"id": "passkey_id_123", "object": "passkey", "name": "My Passkey", "last_used_at": 1615852800, "verification": {"object": "verification_passkey", "status": "verified", "strategy": "passkey", "attempts": null, "expire_at": 763042}}], "password_enabled": true, "two_factor_enabled": true, "totp_enabled": true, "backup_code_enabled": true, "mfa_enabled_at": 1615852800, "mfa_disabled_at": null, "external_accounts": [{"object": "external_account", "id": "ext_account_id_123", "provider": "Facebook", "identification_id": "", "provider_user_id": "", "approved_scopes": "", "email_address": "Jocelyn87@gmail.com", "first_name": "Dedrick", "last_name": "Goyette", "public_metadata": {"key": "", "key1": "", "key2": ""}, "created_at": 444185, "updated_at": 561917, "verification": {"object": "verification_oauth", "status": "expired", "strategy": "", "expire_at": 908602, "attempts": 295268}, "user_id": "user_id_at_provider"}], "saml_accounts": [{"id": "saml_account_id_123", "object": "saml_account", "provider": "SAML Provider", "active": true, "email_address": "user@example.com", "public_metadata": {"department": "IT"}, "verification": {"object": "verification_ticket", "status": "verified", "strategy": "ticket", "attempts": null, "expire_at": null}}], "last_sign_in_at": 1622852400, "banned": false, "locked": false, "lockout_expires_in_seconds": null, "verification_attempts_remaining": 5, "updated_at": 1622852400, "created_at": 1609459200, "delete_self_enabled": true, "create_organization_enabled": true, "last_active_at": 1700690400000, "legal_accepted_at": 1700690400000}] + application/json: [{"id": "user_id_123", "object": "user", "external_id": "external_user_id_123", "primary_email_address_id": "email_id_123", "primary_phone_number_id": "phone_id_123", "primary_web3_wallet_id": "wallet_id_123", "username": "john_doe", "first_name": "John", "last_name": "Doe", "image_url": "https://example.com/new-profile.jpg", "has_image": true, "public_metadata": {"role": "admin"}, "private_metadata": {"ssn": "123-45-6789"}, "unsafe_metadata": {"theme": "dark"}, "email_addresses": [{"id": "email_id_123", "object": "email_address", "email_address": "john.doe@example.com", "reserved": false, "verification": {"object": "verification_ticket", "status": "verified", "strategy": "ticket", "attempts": 91086, "expire_at": 708739}, "linked_to": [{"type": "oauth_google", "id": "link_12345"}], "created_at": 1609459200, "updated_at": 1609459200}], "phone_numbers": [{"id": "phone_id_123", "object": "phone_number", "phone_number": "+12345678901", "reserved": false, "verification": {"object": "verification_otp", "status": "unverified", "strategy": "phone_code", "attempts": 893614, "expire_at": 350529}, "linked_to": [{"type": "oauth_google", "id": "link_id_123"}], "created_at": 1609459200, "updated_at": 1609459200}], "web3_wallets": [{"id": "wallet_id_123", "object": "web3_wallet", "web3_wallet": "0x123456789abcdef", "verification": {"object": "verification_admin", "status": "verified", "strategy": "admin", "attempts": 404836, "expire_at": 750499}, "created_at": 1609459200, "updated_at": 1609459200}], "passkeys": [{"id": "passkey_id_123", "object": "passkey", "name": "My Passkey", "last_used_at": 1615852800, "verification": {"object": "verification_passkey", "status": "verified", "strategy": "passkey", "attempts": null, "expire_at": 763042}}], "password_enabled": true, "two_factor_enabled": true, "totp_enabled": true, "backup_code_enabled": true, "mfa_enabled_at": 1615852800, "mfa_disabled_at": null, "external_accounts": [{"object": "external_account", "id": "ext_account_id_123", "provider": "Facebook", "identification_id": "", "provider_user_id": "", "approved_scopes": "", "email_address": "Jocelyn87@gmail.com", "first_name": "Dedrick", "last_name": "Goyette", "public_metadata": {"key": "", "key1": "", "key2": ""}, "created_at": 444185, "updated_at": 561917, "verification": {"object": "verification_oauth", "status": "expired", "strategy": "", "expire_at": 908602, "attempts": 295268}, "user_id": "user_id_at_provider"}], "saml_accounts": [{"id": "saml_account_id_123", "object": "saml_account", "provider": "SAML Provider", "active": true, "email_address": "user@example.com", "public_metadata": {"department": "IT"}, "verification": {"object": "verification_ticket", "status": "verified", "strategy": "ticket", "attempts": null, "expire_at": null}}], "enterprise_accounts": [{"id": "", "object": "enterprise_account", "provider": "", "active": false, "email_address": "Horacio_Gutkowski3@yahoo.com", "verification": null}], "last_sign_in_at": 1622852400, "banned": false, "locked": false, "lockout_expires_in_seconds": null, "verification_attempts_remaining": 5, "updated_at": 1622852400, "created_at": 1609459200, "delete_self_enabled": true, "create_organization_enabled": true, "last_active_at": 1700690400000, "legal_accepted_at": 1700690400000}] "400": application/json: {"errors": [{"message": "Invalid input", "long_message": "The input provided does not meet the requirements.", "code": "400_bad_request"}], "meta": {}} UsersUnban: @@ -3109,7 +3226,7 @@ examples: application/json: {"user_ids": ["", "", ""]} responses: "200": - application/json: [{"id": "user_id_123", "object": "user", "external_id": "external_user_id_123", "primary_email_address_id": "email_id_123", "primary_phone_number_id": "phone_id_123", "primary_web3_wallet_id": "wallet_id_123", "username": "john_doe", "first_name": "John", "last_name": "Doe", "image_url": "https://example.com/new-profile.jpg", "has_image": true, "public_metadata": {"role": "admin"}, "private_metadata": {"ssn": "123-45-6789"}, "unsafe_metadata": {"theme": "dark"}, "email_addresses": [{"id": "email_id_123", "object": "email_address", "email_address": "john.doe@example.com", "reserved": false, "verification": {"object": "verification_admin", "status": "verified", "strategy": "admin", "attempts": 932013, "expire_at": 43591}, "linked_to": [{"type": "oauth_google", "id": "link_12345"}], "created_at": 1609459200, "updated_at": 1609459200}], "phone_numbers": [{"id": "phone_id_123", "object": "phone_number", "phone_number": "+12345678901", "reserved": false, "verification": {"object": "verification_admin", "status": "verified", "strategy": "admin", "attempts": 166995, "expire_at": 1094}, "linked_to": [{"type": "oauth_google", "id": "link_id_123"}], "created_at": 1609459200, "updated_at": 1609459200}], "web3_wallets": [{"id": "wallet_id_123", "object": "web3_wallet", "web3_wallet": "0x123456789abcdef", "verification": {"object": "verification_web3", "status": "verified", "strategy": "web3_metamask_signature", "attempts": 503363, "expire_at": 794368}, "created_at": 1609459200, "updated_at": 1609459200}], "passkeys": [{"id": "passkey_id_123", "object": "passkey", "name": "My Passkey", "last_used_at": 1615852800, "verification": {"object": "verification_passkey", "status": "verified", "strategy": "passkey", "attempts": 602166, "expire_at": 755931}}], "password_enabled": true, "two_factor_enabled": true, "totp_enabled": true, "backup_code_enabled": true, "mfa_enabled_at": 1615852800, "mfa_disabled_at": null, "external_accounts": [{"object": "external_account", "id": "ext_account_id_123", "provider": "Facebook", "identification_id": "", "provider_user_id": "", "approved_scopes": "", "email_address": "Eldred_Rutherford@hotmail.com", "first_name": "Paolo", "last_name": "Lemke", "public_metadata": {"key": "", "key1": ""}, "created_at": 168269, "updated_at": 632850, "verification": {"object": "verification_google_one_tap", "status": "unverified", "strategy": "google_one_tap", "expire_at": 327595, "attempts": 512315}, "user_id": "user_id_at_provider"}], "saml_accounts": [{"id": "saml_account_id_123", "object": "saml_account", "provider": "SAML Provider", "active": true, "email_address": "user@example.com", "public_metadata": {"department": "IT"}, "verification": {"object": "verification_ticket", "status": "unverified", "strategy": "ticket", "attempts": 288253, "expire_at": 640467}}], "last_sign_in_at": 1622852400, "banned": false, "locked": false, "lockout_expires_in_seconds": null, "verification_attempts_remaining": 5, "updated_at": 1622852400, "created_at": 1609459200, "delete_self_enabled": true, "create_organization_enabled": true, "last_active_at": 1700690400000, "legal_accepted_at": 1700690400000}] + application/json: [{"id": "user_id_123", "object": "user", "external_id": "external_user_id_123", "primary_email_address_id": "email_id_123", "primary_phone_number_id": "phone_id_123", "primary_web3_wallet_id": "wallet_id_123", "username": "john_doe", "first_name": "John", "last_name": "Doe", "image_url": "https://example.com/new-profile.jpg", "has_image": true, "public_metadata": {"role": "admin"}, "private_metadata": {"ssn": "123-45-6789"}, "unsafe_metadata": {"theme": "dark"}, "email_addresses": [{"id": "email_id_123", "object": "email_address", "email_address": "john.doe@example.com", "reserved": false, "verification": {"object": "verification_admin", "status": "verified", "strategy": "admin", "attempts": 932013, "expire_at": 43591}, "linked_to": [{"type": "oauth_google", "id": "link_12345"}], "created_at": 1609459200, "updated_at": 1609459200}], "phone_numbers": [{"id": "phone_id_123", "object": "phone_number", "phone_number": "+12345678901", "reserved": false, "verification": {"object": "verification_admin", "status": "verified", "strategy": "admin", "attempts": 166995, "expire_at": 1094}, "linked_to": [{"type": "oauth_google", "id": "link_id_123"}], "created_at": 1609459200, "updated_at": 1609459200}], "web3_wallets": [{"id": "wallet_id_123", "object": "web3_wallet", "web3_wallet": "0x123456789abcdef", "verification": {"object": "verification_web3", "status": "verified", "strategy": "web3_metamask_signature", "attempts": 503363, "expire_at": 794368}, "created_at": 1609459200, "updated_at": 1609459200}], "passkeys": [{"id": "passkey_id_123", "object": "passkey", "name": "My Passkey", "last_used_at": 1615852800, "verification": {"object": "verification_passkey", "status": "verified", "strategy": "passkey", "attempts": 602166, "expire_at": 755931}}], "password_enabled": true, "two_factor_enabled": true, "totp_enabled": true, "backup_code_enabled": true, "mfa_enabled_at": 1615852800, "mfa_disabled_at": null, "external_accounts": [{"object": "external_account", "id": "ext_account_id_123", "provider": "Facebook", "identification_id": "", "provider_user_id": "", "approved_scopes": "", "email_address": "Eldred_Rutherford@hotmail.com", "first_name": "Paolo", "last_name": "Lemke", "public_metadata": {"key": "", "key1": ""}, "created_at": 168269, "updated_at": 632850, "verification": {"object": "verification_google_one_tap", "status": "unverified", "strategy": "google_one_tap", "expire_at": 327595, "attempts": 512315}, "user_id": "user_id_at_provider"}], "saml_accounts": [{"id": "saml_account_id_123", "object": "saml_account", "provider": "SAML Provider", "active": true, "email_address": "user@example.com", "public_metadata": {"department": "IT"}, "verification": {"object": "verification_ticket", "status": "unverified", "strategy": "ticket", "attempts": 288253, "expire_at": 640467}}], "enterprise_accounts": [{"id": "", "object": "enterprise_account", "provider": "", "active": true, "email_address": "Toni_Baumbach33@yahoo.com", "verification": {"object": "verification_ticket", "status": "unverified", "strategy": "ticket", "attempts": 332407, "expire_at": 503363}}], "last_sign_in_at": 1622852400, "banned": false, "locked": false, "lockout_expires_in_seconds": null, "verification_attempts_remaining": 5, "updated_at": 1622852400, "created_at": 1609459200, "delete_self_enabled": true, "create_organization_enabled": true, "last_active_at": 1700690400000, "legal_accepted_at": 1700690400000}] "400": application/json: {"errors": [{"message": "Invalid input", "long_message": "The input provided does not meet the requirements.", "code": "400_bad_request"}], "meta": {}} CreateMachineToken: @@ -3478,6 +3595,133 @@ examples: application/json: {"errors": [{"message": "Invalid input", "long_message": "The input provided does not meet the requirements.", "code": "400_bad_request"}], "meta": {}} "500": application/json: {"errors": [{"message": "Invalid input", "long_message": "The input provided does not meet the requirements.", "code": "400_bad_request"}], "meta": {}} + ListOrganizationRoles: + speakeasy-default-list-organization-roles: + parameters: + query: + order_by: "-created_at" + limit: 20 + offset: 10 + responses: + "200": + application/json: {"data": [{"object": "role", "id": "", "name": "", "key": "", "description": "oh zowie hmph writ hence quarrel frizz that why", "is_creator_eligible": false, "permissions": [], "created_at": 194338, "updated_at": 321738}], "total_count": 825827} + "400": + application/json: {"errors": [{"message": "Invalid input", "long_message": "The input provided does not meet the requirements.", "code": "400_bad_request"}], "meta": {}} + CreateOrganizationRole: + speakeasy-default-create-organization-role: + requestBody: + application/json: {"name": "", "key": ""} + responses: + "200": + application/json: {"object": "role", "id": "", "name": "", "key": "", "description": null, "is_creator_eligible": true, "permissions": [{"object": "permission", "id": "", "name": "", "key": "", "description": "concentration because artistic phew", "type": "", "created_at": 550874, "updated_at": 81669}], "created_at": 260585, "updated_at": 937993} + "400": + application/json: {"errors": [{"message": "Invalid input", "long_message": "The input provided does not meet the requirements.", "code": "400_bad_request"}], "meta": {}} + GetOrganizationRole: + speakeasy-default-get-organization-role: + parameters: + path: + organization_role_id: "" + responses: + "200": + application/json: {"object": "role", "id": "", "name": "", "key": "", "description": "reapply unsightly to", "is_creator_eligible": false, "permissions": [{"object": "permission", "id": "", "name": "", "key": "", "description": "tightly gah vacantly", "type": "", "created_at": 397058, "updated_at": 333597}], "created_at": 919999, "updated_at": 840898} + "401": + application/json: {"errors": [{"message": "Invalid input", "long_message": "The input provided does not meet the requirements.", "code": "400_bad_request"}], "meta": {}} + UpdateOrganizationRole: + speakeasy-default-update-organization-role: + parameters: + path: + organization_role_id: "" + requestBody: + application/json: {} + responses: + "200": + application/json: {"object": "role", "id": "", "name": "", "key": "", "description": "pricey terribly topsail", "is_creator_eligible": true, "permissions": [{"object": "permission", "id": "", "name": "", "key": "", "description": "minus amendment zowie from finally polarisation unsightly", "type": "", "created_at": 112204, "updated_at": 385324}], "created_at": 741873, "updated_at": 771959} + "400": + application/json: {"errors": [{"message": "Invalid input", "long_message": "The input provided does not meet the requirements.", "code": "400_bad_request"}], "meta": {}} + DeleteOrganizationRole: + speakeasy-default-delete-organization-role: + parameters: + path: + organization_role_id: "" + responses: + "200": + application/json: {"object": "deleted_object", "id": "deleted_object_id_example", "slug": "deleted-object-slug", "deleted": true} + "401": + application/json: {"errors": [{"message": "Invalid input", "long_message": "The input provided does not meet the requirements.", "code": "400_bad_request"}], "meta": {}} + AssignPermissionToOrganizationRole: + speakeasy-default-assign-permission-to-organization-role: + parameters: + path: + organization_role_id: "" + permission_id: "" + responses: + "200": + application/json: {"object": "role", "id": "", "name": "", "key": "", "description": "sanity likely smooth jaggedly across yuck hungrily whoa maintainer", "is_creator_eligible": false, "permissions": [{"object": "permission", "id": "", "name": "", "key": "", "description": "after opposite phooey yet floss unto", "type": "", "created_at": 23570, "updated_at": 24655}], "created_at": 575134, "updated_at": 255370} + "401": + application/json: {"errors": [{"message": "Invalid input", "long_message": "The input provided does not meet the requirements.", "code": "400_bad_request"}], "meta": {}} + RemovePermissionFromOrganizationRole: + speakeasy-default-remove-permission-from-organization-role: + parameters: + path: + organization_role_id: "" + permission_id: "" + responses: + "200": + application/json: {"object": "role", "id": "", "name": "", "key": "", "description": "up sunny mechanically pish", "is_creator_eligible": true, "permissions": [{"object": "permission", "id": "", "name": "", "key": "", "description": "furthermore individual scope selfishly intently degenerate supposing", "type": "", "created_at": 980881, "updated_at": 32956}], "created_at": 586902, "updated_at": 267150} + "401": + application/json: {"errors": [{"message": "Invalid input", "long_message": "The input provided does not meet the requirements.", "code": "400_bad_request"}], "meta": {}} + ListOrganizationPermissions: + speakeasy-default-list-organization-permissions: + parameters: + query: + limit: 20 + offset: 10 + responses: + "200": + application/json: {"data": [{"object": "permission", "id": "", "name": "", "key": "", "description": "altruistic selfishly yowza lawful distinct", "type": "", "created_at": 317621, "updated_at": 992384}], "total_count": 994443} + "401": + application/json: {"errors": [{"message": "Invalid input", "long_message": "The input provided does not meet the requirements.", "code": "400_bad_request"}], "meta": {}} + CreateOrganizationPermission: + speakeasy-default-create-organization-permission: + requestBody: + application/json: {"name": "", "key": ""} + responses: + "200": + application/json: {"object": "permission", "id": "", "name": "", "key": "", "description": "descent information whereas settler while publicity like", "type": "", "created_at": 352062, "updated_at": 214747} + "400": + application/json: {"errors": [{"message": "Invalid input", "long_message": "The input provided does not meet the requirements.", "code": "400_bad_request"}], "meta": {}} + GetOrganizationPermission: + speakeasy-default-get-organization-permission: + parameters: + path: + permission_id: "" + responses: + "200": + application/json: {"object": "permission", "id": "", "name": "", "key": "", "description": "duh instead among amongst monumental", "type": "", "created_at": 871460, "updated_at": 548281} + "401": + application/json: {"errors": [{"message": "Invalid input", "long_message": "The input provided does not meet the requirements.", "code": "400_bad_request"}], "meta": {}} + UpdateOrganizationPermission: + speakeasy-default-update-organization-permission: + parameters: + path: + permission_id: "" + requestBody: + application/json: {} + responses: + "200": + application/json: {"object": "permission", "id": "", "name": "", "key": "", "description": "nor that save before oof and far inside", "type": "", "created_at": 124, "updated_at": 695047} + "400": + application/json: {"errors": [{"message": "Invalid input", "long_message": "The input provided does not meet the requirements.", "code": "400_bad_request"}], "meta": {}} + DeleteOrganizationPermission: + speakeasy-default-delete-organization-permission: + parameters: + path: + permission_id: "" + responses: + "200": + application/json: {"object": "deleted_object", "id": "deleted_object_id_example", "slug": "deleted-object-slug", "deleted": true} + "401": + application/json: {"errors": [{"message": "Invalid input", "long_message": "The input provided does not meet the requirements.", "code": "400_bad_request"}], "meta": {}} examplesVersion: 1.0.2 generatedTests: {} -releaseNotes: "## Csharp SDK Changes Detected:\n* `ClerkBackendApi.ActorTokens.Create()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.PhoneNumbers.Create()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.Clients.List()`: \n * `response.[].LastAuthenticationStrategy` **Added**\n * `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.EmailAddresses.Create()`: \n * `response.verification` **Changed** **Breaking** :warning:\n * `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.EmailAddresses.Get()`: \n * `response.verification` **Changed** **Breaking** :warning:\n * `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.Commerce.CancelSubscriptionItem()`: \n * `response` **Changed** **Breaking** :warning:\n * `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.Commerce.ListSubscriptionItems()`: \n * `request` **Changed** **Breaking** :warning:\n * `response.data.[]` **Changed** **Breaking** :warning:\n * `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.Commerce.ListPlans()`: \n * `response.data.[]` **Changed** **Breaking** :warning:\n * `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.WaitlistEntries.Reject()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.EmailAddresses.Delete()`: \n * `response.externalId` **Added**\n * `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.EmailAddresses.Update()`: \n * `response.verification` **Changed** **Breaking** :warning:\n * `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.ActorTokens.Revoke()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.PhoneNumbers.Get()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.PhoneNumbers.Delete()`: \n * `response.externalId` **Added**\n * `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.PhoneNumbers.Update()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.Sessions.List()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.Sessions.Create()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.Sessions.Get()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.Sessions.Refresh()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.Sessions.Revoke()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.Sessions.CreateToken()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.Sessions.CreateTokenFromTemplate()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.EmailSmsTemplates.List()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.EmailSmsTemplates.Get()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.EmailSmsTemplates.Revert()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.EmailSmsTemplates.ToggleTemplateDelivery()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.EmailAndSmsTemplates.Upsert()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.Templates.Preview()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.Users.List()`: \n * `response.[]` **Changed** **Breaking** :warning:\n * `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.Users.Create()`: \n * `request.Locale` **Added**\n * `response` **Changed** **Breaking** :warning:\n * `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.Users.Count()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.Users.Get()`: \n * `response` **Changed** **Breaking** :warning:\n * `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.Users.Update()`: \n * `requestBody.Locale` **Added**\n * `response` **Changed** **Breaking** :warning:\n * `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.Users.Delete()`: \n * `response.externalId` **Added**\n * `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.Users.Ban()`: \n * `response` **Changed** **Breaking** :warning:\n * `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.Users.Unban()`: \n * `response` **Changed** **Breaking** :warning:\n * `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.Users.BulkBan()`: \n * `response.[]` **Changed** **Breaking** :warning:\n * `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.Users.BulkUnban()`: \n * `response.[]` **Changed** **Breaking** :warning:\n * `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.Users.Lock()`: \n * `response` **Changed** **Breaking** :warning:\n * `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.Users.Unlock()`: \n * `response` **Changed** **Breaking** :warning:\n * `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.Users.SetProfileImage()`: \n * `response` **Changed** **Breaking** :warning:\n * `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.Users.DeleteProfileImage()`: \n * `response` **Changed** **Breaking** :warning:\n * `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.Users.UpdateMetadata()`: \n * `response` **Changed** **Breaking** :warning:\n * `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.Users.GetBillingSubscription()`: \n * `response` **Changed** **Breaking** :warning:\n * `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.Users.GetOAuthAccessToken()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.Users.GetOrganizationMemberships()`: \n * `response.data.[].PublicUserData.Username` **Added**\n * `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.Users.GetOrganizationInvitations()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.Users.VerifyPassword()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.Users.VerifyTotp()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.Users.DisableMfa()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.Users.DeleteBackupCodes()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.Users.DeletePasskey()`: \n * `response.externalId` **Added**\n * `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.Users.DeleteWeb3Wallet()`: \n * `response.externalId` **Added**\n * `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.Users.DeleteTotp()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.Users.DeleteExternalAccount()`: \n * `response.externalId` **Added**\n * `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.Users.GetInstanceOrganizationMemberships()`: \n * `response.data.[].PublicUserData.Username` **Added**\n * `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.Invitations.Create()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.Invitations.BulkCreate()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.Invitations.Revoke()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.OrganizationInvitations.GetAll()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.OrganizationInvitations.Create()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.OrganizationInvitations.List()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.Domains.Add()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.OrganizationInvitations.ListPending()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.OrganizationInvitations.Get()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.OrganizationInvitations.Revoke()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.AllowlistIdentifiers.List()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.AllowlistIdentifiers.Create()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.AllowlistIdentifiers.Delete()`: \n * `response.externalId` **Added**\n * `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.BlocklistIdentifiers.List()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.BlocklistIdentifiers.Create()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.BlocklistIdentifiers.Delete()`: \n * `response.externalId` **Added**\n * `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.BetaFeatures.UpdateInstanceSettings()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.BetaFeatures.UpdateProductionInstanceDomain()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.Clients.Get()`: \n * `response.lastAuthenticationStrategy` **Added**\n * `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.Clients.Verify()`: \n * `response.lastAuthenticationStrategy` **Added**\n * `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.OrganizationInvitations.BulkCreate()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.Domains.Delete()`: \n * `response.externalId` **Added**\n * `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.Domains.Update()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.InstanceSettings.Update()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.InstanceSettings.UpdateRestrictions()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.InstanceSettings.ChangeDomain()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.InstanceSettings.UpdateOrganizationSettings()`: \n * `request.SlugDisabled` **Added**\n * `response` **Changed**\n * `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.Webhooks.CreateSvixApp()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.Webhooks.DeleteSvixApp()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.Webhooks.GenerateSvixAuthUrl()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.JwtTemplates.Create()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.JwtTemplates.Get()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.JwtTemplates.Update()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.JwtTemplates.Delete()`: \n * `response.externalId` **Added**\n * `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.Machines.List()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.Machines.Create()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.Machines.Get()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.Machines.Update()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.Machines.Delete()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.Machines.GetSecretKey()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.Machines.RotateSecretKey()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.Machines.CreateScope()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.Machines.DeleteScope()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.Organizations.List()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.Organizations.Create()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.Organizations.Get()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.Organizations.Update()`: `error` **Changed** **Breaking** :warning:\n* `ClerkBackendApi.Organizations.Delete()`: \n * `response.externalId` **Added**\n * `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.Organizations.MergeMetadata()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.Organizations.UploadLogo()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.Organizations.DeleteLogo()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.Organizations.GetBillingSubscription()`: \n * `response` **Changed** **Breaking** :warning:\n * `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.OrganizationMemberships.Create()`: \n * `response.publicUserData.Username` **Added**\n * `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.OrganizationMemberships.List()`: \n * `response.data.[].PublicUserData.Username` **Added**\n * `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.OrganizationMemberships.Update()`: \n * `response.publicUserData.Username` **Added**\n * `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.OrganizationMemberships.Delete()`: \n * `response.publicUserData.Username` **Added**\n * `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.OrganizationMemberships.UpdateMetadata()`: \n * `response.publicUserData.Username` **Added**\n * `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.OrganizationDomains.Create()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.OrganizationDomains.List()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.OrganizationDomains.Update()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.OrganizationDomains.Delete()`: \n * `response.externalId` **Added**\n * `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.OrganizationDomains.ListAll()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.ProxyChecks.Verify()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.RedirectUrls.Create()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.RedirectUrls.Get()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.RedirectUrls.Delete()`: \n * `response.externalId` **Added**\n * `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.SignInTokens.Create()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.SignInTokens.Revoke()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.SignUps.Get()`: \n * `response.locale` **Added**\n * `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.SignUps.Update()`: \n * `response.locale` **Added**\n * `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.OauthApplications.List()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.OauthApplications.Create()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.OauthApplications.Get()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.OauthApplications.Update()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.OauthApplications.Delete()`: \n * `response.externalId` **Added**\n * `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.OauthApplications.RotateSecret()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.SamlConnections.List()`: \n * `response.data.[]` **Changed**\n * `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.SamlConnections.Create()`: \n * `request` **Changed**\n * `response` **Changed**\n * `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.SamlConnections.Get()`: \n * `response` **Changed**\n * `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.SamlConnections.Update()`: \n * `requestBody.ForceAuthn` **Added**\n * `response` **Changed**\n * `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.SamlConnections.Delete()`: \n * `response.externalId` **Added**\n * `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.WaitlistEntries.Create()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.WaitlistEntries.Delete()`: \n * `response.externalId` **Added**\n * `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.WaitlistEntries.Invite()`: `errors.[].ClerkTraceId` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.Billing.GetStatementPaymentAttempts()`: **Added**\n* `ClerkBackendApi.Billing.GetStatement()`: **Added**\n* `ClerkBackendApi.Billing.ListStatements()`: **Added**\n* `ClerkBackendApi.Billing.ExtendSubscriptionItemFreeTrial()`: **Added**\n* `ClerkBackendApi.AwsCredentials.Delete()`: **Deleted** **Breaking** :warning:\n* `ClerkBackendApi.AwsCredentials.Update()`: **Deleted** **Breaking** :warning:\n* `ClerkBackendApi.ExperimentalAccountlessApplications.Create()`: **Deleted** **Breaking** :warning:\n* `ClerkBackendApi.ExperimentalAccountlessApplications.Complete()`: **Deleted** **Breaking** :warning:\n* `ClerkBackendApi.Commerce.ExtendSubscriptionItemFreeTrial()`: **Deleted** **Breaking** :warning:\n" +releaseNotes: "## Csharp SDK Changes:\n* `ClerkBackendApi.BetaFeatures.UpdateInstanceSettings()`: \n * `request.EnhancedEmailDeliverability` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.InstanceSettings.Update()`: \n * `request.EnhancedEmailDeliverability` **Removed** **Breaking** :warning:\n* `ClerkBackendApi.OrganizationPermissions.Delete()`: **Added**\n* `ClerkBackendApi.Organizations.Update()`: `response.lastActiveAt` **Added**\n* `ClerkBackendApi.OrganizationRoles.Delete()`: **Added**\n* `ClerkBackendApi.OrganizationRoles.AssignPermission()`: **Added**\n* `ClerkBackendApi.OrganizationRoles.RemovePermission()`: **Added**\n* `ClerkBackendApi.Billing.ListPlans()`: **Added**\n* `ClerkBackendApi.Billing.ListSubscriptionItems()`: **Added**\n* `ClerkBackendApi.Users.DeleteProfileImage()`: `response` **Changed**\n* `ClerkBackendApi.OrganizationPermissions.List()`: **Added**\n* `ClerkBackendApi.OrganizationPermissions.Create()`: **Added**\n* `ClerkBackendApi.OrganizationPermissions.Get()`: **Added**\n* `ClerkBackendApi.OrganizationPermissions.Update()`: **Added**\n* `ClerkBackendApi.OrganizationRoles.List()`: **Added**\n* `ClerkBackendApi.Commerce.ListPlans()`: **Deleted** **Breaking** :warning:\n* `ClerkBackendApi.Commerce.ListSubscriptionItems()`: **Deleted** **Breaking** :warning:\n* `ClerkBackendApi.Commerce.CancelSubscriptionItem()`: **Deleted** **Breaking** :warning:\n* `ClerkBackendApi.Sessions.Create()`: \n * `request.ActiveOrganizationId` **Added**\n* `ClerkBackendApi.Users.List()`: `response.[]` **Changed**\n* `ClerkBackendApi.Users.Create()`: `response` **Changed**\n* `ClerkBackendApi.Users.Get()`: `response` **Changed**\n* `ClerkBackendApi.Users.Update()`: `response` **Changed**\n* `ClerkBackendApi.Users.Ban()`: `response` **Changed**\n* `ClerkBackendApi.Users.Unban()`: `response` **Changed**\n* `ClerkBackendApi.Users.BulkBan()`: `response.[]` **Changed**\n* `ClerkBackendApi.Users.BulkUnban()`: `response.[]` **Changed**\n* `ClerkBackendApi.Users.Lock()`: `response` **Changed**\n* `ClerkBackendApi.OrganizationRoles.Update()`: **Added**\n* `ClerkBackendApi.Users.Unlock()`: `response` **Changed**\n* `ClerkBackendApi.Billing.CancelSubscriptionItem()`: **Added**\n* `ClerkBackendApi.Users.UpdateMetadata()`: `response` **Changed**\n* `ClerkBackendApi.Users.GetOrganizationMemberships()`: `response.data.[].Organization.LastActiveAt` **Added**\n* `ClerkBackendApi.Users.GetOrganizationInvitations()`: `response.data.[].InviterId` **Added**\n* `ClerkBackendApi.Users.GetInstanceOrganizationMemberships()`: `response.data.[].Organization.LastActiveAt` **Added**\n* `ClerkBackendApi.OrganizationInvitations.GetAll()`: `response.data.[].InviterId` **Added**\n* `ClerkBackendApi.OrganizationInvitations.Create()`: `response.inviterId` **Added**\n* `ClerkBackendApi.OrganizationInvitations.List()`: `response.data.[].InviterId` **Added**\n* `ClerkBackendApi.OrganizationInvitations.BulkCreate()`: `response.data.[].InviterId` **Added**\n* `ClerkBackendApi.OrganizationInvitations.ListPending()`: `response.data.[].InviterId` **Added**\n* `ClerkBackendApi.OrganizationInvitations.Get()`: `response.inviterId` **Added**\n* `ClerkBackendApi.OrganizationInvitations.Revoke()`: `response.inviterId` **Added**\n* `ClerkBackendApi.OrganizationRoles.Get()`: **Added**\n* `ClerkBackendApi.OrganizationRoles.Create()`: **Added**\n* `ClerkBackendApi.InstanceSettings.UpdateOrganizationSettings()`: `response.maxRoleSetsAllowed` **Added**\n* `ClerkBackendApi.Organizations.List()`: `response.data.[].LastActiveAt` **Added**\n* `ClerkBackendApi.Organizations.Create()`: `response.lastActiveAt` **Added**\n* `ClerkBackendApi.Organizations.Get()`: `response.lastActiveAt` **Added**\n* `ClerkBackendApi.Users.SetProfileImage()`: `response` **Changed**\n* `ClerkBackendApi.Organizations.MergeMetadata()`: `response.lastActiveAt` **Added**\n* `ClerkBackendApi.Organizations.UploadLogo()`: `response.lastActiveAt` **Added**\n* `ClerkBackendApi.Organizations.DeleteLogo()`: `response.lastActiveAt` **Added**\n* `ClerkBackendApi.OrganizationMemberships.Create()`: `response.organization.LastActiveAt` **Added**\n* `ClerkBackendApi.OrganizationMemberships.List()`: `response.data.[].Organization.LastActiveAt` **Added**\n* `ClerkBackendApi.OrganizationMemberships.Update()`: `response.organization.LastActiveAt` **Added**\n* `ClerkBackendApi.OrganizationMemberships.Delete()`: `response.organization.LastActiveAt` **Added**\n* `ClerkBackendApi.OrganizationMemberships.UpdateMetadata()`: `response.organization.LastActiveAt` **Added**\n" diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 936b4f13..9db41cb3 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -25,7 +25,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false csharp: - version: 0.14.0 + version: 0.15.0 additionalDependencies: - package: Microsoft.AspNetCore version: 2.3.0 @@ -51,9 +51,11 @@ csharp: shared: Models/Components webhooks: Models/Webhooks includeDebugSymbols: true + inferUnionDiscriminators: false inputModelSuffix: input maxMethodParams: 4 methodArguments: infer-optional-args + multipartArrayFormat: legacy outputModelSuffix: output packageName: Clerk.BackendAPI packageTags: Clerk SDK diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 47311ab9..861fd5a2 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,21 +1,21 @@ -speakeasyVersion: 1.653.0 +speakeasyVersion: 1.666.2 sources: clerk-backend-api-OAS: sourceNamespace: clerk-openapi - sourceRevisionDigest: sha256:c2c6ab8c4ff4517e23971b57ad56df2b8d811171bef623e0714e8071843bc04b - sourceBlobDigest: sha256:5e8bc9d932d2c4226fc20d5ed7ff34316327db4a92b4fae650ecffd120f194bc + sourceRevisionDigest: sha256:429d210c7a42509d79ad1ec1817c9f486eca4a7335c58a6c1555527ee2f24f9b + sourceBlobDigest: sha256:bd8f249c5c4876dd6b3d41697d351b3690de835ad21df73b2745973e02dc1292 tags: - latest - - speakeasy-sdk-regen-1761696400 + - speakeasy-sdk-regen-1762905987 - "2025-11-10" targets: clerk-backend-api: source: clerk-backend-api-OAS sourceNamespace: clerk-openapi - sourceRevisionDigest: sha256:c2c6ab8c4ff4517e23971b57ad56df2b8d811171bef623e0714e8071843bc04b - sourceBlobDigest: sha256:5e8bc9d932d2c4226fc20d5ed7ff34316327db4a92b4fae650ecffd120f194bc + sourceRevisionDigest: sha256:429d210c7a42509d79ad1ec1817c9f486eca4a7335c58a6c1555527ee2f24f9b + sourceBlobDigest: sha256:bd8f249c5c4876dd6b3d41697d351b3690de835ad21df73b2745973e02dc1292 codeSamplesNamespace: clerk-backend-api-oas-csharp-code-samples - codeSamplesRevisionDigest: sha256:0e48b293cface580098eb1be753a1a8a4e24a506dfa05967395302cfe9f906f9 + codeSamplesRevisionDigest: sha256:447a40e2914c9292c8e0b948ba65e1e1cfd2a3db6c1bd308946de9d934e9ef77 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/NUGET.md b/NUGET.md index 80364cc2..d00d8b8c 100644 --- a/NUGET.md +++ b/NUGET.md @@ -185,17 +185,17 @@ catch (System.Net.Http.HttpRequestException ex) * [`System.Net.Http.HttpRequestException`](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httprequestexception): Network connectivity error. For more details about the underlying cause, inspect the `ex.InnerException`. * Inheriting from [`SDKBaseError`](./src/Clerk/BackendAPI/Models/Errors/SDKBaseError.cs): - * [`CreateM2MTokenResponseBody`](./src/Clerk/BackendAPI/Models/Errors/CreateM2MTokenResponseBody.cs): 400 Bad Request. Status code `400`. Applicable to 1 of 158 methods.* - * [`GetM2MTokensResponseBody`](./src/Clerk/BackendAPI/Models/Errors/GetM2MTokensResponseBody.cs): 400 Bad Request. Status code `400`. Applicable to 1 of 158 methods.* - * [`RevokeM2MTokenResponseBody`](./src/Clerk/BackendAPI/Models/Errors/RevokeM2MTokenResponseBody.cs): 400 Bad Request. Status code `400`. Applicable to 1 of 158 methods.* - * [`VerifyM2MTokenResponseBody`](./src/Clerk/BackendAPI/Models/Errors/VerifyM2MTokenResponseBody.cs): 400 Bad Request. Status code `400`. Applicable to 1 of 158 methods.* - * [`VerifyOAuthAccessTokenResponseBody`](./src/Clerk/BackendAPI/Models/Errors/VerifyOAuthAccessTokenResponseBody.cs): 400 Bad Request. Status code `400`. Applicable to 1 of 158 methods.* - * [`GetM2MTokensM2mResponseBody`](./src/Clerk/BackendAPI/Models/Errors/GetM2MTokensM2mResponseBody.cs): 403 Forbidden. Status code `403`. Applicable to 1 of 158 methods.* - * [`GetM2MTokensM2mResponseResponseBody`](./src/Clerk/BackendAPI/Models/Errors/GetM2MTokensM2mResponseResponseBody.cs): 404 Not Found. Status code `404`. Applicable to 1 of 158 methods.* - * [`RevokeM2MTokenM2mResponseBody`](./src/Clerk/BackendAPI/Models/Errors/RevokeM2MTokenM2mResponseBody.cs): 404 Not Found. Status code `404`. Applicable to 1 of 158 methods.* - * [`VerifyM2MTokenM2mResponseBody`](./src/Clerk/BackendAPI/Models/Errors/VerifyM2MTokenM2mResponseBody.cs): 404 Not Found. Status code `404`. Applicable to 1 of 158 methods.* - * [`VerifyOAuthAccessTokenOauthAccessTokensResponseBody`](./src/Clerk/BackendAPI/Models/Errors/VerifyOAuthAccessTokenOauthAccessTokensResponseBody.cs): 404 Not Found. Status code `404`. Applicable to 1 of 158 methods.* - * [`CreateM2MTokenM2mResponseBody`](./src/Clerk/BackendAPI/Models/Errors/CreateM2MTokenM2mResponseBody.cs): 409 Conflict. Status code `409`. Applicable to 1 of 158 methods.* + * [`CreateM2MTokenResponseBody`](./src/Clerk/BackendAPI/Models/Errors/CreateM2MTokenResponseBody.cs): 400 Bad Request. Status code `400`. Applicable to 1 of 170 methods.* + * [`GetM2MTokensResponseBody`](./src/Clerk/BackendAPI/Models/Errors/GetM2MTokensResponseBody.cs): 400 Bad Request. Status code `400`. Applicable to 1 of 170 methods.* + * [`RevokeM2MTokenResponseBody`](./src/Clerk/BackendAPI/Models/Errors/RevokeM2MTokenResponseBody.cs): 400 Bad Request. Status code `400`. Applicable to 1 of 170 methods.* + * [`VerifyM2MTokenResponseBody`](./src/Clerk/BackendAPI/Models/Errors/VerifyM2MTokenResponseBody.cs): 400 Bad Request. Status code `400`. Applicable to 1 of 170 methods.* + * [`VerifyOAuthAccessTokenResponseBody`](./src/Clerk/BackendAPI/Models/Errors/VerifyOAuthAccessTokenResponseBody.cs): 400 Bad Request. Status code `400`. Applicable to 1 of 170 methods.* + * [`GetM2MTokensM2mResponseBody`](./src/Clerk/BackendAPI/Models/Errors/GetM2MTokensM2mResponseBody.cs): 403 Forbidden. Status code `403`. Applicable to 1 of 170 methods.* + * [`GetM2MTokensM2mResponseResponseBody`](./src/Clerk/BackendAPI/Models/Errors/GetM2MTokensM2mResponseResponseBody.cs): 404 Not Found. Status code `404`. Applicable to 1 of 170 methods.* + * [`RevokeM2MTokenM2mResponseBody`](./src/Clerk/BackendAPI/Models/Errors/RevokeM2MTokenM2mResponseBody.cs): 404 Not Found. Status code `404`. Applicable to 1 of 170 methods.* + * [`VerifyM2MTokenM2mResponseBody`](./src/Clerk/BackendAPI/Models/Errors/VerifyM2MTokenM2mResponseBody.cs): 404 Not Found. Status code `404`. Applicable to 1 of 170 methods.* + * [`VerifyOAuthAccessTokenOauthAccessTokensResponseBody`](./src/Clerk/BackendAPI/Models/Errors/VerifyOAuthAccessTokenOauthAccessTokensResponseBody.cs): 404 Not Found. Status code `404`. Applicable to 1 of 170 methods.* + * [`CreateM2MTokenM2mResponseBody`](./src/Clerk/BackendAPI/Models/Errors/CreateM2MTokenM2mResponseBody.cs): 409 Conflict. Status code `409`. Applicable to 1 of 170 methods.* * [`ResponseValidationError`](./src/Clerk/BackendAPI/Models/Errors/ResponseValidationError.cs): Thrown when the response data could not be deserialized into the expected type. diff --git a/README.md b/README.md index a177a621..17d687d7 100644 --- a/README.md +++ b/README.md @@ -184,6 +184,9 @@ public class MachineAuthentication ### [Billing](docs/sdks/billing/README.md) +* [ListPlans](docs/sdks/billing/README.md#listplans) - List all billing plans +* [ListSubscriptionItems](docs/sdks/billing/README.md#listsubscriptionitems) - List all subscription items +* [CancelSubscriptionItem](docs/sdks/billing/README.md#cancelsubscriptionitem) - Cancel a subscription item * [ExtendSubscriptionItemFreeTrial](docs/sdks/billing/README.md#extendsubscriptionitemfreetrial) - Extend free trial for a subscription item * [ListStatements](docs/sdks/billing/README.md#liststatements) - List all billing statements * [GetStatement](docs/sdks/billing/README.md#getstatement) - Retrieve a billing statement @@ -201,12 +204,6 @@ public class MachineAuthentication * [Verify](docs/sdks/clients/README.md#verify) - Verify a client * [Get](docs/sdks/clients/README.md#get) - Get a client -### [Commerce](docs/sdks/commerce/README.md) - -* [ListPlans](docs/sdks/commerce/README.md#listplans) - List all commerce plans -* [ListSubscriptionItems](docs/sdks/commerce/README.md#listsubscriptionitems) - List all subscription items -* [CancelSubscriptionItem](docs/sdks/commerce/README.md#cancelsubscriptionitem) - Cancel a subscription item - ### [Domains](docs/sdks/domains/README.md) * [List](docs/sdks/domains/README.md#list) - List all instance domains @@ -321,6 +318,24 @@ public class MachineAuthentication * [Delete](docs/sdks/organizationmemberships/README.md#delete) - Remove a member from an organization * [UpdateMetadata](docs/sdks/organizationmemberships/README.md#updatemetadata) - Merge and update organization membership metadata +### [OrganizationPermissions](docs/sdks/organizationpermissions/README.md) + +* [List](docs/sdks/organizationpermissions/README.md#list) - Get a list of all organization permissions +* [Create](docs/sdks/organizationpermissions/README.md#create) - Create a new organization permission +* [Get](docs/sdks/organizationpermissions/README.md#get) - Get an organization permission +* [Update](docs/sdks/organizationpermissions/README.md#update) - Update an organization permission +* [Delete](docs/sdks/organizationpermissions/README.md#delete) - Delete an organization permission + +### [OrganizationRoles](docs/sdks/organizationroles/README.md) + +* [List](docs/sdks/organizationroles/README.md#list) - Get a list of organization roles +* [Create](docs/sdks/organizationroles/README.md#create) - Create an organization role +* [Get](docs/sdks/organizationroles/README.md#get) - Retrieve an organization role +* [Update](docs/sdks/organizationroles/README.md#update) - Update an organization role +* [Delete](docs/sdks/organizationroles/README.md#delete) - Delete an organization role +* [AssignPermission](docs/sdks/organizationroles/README.md#assignpermission) - Assign a permission to an organization role +* [RemovePermission](docs/sdks/organizationroles/README.md#removepermission) - Remove a permission from an organization role + ### [Organizations](docs/sdks/organizations/README.md) * [List](docs/sdks/organizations/README.md#list) - Get a list of organizations for an instance @@ -572,17 +587,17 @@ catch (System.Net.Http.HttpRequestException ex) * [`System.Net.Http.HttpRequestException`](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httprequestexception): Network connectivity error. For more details about the underlying cause, inspect the `ex.InnerException`. * Inheriting from [`SDKBaseError`](./src/Clerk/BackendAPI/Models/Errors/SDKBaseError.cs): - * [`CreateM2MTokenResponseBody`](./src/Clerk/BackendAPI/Models/Errors/CreateM2MTokenResponseBody.cs): 400 Bad Request. Status code `400`. Applicable to 1 of 158 methods.* - * [`GetM2MTokensResponseBody`](./src/Clerk/BackendAPI/Models/Errors/GetM2MTokensResponseBody.cs): 400 Bad Request. Status code `400`. Applicable to 1 of 158 methods.* - * [`RevokeM2MTokenResponseBody`](./src/Clerk/BackendAPI/Models/Errors/RevokeM2MTokenResponseBody.cs): 400 Bad Request. Status code `400`. Applicable to 1 of 158 methods.* - * [`VerifyM2MTokenResponseBody`](./src/Clerk/BackendAPI/Models/Errors/VerifyM2MTokenResponseBody.cs): 400 Bad Request. Status code `400`. Applicable to 1 of 158 methods.* - * [`VerifyOAuthAccessTokenResponseBody`](./src/Clerk/BackendAPI/Models/Errors/VerifyOAuthAccessTokenResponseBody.cs): 400 Bad Request. Status code `400`. Applicable to 1 of 158 methods.* - * [`GetM2MTokensM2mResponseBody`](./src/Clerk/BackendAPI/Models/Errors/GetM2MTokensM2mResponseBody.cs): 403 Forbidden. Status code `403`. Applicable to 1 of 158 methods.* - * [`GetM2MTokensM2mResponseResponseBody`](./src/Clerk/BackendAPI/Models/Errors/GetM2MTokensM2mResponseResponseBody.cs): 404 Not Found. Status code `404`. Applicable to 1 of 158 methods.* - * [`RevokeM2MTokenM2mResponseBody`](./src/Clerk/BackendAPI/Models/Errors/RevokeM2MTokenM2mResponseBody.cs): 404 Not Found. Status code `404`. Applicable to 1 of 158 methods.* - * [`VerifyM2MTokenM2mResponseBody`](./src/Clerk/BackendAPI/Models/Errors/VerifyM2MTokenM2mResponseBody.cs): 404 Not Found. Status code `404`. Applicable to 1 of 158 methods.* - * [`VerifyOAuthAccessTokenOauthAccessTokensResponseBody`](./src/Clerk/BackendAPI/Models/Errors/VerifyOAuthAccessTokenOauthAccessTokensResponseBody.cs): 404 Not Found. Status code `404`. Applicable to 1 of 158 methods.* - * [`CreateM2MTokenM2mResponseBody`](./src/Clerk/BackendAPI/Models/Errors/CreateM2MTokenM2mResponseBody.cs): 409 Conflict. Status code `409`. Applicable to 1 of 158 methods.* + * [`CreateM2MTokenResponseBody`](./src/Clerk/BackendAPI/Models/Errors/CreateM2MTokenResponseBody.cs): 400 Bad Request. Status code `400`. Applicable to 1 of 170 methods.* + * [`GetM2MTokensResponseBody`](./src/Clerk/BackendAPI/Models/Errors/GetM2MTokensResponseBody.cs): 400 Bad Request. Status code `400`. Applicable to 1 of 170 methods.* + * [`RevokeM2MTokenResponseBody`](./src/Clerk/BackendAPI/Models/Errors/RevokeM2MTokenResponseBody.cs): 400 Bad Request. Status code `400`. Applicable to 1 of 170 methods.* + * [`VerifyM2MTokenResponseBody`](./src/Clerk/BackendAPI/Models/Errors/VerifyM2MTokenResponseBody.cs): 400 Bad Request. Status code `400`. Applicable to 1 of 170 methods.* + * [`VerifyOAuthAccessTokenResponseBody`](./src/Clerk/BackendAPI/Models/Errors/VerifyOAuthAccessTokenResponseBody.cs): 400 Bad Request. Status code `400`. Applicable to 1 of 170 methods.* + * [`GetM2MTokensM2mResponseBody`](./src/Clerk/BackendAPI/Models/Errors/GetM2MTokensM2mResponseBody.cs): 403 Forbidden. Status code `403`. Applicable to 1 of 170 methods.* + * [`GetM2MTokensM2mResponseResponseBody`](./src/Clerk/BackendAPI/Models/Errors/GetM2MTokensM2mResponseResponseBody.cs): 404 Not Found. Status code `404`. Applicable to 1 of 170 methods.* + * [`RevokeM2MTokenM2mResponseBody`](./src/Clerk/BackendAPI/Models/Errors/RevokeM2MTokenM2mResponseBody.cs): 404 Not Found. Status code `404`. Applicable to 1 of 170 methods.* + * [`VerifyM2MTokenM2mResponseBody`](./src/Clerk/BackendAPI/Models/Errors/VerifyM2MTokenM2mResponseBody.cs): 404 Not Found. Status code `404`. Applicable to 1 of 170 methods.* + * [`VerifyOAuthAccessTokenOauthAccessTokensResponseBody`](./src/Clerk/BackendAPI/Models/Errors/VerifyOAuthAccessTokenOauthAccessTokensResponseBody.cs): 404 Not Found. Status code `404`. Applicable to 1 of 170 methods.* + * [`CreateM2MTokenM2mResponseBody`](./src/Clerk/BackendAPI/Models/Errors/CreateM2MTokenM2mResponseBody.cs): 409 Conflict. Status code `409`. Applicable to 1 of 170 methods.* * [`ResponseValidationError`](./src/Clerk/BackendAPI/Models/Errors/ResponseValidationError.cs): Thrown when the response data could not be deserialized into the expected type. diff --git a/RELEASES.md b/RELEASES.md index 68b892f2..1d8a9b23 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -218,4 +218,14 @@ Based on: ### Generated - [csharp v0.14.0] . ### Releases -- [NuGet v0.14.0] https://www.nuget.org/packages/Clerk.BackendAPI/0.14.0 - . \ No newline at end of file +- [NuGet v0.14.0] https://www.nuget.org/packages/Clerk.BackendAPI/0.14.0 - . + +## 2025-12-03 00:06:02 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.666.2 (2.768.1) https://github.com/speakeasy-api/speakeasy +### Generated +- [csharp v0.15.0] . +### Releases +- [NuGet v0.15.0] https://www.nuget.org/packages/Clerk.BackendAPI/0.15.0 - . \ No newline at end of file diff --git a/docs/Models/Components/ClerkErrorErrorEnterpriseAccountMeta.md b/docs/Models/Components/ClerkErrorErrorEnterpriseAccountMeta.md new file mode 100644 index 00000000..e12e48d2 --- /dev/null +++ b/docs/Models/Components/ClerkErrorErrorEnterpriseAccountMeta.md @@ -0,0 +1,7 @@ +# ClerkErrorErrorEnterpriseAccountMeta + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/Models/Components/ClerkErrorErrorEnterpriseAccountVerificationMeta.md b/docs/Models/Components/ClerkErrorErrorEnterpriseAccountVerificationMeta.md new file mode 100644 index 00000000..af28d7d0 --- /dev/null +++ b/docs/Models/Components/ClerkErrorErrorEnterpriseAccountVerificationMeta.md @@ -0,0 +1,7 @@ +# ClerkErrorErrorEnterpriseAccountVerificationMeta + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/Models/Components/CommercePlan.md b/docs/Models/Components/CommercePlan.md index d28f7154..206fcbf0 100644 --- a/docs/Models/Components/CommercePlan.md +++ b/docs/Models/Components/CommercePlan.md @@ -3,23 +3,23 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `Object` | [CommercePlanObject](../../Models/Components/CommercePlanObject.md) | :heavy_check_mark: | String representing the object's type. Objects of the same type share the same value. | -| `Id` | *string* | :heavy_check_mark: | Unique identifier for the plan. | -| `Name` | *string* | :heavy_check_mark: | The name of the plan. | -| `Fee` | [CommerceMoneyResponse](../../Models/Components/CommerceMoneyResponse.md) | :heavy_check_mark: | N/A | -| `AnnualMonthlyFee` | [AnnualMonthlyFee](../../Models/Components/AnnualMonthlyFee.md) | :heavy_check_mark: | N/A | -| `AnnualFee` | [AnnualFee](../../Models/Components/AnnualFee.md) | :heavy_check_mark: | N/A | -| `Description` | *string* | :heavy_check_mark: | The description of the plan. | -| `ProductId` | *string* | :heavy_check_mark: | The ID of the product this plan belongs to. | -| `IsDefault` | *bool* | :heavy_check_mark: | Whether this is the default plan. | -| `IsRecurring` | *bool* | :heavy_check_mark: | Whether this is a recurring plan. | -| `PubliclyVisible` | *bool* | :heavy_check_mark: | Whether this plan is publicly visible. | -| `HasBaseFee` | *bool* | :heavy_check_mark: | Whether this plan has a base fee. | -| `ForPayerType` | *string* | :heavy_check_mark: | The payer type this plan is designed for. | -| `Slug` | *string* | :heavy_check_mark: | The URL-friendly slug for the plan. | -| `AvatarUrl` | *string* | :heavy_check_mark: | The URL of the plan's avatar image. | -| `Features` | List<[FeatureResponse](../../Models/Components/FeatureResponse.md)> | :heavy_minus_sign: | The features included in this plan. | -| `FreeTrialEnabled` | *bool* | :heavy_check_mark: | Whether free trial is enabled for this plan. | -| `FreeTrialDays` | *long* | :heavy_check_mark: | Number of free trial days for this plan. | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Object` | [CommercePlanObject](../../Models/Components/CommercePlanObject.md) | :heavy_check_mark: | String representing the object's type. Objects of the same type share the same value. | +| `Id` | *string* | :heavy_check_mark: | Unique identifier for the plan. | +| `Name` | *string* | :heavy_check_mark: | The name of the plan. | +| `Fee` | [CommerceMoneyResponse](../../Models/Components/CommerceMoneyResponse.md) | :heavy_check_mark: | N/A | +| `AnnualMonthlyFee` | [AnnualMonthlyFee](../../Models/Components/AnnualMonthlyFee.md) | :heavy_check_mark: | N/A | +| `AnnualFee` | [AnnualFee](../../Models/Components/AnnualFee.md) | :heavy_check_mark: | N/A | +| `Description` | *string* | :heavy_check_mark: | The description of the plan. | +| ~~`ProductId`~~ | *string* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The ID of the product this plan belongs to. | +| `IsDefault` | *bool* | :heavy_check_mark: | Whether this is the default plan. | +| `IsRecurring` | *bool* | :heavy_check_mark: | Whether this is a recurring plan. | +| `PubliclyVisible` | *bool* | :heavy_check_mark: | Whether this plan is publicly visible. | +| `HasBaseFee` | *bool* | :heavy_check_mark: | Whether this plan has a base fee. | +| `ForPayerType` | *string* | :heavy_check_mark: | The payer type this plan is designed for. | +| `Slug` | *string* | :heavy_check_mark: | The URL-friendly slug for the plan. | +| `AvatarUrl` | *string* | :heavy_check_mark: | The URL of the plan's avatar image. | +| `Features` | List<[FeatureResponse](../../Models/Components/FeatureResponse.md)> | :heavy_minus_sign: | The features included in this plan. | +| `FreeTrialEnabled` | *bool* | :heavy_check_mark: | Whether free trial is enabled for this plan. | +| `FreeTrialDays` | *long* | :heavy_check_mark: | Number of free trial days for this plan. | \ No newline at end of file diff --git a/docs/Models/Components/EnterpriseAccount.md b/docs/Models/Components/EnterpriseAccount.md new file mode 100644 index 00000000..22bbaff9 --- /dev/null +++ b/docs/Models/Components/EnterpriseAccount.md @@ -0,0 +1,21 @@ +# EnterpriseAccount + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `Id` | *string* | :heavy_check_mark: | N/A | +| `Object` | [EnterpriseAccountObject](../../Models/Components/EnterpriseAccountObject.md) | :heavy_check_mark: | String representing the object's type. Objects of the same type share the same value.
| +| `Protocol` | [Protocol](../../Models/Components/Protocol.md) | :heavy_minus_sign: | The authentication protocol used to sign in.
| +| `Provider` | *string* | :heavy_check_mark: | N/A | +| `Active` | *bool* | :heavy_check_mark: | N/A | +| `EmailAddress` | *string* | :heavy_check_mark: | N/A | +| `FirstName` | *string* | :heavy_minus_sign: | N/A | +| `LastName` | *string* | :heavy_minus_sign: | N/A | +| `ProviderUserId` | *string* | :heavy_minus_sign: | The unique ID of the user in the external provider's system | +| `EnterpriseConnectionId` | *string* | :heavy_minus_sign: | N/A | +| `PublicMetadata` | Dictionary | :heavy_minus_sign: | N/A | +| `Verification` | [EnterpriseAccountVerification](../../Models/Components/EnterpriseAccountVerification.md) | :heavy_check_mark: | N/A | +| `EnterpriseConnection` | [EnterpriseConnection](../../Models/Components/EnterpriseConnection.md) | :heavy_minus_sign: | N/A | +| `LastAuthenticatedAt` | *long* | :heavy_minus_sign: | Unix timestamp of last authentication.
| \ No newline at end of file diff --git a/docs/Models/Components/EnterpriseAccountObject.md b/docs/Models/Components/EnterpriseAccountObject.md new file mode 100644 index 00000000..035ec489 --- /dev/null +++ b/docs/Models/Components/EnterpriseAccountObject.md @@ -0,0 +1,11 @@ +# EnterpriseAccountObject + +String representing the object's type. Objects of the same type share the same value. + + + +## Values + +| Name | Value | +| ------------------- | ------------------- | +| `EnterpriseAccount` | enterprise_account | \ No newline at end of file diff --git a/docs/Models/Components/EnterpriseAccountVerification.md b/docs/Models/Components/EnterpriseAccountVerification.md new file mode 100644 index 00000000..c9f70fa2 --- /dev/null +++ b/docs/Models/Components/EnterpriseAccountVerification.md @@ -0,0 +1,22 @@ +# EnterpriseAccountVerification + + +## Supported Types + +### VerificationTicket + +```csharp +EnterpriseAccountVerification.CreateVerificationTicket(/* values here */); +``` + +### VerificationSaml + +```csharp +EnterpriseAccountVerification.CreateVerificationSaml(/* values here */); +``` + +### VerificationOauth + +```csharp +EnterpriseAccountVerification.CreateVerificationOauth(/* values here */); +``` diff --git a/docs/Models/Components/EnterpriseConnection.md b/docs/Models/Components/EnterpriseConnection.md new file mode 100644 index 00000000..79a9b80a --- /dev/null +++ b/docs/Models/Components/EnterpriseConnection.md @@ -0,0 +1,10 @@ +# EnterpriseConnection + + +## Supported Types + +### EnterpriseConnectionEnterpriseConnection + +```csharp +EnterpriseConnection.CreateEnterpriseConnectionEnterpriseConnection(/* values here */); +``` diff --git a/docs/Models/Components/EnterpriseConnection1.md b/docs/Models/Components/EnterpriseConnection1.md new file mode 100644 index 00000000..1f91a5df --- /dev/null +++ b/docs/Models/Components/EnterpriseConnection1.md @@ -0,0 +1,21 @@ +# EnterpriseConnection1 + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | +| `Id` | *string* | :heavy_check_mark: | N/A | +| `Protocol` | *string* | :heavy_check_mark: | N/A | +| `Provider` | *string* | :heavy_check_mark: | N/A | +| `Name` | *string* | :heavy_check_mark: | N/A | +| `LogoPublicUrl` | *string* | :heavy_check_mark: | N/A | +| ~~`Domain`~~ | *string* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | +| `Domains` | List<*string*> | :heavy_minus_sign: | N/A | +| `Active` | *bool* | :heavy_check_mark: | N/A | +| `SyncUserAttributes` | *bool* | :heavy_check_mark: | N/A | +| `AllowSubdomains` | *bool* | :heavy_check_mark: | N/A | +| `AllowIdpInitiated` | *bool* | :heavy_check_mark: | N/A | +| `DisableAdditionalIdentifications` | *bool* | :heavy_check_mark: | N/A | +| `CreatedAt` | *long* | :heavy_check_mark: | Unix timestamp of creation.
| +| `UpdatedAt` | *long* | :heavy_check_mark: | Unix timestamp of last update.
| \ No newline at end of file diff --git a/docs/Models/Components/EnterpriseConnection2.md b/docs/Models/Components/EnterpriseConnection2.md new file mode 100644 index 00000000..6848621e --- /dev/null +++ b/docs/Models/Components/EnterpriseConnection2.md @@ -0,0 +1,21 @@ +# EnterpriseConnection2 + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | +| `Id` | *string* | :heavy_check_mark: | N/A | +| `Protocol` | *string* | :heavy_check_mark: | N/A | +| `Provider` | *string* | :heavy_check_mark: | N/A | +| `Name` | *string* | :heavy_check_mark: | N/A | +| `LogoPublicUrl` | *string* | :heavy_check_mark: | N/A | +| ~~`Domain`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | +| `Domains` | List<*string*> | :heavy_check_mark: | N/A | +| `Active` | *bool* | :heavy_check_mark: | N/A | +| `SyncUserAttributes` | *bool* | :heavy_check_mark: | N/A | +| `AllowSubdomains` | *bool* | :heavy_check_mark: | N/A | +| `AllowIdpInitiated` | *bool* | :heavy_check_mark: | N/A | +| `DisableAdditionalIdentifications` | *bool* | :heavy_check_mark: | N/A | +| `CreatedAt` | *long* | :heavy_check_mark: | Unix timestamp of creation.
| +| `UpdatedAt` | *long* | :heavy_check_mark: | Unix timestamp of last update.
| \ No newline at end of file diff --git a/docs/Models/Components/EnterpriseConnectionEnterpriseConnection.md b/docs/Models/Components/EnterpriseConnectionEnterpriseConnection.md new file mode 100644 index 00000000..8ef5cd1c --- /dev/null +++ b/docs/Models/Components/EnterpriseConnectionEnterpriseConnection.md @@ -0,0 +1,16 @@ +# EnterpriseConnectionEnterpriseConnection + + +## Supported Types + +### EnterpriseConnection1 + +```csharp +EnterpriseConnectionEnterpriseConnection.CreateEnterpriseConnection1(/* values here */); +``` + +### EnterpriseConnection2 + +```csharp +EnterpriseConnectionEnterpriseConnection.CreateEnterpriseConnection2(/* values here */); +``` diff --git a/docs/Models/Components/Organization.md b/docs/Models/Components/Organization.md index 0e17837c..0fdc1be6 100644 --- a/docs/Models/Components/Organization.md +++ b/docs/Models/Components/Organization.md @@ -20,4 +20,5 @@ | `PrivateMetadata` | Dictionary | :heavy_minus_sign: | N/A | {
"internal_use_only": "Sensitive data"
} | | `CreatedBy` | *string* | :heavy_minus_sign: | N/A | user_123456 | | `CreatedAt` | *long* | :heavy_check_mark: | Unix timestamp of creation.
| 1625078400 | -| `UpdatedAt` | *long* | :heavy_check_mark: | Unix timestamp of last update.
| 1625164800 | \ No newline at end of file +| `UpdatedAt` | *long* | :heavy_check_mark: | Unix timestamp of last update.
| 1625164800 | +| `LastActiveAt` | *long* | :heavy_minus_sign: | Unix timestamp of last activity.
| | \ No newline at end of file diff --git a/docs/Models/Components/OrganizationInvitation.md b/docs/Models/Components/OrganizationInvitation.md index 6f09972e..0331d9c3 100644 --- a/docs/Models/Components/OrganizationInvitation.md +++ b/docs/Models/Components/OrganizationInvitation.md @@ -13,6 +13,7 @@ An organization invitation | `Role` | *string* | :heavy_check_mark: | N/A | admin | | `RoleName` | *string* | :heavy_check_mark: | N/A | | | `OrganizationId` | *string* | :heavy_minus_sign: | N/A | org_12345 | +| `InviterId` | *string* | :heavy_check_mark: | N/A | | | `Status` | *string* | :heavy_minus_sign: | N/A | pending | | `PublicMetadata` | Dictionary | :heavy_check_mark: | N/A | {
"key": "value"
} | | `PrivateMetadata` | Dictionary | :heavy_minus_sign: | N/A | {
"private_key": "secret_value"
} | diff --git a/docs/Models/Components/OrganizationInvitationWithPublicOrganizationData.md b/docs/Models/Components/OrganizationInvitationWithPublicOrganizationData.md index a92400f4..6177ff53 100644 --- a/docs/Models/Components/OrganizationInvitationWithPublicOrganizationData.md +++ b/docs/Models/Components/OrganizationInvitationWithPublicOrganizationData.md @@ -13,6 +13,7 @@ An organization invitation with public organization data populated | `Role` | *string* | :heavy_check_mark: | N/A | | `RoleName` | *string* | :heavy_check_mark: | N/A | | `OrganizationId` | *string* | :heavy_minus_sign: | N/A | +| `InviterId` | *string* | :heavy_check_mark: | N/A | | `Status` | *string* | :heavy_minus_sign: | N/A | | `PublicMetadata` | Dictionary | :heavy_check_mark: | N/A | | `PrivateMetadata` | Dictionary | :heavy_minus_sign: | N/A | diff --git a/docs/Models/Components/OrganizationMembershipOrganization.md b/docs/Models/Components/OrganizationMembershipOrganization.md index 77ce1526..5818f5cf 100644 --- a/docs/Models/Components/OrganizationMembershipOrganization.md +++ b/docs/Models/Components/OrganizationMembershipOrganization.md @@ -20,4 +20,5 @@ | `PrivateMetadata` | Dictionary | :heavy_minus_sign: | N/A | {
"internal_use_only": "Sensitive data"
} | | `CreatedBy` | *string* | :heavy_minus_sign: | N/A | user_123456 | | `CreatedAt` | *long* | :heavy_check_mark: | Unix timestamp of creation.
| 1625078400 | -| `UpdatedAt` | *long* | :heavy_check_mark: | Unix timestamp of last update.
| 1625164800 | \ No newline at end of file +| `UpdatedAt` | *long* | :heavy_check_mark: | Unix timestamp of last update.
| 1625164800 | +| `LastActiveAt` | *long* | :heavy_minus_sign: | Unix timestamp of last activity.
| | \ No newline at end of file diff --git a/docs/Models/Components/OrganizationSettings.md b/docs/Models/Components/OrganizationSettings.md index c0e7edd1..2027b953 100644 --- a/docs/Models/Components/OrganizationSettings.md +++ b/docs/Models/Components/OrganizationSettings.md @@ -11,6 +11,7 @@ Success | `Enabled` | *bool* | :heavy_check_mark: | N/A | true | | `MaxAllowedMemberships` | *long* | :heavy_check_mark: | N/A | 5 | | `MaxAllowedRoles` | *long* | :heavy_check_mark: | N/A | 3 | +| `MaxRoleSetsAllowed` | *long* | :heavy_minus_sign: | N/A | | | ~~`MaxAllowedPermissions`~~ | *long* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

max_allowed_permissions is now a no-op, as permissions are now unlimited | 15 | | `CreatorRole` | *string* | :heavy_check_mark: | The role key that a user will be assigned after creating an organization. | admin | | `AdminDeleteEnabled` | *bool* | :heavy_check_mark: | The default for whether an admin can delete an organization with the Frontend API. | true | diff --git a/docs/Models/Components/OrganizationWithLogo.md b/docs/Models/Components/OrganizationWithLogo.md index c697c7cd..d7fb841a 100644 --- a/docs/Models/Components/OrganizationWithLogo.md +++ b/docs/Models/Components/OrganizationWithLogo.md @@ -21,4 +21,5 @@ | `CreatedBy` | *string* | :heavy_minus_sign: | N/A | user_123456 | | `CreatedAt` | *long* | :heavy_check_mark: | Unix timestamp of creation.
| 1625078400 | | `UpdatedAt` | *long* | :heavy_check_mark: | Unix timestamp of last update.
| 1625164800 | +| `LastActiveAt` | *long* | :heavy_minus_sign: | Unix timestamp of last activity.
| | | ~~`LogoUrl`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | https://example.com/logo_url.png | \ No newline at end of file diff --git a/docs/Models/Components/Permission.md b/docs/Models/Components/Permission.md new file mode 100644 index 00000000..ae498357 --- /dev/null +++ b/docs/Models/Components/Permission.md @@ -0,0 +1,15 @@ +# Permission + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | +| `Object` | [PermissionObject](../../Models/Components/PermissionObject.md) | :heavy_check_mark: | N/A | +| `Id` | *string* | :heavy_check_mark: | N/A | +| `Name` | *string* | :heavy_check_mark: | N/A | +| `Key` | *string* | :heavy_check_mark: | N/A | +| `Description` | *string* | :heavy_check_mark: | N/A | +| `Type` | *string* | :heavy_check_mark: | N/A | +| `CreatedAt` | *long* | :heavy_check_mark: | Unix timestamp of creation.
| +| `UpdatedAt` | *long* | :heavy_check_mark: | Unix timestamp of last update.
| \ No newline at end of file diff --git a/docs/Models/Components/PermissionObject.md b/docs/Models/Components/PermissionObject.md new file mode 100644 index 00000000..2b0f9fa6 --- /dev/null +++ b/docs/Models/Components/PermissionObject.md @@ -0,0 +1,8 @@ +# PermissionObject + + +## Values + +| Name | Value | +| ------------ | ------------ | +| `Permission` | permission | \ No newline at end of file diff --git a/docs/Models/Components/Permissions.md b/docs/Models/Components/Permissions.md new file mode 100644 index 00000000..457e6c46 --- /dev/null +++ b/docs/Models/Components/Permissions.md @@ -0,0 +1,11 @@ +# Permissions + +Success + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | +| `Data` | List<[Permission](../../Models/Components/Permission.md)> | :heavy_check_mark: | N/A | +| `TotalCount` | *long* | :heavy_check_mark: | Total number of permissions
| \ No newline at end of file diff --git a/docs/Models/Components/Plan.md b/docs/Models/Components/Plan.md index 7443299a..9658870a 100644 --- a/docs/Models/Components/Plan.md +++ b/docs/Models/Components/Plan.md @@ -5,23 +5,23 @@ The associated plan. ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | -| `Object` | [CommerceSubscriptionItemPlanObject](../../Models/Components/CommerceSubscriptionItemPlanObject.md) | :heavy_check_mark: | String representing the object's type. Objects of the same type share the same value. | -| `Id` | *string* | :heavy_check_mark: | Unique identifier for the plan. | -| `Name` | *string* | :heavy_check_mark: | The name of the plan. | -| `Fee` | [CommerceMoneyResponse](../../Models/Components/CommerceMoneyResponse.md) | :heavy_check_mark: | N/A | -| `AnnualMonthlyFee` | [CommerceSubscriptionItemAnnualMonthlyFee](../../Models/Components/CommerceSubscriptionItemAnnualMonthlyFee.md) | :heavy_check_mark: | N/A | -| `AnnualFee` | [CommerceSubscriptionItemAnnualFee](../../Models/Components/CommerceSubscriptionItemAnnualFee.md) | :heavy_check_mark: | N/A | -| `Description` | *string* | :heavy_check_mark: | The description of the plan. | -| `ProductId` | *string* | :heavy_check_mark: | The ID of the product this plan belongs to. | -| `IsDefault` | *bool* | :heavy_check_mark: | Whether this is the default plan. | -| `IsRecurring` | *bool* | :heavy_check_mark: | Whether this is a recurring plan. | -| `PubliclyVisible` | *bool* | :heavy_check_mark: | Whether this plan is publicly visible. | -| `HasBaseFee` | *bool* | :heavy_check_mark: | Whether this plan has a base fee. | -| `ForPayerType` | *string* | :heavy_check_mark: | The payer type this plan is designed for. | -| `Slug` | *string* | :heavy_check_mark: | The URL-friendly slug for the plan. | -| `AvatarUrl` | *string* | :heavy_check_mark: | The URL of the plan's avatar image. | -| `Features` | List<[FeatureResponse](../../Models/Components/FeatureResponse.md)> | :heavy_minus_sign: | The features included in this plan. | -| `FreeTrialEnabled` | *bool* | :heavy_check_mark: | Whether free trial is enabled for this plan. | -| `FreeTrialDays` | *long* | :heavy_check_mark: | Number of free trial days for this plan. | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Object` | [CommerceSubscriptionItemPlanObject](../../Models/Components/CommerceSubscriptionItemPlanObject.md) | :heavy_check_mark: | String representing the object's type. Objects of the same type share the same value. | +| `Id` | *string* | :heavy_check_mark: | Unique identifier for the plan. | +| `Name` | *string* | :heavy_check_mark: | The name of the plan. | +| `Fee` | [CommerceMoneyResponse](../../Models/Components/CommerceMoneyResponse.md) | :heavy_check_mark: | N/A | +| `AnnualMonthlyFee` | [CommerceSubscriptionItemAnnualMonthlyFee](../../Models/Components/CommerceSubscriptionItemAnnualMonthlyFee.md) | :heavy_check_mark: | N/A | +| `AnnualFee` | [CommerceSubscriptionItemAnnualFee](../../Models/Components/CommerceSubscriptionItemAnnualFee.md) | :heavy_check_mark: | N/A | +| `Description` | *string* | :heavy_check_mark: | The description of the plan. | +| ~~`ProductId`~~ | *string* | :heavy_check_mark: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

The ID of the product this plan belongs to. | +| `IsDefault` | *bool* | :heavy_check_mark: | Whether this is the default plan. | +| `IsRecurring` | *bool* | :heavy_check_mark: | Whether this is a recurring plan. | +| `PubliclyVisible` | *bool* | :heavy_check_mark: | Whether this plan is publicly visible. | +| `HasBaseFee` | *bool* | :heavy_check_mark: | Whether this plan has a base fee. | +| `ForPayerType` | *string* | :heavy_check_mark: | The payer type this plan is designed for. | +| `Slug` | *string* | :heavy_check_mark: | The URL-friendly slug for the plan. | +| `AvatarUrl` | *string* | :heavy_check_mark: | The URL of the plan's avatar image. | +| `Features` | List<[FeatureResponse](../../Models/Components/FeatureResponse.md)> | :heavy_minus_sign: | The features included in this plan. | +| `FreeTrialEnabled` | *bool* | :heavy_check_mark: | Whether free trial is enabled for this plan. | +| `FreeTrialDays` | *long* | :heavy_check_mark: | Number of free trial days for this plan. | \ No newline at end of file diff --git a/docs/Models/Components/Protocol.md b/docs/Models/Components/Protocol.md new file mode 100644 index 00000000..b5b5102e --- /dev/null +++ b/docs/Models/Components/Protocol.md @@ -0,0 +1,12 @@ +# Protocol + +The authentication protocol used to sign in. + + + +## Values + +| Name | Value | +| ------- | ------- | +| `Oauth` | oauth | +| `Saml` | saml | \ No newline at end of file diff --git a/docs/Models/Components/Role.md b/docs/Models/Components/Role.md new file mode 100644 index 00000000..7bfd0fe1 --- /dev/null +++ b/docs/Models/Components/Role.md @@ -0,0 +1,16 @@ +# Role + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | +| `Object` | [RoleObject](../../Models/Components/RoleObject.md) | :heavy_check_mark: | N/A | +| `Id` | *string* | :heavy_check_mark: | N/A | +| `Name` | *string* | :heavy_check_mark: | N/A | +| `Key` | *string* | :heavy_check_mark: | N/A | +| `Description` | *string* | :heavy_check_mark: | N/A | +| `IsCreatorEligible` | *bool* | :heavy_check_mark: | Whether this role is eligible to be an organization creator role | +| `Permissions` | List<[Permission](../../Models/Components/Permission.md)> | :heavy_check_mark: | N/A | +| `CreatedAt` | *long* | :heavy_check_mark: | Unix timestamp of creation.
| +| `UpdatedAt` | *long* | :heavy_check_mark: | Unix timestamp of last update.
| \ No newline at end of file diff --git a/docs/Models/Components/RoleObject.md b/docs/Models/Components/RoleObject.md new file mode 100644 index 00000000..1fc005d3 --- /dev/null +++ b/docs/Models/Components/RoleObject.md @@ -0,0 +1,8 @@ +# RoleObject + + +## Values + +| Name | Value | +| ------ | ------ | +| `Role` | role | \ No newline at end of file diff --git a/docs/Models/Components/Roles.md b/docs/Models/Components/Roles.md new file mode 100644 index 00000000..98143a62 --- /dev/null +++ b/docs/Models/Components/Roles.md @@ -0,0 +1,11 @@ +# Roles + +Success + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | +| `Data` | List<[Role](../../Models/Components/Role.md)> | :heavy_check_mark: | N/A | +| `TotalCount` | *long* | :heavy_check_mark: | Total number of roles
| \ No newline at end of file diff --git a/docs/Models/Components/User.md b/docs/Models/Components/User.md index 2433eb05..a8cfaade 100644 --- a/docs/Models/Components/User.md +++ b/docs/Models/Components/User.md @@ -33,8 +33,11 @@ Success | `BackupCodeEnabled` | *bool* | :heavy_check_mark: | N/A | true | | `MfaEnabledAt` | *long* | :heavy_check_mark: | Unix timestamp of when MFA was last enabled for this user. It should be noted that this field is not nullified if MFA is disabled.
| 1615852800 | | `MfaDisabledAt` | *long* | :heavy_check_mark: | Unix timestamp of when MFA was last disabled for this user. It should be noted that this field is not nullified if MFA is enabled again.
| | +| `PasswordLastUpdatedAt` | *long* | :heavy_minus_sign: | Unix timestamp of when the user's password was last updated.
| | | `ExternalAccounts` | List<[ExternalAccountWithVerification](../../Models/Components/ExternalAccountWithVerification.md)> | :heavy_check_mark: | N/A | [
{
"id": "ext_account_id_123",
"provider": "Facebook",
"user_id": "user_id_at_provider"
}
] | | `SamlAccounts` | List<[SAMLAccount](../../Models/Components/SAMLAccount.md)> | :heavy_check_mark: | N/A | [
{
"id": "saml_account_id_123",
"object": "saml_account",
"provider": "SAML Provider",
"active": true,
"email_address": "user@example.com",
"public_metadata": {
"department": "IT"
},
"verification": {
"status": "verified",
"strategy": "saml"
}
}
] | +| `EnterpriseAccounts` | List<[EnterpriseAccount](../../Models/Components/EnterpriseAccount.md)> | :heavy_check_mark: | N/A | | +| `OrganizationMemberships` | List<[OrganizationMembership](../../Models/Components/OrganizationMembership.md)> | :heavy_minus_sign: | N/A | | | `LastSignInAt` | *long* | :heavy_check_mark: | Unix timestamp of last sign-in.
| 1622852400 | | `Banned` | *bool* | :heavy_check_mark: | Flag to denote whether user is banned or not.
| false | | `Locked` | *bool* | :heavy_check_mark: | Flag to denote whether user is currently locked, i.e. restricted from signing in or not.
| false | diff --git a/docs/Models/Components/VerificationOauth.md b/docs/Models/Components/VerificationOauth.md new file mode 100644 index 00000000..c4b41dcc --- /dev/null +++ b/docs/Models/Components/VerificationOauth.md @@ -0,0 +1,15 @@ +# VerificationOauth + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | +| `Object` | [VerificationOauthVerificationEnterpriseAccountObject](../../Models/Components/VerificationOauthVerificationEnterpriseAccountObject.md) | :heavy_minus_sign: | N/A | +| `Status` | [VerificationOauthVerificationEnterpriseAccountStatus](../../Models/Components/VerificationOauthVerificationEnterpriseAccountStatus.md) | :heavy_check_mark: | N/A | +| `Strategy` | *string* | :heavy_check_mark: | N/A | +| `ExternalVerificationRedirectUrl` | *string* | :heavy_minus_sign: | N/A | +| `Error` | [VerificationOauthVerificationEnterpriseAccountError](../../Models/Components/VerificationOauthVerificationEnterpriseAccountError.md) | :heavy_minus_sign: | N/A | +| `ExpireAt` | *long* | :heavy_check_mark: | N/A | +| `Attempts` | *long* | :heavy_check_mark: | N/A | +| `VerifiedAtClient` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Components/VerificationOauthErrorEnterpriseAccountClerkError.md b/docs/Models/Components/VerificationOauthErrorEnterpriseAccountClerkError.md new file mode 100644 index 00000000..b1fba0fb --- /dev/null +++ b/docs/Models/Components/VerificationOauthErrorEnterpriseAccountClerkError.md @@ -0,0 +1,11 @@ +# VerificationOauthErrorEnterpriseAccountClerkError + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | +| `Message` | *string* | :heavy_check_mark: | N/A | Invalid input | +| `LongMessage` | *string* | :heavy_check_mark: | N/A | The input provided does not meet the requirements. | +| `Code` | *string* | :heavy_check_mark: | N/A | 400_bad_request | +| `Meta` | [ClerkErrorErrorEnterpriseAccountVerificationMeta](../../Models/Components/ClerkErrorErrorEnterpriseAccountVerificationMeta.md) | :heavy_minus_sign: | N/A | {} | \ No newline at end of file diff --git a/docs/Models/Components/VerificationOauthVerificationEnterpriseAccountError.md b/docs/Models/Components/VerificationOauthVerificationEnterpriseAccountError.md new file mode 100644 index 00000000..fd121cc5 --- /dev/null +++ b/docs/Models/Components/VerificationOauthVerificationEnterpriseAccountError.md @@ -0,0 +1,10 @@ +# VerificationOauthVerificationEnterpriseAccountError + + +## Supported Types + +### VerificationOauthErrorEnterpriseAccountClerkError + +```csharp +VerificationOauthVerificationEnterpriseAccountError.CreateVerificationOauthErrorEnterpriseAccountClerkError(/* values here */); +``` diff --git a/docs/Models/Components/VerificationOauthVerificationEnterpriseAccountObject.md b/docs/Models/Components/VerificationOauthVerificationEnterpriseAccountObject.md new file mode 100644 index 00000000..ee222790 --- /dev/null +++ b/docs/Models/Components/VerificationOauthVerificationEnterpriseAccountObject.md @@ -0,0 +1,8 @@ +# VerificationOauthVerificationEnterpriseAccountObject + + +## Values + +| Name | Value | +| ------------------- | ------------------- | +| `VerificationOauth` | verification_oauth | \ No newline at end of file diff --git a/docs/Models/Components/VerificationOauthVerificationEnterpriseAccountStatus.md b/docs/Models/Components/VerificationOauthVerificationEnterpriseAccountStatus.md new file mode 100644 index 00000000..7546add0 --- /dev/null +++ b/docs/Models/Components/VerificationOauthVerificationEnterpriseAccountStatus.md @@ -0,0 +1,12 @@ +# VerificationOauthVerificationEnterpriseAccountStatus + + +## Values + +| Name | Value | +| -------------- | -------------- | +| `Unverified` | unverified | +| `Verified` | verified | +| `Failed` | failed | +| `Expired` | expired | +| `Transferable` | transferable | \ No newline at end of file diff --git a/docs/Models/Components/VerificationSAMLVerificationSAML.md b/docs/Models/Components/VerificationSAMLVerificationSAML.md new file mode 100644 index 00000000..53947ef8 --- /dev/null +++ b/docs/Models/Components/VerificationSAMLVerificationSAML.md @@ -0,0 +1,15 @@ +# VerificationSAMLVerificationSAML + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | +| `Object` | [VerificationSamlVerificationEnterpriseAccountObject](../../Models/Components/VerificationSamlVerificationEnterpriseAccountObject.md) | :heavy_minus_sign: | N/A | +| `Status` | [VerificationSamlVerificationEnterpriseAccountStatus](../../Models/Components/VerificationSamlVerificationEnterpriseAccountStatus.md) | :heavy_check_mark: | N/A | +| `Strategy` | [VerificationSamlVerificationEnterpriseAccountStrategy](../../Models/Components/VerificationSamlVerificationEnterpriseAccountStrategy.md) | :heavy_check_mark: | N/A | +| `ExternalVerificationRedirectUrl` | *string* | :heavy_minus_sign: | N/A | +| `Error` | [VerificationSamlVerificationEnterpriseAccountError](../../Models/Components/VerificationSamlVerificationEnterpriseAccountError.md) | :heavy_minus_sign: | N/A | +| `ExpireAt` | *long* | :heavy_minus_sign: | N/A | +| `Attempts` | *long* | :heavy_check_mark: | N/A | +| `VerifiedAtClient` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Components/VerificationSamlErrorEnterpriseAccountClerkError.md b/docs/Models/Components/VerificationSamlErrorEnterpriseAccountClerkError.md new file mode 100644 index 00000000..196435d8 --- /dev/null +++ b/docs/Models/Components/VerificationSamlErrorEnterpriseAccountClerkError.md @@ -0,0 +1,11 @@ +# VerificationSamlErrorEnterpriseAccountClerkError + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | +| `Message` | *string* | :heavy_check_mark: | N/A | Invalid input | +| `LongMessage` | *string* | :heavy_check_mark: | N/A | The input provided does not meet the requirements. | +| `Code` | *string* | :heavy_check_mark: | N/A | 400_bad_request | +| `Meta` | [ClerkErrorErrorEnterpriseAccountMeta](../../Models/Components/ClerkErrorErrorEnterpriseAccountMeta.md) | :heavy_minus_sign: | N/A | {} | \ No newline at end of file diff --git a/docs/Models/Components/VerificationSamlVerificationEnterpriseAccountError.md b/docs/Models/Components/VerificationSamlVerificationEnterpriseAccountError.md new file mode 100644 index 00000000..244fb096 --- /dev/null +++ b/docs/Models/Components/VerificationSamlVerificationEnterpriseAccountError.md @@ -0,0 +1,10 @@ +# VerificationSamlVerificationEnterpriseAccountError + + +## Supported Types + +### VerificationSamlErrorEnterpriseAccountClerkError + +```csharp +VerificationSamlVerificationEnterpriseAccountError.CreateVerificationSamlErrorEnterpriseAccountClerkError(/* values here */); +``` diff --git a/docs/Models/Components/VerificationSamlVerificationEnterpriseAccountObject.md b/docs/Models/Components/VerificationSamlVerificationEnterpriseAccountObject.md new file mode 100644 index 00000000..f0279a32 --- /dev/null +++ b/docs/Models/Components/VerificationSamlVerificationEnterpriseAccountObject.md @@ -0,0 +1,8 @@ +# VerificationSamlVerificationEnterpriseAccountObject + + +## Values + +| Name | Value | +| ------------------ | ------------------ | +| `VerificationSaml` | verification_saml | \ No newline at end of file diff --git a/docs/Models/Components/VerificationSamlVerificationEnterpriseAccountStatus.md b/docs/Models/Components/VerificationSamlVerificationEnterpriseAccountStatus.md new file mode 100644 index 00000000..c090fe18 --- /dev/null +++ b/docs/Models/Components/VerificationSamlVerificationEnterpriseAccountStatus.md @@ -0,0 +1,12 @@ +# VerificationSamlVerificationEnterpriseAccountStatus + + +## Values + +| Name | Value | +| -------------- | -------------- | +| `Unverified` | unverified | +| `Verified` | verified | +| `Failed` | failed | +| `Expired` | expired | +| `Transferable` | transferable | \ No newline at end of file diff --git a/docs/Models/Components/VerificationSamlVerificationEnterpriseAccountStrategy.md b/docs/Models/Components/VerificationSamlVerificationEnterpriseAccountStrategy.md new file mode 100644 index 00000000..c65ffc7d --- /dev/null +++ b/docs/Models/Components/VerificationSamlVerificationEnterpriseAccountStrategy.md @@ -0,0 +1,8 @@ +# VerificationSamlVerificationEnterpriseAccountStrategy + + +## Values + +| Name | Value | +| ------ | ------ | +| `Saml` | saml | \ No newline at end of file diff --git a/docs/Models/Components/VerificationTicketVerificationEnterpriseAccountObject.md b/docs/Models/Components/VerificationTicketVerificationEnterpriseAccountObject.md new file mode 100644 index 00000000..4c7a7570 --- /dev/null +++ b/docs/Models/Components/VerificationTicketVerificationEnterpriseAccountObject.md @@ -0,0 +1,8 @@ +# VerificationTicketVerificationEnterpriseAccountObject + + +## Values + +| Name | Value | +| -------------------- | -------------------- | +| `VerificationTicket` | verification_ticket | \ No newline at end of file diff --git a/docs/Models/Components/VerificationTicketVerificationEnterpriseAccountStatus.md b/docs/Models/Components/VerificationTicketVerificationEnterpriseAccountStatus.md new file mode 100644 index 00000000..285b8064 --- /dev/null +++ b/docs/Models/Components/VerificationTicketVerificationEnterpriseAccountStatus.md @@ -0,0 +1,10 @@ +# VerificationTicketVerificationEnterpriseAccountStatus + + +## Values + +| Name | Value | +| ------------ | ------------ | +| `Unverified` | unverified | +| `Verified` | verified | +| `Expired` | expired | \ No newline at end of file diff --git a/docs/Models/Components/VerificationTicketVerificationEnterpriseAccountStrategy.md b/docs/Models/Components/VerificationTicketVerificationEnterpriseAccountStrategy.md new file mode 100644 index 00000000..b79103a8 --- /dev/null +++ b/docs/Models/Components/VerificationTicketVerificationEnterpriseAccountStrategy.md @@ -0,0 +1,8 @@ +# VerificationTicketVerificationEnterpriseAccountStrategy + + +## Values + +| Name | Value | +| -------- | -------- | +| `Ticket` | ticket | \ No newline at end of file diff --git a/docs/Models/Components/VerificationTicketVerificationTicket.md b/docs/Models/Components/VerificationTicketVerificationTicket.md new file mode 100644 index 00000000..7fbac28f --- /dev/null +++ b/docs/Models/Components/VerificationTicketVerificationTicket.md @@ -0,0 +1,13 @@ +# VerificationTicketVerificationTicket + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | +| `Object` | [VerificationTicketVerificationEnterpriseAccountObject](../../Models/Components/VerificationTicketVerificationEnterpriseAccountObject.md) | :heavy_minus_sign: | N/A | +| `Status` | [VerificationTicketVerificationEnterpriseAccountStatus](../../Models/Components/VerificationTicketVerificationEnterpriseAccountStatus.md) | :heavy_check_mark: | N/A | +| `Strategy` | [VerificationTicketVerificationEnterpriseAccountStrategy](../../Models/Components/VerificationTicketVerificationEnterpriseAccountStrategy.md) | :heavy_check_mark: | N/A | +| `Attempts` | *long* | :heavy_check_mark: | N/A | +| `ExpireAt` | *long* | :heavy_check_mark: | N/A | +| `VerifiedAtClient` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Operations/AssignPermissionToOrganizationRoleRequest.md b/docs/Models/Operations/AssignPermissionToOrganizationRoleRequest.md new file mode 100644 index 00000000..9a0124d7 --- /dev/null +++ b/docs/Models/Operations/AssignPermissionToOrganizationRoleRequest.md @@ -0,0 +1,9 @@ +# AssignPermissionToOrganizationRoleRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | +| `OrganizationRoleId` | *string* | :heavy_check_mark: | The ID of the organization role | +| `PermissionId` | *string* | :heavy_check_mark: | The ID of the permission to assign | \ No newline at end of file diff --git a/docs/Models/Operations/AssignPermissionToOrganizationRoleResponse.md b/docs/Models/Operations/AssignPermissionToOrganizationRoleResponse.md new file mode 100644 index 00000000..866bca94 --- /dev/null +++ b/docs/Models/Operations/AssignPermissionToOrganizationRoleResponse.md @@ -0,0 +1,9 @@ +# AssignPermissionToOrganizationRoleResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `HttpMeta` | [HTTPMetadata](../../Models/Components/HTTPMetadata.md) | :heavy_check_mark: | N/A | +| `Role` | [Role](../../Models/Components/Role.md) | :heavy_minus_sign: | Success | \ No newline at end of file diff --git a/docs/Models/Operations/CreateOrganizationPermissionRequestBody.md b/docs/Models/Operations/CreateOrganizationPermissionRequestBody.md new file mode 100644 index 00000000..880f9b85 --- /dev/null +++ b/docs/Models/Operations/CreateOrganizationPermissionRequestBody.md @@ -0,0 +1,10 @@ +# CreateOrganizationPermissionRequestBody + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Name` | *string* | :heavy_check_mark: | The name of the permission. | +| `Key` | *string* | :heavy_check_mark: | The key of the permission. Must have the format "org:feature:action" where feature and action are segments consisting of lowercase letters, digits, or underscores, for example "org:billing:manage" or "org:team:read". Cannot begin with "org:sys_" as that prefix is reserved for system permissions. | +| `Description` | *string* | :heavy_minus_sign: | A description of the permission. | \ No newline at end of file diff --git a/docs/Models/Operations/CreateOrganizationPermissionResponse.md b/docs/Models/Operations/CreateOrganizationPermissionResponse.md new file mode 100644 index 00000000..131a6fbd --- /dev/null +++ b/docs/Models/Operations/CreateOrganizationPermissionResponse.md @@ -0,0 +1,9 @@ +# CreateOrganizationPermissionResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `HttpMeta` | [HTTPMetadata](../../Models/Components/HTTPMetadata.md) | :heavy_check_mark: | N/A | +| `Permission` | [Permission](../../Models/Components/Permission.md) | :heavy_minus_sign: | Success | \ No newline at end of file diff --git a/docs/Models/Operations/CreateOrganizationRoleRequestBody.md b/docs/Models/Operations/CreateOrganizationRoleRequestBody.md new file mode 100644 index 00000000..7cb268da --- /dev/null +++ b/docs/Models/Operations/CreateOrganizationRoleRequestBody.md @@ -0,0 +1,12 @@ +# CreateOrganizationRoleRequestBody + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | +| `Name` | *string* | :heavy_check_mark: | The name of the new organization role | +| `Key` | *string* | :heavy_check_mark: | A unique key for the organization role. Must start with 'org:' and contain only lowercase alphanumeric characters and underscores. | +| `Description` | *string* | :heavy_minus_sign: | Optional description for the role | +| `Permissions` | List<*string*> | :heavy_minus_sign: | Array of permission IDs to assign to the role | +| `IncludeInInitialRoleSet` | *bool* | :heavy_minus_sign: | Whether this role should be included in the initial role set | \ No newline at end of file diff --git a/docs/Models/Operations/CreateOrganizationRoleResponse.md b/docs/Models/Operations/CreateOrganizationRoleResponse.md new file mode 100644 index 00000000..060d8b38 --- /dev/null +++ b/docs/Models/Operations/CreateOrganizationRoleResponse.md @@ -0,0 +1,9 @@ +# CreateOrganizationRoleResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `HttpMeta` | [HTTPMetadata](../../Models/Components/HTTPMetadata.md) | :heavy_check_mark: | N/A | +| `Role` | [Role](../../Models/Components/Role.md) | :heavy_minus_sign: | Success | \ No newline at end of file diff --git a/docs/Models/Operations/CreateSessionRequestBody.md b/docs/Models/Operations/CreateSessionRequestBody.md index 23ba4d60..eec59403 100644 --- a/docs/Models/Operations/CreateSessionRequestBody.md +++ b/docs/Models/Operations/CreateSessionRequestBody.md @@ -3,6 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | -| `UserId` | *string* | :heavy_check_mark: | The ID representing the user | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `UserId` | *string* | :heavy_check_mark: | The ID representing the user | +| `ActiveOrganizationId` | *string* | :heavy_minus_sign: | The ID of the organization to set as active for this session | \ No newline at end of file diff --git a/docs/Models/Operations/DeleteOrganizationPermissionRequest.md b/docs/Models/Operations/DeleteOrganizationPermissionRequest.md new file mode 100644 index 00000000..3e419260 --- /dev/null +++ b/docs/Models/Operations/DeleteOrganizationPermissionRequest.md @@ -0,0 +1,8 @@ +# DeleteOrganizationPermissionRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | +| `PermissionId` | *string* | :heavy_check_mark: | The ID of the permission to delete | \ No newline at end of file diff --git a/docs/Models/Operations/DeleteOrganizationPermissionResponse.md b/docs/Models/Operations/DeleteOrganizationPermissionResponse.md new file mode 100644 index 00000000..0f730fc3 --- /dev/null +++ b/docs/Models/Operations/DeleteOrganizationPermissionResponse.md @@ -0,0 +1,9 @@ +# DeleteOrganizationPermissionResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | +| `HttpMeta` | [HTTPMetadata](../../Models/Components/HTTPMetadata.md) | :heavy_check_mark: | N/A | +| `DeletedObject` | [DeletedObject](../../Models/Components/DeletedObject.md) | :heavy_minus_sign: | Deleted Object | \ No newline at end of file diff --git a/docs/Models/Operations/DeleteOrganizationRoleRequest.md b/docs/Models/Operations/DeleteOrganizationRoleRequest.md new file mode 100644 index 00000000..47c96a40 --- /dev/null +++ b/docs/Models/Operations/DeleteOrganizationRoleRequest.md @@ -0,0 +1,8 @@ +# DeleteOrganizationRoleRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| `OrganizationRoleId` | *string* | :heavy_check_mark: | The ID of the organization role to delete | \ No newline at end of file diff --git a/docs/Models/Operations/DeleteOrganizationRoleResponse.md b/docs/Models/Operations/DeleteOrganizationRoleResponse.md new file mode 100644 index 00000000..c202a12d --- /dev/null +++ b/docs/Models/Operations/DeleteOrganizationRoleResponse.md @@ -0,0 +1,9 @@ +# DeleteOrganizationRoleResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | +| `HttpMeta` | [HTTPMetadata](../../Models/Components/HTTPMetadata.md) | :heavy_check_mark: | N/A | +| `DeletedObject` | [DeletedObject](../../Models/Components/DeletedObject.md) | :heavy_minus_sign: | Deleted Object | \ No newline at end of file diff --git a/docs/Models/Operations/GetOrganizationPermissionRequest.md b/docs/Models/Operations/GetOrganizationPermissionRequest.md new file mode 100644 index 00000000..3ff881ee --- /dev/null +++ b/docs/Models/Operations/GetOrganizationPermissionRequest.md @@ -0,0 +1,8 @@ +# GetOrganizationPermissionRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `PermissionId` | *string* | :heavy_check_mark: | The ID of the permission to retrieve | \ No newline at end of file diff --git a/docs/Models/Operations/GetOrganizationPermissionResponse.md b/docs/Models/Operations/GetOrganizationPermissionResponse.md new file mode 100644 index 00000000..5c4928bf --- /dev/null +++ b/docs/Models/Operations/GetOrganizationPermissionResponse.md @@ -0,0 +1,9 @@ +# GetOrganizationPermissionResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `HttpMeta` | [HTTPMetadata](../../Models/Components/HTTPMetadata.md) | :heavy_check_mark: | N/A | +| `Permission` | [Permission](../../Models/Components/Permission.md) | :heavy_minus_sign: | Success | \ No newline at end of file diff --git a/docs/Models/Operations/GetOrganizationRoleRequest.md b/docs/Models/Operations/GetOrganizationRoleRequest.md new file mode 100644 index 00000000..4b671670 --- /dev/null +++ b/docs/Models/Operations/GetOrganizationRoleRequest.md @@ -0,0 +1,8 @@ +# GetOrganizationRoleRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `OrganizationRoleId` | *string* | :heavy_check_mark: | The ID of the organization role | \ No newline at end of file diff --git a/docs/Models/Operations/GetOrganizationRoleResponse.md b/docs/Models/Operations/GetOrganizationRoleResponse.md new file mode 100644 index 00000000..7eebbd56 --- /dev/null +++ b/docs/Models/Operations/GetOrganizationRoleResponse.md @@ -0,0 +1,9 @@ +# GetOrganizationRoleResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `HttpMeta` | [HTTPMetadata](../../Models/Components/HTTPMetadata.md) | :heavy_check_mark: | N/A | +| `Role` | [Role](../../Models/Components/Role.md) | :heavy_minus_sign: | Success | \ No newline at end of file diff --git a/docs/Models/Operations/ListOrganizationPermissionsRequest.md b/docs/Models/Operations/ListOrganizationPermissionsRequest.md new file mode 100644 index 00000000..252cd99b --- /dev/null +++ b/docs/Models/Operations/ListOrganizationPermissionsRequest.md @@ -0,0 +1,11 @@ +# ListOrganizationPermissionsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Query` | *string* | :heavy_minus_sign: | Returns organization permissions with ID, name, or key that match the given query.
Uses exact match for permission ID and partial match for name and key. | | +| `OrderBy` | *string* | :heavy_minus_sign: | Allows to return organization permissions in a particular order.
At the moment, you can order the returned permissions by their `created_at`, `name`, or `key`.
In order to specify the direction, you can use the `+/-` symbols prepended in the property to order by.
For example, if you want permissions to be returned in descending order according to their `created_at` property, you can use `-created_at`. | | +| `Limit` | *long* | :heavy_minus_sign: | Applies a limit to the number of results returned.
Can be used for paginating the results together with `offset`. | 20 | +| `Offset` | *long* | :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 | \ No newline at end of file diff --git a/docs/Models/Operations/ListOrganizationPermissionsResponse.md b/docs/Models/Operations/ListOrganizationPermissionsResponse.md new file mode 100644 index 00000000..80f8d343 --- /dev/null +++ b/docs/Models/Operations/ListOrganizationPermissionsResponse.md @@ -0,0 +1,9 @@ +# ListOrganizationPermissionsResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `HttpMeta` | [HTTPMetadata](../../Models/Components/HTTPMetadata.md) | :heavy_check_mark: | N/A | +| `Permissions` | [Permissions](../../Models/Components/Permissions.md) | :heavy_minus_sign: | Success | \ No newline at end of file diff --git a/docs/Models/Operations/ListOrganizationRolesRequest.md b/docs/Models/Operations/ListOrganizationRolesRequest.md new file mode 100644 index 00000000..d691fc00 --- /dev/null +++ b/docs/Models/Operations/ListOrganizationRolesRequest.md @@ -0,0 +1,11 @@ +# ListOrganizationRolesRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Query` | *string* | :heavy_minus_sign: | Returns organization roles with ID, name, or key that match the given query.
Uses exact match for organization role ID and partial match for name and key. | | +| `OrderBy` | *string* | :heavy_minus_sign: | Allows to return organization roles in a particular order.
At the moment, you can order the returned organization roles by their `created_at`, `name`, or `key`.
In order to specify the direction, you can use the `+/-` symbols prepended in the property to order by.
For example, if you want organization roles to be returned in descending order according to their `created_at` property, you can use `-created_at`.
If you don't use `+` or `-`, then `+` is implied.
Defaults to `-created_at`. | | +| `Limit` | *long* | :heavy_minus_sign: | Applies a limit to the number of results returned.
Can be used for paginating the results together with `offset`. | 20 | +| `Offset` | *long* | :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 | \ No newline at end of file diff --git a/docs/Models/Operations/ListOrganizationRolesResponse.md b/docs/Models/Operations/ListOrganizationRolesResponse.md new file mode 100644 index 00000000..c96f265b --- /dev/null +++ b/docs/Models/Operations/ListOrganizationRolesResponse.md @@ -0,0 +1,9 @@ +# ListOrganizationRolesResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `HttpMeta` | [HTTPMetadata](../../Models/Components/HTTPMetadata.md) | :heavy_check_mark: | N/A | +| `Roles` | [Roles](../../Models/Components/Roles.md) | :heavy_minus_sign: | Success | \ No newline at end of file diff --git a/docs/Models/Operations/RemovePermissionFromOrganizationRoleRequest.md b/docs/Models/Operations/RemovePermissionFromOrganizationRoleRequest.md new file mode 100644 index 00000000..3305639e --- /dev/null +++ b/docs/Models/Operations/RemovePermissionFromOrganizationRoleRequest.md @@ -0,0 +1,9 @@ +# RemovePermissionFromOrganizationRoleRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | +| `OrganizationRoleId` | *string* | :heavy_check_mark: | The ID of the organization role | +| `PermissionId` | *string* | :heavy_check_mark: | The ID of the permission to remove | \ No newline at end of file diff --git a/docs/Models/Operations/RemovePermissionFromOrganizationRoleResponse.md b/docs/Models/Operations/RemovePermissionFromOrganizationRoleResponse.md new file mode 100644 index 00000000..3d3b939c --- /dev/null +++ b/docs/Models/Operations/RemovePermissionFromOrganizationRoleResponse.md @@ -0,0 +1,9 @@ +# RemovePermissionFromOrganizationRoleResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `HttpMeta` | [HTTPMetadata](../../Models/Components/HTTPMetadata.md) | :heavy_check_mark: | N/A | +| `Role` | [Role](../../Models/Components/Role.md) | :heavy_minus_sign: | Success | \ No newline at end of file diff --git a/docs/Models/Operations/UpdateInstanceAuthConfigRequestBody.md b/docs/Models/Operations/UpdateInstanceAuthConfigRequestBody.md index 0f00c538..0b817f09 100644 --- a/docs/Models/Operations/UpdateInstanceAuthConfigRequestBody.md +++ b/docs/Models/Operations/UpdateInstanceAuthConfigRequestBody.md @@ -8,5 +8,4 @@ | `RestrictedToAllowlist` | *bool* | :heavy_minus_sign: | Whether sign up is restricted to email addresses, phone numbers and usernames that are on the allowlist. | false | | `FromEmailAddress` | *string* | :heavy_minus_sign: | The local part of the email address from which authentication-related emails (e.g. OTP code, magic links) will be sent.
Only alphanumeric values are allowed.
Note that this value should contain only the local part of the address (e.g. `foo` for `foo@example.com`). | noreply | | `ProgressiveSignUp` | *bool* | :heavy_minus_sign: | Enable the Progressive Sign Up algorithm. Refer to the [docs](https://clerk.com/docs/upgrade-guides/progressive-sign-up) for more info. | true | -| `EnhancedEmailDeliverability` | *bool* | :heavy_minus_sign: | The "enhanced_email_deliverability" feature will send emails from "verifications@clerk.dev" instead of your domain.
This can be helpful if you do not have a high domain reputation. | true | | `TestMode` | *bool* | :heavy_minus_sign: | Toggles test mode for this instance, allowing the use of test email addresses and phone numbers.
Defaults to true for development instances. | true | \ No newline at end of file diff --git a/docs/Models/Operations/UpdateInstanceRequestBody.md b/docs/Models/Operations/UpdateInstanceRequestBody.md index f35973e9..4114f708 100644 --- a/docs/Models/Operations/UpdateInstanceRequestBody.md +++ b/docs/Models/Operations/UpdateInstanceRequestBody.md @@ -7,7 +7,6 @@ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `TestMode` | *bool* | :heavy_minus_sign: | Toggles test mode for this instance, allowing the use of test email addresses and phone numbers.
Defaults to true for development instances. | true | | `Hibp` | *bool* | :heavy_minus_sign: | Whether the instance should be using the HIBP service to check passwords for breaches | false | -| `EnhancedEmailDeliverability` | *bool* | :heavy_minus_sign: | The "enhanced_email_deliverability" feature will send emails from "verifications@clerk.dev" instead of your domain.
This can be helpful if you do not have a high domain reputation. | true | | `SupportEmail` | *string* | :heavy_minus_sign: | N/A | support@example.com | | `ClerkJsVersion` | *string* | :heavy_minus_sign: | N/A | 2.3.1 | | `DevelopmentOrigin` | *string* | :heavy_minus_sign: | N/A | http://localhost:3000 | diff --git a/docs/Models/Operations/UpdateOrganizationPermissionRequest.md b/docs/Models/Operations/UpdateOrganizationPermissionRequest.md new file mode 100644 index 00000000..8357c8a3 --- /dev/null +++ b/docs/Models/Operations/UpdateOrganizationPermissionRequest.md @@ -0,0 +1,9 @@ +# UpdateOrganizationPermissionRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | +| `PermissionId` | *string* | :heavy_check_mark: | The ID of the permission to update | +| `RequestBody` | [UpdateOrganizationPermissionRequestBody](../../Models/Operations/UpdateOrganizationPermissionRequestBody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/Models/Operations/UpdateOrganizationPermissionRequestBody.md b/docs/Models/Operations/UpdateOrganizationPermissionRequestBody.md new file mode 100644 index 00000000..9cb37894 --- /dev/null +++ b/docs/Models/Operations/UpdateOrganizationPermissionRequestBody.md @@ -0,0 +1,10 @@ +# UpdateOrganizationPermissionRequestBody + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Name` | *string* | :heavy_minus_sign: | The name of the permission. | +| `Key` | *string* | :heavy_minus_sign: | The key of the permission. Must have the format "org:feature:action" where feature and action are segments consisting of lowercase letters, digits, or underscores. Cannot begin with "org:sys_" as that prefix is reserved for system permissions. | +| `Description` | *string* | :heavy_minus_sign: | A description of the permission. | \ No newline at end of file diff --git a/docs/Models/Operations/UpdateOrganizationPermissionResponse.md b/docs/Models/Operations/UpdateOrganizationPermissionResponse.md new file mode 100644 index 00000000..4977c93f --- /dev/null +++ b/docs/Models/Operations/UpdateOrganizationPermissionResponse.md @@ -0,0 +1,9 @@ +# UpdateOrganizationPermissionResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `HttpMeta` | [HTTPMetadata](../../Models/Components/HTTPMetadata.md) | :heavy_check_mark: | N/A | +| `Permission` | [Permission](../../Models/Components/Permission.md) | :heavy_minus_sign: | Success | \ No newline at end of file diff --git a/docs/Models/Operations/UpdateOrganizationRoleRequest.md b/docs/Models/Operations/UpdateOrganizationRoleRequest.md new file mode 100644 index 00000000..84796473 --- /dev/null +++ b/docs/Models/Operations/UpdateOrganizationRoleRequest.md @@ -0,0 +1,9 @@ +# UpdateOrganizationRoleRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `OrganizationRoleId` | *string* | :heavy_check_mark: | The ID of the organization role to update | +| `RequestBody` | [UpdateOrganizationRoleRequestBody](../../Models/Operations/UpdateOrganizationRoleRequestBody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/Models/Operations/UpdateOrganizationRoleRequestBody.md b/docs/Models/Operations/UpdateOrganizationRoleRequestBody.md new file mode 100644 index 00000000..36ca738f --- /dev/null +++ b/docs/Models/Operations/UpdateOrganizationRoleRequestBody.md @@ -0,0 +1,11 @@ +# UpdateOrganizationRoleRequestBody + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | +| `Name` | *string* | :heavy_minus_sign: | The new name for the organization role | +| `Key` | *string* | :heavy_minus_sign: | A unique key for the organization role. Must start with 'org:' and contain only lowercase alphanumeric characters and underscores. | +| `Description` | *string* | :heavy_minus_sign: | Optional description for the role | +| `Permissions` | List<*string*> | :heavy_minus_sign: | Array of permission IDs to assign to the role. If provided, this will replace the existing permissions. | \ No newline at end of file diff --git a/docs/Models/Operations/UpdateOrganizationRoleResponse.md b/docs/Models/Operations/UpdateOrganizationRoleResponse.md new file mode 100644 index 00000000..c3c0ed80 --- /dev/null +++ b/docs/Models/Operations/UpdateOrganizationRoleResponse.md @@ -0,0 +1,9 @@ +# UpdateOrganizationRoleResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `HttpMeta` | [HTTPMetadata](../../Models/Components/HTTPMetadata.md) | :heavy_check_mark: | N/A | +| `Role` | [Role](../../Models/Components/Role.md) | :heavy_minus_sign: | Success | \ No newline at end of file diff --git a/docs/sdks/betafeatures/README.md b/docs/sdks/betafeatures/README.md index d1141cf1..07c1b8d2 100644 --- a/docs/sdks/betafeatures/README.md +++ b/docs/sdks/betafeatures/README.md @@ -25,7 +25,6 @@ var sdk = new ClerkBackendApi(bearerAuth: ""); UpdateInstanceAuthConfigRequestBody req = new UpdateInstanceAuthConfigRequestBody() { FromEmailAddress = "noreply", ProgressiveSignUp = true, - EnhancedEmailDeliverability = true, TestMode = true, }; diff --git a/docs/sdks/billing/README.md b/docs/sdks/billing/README.md index c517ee9d..4d09c6ab 100644 --- a/docs/sdks/billing/README.md +++ b/docs/sdks/billing/README.md @@ -5,11 +5,140 @@ ### Available Operations +* [ListPlans](#listplans) - List all billing plans +* [ListSubscriptionItems](#listsubscriptionitems) - List all subscription items +* [CancelSubscriptionItem](#cancelsubscriptionitem) - Cancel a subscription item * [ExtendSubscriptionItemFreeTrial](#extendsubscriptionitemfreetrial) - Extend free trial for a subscription item * [ListStatements](#liststatements) - List all billing statements * [GetStatement](#getstatement) - Retrieve a billing statement * [GetStatementPaymentAttempts](#getstatementpaymentattempts) - List payment attempts for a billing statement +## ListPlans + +Returns a list of all billing plans for the instance. The plans are returned sorted by creation date, +with the newest plans appearing first. This includes both free and paid plans. Pagination is supported. + +### Example Usage + + +```csharp +using Clerk.BackendAPI; +using Clerk.BackendAPI.Models.Components; + +var sdk = new ClerkBackendApi(bearerAuth: ""); + +var res = await sdk.Billing.ListPlansAsync( + limit: 20, + offset: 10 +); + +// handle response +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | +| `Paginated` | *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` | *long* | :heavy_minus_sign: | Applies a limit to the number of results returned.
Can be used for paginating the results together with `offset`. | 20 | +| `Offset` | *long* | :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 | +| `PayerType` | [PayerType](../../Models/Operations/PayerType.md) | :heavy_minus_sign: | Filter plans by payer type | | + +### Response + +**[GetCommercePlanListResponse](../../Models/Operations/GetCommercePlanListResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| Clerk.BackendAPI.Models.Errors.ClerkErrors | 400, 401, 422 | application/json | +| Clerk.BackendAPI.Models.Errors.ClerkErrors | 500 | application/json | +| Clerk.BackendAPI.Models.Errors.SDKError | 4XX, 5XX | \*/\* | + +## ListSubscriptionItems + +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 + + +```csharp +using Clerk.BackendAPI; +using Clerk.BackendAPI.Models.Components; +using Clerk.BackendAPI.Models.Operations; + +var sdk = new ClerkBackendApi(bearerAuth: ""); + +GetCommerceSubscriptionItemListRequest req = new GetCommerceSubscriptionItemListRequest() { + Limit = 20, + Offset = 10, +}; + +var res = await sdk.Billing.ListSubscriptionItemsAsync(req); + +// handle response +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | +| `request` | [GetCommerceSubscriptionItemListRequest](../../Models/Operations/GetCommerceSubscriptionItemListRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[GetCommerceSubscriptionItemListResponse](../../Models/Operations/GetCommerceSubscriptionItemListResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| Clerk.BackendAPI.Models.Errors.ClerkErrors | 400, 401, 422 | application/json | +| Clerk.BackendAPI.Models.Errors.ClerkErrors | 500 | application/json | +| Clerk.BackendAPI.Models.Errors.SDKError | 4XX, 5XX | \*/\* | + +## CancelSubscriptionItem + +Cancel a specific subscription item. The subscription item can be canceled immediately or at the end of the current billing period. + +### Example Usage + + +```csharp +using Clerk.BackendAPI; +using Clerk.BackendAPI.Models.Components; + +var sdk = new ClerkBackendApi(bearerAuth: ""); + +var res = await sdk.Billing.CancelSubscriptionItemAsync( + subscriptionItemId: "", + endNow: false +); + +// handle response +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | +| `SubscriptionItemId` | *string* | :heavy_check_mark: | The ID of the subscription item to cancel | +| `EndNow` | *bool* | :heavy_minus_sign: | Whether to cancel the subscription immediately (true) or at the end of the current billing period (false, default) | + +### Response + +**[CancelCommerceSubscriptionItemResponse](../../Models/Operations/CancelCommerceSubscriptionItemResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| Clerk.BackendAPI.Models.Errors.ClerkErrors | 400, 401, 403, 404, 422 | application/json | +| Clerk.BackendAPI.Models.Errors.ClerkErrors | 500 | application/json | +| Clerk.BackendAPI.Models.Errors.SDKError | 4XX, 5XX | \*/\* | + ## ExtendSubscriptionItemFreeTrial Extends the free trial period for a specific subscription item to the specified timestamp. diff --git a/docs/sdks/commerce/README.md b/docs/sdks/commerce/README.md deleted file mode 100644 index 8c1552f9..00000000 --- a/docs/sdks/commerce/README.md +++ /dev/null @@ -1,136 +0,0 @@ -# Commerce -(*Commerce*) - -## Overview - -### Available Operations - -* [ListPlans](#listplans) - List all commerce plans -* [ListSubscriptionItems](#listsubscriptionitems) - List all subscription items -* [CancelSubscriptionItem](#cancelsubscriptionitem) - Cancel a subscription item - -## ListPlans - -Returns a list of all commerce plans for the instance. The plans are returned sorted by creation date, -with the newest plans appearing first. This includes both free and paid plans. Pagination is supported. - -### Example Usage - - -```csharp -using Clerk.BackendAPI; -using Clerk.BackendAPI.Models.Components; - -var sdk = new ClerkBackendApi(bearerAuth: ""); - -var res = await sdk.Commerce.ListPlansAsync( - limit: 20, - offset: 10 -); - -// handle response -``` - -### Parameters - -| Parameter | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | -| `Paginated` | *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` | *long* | :heavy_minus_sign: | Applies a limit to the number of results returned.
Can be used for paginating the results together with `offset`. | 20 | -| `Offset` | *long* | :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 | -| `PayerType` | [PayerType](../../Models/Operations/PayerType.md) | :heavy_minus_sign: | Filter plans by payer type | | - -### Response - -**[GetCommercePlanListResponse](../../Models/Operations/GetCommercePlanListResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| Clerk.BackendAPI.Models.Errors.ClerkErrors | 400, 401, 422 | application/json | -| Clerk.BackendAPI.Models.Errors.ClerkErrors | 500 | application/json | -| Clerk.BackendAPI.Models.Errors.SDKError | 4XX, 5XX | \*/\* | - -## ListSubscriptionItems - -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 - - -```csharp -using Clerk.BackendAPI; -using Clerk.BackendAPI.Models.Components; -using Clerk.BackendAPI.Models.Operations; - -var sdk = new ClerkBackendApi(bearerAuth: ""); - -GetCommerceSubscriptionItemListRequest req = new GetCommerceSubscriptionItemListRequest() { - Limit = 20, - Offset = 10, -}; - -var res = await sdk.Commerce.ListSubscriptionItemsAsync(req); - -// handle response -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | -| `request` | [GetCommerceSubscriptionItemListRequest](../../Models/Operations/GetCommerceSubscriptionItemListRequest.md) | :heavy_check_mark: | The request object to use for the request. | - -### Response - -**[GetCommerceSubscriptionItemListResponse](../../Models/Operations/GetCommerceSubscriptionItemListResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| Clerk.BackendAPI.Models.Errors.ClerkErrors | 400, 401, 422 | application/json | -| Clerk.BackendAPI.Models.Errors.ClerkErrors | 500 | application/json | -| Clerk.BackendAPI.Models.Errors.SDKError | 4XX, 5XX | \*/\* | - -## CancelSubscriptionItem - -Cancel a specific subscription item. The subscription item can be canceled immediately or at the end of the current billing period. - -### Example Usage - - -```csharp -using Clerk.BackendAPI; -using Clerk.BackendAPI.Models.Components; - -var sdk = new ClerkBackendApi(bearerAuth: ""); - -var res = await sdk.Commerce.CancelSubscriptionItemAsync( - subscriptionItemId: "", - endNow: false -); - -// handle response -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | -| `SubscriptionItemId` | *string* | :heavy_check_mark: | The ID of the subscription item to cancel | -| `EndNow` | *bool* | :heavy_minus_sign: | Whether to cancel the subscription immediately (true) or at the end of the current billing period (false, default) | - -### Response - -**[CancelCommerceSubscriptionItemResponse](../../Models/Operations/CancelCommerceSubscriptionItemResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| Clerk.BackendAPI.Models.Errors.ClerkErrors | 400, 401, 403, 404, 422 | application/json | -| Clerk.BackendAPI.Models.Errors.ClerkErrors | 500 | application/json | -| Clerk.BackendAPI.Models.Errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/instancesettings/README.md b/docs/sdks/instancesettings/README.md index 13f0edb6..8aa96356 100644 --- a/docs/sdks/instancesettings/README.md +++ b/docs/sdks/instancesettings/README.md @@ -57,7 +57,6 @@ var sdk = new ClerkBackendApi(bearerAuth: ""); UpdateInstanceRequestBody req = new UpdateInstanceRequestBody() { TestMode = true, Hibp = false, - EnhancedEmailDeliverability = true, SupportEmail = "support@example.com", ClerkJsVersion = "2.3.1", DevelopmentOrigin = "http://localhost:3000", diff --git a/docs/sdks/invitations/README.md b/docs/sdks/invitations/README.md index d8f5d109..748219f1 100644 --- a/docs/sdks/invitations/README.md +++ b/docs/sdks/invitations/README.md @@ -105,6 +105,8 @@ invitations as emails by setting the `notify` parameter to `true`. There cannot of the email addresses you provide unless you set `ignore_existing` to `true` for specific email addresses. Please note that there must be no existing user for any of the email addresses you provide, and this rule cannot be bypassed. +This endpoint is limited to a maximum of 10 invitations per API call. If you need to send more invitations, please make multiple requests. + ### Example Usage diff --git a/docs/sdks/organizationinvitations/README.md b/docs/sdks/organizationinvitations/README.md index 0ed0feb8..8f201e28 100644 --- a/docs/sdks/organizationinvitations/README.md +++ b/docs/sdks/organizationinvitations/README.md @@ -178,6 +178,9 @@ var res = await sdk.OrganizationInvitations.ListAsync(req); ## BulkCreate Creates new organization invitations in bulk and sends out emails to the provided email addresses with a link to accept the invitation and join the organization. + +This endpoint is limited to a maximum of 10 invitations per API call. If you need to send more invitations, please make multiple requests. + You can specify a different `role` for each invited organization member. New organization invitations get a "pending" status until they are revoked by an organization administrator or accepted by the invitee. The request body supports passing an optional `redirect_url` parameter for each invitation. diff --git a/docs/sdks/organizationpermissions/README.md b/docs/sdks/organizationpermissions/README.md new file mode 100644 index 00000000..a232c9b0 --- /dev/null +++ b/docs/sdks/organizationpermissions/README.md @@ -0,0 +1,206 @@ +# OrganizationPermissions +(*OrganizationPermissions*) + +## Overview + +### Available Operations + +* [List](#list) - Get a list of all organization permissions +* [Create](#create) - Create a new organization permission +* [Get](#get) - Get an organization permission +* [Update](#update) - Update an organization permission +* [Delete](#delete) - Delete an organization permission + +## List + +Retrieves all organization permissions for the given instance. + +### Example Usage + + +```csharp +using Clerk.BackendAPI; +using Clerk.BackendAPI.Models.Components; + +var sdk = new ClerkBackendApi(bearerAuth: ""); + +var res = await sdk.OrganizationPermissions.ListAsync( + limit: 20, + offset: 10 +); + +// handle response +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Query` | *string* | :heavy_minus_sign: | Returns organization permissions with ID, name, or key that match the given query.
Uses exact match for permission ID and partial match for name and key. | | +| `OrderBy` | *string* | :heavy_minus_sign: | Allows to return organization permissions in a particular order.
At the moment, you can order the returned permissions by their `created_at`, `name`, or `key`.
In order to specify the direction, you can use the `+/-` symbols prepended in the property to order by.
For example, if you want permissions to be returned in descending order according to their `created_at` property, you can use `-created_at`. | | +| `Limit` | *long* | :heavy_minus_sign: | Applies a limit to the number of results returned.
Can be used for paginating the results together with `offset`. | 20 | +| `Offset` | *long* | :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 | + +### Response + +**[ListOrganizationPermissionsResponse](../../Models/Operations/ListOrganizationPermissionsResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| Clerk.BackendAPI.Models.Errors.ClerkErrors | 401, 422 | application/json | +| Clerk.BackendAPI.Models.Errors.SDKError | 4XX, 5XX | \*/\* | + +## Create + +Creates a new organization permission for the given instance. + +### Example Usage + + +```csharp +using Clerk.BackendAPI; +using Clerk.BackendAPI.Models.Components; +using Clerk.BackendAPI.Models.Operations; + +var sdk = new ClerkBackendApi(bearerAuth: ""); + +CreateOrganizationPermissionRequestBody req = new CreateOrganizationPermissionRequestBody() { + Name = "", + Key = "", +}; + +var res = await sdk.OrganizationPermissions.CreateAsync(req); + +// handle response +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | +| `request` | [CreateOrganizationPermissionRequestBody](../../Models/Operations/CreateOrganizationPermissionRequestBody.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[CreateOrganizationPermissionResponse](../../Models/Operations/CreateOrganizationPermissionResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| Clerk.BackendAPI.Models.Errors.ClerkErrors | 400, 401, 402, 404, 422 | application/json | +| Clerk.BackendAPI.Models.Errors.SDKError | 4XX, 5XX | \*/\* | + +## Get + +Retrieves the details of an organization permission. + +### Example Usage + + +```csharp +using Clerk.BackendAPI; +using Clerk.BackendAPI.Models.Components; + +var sdk = new ClerkBackendApi(bearerAuth: ""); + +var res = await sdk.OrganizationPermissions.GetAsync(permissionId: ""); + +// handle response +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `PermissionId` | *string* | :heavy_check_mark: | The ID of the permission to retrieve | + +### Response + +**[GetOrganizationPermissionResponse](../../Models/Operations/GetOrganizationPermissionResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| Clerk.BackendAPI.Models.Errors.ClerkErrors | 401, 404 | application/json | +| Clerk.BackendAPI.Models.Errors.SDKError | 4XX, 5XX | \*/\* | + +## Update + +Updates the properties of an existing organization permission. +System permissions cannot be updated. + +### Example Usage + + +```csharp +using Clerk.BackendAPI; +using Clerk.BackendAPI.Models.Components; +using Clerk.BackendAPI.Models.Operations; + +var sdk = new ClerkBackendApi(bearerAuth: ""); + +var res = await sdk.OrganizationPermissions.UpdateAsync( + permissionId: "", + requestBody: new UpdateOrganizationPermissionRequestBody() {} +); + +// handle response +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | +| `PermissionId` | *string* | :heavy_check_mark: | The ID of the permission to update | +| `RequestBody` | [UpdateOrganizationPermissionRequestBody](../../Models/Operations/UpdateOrganizationPermissionRequestBody.md) | :heavy_check_mark: | N/A | + +### Response + +**[UpdateOrganizationPermissionResponse](../../Models/Operations/UpdateOrganizationPermissionResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| Clerk.BackendAPI.Models.Errors.ClerkErrors | 400, 401, 403, 404, 422 | application/json | +| Clerk.BackendAPI.Models.Errors.SDKError | 4XX, 5XX | \*/\* | + +## Delete + +Deletes an organization permission. +System permissions cannot be deleted. + +### Example Usage + + +```csharp +using Clerk.BackendAPI; +using Clerk.BackendAPI.Models.Components; + +var sdk = new ClerkBackendApi(bearerAuth: ""); + +var res = await sdk.OrganizationPermissions.DeleteAsync(permissionId: ""); + +// handle response +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | +| `PermissionId` | *string* | :heavy_check_mark: | The ID of the permission to delete | + +### Response + +**[DeleteOrganizationPermissionResponse](../../Models/Operations/DeleteOrganizationPermissionResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| Clerk.BackendAPI.Models.Errors.ClerkErrors | 401, 403, 404 | application/json | +| Clerk.BackendAPI.Models.Errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/organizationroles/README.md b/docs/sdks/organizationroles/README.md new file mode 100644 index 00000000..874a3862 --- /dev/null +++ b/docs/sdks/organizationroles/README.md @@ -0,0 +1,295 @@ +# OrganizationRoles +(*OrganizationRoles*) + +## Overview + +### Available Operations + +* [List](#list) - Get a list of organization roles +* [Create](#create) - Create an organization role +* [Get](#get) - Retrieve an organization role +* [Update](#update) - Update an organization role +* [Delete](#delete) - Delete an organization role +* [AssignPermission](#assignpermission) - Assign a permission to an organization role +* [RemovePermission](#removepermission) - Remove a permission from an organization role + +## List + +This request returns the list of organization roles for the instance. +Results can be paginated using the optional `limit` and `offset` query parameters. +The organization roles are ordered by descending creation date. +Most recent roles will be returned first. + +### Example Usage + + +```csharp +using Clerk.BackendAPI; +using Clerk.BackendAPI.Models.Components; + +var sdk = new ClerkBackendApi(bearerAuth: ""); + +var res = await sdk.OrganizationRoles.ListAsync( + orderBy: "-created_at", + limit: 20, + offset: 10 +); + +// handle response +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Query` | *string* | :heavy_minus_sign: | Returns organization roles with ID, name, or key that match the given query.
Uses exact match for organization role ID and partial match for name and key. | | +| `OrderBy` | *string* | :heavy_minus_sign: | Allows to return organization roles in a particular order.
At the moment, you can order the returned organization roles by their `created_at`, `name`, or `key`.
In order to specify the direction, you can use the `+/-` symbols prepended in the property to order by.
For example, if you want organization roles to be returned in descending order according to their `created_at` property, you can use `-created_at`.
If you don't use `+` or `-`, then `+` is implied.
Defaults to `-created_at`. | | +| `Limit` | *long* | :heavy_minus_sign: | Applies a limit to the number of results returned.
Can be used for paginating the results together with `offset`. | 20 | +| `Offset` | *long* | :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 | + +### Response + +**[ListOrganizationRolesResponse](../../Models/Operations/ListOrganizationRolesResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| Clerk.BackendAPI.Models.Errors.ClerkErrors | 400, 401, 403, 422 | application/json | +| Clerk.BackendAPI.Models.Errors.SDKError | 4XX, 5XX | \*/\* | + +## Create + +Creates a new organization role with the given name and permissions for an instance. +The key must be unique for the instance and start with the 'org:' prefix, followed by lowercase alphanumeric characters and underscores only. +You can optionally provide a description for the role and specify whether it should be included in the initial role set. +Organization roles support permissions that can be assigned to control access within the organization. + +### Example Usage + + +```csharp +using Clerk.BackendAPI; +using Clerk.BackendAPI.Models.Components; +using Clerk.BackendAPI.Models.Operations; + +var sdk = new ClerkBackendApi(bearerAuth: ""); + +CreateOrganizationRoleRequestBody req = new CreateOrganizationRoleRequestBody() { + Name = "", + Key = "", +}; + +var res = await sdk.OrganizationRoles.CreateAsync(req); + +// handle response +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `request` | [CreateOrganizationRoleRequestBody](../../Models/Operations/CreateOrganizationRoleRequestBody.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[CreateOrganizationRoleResponse](../../Models/Operations/CreateOrganizationRoleResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| Clerk.BackendAPI.Models.Errors.ClerkErrors | 400, 401, 402, 403, 404, 422 | application/json | +| Clerk.BackendAPI.Models.Errors.SDKError | 4XX, 5XX | \*/\* | + +## Get + +Use this request to retrieve an existing organization role by its ID. + +### Example Usage + + +```csharp +using Clerk.BackendAPI; +using Clerk.BackendAPI.Models.Components; + +var sdk = new ClerkBackendApi(bearerAuth: ""); + +var res = await sdk.OrganizationRoles.GetAsync(organizationRoleId: ""); + +// handle response +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `OrganizationRoleId` | *string* | :heavy_check_mark: | The ID of the organization role | + +### Response + +**[GetOrganizationRoleResponse](../../Models/Operations/GetOrganizationRoleResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| Clerk.BackendAPI.Models.Errors.ClerkErrors | 401, 403, 404 | application/json | +| Clerk.BackendAPI.Models.Errors.SDKError | 4XX, 5XX | \*/\* | + +## Update + +Updates an existing organization role. +You can update the name, key, description, and permissions of the role. +All parameters are optional - you can update only the fields you want to change. +If the role is used as a creator role or domain default role, updating the key will cascade the update to the organization settings. + +### Example Usage + + +```csharp +using Clerk.BackendAPI; +using Clerk.BackendAPI.Models.Components; +using Clerk.BackendAPI.Models.Operations; + +var sdk = new ClerkBackendApi(bearerAuth: ""); + +var res = await sdk.OrganizationRoles.UpdateAsync( + organizationRoleId: "", + requestBody: new UpdateOrganizationRoleRequestBody() {} +); + +// handle response +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `OrganizationRoleId` | *string* | :heavy_check_mark: | The ID of the organization role to update | +| `RequestBody` | [UpdateOrganizationRoleRequestBody](../../Models/Operations/UpdateOrganizationRoleRequestBody.md) | :heavy_check_mark: | N/A | + +### Response + +**[UpdateOrganizationRoleResponse](../../Models/Operations/UpdateOrganizationRoleResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| Clerk.BackendAPI.Models.Errors.ClerkErrors | 400, 401, 403, 404, 422 | application/json | +| Clerk.BackendAPI.Models.Errors.SDKError | 4XX, 5XX | \*/\* | + +## Delete + +Deletes the organization role. +The role cannot be deleted if it is currently used as the default creator role, domain default role, assigned to any members, or exists in any invitations. + +### Example Usage + + +```csharp +using Clerk.BackendAPI; +using Clerk.BackendAPI.Models.Components; + +var sdk = new ClerkBackendApi(bearerAuth: ""); + +var res = await sdk.OrganizationRoles.DeleteAsync(organizationRoleId: ""); + +// handle response +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| `OrganizationRoleId` | *string* | :heavy_check_mark: | The ID of the organization role to delete | + +### Response + +**[DeleteOrganizationRoleResponse](../../Models/Operations/DeleteOrganizationRoleResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| Clerk.BackendAPI.Models.Errors.ClerkErrors | 401, 403, 404, 422 | application/json | +| Clerk.BackendAPI.Models.Errors.SDKError | 4XX, 5XX | \*/\* | + +## AssignPermission + +Assigns a permission to an organization role + +### Example Usage + + +```csharp +using Clerk.BackendAPI; +using Clerk.BackendAPI.Models.Components; + +var sdk = new ClerkBackendApi(bearerAuth: ""); + +var res = await sdk.OrganizationRoles.AssignPermissionAsync( + organizationRoleId: "", + permissionId: "" +); + +// handle response +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | +| `OrganizationRoleId` | *string* | :heavy_check_mark: | The ID of the organization role | +| `PermissionId` | *string* | :heavy_check_mark: | The ID of the permission to assign | + +### Response + +**[AssignPermissionToOrganizationRoleResponse](../../Models/Operations/AssignPermissionToOrganizationRoleResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| Clerk.BackendAPI.Models.Errors.ClerkErrors | 401, 403, 404, 409 | application/json | +| Clerk.BackendAPI.Models.Errors.SDKError | 4XX, 5XX | \*/\* | + +## RemovePermission + +Removes a permission from an organization role + +### Example Usage + + +```csharp +using Clerk.BackendAPI; +using Clerk.BackendAPI.Models.Components; + +var sdk = new ClerkBackendApi(bearerAuth: ""); + +var res = await sdk.OrganizationRoles.RemovePermissionAsync( + organizationRoleId: "", + permissionId: "" +); + +// handle response +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | +| `OrganizationRoleId` | *string* | :heavy_check_mark: | The ID of the organization role | +| `PermissionId` | *string* | :heavy_check_mark: | The ID of the permission to remove | + +### Response + +**[RemovePermissionFromOrganizationRoleResponse](../../Models/Operations/RemovePermissionFromOrganizationRoleResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| Clerk.BackendAPI.Models.Errors.ClerkErrors | 401, 403, 404, 422 | application/json | +| Clerk.BackendAPI.Models.Errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/organizations/README.md b/docs/sdks/organizations/README.md index 9cef115b..c999ec11 100644 --- a/docs/sdks/organizations/README.md +++ b/docs/sdks/organizations/README.md @@ -221,6 +221,9 @@ Deletes the given organization. Please note that deleting an organization will also delete all memberships and invitations. This is not reversible. +After the organization is deleted, any user's active sessions that contain the deleted +organization will be cleared. + ### Example Usage diff --git a/src/Clerk/BackendAPI/ActorTokens.cs b/src/Clerk/BackendAPI/ActorTokens.cs index cf03fe69..ecb351dc 100644 --- a/src/Clerk/BackendAPI/ActorTokens.cs +++ b/src/Clerk/BackendAPI/ActorTokens.cs @@ -48,10 +48,11 @@ public interface IActorTokens public class ActorTokens: IActorTokens { public SDKConfig SDKConfiguration { get; private set; } - private const string _language = "csharp"; - private const string _sdkVersion = "0.14.0"; - private const string _sdkGenVersion = "2.748.0"; - private const string _openapiDocVersion = "2025-11-10"; + + private const string _language = Constants.Language; + private const string _sdkVersion = Constants.SdkVersion; + private const string _sdkGenVersion = Constants.SdkGenVersion; + private const string _openapiDocVersion = Constants.OpenApiDocVersion; public ActorTokens(SDKConfig config) { @@ -215,7 +216,7 @@ public async Task RevokeAsync(string actorTokenId, Ret ActorTokenId = actorTokenId, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/actor_tokens/{actor_token_id}/revoke", request); + var urlString = URLBuilder.Build(baseUrl, "/actor_tokens/{actor_token_id}/revoke", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); diff --git a/src/Clerk/BackendAPI/AllowlistIdentifiers.cs b/src/Clerk/BackendAPI/AllowlistIdentifiers.cs index fbe1e37c..c6e87f18 100644 --- a/src/Clerk/BackendAPI/AllowlistIdentifiers.cs +++ b/src/Clerk/BackendAPI/AllowlistIdentifiers.cs @@ -56,10 +56,11 @@ public interface IAllowlistIdentifiers public class AllowlistIdentifiers: IAllowlistIdentifiers { public SDKConfig SDKConfiguration { get; private set; } - private const string _language = "csharp"; - private const string _sdkVersion = "0.14.0"; - private const string _sdkGenVersion = "2.748.0"; - private const string _openapiDocVersion = "2025-11-10"; + + private const string _language = Constants.Language; + private const string _sdkVersion = Constants.SdkVersion; + private const string _sdkGenVersion = Constants.SdkGenVersion; + private const string _openapiDocVersion = Constants.OpenApiDocVersion; public AllowlistIdentifiers(SDKConfig config) { @@ -75,7 +76,7 @@ public async Task ListAsync(bool? paginated = Offset = offset, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/allowlist_identifiers", request); + var urlString = URLBuilder.Build(baseUrl, "/allowlist_identifiers", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -372,7 +373,7 @@ public async Task DeleteAsync(string identifi IdentifierId = identifierId, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/allowlist_identifiers/{identifier_id}", request); + var urlString = URLBuilder.Build(baseUrl, "/allowlist_identifiers/{identifier_id}", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Delete, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); diff --git a/src/Clerk/BackendAPI/BetaFeatures.cs b/src/Clerk/BackendAPI/BetaFeatures.cs index 35978504..155ddf69 100644 --- a/src/Clerk/BackendAPI/BetaFeatures.cs +++ b/src/Clerk/BackendAPI/BetaFeatures.cs @@ -51,10 +51,11 @@ public interface IBetaFeatures public class BetaFeatures: IBetaFeatures { public SDKConfig SDKConfiguration { get; private set; } - private const string _language = "csharp"; - private const string _sdkVersion = "0.14.0"; - private const string _sdkGenVersion = "2.748.0"; - private const string _openapiDocVersion = "2025-11-10"; + + private const string _language = Constants.Language; + private const string _sdkVersion = Constants.SdkVersion; + private const string _sdkGenVersion = Constants.SdkGenVersion; + private const string _openapiDocVersion = Constants.OpenApiDocVersion; public BetaFeatures(SDKConfig config) { diff --git a/src/Clerk/BackendAPI/Billing.cs b/src/Clerk/BackendAPI/Billing.cs index 40296103..a5c05c8a 100644 --- a/src/Clerk/BackendAPI/Billing.cs +++ b/src/Clerk/BackendAPI/Billing.cs @@ -25,6 +25,35 @@ namespace Clerk.BackendAPI public interface IBilling { + /// + /// List all billing plans + /// + /// + /// Returns a list of all billing plans for the instance. The plans are returned sorted by creation date,
+ /// with the newest plans appearing first. This includes both free and paid plans. Pagination is supported. + ///
+ ///
+ Task ListPlansAsync(bool? paginated = null, long? limit = 10, long? offset = 0, PayerType? payerType = null, RetryConfig? retryConfig = null); + + /// + /// 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. + ///
+ ///
+ Task ListSubscriptionItemsAsync(GetCommerceSubscriptionItemListRequest? request = null, RetryConfig? retryConfig = null); + + /// + /// Cancel a subscription item + /// + /// + /// Cancel a specific subscription item. The subscription item can be canceled immediately or at the end of the current billing period. + /// + /// + Task CancelSubscriptionItemAsync(string subscriptionItemId, bool? endNow = false, RetryConfig? retryConfig = null); + /// /// Extend free trial for a subscription item /// @@ -70,16 +99,518 @@ public interface IBilling public class Billing: IBilling { public SDKConfig SDKConfiguration { get; private set; } - private const string _language = "csharp"; - private const string _sdkVersion = "0.14.0"; - private const string _sdkGenVersion = "2.748.0"; - private const string _openapiDocVersion = "2025-11-10"; + + private const string _language = Constants.Language; + private const string _sdkVersion = Constants.SdkVersion; + private const string _sdkGenVersion = Constants.SdkGenVersion; + private const string _openapiDocVersion = Constants.OpenApiDocVersion; public Billing(SDKConfig config) { SDKConfiguration = config; } + public async Task ListPlansAsync(bool? paginated = null, long? limit = 10, long? offset = 0, PayerType? payerType = null, RetryConfig? retryConfig = null) + { + var request = new GetCommercePlanListRequest() + { + Paginated = paginated, + Limit = limit, + Offset = offset, + PayerType = payerType, + }; + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); + var urlString = URLBuilder.Build(baseUrl, "/billing/plans", request, null); + + var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); + httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); + + if (SDKConfiguration.SecuritySource != null) + { + httpRequest = new SecurityMetadata(SDKConfiguration.SecuritySource).Apply(httpRequest); + } + + var hookCtx = new HookContext(SDKConfiguration, baseUrl, "GetCommercePlanList", null, SDKConfiguration.SecuritySource); + + httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); + if (retryConfig == null) + { + if (this.SDKConfiguration.RetryConfig != null) + { + retryConfig = this.SDKConfiguration.RetryConfig; + } + else + { + var backoff = new BackoffStrategy( + initialIntervalMs: 500L, + maxIntervalMs: 60000L, + maxElapsedTimeMs: 3600000L, + exponent: 1.5 + ); + retryConfig = new RetryConfig( + strategy: RetryConfig.RetryStrategy.BACKOFF, + backoff: backoff, + retryConnectionErrors: true + ); + } + } + + List statusCodes = new List + { + "5XX", + }; + + Func> retrySend = async () => + { + var _httpRequest = await SDKConfiguration.Client.CloneAsync(httpRequest); + return await SDKConfiguration.Client.SendAsync(_httpRequest); + }; + var retries = new Clerk.BackendAPI.Utils.Retries.Retries(retrySend, retryConfig, statusCodes); + + HttpResponseMessage httpResponse; + try + { + httpResponse = await retries.Run(); + int _statusCode = (int)httpResponse.StatusCode; + + if (_statusCode == 400 || _statusCode == 401 || _statusCode == 422 || _statusCode >= 400 && _statusCode < 500 || _statusCode == 500 || _statusCode >= 500 && _statusCode < 600) + { + var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + } + } + catch (Exception error) + { + var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + else + { + throw; + } + } + + httpResponse = await this.SDKConfiguration.Hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var httpResponseBody = await httpResponse.Content.ReadAsStringAsync(); + PaginatedCommercePlanResponse obj; + try + { + obj = ResponseBodyDeserializer.DeserializeNotNull(httpResponseBody, NullValueHandling.Include); + } + catch (Exception ex) + { + throw new ResponseValidationException("Failed to deserialize response body into PaginatedCommercePlanResponse.", httpRequest, httpResponse, httpResponseBody, ex); + } + + var response = new GetCommercePlanListResponse() + { + HttpMeta = new Models.Components.HTTPMetadata() + { + Response = httpResponse, + Request = httpRequest + } + }; + response.PaginatedCommercePlanResponse = obj; + return response; + } + + throw new Models.Errors.SDKError("Unknown content type received", httpRequest, httpResponse, await httpResponse.Content.ReadAsStringAsync()); + } + else if(new List{400, 401, 422}.Contains(responseStatusCode)) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var httpResponseBody = await httpResponse.Content.ReadAsStringAsync(); + ClerkErrorsPayload payload; + try + { + payload = ResponseBodyDeserializer.DeserializeNotNull(httpResponseBody, NullValueHandling.Include); + } + catch (Exception ex) + { + throw new ResponseValidationException("Failed to deserialize response body into ClerkErrorsPayload.", httpRequest, httpResponse, httpResponseBody, ex); + } + + throw new ClerkErrors(payload, httpRequest, httpResponse, httpResponseBody); + } + + throw new Models.Errors.SDKError("Unknown content type received", httpRequest, httpResponse, await httpResponse.Content.ReadAsStringAsync()); + } + else if(responseStatusCode == 500) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var httpResponseBody = await httpResponse.Content.ReadAsStringAsync(); + ClerkErrorsPayload payload; + try + { + payload = ResponseBodyDeserializer.DeserializeNotNull(httpResponseBody, NullValueHandling.Include); + } + catch (Exception ex) + { + throw new ResponseValidationException("Failed to deserialize response body into ClerkErrorsPayload.", httpRequest, httpResponse, httpResponseBody, ex); + } + + throw new ClerkErrors(payload, httpRequest, httpResponse, httpResponseBody); + } + + throw new Models.Errors.SDKError("Unknown content type received", httpRequest, httpResponse, await httpResponse.Content.ReadAsStringAsync()); + } + else if(responseStatusCode >= 400 && responseStatusCode < 500) + { + throw new Models.Errors.SDKError("API error occurred", httpRequest, httpResponse, await httpResponse.Content.ReadAsStringAsync()); + } + else if(responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new Models.Errors.SDKError("API error occurred", httpRequest, httpResponse, await httpResponse.Content.ReadAsStringAsync()); + } + + throw new Models.Errors.SDKError("Unknown status code received", httpRequest, httpResponse, await httpResponse.Content.ReadAsStringAsync()); + } + + public async Task ListSubscriptionItemsAsync(GetCommerceSubscriptionItemListRequest? request = null, RetryConfig? retryConfig = null) + { + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); + var urlString = URLBuilder.Build(baseUrl, "/billing/subscription_items", request, null); + + var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); + httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); + + if (SDKConfiguration.SecuritySource != null) + { + httpRequest = new SecurityMetadata(SDKConfiguration.SecuritySource).Apply(httpRequest); + } + + var hookCtx = new HookContext(SDKConfiguration, baseUrl, "GetCommerceSubscriptionItemList", null, SDKConfiguration.SecuritySource); + + httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); + if (retryConfig == null) + { + if (this.SDKConfiguration.RetryConfig != null) + { + retryConfig = this.SDKConfiguration.RetryConfig; + } + else + { + var backoff = new BackoffStrategy( + initialIntervalMs: 500L, + maxIntervalMs: 60000L, + maxElapsedTimeMs: 3600000L, + exponent: 1.5 + ); + retryConfig = new RetryConfig( + strategy: RetryConfig.RetryStrategy.BACKOFF, + backoff: backoff, + retryConnectionErrors: true + ); + } + } + + List statusCodes = new List + { + "5XX", + }; + + Func> retrySend = async () => + { + var _httpRequest = await SDKConfiguration.Client.CloneAsync(httpRequest); + return await SDKConfiguration.Client.SendAsync(_httpRequest); + }; + var retries = new Clerk.BackendAPI.Utils.Retries.Retries(retrySend, retryConfig, statusCodes); + + HttpResponseMessage httpResponse; + try + { + httpResponse = await retries.Run(); + int _statusCode = (int)httpResponse.StatusCode; + + if (_statusCode == 400 || _statusCode == 401 || _statusCode == 422 || _statusCode >= 400 && _statusCode < 500 || _statusCode == 500 || _statusCode >= 500 && _statusCode < 600) + { + var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + } + } + catch (Exception error) + { + var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + else + { + throw; + } + } + + httpResponse = await this.SDKConfiguration.Hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var httpResponseBody = await httpResponse.Content.ReadAsStringAsync(); + PaginatedCommerceSubscriptionItemResponse obj; + try + { + obj = ResponseBodyDeserializer.DeserializeNotNull(httpResponseBody, NullValueHandling.Include); + } + catch (Exception ex) + { + throw new ResponseValidationException("Failed to deserialize response body into PaginatedCommerceSubscriptionItemResponse.", httpRequest, httpResponse, httpResponseBody, ex); + } + + var response = new GetCommerceSubscriptionItemListResponse() + { + HttpMeta = new Models.Components.HTTPMetadata() + { + Response = httpResponse, + Request = httpRequest + } + }; + response.PaginatedCommerceSubscriptionItemResponse = obj; + return response; + } + + throw new Models.Errors.SDKError("Unknown content type received", httpRequest, httpResponse, await httpResponse.Content.ReadAsStringAsync()); + } + else if(new List{400, 401, 422}.Contains(responseStatusCode)) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var httpResponseBody = await httpResponse.Content.ReadAsStringAsync(); + ClerkErrorsPayload payload; + try + { + payload = ResponseBodyDeserializer.DeserializeNotNull(httpResponseBody, NullValueHandling.Include); + } + catch (Exception ex) + { + throw new ResponseValidationException("Failed to deserialize response body into ClerkErrorsPayload.", httpRequest, httpResponse, httpResponseBody, ex); + } + + throw new ClerkErrors(payload, httpRequest, httpResponse, httpResponseBody); + } + + throw new Models.Errors.SDKError("Unknown content type received", httpRequest, httpResponse, await httpResponse.Content.ReadAsStringAsync()); + } + else if(responseStatusCode == 500) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var httpResponseBody = await httpResponse.Content.ReadAsStringAsync(); + ClerkErrorsPayload payload; + try + { + payload = ResponseBodyDeserializer.DeserializeNotNull(httpResponseBody, NullValueHandling.Include); + } + catch (Exception ex) + { + throw new ResponseValidationException("Failed to deserialize response body into ClerkErrorsPayload.", httpRequest, httpResponse, httpResponseBody, ex); + } + + throw new ClerkErrors(payload, httpRequest, httpResponse, httpResponseBody); + } + + throw new Models.Errors.SDKError("Unknown content type received", httpRequest, httpResponse, await httpResponse.Content.ReadAsStringAsync()); + } + else if(responseStatusCode >= 400 && responseStatusCode < 500) + { + throw new Models.Errors.SDKError("API error occurred", httpRequest, httpResponse, await httpResponse.Content.ReadAsStringAsync()); + } + else if(responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new Models.Errors.SDKError("API error occurred", httpRequest, httpResponse, await httpResponse.Content.ReadAsStringAsync()); + } + + throw new Models.Errors.SDKError("Unknown status code received", httpRequest, httpResponse, await httpResponse.Content.ReadAsStringAsync()); + } + + public async Task CancelSubscriptionItemAsync(string subscriptionItemId, bool? endNow = false, RetryConfig? retryConfig = null) + { + var request = new CancelCommerceSubscriptionItemRequest() + { + SubscriptionItemId = subscriptionItemId, + EndNow = endNow, + }; + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); + var urlString = URLBuilder.Build(baseUrl, "/billing/subscription_items/{subscription_item_id}", request, null); + + var httpRequest = new HttpRequestMessage(HttpMethod.Delete, urlString); + httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); + + if (SDKConfiguration.SecuritySource != null) + { + httpRequest = new SecurityMetadata(SDKConfiguration.SecuritySource).Apply(httpRequest); + } + + var hookCtx = new HookContext(SDKConfiguration, baseUrl, "CancelCommerceSubscriptionItem", null, SDKConfiguration.SecuritySource); + + httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); + if (retryConfig == null) + { + if (this.SDKConfiguration.RetryConfig != null) + { + retryConfig = this.SDKConfiguration.RetryConfig; + } + else + { + var backoff = new BackoffStrategy( + initialIntervalMs: 500L, + maxIntervalMs: 60000L, + maxElapsedTimeMs: 3600000L, + exponent: 1.5 + ); + retryConfig = new RetryConfig( + strategy: RetryConfig.RetryStrategy.BACKOFF, + backoff: backoff, + retryConnectionErrors: true + ); + } + } + + List statusCodes = new List + { + "5XX", + }; + + Func> retrySend = async () => + { + var _httpRequest = await SDKConfiguration.Client.CloneAsync(httpRequest); + return await SDKConfiguration.Client.SendAsync(_httpRequest); + }; + var retries = new Clerk.BackendAPI.Utils.Retries.Retries(retrySend, retryConfig, statusCodes); + + HttpResponseMessage httpResponse; + try + { + httpResponse = await retries.Run(); + int _statusCode = (int)httpResponse.StatusCode; + + if (_statusCode == 400 || _statusCode == 401 || _statusCode == 403 || _statusCode == 404 || _statusCode == 422 || _statusCode >= 400 && _statusCode < 500 || _statusCode == 500 || _statusCode >= 500 && _statusCode < 600) + { + var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + } + } + catch (Exception error) + { + var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + else + { + throw; + } + } + + httpResponse = await this.SDKConfiguration.Hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var httpResponseBody = await httpResponse.Content.ReadAsStringAsync(); + CommerceSubscriptionItem obj; + try + { + obj = ResponseBodyDeserializer.DeserializeNotNull(httpResponseBody, NullValueHandling.Ignore); + } + catch (Exception ex) + { + throw new ResponseValidationException("Failed to deserialize response body into CommerceSubscriptionItem.", httpRequest, httpResponse, httpResponseBody, ex); + } + + var response = new CancelCommerceSubscriptionItemResponse() + { + HttpMeta = new Models.Components.HTTPMetadata() + { + Response = httpResponse, + Request = httpRequest + } + }; + response.CommerceSubscriptionItem = obj; + return response; + } + + throw new Models.Errors.SDKError("Unknown content type received", httpRequest, httpResponse, await httpResponse.Content.ReadAsStringAsync()); + } + else if(new List{400, 401, 403, 404, 422}.Contains(responseStatusCode)) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var httpResponseBody = await httpResponse.Content.ReadAsStringAsync(); + ClerkErrorsPayload payload; + try + { + payload = ResponseBodyDeserializer.DeserializeNotNull(httpResponseBody, NullValueHandling.Ignore); + } + catch (Exception ex) + { + throw new ResponseValidationException("Failed to deserialize response body into ClerkErrorsPayload.", httpRequest, httpResponse, httpResponseBody, ex); + } + + throw new ClerkErrors(payload, httpRequest, httpResponse, httpResponseBody); + } + + throw new Models.Errors.SDKError("Unknown content type received", httpRequest, httpResponse, await httpResponse.Content.ReadAsStringAsync()); + } + else if(responseStatusCode == 500) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var httpResponseBody = await httpResponse.Content.ReadAsStringAsync(); + ClerkErrorsPayload payload; + try + { + payload = ResponseBodyDeserializer.DeserializeNotNull(httpResponseBody, NullValueHandling.Ignore); + } + catch (Exception ex) + { + throw new ResponseValidationException("Failed to deserialize response body into ClerkErrorsPayload.", httpRequest, httpResponse, httpResponseBody, ex); + } + + throw new ClerkErrors(payload, httpRequest, httpResponse, httpResponseBody); + } + + throw new Models.Errors.SDKError("Unknown content type received", httpRequest, httpResponse, await httpResponse.Content.ReadAsStringAsync()); + } + else if(responseStatusCode >= 400 && responseStatusCode < 500) + { + throw new Models.Errors.SDKError("API error occurred", httpRequest, httpResponse, await httpResponse.Content.ReadAsStringAsync()); + } + else if(responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new Models.Errors.SDKError("API error occurred", httpRequest, httpResponse, await httpResponse.Content.ReadAsStringAsync()); + } + + throw new Models.Errors.SDKError("Unknown status code received", httpRequest, httpResponse, await httpResponse.Content.ReadAsStringAsync()); + } + public async Task ExtendSubscriptionItemFreeTrialAsync(string subscriptionItemId, ExtendFreeTrialRequest extendFreeTrialRequest, RetryConfig? retryConfig = null) { var request = new ExtendBillingSubscriptionItemFreeTrialRequest() @@ -88,7 +619,7 @@ public async Task ExtendSubscrip ExtendFreeTrialRequest = extendFreeTrialRequest, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/billing/subscription_items/{subscription_item_id}/extend_free_trial", request); + var urlString = URLBuilder.Build(baseUrl, "/billing/subscription_items/{subscription_item_id}/extend_free_trial", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -263,7 +794,7 @@ public async Task ListStatementsAsync(bool? pag Offset = offset, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/billing/statements", request); + var urlString = URLBuilder.Build(baseUrl, "/billing/statements", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -430,7 +961,7 @@ public async Task GetStatementAsync(string statemen StatementID = statementID, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/billing/statements/{statementID}", request); + var urlString = URLBuilder.Build(baseUrl, "/billing/statements/{statementID}", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -600,7 +1131,7 @@ public async Task GetStatementPaymen Offset = offset, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/billing/statements/{statementID}/payment_attempts", request); + var urlString = URLBuilder.Build(baseUrl, "/billing/statements/{statementID}/payment_attempts", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); diff --git a/src/Clerk/BackendAPI/BlocklistIdentifiers.cs b/src/Clerk/BackendAPI/BlocklistIdentifiers.cs index 2df4dd47..6673f972 100644 --- a/src/Clerk/BackendAPI/BlocklistIdentifiers.cs +++ b/src/Clerk/BackendAPI/BlocklistIdentifiers.cs @@ -56,10 +56,11 @@ public interface IBlocklistIdentifiers public class BlocklistIdentifiers: IBlocklistIdentifiers { public SDKConfig SDKConfiguration { get; private set; } - private const string _language = "csharp"; - private const string _sdkVersion = "0.14.0"; - private const string _sdkGenVersion = "2.748.0"; - private const string _openapiDocVersion = "2025-11-10"; + + private const string _language = Constants.Language; + private const string _sdkVersion = Constants.SdkVersion; + private const string _sdkGenVersion = Constants.SdkGenVersion; + private const string _openapiDocVersion = Constants.OpenApiDocVersion; public BlocklistIdentifiers(SDKConfig config) { @@ -367,7 +368,7 @@ public async Task DeleteAsync(string identifi IdentifierId = identifierId, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/blocklist_identifiers/{identifier_id}", request); + var urlString = URLBuilder.Build(baseUrl, "/blocklist_identifiers/{identifier_id}", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Delete, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); diff --git a/src/Clerk/BackendAPI/Clerk.BackendAPI.csproj b/src/Clerk/BackendAPI/Clerk.BackendAPI.csproj index 1f21595b..7d532827 100644 --- a/src/Clerk/BackendAPI/Clerk.BackendAPI.csproj +++ b/src/Clerk/BackendAPI/Clerk.BackendAPI.csproj @@ -3,7 +3,7 @@ true Clerk.BackendAPI - 0.14.0 + 0.15.0 net8.0 Clerk Copyright (c) Clerk 2025 diff --git a/src/Clerk/BackendAPI/ClerkBackendApi.cs b/src/Clerk/BackendAPI/ClerkBackendApi.cs index f2201b55..96ee320d 100644 --- a/src/Clerk/BackendAPI/ClerkBackendApi.cs +++ b/src/Clerk/BackendAPI/ClerkBackendApi.cs @@ -33,7 +33,7 @@ namespace Clerk.BackendAPI /// Please see https://clerk.com/docs for more information. /// /// - /// https://clerk.com/docs} + /// https://clerk.com/docs /// public interface IClerkBackendApi { @@ -59,6 +59,7 @@ public interface IClerkBackendApi public IJwtTemplates JwtTemplates { get; } public IMachines Machines { get; } public IOrganizations Organizations { get; } + public IOrganizationRoles OrganizationRoles { get; } public IOrganizationMemberships OrganizationMemberships { get; } public IOrganizationDomains OrganizationDomains { get; } public IProxyChecks ProxyChecks { get; } @@ -69,8 +70,8 @@ public interface IClerkBackendApi public ISamlConnections SamlConnections { get; } public ITestingTokens TestingTokens { get; } public IWaitlistEntries WaitlistEntries { get; } - public ICommerce Commerce { get; } public IBilling Billing { get; } + public IOrganizationPermissions OrganizationPermissions { get; } public IM2m M2m { get; } public IOauthAccessTokens OauthAccessTokens { get; } } @@ -89,16 +90,16 @@ public interface IClerkBackendApi /// Please see https://clerk.com/docs for more information. /// /// - /// https://clerk.com/docs} + /// https://clerk.com/docs /// public class ClerkBackendApi: IClerkBackendApi { public SDKConfig SDKConfiguration { get; private set; } - private const string _language = "csharp"; - private const string _sdkVersion = "0.14.0"; - private const string _sdkGenVersion = "2.748.0"; - private const string _openapiDocVersion = "2025-11-10"; + private const string _language = Constants.Language; + private const string _sdkVersion = Constants.SdkVersion; + private const string _sdkGenVersion = Constants.SdkGenVersion; + private const string _openapiDocVersion = Constants.OpenApiDocVersion; public IMiscellaneous Miscellaneous { get; private set; } public IJwks Jwks { get; private set; } public IClients Clients { get; private set; } @@ -121,6 +122,7 @@ public class ClerkBackendApi: IClerkBackendApi public IJwtTemplates JwtTemplates { get; private set; } public IMachines Machines { get; private set; } public IOrganizations Organizations { get; private set; } + public IOrganizationRoles OrganizationRoles { get; private set; } public IOrganizationMemberships OrganizationMemberships { get; private set; } public IOrganizationDomains OrganizationDomains { get; private set; } public IProxyChecks ProxyChecks { get; private set; } @@ -131,8 +133,8 @@ public class ClerkBackendApi: IClerkBackendApi public ISamlConnections SamlConnections { get; private set; } public ITestingTokens TestingTokens { get; private set; } public IWaitlistEntries WaitlistEntries { get; private set; } - public ICommerce Commerce { get; private set; } public IBilling Billing { get; private set; } + public IOrganizationPermissions OrganizationPermissions { get; private set; } public IM2m M2m { get; private set; } public IOauthAccessTokens OauthAccessTokens { get; private set; } @@ -185,6 +187,8 @@ public ClerkBackendApi(SDKConfig config) Organizations = new Organizations(SDKConfiguration); + OrganizationRoles = new OrganizationRoles(SDKConfiguration); + OrganizationMemberships = new OrganizationMemberships(SDKConfiguration); OrganizationDomains = new OrganizationDomains(SDKConfiguration); @@ -205,10 +209,10 @@ public ClerkBackendApi(SDKConfig config) WaitlistEntries = new WaitlistEntries(SDKConfiguration); - Commerce = new Commerce(SDKConfiguration); - Billing = new Billing(SDKConfiguration); + OrganizationPermissions = new OrganizationPermissions(SDKConfiguration); + M2m = new M2m(SDKConfiguration); OauthAccessTokens = new OauthAccessTokens(SDKConfiguration); @@ -307,6 +311,8 @@ public ClerkBackendApi(string? bearerAuth = null, Func? bearerAuthSource Organizations = new Organizations(SDKConfiguration); + OrganizationRoles = new OrganizationRoles(SDKConfiguration); + OrganizationMemberships = new OrganizationMemberships(SDKConfiguration); OrganizationDomains = new OrganizationDomains(SDKConfiguration); @@ -327,10 +333,10 @@ public ClerkBackendApi(string? bearerAuth = null, Func? bearerAuthSource WaitlistEntries = new WaitlistEntries(SDKConfiguration); - Commerce = new Commerce(SDKConfiguration); - Billing = new Billing(SDKConfiguration); + OrganizationPermissions = new OrganizationPermissions(SDKConfiguration); + M2m = new M2m(SDKConfiguration); OauthAccessTokens = new OauthAccessTokens(SDKConfiguration); diff --git a/src/Clerk/BackendAPI/Clients.cs b/src/Clerk/BackendAPI/Clients.cs index 8b41f795..adc14c84 100644 --- a/src/Clerk/BackendAPI/Clients.cs +++ b/src/Clerk/BackendAPI/Clients.cs @@ -58,10 +58,11 @@ public interface IClients public class Clients: IClients { public SDKConfig SDKConfiguration { get; private set; } - private const string _language = "csharp"; - private const string _sdkVersion = "0.14.0"; - private const string _sdkGenVersion = "2.748.0"; - private const string _openapiDocVersion = "2025-11-10"; + + private const string _language = Constants.Language; + private const string _sdkVersion = Constants.SdkVersion; + private const string _sdkGenVersion = Constants.SdkGenVersion; + private const string _openapiDocVersion = Constants.OpenApiDocVersion; public Clients(SDKConfig config) { @@ -78,7 +79,7 @@ public async Task ListAsync(bool? paginated = null, long? Offset = offset, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/clients", request); + var urlString = URLBuilder.Build(baseUrl, "/clients", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -375,7 +376,7 @@ public async Task GetAsync(string clientId, RetryConfig? retr ClientId = clientId, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/clients/{client_id}", request); + var urlString = URLBuilder.Build(baseUrl, "/clients/{client_id}", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); diff --git a/src/Clerk/BackendAPI/Domains.cs b/src/Clerk/BackendAPI/Domains.cs index 1c381ce7..4fe47684 100644 --- a/src/Clerk/BackendAPI/Domains.cs +++ b/src/Clerk/BackendAPI/Domains.cs @@ -78,10 +78,11 @@ public interface IDomains public class Domains: IDomains { public SDKConfig SDKConfiguration { get; private set; } - private const string _language = "csharp"; - private const string _sdkVersion = "0.14.0"; - private const string _sdkGenVersion = "2.748.0"; - private const string _openapiDocVersion = "2025-11-10"; + + private const string _language = Constants.Language; + private const string _sdkVersion = Constants.SdkVersion; + private const string _sdkGenVersion = Constants.SdkGenVersion; + private const string _openapiDocVersion = Constants.OpenApiDocVersion; public Domains(SDKConfig config) { @@ -369,7 +370,7 @@ public async Task DeleteAsync(string domainId, RetryConfig DomainId = domainId, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/domains/{domain_id}", request); + var urlString = URLBuilder.Build(baseUrl, "/domains/{domain_id}", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Delete, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -517,7 +518,7 @@ public async Task UpdateAsync(string domainId, UpdateDomai RequestBody = requestBody, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/domains/{domain_id}", request); + var urlString = URLBuilder.Build(baseUrl, "/domains/{domain_id}", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Patch, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); diff --git a/src/Clerk/BackendAPI/EmailAddresses.cs b/src/Clerk/BackendAPI/EmailAddresses.cs index b8b21af4..63e55f6b 100644 --- a/src/Clerk/BackendAPI/EmailAddresses.cs +++ b/src/Clerk/BackendAPI/EmailAddresses.cs @@ -65,10 +65,11 @@ public interface IEmailAddresses public class EmailAddresses: IEmailAddresses { public SDKConfig SDKConfiguration { get; private set; } - private const string _language = "csharp"; - private const string _sdkVersion = "0.14.0"; - private const string _sdkGenVersion = "2.748.0"; - private const string _openapiDocVersion = "2025-11-10"; + + private const string _language = Constants.Language; + private const string _sdkVersion = Constants.SdkVersion; + private const string _sdkGenVersion = Constants.SdkGenVersion; + private const string _openapiDocVersion = Constants.OpenApiDocVersion; public EmailAddresses(SDKConfig config) { @@ -232,7 +233,7 @@ public async Task GetAsync(string emailAddressId, Retry EmailAddressId = emailAddressId, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/email_addresses/{email_address_id}", request); + var urlString = URLBuilder.Build(baseUrl, "/email_addresses/{email_address_id}", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -379,7 +380,7 @@ public async Task DeleteAsync(string emailAddressId, EmailAddressId = emailAddressId, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/email_addresses/{email_address_id}", request); + var urlString = URLBuilder.Build(baseUrl, "/email_addresses/{email_address_id}", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Delete, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -527,7 +528,7 @@ public async Task UpdateAsync(string emailAddressId, RequestBody = requestBody, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/email_addresses/{email_address_id}", request); + var urlString = URLBuilder.Build(baseUrl, "/email_addresses/{email_address_id}", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Patch, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); diff --git a/src/Clerk/BackendAPI/EmailAndSmsTemplates.cs b/src/Clerk/BackendAPI/EmailAndSmsTemplates.cs index 553ba771..c58f7bc7 100644 --- a/src/Clerk/BackendAPI/EmailAndSmsTemplates.cs +++ b/src/Clerk/BackendAPI/EmailAndSmsTemplates.cs @@ -38,10 +38,11 @@ public interface IEmailAndSmsTemplates public class EmailAndSmsTemplates: IEmailAndSmsTemplates { public SDKConfig SDKConfiguration { get; private set; } - private const string _language = "csharp"; - private const string _sdkVersion = "0.14.0"; - private const string _sdkGenVersion = "2.748.0"; - private const string _openapiDocVersion = "2025-11-10"; + + private const string _language = Constants.Language; + private const string _sdkVersion = Constants.SdkVersion; + private const string _sdkGenVersion = Constants.SdkGenVersion; + private const string _openapiDocVersion = Constants.OpenApiDocVersion; public EmailAndSmsTemplates(SDKConfig config) { @@ -58,7 +59,7 @@ public async Task UpsertAsync(UpsertTemplatePathParamTem RequestBody = requestBody, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/templates/{template_type}/{slug}", request); + var urlString = URLBuilder.Build(baseUrl, "/templates/{template_type}/{slug}", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Put, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); diff --git a/src/Clerk/BackendAPI/EmailSMSTemplates.cs b/src/Clerk/BackendAPI/EmailSMSTemplates.cs index 39416cf3..18afba25 100644 --- a/src/Clerk/BackendAPI/EmailSMSTemplates.cs +++ b/src/Clerk/BackendAPI/EmailSMSTemplates.cs @@ -68,10 +68,11 @@ public interface IEmailSMSTemplates public class EmailSMSTemplates: IEmailSMSTemplates { public SDKConfig SDKConfiguration { get; private set; } - private const string _language = "csharp"; - private const string _sdkVersion = "0.14.0"; - private const string _sdkGenVersion = "2.748.0"; - private const string _openapiDocVersion = "2025-11-10"; + + private const string _language = Constants.Language; + private const string _sdkVersion = Constants.SdkVersion; + private const string _sdkGenVersion = Constants.SdkGenVersion; + private const string _openapiDocVersion = Constants.OpenApiDocVersion; public EmailSMSTemplates(SDKConfig config) { @@ -89,7 +90,7 @@ public async Task ListAsync(TemplateType templateType, Offset = offset, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/templates/{template_type}", request); + var urlString = URLBuilder.Build(baseUrl, "/templates/{template_type}", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -238,7 +239,7 @@ public async Task GetAsync(PathParamTemplateType templateTy Slug = slug, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/templates/{template_type}/{slug}", request); + var urlString = URLBuilder.Build(baseUrl, "/templates/{template_type}/{slug}", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -387,7 +388,7 @@ public async Task RevertAsync(RevertTemplatePathParamTem Slug = slug, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/templates/{template_type}/{slug}/revert", request); + var urlString = URLBuilder.Build(baseUrl, "/templates/{template_type}/{slug}/revert", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -537,7 +538,7 @@ public async Task ToggleTemplateDeliveryAsync(To RequestBody = requestBody, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/templates/{template_type}/{slug}/toggle_delivery", request); + var urlString = URLBuilder.Build(baseUrl, "/templates/{template_type}/{slug}/toggle_delivery", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); diff --git a/src/Clerk/BackendAPI/InstanceSettings.cs b/src/Clerk/BackendAPI/InstanceSettings.cs index 640e4ca3..ca9cabf4 100644 --- a/src/Clerk/BackendAPI/InstanceSettings.cs +++ b/src/Clerk/BackendAPI/InstanceSettings.cs @@ -78,10 +78,11 @@ public interface IInstanceSettings public class InstanceSettings: IInstanceSettings { public SDKConfig SDKConfiguration { get; private set; } - private const string _language = "csharp"; - private const string _sdkVersion = "0.14.0"; - private const string _sdkGenVersion = "2.748.0"; - private const string _openapiDocVersion = "2025-11-10"; + + private const string _language = Constants.Language; + private const string _sdkVersion = Constants.SdkVersion; + private const string _sdkGenVersion = Constants.SdkGenVersion; + private const string _openapiDocVersion = Constants.OpenApiDocVersion; public InstanceSettings(SDKConfig config) { diff --git a/src/Clerk/BackendAPI/Invitations.cs b/src/Clerk/BackendAPI/Invitations.cs index f3cef58f..5d98b81f 100644 --- a/src/Clerk/BackendAPI/Invitations.cs +++ b/src/Clerk/BackendAPI/Invitations.cs @@ -52,7 +52,9 @@ public interface IInvitations /// Use this API operation to create multiple invitations for the provided email addresses. You can choose to send the
/// invitations as emails by setting the `notify` parameter to `true`. There cannot be an existing invitation for any
/// of the email addresses you provide unless you set `ignore_existing` to `true` for specific email addresses. Please
- /// note that there must be no existing user for any of the email addresses you provide, and this rule cannot be bypassed. + /// note that there must be no existing user for any of the email addresses you provide, and this rule cannot be bypassed.
+ ///
+ /// This endpoint is limited to a maximum of 10 invitations per API call. If you need to send more invitations, please make multiple requests. /// /// Task BulkCreateAsync(List? request = null, RetryConfig? retryConfig = null); @@ -73,10 +75,11 @@ public interface IInvitations public class Invitations: IInvitations { public SDKConfig SDKConfiguration { get; private set; } - private const string _language = "csharp"; - private const string _sdkVersion = "0.14.0"; - private const string _sdkGenVersion = "2.748.0"; - private const string _openapiDocVersion = "2025-11-10"; + + private const string _language = Constants.Language; + private const string _sdkVersion = Constants.SdkVersion; + private const string _sdkGenVersion = Constants.SdkGenVersion; + private const string _openapiDocVersion = Constants.OpenApiDocVersion; public Invitations(SDKConfig config) { @@ -236,7 +239,7 @@ public async Task CreateAsync(CreateInvitationRequestB public async Task ListAsync(ListInvitationsRequest? request = null, RetryConfig? retryConfig = null) { string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/invitations", request); + var urlString = URLBuilder.Build(baseUrl, "/invitations", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -513,7 +516,7 @@ public async Task RevokeAsync(string invitationId, Ret InvitationId = invitationId, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/invitations/{invitation_id}/revoke", request); + var urlString = URLBuilder.Build(baseUrl, "/invitations/{invitation_id}/revoke", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); diff --git a/src/Clerk/BackendAPI/Jwks.cs b/src/Clerk/BackendAPI/Jwks.cs index fffe77a3..536ebff0 100644 --- a/src/Clerk/BackendAPI/Jwks.cs +++ b/src/Clerk/BackendAPI/Jwks.cs @@ -37,10 +37,11 @@ public interface IJwks public class Jwks: IJwks { public SDKConfig SDKConfiguration { get; private set; } - private const string _language = "csharp"; - private const string _sdkVersion = "0.14.0"; - private const string _sdkGenVersion = "2.748.0"; - private const string _openapiDocVersion = "2025-11-10"; + + private const string _language = Constants.Language; + private const string _sdkVersion = Constants.SdkVersion; + private const string _sdkGenVersion = Constants.SdkGenVersion; + private const string _openapiDocVersion = Constants.OpenApiDocVersion; public Jwks(SDKConfig config) { diff --git a/src/Clerk/BackendAPI/JwtTemplates.cs b/src/Clerk/BackendAPI/JwtTemplates.cs index bfc6e969..74861187 100644 --- a/src/Clerk/BackendAPI/JwtTemplates.cs +++ b/src/Clerk/BackendAPI/JwtTemplates.cs @@ -66,10 +66,11 @@ public interface IJwtTemplates public class JwtTemplates: IJwtTemplates { public SDKConfig SDKConfiguration { get; private set; } - private const string _language = "csharp"; - private const string _sdkVersion = "0.14.0"; - private const string _sdkGenVersion = "2.748.0"; - private const string _openapiDocVersion = "2025-11-10"; + + private const string _language = Constants.Language; + private const string _sdkVersion = Constants.SdkVersion; + private const string _sdkGenVersion = Constants.SdkGenVersion; + private const string _openapiDocVersion = Constants.OpenApiDocVersion; public JwtTemplates(SDKConfig config) { @@ -85,7 +86,7 @@ public async Task ListAsync(bool? paginated = null, lo Offset = offset, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/jwt_templates", request); + var urlString = URLBuilder.Build(baseUrl, "/jwt_templates", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -362,7 +363,7 @@ public async Task GetAsync(string templateId, RetryConfi TemplateId = templateId, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/jwt_templates/{template_id}", request); + var urlString = URLBuilder.Build(baseUrl, "/jwt_templates/{template_id}", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -510,7 +511,7 @@ public async Task UpdateAsync(string templateId, Upda RequestBody = requestBody, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/jwt_templates/{template_id}", request); + var urlString = URLBuilder.Build(baseUrl, "/jwt_templates/{template_id}", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Patch, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -663,7 +664,7 @@ public async Task DeleteAsync(string templateId, Retr TemplateId = templateId, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/jwt_templates/{template_id}", request); + var urlString = URLBuilder.Build(baseUrl, "/jwt_templates/{template_id}", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Delete, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); diff --git a/src/Clerk/BackendAPI/M2m.cs b/src/Clerk/BackendAPI/M2m.cs index 16d0464e..a309dead 100644 --- a/src/Clerk/BackendAPI/M2m.cs +++ b/src/Clerk/BackendAPI/M2m.cs @@ -80,10 +80,11 @@ public interface IM2m public class M2m: IM2m { public SDKConfig SDKConfiguration { get; private set; } - private const string _language = "csharp"; - private const string _sdkVersion = "0.14.0"; - private const string _sdkGenVersion = "2.748.0"; - private const string _openapiDocVersion = "2025-11-10"; + + private const string _language = Constants.Language; + private const string _sdkVersion = Constants.SdkVersion; + private const string _sdkGenVersion = Constants.SdkGenVersion; + private const string _openapiDocVersion = Constants.OpenApiDocVersion; public M2m(SDKConfig config) { @@ -275,7 +276,7 @@ public async Task CreateTokenAsync(CreateM2MTokenRequest public async Task ListTokensAsync(GetM2MTokensRequest request, RetryConfig? retryConfig = null) { string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/m2m_tokens", request); + var urlString = URLBuilder.Build(baseUrl, "/m2m_tokens", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -481,7 +482,7 @@ public async Task RevokeTokenAsync(string m2mTokenId, Re RequestBody = requestBody, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/m2m_tokens/{m2m_token_id}/revoke", request); + var urlString = URLBuilder.Build(baseUrl, "/m2m_tokens/{m2m_token_id}/revoke", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); diff --git a/src/Clerk/BackendAPI/Machines.cs b/src/Clerk/BackendAPI/Machines.cs index b6531b13..29beca86 100644 --- a/src/Clerk/BackendAPI/Machines.cs +++ b/src/Clerk/BackendAPI/Machines.cs @@ -116,10 +116,11 @@ public interface IMachines public class Machines: IMachines { public SDKConfig SDKConfiguration { get; private set; } - private const string _language = "csharp"; - private const string _sdkVersion = "0.14.0"; - private const string _sdkGenVersion = "2.748.0"; - private const string _openapiDocVersion = "2025-11-10"; + + private const string _language = Constants.Language; + private const string _sdkVersion = Constants.SdkVersion; + private const string _sdkGenVersion = Constants.SdkGenVersion; + private const string _openapiDocVersion = Constants.OpenApiDocVersion; public Machines(SDKConfig config) { @@ -136,7 +137,7 @@ public async Task ListAsync(long? limit = 10, long? offset OrderBy = orderBy, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/machines", request); + var urlString = URLBuilder.Build(baseUrl, "/machines", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -433,7 +434,7 @@ public async Task GetAsync(string machineId, RetryConfig? re MachineId = machineId, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/machines/{machine_id}", request); + var urlString = URLBuilder.Build(baseUrl, "/machines/{machine_id}", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -581,7 +582,7 @@ public async Task UpdateAsync(string machineId, UpdateMac RequestBody = requestBody, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/machines/{machine_id}", request); + var urlString = URLBuilder.Build(baseUrl, "/machines/{machine_id}", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Patch, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -734,7 +735,7 @@ public async Task DeleteAsync(string machineId, RetryConf MachineId = machineId, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/machines/{machine_id}", request); + var urlString = URLBuilder.Build(baseUrl, "/machines/{machine_id}", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Delete, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -881,7 +882,7 @@ public async Task GetSecretKeyAsync(string machineI MachineId = machineId, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/machines/{machine_id}/secret_key", request); + var urlString = URLBuilder.Build(baseUrl, "/machines/{machine_id}/secret_key", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -1029,7 +1030,7 @@ public async Task RotateSecretKeyAsync(string ma RequestBody = requestBody, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/machines/{machine_id}/secret_key/rotate", request); + var urlString = URLBuilder.Build(baseUrl, "/machines/{machine_id}/secret_key/rotate", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -1183,7 +1184,7 @@ public async Task CreateScopeAsync(string machineId, RequestBody = requestBody, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/machines/{machine_id}/scopes", request); + var urlString = URLBuilder.Build(baseUrl, "/machines/{machine_id}/scopes", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -1337,7 +1338,7 @@ public async Task DeleteScopeAsync(string machineId, OtherMachineId = otherMachineId, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/machines/{machine_id}/scopes/{other_machine_id}", request); + var urlString = URLBuilder.Build(baseUrl, "/machines/{machine_id}/scopes/{other_machine_id}", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Delete, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); diff --git a/src/Clerk/BackendAPI/Miscellaneous.cs b/src/Clerk/BackendAPI/Miscellaneous.cs index 77f35fee..7a8c4a26 100644 --- a/src/Clerk/BackendAPI/Miscellaneous.cs +++ b/src/Clerk/BackendAPI/Miscellaneous.cs @@ -38,10 +38,11 @@ public interface IMiscellaneous public class Miscellaneous: IMiscellaneous { public SDKConfig SDKConfiguration { get; private set; } - private const string _language = "csharp"; - private const string _sdkVersion = "0.14.0"; - private const string _sdkGenVersion = "2.748.0"; - private const string _openapiDocVersion = "2025-11-10"; + + private const string _language = Constants.Language; + private const string _sdkVersion = Constants.SdkVersion; + private const string _sdkGenVersion = Constants.SdkGenVersion; + private const string _openapiDocVersion = Constants.OpenApiDocVersion; public Miscellaneous(SDKConfig config) { @@ -51,7 +52,7 @@ public Miscellaneous(SDKConfig config) public async Task GetPublicInterstitialAsync(GetPublicInterstitialRequest? request = null, RetryConfig? retryConfig = null) { string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/public/interstitial", request); + var urlString = URLBuilder.Build(baseUrl, "/public/interstitial", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); diff --git a/src/Clerk/BackendAPI/Models/Components/ClerkErrorErrorEnterpriseAccountMeta.cs b/src/Clerk/BackendAPI/Models/Components/ClerkErrorErrorEnterpriseAccountMeta.cs new file mode 100644 index 00000000..73ba31df --- /dev/null +++ b/src/Clerk/BackendAPI/Models/Components/ClerkErrorErrorEnterpriseAccountMeta.cs @@ -0,0 +1,17 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Clerk.BackendAPI.Models.Components +{ + using Clerk.BackendAPI.Utils; + + public class ClerkErrorErrorEnterpriseAccountMeta + { + } +} \ No newline at end of file diff --git a/src/Clerk/BackendAPI/Models/Components/ClerkErrorErrorEnterpriseAccountVerificationMeta.cs b/src/Clerk/BackendAPI/Models/Components/ClerkErrorErrorEnterpriseAccountVerificationMeta.cs new file mode 100644 index 00000000..7e7814d3 --- /dev/null +++ b/src/Clerk/BackendAPI/Models/Components/ClerkErrorErrorEnterpriseAccountVerificationMeta.cs @@ -0,0 +1,17 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Clerk.BackendAPI.Models.Components +{ + using Clerk.BackendAPI.Utils; + + public class ClerkErrorErrorEnterpriseAccountVerificationMeta + { + } +} \ No newline at end of file diff --git a/src/Clerk/BackendAPI/Models/Components/CommercePlan.cs b/src/Clerk/BackendAPI/Models/Components/CommercePlan.cs index c5602df0..111aad62 100644 --- a/src/Clerk/BackendAPI/Models/Components/CommercePlan.cs +++ b/src/Clerk/BackendAPI/Models/Components/CommercePlan.cs @@ -12,6 +12,7 @@ namespace Clerk.BackendAPI.Models.Components using Clerk.BackendAPI.Models.Components; using Clerk.BackendAPI.Utils; using Newtonsoft.Json; + using System; using System.Collections.Generic; public class CommercePlan @@ -53,6 +54,7 @@ public class CommercePlan /// /// The ID of the product this plan belongs to. /// + [Obsolete("This field will be removed in a future release, please migrate away from it as soon as possible")] [JsonProperty("product_id")] public string ProductId { get; set; } = default!; diff --git a/src/Clerk/BackendAPI/Models/Components/EnterpriseAccount.cs b/src/Clerk/BackendAPI/Models/Components/EnterpriseAccount.cs new file mode 100644 index 00000000..a9a5081a --- /dev/null +++ b/src/Clerk/BackendAPI/Models/Components/EnterpriseAccount.cs @@ -0,0 +1,101 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Clerk.BackendAPI.Models.Components +{ + using Clerk.BackendAPI.Models.Components; + using Clerk.BackendAPI.Utils; + using Newtonsoft.Json; + using System.Collections.Generic; + + public class EnterpriseAccount + { + + [JsonProperty("id")] + public string Id { get; set; } = default!; + + /// + /// String representing the object's type. Objects of the same type share the same value.
+ /// + /// + /// + /// + ///
+ [JsonProperty("object")] + public EnterpriseAccountObject Object { get; set; } = default!; + + /// + /// The authentication protocol used to sign in.
+ /// + /// + /// + /// + ///
+ [JsonProperty("protocol")] + public Protocol? Protocol { get; set; } + + [JsonProperty("provider")] + public string Provider { get; set; } = default!; + + [JsonProperty("active")] + public bool Active { get; set; } = default!; + + [JsonProperty("email_address")] + public string EmailAddress { get; set; } = default!; + + [JsonProperty("first_name")] + public string? FirstName { get; set; } = null; + + [JsonProperty("last_name")] + public string? LastName { get; set; } = null; + + /// + /// The unique ID of the user in the external provider's system + /// + [JsonProperty("provider_user_id")] + public string? ProviderUserId { get; set; } = null; + + [JsonProperty("enterprise_connection_id")] + public string? EnterpriseConnectionId { get; set; } = null; + + [JsonProperty("public_metadata")] + public Dictionary? PublicMetadata { get; set; } + + [JsonProperty("verification", NullValueHandling = NullValueHandling.Include)] + public EnterpriseAccountVerification? Verification { get; set; } + + public VerificationTicketVerificationTicket? GetVerificationVerificationTicket() + { + return Verification != null ? Verification.VerificationTicketVerificationTicket : null; + } + + public VerificationSAMLVerificationSAML? GetVerificationVerificationSaml() + { + return Verification != null ? Verification.VerificationSAMLVerificationSAML : null; + } + + public VerificationOauth? GetVerificationVerificationOauth() + { + return Verification != null ? Verification.VerificationOauth : null; + } + + [JsonProperty("enterprise_connection", NullValueHandling = NullValueHandling.Include)] + public EnterpriseConnection? EnterpriseConnection { get; set; } = null; + + /// + /// Unix timestamp of last authentication.
+ /// + /// + /// + /// + ///
+ [JsonProperty("last_authenticated_at")] + public long? LastAuthenticatedAt { get; set; } = null; + } +} \ No newline at end of file diff --git a/src/Clerk/BackendAPI/Models/Components/EnterpriseAccountObject.cs b/src/Clerk/BackendAPI/Models/Components/EnterpriseAccountObject.cs new file mode 100644 index 00000000..392c6e19 --- /dev/null +++ b/src/Clerk/BackendAPI/Models/Components/EnterpriseAccountObject.cs @@ -0,0 +1,62 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Clerk.BackendAPI.Models.Components +{ + using Clerk.BackendAPI.Utils; + using Newtonsoft.Json; + using System; + + /// + /// String representing the object's type. Objects of the same type share the same value.
+ /// + /// + /// + /// + ///
+ public enum EnterpriseAccountObject + { + [JsonProperty("enterprise_account")] + EnterpriseAccount, + } + + public static class EnterpriseAccountObjectExtension + { + public static string Value(this EnterpriseAccountObject value) + { + return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString(); + } + + public static EnterpriseAccountObject ToEnum(this string value) + { + foreach(var field in typeof(EnterpriseAccountObject).GetFields()) + { + var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false); + if (attributes.Length == 0) + { + continue; + } + + var attribute = attributes[0] as JsonPropertyAttribute; + if (attribute != null && attribute.PropertyName == value) + { + var enumVal = field.GetValue(null); + + if (enumVal is EnterpriseAccountObject) + { + return (EnterpriseAccountObject)enumVal; + } + } + } + + throw new Exception($"Unknown value {value} for enum EnterpriseAccountObject"); + } + } + +} \ No newline at end of file diff --git a/src/Clerk/BackendAPI/Models/Components/EnterpriseAccountVerification.cs b/src/Clerk/BackendAPI/Models/Components/EnterpriseAccountVerification.cs new file mode 100644 index 00000000..d9822433 --- /dev/null +++ b/src/Clerk/BackendAPI/Models/Components/EnterpriseAccountVerification.cs @@ -0,0 +1,188 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Clerk.BackendAPI.Models.Components +{ + using Clerk.BackendAPI.Models.Components; + using Clerk.BackendAPI.Utils; + using Newtonsoft.Json; + using Newtonsoft.Json.Linq; + using System; + using System.Collections.Generic; + using System.Numerics; + using System.Reflection; + + public class EnterpriseAccountVerificationType + { + private EnterpriseAccountVerificationType(string value) { Value = value; } + + public string Value { get; private set; } + + public static EnterpriseAccountVerificationType VerificationTicket { get { return new EnterpriseAccountVerificationType("verification_ticket"); } } + + public static EnterpriseAccountVerificationType VerificationSaml { get { return new EnterpriseAccountVerificationType("verification_saml"); } } + + public static EnterpriseAccountVerificationType VerificationOauth { get { return new EnterpriseAccountVerificationType("verification_oauth"); } } + + public static EnterpriseAccountVerificationType Null { get { return new EnterpriseAccountVerificationType("null"); } } + + public override string ToString() { return Value; } + public static implicit operator String(EnterpriseAccountVerificationType v) { return v.Value; } + public static EnterpriseAccountVerificationType FromString(string v) { + switch(v) { + case "verification_ticket": return VerificationTicket; + case "verification_saml": return VerificationSaml; + case "verification_oauth": return VerificationOauth; + case "null": return Null; + default: throw new ArgumentException("Invalid value for EnterpriseAccountVerificationType"); + } + } + public override bool Equals(object? obj) + { + if (obj == null || GetType() != obj.GetType()) + { + return false; + } + return Value.Equals(((EnterpriseAccountVerificationType)obj).Value); + } + + public override int GetHashCode() + { + return Value.GetHashCode(); + } + } + + + [JsonConverter(typeof(EnterpriseAccountVerification.EnterpriseAccountVerificationConverter))] + public class EnterpriseAccountVerification + { + public EnterpriseAccountVerification(EnterpriseAccountVerificationType type) + { + Type = type; + } + + [SpeakeasyMetadata("form:explode=true")] + public VerificationTicketVerificationTicket? VerificationTicketVerificationTicket { get; set; } + + [SpeakeasyMetadata("form:explode=true")] + public VerificationSAMLVerificationSAML? VerificationSAMLVerificationSAML { get; set; } + + [SpeakeasyMetadata("form:explode=true")] + public VerificationOauth? VerificationOauth { get; set; } + + public EnterpriseAccountVerificationType Type { get; set; } + + public static EnterpriseAccountVerification CreateVerificationTicket(VerificationTicketVerificationTicket verificationTicket) + { + EnterpriseAccountVerificationType typ = EnterpriseAccountVerificationType.VerificationTicket; + string typStr = EnterpriseAccountVerificationType.VerificationTicket.ToString(); + verificationTicket.Object = VerificationTicketVerificationEnterpriseAccountObjectExtension.ToEnum(EnterpriseAccountVerificationType.VerificationTicket.ToString()); + EnterpriseAccountVerification res = new EnterpriseAccountVerification(typ); + res.VerificationTicketVerificationTicket = verificationTicket; + return res; + } + + public static EnterpriseAccountVerification CreateVerificationSaml(VerificationSAMLVerificationSAML verificationSaml) + { + EnterpriseAccountVerificationType typ = EnterpriseAccountVerificationType.VerificationSaml; + string typStr = EnterpriseAccountVerificationType.VerificationSaml.ToString(); + verificationSaml.Object = VerificationSamlVerificationEnterpriseAccountObjectExtension.ToEnum(EnterpriseAccountVerificationType.VerificationSaml.ToString()); + EnterpriseAccountVerification res = new EnterpriseAccountVerification(typ); + res.VerificationSAMLVerificationSAML = verificationSaml; + return res; + } + + public static EnterpriseAccountVerification CreateVerificationOauth(VerificationOauth verificationOauth) + { + EnterpriseAccountVerificationType typ = EnterpriseAccountVerificationType.VerificationOauth; + string typStr = EnterpriseAccountVerificationType.VerificationOauth.ToString(); + verificationOauth.Object = VerificationOauthVerificationEnterpriseAccountObjectExtension.ToEnum(EnterpriseAccountVerificationType.VerificationOauth.ToString()); + EnterpriseAccountVerification res = new EnterpriseAccountVerification(typ); + res.VerificationOauth = verificationOauth; + return res; + } + + public static EnterpriseAccountVerification CreateNull() + { + EnterpriseAccountVerificationType typ = EnterpriseAccountVerificationType.Null; + return new EnterpriseAccountVerification(typ); + } + + public class EnterpriseAccountVerificationConverter : JsonConverter + { + public override bool CanConvert(System.Type objectType) => objectType == typeof(EnterpriseAccountVerification); + + public override bool CanRead => true; + + public override object? ReadJson(JsonReader reader, System.Type objectType, object? existingValue, JsonSerializer serializer) + { + if (reader.TokenType == JsonToken.Null) + { + return null; + } + + JObject jo = JObject.Load(reader); + string discriminator = jo.GetValue("object")?.ToString() ?? throw new ArgumentNullException("Could not find discriminator field."); + if (discriminator == EnterpriseAccountVerificationType.VerificationTicket.ToString()) + { + VerificationTicketVerificationTicket verificationTicketVerificationTicket = ResponseBodyDeserializer.DeserializeNotNull(jo.ToString()); + return CreateVerificationTicket(verificationTicketVerificationTicket); + } + if (discriminator == EnterpriseAccountVerificationType.VerificationSaml.ToString()) + { + VerificationSAMLVerificationSAML verificationSAMLVerificationSAML = ResponseBodyDeserializer.DeserializeNotNull(jo.ToString()); + return CreateVerificationSaml(verificationSAMLVerificationSAML); + } + if (discriminator == EnterpriseAccountVerificationType.VerificationOauth.ToString()) + { + VerificationOauth verificationOauth = ResponseBodyDeserializer.DeserializeNotNull(jo.ToString()); + return CreateVerificationOauth(verificationOauth); + } + + throw new InvalidOperationException("Could not deserialize into any supported types."); + } + + public override void WriteJson(JsonWriter writer, object? value, JsonSerializer serializer) + { + if (value == null) + { + writer.WriteRawValue("null"); + return; + } + + EnterpriseAccountVerification res = (EnterpriseAccountVerification)value; + if (EnterpriseAccountVerificationType.FromString(res.Type).Equals(EnterpriseAccountVerificationType.Null)) + { + writer.WriteRawValue("null"); + return; + } + + if (res.VerificationTicketVerificationTicket != null) + { + writer.WriteRawValue(Utilities.SerializeJSON(res.VerificationTicketVerificationTicket)); + return; + } + + if (res.VerificationSAMLVerificationSAML != null) + { + writer.WriteRawValue(Utilities.SerializeJSON(res.VerificationSAMLVerificationSAML)); + return; + } + + if (res.VerificationOauth != null) + { + writer.WriteRawValue(Utilities.SerializeJSON(res.VerificationOauth)); + return; + } + } + + } + + } +} \ No newline at end of file diff --git a/src/Clerk/BackendAPI/Models/Components/EnterpriseConnection.cs b/src/Clerk/BackendAPI/Models/Components/EnterpriseConnection.cs new file mode 100644 index 00000000..805e8bd0 --- /dev/null +++ b/src/Clerk/BackendAPI/Models/Components/EnterpriseConnection.cs @@ -0,0 +1,167 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Clerk.BackendAPI.Models.Components +{ + using Clerk.BackendAPI.Models.Components; + using Clerk.BackendAPI.Utils; + using Newtonsoft.Json; + using Newtonsoft.Json.Linq; + using System; + using System.Collections.Generic; + using System.Numerics; + using System.Reflection; + + public class EnterpriseConnectionType + { + private EnterpriseConnectionType(string value) { Value = value; } + + public string Value { get; private set; } + + public static EnterpriseConnectionType EnterpriseConnectionEnterpriseConnection { get { return new EnterpriseConnectionType("enterprise_connection_EnterpriseConnection"); } } + + public static EnterpriseConnectionType Null { get { return new EnterpriseConnectionType("null"); } } + + public override string ToString() { return Value; } + public static implicit operator String(EnterpriseConnectionType v) { return v.Value; } + public static EnterpriseConnectionType FromString(string v) { + switch(v) { + case "enterprise_connection_EnterpriseConnection": return EnterpriseConnectionEnterpriseConnection; + case "null": return Null; + default: throw new ArgumentException("Invalid value for EnterpriseConnectionType"); + } + } + public override bool Equals(object? obj) + { + if (obj == null || GetType() != obj.GetType()) + { + return false; + } + return Value.Equals(((EnterpriseConnectionType)obj).Value); + } + + public override int GetHashCode() + { + return Value.GetHashCode(); + } + } + + + [JsonConverter(typeof(EnterpriseConnection.EnterpriseConnectionConverter))] + public class EnterpriseConnection + { + public EnterpriseConnection(EnterpriseConnectionType type) + { + Type = type; + } + + [SpeakeasyMetadata("form:explode=true")] + public EnterpriseConnectionEnterpriseConnection? EnterpriseConnectionEnterpriseConnection { get; set; } + + public EnterpriseConnectionType Type { get; set; } + public static EnterpriseConnection CreateEnterpriseConnectionEnterpriseConnection(EnterpriseConnectionEnterpriseConnection enterpriseConnectionEnterpriseConnection) + { + EnterpriseConnectionType typ = EnterpriseConnectionType.EnterpriseConnectionEnterpriseConnection; + + EnterpriseConnection res = new EnterpriseConnection(typ); + res.EnterpriseConnectionEnterpriseConnection = enterpriseConnectionEnterpriseConnection; + return res; + } + + public static EnterpriseConnection CreateNull() + { + EnterpriseConnectionType typ = EnterpriseConnectionType.Null; + return new EnterpriseConnection(typ); + } + + public class EnterpriseConnectionConverter : JsonConverter + { + public override bool CanConvert(System.Type objectType) => objectType == typeof(EnterpriseConnection); + + public override bool CanRead => true; + + public override object? ReadJson(JsonReader reader, System.Type objectType, object? existingValue, JsonSerializer serializer) + { + if (reader.TokenType == JsonToken.Null) + { + return null; + } + + var json = JRaw.Create(reader).ToString(); + var fallbackCandidates = new List<(System.Type, object, string)>(); + + try + { + return new EnterpriseConnection(EnterpriseConnectionType.EnterpriseConnectionEnterpriseConnection) + { + EnterpriseConnectionEnterpriseConnection = ResponseBodyDeserializer.DeserializeUndiscriminatedUnionMember(json) + }; + } + catch (ResponseBodyDeserializer.MissingMemberException) + { + fallbackCandidates.Add((typeof(EnterpriseConnectionEnterpriseConnection), new EnterpriseConnection(EnterpriseConnectionType.EnterpriseConnectionEnterpriseConnection), "EnterpriseConnectionEnterpriseConnection")); + } + catch (ResponseBodyDeserializer.DeserializationException) + { + // try next option + } + catch (Exception) + { + throw; + } + + if (fallbackCandidates.Count > 0) + { + fallbackCandidates.Sort((a, b) => ResponseBodyDeserializer.CompareFallbackCandidates(a.Item1, b.Item1, json)); + foreach(var (deserializationType, returnObject, propertyName) in fallbackCandidates) + { + try + { + return ResponseBodyDeserializer.DeserializeUndiscriminatedUnionFallback(deserializationType, returnObject, propertyName, json); + } + catch (ResponseBodyDeserializer.DeserializationException) + { + // try next fallback option + } + catch (Exception) + { + throw; + } + } + } + + throw new InvalidOperationException("Could not deserialize into any supported types."); + } + + public override void WriteJson(JsonWriter writer, object? value, JsonSerializer serializer) + { + if (value == null) + { + writer.WriteRawValue("null"); + return; + } + + EnterpriseConnection res = (EnterpriseConnection)value; + if (EnterpriseConnectionType.FromString(res.Type).Equals(EnterpriseConnectionType.Null)) + { + writer.WriteRawValue("null"); + return; + } + + if (res.EnterpriseConnectionEnterpriseConnection != null) + { + writer.WriteRawValue(Utilities.SerializeJSON(res.EnterpriseConnectionEnterpriseConnection)); + return; + } + } + + } + + } +} \ No newline at end of file diff --git a/src/Clerk/BackendAPI/Models/Components/EnterpriseConnection1.cs b/src/Clerk/BackendAPI/Models/Components/EnterpriseConnection1.cs new file mode 100644 index 00000000..32e05025 --- /dev/null +++ b/src/Clerk/BackendAPI/Models/Components/EnterpriseConnection1.cs @@ -0,0 +1,77 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Clerk.BackendAPI.Models.Components +{ + using Clerk.BackendAPI.Utils; + using Newtonsoft.Json; + using System; + using System.Collections.Generic; + + public class EnterpriseConnection1 + { + + [JsonProperty("id")] + public string Id { get; set; } = default!; + + [JsonProperty("protocol")] + public string Protocol { get; set; } = default!; + + [JsonProperty("provider")] + public string Provider { get; set; } = default!; + + [JsonProperty("name")] + public string Name { get; set; } = default!; + + [JsonProperty("logo_public_url", NullValueHandling = NullValueHandling.Include)] + public string? LogoPublicUrl { get; set; } + + [Obsolete("This field will be removed in a future release, please migrate away from it as soon as possible")] + [JsonProperty("domain")] + public string Domain { get; set; } = default!; + + [JsonProperty("domains")] + public List? Domains { get; set; } + + [JsonProperty("active")] + public bool Active { get; set; } = default!; + + [JsonProperty("sync_user_attributes")] + public bool SyncUserAttributes { get; set; } = default!; + + [JsonProperty("allow_subdomains")] + public bool AllowSubdomains { get; set; } = default!; + + [JsonProperty("allow_idp_initiated")] + public bool AllowIdpInitiated { get; set; } = default!; + + [JsonProperty("disable_additional_identifications")] + public bool DisableAdditionalIdentifications { get; set; } = default!; + + /// + /// Unix timestamp of creation.
+ /// + /// + /// + /// + ///
+ [JsonProperty("created_at")] + public long CreatedAt { get; set; } = default!; + + /// + /// Unix timestamp of last update.
+ /// + /// + /// + /// + ///
+ [JsonProperty("updated_at")] + public long UpdatedAt { get; set; } = default!; + } +} \ No newline at end of file diff --git a/src/Clerk/BackendAPI/Models/Components/EnterpriseConnection2.cs b/src/Clerk/BackendAPI/Models/Components/EnterpriseConnection2.cs new file mode 100644 index 00000000..8e817941 --- /dev/null +++ b/src/Clerk/BackendAPI/Models/Components/EnterpriseConnection2.cs @@ -0,0 +1,77 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Clerk.BackendAPI.Models.Components +{ + using Clerk.BackendAPI.Utils; + using Newtonsoft.Json; + using System; + using System.Collections.Generic; + + public class EnterpriseConnection2 + { + + [JsonProperty("id")] + public string Id { get; set; } = default!; + + [JsonProperty("protocol")] + public string Protocol { get; set; } = default!; + + [JsonProperty("provider")] + public string Provider { get; set; } = default!; + + [JsonProperty("name")] + public string Name { get; set; } = default!; + + [JsonProperty("logo_public_url", NullValueHandling = NullValueHandling.Include)] + public string? LogoPublicUrl { get; set; } + + [Obsolete("This field will be removed in a future release, please migrate away from it as soon as possible")] + [JsonProperty("domain")] + public string? Domain { get; set; } + + [JsonProperty("domains")] + public List Domains { get; set; } = default!; + + [JsonProperty("active")] + public bool Active { get; set; } = default!; + + [JsonProperty("sync_user_attributes")] + public bool SyncUserAttributes { get; set; } = default!; + + [JsonProperty("allow_subdomains")] + public bool AllowSubdomains { get; set; } = default!; + + [JsonProperty("allow_idp_initiated")] + public bool AllowIdpInitiated { get; set; } = default!; + + [JsonProperty("disable_additional_identifications")] + public bool DisableAdditionalIdentifications { get; set; } = default!; + + /// + /// Unix timestamp of creation.
+ /// + /// + /// + /// + ///
+ [JsonProperty("created_at")] + public long CreatedAt { get; set; } = default!; + + /// + /// Unix timestamp of last update.
+ /// + /// + /// + /// + ///
+ [JsonProperty("updated_at")] + public long UpdatedAt { get; set; } = default!; + } +} \ No newline at end of file diff --git a/src/Clerk/BackendAPI/Models/Components/EnterpriseConnectionEnterpriseConnection.cs b/src/Clerk/BackendAPI/Models/Components/EnterpriseConnectionEnterpriseConnection.cs new file mode 100644 index 00000000..c65ceeff --- /dev/null +++ b/src/Clerk/BackendAPI/Models/Components/EnterpriseConnectionEnterpriseConnection.cs @@ -0,0 +1,207 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Clerk.BackendAPI.Models.Components +{ + using Clerk.BackendAPI.Models.Components; + using Clerk.BackendAPI.Utils; + using Newtonsoft.Json; + using Newtonsoft.Json.Linq; + using System; + using System.Collections.Generic; + using System.Numerics; + using System.Reflection; + + public class EnterpriseConnectionEnterpriseConnectionType + { + private EnterpriseConnectionEnterpriseConnectionType(string value) { Value = value; } + + public string Value { get; private set; } + + public static EnterpriseConnectionEnterpriseConnectionType EnterpriseConnection1 { get { return new EnterpriseConnectionEnterpriseConnectionType("EnterpriseConnection_1"); } } + + public static EnterpriseConnectionEnterpriseConnectionType EnterpriseConnection2 { get { return new EnterpriseConnectionEnterpriseConnectionType("EnterpriseConnection_2"); } } + + public static EnterpriseConnectionEnterpriseConnectionType Null { get { return new EnterpriseConnectionEnterpriseConnectionType("null"); } } + + public override string ToString() { return Value; } + public static implicit operator String(EnterpriseConnectionEnterpriseConnectionType v) { return v.Value; } + public static EnterpriseConnectionEnterpriseConnectionType FromString(string v) { + switch(v) { + case "EnterpriseConnection_1": return EnterpriseConnection1; + case "EnterpriseConnection_2": return EnterpriseConnection2; + case "null": return Null; + default: throw new ArgumentException("Invalid value for EnterpriseConnectionEnterpriseConnectionType"); + } + } + public override bool Equals(object? obj) + { + if (obj == null || GetType() != obj.GetType()) + { + return false; + } + return Value.Equals(((EnterpriseConnectionEnterpriseConnectionType)obj).Value); + } + + public override int GetHashCode() + { + return Value.GetHashCode(); + } + } + + + [JsonConverter(typeof(EnterpriseConnectionEnterpriseConnection.EnterpriseConnectionEnterpriseConnectionConverter))] + public class EnterpriseConnectionEnterpriseConnection + { + public EnterpriseConnectionEnterpriseConnection(EnterpriseConnectionEnterpriseConnectionType type) + { + Type = type; + } + + [SpeakeasyMetadata("form:explode=true")] + public EnterpriseConnection1? EnterpriseConnection1 { get; set; } + + [SpeakeasyMetadata("form:explode=true")] + public EnterpriseConnection2? EnterpriseConnection2 { get; set; } + + public EnterpriseConnectionEnterpriseConnectionType Type { get; set; } + public static EnterpriseConnectionEnterpriseConnection CreateEnterpriseConnection1(EnterpriseConnection1 enterpriseConnection1) + { + EnterpriseConnectionEnterpriseConnectionType typ = EnterpriseConnectionEnterpriseConnectionType.EnterpriseConnection1; + + EnterpriseConnectionEnterpriseConnection res = new EnterpriseConnectionEnterpriseConnection(typ); + res.EnterpriseConnection1 = enterpriseConnection1; + return res; + } + public static EnterpriseConnectionEnterpriseConnection CreateEnterpriseConnection2(EnterpriseConnection2 enterpriseConnection2) + { + EnterpriseConnectionEnterpriseConnectionType typ = EnterpriseConnectionEnterpriseConnectionType.EnterpriseConnection2; + + EnterpriseConnectionEnterpriseConnection res = new EnterpriseConnectionEnterpriseConnection(typ); + res.EnterpriseConnection2 = enterpriseConnection2; + return res; + } + + public static EnterpriseConnectionEnterpriseConnection CreateNull() + { + EnterpriseConnectionEnterpriseConnectionType typ = EnterpriseConnectionEnterpriseConnectionType.Null; + return new EnterpriseConnectionEnterpriseConnection(typ); + } + + public class EnterpriseConnectionEnterpriseConnectionConverter : JsonConverter + { + public override bool CanConvert(System.Type objectType) => objectType == typeof(EnterpriseConnectionEnterpriseConnection); + + public override bool CanRead => true; + + public override object? ReadJson(JsonReader reader, System.Type objectType, object? existingValue, JsonSerializer serializer) + { + if (reader.TokenType == JsonToken.Null) + { + return null; + } + + var json = JRaw.Create(reader).ToString(); + var fallbackCandidates = new List<(System.Type, object, string)>(); + + try + { + return new EnterpriseConnectionEnterpriseConnection(EnterpriseConnectionEnterpriseConnectionType.EnterpriseConnection1) + { + EnterpriseConnection1 = ResponseBodyDeserializer.DeserializeUndiscriminatedUnionMember(json) + }; + } + catch (ResponseBodyDeserializer.MissingMemberException) + { + fallbackCandidates.Add((typeof(EnterpriseConnection1), new EnterpriseConnectionEnterpriseConnection(EnterpriseConnectionEnterpriseConnectionType.EnterpriseConnection1), "EnterpriseConnection1")); + } + catch (ResponseBodyDeserializer.DeserializationException) + { + // try next option + } + catch (Exception) + { + throw; + } + + try + { + return new EnterpriseConnectionEnterpriseConnection(EnterpriseConnectionEnterpriseConnectionType.EnterpriseConnection2) + { + EnterpriseConnection2 = ResponseBodyDeserializer.DeserializeUndiscriminatedUnionMember(json) + }; + } + catch (ResponseBodyDeserializer.MissingMemberException) + { + fallbackCandidates.Add((typeof(EnterpriseConnection2), new EnterpriseConnectionEnterpriseConnection(EnterpriseConnectionEnterpriseConnectionType.EnterpriseConnection2), "EnterpriseConnection2")); + } + catch (ResponseBodyDeserializer.DeserializationException) + { + // try next option + } + catch (Exception) + { + throw; + } + + if (fallbackCandidates.Count > 0) + { + fallbackCandidates.Sort((a, b) => ResponseBodyDeserializer.CompareFallbackCandidates(a.Item1, b.Item1, json)); + foreach(var (deserializationType, returnObject, propertyName) in fallbackCandidates) + { + try + { + return ResponseBodyDeserializer.DeserializeUndiscriminatedUnionFallback(deserializationType, returnObject, propertyName, json); + } + catch (ResponseBodyDeserializer.DeserializationException) + { + // try next fallback option + } + catch (Exception) + { + throw; + } + } + } + + throw new InvalidOperationException("Could not deserialize into any supported types."); + } + + public override void WriteJson(JsonWriter writer, object? value, JsonSerializer serializer) + { + if (value == null) + { + writer.WriteRawValue("null"); + return; + } + + EnterpriseConnectionEnterpriseConnection res = (EnterpriseConnectionEnterpriseConnection)value; + if (EnterpriseConnectionEnterpriseConnectionType.FromString(res.Type).Equals(EnterpriseConnectionEnterpriseConnectionType.Null)) + { + writer.WriteRawValue("null"); + return; + } + + if (res.EnterpriseConnection1 != null) + { + writer.WriteRawValue(Utilities.SerializeJSON(res.EnterpriseConnection1)); + return; + } + + if (res.EnterpriseConnection2 != null) + { + writer.WriteRawValue(Utilities.SerializeJSON(res.EnterpriseConnection2)); + return; + } + } + + } + + } +} \ No newline at end of file diff --git a/src/Clerk/BackendAPI/Models/Components/Organization.cs b/src/Clerk/BackendAPI/Models/Components/Organization.cs index 74fac8c1..bd64fa18 100644 --- a/src/Clerk/BackendAPI/Models/Components/Organization.cs +++ b/src/Clerk/BackendAPI/Models/Components/Organization.cs @@ -78,5 +78,15 @@ public class Organization /// [JsonProperty("updated_at")] public long UpdatedAt { get; set; } = default!; + + /// + /// Unix timestamp of last activity.
+ /// + /// + /// + /// + ///
+ [JsonProperty("last_active_at")] + public long? LastActiveAt { get; set; } } } \ No newline at end of file diff --git a/src/Clerk/BackendAPI/Models/Components/OrganizationInvitation.cs b/src/Clerk/BackendAPI/Models/Components/OrganizationInvitation.cs index 573c50d4..2ea44b91 100644 --- a/src/Clerk/BackendAPI/Models/Components/OrganizationInvitation.cs +++ b/src/Clerk/BackendAPI/Models/Components/OrganizationInvitation.cs @@ -45,6 +45,9 @@ public class OrganizationInvitation [JsonProperty("organization_id")] public string? OrganizationId { get; set; } + [JsonProperty("inviter_id", NullValueHandling = NullValueHandling.Include)] + public string? InviterId { get; set; } + [JsonProperty("status")] public string? Status { get; set; } diff --git a/src/Clerk/BackendAPI/Models/Components/OrganizationInvitationWithPublicOrganizationData.cs b/src/Clerk/BackendAPI/Models/Components/OrganizationInvitationWithPublicOrganizationData.cs index 49994b35..6200272b 100644 --- a/src/Clerk/BackendAPI/Models/Components/OrganizationInvitationWithPublicOrganizationData.cs +++ b/src/Clerk/BackendAPI/Models/Components/OrganizationInvitationWithPublicOrganizationData.cs @@ -45,6 +45,9 @@ public class OrganizationInvitationWithPublicOrganizationData [JsonProperty("organization_id")] public string? OrganizationId { get; set; } + [JsonProperty("inviter_id", NullValueHandling = NullValueHandling.Include)] + public string? InviterId { get; set; } + [JsonProperty("status")] public string? Status { get; set; } diff --git a/src/Clerk/BackendAPI/Models/Components/OrganizationMembershipOrganization.cs b/src/Clerk/BackendAPI/Models/Components/OrganizationMembershipOrganization.cs index 429fdf0e..503a4401 100644 --- a/src/Clerk/BackendAPI/Models/Components/OrganizationMembershipOrganization.cs +++ b/src/Clerk/BackendAPI/Models/Components/OrganizationMembershipOrganization.cs @@ -78,5 +78,15 @@ public class OrganizationMembershipOrganization /// [JsonProperty("updated_at")] public long UpdatedAt { get; set; } = default!; + + /// + /// Unix timestamp of last activity.
+ /// + /// + /// + /// + ///
+ [JsonProperty("last_active_at")] + public long? LastActiveAt { get; set; } } } \ No newline at end of file diff --git a/src/Clerk/BackendAPI/Models/Components/OrganizationSettings.cs b/src/Clerk/BackendAPI/Models/Components/OrganizationSettings.cs index 4a219b7a..00e605db 100644 --- a/src/Clerk/BackendAPI/Models/Components/OrganizationSettings.cs +++ b/src/Clerk/BackendAPI/Models/Components/OrganizationSettings.cs @@ -36,6 +36,9 @@ public class OrganizationSettings [JsonProperty("max_allowed_roles")] public long MaxAllowedRoles { get; set; } = default!; + [JsonProperty("max_role_sets_allowed")] + public long? MaxRoleSetsAllowed { get; set; } + /// /// max_allowed_permissions is now a no-op, as permissions are now unlimited /// diff --git a/src/Clerk/BackendAPI/Models/Components/OrganizationWithLogo.cs b/src/Clerk/BackendAPI/Models/Components/OrganizationWithLogo.cs index a3e4e108..134b7094 100644 --- a/src/Clerk/BackendAPI/Models/Components/OrganizationWithLogo.cs +++ b/src/Clerk/BackendAPI/Models/Components/OrganizationWithLogo.cs @@ -80,6 +80,16 @@ public class OrganizationWithLogo [JsonProperty("updated_at")] public long UpdatedAt { get; set; } = default!; + /// + /// Unix timestamp of last activity.
+ /// + /// + /// + /// + ///
+ [JsonProperty("last_active_at")] + public long? LastActiveAt { get; set; } + [Obsolete("This field will be removed in a future release, please migrate away from it as soon as possible")] [JsonProperty("logo_url")] public string? LogoUrl { get; set; } diff --git a/src/Clerk/BackendAPI/Models/Components/Permission.cs b/src/Clerk/BackendAPI/Models/Components/Permission.cs new file mode 100644 index 00000000..5116b574 --- /dev/null +++ b/src/Clerk/BackendAPI/Models/Components/Permission.cs @@ -0,0 +1,57 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Clerk.BackendAPI.Models.Components +{ + using Clerk.BackendAPI.Models.Components; + using Clerk.BackendAPI.Utils; + using Newtonsoft.Json; + + public class Permission + { + + [JsonProperty("object")] + public PermissionObject Object { get; set; } = default!; + + [JsonProperty("id")] + public string Id { get; set; } = default!; + + [JsonProperty("name")] + public string Name { get; set; } = default!; + + [JsonProperty("key")] + public string Key { get; set; } = default!; + + [JsonProperty("description")] + public string Description { get; set; } = default!; + + [JsonProperty("type")] + public string Type { get; set; } = default!; + + /// + /// Unix timestamp of creation.
+ /// + /// + /// + /// + ///
+ [JsonProperty("created_at")] + public long CreatedAt { get; set; } = default!; + + /// + /// Unix timestamp of last update.
+ /// + /// + /// + /// + ///
+ [JsonProperty("updated_at")] + public long UpdatedAt { get; set; } = default!; + } +} \ No newline at end of file diff --git a/src/Clerk/BackendAPI/Models/Components/PermissionObject.cs b/src/Clerk/BackendAPI/Models/Components/PermissionObject.cs new file mode 100644 index 00000000..1246bfde --- /dev/null +++ b/src/Clerk/BackendAPI/Models/Components/PermissionObject.cs @@ -0,0 +1,55 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Clerk.BackendAPI.Models.Components +{ + using Clerk.BackendAPI.Utils; + using Newtonsoft.Json; + using System; + + public enum PermissionObject + { + [JsonProperty("permission")] + Permission, + } + + public static class PermissionObjectExtension + { + public static string Value(this PermissionObject value) + { + return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString(); + } + + public static PermissionObject ToEnum(this string value) + { + foreach(var field in typeof(PermissionObject).GetFields()) + { + var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false); + if (attributes.Length == 0) + { + continue; + } + + var attribute = attributes[0] as JsonPropertyAttribute; + if (attribute != null && attribute.PropertyName == value) + { + var enumVal = field.GetValue(null); + + if (enumVal is PermissionObject) + { + return (PermissionObject)enumVal; + } + } + } + + throw new Exception($"Unknown value {value} for enum PermissionObject"); + } + } + +} \ No newline at end of file diff --git a/src/Clerk/BackendAPI/Models/Components/Permissions.cs b/src/Clerk/BackendAPI/Models/Components/Permissions.cs new file mode 100644 index 00000000..4cda309c --- /dev/null +++ b/src/Clerk/BackendAPI/Models/Components/Permissions.cs @@ -0,0 +1,36 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Clerk.BackendAPI.Models.Components +{ + using Clerk.BackendAPI.Models.Components; + using Clerk.BackendAPI.Utils; + using Newtonsoft.Json; + using System.Collections.Generic; + + /// + /// Success + /// + public class Permissions + { + + [JsonProperty("data")] + public List Data { get; set; } = default!; + + /// + /// Total number of permissions
+ /// + /// + /// + /// + ///
+ [JsonProperty("total_count")] + public long TotalCount { get; set; } = default!; + } +} \ No newline at end of file diff --git a/src/Clerk/BackendAPI/Models/Components/Plan.cs b/src/Clerk/BackendAPI/Models/Components/Plan.cs index 5ff87b86..cfc2d9ef 100644 --- a/src/Clerk/BackendAPI/Models/Components/Plan.cs +++ b/src/Clerk/BackendAPI/Models/Components/Plan.cs @@ -12,6 +12,7 @@ namespace Clerk.BackendAPI.Models.Components using Clerk.BackendAPI.Models.Components; using Clerk.BackendAPI.Utils; using Newtonsoft.Json; + using System; using System.Collections.Generic; /// @@ -56,6 +57,7 @@ public class Plan /// /// The ID of the product this plan belongs to. /// + [Obsolete("This field will be removed in a future release, please migrate away from it as soon as possible")] [JsonProperty("product_id")] public string ProductId { get; set; } = default!; diff --git a/src/Clerk/BackendAPI/Models/Components/Protocol.cs b/src/Clerk/BackendAPI/Models/Components/Protocol.cs new file mode 100644 index 00000000..3eacb322 --- /dev/null +++ b/src/Clerk/BackendAPI/Models/Components/Protocol.cs @@ -0,0 +1,64 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Clerk.BackendAPI.Models.Components +{ + using Clerk.BackendAPI.Utils; + using Newtonsoft.Json; + using System; + + /// + /// The authentication protocol used to sign in.
+ /// + /// + /// + /// + ///
+ public enum Protocol + { + [JsonProperty("oauth")] + Oauth, + [JsonProperty("saml")] + Saml, + } + + public static class ProtocolExtension + { + public static string Value(this Protocol value) + { + return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString(); + } + + public static Protocol ToEnum(this string value) + { + foreach(var field in typeof(Protocol).GetFields()) + { + var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false); + if (attributes.Length == 0) + { + continue; + } + + var attribute = attributes[0] as JsonPropertyAttribute; + if (attribute != null && attribute.PropertyName == value) + { + var enumVal = field.GetValue(null); + + if (enumVal is Protocol) + { + return (Protocol)enumVal; + } + } + } + + throw new Exception($"Unknown value {value} for enum Protocol"); + } + } + +} \ No newline at end of file diff --git a/src/Clerk/BackendAPI/Models/Components/Role.cs b/src/Clerk/BackendAPI/Models/Components/Role.cs new file mode 100644 index 00000000..6316fa31 --- /dev/null +++ b/src/Clerk/BackendAPI/Models/Components/Role.cs @@ -0,0 +1,64 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Clerk.BackendAPI.Models.Components +{ + using Clerk.BackendAPI.Models.Components; + using Clerk.BackendAPI.Utils; + using Newtonsoft.Json; + using System.Collections.Generic; + + public class Role + { + + [JsonProperty("object")] + public RoleObject Object { get; set; } = default!; + + [JsonProperty("id")] + public string Id { get; set; } = default!; + + [JsonProperty("name")] + public string Name { get; set; } = default!; + + [JsonProperty("key")] + public string Key { get; set; } = default!; + + [JsonProperty("description", NullValueHandling = NullValueHandling.Include)] + public string? Description { get; set; } + + /// + /// Whether this role is eligible to be an organization creator role + /// + [JsonProperty("is_creator_eligible")] + public bool IsCreatorEligible { get; set; } = default!; + + [JsonProperty("permissions")] + public List Permissions { get; set; } = default!; + + /// + /// Unix timestamp of creation.
+ /// + /// + /// + /// + ///
+ [JsonProperty("created_at")] + public long CreatedAt { get; set; } = default!; + + /// + /// Unix timestamp of last update.
+ /// + /// + /// + /// + ///
+ [JsonProperty("updated_at")] + public long UpdatedAt { get; set; } = default!; + } +} \ No newline at end of file diff --git a/src/Clerk/BackendAPI/Models/Components/RoleObject.cs b/src/Clerk/BackendAPI/Models/Components/RoleObject.cs new file mode 100644 index 00000000..bc106308 --- /dev/null +++ b/src/Clerk/BackendAPI/Models/Components/RoleObject.cs @@ -0,0 +1,55 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Clerk.BackendAPI.Models.Components +{ + using Clerk.BackendAPI.Utils; + using Newtonsoft.Json; + using System; + + public enum RoleObject + { + [JsonProperty("role")] + Role, + } + + public static class RoleObjectExtension + { + public static string Value(this RoleObject value) + { + return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString(); + } + + public static RoleObject ToEnum(this string value) + { + foreach(var field in typeof(RoleObject).GetFields()) + { + var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false); + if (attributes.Length == 0) + { + continue; + } + + var attribute = attributes[0] as JsonPropertyAttribute; + if (attribute != null && attribute.PropertyName == value) + { + var enumVal = field.GetValue(null); + + if (enumVal is RoleObject) + { + return (RoleObject)enumVal; + } + } + } + + throw new Exception($"Unknown value {value} for enum RoleObject"); + } + } + +} \ No newline at end of file diff --git a/src/Clerk/BackendAPI/Models/Components/Roles.cs b/src/Clerk/BackendAPI/Models/Components/Roles.cs new file mode 100644 index 00000000..8737a5c1 --- /dev/null +++ b/src/Clerk/BackendAPI/Models/Components/Roles.cs @@ -0,0 +1,36 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Clerk.BackendAPI.Models.Components +{ + using Clerk.BackendAPI.Models.Components; + using Clerk.BackendAPI.Utils; + using Newtonsoft.Json; + using System.Collections.Generic; + + /// + /// Success + /// + public class Roles + { + + [JsonProperty("data")] + public List Data { get; set; } = default!; + + /// + /// Total number of roles
+ /// + /// + /// + /// + ///
+ [JsonProperty("total_count")] + public long TotalCount { get; set; } = default!; + } +} \ No newline at end of file diff --git a/src/Clerk/BackendAPI/Models/Components/User.cs b/src/Clerk/BackendAPI/Models/Components/User.cs index c1cf03f9..40c14b0a 100644 --- a/src/Clerk/BackendAPI/Models/Components/User.cs +++ b/src/Clerk/BackendAPI/Models/Components/User.cs @@ -121,12 +121,28 @@ public class User [JsonProperty("mfa_disabled_at", NullValueHandling = NullValueHandling.Include)] public long? MfaDisabledAt { get; set; } + /// + /// Unix timestamp of when the user's password was last updated.
+ /// + /// + /// + /// + ///
+ [JsonProperty("password_last_updated_at")] + public long? PasswordLastUpdatedAt { get; set; } = null; + [JsonProperty("external_accounts")] public List ExternalAccounts { get; set; } = default!; [JsonProperty("saml_accounts")] public List SamlAccounts { get; set; } = default!; + [JsonProperty("enterprise_accounts")] + public List EnterpriseAccounts { get; set; } = default!; + + [JsonProperty("organization_memberships")] + public List? OrganizationMemberships { get; set; } + /// /// Unix timestamp of last sign-in.
/// diff --git a/src/Clerk/BackendAPI/Models/Components/VerificationOauth.cs b/src/Clerk/BackendAPI/Models/Components/VerificationOauth.cs new file mode 100644 index 00000000..4b27f708 --- /dev/null +++ b/src/Clerk/BackendAPI/Models/Components/VerificationOauth.cs @@ -0,0 +1,47 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Clerk.BackendAPI.Models.Components +{ + using Clerk.BackendAPI.Models.Components; + using Clerk.BackendAPI.Utils; + using Newtonsoft.Json; + using System; + using System.Collections.Concurrent; + using System.Collections.Generic; + using System.Linq; + + public class VerificationOauth + { + + [JsonProperty("object")] + public VerificationOauthVerificationEnterpriseAccountObject? Object { get; set; } + + [JsonProperty("status")] + public VerificationOauthVerificationEnterpriseAccountStatus Status { get; set; } = default!; + + [JsonProperty("strategy")] + public string Strategy { get; set; } = default!; + + [JsonProperty("external_verification_redirect_url")] + public string? ExternalVerificationRedirectUrl { get; set; } + + [JsonProperty("error", NullValueHandling = NullValueHandling.Include)] + public VerificationOauthVerificationEnterpriseAccountError? Error { get; set; } = null; + + [JsonProperty("expire_at")] + public long ExpireAt { get; set; } = default!; + + [JsonProperty("attempts", NullValueHandling = NullValueHandling.Include)] + public long? Attempts { get; set; } + + [JsonProperty("verified_at_client")] + public string? VerifiedAtClient { get; set; } = null; + } +} \ No newline at end of file diff --git a/src/Clerk/BackendAPI/Models/Components/VerificationOauthErrorEnterpriseAccountClerkError.cs b/src/Clerk/BackendAPI/Models/Components/VerificationOauthErrorEnterpriseAccountClerkError.cs new file mode 100644 index 00000000..11ebd229 --- /dev/null +++ b/src/Clerk/BackendAPI/Models/Components/VerificationOauthErrorEnterpriseAccountClerkError.cs @@ -0,0 +1,31 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Clerk.BackendAPI.Models.Components +{ + using Clerk.BackendAPI.Models.Components; + using Clerk.BackendAPI.Utils; + using Newtonsoft.Json; + + public class VerificationOauthErrorEnterpriseAccountClerkError + { + + [JsonProperty("message")] + public string Message { get; set; } = default!; + + [JsonProperty("long_message")] + public string LongMessage { get; set; } = default!; + + [JsonProperty("code")] + public string Code { get; set; } = default!; + + [JsonProperty("meta")] + public ClerkErrorErrorEnterpriseAccountVerificationMeta? Meta { get; set; } + } +} \ No newline at end of file diff --git a/src/Clerk/BackendAPI/Models/Components/VerificationOauthVerificationEnterpriseAccountError.cs b/src/Clerk/BackendAPI/Models/Components/VerificationOauthVerificationEnterpriseAccountError.cs new file mode 100644 index 00000000..d23b0589 --- /dev/null +++ b/src/Clerk/BackendAPI/Models/Components/VerificationOauthVerificationEnterpriseAccountError.cs @@ -0,0 +1,167 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Clerk.BackendAPI.Models.Components +{ + using Clerk.BackendAPI.Models.Components; + using Clerk.BackendAPI.Utils; + using Newtonsoft.Json; + using Newtonsoft.Json.Linq; + using System; + using System.Collections.Generic; + using System.Numerics; + using System.Reflection; + + public class VerificationOauthVerificationEnterpriseAccountErrorType + { + private VerificationOauthVerificationEnterpriseAccountErrorType(string value) { Value = value; } + + public string Value { get; private set; } + + public static VerificationOauthVerificationEnterpriseAccountErrorType VerificationOauthErrorEnterpriseAccountClerkError { get { return new VerificationOauthVerificationEnterpriseAccountErrorType("verification_oauth_error_EnterpriseAccount_ClerkError"); } } + + public static VerificationOauthVerificationEnterpriseAccountErrorType Null { get { return new VerificationOauthVerificationEnterpriseAccountErrorType("null"); } } + + public override string ToString() { return Value; } + public static implicit operator String(VerificationOauthVerificationEnterpriseAccountErrorType v) { return v.Value; } + public static VerificationOauthVerificationEnterpriseAccountErrorType FromString(string v) { + switch(v) { + case "verification_oauth_error_EnterpriseAccount_ClerkError": return VerificationOauthErrorEnterpriseAccountClerkError; + case "null": return Null; + default: throw new ArgumentException("Invalid value for VerificationOauthVerificationEnterpriseAccountErrorType"); + } + } + public override bool Equals(object? obj) + { + if (obj == null || GetType() != obj.GetType()) + { + return false; + } + return Value.Equals(((VerificationOauthVerificationEnterpriseAccountErrorType)obj).Value); + } + + public override int GetHashCode() + { + return Value.GetHashCode(); + } + } + + + [JsonConverter(typeof(VerificationOauthVerificationEnterpriseAccountError.VerificationOauthVerificationEnterpriseAccountErrorConverter))] + public class VerificationOauthVerificationEnterpriseAccountError + { + public VerificationOauthVerificationEnterpriseAccountError(VerificationOauthVerificationEnterpriseAccountErrorType type) + { + Type = type; + } + + [SpeakeasyMetadata("form:explode=true")] + public VerificationOauthErrorEnterpriseAccountClerkError? VerificationOauthErrorEnterpriseAccountClerkError { get; set; } + + public VerificationOauthVerificationEnterpriseAccountErrorType Type { get; set; } + public static VerificationOauthVerificationEnterpriseAccountError CreateVerificationOauthErrorEnterpriseAccountClerkError(VerificationOauthErrorEnterpriseAccountClerkError verificationOauthErrorEnterpriseAccountClerkError) + { + VerificationOauthVerificationEnterpriseAccountErrorType typ = VerificationOauthVerificationEnterpriseAccountErrorType.VerificationOauthErrorEnterpriseAccountClerkError; + + VerificationOauthVerificationEnterpriseAccountError res = new VerificationOauthVerificationEnterpriseAccountError(typ); + res.VerificationOauthErrorEnterpriseAccountClerkError = verificationOauthErrorEnterpriseAccountClerkError; + return res; + } + + public static VerificationOauthVerificationEnterpriseAccountError CreateNull() + { + VerificationOauthVerificationEnterpriseAccountErrorType typ = VerificationOauthVerificationEnterpriseAccountErrorType.Null; + return new VerificationOauthVerificationEnterpriseAccountError(typ); + } + + public class VerificationOauthVerificationEnterpriseAccountErrorConverter : JsonConverter + { + public override bool CanConvert(System.Type objectType) => objectType == typeof(VerificationOauthVerificationEnterpriseAccountError); + + public override bool CanRead => true; + + public override object? ReadJson(JsonReader reader, System.Type objectType, object? existingValue, JsonSerializer serializer) + { + if (reader.TokenType == JsonToken.Null) + { + return null; + } + + var json = JRaw.Create(reader).ToString(); + var fallbackCandidates = new List<(System.Type, object, string)>(); + + try + { + return new VerificationOauthVerificationEnterpriseAccountError(VerificationOauthVerificationEnterpriseAccountErrorType.VerificationOauthErrorEnterpriseAccountClerkError) + { + VerificationOauthErrorEnterpriseAccountClerkError = ResponseBodyDeserializer.DeserializeUndiscriminatedUnionMember(json) + }; + } + catch (ResponseBodyDeserializer.MissingMemberException) + { + fallbackCandidates.Add((typeof(VerificationOauthErrorEnterpriseAccountClerkError), new VerificationOauthVerificationEnterpriseAccountError(VerificationOauthVerificationEnterpriseAccountErrorType.VerificationOauthErrorEnterpriseAccountClerkError), "VerificationOauthErrorEnterpriseAccountClerkError")); + } + catch (ResponseBodyDeserializer.DeserializationException) + { + // try next option + } + catch (Exception) + { + throw; + } + + if (fallbackCandidates.Count > 0) + { + fallbackCandidates.Sort((a, b) => ResponseBodyDeserializer.CompareFallbackCandidates(a.Item1, b.Item1, json)); + foreach(var (deserializationType, returnObject, propertyName) in fallbackCandidates) + { + try + { + return ResponseBodyDeserializer.DeserializeUndiscriminatedUnionFallback(deserializationType, returnObject, propertyName, json); + } + catch (ResponseBodyDeserializer.DeserializationException) + { + // try next fallback option + } + catch (Exception) + { + throw; + } + } + } + + throw new InvalidOperationException("Could not deserialize into any supported types."); + } + + public override void WriteJson(JsonWriter writer, object? value, JsonSerializer serializer) + { + if (value == null) + { + writer.WriteRawValue("null"); + return; + } + + VerificationOauthVerificationEnterpriseAccountError res = (VerificationOauthVerificationEnterpriseAccountError)value; + if (VerificationOauthVerificationEnterpriseAccountErrorType.FromString(res.Type).Equals(VerificationOauthVerificationEnterpriseAccountErrorType.Null)) + { + writer.WriteRawValue("null"); + return; + } + + if (res.VerificationOauthErrorEnterpriseAccountClerkError != null) + { + writer.WriteRawValue(Utilities.SerializeJSON(res.VerificationOauthErrorEnterpriseAccountClerkError)); + return; + } + } + + } + + } +} \ No newline at end of file diff --git a/src/Clerk/BackendAPI/Models/Components/VerificationOauthVerificationEnterpriseAccountObject.cs b/src/Clerk/BackendAPI/Models/Components/VerificationOauthVerificationEnterpriseAccountObject.cs new file mode 100644 index 00000000..e9f96a15 --- /dev/null +++ b/src/Clerk/BackendAPI/Models/Components/VerificationOauthVerificationEnterpriseAccountObject.cs @@ -0,0 +1,55 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Clerk.BackendAPI.Models.Components +{ + using Clerk.BackendAPI.Utils; + using Newtonsoft.Json; + using System; + + public enum VerificationOauthVerificationEnterpriseAccountObject + { + [JsonProperty("verification_oauth")] + VerificationOauth, + } + + public static class VerificationOauthVerificationEnterpriseAccountObjectExtension + { + public static string Value(this VerificationOauthVerificationEnterpriseAccountObject value) + { + return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString(); + } + + public static VerificationOauthVerificationEnterpriseAccountObject ToEnum(this string value) + { + foreach(var field in typeof(VerificationOauthVerificationEnterpriseAccountObject).GetFields()) + { + var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false); + if (attributes.Length == 0) + { + continue; + } + + var attribute = attributes[0] as JsonPropertyAttribute; + if (attribute != null && attribute.PropertyName == value) + { + var enumVal = field.GetValue(null); + + if (enumVal is VerificationOauthVerificationEnterpriseAccountObject) + { + return (VerificationOauthVerificationEnterpriseAccountObject)enumVal; + } + } + } + + throw new Exception($"Unknown value {value} for enum VerificationOauthVerificationEnterpriseAccountObject"); + } + } + +} \ No newline at end of file diff --git a/src/Clerk/BackendAPI/Models/Components/VerificationOauthVerificationEnterpriseAccountStatus.cs b/src/Clerk/BackendAPI/Models/Components/VerificationOauthVerificationEnterpriseAccountStatus.cs new file mode 100644 index 00000000..f92c74a8 --- /dev/null +++ b/src/Clerk/BackendAPI/Models/Components/VerificationOauthVerificationEnterpriseAccountStatus.cs @@ -0,0 +1,81 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Clerk.BackendAPI.Models.Components +{ + using Clerk.BackendAPI.Utils; + using Newtonsoft.Json; + using System; + using System.Collections.Concurrent; + using System.Collections.Generic; + using System.Linq; + + [JsonConverter(typeof(OpenEnumConverter))] + public class VerificationOauthVerificationEnterpriseAccountStatus : IEquatable + { + public static readonly VerificationOauthVerificationEnterpriseAccountStatus Unverified = new VerificationOauthVerificationEnterpriseAccountStatus("unverified"); + public static readonly VerificationOauthVerificationEnterpriseAccountStatus Verified = new VerificationOauthVerificationEnterpriseAccountStatus("verified"); + public static readonly VerificationOauthVerificationEnterpriseAccountStatus Failed = new VerificationOauthVerificationEnterpriseAccountStatus("failed"); + public static readonly VerificationOauthVerificationEnterpriseAccountStatus Expired = new VerificationOauthVerificationEnterpriseAccountStatus("expired"); + public static readonly VerificationOauthVerificationEnterpriseAccountStatus Transferable = new VerificationOauthVerificationEnterpriseAccountStatus("transferable"); + + private static readonly Dictionary _knownValues = + new Dictionary () + { + ["unverified"] = Unverified, + ["verified"] = Verified, + ["failed"] = Failed, + ["expired"] = Expired, + ["transferable"] = Transferable + }; + + private static readonly ConcurrentDictionary _values = + new ConcurrentDictionary(_knownValues); + + private VerificationOauthVerificationEnterpriseAccountStatus(string value) + { + if (value == null) throw new ArgumentNullException(nameof(value)); + Value = value; + } + + public string Value { get; } + + public static VerificationOauthVerificationEnterpriseAccountStatus Of(string value) + { + return _values.GetOrAdd(value, _ => new VerificationOauthVerificationEnterpriseAccountStatus(value)); + } + + public static implicit operator VerificationOauthVerificationEnterpriseAccountStatus(string value) => Of(value); + public static implicit operator string(VerificationOauthVerificationEnterpriseAccountStatus verificationoauthverificationenterpriseaccountstatus) => verificationoauthverificationenterpriseaccountstatus.Value; + + public static VerificationOauthVerificationEnterpriseAccountStatus[] Values() + { + return _values.Values.ToArray(); + } + + public override string ToString() => Value.ToString(); + + public bool IsKnown() + { + return _knownValues.ContainsKey(Value); + } + + public override bool Equals(object? obj) => Equals(obj as VerificationOauthVerificationEnterpriseAccountStatus); + + public bool Equals(VerificationOauthVerificationEnterpriseAccountStatus? other) + { + if (ReferenceEquals(this, other)) return true; + if (other is null) return false; + return string.Equals(Value, other.Value); + } + + public override int GetHashCode() => Value.GetHashCode(); + } + +} \ No newline at end of file diff --git a/src/Clerk/BackendAPI/Models/Components/VerificationSAMLVerificationSAML.cs b/src/Clerk/BackendAPI/Models/Components/VerificationSAMLVerificationSAML.cs new file mode 100644 index 00000000..6e03f2a8 --- /dev/null +++ b/src/Clerk/BackendAPI/Models/Components/VerificationSAMLVerificationSAML.cs @@ -0,0 +1,43 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Clerk.BackendAPI.Models.Components +{ + using Clerk.BackendAPI.Models.Components; + using Clerk.BackendAPI.Utils; + using Newtonsoft.Json; + + public class VerificationSAMLVerificationSAML + { + + [JsonProperty("object")] + public VerificationSamlVerificationEnterpriseAccountObject? Object { get; set; } + + [JsonProperty("status")] + public VerificationSamlVerificationEnterpriseAccountStatus Status { get; set; } = default!; + + [JsonProperty("strategy")] + public VerificationSamlVerificationEnterpriseAccountStrategy Strategy { get; set; } = default!; + + [JsonProperty("external_verification_redirect_url")] + public string? ExternalVerificationRedirectUrl { get; set; } = null; + + [JsonProperty("error", NullValueHandling = NullValueHandling.Include)] + public VerificationSamlVerificationEnterpriseAccountError? Error { get; set; } = null; + + [JsonProperty("expire_at")] + public long? ExpireAt { get; set; } = null; + + [JsonProperty("attempts", NullValueHandling = NullValueHandling.Include)] + public long? Attempts { get; set; } + + [JsonProperty("verified_at_client")] + public string? VerifiedAtClient { get; set; } = null; + } +} \ No newline at end of file diff --git a/src/Clerk/BackendAPI/Models/Components/VerificationSamlErrorEnterpriseAccountClerkError.cs b/src/Clerk/BackendAPI/Models/Components/VerificationSamlErrorEnterpriseAccountClerkError.cs new file mode 100644 index 00000000..6697b4f5 --- /dev/null +++ b/src/Clerk/BackendAPI/Models/Components/VerificationSamlErrorEnterpriseAccountClerkError.cs @@ -0,0 +1,31 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Clerk.BackendAPI.Models.Components +{ + using Clerk.BackendAPI.Models.Components; + using Clerk.BackendAPI.Utils; + using Newtonsoft.Json; + + public class VerificationSamlErrorEnterpriseAccountClerkError + { + + [JsonProperty("message")] + public string Message { get; set; } = default!; + + [JsonProperty("long_message")] + public string LongMessage { get; set; } = default!; + + [JsonProperty("code")] + public string Code { get; set; } = default!; + + [JsonProperty("meta")] + public ClerkErrorErrorEnterpriseAccountMeta? Meta { get; set; } + } +} \ No newline at end of file diff --git a/src/Clerk/BackendAPI/Models/Components/VerificationSamlVerificationEnterpriseAccountError.cs b/src/Clerk/BackendAPI/Models/Components/VerificationSamlVerificationEnterpriseAccountError.cs new file mode 100644 index 00000000..cc250d4a --- /dev/null +++ b/src/Clerk/BackendAPI/Models/Components/VerificationSamlVerificationEnterpriseAccountError.cs @@ -0,0 +1,167 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Clerk.BackendAPI.Models.Components +{ + using Clerk.BackendAPI.Models.Components; + using Clerk.BackendAPI.Utils; + using Newtonsoft.Json; + using Newtonsoft.Json.Linq; + using System; + using System.Collections.Generic; + using System.Numerics; + using System.Reflection; + + public class VerificationSamlVerificationEnterpriseAccountErrorType + { + private VerificationSamlVerificationEnterpriseAccountErrorType(string value) { Value = value; } + + public string Value { get; private set; } + + public static VerificationSamlVerificationEnterpriseAccountErrorType VerificationSamlErrorEnterpriseAccountClerkError { get { return new VerificationSamlVerificationEnterpriseAccountErrorType("verification_saml_error_EnterpriseAccount_ClerkError"); } } + + public static VerificationSamlVerificationEnterpriseAccountErrorType Null { get { return new VerificationSamlVerificationEnterpriseAccountErrorType("null"); } } + + public override string ToString() { return Value; } + public static implicit operator String(VerificationSamlVerificationEnterpriseAccountErrorType v) { return v.Value; } + public static VerificationSamlVerificationEnterpriseAccountErrorType FromString(string v) { + switch(v) { + case "verification_saml_error_EnterpriseAccount_ClerkError": return VerificationSamlErrorEnterpriseAccountClerkError; + case "null": return Null; + default: throw new ArgumentException("Invalid value for VerificationSamlVerificationEnterpriseAccountErrorType"); + } + } + public override bool Equals(object? obj) + { + if (obj == null || GetType() != obj.GetType()) + { + return false; + } + return Value.Equals(((VerificationSamlVerificationEnterpriseAccountErrorType)obj).Value); + } + + public override int GetHashCode() + { + return Value.GetHashCode(); + } + } + + + [JsonConverter(typeof(VerificationSamlVerificationEnterpriseAccountError.VerificationSamlVerificationEnterpriseAccountErrorConverter))] + public class VerificationSamlVerificationEnterpriseAccountError + { + public VerificationSamlVerificationEnterpriseAccountError(VerificationSamlVerificationEnterpriseAccountErrorType type) + { + Type = type; + } + + [SpeakeasyMetadata("form:explode=true")] + public VerificationSamlErrorEnterpriseAccountClerkError? VerificationSamlErrorEnterpriseAccountClerkError { get; set; } + + public VerificationSamlVerificationEnterpriseAccountErrorType Type { get; set; } + public static VerificationSamlVerificationEnterpriseAccountError CreateVerificationSamlErrorEnterpriseAccountClerkError(VerificationSamlErrorEnterpriseAccountClerkError verificationSamlErrorEnterpriseAccountClerkError) + { + VerificationSamlVerificationEnterpriseAccountErrorType typ = VerificationSamlVerificationEnterpriseAccountErrorType.VerificationSamlErrorEnterpriseAccountClerkError; + + VerificationSamlVerificationEnterpriseAccountError res = new VerificationSamlVerificationEnterpriseAccountError(typ); + res.VerificationSamlErrorEnterpriseAccountClerkError = verificationSamlErrorEnterpriseAccountClerkError; + return res; + } + + public static VerificationSamlVerificationEnterpriseAccountError CreateNull() + { + VerificationSamlVerificationEnterpriseAccountErrorType typ = VerificationSamlVerificationEnterpriseAccountErrorType.Null; + return new VerificationSamlVerificationEnterpriseAccountError(typ); + } + + public class VerificationSamlVerificationEnterpriseAccountErrorConverter : JsonConverter + { + public override bool CanConvert(System.Type objectType) => objectType == typeof(VerificationSamlVerificationEnterpriseAccountError); + + public override bool CanRead => true; + + public override object? ReadJson(JsonReader reader, System.Type objectType, object? existingValue, JsonSerializer serializer) + { + if (reader.TokenType == JsonToken.Null) + { + return null; + } + + var json = JRaw.Create(reader).ToString(); + var fallbackCandidates = new List<(System.Type, object, string)>(); + + try + { + return new VerificationSamlVerificationEnterpriseAccountError(VerificationSamlVerificationEnterpriseAccountErrorType.VerificationSamlErrorEnterpriseAccountClerkError) + { + VerificationSamlErrorEnterpriseAccountClerkError = ResponseBodyDeserializer.DeserializeUndiscriminatedUnionMember(json) + }; + } + catch (ResponseBodyDeserializer.MissingMemberException) + { + fallbackCandidates.Add((typeof(VerificationSamlErrorEnterpriseAccountClerkError), new VerificationSamlVerificationEnterpriseAccountError(VerificationSamlVerificationEnterpriseAccountErrorType.VerificationSamlErrorEnterpriseAccountClerkError), "VerificationSamlErrorEnterpriseAccountClerkError")); + } + catch (ResponseBodyDeserializer.DeserializationException) + { + // try next option + } + catch (Exception) + { + throw; + } + + if (fallbackCandidates.Count > 0) + { + fallbackCandidates.Sort((a, b) => ResponseBodyDeserializer.CompareFallbackCandidates(a.Item1, b.Item1, json)); + foreach(var (deserializationType, returnObject, propertyName) in fallbackCandidates) + { + try + { + return ResponseBodyDeserializer.DeserializeUndiscriminatedUnionFallback(deserializationType, returnObject, propertyName, json); + } + catch (ResponseBodyDeserializer.DeserializationException) + { + // try next fallback option + } + catch (Exception) + { + throw; + } + } + } + + throw new InvalidOperationException("Could not deserialize into any supported types."); + } + + public override void WriteJson(JsonWriter writer, object? value, JsonSerializer serializer) + { + if (value == null) + { + writer.WriteRawValue("null"); + return; + } + + VerificationSamlVerificationEnterpriseAccountError res = (VerificationSamlVerificationEnterpriseAccountError)value; + if (VerificationSamlVerificationEnterpriseAccountErrorType.FromString(res.Type).Equals(VerificationSamlVerificationEnterpriseAccountErrorType.Null)) + { + writer.WriteRawValue("null"); + return; + } + + if (res.VerificationSamlErrorEnterpriseAccountClerkError != null) + { + writer.WriteRawValue(Utilities.SerializeJSON(res.VerificationSamlErrorEnterpriseAccountClerkError)); + return; + } + } + + } + + } +} \ No newline at end of file diff --git a/src/Clerk/BackendAPI/Models/Components/VerificationSamlVerificationEnterpriseAccountObject.cs b/src/Clerk/BackendAPI/Models/Components/VerificationSamlVerificationEnterpriseAccountObject.cs new file mode 100644 index 00000000..53b1eb3c --- /dev/null +++ b/src/Clerk/BackendAPI/Models/Components/VerificationSamlVerificationEnterpriseAccountObject.cs @@ -0,0 +1,55 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Clerk.BackendAPI.Models.Components +{ + using Clerk.BackendAPI.Utils; + using Newtonsoft.Json; + using System; + + public enum VerificationSamlVerificationEnterpriseAccountObject + { + [JsonProperty("verification_saml")] + VerificationSaml, + } + + public static class VerificationSamlVerificationEnterpriseAccountObjectExtension + { + public static string Value(this VerificationSamlVerificationEnterpriseAccountObject value) + { + return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString(); + } + + public static VerificationSamlVerificationEnterpriseAccountObject ToEnum(this string value) + { + foreach(var field in typeof(VerificationSamlVerificationEnterpriseAccountObject).GetFields()) + { + var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false); + if (attributes.Length == 0) + { + continue; + } + + var attribute = attributes[0] as JsonPropertyAttribute; + if (attribute != null && attribute.PropertyName == value) + { + var enumVal = field.GetValue(null); + + if (enumVal is VerificationSamlVerificationEnterpriseAccountObject) + { + return (VerificationSamlVerificationEnterpriseAccountObject)enumVal; + } + } + } + + throw new Exception($"Unknown value {value} for enum VerificationSamlVerificationEnterpriseAccountObject"); + } + } + +} \ No newline at end of file diff --git a/src/Clerk/BackendAPI/Models/Components/VerificationSamlVerificationEnterpriseAccountStatus.cs b/src/Clerk/BackendAPI/Models/Components/VerificationSamlVerificationEnterpriseAccountStatus.cs new file mode 100644 index 00000000..f7f44429 --- /dev/null +++ b/src/Clerk/BackendAPI/Models/Components/VerificationSamlVerificationEnterpriseAccountStatus.cs @@ -0,0 +1,63 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Clerk.BackendAPI.Models.Components +{ + using Clerk.BackendAPI.Utils; + using Newtonsoft.Json; + using System; + + public enum VerificationSamlVerificationEnterpriseAccountStatus + { + [JsonProperty("unverified")] + Unverified, + [JsonProperty("verified")] + Verified, + [JsonProperty("failed")] + Failed, + [JsonProperty("expired")] + Expired, + [JsonProperty("transferable")] + Transferable, + } + + public static class VerificationSamlVerificationEnterpriseAccountStatusExtension + { + public static string Value(this VerificationSamlVerificationEnterpriseAccountStatus value) + { + return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString(); + } + + public static VerificationSamlVerificationEnterpriseAccountStatus ToEnum(this string value) + { + foreach(var field in typeof(VerificationSamlVerificationEnterpriseAccountStatus).GetFields()) + { + var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false); + if (attributes.Length == 0) + { + continue; + } + + var attribute = attributes[0] as JsonPropertyAttribute; + if (attribute != null && attribute.PropertyName == value) + { + var enumVal = field.GetValue(null); + + if (enumVal is VerificationSamlVerificationEnterpriseAccountStatus) + { + return (VerificationSamlVerificationEnterpriseAccountStatus)enumVal; + } + } + } + + throw new Exception($"Unknown value {value} for enum VerificationSamlVerificationEnterpriseAccountStatus"); + } + } + +} \ No newline at end of file diff --git a/src/Clerk/BackendAPI/Models/Components/VerificationSamlVerificationEnterpriseAccountStrategy.cs b/src/Clerk/BackendAPI/Models/Components/VerificationSamlVerificationEnterpriseAccountStrategy.cs new file mode 100644 index 00000000..1e6ebc74 --- /dev/null +++ b/src/Clerk/BackendAPI/Models/Components/VerificationSamlVerificationEnterpriseAccountStrategy.cs @@ -0,0 +1,55 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Clerk.BackendAPI.Models.Components +{ + using Clerk.BackendAPI.Utils; + using Newtonsoft.Json; + using System; + + public enum VerificationSamlVerificationEnterpriseAccountStrategy + { + [JsonProperty("saml")] + Saml, + } + + public static class VerificationSamlVerificationEnterpriseAccountStrategyExtension + { + public static string Value(this VerificationSamlVerificationEnterpriseAccountStrategy value) + { + return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString(); + } + + public static VerificationSamlVerificationEnterpriseAccountStrategy ToEnum(this string value) + { + foreach(var field in typeof(VerificationSamlVerificationEnterpriseAccountStrategy).GetFields()) + { + var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false); + if (attributes.Length == 0) + { + continue; + } + + var attribute = attributes[0] as JsonPropertyAttribute; + if (attribute != null && attribute.PropertyName == value) + { + var enumVal = field.GetValue(null); + + if (enumVal is VerificationSamlVerificationEnterpriseAccountStrategy) + { + return (VerificationSamlVerificationEnterpriseAccountStrategy)enumVal; + } + } + } + + throw new Exception($"Unknown value {value} for enum VerificationSamlVerificationEnterpriseAccountStrategy"); + } + } + +} \ No newline at end of file diff --git a/src/Clerk/BackendAPI/Models/Components/VerificationTicketVerificationEnterpriseAccountObject.cs b/src/Clerk/BackendAPI/Models/Components/VerificationTicketVerificationEnterpriseAccountObject.cs new file mode 100644 index 00000000..e60332aa --- /dev/null +++ b/src/Clerk/BackendAPI/Models/Components/VerificationTicketVerificationEnterpriseAccountObject.cs @@ -0,0 +1,55 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Clerk.BackendAPI.Models.Components +{ + using Clerk.BackendAPI.Utils; + using Newtonsoft.Json; + using System; + + public enum VerificationTicketVerificationEnterpriseAccountObject + { + [JsonProperty("verification_ticket")] + VerificationTicket, + } + + public static class VerificationTicketVerificationEnterpriseAccountObjectExtension + { + public static string Value(this VerificationTicketVerificationEnterpriseAccountObject value) + { + return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString(); + } + + public static VerificationTicketVerificationEnterpriseAccountObject ToEnum(this string value) + { + foreach(var field in typeof(VerificationTicketVerificationEnterpriseAccountObject).GetFields()) + { + var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false); + if (attributes.Length == 0) + { + continue; + } + + var attribute = attributes[0] as JsonPropertyAttribute; + if (attribute != null && attribute.PropertyName == value) + { + var enumVal = field.GetValue(null); + + if (enumVal is VerificationTicketVerificationEnterpriseAccountObject) + { + return (VerificationTicketVerificationEnterpriseAccountObject)enumVal; + } + } + } + + throw new Exception($"Unknown value {value} for enum VerificationTicketVerificationEnterpriseAccountObject"); + } + } + +} \ No newline at end of file diff --git a/src/Clerk/BackendAPI/Models/Components/VerificationTicketVerificationEnterpriseAccountStatus.cs b/src/Clerk/BackendAPI/Models/Components/VerificationTicketVerificationEnterpriseAccountStatus.cs new file mode 100644 index 00000000..dee32e42 --- /dev/null +++ b/src/Clerk/BackendAPI/Models/Components/VerificationTicketVerificationEnterpriseAccountStatus.cs @@ -0,0 +1,59 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Clerk.BackendAPI.Models.Components +{ + using Clerk.BackendAPI.Utils; + using Newtonsoft.Json; + using System; + + public enum VerificationTicketVerificationEnterpriseAccountStatus + { + [JsonProperty("unverified")] + Unverified, + [JsonProperty("verified")] + Verified, + [JsonProperty("expired")] + Expired, + } + + public static class VerificationTicketVerificationEnterpriseAccountStatusExtension + { + public static string Value(this VerificationTicketVerificationEnterpriseAccountStatus value) + { + return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString(); + } + + public static VerificationTicketVerificationEnterpriseAccountStatus ToEnum(this string value) + { + foreach(var field in typeof(VerificationTicketVerificationEnterpriseAccountStatus).GetFields()) + { + var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false); + if (attributes.Length == 0) + { + continue; + } + + var attribute = attributes[0] as JsonPropertyAttribute; + if (attribute != null && attribute.PropertyName == value) + { + var enumVal = field.GetValue(null); + + if (enumVal is VerificationTicketVerificationEnterpriseAccountStatus) + { + return (VerificationTicketVerificationEnterpriseAccountStatus)enumVal; + } + } + } + + throw new Exception($"Unknown value {value} for enum VerificationTicketVerificationEnterpriseAccountStatus"); + } + } + +} \ No newline at end of file diff --git a/src/Clerk/BackendAPI/Models/Components/VerificationTicketVerificationEnterpriseAccountStrategy.cs b/src/Clerk/BackendAPI/Models/Components/VerificationTicketVerificationEnterpriseAccountStrategy.cs new file mode 100644 index 00000000..3688b91c --- /dev/null +++ b/src/Clerk/BackendAPI/Models/Components/VerificationTicketVerificationEnterpriseAccountStrategy.cs @@ -0,0 +1,73 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Clerk.BackendAPI.Models.Components +{ + using Clerk.BackendAPI.Utils; + using Newtonsoft.Json; + using System; + using System.Collections.Concurrent; + using System.Collections.Generic; + using System.Linq; + + [JsonConverter(typeof(OpenEnumConverter))] + public class VerificationTicketVerificationEnterpriseAccountStrategy : IEquatable + { + public static readonly VerificationTicketVerificationEnterpriseAccountStrategy Ticket = new VerificationTicketVerificationEnterpriseAccountStrategy("ticket"); + + private static readonly Dictionary _knownValues = + new Dictionary () + { + ["ticket"] = Ticket + }; + + private static readonly ConcurrentDictionary _values = + new ConcurrentDictionary(_knownValues); + + private VerificationTicketVerificationEnterpriseAccountStrategy(string value) + { + if (value == null) throw new ArgumentNullException(nameof(value)); + Value = value; + } + + public string Value { get; } + + public static VerificationTicketVerificationEnterpriseAccountStrategy Of(string value) + { + return _values.GetOrAdd(value, _ => new VerificationTicketVerificationEnterpriseAccountStrategy(value)); + } + + public static implicit operator VerificationTicketVerificationEnterpriseAccountStrategy(string value) => Of(value); + public static implicit operator string(VerificationTicketVerificationEnterpriseAccountStrategy verificationticketverificationenterpriseaccountstrategy) => verificationticketverificationenterpriseaccountstrategy.Value; + + public static VerificationTicketVerificationEnterpriseAccountStrategy[] Values() + { + return _values.Values.ToArray(); + } + + public override string ToString() => Value.ToString(); + + public bool IsKnown() + { + return _knownValues.ContainsKey(Value); + } + + public override bool Equals(object? obj) => Equals(obj as VerificationTicketVerificationEnterpriseAccountStrategy); + + public bool Equals(VerificationTicketVerificationEnterpriseAccountStrategy? other) + { + if (ReferenceEquals(this, other)) return true; + if (other is null) return false; + return string.Equals(Value, other.Value); + } + + public override int GetHashCode() => Value.GetHashCode(); + } + +} \ No newline at end of file diff --git a/src/Clerk/BackendAPI/Models/Components/VerificationTicketVerificationTicket.cs b/src/Clerk/BackendAPI/Models/Components/VerificationTicketVerificationTicket.cs new file mode 100644 index 00000000..5892b233 --- /dev/null +++ b/src/Clerk/BackendAPI/Models/Components/VerificationTicketVerificationTicket.cs @@ -0,0 +1,41 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Clerk.BackendAPI.Models.Components +{ + using Clerk.BackendAPI.Models.Components; + using Clerk.BackendAPI.Utils; + using Newtonsoft.Json; + using System; + using System.Collections.Concurrent; + using System.Collections.Generic; + using System.Linq; + + public class VerificationTicketVerificationTicket + { + + [JsonProperty("object")] + public VerificationTicketVerificationEnterpriseAccountObject? Object { get; set; } + + [JsonProperty("status")] + public VerificationTicketVerificationEnterpriseAccountStatus Status { get; set; } = default!; + + [JsonProperty("strategy")] + public VerificationTicketVerificationEnterpriseAccountStrategy Strategy { get; set; } = default!; + + [JsonProperty("attempts", NullValueHandling = NullValueHandling.Include)] + public long? Attempts { get; set; } + + [JsonProperty("expire_at", NullValueHandling = NullValueHandling.Include)] + public long? ExpireAt { get; set; } + + [JsonProperty("verified_at_client")] + public string? VerifiedAtClient { get; set; } = null; + } +} \ No newline at end of file diff --git a/src/Clerk/BackendAPI/Models/Operations/AssignPermissionToOrganizationRoleRequest.cs b/src/Clerk/BackendAPI/Models/Operations/AssignPermissionToOrganizationRoleRequest.cs new file mode 100644 index 00000000..2b5ead66 --- /dev/null +++ b/src/Clerk/BackendAPI/Models/Operations/AssignPermissionToOrganizationRoleRequest.cs @@ -0,0 +1,29 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Clerk.BackendAPI.Models.Operations +{ + using Clerk.BackendAPI.Utils; + + public class AssignPermissionToOrganizationRoleRequest + { + + /// + /// The ID of the organization role + /// + [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=organization_role_id")] + public string OrganizationRoleId { get; set; } = default!; + + /// + /// The ID of the permission to assign + /// + [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=permission_id")] + public string PermissionId { get; set; } = default!; + } +} \ No newline at end of file diff --git a/src/Clerk/BackendAPI/Models/Operations/AssignPermissionToOrganizationRoleResponse.cs b/src/Clerk/BackendAPI/Models/Operations/AssignPermissionToOrganizationRoleResponse.cs new file mode 100644 index 00000000..b6573045 --- /dev/null +++ b/src/Clerk/BackendAPI/Models/Operations/AssignPermissionToOrganizationRoleResponse.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Clerk.BackendAPI.Models.Operations +{ + using Clerk.BackendAPI.Models.Components; + using Clerk.BackendAPI.Utils; + using Newtonsoft.Json; + + public class AssignPermissionToOrganizationRoleResponse + { + + [JsonProperty("-")] + public HTTPMetadata HttpMeta { get; set; } = default!; + + /// + /// Success + /// + public Role? Role { get; set; } + } +} \ No newline at end of file diff --git a/src/Clerk/BackendAPI/Models/Operations/CreateOrganizationPermissionRequestBody.cs b/src/Clerk/BackendAPI/Models/Operations/CreateOrganizationPermissionRequestBody.cs new file mode 100644 index 00000000..16141eca --- /dev/null +++ b/src/Clerk/BackendAPI/Models/Operations/CreateOrganizationPermissionRequestBody.cs @@ -0,0 +1,36 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Clerk.BackendAPI.Models.Operations +{ + using Clerk.BackendAPI.Utils; + using Newtonsoft.Json; + + public class CreateOrganizationPermissionRequestBody + { + + /// + /// The name of the permission. + /// + [JsonProperty("name")] + public string Name { get; set; } = default!; + + /// + /// The key of the permission. Must have the format "org:feature:action" where feature and action are segments consisting of lowercase letters, digits, or underscores, for example "org:billing:manage" or "org:team:read". Cannot begin with "org:sys_" as that prefix is reserved for system permissions. + /// + [JsonProperty("key")] + public string Key { get; set; } = default!; + + /// + /// A description of the permission. + /// + [JsonProperty("description")] + public string? Description { get; set; } + } +} \ No newline at end of file diff --git a/src/Clerk/BackendAPI/Models/Operations/CreateOrganizationPermissionResponse.cs b/src/Clerk/BackendAPI/Models/Operations/CreateOrganizationPermissionResponse.cs new file mode 100644 index 00000000..44d76a6f --- /dev/null +++ b/src/Clerk/BackendAPI/Models/Operations/CreateOrganizationPermissionResponse.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Clerk.BackendAPI.Models.Operations +{ + using Clerk.BackendAPI.Models.Components; + using Clerk.BackendAPI.Utils; + using Newtonsoft.Json; + + public class CreateOrganizationPermissionResponse + { + + [JsonProperty("-")] + public HTTPMetadata HttpMeta { get; set; } = default!; + + /// + /// Success + /// + public Permission? Permission { get; set; } + } +} \ No newline at end of file diff --git a/src/Clerk/BackendAPI/Models/Operations/CreateOrganizationRoleRequestBody.cs b/src/Clerk/BackendAPI/Models/Operations/CreateOrganizationRoleRequestBody.cs new file mode 100644 index 00000000..56124e90 --- /dev/null +++ b/src/Clerk/BackendAPI/Models/Operations/CreateOrganizationRoleRequestBody.cs @@ -0,0 +1,49 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Clerk.BackendAPI.Models.Operations +{ + using Clerk.BackendAPI.Utils; + using Newtonsoft.Json; + using System.Collections.Generic; + + public class CreateOrganizationRoleRequestBody + { + + /// + /// The name of the new organization role + /// + [JsonProperty("name")] + public string Name { get; set; } = default!; + + /// + /// A unique key for the organization role. Must start with 'org:' and contain only lowercase alphanumeric characters and underscores. + /// + [JsonProperty("key")] + public string Key { get; set; } = default!; + + /// + /// Optional description for the role + /// + [JsonProperty("description")] + public string? Description { get; set; } = null; + + /// + /// Array of permission IDs to assign to the role + /// + [JsonProperty("permissions")] + public List? Permissions { get; set; } = null; + + /// + /// Whether this role should be included in the initial role set + /// + [JsonProperty("include_in_initial_role_set")] + public bool? IncludeInInitialRoleSet { get; set; } = null; + } +} \ No newline at end of file diff --git a/src/Clerk/BackendAPI/Models/Operations/CreateOrganizationRoleResponse.cs b/src/Clerk/BackendAPI/Models/Operations/CreateOrganizationRoleResponse.cs new file mode 100644 index 00000000..25f847ba --- /dev/null +++ b/src/Clerk/BackendAPI/Models/Operations/CreateOrganizationRoleResponse.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Clerk.BackendAPI.Models.Operations +{ + using Clerk.BackendAPI.Models.Components; + using Clerk.BackendAPI.Utils; + using Newtonsoft.Json; + + public class CreateOrganizationRoleResponse + { + + [JsonProperty("-")] + public HTTPMetadata HttpMeta { get; set; } = default!; + + /// + /// Success + /// + public Role? Role { get; set; } + } +} \ No newline at end of file diff --git a/src/Clerk/BackendAPI/Models/Operations/CreateSessionRequestBody.cs b/src/Clerk/BackendAPI/Models/Operations/CreateSessionRequestBody.cs index 0bd9bfc9..ef149fe3 100644 --- a/src/Clerk/BackendAPI/Models/Operations/CreateSessionRequestBody.cs +++ b/src/Clerk/BackendAPI/Models/Operations/CreateSessionRequestBody.cs @@ -20,5 +20,11 @@ public class CreateSessionRequestBody ///
[JsonProperty("user_id")] public string UserId { get; set; } = default!; + + /// + /// The ID of the organization to set as active for this session + /// + [JsonProperty("active_organization_id")] + public string? ActiveOrganizationId { get; set; } } } \ No newline at end of file diff --git a/src/Clerk/BackendAPI/Models/Operations/DeleteOrganizationPermissionRequest.cs b/src/Clerk/BackendAPI/Models/Operations/DeleteOrganizationPermissionRequest.cs new file mode 100644 index 00000000..d53e34ae --- /dev/null +++ b/src/Clerk/BackendAPI/Models/Operations/DeleteOrganizationPermissionRequest.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Clerk.BackendAPI.Models.Operations +{ + using Clerk.BackendAPI.Utils; + + public class DeleteOrganizationPermissionRequest + { + + /// + /// The ID of the permission to delete + /// + [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=permission_id")] + public string PermissionId { get; set; } = default!; + } +} \ No newline at end of file diff --git a/src/Clerk/BackendAPI/Models/Operations/DeleteOrganizationPermissionResponse.cs b/src/Clerk/BackendAPI/Models/Operations/DeleteOrganizationPermissionResponse.cs new file mode 100644 index 00000000..5d03b885 --- /dev/null +++ b/src/Clerk/BackendAPI/Models/Operations/DeleteOrganizationPermissionResponse.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Clerk.BackendAPI.Models.Operations +{ + using Clerk.BackendAPI.Models.Components; + using Clerk.BackendAPI.Utils; + using Newtonsoft.Json; + + public class DeleteOrganizationPermissionResponse + { + + [JsonProperty("-")] + public HTTPMetadata HttpMeta { get; set; } = default!; + + /// + /// Deleted Object + /// + public DeletedObject? DeletedObject { get; set; } + } +} \ No newline at end of file diff --git a/src/Clerk/BackendAPI/Models/Operations/DeleteOrganizationRoleRequest.cs b/src/Clerk/BackendAPI/Models/Operations/DeleteOrganizationRoleRequest.cs new file mode 100644 index 00000000..893f3745 --- /dev/null +++ b/src/Clerk/BackendAPI/Models/Operations/DeleteOrganizationRoleRequest.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Clerk.BackendAPI.Models.Operations +{ + using Clerk.BackendAPI.Utils; + + public class DeleteOrganizationRoleRequest + { + + /// + /// The ID of the organization role to delete + /// + [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=organization_role_id")] + public string OrganizationRoleId { get; set; } = default!; + } +} \ No newline at end of file diff --git a/src/Clerk/BackendAPI/Models/Operations/DeleteOrganizationRoleResponse.cs b/src/Clerk/BackendAPI/Models/Operations/DeleteOrganizationRoleResponse.cs new file mode 100644 index 00000000..1e4160d5 --- /dev/null +++ b/src/Clerk/BackendAPI/Models/Operations/DeleteOrganizationRoleResponse.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Clerk.BackendAPI.Models.Operations +{ + using Clerk.BackendAPI.Models.Components; + using Clerk.BackendAPI.Utils; + using Newtonsoft.Json; + + public class DeleteOrganizationRoleResponse + { + + [JsonProperty("-")] + public HTTPMetadata HttpMeta { get; set; } = default!; + + /// + /// Deleted Object + /// + public DeletedObject? DeletedObject { get; set; } + } +} \ No newline at end of file diff --git a/src/Clerk/BackendAPI/Models/Operations/GetOrganizationPermissionRequest.cs b/src/Clerk/BackendAPI/Models/Operations/GetOrganizationPermissionRequest.cs new file mode 100644 index 00000000..8d51cb67 --- /dev/null +++ b/src/Clerk/BackendAPI/Models/Operations/GetOrganizationPermissionRequest.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Clerk.BackendAPI.Models.Operations +{ + using Clerk.BackendAPI.Utils; + + public class GetOrganizationPermissionRequest + { + + /// + /// The ID of the permission to retrieve + /// + [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=permission_id")] + public string PermissionId { get; set; } = default!; + } +} \ No newline at end of file diff --git a/src/Clerk/BackendAPI/Models/Operations/GetOrganizationPermissionResponse.cs b/src/Clerk/BackendAPI/Models/Operations/GetOrganizationPermissionResponse.cs new file mode 100644 index 00000000..b3f83017 --- /dev/null +++ b/src/Clerk/BackendAPI/Models/Operations/GetOrganizationPermissionResponse.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Clerk.BackendAPI.Models.Operations +{ + using Clerk.BackendAPI.Models.Components; + using Clerk.BackendAPI.Utils; + using Newtonsoft.Json; + + public class GetOrganizationPermissionResponse + { + + [JsonProperty("-")] + public HTTPMetadata HttpMeta { get; set; } = default!; + + /// + /// Success + /// + public Permission? Permission { get; set; } + } +} \ No newline at end of file diff --git a/src/Clerk/BackendAPI/Models/Operations/GetOrganizationRoleRequest.cs b/src/Clerk/BackendAPI/Models/Operations/GetOrganizationRoleRequest.cs new file mode 100644 index 00000000..c38628ac --- /dev/null +++ b/src/Clerk/BackendAPI/Models/Operations/GetOrganizationRoleRequest.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Clerk.BackendAPI.Models.Operations +{ + using Clerk.BackendAPI.Utils; + + public class GetOrganizationRoleRequest + { + + /// + /// The ID of the organization role + /// + [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=organization_role_id")] + public string OrganizationRoleId { get; set; } = default!; + } +} \ No newline at end of file diff --git a/src/Clerk/BackendAPI/Models/Operations/GetOrganizationRoleResponse.cs b/src/Clerk/BackendAPI/Models/Operations/GetOrganizationRoleResponse.cs new file mode 100644 index 00000000..022d5b78 --- /dev/null +++ b/src/Clerk/BackendAPI/Models/Operations/GetOrganizationRoleResponse.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Clerk.BackendAPI.Models.Operations +{ + using Clerk.BackendAPI.Models.Components; + using Clerk.BackendAPI.Utils; + using Newtonsoft.Json; + + public class GetOrganizationRoleResponse + { + + [JsonProperty("-")] + public HTTPMetadata HttpMeta { get; set; } = default!; + + /// + /// Success + /// + public Role? Role { get; set; } + } +} \ No newline at end of file diff --git a/src/Clerk/BackendAPI/Models/Operations/ListOrganizationPermissionsRequest.cs b/src/Clerk/BackendAPI/Models/Operations/ListOrganizationPermissionsRequest.cs new file mode 100644 index 00000000..8f52d36a --- /dev/null +++ b/src/Clerk/BackendAPI/Models/Operations/ListOrganizationPermissionsRequest.cs @@ -0,0 +1,60 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Clerk.BackendAPI.Models.Operations +{ + using Clerk.BackendAPI.Utils; + + public class ListOrganizationPermissionsRequest + { + + /// + /// Returns organization permissions with ID, name, or key that match the given query.
+ /// + /// + /// Uses exact match for permission ID and partial match for name and key. + /// + ///
+ [SpeakeasyMetadata("queryParam:style=form,explode=true,name=query")] + public string? Query { get; set; } + + /// + /// Allows to return organization permissions in a particular order.
+ /// + /// + /// At the moment, you can order the returned permissions by their `created_at`, `name`, or `key`.
+ /// In order to specify the direction, you can use the `+/-` symbols prepended in the property to order by.
+ /// For example, if you want permissions to be returned in descending order according to their `created_at` property, you can use `-created_at`. + ///
+ ///
+ [SpeakeasyMetadata("queryParam:style=form,explode=true,name=order_by")] + public string? OrderBy { get; set; } + + /// + /// Applies a limit to the number of results returned.
+ /// + /// + /// Can be used for paginating the results together with `offset`. + /// + ///
+ [SpeakeasyMetadata("queryParam:style=form,explode=true,name=limit")] + public long? Limit { get; set; } = 10; + + /// + /// Skip the first `offset` results when paginating.
+ /// + /// + /// Needs to be an integer greater or equal to zero.
+ /// To be used in conjunction with `limit`. + ///
+ ///
+ [SpeakeasyMetadata("queryParam:style=form,explode=true,name=offset")] + public long? Offset { get; set; } = 0; + } +} \ No newline at end of file diff --git a/src/Clerk/BackendAPI/Models/Operations/ListOrganizationPermissionsResponse.cs b/src/Clerk/BackendAPI/Models/Operations/ListOrganizationPermissionsResponse.cs new file mode 100644 index 00000000..056297df --- /dev/null +++ b/src/Clerk/BackendAPI/Models/Operations/ListOrganizationPermissionsResponse.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Clerk.BackendAPI.Models.Operations +{ + using Clerk.BackendAPI.Models.Components; + using Clerk.BackendAPI.Utils; + using Newtonsoft.Json; + + public class ListOrganizationPermissionsResponse + { + + [JsonProperty("-")] + public HTTPMetadata HttpMeta { get; set; } = default!; + + /// + /// Success + /// + public Permissions? Permissions { get; set; } + } +} \ No newline at end of file diff --git a/src/Clerk/BackendAPI/Models/Operations/ListOrganizationRolesRequest.cs b/src/Clerk/BackendAPI/Models/Operations/ListOrganizationRolesRequest.cs new file mode 100644 index 00000000..d42ffff2 --- /dev/null +++ b/src/Clerk/BackendAPI/Models/Operations/ListOrganizationRolesRequest.cs @@ -0,0 +1,62 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Clerk.BackendAPI.Models.Operations +{ + using Clerk.BackendAPI.Utils; + + public class ListOrganizationRolesRequest + { + + /// + /// Returns organization roles with ID, name, or key that match the given query.
+ /// + /// + /// Uses exact match for organization role ID and partial match for name and key. + /// + ///
+ [SpeakeasyMetadata("queryParam:style=form,explode=true,name=query")] + public string? Query { get; set; } + + /// + /// Allows to return organization roles in a particular order.
+ /// + /// + /// At the moment, you can order the returned organization roles by their `created_at`, `name`, or `key`.
+ /// In order to specify the direction, you can use the `+/-` symbols prepended in the property to order by.
+ /// For example, if you want organization roles to be returned in descending order according to their `created_at` property, you can use `-created_at`.
+ /// If you don't use `+` or `-`, then `+` is implied.
+ /// Defaults to `-created_at`. + ///
+ ///
+ [SpeakeasyMetadata("queryParam:style=form,explode=true,name=order_by")] + public string? OrderBy { get; set; } = "-created_at"; + + /// + /// Applies a limit to the number of results returned.
+ /// + /// + /// Can be used for paginating the results together with `offset`. + /// + ///
+ [SpeakeasyMetadata("queryParam:style=form,explode=true,name=limit")] + public long? Limit { get; set; } = 10; + + /// + /// Skip the first `offset` results when paginating.
+ /// + /// + /// Needs to be an integer greater or equal to zero.
+ /// To be used in conjunction with `limit`. + ///
+ ///
+ [SpeakeasyMetadata("queryParam:style=form,explode=true,name=offset")] + public long? Offset { get; set; } = 0; + } +} \ No newline at end of file diff --git a/src/Clerk/BackendAPI/Models/Operations/ListOrganizationRolesResponse.cs b/src/Clerk/BackendAPI/Models/Operations/ListOrganizationRolesResponse.cs new file mode 100644 index 00000000..2751457e --- /dev/null +++ b/src/Clerk/BackendAPI/Models/Operations/ListOrganizationRolesResponse.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Clerk.BackendAPI.Models.Operations +{ + using Clerk.BackendAPI.Models.Components; + using Clerk.BackendAPI.Utils; + using Newtonsoft.Json; + + public class ListOrganizationRolesResponse + { + + [JsonProperty("-")] + public HTTPMetadata HttpMeta { get; set; } = default!; + + /// + /// Success + /// + public Roles? Roles { get; set; } + } +} \ No newline at end of file diff --git a/src/Clerk/BackendAPI/Models/Operations/RemovePermissionFromOrganizationRoleRequest.cs b/src/Clerk/BackendAPI/Models/Operations/RemovePermissionFromOrganizationRoleRequest.cs new file mode 100644 index 00000000..e8971d3e --- /dev/null +++ b/src/Clerk/BackendAPI/Models/Operations/RemovePermissionFromOrganizationRoleRequest.cs @@ -0,0 +1,29 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Clerk.BackendAPI.Models.Operations +{ + using Clerk.BackendAPI.Utils; + + public class RemovePermissionFromOrganizationRoleRequest + { + + /// + /// The ID of the organization role + /// + [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=organization_role_id")] + public string OrganizationRoleId { get; set; } = default!; + + /// + /// The ID of the permission to remove + /// + [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=permission_id")] + public string PermissionId { get; set; } = default!; + } +} \ No newline at end of file diff --git a/src/Clerk/BackendAPI/Models/Operations/RemovePermissionFromOrganizationRoleResponse.cs b/src/Clerk/BackendAPI/Models/Operations/RemovePermissionFromOrganizationRoleResponse.cs new file mode 100644 index 00000000..d50570f0 --- /dev/null +++ b/src/Clerk/BackendAPI/Models/Operations/RemovePermissionFromOrganizationRoleResponse.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Clerk.BackendAPI.Models.Operations +{ + using Clerk.BackendAPI.Models.Components; + using Clerk.BackendAPI.Utils; + using Newtonsoft.Json; + + public class RemovePermissionFromOrganizationRoleResponse + { + + [JsonProperty("-")] + public HTTPMetadata HttpMeta { get; set; } = default!; + + /// + /// Success + /// + public Role? Role { get; set; } + } +} \ No newline at end of file diff --git a/src/Clerk/BackendAPI/Models/Operations/UpdateInstanceAuthConfigRequestBody.cs b/src/Clerk/BackendAPI/Models/Operations/UpdateInstanceAuthConfigRequestBody.cs index eda000a4..a23d0995 100644 --- a/src/Clerk/BackendAPI/Models/Operations/UpdateInstanceAuthConfigRequestBody.cs +++ b/src/Clerk/BackendAPI/Models/Operations/UpdateInstanceAuthConfigRequestBody.cs @@ -38,16 +38,6 @@ public class UpdateInstanceAuthConfigRequestBody [JsonProperty("progressive_sign_up")] public bool? ProgressiveSignUp { get; set; } = null; - /// - /// The "enhanced_email_deliverability" feature will send emails from "verifications@clerk.dev" instead of your domain.
- /// - /// - /// This can be helpful if you do not have a high domain reputation. - /// - ///
- [JsonProperty("enhanced_email_deliverability")] - public bool? EnhancedEmailDeliverability { get; set; } = null; - /// /// Toggles test mode for this instance, allowing the use of test email addresses and phone numbers.
/// diff --git a/src/Clerk/BackendAPI/Models/Operations/UpdateInstanceRequestBody.cs b/src/Clerk/BackendAPI/Models/Operations/UpdateInstanceRequestBody.cs index 78b48684..0467f08d 100644 --- a/src/Clerk/BackendAPI/Models/Operations/UpdateInstanceRequestBody.cs +++ b/src/Clerk/BackendAPI/Models/Operations/UpdateInstanceRequestBody.cs @@ -33,16 +33,6 @@ public class UpdateInstanceRequestBody [JsonProperty("hibp")] public bool? Hibp { get; set; } = null; - /// - /// The "enhanced_email_deliverability" feature will send emails from "verifications@clerk.dev" instead of your domain.
- /// - /// - /// This can be helpful if you do not have a high domain reputation. - /// - ///
- [JsonProperty("enhanced_email_deliverability")] - public bool? EnhancedEmailDeliverability { get; set; } = null; - [JsonProperty("support_email")] public string? SupportEmail { get; set; } = null; diff --git a/src/Clerk/BackendAPI/Models/Operations/UpdateOrganizationPermissionRequest.cs b/src/Clerk/BackendAPI/Models/Operations/UpdateOrganizationPermissionRequest.cs new file mode 100644 index 00000000..c7387b7e --- /dev/null +++ b/src/Clerk/BackendAPI/Models/Operations/UpdateOrganizationPermissionRequest.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Clerk.BackendAPI.Models.Operations +{ + using Clerk.BackendAPI.Models.Operations; + using Clerk.BackendAPI.Utils; + + public class UpdateOrganizationPermissionRequest + { + + /// + /// The ID of the permission to update + /// + [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=permission_id")] + public string PermissionId { get; set; } = default!; + + [SpeakeasyMetadata("request:mediaType=application/json")] + public UpdateOrganizationPermissionRequestBody RequestBody { get; set; } = default!; + } +} \ No newline at end of file diff --git a/src/Clerk/BackendAPI/Models/Operations/UpdateOrganizationPermissionRequestBody.cs b/src/Clerk/BackendAPI/Models/Operations/UpdateOrganizationPermissionRequestBody.cs new file mode 100644 index 00000000..90008fa5 --- /dev/null +++ b/src/Clerk/BackendAPI/Models/Operations/UpdateOrganizationPermissionRequestBody.cs @@ -0,0 +1,36 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Clerk.BackendAPI.Models.Operations +{ + using Clerk.BackendAPI.Utils; + using Newtonsoft.Json; + + public class UpdateOrganizationPermissionRequestBody + { + + /// + /// The name of the permission. + /// + [JsonProperty("name")] + public string? Name { get; set; } + + /// + /// The key of the permission. Must have the format "org:feature:action" where feature and action are segments consisting of lowercase letters, digits, or underscores. Cannot begin with "org:sys_" as that prefix is reserved for system permissions. + /// + [JsonProperty("key")] + public string? Key { get; set; } + + /// + /// A description of the permission. + /// + [JsonProperty("description")] + public string? Description { get; set; } + } +} \ No newline at end of file diff --git a/src/Clerk/BackendAPI/Models/Operations/UpdateOrganizationPermissionResponse.cs b/src/Clerk/BackendAPI/Models/Operations/UpdateOrganizationPermissionResponse.cs new file mode 100644 index 00000000..f52880ad --- /dev/null +++ b/src/Clerk/BackendAPI/Models/Operations/UpdateOrganizationPermissionResponse.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Clerk.BackendAPI.Models.Operations +{ + using Clerk.BackendAPI.Models.Components; + using Clerk.BackendAPI.Utils; + using Newtonsoft.Json; + + public class UpdateOrganizationPermissionResponse + { + + [JsonProperty("-")] + public HTTPMetadata HttpMeta { get; set; } = default!; + + /// + /// Success + /// + public Permission? Permission { get; set; } + } +} \ No newline at end of file diff --git a/src/Clerk/BackendAPI/Models/Operations/UpdateOrganizationRoleRequest.cs b/src/Clerk/BackendAPI/Models/Operations/UpdateOrganizationRoleRequest.cs new file mode 100644 index 00000000..ac8e2c0b --- /dev/null +++ b/src/Clerk/BackendAPI/Models/Operations/UpdateOrganizationRoleRequest.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Clerk.BackendAPI.Models.Operations +{ + using Clerk.BackendAPI.Models.Operations; + using Clerk.BackendAPI.Utils; + + public class UpdateOrganizationRoleRequest + { + + /// + /// The ID of the organization role to update + /// + [SpeakeasyMetadata("pathParam:style=simple,explode=false,name=organization_role_id")] + public string OrganizationRoleId { get; set; } = default!; + + [SpeakeasyMetadata("request:mediaType=application/json")] + public UpdateOrganizationRoleRequestBody RequestBody { get; set; } = default!; + } +} \ No newline at end of file diff --git a/src/Clerk/BackendAPI/Models/Operations/UpdateOrganizationRoleRequestBody.cs b/src/Clerk/BackendAPI/Models/Operations/UpdateOrganizationRoleRequestBody.cs new file mode 100644 index 00000000..5273278e --- /dev/null +++ b/src/Clerk/BackendAPI/Models/Operations/UpdateOrganizationRoleRequestBody.cs @@ -0,0 +1,43 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Clerk.BackendAPI.Models.Operations +{ + using Clerk.BackendAPI.Utils; + using Newtonsoft.Json; + using System.Collections.Generic; + + public class UpdateOrganizationRoleRequestBody + { + + /// + /// The new name for the organization role + /// + [JsonProperty("name")] + public string? Name { get; set; } = null; + + /// + /// A unique key for the organization role. Must start with 'org:' and contain only lowercase alphanumeric characters and underscores. + /// + [JsonProperty("key")] + public string? Key { get; set; } = null; + + /// + /// Optional description for the role + /// + [JsonProperty("description")] + public string? Description { get; set; } = null; + + /// + /// Array of permission IDs to assign to the role. If provided, this will replace the existing permissions. + /// + [JsonProperty("permissions")] + public List? Permissions { get; set; } = null; + } +} \ No newline at end of file diff --git a/src/Clerk/BackendAPI/Models/Operations/UpdateOrganizationRoleResponse.cs b/src/Clerk/BackendAPI/Models/Operations/UpdateOrganizationRoleResponse.cs new file mode 100644 index 00000000..8ea285fb --- /dev/null +++ b/src/Clerk/BackendAPI/Models/Operations/UpdateOrganizationRoleResponse.cs @@ -0,0 +1,27 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Clerk.BackendAPI.Models.Operations +{ + using Clerk.BackendAPI.Models.Components; + using Clerk.BackendAPI.Utils; + using Newtonsoft.Json; + + public class UpdateOrganizationRoleResponse + { + + [JsonProperty("-")] + public HTTPMetadata HttpMeta { get; set; } = default!; + + /// + /// Success + /// + public Role? Role { get; set; } + } +} \ No newline at end of file diff --git a/src/Clerk/BackendAPI/OauthAccessTokens.cs b/src/Clerk/BackendAPI/OauthAccessTokens.cs index 3d208a0e..085971fd 100644 --- a/src/Clerk/BackendAPI/OauthAccessTokens.cs +++ b/src/Clerk/BackendAPI/OauthAccessTokens.cs @@ -34,10 +34,11 @@ public interface IOauthAccessTokens public class OauthAccessTokens: IOauthAccessTokens { public SDKConfig SDKConfiguration { get; private set; } - private const string _language = "csharp"; - private const string _sdkVersion = "0.14.0"; - private const string _sdkGenVersion = "2.748.0"; - private const string _openapiDocVersion = "2025-11-10"; + + private const string _language = Constants.Language; + private const string _sdkVersion = Constants.SdkVersion; + private const string _sdkGenVersion = Constants.SdkGenVersion; + private const string _openapiDocVersion = Constants.OpenApiDocVersion; public OauthAccessTokens(SDKConfig config) { diff --git a/src/Clerk/BackendAPI/OauthApplications.cs b/src/Clerk/BackendAPI/OauthApplications.cs index 1675e28d..be0bf4d8 100644 --- a/src/Clerk/BackendAPI/OauthApplications.cs +++ b/src/Clerk/BackendAPI/OauthApplications.cs @@ -90,10 +90,11 @@ public interface IOauthApplications public class OauthApplications: IOauthApplications { public SDKConfig SDKConfiguration { get; private set; } - private const string _language = "csharp"; - private const string _sdkVersion = "0.14.0"; - private const string _sdkGenVersion = "2.748.0"; - private const string _openapiDocVersion = "2025-11-10"; + + private const string _language = Constants.Language; + private const string _sdkVersion = Constants.SdkVersion; + private const string _sdkGenVersion = Constants.SdkGenVersion; + private const string _openapiDocVersion = Constants.OpenApiDocVersion; public OauthApplications(SDKConfig config) { @@ -110,7 +111,7 @@ public async Task ListAsync(long? limit = 10, lon NameQuery = nameQuery, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/oauth_applications", request); + var urlString = URLBuilder.Build(baseUrl, "/oauth_applications", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -407,7 +408,7 @@ public async Task GetAsync(string oauthApplicationI OauthApplicationId = oauthApplicationId, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/oauth_applications/{oauth_application_id}", request); + var urlString = URLBuilder.Build(baseUrl, "/oauth_applications/{oauth_application_id}", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -555,7 +556,7 @@ public async Task UpdateAsync(string oauthApplic RequestBody = requestBody, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/oauth_applications/{oauth_application_id}", request); + var urlString = URLBuilder.Build(baseUrl, "/oauth_applications/{oauth_application_id}", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Patch, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -708,7 +709,7 @@ public async Task DeleteAsync(string oauthApplic OauthApplicationId = oauthApplicationId, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/oauth_applications/{oauth_application_id}", request); + var urlString = URLBuilder.Build(baseUrl, "/oauth_applications/{oauth_application_id}", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Delete, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -855,7 +856,7 @@ public async Task RotateSecretAsync(string OauthApplicationId = oauthApplicationId, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/oauth_applications/{oauth_application_id}/rotate_secret", request); + var urlString = URLBuilder.Build(baseUrl, "/oauth_applications/{oauth_application_id}/rotate_secret", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); diff --git a/src/Clerk/BackendAPI/OrganizationDomains.cs b/src/Clerk/BackendAPI/OrganizationDomains.cs index 3a7a8dd3..cb856dc4 100644 --- a/src/Clerk/BackendAPI/OrganizationDomains.cs +++ b/src/Clerk/BackendAPI/OrganizationDomains.cs @@ -80,10 +80,11 @@ public interface IOrganizationDomains public class OrganizationDomains: IOrganizationDomains { public SDKConfig SDKConfiguration { get; private set; } - private const string _language = "csharp"; - private const string _sdkVersion = "0.14.0"; - private const string _sdkGenVersion = "2.748.0"; - private const string _openapiDocVersion = "2025-11-10"; + + private const string _language = Constants.Language; + private const string _sdkVersion = Constants.SdkVersion; + private const string _sdkGenVersion = Constants.SdkGenVersion; + private const string _openapiDocVersion = Constants.OpenApiDocVersion; public OrganizationDomains(SDKConfig config) { @@ -98,7 +99,7 @@ public async Task CreateAsync(string organizat RequestBody = requestBody, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/organizations/{organization_id}/domains", request); + var urlString = URLBuilder.Build(baseUrl, "/organizations/{organization_id}/domains", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -247,7 +248,7 @@ public async Task CreateAsync(string organizat public async Task ListAsync(ListOrganizationDomainsRequest request, RetryConfig? retryConfig = null) { string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/organizations/{organization_id}/domains", request); + var urlString = URLBuilder.Build(baseUrl, "/organizations/{organization_id}/domains", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -396,7 +397,7 @@ public async Task UpdateAsync(string organizat RequestBody = requestBody, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/organizations/{organization_id}/domains/{domain_id}", request); + var urlString = URLBuilder.Build(baseUrl, "/organizations/{organization_id}/domains/{domain_id}", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Patch, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -550,7 +551,7 @@ public async Task DeleteAsync(string organizat DomainId = domainId, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/organizations/{organization_id}/domains/{domain_id}", request); + var urlString = URLBuilder.Build(baseUrl, "/organizations/{organization_id}/domains/{domain_id}", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Delete, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -693,7 +694,7 @@ public async Task DeleteAsync(string organizat public async Task ListAllAsync(ListAllOrganizationDomainsRequest? request = null, RetryConfig? retryConfig = null) { string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/organization_domains", request); + var urlString = URLBuilder.Build(baseUrl, "/organization_domains", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); diff --git a/src/Clerk/BackendAPI/OrganizationInvitations.cs b/src/Clerk/BackendAPI/OrganizationInvitations.cs index 0bc63390..c5824831 100644 --- a/src/Clerk/BackendAPI/OrganizationInvitations.cs +++ b/src/Clerk/BackendAPI/OrganizationInvitations.cs @@ -82,6 +82,9 @@ public interface IOrganizationInvitations /// /// /// Creates new organization invitations in bulk and sends out emails to the provided email addresses with a link to accept the invitation and join the organization.
+ ///
+ /// This endpoint is limited to a maximum of 10 invitations per API call. If you need to send more invitations, please make multiple requests.
+ ///
/// You can specify a different `role` for each invited organization member.
/// New organization invitations get a "pending" status until they are revoked by an organization administrator or accepted by the invitee.
/// The request body supports passing an optional `redirect_url` parameter for each invitation.
@@ -138,10 +141,11 @@ public interface IOrganizationInvitations public class OrganizationInvitations: IOrganizationInvitations { public SDKConfig SDKConfiguration { get; private set; } - private const string _language = "csharp"; - private const string _sdkVersion = "0.14.0"; - private const string _sdkGenVersion = "2.748.0"; - private const string _openapiDocVersion = "2025-11-10"; + + private const string _language = Constants.Language; + private const string _sdkVersion = Constants.SdkVersion; + private const string _sdkGenVersion = Constants.SdkGenVersion; + private const string _openapiDocVersion = Constants.OpenApiDocVersion; public OrganizationInvitations(SDKConfig config) { @@ -151,7 +155,7 @@ public OrganizationInvitations(SDKConfig config) public async Task GetAllAsync(ListInstanceOrganizationInvitationsRequest? request = null, RetryConfig? retryConfig = null) { string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/organization_invitations", request); + var urlString = URLBuilder.Build(baseUrl, "/organization_invitations", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -319,7 +323,7 @@ public async Task CreateAsync(string organ RequestBody = requestBody, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/organizations/{organization_id}/invitations", request); + var urlString = URLBuilder.Build(baseUrl, "/organizations/{organization_id}/invitations", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -468,7 +472,7 @@ public async Task CreateAsync(string organ public async Task ListAsync(ListOrganizationInvitationsRequest request, RetryConfig? retryConfig = null) { string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/organizations/{organization_id}/invitations", request); + var urlString = URLBuilder.Build(baseUrl, "/organizations/{organization_id}/invitations", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -616,7 +620,7 @@ public async Task BulkCreateAsync(stri RequestBody = requestBody, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/organizations/{organization_id}/invitations/bulk", request); + var urlString = URLBuilder.Build(baseUrl, "/organizations/{organization_id}/invitations/bulk", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -772,7 +776,7 @@ public async Task ListPendingAsync(s Offset = offset, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/organizations/{organization_id}/invitations/pending", request); + var urlString = URLBuilder.Build(baseUrl, "/organizations/{organization_id}/invitations/pending", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -920,7 +924,7 @@ public async Task GetAsync(string organizatio InvitationId = invitationId, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/organizations/{organization_id}/invitations/{invitation_id}", request); + var urlString = URLBuilder.Build(baseUrl, "/organizations/{organization_id}/invitations/{invitation_id}", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -1069,7 +1073,7 @@ public async Task RevokeAsync(string organ RequestBody = requestBody, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/organizations/{organization_id}/invitations/{invitation_id}/revoke", request); + var urlString = URLBuilder.Build(baseUrl, "/organizations/{organization_id}/invitations/{invitation_id}/revoke", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); diff --git a/src/Clerk/BackendAPI/OrganizationMemberships.cs b/src/Clerk/BackendAPI/OrganizationMemberships.cs index dca7cb2e..53de69c9 100644 --- a/src/Clerk/BackendAPI/OrganizationMemberships.cs +++ b/src/Clerk/BackendAPI/OrganizationMemberships.cs @@ -76,10 +76,11 @@ public interface IOrganizationMemberships public class OrganizationMemberships: IOrganizationMemberships { public SDKConfig SDKConfiguration { get; private set; } - private const string _language = "csharp"; - private const string _sdkVersion = "0.14.0"; - private const string _sdkGenVersion = "2.748.0"; - private const string _openapiDocVersion = "2025-11-10"; + + private const string _language = Constants.Language; + private const string _sdkVersion = Constants.SdkVersion; + private const string _sdkGenVersion = Constants.SdkGenVersion; + private const string _openapiDocVersion = Constants.OpenApiDocVersion; public OrganizationMemberships(SDKConfig config) { @@ -94,7 +95,7 @@ public async Task CreateAsync(string organ RequestBody = requestBody, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/organizations/{organization_id}/memberships", request); + var urlString = URLBuilder.Build(baseUrl, "/organizations/{organization_id}/memberships", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -243,7 +244,7 @@ public async Task CreateAsync(string organ public async Task ListAsync(ListOrganizationMembershipsRequest request, RetryConfig? retryConfig = null) { string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/organizations/{organization_id}/memberships", request); + var urlString = URLBuilder.Build(baseUrl, "/organizations/{organization_id}/memberships", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -392,7 +393,7 @@ public async Task UpdateAsync(string organ RequestBody = requestBody, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/organizations/{organization_id}/memberships/{user_id}", request); + var urlString = URLBuilder.Build(baseUrl, "/organizations/{organization_id}/memberships/{user_id}", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Patch, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -546,7 +547,7 @@ public async Task DeleteAsync(string organ UserId = userId, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/organizations/{organization_id}/memberships/{user_id}", request); + var urlString = URLBuilder.Build(baseUrl, "/organizations/{organization_id}/memberships/{user_id}", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Delete, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -695,7 +696,7 @@ public async Task UpdateMetadataAs RequestBody = requestBody, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/organizations/{organization_id}/memberships/{user_id}/metadata", request); + var urlString = URLBuilder.Build(baseUrl, "/organizations/{organization_id}/memberships/{user_id}/metadata", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Patch, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); diff --git a/src/Clerk/BackendAPI/Commerce.cs b/src/Clerk/BackendAPI/OrganizationPermissions.cs similarity index 57% rename from src/Clerk/BackendAPI/Commerce.cs rename to src/Clerk/BackendAPI/OrganizationPermissions.cs index c754f008..c7631af8 100644 --- a/src/Clerk/BackendAPI/Commerce.cs +++ b/src/Clerk/BackendAPI/OrganizationPermissions.cs @@ -22,63 +22,82 @@ namespace Clerk.BackendAPI using System.Net.Http.Headers; using System.Threading.Tasks; - public interface ICommerce + public interface IOrganizationPermissions { /// - /// List all commerce plans + /// Get a list of all organization permissions /// /// - /// Returns a list of all commerce plans for the instance. The plans are returned sorted by creation date,
- /// with the newest plans appearing first. This includes both free and paid plans. Pagination is supported. + /// Retrieves all organization permissions for the given instance. ///
///
- Task ListPlansAsync(bool? paginated = null, long? limit = 10, long? offset = 0, PayerType? payerType = null, RetryConfig? retryConfig = null); + Task ListAsync(string? query = null, string? orderBy = null, long? limit = 10, long? offset = 0, RetryConfig? retryConfig = null); /// - /// List all subscription items + /// Create a new organization permission /// /// - /// 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. + /// Creates a new organization permission for the given instance. ///
///
- Task ListSubscriptionItemsAsync(GetCommerceSubscriptionItemListRequest? request = null, RetryConfig? retryConfig = null); + Task CreateAsync(CreateOrganizationPermissionRequestBody request, RetryConfig? retryConfig = null); /// - /// Cancel a subscription item + /// Get an organization permission /// /// - /// Cancel a specific subscription item. The subscription item can be canceled immediately or at the end of the current billing period. + /// Retrieves the details of an organization permission. /// /// - Task CancelSubscriptionItemAsync(string subscriptionItemId, bool? endNow = false, RetryConfig? retryConfig = null); + Task GetAsync(string permissionId, RetryConfig? retryConfig = null); + + /// + /// Update an organization permission + /// + /// + /// Updates the properties of an existing organization permission.
+ /// System permissions cannot be updated. + ///
+ ///
+ Task UpdateAsync(string permissionId, UpdateOrganizationPermissionRequestBody requestBody, RetryConfig? retryConfig = null); + + /// + /// Delete an organization permission + /// + /// + /// Deletes an organization permission.
+ /// System permissions cannot be deleted. + ///
+ ///
+ Task DeleteAsync(string permissionId, RetryConfig? retryConfig = null); } - public class Commerce: ICommerce + public class OrganizationPermissions: IOrganizationPermissions { public SDKConfig SDKConfiguration { get; private set; } - private const string _language = "csharp"; - private const string _sdkVersion = "0.14.0"; - private const string _sdkGenVersion = "2.748.0"; - private const string _openapiDocVersion = "2025-11-10"; - public Commerce(SDKConfig config) + private const string _language = Constants.Language; + private const string _sdkVersion = Constants.SdkVersion; + private const string _sdkGenVersion = Constants.SdkGenVersion; + private const string _openapiDocVersion = Constants.OpenApiDocVersion; + + public OrganizationPermissions(SDKConfig config) { SDKConfiguration = config; } - public async Task ListPlansAsync(bool? paginated = null, long? limit = 10, long? offset = 0, PayerType? payerType = null, RetryConfig? retryConfig = null) + public async Task ListAsync(string? query = null, string? orderBy = null, long? limit = 10, long? offset = 0, RetryConfig? retryConfig = null) { - var request = new GetCommercePlanListRequest() + var request = new ListOrganizationPermissionsRequest() { - Paginated = paginated, + Query = query, + OrderBy = orderBy, Limit = limit, Offset = offset, - PayerType = payerType, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/commerce/plans", request); + var urlString = URLBuilder.Build(baseUrl, "/organization_permissions", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -88,7 +107,7 @@ public async Task ListPlansAsync(bool? paginated = httpRequest = new SecurityMetadata(SDKConfiguration.SecuritySource).Apply(httpRequest); } - var hookCtx = new HookContext(SDKConfiguration, baseUrl, "GetCommercePlanList", null, SDKConfiguration.SecuritySource); + var hookCtx = new HookContext(SDKConfiguration, baseUrl, "ListOrganizationPermissions", null, SDKConfiguration.SecuritySource); httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); if (retryConfig == null) @@ -131,7 +150,7 @@ public async Task ListPlansAsync(bool? paginated = httpResponse = await retries.Run(); int _statusCode = (int)httpResponse.StatusCode; - if (_statusCode == 400 || _statusCode == 401 || _statusCode == 422 || _statusCode >= 400 && _statusCode < 500 || _statusCode == 500 || _statusCode >= 500 && _statusCode < 600) + if (_statusCode == 401 || _statusCode == 422 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600) { var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null); if (_httpResponse != null) @@ -162,17 +181,17 @@ public async Task ListPlansAsync(bool? paginated = if(Utilities.IsContentTypeMatch("application/json", contentType)) { var httpResponseBody = await httpResponse.Content.ReadAsStringAsync(); - PaginatedCommercePlanResponse obj; + Permissions obj; try { - obj = ResponseBodyDeserializer.DeserializeNotNull(httpResponseBody, NullValueHandling.Include); + obj = ResponseBodyDeserializer.DeserializeNotNull(httpResponseBody, NullValueHandling.Include); } catch (Exception ex) { - throw new ResponseValidationException("Failed to deserialize response body into PaginatedCommercePlanResponse.", httpRequest, httpResponse, httpResponseBody, ex); + throw new ResponseValidationException("Failed to deserialize response body into Permissions.", httpRequest, httpResponse, httpResponseBody, ex); } - var response = new GetCommercePlanListResponse() + var response = new ListOrganizationPermissionsResponse() { HttpMeta = new Models.Components.HTTPMetadata() { @@ -180,13 +199,13 @@ public async Task ListPlansAsync(bool? paginated = Request = httpRequest } }; - response.PaginatedCommercePlanResponse = obj; + response.Permissions = obj; return response; } throw new Models.Errors.SDKError("Unknown content type received", httpRequest, httpResponse, await httpResponse.Content.ReadAsStringAsync()); } - else if(new List{400, 401, 422}.Contains(responseStatusCode)) + else if(new List{401, 422}.Contains(responseStatusCode)) { if(Utilities.IsContentTypeMatch("application/json", contentType)) { @@ -206,7 +225,137 @@ public async Task ListPlansAsync(bool? paginated = throw new Models.Errors.SDKError("Unknown content type received", httpRequest, httpResponse, await httpResponse.Content.ReadAsStringAsync()); } - else if(responseStatusCode == 500) + else if(responseStatusCode >= 400 && responseStatusCode < 500) + { + throw new Models.Errors.SDKError("API error occurred", httpRequest, httpResponse, await httpResponse.Content.ReadAsStringAsync()); + } + else if(responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new Models.Errors.SDKError("API error occurred", httpRequest, httpResponse, await httpResponse.Content.ReadAsStringAsync()); + } + + throw new Models.Errors.SDKError("Unknown status code received", httpRequest, httpResponse, await httpResponse.Content.ReadAsStringAsync()); + } + + public async Task CreateAsync(CreateOrganizationPermissionRequestBody request, RetryConfig? retryConfig = null) + { + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); + + var urlString = baseUrl + "/organization_permissions"; + + var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString); + httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); + + var serializedBody = RequestBodySerializer.Serialize(request, "Request", "json", false, false); + if (serializedBody != null) + { + httpRequest.Content = serializedBody; + } + + if (SDKConfiguration.SecuritySource != null) + { + httpRequest = new SecurityMetadata(SDKConfiguration.SecuritySource).Apply(httpRequest); + } + + var hookCtx = new HookContext(SDKConfiguration, baseUrl, "CreateOrganizationPermission", null, SDKConfiguration.SecuritySource); + + httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); + if (retryConfig == null) + { + if (this.SDKConfiguration.RetryConfig != null) + { + retryConfig = this.SDKConfiguration.RetryConfig; + } + else + { + var backoff = new BackoffStrategy( + initialIntervalMs: 500L, + maxIntervalMs: 60000L, + maxElapsedTimeMs: 3600000L, + exponent: 1.5 + ); + retryConfig = new RetryConfig( + strategy: RetryConfig.RetryStrategy.BACKOFF, + backoff: backoff, + retryConnectionErrors: true + ); + } + } + + List statusCodes = new List + { + "5XX", + }; + + Func> retrySend = async () => + { + var _httpRequest = await SDKConfiguration.Client.CloneAsync(httpRequest); + return await SDKConfiguration.Client.SendAsync(_httpRequest); + }; + var retries = new Clerk.BackendAPI.Utils.Retries.Retries(retrySend, retryConfig, statusCodes); + + HttpResponseMessage httpResponse; + try + { + httpResponse = await retries.Run(); + int _statusCode = (int)httpResponse.StatusCode; + + if (_statusCode == 400 || _statusCode == 401 || _statusCode == 402 || _statusCode == 404 || _statusCode == 422 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600) + { + var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + } + } + catch (Exception error) + { + var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + else + { + throw; + } + } + + httpResponse = await this.SDKConfiguration.Hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var httpResponseBody = await httpResponse.Content.ReadAsStringAsync(); + Permission obj; + try + { + obj = ResponseBodyDeserializer.DeserializeNotNull(httpResponseBody, NullValueHandling.Ignore); + } + catch (Exception ex) + { + throw new ResponseValidationException("Failed to deserialize response body into Permission.", httpRequest, httpResponse, httpResponseBody, ex); + } + + var response = new CreateOrganizationPermissionResponse() + { + HttpMeta = new Models.Components.HTTPMetadata() + { + Response = httpResponse, + Request = httpRequest + } + }; + response.Permission = obj; + return response; + } + + throw new Models.Errors.SDKError("Unknown content type received", httpRequest, httpResponse, await httpResponse.Content.ReadAsStringAsync()); + } + else if(new List{400, 401, 402, 404, 422}.Contains(responseStatusCode)) { if(Utilities.IsContentTypeMatch("application/json", contentType)) { @@ -214,7 +363,7 @@ public async Task ListPlansAsync(bool? paginated = ClerkErrorsPayload payload; try { - payload = ResponseBodyDeserializer.DeserializeNotNull(httpResponseBody, NullValueHandling.Include); + payload = ResponseBodyDeserializer.DeserializeNotNull(httpResponseBody, NullValueHandling.Ignore); } catch (Exception ex) { @@ -238,10 +387,14 @@ public async Task ListPlansAsync(bool? paginated = throw new Models.Errors.SDKError("Unknown status code received", httpRequest, httpResponse, await httpResponse.Content.ReadAsStringAsync()); } - public async Task ListSubscriptionItemsAsync(GetCommerceSubscriptionItemListRequest? request = null, RetryConfig? retryConfig = null) + public async Task GetAsync(string permissionId, RetryConfig? retryConfig = null) { + var request = new GetOrganizationPermissionRequest() + { + PermissionId = permissionId, + }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/commerce/subscription_items", request); + var urlString = URLBuilder.Build(baseUrl, "/organization_permissions/{permission_id}", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -251,7 +404,7 @@ public async Task ListSubscriptionItems httpRequest = new SecurityMetadata(SDKConfiguration.SecuritySource).Apply(httpRequest); } - var hookCtx = new HookContext(SDKConfiguration, baseUrl, "GetCommerceSubscriptionItemList", null, SDKConfiguration.SecuritySource); + var hookCtx = new HookContext(SDKConfiguration, baseUrl, "GetOrganizationPermission", null, SDKConfiguration.SecuritySource); httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); if (retryConfig == null) @@ -294,7 +447,7 @@ public async Task ListSubscriptionItems httpResponse = await retries.Run(); int _statusCode = (int)httpResponse.StatusCode; - if (_statusCode == 400 || _statusCode == 401 || _statusCode == 422 || _statusCode >= 400 && _statusCode < 500 || _statusCode == 500 || _statusCode >= 500 && _statusCode < 600) + if (_statusCode == 401 || _statusCode == 404 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600) { var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null); if (_httpResponse != null) @@ -325,17 +478,17 @@ public async Task ListSubscriptionItems if(Utilities.IsContentTypeMatch("application/json", contentType)) { var httpResponseBody = await httpResponse.Content.ReadAsStringAsync(); - PaginatedCommerceSubscriptionItemResponse obj; + Permission obj; try { - obj = ResponseBodyDeserializer.DeserializeNotNull(httpResponseBody, NullValueHandling.Include); + obj = ResponseBodyDeserializer.DeserializeNotNull(httpResponseBody, NullValueHandling.Ignore); } catch (Exception ex) { - throw new ResponseValidationException("Failed to deserialize response body into PaginatedCommerceSubscriptionItemResponse.", httpRequest, httpResponse, httpResponseBody, ex); + throw new ResponseValidationException("Failed to deserialize response body into Permission.", httpRequest, httpResponse, httpResponseBody, ex); } - var response = new GetCommerceSubscriptionItemListResponse() + var response = new GetOrganizationPermissionResponse() { HttpMeta = new Models.Components.HTTPMetadata() { @@ -343,13 +496,13 @@ public async Task ListSubscriptionItems Request = httpRequest } }; - response.PaginatedCommerceSubscriptionItemResponse = obj; + response.Permission = obj; return response; } throw new Models.Errors.SDKError("Unknown content type received", httpRequest, httpResponse, await httpResponse.Content.ReadAsStringAsync()); } - else if(new List{400, 401, 422}.Contains(responseStatusCode)) + else if(new List{401, 404}.Contains(responseStatusCode)) { if(Utilities.IsContentTypeMatch("application/json", contentType)) { @@ -357,27 +510,7 @@ public async Task ListSubscriptionItems ClerkErrorsPayload payload; try { - payload = ResponseBodyDeserializer.DeserializeNotNull(httpResponseBody, NullValueHandling.Include); - } - catch (Exception ex) - { - throw new ResponseValidationException("Failed to deserialize response body into ClerkErrorsPayload.", httpRequest, httpResponse, httpResponseBody, ex); - } - - throw new ClerkErrors(payload, httpRequest, httpResponse, httpResponseBody); - } - - throw new Models.Errors.SDKError("Unknown content type received", httpRequest, httpResponse, await httpResponse.Content.ReadAsStringAsync()); - } - else if(responseStatusCode == 500) - { - if(Utilities.IsContentTypeMatch("application/json", contentType)) - { - var httpResponseBody = await httpResponse.Content.ReadAsStringAsync(); - ClerkErrorsPayload payload; - try - { - payload = ResponseBodyDeserializer.DeserializeNotNull(httpResponseBody, NullValueHandling.Include); + payload = ResponseBodyDeserializer.DeserializeNotNull(httpResponseBody, NullValueHandling.Ignore); } catch (Exception ex) { @@ -401,25 +534,31 @@ public async Task ListSubscriptionItems throw new Models.Errors.SDKError("Unknown status code received", httpRequest, httpResponse, await httpResponse.Content.ReadAsStringAsync()); } - public async Task CancelSubscriptionItemAsync(string subscriptionItemId, bool? endNow = false, RetryConfig? retryConfig = null) + public async Task UpdateAsync(string permissionId, UpdateOrganizationPermissionRequestBody requestBody, RetryConfig? retryConfig = null) { - var request = new CancelCommerceSubscriptionItemRequest() + var request = new UpdateOrganizationPermissionRequest() { - SubscriptionItemId = subscriptionItemId, - EndNow = endNow, + PermissionId = permissionId, + RequestBody = requestBody, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/commerce/subscription_items/{subscription_item_id}", request); + var urlString = URLBuilder.Build(baseUrl, "/organization_permissions/{permission_id}", request, null); - var httpRequest = new HttpRequestMessage(HttpMethod.Delete, urlString); + var httpRequest = new HttpRequestMessage(HttpMethod.Patch, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); + var serializedBody = RequestBodySerializer.Serialize(request, "RequestBody", "json", false, false); + if (serializedBody != null) + { + httpRequest.Content = serializedBody; + } + if (SDKConfiguration.SecuritySource != null) { httpRequest = new SecurityMetadata(SDKConfiguration.SecuritySource).Apply(httpRequest); } - var hookCtx = new HookContext(SDKConfiguration, baseUrl, "CancelCommerceSubscriptionItem", null, SDKConfiguration.SecuritySource); + var hookCtx = new HookContext(SDKConfiguration, baseUrl, "UpdateOrganizationPermission", null, SDKConfiguration.SecuritySource); httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); if (retryConfig == null) @@ -462,7 +601,7 @@ public async Task CancelSubscriptionItem httpResponse = await retries.Run(); int _statusCode = (int)httpResponse.StatusCode; - if (_statusCode == 400 || _statusCode == 401 || _statusCode == 403 || _statusCode == 404 || _statusCode == 422 || _statusCode >= 400 && _statusCode < 500 || _statusCode == 500 || _statusCode >= 500 && _statusCode < 600) + if (_statusCode == 400 || _statusCode == 401 || _statusCode == 403 || _statusCode == 404 || _statusCode == 422 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600) { var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null); if (_httpResponse != null) @@ -493,17 +632,17 @@ public async Task CancelSubscriptionItem if(Utilities.IsContentTypeMatch("application/json", contentType)) { var httpResponseBody = await httpResponse.Content.ReadAsStringAsync(); - CommerceSubscriptionItem obj; + Permission obj; try { - obj = ResponseBodyDeserializer.DeserializeNotNull(httpResponseBody, NullValueHandling.Ignore); + obj = ResponseBodyDeserializer.DeserializeNotNull(httpResponseBody, NullValueHandling.Ignore); } catch (Exception ex) { - throw new ResponseValidationException("Failed to deserialize response body into CommerceSubscriptionItem.", httpRequest, httpResponse, httpResponseBody, ex); + throw new ResponseValidationException("Failed to deserialize response body into Permission.", httpRequest, httpResponse, httpResponseBody, ex); } - var response = new CancelCommerceSubscriptionItemResponse() + var response = new UpdateOrganizationPermissionResponse() { HttpMeta = new Models.Components.HTTPMetadata() { @@ -511,7 +650,7 @@ public async Task CancelSubscriptionItem Request = httpRequest } }; - response.CommerceSubscriptionItem = obj; + response.Permission = obj; return response; } @@ -537,7 +676,134 @@ public async Task CancelSubscriptionItem throw new Models.Errors.SDKError("Unknown content type received", httpRequest, httpResponse, await httpResponse.Content.ReadAsStringAsync()); } - else if(responseStatusCode == 500) + else if(responseStatusCode >= 400 && responseStatusCode < 500) + { + throw new Models.Errors.SDKError("API error occurred", httpRequest, httpResponse, await httpResponse.Content.ReadAsStringAsync()); + } + else if(responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new Models.Errors.SDKError("API error occurred", httpRequest, httpResponse, await httpResponse.Content.ReadAsStringAsync()); + } + + throw new Models.Errors.SDKError("Unknown status code received", httpRequest, httpResponse, await httpResponse.Content.ReadAsStringAsync()); + } + + public async Task DeleteAsync(string permissionId, RetryConfig? retryConfig = null) + { + var request = new DeleteOrganizationPermissionRequest() + { + PermissionId = permissionId, + }; + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); + var urlString = URLBuilder.Build(baseUrl, "/organization_permissions/{permission_id}", request, null); + + var httpRequest = new HttpRequestMessage(HttpMethod.Delete, urlString); + httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); + + if (SDKConfiguration.SecuritySource != null) + { + httpRequest = new SecurityMetadata(SDKConfiguration.SecuritySource).Apply(httpRequest); + } + + var hookCtx = new HookContext(SDKConfiguration, baseUrl, "DeleteOrganizationPermission", null, SDKConfiguration.SecuritySource); + + httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); + if (retryConfig == null) + { + if (this.SDKConfiguration.RetryConfig != null) + { + retryConfig = this.SDKConfiguration.RetryConfig; + } + else + { + var backoff = new BackoffStrategy( + initialIntervalMs: 500L, + maxIntervalMs: 60000L, + maxElapsedTimeMs: 3600000L, + exponent: 1.5 + ); + retryConfig = new RetryConfig( + strategy: RetryConfig.RetryStrategy.BACKOFF, + backoff: backoff, + retryConnectionErrors: true + ); + } + } + + List statusCodes = new List + { + "5XX", + }; + + Func> retrySend = async () => + { + var _httpRequest = await SDKConfiguration.Client.CloneAsync(httpRequest); + return await SDKConfiguration.Client.SendAsync(_httpRequest); + }; + var retries = new Clerk.BackendAPI.Utils.Retries.Retries(retrySend, retryConfig, statusCodes); + + HttpResponseMessage httpResponse; + try + { + httpResponse = await retries.Run(); + int _statusCode = (int)httpResponse.StatusCode; + + if (_statusCode == 401 || _statusCode == 403 || _statusCode == 404 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600) + { + var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + } + } + catch (Exception error) + { + var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + else + { + throw; + } + } + + httpResponse = await this.SDKConfiguration.Hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var httpResponseBody = await httpResponse.Content.ReadAsStringAsync(); + DeletedObject obj; + try + { + obj = ResponseBodyDeserializer.DeserializeNotNull(httpResponseBody, NullValueHandling.Ignore); + } + catch (Exception ex) + { + throw new ResponseValidationException("Failed to deserialize response body into DeletedObject.", httpRequest, httpResponse, httpResponseBody, ex); + } + + var response = new DeleteOrganizationPermissionResponse() + { + HttpMeta = new Models.Components.HTTPMetadata() + { + Response = httpResponse, + Request = httpRequest + } + }; + response.DeletedObject = obj; + return response; + } + + throw new Models.Errors.SDKError("Unknown content type received", httpRequest, httpResponse, await httpResponse.Content.ReadAsStringAsync()); + } + else if(new List{401, 403, 404}.Contains(responseStatusCode)) { if(Utilities.IsContentTypeMatch("application/json", contentType)) { diff --git a/src/Clerk/BackendAPI/OrganizationRoles.cs b/src/Clerk/BackendAPI/OrganizationRoles.cs new file mode 100644 index 00000000..1794ffa4 --- /dev/null +++ b/src/Clerk/BackendAPI/OrganizationRoles.cs @@ -0,0 +1,1160 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Clerk.BackendAPI +{ + using Clerk.BackendAPI.Hooks; + using Clerk.BackendAPI.Models.Components; + using Clerk.BackendAPI.Models.Errors; + using Clerk.BackendAPI.Models.Operations; + using Clerk.BackendAPI.Utils; + using Clerk.BackendAPI.Utils.Retries; + using Newtonsoft.Json; + using System; + using System.Collections.Generic; + using System.Net.Http; + using System.Net.Http.Headers; + using System.Threading.Tasks; + + public interface IOrganizationRoles + { + + /// + /// Get a list of organization roles + /// + /// + /// This request returns the list of organization roles for the instance.
+ /// Results can be paginated using the optional `limit` and `offset` query parameters.
+ /// The organization roles are ordered by descending creation date.
+ /// Most recent roles will be returned first. + ///
+ ///
+ Task ListAsync(string? query = null, string? orderBy = "-created_at", long? limit = 10, long? offset = 0, RetryConfig? retryConfig = null); + + /// + /// Create an organization role + /// + /// + /// Creates a new organization role with the given name and permissions for an instance.
+ /// The key must be unique for the instance and start with the 'org:' prefix, followed by lowercase alphanumeric characters and underscores only.
+ /// You can optionally provide a description for the role and specify whether it should be included in the initial role set.
+ /// Organization roles support permissions that can be assigned to control access within the organization. + ///
+ ///
+ Task CreateAsync(CreateOrganizationRoleRequestBody request, RetryConfig? retryConfig = null); + + /// + /// Retrieve an organization role + /// + /// + /// Use this request to retrieve an existing organization role by its ID. + /// + /// + Task GetAsync(string organizationRoleId, RetryConfig? retryConfig = null); + + /// + /// Update an organization role + /// + /// + /// Updates an existing organization role.
+ /// You can update the name, key, description, and permissions of the role.
+ /// All parameters are optional - you can update only the fields you want to change.
+ /// If the role is used as a creator role or domain default role, updating the key will cascade the update to the organization settings. + ///
+ ///
+ Task UpdateAsync(string organizationRoleId, UpdateOrganizationRoleRequestBody requestBody, RetryConfig? retryConfig = null); + + /// + /// Delete an organization role + /// + /// + /// Deletes the organization role.
+ /// The role cannot be deleted if it is currently used as the default creator role, domain default role, assigned to any members, or exists in any invitations. + ///
+ ///
+ Task DeleteAsync(string organizationRoleId, RetryConfig? retryConfig = null); + + /// + /// Assign a permission to an organization role + /// + /// + /// Assigns a permission to an organization role + /// + /// + Task AssignPermissionAsync(string organizationRoleId, string permissionId, RetryConfig? retryConfig = null); + + /// + /// Remove a permission from an organization role + /// + /// + /// Removes a permission from an organization role + /// + /// + Task RemovePermissionAsync(string organizationRoleId, string permissionId, RetryConfig? retryConfig = null); + } + + public class OrganizationRoles: IOrganizationRoles + { + public SDKConfig SDKConfiguration { get; private set; } + + private const string _language = Constants.Language; + private const string _sdkVersion = Constants.SdkVersion; + private const string _sdkGenVersion = Constants.SdkGenVersion; + private const string _openapiDocVersion = Constants.OpenApiDocVersion; + + public OrganizationRoles(SDKConfig config) + { + SDKConfiguration = config; + } + + public async Task ListAsync(string? query = null, string? orderBy = "-created_at", long? limit = 10, long? offset = 0, RetryConfig? retryConfig = null) + { + var request = new ListOrganizationRolesRequest() + { + Query = query, + OrderBy = orderBy, + Limit = limit, + Offset = offset, + }; + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); + var urlString = URLBuilder.Build(baseUrl, "/organization_roles", request, null); + + var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); + httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); + + if (SDKConfiguration.SecuritySource != null) + { + httpRequest = new SecurityMetadata(SDKConfiguration.SecuritySource).Apply(httpRequest); + } + + var hookCtx = new HookContext(SDKConfiguration, baseUrl, "ListOrganizationRoles", null, SDKConfiguration.SecuritySource); + + httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); + if (retryConfig == null) + { + if (this.SDKConfiguration.RetryConfig != null) + { + retryConfig = this.SDKConfiguration.RetryConfig; + } + else + { + var backoff = new BackoffStrategy( + initialIntervalMs: 500L, + maxIntervalMs: 60000L, + maxElapsedTimeMs: 3600000L, + exponent: 1.5 + ); + retryConfig = new RetryConfig( + strategy: RetryConfig.RetryStrategy.BACKOFF, + backoff: backoff, + retryConnectionErrors: true + ); + } + } + + List statusCodes = new List + { + "5XX", + }; + + Func> retrySend = async () => + { + var _httpRequest = await SDKConfiguration.Client.CloneAsync(httpRequest); + return await SDKConfiguration.Client.SendAsync(_httpRequest); + }; + var retries = new Clerk.BackendAPI.Utils.Retries.Retries(retrySend, retryConfig, statusCodes); + + HttpResponseMessage httpResponse; + try + { + httpResponse = await retries.Run(); + int _statusCode = (int)httpResponse.StatusCode; + + if (_statusCode == 400 || _statusCode == 401 || _statusCode == 403 || _statusCode == 422 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600) + { + var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + } + } + catch (Exception error) + { + var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + else + { + throw; + } + } + + httpResponse = await this.SDKConfiguration.Hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var httpResponseBody = await httpResponse.Content.ReadAsStringAsync(); + Roles obj; + try + { + obj = ResponseBodyDeserializer.DeserializeNotNull(httpResponseBody, NullValueHandling.Include); + } + catch (Exception ex) + { + throw new ResponseValidationException("Failed to deserialize response body into Roles.", httpRequest, httpResponse, httpResponseBody, ex); + } + + var response = new ListOrganizationRolesResponse() + { + HttpMeta = new Models.Components.HTTPMetadata() + { + Response = httpResponse, + Request = httpRequest + } + }; + response.Roles = obj; + return response; + } + + throw new Models.Errors.SDKError("Unknown content type received", httpRequest, httpResponse, await httpResponse.Content.ReadAsStringAsync()); + } + else if(new List{400, 401, 403, 422}.Contains(responseStatusCode)) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var httpResponseBody = await httpResponse.Content.ReadAsStringAsync(); + ClerkErrorsPayload payload; + try + { + payload = ResponseBodyDeserializer.DeserializeNotNull(httpResponseBody, NullValueHandling.Include); + } + catch (Exception ex) + { + throw new ResponseValidationException("Failed to deserialize response body into ClerkErrorsPayload.", httpRequest, httpResponse, httpResponseBody, ex); + } + + throw new ClerkErrors(payload, httpRequest, httpResponse, httpResponseBody); + } + + throw new Models.Errors.SDKError("Unknown content type received", httpRequest, httpResponse, await httpResponse.Content.ReadAsStringAsync()); + } + else if(responseStatusCode >= 400 && responseStatusCode < 500) + { + throw new Models.Errors.SDKError("API error occurred", httpRequest, httpResponse, await httpResponse.Content.ReadAsStringAsync()); + } + else if(responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new Models.Errors.SDKError("API error occurred", httpRequest, httpResponse, await httpResponse.Content.ReadAsStringAsync()); + } + + throw new Models.Errors.SDKError("Unknown status code received", httpRequest, httpResponse, await httpResponse.Content.ReadAsStringAsync()); + } + + public async Task CreateAsync(CreateOrganizationRoleRequestBody request, RetryConfig? retryConfig = null) + { + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); + + var urlString = baseUrl + "/organization_roles"; + + var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString); + httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); + + var serializedBody = RequestBodySerializer.Serialize(request, "Request", "json", false, false); + if (serializedBody != null) + { + httpRequest.Content = serializedBody; + } + + if (SDKConfiguration.SecuritySource != null) + { + httpRequest = new SecurityMetadata(SDKConfiguration.SecuritySource).Apply(httpRequest); + } + + var hookCtx = new HookContext(SDKConfiguration, baseUrl, "CreateOrganizationRole", null, SDKConfiguration.SecuritySource); + + httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); + if (retryConfig == null) + { + if (this.SDKConfiguration.RetryConfig != null) + { + retryConfig = this.SDKConfiguration.RetryConfig; + } + else + { + var backoff = new BackoffStrategy( + initialIntervalMs: 500L, + maxIntervalMs: 60000L, + maxElapsedTimeMs: 3600000L, + exponent: 1.5 + ); + retryConfig = new RetryConfig( + strategy: RetryConfig.RetryStrategy.BACKOFF, + backoff: backoff, + retryConnectionErrors: true + ); + } + } + + List statusCodes = new List + { + "5XX", + }; + + Func> retrySend = async () => + { + var _httpRequest = await SDKConfiguration.Client.CloneAsync(httpRequest); + return await SDKConfiguration.Client.SendAsync(_httpRequest); + }; + var retries = new Clerk.BackendAPI.Utils.Retries.Retries(retrySend, retryConfig, statusCodes); + + HttpResponseMessage httpResponse; + try + { + httpResponse = await retries.Run(); + int _statusCode = (int)httpResponse.StatusCode; + + if (_statusCode == 400 || _statusCode == 401 || _statusCode == 402 || _statusCode == 403 || _statusCode == 404 || _statusCode == 422 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600) + { + var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + } + } + catch (Exception error) + { + var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + else + { + throw; + } + } + + httpResponse = await this.SDKConfiguration.Hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var httpResponseBody = await httpResponse.Content.ReadAsStringAsync(); + Role obj; + try + { + obj = ResponseBodyDeserializer.DeserializeNotNull(httpResponseBody, NullValueHandling.Ignore); + } + catch (Exception ex) + { + throw new ResponseValidationException("Failed to deserialize response body into Role.", httpRequest, httpResponse, httpResponseBody, ex); + } + + var response = new CreateOrganizationRoleResponse() + { + HttpMeta = new Models.Components.HTTPMetadata() + { + Response = httpResponse, + Request = httpRequest + } + }; + response.Role = obj; + return response; + } + + throw new Models.Errors.SDKError("Unknown content type received", httpRequest, httpResponse, await httpResponse.Content.ReadAsStringAsync()); + } + else if(new List{400, 401, 402, 403, 404, 422}.Contains(responseStatusCode)) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var httpResponseBody = await httpResponse.Content.ReadAsStringAsync(); + ClerkErrorsPayload payload; + try + { + payload = ResponseBodyDeserializer.DeserializeNotNull(httpResponseBody, NullValueHandling.Ignore); + } + catch (Exception ex) + { + throw new ResponseValidationException("Failed to deserialize response body into ClerkErrorsPayload.", httpRequest, httpResponse, httpResponseBody, ex); + } + + throw new ClerkErrors(payload, httpRequest, httpResponse, httpResponseBody); + } + + throw new Models.Errors.SDKError("Unknown content type received", httpRequest, httpResponse, await httpResponse.Content.ReadAsStringAsync()); + } + else if(responseStatusCode >= 400 && responseStatusCode < 500) + { + throw new Models.Errors.SDKError("API error occurred", httpRequest, httpResponse, await httpResponse.Content.ReadAsStringAsync()); + } + else if(responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new Models.Errors.SDKError("API error occurred", httpRequest, httpResponse, await httpResponse.Content.ReadAsStringAsync()); + } + + throw new Models.Errors.SDKError("Unknown status code received", httpRequest, httpResponse, await httpResponse.Content.ReadAsStringAsync()); + } + + public async Task GetAsync(string organizationRoleId, RetryConfig? retryConfig = null) + { + var request = new GetOrganizationRoleRequest() + { + OrganizationRoleId = organizationRoleId, + }; + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); + var urlString = URLBuilder.Build(baseUrl, "/organization_roles/{organization_role_id}", request, null); + + var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); + httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); + + if (SDKConfiguration.SecuritySource != null) + { + httpRequest = new SecurityMetadata(SDKConfiguration.SecuritySource).Apply(httpRequest); + } + + var hookCtx = new HookContext(SDKConfiguration, baseUrl, "GetOrganizationRole", null, SDKConfiguration.SecuritySource); + + httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); + if (retryConfig == null) + { + if (this.SDKConfiguration.RetryConfig != null) + { + retryConfig = this.SDKConfiguration.RetryConfig; + } + else + { + var backoff = new BackoffStrategy( + initialIntervalMs: 500L, + maxIntervalMs: 60000L, + maxElapsedTimeMs: 3600000L, + exponent: 1.5 + ); + retryConfig = new RetryConfig( + strategy: RetryConfig.RetryStrategy.BACKOFF, + backoff: backoff, + retryConnectionErrors: true + ); + } + } + + List statusCodes = new List + { + "5XX", + }; + + Func> retrySend = async () => + { + var _httpRequest = await SDKConfiguration.Client.CloneAsync(httpRequest); + return await SDKConfiguration.Client.SendAsync(_httpRequest); + }; + var retries = new Clerk.BackendAPI.Utils.Retries.Retries(retrySend, retryConfig, statusCodes); + + HttpResponseMessage httpResponse; + try + { + httpResponse = await retries.Run(); + int _statusCode = (int)httpResponse.StatusCode; + + if (_statusCode == 401 || _statusCode == 403 || _statusCode == 404 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600) + { + var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + } + } + catch (Exception error) + { + var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + else + { + throw; + } + } + + httpResponse = await this.SDKConfiguration.Hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var httpResponseBody = await httpResponse.Content.ReadAsStringAsync(); + Role obj; + try + { + obj = ResponseBodyDeserializer.DeserializeNotNull(httpResponseBody, NullValueHandling.Ignore); + } + catch (Exception ex) + { + throw new ResponseValidationException("Failed to deserialize response body into Role.", httpRequest, httpResponse, httpResponseBody, ex); + } + + var response = new GetOrganizationRoleResponse() + { + HttpMeta = new Models.Components.HTTPMetadata() + { + Response = httpResponse, + Request = httpRequest + } + }; + response.Role = obj; + return response; + } + + throw new Models.Errors.SDKError("Unknown content type received", httpRequest, httpResponse, await httpResponse.Content.ReadAsStringAsync()); + } + else if(new List{401, 403, 404}.Contains(responseStatusCode)) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var httpResponseBody = await httpResponse.Content.ReadAsStringAsync(); + ClerkErrorsPayload payload; + try + { + payload = ResponseBodyDeserializer.DeserializeNotNull(httpResponseBody, NullValueHandling.Ignore); + } + catch (Exception ex) + { + throw new ResponseValidationException("Failed to deserialize response body into ClerkErrorsPayload.", httpRequest, httpResponse, httpResponseBody, ex); + } + + throw new ClerkErrors(payload, httpRequest, httpResponse, httpResponseBody); + } + + throw new Models.Errors.SDKError("Unknown content type received", httpRequest, httpResponse, await httpResponse.Content.ReadAsStringAsync()); + } + else if(responseStatusCode >= 400 && responseStatusCode < 500) + { + throw new Models.Errors.SDKError("API error occurred", httpRequest, httpResponse, await httpResponse.Content.ReadAsStringAsync()); + } + else if(responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new Models.Errors.SDKError("API error occurred", httpRequest, httpResponse, await httpResponse.Content.ReadAsStringAsync()); + } + + throw new Models.Errors.SDKError("Unknown status code received", httpRequest, httpResponse, await httpResponse.Content.ReadAsStringAsync()); + } + + public async Task UpdateAsync(string organizationRoleId, UpdateOrganizationRoleRequestBody requestBody, RetryConfig? retryConfig = null) + { + var request = new UpdateOrganizationRoleRequest() + { + OrganizationRoleId = organizationRoleId, + RequestBody = requestBody, + }; + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); + var urlString = URLBuilder.Build(baseUrl, "/organization_roles/{organization_role_id}", request, null); + + var httpRequest = new HttpRequestMessage(HttpMethod.Patch, urlString); + httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); + + var serializedBody = RequestBodySerializer.Serialize(request, "RequestBody", "json", false, false); + if (serializedBody != null) + { + httpRequest.Content = serializedBody; + } + + if (SDKConfiguration.SecuritySource != null) + { + httpRequest = new SecurityMetadata(SDKConfiguration.SecuritySource).Apply(httpRequest); + } + + var hookCtx = new HookContext(SDKConfiguration, baseUrl, "UpdateOrganizationRole", null, SDKConfiguration.SecuritySource); + + httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); + if (retryConfig == null) + { + if (this.SDKConfiguration.RetryConfig != null) + { + retryConfig = this.SDKConfiguration.RetryConfig; + } + else + { + var backoff = new BackoffStrategy( + initialIntervalMs: 500L, + maxIntervalMs: 60000L, + maxElapsedTimeMs: 3600000L, + exponent: 1.5 + ); + retryConfig = new RetryConfig( + strategy: RetryConfig.RetryStrategy.BACKOFF, + backoff: backoff, + retryConnectionErrors: true + ); + } + } + + List statusCodes = new List + { + "5XX", + }; + + Func> retrySend = async () => + { + var _httpRequest = await SDKConfiguration.Client.CloneAsync(httpRequest); + return await SDKConfiguration.Client.SendAsync(_httpRequest); + }; + var retries = new Clerk.BackendAPI.Utils.Retries.Retries(retrySend, retryConfig, statusCodes); + + HttpResponseMessage httpResponse; + try + { + httpResponse = await retries.Run(); + int _statusCode = (int)httpResponse.StatusCode; + + if (_statusCode == 400 || _statusCode == 401 || _statusCode == 403 || _statusCode == 404 || _statusCode == 422 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600) + { + var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + } + } + catch (Exception error) + { + var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + else + { + throw; + } + } + + httpResponse = await this.SDKConfiguration.Hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var httpResponseBody = await httpResponse.Content.ReadAsStringAsync(); + Role obj; + try + { + obj = ResponseBodyDeserializer.DeserializeNotNull(httpResponseBody, NullValueHandling.Ignore); + } + catch (Exception ex) + { + throw new ResponseValidationException("Failed to deserialize response body into Role.", httpRequest, httpResponse, httpResponseBody, ex); + } + + var response = new UpdateOrganizationRoleResponse() + { + HttpMeta = new Models.Components.HTTPMetadata() + { + Response = httpResponse, + Request = httpRequest + } + }; + response.Role = obj; + return response; + } + + throw new Models.Errors.SDKError("Unknown content type received", httpRequest, httpResponse, await httpResponse.Content.ReadAsStringAsync()); + } + else if(new List{400, 401, 403, 404, 422}.Contains(responseStatusCode)) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var httpResponseBody = await httpResponse.Content.ReadAsStringAsync(); + ClerkErrorsPayload payload; + try + { + payload = ResponseBodyDeserializer.DeserializeNotNull(httpResponseBody, NullValueHandling.Ignore); + } + catch (Exception ex) + { + throw new ResponseValidationException("Failed to deserialize response body into ClerkErrorsPayload.", httpRequest, httpResponse, httpResponseBody, ex); + } + + throw new ClerkErrors(payload, httpRequest, httpResponse, httpResponseBody); + } + + throw new Models.Errors.SDKError("Unknown content type received", httpRequest, httpResponse, await httpResponse.Content.ReadAsStringAsync()); + } + else if(responseStatusCode >= 400 && responseStatusCode < 500) + { + throw new Models.Errors.SDKError("API error occurred", httpRequest, httpResponse, await httpResponse.Content.ReadAsStringAsync()); + } + else if(responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new Models.Errors.SDKError("API error occurred", httpRequest, httpResponse, await httpResponse.Content.ReadAsStringAsync()); + } + + throw new Models.Errors.SDKError("Unknown status code received", httpRequest, httpResponse, await httpResponse.Content.ReadAsStringAsync()); + } + + public async Task DeleteAsync(string organizationRoleId, RetryConfig? retryConfig = null) + { + var request = new DeleteOrganizationRoleRequest() + { + OrganizationRoleId = organizationRoleId, + }; + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); + var urlString = URLBuilder.Build(baseUrl, "/organization_roles/{organization_role_id}", request, null); + + var httpRequest = new HttpRequestMessage(HttpMethod.Delete, urlString); + httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); + + if (SDKConfiguration.SecuritySource != null) + { + httpRequest = new SecurityMetadata(SDKConfiguration.SecuritySource).Apply(httpRequest); + } + + var hookCtx = new HookContext(SDKConfiguration, baseUrl, "DeleteOrganizationRole", null, SDKConfiguration.SecuritySource); + + httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); + if (retryConfig == null) + { + if (this.SDKConfiguration.RetryConfig != null) + { + retryConfig = this.SDKConfiguration.RetryConfig; + } + else + { + var backoff = new BackoffStrategy( + initialIntervalMs: 500L, + maxIntervalMs: 60000L, + maxElapsedTimeMs: 3600000L, + exponent: 1.5 + ); + retryConfig = new RetryConfig( + strategy: RetryConfig.RetryStrategy.BACKOFF, + backoff: backoff, + retryConnectionErrors: true + ); + } + } + + List statusCodes = new List + { + "5XX", + }; + + Func> retrySend = async () => + { + var _httpRequest = await SDKConfiguration.Client.CloneAsync(httpRequest); + return await SDKConfiguration.Client.SendAsync(_httpRequest); + }; + var retries = new Clerk.BackendAPI.Utils.Retries.Retries(retrySend, retryConfig, statusCodes); + + HttpResponseMessage httpResponse; + try + { + httpResponse = await retries.Run(); + int _statusCode = (int)httpResponse.StatusCode; + + if (_statusCode == 401 || _statusCode == 403 || _statusCode == 404 || _statusCode == 422 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600) + { + var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + } + } + catch (Exception error) + { + var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + else + { + throw; + } + } + + httpResponse = await this.SDKConfiguration.Hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var httpResponseBody = await httpResponse.Content.ReadAsStringAsync(); + DeletedObject obj; + try + { + obj = ResponseBodyDeserializer.DeserializeNotNull(httpResponseBody, NullValueHandling.Ignore); + } + catch (Exception ex) + { + throw new ResponseValidationException("Failed to deserialize response body into DeletedObject.", httpRequest, httpResponse, httpResponseBody, ex); + } + + var response = new DeleteOrganizationRoleResponse() + { + HttpMeta = new Models.Components.HTTPMetadata() + { + Response = httpResponse, + Request = httpRequest + } + }; + response.DeletedObject = obj; + return response; + } + + throw new Models.Errors.SDKError("Unknown content type received", httpRequest, httpResponse, await httpResponse.Content.ReadAsStringAsync()); + } + else if(new List{401, 403, 404, 422}.Contains(responseStatusCode)) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var httpResponseBody = await httpResponse.Content.ReadAsStringAsync(); + ClerkErrorsPayload payload; + try + { + payload = ResponseBodyDeserializer.DeserializeNotNull(httpResponseBody, NullValueHandling.Ignore); + } + catch (Exception ex) + { + throw new ResponseValidationException("Failed to deserialize response body into ClerkErrorsPayload.", httpRequest, httpResponse, httpResponseBody, ex); + } + + throw new ClerkErrors(payload, httpRequest, httpResponse, httpResponseBody); + } + + throw new Models.Errors.SDKError("Unknown content type received", httpRequest, httpResponse, await httpResponse.Content.ReadAsStringAsync()); + } + else if(responseStatusCode >= 400 && responseStatusCode < 500) + { + throw new Models.Errors.SDKError("API error occurred", httpRequest, httpResponse, await httpResponse.Content.ReadAsStringAsync()); + } + else if(responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new Models.Errors.SDKError("API error occurred", httpRequest, httpResponse, await httpResponse.Content.ReadAsStringAsync()); + } + + throw new Models.Errors.SDKError("Unknown status code received", httpRequest, httpResponse, await httpResponse.Content.ReadAsStringAsync()); + } + + public async Task AssignPermissionAsync(string organizationRoleId, string permissionId, RetryConfig? retryConfig = null) + { + var request = new AssignPermissionToOrganizationRoleRequest() + { + OrganizationRoleId = organizationRoleId, + PermissionId = permissionId, + }; + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); + var urlString = URLBuilder.Build(baseUrl, "/organization_roles/{organization_role_id}/permissions/{permission_id}", request, null); + + var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString); + httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); + + if (SDKConfiguration.SecuritySource != null) + { + httpRequest = new SecurityMetadata(SDKConfiguration.SecuritySource).Apply(httpRequest); + } + + var hookCtx = new HookContext(SDKConfiguration, baseUrl, "AssignPermissionToOrganizationRole", null, SDKConfiguration.SecuritySource); + + httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); + if (retryConfig == null) + { + if (this.SDKConfiguration.RetryConfig != null) + { + retryConfig = this.SDKConfiguration.RetryConfig; + } + else + { + var backoff = new BackoffStrategy( + initialIntervalMs: 500L, + maxIntervalMs: 60000L, + maxElapsedTimeMs: 3600000L, + exponent: 1.5 + ); + retryConfig = new RetryConfig( + strategy: RetryConfig.RetryStrategy.BACKOFF, + backoff: backoff, + retryConnectionErrors: true + ); + } + } + + List statusCodes = new List + { + "5XX", + }; + + Func> retrySend = async () => + { + var _httpRequest = await SDKConfiguration.Client.CloneAsync(httpRequest); + return await SDKConfiguration.Client.SendAsync(_httpRequest); + }; + var retries = new Clerk.BackendAPI.Utils.Retries.Retries(retrySend, retryConfig, statusCodes); + + HttpResponseMessage httpResponse; + try + { + httpResponse = await retries.Run(); + int _statusCode = (int)httpResponse.StatusCode; + + if (_statusCode == 401 || _statusCode == 403 || _statusCode == 404 || _statusCode == 409 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600) + { + var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + } + } + catch (Exception error) + { + var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + else + { + throw; + } + } + + httpResponse = await this.SDKConfiguration.Hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var httpResponseBody = await httpResponse.Content.ReadAsStringAsync(); + Role obj; + try + { + obj = ResponseBodyDeserializer.DeserializeNotNull(httpResponseBody, NullValueHandling.Ignore); + } + catch (Exception ex) + { + throw new ResponseValidationException("Failed to deserialize response body into Role.", httpRequest, httpResponse, httpResponseBody, ex); + } + + var response = new AssignPermissionToOrganizationRoleResponse() + { + HttpMeta = new Models.Components.HTTPMetadata() + { + Response = httpResponse, + Request = httpRequest + } + }; + response.Role = obj; + return response; + } + + throw new Models.Errors.SDKError("Unknown content type received", httpRequest, httpResponse, await httpResponse.Content.ReadAsStringAsync()); + } + else if(new List{401, 403, 404, 409}.Contains(responseStatusCode)) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var httpResponseBody = await httpResponse.Content.ReadAsStringAsync(); + ClerkErrorsPayload payload; + try + { + payload = ResponseBodyDeserializer.DeserializeNotNull(httpResponseBody, NullValueHandling.Ignore); + } + catch (Exception ex) + { + throw new ResponseValidationException("Failed to deserialize response body into ClerkErrorsPayload.", httpRequest, httpResponse, httpResponseBody, ex); + } + + throw new ClerkErrors(payload, httpRequest, httpResponse, httpResponseBody); + } + + throw new Models.Errors.SDKError("Unknown content type received", httpRequest, httpResponse, await httpResponse.Content.ReadAsStringAsync()); + } + else if(responseStatusCode >= 400 && responseStatusCode < 500) + { + throw new Models.Errors.SDKError("API error occurred", httpRequest, httpResponse, await httpResponse.Content.ReadAsStringAsync()); + } + else if(responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new Models.Errors.SDKError("API error occurred", httpRequest, httpResponse, await httpResponse.Content.ReadAsStringAsync()); + } + + throw new Models.Errors.SDKError("Unknown status code received", httpRequest, httpResponse, await httpResponse.Content.ReadAsStringAsync()); + } + + public async Task RemovePermissionAsync(string organizationRoleId, string permissionId, RetryConfig? retryConfig = null) + { + var request = new RemovePermissionFromOrganizationRoleRequest() + { + OrganizationRoleId = organizationRoleId, + PermissionId = permissionId, + }; + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); + var urlString = URLBuilder.Build(baseUrl, "/organization_roles/{organization_role_id}/permissions/{permission_id}", request, null); + + var httpRequest = new HttpRequestMessage(HttpMethod.Delete, urlString); + httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); + + if (SDKConfiguration.SecuritySource != null) + { + httpRequest = new SecurityMetadata(SDKConfiguration.SecuritySource).Apply(httpRequest); + } + + var hookCtx = new HookContext(SDKConfiguration, baseUrl, "RemovePermissionFromOrganizationRole", null, SDKConfiguration.SecuritySource); + + httpRequest = await this.SDKConfiguration.Hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); + if (retryConfig == null) + { + if (this.SDKConfiguration.RetryConfig != null) + { + retryConfig = this.SDKConfiguration.RetryConfig; + } + else + { + var backoff = new BackoffStrategy( + initialIntervalMs: 500L, + maxIntervalMs: 60000L, + maxElapsedTimeMs: 3600000L, + exponent: 1.5 + ); + retryConfig = new RetryConfig( + strategy: RetryConfig.RetryStrategy.BACKOFF, + backoff: backoff, + retryConnectionErrors: true + ); + } + } + + List statusCodes = new List + { + "5XX", + }; + + Func> retrySend = async () => + { + var _httpRequest = await SDKConfiguration.Client.CloneAsync(httpRequest); + return await SDKConfiguration.Client.SendAsync(_httpRequest); + }; + var retries = new Clerk.BackendAPI.Utils.Retries.Retries(retrySend, retryConfig, statusCodes); + + HttpResponseMessage httpResponse; + try + { + httpResponse = await retries.Run(); + int _statusCode = (int)httpResponse.StatusCode; + + if (_statusCode == 401 || _statusCode == 403 || _statusCode == 404 || _statusCode == 422 || _statusCode >= 400 && _statusCode < 500 || _statusCode >= 500 && _statusCode < 600) + { + var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + } + } + catch (Exception error) + { + var _httpResponse = await this.SDKConfiguration.Hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + else + { + throw; + } + } + + httpResponse = await this.SDKConfiguration.Hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var httpResponseBody = await httpResponse.Content.ReadAsStringAsync(); + Role obj; + try + { + obj = ResponseBodyDeserializer.DeserializeNotNull(httpResponseBody, NullValueHandling.Ignore); + } + catch (Exception ex) + { + throw new ResponseValidationException("Failed to deserialize response body into Role.", httpRequest, httpResponse, httpResponseBody, ex); + } + + var response = new RemovePermissionFromOrganizationRoleResponse() + { + HttpMeta = new Models.Components.HTTPMetadata() + { + Response = httpResponse, + Request = httpRequest + } + }; + response.Role = obj; + return response; + } + + throw new Models.Errors.SDKError("Unknown content type received", httpRequest, httpResponse, await httpResponse.Content.ReadAsStringAsync()); + } + else if(new List{401, 403, 404, 422}.Contains(responseStatusCode)) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var httpResponseBody = await httpResponse.Content.ReadAsStringAsync(); + ClerkErrorsPayload payload; + try + { + payload = ResponseBodyDeserializer.DeserializeNotNull(httpResponseBody, NullValueHandling.Ignore); + } + catch (Exception ex) + { + throw new ResponseValidationException("Failed to deserialize response body into ClerkErrorsPayload.", httpRequest, httpResponse, httpResponseBody, ex); + } + + throw new ClerkErrors(payload, httpRequest, httpResponse, httpResponseBody); + } + + throw new Models.Errors.SDKError("Unknown content type received", httpRequest, httpResponse, await httpResponse.Content.ReadAsStringAsync()); + } + else if(responseStatusCode >= 400 && responseStatusCode < 500) + { + throw new Models.Errors.SDKError("API error occurred", httpRequest, httpResponse, await httpResponse.Content.ReadAsStringAsync()); + } + else if(responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new Models.Errors.SDKError("API error occurred", httpRequest, httpResponse, await httpResponse.Content.ReadAsStringAsync()); + } + + throw new Models.Errors.SDKError("Unknown status code received", httpRequest, httpResponse, await httpResponse.Content.ReadAsStringAsync()); + } + } +} \ No newline at end of file diff --git a/src/Clerk/BackendAPI/Organizations.cs b/src/Clerk/BackendAPI/Organizations.cs index 9f2d92d0..ee00f5e1 100644 --- a/src/Clerk/BackendAPI/Organizations.cs +++ b/src/Clerk/BackendAPI/Organizations.cs @@ -79,7 +79,10 @@ public interface IOrganizations /// /// Deletes the given organization.
/// Please note that deleting an organization will also delete all memberships and invitations.
- /// This is not reversible. + /// This is not reversible.
+ ///
+ /// After the organization is deleted, any user's active sessions that contain the deleted
+ /// organization will be cleared. ///
///
Task DeleteAsync(string organizationId, RetryConfig? retryConfig = null); @@ -132,10 +135,11 @@ public interface IOrganizations public class Organizations: IOrganizations { public SDKConfig SDKConfiguration { get; private set; } - private const string _language = "csharp"; - private const string _sdkVersion = "0.14.0"; - private const string _sdkGenVersion = "2.748.0"; - private const string _openapiDocVersion = "2025-11-10"; + + private const string _language = Constants.Language; + private const string _sdkVersion = Constants.SdkVersion; + private const string _sdkGenVersion = Constants.SdkGenVersion; + private const string _openapiDocVersion = Constants.OpenApiDocVersion; public Organizations(SDKConfig config) { @@ -145,7 +149,7 @@ public Organizations(SDKConfig config) public async Task ListAsync(ListOrganizationsRequest? request = null, RetryConfig? retryConfig = null) { string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/organizations", request); + var urlString = URLBuilder.Build(baseUrl, "/organizations", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -444,7 +448,7 @@ public async Task GetAsync(string organizationId, bool? IncludeMissingMemberWithElevatedPermissions = includeMissingMemberWithElevatedPermissions, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/organizations/{organization_id}", request); + var urlString = URLBuilder.Build(baseUrl, "/organizations/{organization_id}", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -592,7 +596,7 @@ public async Task UpdateAsync(string organizationId, RequestBody = requestBody, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/organizations/{organization_id}", request); + var urlString = URLBuilder.Build(baseUrl, "/organizations/{organization_id}", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Patch, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -745,7 +749,7 @@ public async Task DeleteAsync(string organizationId, OrganizationId = organizationId, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/organizations/{organization_id}", request); + var urlString = URLBuilder.Build(baseUrl, "/organizations/{organization_id}", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Delete, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -893,7 +897,7 @@ public async Task MergeMetadataAsync(string o RequestBody = requestBody, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/organizations/{organization_id}/metadata", request); + var urlString = URLBuilder.Build(baseUrl, "/organizations/{organization_id}/metadata", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Patch, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -1047,7 +1051,7 @@ public async Task UploadLogoAsync(string organiz RequestBody = requestBody, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/organizations/{organization_id}/logo", request); + var urlString = URLBuilder.Build(baseUrl, "/organizations/{organization_id}/logo", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Put, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -1200,7 +1204,7 @@ public async Task DeleteLogoAsync(string organiz OrganizationId = organizationId, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/organizations/{organization_id}/logo", request); + var urlString = URLBuilder.Build(baseUrl, "/organizations/{organization_id}/logo", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Delete, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -1347,7 +1351,7 @@ public async Task GetBillingSubscrip OrganizationId = organizationId, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/organizations/{organization_id}/billing/subscription", request); + var urlString = URLBuilder.Build(baseUrl, "/organizations/{organization_id}/billing/subscription", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); diff --git a/src/Clerk/BackendAPI/PhoneNumbers.cs b/src/Clerk/BackendAPI/PhoneNumbers.cs index 6a723ae4..dfb7e03b 100644 --- a/src/Clerk/BackendAPI/PhoneNumbers.cs +++ b/src/Clerk/BackendAPI/PhoneNumbers.cs @@ -65,10 +65,11 @@ public interface IPhoneNumbers public class PhoneNumbers: IPhoneNumbers { public SDKConfig SDKConfiguration { get; private set; } - private const string _language = "csharp"; - private const string _sdkVersion = "0.14.0"; - private const string _sdkGenVersion = "2.748.0"; - private const string _openapiDocVersion = "2025-11-10"; + + private const string _language = Constants.Language; + private const string _sdkVersion = Constants.SdkVersion; + private const string _sdkGenVersion = Constants.SdkGenVersion; + private const string _openapiDocVersion = Constants.OpenApiDocVersion; public PhoneNumbers(SDKConfig config) { @@ -232,7 +233,7 @@ public async Task GetAsync(string phoneNumberId, RetryCo PhoneNumberId = phoneNumberId, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/phone_numbers/{phone_number_id}", request); + var urlString = URLBuilder.Build(baseUrl, "/phone_numbers/{phone_number_id}", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -379,7 +380,7 @@ public async Task DeleteAsync(string phoneNumberId, R PhoneNumberId = phoneNumberId, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/phone_numbers/{phone_number_id}", request); + var urlString = URLBuilder.Build(baseUrl, "/phone_numbers/{phone_number_id}", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Delete, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -527,7 +528,7 @@ public async Task UpdateAsync(string phoneNumberId, U RequestBody = requestBody, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/phone_numbers/{phone_number_id}", request); + var urlString = URLBuilder.Build(baseUrl, "/phone_numbers/{phone_number_id}", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Patch, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); diff --git a/src/Clerk/BackendAPI/ProxyChecks.cs b/src/Clerk/BackendAPI/ProxyChecks.cs index 5d22bff6..22770347 100644 --- a/src/Clerk/BackendAPI/ProxyChecks.cs +++ b/src/Clerk/BackendAPI/ProxyChecks.cs @@ -45,10 +45,11 @@ public interface IProxyChecks public class ProxyChecks: IProxyChecks { public SDKConfig SDKConfiguration { get; private set; } - private const string _language = "csharp"; - private const string _sdkVersion = "0.14.0"; - private const string _sdkGenVersion = "2.748.0"; - private const string _openapiDocVersion = "2025-11-10"; + + private const string _language = Constants.Language; + private const string _sdkVersion = Constants.SdkVersion; + private const string _sdkGenVersion = Constants.SdkGenVersion; + private const string _openapiDocVersion = Constants.OpenApiDocVersion; public ProxyChecks(SDKConfig config) { diff --git a/src/Clerk/BackendAPI/RedirectUrls.cs b/src/Clerk/BackendAPI/RedirectUrls.cs index d17508d8..2f2badc5 100644 --- a/src/Clerk/BackendAPI/RedirectUrls.cs +++ b/src/Clerk/BackendAPI/RedirectUrls.cs @@ -65,10 +65,11 @@ public interface IRedirectUrls public class RedirectUrls: IRedirectUrls { public SDKConfig SDKConfiguration { get; private set; } - private const string _language = "csharp"; - private const string _sdkVersion = "0.14.0"; - private const string _sdkGenVersion = "2.748.0"; - private const string _openapiDocVersion = "2025-11-10"; + + private const string _language = Constants.Language; + private const string _sdkVersion = Constants.SdkVersion; + private const string _sdkGenVersion = Constants.SdkGenVersion; + private const string _openapiDocVersion = Constants.OpenApiDocVersion; public RedirectUrls(SDKConfig config) { @@ -84,7 +85,7 @@ public async Task ListAsync(bool? paginated = null, lo Offset = offset, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/redirect_urls", request); + var urlString = URLBuilder.Build(baseUrl, "/redirect_urls", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -361,7 +362,7 @@ public async Task GetAsync(string id, RetryConfig? retry Id = id, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/redirect_urls/{id}", request); + var urlString = URLBuilder.Build(baseUrl, "/redirect_urls/{id}", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -508,7 +509,7 @@ public async Task DeleteAsync(string id, RetryConfig? Id = id, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/redirect_urls/{id}", request); + var urlString = URLBuilder.Build(baseUrl, "/redirect_urls/{id}", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Delete, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); diff --git a/src/Clerk/BackendAPI/SDKConfig.cs b/src/Clerk/BackendAPI/SDKConfig.cs index 37a308b7..be4d729d 100644 --- a/src/Clerk/BackendAPI/SDKConfig.cs +++ b/src/Clerk/BackendAPI/SDKConfig.cs @@ -42,7 +42,7 @@ public SDKConfig(ISpeakeasyHttpClient? client = null) Client = client ?? new SpeakeasyHttpClient(); ServerUrl = ""; ServerIndex = 0; - UserAgent = "speakeasy-sdk/csharp 0.14.0 2.748.0 2025-11-10 Clerk.BackendAPI"; + UserAgent = "speakeasy-sdk/csharp 0.15.0 2.768.1 2025-11-10 Clerk.BackendAPI"; SecuritySource = null; Hooks = new SDKHooks(); RetryConfig = null; diff --git a/src/Clerk/BackendAPI/SamlConnections.cs b/src/Clerk/BackendAPI/SamlConnections.cs index aa6b4a54..000b0b56 100644 --- a/src/Clerk/BackendAPI/SamlConnections.cs +++ b/src/Clerk/BackendAPI/SamlConnections.cs @@ -76,10 +76,11 @@ public interface ISamlConnections public class SamlConnections: ISamlConnections { public SDKConfig SDKConfiguration { get; private set; } - private const string _language = "csharp"; - private const string _sdkVersion = "0.14.0"; - private const string _sdkGenVersion = "2.748.0"; - private const string _openapiDocVersion = "2025-11-10"; + + private const string _language = Constants.Language; + private const string _sdkVersion = Constants.SdkVersion; + private const string _sdkGenVersion = Constants.SdkGenVersion; + private const string _openapiDocVersion = Constants.OpenApiDocVersion; public SamlConnections(SDKConfig config) { @@ -89,7 +90,7 @@ public SamlConnections(SDKConfig config) public async Task ListAsync(ListSAMLConnectionsRequest? request = null, RetryConfig? retryConfig = null) { string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/saml_connections", request); + var urlString = URLBuilder.Build(baseUrl, "/saml_connections", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -386,7 +387,7 @@ public async Task GetAsync(string samlConnectionId, R SamlConnectionId = samlConnectionId, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/saml_connections/{saml_connection_id}", request); + var urlString = URLBuilder.Build(baseUrl, "/saml_connections/{saml_connection_id}", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -534,7 +535,7 @@ public async Task UpdateAsync(string samlConnectio RequestBody = requestBody, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/saml_connections/{saml_connection_id}", request); + var urlString = URLBuilder.Build(baseUrl, "/saml_connections/{saml_connection_id}", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Patch, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -687,7 +688,7 @@ public async Task DeleteAsync(string samlConnectio SamlConnectionId = samlConnectionId, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/saml_connections/{saml_connection_id}", request); + var urlString = URLBuilder.Build(baseUrl, "/saml_connections/{saml_connection_id}", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Delete, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); diff --git a/src/Clerk/BackendAPI/Sessions.cs b/src/Clerk/BackendAPI/Sessions.cs index 3387ee32..510e04af 100644 --- a/src/Clerk/BackendAPI/Sessions.cs +++ b/src/Clerk/BackendAPI/Sessions.cs @@ -100,10 +100,11 @@ public interface ISessions public class Sessions: ISessions { public SDKConfig SDKConfiguration { get; private set; } - private const string _language = "csharp"; - private const string _sdkVersion = "0.14.0"; - private const string _sdkGenVersion = "2.748.0"; - private const string _openapiDocVersion = "2025-11-10"; + + private const string _language = Constants.Language; + private const string _sdkVersion = Constants.SdkVersion; + private const string _sdkGenVersion = Constants.SdkGenVersion; + private const string _openapiDocVersion = Constants.OpenApiDocVersion; public Sessions(SDKConfig config) { @@ -113,7 +114,7 @@ public Sessions(SDKConfig config) public async Task ListAsync(GetSessionListRequest? request = null, RetryConfig? retryConfig = null) { string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/sessions", request); + var urlString = URLBuilder.Build(baseUrl, "/sessions", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -410,7 +411,7 @@ public async Task GetAsync(string sessionId, RetryConfig? re SessionId = sessionId, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/sessions/{session_id}", request); + var urlString = URLBuilder.Build(baseUrl, "/sessions/{session_id}", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -558,7 +559,7 @@ public async Task RefreshAsync(string sessionId, Refresh RequestBody = requestBody, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/sessions/{session_id}/refresh", request); + var urlString = URLBuilder.Build(baseUrl, "/sessions/{session_id}/refresh", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -711,7 +712,7 @@ public async Task RevokeAsync(string sessionId, RetryConf SessionId = sessionId, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/sessions/{session_id}/revoke", request); + var urlString = URLBuilder.Build(baseUrl, "/sessions/{session_id}/revoke", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -859,7 +860,7 @@ public async Task CreateTokenAsync(string sessionId, RequestBody = requestBody, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/sessions/{session_id}/tokens", request); + var urlString = URLBuilder.Build(baseUrl, "/sessions/{session_id}/tokens", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -1014,7 +1015,7 @@ public async Task CreateTokenFromTemplat RequestBody = requestBody, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/sessions/{session_id}/tokens/{template_name}", request); + var urlString = URLBuilder.Build(baseUrl, "/sessions/{session_id}/tokens/{template_name}", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); diff --git a/src/Clerk/BackendAPI/SignInTokens.cs b/src/Clerk/BackendAPI/SignInTokens.cs index 3c8ac4a3..94b8f194 100644 --- a/src/Clerk/BackendAPI/SignInTokens.cs +++ b/src/Clerk/BackendAPI/SignInTokens.cs @@ -49,10 +49,11 @@ public interface ISignInTokens public class SignInTokens: ISignInTokens { public SDKConfig SDKConfiguration { get; private set; } - private const string _language = "csharp"; - private const string _sdkVersion = "0.14.0"; - private const string _sdkGenVersion = "2.748.0"; - private const string _openapiDocVersion = "2025-11-10"; + + private const string _language = Constants.Language; + private const string _sdkVersion = Constants.SdkVersion; + private const string _sdkGenVersion = Constants.SdkGenVersion; + private const string _openapiDocVersion = Constants.OpenApiDocVersion; public SignInTokens(SDKConfig config) { @@ -216,7 +217,7 @@ public async Task RevokeAsync(string signInTokenId, R SignInTokenId = signInTokenId, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/sign_in_tokens/{sign_in_token_id}/revoke", request); + var urlString = URLBuilder.Build(baseUrl, "/sign_in_tokens/{sign_in_token_id}/revoke", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); diff --git a/src/Clerk/BackendAPI/SignUps.cs b/src/Clerk/BackendAPI/SignUps.cs index 3b81897f..b528bf4c 100644 --- a/src/Clerk/BackendAPI/SignUps.cs +++ b/src/Clerk/BackendAPI/SignUps.cs @@ -47,10 +47,11 @@ public interface ISignUps public class SignUps: ISignUps { public SDKConfig SDKConfiguration { get; private set; } - private const string _language = "csharp"; - private const string _sdkVersion = "0.14.0"; - private const string _sdkGenVersion = "2.748.0"; - private const string _openapiDocVersion = "2025-11-10"; + + private const string _language = Constants.Language; + private const string _sdkVersion = Constants.SdkVersion; + private const string _sdkGenVersion = Constants.SdkGenVersion; + private const string _openapiDocVersion = Constants.OpenApiDocVersion; public SignUps(SDKConfig config) { @@ -64,7 +65,7 @@ public async Task GetAsync(string id, RetryConfig? retryConfi Id = id, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/sign_ups/{id}", request); + var urlString = URLBuilder.Build(baseUrl, "/sign_ups/{id}", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -212,7 +213,7 @@ public async Task UpdateAsync(string id, UpdateSignUpReque RequestBody = requestBody, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/sign_ups/{id}", request); + var urlString = URLBuilder.Build(baseUrl, "/sign_ups/{id}", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Patch, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); diff --git a/src/Clerk/BackendAPI/Templates.cs b/src/Clerk/BackendAPI/Templates.cs index 5b7461ca..2851b095 100644 --- a/src/Clerk/BackendAPI/Templates.cs +++ b/src/Clerk/BackendAPI/Templates.cs @@ -38,10 +38,11 @@ public interface ITemplates public class Templates: ITemplates { public SDKConfig SDKConfiguration { get; private set; } - private const string _language = "csharp"; - private const string _sdkVersion = "0.14.0"; - private const string _sdkGenVersion = "2.748.0"; - private const string _openapiDocVersion = "2025-11-10"; + + private const string _language = Constants.Language; + private const string _sdkVersion = Constants.SdkVersion; + private const string _sdkGenVersion = Constants.SdkGenVersion; + private const string _openapiDocVersion = Constants.OpenApiDocVersion; public Templates(SDKConfig config) { @@ -58,7 +59,7 @@ public async Task PreviewAsync(string templateType, str RequestBody = requestBody, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/templates/{template_type}/{slug}/preview", request); + var urlString = URLBuilder.Build(baseUrl, "/templates/{template_type}/{slug}/preview", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); diff --git a/src/Clerk/BackendAPI/TestingTokens.cs b/src/Clerk/BackendAPI/TestingTokens.cs index d0d34072..3a01a93f 100644 --- a/src/Clerk/BackendAPI/TestingTokens.cs +++ b/src/Clerk/BackendAPI/TestingTokens.cs @@ -37,10 +37,11 @@ public interface ITestingTokens public class TestingTokens: ITestingTokens { public SDKConfig SDKConfiguration { get; private set; } - private const string _language = "csharp"; - private const string _sdkVersion = "0.14.0"; - private const string _sdkGenVersion = "2.748.0"; - private const string _openapiDocVersion = "2025-11-10"; + + private const string _language = Constants.Language; + private const string _sdkVersion = Constants.SdkVersion; + private const string _sdkGenVersion = Constants.SdkGenVersion; + private const string _openapiDocVersion = Constants.OpenApiDocVersion; public TestingTokens(SDKConfig config) { diff --git a/src/Clerk/BackendAPI/Users.cs b/src/Clerk/BackendAPI/Users.cs index 0feb1d25..f7d51a46 100644 --- a/src/Clerk/BackendAPI/Users.cs +++ b/src/Clerk/BackendAPI/Users.cs @@ -314,10 +314,11 @@ public interface IUsers public class Users: IUsers { public SDKConfig SDKConfiguration { get; private set; } - private const string _language = "csharp"; - private const string _sdkVersion = "0.14.0"; - private const string _sdkGenVersion = "2.748.0"; - private const string _openapiDocVersion = "2025-11-10"; + + private const string _language = Constants.Language; + private const string _sdkVersion = Constants.SdkVersion; + private const string _sdkGenVersion = Constants.SdkGenVersion; + private const string _openapiDocVersion = Constants.OpenApiDocVersion; public Users(SDKConfig config) { @@ -327,7 +328,7 @@ public Users(SDKConfig config) public async Task ListAsync(GetUserListRequest? request = null, RetryConfig? retryConfig = null) { string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/users", request); + var urlString = URLBuilder.Build(baseUrl, "/users", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -620,7 +621,7 @@ public async Task CreateAsync(CreateUserRequestBody request, public async Task CountAsync(GetUsersCountRequest? request = null, RetryConfig? retryConfig = null) { string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/users/count", request); + var urlString = URLBuilder.Build(baseUrl, "/users/count", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -767,7 +768,7 @@ public async Task GetAsync(string userId, RetryConfig? retryCon UserId = userId, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/users/{user_id}", request); + var urlString = URLBuilder.Build(baseUrl, "/users/{user_id}", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -915,7 +916,7 @@ public async Task UpdateAsync(string userId, UpdateUserReque RequestBody = requestBody, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/users/{user_id}", request); + var urlString = URLBuilder.Build(baseUrl, "/users/{user_id}", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Patch, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -1068,7 +1069,7 @@ public async Task DeleteAsync(string userId, RetryConfig? re UserId = userId, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/users/{user_id}", request); + var urlString = URLBuilder.Build(baseUrl, "/users/{user_id}", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Delete, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -1215,7 +1216,7 @@ public async Task BanAsync(string userId, RetryConfig? retryCon UserId = userId, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/users/{user_id}/ban", request); + var urlString = URLBuilder.Build(baseUrl, "/users/{user_id}/ban", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -1362,7 +1363,7 @@ public async Task UnbanAsync(string userId, RetryConfig? retr UserId = userId, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/users/{user_id}/unban", request); + var urlString = URLBuilder.Build(baseUrl, "/users/{user_id}/unban", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -1809,7 +1810,7 @@ public async Task LockAsync(string userId, RetryConfig? retryC UserId = userId, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/users/{user_id}/lock", request); + var urlString = URLBuilder.Build(baseUrl, "/users/{user_id}/lock", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -1956,7 +1957,7 @@ public async Task UnlockAsync(string userId, RetryConfig? re UserId = userId, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/users/{user_id}/unlock", request); + var urlString = URLBuilder.Build(baseUrl, "/users/{user_id}/unlock", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -2104,7 +2105,7 @@ public async Task SetProfileImageAsync(string userI RequestBody = requestBody, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/users/{user_id}/profile_image", request); + var urlString = URLBuilder.Build(baseUrl, "/users/{user_id}/profile_image", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -2257,7 +2258,7 @@ public async Task DeleteProfileImageAsync(string UserId = userId, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/users/{user_id}/profile_image", request); + var urlString = URLBuilder.Build(baseUrl, "/users/{user_id}/profile_image", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Delete, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -2405,7 +2406,7 @@ public async Task UpdateMetadataAsync(string userId, RequestBody = requestBody, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/users/{user_id}/metadata", request); + var urlString = URLBuilder.Build(baseUrl, "/users/{user_id}/metadata", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Patch, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -2558,7 +2559,7 @@ public async Task GetBillingSubscriptionAsyn UserId = userId, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/users/{user_id}/billing/subscription", request); + var urlString = URLBuilder.Build(baseUrl, "/users/{user_id}/billing/subscription", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -2721,7 +2722,7 @@ public async Task GetBillingSubscriptionAsyn public async Task GetOAuthAccessTokenAsync(GetOAuthAccessTokenRequest request, RetryConfig? retryConfig = null) { string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/users/{user_id}/oauth_access_tokens/{provider}", request); + var urlString = URLBuilder.Build(baseUrl, "/users/{user_id}/oauth_access_tokens/{provider}", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -2870,7 +2871,7 @@ public async Task GetOrganizationMember Offset = offset, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/users/{user_id}/organization_memberships", request); + var urlString = URLBuilder.Build(baseUrl, "/users/{user_id}/organization_memberships", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -3020,7 +3021,7 @@ public async Task GetOrganizationInvita Status = status, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/users/{user_id}/organization_invitations", request); + var urlString = URLBuilder.Build(baseUrl, "/users/{user_id}/organization_invitations", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -3168,7 +3169,7 @@ public async Task VerifyPasswordAsync(string userId, Ver RequestBody = requestBody, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/users/{user_id}/verify_password", request); + var urlString = URLBuilder.Build(baseUrl, "/users/{user_id}/verify_password", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -3322,7 +3323,7 @@ public async Task VerifyTotpAsync(string userId, VerifyTOTPR RequestBody = requestBody, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/users/{user_id}/verify_totp", request); + var urlString = URLBuilder.Build(baseUrl, "/users/{user_id}/verify_totp", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -3475,7 +3476,7 @@ public async Task DisableMfaAsync(string userId, RetryConfig UserId = userId, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/users/{user_id}/mfa", request); + var urlString = URLBuilder.Build(baseUrl, "/users/{user_id}/mfa", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Delete, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -3642,7 +3643,7 @@ public async Task DeleteBackupCodesAsync(string userId UserId = userId, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/users/{user_id}/backup_code", request); + var urlString = URLBuilder.Build(baseUrl, "/users/{user_id}/backup_code", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Delete, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -3810,7 +3811,7 @@ public async Task DeletePasskeyAsync(string userId, s PasskeyIdentificationId = passkeyIdentificationId, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/users/{user_id}/passkeys/{passkey_identification_id}", request); + var urlString = URLBuilder.Build(baseUrl, "/users/{user_id}/passkeys/{passkey_identification_id}", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Delete, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -3978,7 +3979,7 @@ public async Task DeleteWeb3WalletAsync(string use Web3WalletIdentificationId = web3WalletIdentificationId, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/users/{user_id}/web3_wallets/{web3_wallet_identification_id}", request); + var urlString = URLBuilder.Build(baseUrl, "/users/{user_id}/web3_wallets/{web3_wallet_identification_id}", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Delete, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -4145,7 +4146,7 @@ public async Task DeleteTOTPAsync(string userId, RetryConfig UserId = userId, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/users/{user_id}/totp", request); + var urlString = URLBuilder.Build(baseUrl, "/users/{user_id}/totp", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Delete, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -4313,7 +4314,7 @@ public async Task DeleteExternalAccountAsync(stri ExternalAccountId = externalAccountId, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/users/{user_id}/external_accounts/{external_account_id}", request); + var urlString = URLBuilder.Build(baseUrl, "/users/{user_id}/external_accounts/{external_account_id}", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Delete, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -4482,7 +4483,7 @@ public async Task GetInstanceOrganiz Offset = offset, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/organization_memberships", request); + var urlString = URLBuilder.Build(baseUrl, "/organization_memberships", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); diff --git a/src/Clerk/BackendAPI/Utils/Constants.cs b/src/Clerk/BackendAPI/Utils/Constants.cs new file mode 100644 index 00000000..761f7bcb --- /dev/null +++ b/src/Clerk/BackendAPI/Utils/Constants.cs @@ -0,0 +1,38 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Clerk.BackendAPI.Utils +{ + /// + /// SDK constants for version information and language identification. + /// + public static class Constants + { + /// + /// The language identifier for this SDK. + /// + public const string Language = "csharp"; + + /// + /// The version of the SDK. + /// + public const string SdkVersion = "0.15.0"; + + /// + /// The version of the SDK generator used to create this SDK. + /// + public const string SdkGenVersion = "2.768.1"; + + /// + /// The version of the OpenAPI document used to generate this SDK. + /// + public const string OpenApiDocVersion = "2025-11-10"; + } +} + diff --git a/src/Clerk/BackendAPI/Utils/URLBuilder.cs b/src/Clerk/BackendAPI/Utils/URLBuilder.cs index 285801af..b12381e8 100644 --- a/src/Clerk/BackendAPI/Utils/URLBuilder.cs +++ b/src/Clerk/BackendAPI/Utils/URLBuilder.cs @@ -17,7 +17,7 @@ namespace Clerk.BackendAPI.Utils internal static class URLBuilder { - public static string Build(string baseUrl, string relativeUrl, object? request) + public static string Build(string baseUrl, string relativeUrl, object? request, List? allowEmptyValue = null) { var url = baseUrl; @@ -37,7 +37,7 @@ public static string Build(string baseUrl, string relativeUrl, object? request) var parameters = GetPathParameters(request); url = ReplaceParameters(url, parameters); - var queryParams = SerializeQueryParams(TrySerializeQueryParams(request)); + var queryParams = SerializeQueryParams(TrySerializeQueryParams(request, allowEmptyValue)); if (queryParams != "") { url += $"?{queryParams}"; @@ -90,10 +90,6 @@ private static Dictionary GetPathParameters(object? request) { var val = prop.GetValue(request); - if (val == null) - { - continue; - } if (prop.GetCustomAttribute()?.GetRequestMetadata() != null) { @@ -107,6 +103,13 @@ private static Dictionary GetPathParameters(object? request) continue; } + // Handle null values and empty arrays as empty query parameters + if (val == null || (Utilities.IsList(val) && ((IList)val).Count == 0)) + { + parameters.Add(metadata.Name ?? prop.Name, ""); + continue; + } + if (metadata.Serialization != null) { switch (metadata.Serialization) @@ -147,7 +150,7 @@ private static Dictionary GetPathParameters(object? request) return parameters; } - private static Dictionary> TrySerializeQueryParams(object? request) + private static Dictionary> TrySerializeQueryParams(object? request, List? allowEmptyValue = null) { var parameters = new Dictionary>(); @@ -161,9 +164,20 @@ private static Dictionary> TrySerializeQueryParams(object? foreach (var prop in props) { var val = prop.GetValue(request); - + var metadata = prop.GetCustomAttribute()?.GetQueryParamMetadata(); + if (val == null) { + // If this parameter is in allowEmptyValue and val is null, include it as empty + if (metadata != null && allowEmptyValue?.Contains(metadata.Name ?? prop.Name) == true) + { + var paramName = metadata.Name ?? prop.Name; + if (!parameters.ContainsKey(paramName)) + { + parameters.Add(paramName, new List()); + } + parameters[paramName].Add(""); + } continue; } @@ -172,7 +186,6 @@ private static Dictionary> TrySerializeQueryParams(object? continue; } - var metadata = prop.GetCustomAttribute()?.GetQueryParamMetadata(); if (metadata == null) { continue; @@ -207,7 +220,8 @@ private static Dictionary> TrySerializeQueryParams(object? metadata.Name ?? prop.Name, val, metadata.Explode, - "," + ",", + allowEmptyValue ); foreach (var key in formParams.Keys) { @@ -245,7 +259,8 @@ private static Dictionary> TrySerializeQueryParams(object? metadata.Name ?? prop.Name, val, metadata.Explode, - "|" + "|", + allowEmptyValue ); foreach (var key in pipeParams.Keys) { @@ -358,7 +373,8 @@ private static Dictionary> SerializeFormQueryParams( string parentName, object value, bool explode, - string delimiter + string delimiter, + List? allowEmptyValue = null ) { var parameters = new Dictionary>(); @@ -458,32 +474,45 @@ string delimiter { var values = new List(); var items = new List(); + var list = (IList)value; - foreach (var item in (IList)value) + // Handle empty arrays - add empty parameter if allowEmptyValue includes this parameter + if (list.Count == 0 && allowEmptyValue?.Contains(parentName) == true) { - if (explode) - { - values.Add(Utilities.ValueToString(item)); - } - else + if (!parameters.ContainsKey(parentName)) { - items.Add(Utilities.ValueToString(item)); + parameters.Add(parentName, new List()); } + parameters[parentName].Add(""); } - - if (items.Count > 0) + else { - values.Add(string.Join(delimiter, items)); - } + foreach (var item in list) + { + if (explode) + { + values.Add(Utilities.ValueToString(item)); + } + else + { + items.Add(Utilities.ValueToString(item)); + } + } - foreach (var val in values) - { - if (!parameters.ContainsKey(parentName)) + if (items.Count > 0) { - parameters.Add(parentName, new List()); + values.Add(string.Join(delimiter, items)); } - parameters[parentName].Add(val); + foreach (var val in values) + { + if (!parameters.ContainsKey(parentName)) + { + parameters.Add(parentName, new List()); + } + + parameters[parentName].Add(val); + } } } else @@ -493,7 +522,16 @@ string delimiter parameters.Add(parentName, new List()); } - parameters[parentName].Add(Utilities.ValueToString(value)); + // Handle null values and empty strings for allowEmptyValue parameters + var stringValue = Utilities.ValueToString(value); + if ((value == null || stringValue == "") && allowEmptyValue?.Contains(parentName) == true) + { + parameters[parentName].Add(""); + } + else + { + parameters[parentName].Add(stringValue); + } } return parameters; diff --git a/src/Clerk/BackendAPI/WaitlistEntries.cs b/src/Clerk/BackendAPI/WaitlistEntries.cs index c27eabaf..37e367c1 100644 --- a/src/Clerk/BackendAPI/WaitlistEntries.cs +++ b/src/Clerk/BackendAPI/WaitlistEntries.cs @@ -77,10 +77,11 @@ public interface IWaitlistEntries public class WaitlistEntries: IWaitlistEntries { public SDKConfig SDKConfiguration { get; private set; } - private const string _language = "csharp"; - private const string _sdkVersion = "0.14.0"; - private const string _sdkGenVersion = "2.748.0"; - private const string _openapiDocVersion = "2025-11-10"; + + private const string _language = Constants.Language; + private const string _sdkVersion = Constants.SdkVersion; + private const string _sdkGenVersion = Constants.SdkGenVersion; + private const string _openapiDocVersion = Constants.OpenApiDocVersion; public WaitlistEntries(SDKConfig config) { @@ -90,7 +91,7 @@ public WaitlistEntries(SDKConfig config) public async Task ListAsync(ListWaitlistEntriesRequest? request = null, RetryConfig? retryConfig = null) { string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/waitlist_entries", request); + var urlString = URLBuilder.Build(baseUrl, "/waitlist_entries", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -367,7 +368,7 @@ public async Task DeleteAsync(string waitlistEntryI WaitlistEntryId = waitlistEntryId, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/waitlist_entries/{waitlist_entry_id}", request); + var urlString = URLBuilder.Build(baseUrl, "/waitlist_entries/{waitlist_entry_id}", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Delete, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -515,7 +516,7 @@ public async Task InviteAsync(string waitlistEntryI RequestBody = requestBody, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/waitlist_entries/{waitlist_entry_id}/invite", request); + var urlString = URLBuilder.Build(baseUrl, "/waitlist_entries/{waitlist_entry_id}/invite", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); @@ -668,7 +669,7 @@ public async Task RejectAsync(string waitlistEntryI WaitlistEntryId = waitlistEntryId, }; string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); - var urlString = URLBuilder.Build(baseUrl, "/waitlist_entries/{waitlist_entry_id}/reject", request); + var urlString = URLBuilder.Build(baseUrl, "/waitlist_entries/{waitlist_entry_id}/reject", request, null); var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString); httpRequest.Headers.Add("user-agent", SDKConfiguration.UserAgent); diff --git a/src/Clerk/BackendAPI/Webhooks.cs b/src/Clerk/BackendAPI/Webhooks.cs index 9b0a70ab..b0e3e68a 100644 --- a/src/Clerk/BackendAPI/Webhooks.cs +++ b/src/Clerk/BackendAPI/Webhooks.cs @@ -55,10 +55,11 @@ public interface IWebhooks public class Webhooks: IWebhooks { public SDKConfig SDKConfiguration { get; private set; } - private const string _language = "csharp"; - private const string _sdkVersion = "0.14.0"; - private const string _sdkGenVersion = "2.748.0"; - private const string _openapiDocVersion = "2025-11-10"; + + private const string _language = Constants.Language; + private const string _sdkVersion = Constants.SdkVersion; + private const string _sdkGenVersion = Constants.SdkGenVersion; + private const string _openapiDocVersion = Constants.OpenApiDocVersion; public Webhooks(SDKConfig config) {