From f92a2dfa7e7793519ef2540e97d23ceb0d1a7250 Mon Sep 17 00:00:00 2001 From: Vaggelis Yfantis Date: Sat, 16 Nov 2024 01:09:07 +0200 Subject: [PATCH] Adding overlays (#1) --- .speakeasy/fixes.yaml | 151 +++ .speakeasy/gen.lock | 423 ++++++--- .speakeasy/gen.yaml | 2 +- .../speakeasy-modifications-overlay.yaml | 875 ++++++++++++++++++ .speakeasy/workflow.lock | 28 +- .speakeasy/workflow.yaml | 10 +- README.md | 250 ++--- USAGE.md | 10 +- docs/Models/Components/EnrollmentMode.md | 12 + docs/Models/Components/Invitation.md | 23 +- .../Components/InvitationPublicMetadata.md | 7 - docs/Models/Components/InvitationRevoked.md | 23 +- .../InvitationRevokedPublicMetadata.md | 7 - docs/Models/Components/InvitationStatus.md | 3 +- docs/Models/Components/Keys.md | 13 + docs/Models/Components/LatestActivity.md | 16 + .../Components/OTPVerificationStrategy.md | 8 +- .../Components/OauthVerificationStrategy.md | 16 +- docs/Models/Components/Organization.md | 28 +- docs/Models/Components/OrganizationDomain.md | 20 + .../Components/OrganizationDomainObject.md | 11 + .../Components/OrganizationDomainStatus.md | 11 + .../OrganizationDomainVerification.md | 13 + docs/Models/Components/OrganizationDomains.md | 11 + .../Components/OrganizationInvitation.md | 25 +- .../OrganizationInvitationPrivateMetadata.md | 7 - .../OrganizationInvitationPublicMetadata.md | 7 - ...ionInvitationWithPublicOrganizationData.md | 21 + ...itationWithPublicOrganizationDataObject.md | 11 + ...onInvitationsWithPublicOrganizationData.md | 11 + .../Components/OrganizationMembership.md | 25 +- .../OrganizationMembershipOrganization.md | 28 +- ...onMembershipOrganizationPrivateMetadata.md | 7 - ...ionMembershipOrganizationPublicMetadata.md | 7 - .../OrganizationMembershipPrivateMetadata.md | 9 - .../OrganizationMembershipPublicMetadata.md | 9 - .../Components/OrganizationPrivateMetadata.md | 7 - .../Components/OrganizationPublicMetadata.md | 7 - .../Models/Components/OrganizationWithLogo.md | 4 +- .../OrganizationWithLogoPrivateMetadata.md | 7 - .../OrganizationWithLogoPublicMetadata.md | 7 - docs/Models/Components/Passkey.md | 2 +- docs/Models/Components/PrivateMetadata.md | 7 - docs/Models/Components/PublicMetadata.md | 7 - .../Components/PublicOrganizationData.md | 12 + docs/Models/Components/SAMLAccount.md | 25 +- .../Components/SAMLAccountPublicMetadata.md | 7 - docs/Models/Components/SAMLConnection.md | 33 +- .../SAMLConnectionSAMLConnection.md | 18 + docs/Models/Components/SAMLConnections.md | 8 +- .../Components/SchemasSAMLConnection.md | 29 + ...ject.md => SchemasSAMLConnectionObject.md} | 2 +- docs/Models/Components/Session.md | 3 +- docs/Models/Components/SignUp.md | 50 +- .../Models/Components/SignUpPublicMetadata.md | 7 - .../Models/Components/SignUpUnsafeMetadata.md | 7 - docs/Models/Components/Strategy.md | 8 +- docs/Models/Components/Type.md | 14 +- docs/Models/Components/UnsafeMetadata.md | 7 - docs/Models/Components/User.md | 10 +- docs/Models/Components/VerificationNonce.md | 8 - docs/Models/Components/Web3Signature.md | 3 +- .../Web3SignatureVerificationStatus.md | 9 +- .../Web3SignatureVerificationStrategy.md | 7 +- docs/Models/Components/WellKnownJWKS.md | 10 + docs/Models/Errors/ClerkErrors100.md | 11 + docs/Models/Errors/ClerkErrors101.md | 11 + docs/Models/Errors/ClerkErrors102.md | 11 + docs/Models/Errors/ClerkErrors103.md | 11 + docs/Models/Errors/ClerkErrors104.md | 11 + docs/Models/Errors/ClerkErrors36.md | 2 +- docs/Models/Errors/ClerkErrors37.md | 2 +- docs/Models/Errors/ClerkErrors38.md | 2 +- docs/Models/Errors/ClerkErrors39.md | 2 +- docs/Models/Errors/ClerkErrors40.md | 2 +- docs/Models/Errors/ClerkErrors41.md | 2 +- docs/Models/Errors/ClerkErrors42.md | 2 +- docs/Models/Errors/ClerkErrors45.md | 2 +- docs/Models/Errors/ClerkErrors47.md | 2 +- docs/Models/Errors/ClerkErrors48.md | 2 +- docs/Models/Errors/ClerkErrors49.md | 2 +- docs/Models/Errors/ClerkErrors50.md | 2 +- docs/Models/Errors/ClerkErrors54.md | 2 +- docs/Models/Errors/ClerkErrors56.md | 2 +- docs/Models/Errors/ClerkErrors58.md | 2 +- docs/Models/Errors/ClerkErrors59.md | 2 +- docs/Models/Errors/ClerkErrors60.md | 2 +- docs/Models/Errors/ClerkErrors61.md | 2 +- docs/Models/Errors/ClerkErrors63.md | 2 +- docs/Models/Errors/ClerkErrors64.md | 2 +- docs/Models/Errors/ClerkErrors66.md | 2 +- docs/Models/Errors/ClerkErrors69.md | 2 +- docs/Models/Errors/ClerkErrors70.md | 2 +- docs/Models/Errors/ClerkErrors71.md | 2 +- docs/Models/Errors/ClerkErrors73.md | 2 +- docs/Models/Errors/ClerkErrors76.md | 2 +- docs/Models/Errors/ClerkErrors77.md | 2 +- docs/Models/Errors/ClerkErrors79.md | 2 +- docs/Models/Errors/ClerkErrors80.md | 2 +- docs/Models/Errors/ClerkErrors81.md | 2 +- docs/Models/Errors/ClerkErrors82.md | 2 +- docs/Models/Errors/ClerkErrors83.md | 2 +- docs/Models/Errors/ClerkErrors84.md | 2 +- docs/Models/Errors/ClerkErrors85.md | 2 +- docs/Models/Errors/ClerkErrors86.md | 2 +- docs/Models/Errors/ClerkErrors87.md | 2 +- docs/Models/Errors/ClerkErrors88.md | 2 +- docs/Models/Errors/ClerkErrors89.md | 2 +- docs/Models/Errors/ClerkErrors90.md | 11 + docs/Models/Errors/ClerkErrors91.md | 11 + docs/Models/Errors/ClerkErrors92.md | 11 + docs/Models/Errors/ClerkErrors93.md | 11 + docs/Models/Errors/ClerkErrors94.md | 11 + docs/Models/Errors/ClerkErrors95.md | 11 + docs/Models/Errors/ClerkErrors96.md | 11 + docs/Models/Errors/ClerkErrors97.md | 11 + docs/Models/Errors/ClerkErrors98.md | 11 + docs/Models/Errors/ClerkErrors99.md | 11 + ...angeProductionInstanceDomainRequestBody.md | 7 +- .../Operations/CreateActorTokenRequestBody.md | 2 +- .../CreateInvitationPublicMetadata.md | 11 - .../Operations/CreateInvitationRequestBody.md | 5 +- .../CreateOrganizationDomainRequest.md | 9 + .../CreateOrganizationDomainRequestBody.md | 10 + .../CreateOrganizationDomainResponse.md | 11 + ...ganizationInvitationBulkPrivateMetadata.md | 9 - ...rganizationInvitationBulkPublicMetadata.md | 9 - ...teOrganizationInvitationPrivateMetadata.md | 9 - ...ateOrganizationInvitationPublicMetadata.md | 9 - ...CreateOrganizationInvitationRequestBody.md | 8 +- .../CreateOrganizationPrivateMetadata.md | 9 - .../CreateOrganizationPublicMetadata.md | 9 - .../CreateOrganizationRequestBody.md | 9 +- .../CreateSAMLConnectionResponse.md | 2 +- .../Operations/CreateUserRequestBody.md | 45 +- .../Operations/CreateUserTOTPRequest.md | 8 + .../Operations/CreateUserTOTPResponse.md | 11 + .../Operations/DeleteBackupCodeRequest.md | 8 + .../Operations/DeleteBackupCodeResponse.md | 11 + .../DeleteBackupCodeResponseBody.md | 10 + .../DeleteExternalAccountRequest.md | 9 + .../DeleteExternalAccountResponse.md | 11 + .../DeleteOrganizationDomainRequest.md | 9 + .../DeleteOrganizationDomainResponse.md | 11 + docs/Models/Operations/DeleteTOTPRequest.md | 8 + docs/Models/Operations/DeleteTOTPResponse.md | 11 + .../Operations/DeleteTOTPResponseBody.md | 10 + .../Models/Operations/GetClientListRequest.md | 4 +- docs/Models/Operations/GetJWKSResponse.md | 3 +- .../GetOAuthAccessTokenPublicMetadata.md | 7 - .../Operations/GetOrganizationRequest.md | 7 +- .../Operations/GetSAMLConnectionResponse.md | 2 +- .../Operations/GetSessionListRequest.md | 4 +- docs/Models/Operations/GetUserListRequest.md | 4 +- ...stanceGetOrganizationMembershipsRequest.md | 10 + ...tanceGetOrganizationMembershipsResponse.md | 11 + ...OrganizationInvitationsQueryParamStatus.md | 12 + ...tInstanceOrganizationInvitationsRequest.md | 12 + ...InstanceOrganizationInvitationsResponse.md | 11 + .../ListInvitationsQueryParamStatus.md | 13 + .../Operations/ListInvitationsRequest.md | 6 +- .../ListOAuthApplicationsRequest.md | 4 +- .../ListOrganizationDomainsRequest.md | 12 + .../ListOrganizationDomainsResponse.md | 11 + .../ListOrganizationInvitationsRequest.md | 4 +- .../ListOrganizationMembershipsRequest.md | 4 +- .../Operations/ListOrganizationsRequest.md | 4 +- ...stPendingOrganizationInvitationsRequest.md | 4 +- .../Operations/ListSAMLConnectionsRequest.md | 4 +- ...ergeOrganizationMetadataPrivateMetadata.md | 10 - ...MergeOrganizationMetadataPublicMetadata.md | 10 - .../MergeOrganizationMetadataRequestBody.md | 4 +- docs/Models/Operations/PasswordHasher.md | 145 --- docs/Models/Operations/PrivateMetadata.md | 9 - docs/Models/Operations/PublicMetadata.md | 9 - docs/Models/Operations/QueryParamStatus.md | 2 +- docs/Models/Operations/RequestBody.md | 16 +- docs/Models/Operations/ResponseBody.md | 22 +- .../RevokeOrganizationInvitationRequest.md | 10 +- ...RevokeOrganizationInvitationRequestBody.md | 2 +- docs/Models/Operations/UnsafeMetadata.md | 10 - .../Operations/UpdateDomainRequestBody.md | 9 +- .../UpdateOrganizationDomainRequest.md | 10 + .../UpdateOrganizationDomainRequestBody.md | 9 + .../UpdateOrganizationDomainResponse.md | 11 + ...zationMembershipMetadataPrivateMetadata.md | 10 - ...izationMembershipMetadataPublicMetadata.md | 10 - ...ganizationMembershipMetadataRequestBody.md | 4 +- .../UpdateOrganizationPrivateMetadata.md | 9 - .../UpdateOrganizationPublicMetadata.md | 9 - .../UpdateOrganizationRequestBody.md | 17 +- .../UpdateSAMLConnectionRequestBody.md | 3 +- .../UpdateSAMLConnectionResponse.md | 2 +- .../Operations/UpdateSignUpRequestBody.md | 7 +- .../Operations/UpdateUserPasswordHasher.md | 135 --- .../Operations/UpdateUserPrivateMetadata.md | 9 - .../Operations/UpdateUserPublicMetadata.md | 9 - .../Operations/UpdateUserRequestBody.md | 51 +- .../Operations/UpdateUserUnsafeMetadata.md | 10 - .../UploadOrganizationLogoRequestBody.md | 4 +- .../Operations/UserPasskeyDeleteRequest.md | 9 + .../Operations/UserPasskeyDeleteResponse.md | 11 + .../Operations/UserWeb3WalletDeleteRequest.md | 9 + .../UserWeb3WalletDeleteResponse.md | 11 + .../UsersGetOrganizationInvitationsRequest.md | 11 + ...UsersGetOrganizationInvitationsResponse.md | 11 + .../UsersGetOrganizationMembershipsRequest.md | 4 +- .../Operations/VerifyClientRequestBody.md | 6 +- docs/sdks/actortokens/README.md | 19 +- docs/sdks/allowlistblocklist/README.md | 111 +-- docs/sdks/allowlistidentifiers/README.md | 53 ++ docs/sdks/betafeatures/README.md | 20 +- docs/sdks/blocklistidentifiers/README.md | 47 + docs/sdks/clerkbackendredirecturls/README.md | 146 +++ docs/sdks/clients/README.md | 22 +- docs/sdks/domains/README.md | 30 +- docs/sdks/emailaddresses/README.md | 27 +- docs/sdks/emailandsmstemplates/README.md | 281 +----- docs/sdks/emailsmstemplates/README.md | 217 +++++ docs/sdks/instancesettings/README.md | 26 +- docs/sdks/invitations/README.md | 32 +- docs/sdks/jwks/README.md | 10 +- docs/sdks/jwttemplates/README.md | 45 +- docs/sdks/miscellaneous/README.md | 6 +- docs/sdks/oauthapplications/README.md | 60 +- docs/sdks/organizationdomain/README.md | 59 ++ docs/sdks/organizationdomains/README.md | 155 ++++ docs/sdks/organizationinvitations/README.md | 139 ++- docs/sdks/organizationmemberships/README.md | 104 ++- docs/sdks/organizations/README.md | 80 +- docs/sdks/phonenumbers/README.md | 27 +- docs/sdks/proxychecks/README.md | 8 +- docs/sdks/redirecturls/README.md | 150 +-- docs/sdks/samlconnections/README.md | 83 +- docs/sdks/sessions/README.md | 30 +- docs/sdks/signintokens/README.md | 19 +- docs/sdks/signups/README.md | 8 +- docs/sdks/templates/README.md | 61 ++ docs/sdks/testingtokens/README.md | 9 +- docs/sdks/users/README.md | 434 ++++++++- docs/sdks/webhooks/README.md | 6 +- src/ActorTokens.php | 8 +- src/AllowListBlockList.php | 116 +-- src/AllowlistIdentifiers.php | 80 ++ src/BetaFeatures.php | 10 +- src/BlocklistIdentifiers.php | 76 ++ src/ClerkBackend.php | 139 +-- src/ClerkBackendRedirectUrls.php | 191 ++++ src/Clients.php | 10 +- src/Domains.php | 14 +- src/EmailAddresses.php | 8 +- src/EmailAndSMSTemplates.php | 312 +------ src/EmailSMSTemplates.php | 268 ++++++ src/InstanceSettings.php | 12 +- src/Invitations.php | 16 +- src/JWTTemplates.php | 20 +- src/Jwks.php | 23 +- src/Miscellaneous.php | 2 +- src/Models/Components/EnrollmentMode.php | 18 + src/Models/Components/Invitation.php | 24 +- .../Components/InvitationPublicMetadata.php | 18 - src/Models/Components/InvitationRevoked.php | 24 +- .../InvitationRevokedPublicMetadata.php | 18 - src/Models/Components/InvitationStatus.php | 1 + src/Models/Components/Keys.php | 79 ++ src/Models/Components/LatestActivity.php | 107 +++ .../Components/OTPVerificationStrategy.php | 6 + .../Components/OauthVerificationStrategy.php | 8 +- src/Models/Components/Organization.php | 20 +- src/Models/Components/OrganizationDomain.php | 146 +++ .../Components/OrganizationDomainObject.php | 20 + .../Components/OrganizationDomainStatus.php | 17 + .../OrganizationDomainVerification.php | 65 ++ src/Models/Components/OrganizationDomains.php | 43 + .../Components/OrganizationInvitation.php | 30 +- .../OrganizationInvitationPrivateMetadata.php | 18 - .../OrganizationInvitationPublicMetadata.php | 18 - ...onInvitationWithPublicOrganizationData.php | 151 +++ ...tationWithPublicOrganizationDataObject.php | 20 + ...nInvitationsWithPublicOrganizationData.php | 43 + .../Components/OrganizationMembership.php | 28 +- .../OrganizationMembershipOrganization.php | 20 +- ...nMembershipOrganizationPrivateMetadata.php | 18 - ...onMembershipOrganizationPublicMetadata.php | 18 - .../OrganizationMembershipPrivateMetadata.php | 19 - .../OrganizationMembershipPublicMetadata.php | 19 - .../OrganizationPrivateMetadata.php | 18 - .../Components/OrganizationPublicMetadata.php | 18 - .../Components/OrganizationWithLogo.php | 20 +- .../OrganizationWithLogoPrivateMetadata.php | 18 - .../OrganizationWithLogoPublicMetadata.php | 18 - src/Models/Components/Passkey.php | 10 +- src/Models/Components/PrivateMetadata.php | 18 - src/Models/Components/PublicMetadata.php | 18 - .../Components/PublicOrganizationData.php | 69 ++ src/Models/Components/SAMLAccount.php | 22 +- .../Components/SAMLAccountPublicMetadata.php | 18 - .../SAMLConnectionSAMLConnection.php | 127 +++ src/Models/Components/SAMLConnections.php | 6 +- ...nnection.php => SchemasSAMLConnection.php} | 22 +- ...ct.php => SchemasSAMLConnectionObject.php} | 2 +- src/Models/Components/Session.php | 13 +- src/Models/Components/SignUp.php | 20 +- .../Components/SignUpPublicMetadata.php | 18 - .../Components/SignUpUnsafeMetadata.php | 18 - src/Models/Components/Strategy.php | 6 + src/Models/Components/Type.php | 4 + src/Models/Components/UnsafeMetadata.php | 18 - src/Models/Components/User.php | 55 +- src/Models/Components/VerificationNonce.php | 15 - src/Models/Components/Web3Signature.php | 20 +- .../Web3SignatureVerificationStatus.php | 3 + .../Web3SignatureVerificationStrategy.php | 1 + src/Models/Components/WellKnownJWKS.php | 32 + src/Models/Errors/ClerkErrors100.php | 52 ++ src/Models/Errors/ClerkErrors100Throwable.php | 20 + src/Models/Errors/ClerkErrors101.php | 52 ++ src/Models/Errors/ClerkErrors101Throwable.php | 20 + src/Models/Errors/ClerkErrors102.php | 52 ++ src/Models/Errors/ClerkErrors102Throwable.php | 20 + src/Models/Errors/ClerkErrors103.php | 52 ++ src/Models/Errors/ClerkErrors103Throwable.php | 20 + src/Models/Errors/ClerkErrors104.php | 52 ++ src/Models/Errors/ClerkErrors104Throwable.php | 20 + src/Models/Errors/ClerkErrors36.php | 2 +- src/Models/Errors/ClerkErrors37.php | 2 +- src/Models/Errors/ClerkErrors38.php | 2 +- src/Models/Errors/ClerkErrors39.php | 2 +- src/Models/Errors/ClerkErrors40.php | 2 +- src/Models/Errors/ClerkErrors41.php | 2 +- src/Models/Errors/ClerkErrors42.php | 2 +- src/Models/Errors/ClerkErrors45.php | 2 +- src/Models/Errors/ClerkErrors47.php | 2 +- src/Models/Errors/ClerkErrors48.php | 2 +- src/Models/Errors/ClerkErrors49.php | 2 +- src/Models/Errors/ClerkErrors50.php | 2 +- src/Models/Errors/ClerkErrors54.php | 2 +- src/Models/Errors/ClerkErrors56.php | 2 +- src/Models/Errors/ClerkErrors58.php | 2 +- src/Models/Errors/ClerkErrors59.php | 2 +- src/Models/Errors/ClerkErrors60.php | 2 +- src/Models/Errors/ClerkErrors61.php | 2 +- src/Models/Errors/ClerkErrors63.php | 2 +- src/Models/Errors/ClerkErrors64.php | 2 +- src/Models/Errors/ClerkErrors66.php | 2 +- src/Models/Errors/ClerkErrors69.php | 2 +- src/Models/Errors/ClerkErrors70.php | 2 +- src/Models/Errors/ClerkErrors71.php | 2 +- src/Models/Errors/ClerkErrors73.php | 2 +- src/Models/Errors/ClerkErrors76.php | 2 +- src/Models/Errors/ClerkErrors77.php | 2 +- src/Models/Errors/ClerkErrors79.php | 2 +- src/Models/Errors/ClerkErrors80.php | 2 +- src/Models/Errors/ClerkErrors81.php | 2 +- src/Models/Errors/ClerkErrors82.php | 2 +- src/Models/Errors/ClerkErrors83.php | 2 +- src/Models/Errors/ClerkErrors84.php | 2 +- src/Models/Errors/ClerkErrors85.php | 2 +- src/Models/Errors/ClerkErrors86.php | 2 +- src/Models/Errors/ClerkErrors87.php | 2 +- src/Models/Errors/ClerkErrors88.php | 2 +- src/Models/Errors/ClerkErrors89.php | 2 +- src/Models/Errors/ClerkErrors90.php | 52 ++ src/Models/Errors/ClerkErrors90Throwable.php | 20 + src/Models/Errors/ClerkErrors91.php | 52 ++ src/Models/Errors/ClerkErrors91Throwable.php | 20 + src/Models/Errors/ClerkErrors92.php | 52 ++ src/Models/Errors/ClerkErrors92Throwable.php | 20 + src/Models/Errors/ClerkErrors93.php | 52 ++ src/Models/Errors/ClerkErrors93Throwable.php | 20 + src/Models/Errors/ClerkErrors94.php | 52 ++ src/Models/Errors/ClerkErrors94Throwable.php | 20 + src/Models/Errors/ClerkErrors95.php | 52 ++ src/Models/Errors/ClerkErrors95Throwable.php | 20 + src/Models/Errors/ClerkErrors96.php | 52 ++ src/Models/Errors/ClerkErrors96Throwable.php | 20 + src/Models/Errors/ClerkErrors97.php | 52 ++ src/Models/Errors/ClerkErrors97Throwable.php | 20 + src/Models/Errors/ClerkErrors98.php | 52 ++ src/Models/Errors/ClerkErrors98Throwable.php | 20 + src/Models/Errors/ClerkErrors99.php | 52 ++ src/Models/Errors/ClerkErrors99Throwable.php | 20 + ...ngeProductionInstanceDomainRequestBody.php | 16 +- .../CreateActorTokenRequestBody.php | 2 +- .../CreateInvitationPublicMetadata.php | 24 - .../CreateInvitationRequestBody.php | 21 +- .../CreateOrganizationDomainRequest.php | 38 + .../CreateOrganizationDomainRequestBody.php | 52 ++ .../CreateOrganizationDomainResponse.php | 55 ++ ...anizationInvitationBulkPrivateMetadata.php | 19 - ...ganizationInvitationBulkPublicMetadata.php | 19 - ...eOrganizationInvitationPrivateMetadata.php | 19 - ...teOrganizationInvitationPublicMetadata.php | 19 - ...reateOrganizationInvitationRequestBody.php | 27 +- .../CreateOrganizationPrivateMetadata.php | 19 - .../CreateOrganizationPublicMetadata.php | 19 - .../CreateOrganizationRequestBody.php | 33 +- .../CreateSAMLConnectionResponse.php | 10 +- .../Operations/CreateUserRequestBody.php | 221 ++--- .../Operations/CreateUserTOTPRequest.php | 29 + .../Operations/CreateUserTOTPResponse.php | 55 ++ .../Operations/DeleteBackupCodeRequest.php | 29 + .../Operations/DeleteBackupCodeResponse.php | 55 ++ .../DeleteBackupCodeResponseBody.php | 30 + .../DeleteExternalAccountRequest.php | 39 + .../DeleteExternalAccountResponse.php | 55 ++ .../DeleteOrganizationDomainRequest.php | 39 + .../DeleteOrganizationDomainResponse.php | 55 ++ src/Models/Operations/DeleteTOTPRequest.php | 29 + src/Models/Operations/DeleteTOTPResponse.php | 55 ++ .../Operations/DeleteTOTPResponseBody.php | 30 + .../Operations/GetClientListRequest.php | 14 +- src/Models/Operations/GetJWKSResponse.php | 13 +- .../GetOAuthAccessTokenPublicMetadata.php | 18 - .../Operations/GetOrganizationRequest.php | 12 +- .../Operations/GetSAMLConnectionResponse.php | 10 +- .../Operations/GetSessionListRequest.php | 14 +- src/Models/Operations/GetUserListRequest.php | 14 +- ...tanceGetOrganizationMembershipsRequest.php | 57 ++ ...anceGetOrganizationMembershipsResponse.php | 55 ++ ...rganizationInvitationsQueryParamStatus.php | 18 + ...InstanceOrganizationInvitationsRequest.php | 80 ++ ...nstanceOrganizationInvitationsResponse.php | 55 ++ .../ListInvitationsQueryParamStatus.php | 19 + .../Operations/ListInvitationsRequest.php | 20 +- .../ListOAuthApplicationsRequest.php | 14 +- .../ListOrganizationDomainsRequest.php | 74 ++ .../ListOrganizationDomainsResponse.php | 55 ++ .../ListOrganizationInvitationsRequest.php | 14 +- .../ListOrganizationMembershipsRequest.php | 14 +- .../Operations/ListOrganizationsRequest.php | 14 +- ...tPendingOrganizationInvitationsRequest.php | 14 +- .../Operations/ListSAMLConnectionsRequest.php | 14 +- ...rgeOrganizationMetadataPrivateMetadata.php | 23 - ...ergeOrganizationMetadataPublicMetadata.php | 23 - .../MergeOrganizationMetadataRequestBody.php | 18 +- src/Models/Operations/PasswordHasher.php | 154 --- src/Models/Operations/PrivateMetadata.php | 19 - src/Models/Operations/PublicMetadata.php | 19 - src/Models/Operations/QueryParamStatus.php | 2 +- src/Models/Operations/RequestBody.php | 27 +- src/Models/Operations/ResponseBody.php | 11 +- .../RevokeOrganizationInvitationRequest.php | 8 +- ...evokeOrganizationInvitationRequestBody.php | 9 +- src/Models/Operations/UnsafeMetadata.php | 23 - .../Operations/UpdateDomainRequestBody.php | 16 +- .../UpdateOrganizationDomainRequest.php | 48 + .../UpdateOrganizationDomainRequestBody.php | 41 + .../UpdateOrganizationDomainResponse.php | 55 ++ ...ationMembershipMetadataPrivateMetadata.php | 23 - ...zationMembershipMetadataPublicMetadata.php | 23 - ...anizationMembershipMetadataRequestBody.php | 18 +- .../UpdateOrganizationPrivateMetadata.php | 19 - .../UpdateOrganizationPublicMetadata.php | 19 - .../UpdateOrganizationRequestBody.php | 33 +- .../UpdateSAMLConnectionRequestBody.php | 13 +- .../UpdateSAMLConnectionResponse.php | 10 +- .../Operations/UpdateSignUpRequestBody.php | 16 +- .../Operations/UpdateUserPasswordHasher.php | 144 --- .../Operations/UpdateUserPrivateMetadata.php | 19 - .../Operations/UpdateUserPublicMetadata.php | 19 - .../Operations/UpdateUserRequestBody.php | 184 ++-- .../Operations/UpdateUserUnsafeMetadata.php | 23 - .../UploadOrganizationLogoRequestBody.php | 10 +- .../Operations/UserPasskeyDeleteRequest.php | 39 + .../Operations/UserPasskeyDeleteResponse.php | 55 ++ .../UserWeb3WalletDeleteRequest.php | 39 + .../UserWeb3WalletDeleteResponse.php | 55 ++ ...UsersGetOrganizationInvitationsRequest.php | 64 ++ ...sersGetOrganizationInvitationsResponse.php | 55 ++ ...UsersGetOrganizationMembershipsRequest.php | 14 +- .../Operations/VerifyClientRequestBody.php | 2 +- src/OAuthApplications.php | 30 +- src/OrganizationDomain.php | 89 ++ src/OrganizationDomains.php | 197 ++++ src/OrganizationInvitations.php | 103 ++- src/OrganizationMemberships.php | 88 +- src/Organizations.php | 37 +- src/PhoneNumbers.php | 8 +- src/ProxyChecks.php | 4 +- src/RedirectURLs.php | 168 +--- src/SAMLConnections.php | 38 +- src/SDKConfiguration.php | 4 +- src/Sessions.php | 10 +- src/SignInTokens.php | 8 +- src/SignUps.php | 4 +- src/Templates.php | 90 ++ src/TestingTokens.php | 2 +- src/Users.php | 437 ++++++++- src/Webhooks.php | 6 +- 490 files changed, 10198 insertions(+), 4666 deletions(-) create mode 100644 .speakeasy/fixes.yaml create mode 100644 .speakeasy/speakeasy-modifications-overlay.yaml create mode 100644 docs/Models/Components/EnrollmentMode.md delete mode 100644 docs/Models/Components/InvitationPublicMetadata.md delete mode 100644 docs/Models/Components/InvitationRevokedPublicMetadata.md create mode 100644 docs/Models/Components/Keys.md create mode 100644 docs/Models/Components/LatestActivity.md create mode 100644 docs/Models/Components/OrganizationDomain.md create mode 100644 docs/Models/Components/OrganizationDomainObject.md create mode 100644 docs/Models/Components/OrganizationDomainStatus.md create mode 100644 docs/Models/Components/OrganizationDomainVerification.md create mode 100644 docs/Models/Components/OrganizationDomains.md delete mode 100644 docs/Models/Components/OrganizationInvitationPrivateMetadata.md delete mode 100644 docs/Models/Components/OrganizationInvitationPublicMetadata.md create mode 100644 docs/Models/Components/OrganizationInvitationWithPublicOrganizationData.md create mode 100644 docs/Models/Components/OrganizationInvitationWithPublicOrganizationDataObject.md create mode 100644 docs/Models/Components/OrganizationInvitationsWithPublicOrganizationData.md delete mode 100644 docs/Models/Components/OrganizationMembershipOrganizationPrivateMetadata.md delete mode 100644 docs/Models/Components/OrganizationMembershipOrganizationPublicMetadata.md delete mode 100644 docs/Models/Components/OrganizationMembershipPrivateMetadata.md delete mode 100644 docs/Models/Components/OrganizationMembershipPublicMetadata.md delete mode 100644 docs/Models/Components/OrganizationPrivateMetadata.md delete mode 100644 docs/Models/Components/OrganizationPublicMetadata.md delete mode 100644 docs/Models/Components/OrganizationWithLogoPrivateMetadata.md delete mode 100644 docs/Models/Components/OrganizationWithLogoPublicMetadata.md delete mode 100644 docs/Models/Components/PrivateMetadata.md delete mode 100644 docs/Models/Components/PublicMetadata.md create mode 100644 docs/Models/Components/PublicOrganizationData.md delete mode 100644 docs/Models/Components/SAMLAccountPublicMetadata.md create mode 100644 docs/Models/Components/SAMLConnectionSAMLConnection.md create mode 100644 docs/Models/Components/SchemasSAMLConnection.md rename docs/Models/Components/{SAMLConnectionObject.md => SchemasSAMLConnectionObject.md} (81%) delete mode 100644 docs/Models/Components/SignUpPublicMetadata.md delete mode 100644 docs/Models/Components/SignUpUnsafeMetadata.md delete mode 100644 docs/Models/Components/UnsafeMetadata.md delete mode 100644 docs/Models/Components/VerificationNonce.md create mode 100644 docs/Models/Components/WellKnownJWKS.md create mode 100644 docs/Models/Errors/ClerkErrors100.md create mode 100644 docs/Models/Errors/ClerkErrors101.md create mode 100644 docs/Models/Errors/ClerkErrors102.md create mode 100644 docs/Models/Errors/ClerkErrors103.md create mode 100644 docs/Models/Errors/ClerkErrors104.md create mode 100644 docs/Models/Errors/ClerkErrors90.md create mode 100644 docs/Models/Errors/ClerkErrors91.md create mode 100644 docs/Models/Errors/ClerkErrors92.md create mode 100644 docs/Models/Errors/ClerkErrors93.md create mode 100644 docs/Models/Errors/ClerkErrors94.md create mode 100644 docs/Models/Errors/ClerkErrors95.md create mode 100644 docs/Models/Errors/ClerkErrors96.md create mode 100644 docs/Models/Errors/ClerkErrors97.md create mode 100644 docs/Models/Errors/ClerkErrors98.md create mode 100644 docs/Models/Errors/ClerkErrors99.md delete mode 100644 docs/Models/Operations/CreateInvitationPublicMetadata.md create mode 100644 docs/Models/Operations/CreateOrganizationDomainRequest.md create mode 100644 docs/Models/Operations/CreateOrganizationDomainRequestBody.md create mode 100644 docs/Models/Operations/CreateOrganizationDomainResponse.md delete mode 100644 docs/Models/Operations/CreateOrganizationInvitationBulkPrivateMetadata.md delete mode 100644 docs/Models/Operations/CreateOrganizationInvitationBulkPublicMetadata.md delete mode 100644 docs/Models/Operations/CreateOrganizationInvitationPrivateMetadata.md delete mode 100644 docs/Models/Operations/CreateOrganizationInvitationPublicMetadata.md delete mode 100644 docs/Models/Operations/CreateOrganizationPrivateMetadata.md delete mode 100644 docs/Models/Operations/CreateOrganizationPublicMetadata.md create mode 100644 docs/Models/Operations/CreateUserTOTPRequest.md create mode 100644 docs/Models/Operations/CreateUserTOTPResponse.md create mode 100644 docs/Models/Operations/DeleteBackupCodeRequest.md create mode 100644 docs/Models/Operations/DeleteBackupCodeResponse.md create mode 100644 docs/Models/Operations/DeleteBackupCodeResponseBody.md create mode 100644 docs/Models/Operations/DeleteExternalAccountRequest.md create mode 100644 docs/Models/Operations/DeleteExternalAccountResponse.md create mode 100644 docs/Models/Operations/DeleteOrganizationDomainRequest.md create mode 100644 docs/Models/Operations/DeleteOrganizationDomainResponse.md create mode 100644 docs/Models/Operations/DeleteTOTPRequest.md create mode 100644 docs/Models/Operations/DeleteTOTPResponse.md create mode 100644 docs/Models/Operations/DeleteTOTPResponseBody.md delete mode 100644 docs/Models/Operations/GetOAuthAccessTokenPublicMetadata.md create mode 100644 docs/Models/Operations/InstanceGetOrganizationMembershipsRequest.md create mode 100644 docs/Models/Operations/InstanceGetOrganizationMembershipsResponse.md create mode 100644 docs/Models/Operations/ListInstanceOrganizationInvitationsQueryParamStatus.md create mode 100644 docs/Models/Operations/ListInstanceOrganizationInvitationsRequest.md create mode 100644 docs/Models/Operations/ListInstanceOrganizationInvitationsResponse.md create mode 100644 docs/Models/Operations/ListInvitationsQueryParamStatus.md create mode 100644 docs/Models/Operations/ListOrganizationDomainsRequest.md create mode 100644 docs/Models/Operations/ListOrganizationDomainsResponse.md delete mode 100644 docs/Models/Operations/MergeOrganizationMetadataPrivateMetadata.md delete mode 100644 docs/Models/Operations/MergeOrganizationMetadataPublicMetadata.md delete mode 100644 docs/Models/Operations/PasswordHasher.md delete mode 100644 docs/Models/Operations/PrivateMetadata.md delete mode 100644 docs/Models/Operations/PublicMetadata.md delete mode 100644 docs/Models/Operations/UnsafeMetadata.md create mode 100644 docs/Models/Operations/UpdateOrganizationDomainRequest.md create mode 100644 docs/Models/Operations/UpdateOrganizationDomainRequestBody.md create mode 100644 docs/Models/Operations/UpdateOrganizationDomainResponse.md delete mode 100644 docs/Models/Operations/UpdateOrganizationMembershipMetadataPrivateMetadata.md delete mode 100644 docs/Models/Operations/UpdateOrganizationMembershipMetadataPublicMetadata.md delete mode 100644 docs/Models/Operations/UpdateOrganizationPrivateMetadata.md delete mode 100644 docs/Models/Operations/UpdateOrganizationPublicMetadata.md delete mode 100644 docs/Models/Operations/UpdateUserPasswordHasher.md delete mode 100644 docs/Models/Operations/UpdateUserPrivateMetadata.md delete mode 100644 docs/Models/Operations/UpdateUserPublicMetadata.md delete mode 100644 docs/Models/Operations/UpdateUserUnsafeMetadata.md create mode 100644 docs/Models/Operations/UserPasskeyDeleteRequest.md create mode 100644 docs/Models/Operations/UserPasskeyDeleteResponse.md create mode 100644 docs/Models/Operations/UserWeb3WalletDeleteRequest.md create mode 100644 docs/Models/Operations/UserWeb3WalletDeleteResponse.md create mode 100644 docs/Models/Operations/UsersGetOrganizationInvitationsRequest.md create mode 100644 docs/Models/Operations/UsersGetOrganizationInvitationsResponse.md create mode 100644 docs/sdks/allowlistidentifiers/README.md create mode 100644 docs/sdks/blocklistidentifiers/README.md create mode 100644 docs/sdks/clerkbackendredirecturls/README.md create mode 100644 docs/sdks/emailsmstemplates/README.md create mode 100644 docs/sdks/organizationdomain/README.md create mode 100644 docs/sdks/organizationdomains/README.md create mode 100644 docs/sdks/templates/README.md create mode 100644 src/AllowlistIdentifiers.php create mode 100644 src/BlocklistIdentifiers.php create mode 100644 src/ClerkBackendRedirectUrls.php create mode 100644 src/EmailSMSTemplates.php create mode 100644 src/Models/Components/EnrollmentMode.php delete mode 100644 src/Models/Components/InvitationPublicMetadata.php delete mode 100644 src/Models/Components/InvitationRevokedPublicMetadata.php create mode 100644 src/Models/Components/Keys.php create mode 100644 src/Models/Components/LatestActivity.php create mode 100644 src/Models/Components/OrganizationDomain.php create mode 100644 src/Models/Components/OrganizationDomainObject.php create mode 100644 src/Models/Components/OrganizationDomainStatus.php create mode 100644 src/Models/Components/OrganizationDomainVerification.php create mode 100644 src/Models/Components/OrganizationDomains.php delete mode 100644 src/Models/Components/OrganizationInvitationPrivateMetadata.php delete mode 100644 src/Models/Components/OrganizationInvitationPublicMetadata.php create mode 100644 src/Models/Components/OrganizationInvitationWithPublicOrganizationData.php create mode 100644 src/Models/Components/OrganizationInvitationWithPublicOrganizationDataObject.php create mode 100644 src/Models/Components/OrganizationInvitationsWithPublicOrganizationData.php delete mode 100644 src/Models/Components/OrganizationMembershipOrganizationPrivateMetadata.php delete mode 100644 src/Models/Components/OrganizationMembershipOrganizationPublicMetadata.php delete mode 100644 src/Models/Components/OrganizationMembershipPrivateMetadata.php delete mode 100644 src/Models/Components/OrganizationMembershipPublicMetadata.php delete mode 100644 src/Models/Components/OrganizationPrivateMetadata.php delete mode 100644 src/Models/Components/OrganizationPublicMetadata.php delete mode 100644 src/Models/Components/OrganizationWithLogoPrivateMetadata.php delete mode 100644 src/Models/Components/OrganizationWithLogoPublicMetadata.php delete mode 100644 src/Models/Components/PrivateMetadata.php delete mode 100644 src/Models/Components/PublicMetadata.php create mode 100644 src/Models/Components/PublicOrganizationData.php delete mode 100644 src/Models/Components/SAMLAccountPublicMetadata.php create mode 100644 src/Models/Components/SAMLConnectionSAMLConnection.php rename src/Models/Components/{SAMLConnection.php => SchemasSAMLConnection.php} (81%) rename src/Models/Components/{SAMLConnectionObject.php => SchemasSAMLConnectionObject.php} (83%) delete mode 100644 src/Models/Components/SignUpPublicMetadata.php delete mode 100644 src/Models/Components/SignUpUnsafeMetadata.php delete mode 100644 src/Models/Components/UnsafeMetadata.php delete mode 100644 src/Models/Components/VerificationNonce.php create mode 100644 src/Models/Components/WellKnownJWKS.php create mode 100644 src/Models/Errors/ClerkErrors100.php create mode 100644 src/Models/Errors/ClerkErrors100Throwable.php create mode 100644 src/Models/Errors/ClerkErrors101.php create mode 100644 src/Models/Errors/ClerkErrors101Throwable.php create mode 100644 src/Models/Errors/ClerkErrors102.php create mode 100644 src/Models/Errors/ClerkErrors102Throwable.php create mode 100644 src/Models/Errors/ClerkErrors103.php create mode 100644 src/Models/Errors/ClerkErrors103Throwable.php create mode 100644 src/Models/Errors/ClerkErrors104.php create mode 100644 src/Models/Errors/ClerkErrors104Throwable.php create mode 100644 src/Models/Errors/ClerkErrors90.php create mode 100644 src/Models/Errors/ClerkErrors90Throwable.php create mode 100644 src/Models/Errors/ClerkErrors91.php create mode 100644 src/Models/Errors/ClerkErrors91Throwable.php create mode 100644 src/Models/Errors/ClerkErrors92.php create mode 100644 src/Models/Errors/ClerkErrors92Throwable.php create mode 100644 src/Models/Errors/ClerkErrors93.php create mode 100644 src/Models/Errors/ClerkErrors93Throwable.php create mode 100644 src/Models/Errors/ClerkErrors94.php create mode 100644 src/Models/Errors/ClerkErrors94Throwable.php create mode 100644 src/Models/Errors/ClerkErrors95.php create mode 100644 src/Models/Errors/ClerkErrors95Throwable.php create mode 100644 src/Models/Errors/ClerkErrors96.php create mode 100644 src/Models/Errors/ClerkErrors96Throwable.php create mode 100644 src/Models/Errors/ClerkErrors97.php create mode 100644 src/Models/Errors/ClerkErrors97Throwable.php create mode 100644 src/Models/Errors/ClerkErrors98.php create mode 100644 src/Models/Errors/ClerkErrors98Throwable.php create mode 100644 src/Models/Errors/ClerkErrors99.php create mode 100644 src/Models/Errors/ClerkErrors99Throwable.php delete mode 100644 src/Models/Operations/CreateInvitationPublicMetadata.php create mode 100644 src/Models/Operations/CreateOrganizationDomainRequest.php create mode 100644 src/Models/Operations/CreateOrganizationDomainRequestBody.php create mode 100644 src/Models/Operations/CreateOrganizationDomainResponse.php delete mode 100644 src/Models/Operations/CreateOrganizationInvitationBulkPrivateMetadata.php delete mode 100644 src/Models/Operations/CreateOrganizationInvitationBulkPublicMetadata.php delete mode 100644 src/Models/Operations/CreateOrganizationInvitationPrivateMetadata.php delete mode 100644 src/Models/Operations/CreateOrganizationInvitationPublicMetadata.php delete mode 100644 src/Models/Operations/CreateOrganizationPrivateMetadata.php delete mode 100644 src/Models/Operations/CreateOrganizationPublicMetadata.php create mode 100644 src/Models/Operations/CreateUserTOTPRequest.php create mode 100644 src/Models/Operations/CreateUserTOTPResponse.php create mode 100644 src/Models/Operations/DeleteBackupCodeRequest.php create mode 100644 src/Models/Operations/DeleteBackupCodeResponse.php create mode 100644 src/Models/Operations/DeleteBackupCodeResponseBody.php create mode 100644 src/Models/Operations/DeleteExternalAccountRequest.php create mode 100644 src/Models/Operations/DeleteExternalAccountResponse.php create mode 100644 src/Models/Operations/DeleteOrganizationDomainRequest.php create mode 100644 src/Models/Operations/DeleteOrganizationDomainResponse.php create mode 100644 src/Models/Operations/DeleteTOTPRequest.php create mode 100644 src/Models/Operations/DeleteTOTPResponse.php create mode 100644 src/Models/Operations/DeleteTOTPResponseBody.php delete mode 100644 src/Models/Operations/GetOAuthAccessTokenPublicMetadata.php create mode 100644 src/Models/Operations/InstanceGetOrganizationMembershipsRequest.php create mode 100644 src/Models/Operations/InstanceGetOrganizationMembershipsResponse.php create mode 100644 src/Models/Operations/ListInstanceOrganizationInvitationsQueryParamStatus.php create mode 100644 src/Models/Operations/ListInstanceOrganizationInvitationsRequest.php create mode 100644 src/Models/Operations/ListInstanceOrganizationInvitationsResponse.php create mode 100644 src/Models/Operations/ListInvitationsQueryParamStatus.php create mode 100644 src/Models/Operations/ListOrganizationDomainsRequest.php create mode 100644 src/Models/Operations/ListOrganizationDomainsResponse.php delete mode 100644 src/Models/Operations/MergeOrganizationMetadataPrivateMetadata.php delete mode 100644 src/Models/Operations/MergeOrganizationMetadataPublicMetadata.php delete mode 100644 src/Models/Operations/PasswordHasher.php delete mode 100644 src/Models/Operations/PrivateMetadata.php delete mode 100644 src/Models/Operations/PublicMetadata.php delete mode 100644 src/Models/Operations/UnsafeMetadata.php create mode 100644 src/Models/Operations/UpdateOrganizationDomainRequest.php create mode 100644 src/Models/Operations/UpdateOrganizationDomainRequestBody.php create mode 100644 src/Models/Operations/UpdateOrganizationDomainResponse.php delete mode 100644 src/Models/Operations/UpdateOrganizationMembershipMetadataPrivateMetadata.php delete mode 100644 src/Models/Operations/UpdateOrganizationMembershipMetadataPublicMetadata.php delete mode 100644 src/Models/Operations/UpdateOrganizationPrivateMetadata.php delete mode 100644 src/Models/Operations/UpdateOrganizationPublicMetadata.php delete mode 100644 src/Models/Operations/UpdateUserPasswordHasher.php delete mode 100644 src/Models/Operations/UpdateUserPrivateMetadata.php delete mode 100644 src/Models/Operations/UpdateUserPublicMetadata.php delete mode 100644 src/Models/Operations/UpdateUserUnsafeMetadata.php create mode 100644 src/Models/Operations/UserPasskeyDeleteRequest.php create mode 100644 src/Models/Operations/UserPasskeyDeleteResponse.php create mode 100644 src/Models/Operations/UserWeb3WalletDeleteRequest.php create mode 100644 src/Models/Operations/UserWeb3WalletDeleteResponse.php create mode 100644 src/Models/Operations/UsersGetOrganizationInvitationsRequest.php create mode 100644 src/Models/Operations/UsersGetOrganizationInvitationsResponse.php create mode 100644 src/OrganizationDomain.php create mode 100644 src/OrganizationDomains.php create mode 100644 src/Templates.php diff --git a/.speakeasy/fixes.yaml b/.speakeasy/fixes.yaml new file mode 100644 index 0000000..a49f5fe --- /dev/null +++ b/.speakeasy/fixes.yaml @@ -0,0 +1,151 @@ +overlay: 1.0.0 +info: + title: Overlay File to fix issues in OAS + version: 0.0.0 +actions: + - target: $["components"]["schemas"]["OTP"]["properties"]["strategy"]["enum"][*] + remove: true + - target: $["components"]["schemas"]["OTP"]["properties"]["strategy"]["enum"] + update: + - "phone_code" + - "email_code" + - "email_link" + - "reset_password_email_code" + - "from_oauth_discord" + - "from_oauth_google" + - "from_oauth_apple" + - "from_oauth_microsoft" + - "from_oauth_github" + - target: $["components"]["schemas"]["Oauth"]["properties"]["strategy"]["enum"][*] + remove: true + - target: $["components"]["schemas"]["Oauth"]["properties"]["strategy"]["enum"] + update: + - "oauth_google" + - "oauth_mock" + - "from_oauth_google" + - "from_oauth_discord" + - "from_oauth_microsoft" + - "oauth_apple" + - "oauth_microsoft" + - "oauth_github" + - "email_link" + - target: $["components"]["schemas"]["IdentificationLink"]["properties"]["type"]["enum"] + update: + - "oauth_apple" + - "oauth_discord" + - "oauth_microsoft" + - "oauth_github" + - target: $["components"]["parameters"]["LimitParameter"]["schema"] + update: + type: integer + - target: $["components"]["parameters"]["OffsetParameter"]["schema"] + update: + type: integer + - target: $["paths"]["/email_addresses/{email_address_id}"]["get"] + update: + x-speakeasy-usage-example: true + - target: $["paths"]["/users"]["post"]["requestBody"]["content"]["application/json"]["schema"]["properties"]["public_metadata"] + update: + additionalProperties: true + - target: $["paths"]["/users"]["post"]["requestBody"]["content"]["application/json"]["schema"]["properties"]["private_metadata"] + update: + additionalProperties: true + - target: $["paths"]["/users"]["post"]["requestBody"]["content"]["application/json"]["schema"]["properties"]["unsafe_metadata"] + update: + additionalProperties: true + - target: $["paths"]["/users/{user_id}"]["patch"]["requestBody"]["content"]["application/json"]["schema"]["properties"]["public_metadata"] + update: + additionalProperties: true + - target: $["paths"]["/users/{user_id}"]["patch"]["requestBody"]["content"]["application/json"]["schema"]["properties"]["private_metadata"] + update: + additionalProperties: true + - target: $["paths"]["/users/{user_id}"]["patch"]["requestBody"]["content"]["application/json"]["schema"]["properties"]["unsafe_metadata"] + update: + additionalProperties: true + - target: $["paths"]["/users/{user_id}/oauth_access_tokens/{provider}"]["get"]["responses"]["200"]["content"]["application/json"]["schema"]["items"]["properties"]["public_metadata"] + update: + additionalProperties: true + - target: $["paths"]["/invitations"]["post"]["requestBody"]["content"]["application/json"]["schema"]["properties"]["public_metadata"] + update: + additionalProperties: true + - target: $["paths"]["/organizations"]["post"]["requestBody"]["content"]["application/json"]["schema"]["properties"]["private_metadata"] + update: + additionalProperties: true + - target: $["paths"]["/organizations"]["post"]["requestBody"]["content"]["application/json"]["schema"]["properties"]["public_metadata"] + update: + additionalProperties: true + - target: $["paths"]["/organizations/{organization_id}"]["patch"]["requestBody"]["content"]["application/json"]["schema"]["properties"]["public_metadata"] + update: + additionalProperties: true + - target: $["paths"]["/organizations/{organization_id}"]["patch"]["requestBody"]["content"]["application/json"]["schema"]["properties"]["private_metadata"] + update: + additionalProperties: true + - target: $["paths"]["/organizations/{organization_id}/metadata"]["patch"]["requestBody"]["content"]["application/json"]["schema"]["properties"]["public_metadata"] + update: + additionalProperties: true + - target: $["paths"]["/organizations/{organization_id}/metadata"]["patch"]["requestBody"]["content"]["application/json"]["schema"]["properties"]["private_metadata"] + update: + additionalProperties: true + - target: $["paths"]["/organizations/{organization_id}/invitations"]["post"]["requestBody"]["content"]["application/json"]["schema"]["properties"]["public_metadata"] + update: + additionalProperties: true + - target: $["paths"]["/organizations/{organization_id}/invitations"]["post"]["requestBody"]["content"]["application/json"]["schema"]["properties"]["private_metadata"] + update: + additionalProperties: true + - target: $["paths"]["/organizations/{organization_id}/invitations/bulk"]["post"]["requestBody"]["content"]["application/json"]["schema"]["items"]["properties"]["public_metadata"] + update: + additionalProperties: true + - target: $["paths"]["/organizations/{organization_id}/invitations/bulk"]["post"]["requestBody"]["content"]["application/json"]["schema"]["items"]["properties"]["private_metadata"] + update: + additionalProperties: true + - target: $["paths"]["/organizations/{organization_id}/memberships/{user_id}/metadata"]["patch"]["requestBody"]["content"]["application/json"]["schema"]["properties"]["public_metadata"] + update: + additionalProperties: true + - target: $["paths"]["/organizations/{organization_id}/memberships/{user_id}/metadata"]["patch"]["requestBody"]["content"]["application/json"]["schema"]["properties"]["private_metadata"] + update: + additionalProperties: true + - target: $["components"]["schemas"]["SAMLAccount"]["properties"]["public_metadata"] + update: + additionalProperties: true + - target: $["components"]["schemas"]["User"]["properties"]["public_metadata"] + update: + additionalProperties: true + - target: $["components"]["schemas"]["User"]["properties"]["private_metadata"] + update: + additionalProperties: true + - target: $["components"]["schemas"]["User"]["properties"]["unsafe_metadata"] + update: + additionalProperties: true + - target: $["components"]["schemas"]["Organization"]["properties"]["public_metadata"] + update: + additionalProperties: true + - target: $["components"]["schemas"]["Organization"]["properties"]["private_metadata"] + update: + additionalProperties: true + - target: $["components"]["schemas"]["OrganizationMembership"]["properties"]["public_metadata"] + update: + additionalProperties: true + - target: $["components"]["schemas"]["OrganizationMembership"]["properties"]["private_metadata"] + update: + additionalProperties: true + - target: $["components"]["schemas"]["OrganizationInvitationWithPublicOrganizationData"]["properties"]["public_metadata"] + update: + additionalProperties: true + - target: $["components"]["schemas"]["OrganizationInvitationWithPublicOrganizationData"]["properties"]["private_metadata"] + update: + additionalProperties: true + - target: $["components"]["schemas"]["Invitation"]["properties"]["public_metadata"] + update: + additionalProperties: true + - target: $["components"]["schemas"]["OrganizationInvitation"]["properties"]["public_metadata"] + update: + additionalProperties: true + - target: $["components"]["schemas"]["OrganizationInvitation"]["properties"]["private_metadata"] + update: + additionalProperties: true + - target: $["components"]["schemas"]["SignUp"]["properties"]["unsafe_metadata"] + update: + additionalProperties: true + - target: $["components"]["schemas"]["SignUp"]["properties"]["public_metadata"] + update: + additionalProperties: true diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index e584af3..c0befd9 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,23 +1,26 @@ lockVersion: 2.0.0 id: 8c24a12b-d2f1-466a-bdaa-6d83a049a679 management: - docChecksum: 16d57a566fd293ae00cc4172463280a5 + docChecksum: 5b058eb4b1b83a6a9d0c18b6d90f6683 docVersion: v1 speakeasyVersion: 1.424.0 generationVersion: 2.445.1 - releaseVersion: 0.2.2 - configChecksum: 98bb7d5dea27f048ce18e0b2e56d1a78 + releaseVersion: 0.4.3 + configChecksum: efc024d26c13d6e77ca9842fd44a2433 published: true features: php: constsAndDefaults: 0.2.0 core: 3.7.0 deprecations: 2.81.1 + examples: 2.81.3 flattening: 2.81.1 globalSecurity: 2.81.7 globalSecurityFlattening: 0.1.1 globalServerURLs: 2.82.1 + groups: 2.81.2 methodArguments: 0.1.0 + nameOverrides: 2.81.2 nullables: 1.0.0 responseFormat: 0.1.0 unions: 0.1.3 @@ -56,6 +59,7 @@ generatedFiles: - docs/Models/Components/DomainsEnrollmentModes.md - docs/Models/Components/EmailAddress.md - docs/Models/Components/EmailAddressObject.md + - docs/Models/Components/EnrollmentMode.md - docs/Models/Components/Error.md - docs/Models/Components/ErrorClerkError.md - docs/Models/Components/ErrorMeta.md @@ -69,14 +73,14 @@ generatedFiles: - docs/Models/Components/InstanceSettingsObject.md - docs/Models/Components/Invitation.md - docs/Models/Components/InvitationObject.md - - docs/Models/Components/InvitationPublicMetadata.md - docs/Models/Components/InvitationRevoked.md - docs/Models/Components/InvitationRevokedObject.md - - docs/Models/Components/InvitationRevokedPublicMetadata.md - docs/Models/Components/InvitationRevokedStatus.md - docs/Models/Components/InvitationStatus.md - docs/Models/Components/JWTTemplate.md - docs/Models/Components/JWTTemplateObject.md + - docs/Models/Components/Keys.md + - docs/Models/Components/LatestActivity.md - docs/Models/Components/Meta.md - docs/Models/Components/Nonce.md - docs/Models/Components/OAuthApplication.md @@ -91,29 +95,27 @@ generatedFiles: - docs/Models/Components/OauthVerificationStrategy.md - docs/Models/Components/ObjectT.md - docs/Models/Components/Organization.md + - docs/Models/Components/OrganizationDomain.md + - docs/Models/Components/OrganizationDomainObject.md + - docs/Models/Components/OrganizationDomainStatus.md + - docs/Models/Components/OrganizationDomainVerification.md + - docs/Models/Components/OrganizationDomains.md - docs/Models/Components/OrganizationInvitation.md - docs/Models/Components/OrganizationInvitationObject.md - - docs/Models/Components/OrganizationInvitationPrivateMetadata.md - - docs/Models/Components/OrganizationInvitationPublicMetadata.md + - docs/Models/Components/OrganizationInvitationWithPublicOrganizationData.md + - docs/Models/Components/OrganizationInvitationWithPublicOrganizationDataObject.md - docs/Models/Components/OrganizationInvitations.md + - docs/Models/Components/OrganizationInvitationsWithPublicOrganizationData.md - docs/Models/Components/OrganizationMembership.md - docs/Models/Components/OrganizationMembershipObject.md - docs/Models/Components/OrganizationMembershipOrganization.md - docs/Models/Components/OrganizationMembershipOrganizationObject.md - - docs/Models/Components/OrganizationMembershipOrganizationPrivateMetadata.md - - docs/Models/Components/OrganizationMembershipOrganizationPublicMetadata.md - - docs/Models/Components/OrganizationMembershipPrivateMetadata.md - - docs/Models/Components/OrganizationMembershipPublicMetadata.md - docs/Models/Components/OrganizationMemberships.md - docs/Models/Components/OrganizationObject.md - - docs/Models/Components/OrganizationPrivateMetadata.md - - docs/Models/Components/OrganizationPublicMetadata.md - docs/Models/Components/OrganizationSettings.md - docs/Models/Components/OrganizationSettingsObject.md - docs/Models/Components/OrganizationWithLogo.md - docs/Models/Components/OrganizationWithLogoObject.md - - docs/Models/Components/OrganizationWithLogoPrivateMetadata.md - - docs/Models/Components/OrganizationWithLogoPublicMetadata.md - docs/Models/Components/Organizations.md - docs/Models/Components/Otp.md - docs/Models/Components/Passkey.md @@ -122,27 +124,27 @@ generatedFiles: - docs/Models/Components/PhoneNumber.md - docs/Models/Components/PhoneNumberObject.md - docs/Models/Components/PhoneNumberVerification.md - - docs/Models/Components/PrivateMetadata.md - docs/Models/Components/ProxyCheck.md - docs/Models/Components/ProxyCheckObject.md - - docs/Models/Components/PublicMetadata.md + - docs/Models/Components/PublicOrganizationData.md - docs/Models/Components/PublicUserData.md - docs/Models/Components/RedirectURL.md - docs/Models/Components/RedirectURLObject.md - docs/Models/Components/SAMLAccount.md - docs/Models/Components/SAMLAccountObject.md - - docs/Models/Components/SAMLAccountPublicMetadata.md - docs/Models/Components/SAMLAccountVerification.md - - docs/Models/Components/SAMLConnection.md - - docs/Models/Components/SAMLConnectionObject.md + - docs/Models/Components/SAMLConnectionSAMLConnection.md - docs/Models/Components/SAMLConnections.md - docs/Models/Components/SAMLErrorClerkError.md - docs/Models/Components/SAMLVerificationStatus.md - docs/Models/Components/SAMLVerificationStrategy.md - docs/Models/Components/Saml.md + - docs/Models/Components/SamlConnection.md - docs/Models/Components/SchemasPasskey.md - docs/Models/Components/SchemasPasskeyObject.md - docs/Models/Components/SchemasPasskeyVerification.md + - docs/Models/Components/SchemasSAMLConnection.md + - docs/Models/Components/SchemasSAMLConnectionObject.md - docs/Models/Components/Security.md - docs/Models/Components/Session.md - docs/Models/Components/SessionObject.md @@ -151,9 +153,7 @@ generatedFiles: - docs/Models/Components/SignInTokenStatus.md - docs/Models/Components/SignUp.md - docs/Models/Components/SignUpObject.md - - docs/Models/Components/SignUpPublicMetadata.md - docs/Models/Components/SignUpStatus.md - - docs/Models/Components/SignUpUnsafeMetadata.md - docs/Models/Components/Status.md - docs/Models/Components/Strategy.md - docs/Models/Components/SvixURL.md @@ -167,13 +167,11 @@ generatedFiles: - docs/Models/Components/TotalCount.md - docs/Models/Components/TotalCountObject.md - docs/Models/Components/Type.md - - docs/Models/Components/UnsafeMetadata.md - docs/Models/Components/User.md - docs/Models/Components/UserObject.md - docs/Models/Components/Verification.md - docs/Models/Components/VerificationAdmin.md - docs/Models/Components/VerificationError.md - - docs/Models/Components/VerificationNonce.md - docs/Models/Components/VerificationOTP.md - docs/Models/Components/VerificationStatus.md - docs/Models/Components/VerificationStrategy.md @@ -185,9 +183,15 @@ generatedFiles: - docs/Models/Components/Web3WalletObject.md - docs/Models/Components/Web3WalletVerification.md - docs/Models/Components/Web3WalletVerificationAdmin.md + - docs/Models/Components/WellKnownJWKS.md - docs/Models/Errors/ClerkErrors.md - docs/Models/Errors/ClerkErrors1.md - docs/Models/Errors/ClerkErrors10.md + - docs/Models/Errors/ClerkErrors100.md + - docs/Models/Errors/ClerkErrors101.md + - docs/Models/Errors/ClerkErrors102.md + - docs/Models/Errors/ClerkErrors103.md + - docs/Models/Errors/ClerkErrors104.md - docs/Models/Errors/ClerkErrors11.md - docs/Models/Errors/ClerkErrors12.md - docs/Models/Errors/ClerkErrors13.md @@ -275,6 +279,16 @@ generatedFiles: - docs/Models/Errors/ClerkErrors88.md - docs/Models/Errors/ClerkErrors89.md - docs/Models/Errors/ClerkErrors9.md + - docs/Models/Errors/ClerkErrors90.md + - docs/Models/Errors/ClerkErrors91.md + - docs/Models/Errors/ClerkErrors92.md + - docs/Models/Errors/ClerkErrors93.md + - docs/Models/Errors/ClerkErrors94.md + - docs/Models/Errors/ClerkErrors95.md + - docs/Models/Errors/ClerkErrors96.md + - docs/Models/Errors/ClerkErrors97.md + - docs/Models/Errors/ClerkErrors98.md + - docs/Models/Errors/ClerkErrors99.md - docs/Models/Errors/Meta.md - docs/Models/Operations/Actor.md - docs/Models/Operations/AddDomainRequestBody.md @@ -294,27 +308,23 @@ generatedFiles: - docs/Models/Operations/CreateBlocklistIdentifierResponse.md - docs/Models/Operations/CreateEmailAddressRequestBody.md - docs/Models/Operations/CreateEmailAddressResponse.md - - docs/Models/Operations/CreateInvitationPublicMetadata.md - docs/Models/Operations/CreateInvitationRequestBody.md - docs/Models/Operations/CreateInvitationResponse.md - docs/Models/Operations/CreateJWTTemplateRequestBody.md - docs/Models/Operations/CreateJWTTemplateResponse.md - docs/Models/Operations/CreateOAuthApplicationRequestBody.md - docs/Models/Operations/CreateOAuthApplicationResponse.md - - docs/Models/Operations/CreateOrganizationInvitationBulkPrivateMetadata.md - - docs/Models/Operations/CreateOrganizationInvitationBulkPublicMetadata.md + - docs/Models/Operations/CreateOrganizationDomainRequest.md + - docs/Models/Operations/CreateOrganizationDomainRequestBody.md + - docs/Models/Operations/CreateOrganizationDomainResponse.md - docs/Models/Operations/CreateOrganizationInvitationBulkRequest.md - docs/Models/Operations/CreateOrganizationInvitationBulkResponse.md - - docs/Models/Operations/CreateOrganizationInvitationPrivateMetadata.md - - docs/Models/Operations/CreateOrganizationInvitationPublicMetadata.md - docs/Models/Operations/CreateOrganizationInvitationRequest.md - docs/Models/Operations/CreateOrganizationInvitationRequestBody.md - docs/Models/Operations/CreateOrganizationInvitationResponse.md - docs/Models/Operations/CreateOrganizationMembershipRequest.md - docs/Models/Operations/CreateOrganizationMembershipRequestBody.md - docs/Models/Operations/CreateOrganizationMembershipResponse.md - - docs/Models/Operations/CreateOrganizationPrivateMetadata.md - - docs/Models/Operations/CreateOrganizationPublicMetadata.md - docs/Models/Operations/CreateOrganizationRequestBody.md - docs/Models/Operations/CreateOrganizationResponse.md - docs/Models/Operations/CreatePhoneNumberRequestBody.md @@ -332,18 +342,27 @@ generatedFiles: - docs/Models/Operations/CreateTestingTokenResponse.md - docs/Models/Operations/CreateUserRequestBody.md - docs/Models/Operations/CreateUserResponse.md + - docs/Models/Operations/CreateUserTOTPRequest.md + - docs/Models/Operations/CreateUserTOTPResponse.md - docs/Models/Operations/DeleteAllowlistIdentifierRequest.md - docs/Models/Operations/DeleteAllowlistIdentifierResponse.md + - docs/Models/Operations/DeleteBackupCodeRequest.md + - docs/Models/Operations/DeleteBackupCodeResponse.md + - docs/Models/Operations/DeleteBackupCodeResponseBody.md - docs/Models/Operations/DeleteBlocklistIdentifierRequest.md - docs/Models/Operations/DeleteBlocklistIdentifierResponse.md - docs/Models/Operations/DeleteDomainRequest.md - docs/Models/Operations/DeleteDomainResponse.md - docs/Models/Operations/DeleteEmailAddressRequest.md - docs/Models/Operations/DeleteEmailAddressResponse.md + - docs/Models/Operations/DeleteExternalAccountRequest.md + - docs/Models/Operations/DeleteExternalAccountResponse.md - docs/Models/Operations/DeleteJWTTemplateRequest.md - docs/Models/Operations/DeleteJWTTemplateResponse.md - docs/Models/Operations/DeleteOAuthApplicationRequest.md - docs/Models/Operations/DeleteOAuthApplicationResponse.md + - docs/Models/Operations/DeleteOrganizationDomainRequest.md + - docs/Models/Operations/DeleteOrganizationDomainResponse.md - docs/Models/Operations/DeleteOrganizationLogoRequest.md - docs/Models/Operations/DeleteOrganizationLogoResponse.md - docs/Models/Operations/DeleteOrganizationMembershipRequest.md @@ -357,6 +376,9 @@ generatedFiles: - docs/Models/Operations/DeleteSAMLConnectionRequest.md - docs/Models/Operations/DeleteSAMLConnectionResponse.md - docs/Models/Operations/DeleteSvixAppResponse.md + - docs/Models/Operations/DeleteTOTPRequest.md + - docs/Models/Operations/DeleteTOTPResponse.md + - docs/Models/Operations/DeleteTOTPResponseBody.md - docs/Models/Operations/DeleteUserProfileImageRequest.md - docs/Models/Operations/DeleteUserProfileImageResponse.md - docs/Models/Operations/DeleteUserRequest.md @@ -375,7 +397,6 @@ generatedFiles: - docs/Models/Operations/GetJWKSResponse.md - docs/Models/Operations/GetJWTTemplateRequest.md - docs/Models/Operations/GetJWTTemplateResponse.md - - docs/Models/Operations/GetOAuthAccessTokenPublicMetadata.md - docs/Models/Operations/GetOAuthAccessTokenRequest.md - docs/Models/Operations/GetOAuthAccessTokenResponse.md - docs/Models/Operations/GetOAuthApplicationRequest.md @@ -406,14 +427,22 @@ generatedFiles: - docs/Models/Operations/GetUserResponse.md - docs/Models/Operations/GetUsersCountRequest.md - docs/Models/Operations/GetUsersCountResponse.md + - docs/Models/Operations/InstanceGetOrganizationMembershipsRequest.md + - docs/Models/Operations/InstanceGetOrganizationMembershipsResponse.md - docs/Models/Operations/ListAllowlistIdentifiersResponse.md - docs/Models/Operations/ListBlocklistIdentifiersResponse.md - docs/Models/Operations/ListDomainsResponse.md + - docs/Models/Operations/ListInstanceOrganizationInvitationsQueryParamStatus.md + - docs/Models/Operations/ListInstanceOrganizationInvitationsRequest.md + - docs/Models/Operations/ListInstanceOrganizationInvitationsResponse.md + - docs/Models/Operations/ListInvitationsQueryParamStatus.md - docs/Models/Operations/ListInvitationsRequest.md - docs/Models/Operations/ListInvitationsResponse.md - docs/Models/Operations/ListJWTTemplatesResponse.md - docs/Models/Operations/ListOAuthApplicationsRequest.md - docs/Models/Operations/ListOAuthApplicationsResponse.md + - docs/Models/Operations/ListOrganizationDomainsRequest.md + - docs/Models/Operations/ListOrganizationDomainsResponse.md - docs/Models/Operations/ListOrganizationInvitationsQueryParamStatus.md - docs/Models/Operations/ListOrganizationInvitationsRequest.md - docs/Models/Operations/ListOrganizationInvitationsResponse.md @@ -428,21 +457,16 @@ generatedFiles: - docs/Models/Operations/ListSAMLConnectionsResponse.md - docs/Models/Operations/LockUserRequest.md - docs/Models/Operations/LockUserResponse.md - - docs/Models/Operations/MergeOrganizationMetadataPrivateMetadata.md - - docs/Models/Operations/MergeOrganizationMetadataPublicMetadata.md - docs/Models/Operations/MergeOrganizationMetadataRequest.md - docs/Models/Operations/MergeOrganizationMetadataRequestBody.md - docs/Models/Operations/MergeOrganizationMetadataResponse.md - docs/Models/Operations/ObjectT.md - - docs/Models/Operations/PasswordHasher.md - docs/Models/Operations/PathParamTemplateType.md - docs/Models/Operations/PreviewTemplateRequest.md - docs/Models/Operations/PreviewTemplateRequestBody.md - docs/Models/Operations/PreviewTemplateResponse.md - docs/Models/Operations/PreviewTemplateResponseBody.md - - docs/Models/Operations/PrivateMetadata.md - docs/Models/Operations/Provider.md - - docs/Models/Operations/PublicMetadata.md - docs/Models/Operations/QueryParamStatus.md - docs/Models/Operations/RequestBody.md - docs/Models/Operations/ResponseBody.md @@ -475,7 +499,6 @@ generatedFiles: - docs/Models/Operations/UnbanUserResponse.md - docs/Models/Operations/UnlockUserRequest.md - docs/Models/Operations/UnlockUserResponse.md - - docs/Models/Operations/UnsafeMetadata.md - docs/Models/Operations/UpdateDomainRequest.md - docs/Models/Operations/UpdateDomainRequestBody.md - docs/Models/Operations/UpdateDomainResponse.md @@ -497,16 +520,15 @@ generatedFiles: - docs/Models/Operations/UpdateOAuthApplicationRequest.md - docs/Models/Operations/UpdateOAuthApplicationRequestBody.md - docs/Models/Operations/UpdateOAuthApplicationResponse.md - - docs/Models/Operations/UpdateOrganizationMembershipMetadataPrivateMetadata.md - - docs/Models/Operations/UpdateOrganizationMembershipMetadataPublicMetadata.md + - docs/Models/Operations/UpdateOrganizationDomainRequest.md + - docs/Models/Operations/UpdateOrganizationDomainRequestBody.md + - docs/Models/Operations/UpdateOrganizationDomainResponse.md - docs/Models/Operations/UpdateOrganizationMembershipMetadataRequest.md - docs/Models/Operations/UpdateOrganizationMembershipMetadataRequestBody.md - docs/Models/Operations/UpdateOrganizationMembershipMetadataResponse.md - docs/Models/Operations/UpdateOrganizationMembershipRequest.md - docs/Models/Operations/UpdateOrganizationMembershipRequestBody.md - docs/Models/Operations/UpdateOrganizationMembershipResponse.md - - docs/Models/Operations/UpdateOrganizationPrivateMetadata.md - - docs/Models/Operations/UpdateOrganizationPublicMetadata.md - docs/Models/Operations/UpdateOrganizationRequest.md - docs/Models/Operations/UpdateOrganizationRequestBody.md - docs/Models/Operations/UpdateOrganizationResponse.md @@ -525,13 +547,9 @@ generatedFiles: - docs/Models/Operations/UpdateUserMetadataRequest.md - docs/Models/Operations/UpdateUserMetadataRequestBody.md - docs/Models/Operations/UpdateUserMetadataResponse.md - - docs/Models/Operations/UpdateUserPasswordHasher.md - - docs/Models/Operations/UpdateUserPrivateMetadata.md - - docs/Models/Operations/UpdateUserPublicMetadata.md - docs/Models/Operations/UpdateUserRequest.md - docs/Models/Operations/UpdateUserRequestBody.md - docs/Models/Operations/UpdateUserResponse.md - - docs/Models/Operations/UpdateUserUnsafeMetadata.md - docs/Models/Operations/UploadOrganizationLogoFile.md - docs/Models/Operations/UploadOrganizationLogoRequest.md - docs/Models/Operations/UploadOrganizationLogoRequestBody.md @@ -540,6 +558,12 @@ generatedFiles: - docs/Models/Operations/UpsertTemplateRequest.md - docs/Models/Operations/UpsertTemplateRequestBody.md - docs/Models/Operations/UpsertTemplateResponse.md + - docs/Models/Operations/UserPasskeyDeleteRequest.md + - docs/Models/Operations/UserPasskeyDeleteResponse.md + - docs/Models/Operations/UserWeb3WalletDeleteRequest.md + - docs/Models/Operations/UserWeb3WalletDeleteResponse.md + - docs/Models/Operations/UsersGetOrganizationInvitationsRequest.md + - docs/Models/Operations/UsersGetOrganizationInvitationsResponse.md - docs/Models/Operations/UsersGetOrganizationMembershipsRequest.md - docs/Models/Operations/UsersGetOrganizationMembershipsResponse.md - docs/Models/Operations/VerifyClientRequestBody.md @@ -559,18 +583,24 @@ generatedFiles: - docs/Models/Operations/VerifyTOTPResponseBody.md - docs/sdks/actortokens/README.md - docs/sdks/allowlistblocklist/README.md + - docs/sdks/allowlistidentifiers/README.md - docs/sdks/betafeatures/README.md + - docs/sdks/blocklistidentifiers/README.md - docs/sdks/clerkbackend/README.md + - docs/sdks/clerkbackendredirecturls/README.md - docs/sdks/clients/README.md - docs/sdks/domains/README.md - docs/sdks/emailaddresses/README.md - docs/sdks/emailandsmstemplates/README.md + - docs/sdks/emailsmstemplates/README.md - docs/sdks/instancesettings/README.md - docs/sdks/invitations/README.md - docs/sdks/jwks/README.md - docs/sdks/jwttemplates/README.md - docs/sdks/miscellaneous/README.md - docs/sdks/oauthapplications/README.md + - docs/sdks/organizationdomain/README.md + - docs/sdks/organizationdomains/README.md - docs/sdks/organizationinvitations/README.md - docs/sdks/organizationmemberships/README.md - docs/sdks/organizations/README.md @@ -581,6 +611,7 @@ generatedFiles: - docs/sdks/sessions/README.md - docs/sdks/signintokens/README.md - docs/sdks/signups/README.md + - docs/sdks/templates/README.md - docs/sdks/testingtokens/README.md - docs/sdks/users/README.md - docs/sdks/webhooks/README.md @@ -589,18 +620,22 @@ generatedFiles: - pint.json - rector.php - src/ActorTokens.php - - src/AllowListBlockList.php + - src/AllowlistBlocklist.php + - src/AllowlistIdentifiers.php - src/BetaFeatures.php + - src/BlocklistIdentifiers.php - src/ClerkBackend.php - src/ClerkBackendBuilder.php + - src/ClerkBackendRedirectUrls.php - src/Clients.php - src/Domains.php - src/EmailAddresses.php - - src/EmailAndSMSTemplates.php + - src/EmailAndSmsTemplates.php + - src/EmailSMSTemplates.php - src/InstanceSettings.php - src/Invitations.php - - src/JWTTemplates.php - src/Jwks.php + - src/JwtTemplates.php - src/Miscellaneous.php - src/Models/Components/Actor.php - src/Models/Components/ActorToken.php @@ -632,6 +667,7 @@ generatedFiles: - src/Models/Components/DomainsEnrollmentModes.php - src/Models/Components/EmailAddress.php - src/Models/Components/EmailAddressObject.php + - src/Models/Components/EnrollmentMode.php - src/Models/Components/ErrorClerkError.php - src/Models/Components/ErrorMeta.php - src/Models/Components/ExternalAccount.php @@ -644,14 +680,14 @@ generatedFiles: - src/Models/Components/InstanceSettingsObject.php - src/Models/Components/Invitation.php - src/Models/Components/InvitationObject.php - - src/Models/Components/InvitationPublicMetadata.php - src/Models/Components/InvitationRevoked.php - src/Models/Components/InvitationRevokedObject.php - - src/Models/Components/InvitationRevokedPublicMetadata.php - src/Models/Components/InvitationRevokedStatus.php - src/Models/Components/InvitationStatus.php - src/Models/Components/JWTTemplate.php - src/Models/Components/JWTTemplateObject.php + - src/Models/Components/Keys.php + - src/Models/Components/LatestActivity.php - src/Models/Components/Meta.php - src/Models/Components/Nonce.php - src/Models/Components/OAuthApplication.php @@ -666,29 +702,27 @@ generatedFiles: - src/Models/Components/OauthVerificationStrategy.php - src/Models/Components/ObjectT.php - src/Models/Components/Organization.php + - src/Models/Components/OrganizationDomain.php + - src/Models/Components/OrganizationDomainObject.php + - src/Models/Components/OrganizationDomainStatus.php + - src/Models/Components/OrganizationDomainVerification.php + - src/Models/Components/OrganizationDomains.php - src/Models/Components/OrganizationInvitation.php - src/Models/Components/OrganizationInvitationObject.php - - src/Models/Components/OrganizationInvitationPrivateMetadata.php - - src/Models/Components/OrganizationInvitationPublicMetadata.php + - src/Models/Components/OrganizationInvitationWithPublicOrganizationData.php + - src/Models/Components/OrganizationInvitationWithPublicOrganizationDataObject.php - src/Models/Components/OrganizationInvitations.php + - src/Models/Components/OrganizationInvitationsWithPublicOrganizationData.php - src/Models/Components/OrganizationMembership.php - src/Models/Components/OrganizationMembershipObject.php - src/Models/Components/OrganizationMembershipOrganization.php - src/Models/Components/OrganizationMembershipOrganizationObject.php - - src/Models/Components/OrganizationMembershipOrganizationPrivateMetadata.php - - src/Models/Components/OrganizationMembershipOrganizationPublicMetadata.php - - src/Models/Components/OrganizationMembershipPrivateMetadata.php - - src/Models/Components/OrganizationMembershipPublicMetadata.php - src/Models/Components/OrganizationMemberships.php - src/Models/Components/OrganizationObject.php - - src/Models/Components/OrganizationPrivateMetadata.php - - src/Models/Components/OrganizationPublicMetadata.php - src/Models/Components/OrganizationSettings.php - src/Models/Components/OrganizationSettingsObject.php - src/Models/Components/OrganizationWithLogo.php - src/Models/Components/OrganizationWithLogoObject.php - - src/Models/Components/OrganizationWithLogoPrivateMetadata.php - - src/Models/Components/OrganizationWithLogoPublicMetadata.php - src/Models/Components/Organizations.php - src/Models/Components/Otp.php - src/Models/Components/Passkey.php @@ -696,18 +730,15 @@ generatedFiles: - src/Models/Components/PasskeyVerificationStrategy.php - src/Models/Components/PhoneNumber.php - src/Models/Components/PhoneNumberObject.php - - src/Models/Components/PrivateMetadata.php - src/Models/Components/ProxyCheck.php - src/Models/Components/ProxyCheckObject.php - - src/Models/Components/PublicMetadata.php + - src/Models/Components/PublicOrganizationData.php - src/Models/Components/PublicUserData.php - src/Models/Components/RedirectURL.php - src/Models/Components/RedirectURLObject.php - src/Models/Components/SAMLAccount.php - src/Models/Components/SAMLAccountObject.php - - src/Models/Components/SAMLAccountPublicMetadata.php - - src/Models/Components/SAMLConnection.php - - src/Models/Components/SAMLConnectionObject.php + - src/Models/Components/SAMLConnectionSAMLConnection.php - src/Models/Components/SAMLConnections.php - src/Models/Components/SAMLErrorClerkError.php - src/Models/Components/SAMLVerificationStatus.php @@ -715,6 +746,8 @@ generatedFiles: - src/Models/Components/Saml.php - src/Models/Components/SchemasPasskey.php - src/Models/Components/SchemasPasskeyObject.php + - src/Models/Components/SchemasSAMLConnection.php + - src/Models/Components/SchemasSAMLConnectionObject.php - src/Models/Components/Security.php - src/Models/Components/Session.php - src/Models/Components/SessionObject.php @@ -723,9 +756,7 @@ generatedFiles: - src/Models/Components/SignInTokenStatus.php - src/Models/Components/SignUp.php - src/Models/Components/SignUpObject.php - - src/Models/Components/SignUpPublicMetadata.php - src/Models/Components/SignUpStatus.php - - src/Models/Components/SignUpUnsafeMetadata.php - src/Models/Components/Status.php - src/Models/Components/Strategy.php - src/Models/Components/SvixURL.php @@ -739,11 +770,9 @@ generatedFiles: - src/Models/Components/TotalCount.php - src/Models/Components/TotalCountObject.php - src/Models/Components/Type.php - - src/Models/Components/UnsafeMetadata.php - src/Models/Components/User.php - src/Models/Components/UserObject.php - src/Models/Components/VerificationAdmin.php - - src/Models/Components/VerificationNonce.php - src/Models/Components/VerificationOTP.php - src/Models/Components/VerificationStatus.php - src/Models/Components/VerificationStrategy.php @@ -754,9 +783,20 @@ generatedFiles: - src/Models/Components/Web3Wallet.php - src/Models/Components/Web3WalletObject.php - src/Models/Components/Web3WalletVerificationAdmin.php + - src/Models/Components/WellKnownJWKS.php - src/Models/Errors/ClerkErrors.php - src/Models/Errors/ClerkErrors1.php - src/Models/Errors/ClerkErrors10.php + - src/Models/Errors/ClerkErrors100.php + - src/Models/Errors/ClerkErrors100Throwable.php + - src/Models/Errors/ClerkErrors101.php + - src/Models/Errors/ClerkErrors101Throwable.php + - src/Models/Errors/ClerkErrors102.php + - src/Models/Errors/ClerkErrors102Throwable.php + - src/Models/Errors/ClerkErrors103.php + - src/Models/Errors/ClerkErrors103Throwable.php + - src/Models/Errors/ClerkErrors104.php + - src/Models/Errors/ClerkErrors104Throwable.php - src/Models/Errors/ClerkErrors10Throwable.php - src/Models/Errors/ClerkErrors11.php - src/Models/Errors/ClerkErrors11Throwable.php @@ -932,6 +972,26 @@ generatedFiles: - src/Models/Errors/ClerkErrors89Throwable.php - src/Models/Errors/ClerkErrors8Throwable.php - src/Models/Errors/ClerkErrors9.php + - src/Models/Errors/ClerkErrors90.php + - src/Models/Errors/ClerkErrors90Throwable.php + - src/Models/Errors/ClerkErrors91.php + - src/Models/Errors/ClerkErrors91Throwable.php + - src/Models/Errors/ClerkErrors92.php + - src/Models/Errors/ClerkErrors92Throwable.php + - src/Models/Errors/ClerkErrors93.php + - src/Models/Errors/ClerkErrors93Throwable.php + - src/Models/Errors/ClerkErrors94.php + - src/Models/Errors/ClerkErrors94Throwable.php + - src/Models/Errors/ClerkErrors95.php + - src/Models/Errors/ClerkErrors95Throwable.php + - src/Models/Errors/ClerkErrors96.php + - src/Models/Errors/ClerkErrors96Throwable.php + - src/Models/Errors/ClerkErrors97.php + - src/Models/Errors/ClerkErrors97Throwable.php + - src/Models/Errors/ClerkErrors98.php + - src/Models/Errors/ClerkErrors98Throwable.php + - src/Models/Errors/ClerkErrors99.php + - src/Models/Errors/ClerkErrors99Throwable.php - src/Models/Errors/ClerkErrors9Throwable.php - src/Models/Errors/ClerkErrorsThrowable.php - src/Models/Errors/Meta.php @@ -954,27 +1014,23 @@ generatedFiles: - src/Models/Operations/CreateBlocklistIdentifierResponse.php - src/Models/Operations/CreateEmailAddressRequestBody.php - src/Models/Operations/CreateEmailAddressResponse.php - - src/Models/Operations/CreateInvitationPublicMetadata.php - src/Models/Operations/CreateInvitationRequestBody.php - src/Models/Operations/CreateInvitationResponse.php - src/Models/Operations/CreateJWTTemplateRequestBody.php - src/Models/Operations/CreateJWTTemplateResponse.php - src/Models/Operations/CreateOAuthApplicationRequestBody.php - src/Models/Operations/CreateOAuthApplicationResponse.php - - src/Models/Operations/CreateOrganizationInvitationBulkPrivateMetadata.php - - src/Models/Operations/CreateOrganizationInvitationBulkPublicMetadata.php + - src/Models/Operations/CreateOrganizationDomainRequest.php + - src/Models/Operations/CreateOrganizationDomainRequestBody.php + - src/Models/Operations/CreateOrganizationDomainResponse.php - src/Models/Operations/CreateOrganizationInvitationBulkRequest.php - src/Models/Operations/CreateOrganizationInvitationBulkResponse.php - - src/Models/Operations/CreateOrganizationInvitationPrivateMetadata.php - - src/Models/Operations/CreateOrganizationInvitationPublicMetadata.php - src/Models/Operations/CreateOrganizationInvitationRequest.php - src/Models/Operations/CreateOrganizationInvitationRequestBody.php - src/Models/Operations/CreateOrganizationInvitationResponse.php - src/Models/Operations/CreateOrganizationMembershipRequest.php - src/Models/Operations/CreateOrganizationMembershipRequestBody.php - src/Models/Operations/CreateOrganizationMembershipResponse.php - - src/Models/Operations/CreateOrganizationPrivateMetadata.php - - src/Models/Operations/CreateOrganizationPublicMetadata.php - src/Models/Operations/CreateOrganizationRequestBody.php - src/Models/Operations/CreateOrganizationResponse.php - src/Models/Operations/CreatePhoneNumberRequestBody.php @@ -992,18 +1048,27 @@ generatedFiles: - src/Models/Operations/CreateTestingTokenResponse.php - src/Models/Operations/CreateUserRequestBody.php - src/Models/Operations/CreateUserResponse.php + - src/Models/Operations/CreateUserTOTPRequest.php + - src/Models/Operations/CreateUserTOTPResponse.php - src/Models/Operations/DeleteAllowlistIdentifierRequest.php - src/Models/Operations/DeleteAllowlistIdentifierResponse.php + - src/Models/Operations/DeleteBackupCodeRequest.php + - src/Models/Operations/DeleteBackupCodeResponse.php + - src/Models/Operations/DeleteBackupCodeResponseBody.php - src/Models/Operations/DeleteBlocklistIdentifierRequest.php - src/Models/Operations/DeleteBlocklistIdentifierResponse.php - src/Models/Operations/DeleteDomainRequest.php - src/Models/Operations/DeleteDomainResponse.php - src/Models/Operations/DeleteEmailAddressRequest.php - src/Models/Operations/DeleteEmailAddressResponse.php + - src/Models/Operations/DeleteExternalAccountRequest.php + - src/Models/Operations/DeleteExternalAccountResponse.php - src/Models/Operations/DeleteJWTTemplateRequest.php - src/Models/Operations/DeleteJWTTemplateResponse.php - src/Models/Operations/DeleteOAuthApplicationRequest.php - src/Models/Operations/DeleteOAuthApplicationResponse.php + - src/Models/Operations/DeleteOrganizationDomainRequest.php + - src/Models/Operations/DeleteOrganizationDomainResponse.php - src/Models/Operations/DeleteOrganizationLogoRequest.php - src/Models/Operations/DeleteOrganizationLogoResponse.php - src/Models/Operations/DeleteOrganizationMembershipRequest.php @@ -1017,6 +1082,9 @@ generatedFiles: - src/Models/Operations/DeleteSAMLConnectionRequest.php - src/Models/Operations/DeleteSAMLConnectionResponse.php - src/Models/Operations/DeleteSvixAppResponse.php + - src/Models/Operations/DeleteTOTPRequest.php + - src/Models/Operations/DeleteTOTPResponse.php + - src/Models/Operations/DeleteTOTPResponseBody.php - src/Models/Operations/DeleteUserProfileImageRequest.php - src/Models/Operations/DeleteUserProfileImageResponse.php - src/Models/Operations/DeleteUserRequest.php @@ -1035,7 +1103,6 @@ generatedFiles: - src/Models/Operations/GetJWKSResponse.php - src/Models/Operations/GetJWTTemplateRequest.php - src/Models/Operations/GetJWTTemplateResponse.php - - src/Models/Operations/GetOAuthAccessTokenPublicMetadata.php - src/Models/Operations/GetOAuthAccessTokenRequest.php - src/Models/Operations/GetOAuthAccessTokenResponse.php - src/Models/Operations/GetOAuthApplicationRequest.php @@ -1066,14 +1133,22 @@ generatedFiles: - src/Models/Operations/GetUserResponse.php - src/Models/Operations/GetUsersCountRequest.php - src/Models/Operations/GetUsersCountResponse.php + - src/Models/Operations/InstanceGetOrganizationMembershipsRequest.php + - src/Models/Operations/InstanceGetOrganizationMembershipsResponse.php - src/Models/Operations/ListAllowlistIdentifiersResponse.php - src/Models/Operations/ListBlocklistIdentifiersResponse.php - src/Models/Operations/ListDomainsResponse.php + - src/Models/Operations/ListInstanceOrganizationInvitationsQueryParamStatus.php + - src/Models/Operations/ListInstanceOrganizationInvitationsRequest.php + - src/Models/Operations/ListInstanceOrganizationInvitationsResponse.php + - src/Models/Operations/ListInvitationsQueryParamStatus.php - src/Models/Operations/ListInvitationsRequest.php - src/Models/Operations/ListInvitationsResponse.php - src/Models/Operations/ListJWTTemplatesResponse.php - src/Models/Operations/ListOAuthApplicationsRequest.php - src/Models/Operations/ListOAuthApplicationsResponse.php + - src/Models/Operations/ListOrganizationDomainsRequest.php + - src/Models/Operations/ListOrganizationDomainsResponse.php - src/Models/Operations/ListOrganizationInvitationsQueryParamStatus.php - src/Models/Operations/ListOrganizationInvitationsRequest.php - src/Models/Operations/ListOrganizationInvitationsResponse.php @@ -1088,21 +1163,16 @@ generatedFiles: - src/Models/Operations/ListSAMLConnectionsResponse.php - src/Models/Operations/LockUserRequest.php - src/Models/Operations/LockUserResponse.php - - src/Models/Operations/MergeOrganizationMetadataPrivateMetadata.php - - src/Models/Operations/MergeOrganizationMetadataPublicMetadata.php - src/Models/Operations/MergeOrganizationMetadataRequest.php - src/Models/Operations/MergeOrganizationMetadataRequestBody.php - src/Models/Operations/MergeOrganizationMetadataResponse.php - src/Models/Operations/ObjectT.php - - src/Models/Operations/PasswordHasher.php - src/Models/Operations/PathParamTemplateType.php - src/Models/Operations/PreviewTemplateRequest.php - src/Models/Operations/PreviewTemplateRequestBody.php - src/Models/Operations/PreviewTemplateResponse.php - src/Models/Operations/PreviewTemplateResponseBody.php - - src/Models/Operations/PrivateMetadata.php - src/Models/Operations/Provider.php - - src/Models/Operations/PublicMetadata.php - src/Models/Operations/QueryParamStatus.php - src/Models/Operations/RequestBody.php - src/Models/Operations/ResponseBody.php @@ -1135,7 +1205,6 @@ generatedFiles: - src/Models/Operations/UnbanUserResponse.php - src/Models/Operations/UnlockUserRequest.php - src/Models/Operations/UnlockUserResponse.php - - src/Models/Operations/UnsafeMetadata.php - src/Models/Operations/UpdateDomainRequest.php - src/Models/Operations/UpdateDomainRequestBody.php - src/Models/Operations/UpdateDomainResponse.php @@ -1157,16 +1226,15 @@ generatedFiles: - src/Models/Operations/UpdateOAuthApplicationRequest.php - src/Models/Operations/UpdateOAuthApplicationRequestBody.php - src/Models/Operations/UpdateOAuthApplicationResponse.php - - src/Models/Operations/UpdateOrganizationMembershipMetadataPrivateMetadata.php - - src/Models/Operations/UpdateOrganizationMembershipMetadataPublicMetadata.php + - src/Models/Operations/UpdateOrganizationDomainRequest.php + - src/Models/Operations/UpdateOrganizationDomainRequestBody.php + - src/Models/Operations/UpdateOrganizationDomainResponse.php - src/Models/Operations/UpdateOrganizationMembershipMetadataRequest.php - src/Models/Operations/UpdateOrganizationMembershipMetadataRequestBody.php - src/Models/Operations/UpdateOrganizationMembershipMetadataResponse.php - src/Models/Operations/UpdateOrganizationMembershipRequest.php - src/Models/Operations/UpdateOrganizationMembershipRequestBody.php - src/Models/Operations/UpdateOrganizationMembershipResponse.php - - src/Models/Operations/UpdateOrganizationPrivateMetadata.php - - src/Models/Operations/UpdateOrganizationPublicMetadata.php - src/Models/Operations/UpdateOrganizationRequest.php - src/Models/Operations/UpdateOrganizationRequestBody.php - src/Models/Operations/UpdateOrganizationResponse.php @@ -1185,13 +1253,9 @@ generatedFiles: - src/Models/Operations/UpdateUserMetadataRequest.php - src/Models/Operations/UpdateUserMetadataRequestBody.php - src/Models/Operations/UpdateUserMetadataResponse.php - - src/Models/Operations/UpdateUserPasswordHasher.php - - src/Models/Operations/UpdateUserPrivateMetadata.php - - src/Models/Operations/UpdateUserPublicMetadata.php - src/Models/Operations/UpdateUserRequest.php - src/Models/Operations/UpdateUserRequestBody.php - src/Models/Operations/UpdateUserResponse.php - - src/Models/Operations/UpdateUserUnsafeMetadata.php - src/Models/Operations/UploadOrganizationLogoFile.php - src/Models/Operations/UploadOrganizationLogoRequest.php - src/Models/Operations/UploadOrganizationLogoRequestBody.php @@ -1200,6 +1264,12 @@ generatedFiles: - src/Models/Operations/UpsertTemplateRequest.php - src/Models/Operations/UpsertTemplateRequestBody.php - src/Models/Operations/UpsertTemplateResponse.php + - src/Models/Operations/UserPasskeyDeleteRequest.php + - src/Models/Operations/UserPasskeyDeleteResponse.php + - src/Models/Operations/UserWeb3WalletDeleteRequest.php + - src/Models/Operations/UserWeb3WalletDeleteResponse.php + - src/Models/Operations/UsersGetOrganizationInvitationsRequest.php + - src/Models/Operations/UsersGetOrganizationInvitationsResponse.php - src/Models/Operations/UsersGetOrganizationMembershipsRequest.php - src/Models/Operations/UsersGetOrganizationMembershipsResponse.php - src/Models/Operations/VerifyClientRequestBody.php @@ -1217,18 +1287,21 @@ generatedFiles: - src/Models/Operations/VerifyTOTPRequestBody.php - src/Models/Operations/VerifyTOTPResponse.php - src/Models/Operations/VerifyTOTPResponseBody.php - - src/OAuthApplications.php + - src/OauthApplications.php + - src/OrganizationDomain.php + - src/OrganizationDomains.php - src/OrganizationInvitations.php - src/OrganizationMemberships.php - src/Organizations.php - src/PhoneNumbers.php - src/ProxyChecks.php - src/RedirectURLs.php - - src/SAMLConnections.php - src/SDKConfiguration.php + - src/SamlConnections.php - src/Sessions.php - src/SignInTokens.php - src/SignUps.php + - src/Templates.php - src/TestingTokens.php - src/Users.php - src/Utils/BigDecimalHandler.php @@ -1472,14 +1545,14 @@ examples: last_active_at_since: 1700690400000 responses: "200": - application/json: [{"last_active_at": 1700690400000}] + application/json: [{"last_active_at": 1700690400000, "legal_accepted_at": 1700690400000}] "400": application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} CreateUser: speakeasy-default-create-user: responses: "200": - application/json: {"last_active_at": 1700690400000} + application/json: {"last_active_at": 1700690400000, "legal_accepted_at": 1700690400000} "400": application/json: {"errors": [{"message": "", "long_message": "", "code": ""}]} GetUsersCount: @@ -1496,7 +1569,7 @@ examples: user_id: "" responses: "200": - application/json: {"last_active_at": 1700690400000} + application/json: {"last_active_at": 1700690400000, "legal_accepted_at": 1700690400000} "400": application/json: {"errors": []} UpdateUser: @@ -1506,7 +1579,7 @@ examples: user_id: "" responses: "200": - application/json: {"last_active_at": 1700690400000} + application/json: {"last_active_at": 1700690400000, "legal_accepted_at": 1700690400000} "400": application/json: {"errors": [{"message": "", "long_message": "", "code": ""}]} DeleteUser: @@ -1526,7 +1599,7 @@ examples: user_id: "" responses: "200": - application/json: {"last_active_at": 1700690400000} + application/json: {"last_active_at": 1700690400000, "legal_accepted_at": 1700690400000} "402": application/json: {"errors": []} UnbanUser: @@ -1536,7 +1609,7 @@ examples: user_id: "" responses: "200": - application/json: {"last_active_at": 1700690400000} + application/json: {"last_active_at": 1700690400000, "legal_accepted_at": 1700690400000} "402": application/json: {"errors": []} LockUser: @@ -1546,7 +1619,7 @@ examples: user_id: "" responses: "200": - application/json: {"last_active_at": 1700690400000} + application/json: {"last_active_at": 1700690400000, "legal_accepted_at": 1700690400000} "403": application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} UnlockUser: @@ -1556,7 +1629,7 @@ examples: user_id: "" responses: "200": - application/json: {"last_active_at": 1700690400000} + application/json: {"last_active_at": 1700690400000, "legal_accepted_at": 1700690400000} "403": application/json: {"errors": []} SetUserProfileImage: @@ -1566,7 +1639,7 @@ examples: user_id: "" responses: "200": - application/json: {"last_active_at": 1700690400000} + application/json: {"last_active_at": 1700690400000, "legal_accepted_at": 1700690400000} "400": application/json: {"errors": [{"message": "", "long_message": "", "code": ""}]} DeleteUserProfileImage: @@ -1576,7 +1649,7 @@ examples: user_id: "" responses: "200": - application/json: {"last_active_at": 1700690400000} + application/json: {"last_active_at": 1700690400000, "legal_accepted_at": 1700690400000} "404": application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} UpdateUserMetadata: @@ -1586,7 +1659,7 @@ examples: user_id: "" responses: "200": - application/json: {"last_active_at": 1700690400000} + application/json: {"last_active_at": 1700690400000, "legal_accepted_at": 1700690400000} "400": application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} GetOAuthAccessToken: @@ -1854,14 +1927,14 @@ examples: speakeasy-default-list-organizations: responses: "200": - application/json: {"data": [{"object": "organization", "id": "", "name": "", "slug": "", "max_allowed_memberships": 783175, "created_at": 821525, "updated_at": 670307}, {"object": "organization", "id": "", "name": "", "slug": "", "max_allowed_memberships": 50684, "created_at": 111065, "updated_at": 133947}], "total_count": 288738} + application/json: {"data": [{"object": "organization", "id": "", "name": "", "slug": "", "max_allowed_memberships": 783175, "public_metadata": {"key": "", "key1": ""}, "private_metadata": {"key": "", "key1": "", "key2": ""}, "created_at": 821525, "updated_at": 670307}, {"object": "organization", "id": "", "name": "", "slug": "", "max_allowed_memberships": 50684, "public_metadata": {"key": "", "key1": "", "key2": ""}, "private_metadata": {"key": "", "key1": ""}, "created_at": 111065, "updated_at": 133947}], "total_count": 288738} "400": application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} CreateOrganization: speakeasy-default-create-organization: responses: "200": - application/json: {"object": "organization", "id": "", "name": "", "slug": "", "max_allowed_memberships": 57077, "created_at": 323854, "updated_at": 798540} + application/json: {"object": "organization", "id": "", "name": "", "slug": "", "max_allowed_memberships": 57077, "public_metadata": {}, "private_metadata": {"key": ""}, "created_at": 323854, "updated_at": 798540} "400": application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} GetOrganization: @@ -1869,9 +1942,10 @@ examples: parameters: path: organization_id: "" + query: {} responses: "200": - application/json: {"object": "organization", "id": "", "name": "", "slug": "", "max_allowed_memberships": 754735, "created_at": 750923, "updated_at": 871877} + application/json: {"object": "organization", "id": "", "name": "", "slug": "", "max_allowed_memberships": 754735, "public_metadata": {"key": "", "key1": "", "key2": ""}, "private_metadata": {"key": "", "key1": "", "key2": ""}, "created_at": 750923, "updated_at": 871877} "403": application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} UpdateOrganization: @@ -1881,7 +1955,7 @@ examples: organization_id: "" responses: "200": - application/json: {"object": "organization", "id": "", "name": "", "slug": "", "max_allowed_memberships": 524231, "created_at": 565012, "updated_at": 59099} + application/json: {"object": "organization", "id": "", "name": "", "slug": "", "max_allowed_memberships": 524231, "public_metadata": {"key": "", "key1": ""}, "private_metadata": {"key": "", "key1": ""}, "created_at": 565012, "updated_at": 59099} "402": application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} DeleteOrganization: @@ -1901,7 +1975,7 @@ examples: organization_id: "" responses: "200": - application/json: {"object": "organization", "id": "", "name": "", "slug": "", "max_allowed_memberships": 253408, "created_at": 598734, "updated_at": 850278} + application/json: {"object": "organization", "id": "", "name": "", "slug": "", "max_allowed_memberships": 253408, "public_metadata": {"key": ""}, "private_metadata": {"key": "", "key1": ""}, "created_at": 598734, "updated_at": 850278} "400": application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} UploadOrganizationLogo: @@ -1911,7 +1985,7 @@ examples: organization_id: "" responses: "200": - application/json: {"object": "organization", "id": "", "name": "", "slug": "", "max_allowed_memberships": 602729, "created_at": 452162, "updated_at": 416390, "image_url": "https://remarkable-replacement.name"} + application/json: {"object": "organization", "id": "", "name": "", "slug": "", "max_allowed_memberships": 602729, "public_metadata": {"key": "", "key1": ""}, "private_metadata": {"key": ""}, "created_at": 452162, "updated_at": 416390, "image_url": "https://remarkable-replacement.name"} "400": application/json: {"errors": [{"message": "", "long_message": "", "code": ""}]} DeleteOrganizationLogo: @@ -1921,7 +1995,7 @@ examples: organization_id: "" responses: "200": - application/json: {"object": "organization", "id": "", "name": "", "slug": "", "max_allowed_memberships": 514604, "created_at": 703303, "updated_at": 542013} + application/json: {"object": "organization", "id": "", "name": "", "slug": "", "max_allowed_memberships": 514604, "public_metadata": {"key": "", "key1": ""}, "private_metadata": {"key": "", "key1": ""}, "created_at": 703303, "updated_at": 542013} "404": application/json: {"errors": [{"message": "", "long_message": "", "code": ""}]} CreateOrganizationInvitation: @@ -1966,7 +2040,7 @@ examples: query: {} responses: "200": - application/json: {"total_count": 910782} + application/json: {"data": [], "total_count": 910782} "400": application/json: {"errors": [{"message": "", "long_message": "", "code": ""}]} GetOrganizationInvitation: @@ -2218,3 +2292,126 @@ examples: responses: "200": application/json: {"object": "testing_token", "token": "1713877200-c_2J2MvPu9PnXcuhbPZNao0LOXqK9A7YrnBn0HmIWxy", "expires_at": 1713880800} + UsersGetOrganizationInvitations: + speakeasy-default-users-get-organization-invitations: + parameters: + path: + user_id: "" + query: {} + responses: + "200": + application/json: {"total_count": 375907} + "400": + application/json: {"errors": [{"message": "", "long_message": "", "code": ""}]} + DeleteBackupCode: + speakeasy-default-delete-backup-code: + parameters: + path: + user_id: "" + responses: + "404": + application/json: {"errors": [{"message": "", "long_message": "", "code": ""}]} + UserPasskeyDelete: + speakeasy-default-user-passkey-delete: + parameters: + path: + user_id: "" + passkey_identification_id: "" + responses: + "200": + application/json: {"object": "", "deleted": true} + "403": + application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} + UserWeb3WalletDelete: + speakeasy-default-user-web3-wallet-delete: + parameters: + path: + user_id: "" + web3_wallet_identification_id: "" + responses: + "200": + application/json: {"object": "", "deleted": false} + "400": + application/json: {"errors": [{"message": "", "long_message": "", "code": ""}]} + CreateUserTOTP: + speakeasy-default-create-user-TOTP: + parameters: + path: + user_id: "" + responses: + "200": + application/json: {"key": "", "key1": ""} + "403": + application/json: {"errors": []} + DeleteTOTP: + speakeasy-default-delete-TOTP: + parameters: + path: + user_id: "" + responses: + "404": + application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} + DeleteExternalAccount: + speakeasy-default-delete-external-account: + parameters: + path: + user_id: "" + external_account_id: "" + responses: + "200": + application/json: {"object": "", "deleted": false} + "400": + application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} + ListInstanceOrganizationInvitations: + speakeasy-default-list-instance-organization-invitations: + responses: + "200": + application/json: {"total_count": 59215} + "400": + application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} + InstanceGetOrganizationMemberships: + speakeasy-default-instance-get-organization-memberships: + responses: + "200": + application/json: {"total_count": 59215} + "400": + application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} + CreateOrganizationDomain: + speakeasy-default-create-organization-domain: + parameters: + path: + organization_id: "" + responses: + "400": + application/json: {"errors": [{"message": "", "long_message": "", "code": ""}]} + ListOrganizationDomains: + speakeasy-default-list-organization-domains: + parameters: + path: + organization_id: "" + query: {} + responses: + "200": + application/json: {"total_count": 547272} + "401": + application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} + DeleteOrganizationDomain: + speakeasy-default-delete-organization-domain: + parameters: + path: + organization_id: "" + domain_id: "" + responses: + "200": + application/json: {"object": "", "deleted": false} + "400": + application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} + UpdateOrganizationDomain: + speakeasy-default-update-organization-domain: + parameters: + path: + organization_id: "" + domain_id: "" + responses: + "400": + application/json: {"errors": [{"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}, {"message": "", "long_message": "", "code": ""}]} diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index ca4829d..d0452b6 100755 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -12,7 +12,7 @@ generation: auth: oAuth2ClientCredentialsEnabled: false php: - version: 0.2.2 + version: 0.4.3 clientServerStatusCodesAsErrors: true flattenGlobalSecurity: true imports: diff --git a/.speakeasy/speakeasy-modifications-overlay.yaml b/.speakeasy/speakeasy-modifications-overlay.yaml new file mode 100644 index 0000000..08cce98 --- /dev/null +++ b/.speakeasy/speakeasy-modifications-overlay.yaml @@ -0,0 +1,875 @@ +overlay: 1.0.0 +info: + title: Speakeasy Suggestions - Clerk Backend API + version: 0.0.1 +actions: + - target: $["paths"]["/sign_in_tokens/{sign_in_token_id}/revoke"]["post"] + update: + x-speakeasy-group: signInTokens + x-speakeasy-name-override: revoke + x-speakeasy-metadata: + after: sdk.signInTokens.revoke() + before: sdk.Sign-in Tokens.RevokeSignInToken() + type: method-name + - target: $["paths"]["/users/{user_id}/web3_wallets/{web3_wallet_identification_id}"]["delete"] + update: + x-speakeasy-name-override: deleteWeb3Wallet + x-speakeasy-metadata: + after: sdk.users.deleteWeb3Wallet() + before: sdk.Users.UserWeb3WalletDelete() + type: method-name + - target: $["paths"]["/email_addresses/{email_address_id}"]["patch"] + update: + x-speakeasy-group: emailAddresses + x-speakeasy-name-override: update + x-speakeasy-metadata: + after: sdk.emailAddresses.update() + before: sdk.Email Addresses.UpdateEmailAddress() + type: method-name + - target: $["paths"]["/saml_connections/{saml_connection_id}"]["delete"] + update: + x-speakeasy-group: samlConnections + x-speakeasy-name-override: delete + x-speakeasy-metadata: + after: sdk.samlConnections.delete() + before: sdk.SAML Connections.DeleteSAMLConnection() + type: method-name + - target: $["paths"]["/jwks"]["get"] + update: + x-speakeasy-group: jwks + x-speakeasy-name-override: get + x-speakeasy-metadata: + after: sdk.jwks.get() + before: sdk.JWKS.GetJWKS() + type: method-name + - target: $["paths"]["/users/{user_id}"]["patch"] + update: + x-speakeasy-name-override: update + x-speakeasy-metadata: + after: sdk.users.update() + before: sdk.Users.UpdateUser() + type: method-name + - target: $["paths"]["/organizations/{organization_id}/invitations/pending"]["get"] + update: + x-speakeasy-group: organizationInvitations + x-speakeasy-name-override: listPending + x-speakeasy-metadata: + after: sdk.organizationInvitations.listPending() + before: sdk.Organization Invitations.ListPendingOrganizationInvitations() + type: method-name + - target: $["paths"]["/allowlist_identifiers"]["post"] + update: + x-speakeasy-group: allowlistBlocklist + x-speakeasy-metadata: + after: sdk.allowlistBlocklist.createAllowlistIdentifier() + before: sdk.Allow-list / Block-list.CreateAllowlistIdentifier() + type: method-name + - target: $["paths"]["/sessions/{session_id}"]["get"] + update: + x-speakeasy-name-override: get + x-speakeasy-metadata: + after: sdk.sessions.get() + before: sdk.Sessions.GetSession() + type: method-name + - target: $["paths"]["/redirect_urls/{id}"]["get"] + update: + x-speakeasy-group: redirectUrls + x-speakeasy-name-override: get + x-speakeasy-metadata: + after: sdk.redirectUrls.get() + before: sdk.Redirect URLs.GetRedirectURL() + type: method-name + - target: $["paths"]["/users/{user_id}/unlock"]["post"] + update: + x-speakeasy-name-override: unlock + x-speakeasy-metadata: + after: sdk.users.unlock() + before: sdk.Users.UnlockUser() + type: method-name + - target: $["paths"]["/invitations/{invitation_id}/revoke"]["post"] + update: + x-speakeasy-name-override: revoke + x-speakeasy-metadata: + after: sdk.invitations.revoke() + before: sdk.Invitations.RevokeInvitation() + type: method-name + - target: $["paths"]["/clients"]["get"] + update: + x-speakeasy-name-override: list + x-speakeasy-metadata: + after: sdk.clients.list() + before: sdk.Clients.GetClientList() + type: method-name + - target: $["paths"]["/organizations/{organization_id}/invitations/{invitation_id}/revoke"]["post"] + update: + x-speakeasy-group: organizationInvitations + x-speakeasy-name-override: revoke + x-speakeasy-metadata: + after: sdk.organizationInvitations.revoke() + before: sdk.Organization Invitations.RevokeOrganizationInvitation() + type: method-name + - target: $["paths"]["/invitations"]["get"] + update: + x-speakeasy-name-override: list + x-speakeasy-metadata: + after: sdk.invitations.list() + before: sdk.Invitations.ListInvitations() + type: method-name + - target: $["paths"]["/oauth_applications/{oauth_application_id}"]["patch"] + update: + x-speakeasy-group: oauthApplications + x-speakeasy-name-override: update + x-speakeasy-metadata: + after: sdk.oauthApplications.update() + before: sdk.OAuth Applications.UpdateOAuthApplication() + type: method-name + - target: $["paths"]["/oauth_applications/{oauth_application_id}"]["get"] + update: + x-speakeasy-group: oauthApplications + x-speakeasy-name-override: get + x-speakeasy-metadata: + after: sdk.oauthApplications.get() + before: sdk.OAuth Applications.GetOAuthApplication() + type: method-name + - target: $["paths"]["/users/{user_id}/lock"]["post"] + update: + x-speakeasy-name-override: lock + x-speakeasy-metadata: + after: sdk.users.lock() + before: sdk.Users.LockUser() + type: method-name + - target: $["paths"]["/saml_connections/{saml_connection_id}"]["get"] + update: + x-speakeasy-group: samlConnections + x-speakeasy-name-override: get + x-speakeasy-metadata: + after: sdk.samlConnections.get() + before: sdk.SAML Connections.GetSAMLConnection() + type: method-name + - target: $["paths"]["/beta_features/domain"]["put"] + update: + x-speakeasy-group: betaFeatures + x-speakeasy-name-override: updateDomain + x-speakeasy-metadata: + after: sdk.betaFeatures.updateDomain() + before: sdk.Beta Features.UpdateProductionInstanceDomain() + type: method-name + - target: $["paths"]["/organizations/{organization_id}/metadata"]["patch"] + update: + x-speakeasy-name-override: mergeMetadata + x-speakeasy-metadata: + after: sdk.organizations.mergeMetadata() + before: sdk.Organizations.MergeOrganizationMetadata() + type: method-name + - target: $["paths"]["/users/{user_id}/totp"]["delete"] + update: + x-speakeasy-name-override: deleteTotp + x-speakeasy-metadata: + after: sdk.users.deleteTotp() + before: sdk.Users.DeleteTOTP() + type: method-name + - target: $["paths"]["/allowlist_identifiers"]["get"] + update: + x-speakeasy-group: allowlistBlocklist + x-speakeasy-metadata: + after: sdk.allowlistBlocklist.listAllowlistIdentifiers() + before: sdk.Allow-list / Block-list.ListAllowlistIdentifiers() + type: method-name + - target: $["paths"]["/sign_in_tokens"]["post"] + update: + x-speakeasy-group: signInTokens + x-speakeasy-name-override: create + x-speakeasy-metadata: + after: sdk.signInTokens.create() + before: sdk.Sign-in Tokens.CreateSignInToken() + type: method-name + - target: $["paths"]["/phone_numbers/{phone_number_id}"]["patch"] + update: + x-speakeasy-group: phoneNumbers + x-speakeasy-name-override: update + x-speakeasy-metadata: + after: sdk.phoneNumbers.update() + before: sdk.Phone Numbers.UpdatePhoneNumber() + type: method-name + - target: $["paths"]["/beta_features/instance_settings"]["patch"] + update: + x-speakeasy-group: betaFeatures + x-speakeasy-name-override: updateInstanceSettings + x-speakeasy-metadata: + after: sdk.betaFeatures.updateInstanceSettings() + before: sdk.Beta Features.UpdateInstanceAuthConfig() + type: method-name + - target: $["paths"]["/organizations/{organization_id}"]["delete"] + update: + x-speakeasy-name-override: delete + x-speakeasy-metadata: + after: sdk.organizations.delete() + before: sdk.Organizations.DeleteOrganization() + type: method-name + - target: $["paths"]["/organizations/{organization_id}/memberships/{user_id}/metadata"]["patch"] + update: + x-speakeasy-group: organizationMemberships + x-speakeasy-name-override: updateMetadata + x-speakeasy-metadata: + after: sdk.organizationMemberships.updateMetadata() + before: sdk.Organization Memberships.UpdateOrganizationMembershipMetadata() + type: method-name + - target: $["paths"]["/proxy_checks"]["post"] + update: + x-speakeasy-group: proxyChecks + x-speakeasy-name-override: verify + x-speakeasy-metadata: + after: sdk.proxyChecks.verify() + before: sdk.Proxy checks.VerifyDomainProxy() + type: method-name + - target: $["paths"]["/organizations/{organization_id}/domains/{domain_id}"]["patch"] + update: + x-speakeasy-group: organizationDomain + x-speakeasy-name-override: update + x-speakeasy-metadata: + after: sdk.organizationDomain.update() + before: sdk.Organization Domain.UpdateOrganizationDomain() + type: method-name + - target: $["paths"]["/sign_ups/{id}"]["patch"] + update: + x-speakeasy-group: signUps + x-speakeasy-name-override: update + x-speakeasy-metadata: + after: sdk.signUps.update() + before: sdk.Sign-ups.UpdateSignUp() + type: method-name + - target: $["paths"]["/jwt_templates/{template_id}"]["get"] + update: + x-speakeasy-group: jwtTemplates + x-speakeasy-name-override: get + x-speakeasy-metadata: + after: sdk.jwtTemplates.get() + before: sdk.JWT Templates.GetJWTTemplate() + type: method-name + - target: $["paths"]["/phone_numbers"]["post"] + update: + x-speakeasy-group: phoneNumbers + x-speakeasy-name-override: create + x-speakeasy-metadata: + after: sdk.phoneNumbers.create() + before: sdk.Phone Numbers.CreatePhoneNumber() + type: method-name + - target: $["paths"]["/actor_tokens/{actor_token_id}/revoke"]["post"] + update: + x-speakeasy-name-override: revoke + x-speakeasy-group: actorTokens + x-speakeasy-metadata: + after: sdk.actorTokens.revoke() + before: sdk.Actor Tokens.RevokeActorToken() + type: method-name + - target: $["paths"]["/organizations/{organization_id}/memberships"]["get"] + update: + x-speakeasy-group: organizationMemberships + x-speakeasy-name-override: list + x-speakeasy-metadata: + after: sdk.organizationMemberships.list() + before: sdk.Organization Memberships.ListOrganizationMemberships() + type: method-name + - target: $["paths"]["/users/{user_id}"]["get"] + update: + x-speakeasy-name-override: get + x-speakeasy-metadata: + after: sdk.users.get() + before: sdk.Users.GetUser() + type: method-name + - target: $["paths"]["/sessions/{session_id}/verify"]["post"] + update: + x-speakeasy-name-override: verify + x-speakeasy-metadata: + after: sdk.sessions.verify() + before: sdk.Sessions.VerifySession() + type: method-name + - target: $["paths"]["/organization_invitations"]["get"] + update: + x-speakeasy-group: organizationInvitations + x-speakeasy-name-override: getAll + x-speakeasy-metadata: + after: sdk.organizationInvitations.getAll() + before: sdk.Organization Invitations.ListInstanceOrganizationInvitations() + type: method-name + - target: $["paths"]["/oauth_applications/{oauth_application_id}"]["delete"] + update: + x-speakeasy-group: oauthApplications + x-speakeasy-name-override: delete + x-speakeasy-metadata: + after: sdk.oauthApplications.delete() + before: sdk.OAuth Applications.DeleteOAuthApplication() + type: method-name + - target: $["paths"]["/saml_connections"]["post"] + update: + x-speakeasy-group: samlConnections + x-speakeasy-name-override: create + x-speakeasy-metadata: + after: sdk.samlConnections.create() + before: sdk.SAML Connections.CreateSAMLConnection() + type: method-name + - target: $["paths"]["/sessions"]["get"] + update: + x-speakeasy-name-override: list + x-speakeasy-metadata: + after: sdk.sessions.list() + before: sdk.Sessions.GetSessionList() + type: method-name + - target: $["paths"]["/invitations"]["post"] + update: + x-speakeasy-name-override: create + x-speakeasy-metadata: + after: sdk.invitations.create() + before: sdk.Invitations.CreateInvitation() + type: method-name + - target: $["paths"]["/redirect_urls"]["get"] + update: + x-speakeasy-group: redirectURLs + x-speakeasy-name-override: list + x-speakeasy-metadata: + after: sdk.redirectURLs.list() + before: sdk.Redirect URLs.ListRedirectURLs() + type: method-name + - target: $["paths"]["/organizations/{organization_id}/domains/{domain_id}"]["delete"] + update: + x-speakeasy-group: organizationDomains + x-speakeasy-name-override: delete + x-speakeasy-metadata: + after: sdk.organizationDomains.delete() + before: sdk.Organization Domains.DeleteOrganizationDomain() + type: method-name + - target: $["paths"]["/oauth_applications"]["get"] + update: + x-speakeasy-group: oauthApplications + x-speakeasy-name-override: list + x-speakeasy-metadata: + after: sdk.oauthApplications.list() + before: sdk.OAuth Applications.ListOAuthApplications() + type: method-name + - target: $["paths"]["/domains"]["get"] + update: + x-speakeasy-name-override: list + x-speakeasy-metadata: + after: sdk.domains.list() + before: sdk.Domains.ListDomains() + type: method-name + - target: $["paths"]["/jwt_templates"]["get"] + update: + x-speakeasy-group: jwtTemplates + x-speakeasy-name-override: list + x-speakeasy-metadata: + after: sdk.jwtTemplates.list() + before: sdk.JWT Templates.ListJWTTemplates() + type: method-name + - target: $["paths"]["/users/{user_id}/totp"]["post"] + update: + x-speakeasy-name-override: createTOTP + x-speakeasy-metadata: + after: sdk.users.createTOTP() + before: sdk.Users.CreateUserTOTP() + type: method-name + - target: $["paths"]["/organizations"]["get"] + update: + x-speakeasy-name-override: list + x-speakeasy-metadata: + after: sdk.organizations.list() + before: sdk.Organizations.ListOrganizations() + type: method-name + - target: $["paths"]["/organizations/{organization_id}/domains"]["post"] + update: + x-speakeasy-name-override: create + x-speakeasy-group: organizationDomains + x-speakeasy-metadata: + after: sdk.organizationDomains.create() + before: sdk.Organization Domains.CreateOrganizationDomain() + type: method-name + - target: $["paths"]["/blocklist_identifiers"]["get"] + update: + x-speakeasy-name-override: list + x-speakeasy-group: blocklistIdentifiers + x-speakeasy-metadata: + after: sdk.blocklistIdentifiers.list() + before: sdk.Allow-list / Block-list.ListBlocklistIdentifiers() + type: method-name + - target: $["paths"]["/public/interstitial"]["get"] + update: + x-speakeasy-name-override: getInterstitial + x-speakeasy-metadata: + after: sdk.miscellaneous.getInterstitial() + before: sdk.Miscellaneous.GetPublicInterstitial() + type: method-name + - target: $["paths"]["/organizations/{organization_id}/logo"]["put"] + update: + x-speakeasy-name-override: uploadLogo + x-speakeasy-metadata: + after: sdk.organizations.uploadLogo() + before: sdk.Organizations.UploadOrganizationLogo() + type: method-name + - target: $["paths"]["/clients/verify"]["post"] + update: + x-speakeasy-name-override: verify + x-speakeasy-metadata: + after: sdk.clients.verify() + before: sdk.Clients.VerifyClient() + type: method-name + - target: $["paths"]["/instance/change_domain"]["post"] + update: + x-speakeasy-group: betaFeatures + x-speakeasy-metadata: + after: sdk.betaFeatures.changeProductionInstanceDomain() + before: sdk.Beta Features.ChangeProductionInstanceDomain() + type: method-name + - target: $["paths"]["/users/{user_id}/profile_image"]["delete"] + update: + x-speakeasy-name-override: deleteProfileImage + x-speakeasy-metadata: + after: sdk.users.deleteProfileImage() + before: sdk.Users.DeleteUserProfileImage() + type: method-name + - target: $["paths"]["/sessions/{session_id}/tokens/{template_name}"]["post"] + update: + x-speakeasy-name-override: createTokenFromTemplate + x-speakeasy-metadata: + after: sdk.sessions.createTokenFromTemplate() + before: sdk.Sessions.CreateSessionTokenFromTemplate() + type: method-name + - target: $["paths"]["/email_addresses/{email_address_id}"]["get"] + update: + x-speakeasy-group: emailAddresses + x-speakeasy-name-override: get + x-speakeasy-metadata: + after: sdk.emailAddresses.get() + before: sdk.Email Addresses.GetEmailAddress() + type: method-name + - target: $["paths"]["/users/{user_id}/passkeys/{passkey_identification_id}"]["delete"] + update: + x-speakeasy-name-override: deletePasskey + x-speakeasy-metadata: + after: sdk.users.deletePasskey() + before: sdk.Users.UserPasskeyDelete() + type: method-name + - target: $["paths"]["/organizations/{organization_id}/invitations"]["get"] + update: + x-speakeasy-group: organizationInvitations + x-speakeasy-name-override: list + x-speakeasy-metadata: + after: sdk.organizationInvitations.list() + before: sdk.Organization Invitations.ListOrganizationInvitations() + type: method-name + - target: $["paths"]["/organizations"]["post"] + update: + x-speakeasy-name-override: create + x-speakeasy-metadata: + after: sdk.organizations.create() + before: sdk.Organizations.CreateOrganization() + type: method-name + - target: $["paths"]["/domains"]["post"] + update: + x-speakeasy-name-override: add + x-speakeasy-metadata: + after: sdk.domains.add() + before: sdk.Domains.AddDomain() + type: method-name + - target: $["paths"]["/domains/{domain_id}"]["patch"] + update: + x-speakeasy-name-override: update + x-speakeasy-metadata: + after: sdk.domains.update() + before: sdk.Domains.UpdateDomain() + type: method-name + - target: $["paths"]["/organizations/{organization_id}/invitations/bulk"]["post"] + update: + x-speakeasy-group: organizationInvitations + x-speakeasy-name-override: bulkCreate + x-speakeasy-metadata: + after: sdk.organizationInvitations.bulkCreate() + before: sdk.Organization Invitations.CreateOrganizationInvitationBulk() + type: method-name + - target: $["paths"]["/jwt_templates/{template_id}"]["patch"] + update: + x-speakeasy-group: jwtTemplates + x-speakeasy-name-override: update + x-speakeasy-metadata: + after: sdk.jwtTemplates.update() + before: sdk.JWT Templates.UpdateJWTTemplate() + type: method-name + - target: $["paths"]["/organizations/{organization_id}/invitations"]["post"] + update: + x-speakeasy-group: organizationInvitations + x-speakeasy-name-override: create + x-speakeasy-metadata: + after: sdk.organizationInvitations.create() + before: sdk.Organization Invitations.CreateOrganizationInvitation() + type: method-name + - target: $["paths"]["/oauth_applications/{oauth_application_id}/rotate_secret"]["post"] + update: + x-speakeasy-group: oauthApplications + x-speakeasy-name-override: rotateSecret + x-speakeasy-metadata: + after: sdk.oauthApplications.rotateSecret() + before: sdk.OAuth Applications.RotateOAuthApplicationSecret() + type: method-name + - target: $["paths"]["/allowlist_identifiers/{identifier_id}"]["delete"] + update: + x-speakeasy-group: allowlistIdentifiers + x-speakeasy-name-override: delete + x-speakeasy-metadata: + after: sdk.allowlistIdentifiers.delete() + before: sdk.Allow-list / Block-list.DeleteAllowlistIdentifier() + type: method-name + - target: $["paths"]["/templates/{template_type}/{slug}/toggle_delivery"]["post"] + update: + x-speakeasy-group: emailSmsTemplates + x-speakeasy-metadata: + after: sdk.emailSmsTemplates.toggleTemplateDelivery() + before: sdk.Email & SMS Templates.ToggleTemplateDelivery() + type: method-name + - target: $["paths"]["/organizations/{organization_id}"]["patch"] + update: + x-speakeasy-name-override: update + x-speakeasy-metadata: + after: sdk.organizations.update() + before: sdk.Organizations.UpdateOrganization() + type: method-name + - target: $["paths"]["/domains/{domain_id}"]["delete"] + update: + x-speakeasy-name-override: delete + x-speakeasy-metadata: + after: sdk.domains.delete() + before: sdk.Domains.DeleteDomain() + type: method-name + - target: $["paths"]["/redirect_urls"]["post"] + update: + x-speakeasy-group: redirectUrls + x-speakeasy-name-override: create + x-speakeasy-metadata: + after: sdk.redirectUrls.create() + before: sdk.Redirect URLs.CreateRedirectURL() + type: method-name + - target: $["paths"]["/blocklist_identifiers"]["post"] + update: + x-speakeasy-group: allowlistBlocklist + x-speakeasy-metadata: + after: sdk.allowlistBlocklist.createBlocklistIdentifier() + before: sdk.Allow-list / Block-list.CreateBlocklistIdentifier() + type: method-name + - target: $["paths"]["/users"]["post"] + update: + x-speakeasy-name-override: create + x-speakeasy-metadata: + after: sdk.users.create() + before: sdk.Users.CreateUser() + type: method-name + - target: $["paths"]["/clients/{client_id}"]["get"] + update: + x-speakeasy-name-override: get + x-speakeasy-metadata: + after: sdk.clients.get() + before: sdk.Clients.GetClient() + type: method-name + - target: $["paths"]["/jwt_templates/{template_id}"]["delete"] + update: + x-speakeasy-group: jwtTemplates + x-speakeasy-name-override: delete + x-speakeasy-metadata: + after: sdk.jwtTemplates.delete() + before: sdk.JWT Templates.DeleteJWTTemplate() + type: method-name + - target: $["paths"]["/actor_tokens"]["post"] + update: + x-speakeasy-group: actorTokens + x-speakeasy-name-override: create + x-speakeasy-metadata: + after: sdk.actorTokens.create() + before: sdk.Actor Tokens.CreateActorToken() + type: method-name + - target: $["paths"]["/organizations/{organization_id}/invitations/{invitation_id}"]["get"] + update: + x-speakeasy-group: organizationInvitations + x-speakeasy-name-override: get + x-speakeasy-metadata: + after: sdk.organizationInvitations.get() + before: sdk.Organization Invitations.GetOrganizationInvitation() + type: method-name + - target: $["paths"]["/organization_memberships"]["get"] + update: + x-speakeasy-group: organizationMemberships + x-speakeasy-name-override: getAll + x-speakeasy-metadata: + after: sdk.organizationMemberships.getAll() + before: sdk.Organization Memberships.InstanceGetOrganizationMemberships() + type: method-name + - target: $["paths"]["/templates/{template_type}/{slug}/preview"]["post"] + update: + x-speakeasy-group: templates + x-speakeasy-name-override: preview + x-speakeasy-metadata: + after: sdk.templates.preview() + before: sdk.Email & SMS Templates.PreviewTemplate() + type: method-name + - target: $["paths"]["/templates/{template_type}/{slug}"]["get"] + update: + x-speakeasy-group: emailSmsTemplates + x-speakeasy-name-override: get + x-speakeasy-metadata: + after: sdk.emailSmsTemplates.get() + before: sdk.Email & SMS Templates.GetTemplate() + type: method-name + - target: $["paths"]["/templates/{template_type}/{slug}/revert"]["post"] + update: + x-speakeasy-group: emailSMSTemplates + x-speakeasy-name-override: revert + x-speakeasy-metadata: + after: sdk.emailSMSTemplates.revert() + before: sdk.Email & SMS Templates.RevertTemplate() + type: method-name + - target: $["paths"]["/users/{user_id}/organization_invitations"]["get"] + update: + x-speakeasy-name-override: getOrganizationInvitations + x-speakeasy-metadata: + after: sdk.users.getOrganizationInvitations() + before: sdk.Users.UsersGetOrganizationInvitations() + type: method-name + - target: $["paths"]["/organizations/{organization_id}/memberships/{user_id}"]["delete"] + update: + x-speakeasy-group: organizationMemberships + x-speakeasy-name-override: delete + x-speakeasy-metadata: + after: sdk.organizationMemberships.delete() + before: sdk.Organization Memberships.DeleteOrganizationMembership() + type: method-name + - target: $["paths"]["/users/{user_id}"]["delete"] + update: + x-speakeasy-name-override: delete + x-speakeasy-metadata: + after: sdk.users.delete() + before: sdk.Users.DeleteUser() + type: method-name + - target: $["paths"]["/phone_numbers/{phone_number_id}"]["delete"] + update: + x-speakeasy-group: phoneNumbers + x-speakeasy-name-override: delete + x-speakeasy-metadata: + after: sdk.phoneNumbers.delete() + before: sdk.Phone Numbers.DeletePhoneNumber() + type: method-name + - target: $["paths"]["/users/{user_id}/ban"]["post"] + update: + x-speakeasy-name-override: ban + x-speakeasy-metadata: + after: sdk.users.ban() + before: sdk.Users.BanUser() + type: method-name + - target: $["paths"]["/saml_connections"]["get"] + update: + x-speakeasy-group: samlConnections + x-speakeasy-name-override: list + x-speakeasy-metadata: + after: sdk.samlConnections.list() + before: sdk.SAML Connections.ListSAMLConnections() + type: method-name + - target: $["paths"]["/users/{user_id}/organization_memberships"]["get"] + update: + x-speakeasy-name-override: getOrganizationMemberships + x-speakeasy-metadata: + after: sdk.users.getOrganizationMemberships() + before: sdk.Users.UsersGetOrganizationMemberships() + type: method-name + - target: $["paths"]["/users/count"]["get"] + update: + x-speakeasy-name-override: count + x-speakeasy-metadata: + after: sdk.users.count() + before: sdk.Users.GetUsersCount() + type: method-name + - target: $["paths"]["/users/{user_id}/unban"]["post"] + update: + x-speakeasy-name-override: unban + x-speakeasy-metadata: + after: sdk.users.unban() + before: sdk.Users.UnbanUser() + type: method-name + - target: $["paths"]["/organizations/{organization_id}/logo"]["delete"] + update: + x-speakeasy-name-override: deleteLogo + x-speakeasy-metadata: + after: sdk.organizations.deleteLogo() + before: sdk.Organizations.DeleteOrganizationLogo() + type: method-name + - target: $["paths"]["/jwt_templates"]["post"] + update: + x-speakeasy-group: jwtTemplates + x-speakeasy-name-override: create + x-speakeasy-metadata: + after: sdk.jwtTemplates.create() + before: sdk.JWT Templates.CreateJWTTemplate() + type: method-name + - target: $["paths"]["/users"]["get"] + update: + x-speakeasy-name-override: list + x-speakeasy-metadata: + after: sdk.users.list() + before: sdk.Users.GetUserList() + type: method-name + - target: $["paths"]["/templates/{template_type}/{slug}"]["put"] + update: + x-speakeasy-name-override: upsert + x-speakeasy-group: emailAndSmsTemplates + x-speakeasy-metadata: + after: sdk.emailAndSmsTemplates.upsert() + before: sdk.Email & SMS Templates.UpsertTemplate() + type: method-name + - target: $["paths"]["/instance/organization_settings"]["patch"] + update: + x-speakeasy-group: instanceSettings + x-speakeasy-name-override: updateOrganizationSettings + x-speakeasy-metadata: + after: sdk.instanceSettings.updateOrganizationSettings() + before: sdk.Instance Settings.UpdateInstanceOrganizationSettings() + type: method-name + - target: $["paths"]["/organizations/{organization_id}/memberships/{user_id}"]["patch"] + update: + x-speakeasy-group: organizationMemberships + x-speakeasy-name-override: update + x-speakeasy-metadata: + after: sdk.organizationMemberships.update() + before: sdk.Organization Memberships.UpdateOrganizationMembership() + type: method-name + - target: $["paths"]["/saml_connections/{saml_connection_id}"]["patch"] + update: + x-speakeasy-group: samlConnections + x-speakeasy-name-override: update + x-speakeasy-metadata: + after: sdk.samlConnections.update() + before: sdk.SAML Connections.UpdateSAMLConnection() + type: method-name + - target: $["paths"]["/email_addresses/{email_address_id}"]["delete"] + update: + x-speakeasy-group: emailAddresses + x-speakeasy-name-override: delete + x-speakeasy-metadata: + after: sdk.emailAddresses.delete() + before: sdk.Email Addresses.DeleteEmailAddress() + type: method-name + - target: $["paths"]["/oauth_applications"]["post"] + update: + x-speakeasy-group: oauthApplications + x-speakeasy-name-override: create + x-speakeasy-metadata: + after: sdk.oauthApplications.create() + before: sdk.OAuth Applications.CreateOAuthApplication() + type: method-name + - target: $["paths"]["/users/{user_id}/metadata"]["patch"] + update: + x-speakeasy-name-override: updateMetadata + x-speakeasy-metadata: + after: sdk.users.updateMetadata() + before: sdk.Users.UpdateUserMetadata() + type: method-name + - target: $["paths"]["/organizations/{organization_id}/domains"]["get"] + update: + x-speakeasy-group: organizationDomains + x-speakeasy-name-override: list + x-speakeasy-metadata: + after: sdk.organizationDomains.list() + before: sdk.Organization Domains.ListOrganizationDomains() + type: method-name + - target: $["paths"]["/templates/{template_type}"]["get"] + update: + x-speakeasy-group: emailSMSTemplates + x-speakeasy-name-override: list + x-speakeasy-metadata: + after: sdk.emailSMSTemplates.list() + before: sdk.Email & SMS Templates.GetTemplateList() + type: method-name + - target: $["paths"]["/instance"]["patch"] + update: + x-speakeasy-group: instanceSettings + x-speakeasy-name-override: update + x-speakeasy-metadata: + after: sdk.instanceSettings.update() + before: sdk.Instance Settings.UpdateInstance() + type: method-name + - target: $["paths"]["/organizations/{organization_id}"]["get"] + update: + x-speakeasy-name-override: get + x-speakeasy-metadata: + after: sdk.organizations.get() + before: sdk.Organizations.GetOrganization() + type: method-name + - target: $["paths"]["/users/{user_id}/backup_code"]["delete"] + update: + x-speakeasy-name-override: deleteBackupCodes + x-speakeasy-metadata: + after: sdk.users.deleteBackupCodes() + before: sdk.Users.DeleteBackupCode() + type: method-name + - target: $["paths"]["/organizations/{organization_id}/memberships"]["post"] + update: + x-speakeasy-group: organizationMemberships + x-speakeasy-name-override: create + x-speakeasy-metadata: + after: sdk.organizationMemberships.create() + before: sdk.Organization Memberships.CreateOrganizationMembership() + type: method-name + - target: $["paths"]["/users/{user_id}/profile_image"]["post"] + update: + x-speakeasy-name-override: setProfileImage + x-speakeasy-metadata: + after: sdk.users.setProfileImage() + before: sdk.Users.SetUserProfileImage() + type: method-name + - target: $["paths"]["/phone_numbers/{phone_number_id}"]["get"] + update: + x-speakeasy-group: phoneNumbers + x-speakeasy-name-override: get + x-speakeasy-metadata: + after: sdk.phoneNumbers.get() + before: sdk.Phone Numbers.GetPhoneNumber() + type: method-name + - target: $["paths"]["/sessions/{session_id}/revoke"]["post"] + update: + x-speakeasy-name-override: revoke + x-speakeasy-metadata: + after: sdk.sessions.revoke() + before: sdk.Sessions.RevokeSession() + type: method-name + - target: $["paths"]["/blocklist_identifiers/{identifier_id}"]["delete"] + update: + x-speakeasy-group: allowlistBlocklist + x-speakeasy-metadata: + after: sdk.allowlistBlocklist.deleteBlocklistIdentifier() + before: sdk.Allow-list / Block-list.DeleteBlocklistIdentifier() + type: method-name + - target: $["paths"]["/email_addresses"]["post"] + update: + x-speakeasy-group: emailAddresses + x-speakeasy-name-override: create + x-speakeasy-metadata: + after: sdk.emailAddresses.create() + before: sdk.Email Addresses.CreateEmailAddress() + type: method-name + - target: $["paths"]["/redirect_urls/{id}"]["delete"] + update: + x-speakeasy-group: redirectUrls + x-speakeasy-name-override: delete + x-speakeasy-metadata: + after: sdk.redirectUrls.delete() + before: sdk.Redirect URLs.DeleteRedirectURL() + type: method-name + - target: $["paths"]["/testing_tokens"]["post"] + update: + x-speakeasy-group: testingTokens + x-speakeasy-name-override: create + x-speakeasy-metadata: + after: sdk.testingTokens.create() + before: sdk.Testing Tokens.CreateTestingToken() + type: method-name + - target: $["paths"]["/instance/restrictions"]["patch"] + update: + x-speakeasy-group: instanceSettings + x-speakeasy-name-override: updateRestrictions + x-speakeasy-metadata: + after: sdk.instanceSettings.updateRestrictions() + before: sdk.Instance Settings.UpdateInstanceRestrictions() + type: method-name diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index b31dda1..091ac69 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -2,8 +2,8 @@ speakeasyVersion: 1.424.0 sources: backend-php: sourceNamespace: clerk-openapi - sourceRevisionDigest: sha256:38c16a932d47d12617f45050c406209cc527f1e669f6f93f697afd34dd65215a - sourceBlobDigest: sha256:a1fe6e2b6b88ebb94a1ed12cf3aa9acf83572460a5f825e8af217a692289a9f2 + sourceRevisionDigest: sha256:169c504bc2d18b714b0b25ba6a298e44fcffe410f57f67b79655caa77903ae46 + sourceBlobDigest: sha256:0f35ae2775626b1ee887189f9d4f3007b57a9de47d326a36081317039ceeb348 tags: - latest clerk-backend-php: @@ -12,14 +12,18 @@ sources: sourceBlobDigest: sha256:a1fe6e2b6b88ebb94a1ed12cf3aa9acf83572460a5f825e8af217a692289a9f2 tags: - latest + clerk-openapi: + sourceNamespace: clerk-openapi + sourceRevisionDigest: sha256:4b309982d724961b5d616de53670c4e83100396c683dd24e6887b0a1d9492caa + sourceBlobDigest: sha256:39103d5b007f360c879775cfb2ac02ea4b9c4537111da30a45fc8f84d5d51af9 + tags: + - latest targets: clerk-php: - source: backend-php + source: clerk-openapi sourceNamespace: clerk-openapi - sourceRevisionDigest: sha256:38c16a932d47d12617f45050c406209cc527f1e669f6f93f697afd34dd65215a - sourceBlobDigest: sha256:a1fe6e2b6b88ebb94a1ed12cf3aa9acf83572460a5f825e8af217a692289a9f2 - codeSamplesNamespace: clerk-openapi-code-samples - codeSamplesRevisionDigest: sha256:3dbc85e81ffa6788bc7471cb2daa04aab0ebfb9fabf3c81f6ec0b7199887991e + sourceRevisionDigest: sha256:4b309982d724961b5d616de53670c4e83100396c683dd24e6887b0a1d9492caa + sourceBlobDigest: sha256:39103d5b007f360c879775cfb2ac02ea4b9c4537111da30a45fc8f84d5d51af9 my-first-target: source: clerk-backend-php sourceNamespace: clerk-openapi @@ -29,15 +33,19 @@ workflow: workflowVersion: 1.0.0 speakeasyVersion: latest sources: - backend-php: + clerk-openapi: inputs: - - location: ./openapi.json + - location: https://raw.githubusercontent.com/clerk/openapi-specs/refs/heads/main/bapi/2021-02-05.yml + overlays: + - location: ./.speakeasy/fixes.yaml + - location: .speakeasy/speakeasy-modifications-overlay.yaml registry: location: registry.speakeasyapi.dev/clerk/clerk/clerk-openapi targets: clerk-php: target: php - source: backend-php + source: clerk-openapi + output: . publish: packagist: username: clerkinc diff --git a/.speakeasy/workflow.yaml b/.speakeasy/workflow.yaml index a1d59c0..e056cc8 100644 --- a/.speakeasy/workflow.yaml +++ b/.speakeasy/workflow.yaml @@ -1,15 +1,19 @@ workflowVersion: 1.0.0 speakeasyVersion: latest sources: - backend-php: + clerk-openapi: inputs: - - location: ./openapi.json + - location: https://raw.githubusercontent.com/clerk/openapi-specs/refs/heads/main/bapi/2021-02-05.yml + overlays: + - location: ./.speakeasy/fixes.yaml + - location: .speakeasy/speakeasy-modifications-overlay.yaml registry: location: registry.speakeasyapi.dev/clerk/clerk/clerk-openapi targets: clerk-php: target: php - source: backend-php + source: clerk-openapi + output: . publish: packagist: username: clerkinc diff --git a/README.md b/README.md index 0bc4285..7df88f5 100644 --- a/README.md +++ b/README.md @@ -56,186 +56,220 @@ CLERK_SECRET_KEY=sk_****** ### [actorTokens](docs/sdks/actortokens/README.md) -* [createActorToken](docs/sdks/actortokens/README.md#createactortoken) - Create actor token -* [revokeActorToken](docs/sdks/actortokens/README.md#revokeactortoken) - Revoke actor token +* [create](docs/sdks/actortokens/README.md#create) - Create actor token +* [revoke](docs/sdks/actortokens/README.md#revoke) - Revoke actor token -### [allowListBlockList](docs/sdks/allowlistblocklist/README.md) +### [allowlistBlocklist](docs/sdks/allowlistblocklist/README.md) * [listAllowlistIdentifiers](docs/sdks/allowlistblocklist/README.md#listallowlistidentifiers) - List all identifiers on the allow-list * [createAllowlistIdentifier](docs/sdks/allowlistblocklist/README.md#createallowlistidentifier) - Add identifier to the allow-list -* [deleteAllowlistIdentifier](docs/sdks/allowlistblocklist/README.md#deleteallowlistidentifier) - Delete identifier from allow-list -* [listBlocklistIdentifiers](docs/sdks/allowlistblocklist/README.md#listblocklistidentifiers) - List all identifiers on the block-list * [createBlocklistIdentifier](docs/sdks/allowlistblocklist/README.md#createblocklistidentifier) - Add identifier to the block-list * [deleteBlocklistIdentifier](docs/sdks/allowlistblocklist/README.md#deleteblocklistidentifier) - Delete identifier from block-list +### [allowlistIdentifiers](docs/sdks/allowlistidentifiers/README.md) + +* [delete](docs/sdks/allowlistidentifiers/README.md#delete) - Delete identifier from allow-list + ### [betaFeatures](docs/sdks/betafeatures/README.md) -* [updateInstanceAuthConfig](docs/sdks/betafeatures/README.md#updateinstanceauthconfig) - Update instance settings -* [~~updateProductionInstanceDomain~~](docs/sdks/betafeatures/README.md#updateproductioninstancedomain) - Update production instance domain :warning: **Deprecated** +* [updateInstanceSettings](docs/sdks/betafeatures/README.md#updateinstancesettings) - Update instance settings +* [~~updateDomain~~](docs/sdks/betafeatures/README.md#updatedomain) - Update production instance domain :warning: **Deprecated** * [changeProductionInstanceDomain](docs/sdks/betafeatures/README.md#changeproductioninstancedomain) - Update production instance domain +### [blocklistIdentifiers](docs/sdks/blocklistidentifiers/README.md) + +* [list](docs/sdks/blocklistidentifiers/README.md#list) - List all identifiers on the block-list + ### [clients](docs/sdks/clients/README.md) -* [~~getClientList~~](docs/sdks/clients/README.md#getclientlist) - List all clients :warning: **Deprecated** -* [verifyClient](docs/sdks/clients/README.md#verifyclient) - Verify a client -* [getClient](docs/sdks/clients/README.md#getclient) - Get a client +* [~~list~~](docs/sdks/clients/README.md#list) - List all clients :warning: **Deprecated** +* [verify](docs/sdks/clients/README.md#verify) - Verify a client +* [get](docs/sdks/clients/README.md#get) - Get a client ### [domains](docs/sdks/domains/README.md) -* [listDomains](docs/sdks/domains/README.md#listdomains) - List all instance domains -* [addDomain](docs/sdks/domains/README.md#adddomain) - Add a domain -* [deleteDomain](docs/sdks/domains/README.md#deletedomain) - Delete a satellite domain -* [updateDomain](docs/sdks/domains/README.md#updatedomain) - Update a domain +* [list](docs/sdks/domains/README.md#list) - List all instance domains +* [add](docs/sdks/domains/README.md#add) - Add a domain +* [delete](docs/sdks/domains/README.md#delete) - Delete a satellite domain +* [update](docs/sdks/domains/README.md#update) - Update a domain ### [emailAddresses](docs/sdks/emailaddresses/README.md) -* [createEmailAddress](docs/sdks/emailaddresses/README.md#createemailaddress) - Create an email address -* [getEmailAddress](docs/sdks/emailaddresses/README.md#getemailaddress) - Retrieve an email address -* [deleteEmailAddress](docs/sdks/emailaddresses/README.md#deleteemailaddress) - Delete an email address -* [updateEmailAddress](docs/sdks/emailaddresses/README.md#updateemailaddress) - Update an email address +* [create](docs/sdks/emailaddresses/README.md#create) - Create an email address +* [get](docs/sdks/emailaddresses/README.md#get) - Retrieve an email address +* [delete](docs/sdks/emailaddresses/README.md#delete) - Delete an email address +* [update](docs/sdks/emailaddresses/README.md#update) - Update an email address -### [~~emailAndSMSTemplates~~](docs/sdks/emailandsmstemplates/README.md) +### [~~emailAndSmsTemplates~~](docs/sdks/emailandsmstemplates/README.md) -* [~~getTemplateList~~](docs/sdks/emailandsmstemplates/README.md#gettemplatelist) - List all templates :warning: **Deprecated** -* [~~getTemplate~~](docs/sdks/emailandsmstemplates/README.md#gettemplate) - Retrieve a template :warning: **Deprecated** -* [~~upsertTemplate~~](docs/sdks/emailandsmstemplates/README.md#upserttemplate) - Update a template for a given type and slug :warning: **Deprecated** -* [~~revertTemplate~~](docs/sdks/emailandsmstemplates/README.md#reverttemplate) - Revert a template :warning: **Deprecated** -* [~~previewTemplate~~](docs/sdks/emailandsmstemplates/README.md#previewtemplate) - Preview changes to a template :warning: **Deprecated** -* [~~toggleTemplateDelivery~~](docs/sdks/emailandsmstemplates/README.md#toggletemplatedelivery) - Toggle the delivery by Clerk for a template of a given type and slug :warning: **Deprecated** +* [~~upsert~~](docs/sdks/emailandsmstemplates/README.md#upsert) - Update a template for a given type and slug :warning: **Deprecated** + +### [~~emailSMSTemplates~~](docs/sdks/emailsmstemplates/README.md) + +* [~~list~~](docs/sdks/emailsmstemplates/README.md#list) - List all templates :warning: **Deprecated** +* [~~revert~~](docs/sdks/emailsmstemplates/README.md#revert) - Revert a template :warning: **Deprecated** +* [~~get~~](docs/sdks/emailsmstemplates/README.md#get) - Retrieve a template :warning: **Deprecated** +* [~~toggleTemplateDelivery~~](docs/sdks/emailsmstemplates/README.md#toggletemplatedelivery) - Toggle the delivery by Clerk for a template of a given type and slug :warning: **Deprecated** ### [instanceSettings](docs/sdks/instancesettings/README.md) -* [updateInstance](docs/sdks/instancesettings/README.md#updateinstance) - Update instance settings -* [updateInstanceRestrictions](docs/sdks/instancesettings/README.md#updateinstancerestrictions) - Update instance restrictions -* [updateInstanceOrganizationSettings](docs/sdks/instancesettings/README.md#updateinstanceorganizationsettings) - Update instance organization settings +* [update](docs/sdks/instancesettings/README.md#update) - Update instance settings +* [updateRestrictions](docs/sdks/instancesettings/README.md#updaterestrictions) - Update instance restrictions +* [updateOrganizationSettings](docs/sdks/instancesettings/README.md#updateorganizationsettings) - Update instance organization settings ### [invitations](docs/sdks/invitations/README.md) -* [createInvitation](docs/sdks/invitations/README.md#createinvitation) - Create an invitation -* [listInvitations](docs/sdks/invitations/README.md#listinvitations) - List all invitations -* [revokeInvitation](docs/sdks/invitations/README.md#revokeinvitation) - Revokes an invitation +* [create](docs/sdks/invitations/README.md#create) - Create an invitation +* [list](docs/sdks/invitations/README.md#list) - List all invitations +* [revoke](docs/sdks/invitations/README.md#revoke) - Revokes an invitation ### [jwks](docs/sdks/jwks/README.md) -* [getJWKS](docs/sdks/jwks/README.md#getjwks) - Retrieve the JSON Web Key Set of the instance +* [get](docs/sdks/jwks/README.md#get) - Retrieve the JSON Web Key Set of the instance ### [jwtTemplates](docs/sdks/jwttemplates/README.md) -* [listJWTTemplates](docs/sdks/jwttemplates/README.md#listjwttemplates) - List all templates -* [createJWTTemplate](docs/sdks/jwttemplates/README.md#createjwttemplate) - Create a JWT template -* [getJWTTemplate](docs/sdks/jwttemplates/README.md#getjwttemplate) - Retrieve a template -* [updateJWTTemplate](docs/sdks/jwttemplates/README.md#updatejwttemplate) - Update a JWT template -* [deleteJWTTemplate](docs/sdks/jwttemplates/README.md#deletejwttemplate) - Delete a Template +* [list](docs/sdks/jwttemplates/README.md#list) - List all templates +* [create](docs/sdks/jwttemplates/README.md#create) - Create a JWT template +* [get](docs/sdks/jwttemplates/README.md#get) - Retrieve a template +* [update](docs/sdks/jwttemplates/README.md#update) - Update a JWT template +* [delete](docs/sdks/jwttemplates/README.md#delete) - Delete a Template ### [miscellaneous](docs/sdks/miscellaneous/README.md) -* [getPublicInterstitial](docs/sdks/miscellaneous/README.md#getpublicinterstitial) - Returns the markup for the interstitial page +* [getInterstitial](docs/sdks/miscellaneous/README.md#getinterstitial) - Returns the markup for the interstitial page + +### [oauthApplications](docs/sdks/oauthapplications/README.md) + +* [list](docs/sdks/oauthapplications/README.md#list) - Get a list of OAuth applications for an instance +* [create](docs/sdks/oauthapplications/README.md#create) - Create an OAuth application +* [get](docs/sdks/oauthapplications/README.md#get) - Retrieve an OAuth application by ID +* [update](docs/sdks/oauthapplications/README.md#update) - Update an OAuth application +* [delete](docs/sdks/oauthapplications/README.md#delete) - Delete an OAuth application +* [rotateSecret](docs/sdks/oauthapplications/README.md#rotatesecret) - Rotate the client secret of the given OAuth application -### [oAuthApplications](docs/sdks/oauthapplications/README.md) +### [organizationDomain](docs/sdks/organizationdomain/README.md) -* [listOAuthApplications](docs/sdks/oauthapplications/README.md#listoauthapplications) - Get a list of OAuth applications for an instance -* [createOAuthApplication](docs/sdks/oauthapplications/README.md#createoauthapplication) - Create an OAuth application -* [getOAuthApplication](docs/sdks/oauthapplications/README.md#getoauthapplication) - Retrieve an OAuth application by ID -* [updateOAuthApplication](docs/sdks/oauthapplications/README.md#updateoauthapplication) - Update an OAuth application -* [deleteOAuthApplication](docs/sdks/oauthapplications/README.md#deleteoauthapplication) - Delete an OAuth application -* [rotateOAuthApplicationSecret](docs/sdks/oauthapplications/README.md#rotateoauthapplicationsecret) - Rotate the client secret of the given OAuth application +* [update](docs/sdks/organizationdomain/README.md#update) - Update an organization domain. + +### [organizationDomains](docs/sdks/organizationdomains/README.md) + +* [create](docs/sdks/organizationdomains/README.md#create) - Create a new organization domain. +* [list](docs/sdks/organizationdomains/README.md#list) - Get a list of all domains of an organization. +* [delete](docs/sdks/organizationdomains/README.md#delete) - Remove a domain from an organization. ### [organizationInvitations](docs/sdks/organizationinvitations/README.md) -* [createOrganizationInvitation](docs/sdks/organizationinvitations/README.md#createorganizationinvitation) - Create and send an organization invitation -* [listOrganizationInvitations](docs/sdks/organizationinvitations/README.md#listorganizationinvitations) - Get a list of organization invitations -* [createOrganizationInvitationBulk](docs/sdks/organizationinvitations/README.md#createorganizationinvitationbulk) - Bulk create and send organization invitations -* [~~listPendingOrganizationInvitations~~](docs/sdks/organizationinvitations/README.md#listpendingorganizationinvitations) - Get a list of pending organization invitations :warning: **Deprecated** -* [getOrganizationInvitation](docs/sdks/organizationinvitations/README.md#getorganizationinvitation) - Retrieve an organization invitation by ID -* [revokeOrganizationInvitation](docs/sdks/organizationinvitations/README.md#revokeorganizationinvitation) - Revoke a pending organization invitation +* [getAll](docs/sdks/organizationinvitations/README.md#getall) - Get a list of organization invitations for the current instance +* [create](docs/sdks/organizationinvitations/README.md#create) - Create and send an organization invitation +* [list](docs/sdks/organizationinvitations/README.md#list) - Get a list of organization invitations +* [bulkCreate](docs/sdks/organizationinvitations/README.md#bulkcreate) - Bulk create and send organization invitations +* [~~listPending~~](docs/sdks/organizationinvitations/README.md#listpending) - Get a list of pending organization invitations :warning: **Deprecated** +* [get](docs/sdks/organizationinvitations/README.md#get) - Retrieve an organization invitation by ID +* [revoke](docs/sdks/organizationinvitations/README.md#revoke) - Revoke a pending organization invitation ### [organizationMemberships](docs/sdks/organizationmemberships/README.md) -* [createOrganizationMembership](docs/sdks/organizationmemberships/README.md#createorganizationmembership) - Create a new organization membership -* [listOrganizationMemberships](docs/sdks/organizationmemberships/README.md#listorganizationmemberships) - Get a list of all members of an organization -* [updateOrganizationMembership](docs/sdks/organizationmemberships/README.md#updateorganizationmembership) - Update an organization membership -* [deleteOrganizationMembership](docs/sdks/organizationmemberships/README.md#deleteorganizationmembership) - Remove a member from an organization -* [updateOrganizationMembershipMetadata](docs/sdks/organizationmemberships/README.md#updateorganizationmembershipmetadata) - Merge and update organization membership metadata +* [create](docs/sdks/organizationmemberships/README.md#create) - Create a new organization membership +* [list](docs/sdks/organizationmemberships/README.md#list) - Get a list of all members of an organization +* [update](docs/sdks/organizationmemberships/README.md#update) - Update an organization membership +* [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 +* [getAll](docs/sdks/organizationmemberships/README.md#getall) - Get a list of all organization memberships within an instance. ### [organizations](docs/sdks/organizations/README.md) -* [listOrganizations](docs/sdks/organizations/README.md#listorganizations) - Get a list of organizations for an instance -* [createOrganization](docs/sdks/organizations/README.md#createorganization) - Create an organization -* [getOrganization](docs/sdks/organizations/README.md#getorganization) - Retrieve an organization by ID or slug -* [updateOrganization](docs/sdks/organizations/README.md#updateorganization) - Update an organization -* [deleteOrganization](docs/sdks/organizations/README.md#deleteorganization) - Delete an organization -* [mergeOrganizationMetadata](docs/sdks/organizations/README.md#mergeorganizationmetadata) - Merge and update metadata for an organization -* [uploadOrganizationLogo](docs/sdks/organizations/README.md#uploadorganizationlogo) - Upload a logo for the organization -* [deleteOrganizationLogo](docs/sdks/organizations/README.md#deleteorganizationlogo) - Delete the organization's logo. +* [list](docs/sdks/organizations/README.md#list) - Get a list of organizations for an instance +* [create](docs/sdks/organizations/README.md#create) - Create an organization +* [get](docs/sdks/organizations/README.md#get) - Retrieve an organization by ID or slug +* [update](docs/sdks/organizations/README.md#update) - Update an organization +* [delete](docs/sdks/organizations/README.md#delete) - Delete an organization +* [mergeMetadata](docs/sdks/organizations/README.md#mergemetadata) - Merge and update metadata for an organization +* [uploadLogo](docs/sdks/organizations/README.md#uploadlogo) - Upload a logo for the organization +* [deleteLogo](docs/sdks/organizations/README.md#deletelogo) - Delete the organization's logo. ### [phoneNumbers](docs/sdks/phonenumbers/README.md) -* [createPhoneNumber](docs/sdks/phonenumbers/README.md#createphonenumber) - Create a phone number -* [getPhoneNumber](docs/sdks/phonenumbers/README.md#getphonenumber) - Retrieve a phone number -* [deletePhoneNumber](docs/sdks/phonenumbers/README.md#deletephonenumber) - Delete a phone number -* [updatePhoneNumber](docs/sdks/phonenumbers/README.md#updatephonenumber) - Update a phone number +* [create](docs/sdks/phonenumbers/README.md#create) - Create a phone number +* [get](docs/sdks/phonenumbers/README.md#get) - Retrieve a phone number +* [delete](docs/sdks/phonenumbers/README.md#delete) - Delete a phone number +* [update](docs/sdks/phonenumbers/README.md#update) - Update a phone number ### [proxyChecks](docs/sdks/proxychecks/README.md) -* [verifyDomainProxy](docs/sdks/proxychecks/README.md#verifydomainproxy) - Verify the proxy configuration for your domain +* [verify](docs/sdks/proxychecks/README.md#verify) - Verify the proxy configuration for your domain + +### [redirectUrls](docs/sdks/clerkbackendredirecturls/README.md) + +* [create](docs/sdks/clerkbackendredirecturls/README.md#create) - Create a redirect URL +* [get](docs/sdks/clerkbackendredirecturls/README.md#get) - Retrieve a redirect URL +* [delete](docs/sdks/clerkbackendredirecturls/README.md#delete) - Delete a redirect URL ### [redirectURLs](docs/sdks/redirecturls/README.md) -* [listRedirectURLs](docs/sdks/redirecturls/README.md#listredirecturls) - List all redirect URLs -* [createRedirectURL](docs/sdks/redirecturls/README.md#createredirecturl) - Create a redirect URL -* [getRedirectURL](docs/sdks/redirecturls/README.md#getredirecturl) - Retrieve a redirect URL -* [deleteRedirectURL](docs/sdks/redirecturls/README.md#deleteredirecturl) - Delete a redirect URL +* [list](docs/sdks/redirecturls/README.md#list) - List all redirect URLs ### [samlConnections](docs/sdks/samlconnections/README.md) -* [listSAMLConnections](docs/sdks/samlconnections/README.md#listsamlconnections) - Get a list of SAML Connections for an instance -* [createSAMLConnection](docs/sdks/samlconnections/README.md#createsamlconnection) - Create a SAML Connection -* [getSAMLConnection](docs/sdks/samlconnections/README.md#getsamlconnection) - Retrieve a SAML Connection by ID -* [updateSAMLConnection](docs/sdks/samlconnections/README.md#updatesamlconnection) - Update a SAML Connection -* [deleteSAMLConnection](docs/sdks/samlconnections/README.md#deletesamlconnection) - Delete a SAML Connection +* [list](docs/sdks/samlconnections/README.md#list) - Get a list of SAML Connections for an instance +* [create](docs/sdks/samlconnections/README.md#create) - Create a SAML Connection +* [get](docs/sdks/samlconnections/README.md#get) - Retrieve a SAML Connection by ID +* [update](docs/sdks/samlconnections/README.md#update) - Update a SAML Connection +* [delete](docs/sdks/samlconnections/README.md#delete) - Delete a SAML Connection ### [sessions](docs/sdks/sessions/README.md) -* [getSessionList](docs/sdks/sessions/README.md#getsessionlist) - List all sessions -* [getSession](docs/sdks/sessions/README.md#getsession) - Retrieve a session -* [revokeSession](docs/sdks/sessions/README.md#revokesession) - Revoke a session -* [~~verifySession~~](docs/sdks/sessions/README.md#verifysession) - Verify a session :warning: **Deprecated** -* [createSessionTokenFromTemplate](docs/sdks/sessions/README.md#createsessiontokenfromtemplate) - Create a session token from a jwt template +* [list](docs/sdks/sessions/README.md#list) - List all sessions +* [get](docs/sdks/sessions/README.md#get) - Retrieve a session +* [revoke](docs/sdks/sessions/README.md#revoke) - Revoke a session +* [~~verify~~](docs/sdks/sessions/README.md#verify) - Verify a session :warning: **Deprecated** +* [createTokenFromTemplate](docs/sdks/sessions/README.md#createtokenfromtemplate) - Create a session token from a jwt template ### [signInTokens](docs/sdks/signintokens/README.md) -* [createSignInToken](docs/sdks/signintokens/README.md#createsignintoken) - Create sign-in token -* [revokeSignInToken](docs/sdks/signintokens/README.md#revokesignintoken) - Revoke the given sign-in token +* [create](docs/sdks/signintokens/README.md#create) - Create sign-in token +* [revoke](docs/sdks/signintokens/README.md#revoke) - Revoke the given sign-in token ### [signUps](docs/sdks/signups/README.md) -* [updateSignUp](docs/sdks/signups/README.md#updatesignup) - Update a sign-up +* [update](docs/sdks/signups/README.md#update) - Update a sign-up + +### [~~templates~~](docs/sdks/templates/README.md) + +* [~~preview~~](docs/sdks/templates/README.md#preview) - Preview changes to a template :warning: **Deprecated** ### [testingTokens](docs/sdks/testingtokens/README.md) -* [createTestingToken](docs/sdks/testingtokens/README.md#createtestingtoken) - Retrieve a new testing token +* [create](docs/sdks/testingtokens/README.md#create) - Retrieve a new testing token ### [users](docs/sdks/users/README.md) -* [getUserList](docs/sdks/users/README.md#getuserlist) - List all users -* [createUser](docs/sdks/users/README.md#createuser) - Create a new user -* [getUsersCount](docs/sdks/users/README.md#getuserscount) - Count users -* [getUser](docs/sdks/users/README.md#getuser) - Retrieve a user -* [updateUser](docs/sdks/users/README.md#updateuser) - Update a user -* [deleteUser](docs/sdks/users/README.md#deleteuser) - Delete a user -* [banUser](docs/sdks/users/README.md#banuser) - Ban a user -* [unbanUser](docs/sdks/users/README.md#unbanuser) - Unban a user -* [lockUser](docs/sdks/users/README.md#lockuser) - Lock a user -* [unlockUser](docs/sdks/users/README.md#unlockuser) - Unlock a user -* [setUserProfileImage](docs/sdks/users/README.md#setuserprofileimage) - Set user profile image -* [deleteUserProfileImage](docs/sdks/users/README.md#deleteuserprofileimage) - Delete user profile image -* [updateUserMetadata](docs/sdks/users/README.md#updateusermetadata) - Merge and update a user's metadata +* [list](docs/sdks/users/README.md#list) - List all users +* [create](docs/sdks/users/README.md#create) - Create a new user +* [count](docs/sdks/users/README.md#count) - Count users +* [get](docs/sdks/users/README.md#get) - Retrieve a user +* [update](docs/sdks/users/README.md#update) - Update a user +* [delete](docs/sdks/users/README.md#delete) - Delete a user +* [ban](docs/sdks/users/README.md#ban) - Ban a user +* [unban](docs/sdks/users/README.md#unban) - Unban a user +* [lock](docs/sdks/users/README.md#lock) - Lock a user +* [unlock](docs/sdks/users/README.md#unlock) - Unlock a user +* [setProfileImage](docs/sdks/users/README.md#setprofileimage) - Set user profile image +* [deleteProfileImage](docs/sdks/users/README.md#deleteprofileimage) - Delete user profile image +* [updateMetadata](docs/sdks/users/README.md#updatemetadata) - Merge and update a user's metadata * [getOAuthAccessToken](docs/sdks/users/README.md#getoauthaccesstoken) - Retrieve the OAuth access token of a user -* [usersGetOrganizationMemberships](docs/sdks/users/README.md#usersgetorganizationmemberships) - Retrieve all memberships for a user +* [getOrganizationMemberships](docs/sdks/users/README.md#getorganizationmemberships) - Retrieve all memberships for a user +* [getOrganizationInvitations](docs/sdks/users/README.md#getorganizationinvitations) - Retrieve all invitations for a user * [verifyPassword](docs/sdks/users/README.md#verifypassword) - Verify the password of a user * [verifyTOTP](docs/sdks/users/README.md#verifytotp) - Verify a TOTP or backup code for a user * [disableMFA](docs/sdks/users/README.md#disablemfa) - Disable a user's MFA methods +* [deleteBackupCodes](docs/sdks/users/README.md#deletebackupcodes) - Disable all user's Backup codes +* [deletePasskey](docs/sdks/users/README.md#deletepasskey) - Delete a user passkey +* [deleteWeb3Wallet](docs/sdks/users/README.md#deleteweb3wallet) - Delete a user web3 wallet +* [createTOTP](docs/sdks/users/README.md#createtotp) - Create a TOTP for a user +* [deleteTotp](docs/sdks/users/README.md#deletetotp) - Delete all the user's TOTPs +* [deleteExternalAccount](docs/sdks/users/README.md#deleteexternalaccount) - Delete External Account ### [webhooks](docs/sdks/webhooks/README.md) @@ -260,7 +294,7 @@ By default an API error will raise a `Errors\SDKException` exception, which has | `$rawResponse` | *?\Psr\Http\Message\ResponseInterface* | The raw HTTP response | | `$body` | *string* | The response content | -When custom error responses are specified for an operation, the SDK may also throw their associated exception. You can refer to respective *Errors* tables in SDK docs for more details on possible exception types for each operation. For example, the `verifyClient` method throws the following exceptions: +When custom error responses are specified for an operation, the SDK may also throw their associated exception. You can refer to respective *Errors* tables in SDK docs for more details on possible exception types for each operation. For example, the `verify` method throws the following exceptions: | Error Type | Status Code | Content Type | | ------------------- | ------------------- | ------------------- | @@ -284,7 +318,7 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); try { $request = new Operations\VerifyClientRequestBody(); - $response = $sdk->clients->verifyClient( + $response = $sdk->clients->verify( request: $request ); @@ -372,17 +406,17 @@ require 'vendor/autoload.php'; use Clerk\Backend; -$sdk = Backend\ClerkBackend::builder()->build(); +$security = ''; +$sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); -$response = $sdk->miscellaneous->getPublicInterstitial( - frontendApi: '', - publishableKey: '' +$response = $sdk->emailAddresses->get( + emailAddressId: '' ); -if ($response->statusCode === 200) { +if ($response->emailAddress !== null) { // handle response } ``` diff --git a/USAGE.md b/USAGE.md index 41e8597..4ee0104 100644 --- a/USAGE.md +++ b/USAGE.md @@ -6,17 +6,17 @@ require 'vendor/autoload.php'; use Clerk\Backend; -$sdk = Backend\ClerkBackend::builder()->build(); +$security = ''; +$sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); -$response = $sdk->miscellaneous->getPublicInterstitial( - frontendApi: '', - publishableKey: '' +$response = $sdk->emailAddresses->get( + emailAddressId: '' ); -if ($response->statusCode === 200) { +if ($response->emailAddress !== null) { // handle response } ``` diff --git a/docs/Models/Components/EnrollmentMode.md b/docs/Models/Components/EnrollmentMode.md new file mode 100644 index 0000000..fee3b41 --- /dev/null +++ b/docs/Models/Components/EnrollmentMode.md @@ -0,0 +1,12 @@ +# EnrollmentMode + +Mode of enrollment for the domain + + +## Values + +| Name | Value | +| --------------------- | --------------------- | +| `ManualInvitation` | manual_invitation | +| `AutomaticInvitation` | automatic_invitation | +| `AutomaticSuggestion` | automatic_suggestion | \ No newline at end of file diff --git a/docs/Models/Components/Invitation.md b/docs/Models/Components/Invitation.md index f81ebca..5efe483 100644 --- a/docs/Models/Components/Invitation.md +++ b/docs/Models/Components/Invitation.md @@ -5,14 +5,15 @@ Success ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | -| `object` | [Components\InvitationObject](../../Models/Components/InvitationObject.md) | :heavy_check_mark: | N/A | | -| `id` | *string* | :heavy_check_mark: | N/A | | -| `emailAddress` | *string* | :heavy_check_mark: | N/A | | -| `status` | [Components\InvitationStatus](../../Models/Components/InvitationStatus.md) | :heavy_check_mark: | N/A | pending | -| `createdAt` | *int* | :heavy_check_mark: | Unix timestamp of creation.
| | -| `updatedAt` | *int* | :heavy_check_mark: | Unix timestamp of last update.
| | -| `publicMetadata` | [?Components\InvitationPublicMetadata](../../Models/Components/InvitationPublicMetadata.md) | :heavy_minus_sign: | N/A | | -| `revoked` | *?bool* | :heavy_minus_sign: | N/A | false | -| `url` | *?string* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `object` | [Components\InvitationObject](../../Models/Components/InvitationObject.md) | :heavy_check_mark: | N/A | | +| `id` | *string* | :heavy_check_mark: | N/A | | +| `emailAddress` | *string* | :heavy_check_mark: | N/A | | +| `status` | [Components\InvitationStatus](../../Models/Components/InvitationStatus.md) | :heavy_check_mark: | N/A | pending | +| `createdAt` | *int* | :heavy_check_mark: | Unix timestamp of creation.
| | +| `updatedAt` | *int* | :heavy_check_mark: | Unix timestamp of last update.
| | +| `publicMetadata` | array | :heavy_minus_sign: | N/A | | +| `revoked` | *?bool* | :heavy_minus_sign: | N/A | false | +| `url` | *?string* | :heavy_minus_sign: | N/A | | +| `expiresAt` | *?int* | :heavy_minus_sign: | Unix timestamp of expiration.
| | \ No newline at end of file diff --git a/docs/Models/Components/InvitationPublicMetadata.md b/docs/Models/Components/InvitationPublicMetadata.md deleted file mode 100644 index 86cefd3..0000000 --- a/docs/Models/Components/InvitationPublicMetadata.md +++ /dev/null @@ -1,7 +0,0 @@ -# InvitationPublicMetadata - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/Models/Components/InvitationRevoked.md b/docs/Models/Components/InvitationRevoked.md index 0756684..58ff465 100644 --- a/docs/Models/Components/InvitationRevoked.md +++ b/docs/Models/Components/InvitationRevoked.md @@ -5,14 +5,15 @@ Success ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | -| `object` | [Components\InvitationRevokedObject](../../Models/Components/InvitationRevokedObject.md) | :heavy_check_mark: | N/A | | -| `id` | *string* | :heavy_check_mark: | N/A | | -| `emailAddress` | *string* | :heavy_check_mark: | N/A | | -| `status` | [Components\InvitationRevokedStatus](../../Models/Components/InvitationRevokedStatus.md) | :heavy_check_mark: | N/A | revoked | -| `createdAt` | *int* | :heavy_check_mark: | Unix timestamp of creation.
| | -| `updatedAt` | *int* | :heavy_check_mark: | Unix timestamp of last update.
| | -| `publicMetadata` | [?Components\InvitationRevokedPublicMetadata](../../Models/Components/InvitationRevokedPublicMetadata.md) | :heavy_minus_sign: | N/A | | -| `revoked` | *?bool* | :heavy_minus_sign: | N/A | true | -| `url` | *?string* | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `object` | [Components\InvitationRevokedObject](../../Models/Components/InvitationRevokedObject.md) | :heavy_check_mark: | N/A | | +| `id` | *string* | :heavy_check_mark: | N/A | | +| `emailAddress` | *string* | :heavy_check_mark: | N/A | | +| `status` | [Components\InvitationRevokedStatus](../../Models/Components/InvitationRevokedStatus.md) | :heavy_check_mark: | N/A | revoked | +| `createdAt` | *int* | :heavy_check_mark: | Unix timestamp of creation.
| | +| `updatedAt` | *int* | :heavy_check_mark: | Unix timestamp of last update.
| | +| `publicMetadata` | array | :heavy_minus_sign: | N/A | | +| `revoked` | *?bool* | :heavy_minus_sign: | N/A | true | +| `url` | *?string* | :heavy_minus_sign: | N/A | | +| `expiresAt` | *?int* | :heavy_minus_sign: | Unix timestamp of expiration.
| | \ No newline at end of file diff --git a/docs/Models/Components/InvitationRevokedPublicMetadata.md b/docs/Models/Components/InvitationRevokedPublicMetadata.md deleted file mode 100644 index 7a57063..0000000 --- a/docs/Models/Components/InvitationRevokedPublicMetadata.md +++ /dev/null @@ -1,7 +0,0 @@ -# InvitationRevokedPublicMetadata - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/Models/Components/InvitationStatus.md b/docs/Models/Components/InvitationStatus.md index 98ab18c..943de92 100644 --- a/docs/Models/Components/InvitationStatus.md +++ b/docs/Models/Components/InvitationStatus.md @@ -7,4 +7,5 @@ | ---------- | ---------- | | `Pending` | pending | | `Accepted` | accepted | -| `Revoked` | revoked | \ No newline at end of file +| `Revoked` | revoked | +| `Expired` | expired | \ No newline at end of file diff --git a/docs/Models/Components/Keys.md b/docs/Models/Components/Keys.md new file mode 100644 index 0000000..85c34ca --- /dev/null +++ b/docs/Models/Components/Keys.md @@ -0,0 +1,13 @@ +# Keys + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `use` | *?string* | :heavy_minus_sign: | N/A | +| `kty` | *?string* | :heavy_minus_sign: | N/A | +| `kid` | *?string* | :heavy_minus_sign: | N/A | +| `alg` | *?string* | :heavy_minus_sign: | N/A | +| `n` | *?string* | :heavy_minus_sign: | N/A | +| `e` | *?string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Components/LatestActivity.md b/docs/Models/Components/LatestActivity.md new file mode 100644 index 0000000..3d03c08 --- /dev/null +++ b/docs/Models/Components/LatestActivity.md @@ -0,0 +1,16 @@ +# LatestActivity + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `object` | *string* | :heavy_check_mark: | N/A | +| `id` | *string* | :heavy_check_mark: | N/A | +| `deviceType` | *?string* | :heavy_minus_sign: | N/A | +| `isMobile` | *?bool* | :heavy_minus_sign: | N/A | +| `browserName` | *?string* | :heavy_minus_sign: | N/A | +| `browserVersion` | *?string* | :heavy_minus_sign: | N/A | +| `ipAddress` | *?string* | :heavy_minus_sign: | N/A | +| `city` | *?string* | :heavy_minus_sign: | N/A | +| `country` | *?string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Components/OTPVerificationStrategy.md b/docs/Models/Components/OTPVerificationStrategy.md index 1067c92..27477b4 100644 --- a/docs/Models/Components/OTPVerificationStrategy.md +++ b/docs/Models/Components/OTPVerificationStrategy.md @@ -7,4 +7,10 @@ | ------------------------- | ------------------------- | | `PhoneCode` | phone_code | | `EmailCode` | email_code | -| `ResetPasswordEmailCode` | reset_password_email_code | \ No newline at end of file +| `EmailLink` | email_link | +| `ResetPasswordEmailCode` | reset_password_email_code | +| `FromOauthDiscord` | from_oauth_discord | +| `FromOauthGoogle` | from_oauth_google | +| `FromOauthApple` | from_oauth_apple | +| `FromOauthMicrosoft` | from_oauth_microsoft | +| `FromOauthGithub` | from_oauth_github | \ No newline at end of file diff --git a/docs/Models/Components/OauthVerificationStrategy.md b/docs/Models/Components/OauthVerificationStrategy.md index 2de48d3..9b31b0b 100644 --- a/docs/Models/Components/OauthVerificationStrategy.md +++ b/docs/Models/Components/OauthVerificationStrategy.md @@ -3,8 +3,14 @@ ## Values -| Name | Value | -| ----------------- | ----------------- | -| `OauthGoogle` | oauth_google | -| `OauthMock` | oauth_mock | -| `OauthCustomMock` | oauth_custom_mock | \ No newline at end of file +| Name | Value | +| -------------------- | -------------------- | +| `OauthGoogle` | oauth_google | +| `OauthMock` | oauth_mock | +| `FromOauthGoogle` | from_oauth_google | +| `FromOauthDiscord` | from_oauth_discord | +| `FromOauthMicrosoft` | from_oauth_microsoft | +| `OauthApple` | oauth_apple | +| `OauthMicrosoft` | oauth_microsoft | +| `OauthGithub` | oauth_github | +| `EmailLink` | email_link | \ No newline at end of file diff --git a/docs/Models/Components/Organization.md b/docs/Models/Components/Organization.md index d871987..3a1bbef 100644 --- a/docs/Models/Components/Organization.md +++ b/docs/Models/Components/Organization.md @@ -3,17 +3,17 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | -| `object` | [Components\OrganizationObject](../../Models/Components/OrganizationObject.md) | :heavy_check_mark: | N/A | -| `id` | *string* | :heavy_check_mark: | N/A | -| `name` | *string* | :heavy_check_mark: | N/A | -| `slug` | *string* | :heavy_check_mark: | N/A | -| `maxAllowedMemberships` | *int* | :heavy_check_mark: | N/A | -| `publicMetadata` | [Components\OrganizationPublicMetadata](../../Models/Components/OrganizationPublicMetadata.md) | :heavy_check_mark: | N/A | -| `privateMetadata` | [Components\OrganizationPrivateMetadata](../../Models/Components/OrganizationPrivateMetadata.md) | :heavy_check_mark: | N/A | -| `createdAt` | *int* | :heavy_check_mark: | Unix timestamp of creation.
| -| `updatedAt` | *int* | :heavy_check_mark: | Unix timestamp of last update.
| -| `adminDeleteEnabled` | *?bool* | :heavy_minus_sign: | N/A | -| `createdBy` | *?string* | :heavy_minus_sign: | N/A | -| `membersCount` | *?int* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `object` | [Components\OrganizationObject](../../Models/Components/OrganizationObject.md) | :heavy_check_mark: | N/A | +| `id` | *string* | :heavy_check_mark: | N/A | +| `name` | *string* | :heavy_check_mark: | N/A | +| `slug` | *string* | :heavy_check_mark: | N/A | +| `maxAllowedMemberships` | *int* | :heavy_check_mark: | N/A | +| `publicMetadata` | array | :heavy_check_mark: | N/A | +| `privateMetadata` | array | :heavy_check_mark: | N/A | +| `createdAt` | *int* | :heavy_check_mark: | Unix timestamp of creation.
| +| `updatedAt` | *int* | :heavy_check_mark: | Unix timestamp of last update.
| +| `adminDeleteEnabled` | *?bool* | :heavy_minus_sign: | N/A | +| `createdBy` | *?string* | :heavy_minus_sign: | N/A | +| `membersCount` | *?int* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Components/OrganizationDomain.md b/docs/Models/Components/OrganizationDomain.md new file mode 100644 index 0000000..837dbbf --- /dev/null +++ b/docs/Models/Components/OrganizationDomain.md @@ -0,0 +1,20 @@ +# OrganizationDomain + +An organization domain + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | +| `id` | *?string* | :heavy_minus_sign: | Unique identifier for the organization domain | +| `object` | [?Components\OrganizationDomainObject](../../Models/Components/OrganizationDomainObject.md) | :heavy_minus_sign: | String representing the object's type. Objects of the same type share the same value. Always `organization_domain`
| +| `organizationId` | *?string* | :heavy_minus_sign: | Unique identifier for the organization | +| `name` | *?string* | :heavy_minus_sign: | Name of the organization domain | +| `enrollmentMode` | [?Components\EnrollmentMode](../../Models/Components/EnrollmentMode.md) | :heavy_minus_sign: | Mode of enrollment for the domain | +| `totalPendingInvitations` | *?int* | :heavy_minus_sign: | Total number of pending invitations associated with this domain | +| `totalPendingSuggestions` | *?int* | :heavy_minus_sign: | Total number of pending suggestions associated with this domain | +| `createdAt` | *?int* | :heavy_minus_sign: | Unix timestamp when the domain was created | +| `updatedAt` | *?int* | :heavy_minus_sign: | Unix timestamp of the last update to the domain | +| `affiliationEmailAddress` | *?string* | :heavy_minus_sign: | Affiliation email address for the domain, if available. | +| `verification` | [?Components\OrganizationDomainVerification](../../Models/Components/OrganizationDomainVerification.md) | :heavy_minus_sign: | Verification details for the domain | \ No newline at end of file diff --git a/docs/Models/Components/OrganizationDomainObject.md b/docs/Models/Components/OrganizationDomainObject.md new file mode 100644 index 0000000..7392009 --- /dev/null +++ b/docs/Models/Components/OrganizationDomainObject.md @@ -0,0 +1,11 @@ +# OrganizationDomainObject + +String representing the object's type. Objects of the same type share the same value. Always `organization_domain` + + + +## Values + +| Name | Value | +| -------------------- | -------------------- | +| `OrganizationDomain` | organization_domain | \ No newline at end of file diff --git a/docs/Models/Components/OrganizationDomainStatus.md b/docs/Models/Components/OrganizationDomainStatus.md new file mode 100644 index 0000000..2fa1a5e --- /dev/null +++ b/docs/Models/Components/OrganizationDomainStatus.md @@ -0,0 +1,11 @@ +# OrganizationDomainStatus + +Status of the verification. It can be `unverified` or `verified` + + +## Values + +| Name | Value | +| ------------ | ------------ | +| `Unverified` | unverified | +| `Verified` | verified | \ No newline at end of file diff --git a/docs/Models/Components/OrganizationDomainVerification.md b/docs/Models/Components/OrganizationDomainVerification.md new file mode 100644 index 0000000..f2f564c --- /dev/null +++ b/docs/Models/Components/OrganizationDomainVerification.md @@ -0,0 +1,13 @@ +# OrganizationDomainVerification + +Verification details for the domain + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| `status` | [?Components\OrganizationDomainStatus](../../Models/Components/OrganizationDomainStatus.md) | :heavy_minus_sign: | Status of the verification. It can be `unverified` or `verified` | +| `strategy` | *?string* | :heavy_minus_sign: | Name of the strategy used to verify the domain | +| `attempts` | *?int* | :heavy_minus_sign: | How many attempts have been made to verify the domain | +| `expireAt` | *?int* | :heavy_minus_sign: | Unix timestamp of when the verification will expire | \ No newline at end of file diff --git a/docs/Models/Components/OrganizationDomains.md b/docs/Models/Components/OrganizationDomains.md new file mode 100644 index 0000000..4f0f74f --- /dev/null +++ b/docs/Models/Components/OrganizationDomains.md @@ -0,0 +1,11 @@ +# OrganizationDomains + +A list of organization domains + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `data` | array<[Components\OrganizationDomain](../../Models/Components/OrganizationDomain.md)> | :heavy_check_mark: | N/A | +| `totalCount` | *int* | :heavy_check_mark: | Total number of organization domains
| \ No newline at end of file diff --git a/docs/Models/Components/OrganizationInvitation.md b/docs/Models/Components/OrganizationInvitation.md index 084dec9..e72a48a 100644 --- a/docs/Models/Components/OrganizationInvitation.md +++ b/docs/Models/Components/OrganizationInvitation.md @@ -5,15 +5,16 @@ An organization invitation ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | -| `id` | *?string* | :heavy_minus_sign: | N/A | -| `object` | [?Components\OrganizationInvitationObject](../../Models/Components/OrganizationInvitationObject.md) | :heavy_minus_sign: | String representing the object's type. Objects of the same type share the same value.
| -| `emailAddress` | *?string* | :heavy_minus_sign: | N/A | -| `role` | *?string* | :heavy_minus_sign: | N/A | -| `organizationId` | *?string* | :heavy_minus_sign: | N/A | -| `status` | *?string* | :heavy_minus_sign: | N/A | -| `publicMetadata` | [?Components\OrganizationInvitationPublicMetadata](../../Models/Components/OrganizationInvitationPublicMetadata.md) | :heavy_minus_sign: | N/A | -| `privateMetadata` | [?Components\OrganizationInvitationPrivateMetadata](../../Models/Components/OrganizationInvitationPrivateMetadata.md) | :heavy_minus_sign: | N/A | -| `createdAt` | *?int* | :heavy_minus_sign: | Unix timestamp of creation. | -| `updatedAt` | *?int* | :heavy_minus_sign: | Unix timestamp of last update. | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | +| `id` | *?string* | :heavy_minus_sign: | N/A | +| `object` | [?Components\OrganizationInvitationObject](../../Models/Components/OrganizationInvitationObject.md) | :heavy_minus_sign: | String representing the object's type. Objects of the same type share the same value.
| +| `emailAddress` | *?string* | :heavy_minus_sign: | N/A | +| `role` | *?string* | :heavy_minus_sign: | N/A | +| `roleName` | *?string* | :heavy_minus_sign: | N/A | +| `organizationId` | *?string* | :heavy_minus_sign: | N/A | +| `status` | *?string* | :heavy_minus_sign: | N/A | +| `publicMetadata` | array | :heavy_minus_sign: | N/A | +| `privateMetadata` | array | :heavy_minus_sign: | N/A | +| `createdAt` | *?int* | :heavy_minus_sign: | Unix timestamp of creation. | +| `updatedAt` | *?int* | :heavy_minus_sign: | Unix timestamp of last update. | \ No newline at end of file diff --git a/docs/Models/Components/OrganizationInvitationPrivateMetadata.md b/docs/Models/Components/OrganizationInvitationPrivateMetadata.md deleted file mode 100644 index 179f38a..0000000 --- a/docs/Models/Components/OrganizationInvitationPrivateMetadata.md +++ /dev/null @@ -1,7 +0,0 @@ -# OrganizationInvitationPrivateMetadata - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/Models/Components/OrganizationInvitationPublicMetadata.md b/docs/Models/Components/OrganizationInvitationPublicMetadata.md deleted file mode 100644 index f0b62d1..0000000 --- a/docs/Models/Components/OrganizationInvitationPublicMetadata.md +++ /dev/null @@ -1,7 +0,0 @@ -# OrganizationInvitationPublicMetadata - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/Models/Components/OrganizationInvitationWithPublicOrganizationData.md b/docs/Models/Components/OrganizationInvitationWithPublicOrganizationData.md new file mode 100644 index 0000000..812acb5 --- /dev/null +++ b/docs/Models/Components/OrganizationInvitationWithPublicOrganizationData.md @@ -0,0 +1,21 @@ +# OrganizationInvitationWithPublicOrganizationData + +An organization invitation with public organization data populated + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *?string* | :heavy_minus_sign: | N/A | +| `object` | [?Components\OrganizationInvitationWithPublicOrganizationDataObject](../../Models/Components/OrganizationInvitationWithPublicOrganizationDataObject.md) | :heavy_minus_sign: | String representing the object's type. Objects of the same type share the same value.
| +| `emailAddress` | *?string* | :heavy_minus_sign: | N/A | +| `role` | *?string* | :heavy_minus_sign: | N/A | +| `roleName` | *?string* | :heavy_minus_sign: | N/A | +| `organizationId` | *?string* | :heavy_minus_sign: | N/A | +| `status` | *?string* | :heavy_minus_sign: | N/A | +| `publicMetadata` | array | :heavy_minus_sign: | N/A | +| `privateMetadata` | array | :heavy_minus_sign: | N/A | +| `publicOrganizationData` | [?Components\PublicOrganizationData](../../Models/Components/PublicOrganizationData.md) | :heavy_minus_sign: | N/A | +| `createdAt` | *?int* | :heavy_minus_sign: | Unix timestamp of creation. | +| `updatedAt` | *?int* | :heavy_minus_sign: | Unix timestamp of last update. | \ No newline at end of file diff --git a/docs/Models/Components/OrganizationInvitationWithPublicOrganizationDataObject.md b/docs/Models/Components/OrganizationInvitationWithPublicOrganizationDataObject.md new file mode 100644 index 0000000..86e9fef --- /dev/null +++ b/docs/Models/Components/OrganizationInvitationWithPublicOrganizationDataObject.md @@ -0,0 +1,11 @@ +# OrganizationInvitationWithPublicOrganizationDataObject + +String representing the object's type. Objects of the same type share the same value. + + + +## Values + +| Name | Value | +| ------------------------ | ------------------------ | +| `OrganizationInvitation` | organization_invitation | \ No newline at end of file diff --git a/docs/Models/Components/OrganizationInvitationsWithPublicOrganizationData.md b/docs/Models/Components/OrganizationInvitationsWithPublicOrganizationData.md new file mode 100644 index 0000000..54b3dd5 --- /dev/null +++ b/docs/Models/Components/OrganizationInvitationsWithPublicOrganizationData.md @@ -0,0 +1,11 @@ +# OrganizationInvitationsWithPublicOrganizationData + +A list of organization invitations with public organization data + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | +| `data` | array<[Components\OrganizationInvitationWithPublicOrganizationData](../../Models/Components/OrganizationInvitationWithPublicOrganizationData.md)> | :heavy_check_mark: | N/A | +| `totalCount` | *int* | :heavy_check_mark: | Total number of organization invitations
| \ No newline at end of file diff --git a/docs/Models/Components/OrganizationMembership.md b/docs/Models/Components/OrganizationMembership.md index 452e57f..45bc54d 100644 --- a/docs/Models/Components/OrganizationMembership.md +++ b/docs/Models/Components/OrganizationMembership.md @@ -5,15 +5,16 @@ Hello world ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | -| `id` | *?string* | :heavy_minus_sign: | N/A | -| `object` | [?Components\OrganizationMembershipObject](../../Models/Components/OrganizationMembershipObject.md) | :heavy_minus_sign: | String representing the object's type. Objects of the same type share the same value.
| -| `role` | *?string* | :heavy_minus_sign: | N/A | -| `permissions` | array<*string*> | :heavy_minus_sign: | N/A | -| `publicMetadata` | [?Components\OrganizationMembershipPublicMetadata](../../Models/Components/OrganizationMembershipPublicMetadata.md) | :heavy_minus_sign: | Metadata saved on the organization membership, accessible from both Frontend and Backend APIs | -| `privateMetadata` | [?Components\OrganizationMembershipPrivateMetadata](../../Models/Components/OrganizationMembershipPrivateMetadata.md) | :heavy_minus_sign: | Metadata saved on the organization membership, accessible only from the Backend API | -| `organization` | [?Components\OrganizationMembershipOrganization](../../Models/Components/OrganizationMembershipOrganization.md) | :heavy_minus_sign: | N/A | -| `publicUserData` | [?Components\PublicUserData](../../Models/Components/PublicUserData.md) | :heavy_minus_sign: | N/A | -| `createdAt` | *?int* | :heavy_minus_sign: | Unix timestamp of creation. | -| `updatedAt` | *?int* | :heavy_minus_sign: | Unix timestamp of last update. | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | +| `id` | *?string* | :heavy_minus_sign: | N/A | +| `object` | [?Components\OrganizationMembershipObject](../../Models/Components/OrganizationMembershipObject.md) | :heavy_minus_sign: | String representing the object's type. Objects of the same type share the same value.
| +| `role` | *?string* | :heavy_minus_sign: | N/A | +| `roleName` | *?string* | :heavy_minus_sign: | N/A | +| `permissions` | array<*string*> | :heavy_minus_sign: | N/A | +| `publicMetadata` | array | :heavy_minus_sign: | Metadata saved on the organization membership, accessible from both Frontend and Backend APIs | +| `privateMetadata` | array | :heavy_minus_sign: | Metadata saved on the organization membership, accessible only from the Backend API | +| `organization` | [?Components\OrganizationMembershipOrganization](../../Models/Components/OrganizationMembershipOrganization.md) | :heavy_minus_sign: | N/A | +| `publicUserData` | [?Components\PublicUserData](../../Models/Components/PublicUserData.md) | :heavy_minus_sign: | N/A | +| `createdAt` | *?int* | :heavy_minus_sign: | Unix timestamp of creation. | +| `updatedAt` | *?int* | :heavy_minus_sign: | Unix timestamp of last update. | \ No newline at end of file diff --git a/docs/Models/Components/OrganizationMembershipOrganization.md b/docs/Models/Components/OrganizationMembershipOrganization.md index f1717a9..cfdab3f 100644 --- a/docs/Models/Components/OrganizationMembershipOrganization.md +++ b/docs/Models/Components/OrganizationMembershipOrganization.md @@ -3,17 +3,17 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -| `object` | [Components\OrganizationMembershipOrganizationObject](../../Models/Components/OrganizationMembershipOrganizationObject.md) | :heavy_check_mark: | N/A | -| `id` | *string* | :heavy_check_mark: | N/A | -| `name` | *string* | :heavy_check_mark: | N/A | -| `slug` | *string* | :heavy_check_mark: | N/A | -| `maxAllowedMemberships` | *int* | :heavy_check_mark: | N/A | -| `publicMetadata` | [Components\OrganizationMembershipOrganizationPublicMetadata](../../Models/Components/OrganizationMembershipOrganizationPublicMetadata.md) | :heavy_check_mark: | N/A | -| `privateMetadata` | [Components\OrganizationMembershipOrganizationPrivateMetadata](../../Models/Components/OrganizationMembershipOrganizationPrivateMetadata.md) | :heavy_check_mark: | N/A | -| `createdAt` | *int* | :heavy_check_mark: | Unix timestamp of creation.
| -| `updatedAt` | *int* | :heavy_check_mark: | Unix timestamp of last update.
| -| `adminDeleteEnabled` | *?bool* | :heavy_minus_sign: | N/A | -| `createdBy` | *?string* | :heavy_minus_sign: | N/A | -| `membersCount` | *?int* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | +| `object` | [Components\OrganizationMembershipOrganizationObject](../../Models/Components/OrganizationMembershipOrganizationObject.md) | :heavy_check_mark: | N/A | +| `id` | *string* | :heavy_check_mark: | N/A | +| `name` | *string* | :heavy_check_mark: | N/A | +| `slug` | *string* | :heavy_check_mark: | N/A | +| `maxAllowedMemberships` | *int* | :heavy_check_mark: | N/A | +| `publicMetadata` | array | :heavy_check_mark: | N/A | +| `privateMetadata` | array | :heavy_check_mark: | N/A | +| `createdAt` | *int* | :heavy_check_mark: | Unix timestamp of creation.
| +| `updatedAt` | *int* | :heavy_check_mark: | Unix timestamp of last update.
| +| `adminDeleteEnabled` | *?bool* | :heavy_minus_sign: | N/A | +| `createdBy` | *?string* | :heavy_minus_sign: | N/A | +| `membersCount` | *?int* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Components/OrganizationMembershipOrganizationPrivateMetadata.md b/docs/Models/Components/OrganizationMembershipOrganizationPrivateMetadata.md deleted file mode 100644 index 361b894..0000000 --- a/docs/Models/Components/OrganizationMembershipOrganizationPrivateMetadata.md +++ /dev/null @@ -1,7 +0,0 @@ -# OrganizationMembershipOrganizationPrivateMetadata - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/Models/Components/OrganizationMembershipOrganizationPublicMetadata.md b/docs/Models/Components/OrganizationMembershipOrganizationPublicMetadata.md deleted file mode 100644 index 7040de0..0000000 --- a/docs/Models/Components/OrganizationMembershipOrganizationPublicMetadata.md +++ /dev/null @@ -1,7 +0,0 @@ -# OrganizationMembershipOrganizationPublicMetadata - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/Models/Components/OrganizationMembershipPrivateMetadata.md b/docs/Models/Components/OrganizationMembershipPrivateMetadata.md deleted file mode 100644 index 82b7b53..0000000 --- a/docs/Models/Components/OrganizationMembershipPrivateMetadata.md +++ /dev/null @@ -1,9 +0,0 @@ -# OrganizationMembershipPrivateMetadata - -Metadata saved on the organization membership, accessible only from the Backend API - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/Models/Components/OrganizationMembershipPublicMetadata.md b/docs/Models/Components/OrganizationMembershipPublicMetadata.md deleted file mode 100644 index e9197dd..0000000 --- a/docs/Models/Components/OrganizationMembershipPublicMetadata.md +++ /dev/null @@ -1,9 +0,0 @@ -# OrganizationMembershipPublicMetadata - -Metadata saved on the organization membership, accessible from both Frontend and Backend APIs - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/Models/Components/OrganizationPrivateMetadata.md b/docs/Models/Components/OrganizationPrivateMetadata.md deleted file mode 100644 index a6c2475..0000000 --- a/docs/Models/Components/OrganizationPrivateMetadata.md +++ /dev/null @@ -1,7 +0,0 @@ -# OrganizationPrivateMetadata - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/Models/Components/OrganizationPublicMetadata.md b/docs/Models/Components/OrganizationPublicMetadata.md deleted file mode 100644 index 9beca5e..0000000 --- a/docs/Models/Components/OrganizationPublicMetadata.md +++ /dev/null @@ -1,7 +0,0 @@ -# OrganizationPublicMetadata - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/Models/Components/OrganizationWithLogo.md b/docs/Models/Components/OrganizationWithLogo.md index 6e3d3c7..7f6d4aa 100644 --- a/docs/Models/Components/OrganizationWithLogo.md +++ b/docs/Models/Components/OrganizationWithLogo.md @@ -10,8 +10,8 @@ | `name` | *string* | :heavy_check_mark: | N/A | | `slug` | *string* | :heavy_check_mark: | N/A | | `maxAllowedMemberships` | *int* | :heavy_check_mark: | N/A | -| `publicMetadata` | [Components\OrganizationWithLogoPublicMetadata](../../Models/Components/OrganizationWithLogoPublicMetadata.md) | :heavy_check_mark: | N/A | -| `privateMetadata` | [Components\OrganizationWithLogoPrivateMetadata](../../Models/Components/OrganizationWithLogoPrivateMetadata.md) | :heavy_check_mark: | N/A | +| `publicMetadata` | array | :heavy_check_mark: | N/A | +| `privateMetadata` | array | :heavy_check_mark: | N/A | | `createdAt` | *int* | :heavy_check_mark: | Unix timestamp of creation.
| | `updatedAt` | *int* | :heavy_check_mark: | Unix timestamp of last update.
| | `imageUrl` | *string* | :heavy_check_mark: | N/A | diff --git a/docs/Models/Components/OrganizationWithLogoPrivateMetadata.md b/docs/Models/Components/OrganizationWithLogoPrivateMetadata.md deleted file mode 100644 index 3c6b8d7..0000000 --- a/docs/Models/Components/OrganizationWithLogoPrivateMetadata.md +++ /dev/null @@ -1,7 +0,0 @@ -# OrganizationWithLogoPrivateMetadata - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/Models/Components/OrganizationWithLogoPublicMetadata.md b/docs/Models/Components/OrganizationWithLogoPublicMetadata.md deleted file mode 100644 index fb7c525..0000000 --- a/docs/Models/Components/OrganizationWithLogoPublicMetadata.md +++ /dev/null @@ -1,7 +0,0 @@ -# OrganizationWithLogoPublicMetadata - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/Models/Components/Passkey.md b/docs/Models/Components/Passkey.md index c76fe0b..5623155 100644 --- a/docs/Models/Components/Passkey.md +++ b/docs/Models/Components/Passkey.md @@ -7,6 +7,6 @@ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | | `status` | [Components\PasskeyVerificationStatus](../../Models/Components/PasskeyVerificationStatus.md) | :heavy_check_mark: | N/A | | `strategy` | [Components\PasskeyVerificationStrategy](../../Models/Components/PasskeyVerificationStrategy.md) | :heavy_check_mark: | N/A | -| `nonce` | [?Components\VerificationNonce](../../Models/Components/VerificationNonce.md) | :heavy_minus_sign: | N/A | +| `nonce` | [?Components\Nonce](../../Models/Components/Nonce.md) | :heavy_minus_sign: | N/A | | `attempts` | *?int* | :heavy_minus_sign: | N/A | | `expireAt` | *?int* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Components/PrivateMetadata.md b/docs/Models/Components/PrivateMetadata.md deleted file mode 100644 index 133ba7d..0000000 --- a/docs/Models/Components/PrivateMetadata.md +++ /dev/null @@ -1,7 +0,0 @@ -# PrivateMetadata - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/Models/Components/PublicMetadata.md b/docs/Models/Components/PublicMetadata.md deleted file mode 100644 index b994731..0000000 --- a/docs/Models/Components/PublicMetadata.md +++ /dev/null @@ -1,7 +0,0 @@ -# PublicMetadata - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/Models/Components/PublicOrganizationData.md b/docs/Models/Components/PublicOrganizationData.md new file mode 100644 index 0000000..72c0007 --- /dev/null +++ b/docs/Models/Components/PublicOrganizationData.md @@ -0,0 +1,12 @@ +# PublicOrganizationData + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `id` | *?string* | :heavy_minus_sign: | N/A | +| `name` | *?string* | :heavy_minus_sign: | N/A | +| `slug` | *?string* | :heavy_minus_sign: | N/A | +| `imageUrl` | *?string* | :heavy_minus_sign: | N/A | +| `hasImage` | *?bool* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Components/SAMLAccount.md b/docs/Models/Components/SAMLAccount.md index 49b4d3c..e5db0d9 100644 --- a/docs/Models/Components/SAMLAccount.md +++ b/docs/Models/Components/SAMLAccount.md @@ -3,15 +3,16 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | -| `id` | *string* | :heavy_check_mark: | N/A | -| `object` | [Components\SAMLAccountObject](../../Models/Components/SAMLAccountObject.md) | :heavy_check_mark: | String representing the object's type. Objects of the same type share the same value.
| -| `provider` | *string* | :heavy_check_mark: | N/A | -| `active` | *bool* | :heavy_check_mark: | N/A | -| `emailAddress` | *string* | :heavy_check_mark: | N/A | -| `publicMetadata` | [?Components\SAMLAccountPublicMetadata](../../Models/Components/SAMLAccountPublicMetadata.md) | :heavy_minus_sign: | N/A | -| `verification` | [Components\Saml\|Components\Ticket](../../Models/Components/SAMLAccountVerification.md) | :heavy_check_mark: | N/A | -| `firstName` | *?string* | :heavy_minus_sign: | N/A | -| `lastName` | *?string* | :heavy_minus_sign: | N/A | -| `providerUserId` | *?string* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | N/A | +| `object` | [Components\SAMLAccountObject](../../Models/Components/SAMLAccountObject.md) | :heavy_check_mark: | String representing the object's type. Objects of the same type share the same value.
| +| `provider` | *string* | :heavy_check_mark: | N/A | +| `active` | *bool* | :heavy_check_mark: | N/A | +| `emailAddress` | *string* | :heavy_check_mark: | N/A | +| `publicMetadata` | array | :heavy_minus_sign: | N/A | +| `verification` | [Components\Saml\|Components\Ticket](../../Models/Components/SAMLAccountVerification.md) | :heavy_check_mark: | N/A | +| `firstName` | *?string* | :heavy_minus_sign: | N/A | +| `lastName` | *?string* | :heavy_minus_sign: | N/A | +| `providerUserId` | *?string* | :heavy_minus_sign: | N/A | +| `samlConnection` | [?Components\SAMLConnectionSAMLConnection](../../Models/Components/SamlConnection.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Components/SAMLAccountPublicMetadata.md b/docs/Models/Components/SAMLAccountPublicMetadata.md deleted file mode 100644 index 9ff4040..0000000 --- a/docs/Models/Components/SAMLAccountPublicMetadata.md +++ /dev/null @@ -1,7 +0,0 @@ -# SAMLAccountPublicMetadata - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/Models/Components/SAMLConnection.md b/docs/Models/Components/SAMLConnection.md index 709a8bc..4a8e842 100644 --- a/docs/Models/Components/SAMLConnection.md +++ b/docs/Models/Components/SAMLConnection.md @@ -1,28 +1,11 @@ -# SAMLConnection +# SamlConnection -## Fields +## Supported Types + +### `Components\SAMLConnectionSAMLConnection` + +```php +Components\SAMLConnectionSAMLConnection $value = /* values here */ +``` -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | -| `object` | [Components\SAMLConnectionObject](../../Models/Components/SAMLConnectionObject.md) | :heavy_check_mark: | N/A | -| `id` | *string* | :heavy_check_mark: | N/A | -| `name` | *string* | :heavy_check_mark: | N/A | -| `domain` | *string* | :heavy_check_mark: | N/A | -| `acsUrl` | *string* | :heavy_check_mark: | N/A | -| `spEntityId` | *string* | :heavy_check_mark: | N/A | -| `spMetadataUrl` | *string* | :heavy_check_mark: | N/A | -| `active` | *bool* | :heavy_check_mark: | N/A | -| `provider` | *string* | :heavy_check_mark: | N/A | -| `userCount` | *int* | :heavy_check_mark: | N/A | -| `syncUserAttributes` | *bool* | :heavy_check_mark: | N/A | -| `createdAt` | *int* | :heavy_check_mark: | Unix timestamp of creation.
| -| `updatedAt` | *int* | :heavy_check_mark: | Unix timestamp of last update.
| -| `idpEntityId` | *string* | :heavy_check_mark: | N/A | -| `idpSsoUrl` | *string* | :heavy_check_mark: | N/A | -| `idpCertificate` | *string* | :heavy_check_mark: | N/A | -| `attributeMapping` | [?Components\AttributeMapping](../../Models/Components/AttributeMapping.md) | :heavy_minus_sign: | N/A | -| `allowSubdomains` | *?bool* | :heavy_minus_sign: | N/A | -| `allowIdpInitiated` | *?bool* | :heavy_minus_sign: | N/A | -| `idpMetadataUrl` | *?string* | :heavy_minus_sign: | N/A | -| `idpMetadata` | *?string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Components/SAMLConnectionSAMLConnection.md b/docs/Models/Components/SAMLConnectionSAMLConnection.md new file mode 100644 index 0000000..de0cb10 --- /dev/null +++ b/docs/Models/Components/SAMLConnectionSAMLConnection.md @@ -0,0 +1,18 @@ +# SAMLConnectionSAMLConnection + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | +| `id` | *string* | :heavy_check_mark: | N/A | +| `name` | *string* | :heavy_check_mark: | N/A | +| `domain` | *string* | :heavy_check_mark: | N/A | +| `active` | *bool* | :heavy_check_mark: | N/A | +| `provider` | *string* | :heavy_check_mark: | N/A | +| `syncUserAttributes` | *bool* | :heavy_check_mark: | N/A | +| `createdAt` | *int* | :heavy_check_mark: | Unix timestamp of creation.
| +| `updatedAt` | *int* | :heavy_check_mark: | Unix timestamp of last update.
| +| `allowSubdomains` | *?bool* | :heavy_minus_sign: | N/A | +| `allowIdpInitiated` | *?bool* | :heavy_minus_sign: | N/A | +| `disableAdditionalIdentifications` | *?bool* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Components/SAMLConnections.md b/docs/Models/Components/SAMLConnections.md index 17eecbf..4033620 100644 --- a/docs/Models/Components/SAMLConnections.md +++ b/docs/Models/Components/SAMLConnections.md @@ -5,7 +5,7 @@ A list of SAML Connections ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -| `data` | array<[Components\SAMLConnection](../../Models/Components/SAMLConnection.md)> | :heavy_check_mark: | N/A | -| `totalCount` | *int* | :heavy_check_mark: | Total number of SAML Connections
| \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| `data` | array<[Components\SchemasSAMLConnection](../../Models/Components/SchemasSAMLConnection.md)> | :heavy_check_mark: | N/A | +| `totalCount` | *int* | :heavy_check_mark: | Total number of SAML Connections
| \ No newline at end of file diff --git a/docs/Models/Components/SchemasSAMLConnection.md b/docs/Models/Components/SchemasSAMLConnection.md new file mode 100644 index 0000000..f06140f --- /dev/null +++ b/docs/Models/Components/SchemasSAMLConnection.md @@ -0,0 +1,29 @@ +# SchemasSAMLConnection + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `object` | [Components\SchemasSAMLConnectionObject](../../Models/Components/SchemasSAMLConnectionObject.md) | :heavy_check_mark: | N/A | +| `id` | *string* | :heavy_check_mark: | N/A | +| `name` | *string* | :heavy_check_mark: | N/A | +| `domain` | *string* | :heavy_check_mark: | N/A | +| `acsUrl` | *string* | :heavy_check_mark: | N/A | +| `spEntityId` | *string* | :heavy_check_mark: | N/A | +| `spMetadataUrl` | *string* | :heavy_check_mark: | N/A | +| `active` | *bool* | :heavy_check_mark: | N/A | +| `provider` | *string* | :heavy_check_mark: | N/A | +| `userCount` | *int* | :heavy_check_mark: | N/A | +| `syncUserAttributes` | *bool* | :heavy_check_mark: | N/A | +| `createdAt` | *int* | :heavy_check_mark: | Unix timestamp of creation.
| +| `updatedAt` | *int* | :heavy_check_mark: | Unix timestamp of last update.
| +| `idpEntityId` | *string* | :heavy_check_mark: | N/A | +| `idpSsoUrl` | *string* | :heavy_check_mark: | N/A | +| `idpCertificate` | *string* | :heavy_check_mark: | N/A | +| `attributeMapping` | [?Components\AttributeMapping](../../Models/Components/AttributeMapping.md) | :heavy_minus_sign: | N/A | +| `allowSubdomains` | *?bool* | :heavy_minus_sign: | N/A | +| `allowIdpInitiated` | *?bool* | :heavy_minus_sign: | N/A | +| `disableAdditionalIdentifications` | *?bool* | :heavy_minus_sign: | N/A | +| `idpMetadataUrl` | *?string* | :heavy_minus_sign: | N/A | +| `idpMetadata` | *?string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Components/SAMLConnectionObject.md b/docs/Models/Components/SchemasSAMLConnectionObject.md similarity index 81% rename from docs/Models/Components/SAMLConnectionObject.md rename to docs/Models/Components/SchemasSAMLConnectionObject.md index 947b574..4d9ba28 100644 --- a/docs/Models/Components/SAMLConnectionObject.md +++ b/docs/Models/Components/SchemasSAMLConnectionObject.md @@ -1,4 +1,4 @@ -# SAMLConnectionObject +# SchemasSAMLConnectionObject ## Values diff --git a/docs/Models/Components/Session.md b/docs/Models/Components/Session.md index 5cf36da..6e1c3d3 100644 --- a/docs/Models/Components/Session.md +++ b/docs/Models/Components/Session.md @@ -16,4 +16,5 @@ | `updatedAt` | *int* | :heavy_check_mark: | Unix timestamp of last update.
| | `createdAt` | *int* | :heavy_check_mark: | Unix timestamp of creation.
| | `actor` | [?Components\Actor](../../Models/Components/Actor.md) | :heavy_minus_sign: | N/A | -| `lastActiveOrganizationId` | *?string* | :heavy_minus_sign: | N/A | \ No newline at end of file +| `lastActiveOrganizationId` | *?string* | :heavy_minus_sign: | N/A | +| `latestActivity` | [?Components\LatestActivity](../../Models/Components/LatestActivity.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Components/SignUp.md b/docs/Models/Components/SignUp.md index 8f6b4b1..ce872ba 100644 --- a/docs/Models/Components/SignUp.md +++ b/docs/Models/Components/SignUp.md @@ -5,28 +5,28 @@ Success ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | -| `object` | [Components\SignUpObject](../../Models/Components/SignUpObject.md) | :heavy_check_mark: | N/A | -| `id` | *string* | :heavy_check_mark: | N/A | -| `status` | [Components\SignUpStatus](../../Models/Components/SignUpStatus.md) | :heavy_check_mark: | N/A | -| `passwordEnabled` | *bool* | :heavy_check_mark: | N/A | -| `customAction` | *bool* | :heavy_check_mark: | N/A | -| `abandonAt` | *int* | :heavy_check_mark: | N/A | -| `requiredFields` | array<*string*> | :heavy_minus_sign: | N/A | -| `optionalFields` | array<*string*> | :heavy_minus_sign: | N/A | -| `missingFields` | array<*string*> | :heavy_minus_sign: | N/A | -| `unverifiedFields` | array<*string*> | :heavy_minus_sign: | N/A | -| `verifications` | [?Components\Verifications](../../Models/Components/Verifications.md) | :heavy_minus_sign: | N/A | -| `unsafeMetadata` | [?Components\SignUpUnsafeMetadata](../../Models/Components/SignUpUnsafeMetadata.md) | :heavy_minus_sign: | N/A | -| `publicMetadata` | [?Components\SignUpPublicMetadata](../../Models/Components/SignUpPublicMetadata.md) | :heavy_minus_sign: | N/A | -| `externalAccount` | [?Components\ExternalAccount](../../Models/Components/ExternalAccount.md) | :heavy_minus_sign: | N/A | -| `username` | *?string* | :heavy_minus_sign: | N/A | -| `emailAddress` | *?string* | :heavy_minus_sign: | N/A | -| `phoneNumber` | *?string* | :heavy_minus_sign: | N/A | -| `web3Wallet` | *?string* | :heavy_minus_sign: | N/A | -| `firstName` | *?string* | :heavy_minus_sign: | N/A | -| `lastName` | *?string* | :heavy_minus_sign: | N/A | -| `externalId` | *?string* | :heavy_minus_sign: | N/A | -| `createdSessionId` | *?string* | :heavy_minus_sign: | N/A | -| `createdUserId` | *?string* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `object` | [Components\SignUpObject](../../Models/Components/SignUpObject.md) | :heavy_check_mark: | N/A | +| `id` | *string* | :heavy_check_mark: | N/A | +| `status` | [Components\SignUpStatus](../../Models/Components/SignUpStatus.md) | :heavy_check_mark: | N/A | +| `passwordEnabled` | *bool* | :heavy_check_mark: | N/A | +| `customAction` | *bool* | :heavy_check_mark: | N/A | +| `abandonAt` | *int* | :heavy_check_mark: | N/A | +| `requiredFields` | array<*string*> | :heavy_minus_sign: | N/A | +| `optionalFields` | array<*string*> | :heavy_minus_sign: | N/A | +| `missingFields` | array<*string*> | :heavy_minus_sign: | N/A | +| `unverifiedFields` | array<*string*> | :heavy_minus_sign: | N/A | +| `verifications` | [?Components\Verifications](../../Models/Components/Verifications.md) | :heavy_minus_sign: | N/A | +| `unsafeMetadata` | array | :heavy_minus_sign: | N/A | +| `publicMetadata` | array | :heavy_minus_sign: | N/A | +| `externalAccount` | [?Components\ExternalAccount](../../Models/Components/ExternalAccount.md) | :heavy_minus_sign: | N/A | +| `username` | *?string* | :heavy_minus_sign: | N/A | +| `emailAddress` | *?string* | :heavy_minus_sign: | N/A | +| `phoneNumber` | *?string* | :heavy_minus_sign: | N/A | +| `web3Wallet` | *?string* | :heavy_minus_sign: | N/A | +| `firstName` | *?string* | :heavy_minus_sign: | N/A | +| `lastName` | *?string* | :heavy_minus_sign: | N/A | +| `externalId` | *?string* | :heavy_minus_sign: | N/A | +| `createdSessionId` | *?string* | :heavy_minus_sign: | N/A | +| `createdUserId` | *?string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Components/SignUpPublicMetadata.md b/docs/Models/Components/SignUpPublicMetadata.md deleted file mode 100644 index 7e9e611..0000000 --- a/docs/Models/Components/SignUpPublicMetadata.md +++ /dev/null @@ -1,7 +0,0 @@ -# SignUpPublicMetadata - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/Models/Components/SignUpUnsafeMetadata.md b/docs/Models/Components/SignUpUnsafeMetadata.md deleted file mode 100644 index 8a47b7e..0000000 --- a/docs/Models/Components/SignUpUnsafeMetadata.md +++ /dev/null @@ -1,7 +0,0 @@ -# SignUpUnsafeMetadata - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/Models/Components/Strategy.md b/docs/Models/Components/Strategy.md index 123f816..485d902 100644 --- a/docs/Models/Components/Strategy.md +++ b/docs/Models/Components/Strategy.md @@ -7,4 +7,10 @@ | ------------------------- | ------------------------- | | `PhoneCode` | phone_code | | `EmailCode` | email_code | -| `ResetPasswordEmailCode` | reset_password_email_code | \ No newline at end of file +| `EmailLink` | email_link | +| `ResetPasswordEmailCode` | reset_password_email_code | +| `FromOauthDiscord` | from_oauth_discord | +| `FromOauthGoogle` | from_oauth_google | +| `FromOauthApple` | from_oauth_apple | +| `FromOauthMicrosoft` | from_oauth_microsoft | +| `FromOauthGithub` | from_oauth_github | \ No newline at end of file diff --git a/docs/Models/Components/Type.md b/docs/Models/Components/Type.md index e4fba62..d0762fe 100644 --- a/docs/Models/Components/Type.md +++ b/docs/Models/Components/Type.md @@ -3,8 +3,12 @@ ## Values -| Name | Value | -| ------------- | ------------- | -| `OauthGoogle` | oauth_google | -| `OauthMock` | oauth_mock | -| `Saml` | saml | \ No newline at end of file +| Name | Value | +| ---------------- | ---------------- | +| `OauthGoogle` | oauth_google | +| `OauthMock` | oauth_mock | +| `Saml` | saml | +| `OauthApple` | oauth_apple | +| `OauthDiscord` | oauth_discord | +| `OauthMicrosoft` | oauth_microsoft | +| `OauthGithub` | oauth_github | \ No newline at end of file diff --git a/docs/Models/Components/UnsafeMetadata.md b/docs/Models/Components/UnsafeMetadata.md deleted file mode 100644 index cf94d10..0000000 --- a/docs/Models/Components/UnsafeMetadata.md +++ /dev/null @@ -1,7 +0,0 @@ -# UnsafeMetadata - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/Models/Components/User.md b/docs/Models/Components/User.md index c9c3691..17155fa 100644 --- a/docs/Models/Components/User.md +++ b/docs/Models/Components/User.md @@ -12,8 +12,8 @@ Success | ~~`profileImageUrl`~~ | *?string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | | | `imageUrl` | *?string* | :heavy_minus_sign: | N/A | | | `hasImage` | *?bool* | :heavy_minus_sign: | N/A | | -| `publicMetadata` | [?Components\PublicMetadata](../../Models/Components/PublicMetadata.md) | :heavy_minus_sign: | N/A | | -| `unsafeMetadata` | [?Components\UnsafeMetadata](../../Models/Components/UnsafeMetadata.md) | :heavy_minus_sign: | N/A | | +| `publicMetadata` | array | :heavy_minus_sign: | N/A | | +| `unsafeMetadata` | array | :heavy_minus_sign: | N/A | | | `emailAddresses` | array<[Components\EmailAddress](../../Models/Components/EmailAddress.md)> | :heavy_minus_sign: | N/A | | | `phoneNumbers` | array<[Components\PhoneNumber](../../Models/Components/PhoneNumber.md)> | :heavy_minus_sign: | N/A | | | `web3Wallets` | array<[Components\Web3Wallet](../../Models/Components/Web3Wallet.md)> | :heavy_minus_sign: | N/A | | @@ -37,10 +37,12 @@ Success | `username` | *?string* | :heavy_minus_sign: | N/A | | | `firstName` | *?string* | :heavy_minus_sign: | N/A | | | `lastName` | *?string* | :heavy_minus_sign: | N/A | | -| `privateMetadata` | [?Components\PrivateMetadata](../../Models/Components/PrivateMetadata.md) | :heavy_minus_sign: | N/A | | +| `privateMetadata` | array | :heavy_minus_sign: | N/A | | | `mfaEnabledAt` | *?int* | :heavy_minus_sign: | 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.
| | | `mfaDisabledAt` | *?int* | :heavy_minus_sign: | 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.
| | | `lastSignInAt` | *?int* | :heavy_minus_sign: | Unix timestamp of last sign-in.
| | | `lockoutExpiresInSeconds` | *?int* | :heavy_minus_sign: | The number of seconds remaining until the lockout period expires for a locked user. A null value for a locked user indicates that lockout never expires.
| | | `verificationAttemptsRemaining` | *?int* | :heavy_minus_sign: | The number of verification attempts remaining until the user is locked. Null if account lockout is not enabled. Note: if a user is locked explicitly via the Backend API, they may still have verification attempts remaining.
| | -| `lastActiveAt` | *?int* | :heavy_minus_sign: | Unix timestamp of the latest session activity, with day precision.
| 1700690400000 | \ No newline at end of file +| `createOrganizationsLimit` | *?int* | :heavy_minus_sign: | The maximum number of organizations the user can create. 0 means unlimited.
| | +| `lastActiveAt` | *?int* | :heavy_minus_sign: | Unix timestamp of the latest session activity, with day precision.
| 1700690400000 | +| `legalAcceptedAt` | *?int* | :heavy_minus_sign: | Unix timestamp of when the user accepted the legal requirements.
| 1700690400000 | \ No newline at end of file diff --git a/docs/Models/Components/VerificationNonce.md b/docs/Models/Components/VerificationNonce.md deleted file mode 100644 index f4c3ae6..0000000 --- a/docs/Models/Components/VerificationNonce.md +++ /dev/null @@ -1,8 +0,0 @@ -# VerificationNonce - - -## Values - -| Name | Value | -| ------- | ------- | -| `Nonce` | nonce | \ No newline at end of file diff --git a/docs/Models/Components/Web3Signature.md b/docs/Models/Components/Web3Signature.md index ec6ce3d..9e04811 100644 --- a/docs/Models/Components/Web3Signature.md +++ b/docs/Models/Components/Web3Signature.md @@ -7,6 +7,7 @@ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | | `status` | [Components\Web3SignatureVerificationStatus](../../Models/Components/Web3SignatureVerificationStatus.md) | :heavy_check_mark: | N/A | | `strategy` | [Components\Web3SignatureVerificationStrategy](../../Models/Components/Web3SignatureVerificationStrategy.md) | :heavy_check_mark: | N/A | -| `nonce` | [Components\Nonce](../../Models/Components/Nonce.md) | :heavy_check_mark: | N/A | +| `nonce` | *?string* | :heavy_minus_sign: | N/A | +| `message` | *?string* | :heavy_minus_sign: | N/A | | `attempts` | *?int* | :heavy_minus_sign: | N/A | | `expireAt` | *?int* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Components/Web3SignatureVerificationStatus.md b/docs/Models/Components/Web3SignatureVerificationStatus.md index 29b0ac8..f240f0e 100644 --- a/docs/Models/Components/Web3SignatureVerificationStatus.md +++ b/docs/Models/Components/Web3SignatureVerificationStatus.md @@ -3,6 +3,9 @@ ## Values -| Name | Value | -| ---------- | ---------- | -| `Verified` | verified | \ No newline at end of file +| Name | Value | +| ------------ | ------------ | +| `Unverified` | unverified | +| `Verified` | verified | +| `Failed` | failed | +| `Expired` | expired | \ No newline at end of file diff --git a/docs/Models/Components/Web3SignatureVerificationStrategy.md b/docs/Models/Components/Web3SignatureVerificationStrategy.md index a8942c2..92ca751 100644 --- a/docs/Models/Components/Web3SignatureVerificationStrategy.md +++ b/docs/Models/Components/Web3SignatureVerificationStrategy.md @@ -3,6 +3,7 @@ ## Values -| Name | Value | -| ----------------------- | ----------------------- | -| `Web3MetamaskSignature` | web3_metamask_signature | \ No newline at end of file +| Name | Value | +| ------------------------------ | ------------------------------ | +| `Web3MetamaskSignature` | web3_metamask_signature | +| `Web3CoinbaseWalletSignature` | web3_coinbase_wallet_signature | \ No newline at end of file diff --git a/docs/Models/Components/WellKnownJWKS.md b/docs/Models/Components/WellKnownJWKS.md new file mode 100644 index 0000000..75e7bdf --- /dev/null +++ b/docs/Models/Components/WellKnownJWKS.md @@ -0,0 +1,10 @@ +# WellKnownJWKS + +Get the JSON Web Key Set + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | +| `keys` | array<[Components\Keys](../../Models/Components/Keys.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Errors/ClerkErrors100.md b/docs/Models/Errors/ClerkErrors100.md new file mode 100644 index 0000000..3608e07 --- /dev/null +++ b/docs/Models/Errors/ClerkErrors100.md @@ -0,0 +1,11 @@ +# ClerkErrors100 + +Payment required + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `errors` | array<[Components\ClerkError](../../Models/Components/ClerkError.md)> | :heavy_check_mark: | N/A | +| `meta` | [?Errors\Meta](../../Models/Errors/Meta.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Errors/ClerkErrors101.md b/docs/Models/Errors/ClerkErrors101.md new file mode 100644 index 0000000..e4f019c --- /dev/null +++ b/docs/Models/Errors/ClerkErrors101.md @@ -0,0 +1,11 @@ +# ClerkErrors101 + +Payment required + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `errors` | array<[Components\ClerkError](../../Models/Components/ClerkError.md)> | :heavy_check_mark: | N/A | +| `meta` | [?Errors\Meta](../../Models/Errors/Meta.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Errors/ClerkErrors102.md b/docs/Models/Errors/ClerkErrors102.md new file mode 100644 index 0000000..e4989ce --- /dev/null +++ b/docs/Models/Errors/ClerkErrors102.md @@ -0,0 +1,11 @@ +# ClerkErrors102 + +Payment required + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `errors` | array<[Components\ClerkError](../../Models/Components/ClerkError.md)> | :heavy_check_mark: | N/A | +| `meta` | [?Errors\Meta](../../Models/Errors/Meta.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Errors/ClerkErrors103.md b/docs/Models/Errors/ClerkErrors103.md new file mode 100644 index 0000000..2a40420 --- /dev/null +++ b/docs/Models/Errors/ClerkErrors103.md @@ -0,0 +1,11 @@ +# ClerkErrors103 + +Payment required + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `errors` | array<[Components\ClerkError](../../Models/Components/ClerkError.md)> | :heavy_check_mark: | N/A | +| `meta` | [?Errors\Meta](../../Models/Errors/Meta.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Errors/ClerkErrors104.md b/docs/Models/Errors/ClerkErrors104.md new file mode 100644 index 0000000..94a25a9 --- /dev/null +++ b/docs/Models/Errors/ClerkErrors104.md @@ -0,0 +1,11 @@ +# ClerkErrors104 + +Request was not successful + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `errors` | array<[Components\ClerkError](../../Models/Components/ClerkError.md)> | :heavy_check_mark: | N/A | +| `meta` | [?Errors\Meta](../../Models/Errors/Meta.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Errors/ClerkErrors36.md b/docs/Models/Errors/ClerkErrors36.md index d0a30bc..c4cf413 100644 --- a/docs/Models/Errors/ClerkErrors36.md +++ b/docs/Models/Errors/ClerkErrors36.md @@ -1,6 +1,6 @@ # ClerkErrors36 -Authentication invalid +Resource not found ## Fields diff --git a/docs/Models/Errors/ClerkErrors37.md b/docs/Models/Errors/ClerkErrors37.md index b975b1c..ecc31e0 100644 --- a/docs/Models/Errors/ClerkErrors37.md +++ b/docs/Models/Errors/ClerkErrors37.md @@ -1,6 +1,6 @@ # ClerkErrors37 -Request was not successful +Authorization invalid ## Fields diff --git a/docs/Models/Errors/ClerkErrors38.md b/docs/Models/Errors/ClerkErrors38.md index b70590a..85b35ea 100644 --- a/docs/Models/Errors/ClerkErrors38.md +++ b/docs/Models/Errors/ClerkErrors38.md @@ -1,6 +1,6 @@ # ClerkErrors38 -Payment required +Request was not successful ## Fields diff --git a/docs/Models/Errors/ClerkErrors39.md b/docs/Models/Errors/ClerkErrors39.md index a5f3bf7..05ef829 100644 --- a/docs/Models/Errors/ClerkErrors39.md +++ b/docs/Models/Errors/ClerkErrors39.md @@ -1,6 +1,6 @@ # ClerkErrors39 -Authentication invalid +Request was not successful ## Fields diff --git a/docs/Models/Errors/ClerkErrors40.md b/docs/Models/Errors/ClerkErrors40.md index 691e08e..4de7aa3 100644 --- a/docs/Models/Errors/ClerkErrors40.md +++ b/docs/Models/Errors/ClerkErrors40.md @@ -1,6 +1,6 @@ # ClerkErrors40 -Request was not successful +Resource not found ## Fields diff --git a/docs/Models/Errors/ClerkErrors41.md b/docs/Models/Errors/ClerkErrors41.md index 1c98ffd..c1f44d1 100644 --- a/docs/Models/Errors/ClerkErrors41.md +++ b/docs/Models/Errors/ClerkErrors41.md @@ -1,6 +1,6 @@ # ClerkErrors41 -Payment required +Request was not successful ## Fields diff --git a/docs/Models/Errors/ClerkErrors42.md b/docs/Models/Errors/ClerkErrors42.md index 10bc66a..ff151dc 100644 --- a/docs/Models/Errors/ClerkErrors42.md +++ b/docs/Models/Errors/ClerkErrors42.md @@ -1,6 +1,6 @@ # ClerkErrors42 -Payment required +Request was not successful ## Fields diff --git a/docs/Models/Errors/ClerkErrors45.md b/docs/Models/Errors/ClerkErrors45.md index 85386d5..11aa00d 100644 --- a/docs/Models/Errors/ClerkErrors45.md +++ b/docs/Models/Errors/ClerkErrors45.md @@ -1,6 +1,6 @@ # ClerkErrors45 -Request was not successful +Authentication invalid ## Fields diff --git a/docs/Models/Errors/ClerkErrors47.md b/docs/Models/Errors/ClerkErrors47.md index f80bd35..816be43 100644 --- a/docs/Models/Errors/ClerkErrors47.md +++ b/docs/Models/Errors/ClerkErrors47.md @@ -1,6 +1,6 @@ # ClerkErrors47 -Request was not successful +Payment required ## Fields diff --git a/docs/Models/Errors/ClerkErrors48.md b/docs/Models/Errors/ClerkErrors48.md index 64c5059..a4982ef 100644 --- a/docs/Models/Errors/ClerkErrors48.md +++ b/docs/Models/Errors/ClerkErrors48.md @@ -1,6 +1,6 @@ # ClerkErrors48 -Request was not successful +Authentication invalid ## Fields diff --git a/docs/Models/Errors/ClerkErrors49.md b/docs/Models/Errors/ClerkErrors49.md index 546b440..1087c50 100644 --- a/docs/Models/Errors/ClerkErrors49.md +++ b/docs/Models/Errors/ClerkErrors49.md @@ -1,6 +1,6 @@ # ClerkErrors49 -Invalid request parameters +Request was not successful ## Fields diff --git a/docs/Models/Errors/ClerkErrors50.md b/docs/Models/Errors/ClerkErrors50.md index 0e3d1f3..eafa4cc 100644 --- a/docs/Models/Errors/ClerkErrors50.md +++ b/docs/Models/Errors/ClerkErrors50.md @@ -1,6 +1,6 @@ # ClerkErrors50 -Request was not successful +Payment required ## Fields diff --git a/docs/Models/Errors/ClerkErrors54.md b/docs/Models/Errors/ClerkErrors54.md index 991ea6c..173abb6 100644 --- a/docs/Models/Errors/ClerkErrors54.md +++ b/docs/Models/Errors/ClerkErrors54.md @@ -1,6 +1,6 @@ # ClerkErrors54 -Resource not found +Request was not successful ## Fields diff --git a/docs/Models/Errors/ClerkErrors56.md b/docs/Models/Errors/ClerkErrors56.md index 10b16d9..b5c9f5d 100644 --- a/docs/Models/Errors/ClerkErrors56.md +++ b/docs/Models/Errors/ClerkErrors56.md @@ -1,6 +1,6 @@ # ClerkErrors56 -Authorization invalid +Request was not successful ## Fields diff --git a/docs/Models/Errors/ClerkErrors58.md b/docs/Models/Errors/ClerkErrors58.md index ff5da84..d691326 100644 --- a/docs/Models/Errors/ClerkErrors58.md +++ b/docs/Models/Errors/ClerkErrors58.md @@ -1,6 +1,6 @@ # ClerkErrors58 -Request was not successful +Invalid request parameters ## Fields diff --git a/docs/Models/Errors/ClerkErrors59.md b/docs/Models/Errors/ClerkErrors59.md index 7fa7519..7580a38 100644 --- a/docs/Models/Errors/ClerkErrors59.md +++ b/docs/Models/Errors/ClerkErrors59.md @@ -1,6 +1,6 @@ # ClerkErrors59 -Authorization invalid +Payment required ## Fields diff --git a/docs/Models/Errors/ClerkErrors60.md b/docs/Models/Errors/ClerkErrors60.md index 5c9a7ec..4dcd241 100644 --- a/docs/Models/Errors/ClerkErrors60.md +++ b/docs/Models/Errors/ClerkErrors60.md @@ -1,6 +1,6 @@ # ClerkErrors60 -Resource not found +Request was not successful ## Fields diff --git a/docs/Models/Errors/ClerkErrors61.md b/docs/Models/Errors/ClerkErrors61.md index 1cbb908..49abdb8 100644 --- a/docs/Models/Errors/ClerkErrors61.md +++ b/docs/Models/Errors/ClerkErrors61.md @@ -1,6 +1,6 @@ # ClerkErrors61 -Resource not found +Payment required ## Fields diff --git a/docs/Models/Errors/ClerkErrors63.md b/docs/Models/Errors/ClerkErrors63.md index 1b9ab49..9c054a4 100644 --- a/docs/Models/Errors/ClerkErrors63.md +++ b/docs/Models/Errors/ClerkErrors63.md @@ -1,6 +1,6 @@ # ClerkErrors63 -Resource not found +Request was not successful ## Fields diff --git a/docs/Models/Errors/ClerkErrors64.md b/docs/Models/Errors/ClerkErrors64.md index bdef0c7..343d195 100644 --- a/docs/Models/Errors/ClerkErrors64.md +++ b/docs/Models/Errors/ClerkErrors64.md @@ -1,6 +1,6 @@ # ClerkErrors64 -Request was not successful +Resource not found ## Fields diff --git a/docs/Models/Errors/ClerkErrors66.md b/docs/Models/Errors/ClerkErrors66.md index 5b97dc9..dcec963 100644 --- a/docs/Models/Errors/ClerkErrors66.md +++ b/docs/Models/Errors/ClerkErrors66.md @@ -1,6 +1,6 @@ # ClerkErrors66 -Request was not successful +Authorization invalid ## Fields diff --git a/docs/Models/Errors/ClerkErrors69.md b/docs/Models/Errors/ClerkErrors69.md index 55eb81b..216e10f 100644 --- a/docs/Models/Errors/ClerkErrors69.md +++ b/docs/Models/Errors/ClerkErrors69.md @@ -1,6 +1,6 @@ # ClerkErrors69 -Request was not successful +Authorization invalid ## Fields diff --git a/docs/Models/Errors/ClerkErrors70.md b/docs/Models/Errors/ClerkErrors70.md index 5d660dd..b6391e4 100644 --- a/docs/Models/Errors/ClerkErrors70.md +++ b/docs/Models/Errors/ClerkErrors70.md @@ -1,6 +1,6 @@ # ClerkErrors70 -Authentication invalid +Resource not found ## Fields diff --git a/docs/Models/Errors/ClerkErrors71.md b/docs/Models/Errors/ClerkErrors71.md index 87792d9..3527b54 100644 --- a/docs/Models/Errors/ClerkErrors71.md +++ b/docs/Models/Errors/ClerkErrors71.md @@ -1,6 +1,6 @@ # ClerkErrors71 -Request was not successful +Resource not found ## Fields diff --git a/docs/Models/Errors/ClerkErrors73.md b/docs/Models/Errors/ClerkErrors73.md index ccfdf96..ab138f9 100644 --- a/docs/Models/Errors/ClerkErrors73.md +++ b/docs/Models/Errors/ClerkErrors73.md @@ -1,6 +1,6 @@ # ClerkErrors73 -Request was not successful +Resource not found ## Fields diff --git a/docs/Models/Errors/ClerkErrors76.md b/docs/Models/Errors/ClerkErrors76.md index 02c7bcc..c4afad2 100644 --- a/docs/Models/Errors/ClerkErrors76.md +++ b/docs/Models/Errors/ClerkErrors76.md @@ -1,6 +1,6 @@ # ClerkErrors76 -Resource not found +Request was not successful ## Fields diff --git a/docs/Models/Errors/ClerkErrors77.md b/docs/Models/Errors/ClerkErrors77.md index 2abc606..c868e2f 100644 --- a/docs/Models/Errors/ClerkErrors77.md +++ b/docs/Models/Errors/ClerkErrors77.md @@ -1,6 +1,6 @@ # ClerkErrors77 -Resource not found +Request was not successful ## Fields diff --git a/docs/Models/Errors/ClerkErrors79.md b/docs/Models/Errors/ClerkErrors79.md index d443a63..739bd29 100644 --- a/docs/Models/Errors/ClerkErrors79.md +++ b/docs/Models/Errors/ClerkErrors79.md @@ -1,6 +1,6 @@ # ClerkErrors79 -Authorization invalid +Request was not successful ## Fields diff --git a/docs/Models/Errors/ClerkErrors80.md b/docs/Models/Errors/ClerkErrors80.md index afccace..da293f4 100644 --- a/docs/Models/Errors/ClerkErrors80.md +++ b/docs/Models/Errors/ClerkErrors80.md @@ -1,6 +1,6 @@ # ClerkErrors80 -Request was not successful +Authentication invalid ## Fields diff --git a/docs/Models/Errors/ClerkErrors81.md b/docs/Models/Errors/ClerkErrors81.md index 1feb02f..d120e73 100644 --- a/docs/Models/Errors/ClerkErrors81.md +++ b/docs/Models/Errors/ClerkErrors81.md @@ -1,6 +1,6 @@ # ClerkErrors81 -Authorization invalid +Request was not successful ## Fields diff --git a/docs/Models/Errors/ClerkErrors82.md b/docs/Models/Errors/ClerkErrors82.md index 6526e70..0407301 100644 --- a/docs/Models/Errors/ClerkErrors82.md +++ b/docs/Models/Errors/ClerkErrors82.md @@ -1,6 +1,6 @@ # ClerkErrors82 -Authorization invalid +Request was not successful ## Fields diff --git a/docs/Models/Errors/ClerkErrors83.md b/docs/Models/Errors/ClerkErrors83.md index eaa9a9b..0e76cba 100644 --- a/docs/Models/Errors/ClerkErrors83.md +++ b/docs/Models/Errors/ClerkErrors83.md @@ -1,6 +1,6 @@ # ClerkErrors83 -Authorization invalid +Request was not successful ## Fields diff --git a/docs/Models/Errors/ClerkErrors84.md b/docs/Models/Errors/ClerkErrors84.md index 2e63201..67e3253 100644 --- a/docs/Models/Errors/ClerkErrors84.md +++ b/docs/Models/Errors/ClerkErrors84.md @@ -1,6 +1,6 @@ # ClerkErrors84 -Authorization invalid +Request was not successful ## Fields diff --git a/docs/Models/Errors/ClerkErrors85.md b/docs/Models/Errors/ClerkErrors85.md index bce19d8..d251992 100644 --- a/docs/Models/Errors/ClerkErrors85.md +++ b/docs/Models/Errors/ClerkErrors85.md @@ -1,6 +1,6 @@ # ClerkErrors85 -Payment required +Authentication invalid ## Fields diff --git a/docs/Models/Errors/ClerkErrors86.md b/docs/Models/Errors/ClerkErrors86.md index 678ae43..92fb576 100644 --- a/docs/Models/Errors/ClerkErrors86.md +++ b/docs/Models/Errors/ClerkErrors86.md @@ -1,6 +1,6 @@ # ClerkErrors86 -Payment required +Request was not successful ## Fields diff --git a/docs/Models/Errors/ClerkErrors87.md b/docs/Models/Errors/ClerkErrors87.md index 666f212..3b51b00 100644 --- a/docs/Models/Errors/ClerkErrors87.md +++ b/docs/Models/Errors/ClerkErrors87.md @@ -1,6 +1,6 @@ # ClerkErrors87 -Payment required +Request was not successful ## Fields diff --git a/docs/Models/Errors/ClerkErrors88.md b/docs/Models/Errors/ClerkErrors88.md index ac5da15..c06b77d 100644 --- a/docs/Models/Errors/ClerkErrors88.md +++ b/docs/Models/Errors/ClerkErrors88.md @@ -1,6 +1,6 @@ # ClerkErrors88 -Payment required +Request was not successful ## Fields diff --git a/docs/Models/Errors/ClerkErrors89.md b/docs/Models/Errors/ClerkErrors89.md index bd32990..fe717ec 100644 --- a/docs/Models/Errors/ClerkErrors89.md +++ b/docs/Models/Errors/ClerkErrors89.md @@ -1,6 +1,6 @@ # ClerkErrors89 -Payment required +Request was not successful ## Fields diff --git a/docs/Models/Errors/ClerkErrors90.md b/docs/Models/Errors/ClerkErrors90.md new file mode 100644 index 0000000..f558329 --- /dev/null +++ b/docs/Models/Errors/ClerkErrors90.md @@ -0,0 +1,11 @@ +# ClerkErrors90 + +Resource not found + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `errors` | array<[Components\ClerkError](../../Models/Components/ClerkError.md)> | :heavy_check_mark: | N/A | +| `meta` | [?Errors\Meta](../../Models/Errors/Meta.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Errors/ClerkErrors91.md b/docs/Models/Errors/ClerkErrors91.md new file mode 100644 index 0000000..b18706c --- /dev/null +++ b/docs/Models/Errors/ClerkErrors91.md @@ -0,0 +1,11 @@ +# ClerkErrors91 + +Resource not found + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `errors` | array<[Components\ClerkError](../../Models/Components/ClerkError.md)> | :heavy_check_mark: | N/A | +| `meta` | [?Errors\Meta](../../Models/Errors/Meta.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Errors/ClerkErrors92.md b/docs/Models/Errors/ClerkErrors92.md new file mode 100644 index 0000000..1123d24 --- /dev/null +++ b/docs/Models/Errors/ClerkErrors92.md @@ -0,0 +1,11 @@ +# ClerkErrors92 + +Request was not successful + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `errors` | array<[Components\ClerkError](../../Models/Components/ClerkError.md)> | :heavy_check_mark: | N/A | +| `meta` | [?Errors\Meta](../../Models/Errors/Meta.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Errors/ClerkErrors93.md b/docs/Models/Errors/ClerkErrors93.md new file mode 100644 index 0000000..e71f500 --- /dev/null +++ b/docs/Models/Errors/ClerkErrors93.md @@ -0,0 +1,11 @@ +# ClerkErrors93 + +Authorization invalid + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `errors` | array<[Components\ClerkError](../../Models/Components/ClerkError.md)> | :heavy_check_mark: | N/A | +| `meta` | [?Errors\Meta](../../Models/Errors/Meta.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Errors/ClerkErrors94.md b/docs/Models/Errors/ClerkErrors94.md new file mode 100644 index 0000000..9c8803d --- /dev/null +++ b/docs/Models/Errors/ClerkErrors94.md @@ -0,0 +1,11 @@ +# ClerkErrors94 + +Request was not successful + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `errors` | array<[Components\ClerkError](../../Models/Components/ClerkError.md)> | :heavy_check_mark: | N/A | +| `meta` | [?Errors\Meta](../../Models/Errors/Meta.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Errors/ClerkErrors95.md b/docs/Models/Errors/ClerkErrors95.md new file mode 100644 index 0000000..4077d30 --- /dev/null +++ b/docs/Models/Errors/ClerkErrors95.md @@ -0,0 +1,11 @@ +# ClerkErrors95 + +Authorization invalid + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `errors` | array<[Components\ClerkError](../../Models/Components/ClerkError.md)> | :heavy_check_mark: | N/A | +| `meta` | [?Errors\Meta](../../Models/Errors/Meta.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Errors/ClerkErrors96.md b/docs/Models/Errors/ClerkErrors96.md new file mode 100644 index 0000000..61ebe43 --- /dev/null +++ b/docs/Models/Errors/ClerkErrors96.md @@ -0,0 +1,11 @@ +# ClerkErrors96 + +Authorization invalid + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `errors` | array<[Components\ClerkError](../../Models/Components/ClerkError.md)> | :heavy_check_mark: | N/A | +| `meta` | [?Errors\Meta](../../Models/Errors/Meta.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Errors/ClerkErrors97.md b/docs/Models/Errors/ClerkErrors97.md new file mode 100644 index 0000000..f8cbc86 --- /dev/null +++ b/docs/Models/Errors/ClerkErrors97.md @@ -0,0 +1,11 @@ +# ClerkErrors97 + +Authorization invalid + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `errors` | array<[Components\ClerkError](../../Models/Components/ClerkError.md)> | :heavy_check_mark: | N/A | +| `meta` | [?Errors\Meta](../../Models/Errors/Meta.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Errors/ClerkErrors98.md b/docs/Models/Errors/ClerkErrors98.md new file mode 100644 index 0000000..167eb5e --- /dev/null +++ b/docs/Models/Errors/ClerkErrors98.md @@ -0,0 +1,11 @@ +# ClerkErrors98 + +Authorization invalid + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `errors` | array<[Components\ClerkError](../../Models/Components/ClerkError.md)> | :heavy_check_mark: | N/A | +| `meta` | [?Errors\Meta](../../Models/Errors/Meta.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Errors/ClerkErrors99.md b/docs/Models/Errors/ClerkErrors99.md new file mode 100644 index 0000000..8dc71f0 --- /dev/null +++ b/docs/Models/Errors/ClerkErrors99.md @@ -0,0 +1,11 @@ +# ClerkErrors99 + +Payment required + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `errors` | array<[Components\ClerkError](../../Models/Components/ClerkError.md)> | :heavy_check_mark: | N/A | +| `meta` | [?Errors\Meta](../../Models/Errors/Meta.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Operations/ChangeProductionInstanceDomainRequestBody.md b/docs/Models/Operations/ChangeProductionInstanceDomainRequestBody.md index 03b85c9..b1d3458 100644 --- a/docs/Models/Operations/ChangeProductionInstanceDomainRequestBody.md +++ b/docs/Models/Operations/ChangeProductionInstanceDomainRequestBody.md @@ -3,6 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | -| `homeUrl` | *?string* | :heavy_minus_sign: | The new home URL of the production instance e.g. https://www.example.com | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `homeUrl` | *?string* | :heavy_minus_sign: | The new home URL of the production instance e.g. https://www.example.com | +| `isSecondary` | *?bool* | :heavy_minus_sign: | Whether this is a domain for a secondary app, meaning that any subdomain provided is significant and
will be stored as part of the domain. This is useful for supporting multiple apps (one primary and
multiple secondaries) on the same root domain (eTLD+1). | \ No newline at end of file diff --git a/docs/Models/Operations/CreateActorTokenRequestBody.md b/docs/Models/Operations/CreateActorTokenRequestBody.md index 3d41e87..2a56de2 100644 --- a/docs/Models/Operations/CreateActorTokenRequestBody.md +++ b/docs/Models/Operations/CreateActorTokenRequestBody.md @@ -5,7 +5,7 @@ | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `userId` | *string* | :heavy_check_mark: | The ID of the user that can use the newly created sign in token. | | +| `userId` | *string* | :heavy_check_mark: | The ID of the user being impersonated. | | | `actor` | [Operations\Actor](../../Models/Operations/Actor.md) | :heavy_check_mark: | The actor payload. It needs to include a sub property which should contain the ID of the actor.
This whole payload will be also included in the JWT session token. | {
"sub": "user_2OEpKhcCN1Lat9NQ0G6puh7q5Rb"
} | | `expiresInSeconds` | *?int* | :heavy_minus_sign: | Optional parameter to specify the life duration of the actor token in seconds.
By default, the duration is 1 hour. | | | `sessionMaxDurationInSeconds` | *?int* | :heavy_minus_sign: | The maximum duration that the session which will be created by the generated actor token should last.
By default, the duration of a session created via an actor token, lasts 30 minutes. | | \ No newline at end of file diff --git a/docs/Models/Operations/CreateInvitationPublicMetadata.md b/docs/Models/Operations/CreateInvitationPublicMetadata.md deleted file mode 100644 index 0ae2ee3..0000000 --- a/docs/Models/Operations/CreateInvitationPublicMetadata.md +++ /dev/null @@ -1,11 +0,0 @@ -# CreateInvitationPublicMetadata - -Metadata that will be attached to the newly created invitation. -The value of this property should be a well-formed JSON object. -Once the user accepts the invitation and signs up, these metadata will end up in the user's public metadata. - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/Models/Operations/CreateInvitationRequestBody.md b/docs/Models/Operations/CreateInvitationRequestBody.md index a39491e..285ceb9 100644 --- a/docs/Models/Operations/CreateInvitationRequestBody.md +++ b/docs/Models/Operations/CreateInvitationRequestBody.md @@ -8,7 +8,8 @@ Required parameters | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `emailAddress` | *string* | :heavy_check_mark: | The email address the invitation will be sent to | -| `publicMetadata` | [?Operations\CreateInvitationPublicMetadata](../../Models/Operations/CreateInvitationPublicMetadata.md) | :heavy_minus_sign: | Metadata that will be attached to the newly created invitation.
The value of this property should be a well-formed JSON object.
Once the user accepts the invitation and signs up, these metadata will end up in the user's public metadata. | +| `publicMetadata` | array | :heavy_minus_sign: | Metadata that will be attached to the newly created invitation.
The value of this property should be a well-formed JSON object.
Once the user accepts the invitation and signs up, these metadata will end up in the user's public metadata. | | `redirectUrl` | *?string* | :heavy_minus_sign: | Optional URL which specifies where to redirect the user once they click the invitation link.
This is only required if you have implemented a [custom flow](https://clerk.com/docs/authentication/invitations#custom-flow) and you're not using Clerk Hosted Pages or Clerk Components. | | `notify` | *?bool* | :heavy_minus_sign: | Optional flag which denotes whether an email invitation should be sent to the given email address.
Defaults to true. | -| `ignoreExisting` | *?bool* | :heavy_minus_sign: | Whether an invitation should be created if there is already an existing invitation for this email address, or it's claimed by another user. | \ No newline at end of file +| `ignoreExisting` | *?bool* | :heavy_minus_sign: | Whether an invitation should be created if there is already an existing invitation for this email address, or it's claimed by another user. | +| `expiresInDays` | *?int* | :heavy_minus_sign: | The number of days the invitation will be valid for. By default, the invitation does not expire. | \ No newline at end of file diff --git a/docs/Models/Operations/CreateOrganizationDomainRequest.md b/docs/Models/Operations/CreateOrganizationDomainRequest.md new file mode 100644 index 0000000..a9d562c --- /dev/null +++ b/docs/Models/Operations/CreateOrganizationDomainRequest.md @@ -0,0 +1,9 @@ +# CreateOrganizationDomainRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | +| `organizationId` | *string* | :heavy_check_mark: | The ID of the organization where the new domain will be created. | +| `requestBody` | [Operations\CreateOrganizationDomainRequestBody](../../Models/Operations/CreateOrganizationDomainRequestBody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/Models/Operations/CreateOrganizationDomainRequestBody.md b/docs/Models/Operations/CreateOrganizationDomainRequestBody.md new file mode 100644 index 0000000..177b2c1 --- /dev/null +++ b/docs/Models/Operations/CreateOrganizationDomainRequestBody.md @@ -0,0 +1,10 @@ +# CreateOrganizationDomainRequestBody + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | +| `name` | *?string* | :heavy_minus_sign: | The name of the new domain | +| `enrollmentMode` | *?string* | :heavy_minus_sign: | The enrollment_mode for the new domain. This can be `automatic_invitation`, `automatic_suggestion` or `manual_invitation` | +| `verified` | *?bool* | :heavy_minus_sign: | The status of domain's verification. Defaults to true | \ No newline at end of file diff --git a/docs/Models/Operations/CreateOrganizationDomainResponse.md b/docs/Models/Operations/CreateOrganizationDomainResponse.md new file mode 100644 index 0000000..1ef88f3 --- /dev/null +++ b/docs/Models/Operations/CreateOrganizationDomainResponse.md @@ -0,0 +1,11 @@ +# CreateOrganizationDomainResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [\Psr\Http\Message\ResponseInterface](https://www.php-fig.org/psr/psr-7/#33-psrhttpmessageresponseinterface) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `organizationDomain` | [?Components\OrganizationDomain](../../Models/Components/OrganizationDomain.md) | :heavy_minus_sign: | An organization domain | \ No newline at end of file diff --git a/docs/Models/Operations/CreateOrganizationInvitationBulkPrivateMetadata.md b/docs/Models/Operations/CreateOrganizationInvitationBulkPrivateMetadata.md deleted file mode 100644 index 36a117b..0000000 --- a/docs/Models/Operations/CreateOrganizationInvitationBulkPrivateMetadata.md +++ /dev/null @@ -1,9 +0,0 @@ -# CreateOrganizationInvitationBulkPrivateMetadata - -Metadata saved on the organization invitation, fully accessible (read/write) from the Backend API but not visible from the Frontend API. - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/Models/Operations/CreateOrganizationInvitationBulkPublicMetadata.md b/docs/Models/Operations/CreateOrganizationInvitationBulkPublicMetadata.md deleted file mode 100644 index 6b0de6e..0000000 --- a/docs/Models/Operations/CreateOrganizationInvitationBulkPublicMetadata.md +++ /dev/null @@ -1,9 +0,0 @@ -# CreateOrganizationInvitationBulkPublicMetadata - -Metadata saved on the organization invitation, read-only from the Frontend API and fully accessible (read/write) from the Backend API. - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/Models/Operations/CreateOrganizationInvitationPrivateMetadata.md b/docs/Models/Operations/CreateOrganizationInvitationPrivateMetadata.md deleted file mode 100644 index cb30466..0000000 --- a/docs/Models/Operations/CreateOrganizationInvitationPrivateMetadata.md +++ /dev/null @@ -1,9 +0,0 @@ -# CreateOrganizationInvitationPrivateMetadata - -Metadata saved on the organization invitation, fully accessible (read/write) from the Backend API but not visible from the Frontend API. - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/Models/Operations/CreateOrganizationInvitationPublicMetadata.md b/docs/Models/Operations/CreateOrganizationInvitationPublicMetadata.md deleted file mode 100644 index 59477dd..0000000 --- a/docs/Models/Operations/CreateOrganizationInvitationPublicMetadata.md +++ /dev/null @@ -1,9 +0,0 @@ -# CreateOrganizationInvitationPublicMetadata - -Metadata saved on the organization invitation, read-only from the Frontend API and fully accessible (read/write) from the Backend API. - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/Models/Operations/CreateOrganizationInvitationRequestBody.md b/docs/Models/Operations/CreateOrganizationInvitationRequestBody.md index cf2bb71..20c0031 100644 --- a/docs/Models/Operations/CreateOrganizationInvitationRequestBody.md +++ b/docs/Models/Operations/CreateOrganizationInvitationRequestBody.md @@ -6,8 +6,8 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | | `emailAddress` | *string* | :heavy_check_mark: | The email address of the new member that is going to be invited to the organization | -| `inviterUserId` | *string* | :heavy_check_mark: | The ID of the user that invites the new member to the organization.
Must be an administrator in the organization. | | `role` | *string* | :heavy_check_mark: | The role of the new member in the organization | -| `publicMetadata` | [?Operations\CreateOrganizationInvitationPublicMetadata](../../Models/Operations/CreateOrganizationInvitationPublicMetadata.md) | :heavy_minus_sign: | Metadata saved on the organization invitation, read-only from the Frontend API and fully accessible (read/write) from the Backend API. | -| `privateMetadata` | [?Operations\CreateOrganizationInvitationPrivateMetadata](../../Models/Operations/CreateOrganizationInvitationPrivateMetadata.md) | :heavy_minus_sign: | Metadata saved on the organization invitation, fully accessible (read/write) from the Backend API but not visible from the Frontend API. | -| `redirectUrl` | *?string* | :heavy_minus_sign: | Optional URL that the invitee will be redirected to once they accept the invitation by clicking the join link in the invitation email. | \ No newline at end of file +| `publicMetadata` | array | :heavy_minus_sign: | Metadata saved on the organization invitation, read-only from the Frontend API and fully accessible (read/write) from the Backend API. | +| `privateMetadata` | array | :heavy_minus_sign: | Metadata saved on the organization invitation, fully accessible (read/write) from the Backend API but not visible from the Frontend API. | +| `redirectUrl` | *?string* | :heavy_minus_sign: | Optional URL that the invitee will be redirected to once they accept the invitation by clicking the join link in the invitation email. | +| `inviterUserId` | *?string* | :heavy_minus_sign: | The ID of the user that invites the new member to the organization.
Must be an administrator in the organization. | \ No newline at end of file diff --git a/docs/Models/Operations/CreateOrganizationPrivateMetadata.md b/docs/Models/Operations/CreateOrganizationPrivateMetadata.md deleted file mode 100644 index f2f829a..0000000 --- a/docs/Models/Operations/CreateOrganizationPrivateMetadata.md +++ /dev/null @@ -1,9 +0,0 @@ -# CreateOrganizationPrivateMetadata - -Metadata saved on the organization, accessible only from the Backend API - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/Models/Operations/CreateOrganizationPublicMetadata.md b/docs/Models/Operations/CreateOrganizationPublicMetadata.md deleted file mode 100644 index b80d04c..0000000 --- a/docs/Models/Operations/CreateOrganizationPublicMetadata.md +++ /dev/null @@ -1,9 +0,0 @@ -# CreateOrganizationPublicMetadata - -Metadata saved on the organization, read-only from the Frontend API and fully accessible (read/write) from the Backend API - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/Models/Operations/CreateOrganizationRequestBody.md b/docs/Models/Operations/CreateOrganizationRequestBody.md index e5c86b3..a3074a4 100644 --- a/docs/Models/Operations/CreateOrganizationRequestBody.md +++ b/docs/Models/Operations/CreateOrganizationRequestBody.md @@ -5,9 +5,10 @@ | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -| `name` | *string* | :heavy_check_mark: | The name of the new organization | +| `name` | *string* | :heavy_check_mark: | The name of the new organization.
May not contain URLs or HTML. | | `createdBy` | *string* | :heavy_check_mark: | The ID of the User who will become the administrator for the new organization | -| `privateMetadata` | [?Operations\CreateOrganizationPrivateMetadata](../../Models/Operations/CreateOrganizationPrivateMetadata.md) | :heavy_minus_sign: | Metadata saved on the organization, accessible only from the Backend API | -| `publicMetadata` | [?Operations\CreateOrganizationPublicMetadata](../../Models/Operations/CreateOrganizationPublicMetadata.md) | :heavy_minus_sign: | Metadata saved on the organization, read-only from the Frontend API and fully accessible (read/write) from the Backend API | +| `privateMetadata` | array | :heavy_minus_sign: | Metadata saved on the organization, accessible only from the Backend API | +| `publicMetadata` | array | :heavy_minus_sign: | Metadata saved on the organization, read-only from the Frontend API and fully accessible (read/write) from the Backend API | | `slug` | *?string* | :heavy_minus_sign: | A slug for the new organization.
Can contain only lowercase alphanumeric characters and the dash "-".
Must be unique for the instance. | -| `maxAllowedMemberships` | *?int* | :heavy_minus_sign: | The maximum number of memberships allowed for this organization | \ No newline at end of file +| `maxAllowedMemberships` | *?int* | :heavy_minus_sign: | The maximum number of memberships allowed for this organization | +| `createdAt` | *?string* | :heavy_minus_sign: | A custom date/time denoting _when_ the organization was created, specified in RFC3339 format (e.g. `2012-10-20T07:15:20.902Z`). | \ No newline at end of file diff --git a/docs/Models/Operations/CreateSAMLConnectionResponse.md b/docs/Models/Operations/CreateSAMLConnectionResponse.md index 08c919a..25d10ce 100644 --- a/docs/Models/Operations/CreateSAMLConnectionResponse.md +++ b/docs/Models/Operations/CreateSAMLConnectionResponse.md @@ -8,4 +8,4 @@ | `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | `rawResponse` | [\Psr\Http\Message\ResponseInterface](https://www.php-fig.org/psr/psr-7/#33-psrhttpmessageresponseinterface) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `samlConnection` | [?Components\SAMLConnection](../../Models/Components/SAMLConnection.md) | :heavy_minus_sign: | A SAML Connection | \ No newline at end of file +| `schemasSAMLConnection` | [?Components\SchemasSAMLConnection](../../Models/Components/SchemasSAMLConnection.md) | :heavy_minus_sign: | A SAML Connection | \ No newline at end of file diff --git a/docs/Models/Operations/CreateUserRequestBody.md b/docs/Models/Operations/CreateUserRequestBody.md index 0ad1ae1..5293968 100644 --- a/docs/Models/Operations/CreateUserRequestBody.md +++ b/docs/Models/Operations/CreateUserRequestBody.md @@ -3,23 +3,28 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `emailAddress` | array<*string*> | :heavy_minus_sign: | Email addresses to add to the user.
Must be unique across your instance.
The first email address will be set as the user's primary email address. | -| `phoneNumber` | array<*string*> | :heavy_minus_sign: | Phone numbers to add to the user.
Must be unique across your instance.
The first phone number will be set as the user's primary phone number. | -| `web3Wallet` | array<*string*> | :heavy_minus_sign: | Web3 wallets to add to the user.
Must be unique across your instance.
The first wallet will be set as the user's primary wallet. | -| `passwordDigest` | *?string* | :heavy_minus_sign: | In case you already have the password digests and not the passwords, you can use them for the newly created user via this property.
The digests should be generated with one of the supported algorithms.
The hashing algorithm can be specified using the `password_hasher` property. | -| `passwordHasher` | [?Operations\PasswordHasher](../../Models/Operations/PasswordHasher.md) | :heavy_minus_sign: | The hashing algorithm that was used to generate the password digest.
The algorithms we support at the moment are [bcrypt](https://en.wikipedia.org/wiki/Bcrypt), [bcrypt_sha256_django](https://docs.djangoproject.com/en/4.0/topics/auth/passwords/),
[md5](https://en.wikipedia.org/wiki/MD5), pbkdf2_sha256, pbkdf2_sha512, [pbkdf2_sha256_django](https://docs.djangoproject.com/en/4.0/topics/auth/passwords/),
[phpass](https://www.openwall.com/phpass/), [scrypt_firebase](https://firebaseopensource.com/projects/firebase/scrypt/),
[scrypt_werkzeug](https://werkzeug.palletsprojects.com/en/3.0.x/utils/#werkzeug.security.generate_password_hash), [sha256](https://en.wikipedia.org/wiki/SHA-2)
and the [argon2](https://argon2.online/) variants argon2i and argon2id.

If you need support for any particular hashing algorithm, [please let us know](https://clerk.com/support).

Note: for password hashers considered insecure (at this moment MD5 and SHA256), the corresponding user password hashes will be transparently migrated to Bcrypt (a secure hasher) upon the user's first successful password sign in.
Insecure schemes are marked with `(insecure)` in the list below.

Each of the supported hashers expects the incoming digest to be in a particular format. Specifically:

**bcrypt:** The digest should be of the following form:

`$$$`

**bcrypt_sha256_django:** This is the Django-specific variant of Bcrypt, using SHA256 hashing function. The format should be as follows (as exported from Django):

`bcrypt_sha256$$$$`

**md5** (insecure): The digest should follow the regular form e.g.:

`5f4dcc3b5aa765d61d8327deb882cf99`

**pbkdf2_sha256:** This is the PBKDF2 algorithm using the SHA256 hashing function. The format should be as follows:

`pbkdf2_sha256$$$`

Note: Both the salt and the hash are expected to be base64-encoded.

**pbkdf2_sha512:** This is the PBKDF2 algorithm using the SHA512 hashing function. The format should be as follows:

`pbkdf2_sha512$$$`

_iterations:_ The number of iterations used. Must be an integer less than 420000.
_salt:_ The salt used when generating the hash. Must be less than 1024 bytes.
_hash:_ The hex-encoded hash. Must have been generated with a key length less than 1024 bytes.

**pbkdf2_sha256_django:** This is the Django-specific variant of PBKDF2 and the digest should have the following format (as exported from Django):

`pbkdf2_sha256$$$`

Note: The salt is expected to be un-encoded, the hash is expected base64-encoded.

**pbkdf2_sha1:** This is similar to pkbdf2_sha256_django, but with two differences:
1. uses sha1 instead of sha256
2. accepts the hash as a hex-encoded string

The format is the following:

`pbkdf2_sha1$$$`

**phpass:** Portable public domain password hashing framework for use in PHP applications. Digests hashed with phpass have the following sections:

The format is the following:

`$P$`

- $P$ is the prefix used to identify phpass hashes.
- rounds is a single character encoding a 6-bit integer representing the number of rounds used.
- salt is eight characters drawn from [./0-9A-Za-z], providing a 48-bit salt.
- checksum is 22 characters drawn from the same set, encoding the 128-bit checksum with MD5.

**scrypt_firebase:** The Firebase-specific variant of scrypt.
The value is expected to have 6 segments separated by the $ character and include the following information:

_hash:_ The actual Base64 hash. This can be retrieved when exporting the user from Firebase.
_salt:_ The salt used to generate the above hash. Again, this is given when exporting the user.
_signer key:_ The base64 encoded signer key.
_salt separator:_ The base64 encoded salt separator.
_rounds:_ The number of rounds the algorithm needs to run.
_memory cost:_ The cost of the algorithm run

The first 2 (hash and salt) are per user and can be retrieved when exporting the user from Firebase.
The other 4 values (signer key, salt separator, rounds and memory cost) are project-wide settings and can be retrieved from the project's password hash parameters.

Once you have all these, you can combine it in the following format and send this as the digest in order for Clerk to accept it:

`$$$$$`

**scrypt_werkzeug:** The Werkzeug-specific variant of scrypt.

The value is expected to have 3 segments separated by the $ character and include the following information:

_algorithm args:_ The algorithm used to generate the hash.
_salt:_ The salt used to generate the above hash.
_hash:_ The actual Base64 hash.

The algorithm args are the parameters used to generate the hash and are included in the digest.

**argon2i:** Algorithms in the argon2 family generate digests that encode the following information:

_version (v):_ The argon version, version 19 is assumed
_memory (m):_ The memory used by the algorithm (in kibibytes)
_iterations (t):_ The number of iterations to perform
_parallelism (p):_ The number of threads to use

Parts are demarcated by the `$` character, with the first part identifying the algorithm variant.
The middle part is a comma-separated list of the encoding options (memory, iterations, parallelism).
The final part is the actual digest.

`$argon2i$v=19$m=4096,t=3,p=1$4t6CL3P7YiHBtwESXawI8Hm20zJj4cs7/4/G3c187e0$m7RQFczcKr5bIR0IIxbpO2P0tyrLjf3eUW3M3QSwnLc`

**argon2id:** See the previous algorithm for an explanation of the formatting.

For the argon2id case, the value of the algorithm in the first part of the digest is `argon2id`:

`$argon2id$v=19$m=64,t=4,p=8$Z2liZXJyaXNo$iGXEpMBTDYQ8G/71tF0qGjxRHEmR3gpGULcE93zUJVU`

**sha256** (insecure): The digest should be a 64-length hex string, e.g.:

`9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08`

**sha256_salted** (insecure): The digest should be a 64-length hex string with a salt.

The format is the following:
`$`

The value is expected to have 2 segments separated by the $ character and include the following information:
_hash:_ The sha256 hash, a 64-length hex string.
_salt:_ The salt used to generate the above hash. Must be between 1 and 1024 bits. | -| `skipPasswordChecks` | *?bool* | :heavy_minus_sign: | When set to `true` all password checks are skipped.
It is recommended to use this method only when migrating plaintext passwords to Clerk.
Upon migration the user base should be prompted to pick stronger password. | -| `skipPasswordRequirement` | *?bool* | :heavy_minus_sign: | When set to `true`, `password` is not required anymore when creating the user and can be omitted.
This is useful when you are trying to create a user that doesn't have a password, in an instance that is using passwords.
Please note that you cannot use this flag if password is the only way for a user to sign into your instance. | -| `totpSecret` | *?string* | :heavy_minus_sign: | In case TOTP is configured on the instance, you can provide the secret to enable it on the newly created user without the need to reset it.
Please note that currently the supported options are:
* Period: 30 seconds
* Code length: 6 digits
* Algorithm: SHA1 | -| `backupCodes` | array<*string*> | :heavy_minus_sign: | If Backup Codes are configured on the instance, you can provide them to enable it on the newly created user without the need to reset them.
You must provide the backup codes in plain format or the corresponding bcrypt digest. | -| `publicMetadata` | [?Operations\PublicMetadata](../../Models/Operations/PublicMetadata.md) | :heavy_minus_sign: | Metadata saved on the user, that is visible to both your Frontend and Backend APIs | -| `privateMetadata` | [?Operations\PrivateMetadata](../../Models/Operations/PrivateMetadata.md) | :heavy_minus_sign: | Metadata saved on the user, that is only visible to your Backend API | -| `unsafeMetadata` | [?Operations\UnsafeMetadata](../../Models/Operations/UnsafeMetadata.md) | :heavy_minus_sign: | Metadata saved on the user, that can be updated from both the Frontend and Backend APIs.
Note: Since this data can be modified from the frontend, it is not guaranteed to be safe. | -| `createdAt` | *?string* | :heavy_minus_sign: | A custom date/time denoting _when_ the user signed up to the application, specified in RFC3339 format (e.g. `2012-10-20T07:15:20.902Z`). | -| `externalId` | *?string* | :heavy_minus_sign: | The ID of the user as used in your external systems or your previous authentication solution.
Must be unique across your instance. | -| `firstName` | *?string* | :heavy_minus_sign: | The first name to assign to the user | -| `lastName` | *?string* | :heavy_minus_sign: | The last name to assign to the user | -| `username` | *?string* | :heavy_minus_sign: | The username to give to the user.
It must be unique across your instance. | -| `password` | *?string* | :heavy_minus_sign: | The plaintext password to give the user.
Must be at least 8 characters long, and can not be in any list of hacked passwords. | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `emailAddress` | array<*string*> | :heavy_minus_sign: | Email addresses to add to the user.
Must be unique across your instance.
The first email address will be set as the user's primary email address. | +| `phoneNumber` | array<*string*> | :heavy_minus_sign: | Phone numbers to add to the user.
Must be unique across your instance.
The first phone number will be set as the user's primary phone number. | +| `web3Wallet` | array<*string*> | :heavy_minus_sign: | Web3 wallets to add to the user.
Must be unique across your instance.
The first wallet will be set as the user's primary wallet. | +| `passwordDigest` | *?string* | :heavy_minus_sign: | In case you already have the password digests and not the passwords, you can use them for the newly created user via this property.
The digests should be generated with one of the supported algorithms.
The hashing algorithm can be specified using the `password_hasher` property. | +| `passwordHasher` | *?string* | :heavy_minus_sign: | The hashing algorithm that was used to generate the password digest.

The algorithms we support at the moment are [`bcrypt`](https://en.wikipedia.org/wiki/Bcrypt), [`bcrypt_sha256_django`](https://docs.djangoproject.com/en/4.0/topics/auth/passwords/), [`md5`](https://en.wikipedia.org/wiki/MD5), `pbkdf2_sha1`, `pbkdf2_sha256`, [`pbkdf2_sha256_django`](https://docs.djangoproject.com/en/4.0/topics/auth/passwords/),
[`phpass`](https://www.openwall.com/phpass/), [`scrypt_firebase`](https://firebaseopensource.com/projects/firebase/scrypt/),
[`scrypt_werkzeug`](https://werkzeug.palletsprojects.com/en/3.0.x/utils/#werkzeug.security.generate_password_hash), [`sha256`](https://en.wikipedia.org/wiki/SHA-2),
and the [`argon2`](https://argon2.online/) variants: `argon2i` and `argon2id`.

Each of the supported hashers expects the incoming digest to be in a particular format. See the [Clerk docs](https://clerk.com/docs/references/backend/user/create-user) for more information. | +| `skipPasswordChecks` | *?bool* | :heavy_minus_sign: | When set to `true` all password checks are skipped.
It is recommended to use this method only when migrating plaintext passwords to Clerk.
Upon migration the user base should be prompted to pick stronger password. | +| `skipPasswordRequirement` | *?bool* | :heavy_minus_sign: | When set to `true`, `password` is not required anymore when creating the user and can be omitted.
This is useful when you are trying to create a user that doesn't have a password, in an instance that is using passwords.
Please note that you cannot use this flag if password is the only way for a user to sign into your instance. | +| `totpSecret` | *?string* | :heavy_minus_sign: | In case TOTP is configured on the instance, you can provide the secret to enable it on the newly created user without the need to reset it.
Please note that currently the supported options are:
* Period: 30 seconds
* Code length: 6 digits
* Algorithm: SHA1 | +| `backupCodes` | array<*string*> | :heavy_minus_sign: | If Backup Codes are configured on the instance, you can provide them to enable it on the newly created user without the need to reset them.
You must provide the backup codes in plain format or the corresponding bcrypt digest. | +| `publicMetadata` | array | :heavy_minus_sign: | Metadata saved on the user, that is visible to both your Frontend and Backend APIs | +| `privateMetadata` | array | :heavy_minus_sign: | Metadata saved on the user, that is only visible to your Backend API | +| `unsafeMetadata` | array | :heavy_minus_sign: | Metadata saved on the user, that can be updated from both the Frontend and Backend APIs.
Note: Since this data can be modified from the frontend, it is not guaranteed to be safe. | +| `createdAt` | *?string* | :heavy_minus_sign: | A custom date/time denoting _when_ the user signed up to the application, specified in RFC3339 format (e.g. `2012-10-20T07:15:20.902Z`). | +| `externalId` | *?string* | :heavy_minus_sign: | The ID of the user as used in your external systems or your previous authentication solution.
Must be unique across your instance. | +| `firstName` | *?string* | :heavy_minus_sign: | The first name to assign to the user | +| `lastName` | *?string* | :heavy_minus_sign: | The last name to assign to the user | +| `username` | *?string* | :heavy_minus_sign: | The username to give to the user.
It must be unique across your instance. | +| `password` | *?string* | :heavy_minus_sign: | The plaintext password to give the user.
Must be at least 8 characters long, and can not be in any list of hacked passwords. | +| `deleteSelfEnabled` | *?bool* | :heavy_minus_sign: | If enabled, user can delete themselves via FAPI.
| +| `legalAcceptedAt` | *?string* | :heavy_minus_sign: | A custom timestamp denoting _when_ the user accepted legal requirements, specified in RFC3339 format (e.g. `2012-10-20T07:15:20.902Z`). | +| `skipLegalChecks` | *?bool* | :heavy_minus_sign: | When set to `true` all legal checks are skipped.
It is not recommended to skip legal checks unless you are migrating a user to Clerk. | +| `createOrganizationEnabled` | *?bool* | :heavy_minus_sign: | If enabled, user can create organizations via FAPI.
| +| `createOrganizationsLimit` | *?int* | :heavy_minus_sign: | The maximum number of organizations the user can create. 0 means unlimited.
| \ No newline at end of file diff --git a/docs/Models/Operations/CreateUserTOTPRequest.md b/docs/Models/Operations/CreateUserTOTPRequest.md new file mode 100644 index 0000000..d12e0c5 --- /dev/null +++ b/docs/Models/Operations/CreateUserTOTPRequest.md @@ -0,0 +1,8 @@ +# CreateUserTOTPRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | +| `userId` | *string* | :heavy_check_mark: | The ID of the user for whom the TOTP is being created. | \ No newline at end of file diff --git a/docs/Models/Operations/CreateUserTOTPResponse.md b/docs/Models/Operations/CreateUserTOTPResponse.md new file mode 100644 index 0000000..d0e105f --- /dev/null +++ b/docs/Models/Operations/CreateUserTOTPResponse.md @@ -0,0 +1,11 @@ +# CreateUserTOTPResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [\Psr\Http\Message\ResponseInterface](https://www.php-fig.org/psr/psr-7/#33-psrhttpmessageresponseinterface) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `totp` | array | :heavy_minus_sign: | A TOTP (Time-based One-Time Password) | \ No newline at end of file diff --git a/docs/Models/Operations/DeleteBackupCodeRequest.md b/docs/Models/Operations/DeleteBackupCodeRequest.md new file mode 100644 index 0000000..229f4fa --- /dev/null +++ b/docs/Models/Operations/DeleteBackupCodeRequest.md @@ -0,0 +1,8 @@ +# DeleteBackupCodeRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | +| `userId` | *string* | :heavy_check_mark: | The ID of the user whose backup codes are to be deleted. | \ No newline at end of file diff --git a/docs/Models/Operations/DeleteBackupCodeResponse.md b/docs/Models/Operations/DeleteBackupCodeResponse.md new file mode 100644 index 0000000..8a2c996 --- /dev/null +++ b/docs/Models/Operations/DeleteBackupCodeResponse.md @@ -0,0 +1,11 @@ +# DeleteBackupCodeResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [\Psr\Http\Message\ResponseInterface](https://www.php-fig.org/psr/psr-7/#33-psrhttpmessageresponseinterface) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [?Operations\DeleteBackupCodeResponseBody](../../Models/Operations/DeleteBackupCodeResponseBody.md) | :heavy_minus_sign: | Successful operation. | \ No newline at end of file diff --git a/docs/Models/Operations/DeleteBackupCodeResponseBody.md b/docs/Models/Operations/DeleteBackupCodeResponseBody.md new file mode 100644 index 0000000..8189974 --- /dev/null +++ b/docs/Models/Operations/DeleteBackupCodeResponseBody.md @@ -0,0 +1,10 @@ +# DeleteBackupCodeResponseBody + +Successful operation. + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `userId` | *?string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Operations/DeleteExternalAccountRequest.md b/docs/Models/Operations/DeleteExternalAccountRequest.md new file mode 100644 index 0000000..bd5a380 --- /dev/null +++ b/docs/Models/Operations/DeleteExternalAccountRequest.md @@ -0,0 +1,9 @@ +# DeleteExternalAccountRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | +| `userId` | *string* | :heavy_check_mark: | The ID of the user's external account | +| `externalAccountId` | *string* | :heavy_check_mark: | The ID of the external account to delete | \ No newline at end of file diff --git a/docs/Models/Operations/DeleteExternalAccountResponse.md b/docs/Models/Operations/DeleteExternalAccountResponse.md new file mode 100644 index 0000000..819516d --- /dev/null +++ b/docs/Models/Operations/DeleteExternalAccountResponse.md @@ -0,0 +1,11 @@ +# DeleteExternalAccountResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [\Psr\Http\Message\ResponseInterface](https://www.php-fig.org/psr/psr-7/#33-psrhttpmessageresponseinterface) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `deletedObject` | [?Components\DeletedObject](../../Models/Components/DeletedObject.md) | :heavy_minus_sign: | Deleted Object | \ No newline at end of file diff --git a/docs/Models/Operations/DeleteOrganizationDomainRequest.md b/docs/Models/Operations/DeleteOrganizationDomainRequest.md new file mode 100644 index 0000000..0c8f80f --- /dev/null +++ b/docs/Models/Operations/DeleteOrganizationDomainRequest.md @@ -0,0 +1,9 @@ +# DeleteOrganizationDomainRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | +| `organizationId` | *string* | :heavy_check_mark: | The ID of the organization the domain belongs to | +| `domainId` | *string* | :heavy_check_mark: | The ID of the domain | \ No newline at end of file diff --git a/docs/Models/Operations/DeleteOrganizationDomainResponse.md b/docs/Models/Operations/DeleteOrganizationDomainResponse.md new file mode 100644 index 0000000..c1950ec --- /dev/null +++ b/docs/Models/Operations/DeleteOrganizationDomainResponse.md @@ -0,0 +1,11 @@ +# DeleteOrganizationDomainResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [\Psr\Http\Message\ResponseInterface](https://www.php-fig.org/psr/psr-7/#33-psrhttpmessageresponseinterface) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `deletedObject` | [?Components\DeletedObject](../../Models/Components/DeletedObject.md) | :heavy_minus_sign: | Deleted Object | \ No newline at end of file diff --git a/docs/Models/Operations/DeleteTOTPRequest.md b/docs/Models/Operations/DeleteTOTPRequest.md new file mode 100644 index 0000000..cab6b77 --- /dev/null +++ b/docs/Models/Operations/DeleteTOTPRequest.md @@ -0,0 +1,8 @@ +# DeleteTOTPRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | +| `userId` | *string* | :heavy_check_mark: | The ID of the user whose TOTPs are to be deleted | \ No newline at end of file diff --git a/docs/Models/Operations/DeleteTOTPResponse.md b/docs/Models/Operations/DeleteTOTPResponse.md new file mode 100644 index 0000000..0129a65 --- /dev/null +++ b/docs/Models/Operations/DeleteTOTPResponse.md @@ -0,0 +1,11 @@ +# DeleteTOTPResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [\Psr\Http\Message\ResponseInterface](https://www.php-fig.org/psr/psr-7/#33-psrhttpmessageresponseinterface) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `object` | [?Operations\DeleteTOTPResponseBody](../../Models/Operations/DeleteTOTPResponseBody.md) | :heavy_minus_sign: | Successful operation. | \ No newline at end of file diff --git a/docs/Models/Operations/DeleteTOTPResponseBody.md b/docs/Models/Operations/DeleteTOTPResponseBody.md new file mode 100644 index 0000000..284883e --- /dev/null +++ b/docs/Models/Operations/DeleteTOTPResponseBody.md @@ -0,0 +1,10 @@ +# DeleteTOTPResponseBody + +Successful operation. + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `userId` | *?string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Operations/GetClientListRequest.md b/docs/Models/Operations/GetClientListRequest.md index 5123220..1b8bfdf 100644 --- a/docs/Models/Operations/GetClientListRequest.md +++ b/docs/Models/Operations/GetClientListRequest.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | -| `limit` | *?float* | :heavy_minus_sign: | Applies a limit to the number of results returned.
Can be used for paginating the results together with `offset`. | -| `offset` | *?float* | :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`. | \ No newline at end of file +| `limit` | *?int* | :heavy_minus_sign: | Applies a limit to the number of results returned.
Can be used for paginating the results together with `offset`. | +| `offset` | *?int* | :heavy_minus_sign: | Skip the first `offset` results when paginating.
Needs to be an integer greater or equal to zero.
To be used in conjunction with `limit`. | \ No newline at end of file diff --git a/docs/Models/Operations/GetJWKSResponse.md b/docs/Models/Operations/GetJWKSResponse.md index a2abbb7..a0c0a8c 100644 --- a/docs/Models/Operations/GetJWKSResponse.md +++ b/docs/Models/Operations/GetJWKSResponse.md @@ -7,4 +7,5 @@ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | | `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [\Psr\Http\Message\ResponseInterface](https://www.php-fig.org/psr/psr-7/#33-psrhttpmessageresponseinterface) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| `rawResponse` | [\Psr\Http\Message\ResponseInterface](https://www.php-fig.org/psr/psr-7/#33-psrhttpmessageresponseinterface) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `wellKnownJWKS` | [?Components\WellKnownJWKS](../../Models/Components/WellKnownJWKS.md) | :heavy_minus_sign: | Get the JSON Web Key Set | \ No newline at end of file diff --git a/docs/Models/Operations/GetOAuthAccessTokenPublicMetadata.md b/docs/Models/Operations/GetOAuthAccessTokenPublicMetadata.md deleted file mode 100644 index a6e935a..0000000 --- a/docs/Models/Operations/GetOAuthAccessTokenPublicMetadata.md +++ /dev/null @@ -1,7 +0,0 @@ -# GetOAuthAccessTokenPublicMetadata - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/Models/Operations/GetOrganizationRequest.md b/docs/Models/Operations/GetOrganizationRequest.md index e684194..0b5d348 100644 --- a/docs/Models/Operations/GetOrganizationRequest.md +++ b/docs/Models/Operations/GetOrganizationRequest.md @@ -3,6 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | -| `organizationId` | *string* | :heavy_check_mark: | The ID or slug of the organization | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `organizationId` | *string* | :heavy_check_mark: | The ID or slug of the organization | +| `includeMembersCount` | *?bool* | :heavy_minus_sign: | Flag to denote whether or not the organization's members count should be included in the response. | \ No newline at end of file diff --git a/docs/Models/Operations/GetSAMLConnectionResponse.md b/docs/Models/Operations/GetSAMLConnectionResponse.md index f3a0f23..bdf84b3 100644 --- a/docs/Models/Operations/GetSAMLConnectionResponse.md +++ b/docs/Models/Operations/GetSAMLConnectionResponse.md @@ -8,4 +8,4 @@ | `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | `rawResponse` | [\Psr\Http\Message\ResponseInterface](https://www.php-fig.org/psr/psr-7/#33-psrhttpmessageresponseinterface) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `samlConnection` | [?Components\SAMLConnection](../../Models/Components/SAMLConnection.md) | :heavy_minus_sign: | A SAML Connection | \ No newline at end of file +| `schemasSAMLConnection` | [?Components\SchemasSAMLConnection](../../Models/Components/SchemasSAMLConnection.md) | :heavy_minus_sign: | A SAML Connection | \ No newline at end of file diff --git a/docs/Models/Operations/GetSessionListRequest.md b/docs/Models/Operations/GetSessionListRequest.md index 727061a..323f678 100644 --- a/docs/Models/Operations/GetSessionListRequest.md +++ b/docs/Models/Operations/GetSessionListRequest.md @@ -8,5 +8,5 @@ | `clientId` | *?string* | :heavy_minus_sign: | List sessions for the given client | | `userId` | *?string* | :heavy_minus_sign: | List sessions for the given user | | `status` | [?Operations\Status](../../Models/Operations/Status.md) | :heavy_minus_sign: | Filter sessions by the provided status | -| `limit` | *?float* | :heavy_minus_sign: | Applies a limit to the number of results returned.
Can be used for paginating the results together with `offset`. | -| `offset` | *?float* | :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`. | \ No newline at end of file +| `limit` | *?int* | :heavy_minus_sign: | Applies a limit to the number of results returned.
Can be used for paginating the results together with `offset`. | +| `offset` | *?int* | :heavy_minus_sign: | Skip the first `offset` results when paginating.
Needs to be an integer greater or equal to zero.
To be used in conjunction with `limit`. | \ No newline at end of file diff --git a/docs/Models/Operations/GetUserListRequest.md b/docs/Models/Operations/GetUserListRequest.md index 20d361d..94b396e 100644 --- a/docs/Models/Operations/GetUserListRequest.md +++ b/docs/Models/Operations/GetUserListRequest.md @@ -14,6 +14,6 @@ | `organizationId` | array<*string*> | :heavy_minus_sign: | Returns users that have memberships to the
given organizations.
For each organization id, the `+` and `-` can be
prepended to the id, which denote whether the
respective organization should be included or
excluded from the result set.
Accepts up to 100 organization ids. | | | `query` | *?string* | :heavy_minus_sign: | Returns users that match the given query.
For possible matches, we check the email addresses, phone numbers, usernames, web3 wallets, user ids, first and last names.
The query value doesn't need to match the exact value you are looking for, it is capable of partial matches as well. | | | `lastActiveAtSince` | *?int* | :heavy_minus_sign: | Returns users that had session activity since the given date, with day precision.
Providing a value with higher precision than day will result in an error.
Example: use 1700690400000 to retrieve users that had session activity from 2023-11-23 until the current day. | 1700690400000 | -| `limit` | *?float* | :heavy_minus_sign: | Applies a limit to the number of results returned.
Can be used for paginating the results together with `offset`. | | -| `offset` | *?float* | :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`. | | +| `limit` | *?int* | :heavy_minus_sign: | Applies a limit to the number of results returned.
Can be used for paginating the results together with `offset`. | | +| `offset` | *?int* | :heavy_minus_sign: | Skip the first `offset` results when paginating.
Needs to be an integer greater or equal to zero.
To be used in conjunction with `limit`. | | | `orderBy` | *?string* | :heavy_minus_sign: | Allows to return users in a particular order.
At the moment, you can order the returned users by their `created_at`,`updated_at`,`email_address`,`web3wallet`,`first_name`,`last_name`,`phone_number`,`username`,`last_active_at`,`last_sign_in_at`.
In order to specify the direction, you can use the `+/-` symbols prepended in the property to order by.
For example, if you want users 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. We only support one `order_by` parameter, and if multiple `order_by` parameters are provided, we will only keep the first one. For example,
if you pass `order_by=username&order_by=created_at`, we will consider only the first `order_by` parameter, which is `username`. The `created_at` parameter will be ignored in this case. | | \ No newline at end of file diff --git a/docs/Models/Operations/InstanceGetOrganizationMembershipsRequest.md b/docs/Models/Operations/InstanceGetOrganizationMembershipsRequest.md new file mode 100644 index 0000000..8a3d7cc --- /dev/null +++ b/docs/Models/Operations/InstanceGetOrganizationMembershipsRequest.md @@ -0,0 +1,10 @@ +# InstanceGetOrganizationMembershipsRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `limit` | *?int* | :heavy_minus_sign: | Applies a limit to the number of results returned.
Can be used for paginating the results together with `offset`. | +| `offset` | *?int* | :heavy_minus_sign: | Skip the first `offset` results when paginating.
Needs to be an integer greater or equal to zero.
To be used in conjunction with `limit`. | +| `orderBy` | *?string* | :heavy_minus_sign: | Sorts organizations memberships by phone_number, email_address, created_at, first_name, last_name or username.
By prepending one of those values with + or -,
we can choose to sort in ascending (ASC) or descending (DESC) order. | \ No newline at end of file diff --git a/docs/Models/Operations/InstanceGetOrganizationMembershipsResponse.md b/docs/Models/Operations/InstanceGetOrganizationMembershipsResponse.md new file mode 100644 index 0000000..60a1504 --- /dev/null +++ b/docs/Models/Operations/InstanceGetOrganizationMembershipsResponse.md @@ -0,0 +1,11 @@ +# InstanceGetOrganizationMembershipsResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [\Psr\Http\Message\ResponseInterface](https://www.php-fig.org/psr/psr-7/#33-psrhttpmessageresponseinterface) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `organizationMemberships` | [?Components\OrganizationMemberships](../../Models/Components/OrganizationMemberships.md) | :heavy_minus_sign: | A list of organization memberships | \ No newline at end of file diff --git a/docs/Models/Operations/ListInstanceOrganizationInvitationsQueryParamStatus.md b/docs/Models/Operations/ListInstanceOrganizationInvitationsQueryParamStatus.md new file mode 100644 index 0000000..ffb0710 --- /dev/null +++ b/docs/Models/Operations/ListInstanceOrganizationInvitationsQueryParamStatus.md @@ -0,0 +1,12 @@ +# ListInstanceOrganizationInvitationsQueryParamStatus + +Filter organization invitations based on their status + + +## Values + +| Name | Value | +| ---------- | ---------- | +| `Pending` | pending | +| `Accepted` | accepted | +| `Revoked` | revoked | \ No newline at end of file diff --git a/docs/Models/Operations/ListInstanceOrganizationInvitationsRequest.md b/docs/Models/Operations/ListInstanceOrganizationInvitationsRequest.md new file mode 100644 index 0000000..eba38d5 --- /dev/null +++ b/docs/Models/Operations/ListInstanceOrganizationInvitationsRequest.md @@ -0,0 +1,12 @@ +# ListInstanceOrganizationInvitationsRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `limit` | *?int* | :heavy_minus_sign: | Applies a limit to the number of results returned.
Can be used for paginating the results together with `offset`. | +| `offset` | *?int* | :heavy_minus_sign: | Skip the first `offset` results when paginating.
Needs to be an integer greater or equal to zero.
To be used in conjunction with `limit`. | +| `orderBy` | *?string* | :heavy_minus_sign: | Allows to return organization invitations in a particular order.
At the moment, you can order the returned organization invitations either by their `created_at` or `email_address`.
In order to specify the direction, you can use the `+/-` symbols prepended in the property to order by.
For example, if you want organization invitations 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`. | +| `status` | [?Operations\ListInstanceOrganizationInvitationsQueryParamStatus](../../Models/Operations/ListInstanceOrganizationInvitationsQueryParamStatus.md) | :heavy_minus_sign: | Filter organization invitations based on their status | +| `query` | *?string* | :heavy_minus_sign: | Filter organization invitations based on their `email_address` | \ No newline at end of file diff --git a/docs/Models/Operations/ListInstanceOrganizationInvitationsResponse.md b/docs/Models/Operations/ListInstanceOrganizationInvitationsResponse.md new file mode 100644 index 0000000..0c31250 --- /dev/null +++ b/docs/Models/Operations/ListInstanceOrganizationInvitationsResponse.md @@ -0,0 +1,11 @@ +# ListInstanceOrganizationInvitationsResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [\Psr\Http\Message\ResponseInterface](https://www.php-fig.org/psr/psr-7/#33-psrhttpmessageresponseinterface) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `organizationInvitationsWithPublicOrganizationData` | [?Components\OrganizationInvitationsWithPublicOrganizationData](../../Models/Components/OrganizationInvitationsWithPublicOrganizationData.md) | :heavy_minus_sign: | A list of organization invitations with public organization data | \ No newline at end of file diff --git a/docs/Models/Operations/ListInvitationsQueryParamStatus.md b/docs/Models/Operations/ListInvitationsQueryParamStatus.md new file mode 100644 index 0000000..d729a99 --- /dev/null +++ b/docs/Models/Operations/ListInvitationsQueryParamStatus.md @@ -0,0 +1,13 @@ +# ListInvitationsQueryParamStatus + +Filter invitations based on their status + + +## Values + +| Name | Value | +| ---------- | ---------- | +| `Pending` | pending | +| `Accepted` | accepted | +| `Revoked` | revoked | +| `Expired` | expired | \ No newline at end of file diff --git a/docs/Models/Operations/ListInvitationsRequest.md b/docs/Models/Operations/ListInvitationsRequest.md index a5695a4..3266229 100644 --- a/docs/Models/Operations/ListInvitationsRequest.md +++ b/docs/Models/Operations/ListInvitationsRequest.md @@ -5,6 +5,6 @@ | Field | Type | Required | Description | | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | -| `limit` | *?float* | :heavy_minus_sign: | Applies a limit to the number of results returned.
Can be used for paginating the results together with `offset`. | -| `offset` | *?float* | :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`. | -| `status` | [?Operations\QueryParamStatus](../../Models/Operations/QueryParamStatus.md) | :heavy_minus_sign: | Filter invitations based on their status | \ No newline at end of file +| `limit` | *?int* | :heavy_minus_sign: | Applies a limit to the number of results returned.
Can be used for paginating the results together with `offset`. | +| `offset` | *?int* | :heavy_minus_sign: | Skip the first `offset` results when paginating.
Needs to be an integer greater or equal to zero.
To be used in conjunction with `limit`. | +| `status` | [?Operations\ListInvitationsQueryParamStatus](../../Models/Operations/ListInvitationsQueryParamStatus.md) | :heavy_minus_sign: | Filter invitations based on their status | \ No newline at end of file diff --git a/docs/Models/Operations/ListOAuthApplicationsRequest.md b/docs/Models/Operations/ListOAuthApplicationsRequest.md index 78f3f51..34702cd 100644 --- a/docs/Models/Operations/ListOAuthApplicationsRequest.md +++ b/docs/Models/Operations/ListOAuthApplicationsRequest.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | -| `limit` | *?float* | :heavy_minus_sign: | Applies a limit to the number of results returned.
Can be used for paginating the results together with `offset`. | -| `offset` | *?float* | :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`. | \ No newline at end of file +| `limit` | *?int* | :heavy_minus_sign: | Applies a limit to the number of results returned.
Can be used for paginating the results together with `offset`. | +| `offset` | *?int* | :heavy_minus_sign: | Skip the first `offset` results when paginating.
Needs to be an integer greater or equal to zero.
To be used in conjunction with `limit`. | \ No newline at end of file diff --git a/docs/Models/Operations/ListOrganizationDomainsRequest.md b/docs/Models/Operations/ListOrganizationDomainsRequest.md new file mode 100644 index 0000000..1096542 --- /dev/null +++ b/docs/Models/Operations/ListOrganizationDomainsRequest.md @@ -0,0 +1,12 @@ +# ListOrganizationDomainsRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | +| `organizationId` | *string* | :heavy_check_mark: | The organization ID. | +| `limit` | *?int* | :heavy_minus_sign: | Applies a limit to the number of results returned.
Can be used for paginating the results together with `offset`. | +| `offset` | *?int* | :heavy_minus_sign: | Skip the first `offset` results when paginating.
Needs to be an integer greater or equal to zero.
To be used in conjunction with `limit`. | +| `verified` | *?string* | :heavy_minus_sign: | Filter domains by their verification status. `true` or `false` | +| `enrollmentMode` | *?string* | :heavy_minus_sign: | Filter domains by their enrollment mode | \ No newline at end of file diff --git a/docs/Models/Operations/ListOrganizationDomainsResponse.md b/docs/Models/Operations/ListOrganizationDomainsResponse.md new file mode 100644 index 0000000..ed568da --- /dev/null +++ b/docs/Models/Operations/ListOrganizationDomainsResponse.md @@ -0,0 +1,11 @@ +# ListOrganizationDomainsResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [\Psr\Http\Message\ResponseInterface](https://www.php-fig.org/psr/psr-7/#33-psrhttpmessageresponseinterface) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `organizationDomains` | [?Components\OrganizationDomains](../../Models/Components/OrganizationDomains.md) | :heavy_minus_sign: | A list of organization domains | \ No newline at end of file diff --git a/docs/Models/Operations/ListOrganizationInvitationsRequest.md b/docs/Models/Operations/ListOrganizationInvitationsRequest.md index 25807ac..25f820d 100644 --- a/docs/Models/Operations/ListOrganizationInvitationsRequest.md +++ b/docs/Models/Operations/ListOrganizationInvitationsRequest.md @@ -6,6 +6,6 @@ | Field | Type | Required | Description | | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | | `organizationId` | *string* | :heavy_check_mark: | The organization ID. | -| `limit` | *?float* | :heavy_minus_sign: | Applies a limit to the number of results returned.
Can be used for paginating the results together with `offset`. | -| `offset` | *?float* | :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`. | +| `limit` | *?int* | :heavy_minus_sign: | Applies a limit to the number of results returned.
Can be used for paginating the results together with `offset`. | +| `offset` | *?int* | :heavy_minus_sign: | Skip the first `offset` results when paginating.
Needs to be an integer greater or equal to zero.
To be used in conjunction with `limit`. | | `status` | [?Operations\ListOrganizationInvitationsQueryParamStatus](../../Models/Operations/ListOrganizationInvitationsQueryParamStatus.md) | :heavy_minus_sign: | Filter organization invitations based on their status | \ No newline at end of file diff --git a/docs/Models/Operations/ListOrganizationMembershipsRequest.md b/docs/Models/Operations/ListOrganizationMembershipsRequest.md index 38a63ab..e4b4f27 100644 --- a/docs/Models/Operations/ListOrganizationMembershipsRequest.md +++ b/docs/Models/Operations/ListOrganizationMembershipsRequest.md @@ -6,6 +6,6 @@ | Field | Type | Required | Description | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `organizationId` | *string* | :heavy_check_mark: | The organization ID. | -| `limit` | *?float* | :heavy_minus_sign: | Applies a limit to the number of results returned.
Can be used for paginating the results together with `offset`. | -| `offset` | *?float* | :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`. | +| `limit` | *?int* | :heavy_minus_sign: | Applies a limit to the number of results returned.
Can be used for paginating the results together with `offset`. | +| `offset` | *?int* | :heavy_minus_sign: | Skip the first `offset` results when paginating.
Needs to be an integer greater or equal to zero.
To be used in conjunction with `limit`. | | `orderBy` | *?string* | :heavy_minus_sign: | Sorts organizations memberships by phone_number, email_address, created_at, first_name, last_name or username.
By prepending one of those values with + or -,
we can choose to sort in ascending (ASC) or descending (DESC) order." | \ No newline at end of file diff --git a/docs/Models/Operations/ListOrganizationsRequest.md b/docs/Models/Operations/ListOrganizationsRequest.md index 6dd79fe..2594c7e 100644 --- a/docs/Models/Operations/ListOrganizationsRequest.md +++ b/docs/Models/Operations/ListOrganizationsRequest.md @@ -5,8 +5,8 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `limit` | *?float* | :heavy_minus_sign: | Applies a limit to the number of results returned.
Can be used for paginating the results together with `offset`. | -| `offset` | *?float* | :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`. | +| `limit` | *?int* | :heavy_minus_sign: | Applies a limit to the number of results returned.
Can be used for paginating the results together with `offset`. | +| `offset` | *?int* | :heavy_minus_sign: | Skip the first `offset` results when paginating.
Needs to be an integer greater or equal to zero.
To be used in conjunction with `limit`. | | `includeMembersCount` | *?bool* | :heavy_minus_sign: | Flag to denote whether the member counts of each organization should be included in the response or not. | | `query` | *?string* | :heavy_minus_sign: | Returns organizations with ID, name, or slug that match the given query.
Uses exact match for organization ID and partial match for name and slug. | | `orderBy` | *?string* | :heavy_minus_sign: | Allows to return organizations in a particular order.
At the moment, you can order the returned organizations either by their `name`, `created_at` or `members_count`.
In order to specify the direction, you can use the `+/-` symbols prepended in the property to order by.
For example, if you want organizations 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`. | \ No newline at end of file diff --git a/docs/Models/Operations/ListPendingOrganizationInvitationsRequest.md b/docs/Models/Operations/ListPendingOrganizationInvitationsRequest.md index a9dce28..7aac697 100644 --- a/docs/Models/Operations/ListPendingOrganizationInvitationsRequest.md +++ b/docs/Models/Operations/ListPendingOrganizationInvitationsRequest.md @@ -6,5 +6,5 @@ | Field | Type | Required | Description | | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | | `organizationId` | *string* | :heavy_check_mark: | The organization ID. | -| `limit` | *?float* | :heavy_minus_sign: | Applies a limit to the number of results returned.
Can be used for paginating the results together with `offset`. | -| `offset` | *?float* | :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`. | \ No newline at end of file +| `limit` | *?int* | :heavy_minus_sign: | Applies a limit to the number of results returned.
Can be used for paginating the results together with `offset`. | +| `offset` | *?int* | :heavy_minus_sign: | Skip the first `offset` results when paginating.
Needs to be an integer greater or equal to zero.
To be used in conjunction with `limit`. | \ No newline at end of file diff --git a/docs/Models/Operations/ListSAMLConnectionsRequest.md b/docs/Models/Operations/ListSAMLConnectionsRequest.md index 4fbccb4..cd9b41e 100644 --- a/docs/Models/Operations/ListSAMLConnectionsRequest.md +++ b/docs/Models/Operations/ListSAMLConnectionsRequest.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | -| `limit` | *?float* | :heavy_minus_sign: | Applies a limit to the number of results returned.
Can be used for paginating the results together with `offset`. | -| `offset` | *?float* | :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`. | \ No newline at end of file +| `limit` | *?int* | :heavy_minus_sign: | Applies a limit to the number of results returned.
Can be used for paginating the results together with `offset`. | +| `offset` | *?int* | :heavy_minus_sign: | Skip the first `offset` results when paginating.
Needs to be an integer greater or equal to zero.
To be used in conjunction with `limit`. | \ No newline at end of file diff --git a/docs/Models/Operations/MergeOrganizationMetadataPrivateMetadata.md b/docs/Models/Operations/MergeOrganizationMetadataPrivateMetadata.md deleted file mode 100644 index cc4792e..0000000 --- a/docs/Models/Operations/MergeOrganizationMetadataPrivateMetadata.md +++ /dev/null @@ -1,10 +0,0 @@ -# MergeOrganizationMetadataPrivateMetadata - -Metadata saved on the organization that is only visible to your backend. -The new object will be merged with the existing value. - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/Models/Operations/MergeOrganizationMetadataPublicMetadata.md b/docs/Models/Operations/MergeOrganizationMetadataPublicMetadata.md deleted file mode 100644 index 7dac9e8..0000000 --- a/docs/Models/Operations/MergeOrganizationMetadataPublicMetadata.md +++ /dev/null @@ -1,10 +0,0 @@ -# MergeOrganizationMetadataPublicMetadata - -Metadata saved on the organization, that is visible to both your frontend and backend. -The new object will be merged with the existing value. - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/Models/Operations/MergeOrganizationMetadataRequestBody.md b/docs/Models/Operations/MergeOrganizationMetadataRequestBody.md index 928d733..0199d23 100644 --- a/docs/Models/Operations/MergeOrganizationMetadataRequestBody.md +++ b/docs/Models/Operations/MergeOrganizationMetadataRequestBody.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | -| `publicMetadata` | [?Operations\MergeOrganizationMetadataPublicMetadata](../../Models/Operations/MergeOrganizationMetadataPublicMetadata.md) | :heavy_minus_sign: | Metadata saved on the organization, that is visible to both your frontend and backend.
The new object will be merged with the existing value. | -| `privateMetadata` | [?Operations\MergeOrganizationMetadataPrivateMetadata](../../Models/Operations/MergeOrganizationMetadataPrivateMetadata.md) | :heavy_minus_sign: | Metadata saved on the organization that is only visible to your backend.
The new object will be merged with the existing value. | \ No newline at end of file +| `publicMetadata` | array | :heavy_minus_sign: | Metadata saved on the organization, that is visible to both your frontend and backend.
The new object will be merged with the existing value. | +| `privateMetadata` | array | :heavy_minus_sign: | Metadata saved on the organization that is only visible to your backend.
The new object will be merged with the existing value. | \ No newline at end of file diff --git a/docs/Models/Operations/PasswordHasher.md b/docs/Models/Operations/PasswordHasher.md deleted file mode 100644 index e2cea22..0000000 --- a/docs/Models/Operations/PasswordHasher.md +++ /dev/null @@ -1,145 +0,0 @@ -# PasswordHasher - -The hashing algorithm that was used to generate the password digest. -The algorithms we support at the moment are [bcrypt](https://en.wikipedia.org/wiki/Bcrypt), [bcrypt_sha256_django](https://docs.djangoproject.com/en/4.0/topics/auth/passwords/), -[md5](https://en.wikipedia.org/wiki/MD5), pbkdf2_sha256, pbkdf2_sha512, [pbkdf2_sha256_django](https://docs.djangoproject.com/en/4.0/topics/auth/passwords/), -[phpass](https://www.openwall.com/phpass/), [scrypt_firebase](https://firebaseopensource.com/projects/firebase/scrypt/), -[scrypt_werkzeug](https://werkzeug.palletsprojects.com/en/3.0.x/utils/#werkzeug.security.generate_password_hash), [sha256](https://en.wikipedia.org/wiki/SHA-2) -and the [argon2](https://argon2.online/) variants argon2i and argon2id. - -If you need support for any particular hashing algorithm, [please let us know](https://clerk.com/support). - -Note: for password hashers considered insecure (at this moment MD5 and SHA256), the corresponding user password hashes will be transparently migrated to Bcrypt (a secure hasher) upon the user's first successful password sign in. -Insecure schemes are marked with `(insecure)` in the list below. - -Each of the supported hashers expects the incoming digest to be in a particular format. Specifically: - -**bcrypt:** The digest should be of the following form: - -`$$$` - -**bcrypt_sha256_django:** This is the Django-specific variant of Bcrypt, using SHA256 hashing function. The format should be as follows (as exported from Django): - -`bcrypt_sha256$$$$` - -**md5** (insecure): The digest should follow the regular form e.g.: - -`5f4dcc3b5aa765d61d8327deb882cf99` - -**pbkdf2_sha256:** This is the PBKDF2 algorithm using the SHA256 hashing function. The format should be as follows: - -`pbkdf2_sha256$$$` - -Note: Both the salt and the hash are expected to be base64-encoded. - -**pbkdf2_sha512:** This is the PBKDF2 algorithm using the SHA512 hashing function. The format should be as follows: - -`pbkdf2_sha512$$$` - - _iterations:_ The number of iterations used. Must be an integer less than 420000. - _salt:_ The salt used when generating the hash. Must be less than 1024 bytes. - _hash:_ The hex-encoded hash. Must have been generated with a key length less than 1024 bytes. - -**pbkdf2_sha256_django:** This is the Django-specific variant of PBKDF2 and the digest should have the following format (as exported from Django): - -`pbkdf2_sha256$$$` - -Note: The salt is expected to be un-encoded, the hash is expected base64-encoded. - -**pbkdf2_sha1:** This is similar to pkbdf2_sha256_django, but with two differences: -1. uses sha1 instead of sha256 -2. accepts the hash as a hex-encoded string - -The format is the following: - -`pbkdf2_sha1$$$` - -**phpass:** Portable public domain password hashing framework for use in PHP applications. Digests hashed with phpass have the following sections: - -The format is the following: - -`$P$` - -- $P$ is the prefix used to identify phpass hashes. -- rounds is a single character encoding a 6-bit integer representing the number of rounds used. -- salt is eight characters drawn from [./0-9A-Za-z], providing a 48-bit salt. -- checksum is 22 characters drawn from the same set, encoding the 128-bit checksum with MD5. - -**scrypt_firebase:** The Firebase-specific variant of scrypt. -The value is expected to have 6 segments separated by the $ character and include the following information: - -_hash:_ The actual Base64 hash. This can be retrieved when exporting the user from Firebase. -_salt:_ The salt used to generate the above hash. Again, this is given when exporting the user. -_signer key:_ The base64 encoded signer key. -_salt separator:_ The base64 encoded salt separator. -_rounds:_ The number of rounds the algorithm needs to run. -_memory cost:_ The cost of the algorithm run - -The first 2 (hash and salt) are per user and can be retrieved when exporting the user from Firebase. -The other 4 values (signer key, salt separator, rounds and memory cost) are project-wide settings and can be retrieved from the project's password hash parameters. - -Once you have all these, you can combine it in the following format and send this as the digest in order for Clerk to accept it: - -`$$$$$` - -**scrypt_werkzeug:** The Werkzeug-specific variant of scrypt. - - The value is expected to have 3 segments separated by the $ character and include the following information: - - _algorithm args:_ The algorithm used to generate the hash. - _salt:_ The salt used to generate the above hash. - _hash:_ The actual Base64 hash. - - The algorithm args are the parameters used to generate the hash and are included in the digest. - -**argon2i:** Algorithms in the argon2 family generate digests that encode the following information: - -_version (v):_ The argon version, version 19 is assumed -_memory (m):_ The memory used by the algorithm (in kibibytes) -_iterations (t):_ The number of iterations to perform -_parallelism (p):_ The number of threads to use - -Parts are demarcated by the `$` character, with the first part identifying the algorithm variant. -The middle part is a comma-separated list of the encoding options (memory, iterations, parallelism). -The final part is the actual digest. - -`$argon2i$v=19$m=4096,t=3,p=1$4t6CL3P7YiHBtwESXawI8Hm20zJj4cs7/4/G3c187e0$m7RQFczcKr5bIR0IIxbpO2P0tyrLjf3eUW3M3QSwnLc` - -**argon2id:** See the previous algorithm for an explanation of the formatting. - -For the argon2id case, the value of the algorithm in the first part of the digest is `argon2id`: - -`$argon2id$v=19$m=64,t=4,p=8$Z2liZXJyaXNo$iGXEpMBTDYQ8G/71tF0qGjxRHEmR3gpGULcE93zUJVU` - -**sha256** (insecure): The digest should be a 64-length hex string, e.g.: - -`9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08` - -**sha256_salted** (insecure): The digest should be a 64-length hex string with a salt. - -The format is the following: - `$` - -The value is expected to have 2 segments separated by the $ character and include the following information: - _hash:_ The sha256 hash, a 64-length hex string. - _salt:_ The salt used to generate the above hash. Must be between 1 and 1024 bits. - - -## Values - -| Name | Value | -| -------------------- | -------------------- | -| `Argon2i` | argon2i | -| `Argon2id` | argon2id | -| `Bcrypt` | bcrypt | -| `BcryptSha256Django` | bcrypt_sha256_django | -| `Md5` | md5 | -| `Pbkdf2Sha256` | pbkdf2_sha256 | -| `Pbkdf2Sha512` | pbkdf2_sha512 | -| `Pbkdf2Sha256Django` | pbkdf2_sha256_django | -| `Pbkdf2Sha1` | pbkdf2_sha1 | -| `Phpass` | phpass | -| `ScryptFirebase` | scrypt_firebase | -| `ScryptWerkzeug` | scrypt_werkzeug | -| `Sha256` | sha256 | -| `Sha256Salted` | sha256_salted | \ No newline at end of file diff --git a/docs/Models/Operations/PrivateMetadata.md b/docs/Models/Operations/PrivateMetadata.md deleted file mode 100644 index b307941..0000000 --- a/docs/Models/Operations/PrivateMetadata.md +++ /dev/null @@ -1,9 +0,0 @@ -# PrivateMetadata - -Metadata saved on the user, that is only visible to your Backend API - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/Models/Operations/PublicMetadata.md b/docs/Models/Operations/PublicMetadata.md deleted file mode 100644 index 7332bd0..0000000 --- a/docs/Models/Operations/PublicMetadata.md +++ /dev/null @@ -1,9 +0,0 @@ -# PublicMetadata - -Metadata saved on the user, that is visible to both your Frontend and Backend APIs - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/Models/Operations/QueryParamStatus.md b/docs/Models/Operations/QueryParamStatus.md index 8ce3688..191debf 100644 --- a/docs/Models/Operations/QueryParamStatus.md +++ b/docs/Models/Operations/QueryParamStatus.md @@ -1,6 +1,6 @@ # QueryParamStatus -Filter invitations based on their status +Filter organization invitations based on their status ## Values diff --git a/docs/Models/Operations/RequestBody.md b/docs/Models/Operations/RequestBody.md index 3747e2a..5d5a79e 100644 --- a/docs/Models/Operations/RequestBody.md +++ b/docs/Models/Operations/RequestBody.md @@ -3,11 +3,11 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | -| `emailAddress` | *string* | :heavy_check_mark: | The email address of the new member that is going to be invited to the organization | -| `inviterUserId` | *string* | :heavy_check_mark: | The ID of the user that invites the new member to the organization.
Must be an administrator in the organization. | -| `role` | *string* | :heavy_check_mark: | The role of the new member in the organization. | -| `publicMetadata` | [?Operations\CreateOrganizationInvitationBulkPublicMetadata](../../Models/Operations/CreateOrganizationInvitationBulkPublicMetadata.md) | :heavy_minus_sign: | Metadata saved on the organization invitation, read-only from the Frontend API and fully accessible (read/write) from the Backend API. | -| `privateMetadata` | [?Operations\CreateOrganizationInvitationBulkPrivateMetadata](../../Models/Operations/CreateOrganizationInvitationBulkPrivateMetadata.md) | :heavy_minus_sign: | Metadata saved on the organization invitation, fully accessible (read/write) from the Backend API but not visible from the Frontend API. | -| `redirectUrl` | *?string* | :heavy_minus_sign: | Optional URL that the invitee will be redirected to once they accept the invitation by clicking the join link in the invitation email. | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| `emailAddress` | *string* | :heavy_check_mark: | The email address of the new member that is going to be invited to the organization | +| `role` | *string* | :heavy_check_mark: | The role of the new member in the organization. | +| `publicMetadata` | array | :heavy_minus_sign: | Metadata saved on the organization invitation, read-only from the Frontend API and fully accessible (read/write) from the Backend API. | +| `privateMetadata` | array | :heavy_minus_sign: | Metadata saved on the organization invitation, fully accessible (read/write) from the Backend API but not visible from the Frontend API. | +| `redirectUrl` | *?string* | :heavy_minus_sign: | Optional URL that the invitee will be redirected to once they accept the invitation by clicking the join link in the invitation email. | +| `inviterUserId` | *?string* | :heavy_minus_sign: | The ID of the user that invites the new member to the organization.
Must be an administrator in the organization. | \ No newline at end of file diff --git a/docs/Models/Operations/ResponseBody.md b/docs/Models/Operations/ResponseBody.md index 3a8dda1..ee6d984 100644 --- a/docs/Models/Operations/ResponseBody.md +++ b/docs/Models/Operations/ResponseBody.md @@ -3,14 +3,14 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | -| `object` | *?string* | :heavy_minus_sign: | N/A | -| `externalAccountId` | *?string* | :heavy_minus_sign: | External account ID | -| `providerUserId` | *?string* | :heavy_minus_sign: | The unique ID of the user in the external provider's system | -| `token` | *?string* | :heavy_minus_sign: | The access token | -| `provider` | *?string* | :heavy_minus_sign: | The ID of the provider | -| `publicMetadata` | [?Operations\GetOAuthAccessTokenPublicMetadata](../../Models/Operations/GetOAuthAccessTokenPublicMetadata.md) | :heavy_minus_sign: | N/A | -| `scopes` | array<*string*> | :heavy_minus_sign: | The list of scopes that the token is valid for.
Only present for OAuth 2.0 tokens. | -| `tokenSecret` | *?string* | :heavy_minus_sign: | The token secret. Only present for OAuth 1.0 tokens. | -| `label` | *?string* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `object` | *?string* | :heavy_minus_sign: | N/A | +| `externalAccountId` | *?string* | :heavy_minus_sign: | External account ID | +| `providerUserId` | *?string* | :heavy_minus_sign: | The unique ID of the user in the external provider's system | +| `token` | *?string* | :heavy_minus_sign: | The access token | +| `provider` | *?string* | :heavy_minus_sign: | The ID of the provider | +| `publicMetadata` | array | :heavy_minus_sign: | N/A | +| `scopes` | array<*string*> | :heavy_minus_sign: | The list of scopes that the token is valid for.
Only present for OAuth 2.0 tokens. | +| `tokenSecret` | *?string* | :heavy_minus_sign: | The token secret. Only present for OAuth 1.0 tokens. | +| `label` | *?string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Operations/RevokeOrganizationInvitationRequest.md b/docs/Models/Operations/RevokeOrganizationInvitationRequest.md index 90c7497..96e46b6 100644 --- a/docs/Models/Operations/RevokeOrganizationInvitationRequest.md +++ b/docs/Models/Operations/RevokeOrganizationInvitationRequest.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | -| `organizationId` | *string* | :heavy_check_mark: | The organization ID. | -| `invitationId` | *string* | :heavy_check_mark: | The organization invitation ID. | -| `requestBody` | [Operations\RevokeOrganizationInvitationRequestBody](../../Models/Operations/RevokeOrganizationInvitationRequestBody.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | +| `organizationId` | *string* | :heavy_check_mark: | The organization ID. | +| `invitationId` | *string* | :heavy_check_mark: | The organization invitation ID. | +| `requestBody` | [?Operations\RevokeOrganizationInvitationRequestBody](../../Models/Operations/RevokeOrganizationInvitationRequestBody.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/Models/Operations/RevokeOrganizationInvitationRequestBody.md b/docs/Models/Operations/RevokeOrganizationInvitationRequestBody.md index 624190b..6fd158d 100644 --- a/docs/Models/Operations/RevokeOrganizationInvitationRequestBody.md +++ b/docs/Models/Operations/RevokeOrganizationInvitationRequestBody.md @@ -5,4 +5,4 @@ | Field | Type | Required | Description | | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | -| `requestingUserId` | *string* | :heavy_check_mark: | The ID of the user that revokes the invitation.
Must be an administrator in the organization. | \ No newline at end of file +| `requestingUserId` | *?string* | :heavy_minus_sign: | The ID of the user that revokes the invitation.
Must be an administrator in the organization. | \ No newline at end of file diff --git a/docs/Models/Operations/UnsafeMetadata.md b/docs/Models/Operations/UnsafeMetadata.md deleted file mode 100644 index 6415331..0000000 --- a/docs/Models/Operations/UnsafeMetadata.md +++ /dev/null @@ -1,10 +0,0 @@ -# UnsafeMetadata - -Metadata saved on the user, that can be updated from both the Frontend and Backend APIs. -Note: Since this data can be modified from the frontend, it is not guaranteed to be safe. - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/Models/Operations/UpdateDomainRequestBody.md b/docs/Models/Operations/UpdateDomainRequestBody.md index 36e9f0a..0ba7914 100644 --- a/docs/Models/Operations/UpdateDomainRequestBody.md +++ b/docs/Models/Operations/UpdateDomainRequestBody.md @@ -3,7 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `name` | *?string* | :heavy_minus_sign: | The new domain name. For development instances, can contain the port,
i.e `myhostname:3000`. For production instances, must be a valid FQDN,
i.e `mysite.com`. Cannot contain protocol scheme. | -| `proxyUrl` | *?string* | :heavy_minus_sign: | The full URL of the proxy that will forward requests to Clerk's Frontend API.
Can only be updated for production instances. | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `name` | *?string* | :heavy_minus_sign: | The new domain name. For development instances, can contain the port,
i.e `myhostname:3000`. For production instances, must be a valid FQDN,
i.e `mysite.com`. Cannot contain protocol scheme. | +| `proxyUrl` | *?string* | :heavy_minus_sign: | The full URL of the proxy that will forward requests to Clerk's Frontend API.
Can only be updated for production instances. | +| `isSecondary` | *?bool* | :heavy_minus_sign: | Whether this is a domain for a secondary app, meaning that any subdomain provided is significant and
will be stored as part of the domain. This is useful for supporting multiple apps (one primary and
multiple secondaries) on the same root domain (eTLD+1). | \ No newline at end of file diff --git a/docs/Models/Operations/UpdateOrganizationDomainRequest.md b/docs/Models/Operations/UpdateOrganizationDomainRequest.md new file mode 100644 index 0000000..dfbfed0 --- /dev/null +++ b/docs/Models/Operations/UpdateOrganizationDomainRequest.md @@ -0,0 +1,10 @@ +# UpdateOrganizationDomainRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | +| `organizationId` | *string* | :heavy_check_mark: | The ID of the organization the domain belongs to | +| `domainId` | *string* | :heavy_check_mark: | The ID of the domain | +| `requestBody` | [Operations\UpdateOrganizationDomainRequestBody](../../Models/Operations/UpdateOrganizationDomainRequestBody.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/Models/Operations/UpdateOrganizationDomainRequestBody.md b/docs/Models/Operations/UpdateOrganizationDomainRequestBody.md new file mode 100644 index 0000000..6af86bd --- /dev/null +++ b/docs/Models/Operations/UpdateOrganizationDomainRequestBody.md @@ -0,0 +1,9 @@ +# UpdateOrganizationDomainRequestBody + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | +| `enrollmentMode` | *?string* | :heavy_minus_sign: | The enrollment_mode for the new domain. This can be `automatic_invitation`, `automatic_suggestion` or `manual_invitation` | +| `verified` | *?bool* | :heavy_minus_sign: | The status of the domain's verification | \ No newline at end of file diff --git a/docs/Models/Operations/UpdateOrganizationDomainResponse.md b/docs/Models/Operations/UpdateOrganizationDomainResponse.md new file mode 100644 index 0000000..01e07d8 --- /dev/null +++ b/docs/Models/Operations/UpdateOrganizationDomainResponse.md @@ -0,0 +1,11 @@ +# UpdateOrganizationDomainResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [\Psr\Http\Message\ResponseInterface](https://www.php-fig.org/psr/psr-7/#33-psrhttpmessageresponseinterface) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `organizationDomain` | [?Components\OrganizationDomain](../../Models/Components/OrganizationDomain.md) | :heavy_minus_sign: | An organization domain | \ No newline at end of file diff --git a/docs/Models/Operations/UpdateOrganizationMembershipMetadataPrivateMetadata.md b/docs/Models/Operations/UpdateOrganizationMembershipMetadataPrivateMetadata.md deleted file mode 100644 index 8fae50e..0000000 --- a/docs/Models/Operations/UpdateOrganizationMembershipMetadataPrivateMetadata.md +++ /dev/null @@ -1,10 +0,0 @@ -# UpdateOrganizationMembershipMetadataPrivateMetadata - -Metadata saved on the organization membership that is only visible to your backend. -The new object will be merged with the existing value. - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/Models/Operations/UpdateOrganizationMembershipMetadataPublicMetadata.md b/docs/Models/Operations/UpdateOrganizationMembershipMetadataPublicMetadata.md deleted file mode 100644 index dc1db80..0000000 --- a/docs/Models/Operations/UpdateOrganizationMembershipMetadataPublicMetadata.md +++ /dev/null @@ -1,10 +0,0 @@ -# UpdateOrganizationMembershipMetadataPublicMetadata - -Metadata saved on the organization membership, that is visible to both your frontend and backend. -The new object will be merged with the existing value. - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/Models/Operations/UpdateOrganizationMembershipMetadataRequestBody.md b/docs/Models/Operations/UpdateOrganizationMembershipMetadataRequestBody.md index 1fc9549..e4794ae 100644 --- a/docs/Models/Operations/UpdateOrganizationMembershipMetadataRequestBody.md +++ b/docs/Models/Operations/UpdateOrganizationMembershipMetadataRequestBody.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `publicMetadata` | [?Operations\UpdateOrganizationMembershipMetadataPublicMetadata](../../Models/Operations/UpdateOrganizationMembershipMetadataPublicMetadata.md) | :heavy_minus_sign: | Metadata saved on the organization membership, that is visible to both your frontend and backend.
The new object will be merged with the existing value. | -| `privateMetadata` | [?Operations\UpdateOrganizationMembershipMetadataPrivateMetadata](../../Models/Operations/UpdateOrganizationMembershipMetadataPrivateMetadata.md) | :heavy_minus_sign: | Metadata saved on the organization membership that is only visible to your backend.
The new object will be merged with the existing value. | \ No newline at end of file +| `publicMetadata` | array | :heavy_minus_sign: | Metadata saved on the organization membership, that is visible to both your frontend and backend.
The new object will be merged with the existing value. | +| `privateMetadata` | array | :heavy_minus_sign: | Metadata saved on the organization membership that is only visible to your backend.
The new object will be merged with the existing value. | \ No newline at end of file diff --git a/docs/Models/Operations/UpdateOrganizationPrivateMetadata.md b/docs/Models/Operations/UpdateOrganizationPrivateMetadata.md deleted file mode 100644 index b095281..0000000 --- a/docs/Models/Operations/UpdateOrganizationPrivateMetadata.md +++ /dev/null @@ -1,9 +0,0 @@ -# UpdateOrganizationPrivateMetadata - -Metadata saved on the organization that is only visible to your backend. - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/Models/Operations/UpdateOrganizationPublicMetadata.md b/docs/Models/Operations/UpdateOrganizationPublicMetadata.md deleted file mode 100644 index a83dfeb..0000000 --- a/docs/Models/Operations/UpdateOrganizationPublicMetadata.md +++ /dev/null @@ -1,9 +0,0 @@ -# UpdateOrganizationPublicMetadata - -Metadata saved on the organization, that is visible to both your frontend and backend. - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/Models/Operations/UpdateOrganizationRequestBody.md b/docs/Models/Operations/UpdateOrganizationRequestBody.md index 23603e2..54275c1 100644 --- a/docs/Models/Operations/UpdateOrganizationRequestBody.md +++ b/docs/Models/Operations/UpdateOrganizationRequestBody.md @@ -3,11 +3,12 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | -| `publicMetadata` | [?Operations\UpdateOrganizationPublicMetadata](../../Models/Operations/UpdateOrganizationPublicMetadata.md) | :heavy_minus_sign: | Metadata saved on the organization, that is visible to both your frontend and backend. | -| `privateMetadata` | [?Operations\UpdateOrganizationPrivateMetadata](../../Models/Operations/UpdateOrganizationPrivateMetadata.md) | :heavy_minus_sign: | Metadata saved on the organization that is only visible to your backend. | -| `name` | *?string* | :heavy_minus_sign: | The new name of the organization | -| `slug` | *?string* | :heavy_minus_sign: | The new slug of the organization, which needs to be unique in the instance | -| `maxAllowedMemberships` | *?int* | :heavy_minus_sign: | The maximum number of memberships allowed for this organization | -| `adminDeleteEnabled` | *?bool* | :heavy_minus_sign: | If true, an admin can delete this organization with the Frontend API. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | +| `publicMetadata` | array | :heavy_minus_sign: | Metadata saved on the organization, that is visible to both your frontend and backend. | +| `privateMetadata` | array | :heavy_minus_sign: | Metadata saved on the organization that is only visible to your backend. | +| `createdAt` | *?string* | :heavy_minus_sign: | A custom date/time denoting _when_ the organization was created, specified in RFC3339 format (e.g. `2012-10-20T07:15:20.902Z`). | +| `name` | *?string* | :heavy_minus_sign: | The new name of the organization.
May not contain URLs or HTML. | +| `slug` | *?string* | :heavy_minus_sign: | The new slug of the organization, which needs to be unique in the instance | +| `maxAllowedMemberships` | *?int* | :heavy_minus_sign: | The maximum number of memberships allowed for this organization | +| `adminDeleteEnabled` | *?bool* | :heavy_minus_sign: | If true, an admin can delete this organization with the Frontend API. | \ No newline at end of file diff --git a/docs/Models/Operations/UpdateSAMLConnectionRequestBody.md b/docs/Models/Operations/UpdateSAMLConnectionRequestBody.md index 01b75be..90f82c2 100644 --- a/docs/Models/Operations/UpdateSAMLConnectionRequestBody.md +++ b/docs/Models/Operations/UpdateSAMLConnectionRequestBody.md @@ -16,4 +16,5 @@ | `active` | *?bool* | :heavy_minus_sign: | Activate or de-activate the SAML Connection | | `syncUserAttributes` | *?bool* | :heavy_minus_sign: | Controls whether to update the user's attributes in each sign-in | | `allowSubdomains` | *?bool* | :heavy_minus_sign: | Allow users with an email address subdomain to use this connection in order to authenticate | -| `allowIdpInitiated` | *?bool* | :heavy_minus_sign: | Enable or deactivate IdP-initiated flows | \ No newline at end of file +| `allowIdpInitiated` | *?bool* | :heavy_minus_sign: | Enable or deactivate IdP-initiated flows | +| `disableAdditionalIdentifications` | *?bool* | :heavy_minus_sign: | Enable or deactivate additional identifications | \ No newline at end of file diff --git a/docs/Models/Operations/UpdateSAMLConnectionResponse.md b/docs/Models/Operations/UpdateSAMLConnectionResponse.md index 8bd6e4c..ac90328 100644 --- a/docs/Models/Operations/UpdateSAMLConnectionResponse.md +++ b/docs/Models/Operations/UpdateSAMLConnectionResponse.md @@ -8,4 +8,4 @@ | `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | `rawResponse` | [\Psr\Http\Message\ResponseInterface](https://www.php-fig.org/psr/psr-7/#33-psrhttpmessageresponseinterface) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `samlConnection` | [?Components\SAMLConnection](../../Models/Components/SAMLConnection.md) | :heavy_minus_sign: | A SAML Connection | \ No newline at end of file +| `schemasSAMLConnection` | [?Components\SchemasSAMLConnection](../../Models/Components/SchemasSAMLConnection.md) | :heavy_minus_sign: | A SAML Connection | \ No newline at end of file diff --git a/docs/Models/Operations/UpdateSignUpRequestBody.md b/docs/Models/Operations/UpdateSignUpRequestBody.md index aacc742..027523b 100644 --- a/docs/Models/Operations/UpdateSignUpRequestBody.md +++ b/docs/Models/Operations/UpdateSignUpRequestBody.md @@ -3,7 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `customAction` | *?bool* | :heavy_minus_sign: | Specifies whether a custom action has run for this sign-up attempt.
This is important when your instance has been configured to require a custom action to run before converting a sign-up into a user.
After executing any external business logic you deem necessary, you can mark the sign-up as ready-to-convert by setting `custom_action` to `true`. | -| `externalId` | *?string* | :heavy_minus_sign: | The ID of the guest attempting to sign up as used in your external systems or your previous authentication solution.
This will be copied to the resulting user when the sign-up is completed. | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `externalId` | *?string* | :heavy_minus_sign: | The ID of the guest attempting to sign up as used in your external systems or your previous authentication solution.
This will be copied to the resulting user when the sign-up is completed. | \ No newline at end of file diff --git a/docs/Models/Operations/UpdateUserPasswordHasher.md b/docs/Models/Operations/UpdateUserPasswordHasher.md deleted file mode 100644 index 7b6a4e1..0000000 --- a/docs/Models/Operations/UpdateUserPasswordHasher.md +++ /dev/null @@ -1,135 +0,0 @@ -# UpdateUserPasswordHasher - -The hashing algorithm that was used to generate the password digest. -The algorithms we support at the moment are [bcrypt](https://en.wikipedia.org/wiki/Bcrypt), [bcrypt_sha256_django](https://docs.djangoproject.com/en/4.0/topics/auth/passwords/), -[md5](https://en.wikipedia.org/wiki/MD5), pbkdf2_sha256, pbkdf2_sha512, [pbkdf2_sha256_django](https://docs.djangoproject.com/en/4.0/topics/auth/passwords/), -[phpass](https://www.openwall.com/phpass/), [scrypt_firebase](https://firebaseopensource.com/projects/firebase/scrypt/), -[sha256](https://en.wikipedia.org/wiki/SHA-2), [scrypt_werkzeug](https://werkzeug.palletsprojects.com/en/3.0.x/utils/#werkzeug.security.generate_password_hash) -and the [argon2](https://argon2.online/) variants argon2i and argon2id. - -If you need support for any particular hashing algorithm, [please let us know](https://clerk.com/support). - -Note: for password hashers considered insecure (at this moment MD5 and SHA256), the corresponding user password hashes will be transparently migrated to Bcrypt (a secure hasher) upon the user's first successful password sign in. -Insecure schemes are marked with `(insecure)` in the list below. - -Each of the supported hashers expects the incoming digest to be in a particular format. Specifically: - -**bcrypt:** The digest should be of the following form: - -`$$$` - -**bcrypt_sha256_django:** This is the Django-specific variant of Bcrypt, using SHA256 hashing function. The format should be as follows (as exported from Django): - -`bcrypt_sha256$$$$` - -**md5** (insecure): The digest should follow the regular form e.g.: - -`5f4dcc3b5aa765d61d8327deb882cf99` - -**pbkdf2_sha256:** This is the PBKDF2 algorithm using the SHA256 hashing function. The format should be as follows: - -`pbkdf2_sha256$$$` - -Note: Both the salt and the hash are expected to be base64-encoded. - -**pbkdf2_sha512:** This is the PBKDF2 algorithm using the SHA512 hashing function. The format should be as follows: - -`pbkdf2_sha512$$$` - - _iterations:_ The number of iterations used. Must be an integer less than 420000. - _salt:_ The salt used when generating the hash. Must be less than bytes. - _hash:_ The hex-encoded hash. Must have been generated with a key length less than 1024 bytes. - -**pbkdf2_sha256_django:** This is the Django-specific variant of PBKDF2 and the digest should have the following format (as exported from Django): - -`pbkdf2_sha256$$$` - -Note: The salt is expected to be un-encoded, the hash is expected base64-encoded. - -**pbkdf2_sha1:** This is similar to pkbdf2_sha256_django, but with two differences: -1. uses sha1 instead of sha256 -2. accepts the hash as a hex-encoded string - -The format is the following: - -`pbkdf2_sha1$$$` - -**phpass:** Portable public domain password hashing framework for use in PHP applications. Digests hashed with phpass have the following sections: - -The format is the following: - -`$P$` - -- $P$ is the prefix used to identify phpass hashes. -- rounds is a single character encoding a 6-bit integer representing the number of rounds used. -- salt is eight characters drawn from [./0-9A-Za-z], providing a 48-bit salt. -- checksum is 22 characters drawn from the same set, encoding the 128-bit checksum with MD5. - -**scrypt_firebase:** The Firebase-specific variant of scrypt. -The value is expected to have 6 segments separated by the $ character and include the following information: - -_hash:_ The actual Base64 hash. This can be retrieved when exporting the user from Firebase. -_salt:_ The salt used to generate the above hash. Again, this is given when exporting the user. -_signer key:_ The base64 encoded signer key. -_salt separator:_ The base64 encoded salt separator. -_rounds:_ The number of rounds the algorithm needs to run. -_memory cost:_ The cost of the algorithm run - -The first 2 (hash and salt) are per user and can be retrieved when exporting the user from Firebase. -The other 4 values (signer key, salt separator, rounds and memory cost) are project-wide settings and can be retrieved from the project's password hash parameters. - -Once you have all these, you can combine it in the following format and send this as the digest in order for Clerk to accept it: - -`$$$$$` - -**scrypt_werkzeug:** The Werkzeug-specific variant of scrypt. - -The value is expected to have 3 segments separated by the $ character and include the following information: - -_algorithm args:_ The algorithm used to generate the hash. -_salt:_ The salt used to generate the above hash. -_hash:_ The actual Base64 hash. - -The algorithm args are the parameters used to generate the hash and are included in the digest. - -**argon2i:** Algorithms in the argon2 family generate digests that encode the following information: - -_version (v):_ The argon version, version 19 is assumed -_memory (m):_ The memory used by the algorithm (in kibibytes) -_iterations (t):_ The number of iterations to perform -_parallelism (p):_ The number of threads to use - -Parts are demarcated by the `$` character, with the first part identifying the algorithm variant. -The middle part is a comma-separated list of the encoding options (memory, iterations, parallelism). -The final part is the actual digest. - -`$argon2i$v=19$m=4096,t=3,p=1$4t6CL3P7YiHBtwESXawI8Hm20zJj4cs7/4/G3c187e0$m7RQFczcKr5bIR0IIxbpO2P0tyrLjf3eUW3M3QSwnLc` - -**argon2id:** See the previous algorithm for an explanation of the formatting. - -For the argon2id case, the value of the algorithm in the first part of the digest is `argon2id`: - -`$argon2id$v=19$m=64,t=4,p=8$Z2liZXJyaXNo$iGXEpMBTDYQ8G/71tF0qGjxRHEmR3gpGULcE93zUJVU` - -**sha256** (insecure): The digest should be a 64-length hex string, e.g.: - -`9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08` - - -## Values - -| Name | Value | -| -------------------- | -------------------- | -| `Argon2i` | argon2i | -| `Argon2id` | argon2id | -| `Bcrypt` | bcrypt | -| `BcryptSha256Django` | bcrypt_sha256_django | -| `Md5` | md5 | -| `Pbkdf2Sha256` | pbkdf2_sha256 | -| `Pbkdf2Sha512` | pbkdf2_sha512 | -| `Pbkdf2Sha256Django` | pbkdf2_sha256_django | -| `Pbkdf2Sha1` | pbkdf2_sha1 | -| `Phpass` | phpass | -| `ScryptFirebase` | scrypt_firebase | -| `ScryptWerkzeug` | scrypt_werkzeug | -| `Sha256` | sha256 | \ No newline at end of file diff --git a/docs/Models/Operations/UpdateUserPrivateMetadata.md b/docs/Models/Operations/UpdateUserPrivateMetadata.md deleted file mode 100644 index f07e7af..0000000 --- a/docs/Models/Operations/UpdateUserPrivateMetadata.md +++ /dev/null @@ -1,9 +0,0 @@ -# UpdateUserPrivateMetadata - -Metadata saved on the user, that is only visible to your Backend API - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/Models/Operations/UpdateUserPublicMetadata.md b/docs/Models/Operations/UpdateUserPublicMetadata.md deleted file mode 100644 index 402dcf7..0000000 --- a/docs/Models/Operations/UpdateUserPublicMetadata.md +++ /dev/null @@ -1,9 +0,0 @@ -# UpdateUserPublicMetadata - -Metadata saved on the user, that is visible to both your Frontend and Backend APIs - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/Models/Operations/UpdateUserRequestBody.md b/docs/Models/Operations/UpdateUserRequestBody.md index 8909dcb..41dcaf3 100644 --- a/docs/Models/Operations/UpdateUserRequestBody.md +++ b/docs/Models/Operations/UpdateUserRequestBody.md @@ -3,27 +3,30 @@ ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `primaryEmailAddressId` | *?string* | :heavy_minus_sign: | The ID of the email address to set as primary.
It must be verified, and present on the current user. | -| `notifyPrimaryEmailAddressChanged` | *?bool* | :heavy_minus_sign: | If set to `true`, the user will be notified that their primary email address has changed.
By default, no notification is sent. | -| `primaryPhoneNumberId` | *?string* | :heavy_minus_sign: | The ID of the phone number to set as primary.
It must be verified, and present on the current user. | -| `primaryWeb3WalletId` | *?string* | :heavy_minus_sign: | The ID of the web3 wallets to set as primary.
It must be verified, and present on the current user. | -| `passwordDigest` | *?string* | :heavy_minus_sign: | In case you already have the password digests and not the passwords, you can use them for the newly created user via this property.
The digests should be generated with one of the supported algorithms.
The hashing algorithm can be specified using the `password_hasher` property. | -| `passwordHasher` | [?Operations\UpdateUserPasswordHasher](../../Models/Operations/UpdateUserPasswordHasher.md) | :heavy_minus_sign: | The hashing algorithm that was used to generate the password digest.
The algorithms we support at the moment are [bcrypt](https://en.wikipedia.org/wiki/Bcrypt), [bcrypt_sha256_django](https://docs.djangoproject.com/en/4.0/topics/auth/passwords/),
[md5](https://en.wikipedia.org/wiki/MD5), pbkdf2_sha256, pbkdf2_sha512, [pbkdf2_sha256_django](https://docs.djangoproject.com/en/4.0/topics/auth/passwords/),
[phpass](https://www.openwall.com/phpass/), [scrypt_firebase](https://firebaseopensource.com/projects/firebase/scrypt/),
[sha256](https://en.wikipedia.org/wiki/SHA-2), [scrypt_werkzeug](https://werkzeug.palletsprojects.com/en/3.0.x/utils/#werkzeug.security.generate_password_hash)
and the [argon2](https://argon2.online/) variants argon2i and argon2id.

If you need support for any particular hashing algorithm, [please let us know](https://clerk.com/support).

Note: for password hashers considered insecure (at this moment MD5 and SHA256), the corresponding user password hashes will be transparently migrated to Bcrypt (a secure hasher) upon the user's first successful password sign in.
Insecure schemes are marked with `(insecure)` in the list below.

Each of the supported hashers expects the incoming digest to be in a particular format. Specifically:

**bcrypt:** The digest should be of the following form:

`$$$`

**bcrypt_sha256_django:** This is the Django-specific variant of Bcrypt, using SHA256 hashing function. The format should be as follows (as exported from Django):

`bcrypt_sha256$$$$`

**md5** (insecure): The digest should follow the regular form e.g.:

`5f4dcc3b5aa765d61d8327deb882cf99`

**pbkdf2_sha256:** This is the PBKDF2 algorithm using the SHA256 hashing function. The format should be as follows:

`pbkdf2_sha256$$$`

Note: Both the salt and the hash are expected to be base64-encoded.

**pbkdf2_sha512:** This is the PBKDF2 algorithm using the SHA512 hashing function. The format should be as follows:

`pbkdf2_sha512$$$`

_iterations:_ The number of iterations used. Must be an integer less than 420000.
_salt:_ The salt used when generating the hash. Must be less than bytes.
_hash:_ The hex-encoded hash. Must have been generated with a key length less than 1024 bytes.

**pbkdf2_sha256_django:** This is the Django-specific variant of PBKDF2 and the digest should have the following format (as exported from Django):

`pbkdf2_sha256$$$`

Note: The salt is expected to be un-encoded, the hash is expected base64-encoded.

**pbkdf2_sha1:** This is similar to pkbdf2_sha256_django, but with two differences:
1. uses sha1 instead of sha256
2. accepts the hash as a hex-encoded string

The format is the following:

`pbkdf2_sha1$$$`

**phpass:** Portable public domain password hashing framework for use in PHP applications. Digests hashed with phpass have the following sections:

The format is the following:

`$P$`

- $P$ is the prefix used to identify phpass hashes.
- rounds is a single character encoding a 6-bit integer representing the number of rounds used.
- salt is eight characters drawn from [./0-9A-Za-z], providing a 48-bit salt.
- checksum is 22 characters drawn from the same set, encoding the 128-bit checksum with MD5.

**scrypt_firebase:** The Firebase-specific variant of scrypt.
The value is expected to have 6 segments separated by the $ character and include the following information:

_hash:_ The actual Base64 hash. This can be retrieved when exporting the user from Firebase.
_salt:_ The salt used to generate the above hash. Again, this is given when exporting the user.
_signer key:_ The base64 encoded signer key.
_salt separator:_ The base64 encoded salt separator.
_rounds:_ The number of rounds the algorithm needs to run.
_memory cost:_ The cost of the algorithm run

The first 2 (hash and salt) are per user and can be retrieved when exporting the user from Firebase.
The other 4 values (signer key, salt separator, rounds and memory cost) are project-wide settings and can be retrieved from the project's password hash parameters.

Once you have all these, you can combine it in the following format and send this as the digest in order for Clerk to accept it:

`$$$$$`

**scrypt_werkzeug:** The Werkzeug-specific variant of scrypt.

The value is expected to have 3 segments separated by the $ character and include the following information:

_algorithm args:_ The algorithm used to generate the hash.
_salt:_ The salt used to generate the above hash.
_hash:_ The actual Base64 hash.

The algorithm args are the parameters used to generate the hash and are included in the digest.

**argon2i:** Algorithms in the argon2 family generate digests that encode the following information:

_version (v):_ The argon version, version 19 is assumed
_memory (m):_ The memory used by the algorithm (in kibibytes)
_iterations (t):_ The number of iterations to perform
_parallelism (p):_ The number of threads to use

Parts are demarcated by the `$` character, with the first part identifying the algorithm variant.
The middle part is a comma-separated list of the encoding options (memory, iterations, parallelism).
The final part is the actual digest.

`$argon2i$v=19$m=4096,t=3,p=1$4t6CL3P7YiHBtwESXawI8Hm20zJj4cs7/4/G3c187e0$m7RQFczcKr5bIR0IIxbpO2P0tyrLjf3eUW3M3QSwnLc`

**argon2id:** See the previous algorithm for an explanation of the formatting.

For the argon2id case, the value of the algorithm in the first part of the digest is `argon2id`:

`$argon2id$v=19$m=64,t=4,p=8$Z2liZXJyaXNo$iGXEpMBTDYQ8G/71tF0qGjxRHEmR3gpGULcE93zUJVU`

**sha256** (insecure): The digest should be a 64-length hex string, e.g.:

`9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08` | -| `totpSecret` | *?string* | :heavy_minus_sign: | In case TOTP is configured on the instance, you can provide the secret to enable it on the specific user without the need to reset it.
Please note that currently the supported options are:
* Period: 30 seconds
* Code length: 6 digits
* Algorithm: SHA1 | -| `backupCodes` | array<*string*> | :heavy_minus_sign: | If Backup Codes are configured on the instance, you can provide them to enable it on the specific user without the need to reset them.
You must provide the backup codes in plain format or the corresponding bcrypt digest. | -| `publicMetadata` | [?Operations\UpdateUserPublicMetadata](../../Models/Operations/UpdateUserPublicMetadata.md) | :heavy_minus_sign: | Metadata saved on the user, that is visible to both your Frontend and Backend APIs | -| `privateMetadata` | [?Operations\UpdateUserPrivateMetadata](../../Models/Operations/UpdateUserPrivateMetadata.md) | :heavy_minus_sign: | Metadata saved on the user, that is only visible to your Backend API | -| `unsafeMetadata` | [?Operations\UpdateUserUnsafeMetadata](../../Models/Operations/UpdateUserUnsafeMetadata.md) | :heavy_minus_sign: | Metadata saved on the user, that can be updated from both the Frontend and Backend APIs.
Note: Since this data can be modified from the frontend, it is not guaranteed to be safe. | -| `createdAt` | *?string* | :heavy_minus_sign: | A custom date/time denoting _when_ the user signed up to the application, specified in RFC3339 format (e.g. `2012-10-20T07:15:20.902Z`). | -| `externalId` | *?string* | :heavy_minus_sign: | The ID of the user as used in your external systems or your previous authentication solution.
Must be unique across your instance. | -| `firstName` | *?string* | :heavy_minus_sign: | The first name to assign to the user | -| `lastName` | *?string* | :heavy_minus_sign: | The last name to assign to the user | -| `username` | *?string* | :heavy_minus_sign: | The username to give to the user.
It must be unique across your instance. | -| `profileImageId` | *?string* | :heavy_minus_sign: | The ID of the image to set as the user's profile image | -| `password` | *?string* | :heavy_minus_sign: | The plaintext password to give the user.
Must be at least 8 characters long, and can not be in any list of hacked passwords. | -| `skipPasswordChecks` | *?bool* | :heavy_minus_sign: | Set it to `true` if you're updating the user's password and want to skip any password policy settings check. This parameter can only be used when providing a `password`. | -| `signOutOfOtherSessions` | *?bool* | :heavy_minus_sign: | Set to `true` to sign out the user from all their active sessions once their password is updated. This parameter can only be used when providing a `password`. | -| `deleteSelfEnabled` | *?bool* | :heavy_minus_sign: | If true, the user can delete themselves with the Frontend API. | -| `createOrganizationEnabled` | *?bool* | :heavy_minus_sign: | If true, the user can create organizations with the Frontend API. | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `primaryEmailAddressId` | *?string* | :heavy_minus_sign: | The ID of the email address to set as primary.
It must be verified, and present on the current user. | +| `notifyPrimaryEmailAddressChanged` | *?bool* | :heavy_minus_sign: | If set to `true`, the user will be notified that their primary email address has changed.
By default, no notification is sent. | +| `primaryPhoneNumberId` | *?string* | :heavy_minus_sign: | The ID of the phone number to set as primary.
It must be verified, and present on the current user. | +| `primaryWeb3WalletId` | *?string* | :heavy_minus_sign: | The ID of the web3 wallets to set as primary.
It must be verified, and present on the current user. | +| `passwordDigest` | *?string* | :heavy_minus_sign: | In case you already have the password digests and not the passwords, you can use them for the newly created user via this property.
The digests should be generated with one of the supported algorithms.
The hashing algorithm can be specified using the `password_hasher` property. | +| `passwordHasher` | *?string* | :heavy_minus_sign: | The hashing algorithm that was used to generate the password digest.

The algorithms we support at the moment are [`bcrypt`](https://en.wikipedia.org/wiki/Bcrypt), [`bcrypt_sha256_django`](https://docs.djangoproject.com/en/4.0/topics/auth/passwords/), [`md5`](https://en.wikipedia.org/wiki/MD5), `pbkdf2_sha1`, `pbkdf2_sha256`, [`pbkdf2_sha256_django`](https://docs.djangoproject.com/en/4.0/topics/auth/passwords/),
[`phpass`](https://www.openwall.com/phpass/), [`scrypt_firebase`](https://firebaseopensource.com/projects/firebase/scrypt/),
[`scrypt_werkzeug`](https://werkzeug.palletsprojects.com/en/3.0.x/utils/#werkzeug.security.generate_password_hash), [`sha256`](https://en.wikipedia.org/wiki/SHA-2),
and the [`argon2`](https://argon2.online/) variants: `argon2i` and `argon2id`.

Each of the supported hashers expects the incoming digest to be in a particular format. See the [Clerk docs](https://clerk.com/docs/references/backend/user/create-user) for more information. | +| `totpSecret` | *?string* | :heavy_minus_sign: | In case TOTP is configured on the instance, you can provide the secret to enable it on the specific user without the need to reset it.
Please note that currently the supported options are:
* Period: 30 seconds
* Code length: 6 digits
* Algorithm: SHA1 | +| `backupCodes` | array<*string*> | :heavy_minus_sign: | If Backup Codes are configured on the instance, you can provide them to enable it on the specific user without the need to reset them.
You must provide the backup codes in plain format or the corresponding bcrypt digest. | +| `publicMetadata` | array | :heavy_minus_sign: | Metadata saved on the user, that is visible to both your Frontend and Backend APIs | +| `privateMetadata` | array | :heavy_minus_sign: | Metadata saved on the user, that is only visible to your Backend API | +| `unsafeMetadata` | array | :heavy_minus_sign: | Metadata saved on the user, that can be updated from both the Frontend and Backend APIs.
Note: Since this data can be modified from the frontend, it is not guaranteed to be safe. | +| `createdAt` | *?string* | :heavy_minus_sign: | A custom date/time denoting _when_ the user signed up to the application, specified in RFC3339 format (e.g. `2012-10-20T07:15:20.902Z`). | +| `externalId` | *?string* | :heavy_minus_sign: | The ID of the user as used in your external systems or your previous authentication solution.
Must be unique across your instance. | +| `firstName` | *?string* | :heavy_minus_sign: | The first name to assign to the user | +| `lastName` | *?string* | :heavy_minus_sign: | The last name to assign to the user | +| `username` | *?string* | :heavy_minus_sign: | The username to give to the user.
It must be unique across your instance. | +| `profileImageId` | *?string* | :heavy_minus_sign: | The ID of the image to set as the user's profile image | +| `password` | *?string* | :heavy_minus_sign: | The plaintext password to give the user.
Must be at least 8 characters long, and can not be in any list of hacked passwords. | +| `skipPasswordChecks` | *?bool* | :heavy_minus_sign: | Set it to `true` if you're updating the user's password and want to skip any password policy settings check. This parameter can only be used when providing a `password`. | +| `signOutOfOtherSessions` | *?bool* | :heavy_minus_sign: | Set to `true` to sign out the user from all their active sessions once their password is updated. This parameter can only be used when providing a `password`. | +| `deleteSelfEnabled` | *?bool* | :heavy_minus_sign: | If true, the user can delete themselves with the Frontend API. | +| `createOrganizationEnabled` | *?bool* | :heavy_minus_sign: | If true, the user can create organizations with the Frontend API. | +| `legalAcceptedAt` | *?string* | :heavy_minus_sign: | A custom timestamps denoting _when_ the user accepted legal requirements, specified in RFC3339 format (e.g. `2012-10-20T07:15:20.902Z`). | +| `skipLegalChecks` | *?bool* | :heavy_minus_sign: | When set to `true` all legal checks are skipped.
It is not recommended to skip legal checks unless you are migrating a user to Clerk. | +| `createOrganizationsLimit` | *?int* | :heavy_minus_sign: | The maximum number of organizations the user can create. 0 means unlimited. | \ No newline at end of file diff --git a/docs/Models/Operations/UpdateUserUnsafeMetadata.md b/docs/Models/Operations/UpdateUserUnsafeMetadata.md deleted file mode 100644 index 1cc911b..0000000 --- a/docs/Models/Operations/UpdateUserUnsafeMetadata.md +++ /dev/null @@ -1,10 +0,0 @@ -# UpdateUserUnsafeMetadata - -Metadata saved on the user, that can be updated from both the Frontend and Backend APIs. -Note: Since this data can be modified from the frontend, it is not guaranteed to be safe. - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/Models/Operations/UploadOrganizationLogoRequestBody.md b/docs/Models/Operations/UploadOrganizationLogoRequestBody.md index a165099..ca42fa6 100644 --- a/docs/Models/Operations/UploadOrganizationLogoRequestBody.md +++ b/docs/Models/Operations/UploadOrganizationLogoRequestBody.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -| `uploaderUserId` | *string* | :heavy_check_mark: | The ID of the user that will be credited with the image upload. | -| `file` | [Operations\UploadOrganizationLogoFile](../../Models/Operations/UploadOrganizationLogoFile.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| `file` | [Operations\UploadOrganizationLogoFile](../../Models/Operations/UploadOrganizationLogoFile.md) | :heavy_check_mark: | N/A | +| `uploaderUserId` | *?string* | :heavy_minus_sign: | The ID of the user that will be credited with the image upload. | \ No newline at end of file diff --git a/docs/Models/Operations/UserPasskeyDeleteRequest.md b/docs/Models/Operations/UserPasskeyDeleteRequest.md new file mode 100644 index 0000000..233a8d9 --- /dev/null +++ b/docs/Models/Operations/UserPasskeyDeleteRequest.md @@ -0,0 +1,9 @@ +# UserPasskeyDeleteRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | +| `userId` | *string* | :heavy_check_mark: | The ID of the user that owns the passkey identity | +| `passkeyIdentificationId` | *string* | :heavy_check_mark: | The ID of the passkey identity to be deleted | \ No newline at end of file diff --git a/docs/Models/Operations/UserPasskeyDeleteResponse.md b/docs/Models/Operations/UserPasskeyDeleteResponse.md new file mode 100644 index 0000000..913f6a3 --- /dev/null +++ b/docs/Models/Operations/UserPasskeyDeleteResponse.md @@ -0,0 +1,11 @@ +# UserPasskeyDeleteResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [\Psr\Http\Message\ResponseInterface](https://www.php-fig.org/psr/psr-7/#33-psrhttpmessageresponseinterface) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `deletedObject` | [?Components\DeletedObject](../../Models/Components/DeletedObject.md) | :heavy_minus_sign: | Deleted Object | \ No newline at end of file diff --git a/docs/Models/Operations/UserWeb3WalletDeleteRequest.md b/docs/Models/Operations/UserWeb3WalletDeleteRequest.md new file mode 100644 index 0000000..81a808f --- /dev/null +++ b/docs/Models/Operations/UserWeb3WalletDeleteRequest.md @@ -0,0 +1,9 @@ +# UserWeb3WalletDeleteRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | +| `userId` | *string* | :heavy_check_mark: | The ID of the user that owns the web3 wallet | +| `web3WalletIdentificationId` | *string* | :heavy_check_mark: | The ID of the web3 wallet identity to be deleted | \ No newline at end of file diff --git a/docs/Models/Operations/UserWeb3WalletDeleteResponse.md b/docs/Models/Operations/UserWeb3WalletDeleteResponse.md new file mode 100644 index 0000000..5839fb0 --- /dev/null +++ b/docs/Models/Operations/UserWeb3WalletDeleteResponse.md @@ -0,0 +1,11 @@ +# UserWeb3WalletDeleteResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [\Psr\Http\Message\ResponseInterface](https://www.php-fig.org/psr/psr-7/#33-psrhttpmessageresponseinterface) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `deletedObject` | [?Components\DeletedObject](../../Models/Components/DeletedObject.md) | :heavy_minus_sign: | Deleted Object | \ No newline at end of file diff --git a/docs/Models/Operations/UsersGetOrganizationInvitationsRequest.md b/docs/Models/Operations/UsersGetOrganizationInvitationsRequest.md new file mode 100644 index 0000000..c7ac040 --- /dev/null +++ b/docs/Models/Operations/UsersGetOrganizationInvitationsRequest.md @@ -0,0 +1,11 @@ +# UsersGetOrganizationInvitationsRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | +| `userId` | *string* | :heavy_check_mark: | The ID of the user whose organization invitations we want to retrieve | +| `limit` | *?int* | :heavy_minus_sign: | Applies a limit to the number of results returned.
Can be used for paginating the results together with `offset`. | +| `offset` | *?int* | :heavy_minus_sign: | Skip the first `offset` results when paginating.
Needs to be an integer greater or equal to zero.
To be used in conjunction with `limit`. | +| `status` | [?Operations\QueryParamStatus](../../Models/Operations/QueryParamStatus.md) | :heavy_minus_sign: | Filter organization invitations based on their status | \ No newline at end of file diff --git a/docs/Models/Operations/UsersGetOrganizationInvitationsResponse.md b/docs/Models/Operations/UsersGetOrganizationInvitationsResponse.md new file mode 100644 index 0000000..c2d9ecd --- /dev/null +++ b/docs/Models/Operations/UsersGetOrganizationInvitationsResponse.md @@ -0,0 +1,11 @@ +# UsersGetOrganizationInvitationsResponse + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [\Psr\Http\Message\ResponseInterface](https://www.php-fig.org/psr/psr-7/#33-psrhttpmessageresponseinterface) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `organizationInvitationsWithPublicOrganizationData` | [?Components\OrganizationInvitationsWithPublicOrganizationData](../../Models/Components/OrganizationInvitationsWithPublicOrganizationData.md) | :heavy_minus_sign: | A list of organization invitations with public organization data | \ No newline at end of file diff --git a/docs/Models/Operations/UsersGetOrganizationMembershipsRequest.md b/docs/Models/Operations/UsersGetOrganizationMembershipsRequest.md index ddb6b26..d790ae9 100644 --- a/docs/Models/Operations/UsersGetOrganizationMembershipsRequest.md +++ b/docs/Models/Operations/UsersGetOrganizationMembershipsRequest.md @@ -6,5 +6,5 @@ | Field | Type | Required | Description | | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | | `userId` | *string* | :heavy_check_mark: | The ID of the user whose organization memberships we want to retrieve | -| `limit` | *?float* | :heavy_minus_sign: | Applies a limit to the number of results returned.
Can be used for paginating the results together with `offset`. | -| `offset` | *?float* | :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`. | \ No newline at end of file +| `limit` | *?int* | :heavy_minus_sign: | Applies a limit to the number of results returned.
Can be used for paginating the results together with `offset`. | +| `offset` | *?int* | :heavy_minus_sign: | Skip the first `offset` results when paginating.
Needs to be an integer greater or equal to zero.
To be used in conjunction with `limit`. | \ No newline at end of file diff --git a/docs/Models/Operations/VerifyClientRequestBody.md b/docs/Models/Operations/VerifyClientRequestBody.md index e7a48ac..9e96f1f 100644 --- a/docs/Models/Operations/VerifyClientRequestBody.md +++ b/docs/Models/Operations/VerifyClientRequestBody.md @@ -5,6 +5,6 @@ Parameters. ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | -| `token` | *?string* | :heavy_minus_sign: | A JWT Token that represents the active client. | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | +| `token` | *?string* | :heavy_minus_sign: | A JWT that represents the active client. | \ No newline at end of file diff --git a/docs/sdks/actortokens/README.md b/docs/sdks/actortokens/README.md index e0cf68d..136c8e4 100644 --- a/docs/sdks/actortokens/README.md +++ b/docs/sdks/actortokens/README.md @@ -3,15 +3,12 @@ ## Overview -Allow your users to sign in on behalf of other users. - - ### Available Operations -* [createActorToken](#createactortoken) - Create actor token -* [revokeActorToken](#revokeactortoken) - Revoke actor token +* [create](#create) - Create actor token +* [revoke](#revoke) - Revoke actor token -## createActorToken +## create Create an actor token that can be used to impersonate the given user. The `actor` parameter needs to include at least a "sub" key whose value is the ID of the actor (impersonating) user. @@ -35,7 +32,7 @@ $request = new Operations\CreateActorTokenRequestBody( actor: new Operations\Actor(), ); -$response = $sdk->actorTokens->createActorToken( +$response = $sdk->actorTokens->create( request: $request ); @@ -58,10 +55,10 @@ if ($response->actorToken !== null) { | Error Type | Status Code | Content Type | | -------------------- | -------------------- | -------------------- | -| Errors\ClerkErrors44 | 400, 402, 422 | application/json | +| Errors\ClerkErrors53 | 400, 402, 422 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | -## revokeActorToken +## revoke Revokes a pending actor token. @@ -80,7 +77,7 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); -$response = $sdk->actorTokens->revokeActorToken( +$response = $sdk->actorTokens->revoke( actorTokenId: '' ); @@ -103,5 +100,5 @@ if ($response->actorToken !== null) { | Error Type | Status Code | Content Type | | -------------------- | -------------------- | -------------------- | -| Errors\ClerkErrors45 | 400, 404 | application/json | +| Errors\ClerkErrors54 | 400, 404 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/allowlistblocklist/README.md b/docs/sdks/allowlistblocklist/README.md index eb41de4..fecfac5 100644 --- a/docs/sdks/allowlistblocklist/README.md +++ b/docs/sdks/allowlistblocklist/README.md @@ -1,19 +1,12 @@ -# AllowListBlockList -(*allowListBlockList*) +# AllowlistBlocklist +(*allowlistBlocklist*) ## Overview -Allow-lists and Block-lists allow you to control who can sign up or sign in -to your application, by restricting access based on the user's email -address or phone number. - - ### Available Operations * [listAllowlistIdentifiers](#listallowlistidentifiers) - List all identifiers on the allow-list * [createAllowlistIdentifier](#createallowlistidentifier) - Add identifier to the allow-list -* [deleteAllowlistIdentifier](#deleteallowlistidentifier) - Delete identifier from allow-list -* [listBlocklistIdentifiers](#listblocklistidentifiers) - List all identifiers on the block-list * [createBlocklistIdentifier](#createblocklistidentifier) - Add identifier to the block-list * [deleteBlocklistIdentifier](#deleteblocklistidentifier) - Delete identifier from block-list @@ -36,7 +29,7 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); -$response = $sdk->allowListBlockList->listAllowlistIdentifiers( +$response = $sdk->allowlistBlocklist->listAllowlistIdentifiers( ); @@ -53,7 +46,7 @@ if ($response->allowlistIdentifierList !== null) { | Error Type | Status Code | Content Type | | -------------------- | -------------------- | -------------------- | -| Errors\ClerkErrors36 | 401, 402 | application/json | +| Errors\ClerkErrors45 | 401, 402 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | ## createAllowlistIdentifier @@ -78,7 +71,7 @@ $request = new Operations\CreateAllowlistIdentifierRequestBody( identifier: '', ); -$response = $sdk->allowListBlockList->createAllowlistIdentifier( +$response = $sdk->allowlistBlocklist->createAllowlistIdentifier( request: $request ); @@ -101,91 +94,7 @@ if ($response->allowlistIdentifier !== null) { | Error Type | Status Code | Content Type | | -------------------- | -------------------- | -------------------- | -| Errors\ClerkErrors37 | 400, 402, 422 | application/json | -| Errors\SDKException | 4XX, 5XX | \*/\* | - -## deleteAllowlistIdentifier - -Delete an identifier from the instance allow-list - -### Example Usage - -```php -declare(strict_types=1); - -require 'vendor/autoload.php'; - -use Clerk\Backend; - -$security = ''; - -$sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); - - - -$response = $sdk->allowListBlockList->deleteAllowlistIdentifier( - identifierId: '' -); - -if ($response->deletedObject !== null) { - // handle response -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | -| `identifierId` | *string* | :heavy_check_mark: | The ID of the identifier to delete from the allow-list | - -### Response - -**[?Operations\DeleteAllowlistIdentifierResponse](../../Models/Operations/DeleteAllowlistIdentifierResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| -------------------- | -------------------- | -------------------- | -| Errors\ClerkErrors38 | 402, 404 | application/json | -| Errors\SDKException | 4XX, 5XX | \*/\* | - -## listBlocklistIdentifiers - -Get a list of all identifiers which are not allowed to access an instance - -### Example Usage - -```php -declare(strict_types=1); - -require 'vendor/autoload.php'; - -use Clerk\Backend; - -$security = ''; - -$sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); - - - -$response = $sdk->allowListBlockList->listBlocklistIdentifiers( - -); - -if ($response->blocklistIdentifiers !== null) { - // handle response -} -``` - -### Response - -**[?Operations\ListBlocklistIdentifiersResponse](../../Models/Operations/ListBlocklistIdentifiersResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| -------------------- | -------------------- | -------------------- | -| Errors\ClerkErrors39 | 401, 402 | application/json | +| Errors\ClerkErrors46 | 400, 402, 422 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | ## createBlocklistIdentifier @@ -210,7 +119,7 @@ $request = new Operations\CreateBlocklistIdentifierRequestBody( identifier: '', ); -$response = $sdk->allowListBlockList->createBlocklistIdentifier( +$response = $sdk->allowlistBlocklist->createBlocklistIdentifier( request: $request ); @@ -233,7 +142,7 @@ if ($response->blocklistIdentifier !== null) { | Error Type | Status Code | Content Type | | -------------------- | -------------------- | -------------------- | -| Errors\ClerkErrors40 | 400, 402, 422 | application/json | +| Errors\ClerkErrors49 | 400, 402, 422 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | ## deleteBlocklistIdentifier @@ -255,7 +164,7 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); -$response = $sdk->allowListBlockList->deleteBlocklistIdentifier( +$response = $sdk->allowlistBlocklist->deleteBlocklistIdentifier( identifierId: '' ); @@ -278,5 +187,5 @@ if ($response->deletedObject !== null) { | Error Type | Status Code | Content Type | | -------------------- | -------------------- | -------------------- | -| Errors\ClerkErrors41 | 402, 404 | application/json | +| Errors\ClerkErrors50 | 402, 404 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/allowlistidentifiers/README.md b/docs/sdks/allowlistidentifiers/README.md new file mode 100644 index 0000000..4767a21 --- /dev/null +++ b/docs/sdks/allowlistidentifiers/README.md @@ -0,0 +1,53 @@ +# AllowlistIdentifiers +(*allowlistIdentifiers*) + +## Overview + +### Available Operations + +* [delete](#delete) - Delete identifier from allow-list + +## delete + +Delete an identifier from the instance allow-list + +### Example Usage + +```php +declare(strict_types=1); + +require 'vendor/autoload.php'; + +use Clerk\Backend; + +$security = ''; + +$sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); + + + +$response = $sdk->allowlistIdentifiers->delete( + identifierId: '' +); + +if ($response->deletedObject !== null) { + // handle response +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | +| `identifierId` | *string* | :heavy_check_mark: | The ID of the identifier to delete from the allow-list | + +### Response + +**[?Operations\DeleteAllowlistIdentifierResponse](../../Models/Operations/DeleteAllowlistIdentifierResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------- | -------------------- | -------------------- | +| Errors\ClerkErrors47 | 402, 404 | application/json | +| Errors\SDKException | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/betafeatures/README.md b/docs/sdks/betafeatures/README.md index 891bd24..189f0ef 100644 --- a/docs/sdks/betafeatures/README.md +++ b/docs/sdks/betafeatures/README.md @@ -3,15 +3,13 @@ ## Overview -Modify instance settings that are currently in beta. - ### Available Operations -* [updateInstanceAuthConfig](#updateinstanceauthconfig) - Update instance settings -* [~~updateProductionInstanceDomain~~](#updateproductioninstancedomain) - Update production instance domain :warning: **Deprecated** +* [updateInstanceSettings](#updateinstancesettings) - Update instance settings +* [~~updateDomain~~](#updatedomain) - Update production instance domain :warning: **Deprecated** * [changeProductionInstanceDomain](#changeproductioninstancedomain) - Update production instance domain -## updateInstanceAuthConfig +## updateInstanceSettings Updates the settings of an instance @@ -31,7 +29,7 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); $request = new Operations\UpdateInstanceAuthConfigRequestBody(); -$response = $sdk->betaFeatures->updateInstanceAuthConfig( +$response = $sdk->betaFeatures->updateInstanceSettings( request: $request ); @@ -54,10 +52,10 @@ if ($response->instanceSettings !== null) { | Error Type | Status Code | Content Type | | -------------------- | -------------------- | -------------------- | -| Errors\ClerkErrors42 | 402, 422 | application/json | +| Errors\ClerkErrors51 | 402, 422 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | -## ~~updateProductionInstanceDomain~~ +## ~~updateDomain~~ Change the domain of a production instance. @@ -83,7 +81,7 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); $request = new Operations\UpdateProductionInstanceDomainRequestBody(); -$response = $sdk->betaFeatures->updateProductionInstanceDomain( +$response = $sdk->betaFeatures->updateDomain( request: $request ); @@ -106,7 +104,7 @@ if ($response->statusCode === 200) { | Error Type | Status Code | Content Type | | -------------------- | -------------------- | -------------------- | -| Errors\ClerkErrors43 | 400, 422 | application/json | +| Errors\ClerkErrors52 | 400, 422 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | ## changeProductionInstanceDomain @@ -156,5 +154,5 @@ if ($response->statusCode === 200) { | Error Type | Status Code | Content Type | | -------------------- | -------------------- | -------------------- | -| Errors\ClerkErrors50 | 400, 422 | application/json | +| Errors\ClerkErrors60 | 400, 422 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/blocklistidentifiers/README.md b/docs/sdks/blocklistidentifiers/README.md new file mode 100644 index 0000000..112d91f --- /dev/null +++ b/docs/sdks/blocklistidentifiers/README.md @@ -0,0 +1,47 @@ +# BlocklistIdentifiers +(*blocklistIdentifiers*) + +## Overview + +### Available Operations + +* [list](#list) - List all identifiers on the block-list + +## list + +Get a list of all identifiers which are not allowed to access an instance + +### Example Usage + +```php +declare(strict_types=1); + +require 'vendor/autoload.php'; + +use Clerk\Backend; + +$security = ''; + +$sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); + + + +$response = $sdk->blocklistIdentifiers->list( + +); + +if ($response->blocklistIdentifiers !== null) { + // handle response +} +``` + +### Response + +**[?Operations\ListBlocklistIdentifiersResponse](../../Models/Operations/ListBlocklistIdentifiersResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------- | -------------------- | -------------------- | +| Errors\ClerkErrors48 | 401, 402 | application/json | +| Errors\SDKException | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/clerkbackendredirecturls/README.md b/docs/sdks/clerkbackendredirecturls/README.md new file mode 100644 index 0000000..8ee0bca --- /dev/null +++ b/docs/sdks/clerkbackendredirecturls/README.md @@ -0,0 +1,146 @@ +# ClerkBackendRedirectUrls +(*redirectUrls*) + +## Overview + +### Available Operations + +* [create](#create) - Create a redirect URL +* [get](#get) - Retrieve a redirect URL +* [delete](#delete) - Delete a redirect URL + +## create + +Create a redirect URL + +### Example Usage + +```php +declare(strict_types=1); + +require 'vendor/autoload.php'; + +use Clerk\Backend; +use Clerk\Backend\Models\Operations; + +$security = ''; + +$sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); + +$request = new Operations\CreateRedirectURLRequestBody(); + +$response = $sdk->redirectUrls->create( + request: $request +); + +if ($response->redirectURL !== null) { + // handle response +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `$request` | [Operations\CreateRedirectURLRequestBody](../../Models/Operations/CreateRedirectURLRequestBody.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[?Operations\CreateRedirectURLResponse](../../Models/Operations/CreateRedirectURLResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------- | -------------------- | -------------------- | +| Errors\ClerkErrors89 | 400, 422 | application/json | +| Errors\SDKException | 4XX, 5XX | \*/\* | + +## get + +Retrieve the details of the redirect URL with the given ID + +### Example Usage + +```php +declare(strict_types=1); + +require 'vendor/autoload.php'; + +use Clerk\Backend; + +$security = ''; + +$sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); + + + +$response = $sdk->redirectUrls->get( + id: '' +); + +if ($response->redirectURL !== null) { + // handle response +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------- | -------------------------- | -------------------------- | -------------------------- | +| `id` | *string* | :heavy_check_mark: | The ID of the redirect URL | + +### Response + +**[?Operations\GetRedirectURLResponse](../../Models/Operations/GetRedirectURLResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------- | -------------------- | -------------------- | +| Errors\ClerkErrors90 | 404 | application/json | +| Errors\SDKException | 4XX, 5XX | \*/\* | + +## delete + +Remove the selected redirect URL from the whitelist of the instance + +### Example Usage + +```php +declare(strict_types=1); + +require 'vendor/autoload.php'; + +use Clerk\Backend; + +$security = ''; + +$sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); + + + +$response = $sdk->redirectUrls->delete( + id: '' +); + +if ($response->deletedObject !== null) { + // handle response +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------- | -------------------------- | -------------------------- | -------------------------- | +| `id` | *string* | :heavy_check_mark: | The ID of the redirect URL | + +### Response + +**[?Operations\DeleteRedirectURLResponse](../../Models/Operations/DeleteRedirectURLResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------- | -------------------- | -------------------- | +| Errors\ClerkErrors91 | 404 | application/json | +| Errors\SDKException | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/clients/README.md b/docs/sdks/clients/README.md index a916a27..ac5dedf 100644 --- a/docs/sdks/clients/README.md +++ b/docs/sdks/clients/README.md @@ -8,11 +8,11 @@ The Client object tracks sessions, as well as the state of any sign in and sign ### Available Operations -* [~~getClientList~~](#getclientlist) - List all clients :warning: **Deprecated** -* [verifyClient](#verifyclient) - Verify a client -* [getClient](#getclient) - Get a client +* [~~list~~](#list) - List all clients :warning: **Deprecated** +* [verify](#verify) - Verify a client +* [get](#get) - Get a client -## ~~getClientList~~ +## ~~list~~ Returns a list of all clients. The clients are returned sorted by creation date, with the newest clients appearing first. @@ -35,7 +35,7 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); -$response = $sdk->clients->getClientList( +$response = $sdk->clients->list( limit: 10, offset: 0 @@ -50,8 +50,8 @@ if ($response->clientList !== null) { | Parameter | Type | Required | Description | | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | -| `limit` | *?float* | :heavy_minus_sign: | Applies a limit to the number of results returned.
Can be used for paginating the results together with `offset`. | -| `offset` | *?float* | :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`. | +| `limit` | *?int* | :heavy_minus_sign: | Applies a limit to the number of results returned.
Can be used for paginating the results together with `offset`. | +| `offset` | *?int* | :heavy_minus_sign: | Skip the first `offset` results when paginating.
Needs to be an integer greater or equal to zero.
To be used in conjunction with `limit`. | ### Response @@ -64,7 +64,7 @@ if ($response->clientList !== null) { | Errors\ClerkErrors | 400, 401, 410, 422 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | -## verifyClient +## verify Verifies the client in the provided token @@ -84,7 +84,7 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); $request = new Operations\VerifyClientRequestBody(); -$response = $sdk->clients->verifyClient( +$response = $sdk->clients->verify( request: $request ); @@ -110,7 +110,7 @@ if ($response->client !== null) { | Errors\ClerkErrors1 | 400, 401, 404 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | -## getClient +## get Returns the details of a client. @@ -129,7 +129,7 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); -$response = $sdk->clients->getClient( +$response = $sdk->clients->get( clientId: '' ); diff --git a/docs/sdks/domains/README.md b/docs/sdks/domains/README.md index 46c451a..c526e5a 100644 --- a/docs/sdks/domains/README.md +++ b/docs/sdks/domains/README.md @@ -7,12 +7,12 @@ Domains represent each instance's URLs and DNS setup. ### Available Operations -* [listDomains](#listdomains) - List all instance domains -* [addDomain](#adddomain) - Add a domain -* [deleteDomain](#deletedomain) - Delete a satellite domain -* [updateDomain](#updatedomain) - Update a domain +* [list](#list) - List all instance domains +* [add](#add) - Add a domain +* [delete](#delete) - Delete a satellite domain +* [update](#update) - Update a domain -## listDomains +## list Use this endpoint to get a list of all domains for an instance. The response will contain the primary domain for the instance and any satellite domains. Each domain in the response contains information about the URLs where Clerk operates and the required CNAME targets. @@ -32,7 +32,7 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); -$response = $sdk->domains->listDomains( +$response = $sdk->domains->list( ); @@ -51,7 +51,7 @@ if ($response->domains !== null) { | ------------------- | ------------------- | ------------------- | | Errors\SDKException | 4XX, 5XX | \*/\* | -## addDomain +## add Add a new domain for your instance. Useful in the case of multi-domain instances, allows adding satellite domains to an instance. @@ -78,7 +78,7 @@ $request = new Operations\AddDomainRequestBody( isSatellite: false, ); -$response = $sdk->domains->addDomain( +$response = $sdk->domains->add( request: $request ); @@ -101,10 +101,10 @@ if ($response->domain !== null) { | Error Type | Status Code | Content Type | | -------------------- | -------------------- | -------------------- | -| Errors\ClerkErrors46 | 400, 402, 422 | application/json | +| Errors\ClerkErrors55 | 400, 402, 422 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | -## deleteDomain +## delete Deletes a satellite domain for the instance. It is currently not possible to delete the instance's primary domain. @@ -124,7 +124,7 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); -$response = $sdk->domains->deleteDomain( +$response = $sdk->domains->delete( domainId: '' ); @@ -147,10 +147,10 @@ if ($response->deletedObject !== null) { | Error Type | Status Code | Content Type | | -------------------- | -------------------- | -------------------- | -| Errors\ClerkErrors47 | 403, 404 | application/json | +| Errors\ClerkErrors56 | 403, 404 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | -## updateDomain +## update The `proxy_url` can be updated only for production instances. Update one of the instance's domains. Both primary and satellite domains can be updated. @@ -177,7 +177,7 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); $requestBody = new Operations\UpdateDomainRequestBody(); -$response = $sdk->domains->updateDomain( +$response = $sdk->domains->update( domainId: '', requestBody: $requestBody @@ -203,5 +203,5 @@ if ($response->domain !== null) { | Error Type | Status Code | Content Type | | -------------------- | -------------------- | -------------------- | -| Errors\ClerkErrors48 | 400, 404, 422 | application/json | +| Errors\ClerkErrors57 | 400, 404, 422 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/emailaddresses/README.md b/docs/sdks/emailaddresses/README.md index 5f6e857..29b986c 100644 --- a/docs/sdks/emailaddresses/README.md +++ b/docs/sdks/emailaddresses/README.md @@ -3,17 +3,14 @@ ## Overview -A user can be associated with one or more email addresses, which allows them to be contacted via email. - - ### Available Operations -* [createEmailAddress](#createemailaddress) - Create an email address -* [getEmailAddress](#getemailaddress) - Retrieve an email address -* [deleteEmailAddress](#deleteemailaddress) - Delete an email address -* [updateEmailAddress](#updateemailaddress) - Update an email address +* [create](#create) - Create an email address +* [get](#get) - Retrieve an email address +* [delete](#delete) - Delete an email address +* [update](#update) - Update an email address -## createEmailAddress +## create Create a new email address @@ -33,7 +30,7 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); $request = new Operations\CreateEmailAddressRequestBody(); -$response = $sdk->emailAddresses->createEmailAddress( +$response = $sdk->emailAddresses->create( request: $request ); @@ -59,7 +56,7 @@ if ($response->emailAddress !== null) { | Errors\ClerkErrors3 | 400, 401, 403, 404, 422 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | -## getEmailAddress +## get Returns the details of an email address. @@ -78,7 +75,7 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); -$response = $sdk->emailAddresses->getEmailAddress( +$response = $sdk->emailAddresses->get( emailAddressId: '' ); @@ -104,7 +101,7 @@ if ($response->emailAddress !== null) { | Errors\ClerkErrors4 | 400, 401, 403, 404 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | -## deleteEmailAddress +## delete Delete the email address with the given ID @@ -123,7 +120,7 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); -$response = $sdk->emailAddresses->deleteEmailAddress( +$response = $sdk->emailAddresses->delete( emailAddressId: '' ); @@ -149,7 +146,7 @@ if ($response->deletedObject !== null) { | Errors\ClerkErrors5 | 400, 401, 403, 404 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | -## updateEmailAddress +## update Updates an email address. @@ -169,7 +166,7 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); $requestBody = new Operations\UpdateEmailAddressRequestBody(); -$response = $sdk->emailAddresses->updateEmailAddress( +$response = $sdk->emailAddresses->update( emailAddressId: '', requestBody: $requestBody diff --git a/docs/sdks/emailandsmstemplates/README.md b/docs/sdks/emailandsmstemplates/README.md index 1263127..9bbd20e 100644 --- a/docs/sdks/emailandsmstemplates/README.md +++ b/docs/sdks/emailandsmstemplates/README.md @@ -1,121 +1,13 @@ -# EmailAndSMSTemplates -(*emailAndSMSTemplates*) +# EmailAndSmsTemplates +(*emailAndSmsTemplates*) ## Overview -Email & SMS templates allow you to customize the theming and wording of emails & SMS messages that are sent by your instance. - - ### Available Operations -* [~~getTemplateList~~](#gettemplatelist) - List all templates :warning: **Deprecated** -* [~~getTemplate~~](#gettemplate) - Retrieve a template :warning: **Deprecated** -* [~~upsertTemplate~~](#upserttemplate) - Update a template for a given type and slug :warning: **Deprecated** -* [~~revertTemplate~~](#reverttemplate) - Revert a template :warning: **Deprecated** -* [~~previewTemplate~~](#previewtemplate) - Preview changes to a template :warning: **Deprecated** -* [~~toggleTemplateDelivery~~](#toggletemplatedelivery) - Toggle the delivery by Clerk for a template of a given type and slug :warning: **Deprecated** - -## ~~getTemplateList~~ - -Returns a list of all templates. -The templates are returned sorted by position. - -> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible. - -### Example Usage - -```php -declare(strict_types=1); - -require 'vendor/autoload.php'; - -use Clerk\Backend; -use Clerk\Backend\Models\Operations; - -$security = ''; - -$sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); - - - -$response = $sdk->emailAndSMSTemplates->getTemplateList( - templateType: Operations\TemplateType::Sms -); - -if ($response->templateList !== null) { - // handle response -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | -| `templateType` | [Operations\TemplateType](../../Models/Operations/TemplateType.md) | :heavy_check_mark: | The type of templates to list (email or SMS) | - -### Response - -**[?Operations\GetTemplateListResponse](../../Models/Operations/GetTemplateListResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| -------------------- | -------------------- | -------------------- | -| Errors\ClerkErrors16 | 400, 401, 422 | application/json | -| Errors\SDKException | 4XX, 5XX | \*/\* | - -## ~~getTemplate~~ - -Returns the details of a template - -> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible. - -### Example Usage - -```php -declare(strict_types=1); - -require 'vendor/autoload.php'; - -use Clerk\Backend; -use Clerk\Backend\Models\Operations; - -$security = ''; - -$sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); - - - -$response = $sdk->emailAndSMSTemplates->getTemplate( - templateType: Operations\PathParamTemplateType::Email, - slug: '' - -); - -if ($response->template !== null) { - // handle response -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | -| `templateType` | [Operations\PathParamTemplateType](../../Models/Operations/PathParamTemplateType.md) | :heavy_check_mark: | The type of templates to retrieve (email or SMS) | -| `slug` | *string* | :heavy_check_mark: | The slug (i.e. machine-friendly name) of the template to retrieve | - -### Response - -**[?Operations\GetTemplateResponse](../../Models/Operations/GetTemplateResponse.md)** +* [~~upsert~~](#upsert) - Update a template for a given type and slug :warning: **Deprecated** -### Errors - -| Error Type | Status Code | Content Type | -| -------------------- | -------------------- | -------------------- | -| Errors\ClerkErrors17 | 400, 401, 404 | application/json | -| Errors\SDKException | 4XX, 5XX | \*/\* | - -## ~~upsertTemplate~~ +## ~~upsert~~ Updates the existing template of the given type and slug @@ -137,8 +29,8 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); $requestBody = new Operations\UpsertTemplateRequestBody(); -$response = $sdk->emailAndSMSTemplates->upsertTemplate( - templateType: Operations\UpsertTemplatePathParamTemplateType::Email, +$response = $sdk->emailAndSmsTemplates->upsert( + templateType: Operations\UpsertTemplatePathParamTemplateType::Sms, slug: '', requestBody: $requestBody @@ -166,163 +58,4 @@ if ($response->template !== null) { | Error Type | Status Code | Content Type | | ---------------------------- | ---------------------------- | ---------------------------- | | Errors\ClerkErrors18 | 400, 401, 402, 403, 404, 422 | application/json | -| Errors\SDKException | 4XX, 5XX | \*/\* | - -## ~~revertTemplate~~ - -Reverts an updated template to its default state - -> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible. - -### Example Usage - -```php -declare(strict_types=1); - -require 'vendor/autoload.php'; - -use Clerk\Backend; -use Clerk\Backend\Models\Operations; - -$security = ''; - -$sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); - - - -$response = $sdk->emailAndSMSTemplates->revertTemplate( - templateType: Operations\RevertTemplatePathParamTemplateType::Sms, - slug: '' - -); - -if ($response->template !== null) { - // handle response -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | -| `templateType` | [Operations\RevertTemplatePathParamTemplateType](../../Models/Operations/RevertTemplatePathParamTemplateType.md) | :heavy_check_mark: | The type of template to revert | -| `slug` | *string* | :heavy_check_mark: | The slug of the template to revert | - -### Response - -**[?Operations\RevertTemplateResponse](../../Models/Operations/RevertTemplateResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| -------------------- | -------------------- | -------------------- | -| Errors\ClerkErrors19 | 400, 401, 402, 404 | application/json | -| Errors\SDKException | 4XX, 5XX | \*/\* | - -## ~~previewTemplate~~ - -Returns a preview of a template for a given template_type, slug and body - -> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible. - -### Example Usage - -```php -declare(strict_types=1); - -require 'vendor/autoload.php'; - -use Clerk\Backend; -use Clerk\Backend\Models\Operations; - -$security = ''; - -$sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); - -$requestBody = new Operations\PreviewTemplateRequestBody(); - -$response = $sdk->emailAndSMSTemplates->previewTemplate( - templateType: '', - slug: '', - requestBody: $requestBody - -); - -if ($response->object !== null) { - // handle response -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `templateType` | *string* | :heavy_check_mark: | The type of template to preview | -| `slug` | *string* | :heavy_check_mark: | The slug of the template to preview | -| `requestBody` | [?Operations\PreviewTemplateRequestBody](../../Models/Operations/PreviewTemplateRequestBody.md) | :heavy_minus_sign: | Required parameters | - -### Response - -**[?Operations\PreviewTemplateResponse](../../Models/Operations/PreviewTemplateResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| -------------------- | -------------------- | -------------------- | -| Errors\ClerkErrors20 | 400, 401, 404, 422 | application/json | -| Errors\SDKException | 4XX, 5XX | \*/\* | - -## ~~toggleTemplateDelivery~~ - -Toggles the delivery by Clerk for a template of a given type and slug. -If disabled, Clerk will not deliver the resulting email or SMS. -The app developer will need to listen to the `email.created` or `sms.created` webhooks in order to handle delivery themselves. - -> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible. - -### Example Usage - -```php -declare(strict_types=1); - -require 'vendor/autoload.php'; - -use Clerk\Backend; -use Clerk\Backend\Models\Operations; - -$security = ''; - -$sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); - -$requestBody = new Operations\ToggleTemplateDeliveryRequestBody(); - -$response = $sdk->emailAndSMSTemplates->toggleTemplateDelivery( - templateType: Operations\ToggleTemplateDeliveryPathParamTemplateType::Sms, - slug: '', - requestBody: $requestBody - -); - -if ($response->template !== null) { - // handle response -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -| `templateType` | [Operations\ToggleTemplateDeliveryPathParamTemplateType](../../Models/Operations/ToggleTemplateDeliveryPathParamTemplateType.md) | :heavy_check_mark: | The type of template to toggle delivery for | -| `slug` | *string* | :heavy_check_mark: | The slug of the template for which to toggle delivery | -| `requestBody` | [?Operations\ToggleTemplateDeliveryRequestBody](../../Models/Operations/ToggleTemplateDeliveryRequestBody.md) | :heavy_minus_sign: | N/A | - -### Response - -**[?Operations\ToggleTemplateDeliveryResponse](../../Models/Operations/ToggleTemplateDeliveryResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| -------------------- | -------------------- | -------------------- | -| Errors\ClerkErrors21 | 400, 401, 404 | application/json | -| Errors\SDKException | 4XX, 5XX | \*/\* | \ No newline at end of file +| Errors\SDKException | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/emailsmstemplates/README.md b/docs/sdks/emailsmstemplates/README.md new file mode 100644 index 0000000..c1db1b5 --- /dev/null +++ b/docs/sdks/emailsmstemplates/README.md @@ -0,0 +1,217 @@ +# EmailSMSTemplates +(*emailSMSTemplates*) + +## Overview + +### Available Operations + +* [~~list~~](#list) - List all templates :warning: **Deprecated** +* [~~revert~~](#revert) - Revert a template :warning: **Deprecated** +* [~~get~~](#get) - Retrieve a template :warning: **Deprecated** +* [~~toggleTemplateDelivery~~](#toggletemplatedelivery) - Toggle the delivery by Clerk for a template of a given type and slug :warning: **Deprecated** + +## ~~list~~ + +Returns a list of all templates. +The templates are returned sorted by position. + +> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible. + +### Example Usage + +```php +declare(strict_types=1); + +require 'vendor/autoload.php'; + +use Clerk\Backend; +use Clerk\Backend\Models\Operations; + +$security = ''; + +$sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); + + + +$response = $sdk->emailSMSTemplates->list( + templateType: Operations\TemplateType::Sms +); + +if ($response->templateList !== null) { + // handle response +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | +| `templateType` | [Operations\TemplateType](../../Models/Operations/TemplateType.md) | :heavy_check_mark: | The type of templates to list (email or SMS) | + +### Response + +**[?Operations\GetTemplateListResponse](../../Models/Operations/GetTemplateListResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------- | -------------------- | -------------------- | +| Errors\ClerkErrors16 | 400, 401, 422 | application/json | +| Errors\SDKException | 4XX, 5XX | \*/\* | + +## ~~revert~~ + +Reverts an updated template to its default state + +> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible. + +### Example Usage + +```php +declare(strict_types=1); + +require 'vendor/autoload.php'; + +use Clerk\Backend; +use Clerk\Backend\Models\Operations; + +$security = ''; + +$sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); + + + +$response = $sdk->emailSMSTemplates->revert( + templateType: Operations\RevertTemplatePathParamTemplateType::Email, + slug: '' + +); + +if ($response->template !== null) { + // handle response +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | +| `templateType` | [Operations\RevertTemplatePathParamTemplateType](../../Models/Operations/RevertTemplatePathParamTemplateType.md) | :heavy_check_mark: | The type of template to revert | +| `slug` | *string* | :heavy_check_mark: | The slug of the template to revert | + +### Response + +**[?Operations\RevertTemplateResponse](../../Models/Operations/RevertTemplateResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------- | -------------------- | -------------------- | +| Errors\ClerkErrors19 | 400, 401, 402, 404 | application/json | +| Errors\SDKException | 4XX, 5XX | \*/\* | + +## ~~get~~ + +Returns the details of a template + +> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible. + +### Example Usage + +```php +declare(strict_types=1); + +require 'vendor/autoload.php'; + +use Clerk\Backend; +use Clerk\Backend\Models\Operations; + +$security = ''; + +$sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); + + + +$response = $sdk->emailSMSTemplates->get( + templateType: Operations\PathParamTemplateType::Sms, + slug: '' + +); + +if ($response->template !== null) { + // handle response +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `templateType` | [Operations\PathParamTemplateType](../../Models/Operations/PathParamTemplateType.md) | :heavy_check_mark: | The type of templates to retrieve (email or SMS) | +| `slug` | *string* | :heavy_check_mark: | The slug (i.e. machine-friendly name) of the template to retrieve | + +### Response + +**[?Operations\GetTemplateResponse](../../Models/Operations/GetTemplateResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------- | -------------------- | -------------------- | +| Errors\ClerkErrors17 | 400, 401, 404 | application/json | +| Errors\SDKException | 4XX, 5XX | \*/\* | + +## ~~toggleTemplateDelivery~~ + +Toggles the delivery by Clerk for a template of a given type and slug. +If disabled, Clerk will not deliver the resulting email or SMS. +The app developer will need to listen to the `email.created` or `sms.created` webhooks in order to handle delivery themselves. + +> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible. + +### Example Usage + +```php +declare(strict_types=1); + +require 'vendor/autoload.php'; + +use Clerk\Backend; +use Clerk\Backend\Models\Operations; + +$security = ''; + +$sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); + +$requestBody = new Operations\ToggleTemplateDeliveryRequestBody(); + +$response = $sdk->emailSMSTemplates->toggleTemplateDelivery( + templateType: Operations\ToggleTemplateDeliveryPathParamTemplateType::Sms, + slug: '', + requestBody: $requestBody + +); + +if ($response->template !== null) { + // handle response +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | +| `templateType` | [Operations\ToggleTemplateDeliveryPathParamTemplateType](../../Models/Operations/ToggleTemplateDeliveryPathParamTemplateType.md) | :heavy_check_mark: | The type of template to toggle delivery for | +| `slug` | *string* | :heavy_check_mark: | The slug of the template for which to toggle delivery | +| `requestBody` | [?Operations\ToggleTemplateDeliveryRequestBody](../../Models/Operations/ToggleTemplateDeliveryRequestBody.md) | :heavy_minus_sign: | N/A | + +### Response + +**[?Operations\ToggleTemplateDeliveryResponse](../../Models/Operations/ToggleTemplateDeliveryResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------- | -------------------- | -------------------- | +| Errors\ClerkErrors21 | 400, 401, 404 | application/json | +| Errors\SDKException | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/instancesettings/README.md b/docs/sdks/instancesettings/README.md index 384b755..c8fd68c 100644 --- a/docs/sdks/instancesettings/README.md +++ b/docs/sdks/instancesettings/README.md @@ -3,15 +3,13 @@ ## Overview -Modify the settings of your instance. - ### Available Operations -* [updateInstance](#updateinstance) - Update instance settings -* [updateInstanceRestrictions](#updateinstancerestrictions) - Update instance restrictions -* [updateInstanceOrganizationSettings](#updateinstanceorganizationsettings) - Update instance organization settings +* [update](#update) - Update instance settings +* [updateRestrictions](#updaterestrictions) - Update instance restrictions +* [updateOrganizationSettings](#updateorganizationsettings) - Update instance organization settings -## updateInstance +## update Updates the settings of an instance @@ -31,7 +29,7 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); $request = new Operations\UpdateInstanceRequestBody(); -$response = $sdk->instanceSettings->updateInstance( +$response = $sdk->instanceSettings->update( request: $request ); @@ -54,10 +52,10 @@ if ($response->statusCode === 200) { | Error Type | Status Code | Content Type | | -------------------- | -------------------- | -------------------- | -| Errors\ClerkErrors49 | 422 | application/json | +| Errors\ClerkErrors58 | 422 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | -## updateInstanceRestrictions +## updateRestrictions Updates the restriction settings of an instance @@ -77,7 +75,7 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); $request = new Operations\UpdateInstanceRestrictionsRequestBody(); -$response = $sdk->instanceSettings->updateInstanceRestrictions( +$response = $sdk->instanceSettings->updateRestrictions( request: $request ); @@ -100,10 +98,10 @@ if ($response->instanceRestrictions !== null) { | Error Type | Status Code | Content Type | | -------------------- | -------------------- | -------------------- | -| Errors\ClerkErrors49 | 402, 422 | application/json | +| Errors\ClerkErrors59 | 402, 422 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | -## updateInstanceOrganizationSettings +## updateOrganizationSettings Updates the organization settings of the instance @@ -123,7 +121,7 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); $request = new Operations\UpdateInstanceOrganizationSettingsRequestBody(); -$response = $sdk->instanceSettings->updateInstanceOrganizationSettings( +$response = $sdk->instanceSettings->updateOrganizationSettings( request: $request ); @@ -146,5 +144,5 @@ if ($response->organizationSettings !== null) { | Error Type | Status Code | Content Type | | -------------------- | -------------------- | -------------------- | -| Errors\ClerkErrors51 | 402, 404, 422 | application/json | +| Errors\ClerkErrors61 | 402, 404, 422 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/invitations/README.md b/docs/sdks/invitations/README.md index 4b3e383..4490bfc 100644 --- a/docs/sdks/invitations/README.md +++ b/docs/sdks/invitations/README.md @@ -8,11 +8,11 @@ Invitations allow you to invite someone to sign up to your application, via emai ### Available Operations -* [createInvitation](#createinvitation) - Create an invitation -* [listInvitations](#listinvitations) - List all invitations -* [revokeInvitation](#revokeinvitation) - Revokes an invitation +* [create](#create) - Create an invitation +* [list](#list) - List all invitations +* [revoke](#revoke) - Revokes an invitation -## createInvitation +## create Creates a new invitation for the given email address and sends the invitation email. Keep in mind that you cannot create an invitation if there is already one for the given email address. @@ -33,10 +33,10 @@ $security = ''; $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); $request = new Operations\CreateInvitationRequestBody( - emailAddress: 'Al.Grady1@hotmail.com', + emailAddress: 'Loyal79@yahoo.com', ); -$response = $sdk->invitations->createInvitation( +$response = $sdk->invitations->create( request: $request ); @@ -59,10 +59,10 @@ if ($response->invitation !== null) { | Error Type | Status Code | Content Type | | -------------------- | -------------------- | -------------------- | -| Errors\ClerkErrors34 | 400, 422 | application/json | +| Errors\ClerkErrors42 | 400, 422 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | -## listInvitations +## list Returns all non-revoked invitations for your application, sorted by creation date @@ -82,10 +82,10 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); -$response = $sdk->invitations->listInvitations( +$response = $sdk->invitations->list( limit: 10, offset: 0, - status: Operations\QueryParamStatus::Accepted + status: Operations\ListInvitationsQueryParamStatus::Expired ); @@ -98,9 +98,9 @@ if ($response->invitationList !== null) { | Parameter | Type | Required | Description | | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | -| `limit` | *?float* | :heavy_minus_sign: | Applies a limit to the number of results returned.
Can be used for paginating the results together with `offset`. | -| `offset` | *?float* | :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`. | -| `status` | [?Operations\QueryParamStatus](../../Models/Operations/QueryParamStatus.md) | :heavy_minus_sign: | Filter invitations based on their status | +| `limit` | *?int* | :heavy_minus_sign: | Applies a limit to the number of results returned.
Can be used for paginating the results together with `offset`. | +| `offset` | *?int* | :heavy_minus_sign: | Skip the first `offset` results when paginating.
Needs to be an integer greater or equal to zero.
To be used in conjunction with `limit`. | +| `status` | [?Operations\ListInvitationsQueryParamStatus](../../Models/Operations/ListInvitationsQueryParamStatus.md) | :heavy_minus_sign: | Filter invitations based on their status | ### Response @@ -112,7 +112,7 @@ if ($response->invitationList !== null) { | ------------------- | ------------------- | ------------------- | | Errors\SDKException | 4XX, 5XX | \*/\* | -## revokeInvitation +## revoke Revokes the given invitation. Revoking an invitation will prevent the user from using the invitation link that was sent to them. @@ -134,7 +134,7 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); -$response = $sdk->invitations->revokeInvitation( +$response = $sdk->invitations->revoke( invitationId: '' ); @@ -157,5 +157,5 @@ if ($response->invitationRevoked !== null) { | Error Type | Status Code | Content Type | | -------------------- | -------------------- | -------------------- | -| Errors\ClerkErrors35 | 400, 404 | application/json | +| Errors\ClerkErrors43 | 400, 404 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/jwks/README.md b/docs/sdks/jwks/README.md index 851eefe..65bb80f 100644 --- a/docs/sdks/jwks/README.md +++ b/docs/sdks/jwks/README.md @@ -3,13 +3,11 @@ ## Overview -Retrieve the JSON Web Key Set which can be used to verify the token signatures of the instance. - ### Available Operations -* [getJWKS](#getjwks) - Retrieve the JSON Web Key Set of the instance +* [get](#get) - Retrieve the JSON Web Key Set of the instance -## getJWKS +## get Retrieve the JSON Web Key Set of the instance @@ -28,11 +26,11 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); -$response = $sdk->jwks->getJWKS( +$response = $sdk->jwks->get( ); -if ($response->statusCode === 200) { +if ($response->wellKnownJWKS !== null) { // handle response } ``` diff --git a/docs/sdks/jwttemplates/README.md b/docs/sdks/jwttemplates/README.md index c9dfd52..76a3bd5 100644 --- a/docs/sdks/jwttemplates/README.md +++ b/docs/sdks/jwttemplates/README.md @@ -1,22 +1,17 @@ -# JWTTemplates +# JwtTemplates (*jwtTemplates*) ## Overview -JWT Templates allow you to generate custom authentication tokens -tied to authenticated sessions, enabling you to integrate with third-party -services. - - ### Available Operations -* [listJWTTemplates](#listjwttemplates) - List all templates -* [createJWTTemplate](#createjwttemplate) - Create a JWT template -* [getJWTTemplate](#getjwttemplate) - Retrieve a template -* [updateJWTTemplate](#updatejwttemplate) - Update a JWT template -* [deleteJWTTemplate](#deletejwttemplate) - Delete a Template +* [list](#list) - List all templates +* [create](#create) - Create a JWT template +* [get](#get) - Retrieve a template +* [update](#update) - Update a JWT template +* [delete](#delete) - Delete a Template -## listJWTTemplates +## list List all templates @@ -35,7 +30,7 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); -$response = $sdk->jwtTemplates->listJWTTemplates( +$response = $sdk->jwtTemplates->list( ); @@ -54,7 +49,7 @@ if ($response->jwtTemplateList !== null) { | ------------------- | ------------------- | ------------------- | | Errors\SDKException | 4XX, 5XX | \*/\* | -## createJWTTemplate +## create Create a new JWT template @@ -74,7 +69,7 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); $request = new Operations\CreateJWTTemplateRequestBody(); -$response = $sdk->jwtTemplates->createJWTTemplate( +$response = $sdk->jwtTemplates->create( request: $request ); @@ -97,10 +92,10 @@ if ($response->jwtTemplate !== null) { | Error Type | Status Code | Content Type | | -------------------- | -------------------- | -------------------- | -| Errors\ClerkErrors53 | 400, 402, 422 | application/json | +| Errors\ClerkErrors63 | 400, 402, 422 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | -## getJWTTemplate +## get Retrieve the details of a given JWT template @@ -119,7 +114,7 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); -$response = $sdk->jwtTemplates->getJWTTemplate( +$response = $sdk->jwtTemplates->get( templateId: '' ); @@ -142,10 +137,10 @@ if ($response->jwtTemplate !== null) { | Error Type | Status Code | Content Type | | -------------------- | -------------------- | -------------------- | -| Errors\ClerkErrors54 | 404 | application/json | +| Errors\ClerkErrors64 | 404 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | -## updateJWTTemplate +## update Updates an existing JWT template @@ -165,7 +160,7 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); $requestBody = new Operations\UpdateJWTTemplateRequestBody(); -$response = $sdk->jwtTemplates->updateJWTTemplate( +$response = $sdk->jwtTemplates->update( templateId: '', requestBody: $requestBody @@ -191,10 +186,10 @@ if ($response->jwtTemplate !== null) { | Error Type | Status Code | Content Type | | -------------------- | -------------------- | -------------------- | -| Errors\ClerkErrors55 | 400, 402, 422 | application/json | +| Errors\ClerkErrors65 | 400, 402, 422 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | -## deleteJWTTemplate +## delete Delete a Template @@ -213,7 +208,7 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); -$response = $sdk->jwtTemplates->deleteJWTTemplate( +$response = $sdk->jwtTemplates->delete( templateId: '' ); @@ -236,5 +231,5 @@ if ($response->deletedObject !== null) { | Error Type | Status Code | Content Type | | -------------------- | -------------------- | -------------------- | -| Errors\ClerkErrors56 | 403, 404 | application/json | +| Errors\ClerkErrors66 | 403, 404 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/miscellaneous/README.md b/docs/sdks/miscellaneous/README.md index 4267e13..2009867 100644 --- a/docs/sdks/miscellaneous/README.md +++ b/docs/sdks/miscellaneous/README.md @@ -7,9 +7,9 @@ Various endpoints that do not belong in any particular category. ### Available Operations -* [getPublicInterstitial](#getpublicinterstitial) - Returns the markup for the interstitial page +* [getInterstitial](#getinterstitial) - Returns the markup for the interstitial page -## getPublicInterstitial +## getInterstitial The Clerk interstitial endpoint serves an html page that loads clerk.js in order to check the user's authentication state. It is used by Clerk SDKs when the user's authentication state cannot be immediately determined. @@ -27,7 +27,7 @@ $sdk = Backend\ClerkBackend::builder()->build(); -$response = $sdk->miscellaneous->getPublicInterstitial( +$response = $sdk->miscellaneous->getInterstitial( frontendApi: '', publishableKey: '' diff --git a/docs/sdks/oauthapplications/README.md b/docs/sdks/oauthapplications/README.md index 2b6c1cb..5648769 100644 --- a/docs/sdks/oauthapplications/README.md +++ b/docs/sdks/oauthapplications/README.md @@ -1,20 +1,18 @@ -# OAuthApplications -(*oAuthApplications*) +# OauthApplications +(*oauthApplications*) ## Overview -OAuth applications contain data for clients using Clerk as an OAuth2 identity provider. - ### Available Operations -* [listOAuthApplications](#listoauthapplications) - Get a list of OAuth applications for an instance -* [createOAuthApplication](#createoauthapplication) - Create an OAuth application -* [getOAuthApplication](#getoauthapplication) - Retrieve an OAuth application by ID -* [updateOAuthApplication](#updateoauthapplication) - Update an OAuth application -* [deleteOAuthApplication](#deleteoauthapplication) - Delete an OAuth application -* [rotateOAuthApplicationSecret](#rotateoauthapplicationsecret) - Rotate the client secret of the given OAuth application +* [list](#list) - Get a list of OAuth applications for an instance +* [create](#create) - Create an OAuth application +* [get](#get) - Retrieve an OAuth application by ID +* [update](#update) - Update an OAuth application +* [delete](#delete) - Delete an OAuth application +* [rotateSecret](#rotatesecret) - Rotate the client secret of the given OAuth application -## listOAuthApplications +## list This request returns the list of OAuth applications for an instance. Results can be paginated using the optional `limit` and `offset` query parameters. @@ -36,7 +34,7 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); -$response = $sdk->oAuthApplications->listOAuthApplications( +$response = $sdk->oauthApplications->list( limit: 10, offset: 0 @@ -51,8 +49,8 @@ if ($response->oAuthApplications !== null) { | Parameter | Type | Required | Description | | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | -| `limit` | *?float* | :heavy_minus_sign: | Applies a limit to the number of results returned.
Can be used for paginating the results together with `offset`. | -| `offset` | *?float* | :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`. | +| `limit` | *?int* | :heavy_minus_sign: | Applies a limit to the number of results returned.
Can be used for paginating the results together with `offset`. | +| `offset` | *?int* | :heavy_minus_sign: | Skip the first `offset` results when paginating.
Needs to be an integer greater or equal to zero.
To be used in conjunction with `limit`. | ### Response @@ -62,10 +60,10 @@ if ($response->oAuthApplications !== null) { | Error Type | Status Code | Content Type | | -------------------- | -------------------- | -------------------- | -| Errors\ClerkErrors79 | 400, 403, 422 | application/json | +| Errors\ClerkErrors93 | 400, 403, 422 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | -## createOAuthApplication +## create Creates a new OAuth application with the given name and callback URL for an instance. The callback URL must be a valid url. @@ -87,11 +85,11 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); $request = new Operations\CreateOAuthApplicationRequestBody( name: '', - callbackUrl: 'https://silent-hyena.name', + callbackUrl: 'https://probable-heating.com/', scopes: 'profile email public_metadata', ); -$response = $sdk->oAuthApplications->createOAuthApplication( +$response = $sdk->oauthApplications->create( request: $request ); @@ -114,10 +112,10 @@ if ($response->oAuthApplicationWithSecret !== null) { | Error Type | Status Code | Content Type | | -------------------- | -------------------- | -------------------- | -| Errors\ClerkErrors80 | 400, 403, 422 | application/json | +| Errors\ClerkErrors94 | 400, 403, 422 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | -## getOAuthApplication +## get Fetches the OAuth application whose ID matches the provided `id` in the path. @@ -136,7 +134,7 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); -$response = $sdk->oAuthApplications->getOAuthApplication( +$response = $sdk->oauthApplications->get( oauthApplicationId: '' ); @@ -159,10 +157,10 @@ if ($response->oAuthApplication !== null) { | Error Type | Status Code | Content Type | | -------------------- | -------------------- | -------------------- | -| Errors\ClerkErrors81 | 403, 404 | application/json | +| Errors\ClerkErrors95 | 403, 404 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | -## updateOAuthApplication +## update Updates an existing OAuth application @@ -184,7 +182,7 @@ $requestBody = new Operations\UpdateOAuthApplicationRequestBody( scopes: 'profile email public_metadata private_metadata', ); -$response = $sdk->oAuthApplications->updateOAuthApplication( +$response = $sdk->oauthApplications->update( oauthApplicationId: '', requestBody: $requestBody @@ -210,10 +208,10 @@ if ($response->oAuthApplication !== null) { | Error Type | Status Code | Content Type | | -------------------- | -------------------- | -------------------- | -| Errors\ClerkErrors82 | 403, 404, 422 | application/json | +| Errors\ClerkErrors96 | 403, 404, 422 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | -## deleteOAuthApplication +## delete Deletes the given OAuth application. This is not reversible. @@ -233,7 +231,7 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); -$response = $sdk->oAuthApplications->deleteOAuthApplication( +$response = $sdk->oauthApplications->delete( oauthApplicationId: '' ); @@ -256,10 +254,10 @@ if ($response->deletedObject !== null) { | Error Type | Status Code | Content Type | | -------------------- | -------------------- | -------------------- | -| Errors\ClerkErrors83 | 403, 404 | application/json | +| Errors\ClerkErrors97 | 403, 404 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | -## rotateOAuthApplicationSecret +## rotateSecret Rotates the OAuth application's client secret. When the client secret is rotated, make sure to update it in authorized OAuth clients. @@ -279,7 +277,7 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); -$response = $sdk->oAuthApplications->rotateOAuthApplicationSecret( +$response = $sdk->oauthApplications->rotateSecret( oauthApplicationId: '' ); @@ -302,5 +300,5 @@ if ($response->oAuthApplicationWithSecret !== null) { | Error Type | Status Code | Content Type | | -------------------- | -------------------- | -------------------- | -| Errors\ClerkErrors84 | 403, 404 | application/json | +| Errors\ClerkErrors98 | 403, 404 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/organizationdomain/README.md b/docs/sdks/organizationdomain/README.md new file mode 100644 index 0000000..6f57363 --- /dev/null +++ b/docs/sdks/organizationdomain/README.md @@ -0,0 +1,59 @@ +# OrganizationDomain +(*organizationDomain*) + +## Overview + +### Available Operations + +* [update](#update) - Update an organization domain. + +## update + +Updates the properties of an existing organization domain. + +### Example Usage + +```php +declare(strict_types=1); + +require 'vendor/autoload.php'; + +use Clerk\Backend; +use Clerk\Backend\Models\Operations; + +$security = ''; + +$sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); + +$requestBody = new Operations\UpdateOrganizationDomainRequestBody(); + +$response = $sdk->organizationDomain->update( + organizationId: '', + domainId: '', + requestBody: $requestBody + +); + +if ($response->organizationDomain !== null) { + // handle response +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | +| `organizationId` | *string* | :heavy_check_mark: | The ID of the organization the domain belongs to | +| `domainId` | *string* | :heavy_check_mark: | The ID of the domain | +| `requestBody` | [Operations\UpdateOrganizationDomainRequestBody](../../Models/Operations/UpdateOrganizationDomainRequestBody.md) | :heavy_check_mark: | N/A | + +### Response + +**[?Operations\UpdateOrganizationDomainResponse](../../Models/Operations/UpdateOrganizationDomainResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------- | -------------------- | -------------------- | +| Errors\ClerkErrors86 | 400, 404, 422 | application/json | +| Errors\SDKException | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/organizationdomains/README.md b/docs/sdks/organizationdomains/README.md new file mode 100644 index 0000000..c69a296 --- /dev/null +++ b/docs/sdks/organizationdomains/README.md @@ -0,0 +1,155 @@ +# OrganizationDomains +(*organizationDomains*) + +## Overview + +### Available Operations + +* [create](#create) - Create a new organization domain. +* [list](#list) - Get a list of all domains of an organization. +* [delete](#delete) - Remove a domain from an organization. + +## create + +Creates a new organization domain. By default the domain is verified, but can be optionally set to unverified. + +### Example Usage + +```php +declare(strict_types=1); + +require 'vendor/autoload.php'; + +use Clerk\Backend; +use Clerk\Backend\Models\Operations; + +$security = ''; + +$sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); + +$requestBody = new Operations\CreateOrganizationDomainRequestBody(); + +$response = $sdk->organizationDomains->create( + organizationId: '', + requestBody: $requestBody + +); + +if ($response->organizationDomain !== null) { + // handle response +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | +| `organizationId` | *string* | :heavy_check_mark: | The ID of the organization where the new domain will be created. | +| `requestBody` | [Operations\CreateOrganizationDomainRequestBody](../../Models/Operations/CreateOrganizationDomainRequestBody.md) | :heavy_check_mark: | N/A | + +### Response + +**[?Operations\CreateOrganizationDomainResponse](../../Models/Operations/CreateOrganizationDomainResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------- | -------------------- | -------------------- | +| Errors\ClerkErrors84 | 400, 403, 404, 422 | application/json | +| Errors\SDKException | 4XX, 5XX | \*/\* | + +## list + +Get a list of all domains of an organization. + +### Example Usage + +```php +declare(strict_types=1); + +require 'vendor/autoload.php'; + +use Clerk\Backend; +use Clerk\Backend\Models\Operations; + +$security = ''; + +$sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); + +$request = new Operations\ListOrganizationDomainsRequest( + organizationId: '', +); + +$response = $sdk->organizationDomains->list( + request: $request +); + +if ($response->organizationDomains !== null) { + // handle response +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | +| `$request` | [Operations\ListOrganizationDomainsRequest](../../Models/Operations/ListOrganizationDomainsRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[?Operations\ListOrganizationDomainsResponse](../../Models/Operations/ListOrganizationDomainsResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------- | -------------------- | -------------------- | +| Errors\ClerkErrors85 | 401, 422 | application/json | +| Errors\SDKException | 4XX, 5XX | \*/\* | + +## delete + +Removes the given domain from the organization. + +### Example Usage + +```php +declare(strict_types=1); + +require 'vendor/autoload.php'; + +use Clerk\Backend; + +$security = ''; + +$sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); + + + +$response = $sdk->organizationDomains->delete( + organizationId: '', + domainId: '' + +); + +if ($response->deletedObject !== null) { + // handle response +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | +| `organizationId` | *string* | :heavy_check_mark: | The ID of the organization the domain belongs to | +| `domainId` | *string* | :heavy_check_mark: | The ID of the domain | + +### Response + +**[?Operations\DeleteOrganizationDomainResponse](../../Models/Operations/DeleteOrganizationDomainResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------- | -------------------- | -------------------- | +| Errors\ClerkErrors87 | 400, 401, 404 | application/json | +| Errors\SDKException | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/organizationinvitations/README.md b/docs/sdks/organizationinvitations/README.md index 6884694..0b9bee5 100644 --- a/docs/sdks/organizationinvitations/README.md +++ b/docs/sdks/organizationinvitations/README.md @@ -3,19 +3,68 @@ ## Overview -Invite users to an organization. - - ### Available Operations -* [createOrganizationInvitation](#createorganizationinvitation) - Create and send an organization invitation -* [listOrganizationInvitations](#listorganizationinvitations) - Get a list of organization invitations -* [createOrganizationInvitationBulk](#createorganizationinvitationbulk) - Bulk create and send organization invitations -* [~~listPendingOrganizationInvitations~~](#listpendingorganizationinvitations) - Get a list of pending organization invitations :warning: **Deprecated** -* [getOrganizationInvitation](#getorganizationinvitation) - Retrieve an organization invitation by ID -* [revokeOrganizationInvitation](#revokeorganizationinvitation) - Revoke a pending organization invitation +* [getAll](#getall) - Get a list of organization invitations for the current instance +* [create](#create) - Create and send an organization invitation +* [list](#list) - Get a list of organization invitations +* [bulkCreate](#bulkcreate) - Bulk create and send organization invitations +* [~~listPending~~](#listpending) - Get a list of pending organization invitations :warning: **Deprecated** +* [get](#get) - Retrieve an organization invitation by ID +* [revoke](#revoke) - Revoke a pending organization invitation + +## getAll + +This request returns the list of organization invitations for the instance. +Results can be paginated using the optional `limit` and `offset` query parameters. +You can filter them by providing the 'status' query parameter, that accepts multiple values. +You can change the order by providing the 'order' query parameter, that accepts multiple values. +You can filter by the invited user email address providing the `query` query parameter. +The organization invitations are ordered by descending creation date by default. -## createOrganizationInvitation +### Example Usage + +```php +declare(strict_types=1); + +require 'vendor/autoload.php'; + +use Clerk\Backend; +use Clerk\Backend\Models\Operations; + +$security = ''; + +$sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); + +$request = new Operations\ListInstanceOrganizationInvitationsRequest(); + +$response = $sdk->organizationInvitations->getAll( + request: $request +); + +if ($response->organizationInvitationsWithPublicOrganizationData !== null) { + // handle response +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `$request` | [Operations\ListInstanceOrganizationInvitationsRequest](../../Models/Operations/ListInstanceOrganizationInvitationsRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[?Operations\ListInstanceOrganizationInvitationsResponse](../../Models/Operations/ListInstanceOrganizationInvitationsResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------- | -------------------- | -------------------- | +| Errors\ClerkErrors44 | 400, 404, 422, 500 | application/json | +| Errors\SDKException | 4XX, 5XX | \*/\* | + +## create Creates a new organization invitation and sends an email to the provided `email_address` with a link to accept the invitation and join the organization. You can specify the `role` for the invited organization member. @@ -26,7 +75,7 @@ The request body supports passing an optional `redirect_url` parameter. When the invited user clicks the link to accept the invitation, they will be redirected to the URL provided. Use this parameter to implement a custom invitation acceptance flow. -You must specify the ID of the user that will send the invitation with the `inviter_user_id` parameter. +You can specify the ID of the user that will send the invitation with the `inviter_user_id` parameter. That user must be a member with administrator privileges in the organization. Only "admin" members can create organization invitations. @@ -49,12 +98,11 @@ $security = ''; $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); $requestBody = new Operations\CreateOrganizationInvitationRequestBody( - emailAddress: 'Jensen_Ankunding@hotmail.com', - inviterUserId: '', + emailAddress: 'Loyal79@yahoo.com', role: '', ); -$response = $sdk->organizationInvitations->createOrganizationInvitation( +$response = $sdk->organizationInvitations->create( organizationId: '', requestBody: $requestBody @@ -80,10 +128,10 @@ if ($response->organizationInvitation !== null) { | Error Type | Status Code | Content Type | | -------------------- | -------------------- | -------------------- | -| Errors\ClerkErrors63 | 400, 403, 404, 422 | application/json | +| Errors\ClerkErrors73 | 400, 403, 404, 422 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | -## listOrganizationInvitations +## list This request returns the list of organization invitations. Results can be paginated using the optional `limit` and `offset` query parameters. @@ -108,11 +156,11 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); -$response = $sdk->organizationInvitations->listOrganizationInvitations( +$response = $sdk->organizationInvitations->list( organizationId: '', limit: 10, offset: 0, - status: Operations\ListOrganizationInvitationsQueryParamStatus::Accepted + status: Operations\ListOrganizationInvitationsQueryParamStatus::Revoked ); @@ -126,8 +174,8 @@ if ($response->organizationInvitations !== null) { | Parameter | Type | Required | Description | | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | | `organizationId` | *string* | :heavy_check_mark: | The organization ID. | -| `limit` | *?float* | :heavy_minus_sign: | Applies a limit to the number of results returned.
Can be used for paginating the results together with `offset`. | -| `offset` | *?float* | :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`. | +| `limit` | *?int* | :heavy_minus_sign: | Applies a limit to the number of results returned.
Can be used for paginating the results together with `offset`. | +| `offset` | *?int* | :heavy_minus_sign: | Skip the first `offset` results when paginating.
Needs to be an integer greater or equal to zero.
To be used in conjunction with `limit`. | | `status` | [?Operations\ListOrganizationInvitationsQueryParamStatus](../../Models/Operations/ListOrganizationInvitationsQueryParamStatus.md) | :heavy_minus_sign: | Filter organization invitations based on their status | ### Response @@ -138,10 +186,10 @@ if ($response->organizationInvitations !== null) { | Error Type | Status Code | Content Type | | -------------------- | -------------------- | -------------------- | -| Errors\ClerkErrors64 | 400, 404 | application/json | +| Errors\ClerkErrors74 | 400, 404 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | -## createOrganizationInvitationBulk +## 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. You can specify a different `role` for each invited organization member. @@ -149,7 +197,7 @@ New organization invitations get a "pending" status until they are revoked by an The request body supports passing an optional `redirect_url` parameter for each invitation. When the invited user clicks the link to accept the invitation, they will be redirected to the provided URL. Use this parameter to implement a custom invitation acceptance flow. -You must specify the ID of the user that will send the invitation with the `inviter_user_id` parameter. Each invitation +You can specify the ID of the user that will send the invitation with the `inviter_user_id` parameter. Each invitation can have a different inviter user. Inviter users must be members with administrator privileges in the organization. Only "admin" members can create organization invitations. @@ -173,12 +221,11 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); -$response = $sdk->organizationInvitations->createOrganizationInvitationBulk( +$response = $sdk->organizationInvitations->bulkCreate( organizationId: '', requestBody: [ new Operations\RequestBody( - emailAddress: 'Murray_Roberts@gmail.com', - inviterUserId: '', + emailAddress: 'Queen25@gmail.com', role: '', ), ] @@ -205,10 +252,10 @@ if ($response->organizationInvitations !== null) { | Error Type | Status Code | Content Type | | -------------------- | -------------------- | -------------------- | -| Errors\ClerkErrors65 | 400, 403, 404, 422 | application/json | +| Errors\ClerkErrors75 | 400, 403, 404, 422 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | -## ~~listPendingOrganizationInvitations~~ +## ~~listPending~~ This request returns the list of organization invitations with "pending" status. These are the organization invitations that can still be used to join the organization, but have not been accepted by the invited user yet. @@ -234,7 +281,7 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); -$response = $sdk->organizationInvitations->listPendingOrganizationInvitations( +$response = $sdk->organizationInvitations->listPending( organizationId: '', limit: 10, offset: 0 @@ -251,8 +298,8 @@ if ($response->organizationInvitations !== null) { | Parameter | Type | Required | Description | | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | | `organizationId` | *string* | :heavy_check_mark: | The organization ID. | -| `limit` | *?float* | :heavy_minus_sign: | Applies a limit to the number of results returned.
Can be used for paginating the results together with `offset`. | -| `offset` | *?float* | :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`. | +| `limit` | *?int* | :heavy_minus_sign: | Applies a limit to the number of results returned.
Can be used for paginating the results together with `offset`. | +| `offset` | *?int* | :heavy_minus_sign: | Skip the first `offset` results when paginating.
Needs to be an integer greater or equal to zero.
To be used in conjunction with `limit`. | ### Response @@ -262,10 +309,10 @@ if ($response->organizationInvitations !== null) { | Error Type | Status Code | Content Type | | -------------------- | -------------------- | -------------------- | -| Errors\ClerkErrors66 | 400, 404 | application/json | +| Errors\ClerkErrors76 | 400, 404 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | -## getOrganizationInvitation +## get Use this request to get an existing organization invitation by ID. @@ -284,7 +331,7 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); -$response = $sdk->organizationInvitations->getOrganizationInvitation( +$response = $sdk->organizationInvitations->get( organizationId: '', invitationId: '' @@ -310,15 +357,15 @@ if ($response->organizationInvitation !== null) { | Error Type | Status Code | Content Type | | -------------------- | -------------------- | -------------------- | -| Errors\ClerkErrors67 | 400, 403, 404 | application/json | +| Errors\ClerkErrors77 | 400, 403, 404 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | -## revokeOrganizationInvitation +## revoke Use this request to revoke a previously issued organization invitation. Revoking an organization invitation makes it invalid; the invited user will no longer be able to join the organization with the revoked invitation. Only organization invitations with "pending" status can be revoked. -The request needs the `requesting_user_id` parameter to specify the user which revokes the invitation. +The request accepts the `requesting_user_id` parameter to specify the user which revokes the invitation. Only users with "admin" role can revoke invitations. ### Example Usage @@ -335,11 +382,9 @@ $security = ''; $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); -$requestBody = new Operations\RevokeOrganizationInvitationRequestBody( - requestingUserId: '', -); +$requestBody = new Operations\RevokeOrganizationInvitationRequestBody(); -$response = $sdk->organizationInvitations->revokeOrganizationInvitation( +$response = $sdk->organizationInvitations->revoke( organizationId: '', invitationId: '', requestBody: $requestBody @@ -353,11 +398,11 @@ if ($response->organizationInvitation !== null) { ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | -| `organizationId` | *string* | :heavy_check_mark: | The organization ID. | -| `invitationId` | *string* | :heavy_check_mark: | The organization invitation ID. | -| `requestBody` | [Operations\RevokeOrganizationInvitationRequestBody](../../Models/Operations/RevokeOrganizationInvitationRequestBody.md) | :heavy_check_mark: | N/A | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | +| `organizationId` | *string* | :heavy_check_mark: | The organization ID. | +| `invitationId` | *string* | :heavy_check_mark: | The organization invitation ID. | +| `requestBody` | [?Operations\RevokeOrganizationInvitationRequestBody](../../Models/Operations/RevokeOrganizationInvitationRequestBody.md) | :heavy_minus_sign: | N/A | ### Response @@ -367,5 +412,5 @@ if ($response->organizationInvitation !== null) { | Error Type | Status Code | Content Type | | -------------------- | -------------------- | -------------------- | -| Errors\ClerkErrors68 | 400, 403, 404 | application/json | +| Errors\ClerkErrors78 | 400, 403, 404 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/organizationmemberships/README.md b/docs/sdks/organizationmemberships/README.md index e319531..f771ab5 100644 --- a/docs/sdks/organizationmemberships/README.md +++ b/docs/sdks/organizationmemberships/README.md @@ -3,22 +3,24 @@ ## Overview -Manage member roles in an organization. - - ### Available Operations -* [createOrganizationMembership](#createorganizationmembership) - Create a new organization membership -* [listOrganizationMemberships](#listorganizationmemberships) - Get a list of all members of an organization -* [updateOrganizationMembership](#updateorganizationmembership) - Update an organization membership -* [deleteOrganizationMembership](#deleteorganizationmembership) - Remove a member from an organization -* [updateOrganizationMembershipMetadata](#updateorganizationmembershipmetadata) - Merge and update organization membership metadata +* [create](#create) - Create a new organization membership +* [list](#list) - Get a list of all members of an organization +* [update](#update) - Update an organization membership +* [delete](#delete) - Remove a member from an organization +* [updateMetadata](#updatemetadata) - Merge and update organization membership metadata +* [getAll](#getall) - Get a list of all organization memberships within an instance. -## createOrganizationMembership +## create Adds a user as a member to the given organization. Only users in the same instance as the organization can be added as members. +This organization will be the user's [active organization] (https://clerk.com/docs/organizations/overview#active-organization) +the next time they create a session, presuming they don't explicitly set a +different organization as active before then. + ### Example Usage ```php @@ -38,7 +40,7 @@ $requestBody = new Operations\CreateOrganizationMembershipRequestBody( role: '', ); -$response = $sdk->organizationMemberships->createOrganizationMembership( +$response = $sdk->organizationMemberships->create( organizationId: '', requestBody: $requestBody @@ -64,10 +66,10 @@ if ($response->organizationMembership !== null) { | Error Type | Status Code | Content Type | | -------------------- | -------------------- | -------------------- | -| Errors\ClerkErrors69 | 400, 403, 404, 422 | application/json | +| Errors\ClerkErrors79 | 400, 403, 404, 422 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | -## listOrganizationMemberships +## list Retrieves all user memberships for the given organization @@ -86,7 +88,7 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); -$response = $sdk->organizationMemberships->listOrganizationMemberships( +$response = $sdk->organizationMemberships->list( organizationId: '', limit: 10, offset: 0, @@ -104,8 +106,8 @@ if ($response->organizationMemberships !== null) { | Parameter | Type | Required | Description | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `organizationId` | *string* | :heavy_check_mark: | The organization ID. | -| `limit` | *?float* | :heavy_minus_sign: | Applies a limit to the number of results returned.
Can be used for paginating the results together with `offset`. | -| `offset` | *?float* | :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`. | +| `limit` | *?int* | :heavy_minus_sign: | Applies a limit to the number of results returned.
Can be used for paginating the results together with `offset`. | +| `offset` | *?int* | :heavy_minus_sign: | Skip the first `offset` results when paginating.
Needs to be an integer greater or equal to zero.
To be used in conjunction with `limit`. | | `orderBy` | *?string* | :heavy_minus_sign: | Sorts organizations memberships by phone_number, email_address, created_at, first_name, last_name or username.
By prepending one of those values with + or -,
we can choose to sort in ascending (ASC) or descending (DESC) order." | ### Response @@ -116,10 +118,10 @@ if ($response->organizationMemberships !== null) { | Error Type | Status Code | Content Type | | -------------------- | -------------------- | -------------------- | -| Errors\ClerkErrors70 | 401, 422 | application/json | +| Errors\ClerkErrors80 | 401, 422 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | -## updateOrganizationMembership +## update Updates the properties of an existing organization membership @@ -141,7 +143,7 @@ $requestBody = new Operations\UpdateOrganizationMembershipRequestBody( role: '', ); -$response = $sdk->organizationMemberships->updateOrganizationMembership( +$response = $sdk->organizationMemberships->update( organizationId: '', userId: '', requestBody: $requestBody @@ -169,10 +171,10 @@ if ($response->organizationMembership !== null) { | Error Type | Status Code | Content Type | | -------------------- | -------------------- | -------------------- | -| Errors\ClerkErrors71 | 400, 404, 422 | application/json | +| Errors\ClerkErrors81 | 400, 404, 422 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | -## deleteOrganizationMembership +## delete Removes the given membership from the organization @@ -191,7 +193,7 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); -$response = $sdk->organizationMemberships->deleteOrganizationMembership( +$response = $sdk->organizationMemberships->delete( organizationId: '', userId: '' @@ -217,10 +219,10 @@ if ($response->organizationMembership !== null) { | Error Type | Status Code | Content Type | | -------------------- | -------------------- | -------------------- | -| Errors\ClerkErrors72 | 400, 401, 404 | application/json | +| Errors\ClerkErrors82 | 400, 401, 404 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | -## updateOrganizationMembershipMetadata +## updateMetadata Update an organization membership's metadata attributes by merging existing values with the provided parameters. Metadata values will be updated via a deep merge. Deep means that any nested JSON objects will be merged as well. @@ -242,7 +244,7 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); $requestBody = new Operations\UpdateOrganizationMembershipMetadataRequestBody(); -$response = $sdk->organizationMemberships->updateOrganizationMembershipMetadata( +$response = $sdk->organizationMemberships->updateMetadata( organizationId: '', userId: '', requestBody: $requestBody @@ -270,5 +272,55 @@ if ($response->organizationMembership !== null) { | Error Type | Status Code | Content Type | | -------------------- | -------------------- | -------------------- | -| Errors\ClerkErrors73 | 400, 404, 422 | application/json | -| Errors\SDKException | 4XX, 5XX | \*/\* | \ No newline at end of file +| Errors\ClerkErrors83 | 400, 404, 422 | application/json | +| Errors\SDKException | 4XX, 5XX | \*/\* | + +## getAll + +Retrieves all organization user memberships for the given instance. + +### Example Usage + +```php +declare(strict_types=1); + +require 'vendor/autoload.php'; + +use Clerk\Backend; + +$security = ''; + +$sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); + + + +$response = $sdk->organizationMemberships->getAll( + limit: 10, + offset: 0, + orderBy: '' + +); + +if ($response->organizationMemberships !== null) { + // handle response +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `limit` | *?int* | :heavy_minus_sign: | Applies a limit to the number of results returned.
Can be used for paginating the results together with `offset`. | +| `offset` | *?int* | :heavy_minus_sign: | Skip the first `offset` results when paginating.
Needs to be an integer greater or equal to zero.
To be used in conjunction with `limit`. | +| `orderBy` | *?string* | :heavy_minus_sign: | Sorts organizations memberships by phone_number, email_address, created_at, first_name, last_name or username.
By prepending one of those values with + or -,
we can choose to sort in ascending (ASC) or descending (DESC) order. | + +### Response + +**[?Operations\InstanceGetOrganizationMembershipsResponse](../../Models/Operations/InstanceGetOrganizationMembershipsResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------- | --------------------- | --------------------- | +| Errors\ClerkErrors104 | 400, 401, 422, 500 | application/json | +| Errors\SDKException | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/organizations/README.md b/docs/sdks/organizations/README.md index 3d4d017..ac624bf 100644 --- a/docs/sdks/organizations/README.md +++ b/docs/sdks/organizations/README.md @@ -8,16 +8,16 @@ Organizations are used to group members under a common entity and provide shared ### Available Operations -* [listOrganizations](#listorganizations) - Get a list of organizations for an instance -* [createOrganization](#createorganization) - Create an organization -* [getOrganization](#getorganization) - Retrieve an organization by ID or slug -* [updateOrganization](#updateorganization) - Update an organization -* [deleteOrganization](#deleteorganization) - Delete an organization -* [mergeOrganizationMetadata](#mergeorganizationmetadata) - Merge and update metadata for an organization -* [uploadOrganizationLogo](#uploadorganizationlogo) - Upload a logo for the organization -* [deleteOrganizationLogo](#deleteorganizationlogo) - Delete the organization's logo. +* [list](#list) - Get a list of organizations for an instance +* [create](#create) - Create an organization +* [get](#get) - Retrieve an organization by ID or slug +* [update](#update) - Update an organization +* [delete](#delete) - Delete an organization +* [mergeMetadata](#mergemetadata) - Merge and update metadata for an organization +* [uploadLogo](#uploadlogo) - Upload a logo for the organization +* [deleteLogo](#deletelogo) - Delete the organization's logo. -## listOrganizations +## list This request returns the list of organizations for an instance. Results can be paginated using the optional `limit` and `offset` query parameters. @@ -40,7 +40,7 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); $request = new Operations\ListOrganizationsRequest(); -$response = $sdk->organizations->listOrganizations( +$response = $sdk->organizations->list( request: $request ); @@ -63,10 +63,10 @@ if ($response->organizations !== null) { | Error Type | Status Code | Content Type | | -------------------- | -------------------- | -------------------- | -| Errors\ClerkErrors57 | 400, 403, 422 | application/json | +| Errors\ClerkErrors67 | 400, 403, 422 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | -## createOrganization +## create Creates a new organization with the given name for an instance. In order to successfully create an organization you need to provide the ID of the User who will become the organization administrator. @@ -77,6 +77,8 @@ You can provide additional metadata for the organization and set any custom attr Organizations support private and public metadata. Private metadata can only be accessed from the Backend API. Public metadata can be accessed from the Backend API, and are read-only from the Frontend API. +The `created_by` user will see this as their [active organization] (https://clerk.com/docs/organizations/overview#active-organization) +the next time they create a session, presuming they don't explicitly set a different organization as active before then. ### Example Usage @@ -97,7 +99,7 @@ $request = new Operations\CreateOrganizationRequestBody( createdBy: '', ); -$response = $sdk->organizations->createOrganization( +$response = $sdk->organizations->create( request: $request ); @@ -120,10 +122,10 @@ if ($response->organization !== null) { | Error Type | Status Code | Content Type | | -------------------- | -------------------- | -------------------- | -| Errors\ClerkErrors58 | 400, 403, 422 | application/json | +| Errors\ClerkErrors68 | 400, 403, 422 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | -## getOrganization +## get Fetches the organization whose ID or slug matches the provided `id_or_slug` URL query parameter. @@ -142,8 +144,10 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); -$response = $sdk->organizations->getOrganization( - organizationId: '' +$response = $sdk->organizations->get( + organizationId: '', + includeMembersCount: false + ); if ($response->organization !== null) { @@ -153,9 +157,10 @@ if ($response->organization !== null) { ### Parameters -| Parameter | Type | Required | Description | -| ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | -| `organizationId` | *string* | :heavy_check_mark: | The ID or slug of the organization | +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `organizationId` | *string* | :heavy_check_mark: | The ID or slug of the organization | +| `includeMembersCount` | *?bool* | :heavy_minus_sign: | Flag to denote whether or not the organization's members count should be included in the response. | ### Response @@ -165,10 +170,10 @@ if ($response->organization !== null) { | Error Type | Status Code | Content Type | | -------------------- | -------------------- | -------------------- | -| Errors\ClerkErrors59 | 403, 404 | application/json | +| Errors\ClerkErrors69 | 403, 404 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | -## updateOrganization +## update Updates an existing organization @@ -188,7 +193,7 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); $requestBody = new Operations\UpdateOrganizationRequestBody(); -$response = $sdk->organizations->updateOrganization( +$response = $sdk->organizations->update( organizationId: '', requestBody: $requestBody @@ -214,10 +219,10 @@ if ($response->organization !== null) { | Error Type | Status Code | Content Type | | -------------------- | -------------------- | -------------------- | -| Errors\ClerkErrors60 | 402, 404, 422 | application/json | +| Errors\ClerkErrors70 | 402, 404, 422 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | -## deleteOrganization +## delete Deletes the given organization. Please note that deleting an organization will also delete all memberships and invitations. @@ -238,7 +243,7 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); -$response = $sdk->organizations->deleteOrganization( +$response = $sdk->organizations->delete( organizationId: '' ); @@ -261,10 +266,10 @@ if ($response->deletedObject !== null) { | Error Type | Status Code | Content Type | | -------------------- | -------------------- | -------------------- | -| Errors\ClerkErrors61 | 404 | application/json | +| Errors\ClerkErrors71 | 404 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | -## mergeOrganizationMetadata +## mergeMetadata Update organization metadata attributes by merging existing values with the provided parameters. Metadata values will be updated via a deep merge. @@ -287,7 +292,7 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); $requestBody = new Operations\MergeOrganizationMetadataRequestBody(); -$response = $sdk->organizations->mergeOrganizationMetadata( +$response = $sdk->organizations->mergeMetadata( organizationId: '', requestBody: $requestBody @@ -313,10 +318,10 @@ if ($response->organization !== null) { | Error Type | Status Code | Content Type | | -------------------- | -------------------- | -------------------- | -| Errors\ClerkErrors61 | 400, 401, 404, 422 | application/json | +| Errors\ClerkErrors71 | 400, 401, 404, 422 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | -## uploadOrganizationLogo +## uploadLogo Set or replace an organization's logo, by uploading an image file. This endpoint uses the `multipart/form-data` request content type and accepts a file of image type. @@ -338,14 +343,13 @@ $security = ''; $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); $requestBody = new Operations\UploadOrganizationLogoRequestBody( - uploaderUserId: '', file: new Operations\UploadOrganizationLogoFile( fileName: 'example.file', - content: '0xd99deAb77d', + content: '0x0DDEE4e6Ea', ), ); -$response = $sdk->organizations->uploadOrganizationLogo( +$response = $sdk->organizations->uploadLogo( organizationId: '', requestBody: $requestBody @@ -371,10 +375,10 @@ if ($response->organizationWithLogo !== null) { | Error Type | Status Code | Content Type | | -------------------- | -------------------- | -------------------- | -| Errors\ClerkErrors62 | 400, 403, 404, 413 | application/json | +| Errors\ClerkErrors72 | 400, 403, 404, 413 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | -## deleteOrganizationLogo +## deleteLogo Delete the organization's logo. @@ -393,7 +397,7 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); -$response = $sdk->organizations->deleteOrganizationLogo( +$response = $sdk->organizations->deleteLogo( organizationId: '' ); @@ -416,5 +420,5 @@ if ($response->organization !== null) { | Error Type | Status Code | Content Type | | -------------------- | -------------------- | -------------------- | -| Errors\ClerkErrors63 | 404 | application/json | +| Errors\ClerkErrors73 | 404 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/phonenumbers/README.md b/docs/sdks/phonenumbers/README.md index 33fca27..6e5755a 100644 --- a/docs/sdks/phonenumbers/README.md +++ b/docs/sdks/phonenumbers/README.md @@ -3,17 +3,14 @@ ## Overview -A user can be associated with one or more phone numbers, which allows them to be contacted via SMS. - - ### Available Operations -* [createPhoneNumber](#createphonenumber) - Create a phone number -* [getPhoneNumber](#getphonenumber) - Retrieve a phone number -* [deletePhoneNumber](#deletephonenumber) - Delete a phone number -* [updatePhoneNumber](#updatephonenumber) - Update a phone number +* [create](#create) - Create a phone number +* [get](#get) - Retrieve a phone number +* [delete](#delete) - Delete a phone number +* [update](#update) - Update a phone number -## createPhoneNumber +## create Create a new phone number @@ -33,7 +30,7 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); $request = new Operations\CreatePhoneNumberRequestBody(); -$response = $sdk->phoneNumbers->createPhoneNumber( +$response = $sdk->phoneNumbers->create( request: $request ); @@ -59,7 +56,7 @@ if ($response->phoneNumber !== null) { | Errors\ClerkErrors7 | 400, 401, 403, 404, 422 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | -## getPhoneNumber +## get Returns the details of a phone number @@ -78,7 +75,7 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); -$response = $sdk->phoneNumbers->getPhoneNumber( +$response = $sdk->phoneNumbers->get( phoneNumberId: '' ); @@ -104,7 +101,7 @@ if ($response->phoneNumber !== null) { | Errors\ClerkErrors8 | 400, 401, 403, 404 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | -## deletePhoneNumber +## delete Delete the phone number with the given ID @@ -123,7 +120,7 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); -$response = $sdk->phoneNumbers->deletePhoneNumber( +$response = $sdk->phoneNumbers->delete( phoneNumberId: '' ); @@ -149,7 +146,7 @@ if ($response->deletedObject !== null) { | Errors\ClerkErrors9 | 400, 401, 403, 404 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | -## updatePhoneNumber +## update Updates a phone number @@ -169,7 +166,7 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); $requestBody = new Operations\UpdatePhoneNumberRequestBody(); -$response = $sdk->phoneNumbers->updatePhoneNumber( +$response = $sdk->phoneNumbers->update( phoneNumberId: '', requestBody: $requestBody diff --git a/docs/sdks/proxychecks/README.md b/docs/sdks/proxychecks/README.md index 54c8dec..841ed73 100644 --- a/docs/sdks/proxychecks/README.md +++ b/docs/sdks/proxychecks/README.md @@ -5,9 +5,9 @@ ### Available Operations -* [verifyDomainProxy](#verifydomainproxy) - Verify the proxy configuration for your domain +* [verify](#verify) - Verify the proxy configuration for your domain -## verifyDomainProxy +## verify This endpoint can be used to validate that a proxy-enabled domain is operational. It tries to verify that the proxy URL provided in the parameters maps to a functional proxy that can reach the Clerk Frontend API. @@ -34,7 +34,7 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); $request = new Operations\VerifyDomainProxyRequestBody(); -$response = $sdk->proxyChecks->verifyDomainProxy( +$response = $sdk->proxyChecks->verify( request: $request ); @@ -57,5 +57,5 @@ if ($response->proxyCheck !== null) { | Error Type | Status Code | Content Type | | -------------------- | -------------------- | -------------------- | -| Errors\ClerkErrors74 | 400, 422 | application/json | +| Errors\ClerkErrors88 | 400, 422 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/redirecturls/README.md b/docs/sdks/redirecturls/README.md index c87f72e..fdaad62 100644 --- a/docs/sdks/redirecturls/README.md +++ b/docs/sdks/redirecturls/README.md @@ -3,17 +3,11 @@ ## Overview -Redirect URLs are whitelisted URLs that facilitate secure authentication flows in native applications (e.g. React Native, Expo). -In these contexts, Clerk ensures that security-critical nonces are passed only to the whitelisted URLs. - ### Available Operations -* [listRedirectURLs](#listredirecturls) - List all redirect URLs -* [createRedirectURL](#createredirecturl) - Create a redirect URL -* [getRedirectURL](#getredirecturl) - Retrieve a redirect URL -* [deleteRedirectURL](#deleteredirecturl) - Delete a redirect URL +* [list](#list) - List all redirect URLs -## listRedirectURLs +## list Lists all whitelisted redirect_urls for the instance @@ -32,7 +26,7 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); -$response = $sdk->redirectURLs->listRedirectURLs( +$response = $sdk->redirectURLs->list( ); @@ -49,140 +43,4 @@ if ($response->redirectURLList !== null) { | Error Type | Status Code | Content Type | | ------------------- | ------------------- | ------------------- | -| Errors\SDKException | 4XX, 5XX | \*/\* | - -## createRedirectURL - -Create a redirect URL - -### Example Usage - -```php -declare(strict_types=1); - -require 'vendor/autoload.php'; - -use Clerk\Backend; -use Clerk\Backend\Models\Operations; - -$security = ''; - -$sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); - -$request = new Operations\CreateRedirectURLRequestBody(); - -$response = $sdk->redirectURLs->createRedirectURL( - request: $request -); - -if ($response->redirectURL !== null) { - // handle response -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -| `$request` | [Operations\CreateRedirectURLRequestBody](../../Models/Operations/CreateRedirectURLRequestBody.md) | :heavy_check_mark: | The request object to use for the request. | - -### Response - -**[?Operations\CreateRedirectURLResponse](../../Models/Operations/CreateRedirectURLResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| -------------------- | -------------------- | -------------------- | -| Errors\ClerkErrors75 | 400, 422 | application/json | -| Errors\SDKException | 4XX, 5XX | \*/\* | - -## getRedirectURL - -Retrieve the details of the redirect URL with the given ID - -### Example Usage - -```php -declare(strict_types=1); - -require 'vendor/autoload.php'; - -use Clerk\Backend; - -$security = ''; - -$sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); - - - -$response = $sdk->redirectURLs->getRedirectURL( - id: '' -); - -if ($response->redirectURL !== null) { - // handle response -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| -------------------------- | -------------------------- | -------------------------- | -------------------------- | -| `id` | *string* | :heavy_check_mark: | The ID of the redirect URL | - -### Response - -**[?Operations\GetRedirectURLResponse](../../Models/Operations/GetRedirectURLResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| -------------------- | -------------------- | -------------------- | -| Errors\ClerkErrors76 | 404 | application/json | -| Errors\SDKException | 4XX, 5XX | \*/\* | - -## deleteRedirectURL - -Remove the selected redirect URL from the whitelist of the instance - -### Example Usage - -```php -declare(strict_types=1); - -require 'vendor/autoload.php'; - -use Clerk\Backend; - -$security = ''; - -$sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); - - - -$response = $sdk->redirectURLs->deleteRedirectURL( - id: '' -); - -if ($response->deletedObject !== null) { - // handle response -} -``` - -### Parameters - -| Parameter | Type | Required | Description | -| -------------------------- | -------------------------- | -------------------------- | -------------------------- | -| `id` | *string* | :heavy_check_mark: | The ID of the redirect URL | - -### Response - -**[?Operations\DeleteRedirectURLResponse](../../Models/Operations/DeleteRedirectURLResponse.md)** - -### Errors - -| Error Type | Status Code | Content Type | -| -------------------- | -------------------- | -------------------- | -| Errors\ClerkErrors77 | 404 | application/json | -| Errors\SDKException | 4XX, 5XX | \*/\* | \ No newline at end of file +| Errors\SDKException | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/samlconnections/README.md b/docs/sdks/samlconnections/README.md index 851d284..17e2516 100644 --- a/docs/sdks/samlconnections/README.md +++ b/docs/sdks/samlconnections/README.md @@ -1,20 +1,17 @@ -# SAMLConnections +# SamlConnections (*samlConnections*) ## Overview -A SAML Connection holds configuration data required for facilitating a SAML SSO flow between your -Clerk Instance (SP) and a particular SAML IdP. - ### Available Operations -* [listSAMLConnections](#listsamlconnections) - Get a list of SAML Connections for an instance -* [createSAMLConnection](#createsamlconnection) - Create a SAML Connection -* [getSAMLConnection](#getsamlconnection) - Retrieve a SAML Connection by ID -* [updateSAMLConnection](#updatesamlconnection) - Update a SAML Connection -* [deleteSAMLConnection](#deletesamlconnection) - Delete a SAML Connection +* [list](#list) - Get a list of SAML Connections for an instance +* [create](#create) - Create a SAML Connection +* [get](#get) - Retrieve a SAML Connection by ID +* [update](#update) - Update a SAML Connection +* [delete](#delete) - Delete a SAML Connection -## listSAMLConnections +## list Returns the list of SAML Connections for an instance. Results can be paginated using the optional `limit` and `offset` query parameters. @@ -35,7 +32,7 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); -$response = $sdk->samlConnections->listSAMLConnections( +$response = $sdk->samlConnections->list( limit: 10, offset: 0 @@ -50,8 +47,8 @@ if ($response->samlConnections !== null) { | Parameter | Type | Required | Description | | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | -| `limit` | *?float* | :heavy_minus_sign: | Applies a limit to the number of results returned.
Can be used for paginating the results together with `offset`. | -| `offset` | *?float* | :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`. | +| `limit` | *?int* | :heavy_minus_sign: | Applies a limit to the number of results returned.
Can be used for paginating the results together with `offset`. | +| `offset` | *?int* | :heavy_minus_sign: | Skip the first `offset` results when paginating.
Needs to be an integer greater or equal to zero.
To be used in conjunction with `limit`. | ### Response @@ -61,10 +58,10 @@ if ($response->samlConnections !== null) { | Error Type | Status Code | Content Type | | -------------------- | -------------------- | -------------------- | -| Errors\ClerkErrors85 | 402, 403, 422 | application/json | +| Errors\ClerkErrors99 | 402, 403, 422 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | -## createSAMLConnection +## create Create a new SAML Connection. @@ -84,15 +81,15 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); $request = new Operations\CreateSAMLConnectionRequestBody( name: '', - domain: 'stingy-necklace.name', - provider: Operations\Provider::SamlGoogle, + domain: 'low-packaging.info', + provider: Operations\Provider::SamlCustom, ); -$response = $sdk->samlConnections->createSAMLConnection( +$response = $sdk->samlConnections->create( request: $request ); -if ($response->samlConnection !== null) { +if ($response->schemasSAMLConnection !== null) { // handle response } ``` @@ -109,12 +106,12 @@ if ($response->samlConnection !== null) { ### Errors -| Error Type | Status Code | Content Type | -| -------------------- | -------------------- | -------------------- | -| Errors\ClerkErrors86 | 402, 403, 422 | application/json | -| Errors\SDKException | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------------- | --------------------- | --------------------- | +| Errors\ClerkErrors100 | 402, 403, 422 | application/json | +| Errors\SDKException | 4XX, 5XX | \*/\* | -## getSAMLConnection +## get Fetches the SAML Connection whose ID matches the provided `saml_connection_id` in the path. @@ -133,11 +130,11 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); -$response = $sdk->samlConnections->getSAMLConnection( +$response = $sdk->samlConnections->get( samlConnectionId: '' ); -if ($response->samlConnection !== null) { +if ($response->schemasSAMLConnection !== null) { // handle response } ``` @@ -154,12 +151,12 @@ if ($response->samlConnection !== null) { ### Errors -| Error Type | Status Code | Content Type | -| -------------------- | -------------------- | -------------------- | -| Errors\ClerkErrors87 | 402, 403, 404 | application/json | -| Errors\SDKException | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------------- | --------------------- | --------------------- | +| Errors\ClerkErrors101 | 402, 403, 404 | application/json | +| Errors\SDKException | 4XX, 5XX | \*/\* | -## updateSAMLConnection +## update Updates the SAML Connection whose ID matches the provided `id` in the path. @@ -179,13 +176,13 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); $requestBody = new Operations\UpdateSAMLConnectionRequestBody(); -$response = $sdk->samlConnections->updateSAMLConnection( +$response = $sdk->samlConnections->update( samlConnectionId: '', requestBody: $requestBody ); -if ($response->samlConnection !== null) { +if ($response->schemasSAMLConnection !== null) { // handle response } ``` @@ -203,12 +200,12 @@ if ($response->samlConnection !== null) { ### Errors -| Error Type | Status Code | Content Type | -| -------------------- | -------------------- | -------------------- | -| Errors\ClerkErrors88 | 402, 403, 404, 422 | application/json | -| Errors\SDKException | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| --------------------- | --------------------- | --------------------- | +| Errors\ClerkErrors102 | 402, 403, 404, 422 | application/json | +| Errors\SDKException | 4XX, 5XX | \*/\* | -## deleteSAMLConnection +## delete Deletes the SAML Connection whose ID matches the provided `id` in the path. @@ -227,7 +224,7 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); -$response = $sdk->samlConnections->deleteSAMLConnection( +$response = $sdk->samlConnections->delete( samlConnectionId: '' ); @@ -248,7 +245,7 @@ if ($response->deletedObject !== null) { ### Errors -| Error Type | Status Code | Content Type | -| -------------------- | -------------------- | -------------------- | -| Errors\ClerkErrors89 | 402, 403, 404 | application/json | -| Errors\SDKException | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| --------------------- | --------------------- | --------------------- | +| Errors\ClerkErrors103 | 402, 403, 404 | application/json | +| Errors\SDKException | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/sessions/README.md b/docs/sdks/sessions/README.md index b6ccc6b..ced7b6d 100644 --- a/docs/sdks/sessions/README.md +++ b/docs/sdks/sessions/README.md @@ -10,13 +10,13 @@ Sessions are created when a user successfully goes through the sign in or sign u ### Available Operations -* [getSessionList](#getsessionlist) - List all sessions -* [getSession](#getsession) - Retrieve a session -* [revokeSession](#revokesession) - Revoke a session -* [~~verifySession~~](#verifysession) - Verify a session :warning: **Deprecated** -* [createSessionTokenFromTemplate](#createsessiontokenfromtemplate) - Create a session token from a jwt template +* [list](#list) - List all sessions +* [get](#get) - Retrieve a session +* [revoke](#revoke) - Revoke a session +* [~~verify~~](#verify) - Verify a session :warning: **Deprecated** +* [createTokenFromTemplate](#createtokenfromtemplate) - Create a session token from a jwt template -## getSessionList +## list Returns a list of all sessions. The sessions are returned sorted by creation date, with the newest sessions appearing first. @@ -39,7 +39,7 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); $request = new Operations\GetSessionListRequest(); -$response = $sdk->sessions->getSessionList( +$response = $sdk->sessions->list( request: $request ); @@ -65,7 +65,7 @@ if ($response->sessionList !== null) { | Errors\ClerkErrors11 | 400, 401, 422 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | -## getSession +## get Retrieve the details of a session @@ -84,7 +84,7 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); -$response = $sdk->sessions->getSession( +$response = $sdk->sessions->get( sessionId: '' ); @@ -110,7 +110,7 @@ if ($response->session !== null) { | Errors\ClerkErrors12 | 400, 401, 404 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | -## revokeSession +## revoke Sets the status of a session as "revoked", which is an unauthenticated state. In multi-session mode, a revoked session will still be returned along with its client object, however the user will need to sign in again. @@ -130,7 +130,7 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); -$response = $sdk->sessions->revokeSession( +$response = $sdk->sessions->revoke( sessionId: '' ); @@ -156,7 +156,7 @@ if ($response->session !== null) { | Errors\ClerkErrors13 | 400, 401, 404 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | -## ~~verifySession~~ +## ~~verify~~ Returns the session if it is authenticated, otherwise returns an error. WARNING: This endpoint is deprecated and will be removed in future versions. We strongly recommend switching to networkless verification using short-lived session tokens, @@ -181,7 +181,7 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); $requestBody = new Operations\VerifySessionRequestBody(); -$response = $sdk->sessions->verifySession( +$response = $sdk->sessions->verify( sessionId: '', requestBody: $requestBody @@ -210,7 +210,7 @@ if ($response->session !== null) { | Errors\ClerkErrors14 | 400, 401, 404, 410 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | -## createSessionTokenFromTemplate +## createTokenFromTemplate Creates a JSON Web Token(JWT) based on a session and a JWT Template name defined for your instance @@ -229,7 +229,7 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); -$response = $sdk->sessions->createSessionTokenFromTemplate( +$response = $sdk->sessions->createTokenFromTemplate( sessionId: '', templateName: '' diff --git a/docs/sdks/signintokens/README.md b/docs/sdks/signintokens/README.md index 7d37950..4265611 100644 --- a/docs/sdks/signintokens/README.md +++ b/docs/sdks/signintokens/README.md @@ -3,15 +3,12 @@ ## Overview -Sign-in tokens are JWTs that can be used to sign in to an application without specifying any credentials. -A sign-in token can be used at most once and they can be consumed from the Frontend API using the `ticket` strategy. - ### Available Operations -* [createSignInToken](#createsignintoken) - Create sign-in token -* [revokeSignInToken](#revokesignintoken) - Revoke the given sign-in token +* [create](#create) - Create sign-in token +* [revoke](#revoke) - Revoke the given sign-in token -## createSignInToken +## create Creates a new sign-in token and associates it with the given user. By default, sign-in tokens expire in 30 days. @@ -33,7 +30,7 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); $request = new Operations\CreateSignInTokenRequestBody(); -$response = $sdk->signInTokens->createSignInToken( +$response = $sdk->signInTokens->create( request: $request ); @@ -56,10 +53,10 @@ if ($response->signInToken !== null) { | Error Type | Status Code | Content Type | | -------------------- | -------------------- | -------------------- | -| Errors\ClerkErrors77 | 404, 422 | application/json | +| Errors\ClerkErrors91 | 404, 422 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | -## revokeSignInToken +## revoke Revokes a pending sign-in token @@ -78,7 +75,7 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); -$response = $sdk->signInTokens->revokeSignInToken( +$response = $sdk->signInTokens->revoke( signInTokenId: '' ); @@ -101,5 +98,5 @@ if ($response->signInToken !== null) { | Error Type | Status Code | Content Type | | -------------------- | -------------------- | -------------------- | -| Errors\ClerkErrors78 | 400, 404 | application/json | +| Errors\ClerkErrors92 | 400, 404 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/signups/README.md b/docs/sdks/signups/README.md index 4acded7..de40ac0 100644 --- a/docs/sdks/signups/README.md +++ b/docs/sdks/signups/README.md @@ -5,9 +5,9 @@ ### Available Operations -* [updateSignUp](#updatesignup) - Update a sign-up +* [update](#update) - Update a sign-up -## updateSignUp +## update Update the sign-up with the given ID @@ -27,7 +27,7 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); $requestBody = new Operations\UpdateSignUpRequestBody(); -$response = $sdk->signUps->updateSignUp( +$response = $sdk->signUps->update( id: '', requestBody: $requestBody @@ -53,5 +53,5 @@ if ($response->signUp !== null) { | Error Type | Status Code | Content Type | | -------------------- | -------------------- | -------------------- | -| Errors\ClerkErrors79 | 403 | application/json | +| Errors\ClerkErrors93 | 403 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/templates/README.md b/docs/sdks/templates/README.md new file mode 100644 index 0000000..fdf654d --- /dev/null +++ b/docs/sdks/templates/README.md @@ -0,0 +1,61 @@ +# Templates +(*templates*) + +## Overview + +### Available Operations + +* [~~preview~~](#preview) - Preview changes to a template :warning: **Deprecated** + +## ~~preview~~ + +Returns a preview of a template for a given template_type, slug and body + +> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible. + +### Example Usage + +```php +declare(strict_types=1); + +require 'vendor/autoload.php'; + +use Clerk\Backend; +use Clerk\Backend\Models\Operations; + +$security = ''; + +$sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); + +$requestBody = new Operations\PreviewTemplateRequestBody(); + +$response = $sdk->templates->preview( + templateType: '', + slug: '', + requestBody: $requestBody + +); + +if ($response->object !== null) { + // handle response +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `templateType` | *string* | :heavy_check_mark: | The type of template to preview | +| `slug` | *string* | :heavy_check_mark: | The slug of the template to preview | +| `requestBody` | [?Operations\PreviewTemplateRequestBody](../../Models/Operations/PreviewTemplateRequestBody.md) | :heavy_minus_sign: | Required parameters | + +### Response + +**[?Operations\PreviewTemplateResponse](../../Models/Operations/PreviewTemplateResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------- | -------------------- | -------------------- | +| Errors\ClerkErrors20 | 400, 401, 404, 422 | application/json | +| Errors\SDKException | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/testingtokens/README.md b/docs/sdks/testingtokens/README.md index 63ee256..23bddda 100644 --- a/docs/sdks/testingtokens/README.md +++ b/docs/sdks/testingtokens/README.md @@ -3,14 +3,11 @@ ## Overview -Tokens meant for use by end-to-end test suites in requests to the Frontend API, so as to bypass bot detection measures. - - ### Available Operations -* [createTestingToken](#createtestingtoken) - Retrieve a new testing token +* [create](#create) - Retrieve a new testing token -## createTestingToken +## create Retrieve a new testing token. Only available for development instances. @@ -29,7 +26,7 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); -$response = $sdk->testingTokens->createTestingToken( +$response = $sdk->testingTokens->create( ); diff --git a/docs/sdks/users/README.md b/docs/sdks/users/README.md index 7fc70a9..a7b97b8 100644 --- a/docs/sdks/users/README.md +++ b/docs/sdks/users/README.md @@ -8,26 +8,33 @@ The user object represents a user that has successfully signed up to your applic ### Available Operations -* [getUserList](#getuserlist) - List all users -* [createUser](#createuser) - Create a new user -* [getUsersCount](#getuserscount) - Count users -* [getUser](#getuser) - Retrieve a user -* [updateUser](#updateuser) - Update a user -* [deleteUser](#deleteuser) - Delete a user -* [banUser](#banuser) - Ban a user -* [unbanUser](#unbanuser) - Unban a user -* [lockUser](#lockuser) - Lock a user -* [unlockUser](#unlockuser) - Unlock a user -* [setUserProfileImage](#setuserprofileimage) - Set user profile image -* [deleteUserProfileImage](#deleteuserprofileimage) - Delete user profile image -* [updateUserMetadata](#updateusermetadata) - Merge and update a user's metadata +* [list](#list) - List all users +* [create](#create) - Create a new user +* [count](#count) - Count users +* [get](#get) - Retrieve a user +* [update](#update) - Update a user +* [delete](#delete) - Delete a user +* [ban](#ban) - Ban a user +* [unban](#unban) - Unban a user +* [lock](#lock) - Lock a user +* [unlock](#unlock) - Unlock a user +* [setProfileImage](#setprofileimage) - Set user profile image +* [deleteProfileImage](#deleteprofileimage) - Delete user profile image +* [updateMetadata](#updatemetadata) - Merge and update a user's metadata * [getOAuthAccessToken](#getoauthaccesstoken) - Retrieve the OAuth access token of a user -* [usersGetOrganizationMemberships](#usersgetorganizationmemberships) - Retrieve all memberships for a user +* [getOrganizationMemberships](#getorganizationmemberships) - Retrieve all memberships for a user +* [getOrganizationInvitations](#getorganizationinvitations) - Retrieve all invitations for a user * [verifyPassword](#verifypassword) - Verify the password of a user * [verifyTOTP](#verifytotp) - Verify a TOTP or backup code for a user * [disableMFA](#disablemfa) - Disable a user's MFA methods +* [deleteBackupCodes](#deletebackupcodes) - Disable all user's Backup codes +* [deletePasskey](#deletepasskey) - Delete a user passkey +* [deleteWeb3Wallet](#deleteweb3wallet) - Delete a user web3 wallet +* [createTOTP](#createtotp) - Create a TOTP for a user +* [deleteTotp](#deletetotp) - Delete all the user's TOTPs +* [deleteExternalAccount](#deleteexternalaccount) - Delete External Account -## getUserList +## list Returns a list of all users. The users are returned sorted by creation date, with the newest users appearing first. @@ -50,7 +57,7 @@ $request = new Operations\GetUserListRequest( lastActiveAtSince: 1700690400000, ); -$response = $sdk->users->getUserList( +$response = $sdk->users->list( request: $request ); @@ -76,7 +83,7 @@ if ($response->userList !== null) { | Errors\ClerkErrors22 | 400, 401, 422 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | -## createUser +## create Creates a new user. Your user management settings determine how you should setup your user model. @@ -102,7 +109,7 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); $request = new Operations\CreateUserRequestBody(); -$response = $sdk->users->createUser( +$response = $sdk->users->create( request: $request ); @@ -128,7 +135,7 @@ if ($response->user !== null) { | Errors\ClerkErrors23 | 400, 401, 403, 422 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | -## getUsersCount +## count Returns a total count of all users that match the given filtering criteria. @@ -148,7 +155,7 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); $request = new Operations\GetUsersCountRequest(); -$response = $sdk->users->getUsersCount( +$response = $sdk->users->count( request: $request ); @@ -174,7 +181,7 @@ if ($response->totalCount !== null) { | Errors\ClerkErrors24 | 422 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | -## getUser +## get Retrieve the details of a user @@ -193,7 +200,7 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); -$response = $sdk->users->getUser( +$response = $sdk->users->get( userId: '' ); @@ -219,7 +226,7 @@ if ($response->user !== null) { | Errors\ClerkErrors25 | 400, 401, 404 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | -## updateUser +## update Update a user's attributes. @@ -250,7 +257,7 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); $requestBody = new Operations\UpdateUserRequestBody(); -$response = $sdk->users->updateUser( +$response = $sdk->users->update( userId: '', requestBody: $requestBody @@ -279,7 +286,7 @@ if ($response->user !== null) { | Errors\ClerkErrors26 | 400, 401, 404, 422 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | -## deleteUser +## delete Delete the specified user @@ -298,7 +305,7 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); -$response = $sdk->users->deleteUser( +$response = $sdk->users->delete( userId: '' ); @@ -324,7 +331,7 @@ if ($response->deletedObject !== null) { | Errors\ClerkErrors27 | 400, 401, 404 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | -## banUser +## ban Marks the given user as banned, which means that all their sessions are revoked and they are not allowed to sign in again. @@ -343,7 +350,7 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); -$response = $sdk->users->banUser( +$response = $sdk->users->ban( userId: '' ); @@ -369,7 +376,7 @@ if ($response->user !== null) { | Errors\ClerkErrors28 | 402 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | -## unbanUser +## unban Removes the ban mark from the given user. @@ -388,7 +395,7 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); -$response = $sdk->users->unbanUser( +$response = $sdk->users->unban( userId: '' ); @@ -414,7 +421,7 @@ if ($response->user !== null) { | Errors\ClerkErrors29 | 402 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | -## lockUser +## lock Marks the given user as locked, which means they are not allowed to sign in again until the lock expires. Lock duration can be configured in the instance's restrictions settings. @@ -434,7 +441,7 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); -$response = $sdk->users->lockUser( +$response = $sdk->users->lock( userId: '' ); @@ -460,7 +467,7 @@ if ($response->user !== null) { | Errors\ClerkErrors29 | 403 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | -## unlockUser +## unlock Removes the lock from the given user. @@ -479,7 +486,7 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); -$response = $sdk->users->unlockUser( +$response = $sdk->users->unlock( userId: '' ); @@ -505,7 +512,7 @@ if ($response->user !== null) { | Errors\ClerkErrors29 | 403 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | -## setUserProfileImage +## setProfileImage Update a user's profile image @@ -525,7 +532,7 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); $requestBody = new Operations\SetUserProfileImageRequestBody(); -$response = $sdk->users->setUserProfileImage( +$response = $sdk->users->setProfileImage( userId: '', requestBody: $requestBody @@ -554,7 +561,7 @@ if ($response->user !== null) { | Errors\ClerkErrors29 | 400, 401, 404 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | -## deleteUserProfileImage +## deleteProfileImage Delete a user's profile image @@ -573,7 +580,7 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); -$response = $sdk->users->deleteUserProfileImage( +$response = $sdk->users->deleteProfileImage( userId: '' ); @@ -599,7 +606,7 @@ if ($response->user !== null) { | Errors\ClerkErrors30 | 404 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | -## updateUserMetadata +## updateMetadata Update a user's metadata attributes by merging existing values with the provided parameters. @@ -626,7 +633,7 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); $requestBody = new Operations\UpdateUserMetadataRequestBody(); -$response = $sdk->users->updateUserMetadata( +$response = $sdk->users->updateMetadata( userId: '', requestBody: $requestBody @@ -704,7 +711,7 @@ if ($response->responseBodies !== null) { | Errors\ClerkErrors32 | 400, 422 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | -## usersGetOrganizationMemberships +## getOrganizationMemberships Retrieve a paginated list of the user's organization memberships @@ -723,7 +730,7 @@ $sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); -$response = $sdk->users->usersGetOrganizationMemberships( +$response = $sdk->users->getOrganizationMemberships( userId: '', limit: 10, offset: 0 @@ -740,8 +747,8 @@ if ($response->organizationMemberships !== null) { | Parameter | Type | Required | Description | | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | | `userId` | *string* | :heavy_check_mark: | The ID of the user whose organization memberships we want to retrieve | -| `limit` | *?float* | :heavy_minus_sign: | Applies a limit to the number of results returned.
Can be used for paginating the results together with `offset`. | -| `offset` | *?float* | :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`. | +| `limit` | *?int* | :heavy_minus_sign: | Applies a limit to the number of results returned.
Can be used for paginating the results together with `offset`. | +| `offset` | *?int* | :heavy_minus_sign: | Skip the first `offset` results when paginating.
Needs to be an integer greater or equal to zero.
To be used in conjunction with `limit`. | ### Response @@ -754,6 +761,59 @@ if ($response->organizationMemberships !== null) { | Errors\ClerkErrors33 | 403 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | +## getOrganizationInvitations + +Retrieve a paginated list of the user's organization invitations + +### Example Usage + +```php +declare(strict_types=1); + +require 'vendor/autoload.php'; + +use Clerk\Backend; +use Clerk\Backend\Models\Operations; + +$security = ''; + +$sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); + + + +$response = $sdk->users->getOrganizationInvitations( + userId: '', + limit: 10, + offset: 0, + status: Operations\QueryParamStatus::Pending + +); + +if ($response->organizationInvitationsWithPublicOrganizationData !== null) { + // handle response +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | +| `userId` | *string* | :heavy_check_mark: | The ID of the user whose organization invitations we want to retrieve | +| `limit` | *?int* | :heavy_minus_sign: | Applies a limit to the number of results returned.
Can be used for paginating the results together with `offset`. | +| `offset` | *?int* | :heavy_minus_sign: | Skip the first `offset` results when paginating.
Needs to be an integer greater or equal to zero.
To be used in conjunction with `limit`. | +| `status` | [?Operations\QueryParamStatus](../../Models/Operations/QueryParamStatus.md) | :heavy_minus_sign: | Filter organization invitations based on their status | + +### Response + +**[?Operations\UsersGetOrganizationInvitationsResponse](../../Models/Operations/UsersGetOrganizationInvitationsResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------- | -------------------- | -------------------- | +| Errors\ClerkErrors33 | 400, 403, 404 | application/json | +| Errors\SDKException | 4XX, 5XX | \*/\* | + ## verifyPassword Check that the user's password matches the supplied input. @@ -803,7 +863,7 @@ if ($response->object !== null) { | Error Type | Status Code | Content Type | | -------------------- | -------------------- | -------------------- | -| Errors\ClerkErrors33 | 500 | application/json | +| Errors\ClerkErrors34 | 500 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | ## verifyTOTP @@ -857,7 +917,7 @@ if ($response->object !== null) { | Error Type | Status Code | Content Type | | -------------------- | -------------------- | -------------------- | -| Errors\ClerkErrors33 | 500 | application/json | +| Errors\ClerkErrors35 | 500 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | ## disableMFA @@ -902,5 +962,285 @@ if ($response->object !== null) { | Error Type | Status Code | Content Type | | -------------------- | -------------------- | -------------------- | -| Errors\ClerkErrors33 | 404, 500 | application/json | +| Errors\ClerkErrors35 | 404, 500 | application/json | +| Errors\SDKException | 4XX, 5XX | \*/\* | + +## deleteBackupCodes + +Disable all of a user's backup codes. + +### Example Usage + +```php +declare(strict_types=1); + +require 'vendor/autoload.php'; + +use Clerk\Backend; + +$security = ''; + +$sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); + + + +$response = $sdk->users->deleteBackupCodes( + userId: '' +); + +if ($response->object !== null) { + // handle response +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | +| `userId` | *string* | :heavy_check_mark: | The ID of the user whose backup codes are to be deleted. | + +### Response + +**[?Operations\DeleteBackupCodeResponse](../../Models/Operations/DeleteBackupCodeResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------- | -------------------- | -------------------- | +| Errors\ClerkErrors36 | 404, 500 | application/json | +| Errors\SDKException | 4XX, 5XX | \*/\* | + +## deletePasskey + +Delete the passkey identification for a given user and notify them through email. + +### Example Usage + +```php +declare(strict_types=1); + +require 'vendor/autoload.php'; + +use Clerk\Backend; + +$security = ''; + +$sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); + + + +$response = $sdk->users->deletePasskey( + userId: '', + passkeyIdentificationId: '' + +); + +if ($response->deletedObject !== null) { + // handle response +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | +| `userId` | *string* | :heavy_check_mark: | The ID of the user that owns the passkey identity | +| `passkeyIdentificationId` | *string* | :heavy_check_mark: | The ID of the passkey identity to be deleted | + +### Response + +**[?Operations\UserPasskeyDeleteResponse](../../Models/Operations/UserPasskeyDeleteResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------- | -------------------- | -------------------- | +| Errors\ClerkErrors37 | 403, 404, 500 | application/json | +| Errors\SDKException | 4XX, 5XX | \*/\* | + +## deleteWeb3Wallet + +Delete the web3 wallet identification for a given user. + +### Example Usage + +```php +declare(strict_types=1); + +require 'vendor/autoload.php'; + +use Clerk\Backend; + +$security = ''; + +$sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); + + + +$response = $sdk->users->deleteWeb3Wallet( + userId: '', + web3WalletIdentificationId: '' + +); + +if ($response->deletedObject !== null) { + // handle response +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | +| `userId` | *string* | :heavy_check_mark: | The ID of the user that owns the web3 wallet | +| `web3WalletIdentificationId` | *string* | :heavy_check_mark: | The ID of the web3 wallet identity to be deleted | + +### Response + +**[?Operations\UserWeb3WalletDeleteResponse](../../Models/Operations/UserWeb3WalletDeleteResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------- | -------------------- | -------------------- | +| Errors\ClerkErrors38 | 400, 403, 404, 500 | application/json | +| Errors\SDKException | 4XX, 5XX | \*/\* | + +## createTOTP + +Creates a TOTP (Time-based One-Time Password) for a given user, returning both the TOTP secret and the URI. + + +### Example Usage + +```php +declare(strict_types=1); + +require 'vendor/autoload.php'; + +use Clerk\Backend; + +$security = ''; + +$sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); + + + +$response = $sdk->users->createTOTP( + userId: '' +); + +if ($response->totp !== null) { + // handle response +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | +| `userId` | *string* | :heavy_check_mark: | The ID of the user for whom the TOTP is being created. | + +### Response + +**[?Operations\CreateUserTOTPResponse](../../Models/Operations/CreateUserTOTPResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------- | -------------------- | -------------------- | +| Errors\ClerkErrors39 | 403, 404, 500 | application/json | +| Errors\SDKException | 4XX, 5XX | \*/\* | + +## deleteTotp + +Deletes all of the user's TOTPs. + +### Example Usage + +```php +declare(strict_types=1); + +require 'vendor/autoload.php'; + +use Clerk\Backend; + +$security = ''; + +$sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); + + + +$response = $sdk->users->deleteTotp( + userId: '' +); + +if ($response->object !== null) { + // handle response +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | +| `userId` | *string* | :heavy_check_mark: | The ID of the user whose TOTPs are to be deleted | + +### Response + +**[?Operations\DeleteTOTPResponse](../../Models/Operations/DeleteTOTPResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------- | -------------------- | -------------------- | +| Errors\ClerkErrors40 | 404, 500 | application/json | +| Errors\SDKException | 4XX, 5XX | \*/\* | + +## deleteExternalAccount + +Delete an external account by ID. + +### Example Usage + +```php +declare(strict_types=1); + +require 'vendor/autoload.php'; + +use Clerk\Backend; + +$security = ''; + +$sdk = Backend\ClerkBackend::builder()->setSecurity($security)->build(); + + + +$response = $sdk->users->deleteExternalAccount( + userId: '', + externalAccountId: '' + +); + +if ($response->deletedObject !== null) { + // handle response +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | +| `userId` | *string* | :heavy_check_mark: | The ID of the user's external account | +| `externalAccountId` | *string* | :heavy_check_mark: | The ID of the external account to delete | + +### Response + +**[?Operations\DeleteExternalAccountResponse](../../Models/Operations/DeleteExternalAccountResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------- | -------------------- | -------------------- | +| Errors\ClerkErrors41 | 400, 403, 404, 500 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/webhooks/README.md b/docs/sdks/webhooks/README.md index ff2e962..4b146da 100644 --- a/docs/sdks/webhooks/README.md +++ b/docs/sdks/webhooks/README.md @@ -48,7 +48,7 @@ if ($response->svixURL !== null) { | Error Type | Status Code | Content Type | | -------------------- | -------------------- | -------------------- | -| Errors\ClerkErrors52 | 400 | application/json | +| Errors\ClerkErrors62 | 400 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | ## deleteSvixApp @@ -87,7 +87,7 @@ if ($response->statusCode === 200) { | Error Type | Status Code | Content Type | | -------------------- | -------------------- | -------------------- | -| Errors\ClerkErrors53 | 400 | application/json | +| Errors\ClerkErrors63 | 400 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | ## generateSvixAuthURL @@ -126,5 +126,5 @@ if ($response->svixURL !== null) { | Error Type | Status Code | Content Type | | -------------------- | -------------------- | -------------------- | -| Errors\ClerkErrors53 | 400 | application/json | +| Errors\ClerkErrors63 | 400 | application/json | | Errors\SDKException | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/src/ActorTokens.php b/src/ActorTokens.php index 508fe67..52c0c80 100644 --- a/src/ActorTokens.php +++ b/src/ActorTokens.php @@ -32,7 +32,7 @@ public function __construct(public SDKConfiguration $sdkConfig) * @return Operations\CreateActorTokenResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function createActorToken(?Operations\CreateActorTokenRequestBody $request = null): Operations\CreateActorTokenResponse + public function create(?Operations\CreateActorTokenRequestBody $request = null): Operations\CreateActorTokenResponse { $baseUrl = $this->sdkConfiguration->getServerUrl(); $url = Utils\Utils::generateUrl($baseUrl, '/actor_tokens'); @@ -67,7 +67,7 @@ public function createActorToken(?Operations\CreateActorTokenRequestBody $reques } elseif (in_array($statusCode, [400, 402, 422])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors44', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors53', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); throw $obj->toException(); } else { throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -88,7 +88,7 @@ public function createActorToken(?Operations\CreateActorTokenRequestBody $reques * @return Operations\RevokeActorTokenResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function revokeActorToken(string $actorTokenId): Operations\RevokeActorTokenResponse + public function revoke(string $actorTokenId): Operations\RevokeActorTokenResponse { $request = new Operations\RevokeActorTokenRequest( actorTokenId: $actorTokenId, @@ -122,7 +122,7 @@ public function revokeActorToken(string $actorTokenId): Operations\RevokeActorTo } elseif (in_array($statusCode, [400, 404])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors45', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors54', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); throw $obj->toException(); } else { throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); diff --git a/src/AllowListBlockList.php b/src/AllowListBlockList.php index 0a7bf0a..956f1c5 100644 --- a/src/AllowListBlockList.php +++ b/src/AllowListBlockList.php @@ -11,7 +11,7 @@ use Clerk\Backend\Models\Operations; use Speakeasy\Serializer\DeserializationContext; -class AllowListBlockList +class AllowlistBlocklist { private SDKConfiguration $sdkConfiguration; /** @@ -61,7 +61,7 @@ public function listAllowlistIdentifiers(): Operations\ListAllowlistIdentifiersR } elseif (in_array($statusCode, [401, 402])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors36', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors45', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); throw $obj->toException(); } else { throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -117,113 +117,7 @@ public function createAllowlistIdentifier(?Operations\CreateAllowlistIdentifierR } elseif (in_array($statusCode, [400, 402, 422])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors37', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj->toException(); - } else { - throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); - } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { - throw new \Clerk\Backend\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); - } else { - throw new \Clerk\Backend\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); - } - } - - /** - * Delete identifier from allow-list - * - * Delete an identifier from the instance allow-list - * - * @param string $identifierId - * @return Operations\DeleteAllowlistIdentifierResponse - * @throws \Clerk\Backend\Models\Errors\SDKException - */ - public function deleteAllowlistIdentifier(string $identifierId): Operations\DeleteAllowlistIdentifierResponse - { - $request = new Operations\DeleteAllowlistIdentifierRequest( - identifierId: $identifierId, - ); - $baseUrl = $this->sdkConfiguration->getServerUrl(); - $url = Utils\Utils::generateUrl($baseUrl, '/allowlist_identifiers/{identifier_id}', Operations\DeleteAllowlistIdentifierRequest::class, $request); - $options = ['http_errors' => false]; - $options['headers']['Accept'] = 'application/json'; - $options['headers']['user-agent'] = $this->sdkConfiguration->userAgent; - $httpRequest = new \GuzzleHttp\Psr7\Request('DELETE', $url); - - - $httpResponse = $this->sdkConfiguration->securityClient->send($httpRequest, $options); - $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; - - $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 200) { - if (Utils\Utils::matchContentType($contentType, 'application/json')) { - $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Components\DeletedObject', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - $response = new Operations\DeleteAllowlistIdentifierResponse( - statusCode: $statusCode, - contentType: $contentType, - rawResponse: $httpResponse, - deletedObject: $obj); - - return $response; - } else { - throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); - } - } elseif (in_array($statusCode, [402, 404])) { - if (Utils\Utils::matchContentType($contentType, 'application/json')) { - $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors38', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj->toException(); - } else { - throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); - } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { - throw new \Clerk\Backend\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); - } else { - throw new \Clerk\Backend\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); - } - } - - /** - * List all identifiers on the block-list - * - * Get a list of all identifiers which are not allowed to access an instance - * - * @return Operations\ListBlocklistIdentifiersResponse - * @throws \Clerk\Backend\Models\Errors\SDKException - */ - public function listBlocklistIdentifiers(): Operations\ListBlocklistIdentifiersResponse - { - $baseUrl = $this->sdkConfiguration->getServerUrl(); - $url = Utils\Utils::generateUrl($baseUrl, '/blocklist_identifiers'); - $options = ['http_errors' => false]; - $options['headers']['Accept'] = 'application/json'; - $options['headers']['user-agent'] = $this->sdkConfiguration->userAgent; - $httpRequest = new \GuzzleHttp\Psr7\Request('GET', $url); - - - $httpResponse = $this->sdkConfiguration->securityClient->send($httpRequest, $options); - $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; - - $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 200) { - if (Utils\Utils::matchContentType($contentType, 'application/json')) { - $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Components\BlocklistIdentifiers', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - $response = new Operations\ListBlocklistIdentifiersResponse( - statusCode: $statusCode, - contentType: $contentType, - rawResponse: $httpResponse, - blocklistIdentifiers: $obj); - - return $response; - } else { - throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); - } - } elseif (in_array($statusCode, [401, 402])) { - if (Utils\Utils::matchContentType($contentType, 'application/json')) { - $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors39', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors46', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); throw $obj->toException(); } else { throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -279,7 +173,7 @@ public function createBlocklistIdentifier(?Operations\CreateBlocklistIdentifierR } elseif (in_array($statusCode, [400, 402, 422])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors40', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors49', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); throw $obj->toException(); } else { throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -334,7 +228,7 @@ public function deleteBlocklistIdentifier(string $identifierId): Operations\Dele } elseif (in_array($statusCode, [402, 404])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors41', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors50', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); throw $obj->toException(); } else { throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); diff --git a/src/AllowlistIdentifiers.php b/src/AllowlistIdentifiers.php new file mode 100644 index 0000000..e3a3658 --- /dev/null +++ b/src/AllowlistIdentifiers.php @@ -0,0 +1,80 @@ +sdkConfiguration = $sdkConfig; + } + + /** + * Delete identifier from allow-list + * + * Delete an identifier from the instance allow-list + * + * @param string $identifierId + * @return Operations\DeleteAllowlistIdentifierResponse + * @throws \Clerk\Backend\Models\Errors\SDKException + */ + public function delete(string $identifierId): Operations\DeleteAllowlistIdentifierResponse + { + $request = new Operations\DeleteAllowlistIdentifierRequest( + identifierId: $identifierId, + ); + $baseUrl = $this->sdkConfiguration->getServerUrl(); + $url = Utils\Utils::generateUrl($baseUrl, '/allowlist_identifiers/{identifier_id}', Operations\DeleteAllowlistIdentifierRequest::class, $request); + $options = ['http_errors' => false]; + $options['headers']['Accept'] = 'application/json'; + $options['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('DELETE', $url); + + + $httpResponse = $this->sdkConfiguration->securityClient->send($httpRequest, $options); + $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; + + $statusCode = $httpResponse->getStatusCode(); + if ($statusCode == 200) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $serializer = Utils\JSON::createSerializer(); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Components\DeletedObject', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\DeleteAllowlistIdentifierResponse( + statusCode: $statusCode, + contentType: $contentType, + rawResponse: $httpResponse, + deletedObject: $obj); + + return $response; + } else { + throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (in_array($statusCode, [402, 404])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $serializer = Utils\JSON::createSerializer(); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors47', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + throw new \Clerk\Backend\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } else { + throw new \Clerk\Backend\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } + +} \ No newline at end of file diff --git a/src/BetaFeatures.php b/src/BetaFeatures.php index afeda01..4767856 100644 --- a/src/BetaFeatures.php +++ b/src/BetaFeatures.php @@ -31,7 +31,7 @@ public function __construct(public SDKConfiguration $sdkConfig) * @return Operations\UpdateInstanceAuthConfigResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function updateInstanceAuthConfig(?Operations\UpdateInstanceAuthConfigRequestBody $request = null): Operations\UpdateInstanceAuthConfigResponse + public function updateInstanceSettings(?Operations\UpdateInstanceAuthConfigRequestBody $request = null): Operations\UpdateInstanceAuthConfigResponse { $baseUrl = $this->sdkConfiguration->getServerUrl(); $url = Utils\Utils::generateUrl($baseUrl, '/beta_features/instance_settings'); @@ -66,7 +66,7 @@ public function updateInstanceAuthConfig(?Operations\UpdateInstanceAuthConfigReq } elseif (in_array($statusCode, [402, 422])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors42', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors51', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); throw $obj->toException(); } else { throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -92,7 +92,7 @@ public function updateInstanceAuthConfig(?Operations\UpdateInstanceAuthConfigReq * @throws \Clerk\Backend\Models\Errors\SDKException * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. */ - public function updateProductionInstanceDomain(?Operations\UpdateProductionInstanceDomainRequestBody $request = null): Operations\UpdateProductionInstanceDomainResponse + public function updateDomain(?Operations\UpdateProductionInstanceDomainRequestBody $request = null): Operations\UpdateProductionInstanceDomainResponse { trigger_error('Method '.__METHOD__.' is deprecated', E_USER_DEPRECATED); $baseUrl = $this->sdkConfiguration->getServerUrl(); @@ -120,7 +120,7 @@ public function updateProductionInstanceDomain(?Operations\UpdateProductionInsta } elseif (in_array($statusCode, [400, 422])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors43', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors52', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); throw $obj->toException(); } else { throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -172,7 +172,7 @@ public function changeProductionInstanceDomain(?Operations\ChangeProductionInsta } elseif (in_array($statusCode, [400, 422])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors50', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors60', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); throw $obj->toException(); } else { throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); diff --git a/src/BlocklistIdentifiers.php b/src/BlocklistIdentifiers.php new file mode 100644 index 0000000..8c6b4df --- /dev/null +++ b/src/BlocklistIdentifiers.php @@ -0,0 +1,76 @@ +sdkConfiguration = $sdkConfig; + } + + /** + * List all identifiers on the block-list + * + * Get a list of all identifiers which are not allowed to access an instance + * + * @return Operations\ListBlocklistIdentifiersResponse + * @throws \Clerk\Backend\Models\Errors\SDKException + */ + public function list(): Operations\ListBlocklistIdentifiersResponse + { + $baseUrl = $this->sdkConfiguration->getServerUrl(); + $url = Utils\Utils::generateUrl($baseUrl, '/blocklist_identifiers'); + $options = ['http_errors' => false]; + $options['headers']['Accept'] = 'application/json'; + $options['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('GET', $url); + + + $httpResponse = $this->sdkConfiguration->securityClient->send($httpRequest, $options); + $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; + + $statusCode = $httpResponse->getStatusCode(); + if ($statusCode == 200) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $serializer = Utils\JSON::createSerializer(); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Components\BlocklistIdentifiers', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\ListBlocklistIdentifiersResponse( + statusCode: $statusCode, + contentType: $contentType, + rawResponse: $httpResponse, + blocklistIdentifiers: $obj); + + return $response; + } else { + throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (in_array($statusCode, [401, 402])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $serializer = Utils\JSON::createSerializer(); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors48', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + throw new \Clerk\Backend\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } else { + throw new \Clerk\Backend\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } + +} \ No newline at end of file diff --git a/src/ClerkBackend.php b/src/ClerkBackend.php index 35ab08c..9e78b14 100644 --- a/src/ClerkBackend.php +++ b/src/ClerkBackend.php @@ -39,11 +39,6 @@ class ClerkBackend */ public Miscellaneous $miscellaneous; - /** - * Retrieve the JSON Web Key Set which can be used to verify the token signatures of the instance. - * - * @var Jwks $$jwks - */ public Jwks $jwks; /** @@ -53,18 +48,8 @@ class ClerkBackend */ public Clients $clients; - /** - * A user can be associated with one or more email addresses, which allows them to be contacted via email. - * - * @var EmailAddresses $$emailAddresses - */ public EmailAddresses $emailAddresses; - /** - * A user can be associated with one or more phone numbers, which allows them to be contacted via SMS. - * - * @var PhoneNumbers $$phoneNumbers - */ public PhoneNumbers $phoneNumbers; /** @@ -77,12 +62,11 @@ class ClerkBackend */ public Sessions $sessions; - /** - * Email & SMS templates allow you to customize the theming and wording of emails & SMS messages that are sent by your instance. - * - * @var EmailAndSMSTemplates $$emailAndSMSTemplates - */ - public EmailAndSMSTemplates $emailAndSMSTemplates; + public EmailSMSTemplates $emailSMSTemplates; + + public EmailAndSmsTemplates $emailAndSmsTemplates; + + public Templates $templates; /** * The user object represents a user that has successfully signed up to your application. @@ -98,28 +82,16 @@ class ClerkBackend */ public Invitations $invitations; - /** - * Allow-lists and Block-lists allow you to control who can sign up or sign in - * - * to your application, by restricting access based on the user's email - * address or phone number. - * - * @var AllowListBlockList $$allowListBlockList - */ - public AllowListBlockList $allowListBlockList; + public OrganizationInvitations $organizationInvitations; + + public AllowlistBlocklist $allowlistBlocklist; + + public AllowlistIdentifiers $allowlistIdentifiers; + + public BlocklistIdentifiers $blocklistIdentifiers; - /** - * Modify instance settings that are currently in beta. - * - * @var BetaFeatures $$betaFeatures - */ public BetaFeatures $betaFeatures; - /** - * Allow your users to sign in on behalf of other users. - * - * @var ActorTokens $$actorTokens - */ public ActorTokens $actorTokens; /** @@ -129,11 +101,6 @@ class ClerkBackend */ public Domains $domains; - /** - * Modify the settings of your instance. - * - * @var InstanceSettings $$instanceSettings - */ public InstanceSettings $instanceSettings; /** @@ -143,15 +110,7 @@ class ClerkBackend */ public Webhooks $webhooks; - /** - * JWT Templates allow you to generate custom authentication tokens - * - * tied to authenticated sessions, enabling you to integrate with third-party - * services. - * - * @var JWTTemplates $$jwtTemplates - */ - public JWTTemplates $jwtTemplates; + public JwtTemplates $jwtTemplates; /** * Organizations are used to group members under a common entity and provide shared access to resources. @@ -160,63 +119,26 @@ class ClerkBackend */ public Organizations $organizations; - /** - * Invite users to an organization. - * - * @var OrganizationInvitations $$organizationInvitations - */ - public OrganizationInvitations $organizationInvitations; - - /** - * Manage member roles in an organization. - * - * @var OrganizationMemberships $$organizationMemberships - */ public OrganizationMemberships $organizationMemberships; + public OrganizationDomains $organizationDomains; + + public OrganizationDomain $organizationDomain; + public ProxyChecks $proxyChecks; - /** - * Redirect URLs are whitelisted URLs that facilitate secure authentication flows in native applications (e.g. React Native, Expo). - * - * In these contexts, Clerk ensures that security-critical nonces are passed only to the whitelisted URLs. - * - * @var RedirectURLs $$redirectURLs - */ public RedirectURLs $redirectURLs; - /** - * Sign-in tokens are JWTs that can be used to sign in to an application without specifying any credentials. - * - * A sign-in token can be used at most once and they can be consumed from the Frontend API using the `ticket` strategy. - * - * @var SignInTokens $$signInTokens - */ + public ClerkBackendRedirectUrls $redirectUrls; + public SignInTokens $signInTokens; public SignUps $signUps; - /** - * OAuth applications contain data for clients using Clerk as an OAuth2 identity provider. - * - * @var OAuthApplications $$oAuthApplications - */ - public OAuthApplications $oAuthApplications; + public OauthApplications $oauthApplications; - /** - * A SAML Connection holds configuration data required for facilitating a SAML SSO flow between your - * - * Clerk Instance (SP) and a particular SAML IdP. - * - * @var SAMLConnections $$samlConnections - */ - public SAMLConnections $samlConnections; + public SamlConnections $samlConnections; - /** - * Tokens meant for use by end-to-end test suites in requests to the Frontend API, so as to bypass bot detection measures. - * - * @var TestingTokens $$testingTokens - */ public TestingTokens $testingTokens; /** @@ -241,25 +163,32 @@ public function __construct( $this->emailAddresses = new EmailAddresses($this->sdkConfiguration); $this->phoneNumbers = new PhoneNumbers($this->sdkConfiguration); $this->sessions = new Sessions($this->sdkConfiguration); - $this->emailAndSMSTemplates = new EmailAndSMSTemplates($this->sdkConfiguration); + $this->emailSMSTemplates = new EmailSMSTemplates($this->sdkConfiguration); + $this->emailAndSmsTemplates = new EmailAndSmsTemplates($this->sdkConfiguration); + $this->templates = new Templates($this->sdkConfiguration); $this->users = new Users($this->sdkConfiguration); $this->invitations = new Invitations($this->sdkConfiguration); - $this->allowListBlockList = new AllowListBlockList($this->sdkConfiguration); + $this->organizationInvitations = new OrganizationInvitations($this->sdkConfiguration); + $this->allowlistBlocklist = new AllowlistBlocklist($this->sdkConfiguration); + $this->allowlistIdentifiers = new AllowlistIdentifiers($this->sdkConfiguration); + $this->blocklistIdentifiers = new BlocklistIdentifiers($this->sdkConfiguration); $this->betaFeatures = new BetaFeatures($this->sdkConfiguration); $this->actorTokens = new ActorTokens($this->sdkConfiguration); $this->domains = new Domains($this->sdkConfiguration); $this->instanceSettings = new InstanceSettings($this->sdkConfiguration); $this->webhooks = new Webhooks($this->sdkConfiguration); - $this->jwtTemplates = new JWTTemplates($this->sdkConfiguration); + $this->jwtTemplates = new JwtTemplates($this->sdkConfiguration); $this->organizations = new Organizations($this->sdkConfiguration); - $this->organizationInvitations = new OrganizationInvitations($this->sdkConfiguration); $this->organizationMemberships = new OrganizationMemberships($this->sdkConfiguration); + $this->organizationDomains = new OrganizationDomains($this->sdkConfiguration); + $this->organizationDomain = new OrganizationDomain($this->sdkConfiguration); $this->proxyChecks = new ProxyChecks($this->sdkConfiguration); $this->redirectURLs = new RedirectURLs($this->sdkConfiguration); + $this->redirectUrls = new ClerkBackendRedirectUrls($this->sdkConfiguration); $this->signInTokens = new SignInTokens($this->sdkConfiguration); $this->signUps = new SignUps($this->sdkConfiguration); - $this->oAuthApplications = new OAuthApplications($this->sdkConfiguration); - $this->samlConnections = new SAMLConnections($this->sdkConfiguration); + $this->oauthApplications = new OauthApplications($this->sdkConfiguration); + $this->samlConnections = new SamlConnections($this->sdkConfiguration); $this->testingTokens = new TestingTokens($this->sdkConfiguration); } } \ No newline at end of file diff --git a/src/ClerkBackendRedirectUrls.php b/src/ClerkBackendRedirectUrls.php new file mode 100644 index 0000000..b5a08a8 --- /dev/null +++ b/src/ClerkBackendRedirectUrls.php @@ -0,0 +1,191 @@ +sdkConfiguration = $sdkConfig; + } + + /** + * Create a redirect URL + * + * Create a redirect URL + * + * @param ?Operations\CreateRedirectURLRequestBody $request + * @return Operations\CreateRedirectURLResponse + * @throws \Clerk\Backend\Models\Errors\SDKException + */ + public function create(?Operations\CreateRedirectURLRequestBody $request = null): Operations\CreateRedirectURLResponse + { + $baseUrl = $this->sdkConfiguration->getServerUrl(); + $url = Utils\Utils::generateUrl($baseUrl, '/redirect_urls'); + $options = ['http_errors' => false]; + $body = Utils\Utils::serializeRequestBody($request, 'request', 'json'); + if ($body !== null) { + $options = array_merge_recursive($options, $body); + } + $options['headers']['Accept'] = 'application/json'; + $options['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('POST', $url); + + + $httpResponse = $this->sdkConfiguration->securityClient->send($httpRequest, $options); + $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; + + $statusCode = $httpResponse->getStatusCode(); + if ($statusCode == 200) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $serializer = Utils\JSON::createSerializer(); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Components\RedirectURL', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\CreateRedirectURLResponse( + statusCode: $statusCode, + contentType: $contentType, + rawResponse: $httpResponse, + redirectURL: $obj); + + return $response; + } else { + throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (in_array($statusCode, [400, 422])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $serializer = Utils\JSON::createSerializer(); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors89', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + throw new \Clerk\Backend\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } else { + throw new \Clerk\Backend\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } + + /** + * Retrieve a redirect URL + * + * Retrieve the details of the redirect URL with the given ID + * + * @param string $id + * @return Operations\GetRedirectURLResponse + * @throws \Clerk\Backend\Models\Errors\SDKException + */ + public function get(string $id): Operations\GetRedirectURLResponse + { + $request = new Operations\GetRedirectURLRequest( + id: $id, + ); + $baseUrl = $this->sdkConfiguration->getServerUrl(); + $url = Utils\Utils::generateUrl($baseUrl, '/redirect_urls/{id}', Operations\GetRedirectURLRequest::class, $request); + $options = ['http_errors' => false]; + $options['headers']['Accept'] = 'application/json'; + $options['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('GET', $url); + + + $httpResponse = $this->sdkConfiguration->securityClient->send($httpRequest, $options); + $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; + + $statusCode = $httpResponse->getStatusCode(); + if ($statusCode == 200) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $serializer = Utils\JSON::createSerializer(); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Components\RedirectURL', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\GetRedirectURLResponse( + statusCode: $statusCode, + contentType: $contentType, + rawResponse: $httpResponse, + redirectURL: $obj); + + return $response; + } else { + throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif ($statusCode == 404) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $serializer = Utils\JSON::createSerializer(); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors90', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + throw new \Clerk\Backend\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } else { + throw new \Clerk\Backend\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } + + /** + * Delete a redirect URL + * + * Remove the selected redirect URL from the whitelist of the instance + * + * @param string $id + * @return Operations\DeleteRedirectURLResponse + * @throws \Clerk\Backend\Models\Errors\SDKException + */ + public function delete(string $id): Operations\DeleteRedirectURLResponse + { + $request = new Operations\DeleteRedirectURLRequest( + id: $id, + ); + $baseUrl = $this->sdkConfiguration->getServerUrl(); + $url = Utils\Utils::generateUrl($baseUrl, '/redirect_urls/{id}', Operations\DeleteRedirectURLRequest::class, $request); + $options = ['http_errors' => false]; + $options['headers']['Accept'] = 'application/json'; + $options['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('DELETE', $url); + + + $httpResponse = $this->sdkConfiguration->securityClient->send($httpRequest, $options); + $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; + + $statusCode = $httpResponse->getStatusCode(); + if ($statusCode == 200) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $serializer = Utils\JSON::createSerializer(); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Components\DeletedObject', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\DeleteRedirectURLResponse( + statusCode: $statusCode, + contentType: $contentType, + rawResponse: $httpResponse, + deletedObject: $obj); + + return $response; + } else { + throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif ($statusCode == 404) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $serializer = Utils\JSON::createSerializer(); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors91', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + throw new \Clerk\Backend\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } else { + throw new \Clerk\Backend\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } + +} \ No newline at end of file diff --git a/src/Clients.php b/src/Clients.php index 3f73c9c..b03224d 100644 --- a/src/Clients.php +++ b/src/Clients.php @@ -29,13 +29,13 @@ public function __construct(public SDKConfiguration $sdkConfig) * with the newest clients appearing first. * Warning: the endpoint is being deprecated and will be removed in future versions. * - * @param ?float $limit - * @param ?float $offset + * @param ?int $limit + * @param ?int $offset * @return Operations\GetClientListResponse * @throws \Clerk\Backend\Models\Errors\SDKException * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. */ - public function getClientList(?float $limit = null, ?float $offset = null): Operations\GetClientListResponse + public function list(?int $limit = null, ?int $offset = null): Operations\GetClientListResponse { trigger_error('Method '.__METHOD__.' is deprecated', E_USER_DEPRECATED); $request = new Operations\GetClientListRequest( @@ -93,7 +93,7 @@ public function getClientList(?float $limit = null, ?float $offset = null): Oper * @return Operations\VerifyClientResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function verifyClient(?Operations\VerifyClientRequestBody $request = null): Operations\VerifyClientResponse + public function verify(?Operations\VerifyClientRequestBody $request = null): Operations\VerifyClientResponse { $baseUrl = $this->sdkConfiguration->getServerUrl(); $url = Utils\Utils::generateUrl($baseUrl, '/clients/verify'); @@ -149,7 +149,7 @@ public function verifyClient(?Operations\VerifyClientRequestBody $request = null * @return Operations\GetClientResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function getClient(string $clientId): Operations\GetClientResponse + public function get(string $clientId): Operations\GetClientResponse { $request = new Operations\GetClientRequest( clientId: $clientId, diff --git a/src/Domains.php b/src/Domains.php index db19411..bbd2eaf 100644 --- a/src/Domains.php +++ b/src/Domains.php @@ -31,7 +31,7 @@ public function __construct(public SDKConfiguration $sdkConfig) * @return Operations\ListDomainsResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function listDomains(): Operations\ListDomainsResponse + public function list(): Operations\ListDomainsResponse { $baseUrl = $this->sdkConfiguration->getServerUrl(); $url = Utils\Utils::generateUrl($baseUrl, '/domains'); @@ -79,7 +79,7 @@ public function listDomains(): Operations\ListDomainsResponse * @return Operations\AddDomainResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function addDomain(?Operations\AddDomainRequestBody $request = null): Operations\AddDomainResponse + public function add(?Operations\AddDomainRequestBody $request = null): Operations\AddDomainResponse { $baseUrl = $this->sdkConfiguration->getServerUrl(); $url = Utils\Utils::generateUrl($baseUrl, '/domains'); @@ -114,7 +114,7 @@ public function addDomain(?Operations\AddDomainRequestBody $request = null): Ope } elseif (in_array($statusCode, [400, 402, 422])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors46', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors55', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); throw $obj->toException(); } else { throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -136,7 +136,7 @@ public function addDomain(?Operations\AddDomainRequestBody $request = null): Ope * @return Operations\DeleteDomainResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function deleteDomain(string $domainId): Operations\DeleteDomainResponse + public function delete(string $domainId): Operations\DeleteDomainResponse { $request = new Operations\DeleteDomainRequest( domainId: $domainId, @@ -170,7 +170,7 @@ public function deleteDomain(string $domainId): Operations\DeleteDomainResponse } elseif (in_array($statusCode, [403, 404])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors47', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors56', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); throw $obj->toException(); } else { throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -199,7 +199,7 @@ public function deleteDomain(string $domainId): Operations\DeleteDomainResponse * @return Operations\UpdateDomainResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function updateDomain(Operations\UpdateDomainRequestBody $requestBody, string $domainId): Operations\UpdateDomainResponse + public function update(Operations\UpdateDomainRequestBody $requestBody, string $domainId): Operations\UpdateDomainResponse { $request = new Operations\UpdateDomainRequest( domainId: $domainId, @@ -239,7 +239,7 @@ public function updateDomain(Operations\UpdateDomainRequestBody $requestBody, st } elseif (in_array($statusCode, [400, 404, 422])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors48', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors57', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); throw $obj->toException(); } else { throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); diff --git a/src/EmailAddresses.php b/src/EmailAddresses.php index a490d58..8ce1d3b 100644 --- a/src/EmailAddresses.php +++ b/src/EmailAddresses.php @@ -31,7 +31,7 @@ public function __construct(public SDKConfiguration $sdkConfig) * @return Operations\CreateEmailAddressResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function createEmailAddress(?Operations\CreateEmailAddressRequestBody $request = null): Operations\CreateEmailAddressResponse + public function create(?Operations\CreateEmailAddressRequestBody $request = null): Operations\CreateEmailAddressResponse { $baseUrl = $this->sdkConfiguration->getServerUrl(); $url = Utils\Utils::generateUrl($baseUrl, '/email_addresses'); @@ -87,7 +87,7 @@ public function createEmailAddress(?Operations\CreateEmailAddressRequestBody $re * @return Operations\GetEmailAddressResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function getEmailAddress(string $emailAddressId): Operations\GetEmailAddressResponse + public function get(string $emailAddressId): Operations\GetEmailAddressResponse { $request = new Operations\GetEmailAddressRequest( emailAddressId: $emailAddressId, @@ -142,7 +142,7 @@ public function getEmailAddress(string $emailAddressId): Operations\GetEmailAddr * @return Operations\DeleteEmailAddressResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function deleteEmailAddress(string $emailAddressId): Operations\DeleteEmailAddressResponse + public function delete(string $emailAddressId): Operations\DeleteEmailAddressResponse { $request = new Operations\DeleteEmailAddressRequest( emailAddressId: $emailAddressId, @@ -198,7 +198,7 @@ public function deleteEmailAddress(string $emailAddressId): Operations\DeleteEma * @return Operations\UpdateEmailAddressResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function updateEmailAddress(string $emailAddressId, ?Operations\UpdateEmailAddressRequestBody $requestBody = null): Operations\UpdateEmailAddressResponse + public function update(string $emailAddressId, ?Operations\UpdateEmailAddressRequestBody $requestBody = null): Operations\UpdateEmailAddressResponse { $request = new Operations\UpdateEmailAddressRequest( emailAddressId: $emailAddressId, diff --git a/src/EmailAndSMSTemplates.php b/src/EmailAndSMSTemplates.php index f0db116..be91f03 100644 --- a/src/EmailAndSMSTemplates.php +++ b/src/EmailAndSMSTemplates.php @@ -11,7 +11,7 @@ use Clerk\Backend\Models\Operations; use Speakeasy\Serializer\DeserializationContext; -class EmailAndSMSTemplates +class EmailAndSmsTemplates { private SDKConfiguration $sdkConfiguration; /** @@ -22,123 +22,6 @@ public function __construct(public SDKConfiguration $sdkConfig) $this->sdkConfiguration = $sdkConfig; } - /** - * List all templates - * - * Returns a list of all templates. - * The templates are returned sorted by position. - * - * @param Operations\TemplateType $templateType - * @return Operations\GetTemplateListResponse - * @throws \Clerk\Backend\Models\Errors\SDKException - * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. - */ - public function getTemplateList(Operations\TemplateType $templateType): Operations\GetTemplateListResponse - { - trigger_error('Method '.__METHOD__.' is deprecated', E_USER_DEPRECATED); - $request = new Operations\GetTemplateListRequest( - templateType: $templateType, - ); - $baseUrl = $this->sdkConfiguration->getServerUrl(); - $url = Utils\Utils::generateUrl($baseUrl, '/templates/{template_type}', Operations\GetTemplateListRequest::class, $request); - $options = ['http_errors' => false]; - $options['headers']['Accept'] = 'application/json'; - $options['headers']['user-agent'] = $this->sdkConfiguration->userAgent; - $httpRequest = new \GuzzleHttp\Psr7\Request('GET', $url); - - - $httpResponse = $this->sdkConfiguration->securityClient->send($httpRequest, $options); - $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; - - $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 200) { - if (Utils\Utils::matchContentType($contentType, 'application/json')) { - $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), 'array<\Clerk\Backend\Models\Components\Template>', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - $response = new Operations\GetTemplateListResponse( - statusCode: $statusCode, - contentType: $contentType, - rawResponse: $httpResponse, - templateList: $obj); - - return $response; - } else { - throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); - } - } elseif (in_array($statusCode, [400, 401, 422])) { - if (Utils\Utils::matchContentType($contentType, 'application/json')) { - $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors16', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj->toException(); - } else { - throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); - } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { - throw new \Clerk\Backend\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); - } else { - throw new \Clerk\Backend\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); - } - } - - /** - * Retrieve a template - * - * Returns the details of a template - * - * @param Operations\PathParamTemplateType $templateType - * @param string $slug - * @return Operations\GetTemplateResponse - * @throws \Clerk\Backend\Models\Errors\SDKException - * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. - */ - public function getTemplate(Operations\PathParamTemplateType $templateType, string $slug): Operations\GetTemplateResponse - { - trigger_error('Method '.__METHOD__.' is deprecated', E_USER_DEPRECATED); - $request = new Operations\GetTemplateRequest( - templateType: $templateType, - slug: $slug, - ); - $baseUrl = $this->sdkConfiguration->getServerUrl(); - $url = Utils\Utils::generateUrl($baseUrl, '/templates/{template_type}/{slug}', Operations\GetTemplateRequest::class, $request); - $options = ['http_errors' => false]; - $options['headers']['Accept'] = 'application/json'; - $options['headers']['user-agent'] = $this->sdkConfiguration->userAgent; - $httpRequest = new \GuzzleHttp\Psr7\Request('GET', $url); - - - $httpResponse = $this->sdkConfiguration->securityClient->send($httpRequest, $options); - $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; - - $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 200) { - if (Utils\Utils::matchContentType($contentType, 'application/json')) { - $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Components\Template', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - $response = new Operations\GetTemplateResponse( - statusCode: $statusCode, - contentType: $contentType, - rawResponse: $httpResponse, - template: $obj); - - return $response; - } else { - throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); - } - } elseif (in_array($statusCode, [400, 401, 404])) { - if (Utils\Utils::matchContentType($contentType, 'application/json')) { - $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors17', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj->toException(); - } else { - throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); - } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { - throw new \Clerk\Backend\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); - } else { - throw new \Clerk\Backend\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); - } - } - /** * Update a template for a given type and slug * @@ -151,7 +34,7 @@ public function getTemplate(Operations\PathParamTemplateType $templateType, stri * @throws \Clerk\Backend\Models\Errors\SDKException * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. */ - public function upsertTemplate(Operations\UpsertTemplatePathParamTemplateType $templateType, string $slug, ?Operations\UpsertTemplateRequestBody $requestBody = null): Operations\UpsertTemplateResponse + public function upsert(Operations\UpsertTemplatePathParamTemplateType $templateType, string $slug, ?Operations\UpsertTemplateRequestBody $requestBody = null): Operations\UpsertTemplateResponse { trigger_error('Method '.__METHOD__.' is deprecated', E_USER_DEPRECATED); $request = new Operations\UpsertTemplateRequest( @@ -204,195 +87,4 @@ public function upsertTemplate(Operations\UpsertTemplatePathParamTemplateType $t } } - /** - * Revert a template - * - * Reverts an updated template to its default state - * - * @param Operations\RevertTemplatePathParamTemplateType $templateType - * @param string $slug - * @return Operations\RevertTemplateResponse - * @throws \Clerk\Backend\Models\Errors\SDKException - * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. - */ - public function revertTemplate(Operations\RevertTemplatePathParamTemplateType $templateType, string $slug): Operations\RevertTemplateResponse - { - trigger_error('Method '.__METHOD__.' is deprecated', E_USER_DEPRECATED); - $request = new Operations\RevertTemplateRequest( - templateType: $templateType, - slug: $slug, - ); - $baseUrl = $this->sdkConfiguration->getServerUrl(); - $url = Utils\Utils::generateUrl($baseUrl, '/templates/{template_type}/{slug}/revert', Operations\RevertTemplateRequest::class, $request); - $options = ['http_errors' => false]; - $options['headers']['Accept'] = 'application/json'; - $options['headers']['user-agent'] = $this->sdkConfiguration->userAgent; - $httpRequest = new \GuzzleHttp\Psr7\Request('POST', $url); - - - $httpResponse = $this->sdkConfiguration->securityClient->send($httpRequest, $options); - $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; - - $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 200) { - if (Utils\Utils::matchContentType($contentType, 'application/json')) { - $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Components\Template', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - $response = new Operations\RevertTemplateResponse( - statusCode: $statusCode, - contentType: $contentType, - rawResponse: $httpResponse, - template: $obj); - - return $response; - } else { - throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); - } - } elseif (in_array($statusCode, [400, 401, 402, 404])) { - if (Utils\Utils::matchContentType($contentType, 'application/json')) { - $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors19', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj->toException(); - } else { - throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); - } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { - throw new \Clerk\Backend\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); - } else { - throw new \Clerk\Backend\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); - } - } - - /** - * Preview changes to a template - * - * Returns a preview of a template for a given template_type, slug and body - * - * @param string $templateType - * @param string $slug - * @param ?Operations\PreviewTemplateRequestBody $requestBody - * @return Operations\PreviewTemplateResponse - * @throws \Clerk\Backend\Models\Errors\SDKException - * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. - */ - public function previewTemplate(string $templateType, string $slug, ?Operations\PreviewTemplateRequestBody $requestBody = null): Operations\PreviewTemplateResponse - { - trigger_error('Method '.__METHOD__.' is deprecated', E_USER_DEPRECATED); - $request = new Operations\PreviewTemplateRequest( - templateType: $templateType, - slug: $slug, - requestBody: $requestBody, - ); - $baseUrl = $this->sdkConfiguration->getServerUrl(); - $url = Utils\Utils::generateUrl($baseUrl, '/templates/{template_type}/{slug}/preview', Operations\PreviewTemplateRequest::class, $request); - $options = ['http_errors' => false]; - $body = Utils\Utils::serializeRequestBody($request, 'requestBody', 'json'); - if ($body !== null) { - $options = array_merge_recursive($options, $body); - } - $options['headers']['Accept'] = 'application/json'; - $options['headers']['user-agent'] = $this->sdkConfiguration->userAgent; - $httpRequest = new \GuzzleHttp\Psr7\Request('POST', $url); - - - $httpResponse = $this->sdkConfiguration->securityClient->send($httpRequest, $options); - $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; - - $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 200) { - if (Utils\Utils::matchContentType($contentType, 'application/json')) { - $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Operations\PreviewTemplateResponseBody', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - $response = new Operations\PreviewTemplateResponse( - statusCode: $statusCode, - contentType: $contentType, - rawResponse: $httpResponse, - object: $obj); - - return $response; - } else { - throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); - } - } elseif (in_array($statusCode, [400, 401, 404, 422])) { - if (Utils\Utils::matchContentType($contentType, 'application/json')) { - $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors20', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj->toException(); - } else { - throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); - } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { - throw new \Clerk\Backend\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); - } else { - throw new \Clerk\Backend\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); - } - } - - /** - * Toggle the delivery by Clerk for a template of a given type and slug - * - * Toggles the delivery by Clerk for a template of a given type and slug. - * If disabled, Clerk will not deliver the resulting email or SMS. - * The app developer will need to listen to the `email.created` or `sms.created` webhooks in order to handle delivery themselves. - * - * @param Operations\ToggleTemplateDeliveryPathParamTemplateType $templateType - * @param string $slug - * @param ?Operations\ToggleTemplateDeliveryRequestBody $requestBody - * @return Operations\ToggleTemplateDeliveryResponse - * @throws \Clerk\Backend\Models\Errors\SDKException - * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. - */ - public function toggleTemplateDelivery(Operations\ToggleTemplateDeliveryPathParamTemplateType $templateType, string $slug, ?Operations\ToggleTemplateDeliveryRequestBody $requestBody = null): Operations\ToggleTemplateDeliveryResponse - { - trigger_error('Method '.__METHOD__.' is deprecated', E_USER_DEPRECATED); - $request = new Operations\ToggleTemplateDeliveryRequest( - templateType: $templateType, - slug: $slug, - requestBody: $requestBody, - ); - $baseUrl = $this->sdkConfiguration->getServerUrl(); - $url = Utils\Utils::generateUrl($baseUrl, '/templates/{template_type}/{slug}/toggle_delivery', Operations\ToggleTemplateDeliveryRequest::class, $request); - $options = ['http_errors' => false]; - $body = Utils\Utils::serializeRequestBody($request, 'requestBody', 'json'); - if ($body !== null) { - $options = array_merge_recursive($options, $body); - } - $options['headers']['Accept'] = 'application/json'; - $options['headers']['user-agent'] = $this->sdkConfiguration->userAgent; - $httpRequest = new \GuzzleHttp\Psr7\Request('POST', $url); - - - $httpResponse = $this->sdkConfiguration->securityClient->send($httpRequest, $options); - $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; - - $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 200) { - if (Utils\Utils::matchContentType($contentType, 'application/json')) { - $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Components\Template', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - $response = new Operations\ToggleTemplateDeliveryResponse( - statusCode: $statusCode, - contentType: $contentType, - rawResponse: $httpResponse, - template: $obj); - - return $response; - } else { - throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); - } - } elseif (in_array($statusCode, [400, 401, 404])) { - if (Utils\Utils::matchContentType($contentType, 'application/json')) { - $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors21', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj->toException(); - } else { - throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); - } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { - throw new \Clerk\Backend\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); - } else { - throw new \Clerk\Backend\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); - } - } - } \ No newline at end of file diff --git a/src/EmailSMSTemplates.php b/src/EmailSMSTemplates.php new file mode 100644 index 0000000..ebb71c6 --- /dev/null +++ b/src/EmailSMSTemplates.php @@ -0,0 +1,268 @@ +sdkConfiguration = $sdkConfig; + } + + /** + * List all templates + * + * Returns a list of all templates. + * The templates are returned sorted by position. + * + * @param Operations\TemplateType $templateType + * @return Operations\GetTemplateListResponse + * @throws \Clerk\Backend\Models\Errors\SDKException + * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. + */ + public function list(Operations\TemplateType $templateType): Operations\GetTemplateListResponse + { + trigger_error('Method '.__METHOD__.' is deprecated', E_USER_DEPRECATED); + $request = new Operations\GetTemplateListRequest( + templateType: $templateType, + ); + $baseUrl = $this->sdkConfiguration->getServerUrl(); + $url = Utils\Utils::generateUrl($baseUrl, '/templates/{template_type}', Operations\GetTemplateListRequest::class, $request); + $options = ['http_errors' => false]; + $options['headers']['Accept'] = 'application/json'; + $options['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('GET', $url); + + + $httpResponse = $this->sdkConfiguration->securityClient->send($httpRequest, $options); + $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; + + $statusCode = $httpResponse->getStatusCode(); + if ($statusCode == 200) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $serializer = Utils\JSON::createSerializer(); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), 'array<\Clerk\Backend\Models\Components\Template>', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\GetTemplateListResponse( + statusCode: $statusCode, + contentType: $contentType, + rawResponse: $httpResponse, + templateList: $obj); + + return $response; + } else { + throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (in_array($statusCode, [400, 401, 422])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $serializer = Utils\JSON::createSerializer(); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors16', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + throw new \Clerk\Backend\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } else { + throw new \Clerk\Backend\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } + + /** + * Revert a template + * + * Reverts an updated template to its default state + * + * @param Operations\RevertTemplatePathParamTemplateType $templateType + * @param string $slug + * @return Operations\RevertTemplateResponse + * @throws \Clerk\Backend\Models\Errors\SDKException + * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. + */ + public function revert(Operations\RevertTemplatePathParamTemplateType $templateType, string $slug): Operations\RevertTemplateResponse + { + trigger_error('Method '.__METHOD__.' is deprecated', E_USER_DEPRECATED); + $request = new Operations\RevertTemplateRequest( + templateType: $templateType, + slug: $slug, + ); + $baseUrl = $this->sdkConfiguration->getServerUrl(); + $url = Utils\Utils::generateUrl($baseUrl, '/templates/{template_type}/{slug}/revert', Operations\RevertTemplateRequest::class, $request); + $options = ['http_errors' => false]; + $options['headers']['Accept'] = 'application/json'; + $options['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('POST', $url); + + + $httpResponse = $this->sdkConfiguration->securityClient->send($httpRequest, $options); + $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; + + $statusCode = $httpResponse->getStatusCode(); + if ($statusCode == 200) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $serializer = Utils\JSON::createSerializer(); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Components\Template', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\RevertTemplateResponse( + statusCode: $statusCode, + contentType: $contentType, + rawResponse: $httpResponse, + template: $obj); + + return $response; + } else { + throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (in_array($statusCode, [400, 401, 402, 404])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $serializer = Utils\JSON::createSerializer(); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors19', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + throw new \Clerk\Backend\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } else { + throw new \Clerk\Backend\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } + + /** + * Retrieve a template + * + * Returns the details of a template + * + * @param Operations\PathParamTemplateType $templateType + * @param string $slug + * @return Operations\GetTemplateResponse + * @throws \Clerk\Backend\Models\Errors\SDKException + * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. + */ + public function get(Operations\PathParamTemplateType $templateType, string $slug): Operations\GetTemplateResponse + { + trigger_error('Method '.__METHOD__.' is deprecated', E_USER_DEPRECATED); + $request = new Operations\GetTemplateRequest( + templateType: $templateType, + slug: $slug, + ); + $baseUrl = $this->sdkConfiguration->getServerUrl(); + $url = Utils\Utils::generateUrl($baseUrl, '/templates/{template_type}/{slug}', Operations\GetTemplateRequest::class, $request); + $options = ['http_errors' => false]; + $options['headers']['Accept'] = 'application/json'; + $options['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('GET', $url); + + + $httpResponse = $this->sdkConfiguration->securityClient->send($httpRequest, $options); + $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; + + $statusCode = $httpResponse->getStatusCode(); + if ($statusCode == 200) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $serializer = Utils\JSON::createSerializer(); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Components\Template', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\GetTemplateResponse( + statusCode: $statusCode, + contentType: $contentType, + rawResponse: $httpResponse, + template: $obj); + + return $response; + } else { + throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (in_array($statusCode, [400, 401, 404])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $serializer = Utils\JSON::createSerializer(); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors17', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + throw new \Clerk\Backend\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } else { + throw new \Clerk\Backend\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } + + /** + * Toggle the delivery by Clerk for a template of a given type and slug + * + * Toggles the delivery by Clerk for a template of a given type and slug. + * If disabled, Clerk will not deliver the resulting email or SMS. + * The app developer will need to listen to the `email.created` or `sms.created` webhooks in order to handle delivery themselves. + * + * @param Operations\ToggleTemplateDeliveryPathParamTemplateType $templateType + * @param string $slug + * @param ?Operations\ToggleTemplateDeliveryRequestBody $requestBody + * @return Operations\ToggleTemplateDeliveryResponse + * @throws \Clerk\Backend\Models\Errors\SDKException + * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. + */ + public function toggleTemplateDelivery(Operations\ToggleTemplateDeliveryPathParamTemplateType $templateType, string $slug, ?Operations\ToggleTemplateDeliveryRequestBody $requestBody = null): Operations\ToggleTemplateDeliveryResponse + { + trigger_error('Method '.__METHOD__.' is deprecated', E_USER_DEPRECATED); + $request = new Operations\ToggleTemplateDeliveryRequest( + templateType: $templateType, + slug: $slug, + requestBody: $requestBody, + ); + $baseUrl = $this->sdkConfiguration->getServerUrl(); + $url = Utils\Utils::generateUrl($baseUrl, '/templates/{template_type}/{slug}/toggle_delivery', Operations\ToggleTemplateDeliveryRequest::class, $request); + $options = ['http_errors' => false]; + $body = Utils\Utils::serializeRequestBody($request, 'requestBody', 'json'); + if ($body !== null) { + $options = array_merge_recursive($options, $body); + } + $options['headers']['Accept'] = 'application/json'; + $options['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('POST', $url); + + + $httpResponse = $this->sdkConfiguration->securityClient->send($httpRequest, $options); + $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; + + $statusCode = $httpResponse->getStatusCode(); + if ($statusCode == 200) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $serializer = Utils\JSON::createSerializer(); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Components\Template', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\ToggleTemplateDeliveryResponse( + statusCode: $statusCode, + contentType: $contentType, + rawResponse: $httpResponse, + template: $obj); + + return $response; + } else { + throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (in_array($statusCode, [400, 401, 404])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $serializer = Utils\JSON::createSerializer(); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors21', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + throw new \Clerk\Backend\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } else { + throw new \Clerk\Backend\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } + +} \ No newline at end of file diff --git a/src/InstanceSettings.php b/src/InstanceSettings.php index 942c5de..74f4882 100644 --- a/src/InstanceSettings.php +++ b/src/InstanceSettings.php @@ -31,7 +31,7 @@ public function __construct(public SDKConfiguration $sdkConfig) * @return Operations\UpdateInstanceResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function updateInstance(?Operations\UpdateInstanceRequestBody $request = null): Operations\UpdateInstanceResponse + public function update(?Operations\UpdateInstanceRequestBody $request = null): Operations\UpdateInstanceResponse { $baseUrl = $this->sdkConfiguration->getServerUrl(); $url = Utils\Utils::generateUrl($baseUrl, '/instance'); @@ -58,7 +58,7 @@ public function updateInstance(?Operations\UpdateInstanceRequestBody $request = } elseif ($statusCode == 422) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors49', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors58', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); throw $obj->toException(); } else { throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -79,7 +79,7 @@ public function updateInstance(?Operations\UpdateInstanceRequestBody $request = * @return Operations\UpdateInstanceRestrictionsResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function updateInstanceRestrictions(?Operations\UpdateInstanceRestrictionsRequestBody $request = null): Operations\UpdateInstanceRestrictionsResponse + public function updateRestrictions(?Operations\UpdateInstanceRestrictionsRequestBody $request = null): Operations\UpdateInstanceRestrictionsResponse { $baseUrl = $this->sdkConfiguration->getServerUrl(); $url = Utils\Utils::generateUrl($baseUrl, '/instance/restrictions'); @@ -114,7 +114,7 @@ public function updateInstanceRestrictions(?Operations\UpdateInstanceRestriction } elseif (in_array($statusCode, [402, 422])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors49', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors59', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); throw $obj->toException(); } else { throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -135,7 +135,7 @@ public function updateInstanceRestrictions(?Operations\UpdateInstanceRestriction * @return Operations\UpdateInstanceOrganizationSettingsResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function updateInstanceOrganizationSettings(?Operations\UpdateInstanceOrganizationSettingsRequestBody $request = null): Operations\UpdateInstanceOrganizationSettingsResponse + public function updateOrganizationSettings(?Operations\UpdateInstanceOrganizationSettingsRequestBody $request = null): Operations\UpdateInstanceOrganizationSettingsResponse { $baseUrl = $this->sdkConfiguration->getServerUrl(); $url = Utils\Utils::generateUrl($baseUrl, '/instance/organization_settings'); @@ -170,7 +170,7 @@ public function updateInstanceOrganizationSettings(?Operations\UpdateInstanceOrg } elseif (in_array($statusCode, [402, 404, 422])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors51', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors61', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); throw $obj->toException(); } else { throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); diff --git a/src/Invitations.php b/src/Invitations.php index 8895c9c..7b62969 100644 --- a/src/Invitations.php +++ b/src/Invitations.php @@ -33,7 +33,7 @@ public function __construct(public SDKConfiguration $sdkConfig) * @return Operations\CreateInvitationResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function createInvitation(?Operations\CreateInvitationRequestBody $request = null): Operations\CreateInvitationResponse + public function create(?Operations\CreateInvitationRequestBody $request = null): Operations\CreateInvitationResponse { $baseUrl = $this->sdkConfiguration->getServerUrl(); $url = Utils\Utils::generateUrl($baseUrl, '/invitations'); @@ -68,7 +68,7 @@ public function createInvitation(?Operations\CreateInvitationRequestBody $reques } elseif (in_array($statusCode, [400, 422])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors34', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors42', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); throw $obj->toException(); } else { throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -85,13 +85,13 @@ public function createInvitation(?Operations\CreateInvitationRequestBody $reques * * Returns all non-revoked invitations for your application, sorted by creation date * - * @param ?float $limit - * @param ?float $offset - * @param ?Operations\QueryParamStatus $status + * @param ?int $limit + * @param ?int $offset + * @param ?Operations\ListInvitationsQueryParamStatus $status * @return Operations\ListInvitationsResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function listInvitations(?float $limit = null, ?float $offset = null, ?Operations\QueryParamStatus $status = null): Operations\ListInvitationsResponse + public function list(?int $limit = null, ?int $offset = null, ?Operations\ListInvitationsQueryParamStatus $status = null): Operations\ListInvitationsResponse { $request = new Operations\ListInvitationsRequest( limit: $limit, @@ -144,7 +144,7 @@ public function listInvitations(?float $limit = null, ?float $offset = null, ?Op * @return Operations\RevokeInvitationResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function revokeInvitation(string $invitationId): Operations\RevokeInvitationResponse + public function revoke(string $invitationId): Operations\RevokeInvitationResponse { $request = new Operations\RevokeInvitationRequest( invitationId: $invitationId, @@ -178,7 +178,7 @@ public function revokeInvitation(string $invitationId): Operations\RevokeInvitat } elseif (in_array($statusCode, [400, 404])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors35', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors43', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); throw $obj->toException(); } else { throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); diff --git a/src/JWTTemplates.php b/src/JWTTemplates.php index 1400d70..ae1b909 100644 --- a/src/JWTTemplates.php +++ b/src/JWTTemplates.php @@ -11,7 +11,7 @@ use Clerk\Backend\Models\Operations; use Speakeasy\Serializer\DeserializationContext; -class JWTTemplates +class JwtTemplates { private SDKConfiguration $sdkConfiguration; /** @@ -28,7 +28,7 @@ public function __construct(public SDKConfiguration $sdkConfig) * @return Operations\ListJWTTemplatesResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function listJWTTemplates(): Operations\ListJWTTemplatesResponse + public function list(): Operations\ListJWTTemplatesResponse { $baseUrl = $this->sdkConfiguration->getServerUrl(); $url = Utils\Utils::generateUrl($baseUrl, '/jwt_templates'); @@ -72,7 +72,7 @@ public function listJWTTemplates(): Operations\ListJWTTemplatesResponse * @return Operations\CreateJWTTemplateResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function createJWTTemplate(?Operations\CreateJWTTemplateRequestBody $request = null): Operations\CreateJWTTemplateResponse + public function create(?Operations\CreateJWTTemplateRequestBody $request = null): Operations\CreateJWTTemplateResponse { $baseUrl = $this->sdkConfiguration->getServerUrl(); $url = Utils\Utils::generateUrl($baseUrl, '/jwt_templates'); @@ -107,7 +107,7 @@ public function createJWTTemplate(?Operations\CreateJWTTemplateRequestBody $requ } elseif (in_array($statusCode, [400, 402, 422])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors53', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors63', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); throw $obj->toException(); } else { throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -128,7 +128,7 @@ public function createJWTTemplate(?Operations\CreateJWTTemplateRequestBody $requ * @return Operations\GetJWTTemplateResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function getJWTTemplate(string $templateId): Operations\GetJWTTemplateResponse + public function get(string $templateId): Operations\GetJWTTemplateResponse { $request = new Operations\GetJWTTemplateRequest( templateId: $templateId, @@ -162,7 +162,7 @@ public function getJWTTemplate(string $templateId): Operations\GetJWTTemplateRes } elseif ($statusCode == 404) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors54', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors64', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); throw $obj->toException(); } else { throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -184,7 +184,7 @@ public function getJWTTemplate(string $templateId): Operations\GetJWTTemplateRes * @return Operations\UpdateJWTTemplateResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function updateJWTTemplate(string $templateId, ?Operations\UpdateJWTTemplateRequestBody $requestBody = null): Operations\UpdateJWTTemplateResponse + public function update(string $templateId, ?Operations\UpdateJWTTemplateRequestBody $requestBody = null): Operations\UpdateJWTTemplateResponse { $request = new Operations\UpdateJWTTemplateRequest( templateId: $templateId, @@ -223,7 +223,7 @@ public function updateJWTTemplate(string $templateId, ?Operations\UpdateJWTTempl } elseif (in_array($statusCode, [400, 402, 422])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors55', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors65', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); throw $obj->toException(); } else { throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -242,7 +242,7 @@ public function updateJWTTemplate(string $templateId, ?Operations\UpdateJWTTempl * @return Operations\DeleteJWTTemplateResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function deleteJWTTemplate(string $templateId): Operations\DeleteJWTTemplateResponse + public function delete(string $templateId): Operations\DeleteJWTTemplateResponse { $request = new Operations\DeleteJWTTemplateRequest( templateId: $templateId, @@ -276,7 +276,7 @@ public function deleteJWTTemplate(string $templateId): Operations\DeleteJWTTempl } elseif (in_array($statusCode, [403, 404])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors56', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors66', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); throw $obj->toException(); } else { throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); diff --git a/src/Jwks.php b/src/Jwks.php index c6a0e22..d1b8e0e 100644 --- a/src/Jwks.php +++ b/src/Jwks.php @@ -9,6 +9,7 @@ namespace Clerk\Backend; use Clerk\Backend\Models\Operations; +use Speakeasy\Serializer\DeserializationContext; class Jwks { @@ -29,12 +30,12 @@ public function __construct(public SDKConfiguration $sdkConfig) * @return Operations\GetJWKSResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function getJWKS(): Operations\GetJWKSResponse + public function get(): Operations\GetJWKSResponse { $baseUrl = $this->sdkConfiguration->getServerUrl(); $url = Utils\Utils::generateUrl($baseUrl, '/jwks'); $options = ['http_errors' => false]; - $options['headers']['Accept'] = '*/*'; + $options['headers']['Accept'] = 'application/json'; $options['headers']['user-agent'] = $this->sdkConfiguration->userAgent; $httpRequest = new \GuzzleHttp\Psr7\Request('GET', $url); @@ -44,11 +45,19 @@ public function getJWKS(): Operations\GetJWKSResponse $statusCode = $httpResponse->getStatusCode(); if ($statusCode == 200) { - return new Operations\GetJWKSResponse( - statusCode: $statusCode, - contentType: $contentType, - rawResponse: $httpResponse - ); + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $serializer = Utils\JSON::createSerializer(); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Components\WellKnownJWKS', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\GetJWKSResponse( + statusCode: $statusCode, + contentType: $contentType, + rawResponse: $httpResponse, + wellKnownJWKS: $obj); + + return $response; + } else { + throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { throw new \Clerk\Backend\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); } else { diff --git a/src/Miscellaneous.php b/src/Miscellaneous.php index f847edd..367769a 100644 --- a/src/Miscellaneous.php +++ b/src/Miscellaneous.php @@ -32,7 +32,7 @@ public function __construct(public SDKConfiguration $sdkConfig) * @return Operations\GetPublicInterstitialResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function getPublicInterstitial(?string $frontendApi = null, ?string $publishableKey = null): Operations\GetPublicInterstitialResponse + public function getInterstitial(?string $frontendApi = null, ?string $publishableKey = null): Operations\GetPublicInterstitialResponse { $request = new Operations\GetPublicInterstitialRequest( frontendApi: $frontendApi, diff --git a/src/Models/Components/EnrollmentMode.php b/src/Models/Components/EnrollmentMode.php new file mode 100644 index 0000000..ab4e658 --- /dev/null +++ b/src/Models/Components/EnrollmentMode.php @@ -0,0 +1,18 @@ + $publicMetadata */ #[\Speakeasy\Serializer\Annotation\SerializedName('public_metadata')] - #[\Speakeasy\Serializer\Annotation\Type('\Clerk\Backend\Models\Components\InvitationPublicMetadata|null')] + #[\Speakeasy\Serializer\Annotation\Type('array|null')] #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?InvitationPublicMetadata $publicMetadata = null; + public ?array $publicMetadata = null; /** * @@ -67,6 +68,17 @@ class Invitation #[\Speakeasy\Serializer\Annotation\SkipWhenNull] public ?string $url = null; + /** + * Unix timestamp of expiration. + * + * + * + * @var ?int $expiresAt + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('expires_at')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?int $expiresAt = null; + /** * Unix timestamp of creation. * @@ -94,11 +106,12 @@ class Invitation * @param InvitationStatus $status * @param int $createdAt * @param int $updatedAt - * @param ?InvitationPublicMetadata $publicMetadata + * @param ?array $publicMetadata * @param ?bool $revoked * @param ?string $url + * @param ?int $expiresAt */ - public function __construct(InvitationObject $object, string $id, string $emailAddress, InvitationStatus $status, int $createdAt, int $updatedAt, ?InvitationPublicMetadata $publicMetadata = null, ?bool $revoked = null, ?string $url = null) + public function __construct(InvitationObject $object, string $id, string $emailAddress, InvitationStatus $status, int $createdAt, int $updatedAt, ?array $publicMetadata = null, ?bool $revoked = null, ?string $url = null, ?int $expiresAt = null) { $this->object = $object; $this->id = $id; @@ -109,5 +122,6 @@ public function __construct(InvitationObject $object, string $id, string $emailA $this->publicMetadata = $publicMetadata; $this->revoked = $revoked; $this->url = $url; + $this->expiresAt = $expiresAt; } } \ No newline at end of file diff --git a/src/Models/Components/InvitationPublicMetadata.php b/src/Models/Components/InvitationPublicMetadata.php deleted file mode 100644 index 0515423..0000000 --- a/src/Models/Components/InvitationPublicMetadata.php +++ /dev/null @@ -1,18 +0,0 @@ - $publicMetadata */ #[\Speakeasy\Serializer\Annotation\SerializedName('public_metadata')] - #[\Speakeasy\Serializer\Annotation\Type('\Clerk\Backend\Models\Components\InvitationRevokedPublicMetadata|null')] + #[\Speakeasy\Serializer\Annotation\Type('array|null')] #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?InvitationRevokedPublicMetadata $publicMetadata = null; + public ?array $publicMetadata = null; /** * @@ -67,6 +68,17 @@ class InvitationRevoked #[\Speakeasy\Serializer\Annotation\SkipWhenNull] public ?string $url = null; + /** + * Unix timestamp of expiration. + * + * + * + * @var ?int $expiresAt + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('expires_at')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?int $expiresAt = null; + /** * Unix timestamp of creation. * @@ -94,11 +106,12 @@ class InvitationRevoked * @param InvitationRevokedStatus $status * @param int $createdAt * @param int $updatedAt - * @param ?InvitationRevokedPublicMetadata $publicMetadata + * @param ?array $publicMetadata * @param ?bool $revoked * @param ?string $url + * @param ?int $expiresAt */ - public function __construct(InvitationRevokedObject $object, string $id, string $emailAddress, InvitationRevokedStatus $status, int $createdAt, int $updatedAt, ?InvitationRevokedPublicMetadata $publicMetadata = null, ?bool $revoked = null, ?string $url = null) + public function __construct(InvitationRevokedObject $object, string $id, string $emailAddress, InvitationRevokedStatus $status, int $createdAt, int $updatedAt, ?array $publicMetadata = null, ?bool $revoked = null, ?string $url = null, ?int $expiresAt = null) { $this->object = $object; $this->id = $id; @@ -109,5 +122,6 @@ public function __construct(InvitationRevokedObject $object, string $id, string $this->publicMetadata = $publicMetadata; $this->revoked = $revoked; $this->url = $url; + $this->expiresAt = $expiresAt; } } \ No newline at end of file diff --git a/src/Models/Components/InvitationRevokedPublicMetadata.php b/src/Models/Components/InvitationRevokedPublicMetadata.php deleted file mode 100644 index f75435f..0000000 --- a/src/Models/Components/InvitationRevokedPublicMetadata.php +++ /dev/null @@ -1,18 +0,0 @@ -use = $use; + $this->kty = $kty; + $this->kid = $kid; + $this->alg = $alg; + $this->n = $n; + $this->e = $e; + } +} \ No newline at end of file diff --git a/src/Models/Components/LatestActivity.php b/src/Models/Components/LatestActivity.php new file mode 100644 index 0000000..355754f --- /dev/null +++ b/src/Models/Components/LatestActivity.php @@ -0,0 +1,107 @@ +object = $object; + $this->id = $id; + $this->deviceType = $deviceType; + $this->isMobile = $isMobile; + $this->browserName = $browserName; + $this->browserVersion = $browserVersion; + $this->ipAddress = $ipAddress; + $this->city = $city; + $this->country = $country; + } +} \ No newline at end of file diff --git a/src/Models/Components/OTPVerificationStrategy.php b/src/Models/Components/OTPVerificationStrategy.php index 813c3df..43f3c07 100644 --- a/src/Models/Components/OTPVerificationStrategy.php +++ b/src/Models/Components/OTPVerificationStrategy.php @@ -13,5 +13,11 @@ enum OTPVerificationStrategy: string { case PhoneCode = 'phone_code'; case EmailCode = 'email_code'; + case EmailLink = 'email_link'; case ResetPasswordEmailCode = 'reset_password_email_code'; + case FromOauthDiscord = 'from_oauth_discord'; + case FromOauthGoogle = 'from_oauth_google'; + case FromOauthApple = 'from_oauth_apple'; + case FromOauthMicrosoft = 'from_oauth_microsoft'; + case FromOauthGithub = 'from_oauth_github'; } diff --git a/src/Models/Components/OauthVerificationStrategy.php b/src/Models/Components/OauthVerificationStrategy.php index 616a425..3ad30ab 100644 --- a/src/Models/Components/OauthVerificationStrategy.php +++ b/src/Models/Components/OauthVerificationStrategy.php @@ -13,5 +13,11 @@ enum OauthVerificationStrategy: string { case OauthGoogle = 'oauth_google'; case OauthMock = 'oauth_mock'; - case OauthCustomMock = 'oauth_custom_mock'; + case FromOauthGoogle = 'from_oauth_google'; + case FromOauthDiscord = 'from_oauth_discord'; + case FromOauthMicrosoft = 'from_oauth_microsoft'; + case OauthApple = 'oauth_apple'; + case OauthMicrosoft = 'oauth_microsoft'; + case OauthGithub = 'oauth_github'; + case EmailLink = 'email_link'; } diff --git a/src/Models/Components/Organization.php b/src/Models/Components/Organization.php index b77cadc..c77ed25 100644 --- a/src/Models/Components/Organization.php +++ b/src/Models/Components/Organization.php @@ -64,20 +64,22 @@ class Organization public ?bool $adminDeleteEnabled = null; /** + * $publicMetadata * - * @var OrganizationPublicMetadata $publicMetadata + * @var array $publicMetadata */ #[\Speakeasy\Serializer\Annotation\SerializedName('public_metadata')] - #[\Speakeasy\Serializer\Annotation\Type('\Clerk\Backend\Models\Components\OrganizationPublicMetadata')] - public OrganizationPublicMetadata $publicMetadata; + #[\Speakeasy\Serializer\Annotation\Type('array')] + public array $publicMetadata; /** + * $privateMetadata * - * @var OrganizationPrivateMetadata $privateMetadata + * @var array $privateMetadata */ #[\Speakeasy\Serializer\Annotation\SerializedName('private_metadata')] - #[\Speakeasy\Serializer\Annotation\Type('\Clerk\Backend\Models\Components\OrganizationPrivateMetadata')] - public OrganizationPrivateMetadata $privateMetadata; + #[\Speakeasy\Serializer\Annotation\Type('array')] + public array $privateMetadata; /** * @@ -113,15 +115,15 @@ class Organization * @param string $name * @param string $slug * @param int $maxAllowedMemberships - * @param OrganizationPublicMetadata $publicMetadata - * @param OrganizationPrivateMetadata $privateMetadata + * @param array $publicMetadata + * @param array $privateMetadata * @param int $createdAt * @param int $updatedAt * @param ?bool $adminDeleteEnabled * @param ?string $createdBy * @param ?int $membersCount */ - public function __construct(OrganizationObject $object, string $id, string $name, string $slug, int $maxAllowedMemberships, OrganizationPublicMetadata $publicMetadata, OrganizationPrivateMetadata $privateMetadata, int $createdAt, int $updatedAt, ?bool $adminDeleteEnabled = null, ?string $createdBy = null, ?int $membersCount = null) + public function __construct(OrganizationObject $object, string $id, string $name, string $slug, int $maxAllowedMemberships, array $publicMetadata, array $privateMetadata, int $createdAt, int $updatedAt, ?bool $adminDeleteEnabled = null, ?string $createdBy = null, ?int $membersCount = null) { $this->object = $object; $this->id = $id; diff --git a/src/Models/Components/OrganizationDomain.php b/src/Models/Components/OrganizationDomain.php new file mode 100644 index 0000000..645e480 --- /dev/null +++ b/src/Models/Components/OrganizationDomain.php @@ -0,0 +1,146 @@ +id = $id; + $this->object = $object; + $this->organizationId = $organizationId; + $this->name = $name; + $this->enrollmentMode = $enrollmentMode; + $this->totalPendingInvitations = $totalPendingInvitations; + $this->totalPendingSuggestions = $totalPendingSuggestions; + $this->createdAt = $createdAt; + $this->updatedAt = $updatedAt; + $this->affiliationEmailAddress = $affiliationEmailAddress; + $this->verification = $verification; + } +} \ No newline at end of file diff --git a/src/Models/Components/OrganizationDomainObject.php b/src/Models/Components/OrganizationDomainObject.php new file mode 100644 index 0000000..9f8693f --- /dev/null +++ b/src/Models/Components/OrganizationDomainObject.php @@ -0,0 +1,20 @@ +status = $status; + $this->strategy = $strategy; + $this->attempts = $attempts; + $this->expireAt = $expireAt; + } +} \ No newline at end of file diff --git a/src/Models/Components/OrganizationDomains.php b/src/Models/Components/OrganizationDomains.php new file mode 100644 index 0000000..e7d2e81 --- /dev/null +++ b/src/Models/Components/OrganizationDomains.php @@ -0,0 +1,43 @@ + $data + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('data')] + #[\Speakeasy\Serializer\Annotation\Type('array<\Clerk\Backend\Models\Components\OrganizationDomain>')] + public array $data; + + /** + * Total number of organization domains + * + * + * + * @var int $totalCount + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('total_count')] + public int $totalCount; + + /** + * @param array $data + * @param int $totalCount + */ + public function __construct(array $data, int $totalCount) + { + $this->data = $data; + $this->totalCount = $totalCount; + } +} \ No newline at end of file diff --git a/src/Models/Components/OrganizationInvitation.php b/src/Models/Components/OrganizationInvitation.php index a20f2f9..22438b3 100644 --- a/src/Models/Components/OrganizationInvitation.php +++ b/src/Models/Components/OrganizationInvitation.php @@ -48,6 +48,14 @@ class OrganizationInvitation #[\Speakeasy\Serializer\Annotation\SkipWhenNull] public ?string $role = null; + /** + * + * @var ?string $roleName + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('role_name')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?string $roleName = null; + /** * * @var ?string $organizationId @@ -65,22 +73,24 @@ class OrganizationInvitation public ?string $status = null; /** + * $publicMetadata * - * @var ?OrganizationInvitationPublicMetadata $publicMetadata + * @var ?array $publicMetadata */ #[\Speakeasy\Serializer\Annotation\SerializedName('public_metadata')] - #[\Speakeasy\Serializer\Annotation\Type('\Clerk\Backend\Models\Components\OrganizationInvitationPublicMetadata|null')] + #[\Speakeasy\Serializer\Annotation\Type('array|null')] #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?OrganizationInvitationPublicMetadata $publicMetadata = null; + public ?array $publicMetadata = null; /** + * $privateMetadata * - * @var ?OrganizationInvitationPrivateMetadata $privateMetadata + * @var ?array $privateMetadata */ #[\Speakeasy\Serializer\Annotation\SerializedName('private_metadata')] - #[\Speakeasy\Serializer\Annotation\Type('\Clerk\Backend\Models\Components\OrganizationInvitationPrivateMetadata|null')] + #[\Speakeasy\Serializer\Annotation\Type('array|null')] #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?OrganizationInvitationPrivateMetadata $privateMetadata = null; + public ?array $privateMetadata = null; /** * Unix timestamp of creation. @@ -105,19 +115,21 @@ class OrganizationInvitation * @param ?OrganizationInvitationObject $object * @param ?string $emailAddress * @param ?string $role + * @param ?string $roleName * @param ?string $organizationId * @param ?string $status - * @param ?OrganizationInvitationPublicMetadata $publicMetadata - * @param ?OrganizationInvitationPrivateMetadata $privateMetadata + * @param ?array $publicMetadata + * @param ?array $privateMetadata * @param ?int $createdAt * @param ?int $updatedAt */ - public function __construct(?string $id = null, ?OrganizationInvitationObject $object = null, ?string $emailAddress = null, ?string $role = null, ?string $organizationId = null, ?string $status = null, ?OrganizationInvitationPublicMetadata $publicMetadata = null, ?OrganizationInvitationPrivateMetadata $privateMetadata = null, ?int $createdAt = null, ?int $updatedAt = null) + public function __construct(?string $id = null, ?OrganizationInvitationObject $object = null, ?string $emailAddress = null, ?string $role = null, ?string $roleName = null, ?string $organizationId = null, ?string $status = null, ?array $publicMetadata = null, ?array $privateMetadata = null, ?int $createdAt = null, ?int $updatedAt = null) { $this->id = $id; $this->object = $object; $this->emailAddress = $emailAddress; $this->role = $role; + $this->roleName = $roleName; $this->organizationId = $organizationId; $this->status = $status; $this->publicMetadata = $publicMetadata; diff --git a/src/Models/Components/OrganizationInvitationPrivateMetadata.php b/src/Models/Components/OrganizationInvitationPrivateMetadata.php deleted file mode 100644 index 6249032..0000000 --- a/src/Models/Components/OrganizationInvitationPrivateMetadata.php +++ /dev/null @@ -1,18 +0,0 @@ - $publicMetadata + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('public_metadata')] + #[\Speakeasy\Serializer\Annotation\Type('array|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?array $publicMetadata = null; + + /** + * $privateMetadata + * + * @var ?array $privateMetadata + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('private_metadata')] + #[\Speakeasy\Serializer\Annotation\Type('array|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?array $privateMetadata = null; + + /** + * + * @var ?PublicOrganizationData $publicOrganizationData + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('public_organization_data')] + #[\Speakeasy\Serializer\Annotation\Type('\Clerk\Backend\Models\Components\PublicOrganizationData|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?PublicOrganizationData $publicOrganizationData = null; + + /** + * Unix timestamp of creation. + * + * @var ?int $createdAt + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('created_at')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?int $createdAt = null; + + /** + * Unix timestamp of last update. + * + * @var ?int $updatedAt + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('updated_at')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?int $updatedAt = null; + + /** + * @param ?string $id + * @param ?OrganizationInvitationWithPublicOrganizationDataObject $object + * @param ?string $emailAddress + * @param ?string $role + * @param ?string $roleName + * @param ?string $organizationId + * @param ?string $status + * @param ?array $publicMetadata + * @param ?array $privateMetadata + * @param ?PublicOrganizationData $publicOrganizationData + * @param ?int $createdAt + * @param ?int $updatedAt + */ + public function __construct(?string $id = null, ?OrganizationInvitationWithPublicOrganizationDataObject $object = null, ?string $emailAddress = null, ?string $role = null, ?string $roleName = null, ?string $organizationId = null, ?string $status = null, ?array $publicMetadata = null, ?array $privateMetadata = null, ?PublicOrganizationData $publicOrganizationData = null, ?int $createdAt = null, ?int $updatedAt = null) + { + $this->id = $id; + $this->object = $object; + $this->emailAddress = $emailAddress; + $this->role = $role; + $this->roleName = $roleName; + $this->organizationId = $organizationId; + $this->status = $status; + $this->publicMetadata = $publicMetadata; + $this->privateMetadata = $privateMetadata; + $this->publicOrganizationData = $publicOrganizationData; + $this->createdAt = $createdAt; + $this->updatedAt = $updatedAt; + } +} \ No newline at end of file diff --git a/src/Models/Components/OrganizationInvitationWithPublicOrganizationDataObject.php b/src/Models/Components/OrganizationInvitationWithPublicOrganizationDataObject.php new file mode 100644 index 0000000..1c1e240 --- /dev/null +++ b/src/Models/Components/OrganizationInvitationWithPublicOrganizationDataObject.php @@ -0,0 +1,20 @@ + $data + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('data')] + #[\Speakeasy\Serializer\Annotation\Type('array<\Clerk\Backend\Models\Components\OrganizationInvitationWithPublicOrganizationData>')] + public array $data; + + /** + * Total number of organization invitations + * + * + * + * @var int $totalCount + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('total_count')] + public int $totalCount; + + /** + * @param array $data + * @param int $totalCount + */ + public function __construct(array $data, int $totalCount) + { + $this->data = $data; + $this->totalCount = $totalCount; + } +} \ No newline at end of file diff --git a/src/Models/Components/OrganizationMembership.php b/src/Models/Components/OrganizationMembership.php index ddfa3b9..ef32a3e 100644 --- a/src/Models/Components/OrganizationMembership.php +++ b/src/Models/Components/OrganizationMembership.php @@ -40,6 +40,14 @@ class OrganizationMembership #[\Speakeasy\Serializer\Annotation\SkipWhenNull] public ?string $role = null; + /** + * + * @var ?string $roleName + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('role_name')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?string $roleName = null; + /** * $permissions * @@ -53,22 +61,22 @@ class OrganizationMembership /** * Metadata saved on the organization membership, accessible from both Frontend and Backend APIs * - * @var ?OrganizationMembershipPublicMetadata $publicMetadata + * @var ?array $publicMetadata */ #[\Speakeasy\Serializer\Annotation\SerializedName('public_metadata')] - #[\Speakeasy\Serializer\Annotation\Type('\Clerk\Backend\Models\Components\OrganizationMembershipPublicMetadata|null')] + #[\Speakeasy\Serializer\Annotation\Type('array|null')] #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?OrganizationMembershipPublicMetadata $publicMetadata = null; + public ?array $publicMetadata = null; /** * Metadata saved on the organization membership, accessible only from the Backend API * - * @var ?OrganizationMembershipPrivateMetadata $privateMetadata + * @var ?array $privateMetadata */ #[\Speakeasy\Serializer\Annotation\SerializedName('private_metadata')] - #[\Speakeasy\Serializer\Annotation\Type('\Clerk\Backend\Models\Components\OrganizationMembershipPrivateMetadata|null')] + #[\Speakeasy\Serializer\Annotation\Type('array|null')] #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?OrganizationMembershipPrivateMetadata $privateMetadata = null; + public ?array $privateMetadata = null; /** * @@ -110,19 +118,21 @@ class OrganizationMembership * @param ?string $id * @param ?OrganizationMembershipObject $object * @param ?string $role + * @param ?string $roleName * @param ?array $permissions - * @param ?OrganizationMembershipPublicMetadata $publicMetadata - * @param ?OrganizationMembershipPrivateMetadata $privateMetadata + * @param ?array $publicMetadata + * @param ?array $privateMetadata * @param ?OrganizationMembershipOrganization $organization * @param ?PublicUserData $publicUserData * @param ?int $createdAt * @param ?int $updatedAt */ - public function __construct(?string $id = null, ?OrganizationMembershipObject $object = null, ?string $role = null, ?array $permissions = null, ?OrganizationMembershipPublicMetadata $publicMetadata = null, ?OrganizationMembershipPrivateMetadata $privateMetadata = null, ?OrganizationMembershipOrganization $organization = null, ?PublicUserData $publicUserData = null, ?int $createdAt = null, ?int $updatedAt = null) + public function __construct(?string $id = null, ?OrganizationMembershipObject $object = null, ?string $role = null, ?string $roleName = null, ?array $permissions = null, ?array $publicMetadata = null, ?array $privateMetadata = null, ?OrganizationMembershipOrganization $organization = null, ?PublicUserData $publicUserData = null, ?int $createdAt = null, ?int $updatedAt = null) { $this->id = $id; $this->object = $object; $this->role = $role; + $this->roleName = $roleName; $this->permissions = $permissions; $this->publicMetadata = $publicMetadata; $this->privateMetadata = $privateMetadata; diff --git a/src/Models/Components/OrganizationMembershipOrganization.php b/src/Models/Components/OrganizationMembershipOrganization.php index dfde97d..6f7cc03 100644 --- a/src/Models/Components/OrganizationMembershipOrganization.php +++ b/src/Models/Components/OrganizationMembershipOrganization.php @@ -64,20 +64,22 @@ class OrganizationMembershipOrganization public ?bool $adminDeleteEnabled = null; /** + * $publicMetadata * - * @var OrganizationMembershipOrganizationPublicMetadata $publicMetadata + * @var array $publicMetadata */ #[\Speakeasy\Serializer\Annotation\SerializedName('public_metadata')] - #[\Speakeasy\Serializer\Annotation\Type('\Clerk\Backend\Models\Components\OrganizationMembershipOrganizationPublicMetadata')] - public OrganizationMembershipOrganizationPublicMetadata $publicMetadata; + #[\Speakeasy\Serializer\Annotation\Type('array')] + public array $publicMetadata; /** + * $privateMetadata * - * @var OrganizationMembershipOrganizationPrivateMetadata $privateMetadata + * @var array $privateMetadata */ #[\Speakeasy\Serializer\Annotation\SerializedName('private_metadata')] - #[\Speakeasy\Serializer\Annotation\Type('\Clerk\Backend\Models\Components\OrganizationMembershipOrganizationPrivateMetadata')] - public OrganizationMembershipOrganizationPrivateMetadata $privateMetadata; + #[\Speakeasy\Serializer\Annotation\Type('array')] + public array $privateMetadata; /** * @@ -113,15 +115,15 @@ class OrganizationMembershipOrganization * @param string $name * @param string $slug * @param int $maxAllowedMemberships - * @param OrganizationMembershipOrganizationPublicMetadata $publicMetadata - * @param OrganizationMembershipOrganizationPrivateMetadata $privateMetadata + * @param array $publicMetadata + * @param array $privateMetadata * @param int $createdAt * @param int $updatedAt * @param ?bool $adminDeleteEnabled * @param ?string $createdBy * @param ?int $membersCount */ - public function __construct(OrganizationMembershipOrganizationObject $object, string $id, string $name, string $slug, int $maxAllowedMemberships, OrganizationMembershipOrganizationPublicMetadata $publicMetadata, OrganizationMembershipOrganizationPrivateMetadata $privateMetadata, int $createdAt, int $updatedAt, ?bool $adminDeleteEnabled = null, ?string $createdBy = null, ?int $membersCount = null) + public function __construct(OrganizationMembershipOrganizationObject $object, string $id, string $name, string $slug, int $maxAllowedMemberships, array $publicMetadata, array $privateMetadata, int $createdAt, int $updatedAt, ?bool $adminDeleteEnabled = null, ?string $createdBy = null, ?int $membersCount = null) { $this->object = $object; $this->id = $id; diff --git a/src/Models/Components/OrganizationMembershipOrganizationPrivateMetadata.php b/src/Models/Components/OrganizationMembershipOrganizationPrivateMetadata.php deleted file mode 100644 index 55d1801..0000000 --- a/src/Models/Components/OrganizationMembershipOrganizationPrivateMetadata.php +++ /dev/null @@ -1,18 +0,0 @@ - $publicMetadata */ #[\Speakeasy\Serializer\Annotation\SerializedName('public_metadata')] - #[\Speakeasy\Serializer\Annotation\Type('\Clerk\Backend\Models\Components\OrganizationWithLogoPublicMetadata')] - public OrganizationWithLogoPublicMetadata $publicMetadata; + #[\Speakeasy\Serializer\Annotation\Type('array')] + public array $publicMetadata; /** + * $privateMetadata * - * @var OrganizationWithLogoPrivateMetadata $privateMetadata + * @var array $privateMetadata */ #[\Speakeasy\Serializer\Annotation\SerializedName('private_metadata')] - #[\Speakeasy\Serializer\Annotation\Type('\Clerk\Backend\Models\Components\OrganizationWithLogoPrivateMetadata')] - public OrganizationWithLogoPrivateMetadata $privateMetadata; + #[\Speakeasy\Serializer\Annotation\Type('array')] + public array $privateMetadata; /** * @@ -137,8 +139,8 @@ class OrganizationWithLogo * @param string $name * @param string $slug * @param int $maxAllowedMemberships - * @param OrganizationWithLogoPublicMetadata $publicMetadata - * @param OrganizationWithLogoPrivateMetadata $privateMetadata + * @param array $publicMetadata + * @param array $privateMetadata * @param int $createdAt * @param int $updatedAt * @param string $imageUrl @@ -148,7 +150,7 @@ class OrganizationWithLogo * @param ?bool $hasImage * @param ?int $membersCount */ - public function __construct(OrganizationWithLogoObject $object, string $id, string $name, string $slug, int $maxAllowedMemberships, OrganizationWithLogoPublicMetadata $publicMetadata, OrganizationWithLogoPrivateMetadata $privateMetadata, int $createdAt, int $updatedAt, string $imageUrl, ?bool $adminDeleteEnabled = null, ?string $createdBy = null, ?string $logoUrl = null, ?bool $hasImage = null, ?int $membersCount = null) + public function __construct(OrganizationWithLogoObject $object, string $id, string $name, string $slug, int $maxAllowedMemberships, array $publicMetadata, array $privateMetadata, int $createdAt, int $updatedAt, string $imageUrl, ?bool $adminDeleteEnabled = null, ?string $createdBy = null, ?string $logoUrl = null, ?bool $hasImage = null, ?int $membersCount = null) { $this->object = $object; $this->id = $id; diff --git a/src/Models/Components/OrganizationWithLogoPrivateMetadata.php b/src/Models/Components/OrganizationWithLogoPrivateMetadata.php deleted file mode 100644 index 1a6ce35..0000000 --- a/src/Models/Components/OrganizationWithLogoPrivateMetadata.php +++ /dev/null @@ -1,18 +0,0 @@ -status = $status; $this->strategy = $strategy; diff --git a/src/Models/Components/PrivateMetadata.php b/src/Models/Components/PrivateMetadata.php deleted file mode 100644 index af3c162..0000000 --- a/src/Models/Components/PrivateMetadata.php +++ /dev/null @@ -1,18 +0,0 @@ -id = $id; + $this->name = $name; + $this->slug = $slug; + $this->imageUrl = $imageUrl; + $this->hasImage = $hasImage; + } +} \ No newline at end of file diff --git a/src/Models/Components/SAMLAccount.php b/src/Models/Components/SAMLAccount.php index 6504f99..1e8b175 100644 --- a/src/Models/Components/SAMLAccount.php +++ b/src/Models/Components/SAMLAccount.php @@ -75,13 +75,14 @@ class SAMLAccount public ?string $providerUserId = null; /** + * $publicMetadata * - * @var ?SAMLAccountPublicMetadata $publicMetadata + * @var ?array $publicMetadata */ #[\Speakeasy\Serializer\Annotation\SerializedName('public_metadata')] - #[\Speakeasy\Serializer\Annotation\Type('\Clerk\Backend\Models\Components\SAMLAccountPublicMetadata|null')] + #[\Speakeasy\Serializer\Annotation\Type('array|null')] #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?SAMLAccountPublicMetadata $publicMetadata = null; + public ?array $publicMetadata = null; /** * @@ -91,19 +92,29 @@ class SAMLAccount #[\Speakeasy\Serializer\Annotation\Type('\Clerk\Backend\Models\Components\Saml|\Clerk\Backend\Models\Components\Ticket')] public Saml|Ticket|null $verification; + /** + * + * @var ?SAMLConnectionSAMLConnection $samlConnection + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('saml_connection')] + #[\Speakeasy\Serializer\Annotation\Type('\Clerk\Backend\Models\Components\SAMLConnectionSAMLConnection')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?SAMLConnectionSAMLConnection $samlConnection = null; + /** * @param string $id * @param SAMLAccountObject $object * @param string $provider * @param bool $active * @param string $emailAddress - * @param ?SAMLAccountPublicMetadata $publicMetadata + * @param ?array $publicMetadata * @param Saml|Ticket|null $verification * @param ?string $firstName * @param ?string $lastName * @param ?string $providerUserId + * @param ?SAMLConnectionSAMLConnection $samlConnection */ - public function __construct(string $id, SAMLAccountObject $object, string $provider, bool $active, string $emailAddress, ?SAMLAccountPublicMetadata $publicMetadata = null, Saml|Ticket|null $verification = null, ?string $firstName = null, ?string $lastName = null, ?string $providerUserId = null) + public function __construct(string $id, SAMLAccountObject $object, string $provider, bool $active, string $emailAddress, ?array $publicMetadata = null, Saml|Ticket|null $verification = null, ?string $firstName = null, ?string $lastName = null, ?string $providerUserId = null, ?SAMLConnectionSAMLConnection $samlConnection = null) { $this->id = $id; $this->object = $object; @@ -115,5 +126,6 @@ public function __construct(string $id, SAMLAccountObject $object, string $provi $this->firstName = $firstName; $this->lastName = $lastName; $this->providerUserId = $providerUserId; + $this->samlConnection = $samlConnection; } } \ No newline at end of file diff --git a/src/Models/Components/SAMLAccountPublicMetadata.php b/src/Models/Components/SAMLAccountPublicMetadata.php deleted file mode 100644 index e3f4c8c..0000000 --- a/src/Models/Components/SAMLAccountPublicMetadata.php +++ /dev/null @@ -1,18 +0,0 @@ -id = $id; + $this->name = $name; + $this->domain = $domain; + $this->active = $active; + $this->provider = $provider; + $this->syncUserAttributes = $syncUserAttributes; + $this->createdAt = $createdAt; + $this->updatedAt = $updatedAt; + $this->allowSubdomains = $allowSubdomains; + $this->allowIdpInitiated = $allowIdpInitiated; + $this->disableAdditionalIdentifications = $disableAdditionalIdentifications; + } +} \ No newline at end of file diff --git a/src/Models/Components/SAMLConnections.php b/src/Models/Components/SAMLConnections.php index 1702228..93d6a6c 100644 --- a/src/Models/Components/SAMLConnections.php +++ b/src/Models/Components/SAMLConnections.php @@ -15,10 +15,10 @@ class SAMLConnections /** * $data * - * @var array $data + * @var array $data */ #[\Speakeasy\Serializer\Annotation\SerializedName('data')] - #[\Speakeasy\Serializer\Annotation\Type('array<\Clerk\Backend\Models\Components\SAMLConnection>')] + #[\Speakeasy\Serializer\Annotation\Type('array<\Clerk\Backend\Models\Components\SchemasSAMLConnection>')] public array $data; /** @@ -32,7 +32,7 @@ class SAMLConnections public int $totalCount; /** - * @param array $data + * @param array $data * @param int $totalCount */ public function __construct(array $data, int $totalCount) diff --git a/src/Models/Components/SAMLConnection.php b/src/Models/Components/SchemasSAMLConnection.php similarity index 81% rename from src/Models/Components/SAMLConnection.php rename to src/Models/Components/SchemasSAMLConnection.php index edf18a4..91bc239 100644 --- a/src/Models/Components/SAMLConnection.php +++ b/src/Models/Components/SchemasSAMLConnection.php @@ -9,15 +9,15 @@ namespace Clerk\Backend\Models\Components; -class SAMLConnection +class SchemasSAMLConnection { /** * - * @var SAMLConnectionObject $object + * @var SchemasSAMLConnectionObject $object */ #[\Speakeasy\Serializer\Annotation\SerializedName('object')] - #[\Speakeasy\Serializer\Annotation\Type('\Clerk\Backend\Models\Components\SAMLConnectionObject')] - public SAMLConnectionObject $object; + #[\Speakeasy\Serializer\Annotation\Type('\Clerk\Backend\Models\Components\SchemasSAMLConnectionObject')] + public SchemasSAMLConnectionObject $object; /** * @@ -151,6 +151,14 @@ class SAMLConnection #[\Speakeasy\Serializer\Annotation\SkipWhenNull] public ?bool $allowIdpInitiated = null; + /** + * + * @var ?bool $disableAdditionalIdentifications + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('disable_additional_identifications')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?bool $disableAdditionalIdentifications = null; + /** * Unix timestamp of creation. * @@ -172,7 +180,7 @@ class SAMLConnection public int $updatedAt; /** - * @param SAMLConnectionObject $object + * @param SchemasSAMLConnectionObject $object * @param string $id * @param string $name * @param string $domain @@ -191,10 +199,11 @@ class SAMLConnection * @param ?AttributeMapping $attributeMapping * @param ?bool $allowSubdomains * @param ?bool $allowIdpInitiated + * @param ?bool $disableAdditionalIdentifications * @param ?string $idpMetadataUrl * @param ?string $idpMetadata */ - public function __construct(SAMLConnectionObject $object, string $id, string $name, string $domain, string $acsUrl, string $spEntityId, string $spMetadataUrl, bool $active, string $provider, int $userCount, bool $syncUserAttributes, int $createdAt, int $updatedAt, ?string $idpEntityId = null, ?string $idpSsoUrl = null, ?string $idpCertificate = null, ?AttributeMapping $attributeMapping = null, ?bool $allowSubdomains = null, ?bool $allowIdpInitiated = null, ?string $idpMetadataUrl = null, ?string $idpMetadata = null) + public function __construct(SchemasSAMLConnectionObject $object, string $id, string $name, string $domain, string $acsUrl, string $spEntityId, string $spMetadataUrl, bool $active, string $provider, int $userCount, bool $syncUserAttributes, int $createdAt, int $updatedAt, ?string $idpEntityId = null, ?string $idpSsoUrl = null, ?string $idpCertificate = null, ?AttributeMapping $attributeMapping = null, ?bool $allowSubdomains = null, ?bool $allowIdpInitiated = null, ?bool $disableAdditionalIdentifications = null, ?string $idpMetadataUrl = null, ?string $idpMetadata = null) { $this->object = $object; $this->id = $id; @@ -215,6 +224,7 @@ public function __construct(SAMLConnectionObject $object, string $id, string $na $this->attributeMapping = $attributeMapping; $this->allowSubdomains = $allowSubdomains; $this->allowIdpInitiated = $allowIdpInitiated; + $this->disableAdditionalIdentifications = $disableAdditionalIdentifications; $this->idpMetadataUrl = $idpMetadataUrl; $this->idpMetadata = $idpMetadata; } diff --git a/src/Models/Components/SAMLConnectionObject.php b/src/Models/Components/SchemasSAMLConnectionObject.php similarity index 83% rename from src/Models/Components/SAMLConnectionObject.php rename to src/Models/Components/SchemasSAMLConnectionObject.php index e9b06c4..13967df 100644 --- a/src/Models/Components/SAMLConnectionObject.php +++ b/src/Models/Components/SchemasSAMLConnectionObject.php @@ -9,7 +9,7 @@ namespace Clerk\Backend\Models\Components; -enum SAMLConnectionObject: string +enum SchemasSAMLConnectionObject: string { case SamlConnection = 'saml_connection'; } diff --git a/src/Models/Components/Session.php b/src/Models/Components/Session.php index 37dcee1..5aaf80c 100644 --- a/src/Models/Components/Session.php +++ b/src/Models/Components/Session.php @@ -75,6 +75,15 @@ class Session #[\Speakeasy\Serializer\Annotation\SerializedName('last_active_at')] public int $lastActiveAt; + /** + * + * @var ?LatestActivity $latestActivity + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('latest_activity')] + #[\Speakeasy\Serializer\Annotation\Type('\Clerk\Backend\Models\Components\LatestActivity|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?LatestActivity $latestActivity = null; + /** * * @var int $expireAt @@ -122,8 +131,9 @@ class Session * @param int $createdAt * @param ?Actor $actor * @param ?string $lastActiveOrganizationId + * @param ?LatestActivity $latestActivity */ - public function __construct(SessionObject $object, string $id, string $userId, string $clientId, Status $status, int $lastActiveAt, int $expireAt, int $abandonAt, int $updatedAt, int $createdAt, ?Actor $actor = null, ?string $lastActiveOrganizationId = null) + public function __construct(SessionObject $object, string $id, string $userId, string $clientId, Status $status, int $lastActiveAt, int $expireAt, int $abandonAt, int $updatedAt, int $createdAt, ?Actor $actor = null, ?string $lastActiveOrganizationId = null, ?LatestActivity $latestActivity = null) { $this->object = $object; $this->id = $id; @@ -137,5 +147,6 @@ public function __construct(SessionObject $object, string $id, string $userId, s $this->createdAt = $createdAt; $this->actor = $actor; $this->lastActiveOrganizationId = $lastActiveOrganizationId; + $this->latestActivity = $latestActivity; } } \ No newline at end of file diff --git a/src/Models/Components/SignUp.php b/src/Models/Components/SignUp.php index e3b6b16..1fdafa6 100644 --- a/src/Models/Components/SignUp.php +++ b/src/Models/Components/SignUp.php @@ -140,22 +140,24 @@ class SignUp public ?string $lastName = null; /** + * $unsafeMetadata * - * @var ?SignUpUnsafeMetadata $unsafeMetadata + * @var ?array $unsafeMetadata */ #[\Speakeasy\Serializer\Annotation\SerializedName('unsafe_metadata')] - #[\Speakeasy\Serializer\Annotation\Type('\Clerk\Backend\Models\Components\SignUpUnsafeMetadata|null')] + #[\Speakeasy\Serializer\Annotation\Type('array|null')] #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?SignUpUnsafeMetadata $unsafeMetadata = null; + public ?array $unsafeMetadata = null; /** + * $publicMetadata * - * @var ?SignUpPublicMetadata $publicMetadata + * @var ?array $publicMetadata */ #[\Speakeasy\Serializer\Annotation\SerializedName('public_metadata')] - #[\Speakeasy\Serializer\Annotation\Type('\Clerk\Backend\Models\Components\SignUpPublicMetadata|null')] + #[\Speakeasy\Serializer\Annotation\Type('array|null')] #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?SignUpPublicMetadata $publicMetadata = null; + public ?array $publicMetadata = null; /** * @@ -216,8 +218,8 @@ class SignUp * @param ?array $missingFields * @param ?array $unverifiedFields * @param ?Verifications $verifications - * @param ?SignUpUnsafeMetadata $unsafeMetadata - * @param ?SignUpPublicMetadata $publicMetadata + * @param ?array $unsafeMetadata + * @param ?array $publicMetadata * @param ?ExternalAccount $externalAccount * @param ?string $username * @param ?string $emailAddress @@ -229,7 +231,7 @@ class SignUp * @param ?string $createdSessionId * @param ?string $createdUserId */ - public function __construct(SignUpObject $object, string $id, SignUpStatus $status, bool $passwordEnabled, bool $customAction, int $abandonAt, ?array $requiredFields = null, ?array $optionalFields = null, ?array $missingFields = null, ?array $unverifiedFields = null, ?Verifications $verifications = null, ?SignUpUnsafeMetadata $unsafeMetadata = null, ?SignUpPublicMetadata $publicMetadata = null, ?ExternalAccount $externalAccount = null, ?string $username = null, ?string $emailAddress = null, ?string $phoneNumber = null, ?string $web3Wallet = null, ?string $firstName = null, ?string $lastName = null, ?string $externalId = null, ?string $createdSessionId = null, ?string $createdUserId = null) + public function __construct(SignUpObject $object, string $id, SignUpStatus $status, bool $passwordEnabled, bool $customAction, int $abandonAt, ?array $requiredFields = null, ?array $optionalFields = null, ?array $missingFields = null, ?array $unverifiedFields = null, ?Verifications $verifications = null, ?array $unsafeMetadata = null, ?array $publicMetadata = null, ?ExternalAccount $externalAccount = null, ?string $username = null, ?string $emailAddress = null, ?string $phoneNumber = null, ?string $web3Wallet = null, ?string $firstName = null, ?string $lastName = null, ?string $externalId = null, ?string $createdSessionId = null, ?string $createdUserId = null) { $this->object = $object; $this->id = $id; diff --git a/src/Models/Components/SignUpPublicMetadata.php b/src/Models/Components/SignUpPublicMetadata.php deleted file mode 100644 index 59b67bc..0000000 --- a/src/Models/Components/SignUpPublicMetadata.php +++ /dev/null @@ -1,18 +0,0 @@ - $publicMetadata */ #[\Speakeasy\Serializer\Annotation\SerializedName('public_metadata')] - #[\Speakeasy\Serializer\Annotation\Type('\Clerk\Backend\Models\Components\PublicMetadata|null')] + #[\Speakeasy\Serializer\Annotation\Type('array|null')] #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?PublicMetadata $publicMetadata = null; + public ?array $publicMetadata = null; /** + * $privateMetadata * - * @var ?PrivateMetadata $privateMetadata + * @var ?array $privateMetadata */ #[\Speakeasy\Serializer\Annotation\SerializedName('private_metadata')] - #[\Speakeasy\Serializer\Annotation\Type('\Clerk\Backend\Models\Components\PrivateMetadata|null')] + #[\Speakeasy\Serializer\Annotation\Type('array|null')] #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?PrivateMetadata $privateMetadata = null; + public ?array $privateMetadata = null; /** + * $unsafeMetadata * - * @var ?UnsafeMetadata $unsafeMetadata + * @var ?array $unsafeMetadata */ #[\Speakeasy\Serializer\Annotation\SerializedName('unsafe_metadata')] - #[\Speakeasy\Serializer\Annotation\Type('\Clerk\Backend\Models\Components\UnsafeMetadata|null')] + #[\Speakeasy\Serializer\Annotation\Type('array|null')] #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?UnsafeMetadata $unsafeMetadata = null; + public ?array $unsafeMetadata = null; /** * $emailAddresses @@ -353,6 +356,17 @@ class User #[\Speakeasy\Serializer\Annotation\SkipWhenNull] public ?bool $createOrganizationEnabled = null; + /** + * The maximum number of organizations the user can create. 0 means unlimited. + * + * + * + * @var ?int $createOrganizationsLimit + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('create_organizations_limit')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?int $createOrganizationsLimit = null; + /** * Unix timestamp of the latest session activity, with day precision. * @@ -364,14 +378,25 @@ class User #[\Speakeasy\Serializer\Annotation\SkipWhenNull] public ?int $lastActiveAt = null; + /** + * Unix timestamp of when the user accepted the legal requirements. + * + * + * + * @var ?int $legalAcceptedAt + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('legal_accepted_at')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?int $legalAcceptedAt = null; + /** * @param ?string $id * @param ?UserObject $object * @param ?string $profileImageUrl * @param ?string $imageUrl * @param ?bool $hasImage - * @param ?PublicMetadata $publicMetadata - * @param ?UnsafeMetadata $unsafeMetadata + * @param ?array $publicMetadata + * @param ?array $unsafeMetadata * @param ?array $emailAddresses * @param ?array $phoneNumbers * @param ?array $web3Wallets @@ -395,15 +420,17 @@ class User * @param ?string $username * @param ?string $firstName * @param ?string $lastName - * @param ?PrivateMetadata $privateMetadata + * @param ?array $privateMetadata * @param ?int $mfaEnabledAt * @param ?int $mfaDisabledAt * @param ?int $lastSignInAt * @param ?int $lockoutExpiresInSeconds * @param ?int $verificationAttemptsRemaining + * @param ?int $createOrganizationsLimit * @param ?int $lastActiveAt + * @param ?int $legalAcceptedAt */ - public function __construct(?string $id = null, ?UserObject $object = null, ?string $profileImageUrl = null, ?string $imageUrl = null, ?bool $hasImage = null, ?PublicMetadata $publicMetadata = null, ?UnsafeMetadata $unsafeMetadata = null, ?array $emailAddresses = null, ?array $phoneNumbers = null, ?array $web3Wallets = null, ?array $passkeys = null, ?bool $passwordEnabled = null, ?bool $twoFactorEnabled = null, ?bool $totpEnabled = null, ?bool $backupCodeEnabled = null, ?array $externalAccounts = null, ?array $samlAccounts = null, ?bool $banned = null, ?bool $locked = null, ?int $updatedAt = null, ?int $createdAt = null, ?bool $deleteSelfEnabled = null, ?bool $createOrganizationEnabled = null, ?string $externalId = null, ?string $primaryEmailAddressId = null, ?string $primaryPhoneNumberId = null, ?string $primaryWeb3WalletId = null, ?string $username = null, ?string $firstName = null, ?string $lastName = null, ?PrivateMetadata $privateMetadata = null, ?int $mfaEnabledAt = null, ?int $mfaDisabledAt = null, ?int $lastSignInAt = null, ?int $lockoutExpiresInSeconds = null, ?int $verificationAttemptsRemaining = null, ?int $lastActiveAt = null) + public function __construct(?string $id = null, ?UserObject $object = null, ?string $profileImageUrl = null, ?string $imageUrl = null, ?bool $hasImage = null, ?array $publicMetadata = null, ?array $unsafeMetadata = null, ?array $emailAddresses = null, ?array $phoneNumbers = null, ?array $web3Wallets = null, ?array $passkeys = null, ?bool $passwordEnabled = null, ?bool $twoFactorEnabled = null, ?bool $totpEnabled = null, ?bool $backupCodeEnabled = null, ?array $externalAccounts = null, ?array $samlAccounts = null, ?bool $banned = null, ?bool $locked = null, ?int $updatedAt = null, ?int $createdAt = null, ?bool $deleteSelfEnabled = null, ?bool $createOrganizationEnabled = null, ?string $externalId = null, ?string $primaryEmailAddressId = null, ?string $primaryPhoneNumberId = null, ?string $primaryWeb3WalletId = null, ?string $username = null, ?string $firstName = null, ?string $lastName = null, ?array $privateMetadata = null, ?int $mfaEnabledAt = null, ?int $mfaDisabledAt = null, ?int $lastSignInAt = null, ?int $lockoutExpiresInSeconds = null, ?int $verificationAttemptsRemaining = null, ?int $createOrganizationsLimit = null, ?int $lastActiveAt = null, ?int $legalAcceptedAt = null) { $this->id = $id; $this->object = $object; @@ -441,6 +468,8 @@ public function __construct(?string $id = null, ?UserObject $object = null, ?str $this->lastSignInAt = $lastSignInAt; $this->lockoutExpiresInSeconds = $lockoutExpiresInSeconds; $this->verificationAttemptsRemaining = $verificationAttemptsRemaining; + $this->createOrganizationsLimit = $createOrganizationsLimit; $this->lastActiveAt = $lastActiveAt; + $this->legalAcceptedAt = $legalAcceptedAt; } } \ No newline at end of file diff --git a/src/Models/Components/VerificationNonce.php b/src/Models/Components/VerificationNonce.php deleted file mode 100644 index eeb879a..0000000 --- a/src/Models/Components/VerificationNonce.php +++ /dev/null @@ -1,15 +0,0 @@ -status = $status; $this->strategy = $strategy; $this->nonce = $nonce; + $this->message = $message; $this->attempts = $attempts; $this->expireAt = $expireAt; } diff --git a/src/Models/Components/Web3SignatureVerificationStatus.php b/src/Models/Components/Web3SignatureVerificationStatus.php index 0d76196..a049a25 100644 --- a/src/Models/Components/Web3SignatureVerificationStatus.php +++ b/src/Models/Components/Web3SignatureVerificationStatus.php @@ -11,5 +11,8 @@ enum Web3SignatureVerificationStatus: string { + case Unverified = 'unverified'; case Verified = 'verified'; + case Failed = 'failed'; + case Expired = 'expired'; } diff --git a/src/Models/Components/Web3SignatureVerificationStrategy.php b/src/Models/Components/Web3SignatureVerificationStrategy.php index 66e3a27..bcaf3de 100644 --- a/src/Models/Components/Web3SignatureVerificationStrategy.php +++ b/src/Models/Components/Web3SignatureVerificationStrategy.php @@ -12,4 +12,5 @@ enum Web3SignatureVerificationStrategy: string { case Web3MetamaskSignature = 'web3_metamask_signature'; + case Web3CoinbaseWalletSignature = 'web3_coinbase_wallet_signature'; } diff --git a/src/Models/Components/WellKnownJWKS.php b/src/Models/Components/WellKnownJWKS.php new file mode 100644 index 0000000..7a0d866 --- /dev/null +++ b/src/Models/Components/WellKnownJWKS.php @@ -0,0 +1,32 @@ + $keys + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('keys')] + #[\Speakeasy\Serializer\Annotation\Type('array<\Clerk\Backend\Models\Components\Keys>|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?array $keys = null; + + /** + * @param ?array $keys + */ + public function __construct(?array $keys = null) + { + $this->keys = $keys; + } +} \ No newline at end of file diff --git a/src/Models/Errors/ClerkErrors100.php b/src/Models/Errors/ClerkErrors100.php new file mode 100644 index 0000000..2d6d2ef --- /dev/null +++ b/src/Models/Errors/ClerkErrors100.php @@ -0,0 +1,52 @@ + $errors + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('errors')] + #[\Speakeasy\Serializer\Annotation\Type('array<\Clerk\Backend\Models\Components\ClerkError>')] + public array $errors; + + /** + * + * @var ?Meta $meta + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('meta')] + #[\Speakeasy\Serializer\Annotation\Type('\Clerk\Backend\Models\Errors\Meta|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?Meta $meta = null; + + /** + * @param array $errors + * @param ?Meta $meta + */ + public function __construct(array $errors, ?Meta $meta = null) + { + $this->errors = $errors; + $this->meta = $meta; + } + + public function toException(): ClerkErrors100Throwable + { + $serializer = Utils\JSON::createSerializer(); + $message = $serializer->serialize($this, 'json'); + $code = -1; + + return new ClerkErrors100Throwable($message, (int) $code, $this); + } +} \ No newline at end of file diff --git a/src/Models/Errors/ClerkErrors100Throwable.php b/src/Models/Errors/ClerkErrors100Throwable.php new file mode 100644 index 0000000..89ef57a --- /dev/null +++ b/src/Models/Errors/ClerkErrors100Throwable.php @@ -0,0 +1,20 @@ +container = $container; + } +} \ No newline at end of file diff --git a/src/Models/Errors/ClerkErrors101.php b/src/Models/Errors/ClerkErrors101.php new file mode 100644 index 0000000..d6828a0 --- /dev/null +++ b/src/Models/Errors/ClerkErrors101.php @@ -0,0 +1,52 @@ + $errors + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('errors')] + #[\Speakeasy\Serializer\Annotation\Type('array<\Clerk\Backend\Models\Components\ClerkError>')] + public array $errors; + + /** + * + * @var ?Meta $meta + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('meta')] + #[\Speakeasy\Serializer\Annotation\Type('\Clerk\Backend\Models\Errors\Meta|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?Meta $meta = null; + + /** + * @param array $errors + * @param ?Meta $meta + */ + public function __construct(array $errors, ?Meta $meta = null) + { + $this->errors = $errors; + $this->meta = $meta; + } + + public function toException(): ClerkErrors101Throwable + { + $serializer = Utils\JSON::createSerializer(); + $message = $serializer->serialize($this, 'json'); + $code = -1; + + return new ClerkErrors101Throwable($message, (int) $code, $this); + } +} \ No newline at end of file diff --git a/src/Models/Errors/ClerkErrors101Throwable.php b/src/Models/Errors/ClerkErrors101Throwable.php new file mode 100644 index 0000000..e66ccbb --- /dev/null +++ b/src/Models/Errors/ClerkErrors101Throwable.php @@ -0,0 +1,20 @@ +container = $container; + } +} \ No newline at end of file diff --git a/src/Models/Errors/ClerkErrors102.php b/src/Models/Errors/ClerkErrors102.php new file mode 100644 index 0000000..95ab872 --- /dev/null +++ b/src/Models/Errors/ClerkErrors102.php @@ -0,0 +1,52 @@ + $errors + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('errors')] + #[\Speakeasy\Serializer\Annotation\Type('array<\Clerk\Backend\Models\Components\ClerkError>')] + public array $errors; + + /** + * + * @var ?Meta $meta + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('meta')] + #[\Speakeasy\Serializer\Annotation\Type('\Clerk\Backend\Models\Errors\Meta|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?Meta $meta = null; + + /** + * @param array $errors + * @param ?Meta $meta + */ + public function __construct(array $errors, ?Meta $meta = null) + { + $this->errors = $errors; + $this->meta = $meta; + } + + public function toException(): ClerkErrors102Throwable + { + $serializer = Utils\JSON::createSerializer(); + $message = $serializer->serialize($this, 'json'); + $code = -1; + + return new ClerkErrors102Throwable($message, (int) $code, $this); + } +} \ No newline at end of file diff --git a/src/Models/Errors/ClerkErrors102Throwable.php b/src/Models/Errors/ClerkErrors102Throwable.php new file mode 100644 index 0000000..ae1f93e --- /dev/null +++ b/src/Models/Errors/ClerkErrors102Throwable.php @@ -0,0 +1,20 @@ +container = $container; + } +} \ No newline at end of file diff --git a/src/Models/Errors/ClerkErrors103.php b/src/Models/Errors/ClerkErrors103.php new file mode 100644 index 0000000..4ba88f2 --- /dev/null +++ b/src/Models/Errors/ClerkErrors103.php @@ -0,0 +1,52 @@ + $errors + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('errors')] + #[\Speakeasy\Serializer\Annotation\Type('array<\Clerk\Backend\Models\Components\ClerkError>')] + public array $errors; + + /** + * + * @var ?Meta $meta + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('meta')] + #[\Speakeasy\Serializer\Annotation\Type('\Clerk\Backend\Models\Errors\Meta|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?Meta $meta = null; + + /** + * @param array $errors + * @param ?Meta $meta + */ + public function __construct(array $errors, ?Meta $meta = null) + { + $this->errors = $errors; + $this->meta = $meta; + } + + public function toException(): ClerkErrors103Throwable + { + $serializer = Utils\JSON::createSerializer(); + $message = $serializer->serialize($this, 'json'); + $code = -1; + + return new ClerkErrors103Throwable($message, (int) $code, $this); + } +} \ No newline at end of file diff --git a/src/Models/Errors/ClerkErrors103Throwable.php b/src/Models/Errors/ClerkErrors103Throwable.php new file mode 100644 index 0000000..f7c9de2 --- /dev/null +++ b/src/Models/Errors/ClerkErrors103Throwable.php @@ -0,0 +1,20 @@ +container = $container; + } +} \ No newline at end of file diff --git a/src/Models/Errors/ClerkErrors104.php b/src/Models/Errors/ClerkErrors104.php new file mode 100644 index 0000000..fb09195 --- /dev/null +++ b/src/Models/Errors/ClerkErrors104.php @@ -0,0 +1,52 @@ + $errors + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('errors')] + #[\Speakeasy\Serializer\Annotation\Type('array<\Clerk\Backend\Models\Components\ClerkError>')] + public array $errors; + + /** + * + * @var ?Meta $meta + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('meta')] + #[\Speakeasy\Serializer\Annotation\Type('\Clerk\Backend\Models\Errors\Meta|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?Meta $meta = null; + + /** + * @param array $errors + * @param ?Meta $meta + */ + public function __construct(array $errors, ?Meta $meta = null) + { + $this->errors = $errors; + $this->meta = $meta; + } + + public function toException(): ClerkErrors104Throwable + { + $serializer = Utils\JSON::createSerializer(); + $message = $serializer->serialize($this, 'json'); + $code = -1; + + return new ClerkErrors104Throwable($message, (int) $code, $this); + } +} \ No newline at end of file diff --git a/src/Models/Errors/ClerkErrors104Throwable.php b/src/Models/Errors/ClerkErrors104Throwable.php new file mode 100644 index 0000000..a7e9ee2 --- /dev/null +++ b/src/Models/Errors/ClerkErrors104Throwable.php @@ -0,0 +1,20 @@ +container = $container; + } +} \ No newline at end of file diff --git a/src/Models/Errors/ClerkErrors36.php b/src/Models/Errors/ClerkErrors36.php index 203d8f3..53a4b71 100644 --- a/src/Models/Errors/ClerkErrors36.php +++ b/src/Models/Errors/ClerkErrors36.php @@ -10,7 +10,7 @@ use Clerk\Backend\Models\Components; use Clerk\Backend\Utils; -/** ClerkErrors36 - Authentication invalid */ +/** ClerkErrors36 - Resource not found */ class ClerkErrors36 { /** diff --git a/src/Models/Errors/ClerkErrors37.php b/src/Models/Errors/ClerkErrors37.php index fce3fe2..ec2790f 100644 --- a/src/Models/Errors/ClerkErrors37.php +++ b/src/Models/Errors/ClerkErrors37.php @@ -10,7 +10,7 @@ use Clerk\Backend\Models\Components; use Clerk\Backend\Utils; -/** ClerkErrors37 - Request was not successful */ +/** ClerkErrors37 - Authorization invalid */ class ClerkErrors37 { /** diff --git a/src/Models/Errors/ClerkErrors38.php b/src/Models/Errors/ClerkErrors38.php index e7f1d13..e5f2e0f 100644 --- a/src/Models/Errors/ClerkErrors38.php +++ b/src/Models/Errors/ClerkErrors38.php @@ -10,7 +10,7 @@ use Clerk\Backend\Models\Components; use Clerk\Backend\Utils; -/** ClerkErrors38 - Payment required */ +/** ClerkErrors38 - Request was not successful */ class ClerkErrors38 { /** diff --git a/src/Models/Errors/ClerkErrors39.php b/src/Models/Errors/ClerkErrors39.php index cfac3ce..601198a 100644 --- a/src/Models/Errors/ClerkErrors39.php +++ b/src/Models/Errors/ClerkErrors39.php @@ -10,7 +10,7 @@ use Clerk\Backend\Models\Components; use Clerk\Backend\Utils; -/** ClerkErrors39 - Authentication invalid */ +/** ClerkErrors39 - Request was not successful */ class ClerkErrors39 { /** diff --git a/src/Models/Errors/ClerkErrors40.php b/src/Models/Errors/ClerkErrors40.php index d0bb31b..f48c4f6 100644 --- a/src/Models/Errors/ClerkErrors40.php +++ b/src/Models/Errors/ClerkErrors40.php @@ -10,7 +10,7 @@ use Clerk\Backend\Models\Components; use Clerk\Backend\Utils; -/** ClerkErrors40 - Request was not successful */ +/** ClerkErrors40 - Resource not found */ class ClerkErrors40 { /** diff --git a/src/Models/Errors/ClerkErrors41.php b/src/Models/Errors/ClerkErrors41.php index 9a60443..ba2b167 100644 --- a/src/Models/Errors/ClerkErrors41.php +++ b/src/Models/Errors/ClerkErrors41.php @@ -10,7 +10,7 @@ use Clerk\Backend\Models\Components; use Clerk\Backend\Utils; -/** ClerkErrors41 - Payment required */ +/** ClerkErrors41 - Request was not successful */ class ClerkErrors41 { /** diff --git a/src/Models/Errors/ClerkErrors42.php b/src/Models/Errors/ClerkErrors42.php index 6c46c3e..6518262 100644 --- a/src/Models/Errors/ClerkErrors42.php +++ b/src/Models/Errors/ClerkErrors42.php @@ -10,7 +10,7 @@ use Clerk\Backend\Models\Components; use Clerk\Backend\Utils; -/** ClerkErrors42 - Payment required */ +/** ClerkErrors42 - Request was not successful */ class ClerkErrors42 { /** diff --git a/src/Models/Errors/ClerkErrors45.php b/src/Models/Errors/ClerkErrors45.php index 17175d7..c2d549c 100644 --- a/src/Models/Errors/ClerkErrors45.php +++ b/src/Models/Errors/ClerkErrors45.php @@ -10,7 +10,7 @@ use Clerk\Backend\Models\Components; use Clerk\Backend\Utils; -/** ClerkErrors45 - Request was not successful */ +/** ClerkErrors45 - Authentication invalid */ class ClerkErrors45 { /** diff --git a/src/Models/Errors/ClerkErrors47.php b/src/Models/Errors/ClerkErrors47.php index 4aaeb24..4a260ed 100644 --- a/src/Models/Errors/ClerkErrors47.php +++ b/src/Models/Errors/ClerkErrors47.php @@ -10,7 +10,7 @@ use Clerk\Backend\Models\Components; use Clerk\Backend\Utils; -/** ClerkErrors47 - Request was not successful */ +/** ClerkErrors47 - Payment required */ class ClerkErrors47 { /** diff --git a/src/Models/Errors/ClerkErrors48.php b/src/Models/Errors/ClerkErrors48.php index 62318c1..e72632a 100644 --- a/src/Models/Errors/ClerkErrors48.php +++ b/src/Models/Errors/ClerkErrors48.php @@ -10,7 +10,7 @@ use Clerk\Backend\Models\Components; use Clerk\Backend\Utils; -/** ClerkErrors48 - Request was not successful */ +/** ClerkErrors48 - Authentication invalid */ class ClerkErrors48 { /** diff --git a/src/Models/Errors/ClerkErrors49.php b/src/Models/Errors/ClerkErrors49.php index 6796662..cb8ed96 100644 --- a/src/Models/Errors/ClerkErrors49.php +++ b/src/Models/Errors/ClerkErrors49.php @@ -10,7 +10,7 @@ use Clerk\Backend\Models\Components; use Clerk\Backend\Utils; -/** ClerkErrors49 - Invalid request parameters */ +/** ClerkErrors49 - Request was not successful */ class ClerkErrors49 { /** diff --git a/src/Models/Errors/ClerkErrors50.php b/src/Models/Errors/ClerkErrors50.php index 93b6fba..482becc 100644 --- a/src/Models/Errors/ClerkErrors50.php +++ b/src/Models/Errors/ClerkErrors50.php @@ -10,7 +10,7 @@ use Clerk\Backend\Models\Components; use Clerk\Backend\Utils; -/** ClerkErrors50 - Request was not successful */ +/** ClerkErrors50 - Payment required */ class ClerkErrors50 { /** diff --git a/src/Models/Errors/ClerkErrors54.php b/src/Models/Errors/ClerkErrors54.php index bc66b34..28e0cd4 100644 --- a/src/Models/Errors/ClerkErrors54.php +++ b/src/Models/Errors/ClerkErrors54.php @@ -10,7 +10,7 @@ use Clerk\Backend\Models\Components; use Clerk\Backend\Utils; -/** ClerkErrors54 - Resource not found */ +/** ClerkErrors54 - Request was not successful */ class ClerkErrors54 { /** diff --git a/src/Models/Errors/ClerkErrors56.php b/src/Models/Errors/ClerkErrors56.php index 2d35c60..cea138c 100644 --- a/src/Models/Errors/ClerkErrors56.php +++ b/src/Models/Errors/ClerkErrors56.php @@ -10,7 +10,7 @@ use Clerk\Backend\Models\Components; use Clerk\Backend\Utils; -/** ClerkErrors56 - Authorization invalid */ +/** ClerkErrors56 - Request was not successful */ class ClerkErrors56 { /** diff --git a/src/Models/Errors/ClerkErrors58.php b/src/Models/Errors/ClerkErrors58.php index e0cd4e3..9932b1c 100644 --- a/src/Models/Errors/ClerkErrors58.php +++ b/src/Models/Errors/ClerkErrors58.php @@ -10,7 +10,7 @@ use Clerk\Backend\Models\Components; use Clerk\Backend\Utils; -/** ClerkErrors58 - Request was not successful */ +/** ClerkErrors58 - Invalid request parameters */ class ClerkErrors58 { /** diff --git a/src/Models/Errors/ClerkErrors59.php b/src/Models/Errors/ClerkErrors59.php index cba3d4b..0bad8be 100644 --- a/src/Models/Errors/ClerkErrors59.php +++ b/src/Models/Errors/ClerkErrors59.php @@ -10,7 +10,7 @@ use Clerk\Backend\Models\Components; use Clerk\Backend\Utils; -/** ClerkErrors59 - Authorization invalid */ +/** ClerkErrors59 - Payment required */ class ClerkErrors59 { /** diff --git a/src/Models/Errors/ClerkErrors60.php b/src/Models/Errors/ClerkErrors60.php index 3fadcb1..923e60b 100644 --- a/src/Models/Errors/ClerkErrors60.php +++ b/src/Models/Errors/ClerkErrors60.php @@ -10,7 +10,7 @@ use Clerk\Backend\Models\Components; use Clerk\Backend\Utils; -/** ClerkErrors60 - Resource not found */ +/** ClerkErrors60 - Request was not successful */ class ClerkErrors60 { /** diff --git a/src/Models/Errors/ClerkErrors61.php b/src/Models/Errors/ClerkErrors61.php index a19d716..ff13115 100644 --- a/src/Models/Errors/ClerkErrors61.php +++ b/src/Models/Errors/ClerkErrors61.php @@ -10,7 +10,7 @@ use Clerk\Backend\Models\Components; use Clerk\Backend\Utils; -/** ClerkErrors61 - Resource not found */ +/** ClerkErrors61 - Payment required */ class ClerkErrors61 { /** diff --git a/src/Models/Errors/ClerkErrors63.php b/src/Models/Errors/ClerkErrors63.php index 338f38b..8fe7c3d 100644 --- a/src/Models/Errors/ClerkErrors63.php +++ b/src/Models/Errors/ClerkErrors63.php @@ -10,7 +10,7 @@ use Clerk\Backend\Models\Components; use Clerk\Backend\Utils; -/** ClerkErrors63 - Resource not found */ +/** ClerkErrors63 - Request was not successful */ class ClerkErrors63 { /** diff --git a/src/Models/Errors/ClerkErrors64.php b/src/Models/Errors/ClerkErrors64.php index 4629bf6..2a352a8 100644 --- a/src/Models/Errors/ClerkErrors64.php +++ b/src/Models/Errors/ClerkErrors64.php @@ -10,7 +10,7 @@ use Clerk\Backend\Models\Components; use Clerk\Backend\Utils; -/** ClerkErrors64 - Request was not successful */ +/** ClerkErrors64 - Resource not found */ class ClerkErrors64 { /** diff --git a/src/Models/Errors/ClerkErrors66.php b/src/Models/Errors/ClerkErrors66.php index 9b8589c..734b2a4 100644 --- a/src/Models/Errors/ClerkErrors66.php +++ b/src/Models/Errors/ClerkErrors66.php @@ -10,7 +10,7 @@ use Clerk\Backend\Models\Components; use Clerk\Backend\Utils; -/** ClerkErrors66 - Request was not successful */ +/** ClerkErrors66 - Authorization invalid */ class ClerkErrors66 { /** diff --git a/src/Models/Errors/ClerkErrors69.php b/src/Models/Errors/ClerkErrors69.php index c07e0e3..fa68d33 100644 --- a/src/Models/Errors/ClerkErrors69.php +++ b/src/Models/Errors/ClerkErrors69.php @@ -10,7 +10,7 @@ use Clerk\Backend\Models\Components; use Clerk\Backend\Utils; -/** ClerkErrors69 - Request was not successful */ +/** ClerkErrors69 - Authorization invalid */ class ClerkErrors69 { /** diff --git a/src/Models/Errors/ClerkErrors70.php b/src/Models/Errors/ClerkErrors70.php index 10a6f46..9937c24 100644 --- a/src/Models/Errors/ClerkErrors70.php +++ b/src/Models/Errors/ClerkErrors70.php @@ -10,7 +10,7 @@ use Clerk\Backend\Models\Components; use Clerk\Backend\Utils; -/** ClerkErrors70 - Authentication invalid */ +/** ClerkErrors70 - Resource not found */ class ClerkErrors70 { /** diff --git a/src/Models/Errors/ClerkErrors71.php b/src/Models/Errors/ClerkErrors71.php index 7c7f989..d6396f5 100644 --- a/src/Models/Errors/ClerkErrors71.php +++ b/src/Models/Errors/ClerkErrors71.php @@ -10,7 +10,7 @@ use Clerk\Backend\Models\Components; use Clerk\Backend\Utils; -/** ClerkErrors71 - Request was not successful */ +/** ClerkErrors71 - Resource not found */ class ClerkErrors71 { /** diff --git a/src/Models/Errors/ClerkErrors73.php b/src/Models/Errors/ClerkErrors73.php index ed4e11a..04decd0 100644 --- a/src/Models/Errors/ClerkErrors73.php +++ b/src/Models/Errors/ClerkErrors73.php @@ -10,7 +10,7 @@ use Clerk\Backend\Models\Components; use Clerk\Backend\Utils; -/** ClerkErrors73 - Request was not successful */ +/** ClerkErrors73 - Resource not found */ class ClerkErrors73 { /** diff --git a/src/Models/Errors/ClerkErrors76.php b/src/Models/Errors/ClerkErrors76.php index 69a3e90..369bb8e 100644 --- a/src/Models/Errors/ClerkErrors76.php +++ b/src/Models/Errors/ClerkErrors76.php @@ -10,7 +10,7 @@ use Clerk\Backend\Models\Components; use Clerk\Backend\Utils; -/** ClerkErrors76 - Resource not found */ +/** ClerkErrors76 - Request was not successful */ class ClerkErrors76 { /** diff --git a/src/Models/Errors/ClerkErrors77.php b/src/Models/Errors/ClerkErrors77.php index fa73e77..b2973cf 100644 --- a/src/Models/Errors/ClerkErrors77.php +++ b/src/Models/Errors/ClerkErrors77.php @@ -10,7 +10,7 @@ use Clerk\Backend\Models\Components; use Clerk\Backend\Utils; -/** ClerkErrors77 - Resource not found */ +/** ClerkErrors77 - Request was not successful */ class ClerkErrors77 { /** diff --git a/src/Models/Errors/ClerkErrors79.php b/src/Models/Errors/ClerkErrors79.php index 130917f..57c883e 100644 --- a/src/Models/Errors/ClerkErrors79.php +++ b/src/Models/Errors/ClerkErrors79.php @@ -10,7 +10,7 @@ use Clerk\Backend\Models\Components; use Clerk\Backend\Utils; -/** ClerkErrors79 - Authorization invalid */ +/** ClerkErrors79 - Request was not successful */ class ClerkErrors79 { /** diff --git a/src/Models/Errors/ClerkErrors80.php b/src/Models/Errors/ClerkErrors80.php index 0fe193a..4e47b1f 100644 --- a/src/Models/Errors/ClerkErrors80.php +++ b/src/Models/Errors/ClerkErrors80.php @@ -10,7 +10,7 @@ use Clerk\Backend\Models\Components; use Clerk\Backend\Utils; -/** ClerkErrors80 - Request was not successful */ +/** ClerkErrors80 - Authentication invalid */ class ClerkErrors80 { /** diff --git a/src/Models/Errors/ClerkErrors81.php b/src/Models/Errors/ClerkErrors81.php index 1690152..9174221 100644 --- a/src/Models/Errors/ClerkErrors81.php +++ b/src/Models/Errors/ClerkErrors81.php @@ -10,7 +10,7 @@ use Clerk\Backend\Models\Components; use Clerk\Backend\Utils; -/** ClerkErrors81 - Authorization invalid */ +/** ClerkErrors81 - Request was not successful */ class ClerkErrors81 { /** diff --git a/src/Models/Errors/ClerkErrors82.php b/src/Models/Errors/ClerkErrors82.php index bde0f1b..bf2b114 100644 --- a/src/Models/Errors/ClerkErrors82.php +++ b/src/Models/Errors/ClerkErrors82.php @@ -10,7 +10,7 @@ use Clerk\Backend\Models\Components; use Clerk\Backend\Utils; -/** ClerkErrors82 - Authorization invalid */ +/** ClerkErrors82 - Request was not successful */ class ClerkErrors82 { /** diff --git a/src/Models/Errors/ClerkErrors83.php b/src/Models/Errors/ClerkErrors83.php index 2b44024..d94d1fe 100644 --- a/src/Models/Errors/ClerkErrors83.php +++ b/src/Models/Errors/ClerkErrors83.php @@ -10,7 +10,7 @@ use Clerk\Backend\Models\Components; use Clerk\Backend\Utils; -/** ClerkErrors83 - Authorization invalid */ +/** ClerkErrors83 - Request was not successful */ class ClerkErrors83 { /** diff --git a/src/Models/Errors/ClerkErrors84.php b/src/Models/Errors/ClerkErrors84.php index 420d71e..1cb48f3 100644 --- a/src/Models/Errors/ClerkErrors84.php +++ b/src/Models/Errors/ClerkErrors84.php @@ -10,7 +10,7 @@ use Clerk\Backend\Models\Components; use Clerk\Backend\Utils; -/** ClerkErrors84 - Authorization invalid */ +/** ClerkErrors84 - Request was not successful */ class ClerkErrors84 { /** diff --git a/src/Models/Errors/ClerkErrors85.php b/src/Models/Errors/ClerkErrors85.php index 568e74c..57e9cea 100644 --- a/src/Models/Errors/ClerkErrors85.php +++ b/src/Models/Errors/ClerkErrors85.php @@ -10,7 +10,7 @@ use Clerk\Backend\Models\Components; use Clerk\Backend\Utils; -/** ClerkErrors85 - Payment required */ +/** ClerkErrors85 - Authentication invalid */ class ClerkErrors85 { /** diff --git a/src/Models/Errors/ClerkErrors86.php b/src/Models/Errors/ClerkErrors86.php index 83b82c7..bd23a4f 100644 --- a/src/Models/Errors/ClerkErrors86.php +++ b/src/Models/Errors/ClerkErrors86.php @@ -10,7 +10,7 @@ use Clerk\Backend\Models\Components; use Clerk\Backend\Utils; -/** ClerkErrors86 - Payment required */ +/** ClerkErrors86 - Request was not successful */ class ClerkErrors86 { /** diff --git a/src/Models/Errors/ClerkErrors87.php b/src/Models/Errors/ClerkErrors87.php index 03fa0f9..6dd7a95 100644 --- a/src/Models/Errors/ClerkErrors87.php +++ b/src/Models/Errors/ClerkErrors87.php @@ -10,7 +10,7 @@ use Clerk\Backend\Models\Components; use Clerk\Backend\Utils; -/** ClerkErrors87 - Payment required */ +/** ClerkErrors87 - Request was not successful */ class ClerkErrors87 { /** diff --git a/src/Models/Errors/ClerkErrors88.php b/src/Models/Errors/ClerkErrors88.php index 9595f14..29e9319 100644 --- a/src/Models/Errors/ClerkErrors88.php +++ b/src/Models/Errors/ClerkErrors88.php @@ -10,7 +10,7 @@ use Clerk\Backend\Models\Components; use Clerk\Backend\Utils; -/** ClerkErrors88 - Payment required */ +/** ClerkErrors88 - Request was not successful */ class ClerkErrors88 { /** diff --git a/src/Models/Errors/ClerkErrors89.php b/src/Models/Errors/ClerkErrors89.php index 2f88803..4f25f9f 100644 --- a/src/Models/Errors/ClerkErrors89.php +++ b/src/Models/Errors/ClerkErrors89.php @@ -10,7 +10,7 @@ use Clerk\Backend\Models\Components; use Clerk\Backend\Utils; -/** ClerkErrors89 - Payment required */ +/** ClerkErrors89 - Request was not successful */ class ClerkErrors89 { /** diff --git a/src/Models/Errors/ClerkErrors90.php b/src/Models/Errors/ClerkErrors90.php new file mode 100644 index 0000000..78256ac --- /dev/null +++ b/src/Models/Errors/ClerkErrors90.php @@ -0,0 +1,52 @@ + $errors + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('errors')] + #[\Speakeasy\Serializer\Annotation\Type('array<\Clerk\Backend\Models\Components\ClerkError>')] + public array $errors; + + /** + * + * @var ?Meta $meta + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('meta')] + #[\Speakeasy\Serializer\Annotation\Type('\Clerk\Backend\Models\Errors\Meta|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?Meta $meta = null; + + /** + * @param array $errors + * @param ?Meta $meta + */ + public function __construct(array $errors, ?Meta $meta = null) + { + $this->errors = $errors; + $this->meta = $meta; + } + + public function toException(): ClerkErrors90Throwable + { + $serializer = Utils\JSON::createSerializer(); + $message = $serializer->serialize($this, 'json'); + $code = -1; + + return new ClerkErrors90Throwable($message, (int) $code, $this); + } +} \ No newline at end of file diff --git a/src/Models/Errors/ClerkErrors90Throwable.php b/src/Models/Errors/ClerkErrors90Throwable.php new file mode 100644 index 0000000..41f0521 --- /dev/null +++ b/src/Models/Errors/ClerkErrors90Throwable.php @@ -0,0 +1,20 @@ +container = $container; + } +} \ No newline at end of file diff --git a/src/Models/Errors/ClerkErrors91.php b/src/Models/Errors/ClerkErrors91.php new file mode 100644 index 0000000..e918987 --- /dev/null +++ b/src/Models/Errors/ClerkErrors91.php @@ -0,0 +1,52 @@ + $errors + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('errors')] + #[\Speakeasy\Serializer\Annotation\Type('array<\Clerk\Backend\Models\Components\ClerkError>')] + public array $errors; + + /** + * + * @var ?Meta $meta + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('meta')] + #[\Speakeasy\Serializer\Annotation\Type('\Clerk\Backend\Models\Errors\Meta|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?Meta $meta = null; + + /** + * @param array $errors + * @param ?Meta $meta + */ + public function __construct(array $errors, ?Meta $meta = null) + { + $this->errors = $errors; + $this->meta = $meta; + } + + public function toException(): ClerkErrors91Throwable + { + $serializer = Utils\JSON::createSerializer(); + $message = $serializer->serialize($this, 'json'); + $code = -1; + + return new ClerkErrors91Throwable($message, (int) $code, $this); + } +} \ No newline at end of file diff --git a/src/Models/Errors/ClerkErrors91Throwable.php b/src/Models/Errors/ClerkErrors91Throwable.php new file mode 100644 index 0000000..cdb97c9 --- /dev/null +++ b/src/Models/Errors/ClerkErrors91Throwable.php @@ -0,0 +1,20 @@ +container = $container; + } +} \ No newline at end of file diff --git a/src/Models/Errors/ClerkErrors92.php b/src/Models/Errors/ClerkErrors92.php new file mode 100644 index 0000000..fc979f1 --- /dev/null +++ b/src/Models/Errors/ClerkErrors92.php @@ -0,0 +1,52 @@ + $errors + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('errors')] + #[\Speakeasy\Serializer\Annotation\Type('array<\Clerk\Backend\Models\Components\ClerkError>')] + public array $errors; + + /** + * + * @var ?Meta $meta + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('meta')] + #[\Speakeasy\Serializer\Annotation\Type('\Clerk\Backend\Models\Errors\Meta|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?Meta $meta = null; + + /** + * @param array $errors + * @param ?Meta $meta + */ + public function __construct(array $errors, ?Meta $meta = null) + { + $this->errors = $errors; + $this->meta = $meta; + } + + public function toException(): ClerkErrors92Throwable + { + $serializer = Utils\JSON::createSerializer(); + $message = $serializer->serialize($this, 'json'); + $code = -1; + + return new ClerkErrors92Throwable($message, (int) $code, $this); + } +} \ No newline at end of file diff --git a/src/Models/Errors/ClerkErrors92Throwable.php b/src/Models/Errors/ClerkErrors92Throwable.php new file mode 100644 index 0000000..0ab0a24 --- /dev/null +++ b/src/Models/Errors/ClerkErrors92Throwable.php @@ -0,0 +1,20 @@ +container = $container; + } +} \ No newline at end of file diff --git a/src/Models/Errors/ClerkErrors93.php b/src/Models/Errors/ClerkErrors93.php new file mode 100644 index 0000000..fc4c100 --- /dev/null +++ b/src/Models/Errors/ClerkErrors93.php @@ -0,0 +1,52 @@ + $errors + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('errors')] + #[\Speakeasy\Serializer\Annotation\Type('array<\Clerk\Backend\Models\Components\ClerkError>')] + public array $errors; + + /** + * + * @var ?Meta $meta + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('meta')] + #[\Speakeasy\Serializer\Annotation\Type('\Clerk\Backend\Models\Errors\Meta|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?Meta $meta = null; + + /** + * @param array $errors + * @param ?Meta $meta + */ + public function __construct(array $errors, ?Meta $meta = null) + { + $this->errors = $errors; + $this->meta = $meta; + } + + public function toException(): ClerkErrors93Throwable + { + $serializer = Utils\JSON::createSerializer(); + $message = $serializer->serialize($this, 'json'); + $code = -1; + + return new ClerkErrors93Throwable($message, (int) $code, $this); + } +} \ No newline at end of file diff --git a/src/Models/Errors/ClerkErrors93Throwable.php b/src/Models/Errors/ClerkErrors93Throwable.php new file mode 100644 index 0000000..08af348 --- /dev/null +++ b/src/Models/Errors/ClerkErrors93Throwable.php @@ -0,0 +1,20 @@ +container = $container; + } +} \ No newline at end of file diff --git a/src/Models/Errors/ClerkErrors94.php b/src/Models/Errors/ClerkErrors94.php new file mode 100644 index 0000000..fac31b3 --- /dev/null +++ b/src/Models/Errors/ClerkErrors94.php @@ -0,0 +1,52 @@ + $errors + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('errors')] + #[\Speakeasy\Serializer\Annotation\Type('array<\Clerk\Backend\Models\Components\ClerkError>')] + public array $errors; + + /** + * + * @var ?Meta $meta + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('meta')] + #[\Speakeasy\Serializer\Annotation\Type('\Clerk\Backend\Models\Errors\Meta|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?Meta $meta = null; + + /** + * @param array $errors + * @param ?Meta $meta + */ + public function __construct(array $errors, ?Meta $meta = null) + { + $this->errors = $errors; + $this->meta = $meta; + } + + public function toException(): ClerkErrors94Throwable + { + $serializer = Utils\JSON::createSerializer(); + $message = $serializer->serialize($this, 'json'); + $code = -1; + + return new ClerkErrors94Throwable($message, (int) $code, $this); + } +} \ No newline at end of file diff --git a/src/Models/Errors/ClerkErrors94Throwable.php b/src/Models/Errors/ClerkErrors94Throwable.php new file mode 100644 index 0000000..a49741a --- /dev/null +++ b/src/Models/Errors/ClerkErrors94Throwable.php @@ -0,0 +1,20 @@ +container = $container; + } +} \ No newline at end of file diff --git a/src/Models/Errors/ClerkErrors95.php b/src/Models/Errors/ClerkErrors95.php new file mode 100644 index 0000000..eca5995 --- /dev/null +++ b/src/Models/Errors/ClerkErrors95.php @@ -0,0 +1,52 @@ + $errors + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('errors')] + #[\Speakeasy\Serializer\Annotation\Type('array<\Clerk\Backend\Models\Components\ClerkError>')] + public array $errors; + + /** + * + * @var ?Meta $meta + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('meta')] + #[\Speakeasy\Serializer\Annotation\Type('\Clerk\Backend\Models\Errors\Meta|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?Meta $meta = null; + + /** + * @param array $errors + * @param ?Meta $meta + */ + public function __construct(array $errors, ?Meta $meta = null) + { + $this->errors = $errors; + $this->meta = $meta; + } + + public function toException(): ClerkErrors95Throwable + { + $serializer = Utils\JSON::createSerializer(); + $message = $serializer->serialize($this, 'json'); + $code = -1; + + return new ClerkErrors95Throwable($message, (int) $code, $this); + } +} \ No newline at end of file diff --git a/src/Models/Errors/ClerkErrors95Throwable.php b/src/Models/Errors/ClerkErrors95Throwable.php new file mode 100644 index 0000000..7ee89cf --- /dev/null +++ b/src/Models/Errors/ClerkErrors95Throwable.php @@ -0,0 +1,20 @@ +container = $container; + } +} \ No newline at end of file diff --git a/src/Models/Errors/ClerkErrors96.php b/src/Models/Errors/ClerkErrors96.php new file mode 100644 index 0000000..86aae7f --- /dev/null +++ b/src/Models/Errors/ClerkErrors96.php @@ -0,0 +1,52 @@ + $errors + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('errors')] + #[\Speakeasy\Serializer\Annotation\Type('array<\Clerk\Backend\Models\Components\ClerkError>')] + public array $errors; + + /** + * + * @var ?Meta $meta + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('meta')] + #[\Speakeasy\Serializer\Annotation\Type('\Clerk\Backend\Models\Errors\Meta|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?Meta $meta = null; + + /** + * @param array $errors + * @param ?Meta $meta + */ + public function __construct(array $errors, ?Meta $meta = null) + { + $this->errors = $errors; + $this->meta = $meta; + } + + public function toException(): ClerkErrors96Throwable + { + $serializer = Utils\JSON::createSerializer(); + $message = $serializer->serialize($this, 'json'); + $code = -1; + + return new ClerkErrors96Throwable($message, (int) $code, $this); + } +} \ No newline at end of file diff --git a/src/Models/Errors/ClerkErrors96Throwable.php b/src/Models/Errors/ClerkErrors96Throwable.php new file mode 100644 index 0000000..7156036 --- /dev/null +++ b/src/Models/Errors/ClerkErrors96Throwable.php @@ -0,0 +1,20 @@ +container = $container; + } +} \ No newline at end of file diff --git a/src/Models/Errors/ClerkErrors97.php b/src/Models/Errors/ClerkErrors97.php new file mode 100644 index 0000000..5502580 --- /dev/null +++ b/src/Models/Errors/ClerkErrors97.php @@ -0,0 +1,52 @@ + $errors + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('errors')] + #[\Speakeasy\Serializer\Annotation\Type('array<\Clerk\Backend\Models\Components\ClerkError>')] + public array $errors; + + /** + * + * @var ?Meta $meta + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('meta')] + #[\Speakeasy\Serializer\Annotation\Type('\Clerk\Backend\Models\Errors\Meta|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?Meta $meta = null; + + /** + * @param array $errors + * @param ?Meta $meta + */ + public function __construct(array $errors, ?Meta $meta = null) + { + $this->errors = $errors; + $this->meta = $meta; + } + + public function toException(): ClerkErrors97Throwable + { + $serializer = Utils\JSON::createSerializer(); + $message = $serializer->serialize($this, 'json'); + $code = -1; + + return new ClerkErrors97Throwable($message, (int) $code, $this); + } +} \ No newline at end of file diff --git a/src/Models/Errors/ClerkErrors97Throwable.php b/src/Models/Errors/ClerkErrors97Throwable.php new file mode 100644 index 0000000..26dee66 --- /dev/null +++ b/src/Models/Errors/ClerkErrors97Throwable.php @@ -0,0 +1,20 @@ +container = $container; + } +} \ No newline at end of file diff --git a/src/Models/Errors/ClerkErrors98.php b/src/Models/Errors/ClerkErrors98.php new file mode 100644 index 0000000..2d0937e --- /dev/null +++ b/src/Models/Errors/ClerkErrors98.php @@ -0,0 +1,52 @@ + $errors + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('errors')] + #[\Speakeasy\Serializer\Annotation\Type('array<\Clerk\Backend\Models\Components\ClerkError>')] + public array $errors; + + /** + * + * @var ?Meta $meta + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('meta')] + #[\Speakeasy\Serializer\Annotation\Type('\Clerk\Backend\Models\Errors\Meta|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?Meta $meta = null; + + /** + * @param array $errors + * @param ?Meta $meta + */ + public function __construct(array $errors, ?Meta $meta = null) + { + $this->errors = $errors; + $this->meta = $meta; + } + + public function toException(): ClerkErrors98Throwable + { + $serializer = Utils\JSON::createSerializer(); + $message = $serializer->serialize($this, 'json'); + $code = -1; + + return new ClerkErrors98Throwable($message, (int) $code, $this); + } +} \ No newline at end of file diff --git a/src/Models/Errors/ClerkErrors98Throwable.php b/src/Models/Errors/ClerkErrors98Throwable.php new file mode 100644 index 0000000..9d7d1b0 --- /dev/null +++ b/src/Models/Errors/ClerkErrors98Throwable.php @@ -0,0 +1,20 @@ +container = $container; + } +} \ No newline at end of file diff --git a/src/Models/Errors/ClerkErrors99.php b/src/Models/Errors/ClerkErrors99.php new file mode 100644 index 0000000..e57450e --- /dev/null +++ b/src/Models/Errors/ClerkErrors99.php @@ -0,0 +1,52 @@ + $errors + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('errors')] + #[\Speakeasy\Serializer\Annotation\Type('array<\Clerk\Backend\Models\Components\ClerkError>')] + public array $errors; + + /** + * + * @var ?Meta $meta + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('meta')] + #[\Speakeasy\Serializer\Annotation\Type('\Clerk\Backend\Models\Errors\Meta|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?Meta $meta = null; + + /** + * @param array $errors + * @param ?Meta $meta + */ + public function __construct(array $errors, ?Meta $meta = null) + { + $this->errors = $errors; + $this->meta = $meta; + } + + public function toException(): ClerkErrors99Throwable + { + $serializer = Utils\JSON::createSerializer(); + $message = $serializer->serialize($this, 'json'); + $code = -1; + + return new ClerkErrors99Throwable($message, (int) $code, $this); + } +} \ No newline at end of file diff --git a/src/Models/Errors/ClerkErrors99Throwable.php b/src/Models/Errors/ClerkErrors99Throwable.php new file mode 100644 index 0000000..918a210 --- /dev/null +++ b/src/Models/Errors/ClerkErrors99Throwable.php @@ -0,0 +1,20 @@ +container = $container; + } +} \ No newline at end of file diff --git a/src/Models/Operations/ChangeProductionInstanceDomainRequestBody.php b/src/Models/Operations/ChangeProductionInstanceDomainRequestBody.php index ebb3198..3448453 100644 --- a/src/Models/Operations/ChangeProductionInstanceDomainRequestBody.php +++ b/src/Models/Operations/ChangeProductionInstanceDomainRequestBody.php @@ -20,11 +20,25 @@ class ChangeProductionInstanceDomainRequestBody #[\Speakeasy\Serializer\Annotation\SkipWhenNull] public ?string $homeUrl = null; + /** + * Whether this is a domain for a secondary app, meaning that any subdomain provided is significant and + * + * will be stored as part of the domain. This is useful for supporting multiple apps (one primary and + * multiple secondaries) on the same root domain (eTLD+1). + * + * @var ?bool $isSecondary + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('is_secondary')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?bool $isSecondary = null; + /** * @param ?string $homeUrl + * @param ?bool $isSecondary */ - public function __construct(?string $homeUrl = null) + public function __construct(?string $homeUrl = null, ?bool $isSecondary = null) { $this->homeUrl = $homeUrl; + $this->isSecondary = $isSecondary; } } \ No newline at end of file diff --git a/src/Models/Operations/CreateActorTokenRequestBody.php b/src/Models/Operations/CreateActorTokenRequestBody.php index 4c0929b..693ab29 100644 --- a/src/Models/Operations/CreateActorTokenRequestBody.php +++ b/src/Models/Operations/CreateActorTokenRequestBody.php @@ -12,7 +12,7 @@ class CreateActorTokenRequestBody { /** - * The ID of the user that can use the newly created sign in token. + * The ID of the user being impersonated. * * @var string $userId */ diff --git a/src/Models/Operations/CreateInvitationPublicMetadata.php b/src/Models/Operations/CreateInvitationPublicMetadata.php deleted file mode 100644 index 83ac5c5..0000000 --- a/src/Models/Operations/CreateInvitationPublicMetadata.php +++ /dev/null @@ -1,24 +0,0 @@ - $publicMetadata */ #[\Speakeasy\Serializer\Annotation\SerializedName('public_metadata')] - #[\Speakeasy\Serializer\Annotation\Type('\Clerk\Backend\Models\Operations\CreateInvitationPublicMetadata|null')] + #[\Speakeasy\Serializer\Annotation\Type('array|null')] #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?CreateInvitationPublicMetadata $publicMetadata = null; + public ?array $publicMetadata = null; /** * Optional URL which specifies where to redirect the user once they click the invitation link. @@ -64,19 +64,30 @@ class CreateInvitationRequestBody #[\Speakeasy\Serializer\Annotation\SkipWhenNull] public ?bool $ignoreExisting = null; + /** + * The number of days the invitation will be valid for. By default, the invitation does not expire. + * + * @var ?int $expiresInDays + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('expires_in_days')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?int $expiresInDays = null; + /** * @param string $emailAddress - * @param ?CreateInvitationPublicMetadata $publicMetadata + * @param ?array $publicMetadata * @param ?string $redirectUrl * @param ?bool $notify * @param ?bool $ignoreExisting + * @param ?int $expiresInDays */ - public function __construct(string $emailAddress, ?CreateInvitationPublicMetadata $publicMetadata = null, ?string $redirectUrl = null, ?bool $notify = true, ?bool $ignoreExisting = false) + public function __construct(string $emailAddress, ?array $publicMetadata = null, ?string $redirectUrl = null, ?int $expiresInDays = null, ?bool $notify = true, ?bool $ignoreExisting = false) { $this->emailAddress = $emailAddress; $this->publicMetadata = $publicMetadata; $this->redirectUrl = $redirectUrl; $this->notify = $notify; $this->ignoreExisting = $ignoreExisting; + $this->expiresInDays = $expiresInDays; } } \ No newline at end of file diff --git a/src/Models/Operations/CreateOrganizationDomainRequest.php b/src/Models/Operations/CreateOrganizationDomainRequest.php new file mode 100644 index 0000000..756be4f --- /dev/null +++ b/src/Models/Operations/CreateOrganizationDomainRequest.php @@ -0,0 +1,38 @@ +organizationId = $organizationId; + $this->requestBody = $requestBody; + } +} \ No newline at end of file diff --git a/src/Models/Operations/CreateOrganizationDomainRequestBody.php b/src/Models/Operations/CreateOrganizationDomainRequestBody.php new file mode 100644 index 0000000..e957111 --- /dev/null +++ b/src/Models/Operations/CreateOrganizationDomainRequestBody.php @@ -0,0 +1,52 @@ +name = $name; + $this->enrollmentMode = $enrollmentMode; + $this->verified = $verified; + } +} \ No newline at end of file diff --git a/src/Models/Operations/CreateOrganizationDomainResponse.php b/src/Models/Operations/CreateOrganizationDomainResponse.php new file mode 100644 index 0000000..059e6c9 --- /dev/null +++ b/src/Models/Operations/CreateOrganizationDomainResponse.php @@ -0,0 +1,55 @@ +contentType = $contentType; + $this->statusCode = $statusCode; + $this->rawResponse = $rawResponse; + $this->organizationDomain = $organizationDomain; + } +} \ No newline at end of file diff --git a/src/Models/Operations/CreateOrganizationInvitationBulkPrivateMetadata.php b/src/Models/Operations/CreateOrganizationInvitationBulkPrivateMetadata.php deleted file mode 100644 index 438a9b7..0000000 --- a/src/Models/Operations/CreateOrganizationInvitationBulkPrivateMetadata.php +++ /dev/null @@ -1,19 +0,0 @@ - $publicMetadata */ #[\Speakeasy\Serializer\Annotation\SerializedName('public_metadata')] - #[\Speakeasy\Serializer\Annotation\Type('\Clerk\Backend\Models\Operations\CreateOrganizationInvitationPublicMetadata|null')] + #[\Speakeasy\Serializer\Annotation\Type('array|null')] #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?CreateOrganizationInvitationPublicMetadata $publicMetadata = null; + public ?array $publicMetadata = null; /** * Metadata saved on the organization invitation, fully accessible (read/write) from the Backend API but not visible from the Frontend API. * - * @var ?CreateOrganizationInvitationPrivateMetadata $privateMetadata + * @var ?array $privateMetadata */ #[\Speakeasy\Serializer\Annotation\SerializedName('private_metadata')] - #[\Speakeasy\Serializer\Annotation\Type('\Clerk\Backend\Models\Operations\CreateOrganizationInvitationPrivateMetadata|null')] + #[\Speakeasy\Serializer\Annotation\Type('array|null')] #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?CreateOrganizationInvitationPrivateMetadata $privateMetadata = null; + public ?array $privateMetadata = null; /** * Optional URL that the invitee will be redirected to once they accept the invitation by clicking the join link in the invitation email. @@ -68,19 +69,19 @@ class CreateOrganizationInvitationRequestBody /** * @param string $emailAddress - * @param string $inviterUserId * @param string $role - * @param ?CreateOrganizationInvitationPublicMetadata $publicMetadata - * @param ?CreateOrganizationInvitationPrivateMetadata $privateMetadata + * @param ?array $publicMetadata + * @param ?array $privateMetadata * @param ?string $redirectUrl + * @param ?string $inviterUserId */ - public function __construct(string $emailAddress, string $inviterUserId, string $role, ?CreateOrganizationInvitationPublicMetadata $publicMetadata = null, ?CreateOrganizationInvitationPrivateMetadata $privateMetadata = null, ?string $redirectUrl = null) + public function __construct(string $emailAddress, string $role, ?array $publicMetadata = null, ?array $privateMetadata = null, ?string $redirectUrl = null, ?string $inviterUserId = null) { $this->emailAddress = $emailAddress; - $this->inviterUserId = $inviterUserId; $this->role = $role; $this->publicMetadata = $publicMetadata; $this->privateMetadata = $privateMetadata; $this->redirectUrl = $redirectUrl; + $this->inviterUserId = $inviterUserId; } } \ No newline at end of file diff --git a/src/Models/Operations/CreateOrganizationPrivateMetadata.php b/src/Models/Operations/CreateOrganizationPrivateMetadata.php deleted file mode 100644 index e9d1789..0000000 --- a/src/Models/Operations/CreateOrganizationPrivateMetadata.php +++ /dev/null @@ -1,19 +0,0 @@ - $privateMetadata */ #[\Speakeasy\Serializer\Annotation\SerializedName('private_metadata')] - #[\Speakeasy\Serializer\Annotation\Type('\Clerk\Backend\Models\Operations\CreateOrganizationPrivateMetadata|null')] + #[\Speakeasy\Serializer\Annotation\Type('array|null')] #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?CreateOrganizationPrivateMetadata $privateMetadata = null; + public ?array $privateMetadata = null; /** * Metadata saved on the organization, read-only from the Frontend API and fully accessible (read/write) from the Backend API * - * @var ?CreateOrganizationPublicMetadata $publicMetadata + * @var ?array $publicMetadata */ #[\Speakeasy\Serializer\Annotation\SerializedName('public_metadata')] - #[\Speakeasy\Serializer\Annotation\Type('\Clerk\Backend\Models\Operations\CreateOrganizationPublicMetadata|null')] + #[\Speakeasy\Serializer\Annotation\Type('array|null')] #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?CreateOrganizationPublicMetadata $publicMetadata = null; + public ?array $publicMetadata = null; /** * A slug for the new organization. @@ -68,15 +70,25 @@ class CreateOrganizationRequestBody #[\Speakeasy\Serializer\Annotation\SkipWhenNull] public ?int $maxAllowedMemberships = null; + /** + * A custom date/time denoting _when_ the organization was created, specified in RFC3339 format (e.g. `2012-10-20T07:15:20.902Z`). + * + * @var ?string $createdAt + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('created_at')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?string $createdAt = null; + /** * @param string $name * @param string $createdBy - * @param ?CreateOrganizationPrivateMetadata $privateMetadata - * @param ?CreateOrganizationPublicMetadata $publicMetadata + * @param ?array $privateMetadata + * @param ?array $publicMetadata * @param ?string $slug * @param ?int $maxAllowedMemberships + * @param ?string $createdAt */ - public function __construct(string $name, string $createdBy, ?CreateOrganizationPrivateMetadata $privateMetadata = null, ?CreateOrganizationPublicMetadata $publicMetadata = null, ?string $slug = null, ?int $maxAllowedMemberships = null) + public function __construct(string $name, string $createdBy, ?array $privateMetadata = null, ?array $publicMetadata = null, ?string $slug = null, ?int $maxAllowedMemberships = null, ?string $createdAt = null) { $this->name = $name; $this->createdBy = $createdBy; @@ -84,5 +96,6 @@ public function __construct(string $name, string $createdBy, ?CreateOrganization $this->publicMetadata = $publicMetadata; $this->slug = $slug; $this->maxAllowedMemberships = $maxAllowedMemberships; + $this->createdAt = $createdAt; } } \ No newline at end of file diff --git a/src/Models/Operations/CreateSAMLConnectionResponse.php b/src/Models/Operations/CreateSAMLConnectionResponse.php index 13d64c7..008bd05 100644 --- a/src/Models/Operations/CreateSAMLConnectionResponse.php +++ b/src/Models/Operations/CreateSAMLConnectionResponse.php @@ -35,21 +35,21 @@ class CreateSAMLConnectionResponse /** * A SAML Connection * - * @var ?Components\SAMLConnection $samlConnection + * @var ?Components\SchemasSAMLConnection $schemasSAMLConnection */ - public ?Components\SAMLConnection $samlConnection = null; + public ?Components\SchemasSAMLConnection $schemasSAMLConnection = null; /** * @param string $contentType * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse - * @param ?Components\SAMLConnection $samlConnection + * @param ?Components\SchemasSAMLConnection $schemasSAMLConnection */ - public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse, ?Components\SAMLConnection $samlConnection = null) + public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse, ?Components\SchemasSAMLConnection $schemasSAMLConnection = null) { $this->contentType = $contentType; $this->statusCode = $statusCode; $this->rawResponse = $rawResponse; - $this->samlConnection = $samlConnection; + $this->schemasSAMLConnection = $schemasSAMLConnection; } } \ No newline at end of file diff --git a/src/Models/Operations/CreateUserRequestBody.php b/src/Models/Operations/CreateUserRequestBody.php index 7e2d5d3..927237d 100644 --- a/src/Models/Operations/CreateUserRequestBody.php +++ b/src/Models/Operations/CreateUserRequestBody.php @@ -116,135 +116,19 @@ class CreateUserRequestBody /** * The hashing algorithm that was used to generate the password digest. * - * The algorithms we support at the moment are [bcrypt](https://en.wikipedia.org/wiki/Bcrypt), [bcrypt_sha256_django](https://docs.djangoproject.com/en/4.0/topics/auth/passwords/), - * [md5](https://en.wikipedia.org/wiki/MD5), pbkdf2_sha256, pbkdf2_sha512, [pbkdf2_sha256_django](https://docs.djangoproject.com/en/4.0/topics/auth/passwords/), - * [phpass](https://www.openwall.com/phpass/), [scrypt_firebase](https://firebaseopensource.com/projects/firebase/scrypt/), - * [scrypt_werkzeug](https://werkzeug.palletsprojects.com/en/3.0.x/utils/#werkzeug.security.generate_password_hash), [sha256](https://en.wikipedia.org/wiki/SHA-2) - * and the [argon2](https://argon2.online/) variants argon2i and argon2id. * - * If you need support for any particular hashing algorithm, [please let us know](https://clerk.com/support). + * The algorithms we support at the moment are [`bcrypt`](https://en.wikipedia.org/wiki/Bcrypt), [`bcrypt_sha256_django`](https://docs.djangoproject.com/en/4.0/topics/auth/passwords/), [`md5`](https://en.wikipedia.org/wiki/MD5), `pbkdf2_sha1`, `pbkdf2_sha256`, [`pbkdf2_sha256_django`](https://docs.djangoproject.com/en/4.0/topics/auth/passwords/), + * [`phpass`](https://www.openwall.com/phpass/), [`scrypt_firebase`](https://firebaseopensource.com/projects/firebase/scrypt/), + * [`scrypt_werkzeug`](https://werkzeug.palletsprojects.com/en/3.0.x/utils/#werkzeug.security.generate_password_hash), [`sha256`](https://en.wikipedia.org/wiki/SHA-2), + * and the [`argon2`](https://argon2.online/) variants: `argon2i` and `argon2id`. * - * Note: for password hashers considered insecure (at this moment MD5 and SHA256), the corresponding user password hashes will be transparently migrated to Bcrypt (a secure hasher) upon the user's first successful password sign in. - * Insecure schemes are marked with `(insecure)` in the list below. + * Each of the supported hashers expects the incoming digest to be in a particular format. See the [Clerk docs](https://clerk.com/docs/references/backend/user/create-user) for more information. * - * Each of the supported hashers expects the incoming digest to be in a particular format. Specifically: - * - * **bcrypt:** The digest should be of the following form: - * - * `$$$` - * - * **bcrypt_sha256_django:** This is the Django-specific variant of Bcrypt, using SHA256 hashing function. The format should be as follows (as exported from Django): - * - * `bcrypt_sha256$$$$` - * - * **md5** (insecure): The digest should follow the regular form e.g.: - * - * `5f4dcc3b5aa765d61d8327deb882cf99` - * - * **pbkdf2_sha256:** This is the PBKDF2 algorithm using the SHA256 hashing function. The format should be as follows: - * - * `pbkdf2_sha256$$$` - * - * Note: Both the salt and the hash are expected to be base64-encoded. - * - * **pbkdf2_sha512:** This is the PBKDF2 algorithm using the SHA512 hashing function. The format should be as follows: - * - * `pbkdf2_sha512$$$` - * - * _iterations:_ The number of iterations used. Must be an integer less than 420000. - * _salt:_ The salt used when generating the hash. Must be less than 1024 bytes. - * _hash:_ The hex-encoded hash. Must have been generated with a key length less than 1024 bytes. - * - * **pbkdf2_sha256_django:** This is the Django-specific variant of PBKDF2 and the digest should have the following format (as exported from Django): - * - * `pbkdf2_sha256$$$` - * - * Note: The salt is expected to be un-encoded, the hash is expected base64-encoded. - * - * **pbkdf2_sha1:** This is similar to pkbdf2_sha256_django, but with two differences: - * 1. uses sha1 instead of sha256 - * 2. accepts the hash as a hex-encoded string - * - * The format is the following: - * - * `pbkdf2_sha1$$$` - * - * **phpass:** Portable public domain password hashing framework for use in PHP applications. Digests hashed with phpass have the following sections: - * - * The format is the following: - * - * `$P$` - * - * - $P$ is the prefix used to identify phpass hashes. - * - rounds is a single character encoding a 6-bit integer representing the number of rounds used. - * - salt is eight characters drawn from [./0-9A-Za-z], providing a 48-bit salt. - * - checksum is 22 characters drawn from the same set, encoding the 128-bit checksum with MD5. - * - * **scrypt_firebase:** The Firebase-specific variant of scrypt. - * The value is expected to have 6 segments separated by the $ character and include the following information: - * - * _hash:_ The actual Base64 hash. This can be retrieved when exporting the user from Firebase. - * _salt:_ The salt used to generate the above hash. Again, this is given when exporting the user. - * _signer key:_ The base64 encoded signer key. - * _salt separator:_ The base64 encoded salt separator. - * _rounds:_ The number of rounds the algorithm needs to run. - * _memory cost:_ The cost of the algorithm run - * - * The first 2 (hash and salt) are per user and can be retrieved when exporting the user from Firebase. - * The other 4 values (signer key, salt separator, rounds and memory cost) are project-wide settings and can be retrieved from the project's password hash parameters. - * - * Once you have all these, you can combine it in the following format and send this as the digest in order for Clerk to accept it: - * - * `$$$$$` - * - * **scrypt_werkzeug:** The Werkzeug-specific variant of scrypt. - * - * The value is expected to have 3 segments separated by the $ character and include the following information: - * - * _algorithm args:_ The algorithm used to generate the hash. - * _salt:_ The salt used to generate the above hash. - * _hash:_ The actual Base64 hash. - * - * The algorithm args are the parameters used to generate the hash and are included in the digest. - * - * **argon2i:** Algorithms in the argon2 family generate digests that encode the following information: - * - * _version (v):_ The argon version, version 19 is assumed - * _memory (m):_ The memory used by the algorithm (in kibibytes) - * _iterations (t):_ The number of iterations to perform - * _parallelism (p):_ The number of threads to use - * - * Parts are demarcated by the `$` character, with the first part identifying the algorithm variant. - * The middle part is a comma-separated list of the encoding options (memory, iterations, parallelism). - * The final part is the actual digest. - * - * `$argon2i$v=19$m=4096,t=3,p=1$4t6CL3P7YiHBtwESXawI8Hm20zJj4cs7/4/G3c187e0$m7RQFczcKr5bIR0IIxbpO2P0tyrLjf3eUW3M3QSwnLc` - * - * **argon2id:** See the previous algorithm for an explanation of the formatting. - * - * For the argon2id case, the value of the algorithm in the first part of the digest is `argon2id`: - * - * `$argon2id$v=19$m=64,t=4,p=8$Z2liZXJyaXNo$iGXEpMBTDYQ8G/71tF0qGjxRHEmR3gpGULcE93zUJVU` - * - * **sha256** (insecure): The digest should be a 64-length hex string, e.g.: - * - * `9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08` - * - * **sha256_salted** (insecure): The digest should be a 64-length hex string with a salt. - * - * The format is the following: - * `$` - * - * The value is expected to have 2 segments separated by the $ character and include the following information: - * _hash:_ The sha256 hash, a 64-length hex string. - * _salt:_ The salt used to generate the above hash. Must be between 1 and 1024 bits. - * - * @var ?PasswordHasher $passwordHasher + * @var ?string $passwordHasher */ #[\Speakeasy\Serializer\Annotation\SerializedName('password_hasher')] - #[\Speakeasy\Serializer\Annotation\Type('\Clerk\Backend\Models\Operations\PasswordHasher|null')] #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?PasswordHasher $passwordHasher = null; + public ?string $passwordHasher = null; /** * When set to `true` all password checks are skipped. @@ -299,34 +183,87 @@ class CreateUserRequestBody /** * Metadata saved on the user, that is visible to both your Frontend and Backend APIs * - * @var ?PublicMetadata $publicMetadata + * @var ?array $publicMetadata */ #[\Speakeasy\Serializer\Annotation\SerializedName('public_metadata')] - #[\Speakeasy\Serializer\Annotation\Type('\Clerk\Backend\Models\Operations\PublicMetadata|null')] + #[\Speakeasy\Serializer\Annotation\Type('array|null')] #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?PublicMetadata $publicMetadata = null; + public ?array $publicMetadata = null; /** * Metadata saved on the user, that is only visible to your Backend API * - * @var ?PrivateMetadata $privateMetadata + * @var ?array $privateMetadata */ #[\Speakeasy\Serializer\Annotation\SerializedName('private_metadata')] - #[\Speakeasy\Serializer\Annotation\Type('\Clerk\Backend\Models\Operations\PrivateMetadata|null')] + #[\Speakeasy\Serializer\Annotation\Type('array|null')] #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?PrivateMetadata $privateMetadata = null; + public ?array $privateMetadata = null; /** * Metadata saved on the user, that can be updated from both the Frontend and Backend APIs. * * Note: Since this data can be modified from the frontend, it is not guaranteed to be safe. * - * @var ?UnsafeMetadata $unsafeMetadata + * @var ?array $unsafeMetadata */ #[\Speakeasy\Serializer\Annotation\SerializedName('unsafe_metadata')] - #[\Speakeasy\Serializer\Annotation\Type('\Clerk\Backend\Models\Operations\UnsafeMetadata|null')] + #[\Speakeasy\Serializer\Annotation\Type('array|null')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?array $unsafeMetadata = null; + + /** + * If enabled, user can delete themselves via FAPI. + * + * + * + * @var ?bool $deleteSelfEnabled + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('delete_self_enabled')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?bool $deleteSelfEnabled = null; + + /** + * A custom timestamp denoting _when_ the user accepted legal requirements, specified in RFC3339 format (e.g. `2012-10-20T07:15:20.902Z`). + * + * @var ?string $legalAcceptedAt + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('legal_accepted_at')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?string $legalAcceptedAt = null; + + /** + * When set to `true` all legal checks are skipped. + * + * It is not recommended to skip legal checks unless you are migrating a user to Clerk. + * + * @var ?bool $skipLegalChecks + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('skip_legal_checks')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?bool $skipLegalChecks = null; + + /** + * If enabled, user can create organizations via FAPI. + * + * + * + * @var ?bool $createOrganizationEnabled + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('create_organization_enabled')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?bool $createOrganizationEnabled = null; + + /** + * The maximum number of organizations the user can create. 0 means unlimited. + * + * + * + * @var ?int $createOrganizationsLimit + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('create_organizations_limit')] #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?UnsafeMetadata $unsafeMetadata = null; + public ?int $createOrganizationsLimit = null; /** * A custom date/time denoting _when_ the user signed up to the application, specified in RFC3339 format (e.g. `2012-10-20T07:15:20.902Z`). @@ -342,22 +279,27 @@ class CreateUserRequestBody * @param ?array $phoneNumber * @param ?array $web3Wallet * @param ?string $passwordDigest - * @param ?PasswordHasher $passwordHasher + * @param ?string $passwordHasher * @param ?bool $skipPasswordChecks * @param ?bool $skipPasswordRequirement * @param ?string $totpSecret * @param ?array $backupCodes - * @param ?PublicMetadata $publicMetadata - * @param ?PrivateMetadata $privateMetadata - * @param ?UnsafeMetadata $unsafeMetadata + * @param ?array $publicMetadata + * @param ?array $privateMetadata + * @param ?array $unsafeMetadata * @param ?string $createdAt * @param ?string $externalId * @param ?string $firstName * @param ?string $lastName * @param ?string $username * @param ?string $password + * @param ?bool $deleteSelfEnabled + * @param ?string $legalAcceptedAt + * @param ?bool $skipLegalChecks + * @param ?bool $createOrganizationEnabled + * @param ?int $createOrganizationsLimit */ - public function __construct(?array $emailAddress = null, ?array $phoneNumber = null, ?array $web3Wallet = null, ?string $passwordDigest = null, ?PasswordHasher $passwordHasher = null, ?bool $skipPasswordChecks = null, ?bool $skipPasswordRequirement = null, ?string $totpSecret = null, ?array $backupCodes = null, ?PublicMetadata $publicMetadata = null, ?PrivateMetadata $privateMetadata = null, ?UnsafeMetadata $unsafeMetadata = null, ?string $createdAt = null, ?string $externalId = null, ?string $firstName = null, ?string $lastName = null, ?string $username = null, ?string $password = null) + public function __construct(?array $emailAddress = null, ?array $phoneNumber = null, ?array $web3Wallet = null, ?string $passwordDigest = null, ?string $passwordHasher = null, ?bool $skipPasswordChecks = null, ?bool $skipPasswordRequirement = null, ?string $totpSecret = null, ?array $backupCodes = null, ?array $publicMetadata = null, ?array $privateMetadata = null, ?array $unsafeMetadata = null, ?string $createdAt = null, ?string $externalId = null, ?string $firstName = null, ?string $lastName = null, ?string $username = null, ?string $password = null, ?bool $deleteSelfEnabled = null, ?string $legalAcceptedAt = null, ?bool $skipLegalChecks = null, ?bool $createOrganizationEnabled = null, ?int $createOrganizationsLimit = null) { $this->emailAddress = $emailAddress; $this->phoneNumber = $phoneNumber; @@ -377,5 +319,10 @@ public function __construct(?array $emailAddress = null, ?array $phoneNumber = n $this->lastName = $lastName; $this->username = $username; $this->password = $password; + $this->deleteSelfEnabled = $deleteSelfEnabled; + $this->legalAcceptedAt = $legalAcceptedAt; + $this->skipLegalChecks = $skipLegalChecks; + $this->createOrganizationEnabled = $createOrganizationEnabled; + $this->createOrganizationsLimit = $createOrganizationsLimit; } } \ No newline at end of file diff --git a/src/Models/Operations/CreateUserTOTPRequest.php b/src/Models/Operations/CreateUserTOTPRequest.php new file mode 100644 index 0000000..a6658f4 --- /dev/null +++ b/src/Models/Operations/CreateUserTOTPRequest.php @@ -0,0 +1,29 @@ +userId = $userId; + } +} \ No newline at end of file diff --git a/src/Models/Operations/CreateUserTOTPResponse.php b/src/Models/Operations/CreateUserTOTPResponse.php new file mode 100644 index 0000000..32b56f1 --- /dev/null +++ b/src/Models/Operations/CreateUserTOTPResponse.php @@ -0,0 +1,55 @@ + $totp + */ + public ?array $totp = null; + + /** + * @param string $contentType + * @param int $statusCode + * @param \Psr\Http\Message\ResponseInterface $rawResponse + * @param ?array $totp + */ + public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse, ?array $totp = null) + { + $this->contentType = $contentType; + $this->statusCode = $statusCode; + $this->rawResponse = $rawResponse; + $this->totp = $totp; + } +} \ No newline at end of file diff --git a/src/Models/Operations/DeleteBackupCodeRequest.php b/src/Models/Operations/DeleteBackupCodeRequest.php new file mode 100644 index 0000000..78152f8 --- /dev/null +++ b/src/Models/Operations/DeleteBackupCodeRequest.php @@ -0,0 +1,29 @@ +userId = $userId; + } +} \ No newline at end of file diff --git a/src/Models/Operations/DeleteBackupCodeResponse.php b/src/Models/Operations/DeleteBackupCodeResponse.php new file mode 100644 index 0000000..dd55fbe --- /dev/null +++ b/src/Models/Operations/DeleteBackupCodeResponse.php @@ -0,0 +1,55 @@ +contentType = $contentType; + $this->statusCode = $statusCode; + $this->rawResponse = $rawResponse; + $this->object = $object; + } +} \ No newline at end of file diff --git a/src/Models/Operations/DeleteBackupCodeResponseBody.php b/src/Models/Operations/DeleteBackupCodeResponseBody.php new file mode 100644 index 0000000..553f8b5 --- /dev/null +++ b/src/Models/Operations/DeleteBackupCodeResponseBody.php @@ -0,0 +1,30 @@ +userId = $userId; + } +} \ No newline at end of file diff --git a/src/Models/Operations/DeleteExternalAccountRequest.php b/src/Models/Operations/DeleteExternalAccountRequest.php new file mode 100644 index 0000000..29377ab --- /dev/null +++ b/src/Models/Operations/DeleteExternalAccountRequest.php @@ -0,0 +1,39 @@ +userId = $userId; + $this->externalAccountId = $externalAccountId; + } +} \ No newline at end of file diff --git a/src/Models/Operations/DeleteExternalAccountResponse.php b/src/Models/Operations/DeleteExternalAccountResponse.php new file mode 100644 index 0000000..d484ee6 --- /dev/null +++ b/src/Models/Operations/DeleteExternalAccountResponse.php @@ -0,0 +1,55 @@ +contentType = $contentType; + $this->statusCode = $statusCode; + $this->rawResponse = $rawResponse; + $this->deletedObject = $deletedObject; + } +} \ No newline at end of file diff --git a/src/Models/Operations/DeleteOrganizationDomainRequest.php b/src/Models/Operations/DeleteOrganizationDomainRequest.php new file mode 100644 index 0000000..fbf3521 --- /dev/null +++ b/src/Models/Operations/DeleteOrganizationDomainRequest.php @@ -0,0 +1,39 @@ +organizationId = $organizationId; + $this->domainId = $domainId; + } +} \ No newline at end of file diff --git a/src/Models/Operations/DeleteOrganizationDomainResponse.php b/src/Models/Operations/DeleteOrganizationDomainResponse.php new file mode 100644 index 0000000..79072b8 --- /dev/null +++ b/src/Models/Operations/DeleteOrganizationDomainResponse.php @@ -0,0 +1,55 @@ +contentType = $contentType; + $this->statusCode = $statusCode; + $this->rawResponse = $rawResponse; + $this->deletedObject = $deletedObject; + } +} \ No newline at end of file diff --git a/src/Models/Operations/DeleteTOTPRequest.php b/src/Models/Operations/DeleteTOTPRequest.php new file mode 100644 index 0000000..75f0403 --- /dev/null +++ b/src/Models/Operations/DeleteTOTPRequest.php @@ -0,0 +1,29 @@ +userId = $userId; + } +} \ No newline at end of file diff --git a/src/Models/Operations/DeleteTOTPResponse.php b/src/Models/Operations/DeleteTOTPResponse.php new file mode 100644 index 0000000..e4f4479 --- /dev/null +++ b/src/Models/Operations/DeleteTOTPResponse.php @@ -0,0 +1,55 @@ +contentType = $contentType; + $this->statusCode = $statusCode; + $this->rawResponse = $rawResponse; + $this->object = $object; + } +} \ No newline at end of file diff --git a/src/Models/Operations/DeleteTOTPResponseBody.php b/src/Models/Operations/DeleteTOTPResponseBody.php new file mode 100644 index 0000000..c6b4f91 --- /dev/null +++ b/src/Models/Operations/DeleteTOTPResponseBody.php @@ -0,0 +1,30 @@ +userId = $userId; + } +} \ No newline at end of file diff --git a/src/Models/Operations/GetClientListRequest.php b/src/Models/Operations/GetClientListRequest.php index 8252238..7379e90 100644 --- a/src/Models/Operations/GetClientListRequest.php +++ b/src/Models/Operations/GetClientListRequest.php @@ -16,10 +16,10 @@ class GetClientListRequest * * Can be used for paginating the results together with `offset`. * - * @var ?float $limit + * @var ?int $limit */ #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=limit')] - public ?float $limit = null; + public ?int $limit = null; /** * Skip the first `offset` results when paginating. @@ -27,16 +27,16 @@ class GetClientListRequest * Needs to be an integer greater or equal to zero. * To be used in conjunction with `limit`. * - * @var ?float $offset + * @var ?int $offset */ #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=offset')] - public ?float $offset = null; + public ?int $offset = null; /** - * @param ?float $limit - * @param ?float $offset + * @param ?int $limit + * @param ?int $offset */ - public function __construct(?float $limit = 10, ?float $offset = 0) + public function __construct(?int $limit = 10, ?int $offset = 0) { $this->limit = $limit; $this->offset = $offset; diff --git a/src/Models/Operations/GetJWKSResponse.php b/src/Models/Operations/GetJWKSResponse.php index a16d6a9..d71a6ef 100644 --- a/src/Models/Operations/GetJWKSResponse.php +++ b/src/Models/Operations/GetJWKSResponse.php @@ -8,7 +8,7 @@ namespace Clerk\Backend\Models\Operations; - +use Clerk\Backend\Models\Components; class GetJWKSResponse { /** @@ -32,15 +32,24 @@ class GetJWKSResponse */ public \Psr\Http\Message\ResponseInterface $rawResponse; + /** + * Get the JSON Web Key Set + * + * @var ?Components\WellKnownJWKS $wellKnownJWKS + */ + public ?Components\WellKnownJWKS $wellKnownJWKS = null; + /** * @param string $contentType * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse + * @param ?Components\WellKnownJWKS $wellKnownJWKS */ - public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse) + public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse, ?Components\WellKnownJWKS $wellKnownJWKS = null) { $this->contentType = $contentType; $this->statusCode = $statusCode; $this->rawResponse = $rawResponse; + $this->wellKnownJWKS = $wellKnownJWKS; } } \ No newline at end of file diff --git a/src/Models/Operations/GetOAuthAccessTokenPublicMetadata.php b/src/Models/Operations/GetOAuthAccessTokenPublicMetadata.php deleted file mode 100644 index 09f1b33..0000000 --- a/src/Models/Operations/GetOAuthAccessTokenPublicMetadata.php +++ /dev/null @@ -1,18 +0,0 @@ -organizationId = $organizationId; + $this->includeMembersCount = $includeMembersCount; } } \ No newline at end of file diff --git a/src/Models/Operations/GetSAMLConnectionResponse.php b/src/Models/Operations/GetSAMLConnectionResponse.php index eb5bace..3f59e63 100644 --- a/src/Models/Operations/GetSAMLConnectionResponse.php +++ b/src/Models/Operations/GetSAMLConnectionResponse.php @@ -35,21 +35,21 @@ class GetSAMLConnectionResponse /** * A SAML Connection * - * @var ?Components\SAMLConnection $samlConnection + * @var ?Components\SchemasSAMLConnection $schemasSAMLConnection */ - public ?Components\SAMLConnection $samlConnection = null; + public ?Components\SchemasSAMLConnection $schemasSAMLConnection = null; /** * @param string $contentType * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse - * @param ?Components\SAMLConnection $samlConnection + * @param ?Components\SchemasSAMLConnection $schemasSAMLConnection */ - public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse, ?Components\SAMLConnection $samlConnection = null) + public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse, ?Components\SchemasSAMLConnection $schemasSAMLConnection = null) { $this->contentType = $contentType; $this->statusCode = $statusCode; $this->rawResponse = $rawResponse; - $this->samlConnection = $samlConnection; + $this->schemasSAMLConnection = $schemasSAMLConnection; } } \ No newline at end of file diff --git a/src/Models/Operations/GetSessionListRequest.php b/src/Models/Operations/GetSessionListRequest.php index 025482e..6605781 100644 --- a/src/Models/Operations/GetSessionListRequest.php +++ b/src/Models/Operations/GetSessionListRequest.php @@ -40,10 +40,10 @@ class GetSessionListRequest * * Can be used for paginating the results together with `offset`. * - * @var ?float $limit + * @var ?int $limit */ #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=limit')] - public ?float $limit = null; + public ?int $limit = null; /** * Skip the first `offset` results when paginating. @@ -51,19 +51,19 @@ class GetSessionListRequest * Needs to be an integer greater or equal to zero. * To be used in conjunction with `limit`. * - * @var ?float $offset + * @var ?int $offset */ #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=offset')] - public ?float $offset = null; + public ?int $offset = null; /** * @param ?string $clientId * @param ?string $userId * @param ?Status $status - * @param ?float $limit - * @param ?float $offset + * @param ?int $limit + * @param ?int $offset */ - public function __construct(?string $clientId = null, ?string $userId = null, ?Status $status = null, ?float $limit = 10, ?float $offset = 0) + public function __construct(?string $clientId = null, ?string $userId = null, ?Status $status = null, ?int $limit = 10, ?int $offset = 0) { $this->clientId = $clientId; $this->userId = $userId; diff --git a/src/Models/Operations/GetUserListRequest.php b/src/Models/Operations/GetUserListRequest.php index a2c179b..40e1469 100644 --- a/src/Models/Operations/GetUserListRequest.php +++ b/src/Models/Operations/GetUserListRequest.php @@ -127,10 +127,10 @@ class GetUserListRequest * * Can be used for paginating the results together with `offset`. * - * @var ?float $limit + * @var ?int $limit */ #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=limit')] - public ?float $limit = null; + public ?int $limit = null; /** * Skip the first `offset` results when paginating. @@ -138,10 +138,10 @@ class GetUserListRequest * Needs to be an integer greater or equal to zero. * To be used in conjunction with `limit`. * - * @var ?float $offset + * @var ?int $offset */ #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=offset')] - public ?float $offset = null; + public ?int $offset = null; /** * Allows to return users in a particular order. @@ -167,11 +167,11 @@ class GetUserListRequest * @param ?array $organizationId * @param ?string $query * @param ?int $lastActiveAtSince - * @param ?float $limit - * @param ?float $offset + * @param ?int $limit + * @param ?int $offset * @param ?string $orderBy */ - public function __construct(?array $emailAddress = null, ?array $phoneNumber = null, ?array $externalId = null, ?array $username = null, ?array $web3Wallet = null, ?array $userId = null, ?array $organizationId = null, ?string $query = null, ?int $lastActiveAtSince = null, ?float $limit = 10, ?float $offset = 0, ?string $orderBy = '-created_at') + public function __construct(?array $emailAddress = null, ?array $phoneNumber = null, ?array $externalId = null, ?array $username = null, ?array $web3Wallet = null, ?array $userId = null, ?array $organizationId = null, ?string $query = null, ?int $lastActiveAtSince = null, ?int $limit = 10, ?int $offset = 0, ?string $orderBy = '-created_at') { $this->emailAddress = $emailAddress; $this->phoneNumber = $phoneNumber; diff --git a/src/Models/Operations/InstanceGetOrganizationMembershipsRequest.php b/src/Models/Operations/InstanceGetOrganizationMembershipsRequest.php new file mode 100644 index 0000000..8011b27 --- /dev/null +++ b/src/Models/Operations/InstanceGetOrganizationMembershipsRequest.php @@ -0,0 +1,57 @@ +limit = $limit; + $this->offset = $offset; + $this->orderBy = $orderBy; + } +} \ No newline at end of file diff --git a/src/Models/Operations/InstanceGetOrganizationMembershipsResponse.php b/src/Models/Operations/InstanceGetOrganizationMembershipsResponse.php new file mode 100644 index 0000000..87610e2 --- /dev/null +++ b/src/Models/Operations/InstanceGetOrganizationMembershipsResponse.php @@ -0,0 +1,55 @@ +contentType = $contentType; + $this->statusCode = $statusCode; + $this->rawResponse = $rawResponse; + $this->organizationMemberships = $organizationMemberships; + } +} \ No newline at end of file diff --git a/src/Models/Operations/ListInstanceOrganizationInvitationsQueryParamStatus.php b/src/Models/Operations/ListInstanceOrganizationInvitationsQueryParamStatus.php new file mode 100644 index 0000000..dc071c2 --- /dev/null +++ b/src/Models/Operations/ListInstanceOrganizationInvitationsQueryParamStatus.php @@ -0,0 +1,18 @@ +limit = $limit; + $this->offset = $offset; + $this->orderBy = $orderBy; + $this->status = $status; + $this->query = $query; + } +} \ No newline at end of file diff --git a/src/Models/Operations/ListInstanceOrganizationInvitationsResponse.php b/src/Models/Operations/ListInstanceOrganizationInvitationsResponse.php new file mode 100644 index 0000000..e687220 --- /dev/null +++ b/src/Models/Operations/ListInstanceOrganizationInvitationsResponse.php @@ -0,0 +1,55 @@ +contentType = $contentType; + $this->statusCode = $statusCode; + $this->rawResponse = $rawResponse; + $this->organizationInvitationsWithPublicOrganizationData = $organizationInvitationsWithPublicOrganizationData; + } +} \ No newline at end of file diff --git a/src/Models/Operations/ListInvitationsQueryParamStatus.php b/src/Models/Operations/ListInvitationsQueryParamStatus.php new file mode 100644 index 0000000..dcf39d1 --- /dev/null +++ b/src/Models/Operations/ListInvitationsQueryParamStatus.php @@ -0,0 +1,19 @@ +limit = $limit; $this->offset = $offset; diff --git a/src/Models/Operations/ListOAuthApplicationsRequest.php b/src/Models/Operations/ListOAuthApplicationsRequest.php index 9933793..ae44a0e 100644 --- a/src/Models/Operations/ListOAuthApplicationsRequest.php +++ b/src/Models/Operations/ListOAuthApplicationsRequest.php @@ -16,10 +16,10 @@ class ListOAuthApplicationsRequest * * Can be used for paginating the results together with `offset`. * - * @var ?float $limit + * @var ?int $limit */ #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=limit')] - public ?float $limit = null; + public ?int $limit = null; /** * Skip the first `offset` results when paginating. @@ -27,16 +27,16 @@ class ListOAuthApplicationsRequest * Needs to be an integer greater or equal to zero. * To be used in conjunction with `limit`. * - * @var ?float $offset + * @var ?int $offset */ #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=offset')] - public ?float $offset = null; + public ?int $offset = null; /** - * @param ?float $limit - * @param ?float $offset + * @param ?int $limit + * @param ?int $offset */ - public function __construct(?float $limit = 10, ?float $offset = 0) + public function __construct(?int $limit = 10, ?int $offset = 0) { $this->limit = $limit; $this->offset = $offset; diff --git a/src/Models/Operations/ListOrganizationDomainsRequest.php b/src/Models/Operations/ListOrganizationDomainsRequest.php new file mode 100644 index 0000000..2194a58 --- /dev/null +++ b/src/Models/Operations/ListOrganizationDomainsRequest.php @@ -0,0 +1,74 @@ +organizationId = $organizationId; + $this->limit = $limit; + $this->offset = $offset; + $this->verified = $verified; + $this->enrollmentMode = $enrollmentMode; + } +} \ No newline at end of file diff --git a/src/Models/Operations/ListOrganizationDomainsResponse.php b/src/Models/Operations/ListOrganizationDomainsResponse.php new file mode 100644 index 0000000..b8ced1c --- /dev/null +++ b/src/Models/Operations/ListOrganizationDomainsResponse.php @@ -0,0 +1,55 @@ +contentType = $contentType; + $this->statusCode = $statusCode; + $this->rawResponse = $rawResponse; + $this->organizationDomains = $organizationDomains; + } +} \ No newline at end of file diff --git a/src/Models/Operations/ListOrganizationInvitationsRequest.php b/src/Models/Operations/ListOrganizationInvitationsRequest.php index 4bb3370..d8ae4c0 100644 --- a/src/Models/Operations/ListOrganizationInvitationsRequest.php +++ b/src/Models/Operations/ListOrganizationInvitationsRequest.php @@ -24,10 +24,10 @@ class ListOrganizationInvitationsRequest * * Can be used for paginating the results together with `offset`. * - * @var ?float $limit + * @var ?int $limit */ #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=limit')] - public ?float $limit = null; + public ?int $limit = null; /** * Skip the first `offset` results when paginating. @@ -35,10 +35,10 @@ class ListOrganizationInvitationsRequest * Needs to be an integer greater or equal to zero. * To be used in conjunction with `limit`. * - * @var ?float $offset + * @var ?int $offset */ #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=offset')] - public ?float $offset = null; + public ?int $offset = null; /** * Filter organization invitations based on their status @@ -50,11 +50,11 @@ class ListOrganizationInvitationsRequest /** * @param string $organizationId - * @param ?float $limit - * @param ?float $offset + * @param ?int $limit + * @param ?int $offset * @param ?ListOrganizationInvitationsQueryParamStatus $status */ - public function __construct(string $organizationId, ?ListOrganizationInvitationsQueryParamStatus $status = null, ?float $limit = 10, ?float $offset = 0) + public function __construct(string $organizationId, ?ListOrganizationInvitationsQueryParamStatus $status = null, ?int $limit = 10, ?int $offset = 0) { $this->organizationId = $organizationId; $this->limit = $limit; diff --git a/src/Models/Operations/ListOrganizationMembershipsRequest.php b/src/Models/Operations/ListOrganizationMembershipsRequest.php index d3fa7fb..0b22d4a 100644 --- a/src/Models/Operations/ListOrganizationMembershipsRequest.php +++ b/src/Models/Operations/ListOrganizationMembershipsRequest.php @@ -24,10 +24,10 @@ class ListOrganizationMembershipsRequest * * Can be used for paginating the results together with `offset`. * - * @var ?float $limit + * @var ?int $limit */ #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=limit')] - public ?float $limit = null; + public ?int $limit = null; /** * Skip the first `offset` results when paginating. @@ -35,10 +35,10 @@ class ListOrganizationMembershipsRequest * Needs to be an integer greater or equal to zero. * To be used in conjunction with `limit`. * - * @var ?float $offset + * @var ?int $offset */ #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=offset')] - public ?float $offset = null; + public ?int $offset = null; /** * Sorts organizations memberships by phone_number, email_address, created_at, first_name, last_name or username. @@ -53,11 +53,11 @@ class ListOrganizationMembershipsRequest /** * @param string $organizationId - * @param ?float $limit - * @param ?float $offset + * @param ?int $limit + * @param ?int $offset * @param ?string $orderBy */ - public function __construct(string $organizationId, ?string $orderBy = null, ?float $limit = 10, ?float $offset = 0) + public function __construct(string $organizationId, ?string $orderBy = null, ?int $limit = 10, ?int $offset = 0) { $this->organizationId = $organizationId; $this->limit = $limit; diff --git a/src/Models/Operations/ListOrganizationsRequest.php b/src/Models/Operations/ListOrganizationsRequest.php index 662edfd..44d3b0c 100644 --- a/src/Models/Operations/ListOrganizationsRequest.php +++ b/src/Models/Operations/ListOrganizationsRequest.php @@ -16,10 +16,10 @@ class ListOrganizationsRequest * * Can be used for paginating the results together with `offset`. * - * @var ?float $limit + * @var ?int $limit */ #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=limit')] - public ?float $limit = null; + public ?int $limit = null; /** * Skip the first `offset` results when paginating. @@ -27,10 +27,10 @@ class ListOrganizationsRequest * Needs to be an integer greater or equal to zero. * To be used in conjunction with `limit`. * - * @var ?float $offset + * @var ?int $offset */ #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=offset')] - public ?float $offset = null; + public ?int $offset = null; /** * Flag to denote whether the member counts of each organization should be included in the response or not. @@ -65,13 +65,13 @@ class ListOrganizationsRequest public ?string $orderBy = null; /** - * @param ?float $limit - * @param ?float $offset + * @param ?int $limit + * @param ?int $offset * @param ?bool $includeMembersCount * @param ?string $query * @param ?string $orderBy */ - public function __construct(?bool $includeMembersCount = null, ?string $query = null, ?float $limit = 10, ?float $offset = 0, ?string $orderBy = '-created_at') + public function __construct(?bool $includeMembersCount = null, ?string $query = null, ?int $limit = 10, ?int $offset = 0, ?string $orderBy = '-created_at') { $this->limit = $limit; $this->offset = $offset; diff --git a/src/Models/Operations/ListPendingOrganizationInvitationsRequest.php b/src/Models/Operations/ListPendingOrganizationInvitationsRequest.php index 28ab2c9..1a1e929 100644 --- a/src/Models/Operations/ListPendingOrganizationInvitationsRequest.php +++ b/src/Models/Operations/ListPendingOrganizationInvitationsRequest.php @@ -24,10 +24,10 @@ class ListPendingOrganizationInvitationsRequest * * Can be used for paginating the results together with `offset`. * - * @var ?float $limit + * @var ?int $limit */ #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=limit')] - public ?float $limit = null; + public ?int $limit = null; /** * Skip the first `offset` results when paginating. @@ -35,17 +35,17 @@ class ListPendingOrganizationInvitationsRequest * Needs to be an integer greater or equal to zero. * To be used in conjunction with `limit`. * - * @var ?float $offset + * @var ?int $offset */ #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=offset')] - public ?float $offset = null; + public ?int $offset = null; /** * @param string $organizationId - * @param ?float $limit - * @param ?float $offset + * @param ?int $limit + * @param ?int $offset */ - public function __construct(string $organizationId, ?float $limit = 10, ?float $offset = 0) + public function __construct(string $organizationId, ?int $limit = 10, ?int $offset = 0) { $this->organizationId = $organizationId; $this->limit = $limit; diff --git a/src/Models/Operations/ListSAMLConnectionsRequest.php b/src/Models/Operations/ListSAMLConnectionsRequest.php index 735d4ce..c53b6fa 100644 --- a/src/Models/Operations/ListSAMLConnectionsRequest.php +++ b/src/Models/Operations/ListSAMLConnectionsRequest.php @@ -16,10 +16,10 @@ class ListSAMLConnectionsRequest * * Can be used for paginating the results together with `offset`. * - * @var ?float $limit + * @var ?int $limit */ #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=limit')] - public ?float $limit = null; + public ?int $limit = null; /** * Skip the first `offset` results when paginating. @@ -27,16 +27,16 @@ class ListSAMLConnectionsRequest * Needs to be an integer greater or equal to zero. * To be used in conjunction with `limit`. * - * @var ?float $offset + * @var ?int $offset */ #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=offset')] - public ?float $offset = null; + public ?int $offset = null; /** - * @param ?float $limit - * @param ?float $offset + * @param ?int $limit + * @param ?int $offset */ - public function __construct(?float $limit = 10, ?float $offset = 0) + public function __construct(?int $limit = 10, ?int $offset = 0) { $this->limit = $limit; $this->offset = $offset; diff --git a/src/Models/Operations/MergeOrganizationMetadataPrivateMetadata.php b/src/Models/Operations/MergeOrganizationMetadataPrivateMetadata.php deleted file mode 100644 index 7bf6c47..0000000 --- a/src/Models/Operations/MergeOrganizationMetadataPrivateMetadata.php +++ /dev/null @@ -1,23 +0,0 @@ - $publicMetadata */ #[\Speakeasy\Serializer\Annotation\SerializedName('public_metadata')] - #[\Speakeasy\Serializer\Annotation\Type('\Clerk\Backend\Models\Operations\MergeOrganizationMetadataPublicMetadata|null')] + #[\Speakeasy\Serializer\Annotation\Type('array|null')] #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?MergeOrganizationMetadataPublicMetadata $publicMetadata = null; + public ?array $publicMetadata = null; /** * Metadata saved on the organization that is only visible to your backend. * * The new object will be merged with the existing value. * - * @var ?MergeOrganizationMetadataPrivateMetadata $privateMetadata + * @var ?array $privateMetadata */ #[\Speakeasy\Serializer\Annotation\SerializedName('private_metadata')] - #[\Speakeasy\Serializer\Annotation\Type('\Clerk\Backend\Models\Operations\MergeOrganizationMetadataPrivateMetadata|null')] + #[\Speakeasy\Serializer\Annotation\Type('array|null')] #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?MergeOrganizationMetadataPrivateMetadata $privateMetadata = null; + public ?array $privateMetadata = null; /** - * @param ?MergeOrganizationMetadataPublicMetadata $publicMetadata - * @param ?MergeOrganizationMetadataPrivateMetadata $privateMetadata + * @param ?array $publicMetadata + * @param ?array $privateMetadata */ - public function __construct(?MergeOrganizationMetadataPublicMetadata $publicMetadata = null, ?MergeOrganizationMetadataPrivateMetadata $privateMetadata = null) + public function __construct(?array $publicMetadata = null, ?array $privateMetadata = null) { $this->publicMetadata = $publicMetadata; $this->privateMetadata = $privateMetadata; diff --git a/src/Models/Operations/PasswordHasher.php b/src/Models/Operations/PasswordHasher.php deleted file mode 100644 index ed18e49..0000000 --- a/src/Models/Operations/PasswordHasher.php +++ /dev/null @@ -1,154 +0,0 @@ -$$` - * - * **bcrypt_sha256_django:** This is the Django-specific variant of Bcrypt, using SHA256 hashing function. The format should be as follows (as exported from Django): - * - * `bcrypt_sha256$$$$` - * - * **md5** (insecure): The digest should follow the regular form e.g.: - * - * `5f4dcc3b5aa765d61d8327deb882cf99` - * - * **pbkdf2_sha256:** This is the PBKDF2 algorithm using the SHA256 hashing function. The format should be as follows: - * - * `pbkdf2_sha256$$$` - * - * Note: Both the salt and the hash are expected to be base64-encoded. - * - * **pbkdf2_sha512:** This is the PBKDF2 algorithm using the SHA512 hashing function. The format should be as follows: - * - * `pbkdf2_sha512$$$` - * - * _iterations:_ The number of iterations used. Must be an integer less than 420000. - * _salt:_ The salt used when generating the hash. Must be less than 1024 bytes. - * _hash:_ The hex-encoded hash. Must have been generated with a key length less than 1024 bytes. - * - * **pbkdf2_sha256_django:** This is the Django-specific variant of PBKDF2 and the digest should have the following format (as exported from Django): - * - * `pbkdf2_sha256$$$` - * - * Note: The salt is expected to be un-encoded, the hash is expected base64-encoded. - * - * **pbkdf2_sha1:** This is similar to pkbdf2_sha256_django, but with two differences: - * 1. uses sha1 instead of sha256 - * 2. accepts the hash as a hex-encoded string - * - * The format is the following: - * - * `pbkdf2_sha1$$$` - * - * **phpass:** Portable public domain password hashing framework for use in PHP applications. Digests hashed with phpass have the following sections: - * - * The format is the following: - * - * `$P$` - * - * - $P$ is the prefix used to identify phpass hashes. - * - rounds is a single character encoding a 6-bit integer representing the number of rounds used. - * - salt is eight characters drawn from [./0-9A-Za-z], providing a 48-bit salt. - * - checksum is 22 characters drawn from the same set, encoding the 128-bit checksum with MD5. - * - * **scrypt_firebase:** The Firebase-specific variant of scrypt. - * The value is expected to have 6 segments separated by the $ character and include the following information: - * - * _hash:_ The actual Base64 hash. This can be retrieved when exporting the user from Firebase. - * _salt:_ The salt used to generate the above hash. Again, this is given when exporting the user. - * _signer key:_ The base64 encoded signer key. - * _salt separator:_ The base64 encoded salt separator. - * _rounds:_ The number of rounds the algorithm needs to run. - * _memory cost:_ The cost of the algorithm run - * - * The first 2 (hash and salt) are per user and can be retrieved when exporting the user from Firebase. - * The other 4 values (signer key, salt separator, rounds and memory cost) are project-wide settings and can be retrieved from the project's password hash parameters. - * - * Once you have all these, you can combine it in the following format and send this as the digest in order for Clerk to accept it: - * - * `$$$$$` - * - * **scrypt_werkzeug:** The Werkzeug-specific variant of scrypt. - * - * The value is expected to have 3 segments separated by the $ character and include the following information: - * - * _algorithm args:_ The algorithm used to generate the hash. - * _salt:_ The salt used to generate the above hash. - * _hash:_ The actual Base64 hash. - * - * The algorithm args are the parameters used to generate the hash and are included in the digest. - * - * **argon2i:** Algorithms in the argon2 family generate digests that encode the following information: - * - * _version (v):_ The argon version, version 19 is assumed - * _memory (m):_ The memory used by the algorithm (in kibibytes) - * _iterations (t):_ The number of iterations to perform - * _parallelism (p):_ The number of threads to use - * - * Parts are demarcated by the `$` character, with the first part identifying the algorithm variant. - * The middle part is a comma-separated list of the encoding options (memory, iterations, parallelism). - * The final part is the actual digest. - * - * `$argon2i$v=19$m=4096,t=3,p=1$4t6CL3P7YiHBtwESXawI8Hm20zJj4cs7/4/G3c187e0$m7RQFczcKr5bIR0IIxbpO2P0tyrLjf3eUW3M3QSwnLc` - * - * **argon2id:** See the previous algorithm for an explanation of the formatting. - * - * For the argon2id case, the value of the algorithm in the first part of the digest is `argon2id`: - * - * `$argon2id$v=19$m=64,t=4,p=8$Z2liZXJyaXNo$iGXEpMBTDYQ8G/71tF0qGjxRHEmR3gpGULcE93zUJVU` - * - * **sha256** (insecure): The digest should be a 64-length hex string, e.g.: - * - * `9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08` - * - * **sha256_salted** (insecure): The digest should be a 64-length hex string with a salt. - * - * The format is the following: - * `$` - * - * The value is expected to have 2 segments separated by the $ character and include the following information: - * _hash:_ The sha256 hash, a 64-length hex string. - * _salt:_ The salt used to generate the above hash. Must be between 1 and 1024 bits. - */ -enum PasswordHasher: string -{ - case Argon2i = 'argon2i'; - case Argon2id = 'argon2id'; - case Bcrypt = 'bcrypt'; - case BcryptSha256Django = 'bcrypt_sha256_django'; - case Md5 = 'md5'; - case Pbkdf2Sha256 = 'pbkdf2_sha256'; - case Pbkdf2Sha512 = 'pbkdf2_sha512'; - case Pbkdf2Sha256Django = 'pbkdf2_sha256_django'; - case Pbkdf2Sha1 = 'pbkdf2_sha1'; - case Phpass = 'phpass'; - case ScryptFirebase = 'scrypt_firebase'; - case ScryptWerkzeug = 'scrypt_werkzeug'; - case Sha256 = 'sha256'; - case Sha256Salted = 'sha256_salted'; -} diff --git a/src/Models/Operations/PrivateMetadata.php b/src/Models/Operations/PrivateMetadata.php deleted file mode 100644 index 2a511a8..0000000 --- a/src/Models/Operations/PrivateMetadata.php +++ /dev/null @@ -1,19 +0,0 @@ - $publicMetadata */ #[\Speakeasy\Serializer\Annotation\SerializedName('public_metadata')] - #[\Speakeasy\Serializer\Annotation\Type('\Clerk\Backend\Models\Operations\CreateOrganizationInvitationBulkPublicMetadata|null')] + #[\Speakeasy\Serializer\Annotation\Type('array|null')] #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?CreateOrganizationInvitationBulkPublicMetadata $publicMetadata = null; + public ?array $publicMetadata = null; /** * Metadata saved on the organization invitation, fully accessible (read/write) from the Backend API but not visible from the Frontend API. * - * @var ?CreateOrganizationInvitationBulkPrivateMetadata $privateMetadata + * @var ?array $privateMetadata */ #[\Speakeasy\Serializer\Annotation\SerializedName('private_metadata')] - #[\Speakeasy\Serializer\Annotation\Type('\Clerk\Backend\Models\Operations\CreateOrganizationInvitationBulkPrivateMetadata|null')] + #[\Speakeasy\Serializer\Annotation\Type('array|null')] #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?CreateOrganizationInvitationBulkPrivateMetadata $privateMetadata = null; + public ?array $privateMetadata = null; /** * Optional URL that the invitee will be redirected to once they accept the invitation by clicking the join link in the invitation email. @@ -68,19 +69,19 @@ class RequestBody /** * @param string $emailAddress - * @param string $inviterUserId * @param string $role - * @param ?CreateOrganizationInvitationBulkPublicMetadata $publicMetadata - * @param ?CreateOrganizationInvitationBulkPrivateMetadata $privateMetadata + * @param ?array $publicMetadata + * @param ?array $privateMetadata * @param ?string $redirectUrl + * @param ?string $inviterUserId */ - public function __construct(string $emailAddress, string $inviterUserId, string $role, ?CreateOrganizationInvitationBulkPublicMetadata $publicMetadata = null, ?CreateOrganizationInvitationBulkPrivateMetadata $privateMetadata = null, ?string $redirectUrl = null) + public function __construct(string $emailAddress, string $role, ?array $publicMetadata = null, ?array $privateMetadata = null, ?string $redirectUrl = null, ?string $inviterUserId = null) { $this->emailAddress = $emailAddress; - $this->inviterUserId = $inviterUserId; $this->role = $role; $this->publicMetadata = $publicMetadata; $this->privateMetadata = $privateMetadata; $this->redirectUrl = $redirectUrl; + $this->inviterUserId = $inviterUserId; } } \ No newline at end of file diff --git a/src/Models/Operations/ResponseBody.php b/src/Models/Operations/ResponseBody.php index e9d82a0..5574809 100644 --- a/src/Models/Operations/ResponseBody.php +++ b/src/Models/Operations/ResponseBody.php @@ -56,13 +56,14 @@ class ResponseBody public ?string $provider = null; /** + * $publicMetadata * - * @var ?GetOAuthAccessTokenPublicMetadata $publicMetadata + * @var ?array $publicMetadata */ #[\Speakeasy\Serializer\Annotation\SerializedName('public_metadata')] - #[\Speakeasy\Serializer\Annotation\Type('\Clerk\Backend\Models\Operations\GetOAuthAccessTokenPublicMetadata|null')] + #[\Speakeasy\Serializer\Annotation\Type('array|null')] #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?GetOAuthAccessTokenPublicMetadata $publicMetadata = null; + public ?array $publicMetadata = null; /** * @@ -99,12 +100,12 @@ class ResponseBody * @param ?string $providerUserId * @param ?string $token * @param ?string $provider - * @param ?GetOAuthAccessTokenPublicMetadata $publicMetadata + * @param ?array $publicMetadata * @param ?array $scopes * @param ?string $tokenSecret * @param ?string $label */ - public function __construct(?string $object = null, ?string $externalAccountId = null, ?string $providerUserId = null, ?string $token = null, ?string $provider = null, ?GetOAuthAccessTokenPublicMetadata $publicMetadata = null, ?array $scopes = null, ?string $tokenSecret = null, ?string $label = null) + public function __construct(?string $object = null, ?string $externalAccountId = null, ?string $providerUserId = null, ?string $token = null, ?string $provider = null, ?array $publicMetadata = null, ?array $scopes = null, ?string $tokenSecret = null, ?string $label = null) { $this->object = $object; $this->externalAccountId = $externalAccountId; diff --git a/src/Models/Operations/RevokeOrganizationInvitationRequest.php b/src/Models/Operations/RevokeOrganizationInvitationRequest.php index d7cdc88..9d2f369 100644 --- a/src/Models/Operations/RevokeOrganizationInvitationRequest.php +++ b/src/Models/Operations/RevokeOrganizationInvitationRequest.php @@ -29,17 +29,17 @@ class RevokeOrganizationInvitationRequest /** * - * @var RevokeOrganizationInvitationRequestBody $requestBody + * @var ?RevokeOrganizationInvitationRequestBody $requestBody */ #[SpeakeasyMetadata('request:mediaType=application/json')] - public RevokeOrganizationInvitationRequestBody $requestBody; + public ?RevokeOrganizationInvitationRequestBody $requestBody = null; /** * @param string $organizationId * @param string $invitationId - * @param RevokeOrganizationInvitationRequestBody $requestBody + * @param ?RevokeOrganizationInvitationRequestBody $requestBody */ - public function __construct(string $organizationId, string $invitationId, RevokeOrganizationInvitationRequestBody $requestBody) + public function __construct(string $organizationId, string $invitationId, ?RevokeOrganizationInvitationRequestBody $requestBody = null) { $this->organizationId = $organizationId; $this->invitationId = $invitationId; diff --git a/src/Models/Operations/RevokeOrganizationInvitationRequestBody.php b/src/Models/Operations/RevokeOrganizationInvitationRequestBody.php index 8ac76e0..88499a3 100644 --- a/src/Models/Operations/RevokeOrganizationInvitationRequestBody.php +++ b/src/Models/Operations/RevokeOrganizationInvitationRequestBody.php @@ -16,15 +16,16 @@ class RevokeOrganizationInvitationRequestBody * * Must be an administrator in the organization. * - * @var string $requestingUserId + * @var ?string $requestingUserId */ #[\Speakeasy\Serializer\Annotation\SerializedName('requesting_user_id')] - public string $requestingUserId; + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?string $requestingUserId = null; /** - * @param string $requestingUserId + * @param ?string $requestingUserId */ - public function __construct(string $requestingUserId) + public function __construct(?string $requestingUserId = null) { $this->requestingUserId = $requestingUserId; } diff --git a/src/Models/Operations/UnsafeMetadata.php b/src/Models/Operations/UnsafeMetadata.php deleted file mode 100644 index a078966..0000000 --- a/src/Models/Operations/UnsafeMetadata.php +++ /dev/null @@ -1,23 +0,0 @@ -name = $name; $this->proxyUrl = $proxyUrl; + $this->isSecondary = $isSecondary; } } \ No newline at end of file diff --git a/src/Models/Operations/UpdateOrganizationDomainRequest.php b/src/Models/Operations/UpdateOrganizationDomainRequest.php new file mode 100644 index 0000000..b5f71af --- /dev/null +++ b/src/Models/Operations/UpdateOrganizationDomainRequest.php @@ -0,0 +1,48 @@ +organizationId = $organizationId; + $this->domainId = $domainId; + $this->requestBody = $requestBody; + } +} \ No newline at end of file diff --git a/src/Models/Operations/UpdateOrganizationDomainRequestBody.php b/src/Models/Operations/UpdateOrganizationDomainRequestBody.php new file mode 100644 index 0000000..c68fa07 --- /dev/null +++ b/src/Models/Operations/UpdateOrganizationDomainRequestBody.php @@ -0,0 +1,41 @@ +enrollmentMode = $enrollmentMode; + $this->verified = $verified; + } +} \ No newline at end of file diff --git a/src/Models/Operations/UpdateOrganizationDomainResponse.php b/src/Models/Operations/UpdateOrganizationDomainResponse.php new file mode 100644 index 0000000..8b3466c --- /dev/null +++ b/src/Models/Operations/UpdateOrganizationDomainResponse.php @@ -0,0 +1,55 @@ +contentType = $contentType; + $this->statusCode = $statusCode; + $this->rawResponse = $rawResponse; + $this->organizationDomain = $organizationDomain; + } +} \ No newline at end of file diff --git a/src/Models/Operations/UpdateOrganizationMembershipMetadataPrivateMetadata.php b/src/Models/Operations/UpdateOrganizationMembershipMetadataPrivateMetadata.php deleted file mode 100644 index 30ed73d..0000000 --- a/src/Models/Operations/UpdateOrganizationMembershipMetadataPrivateMetadata.php +++ /dev/null @@ -1,23 +0,0 @@ - $publicMetadata */ #[\Speakeasy\Serializer\Annotation\SerializedName('public_metadata')] - #[\Speakeasy\Serializer\Annotation\Type('\Clerk\Backend\Models\Operations\UpdateOrganizationMembershipMetadataPublicMetadata|null')] + #[\Speakeasy\Serializer\Annotation\Type('array|null')] #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?UpdateOrganizationMembershipMetadataPublicMetadata $publicMetadata = null; + public ?array $publicMetadata = null; /** * Metadata saved on the organization membership that is only visible to your backend. * * The new object will be merged with the existing value. * - * @var ?UpdateOrganizationMembershipMetadataPrivateMetadata $privateMetadata + * @var ?array $privateMetadata */ #[\Speakeasy\Serializer\Annotation\SerializedName('private_metadata')] - #[\Speakeasy\Serializer\Annotation\Type('\Clerk\Backend\Models\Operations\UpdateOrganizationMembershipMetadataPrivateMetadata|null')] + #[\Speakeasy\Serializer\Annotation\Type('array|null')] #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?UpdateOrganizationMembershipMetadataPrivateMetadata $privateMetadata = null; + public ?array $privateMetadata = null; /** - * @param ?UpdateOrganizationMembershipMetadataPublicMetadata $publicMetadata - * @param ?UpdateOrganizationMembershipMetadataPrivateMetadata $privateMetadata + * @param ?array $publicMetadata + * @param ?array $privateMetadata */ - public function __construct(?UpdateOrganizationMembershipMetadataPublicMetadata $publicMetadata = null, ?UpdateOrganizationMembershipMetadataPrivateMetadata $privateMetadata = null) + public function __construct(?array $publicMetadata = null, ?array $privateMetadata = null) { $this->publicMetadata = $publicMetadata; $this->privateMetadata = $privateMetadata; diff --git a/src/Models/Operations/UpdateOrganizationPrivateMetadata.php b/src/Models/Operations/UpdateOrganizationPrivateMetadata.php deleted file mode 100644 index 745b567..0000000 --- a/src/Models/Operations/UpdateOrganizationPrivateMetadata.php +++ /dev/null @@ -1,19 +0,0 @@ - $publicMetadata */ #[\Speakeasy\Serializer\Annotation\SerializedName('public_metadata')] - #[\Speakeasy\Serializer\Annotation\Type('\Clerk\Backend\Models\Operations\UpdateOrganizationPublicMetadata|null')] + #[\Speakeasy\Serializer\Annotation\Type('array|null')] #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?UpdateOrganizationPublicMetadata $publicMetadata = null; + public ?array $publicMetadata = null; /** * Metadata saved on the organization that is only visible to your backend. * - * @var ?UpdateOrganizationPrivateMetadata $privateMetadata + * @var ?array $privateMetadata */ #[\Speakeasy\Serializer\Annotation\SerializedName('private_metadata')] - #[\Speakeasy\Serializer\Annotation\Type('\Clerk\Backend\Models\Operations\UpdateOrganizationPrivateMetadata|null')] + #[\Speakeasy\Serializer\Annotation\Type('array|null')] #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?UpdateOrganizationPrivateMetadata $privateMetadata = null; + public ?array $privateMetadata = null; /** - * The new name of the organization + * The new name of the organization. + * + * May not contain URLs or HTML. * * @var ?string $name */ @@ -68,17 +70,28 @@ class UpdateOrganizationRequestBody public ?bool $adminDeleteEnabled = null; /** - * @param ?UpdateOrganizationPublicMetadata $publicMetadata - * @param ?UpdateOrganizationPrivateMetadata $privateMetadata + * A custom date/time denoting _when_ the organization was created, specified in RFC3339 format (e.g. `2012-10-20T07:15:20.902Z`). + * + * @var ?string $createdAt + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('created_at')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?string $createdAt = null; + + /** + * @param ?array $publicMetadata + * @param ?array $privateMetadata + * @param ?string $createdAt * @param ?string $name * @param ?string $slug * @param ?int $maxAllowedMemberships * @param ?bool $adminDeleteEnabled */ - public function __construct(?UpdateOrganizationPublicMetadata $publicMetadata = null, ?UpdateOrganizationPrivateMetadata $privateMetadata = null, ?string $name = null, ?string $slug = null, ?int $maxAllowedMemberships = null, ?bool $adminDeleteEnabled = null) + public function __construct(?array $publicMetadata = null, ?array $privateMetadata = null, ?string $createdAt = null, ?string $name = null, ?string $slug = null, ?int $maxAllowedMemberships = null, ?bool $adminDeleteEnabled = null) { $this->publicMetadata = $publicMetadata; $this->privateMetadata = $privateMetadata; + $this->createdAt = $createdAt; $this->name = $name; $this->slug = $slug; $this->maxAllowedMemberships = $maxAllowedMemberships; diff --git a/src/Models/Operations/UpdateSAMLConnectionRequestBody.php b/src/Models/Operations/UpdateSAMLConnectionRequestBody.php index 4c48b60..c1d4231 100644 --- a/src/Models/Operations/UpdateSAMLConnectionRequestBody.php +++ b/src/Models/Operations/UpdateSAMLConnectionRequestBody.php @@ -120,6 +120,15 @@ class UpdateSAMLConnectionRequestBody #[\Speakeasy\Serializer\Annotation\SkipWhenNull] public ?bool $allowIdpInitiated = null; + /** + * Enable or deactivate additional identifications + * + * @var ?bool $disableAdditionalIdentifications + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('disable_additional_identifications')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?bool $disableAdditionalIdentifications = null; + /** * @param ?string $name * @param ?string $domain @@ -133,8 +142,9 @@ class UpdateSAMLConnectionRequestBody * @param ?bool $syncUserAttributes * @param ?bool $allowSubdomains * @param ?bool $allowIdpInitiated + * @param ?bool $disableAdditionalIdentifications */ - public function __construct(?string $name = null, ?string $domain = null, ?string $idpEntityId = null, ?string $idpSsoUrl = null, ?string $idpCertificate = null, ?string $idpMetadataUrl = null, ?string $idpMetadata = null, ?UpdateSAMLConnectionAttributeMapping $attributeMapping = null, ?bool $active = null, ?bool $syncUserAttributes = null, ?bool $allowSubdomains = null, ?bool $allowIdpInitiated = null) + public function __construct(?string $name = null, ?string $domain = null, ?string $idpEntityId = null, ?string $idpSsoUrl = null, ?string $idpCertificate = null, ?string $idpMetadataUrl = null, ?string $idpMetadata = null, ?UpdateSAMLConnectionAttributeMapping $attributeMapping = null, ?bool $active = null, ?bool $syncUserAttributes = null, ?bool $allowSubdomains = null, ?bool $allowIdpInitiated = null, ?bool $disableAdditionalIdentifications = null) { $this->name = $name; $this->domain = $domain; @@ -148,5 +158,6 @@ public function __construct(?string $name = null, ?string $domain = null, ?strin $this->syncUserAttributes = $syncUserAttributes; $this->allowSubdomains = $allowSubdomains; $this->allowIdpInitiated = $allowIdpInitiated; + $this->disableAdditionalIdentifications = $disableAdditionalIdentifications; } } \ No newline at end of file diff --git a/src/Models/Operations/UpdateSAMLConnectionResponse.php b/src/Models/Operations/UpdateSAMLConnectionResponse.php index 48cafbc..c6116bc 100644 --- a/src/Models/Operations/UpdateSAMLConnectionResponse.php +++ b/src/Models/Operations/UpdateSAMLConnectionResponse.php @@ -35,21 +35,21 @@ class UpdateSAMLConnectionResponse /** * A SAML Connection * - * @var ?Components\SAMLConnection $samlConnection + * @var ?Components\SchemasSAMLConnection $schemasSAMLConnection */ - public ?Components\SAMLConnection $samlConnection = null; + public ?Components\SchemasSAMLConnection $schemasSAMLConnection = null; /** * @param string $contentType * @param int $statusCode * @param \Psr\Http\Message\ResponseInterface $rawResponse - * @param ?Components\SAMLConnection $samlConnection + * @param ?Components\SchemasSAMLConnection $schemasSAMLConnection */ - public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse, ?Components\SAMLConnection $samlConnection = null) + public function __construct(string $contentType, int $statusCode, \Psr\Http\Message\ResponseInterface $rawResponse, ?Components\SchemasSAMLConnection $schemasSAMLConnection = null) { $this->contentType = $contentType; $this->statusCode = $statusCode; $this->rawResponse = $rawResponse; - $this->samlConnection = $samlConnection; + $this->schemasSAMLConnection = $schemasSAMLConnection; } } \ No newline at end of file diff --git a/src/Models/Operations/UpdateSignUpRequestBody.php b/src/Models/Operations/UpdateSignUpRequestBody.php index 63858b0..e3301dd 100644 --- a/src/Models/Operations/UpdateSignUpRequestBody.php +++ b/src/Models/Operations/UpdateSignUpRequestBody.php @@ -11,18 +11,6 @@ class UpdateSignUpRequestBody { - /** - * Specifies whether a custom action has run for this sign-up attempt. - * - * This is important when your instance has been configured to require a custom action to run before converting a sign-up into a user. - * After executing any external business logic you deem necessary, you can mark the sign-up as ready-to-convert by setting `custom_action` to `true`. - * - * @var ?bool $customAction - */ - #[\Speakeasy\Serializer\Annotation\SerializedName('custom_action')] - #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?bool $customAction = null; - /** * The ID of the guest attempting to sign up as used in your external systems or your previous authentication solution. * @@ -35,12 +23,10 @@ class UpdateSignUpRequestBody public ?string $externalId = null; /** - * @param ?bool $customAction * @param ?string $externalId */ - public function __construct(?bool $customAction = null, ?string $externalId = null) + public function __construct(?string $externalId = null) { - $this->customAction = $customAction; $this->externalId = $externalId; } } \ No newline at end of file diff --git a/src/Models/Operations/UpdateUserPasswordHasher.php b/src/Models/Operations/UpdateUserPasswordHasher.php deleted file mode 100644 index e4ffd7c..0000000 --- a/src/Models/Operations/UpdateUserPasswordHasher.php +++ /dev/null @@ -1,144 +0,0 @@ -$$` - * - * **bcrypt_sha256_django:** This is the Django-specific variant of Bcrypt, using SHA256 hashing function. The format should be as follows (as exported from Django): - * - * `bcrypt_sha256$$$$` - * - * **md5** (insecure): The digest should follow the regular form e.g.: - * - * `5f4dcc3b5aa765d61d8327deb882cf99` - * - * **pbkdf2_sha256:** This is the PBKDF2 algorithm using the SHA256 hashing function. The format should be as follows: - * - * `pbkdf2_sha256$$$` - * - * Note: Both the salt and the hash are expected to be base64-encoded. - * - * **pbkdf2_sha512:** This is the PBKDF2 algorithm using the SHA512 hashing function. The format should be as follows: - * - * `pbkdf2_sha512$$$` - * - * _iterations:_ The number of iterations used. Must be an integer less than 420000. - * _salt:_ The salt used when generating the hash. Must be less than bytes. - * _hash:_ The hex-encoded hash. Must have been generated with a key length less than 1024 bytes. - * - * **pbkdf2_sha256_django:** This is the Django-specific variant of PBKDF2 and the digest should have the following format (as exported from Django): - * - * `pbkdf2_sha256$$$` - * - * Note: The salt is expected to be un-encoded, the hash is expected base64-encoded. - * - * **pbkdf2_sha1:** This is similar to pkbdf2_sha256_django, but with two differences: - * 1. uses sha1 instead of sha256 - * 2. accepts the hash as a hex-encoded string - * - * The format is the following: - * - * `pbkdf2_sha1$$$` - * - * **phpass:** Portable public domain password hashing framework for use in PHP applications. Digests hashed with phpass have the following sections: - * - * The format is the following: - * - * `$P$` - * - * - $P$ is the prefix used to identify phpass hashes. - * - rounds is a single character encoding a 6-bit integer representing the number of rounds used. - * - salt is eight characters drawn from [./0-9A-Za-z], providing a 48-bit salt. - * - checksum is 22 characters drawn from the same set, encoding the 128-bit checksum with MD5. - * - * **scrypt_firebase:** The Firebase-specific variant of scrypt. - * The value is expected to have 6 segments separated by the $ character and include the following information: - * - * _hash:_ The actual Base64 hash. This can be retrieved when exporting the user from Firebase. - * _salt:_ The salt used to generate the above hash. Again, this is given when exporting the user. - * _signer key:_ The base64 encoded signer key. - * _salt separator:_ The base64 encoded salt separator. - * _rounds:_ The number of rounds the algorithm needs to run. - * _memory cost:_ The cost of the algorithm run - * - * The first 2 (hash and salt) are per user and can be retrieved when exporting the user from Firebase. - * The other 4 values (signer key, salt separator, rounds and memory cost) are project-wide settings and can be retrieved from the project's password hash parameters. - * - * Once you have all these, you can combine it in the following format and send this as the digest in order for Clerk to accept it: - * - * `$$$$$` - * - * **scrypt_werkzeug:** The Werkzeug-specific variant of scrypt. - * - * The value is expected to have 3 segments separated by the $ character and include the following information: - * - * _algorithm args:_ The algorithm used to generate the hash. - * _salt:_ The salt used to generate the above hash. - * _hash:_ The actual Base64 hash. - * - * The algorithm args are the parameters used to generate the hash and are included in the digest. - * - * **argon2i:** Algorithms in the argon2 family generate digests that encode the following information: - * - * _version (v):_ The argon version, version 19 is assumed - * _memory (m):_ The memory used by the algorithm (in kibibytes) - * _iterations (t):_ The number of iterations to perform - * _parallelism (p):_ The number of threads to use - * - * Parts are demarcated by the `$` character, with the first part identifying the algorithm variant. - * The middle part is a comma-separated list of the encoding options (memory, iterations, parallelism). - * The final part is the actual digest. - * - * `$argon2i$v=19$m=4096,t=3,p=1$4t6CL3P7YiHBtwESXawI8Hm20zJj4cs7/4/G3c187e0$m7RQFczcKr5bIR0IIxbpO2P0tyrLjf3eUW3M3QSwnLc` - * - * **argon2id:** See the previous algorithm for an explanation of the formatting. - * - * For the argon2id case, the value of the algorithm in the first part of the digest is `argon2id`: - * - * `$argon2id$v=19$m=64,t=4,p=8$Z2liZXJyaXNo$iGXEpMBTDYQ8G/71tF0qGjxRHEmR3gpGULcE93zUJVU` - * - * **sha256** (insecure): The digest should be a 64-length hex string, e.g.: - * - * `9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08` - */ -enum UpdateUserPasswordHasher: string -{ - case Argon2i = 'argon2i'; - case Argon2id = 'argon2id'; - case Bcrypt = 'bcrypt'; - case BcryptSha256Django = 'bcrypt_sha256_django'; - case Md5 = 'md5'; - case Pbkdf2Sha256 = 'pbkdf2_sha256'; - case Pbkdf2Sha512 = 'pbkdf2_sha512'; - case Pbkdf2Sha256Django = 'pbkdf2_sha256_django'; - case Pbkdf2Sha1 = 'pbkdf2_sha1'; - case Phpass = 'phpass'; - case ScryptFirebase = 'scrypt_firebase'; - case ScryptWerkzeug = 'scrypt_werkzeug'; - case Sha256 = 'sha256'; -} diff --git a/src/Models/Operations/UpdateUserPrivateMetadata.php b/src/Models/Operations/UpdateUserPrivateMetadata.php deleted file mode 100644 index de3b8c2..0000000 --- a/src/Models/Operations/UpdateUserPrivateMetadata.php +++ /dev/null @@ -1,19 +0,0 @@ -$$` - * - * **bcrypt_sha256_django:** This is the Django-specific variant of Bcrypt, using SHA256 hashing function. The format should be as follows (as exported from Django): - * - * `bcrypt_sha256$$$$` - * - * **md5** (insecure): The digest should follow the regular form e.g.: - * - * `5f4dcc3b5aa765d61d8327deb882cf99` - * - * **pbkdf2_sha256:** This is the PBKDF2 algorithm using the SHA256 hashing function. The format should be as follows: - * - * `pbkdf2_sha256$$$` - * - * Note: Both the salt and the hash are expected to be base64-encoded. - * - * **pbkdf2_sha512:** This is the PBKDF2 algorithm using the SHA512 hashing function. The format should be as follows: - * - * `pbkdf2_sha512$$$` - * - * _iterations:_ The number of iterations used. Must be an integer less than 420000. - * _salt:_ The salt used when generating the hash. Must be less than bytes. - * _hash:_ The hex-encoded hash. Must have been generated with a key length less than 1024 bytes. - * - * **pbkdf2_sha256_django:** This is the Django-specific variant of PBKDF2 and the digest should have the following format (as exported from Django): - * - * `pbkdf2_sha256$$$` - * - * Note: The salt is expected to be un-encoded, the hash is expected base64-encoded. - * - * **pbkdf2_sha1:** This is similar to pkbdf2_sha256_django, but with two differences: - * 1. uses sha1 instead of sha256 - * 2. accepts the hash as a hex-encoded string - * - * The format is the following: - * - * `pbkdf2_sha1$$$` - * - * **phpass:** Portable public domain password hashing framework for use in PHP applications. Digests hashed with phpass have the following sections: - * - * The format is the following: - * - * `$P$` - * - * - $P$ is the prefix used to identify phpass hashes. - * - rounds is a single character encoding a 6-bit integer representing the number of rounds used. - * - salt is eight characters drawn from [./0-9A-Za-z], providing a 48-bit salt. - * - checksum is 22 characters drawn from the same set, encoding the 128-bit checksum with MD5. - * - * **scrypt_firebase:** The Firebase-specific variant of scrypt. - * The value is expected to have 6 segments separated by the $ character and include the following information: - * - * _hash:_ The actual Base64 hash. This can be retrieved when exporting the user from Firebase. - * _salt:_ The salt used to generate the above hash. Again, this is given when exporting the user. - * _signer key:_ The base64 encoded signer key. - * _salt separator:_ The base64 encoded salt separator. - * _rounds:_ The number of rounds the algorithm needs to run. - * _memory cost:_ The cost of the algorithm run - * - * The first 2 (hash and salt) are per user and can be retrieved when exporting the user from Firebase. - * The other 4 values (signer key, salt separator, rounds and memory cost) are project-wide settings and can be retrieved from the project's password hash parameters. - * - * Once you have all these, you can combine it in the following format and send this as the digest in order for Clerk to accept it: - * - * `$$$$$` - * - * **scrypt_werkzeug:** The Werkzeug-specific variant of scrypt. - * - * The value is expected to have 3 segments separated by the $ character and include the following information: - * - * _algorithm args:_ The algorithm used to generate the hash. - * _salt:_ The salt used to generate the above hash. - * _hash:_ The actual Base64 hash. - * - * The algorithm args are the parameters used to generate the hash and are included in the digest. - * - * **argon2i:** Algorithms in the argon2 family generate digests that encode the following information: - * - * _version (v):_ The argon version, version 19 is assumed - * _memory (m):_ The memory used by the algorithm (in kibibytes) - * _iterations (t):_ The number of iterations to perform - * _parallelism (p):_ The number of threads to use - * - * Parts are demarcated by the `$` character, with the first part identifying the algorithm variant. - * The middle part is a comma-separated list of the encoding options (memory, iterations, parallelism). - * The final part is the actual digest. - * - * `$argon2i$v=19$m=4096,t=3,p=1$4t6CL3P7YiHBtwESXawI8Hm20zJj4cs7/4/G3c187e0$m7RQFczcKr5bIR0IIxbpO2P0tyrLjf3eUW3M3QSwnLc` - * - * **argon2id:** See the previous algorithm for an explanation of the formatting. - * - * For the argon2id case, the value of the algorithm in the first part of the digest is `argon2id`: - * - * `$argon2id$v=19$m=64,t=4,p=8$Z2liZXJyaXNo$iGXEpMBTDYQ8G/71tF0qGjxRHEmR3gpGULcE93zUJVU` - * - * **sha256** (insecure): The digest should be a 64-length hex string, e.g.: - * - * `9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08` - * - * @var ?UpdateUserPasswordHasher $passwordHasher + * @var ?string $passwordHasher */ #[\Speakeasy\Serializer\Annotation\SerializedName('password_hasher')] - #[\Speakeasy\Serializer\Annotation\Type('\Clerk\Backend\Models\Operations\UpdateUserPasswordHasher|null')] #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?UpdateUserPasswordHasher $passwordHasher = null; + public ?string $passwordHasher = null; /** * Set it to `true` if you're updating the user's password and want to skip any password policy settings check. This parameter can only be used when providing a `password`. @@ -298,34 +191,34 @@ class UpdateUserRequestBody /** * Metadata saved on the user, that is visible to both your Frontend and Backend APIs * - * @var ?UpdateUserPublicMetadata $publicMetadata + * @var ?array $publicMetadata */ #[\Speakeasy\Serializer\Annotation\SerializedName('public_metadata')] - #[\Speakeasy\Serializer\Annotation\Type('\Clerk\Backend\Models\Operations\UpdateUserPublicMetadata|null')] + #[\Speakeasy\Serializer\Annotation\Type('array|null')] #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?UpdateUserPublicMetadata $publicMetadata = null; + public ?array $publicMetadata = null; /** * Metadata saved on the user, that is only visible to your Backend API * - * @var ?UpdateUserPrivateMetadata $privateMetadata + * @var ?array $privateMetadata */ #[\Speakeasy\Serializer\Annotation\SerializedName('private_metadata')] - #[\Speakeasy\Serializer\Annotation\Type('\Clerk\Backend\Models\Operations\UpdateUserPrivateMetadata|null')] + #[\Speakeasy\Serializer\Annotation\Type('array|null')] #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?UpdateUserPrivateMetadata $privateMetadata = null; + public ?array $privateMetadata = null; /** * Metadata saved on the user, that can be updated from both the Frontend and Backend APIs. * * Note: Since this data can be modified from the frontend, it is not guaranteed to be safe. * - * @var ?UpdateUserUnsafeMetadata $unsafeMetadata + * @var ?array $unsafeMetadata */ #[\Speakeasy\Serializer\Annotation\SerializedName('unsafe_metadata')] - #[\Speakeasy\Serializer\Annotation\Type('\Clerk\Backend\Models\Operations\UpdateUserUnsafeMetadata|null')] + #[\Speakeasy\Serializer\Annotation\Type('array|null')] #[\Speakeasy\Serializer\Annotation\SkipWhenNull] - public ?UpdateUserUnsafeMetadata $unsafeMetadata = null; + public ?array $unsafeMetadata = null; /** * If true, the user can delete themselves with the Frontend API. @@ -345,6 +238,35 @@ class UpdateUserRequestBody #[\Speakeasy\Serializer\Annotation\SkipWhenNull] public ?bool $createOrganizationEnabled = null; + /** + * A custom timestamps denoting _when_ the user accepted legal requirements, specified in RFC3339 format (e.g. `2012-10-20T07:15:20.902Z`). + * + * @var ?string $legalAcceptedAt + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('legal_accepted_at')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?string $legalAcceptedAt = null; + + /** + * When set to `true` all legal checks are skipped. + * + * It is not recommended to skip legal checks unless you are migrating a user to Clerk. + * + * @var ?bool $skipLegalChecks + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('skip_legal_checks')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?bool $skipLegalChecks = null; + + /** + * The maximum number of organizations the user can create. 0 means unlimited. + * + * @var ?int $createOrganizationsLimit + */ + #[\Speakeasy\Serializer\Annotation\SerializedName('create_organizations_limit')] + #[\Speakeasy\Serializer\Annotation\SkipWhenNull] + public ?int $createOrganizationsLimit = null; + /** * A custom date/time denoting _when_ the user signed up to the application, specified in RFC3339 format (e.g. `2012-10-20T07:15:20.902Z`). * @@ -360,12 +282,12 @@ class UpdateUserRequestBody * @param ?string $primaryPhoneNumberId * @param ?string $primaryWeb3WalletId * @param ?string $passwordDigest - * @param ?UpdateUserPasswordHasher $passwordHasher + * @param ?string $passwordHasher * @param ?string $totpSecret * @param ?array $backupCodes - * @param ?UpdateUserPublicMetadata $publicMetadata - * @param ?UpdateUserPrivateMetadata $privateMetadata - * @param ?UpdateUserUnsafeMetadata $unsafeMetadata + * @param ?array $publicMetadata + * @param ?array $privateMetadata + * @param ?array $unsafeMetadata * @param ?string $createdAt * @param ?string $externalId * @param ?string $firstName @@ -377,8 +299,11 @@ class UpdateUserRequestBody * @param ?bool $signOutOfOtherSessions * @param ?bool $deleteSelfEnabled * @param ?bool $createOrganizationEnabled + * @param ?string $legalAcceptedAt + * @param ?bool $skipLegalChecks + * @param ?int $createOrganizationsLimit */ - public function __construct(?string $primaryEmailAddressId = null, ?string $primaryPhoneNumberId = null, ?string $primaryWeb3WalletId = null, ?string $passwordDigest = null, ?UpdateUserPasswordHasher $passwordHasher = null, ?string $totpSecret = null, ?array $backupCodes = null, ?UpdateUserPublicMetadata $publicMetadata = null, ?UpdateUserPrivateMetadata $privateMetadata = null, ?UpdateUserUnsafeMetadata $unsafeMetadata = null, ?string $createdAt = null, ?string $externalId = null, ?string $firstName = null, ?string $lastName = null, ?string $username = null, ?string $profileImageId = null, ?string $password = null, ?bool $skipPasswordChecks = null, ?bool $signOutOfOtherSessions = null, ?bool $deleteSelfEnabled = null, ?bool $createOrganizationEnabled = null, ?bool $notifyPrimaryEmailAddressChanged = false) + public function __construct(?string $primaryEmailAddressId = null, ?string $primaryPhoneNumberId = null, ?string $primaryWeb3WalletId = null, ?string $passwordDigest = null, ?string $passwordHasher = null, ?string $totpSecret = null, ?array $backupCodes = null, ?array $publicMetadata = null, ?array $privateMetadata = null, ?array $unsafeMetadata = null, ?string $createdAt = null, ?string $externalId = null, ?string $firstName = null, ?string $lastName = null, ?string $username = null, ?string $profileImageId = null, ?string $password = null, ?bool $skipPasswordChecks = null, ?bool $signOutOfOtherSessions = null, ?bool $deleteSelfEnabled = null, ?bool $createOrganizationEnabled = null, ?string $legalAcceptedAt = null, ?bool $skipLegalChecks = null, ?int $createOrganizationsLimit = null, ?bool $notifyPrimaryEmailAddressChanged = false) { $this->primaryEmailAddressId = $primaryEmailAddressId; $this->notifyPrimaryEmailAddressChanged = $notifyPrimaryEmailAddressChanged; @@ -402,5 +327,8 @@ public function __construct(?string $primaryEmailAddressId = null, ?string $prim $this->signOutOfOtherSessions = $signOutOfOtherSessions; $this->deleteSelfEnabled = $deleteSelfEnabled; $this->createOrganizationEnabled = $createOrganizationEnabled; + $this->legalAcceptedAt = $legalAcceptedAt; + $this->skipLegalChecks = $skipLegalChecks; + $this->createOrganizationsLimit = $createOrganizationsLimit; } } \ No newline at end of file diff --git a/src/Models/Operations/UpdateUserUnsafeMetadata.php b/src/Models/Operations/UpdateUserUnsafeMetadata.php deleted file mode 100644 index 6349bfa..0000000 --- a/src/Models/Operations/UpdateUserUnsafeMetadata.php +++ /dev/null @@ -1,23 +0,0 @@ -uploaderUserId = $uploaderUserId; $this->file = $file; + $this->uploaderUserId = $uploaderUserId; } } \ No newline at end of file diff --git a/src/Models/Operations/UserPasskeyDeleteRequest.php b/src/Models/Operations/UserPasskeyDeleteRequest.php new file mode 100644 index 0000000..3f54697 --- /dev/null +++ b/src/Models/Operations/UserPasskeyDeleteRequest.php @@ -0,0 +1,39 @@ +userId = $userId; + $this->passkeyIdentificationId = $passkeyIdentificationId; + } +} \ No newline at end of file diff --git a/src/Models/Operations/UserPasskeyDeleteResponse.php b/src/Models/Operations/UserPasskeyDeleteResponse.php new file mode 100644 index 0000000..fab596a --- /dev/null +++ b/src/Models/Operations/UserPasskeyDeleteResponse.php @@ -0,0 +1,55 @@ +contentType = $contentType; + $this->statusCode = $statusCode; + $this->rawResponse = $rawResponse; + $this->deletedObject = $deletedObject; + } +} \ No newline at end of file diff --git a/src/Models/Operations/UserWeb3WalletDeleteRequest.php b/src/Models/Operations/UserWeb3WalletDeleteRequest.php new file mode 100644 index 0000000..493b7d7 --- /dev/null +++ b/src/Models/Operations/UserWeb3WalletDeleteRequest.php @@ -0,0 +1,39 @@ +userId = $userId; + $this->web3WalletIdentificationId = $web3WalletIdentificationId; + } +} \ No newline at end of file diff --git a/src/Models/Operations/UserWeb3WalletDeleteResponse.php b/src/Models/Operations/UserWeb3WalletDeleteResponse.php new file mode 100644 index 0000000..9b0da77 --- /dev/null +++ b/src/Models/Operations/UserWeb3WalletDeleteResponse.php @@ -0,0 +1,55 @@ +contentType = $contentType; + $this->statusCode = $statusCode; + $this->rawResponse = $rawResponse; + $this->deletedObject = $deletedObject; + } +} \ No newline at end of file diff --git a/src/Models/Operations/UsersGetOrganizationInvitationsRequest.php b/src/Models/Operations/UsersGetOrganizationInvitationsRequest.php new file mode 100644 index 0000000..80e5ccd --- /dev/null +++ b/src/Models/Operations/UsersGetOrganizationInvitationsRequest.php @@ -0,0 +1,64 @@ +userId = $userId; + $this->limit = $limit; + $this->offset = $offset; + $this->status = $status; + } +} \ No newline at end of file diff --git a/src/Models/Operations/UsersGetOrganizationInvitationsResponse.php b/src/Models/Operations/UsersGetOrganizationInvitationsResponse.php new file mode 100644 index 0000000..28cc483 --- /dev/null +++ b/src/Models/Operations/UsersGetOrganizationInvitationsResponse.php @@ -0,0 +1,55 @@ +contentType = $contentType; + $this->statusCode = $statusCode; + $this->rawResponse = $rawResponse; + $this->organizationInvitationsWithPublicOrganizationData = $organizationInvitationsWithPublicOrganizationData; + } +} \ No newline at end of file diff --git a/src/Models/Operations/UsersGetOrganizationMembershipsRequest.php b/src/Models/Operations/UsersGetOrganizationMembershipsRequest.php index 9062751..31e7371 100644 --- a/src/Models/Operations/UsersGetOrganizationMembershipsRequest.php +++ b/src/Models/Operations/UsersGetOrganizationMembershipsRequest.php @@ -24,10 +24,10 @@ class UsersGetOrganizationMembershipsRequest * * Can be used for paginating the results together with `offset`. * - * @var ?float $limit + * @var ?int $limit */ #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=limit')] - public ?float $limit = null; + public ?int $limit = null; /** * Skip the first `offset` results when paginating. @@ -35,17 +35,17 @@ class UsersGetOrganizationMembershipsRequest * Needs to be an integer greater or equal to zero. * To be used in conjunction with `limit`. * - * @var ?float $offset + * @var ?int $offset */ #[SpeakeasyMetadata('queryParam:style=form,explode=true,name=offset')] - public ?float $offset = null; + public ?int $offset = null; /** * @param string $userId - * @param ?float $limit - * @param ?float $offset + * @param ?int $limit + * @param ?int $offset */ - public function __construct(string $userId, ?float $limit = 10, ?float $offset = 0) + public function __construct(string $userId, ?int $limit = 10, ?int $offset = 0) { $this->userId = $userId; $this->limit = $limit; diff --git a/src/Models/Operations/VerifyClientRequestBody.php b/src/Models/Operations/VerifyClientRequestBody.php index ba04bb3..2c8f2f1 100644 --- a/src/Models/Operations/VerifyClientRequestBody.php +++ b/src/Models/Operations/VerifyClientRequestBody.php @@ -13,7 +13,7 @@ class VerifyClientRequestBody { /** - * A JWT Token that represents the active client. + * A JWT that represents the active client. * * @var ?string $token */ diff --git a/src/OAuthApplications.php b/src/OAuthApplications.php index d94c55c..c1226e5 100644 --- a/src/OAuthApplications.php +++ b/src/OAuthApplications.php @@ -11,7 +11,7 @@ use Clerk\Backend\Models\Operations; use Speakeasy\Serializer\DeserializationContext; -class OAuthApplications +class OauthApplications { private SDKConfiguration $sdkConfiguration; /** @@ -30,12 +30,12 @@ public function __construct(public SDKConfiguration $sdkConfig) * The OAuth applications are ordered by descending creation date. * Most recent OAuth applications will be returned first. * - * @param ?float $limit - * @param ?float $offset + * @param ?int $limit + * @param ?int $offset * @return Operations\ListOAuthApplicationsResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function listOAuthApplications(?float $limit = null, ?float $offset = null): Operations\ListOAuthApplicationsResponse + public function list(?int $limit = null, ?int $offset = null): Operations\ListOAuthApplicationsResponse { $request = new Operations\ListOAuthApplicationsRequest( limit: $limit, @@ -71,7 +71,7 @@ public function listOAuthApplications(?float $limit = null, ?float $offset = nul } elseif (in_array($statusCode, [400, 403, 422])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors79', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors93', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); throw $obj->toException(); } else { throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -94,7 +94,7 @@ public function listOAuthApplications(?float $limit = null, ?float $offset = nul * @return Operations\CreateOAuthApplicationResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function createOAuthApplication(?Operations\CreateOAuthApplicationRequestBody $request = null): Operations\CreateOAuthApplicationResponse + public function create(?Operations\CreateOAuthApplicationRequestBody $request = null): Operations\CreateOAuthApplicationResponse { $baseUrl = $this->sdkConfiguration->getServerUrl(); $url = Utils\Utils::generateUrl($baseUrl, '/oauth_applications'); @@ -129,7 +129,7 @@ public function createOAuthApplication(?Operations\CreateOAuthApplicationRequest } elseif (in_array($statusCode, [400, 403, 422])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors80', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors94', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); throw $obj->toException(); } else { throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -150,7 +150,7 @@ public function createOAuthApplication(?Operations\CreateOAuthApplicationRequest * @return Operations\GetOAuthApplicationResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function getOAuthApplication(string $oauthApplicationId): Operations\GetOAuthApplicationResponse + public function get(string $oauthApplicationId): Operations\GetOAuthApplicationResponse { $request = new Operations\GetOAuthApplicationRequest( oauthApplicationId: $oauthApplicationId, @@ -184,7 +184,7 @@ public function getOAuthApplication(string $oauthApplicationId): Operations\GetO } elseif (in_array($statusCode, [403, 404])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors81', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors95', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); throw $obj->toException(); } else { throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -206,7 +206,7 @@ public function getOAuthApplication(string $oauthApplicationId): Operations\GetO * @return Operations\UpdateOAuthApplicationResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function updateOAuthApplication(Operations\UpdateOAuthApplicationRequestBody $requestBody, string $oauthApplicationId): Operations\UpdateOAuthApplicationResponse + public function update(Operations\UpdateOAuthApplicationRequestBody $requestBody, string $oauthApplicationId): Operations\UpdateOAuthApplicationResponse { $request = new Operations\UpdateOAuthApplicationRequest( oauthApplicationId: $oauthApplicationId, @@ -246,7 +246,7 @@ public function updateOAuthApplication(Operations\UpdateOAuthApplicationRequestB } elseif (in_array($statusCode, [403, 404, 422])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors82', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors96', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); throw $obj->toException(); } else { throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -268,7 +268,7 @@ public function updateOAuthApplication(Operations\UpdateOAuthApplicationRequestB * @return Operations\DeleteOAuthApplicationResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function deleteOAuthApplication(string $oauthApplicationId): Operations\DeleteOAuthApplicationResponse + public function delete(string $oauthApplicationId): Operations\DeleteOAuthApplicationResponse { $request = new Operations\DeleteOAuthApplicationRequest( oauthApplicationId: $oauthApplicationId, @@ -302,7 +302,7 @@ public function deleteOAuthApplication(string $oauthApplicationId): Operations\D } elseif (in_array($statusCode, [403, 404])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors83', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors97', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); throw $obj->toException(); } else { throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -324,7 +324,7 @@ public function deleteOAuthApplication(string $oauthApplicationId): Operations\D * @return Operations\RotateOAuthApplicationSecretResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function rotateOAuthApplicationSecret(string $oauthApplicationId): Operations\RotateOAuthApplicationSecretResponse + public function rotateSecret(string $oauthApplicationId): Operations\RotateOAuthApplicationSecretResponse { $request = new Operations\RotateOAuthApplicationSecretRequest( oauthApplicationId: $oauthApplicationId, @@ -358,7 +358,7 @@ public function rotateOAuthApplicationSecret(string $oauthApplicationId): Operat } elseif (in_array($statusCode, [403, 404])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors84', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors98', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); throw $obj->toException(); } else { throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); diff --git a/src/OrganizationDomain.php b/src/OrganizationDomain.php new file mode 100644 index 0000000..bb838ee --- /dev/null +++ b/src/OrganizationDomain.php @@ -0,0 +1,89 @@ +sdkConfiguration = $sdkConfig; + } + + /** + * Update an organization domain. + * + * Updates the properties of an existing organization domain. + * + * @param Operations\UpdateOrganizationDomainRequestBody $requestBody + * @param string $organizationId + * @param string $domainId + * @return Operations\UpdateOrganizationDomainResponse + * @throws \Clerk\Backend\Models\Errors\SDKException + */ + public function update(Operations\UpdateOrganizationDomainRequestBody $requestBody, string $organizationId, string $domainId): Operations\UpdateOrganizationDomainResponse + { + $request = new Operations\UpdateOrganizationDomainRequest( + organizationId: $organizationId, + domainId: $domainId, + requestBody: $requestBody, + ); + $baseUrl = $this->sdkConfiguration->getServerUrl(); + $url = Utils\Utils::generateUrl($baseUrl, '/organizations/{organization_id}/domains/{domain_id}', Operations\UpdateOrganizationDomainRequest::class, $request); + $options = ['http_errors' => false]; + $body = Utils\Utils::serializeRequestBody($request, 'requestBody', 'json'); + if ($body === null) { + throw new \Exception('Request body is required'); + } + $options = array_merge_recursive($options, $body); + $options['headers']['Accept'] = 'application/json'; + $options['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('PATCH', $url); + + + $httpResponse = $this->sdkConfiguration->securityClient->send($httpRequest, $options); + $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; + + $statusCode = $httpResponse->getStatusCode(); + if ($statusCode == 200) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $serializer = Utils\JSON::createSerializer(); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Components\OrganizationDomain', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\UpdateOrganizationDomainResponse( + statusCode: $statusCode, + contentType: $contentType, + rawResponse: $httpResponse, + organizationDomain: $obj); + + return $response; + } else { + throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (in_array($statusCode, [400, 404, 422])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $serializer = Utils\JSON::createSerializer(); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors86', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + throw new \Clerk\Backend\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } else { + throw new \Clerk\Backend\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } + +} \ No newline at end of file diff --git a/src/OrganizationDomains.php b/src/OrganizationDomains.php new file mode 100644 index 0000000..83c6826 --- /dev/null +++ b/src/OrganizationDomains.php @@ -0,0 +1,197 @@ +sdkConfiguration = $sdkConfig; + } + + /** + * Create a new organization domain. + * + * Creates a new organization domain. By default the domain is verified, but can be optionally set to unverified. + * + * @param Operations\CreateOrganizationDomainRequestBody $requestBody + * @param string $organizationId + * @return Operations\CreateOrganizationDomainResponse + * @throws \Clerk\Backend\Models\Errors\SDKException + */ + public function create(Operations\CreateOrganizationDomainRequestBody $requestBody, string $organizationId): Operations\CreateOrganizationDomainResponse + { + $request = new Operations\CreateOrganizationDomainRequest( + organizationId: $organizationId, + requestBody: $requestBody, + ); + $baseUrl = $this->sdkConfiguration->getServerUrl(); + $url = Utils\Utils::generateUrl($baseUrl, '/organizations/{organization_id}/domains', Operations\CreateOrganizationDomainRequest::class, $request); + $options = ['http_errors' => false]; + $body = Utils\Utils::serializeRequestBody($request, 'requestBody', 'json'); + if ($body === null) { + throw new \Exception('Request body is required'); + } + $options = array_merge_recursive($options, $body); + $options['headers']['Accept'] = 'application/json'; + $options['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('POST', $url); + + + $httpResponse = $this->sdkConfiguration->securityClient->send($httpRequest, $options); + $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; + + $statusCode = $httpResponse->getStatusCode(); + if ($statusCode == 200) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $serializer = Utils\JSON::createSerializer(); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Components\OrganizationDomain', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\CreateOrganizationDomainResponse( + statusCode: $statusCode, + contentType: $contentType, + rawResponse: $httpResponse, + organizationDomain: $obj); + + return $response; + } else { + throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (in_array($statusCode, [400, 403, 404, 422])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $serializer = Utils\JSON::createSerializer(); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors84', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + throw new \Clerk\Backend\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } else { + throw new \Clerk\Backend\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } + + /** + * Get a list of all domains of an organization. + * + * Get a list of all domains of an organization. + * + * @param Operations\ListOrganizationDomainsRequest $request + * @return Operations\ListOrganizationDomainsResponse + * @throws \Clerk\Backend\Models\Errors\SDKException + */ + public function list(Operations\ListOrganizationDomainsRequest $request): Operations\ListOrganizationDomainsResponse + { + $baseUrl = $this->sdkConfiguration->getServerUrl(); + $url = Utils\Utils::generateUrl($baseUrl, '/organizations/{organization_id}/domains', Operations\ListOrganizationDomainsRequest::class, $request); + $options = ['http_errors' => false]; + $options = array_merge_recursive($options, Utils\Utils::getQueryParams(Operations\ListOrganizationDomainsRequest::class, $request)); + $options['headers']['Accept'] = 'application/json'; + $options['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('GET', $url); + + + $httpResponse = $this->sdkConfiguration->securityClient->send($httpRequest, $options); + $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; + + $statusCode = $httpResponse->getStatusCode(); + if ($statusCode == 200) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $serializer = Utils\JSON::createSerializer(); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Components\OrganizationDomains', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\ListOrganizationDomainsResponse( + statusCode: $statusCode, + contentType: $contentType, + rawResponse: $httpResponse, + organizationDomains: $obj); + + return $response; + } else { + throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (in_array($statusCode, [401, 422])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $serializer = Utils\JSON::createSerializer(); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors85', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + throw new \Clerk\Backend\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } else { + throw new \Clerk\Backend\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } + + /** + * Remove a domain from an organization. + * + * Removes the given domain from the organization. + * + * @param string $organizationId + * @param string $domainId + * @return Operations\DeleteOrganizationDomainResponse + * @throws \Clerk\Backend\Models\Errors\SDKException + */ + public function delete(string $organizationId, string $domainId): Operations\DeleteOrganizationDomainResponse + { + $request = new Operations\DeleteOrganizationDomainRequest( + organizationId: $organizationId, + domainId: $domainId, + ); + $baseUrl = $this->sdkConfiguration->getServerUrl(); + $url = Utils\Utils::generateUrl($baseUrl, '/organizations/{organization_id}/domains/{domain_id}', Operations\DeleteOrganizationDomainRequest::class, $request); + $options = ['http_errors' => false]; + $options['headers']['Accept'] = 'application/json'; + $options['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('DELETE', $url); + + + $httpResponse = $this->sdkConfiguration->securityClient->send($httpRequest, $options); + $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; + + $statusCode = $httpResponse->getStatusCode(); + if ($statusCode == 200) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $serializer = Utils\JSON::createSerializer(); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Components\DeletedObject', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\DeleteOrganizationDomainResponse( + statusCode: $statusCode, + contentType: $contentType, + rawResponse: $httpResponse, + deletedObject: $obj); + + return $response; + } else { + throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (in_array($statusCode, [400, 401, 404])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $serializer = Utils\JSON::createSerializer(); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors87', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + throw new \Clerk\Backend\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } else { + throw new \Clerk\Backend\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } + +} \ No newline at end of file diff --git a/src/OrganizationInvitations.php b/src/OrganizationInvitations.php index 952fe70..0ccac1e 100644 --- a/src/OrganizationInvitations.php +++ b/src/OrganizationInvitations.php @@ -22,6 +22,64 @@ public function __construct(public SDKConfiguration $sdkConfig) $this->sdkConfiguration = $sdkConfig; } + /** + * Get a list of organization invitations for the current instance + * + * This request returns the list of organization invitations for the instance. + * Results can be paginated using the optional `limit` and `offset` query parameters. + * You can filter them by providing the 'status' query parameter, that accepts multiple values. + * You can change the order by providing the 'order' query parameter, that accepts multiple values. + * You can filter by the invited user email address providing the `query` query parameter. + * The organization invitations are ordered by descending creation date by default. + * + * @param ?Operations\ListInstanceOrganizationInvitationsRequest $request + * @return Operations\ListInstanceOrganizationInvitationsResponse + * @throws \Clerk\Backend\Models\Errors\SDKException + */ + public function getAll(?Operations\ListInstanceOrganizationInvitationsRequest $request = null): Operations\ListInstanceOrganizationInvitationsResponse + { + $baseUrl = $this->sdkConfiguration->getServerUrl(); + $url = Utils\Utils::generateUrl($baseUrl, '/organization_invitations'); + $options = ['http_errors' => false]; + $options = array_merge_recursive($options, Utils\Utils::getQueryParams(Operations\ListInstanceOrganizationInvitationsRequest::class, $request)); + $options['headers']['Accept'] = 'application/json'; + $options['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('GET', $url); + + + $httpResponse = $this->sdkConfiguration->securityClient->send($httpRequest, $options); + $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; + + $statusCode = $httpResponse->getStatusCode(); + if ($statusCode == 200) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $serializer = Utils\JSON::createSerializer(); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Components\OrganizationInvitationsWithPublicOrganizationData', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\ListInstanceOrganizationInvitationsResponse( + statusCode: $statusCode, + contentType: $contentType, + rawResponse: $httpResponse, + organizationInvitationsWithPublicOrganizationData: $obj); + + return $response; + } else { + throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (in_array($statusCode, [400, 404, 422, 500])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $serializer = Utils\JSON::createSerializer(); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors44', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + throw new \Clerk\Backend\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } else { + throw new \Clerk\Backend\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } + /** * Create and send an organization invitation * @@ -34,7 +92,7 @@ public function __construct(public SDKConfiguration $sdkConfig) * When the invited user clicks the link to accept the invitation, they will be redirected to the URL provided. * Use this parameter to implement a custom invitation acceptance flow. * - * You must specify the ID of the user that will send the invitation with the `inviter_user_id` parameter. + * You can specify the ID of the user that will send the invitation with the `inviter_user_id` parameter. * That user must be a member with administrator privileges in the organization. * Only "admin" members can create organization invitations. * @@ -47,7 +105,7 @@ public function __construct(public SDKConfiguration $sdkConfig) * @return Operations\CreateOrganizationInvitationResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function createOrganizationInvitation(Operations\CreateOrganizationInvitationRequestBody $requestBody, string $organizationId): Operations\CreateOrganizationInvitationResponse + public function create(Operations\CreateOrganizationInvitationRequestBody $requestBody, string $organizationId): Operations\CreateOrganizationInvitationResponse { $request = new Operations\CreateOrganizationInvitationRequest( organizationId: $organizationId, @@ -87,7 +145,7 @@ public function createOrganizationInvitation(Operations\CreateOrganizationInvita } elseif (in_array($statusCode, [400, 403, 404, 422])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors63', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors73', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); throw $obj->toException(); } else { throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -110,13 +168,13 @@ public function createOrganizationInvitation(Operations\CreateOrganizationInvita * Any invitations created as a result of an Organization Domain are not included in the results. * * @param string $organizationId - * @param ?float $limit - * @param ?float $offset + * @param ?int $limit + * @param ?int $offset * @param ?Operations\ListOrganizationInvitationsQueryParamStatus $status * @return Operations\ListOrganizationInvitationsResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function listOrganizationInvitations(string $organizationId, ?float $limit = null, ?float $offset = null, ?Operations\ListOrganizationInvitationsQueryParamStatus $status = null): Operations\ListOrganizationInvitationsResponse + public function list(string $organizationId, ?int $limit = null, ?int $offset = null, ?Operations\ListOrganizationInvitationsQueryParamStatus $status = null): Operations\ListOrganizationInvitationsResponse { $request = new Operations\ListOrganizationInvitationsRequest( organizationId: $organizationId, @@ -154,7 +212,7 @@ public function listOrganizationInvitations(string $organizationId, ?float $limi } elseif (in_array($statusCode, [400, 404])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors64', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors74', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); throw $obj->toException(); } else { throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -175,7 +233,7 @@ public function listOrganizationInvitations(string $organizationId, ?float $limi * The request body supports passing an optional `redirect_url` parameter for each invitation. * When the invited user clicks the link to accept the invitation, they will be redirected to the provided URL. * Use this parameter to implement a custom invitation acceptance flow. - * You must specify the ID of the user that will send the invitation with the `inviter_user_id` parameter. Each invitation + * You can specify the ID of the user that will send the invitation with the `inviter_user_id` parameter. Each invitation * can have a different inviter user. * Inviter users must be members with administrator privileges in the organization. * Only "admin" members can create organization invitations. @@ -188,7 +246,7 @@ public function listOrganizationInvitations(string $organizationId, ?float $limi * @return Operations\CreateOrganizationInvitationBulkResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function createOrganizationInvitationBulk(array $requestBody, string $organizationId): Operations\CreateOrganizationInvitationBulkResponse + public function bulkCreate(array $requestBody, string $organizationId): Operations\CreateOrganizationInvitationBulkResponse { $request = new Operations\CreateOrganizationInvitationBulkRequest( organizationId: $organizationId, @@ -228,7 +286,7 @@ public function createOrganizationInvitationBulk(array $requestBody, string $org } elseif (in_array($statusCode, [400, 403, 404, 422])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors65', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors75', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); throw $obj->toException(); } else { throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -251,13 +309,13 @@ public function createOrganizationInvitationBulk(array $requestBody, string $org * Any invitations created as a result of an Organization Domain are not included in the results. * * @param string $organizationId - * @param ?float $limit - * @param ?float $offset + * @param ?int $limit + * @param ?int $offset * @return Operations\ListPendingOrganizationInvitationsResponse * @throws \Clerk\Backend\Models\Errors\SDKException * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. */ - public function listPendingOrganizationInvitations(string $organizationId, ?float $limit = null, ?float $offset = null): Operations\ListPendingOrganizationInvitationsResponse + public function listPending(string $organizationId, ?int $limit = null, ?int $offset = null): Operations\ListPendingOrganizationInvitationsResponse { trigger_error('Method '.__METHOD__.' is deprecated', E_USER_DEPRECATED); $request = new Operations\ListPendingOrganizationInvitationsRequest( @@ -295,7 +353,7 @@ public function listPendingOrganizationInvitations(string $organizationId, ?floa } elseif (in_array($statusCode, [400, 404])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors66', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors76', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); throw $obj->toException(); } else { throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -317,7 +375,7 @@ public function listPendingOrganizationInvitations(string $organizationId, ?floa * @return Operations\GetOrganizationInvitationResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function getOrganizationInvitation(string $organizationId, string $invitationId): Operations\GetOrganizationInvitationResponse + public function get(string $organizationId, string $invitationId): Operations\GetOrganizationInvitationResponse { $request = new Operations\GetOrganizationInvitationRequest( organizationId: $organizationId, @@ -352,7 +410,7 @@ public function getOrganizationInvitation(string $organizationId, string $invita } elseif (in_array($statusCode, [400, 403, 404])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors67', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors77', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); throw $obj->toException(); } else { throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -370,16 +428,16 @@ public function getOrganizationInvitation(string $organizationId, string $invita * Use this request to revoke a previously issued organization invitation. * Revoking an organization invitation makes it invalid; the invited user will no longer be able to join the organization with the revoked invitation. * Only organization invitations with "pending" status can be revoked. - * The request needs the `requesting_user_id` parameter to specify the user which revokes the invitation. + * The request accepts the `requesting_user_id` parameter to specify the user which revokes the invitation. * Only users with "admin" role can revoke invitations. * - * @param Operations\RevokeOrganizationInvitationRequestBody $requestBody * @param string $organizationId * @param string $invitationId + * @param ?Operations\RevokeOrganizationInvitationRequestBody $requestBody * @return Operations\RevokeOrganizationInvitationResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function revokeOrganizationInvitation(Operations\RevokeOrganizationInvitationRequestBody $requestBody, string $organizationId, string $invitationId): Operations\RevokeOrganizationInvitationResponse + public function revoke(string $organizationId, string $invitationId, ?Operations\RevokeOrganizationInvitationRequestBody $requestBody = null): Operations\RevokeOrganizationInvitationResponse { $request = new Operations\RevokeOrganizationInvitationRequest( organizationId: $organizationId, @@ -390,10 +448,9 @@ public function revokeOrganizationInvitation(Operations\RevokeOrganizationInvita $url = Utils\Utils::generateUrl($baseUrl, '/organizations/{organization_id}/invitations/{invitation_id}/revoke', Operations\RevokeOrganizationInvitationRequest::class, $request); $options = ['http_errors' => false]; $body = Utils\Utils::serializeRequestBody($request, 'requestBody', 'json'); - if ($body === null) { - throw new \Exception('Request body is required'); + if ($body !== null) { + $options = array_merge_recursive($options, $body); } - $options = array_merge_recursive($options, $body); $options['headers']['Accept'] = 'application/json'; $options['headers']['user-agent'] = $this->sdkConfiguration->userAgent; $httpRequest = new \GuzzleHttp\Psr7\Request('POST', $url); @@ -420,7 +477,7 @@ public function revokeOrganizationInvitation(Operations\RevokeOrganizationInvita } elseif (in_array($statusCode, [400, 403, 404])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors68', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors78', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); throw $obj->toException(); } else { throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); diff --git a/src/OrganizationMemberships.php b/src/OrganizationMemberships.php index fa1a63e..8183a6e 100644 --- a/src/OrganizationMemberships.php +++ b/src/OrganizationMemberships.php @@ -28,12 +28,16 @@ public function __construct(public SDKConfiguration $sdkConfig) * Adds a user as a member to the given organization. * Only users in the same instance as the organization can be added as members. * + * This organization will be the user's [active organization] (https://clerk.com/docs/organizations/overview#active-organization) + * the next time they create a session, presuming they don't explicitly set a + * different organization as active before then. + * * @param Operations\CreateOrganizationMembershipRequestBody $requestBody * @param string $organizationId * @return Operations\CreateOrganizationMembershipResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function createOrganizationMembership(Operations\CreateOrganizationMembershipRequestBody $requestBody, string $organizationId): Operations\CreateOrganizationMembershipResponse + public function create(Operations\CreateOrganizationMembershipRequestBody $requestBody, string $organizationId): Operations\CreateOrganizationMembershipResponse { $request = new Operations\CreateOrganizationMembershipRequest( organizationId: $organizationId, @@ -73,7 +77,7 @@ public function createOrganizationMembership(Operations\CreateOrganizationMember } elseif (in_array($statusCode, [400, 403, 404, 422])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors69', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors79', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); throw $obj->toException(); } else { throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -91,13 +95,13 @@ public function createOrganizationMembership(Operations\CreateOrganizationMember * Retrieves all user memberships for the given organization * * @param string $organizationId - * @param ?float $limit - * @param ?float $offset + * @param ?int $limit + * @param ?int $offset * @param ?string $orderBy * @return Operations\ListOrganizationMembershipsResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function listOrganizationMemberships(string $organizationId, ?float $limit = null, ?float $offset = null, ?string $orderBy = null): Operations\ListOrganizationMembershipsResponse + public function list(string $organizationId, ?int $limit = null, ?int $offset = null, ?string $orderBy = null): Operations\ListOrganizationMembershipsResponse { $request = new Operations\ListOrganizationMembershipsRequest( organizationId: $organizationId, @@ -135,7 +139,7 @@ public function listOrganizationMemberships(string $organizationId, ?float $limi } elseif (in_array($statusCode, [401, 422])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors70', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors80', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); throw $obj->toException(); } else { throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -158,7 +162,7 @@ public function listOrganizationMemberships(string $organizationId, ?float $limi * @return Operations\UpdateOrganizationMembershipResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function updateOrganizationMembership(Operations\UpdateOrganizationMembershipRequestBody $requestBody, string $organizationId, string $userId): Operations\UpdateOrganizationMembershipResponse + public function update(Operations\UpdateOrganizationMembershipRequestBody $requestBody, string $organizationId, string $userId): Operations\UpdateOrganizationMembershipResponse { $request = new Operations\UpdateOrganizationMembershipRequest( organizationId: $organizationId, @@ -199,7 +203,7 @@ public function updateOrganizationMembership(Operations\UpdateOrganizationMember } elseif (in_array($statusCode, [400, 404, 422])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors71', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors81', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); throw $obj->toException(); } else { throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -221,7 +225,7 @@ public function updateOrganizationMembership(Operations\UpdateOrganizationMember * @return Operations\DeleteOrganizationMembershipResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function deleteOrganizationMembership(string $organizationId, string $userId): Operations\DeleteOrganizationMembershipResponse + public function delete(string $organizationId, string $userId): Operations\DeleteOrganizationMembershipResponse { $request = new Operations\DeleteOrganizationMembershipRequest( organizationId: $organizationId, @@ -256,7 +260,7 @@ public function deleteOrganizationMembership(string $organizationId, string $use } elseif (in_array($statusCode, [400, 401, 404])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors72', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors82', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); throw $obj->toException(); } else { throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -281,7 +285,7 @@ public function deleteOrganizationMembership(string $organizationId, string $use * @return Operations\UpdateOrganizationMembershipMetadataResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function updateOrganizationMembershipMetadata(Operations\UpdateOrganizationMembershipMetadataRequestBody $requestBody, string $organizationId, string $userId): Operations\UpdateOrganizationMembershipMetadataResponse + public function updateMetadata(Operations\UpdateOrganizationMembershipMetadataRequestBody $requestBody, string $organizationId, string $userId): Operations\UpdateOrganizationMembershipMetadataResponse { $request = new Operations\UpdateOrganizationMembershipMetadataRequest( organizationId: $organizationId, @@ -322,7 +326,67 @@ public function updateOrganizationMembershipMetadata(Operations\UpdateOrganizati } elseif (in_array($statusCode, [400, 404, 422])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors73', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors83', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + throw new \Clerk\Backend\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } else { + throw new \Clerk\Backend\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } + + /** + * Get a list of all organization memberships within an instance. + * + * Retrieves all organization user memberships for the given instance. + * + * @param ?int $limit + * @param ?int $offset + * @param ?string $orderBy + * @return Operations\InstanceGetOrganizationMembershipsResponse + * @throws \Clerk\Backend\Models\Errors\SDKException + */ + public function getAll(?int $limit = null, ?int $offset = null, ?string $orderBy = null): Operations\InstanceGetOrganizationMembershipsResponse + { + $request = new Operations\InstanceGetOrganizationMembershipsRequest( + limit: $limit, + offset: $offset, + orderBy: $orderBy, + ); + $baseUrl = $this->sdkConfiguration->getServerUrl(); + $url = Utils\Utils::generateUrl($baseUrl, '/organization_memberships'); + $options = ['http_errors' => false]; + $options = array_merge_recursive($options, Utils\Utils::getQueryParams(Operations\InstanceGetOrganizationMembershipsRequest::class, $request)); + $options['headers']['Accept'] = 'application/json'; + $options['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('GET', $url); + + + $httpResponse = $this->sdkConfiguration->securityClient->send($httpRequest, $options); + $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; + + $statusCode = $httpResponse->getStatusCode(); + if ($statusCode == 200) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $serializer = Utils\JSON::createSerializer(); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Components\OrganizationMemberships', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\InstanceGetOrganizationMembershipsResponse( + statusCode: $statusCode, + contentType: $contentType, + rawResponse: $httpResponse, + organizationMemberships: $obj); + + return $response; + } else { + throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (in_array($statusCode, [400, 401, 422, 500])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $serializer = Utils\JSON::createSerializer(); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors104', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); throw $obj->toException(); } else { throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); diff --git a/src/Organizations.php b/src/Organizations.php index 1b02c25..8d50f9f 100644 --- a/src/Organizations.php +++ b/src/Organizations.php @@ -34,7 +34,7 @@ public function __construct(public SDKConfiguration $sdkConfig) * @return Operations\ListOrganizationsResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function listOrganizations(?Operations\ListOrganizationsRequest $request = null): Operations\ListOrganizationsResponse + public function list(?Operations\ListOrganizationsRequest $request = null): Operations\ListOrganizationsResponse { $baseUrl = $this->sdkConfiguration->getServerUrl(); $url = Utils\Utils::generateUrl($baseUrl, '/organizations'); @@ -66,7 +66,7 @@ public function listOrganizations(?Operations\ListOrganizationsRequest $request } elseif (in_array($statusCode, [400, 403, 422])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors57', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors67', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); throw $obj->toException(); } else { throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -90,12 +90,14 @@ public function listOrganizations(?Operations\ListOrganizationsRequest $request * Organizations support private and public metadata. * Private metadata can only be accessed from the Backend API. * Public metadata can be accessed from the Backend API, and are read-only from the Frontend API. + * The `created_by` user will see this as their [active organization] (https://clerk.com/docs/organizations/overview#active-organization) + * the next time they create a session, presuming they don't explicitly set a different organization as active before then. * * @param ?Operations\CreateOrganizationRequestBody $request * @return Operations\CreateOrganizationResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function createOrganization(?Operations\CreateOrganizationRequestBody $request = null): Operations\CreateOrganizationResponse + public function create(?Operations\CreateOrganizationRequestBody $request = null): Operations\CreateOrganizationResponse { $baseUrl = $this->sdkConfiguration->getServerUrl(); $url = Utils\Utils::generateUrl($baseUrl, '/organizations'); @@ -130,7 +132,7 @@ public function createOrganization(?Operations\CreateOrganizationRequestBody $re } elseif (in_array($statusCode, [400, 403, 422])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors58', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors68', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); throw $obj->toException(); } else { throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -148,17 +150,20 @@ public function createOrganization(?Operations\CreateOrganizationRequestBody $re * Fetches the organization whose ID or slug matches the provided `id_or_slug` URL query parameter. * * @param string $organizationId + * @param ?bool $includeMembersCount * @return Operations\GetOrganizationResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function getOrganization(string $organizationId): Operations\GetOrganizationResponse + public function get(string $organizationId, ?bool $includeMembersCount = null): Operations\GetOrganizationResponse { $request = new Operations\GetOrganizationRequest( organizationId: $organizationId, + includeMembersCount: $includeMembersCount, ); $baseUrl = $this->sdkConfiguration->getServerUrl(); $url = Utils\Utils::generateUrl($baseUrl, '/organizations/{organization_id}', Operations\GetOrganizationRequest::class, $request); $options = ['http_errors' => false]; + $options = array_merge_recursive($options, Utils\Utils::getQueryParams(Operations\GetOrganizationRequest::class, $request)); $options['headers']['Accept'] = 'application/json'; $options['headers']['user-agent'] = $this->sdkConfiguration->userAgent; $httpRequest = new \GuzzleHttp\Psr7\Request('GET', $url); @@ -185,7 +190,7 @@ public function getOrganization(string $organizationId): Operations\GetOrganizat } elseif (in_array($statusCode, [403, 404])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors59', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors69', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); throw $obj->toException(); } else { throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -207,7 +212,7 @@ public function getOrganization(string $organizationId): Operations\GetOrganizat * @return Operations\UpdateOrganizationResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function updateOrganization(Operations\UpdateOrganizationRequestBody $requestBody, string $organizationId): Operations\UpdateOrganizationResponse + public function update(Operations\UpdateOrganizationRequestBody $requestBody, string $organizationId): Operations\UpdateOrganizationResponse { $request = new Operations\UpdateOrganizationRequest( organizationId: $organizationId, @@ -247,7 +252,7 @@ public function updateOrganization(Operations\UpdateOrganizationRequestBody $req } elseif (in_array($statusCode, [402, 404, 422])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors60', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors70', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); throw $obj->toException(); } else { throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -270,7 +275,7 @@ public function updateOrganization(Operations\UpdateOrganizationRequestBody $req * @return Operations\DeleteOrganizationResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function deleteOrganization(string $organizationId): Operations\DeleteOrganizationResponse + public function delete(string $organizationId): Operations\DeleteOrganizationResponse { $request = new Operations\DeleteOrganizationRequest( organizationId: $organizationId, @@ -304,7 +309,7 @@ public function deleteOrganization(string $organizationId): Operations\DeleteOrg } elseif ($statusCode == 404) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors61', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors71', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); throw $obj->toException(); } else { throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -329,7 +334,7 @@ public function deleteOrganization(string $organizationId): Operations\DeleteOrg * @return Operations\MergeOrganizationMetadataResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function mergeOrganizationMetadata(Operations\MergeOrganizationMetadataRequestBody $requestBody, string $organizationId): Operations\MergeOrganizationMetadataResponse + public function mergeMetadata(Operations\MergeOrganizationMetadataRequestBody $requestBody, string $organizationId): Operations\MergeOrganizationMetadataResponse { $request = new Operations\MergeOrganizationMetadataRequest( organizationId: $organizationId, @@ -369,7 +374,7 @@ public function mergeOrganizationMetadata(Operations\MergeOrganizationMetadataRe } elseif (in_array($statusCode, [400, 401, 404, 422])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors61', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors71', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); throw $obj->toException(); } else { throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -394,7 +399,7 @@ public function mergeOrganizationMetadata(Operations\MergeOrganizationMetadataRe * @return Operations\UploadOrganizationLogoResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function uploadOrganizationLogo(string $organizationId, ?Operations\UploadOrganizationLogoRequestBody $requestBody = null): Operations\UploadOrganizationLogoResponse + public function uploadLogo(string $organizationId, ?Operations\UploadOrganizationLogoRequestBody $requestBody = null): Operations\UploadOrganizationLogoResponse { $request = new Operations\UploadOrganizationLogoRequest( organizationId: $organizationId, @@ -433,7 +438,7 @@ public function uploadOrganizationLogo(string $organizationId, ?Operations\Uploa } elseif (in_array($statusCode, [400, 403, 404, 413])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors62', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors72', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); throw $obj->toException(); } else { throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -452,7 +457,7 @@ public function uploadOrganizationLogo(string $organizationId, ?Operations\Uploa * @return Operations\DeleteOrganizationLogoResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function deleteOrganizationLogo(string $organizationId): Operations\DeleteOrganizationLogoResponse + public function deleteLogo(string $organizationId): Operations\DeleteOrganizationLogoResponse { $request = new Operations\DeleteOrganizationLogoRequest( organizationId: $organizationId, @@ -486,7 +491,7 @@ public function deleteOrganizationLogo(string $organizationId): Operations\Delet } elseif ($statusCode == 404) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors63', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors73', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); throw $obj->toException(); } else { throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); diff --git a/src/PhoneNumbers.php b/src/PhoneNumbers.php index 5a6c40c..8b8ab49 100644 --- a/src/PhoneNumbers.php +++ b/src/PhoneNumbers.php @@ -31,7 +31,7 @@ public function __construct(public SDKConfiguration $sdkConfig) * @return Operations\CreatePhoneNumberResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function createPhoneNumber(?Operations\CreatePhoneNumberRequestBody $request = null): Operations\CreatePhoneNumberResponse + public function create(?Operations\CreatePhoneNumberRequestBody $request = null): Operations\CreatePhoneNumberResponse { $baseUrl = $this->sdkConfiguration->getServerUrl(); $url = Utils\Utils::generateUrl($baseUrl, '/phone_numbers'); @@ -87,7 +87,7 @@ public function createPhoneNumber(?Operations\CreatePhoneNumberRequestBody $requ * @return Operations\GetPhoneNumberResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function getPhoneNumber(string $phoneNumberId): Operations\GetPhoneNumberResponse + public function get(string $phoneNumberId): Operations\GetPhoneNumberResponse { $request = new Operations\GetPhoneNumberRequest( phoneNumberId: $phoneNumberId, @@ -142,7 +142,7 @@ public function getPhoneNumber(string $phoneNumberId): Operations\GetPhoneNumber * @return Operations\DeletePhoneNumberResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function deletePhoneNumber(string $phoneNumberId): Operations\DeletePhoneNumberResponse + public function delete(string $phoneNumberId): Operations\DeletePhoneNumberResponse { $request = new Operations\DeletePhoneNumberRequest( phoneNumberId: $phoneNumberId, @@ -198,7 +198,7 @@ public function deletePhoneNumber(string $phoneNumberId): Operations\DeletePhone * @return Operations\UpdatePhoneNumberResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function updatePhoneNumber(string $phoneNumberId, ?Operations\UpdatePhoneNumberRequestBody $requestBody = null): Operations\UpdatePhoneNumberResponse + public function update(string $phoneNumberId, ?Operations\UpdatePhoneNumberRequestBody $requestBody = null): Operations\UpdatePhoneNumberResponse { $request = new Operations\UpdatePhoneNumberRequest( phoneNumberId: $phoneNumberId, diff --git a/src/ProxyChecks.php b/src/ProxyChecks.php index 90fcd16..26ff1c8 100644 --- a/src/ProxyChecks.php +++ b/src/ProxyChecks.php @@ -38,7 +38,7 @@ public function __construct(public SDKConfiguration $sdkConfig) * @return Operations\VerifyDomainProxyResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function verifyDomainProxy(?Operations\VerifyDomainProxyRequestBody $request = null): Operations\VerifyDomainProxyResponse + public function verify(?Operations\VerifyDomainProxyRequestBody $request = null): Operations\VerifyDomainProxyResponse { $baseUrl = $this->sdkConfiguration->getServerUrl(); $url = Utils\Utils::generateUrl($baseUrl, '/proxy_checks'); @@ -73,7 +73,7 @@ public function verifyDomainProxy(?Operations\VerifyDomainProxyRequestBody $requ } elseif (in_array($statusCode, [400, 422])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors74', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors88', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); throw $obj->toException(); } else { throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); diff --git a/src/RedirectURLs.php b/src/RedirectURLs.php index 51f37f3..4607942 100644 --- a/src/RedirectURLs.php +++ b/src/RedirectURLs.php @@ -30,7 +30,7 @@ public function __construct(public SDKConfiguration $sdkConfig) * @return Operations\ListRedirectURLsResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function listRedirectURLs(): Operations\ListRedirectURLsResponse + public function list(): Operations\ListRedirectURLsResponse { $baseUrl = $this->sdkConfiguration->getServerUrl(); $url = Utils\Utils::generateUrl($baseUrl, '/redirect_urls'); @@ -65,170 +65,4 @@ public function listRedirectURLs(): Operations\ListRedirectURLsResponse } } - /** - * Create a redirect URL - * - * Create a redirect URL - * - * @param ?Operations\CreateRedirectURLRequestBody $request - * @return Operations\CreateRedirectURLResponse - * @throws \Clerk\Backend\Models\Errors\SDKException - */ - public function createRedirectURL(?Operations\CreateRedirectURLRequestBody $request = null): Operations\CreateRedirectURLResponse - { - $baseUrl = $this->sdkConfiguration->getServerUrl(); - $url = Utils\Utils::generateUrl($baseUrl, '/redirect_urls'); - $options = ['http_errors' => false]; - $body = Utils\Utils::serializeRequestBody($request, 'request', 'json'); - if ($body !== null) { - $options = array_merge_recursive($options, $body); - } - $options['headers']['Accept'] = 'application/json'; - $options['headers']['user-agent'] = $this->sdkConfiguration->userAgent; - $httpRequest = new \GuzzleHttp\Psr7\Request('POST', $url); - - - $httpResponse = $this->sdkConfiguration->securityClient->send($httpRequest, $options); - $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; - - $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 200) { - if (Utils\Utils::matchContentType($contentType, 'application/json')) { - $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Components\RedirectURL', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - $response = new Operations\CreateRedirectURLResponse( - statusCode: $statusCode, - contentType: $contentType, - rawResponse: $httpResponse, - redirectURL: $obj); - - return $response; - } else { - throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); - } - } elseif (in_array($statusCode, [400, 422])) { - if (Utils\Utils::matchContentType($contentType, 'application/json')) { - $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors75', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj->toException(); - } else { - throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); - } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { - throw new \Clerk\Backend\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); - } else { - throw new \Clerk\Backend\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); - } - } - - /** - * Retrieve a redirect URL - * - * Retrieve the details of the redirect URL with the given ID - * - * @param string $id - * @return Operations\GetRedirectURLResponse - * @throws \Clerk\Backend\Models\Errors\SDKException - */ - public function getRedirectURL(string $id): Operations\GetRedirectURLResponse - { - $request = new Operations\GetRedirectURLRequest( - id: $id, - ); - $baseUrl = $this->sdkConfiguration->getServerUrl(); - $url = Utils\Utils::generateUrl($baseUrl, '/redirect_urls/{id}', Operations\GetRedirectURLRequest::class, $request); - $options = ['http_errors' => false]; - $options['headers']['Accept'] = 'application/json'; - $options['headers']['user-agent'] = $this->sdkConfiguration->userAgent; - $httpRequest = new \GuzzleHttp\Psr7\Request('GET', $url); - - - $httpResponse = $this->sdkConfiguration->securityClient->send($httpRequest, $options); - $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; - - $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 200) { - if (Utils\Utils::matchContentType($contentType, 'application/json')) { - $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Components\RedirectURL', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - $response = new Operations\GetRedirectURLResponse( - statusCode: $statusCode, - contentType: $contentType, - rawResponse: $httpResponse, - redirectURL: $obj); - - return $response; - } else { - throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); - } - } elseif ($statusCode == 404) { - if (Utils\Utils::matchContentType($contentType, 'application/json')) { - $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors76', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj->toException(); - } else { - throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); - } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { - throw new \Clerk\Backend\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); - } else { - throw new \Clerk\Backend\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); - } - } - - /** - * Delete a redirect URL - * - * Remove the selected redirect URL from the whitelist of the instance - * - * @param string $id - * @return Operations\DeleteRedirectURLResponse - * @throws \Clerk\Backend\Models\Errors\SDKException - */ - public function deleteRedirectURL(string $id): Operations\DeleteRedirectURLResponse - { - $request = new Operations\DeleteRedirectURLRequest( - id: $id, - ); - $baseUrl = $this->sdkConfiguration->getServerUrl(); - $url = Utils\Utils::generateUrl($baseUrl, '/redirect_urls/{id}', Operations\DeleteRedirectURLRequest::class, $request); - $options = ['http_errors' => false]; - $options['headers']['Accept'] = 'application/json'; - $options['headers']['user-agent'] = $this->sdkConfiguration->userAgent; - $httpRequest = new \GuzzleHttp\Psr7\Request('DELETE', $url); - - - $httpResponse = $this->sdkConfiguration->securityClient->send($httpRequest, $options); - $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; - - $statusCode = $httpResponse->getStatusCode(); - if ($statusCode == 200) { - if (Utils\Utils::matchContentType($contentType, 'application/json')) { - $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Components\DeletedObject', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - $response = new Operations\DeleteRedirectURLResponse( - statusCode: $statusCode, - contentType: $contentType, - rawResponse: $httpResponse, - deletedObject: $obj); - - return $response; - } else { - throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); - } - } elseif ($statusCode == 404) { - if (Utils\Utils::matchContentType($contentType, 'application/json')) { - $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors77', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); - throw $obj->toException(); - } else { - throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); - } - } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { - throw new \Clerk\Backend\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); - } else { - throw new \Clerk\Backend\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); - } - } - } \ No newline at end of file diff --git a/src/SAMLConnections.php b/src/SAMLConnections.php index 968241b..71b7bf9 100644 --- a/src/SAMLConnections.php +++ b/src/SAMLConnections.php @@ -11,7 +11,7 @@ use Clerk\Backend\Models\Operations; use Speakeasy\Serializer\DeserializationContext; -class SAMLConnections +class SamlConnections { private SDKConfiguration $sdkConfiguration; /** @@ -29,12 +29,12 @@ public function __construct(public SDKConfiguration $sdkConfig) * Results can be paginated using the optional `limit` and `offset` query parameters. * The SAML Connections are ordered by descending creation date and the most recent will be returned first. * - * @param ?float $limit - * @param ?float $offset + * @param ?int $limit + * @param ?int $offset * @return Operations\ListSAMLConnectionsResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function listSAMLConnections(?float $limit = null, ?float $offset = null): Operations\ListSAMLConnectionsResponse + public function list(?int $limit = null, ?int $offset = null): Operations\ListSAMLConnectionsResponse { $request = new Operations\ListSAMLConnectionsRequest( limit: $limit, @@ -70,7 +70,7 @@ public function listSAMLConnections(?float $limit = null, ?float $offset = null) } elseif (in_array($statusCode, [402, 403, 422])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors85', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors99', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); throw $obj->toException(); } else { throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -91,7 +91,7 @@ public function listSAMLConnections(?float $limit = null, ?float $offset = null) * @return Operations\CreateSAMLConnectionResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function createSAMLConnection(?Operations\CreateSAMLConnectionRequestBody $request = null): Operations\CreateSAMLConnectionResponse + public function create(?Operations\CreateSAMLConnectionRequestBody $request = null): Operations\CreateSAMLConnectionResponse { $baseUrl = $this->sdkConfiguration->getServerUrl(); $url = Utils\Utils::generateUrl($baseUrl, '/saml_connections'); @@ -112,12 +112,12 @@ public function createSAMLConnection(?Operations\CreateSAMLConnectionRequestBody if ($statusCode == 200) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Components\SAMLConnection', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Components\SchemasSAMLConnection', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); $response = new Operations\CreateSAMLConnectionResponse( statusCode: $statusCode, contentType: $contentType, rawResponse: $httpResponse, - samlConnection: $obj); + schemasSAMLConnection: $obj); return $response; } else { @@ -126,7 +126,7 @@ public function createSAMLConnection(?Operations\CreateSAMLConnectionRequestBody } elseif (in_array($statusCode, [402, 403, 422])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors86', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors100', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); throw $obj->toException(); } else { throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -147,7 +147,7 @@ public function createSAMLConnection(?Operations\CreateSAMLConnectionRequestBody * @return Operations\GetSAMLConnectionResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function getSAMLConnection(string $samlConnectionId): Operations\GetSAMLConnectionResponse + public function get(string $samlConnectionId): Operations\GetSAMLConnectionResponse { $request = new Operations\GetSAMLConnectionRequest( samlConnectionId: $samlConnectionId, @@ -167,12 +167,12 @@ public function getSAMLConnection(string $samlConnectionId): Operations\GetSAMLC if ($statusCode == 200) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Components\SAMLConnection', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Components\SchemasSAMLConnection', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); $response = new Operations\GetSAMLConnectionResponse( statusCode: $statusCode, contentType: $contentType, rawResponse: $httpResponse, - samlConnection: $obj); + schemasSAMLConnection: $obj); return $response; } else { @@ -181,7 +181,7 @@ public function getSAMLConnection(string $samlConnectionId): Operations\GetSAMLC } elseif (in_array($statusCode, [402, 403, 404])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors87', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors101', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); throw $obj->toException(); } else { throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -203,7 +203,7 @@ public function getSAMLConnection(string $samlConnectionId): Operations\GetSAMLC * @return Operations\UpdateSAMLConnectionResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function updateSAMLConnection(Operations\UpdateSAMLConnectionRequestBody $requestBody, string $samlConnectionId): Operations\UpdateSAMLConnectionResponse + public function update(Operations\UpdateSAMLConnectionRequestBody $requestBody, string $samlConnectionId): Operations\UpdateSAMLConnectionResponse { $request = new Operations\UpdateSAMLConnectionRequest( samlConnectionId: $samlConnectionId, @@ -229,12 +229,12 @@ public function updateSAMLConnection(Operations\UpdateSAMLConnectionRequestBody if ($statusCode == 200) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Components\SAMLConnection', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Components\SchemasSAMLConnection', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); $response = new Operations\UpdateSAMLConnectionResponse( statusCode: $statusCode, contentType: $contentType, rawResponse: $httpResponse, - samlConnection: $obj); + schemasSAMLConnection: $obj); return $response; } else { @@ -243,7 +243,7 @@ public function updateSAMLConnection(Operations\UpdateSAMLConnectionRequestBody } elseif (in_array($statusCode, [402, 403, 404, 422])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors88', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors102', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); throw $obj->toException(); } else { throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -264,7 +264,7 @@ public function updateSAMLConnection(Operations\UpdateSAMLConnectionRequestBody * @return Operations\DeleteSAMLConnectionResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function deleteSAMLConnection(string $samlConnectionId): Operations\DeleteSAMLConnectionResponse + public function delete(string $samlConnectionId): Operations\DeleteSAMLConnectionResponse { $request = new Operations\DeleteSAMLConnectionRequest( samlConnectionId: $samlConnectionId, @@ -298,7 +298,7 @@ public function deleteSAMLConnection(string $samlConnectionId): Operations\Delet } elseif (in_array($statusCode, [402, 403, 404])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors89', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors103', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); throw $obj->toException(); } else { throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); diff --git a/src/SDKConfiguration.php b/src/SDKConfiguration.php index 1032e63..0e7a333 100644 --- a/src/SDKConfiguration.php +++ b/src/SDKConfiguration.php @@ -27,11 +27,11 @@ class SDKConfiguration public string $openapiDocVersion = 'v1'; - public string $sdkVersion = '0.2.2'; + public string $sdkVersion = '0.4.3'; public string $genVersion = '2.445.1'; - public string $userAgent = 'speakeasy-sdk/php 0.2.2 2.445.1 v1 clerk/backend-php'; + public string $userAgent = 'speakeasy-sdk/php 0.4.3 2.445.1 v1 clerk/backend-php'; public function getServerUrl(): string { diff --git a/src/Sessions.php b/src/Sessions.php index 0d79f9b..edbe3eb 100644 --- a/src/Sessions.php +++ b/src/Sessions.php @@ -34,7 +34,7 @@ public function __construct(public SDKConfiguration $sdkConfig) * @return Operations\GetSessionListResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function getSessionList(?Operations\GetSessionListRequest $request = null): Operations\GetSessionListResponse + public function list(?Operations\GetSessionListRequest $request = null): Operations\GetSessionListResponse { $baseUrl = $this->sdkConfiguration->getServerUrl(); $url = Utils\Utils::generateUrl($baseUrl, '/sessions'); @@ -87,7 +87,7 @@ public function getSessionList(?Operations\GetSessionListRequest $request = null * @return Operations\GetSessionResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function getSession(string $sessionId): Operations\GetSessionResponse + public function get(string $sessionId): Operations\GetSessionResponse { $request = new Operations\GetSessionRequest( sessionId: $sessionId, @@ -143,7 +143,7 @@ public function getSession(string $sessionId): Operations\GetSessionResponse * @return Operations\RevokeSessionResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function revokeSession(string $sessionId): Operations\RevokeSessionResponse + public function revoke(string $sessionId): Operations\RevokeSessionResponse { $request = new Operations\RevokeSessionRequest( sessionId: $sessionId, @@ -203,7 +203,7 @@ public function revokeSession(string $sessionId): Operations\RevokeSessionRespon * @throws \Clerk\Backend\Models\Errors\SDKException * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. */ - public function verifySession(string $sessionId, ?Operations\VerifySessionRequestBody $requestBody = null): Operations\VerifySessionResponse + public function verify(string $sessionId, ?Operations\VerifySessionRequestBody $requestBody = null): Operations\VerifySessionResponse { trigger_error('Method '.__METHOD__.' is deprecated', E_USER_DEPRECATED); $request = new Operations\VerifySessionRequest( @@ -265,7 +265,7 @@ public function verifySession(string $sessionId, ?Operations\VerifySessionReques * @return Operations\CreateSessionTokenFromTemplateResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function createSessionTokenFromTemplate(string $sessionId, string $templateName): Operations\CreateSessionTokenFromTemplateResponse + public function createTokenFromTemplate(string $sessionId, string $templateName): Operations\CreateSessionTokenFromTemplateResponse { $request = new Operations\CreateSessionTokenFromTemplateRequest( sessionId: $sessionId, diff --git a/src/SignInTokens.php b/src/SignInTokens.php index 7ad515f..8068daf 100644 --- a/src/SignInTokens.php +++ b/src/SignInTokens.php @@ -33,7 +33,7 @@ public function __construct(public SDKConfiguration $sdkConfig) * @return Operations\CreateSignInTokenResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function createSignInToken(?Operations\CreateSignInTokenRequestBody $request = null): Operations\CreateSignInTokenResponse + public function create(?Operations\CreateSignInTokenRequestBody $request = null): Operations\CreateSignInTokenResponse { $baseUrl = $this->sdkConfiguration->getServerUrl(); $url = Utils\Utils::generateUrl($baseUrl, '/sign_in_tokens'); @@ -68,7 +68,7 @@ public function createSignInToken(?Operations\CreateSignInTokenRequestBody $requ } elseif (in_array($statusCode, [404, 422])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors77', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors91', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); throw $obj->toException(); } else { throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -89,7 +89,7 @@ public function createSignInToken(?Operations\CreateSignInTokenRequestBody $requ * @return Operations\RevokeSignInTokenResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function revokeSignInToken(string $signInTokenId): Operations\RevokeSignInTokenResponse + public function revoke(string $signInTokenId): Operations\RevokeSignInTokenResponse { $request = new Operations\RevokeSignInTokenRequest( signInTokenId: $signInTokenId, @@ -123,7 +123,7 @@ public function revokeSignInToken(string $signInTokenId): Operations\RevokeSignI } elseif (in_array($statusCode, [400, 404])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors78', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors92', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); throw $obj->toException(); } else { throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); diff --git a/src/SignUps.php b/src/SignUps.php index b483606..c23640e 100644 --- a/src/SignUps.php +++ b/src/SignUps.php @@ -32,7 +32,7 @@ public function __construct(public SDKConfiguration $sdkConfig) * @return Operations\UpdateSignUpResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function updateSignUp(string $id, ?Operations\UpdateSignUpRequestBody $requestBody = null): Operations\UpdateSignUpResponse + public function update(string $id, ?Operations\UpdateSignUpRequestBody $requestBody = null): Operations\UpdateSignUpResponse { $request = new Operations\UpdateSignUpRequest( id: $id, @@ -71,7 +71,7 @@ public function updateSignUp(string $id, ?Operations\UpdateSignUpRequestBody $re } elseif ($statusCode == 403) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors79', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors93', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); throw $obj->toException(); } else { throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); diff --git a/src/Templates.php b/src/Templates.php new file mode 100644 index 0000000..c29115b --- /dev/null +++ b/src/Templates.php @@ -0,0 +1,90 @@ +sdkConfiguration = $sdkConfig; + } + + /** + * Preview changes to a template + * + * Returns a preview of a template for a given template_type, slug and body + * + * @param string $templateType + * @param string $slug + * @param ?Operations\PreviewTemplateRequestBody $requestBody + * @return Operations\PreviewTemplateResponse + * @throws \Clerk\Backend\Models\Errors\SDKException + * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible. + */ + public function preview(string $templateType, string $slug, ?Operations\PreviewTemplateRequestBody $requestBody = null): Operations\PreviewTemplateResponse + { + trigger_error('Method '.__METHOD__.' is deprecated', E_USER_DEPRECATED); + $request = new Operations\PreviewTemplateRequest( + templateType: $templateType, + slug: $slug, + requestBody: $requestBody, + ); + $baseUrl = $this->sdkConfiguration->getServerUrl(); + $url = Utils\Utils::generateUrl($baseUrl, '/templates/{template_type}/{slug}/preview', Operations\PreviewTemplateRequest::class, $request); + $options = ['http_errors' => false]; + $body = Utils\Utils::serializeRequestBody($request, 'requestBody', 'json'); + if ($body !== null) { + $options = array_merge_recursive($options, $body); + } + $options['headers']['Accept'] = 'application/json'; + $options['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('POST', $url); + + + $httpResponse = $this->sdkConfiguration->securityClient->send($httpRequest, $options); + $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; + + $statusCode = $httpResponse->getStatusCode(); + if ($statusCode == 200) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $serializer = Utils\JSON::createSerializer(); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Operations\PreviewTemplateResponseBody', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\PreviewTemplateResponse( + statusCode: $statusCode, + contentType: $contentType, + rawResponse: $httpResponse, + object: $obj); + + return $response; + } else { + throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (in_array($statusCode, [400, 401, 404, 422])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $serializer = Utils\JSON::createSerializer(); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors20', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + throw new \Clerk\Backend\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } else { + throw new \Clerk\Backend\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } + +} \ No newline at end of file diff --git a/src/TestingTokens.php b/src/TestingTokens.php index 9197678..2841e43 100644 --- a/src/TestingTokens.php +++ b/src/TestingTokens.php @@ -30,7 +30,7 @@ public function __construct(public SDKConfiguration $sdkConfig) * @return Operations\CreateTestingTokenResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function createTestingToken(): Operations\CreateTestingTokenResponse + public function create(): Operations\CreateTestingTokenResponse { $baseUrl = $this->sdkConfiguration->getServerUrl(); $url = Utils\Utils::generateUrl($baseUrl, '/testing_tokens'); diff --git a/src/Users.php b/src/Users.php index b83825b..c0f0663 100644 --- a/src/Users.php +++ b/src/Users.php @@ -32,7 +32,7 @@ public function __construct(public SDKConfiguration $sdkConfig) * @return Operations\GetUserListResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function getUserList(?Operations\GetUserListRequest $request = null): Operations\GetUserListResponse + public function list(?Operations\GetUserListRequest $request = null): Operations\GetUserListResponse { $baseUrl = $this->sdkConfiguration->getServerUrl(); $url = Utils\Utils::generateUrl($baseUrl, '/users'); @@ -91,7 +91,7 @@ public function getUserList(?Operations\GetUserListRequest $request = null): Ope * @return Operations\CreateUserResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function createUser(?Operations\CreateUserRequestBody $request = null): Operations\CreateUserResponse + public function create(?Operations\CreateUserRequestBody $request = null): Operations\CreateUserResponse { $baseUrl = $this->sdkConfiguration->getServerUrl(); $url = Utils\Utils::generateUrl($baseUrl, '/users'); @@ -147,7 +147,7 @@ public function createUser(?Operations\CreateUserRequestBody $request = null): O * @return Operations\GetUsersCountResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function getUsersCount(?Operations\GetUsersCountRequest $request = null): Operations\GetUsersCountResponse + public function count(?Operations\GetUsersCountRequest $request = null): Operations\GetUsersCountResponse { $baseUrl = $this->sdkConfiguration->getServerUrl(); $url = Utils\Utils::generateUrl($baseUrl, '/users/count'); @@ -200,7 +200,7 @@ public function getUsersCount(?Operations\GetUsersCountRequest $request = null): * @return Operations\GetUserResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function getUser(string $userId): Operations\GetUserResponse + public function get(string $userId): Operations\GetUserResponse { $request = new Operations\GetUserRequest( userId: $userId, @@ -267,7 +267,7 @@ public function getUser(string $userId): Operations\GetUserResponse * @return Operations\UpdateUserResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function updateUser(Operations\UpdateUserRequestBody $requestBody, string $userId): Operations\UpdateUserResponse + public function update(Operations\UpdateUserRequestBody $requestBody, string $userId): Operations\UpdateUserResponse { $request = new Operations\UpdateUserRequest( userId: $userId, @@ -328,7 +328,7 @@ public function updateUser(Operations\UpdateUserRequestBody $requestBody, string * @return Operations\DeleteUserResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function deleteUser(string $userId): Operations\DeleteUserResponse + public function delete(string $userId): Operations\DeleteUserResponse { $request = new Operations\DeleteUserRequest( userId: $userId, @@ -383,7 +383,7 @@ public function deleteUser(string $userId): Operations\DeleteUserResponse * @return Operations\BanUserResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function banUser(string $userId): Operations\BanUserResponse + public function ban(string $userId): Operations\BanUserResponse { $request = new Operations\BanUserRequest( userId: $userId, @@ -438,7 +438,7 @@ public function banUser(string $userId): Operations\BanUserResponse * @return Operations\UnbanUserResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function unbanUser(string $userId): Operations\UnbanUserResponse + public function unban(string $userId): Operations\UnbanUserResponse { $request = new Operations\UnbanUserRequest( userId: $userId, @@ -494,7 +494,7 @@ public function unbanUser(string $userId): Operations\UnbanUserResponse * @return Operations\LockUserResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function lockUser(string $userId): Operations\LockUserResponse + public function lock(string $userId): Operations\LockUserResponse { $request = new Operations\LockUserRequest( userId: $userId, @@ -549,7 +549,7 @@ public function lockUser(string $userId): Operations\LockUserResponse * @return Operations\UnlockUserResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function unlockUser(string $userId): Operations\UnlockUserResponse + public function unlock(string $userId): Operations\UnlockUserResponse { $request = new Operations\UnlockUserRequest( userId: $userId, @@ -605,7 +605,7 @@ public function unlockUser(string $userId): Operations\UnlockUserResponse * @return Operations\SetUserProfileImageResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function setUserProfileImage(Operations\SetUserProfileImageRequestBody $requestBody, string $userId): Operations\SetUserProfileImageResponse + public function setProfileImage(Operations\SetUserProfileImageRequestBody $requestBody, string $userId): Operations\SetUserProfileImageResponse { $request = new Operations\SetUserProfileImageRequest( userId: $userId, @@ -666,7 +666,7 @@ public function setUserProfileImage(Operations\SetUserProfileImageRequestBody $r * @return Operations\DeleteUserProfileImageResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function deleteUserProfileImage(string $userId): Operations\DeleteUserProfileImageResponse + public function deleteProfileImage(string $userId): Operations\DeleteUserProfileImageResponse { $request = new Operations\DeleteUserProfileImageRequest( userId: $userId, @@ -729,7 +729,7 @@ public function deleteUserProfileImage(string $userId): Operations\DeleteUserPro * @return Operations\UpdateUserMetadataResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function updateUserMetadata(string $userId, ?Operations\UpdateUserMetadataRequestBody $requestBody = null): Operations\UpdateUserMetadataResponse + public function updateMetadata(string $userId, ?Operations\UpdateUserMetadataRequestBody $requestBody = null): Operations\UpdateUserMetadataResponse { $request = new Operations\UpdateUserMetadataRequest( userId: $userId, @@ -844,12 +844,12 @@ public function getOAuthAccessToken(string $userId, string $provider): Operation * Retrieve a paginated list of the user's organization memberships * * @param string $userId - * @param ?float $limit - * @param ?float $offset + * @param ?int $limit + * @param ?int $offset * @return Operations\UsersGetOrganizationMembershipsResponse * @throws \Clerk\Backend\Models\Errors\SDKException */ - public function usersGetOrganizationMemberships(string $userId, ?float $limit = null, ?float $offset = null): Operations\UsersGetOrganizationMembershipsResponse + public function getOrganizationMemberships(string $userId, ?int $limit = null, ?int $offset = null): Operations\UsersGetOrganizationMembershipsResponse { $request = new Operations\UsersGetOrganizationMembershipsRequest( userId: $userId, @@ -898,6 +898,68 @@ public function usersGetOrganizationMemberships(string $userId, ?float $limit = } } + /** + * Retrieve all invitations for a user + * + * Retrieve a paginated list of the user's organization invitations + * + * @param string $userId + * @param ?int $limit + * @param ?int $offset + * @param ?Operations\QueryParamStatus $status + * @return Operations\UsersGetOrganizationInvitationsResponse + * @throws \Clerk\Backend\Models\Errors\SDKException + */ + public function getOrganizationInvitations(string $userId, ?int $limit = null, ?int $offset = null, ?Operations\QueryParamStatus $status = null): Operations\UsersGetOrganizationInvitationsResponse + { + $request = new Operations\UsersGetOrganizationInvitationsRequest( + userId: $userId, + limit: $limit, + offset: $offset, + status: $status, + ); + $baseUrl = $this->sdkConfiguration->getServerUrl(); + $url = Utils\Utils::generateUrl($baseUrl, '/users/{user_id}/organization_invitations', Operations\UsersGetOrganizationInvitationsRequest::class, $request); + $options = ['http_errors' => false]; + $options = array_merge_recursive($options, Utils\Utils::getQueryParams(Operations\UsersGetOrganizationInvitationsRequest::class, $request)); + $options['headers']['Accept'] = 'application/json'; + $options['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('GET', $url); + + + $httpResponse = $this->sdkConfiguration->securityClient->send($httpRequest, $options); + $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; + + $statusCode = $httpResponse->getStatusCode(); + if ($statusCode == 200) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $serializer = Utils\JSON::createSerializer(); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Components\OrganizationInvitationsWithPublicOrganizationData', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\UsersGetOrganizationInvitationsResponse( + statusCode: $statusCode, + contentType: $contentType, + rawResponse: $httpResponse, + organizationInvitationsWithPublicOrganizationData: $obj); + + return $response; + } else { + throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (in_array($statusCode, [400, 403, 404])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $serializer = Utils\JSON::createSerializer(); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors33', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + throw new \Clerk\Backend\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } else { + throw new \Clerk\Backend\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } + /** * Verify the password of a user * @@ -950,7 +1012,7 @@ public function verifyPassword(string $userId, ?Operations\VerifyPasswordRequest } elseif ($statusCode == 500) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors33', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors34', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); throw $obj->toException(); } else { throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -1014,7 +1076,7 @@ public function verifyTOTP(string $userId, ?Operations\VerifyTOTPRequestBody $re } elseif ($statusCode == 500) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors33', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors35', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); throw $obj->toException(); } else { throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -1067,7 +1129,344 @@ public function disableMFA(string $userId): Operations\DisableMFAResponse } elseif (in_array($statusCode, [404, 500])) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors33', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors35', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + throw new \Clerk\Backend\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } else { + throw new \Clerk\Backend\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } + + /** + * Disable all user's Backup codes + * + * Disable all of a user's backup codes. + * + * @param string $userId + * @return Operations\DeleteBackupCodeResponse + * @throws \Clerk\Backend\Models\Errors\SDKException + */ + public function deleteBackupCodes(string $userId): Operations\DeleteBackupCodeResponse + { + $request = new Operations\DeleteBackupCodeRequest( + userId: $userId, + ); + $baseUrl = $this->sdkConfiguration->getServerUrl(); + $url = Utils\Utils::generateUrl($baseUrl, '/users/{user_id}/backup_code', Operations\DeleteBackupCodeRequest::class, $request); + $options = ['http_errors' => false]; + $options['headers']['Accept'] = 'application/json'; + $options['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('DELETE', $url); + + + $httpResponse = $this->sdkConfiguration->securityClient->send($httpRequest, $options); + $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; + + $statusCode = $httpResponse->getStatusCode(); + if ($statusCode == 200) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $serializer = Utils\JSON::createSerializer(); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Operations\DeleteBackupCodeResponseBody', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\DeleteBackupCodeResponse( + statusCode: $statusCode, + contentType: $contentType, + rawResponse: $httpResponse, + object: $obj); + + return $response; + } else { + throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (in_array($statusCode, [404, 500])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $serializer = Utils\JSON::createSerializer(); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors36', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + throw new \Clerk\Backend\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } else { + throw new \Clerk\Backend\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } + + /** + * Delete a user passkey + * + * Delete the passkey identification for a given user and notify them through email. + * + * @param string $userId + * @param string $passkeyIdentificationId + * @return Operations\UserPasskeyDeleteResponse + * @throws \Clerk\Backend\Models\Errors\SDKException + */ + public function deletePasskey(string $userId, string $passkeyIdentificationId): Operations\UserPasskeyDeleteResponse + { + $request = new Operations\UserPasskeyDeleteRequest( + userId: $userId, + passkeyIdentificationId: $passkeyIdentificationId, + ); + $baseUrl = $this->sdkConfiguration->getServerUrl(); + $url = Utils\Utils::generateUrl($baseUrl, '/users/{user_id}/passkeys/{passkey_identification_id}', Operations\UserPasskeyDeleteRequest::class, $request); + $options = ['http_errors' => false]; + $options['headers']['Accept'] = 'application/json'; + $options['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('DELETE', $url); + + + $httpResponse = $this->sdkConfiguration->securityClient->send($httpRequest, $options); + $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; + + $statusCode = $httpResponse->getStatusCode(); + if ($statusCode == 200) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $serializer = Utils\JSON::createSerializer(); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Components\DeletedObject', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\UserPasskeyDeleteResponse( + statusCode: $statusCode, + contentType: $contentType, + rawResponse: $httpResponse, + deletedObject: $obj); + + return $response; + } else { + throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (in_array($statusCode, [403, 404, 500])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $serializer = Utils\JSON::createSerializer(); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors37', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + throw new \Clerk\Backend\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } else { + throw new \Clerk\Backend\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } + + /** + * Delete a user web3 wallet + * + * Delete the web3 wallet identification for a given user. + * + * @param string $userId + * @param string $web3WalletIdentificationId + * @return Operations\UserWeb3WalletDeleteResponse + * @throws \Clerk\Backend\Models\Errors\SDKException + */ + public function deleteWeb3Wallet(string $userId, string $web3WalletIdentificationId): Operations\UserWeb3WalletDeleteResponse + { + $request = new Operations\UserWeb3WalletDeleteRequest( + userId: $userId, + web3WalletIdentificationId: $web3WalletIdentificationId, + ); + $baseUrl = $this->sdkConfiguration->getServerUrl(); + $url = Utils\Utils::generateUrl($baseUrl, '/users/{user_id}/web3_wallets/{web3_wallet_identification_id}', Operations\UserWeb3WalletDeleteRequest::class, $request); + $options = ['http_errors' => false]; + $options['headers']['Accept'] = 'application/json'; + $options['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('DELETE', $url); + + + $httpResponse = $this->sdkConfiguration->securityClient->send($httpRequest, $options); + $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; + + $statusCode = $httpResponse->getStatusCode(); + if ($statusCode == 200) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $serializer = Utils\JSON::createSerializer(); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Components\DeletedObject', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\UserWeb3WalletDeleteResponse( + statusCode: $statusCode, + contentType: $contentType, + rawResponse: $httpResponse, + deletedObject: $obj); + + return $response; + } else { + throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (in_array($statusCode, [400, 403, 404, 500])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $serializer = Utils\JSON::createSerializer(); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors38', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + throw new \Clerk\Backend\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } else { + throw new \Clerk\Backend\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } + + /** + * Create a TOTP for a user + * + * Creates a TOTP (Time-based One-Time Password) for a given user, returning both the TOTP secret and the URI. + * + * + * @param string $userId + * @return Operations\CreateUserTOTPResponse + * @throws \Clerk\Backend\Models\Errors\SDKException + */ + public function createTOTP(string $userId): Operations\CreateUserTOTPResponse + { + $request = new Operations\CreateUserTOTPRequest( + userId: $userId, + ); + $baseUrl = $this->sdkConfiguration->getServerUrl(); + $url = Utils\Utils::generateUrl($baseUrl, '/users/{user_id}/totp', Operations\CreateUserTOTPRequest::class, $request); + $options = ['http_errors' => false]; + $options['headers']['Accept'] = 'application/json'; + $options['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('POST', $url); + + + $httpResponse = $this->sdkConfiguration->securityClient->send($httpRequest, $options); + $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; + + $statusCode = $httpResponse->getStatusCode(); + if ($statusCode == 200) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $serializer = Utils\JSON::createSerializer(); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), 'array', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\CreateUserTOTPResponse( + statusCode: $statusCode, + contentType: $contentType, + rawResponse: $httpResponse, + totp: $obj); + + return $response; + } else { + throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (in_array($statusCode, [403, 404, 500])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $serializer = Utils\JSON::createSerializer(); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors39', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + throw new \Clerk\Backend\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } else { + throw new \Clerk\Backend\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } + + /** + * Delete all the user's TOTPs + * + * Deletes all of the user's TOTPs. + * + * @param string $userId + * @return Operations\DeleteTOTPResponse + * @throws \Clerk\Backend\Models\Errors\SDKException + */ + public function deleteTotp(string $userId): Operations\DeleteTOTPResponse + { + $request = new Operations\DeleteTOTPRequest( + userId: $userId, + ); + $baseUrl = $this->sdkConfiguration->getServerUrl(); + $url = Utils\Utils::generateUrl($baseUrl, '/users/{user_id}/totp', Operations\DeleteTOTPRequest::class, $request); + $options = ['http_errors' => false]; + $options['headers']['Accept'] = 'application/json'; + $options['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('DELETE', $url); + + + $httpResponse = $this->sdkConfiguration->securityClient->send($httpRequest, $options); + $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; + + $statusCode = $httpResponse->getStatusCode(); + if ($statusCode == 200) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $serializer = Utils\JSON::createSerializer(); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Operations\DeleteTOTPResponseBody', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\DeleteTOTPResponse( + statusCode: $statusCode, + contentType: $contentType, + rawResponse: $httpResponse, + object: $obj); + + return $response; + } else { + throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (in_array($statusCode, [404, 500])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $serializer = Utils\JSON::createSerializer(); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors40', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + throw $obj->toException(); + } else { + throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif ($statusCode >= 400 && $statusCode < 500 || $statusCode >= 500 && $statusCode < 600) { + throw new \Clerk\Backend\Models\Errors\SDKException('API error occurred', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } else { + throw new \Clerk\Backend\Models\Errors\SDKException('Unknown status code received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } + + /** + * Delete External Account + * + * Delete an external account by ID. + * + * @param string $userId + * @param string $externalAccountId + * @return Operations\DeleteExternalAccountResponse + * @throws \Clerk\Backend\Models\Errors\SDKException + */ + public function deleteExternalAccount(string $userId, string $externalAccountId): Operations\DeleteExternalAccountResponse + { + $request = new Operations\DeleteExternalAccountRequest( + userId: $userId, + externalAccountId: $externalAccountId, + ); + $baseUrl = $this->sdkConfiguration->getServerUrl(); + $url = Utils\Utils::generateUrl($baseUrl, '/users/{user_id}/external_accounts/{external_account_id}', Operations\DeleteExternalAccountRequest::class, $request); + $options = ['http_errors' => false]; + $options['headers']['Accept'] = 'application/json'; + $options['headers']['user-agent'] = $this->sdkConfiguration->userAgent; + $httpRequest = new \GuzzleHttp\Psr7\Request('DELETE', $url); + + + $httpResponse = $this->sdkConfiguration->securityClient->send($httpRequest, $options); + $contentType = $httpResponse->getHeader('Content-Type')[0] ?? ''; + + $statusCode = $httpResponse->getStatusCode(); + if ($statusCode == 200) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $serializer = Utils\JSON::createSerializer(); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Components\DeletedObject', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $response = new Operations\DeleteExternalAccountResponse( + statusCode: $statusCode, + contentType: $contentType, + rawResponse: $httpResponse, + deletedObject: $obj); + + return $response; + } else { + throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); + } + } elseif (in_array($statusCode, [400, 403, 404, 500])) { + if (Utils\Utils::matchContentType($contentType, 'application/json')) { + $serializer = Utils\JSON::createSerializer(); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors41', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); throw $obj->toException(); } else { throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); diff --git a/src/Webhooks.php b/src/Webhooks.php index 248146e..645fa28 100644 --- a/src/Webhooks.php +++ b/src/Webhooks.php @@ -61,7 +61,7 @@ public function createSvixApp(): Operations\CreateSvixAppResponse } elseif ($statusCode == 400) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors52', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors62', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); throw $obj->toException(); } else { throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -104,7 +104,7 @@ public function deleteSvixApp(): Operations\DeleteSvixAppResponse } elseif ($statusCode == 400) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors53', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors63', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); throw $obj->toException(); } else { throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse); @@ -155,7 +155,7 @@ public function generateSvixAuthURL(): Operations\GenerateSvixAuthURLResponse } elseif ($statusCode == 400) { if (Utils\Utils::matchContentType($contentType, 'application/json')) { $serializer = Utils\JSON::createSerializer(); - $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors53', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); + $obj = $serializer->deserialize((string) $httpResponse->getBody(), '\Clerk\Backend\Models\Errors\ClerkErrors63', 'json', DeserializationContext::create()->setRequireAllRequiredProperties(true)); throw $obj->toException(); } else { throw new \Clerk\Backend\Models\Errors\SDKException('Unknown content type received', $statusCode, $httpResponse->getBody()->getContents(), $httpResponse);