From bf94aa9055ff3bbeb43e7caeea3fa9259dbdf6bf Mon Sep 17 00:00:00 2001 From: Dopeamin Date: Wed, 17 Sep 2025 09:01:53 +0200 Subject: [PATCH 1/6] Refactor API models and enhance error handling - Introduced new error response models: `ErrorRsp`, `ErrorRspAllOfError`, and `ErrorRspAllOfErrorValidation` to standardize error handling across the API. - Added `GenericRsp` model for consistent response structure. - Updated existing models to utilize the new `Paging` model for pagination. - Refactored API endpoints to return `GenericRsp` instead of specific response types, improving flexibility. - Consolidated common definitions into `common.yml` for better organization and maintainability. --- scripts/backend_api_public_v2.yml | 5501 ++++++++--------- scripts/common.yml | 483 ++ scripts/generate-openapi.sh | 6 +- src/corbado_python_sdk/generated/__init__.py | 32 +- .../generated/api/connect_tokens_api.py | 22 +- .../generated/api/identifiers_api.py | 12 +- .../generated/api/passkey_events_api.py | 12 +- .../generated/api/project_config_api.py | 12 +- .../generated/api/sessions_api.py | 12 +- .../generated/api/users_api.py | 22 +- .../generated/api/webhook_endpoints_api.py | 12 +- .../generated/models/__init__.py | 16 +- .../generated/models/connect_token_list.py | 6 +- .../generated/models/credential_list.py | 6 +- ..._list_default_response.py => error_rsp.py} | 20 +- ..._of_error.py => error_rsp_all_of_error.py} | 14 +- ...y => error_rsp_all_of_error_validation.py} | 8 +- ...r_delete200_response.py => generic_rsp.py} | 14 +- .../generated/models/identifier_list.py | 6 +- .../models/{user_list_paging.py => paging.py} | 8 +- .../models/passkey_challenge_list.py | 6 +- .../generated/models/passkey_event_list.py | 6 +- ...all_of_request_data.py => request_data.py} | 6 +- ...sion_list_sessions_inner.py => session.py} | 20 +- .../generated/models/session_list.py | 12 +- .../generated/models/session_status.py | 41 + .../models/social_account_create_req.py | 12 +- .../generated/models/social_account_list.py | 6 +- .../generated/models/social_provider_type.py | 39 + .../generated/models/user_list.py | 6 +- 30 files changed, 3451 insertions(+), 2927 deletions(-) create mode 100644 scripts/common.yml rename src/corbado_python_sdk/generated/models/{user_list_default_response.py => error_rsp.py} (78%) rename src/corbado_python_sdk/generated/models/{user_list_default_response_all_of_error.py => error_rsp_all_of_error.py} (80%) rename src/corbado_python_sdk/generated/models/{user_list_default_response_all_of_error_validation_inner.py => error_rsp_all_of_error_validation.py} (88%) rename src/corbado_python_sdk/generated/models/{user_delete200_response.py => generic_rsp.py} (83%) rename src/corbado_python_sdk/generated/models/{user_list_paging.py => paging.py} (93%) rename src/corbado_python_sdk/generated/models/{user_list_default_response_all_of_request_data.py => request_data.py} (92%) rename src/corbado_python_sdk/generated/models/{session_list_sessions_inner.py => session.py} (85%) create mode 100644 src/corbado_python_sdk/generated/models/session_status.py create mode 100644 src/corbado_python_sdk/generated/models/social_provider_type.py diff --git a/scripts/backend_api_public_v2.yml b/scripts/backend_api_public_v2.yml index 586cbb5..f3b8da8 100644 --- a/scripts/backend_api_public_v2.yml +++ b/scripts/backend_api_public_v2.yml @@ -1,2791 +1,2758 @@ openapi: 3.0.3 + +################################################################### +# General # +################################################################### info: - version: 2.0.0 - title: Corbado Backend API - description: |4 - # Introduction - This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. - contact: - name: Corbado team - email: support@corbado.com - url: https://www.corbado.com + version: 2.0.0 + title: Corbado Backend API + description: | + # Introduction + This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + contact: + name: Corbado team + email: support@corbado.com + url: https://www.corbado.com + servers: - - url: https://backendapi.corbado.io/v2 + - url: https://backendapi.corbado.io/v2 + tags: - - name: Users - description: All API calls to manage users - - name: Sessions - description: All API calls to manage long and short sessions - - name: Challenges - description: All API calls to manage challenges - - name: Identifiers - description: All API calls to manage login identifiers - - name: Passkeys - description: All API calls for passkey flows - - name: AuthEvents - description: All API calls to manage authentication events - - name: PasskeyEvents - description: All API calls to manage passkey events - - name: ProjectConfig - description: All API calls to manage project configurations - - name: ConnectTokens - description: All API calls to manage connect tokens (they are used for Corbado Connect) - - name: PasskeyChallenges - description: All API calls to manage passkey challenges - - name: WebhookEndpoints - description: All API calls to manage webhook endpoints - - name: PasswordManagers - description: All API calls to manage password managers - - name: ClientEnvs - description: All API calls to manage client environments + - name: Users + description: All API calls to manage users + - name: Sessions + description: All API calls to manage sessions + - name: Challenges + description: All API calls to manage challenges + - name: Identifiers + description: All API calls to manage login identifiers + - name: Passkeys + description: All API calls for passkey flows + - name: AuthEvents + description: All API calls to manage authentication events + - name: PasskeyEvents + description: All API calls to manage passkey events + - name: ProjectConfig + description: All API calls to manage project configurations + - name: ConnectTokens + description: All API calls to manage connectTokens + - name: PasskeyChallenges + description: All API calls to manage passkey challenges + - name: WebhookEndpoints + description: All API calls to manage webhook endpoints + - name: PasswordManagers + description: All API calls to manage password managers + - name: ClientEnvs + description: All API calls to manage client environments + paths: - /users: - post: - description: Creates a new user - operationId: UserCreate - tags: - - Users - security: - - basicAuth: [] - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/userCreateReq' - responses: - '200': - description: User has been created - content: - application/json: - schema: - $ref: '#/components/schemas/user' - default: - $ref: '#/components/responses/error' - /users/{userID}: - get: - description: Returns a user - operationId: UserGet - tags: - - Users - security: - - basicAuth: [] - parameters: - - $ref: '#/components/parameters/userID' - responses: - '200': - description: User has been returned - content: - application/json: - schema: - $ref: '#/components/schemas/user' - default: - $ref: '#/components/responses/error' - patch: - description: Updates a user - operationId: UserUpdate - tags: - - Users - security: - - basicAuth: [] - parameters: - - $ref: '#/components/parameters/userID' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/userUpdateReq' - responses: - '200': - description: User has been updated - content: - application/json: - schema: - $ref: '#/components/schemas/user' - default: - $ref: '#/components/responses/error' - delete: - description: Deletes a user - operationId: UserDelete - tags: - - Users - security: - - basicAuth: [] - parameters: - - $ref: '#/components/parameters/userID' - responses: - '200': - $ref: '#/components/responses/200' - default: - $ref: '#/components/responses/error' - /users/{userID}/challenges: - post: - description: Create a new challenge to verify a login identifier - operationId: ChallengeCreate - tags: - - Challenges - security: - - basicAuth: [] - parameters: - - $ref: '#/components/parameters/userID' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/challengeCreateReq' - responses: - '200': - description: Challenge has been created - content: - application/json: - schema: - $ref: '#/components/schemas/challenge' - default: - $ref: '#/components/responses/error' - /users/{userID}/challenges/{challengeID}: - patch: - description: Updates a challenge (e.g. from pending to completed) - operationId: ChallengeUpdate - tags: - - Challenges - security: - - basicAuth: [] - parameters: - - $ref: '#/components/parameters/userID' - - $ref: '#/components/parameters/challengeID' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/challengeUpdateReq' - responses: - '200': - description: Challenge has been updated - content: - application/json: - schema: - $ref: '#/components/schemas/challenge' - default: - $ref: '#/components/responses/error' - /users/{userID}/identifiers: - post: - description: Create a new login identifier - operationId: IdentifierCreate - tags: - - Identifiers - security: - - basicAuth: [] - parameters: - - $ref: '#/components/parameters/userID' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/identifierCreateReq' - responses: - '200': - description: Identifier has been created - content: - application/json: - schema: - $ref: '#/components/schemas/identifier' - default: - $ref: '#/components/responses/error' - /users/{userID}/identifiers/{identifierID}: - delete: - description: Delete an existing login identifier - operationId: IdentifierDelete - tags: - - Identifiers - security: - - basicAuth: [] - parameters: - - $ref: '#/components/parameters/userID' - - $ref: '#/components/parameters/identifierID' - responses: - '200': - $ref: '#/components/responses/200' - default: - $ref: '#/components/responses/error' - patch: - description: Updates a login identifier (e.g. from pending to verified) - operationId: IdentifierUpdate - tags: - - Identifiers - security: - - basicAuth: [] - parameters: - - $ref: '#/components/parameters/userID' - - $ref: '#/components/parameters/identifierID' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/identifierUpdateReq' - responses: - '200': - description: Identifier has been updated - content: - application/json: - schema: - $ref: '#/components/schemas/identifier' - default: - $ref: '#/components/responses/error' - /users/{userID}/socialAccounts: - get: - description: Returns a list of social accounts - operationId: UserSocialAccountList - tags: - - Users - security: - - basicAuth: [] - parameters: - - $ref: '#/components/parameters/userID' - - name: sort - in: query - description: Field sorting - required: false - schema: - type: string - - name: filter[] - in: query - description: Field filtering - required: false - style: form - explode: true - schema: - type: array - items: - type: string - examples: - filterEmail: - summary: Filter for one email address - value: - - identifierType:eq:email - - identifierValue:eq:mail@example.com - filterTimepoint: - summary: timePoint after 20/07/2021 - value: - - timePoint:gt:2021-07-20T00:00:00 - - name: page - in: query - description: Page number - required: false - schema: - type: integer - default: 1 - - name: pageSize - in: query - description: Number of items per page - required: false - schema: - type: integer - default: 10 - responses: - '200': - description: List of social accounts - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/socialAccount' - default: - $ref: '#/components/responses/error' - post: - description: Creates a new social account - operationId: SocialAccountCreate - tags: - - Users - security: - - basicAuth: [] - parameters: - - $ref: '#/components/parameters/userID' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/socialAccountCreateReq' - responses: - '200': - description: Social account has been created - content: - application/json: - schema: - $ref: '#/components/schemas/socialAccount' - default: - $ref: '#/components/responses/error' - /users/{userID}/credentials: - get: - description: Returns a list of credentials (passkeys) - operationId: CredentialList - tags: - - Users - security: - - basicAuth: [] - parameters: - - $ref: '#/components/parameters/userID' - - name: sort - in: query - description: Field sorting - required: false - schema: - type: string - - name: filter[] - in: query - description: Field filtering - required: false - style: form - explode: true - schema: - type: array - items: - type: string - examples: - filterEmail: - summary: Filter for one email address - value: - - identifierType:eq:email - - identifierValue:eq:mail@example.com - filterTimepoint: - summary: timePoint after 20/07/2021 - value: - - timePoint:gt:2021-07-20T00:00:00 - - name: page - in: query - description: Page number - required: false - schema: - type: integer - default: 1 - - name: pageSize - in: query - description: Number of items per page - required: false - schema: - type: integer - default: 10 - responses: - '200': - description: List of credentials (passkeys) - content: - application/json: - schema: - $ref: '#/components/schemas/credentialList' - default: - $ref: '#/components/responses/error' - /users/{userID}/credentials/{credentialID}: - delete: - description: Deletes an existing credential (passkey) - operationId: CredentialDelete - tags: - - Users - security: - - basicAuth: [] - parameters: - - $ref: '#/components/parameters/userID' - - $ref: '#/components/parameters/credentialID' - responses: - '200': - $ref: '#/components/responses/200' - default: - $ref: '#/components/responses/error' - /users/{userID}/authEvents: - post: - description: Create a new authentication event for a user - operationId: AuthEventCreate - tags: - - AuthEvents - security: - - basicAuth: [] - parameters: - - $ref: '#/components/parameters/userID' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/authEventCreateReq' - responses: - '200': - description: Auth event has been created - content: - application/json: - schema: - $ref: '#/components/schemas/authEvent' - default: - $ref: '#/components/responses/error' - /users/{userID}/passkeyEvents: - post: - description: Create a new passkey event for a user - operationId: PasskeyEventCreate - tags: - - PasskeyEvents - security: - - basicAuth: [] - parameters: - - $ref: '#/components/parameters/userID' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/passkeyEventCreateReq' - responses: - '200': - description: Passkey event has been created - content: - application/json: - schema: - $ref: '#/components/schemas/passkeyEvent' - default: - $ref: '#/components/responses/error' - get: - description: Returns a list of matching passkey events - operationId: PasskeyEventList - tags: - - PasskeyEvents - security: - - basicAuth: [] - parameters: - - name: sort - in: query - description: Field sorting - required: false - schema: - type: string - - name: filter[] - in: query - description: Field filtering - required: false - style: form - explode: true - schema: - type: array - items: - type: string - examples: - filterEmail: - summary: Filter for one email address - value: - - identifierType:eq:email - - identifierValue:eq:mail@example.com - filterTimepoint: - summary: timePoint after 20/07/2021 - value: - - timePoint:gt:2021-07-20T00:00:00 - - name: page - in: query - description: Page number - required: false - schema: - type: integer - default: 1 - - name: pageSize - in: query - description: Number of items per page - required: false - schema: - type: integer - default: 10 - - $ref: '#/components/parameters/userID' - responses: - '200': - description: List of all matching passkey events - content: - application/json: - schema: - $ref: '#/components/schemas/passkeyEventList' - default: - $ref: '#/components/responses/error' - /users/{userID}/passkeyEvents/{passkeyEventID}: - delete: - description: Deletes an existing passkey event - operationId: PasskeyEventDelete - tags: - - PasskeyEvents - security: - - basicAuth: [] - parameters: - - $ref: '#/components/parameters/userID' - - $ref: '#/components/parameters/passkeyEventID' - responses: - '200': - $ref: '#/components/responses/200' - default: - $ref: '#/components/responses/error' - /users/{userID}/passkeyChallenges: - get: - description: Returns a list of matching passkey challenges - operationId: PasskeyChallengeList - tags: - - PasskeyChallenges - security: - - basicAuth: [] - parameters: - - name: sort - in: query - description: Field sorting - required: false - schema: - type: string - - name: filter[] - in: query - description: Field filtering - required: false - style: form - explode: true - schema: - type: array - items: - type: string - examples: - filterEmail: - summary: Filter for one email address - value: - - identifierType:eq:email - - identifierValue:eq:mail@example.com - filterTimepoint: - summary: timePoint after 20/07/2021 - value: - - timePoint:gt:2021-07-20T00:00:00 - - name: page - in: query - description: Page number - required: false - schema: - type: integer - default: 1 - - name: pageSize - in: query - description: Number of items per page - required: false - schema: - type: integer - default: 10 - - $ref: '#/components/parameters/userID' - responses: - '200': - description: List of all matching passkey challenges - content: - application/json: - schema: - $ref: '#/components/schemas/passkeyChallengeList' - default: - $ref: '#/components/responses/error' - /users/{userID}/passkeyChallenges/{passkeyChallengeID}: - patch: - description: Updates a passkey challenge - operationId: PasskeyChallengeUpdate - tags: - - PasskeyChallenges - security: - - basicAuth: [] - parameters: - - $ref: '#/components/parameters/userID' - - $ref: '#/components/parameters/passkeyChallengeID' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/passkeyChallengeUpdateReq' - responses: - '200': - description: Passkey challenge has been updated - content: - application/json: - schema: - $ref: '#/components/schemas/passkeyChallenge' - default: - $ref: '#/components/responses/error' - /users/{userID}/passwordManagers: - get: - description: Returns a list of password managers - operationId: PasswordManagerList - tags: - - PasswordManagers - security: - - basicAuth: [] - parameters: - - $ref: '#/components/parameters/userID' - responses: - '200': - description: List of all matching password managers - content: - application/json: - schema: - $ref: '#/components/schemas/passwordManagerList' - default: - $ref: '#/components/responses/error' - /users/{userID}/clientEnvs: - get: - description: Returns a list of clientEnvs - operationId: ClientEnvList - tags: - - ClientEnvs - security: - - basicAuth: [] - parameters: - - $ref: '#/components/parameters/userID' - responses: - '200': - description: List of all matching clientEnvs - content: - application/json: - schema: - $ref: '#/components/schemas/clientEnvList' - default: - $ref: '#/components/responses/error' - /identifiers: - get: - description: Returns a list of matching identifiers - operationId: IdentifierList - tags: - - Identifiers - security: - - basicAuth: [] - parameters: - - name: sort - in: query - description: Field sorting - required: false - schema: - type: string - - name: filter[] - in: query - description: Field filtering - required: false - style: form - explode: true - schema: - type: array - items: - type: string - examples: - filterEmail: - summary: Filter for one email address - value: - - identifierType:eq:email - - identifierValue:eq:mail@example.com - filterTimepoint: - summary: timePoint after 20/07/2021 - value: - - timePoint:gt:2021-07-20T00:00:00 - - name: page - in: query - description: Page number - required: false - schema: - type: integer - default: 1 - - name: pageSize - in: query - description: Number of items per page - required: false - schema: - type: integer - default: 10 - responses: - '200': - description: List of all matching identifiers - content: - application/json: - schema: - $ref: '#/components/schemas/identifierList' - default: - $ref: '#/components/responses/error' - /socialAccounts: - get: - description: Returns a list of social accounts - operationId: SocialAccountList - tags: - - Users - security: - - basicAuth: [] - parameters: - - name: sort - in: query - description: Field sorting - required: false - schema: - type: string - - name: filter[] - in: query - description: Field filtering - required: false - style: form - explode: true - schema: - type: array - items: - type: string - examples: - filterEmail: - summary: Filter for one email address - value: - - identifierType:eq:email - - identifierValue:eq:mail@example.com - filterTimepoint: - summary: timePoint after 20/07/2021 - value: - - timePoint:gt:2021-07-20T00:00:00 - - name: page - in: query - description: Page number - required: false - schema: - type: integer - default: 1 - - name: pageSize - in: query - description: Number of items per page - required: false - schema: - type: integer - default: 10 - responses: - '200': - description: List of social accounts - content: - application/json: - schema: - $ref: '#/components/schemas/socialAccountList' - default: - $ref: '#/components/responses/error' - /projectConfig/cname: - put: - description: Update project config CNAME and generates new SSL certificate - operationId: ProjectConfigUpdateCNAME - tags: - - ProjectConfig - security: - - basicAuth: [] - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/projectConfigUpdateCnameReq' - responses: - '200': - $ref: '#/components/responses/200' - default: - $ref: '#/components/responses/error' - /connectTokens: - post: - description: Create a new connect token - operationId: ConnectTokenCreate - tags: - - ConnectTokens - security: - - basicAuth: [] - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/connectTokenCreateReq' - responses: - '200': - description: Connect token has been created - content: - application/json: - schema: - $ref: '#/components/schemas/connectToken' - default: - $ref: '#/components/responses/error' - get: - description: Returns a list of matching append tokens - operationId: ConnectTokenList - tags: - - ConnectTokens - security: - - basicAuth: [] - parameters: - - name: sort - in: query - description: Field sorting - required: false - schema: - type: string - - name: filter[] - in: query - description: Field filtering - required: false - style: form - explode: true - schema: - type: array - items: - type: string - examples: - filterEmail: - summary: Filter for one email address - value: - - identifierType:eq:email - - identifierValue:eq:mail@example.com - filterTimepoint: - summary: timePoint after 20/07/2021 - value: - - timePoint:gt:2021-07-20T00:00:00 - - name: page - in: query - description: Page number - required: false - schema: - type: integer - default: 1 - - name: pageSize - in: query - description: Number of items per page - required: false - schema: - type: integer - default: 10 - responses: - '200': - description: List of all matching append tokens - content: - application/json: - schema: - $ref: '#/components/schemas/connectTokenList' - default: - $ref: '#/components/responses/error' - /connectTokens/{connectTokenID}: - patch: - description: Updates an existing append token - operationId: ConnectTokenUpdate - tags: - - ConnectTokens - security: - - basicAuth: [] - parameters: - - $ref: '#/components/parameters/connectTokenID' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/connectTokenUpdateReq' - responses: - '200': - $ref: '#/components/responses/200' - default: - $ref: '#/components/responses/error' - delete: - description: Deletes an existing append token - operationId: ConnectTokenDelete - tags: - - ConnectTokens - security: - - basicAuth: [] - parameters: - - $ref: '#/components/parameters/connectTokenID' - responses: - '200': - $ref: '#/components/responses/200' - default: - $ref: '#/components/responses/error' - /webhookEndpoints: - get: - description: Returns a list of webhook endpoints - operationId: WebhookEndpointList - tags: - - WebhookEndpoints - security: - - basicAuth: [] - responses: - '200': - description: List of webhook endpoints - content: - application/json: - schema: - $ref: '#/components/schemas/webhookEndpointList' - default: - $ref: '#/components/responses/error' - post: - description: Creates a new webhook endpoint - operationId: WebhookEndpointCreate - tags: - - WebhookEndpoints - security: - - basicAuth: [] - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/webhookEndpointCreateReq' - responses: - '200': - description: Webhook endpoint has been created - content: - application/json: - schema: - $ref: '#/components/schemas/webhookEndpoint' - default: - $ref: '#/components/responses/error' - /webhookEndpoints/{webhookEndpointID}: - put: - description: Updates an existing webhook endpoint - operationId: WebhookEndpointUpdate - tags: - - WebhookEndpoints - security: - - basicAuth: [] - parameters: - - $ref: '#/components/parameters/webhookEndpointID' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/webhookEndpointUpdateReq' - responses: - '200': - description: Webhook endpoint has been updated - content: - application/json: - schema: - $ref: '#/components/schemas/webhookEndpoint' - default: - $ref: '#/components/responses/error' - delete: - description: Deletes an existing webhook endpoint - operationId: WebhookEndpointDelete - tags: - - WebhookEndpoints - security: - - basicAuth: [] - parameters: - - $ref: '#/components/parameters/webhookEndpointID' - responses: - '200': - $ref: '#/components/responses/200' - default: - $ref: '#/components/responses/error' - /sessions: - get: - description: Returns a list of matching sessions - operationId: SessionList - tags: - - Sessions - security: - - basicAuth: [] - parameters: - - name: sort - in: query - description: Field sorting - required: false - schema: - type: string - - name: filter[] - in: query - description: Field filtering - required: false - style: form - explode: true - schema: - type: array - items: - type: string - examples: - filterEmail: - summary: Filter for one email address - value: - - identifierType:eq:email - - identifierValue:eq:mail@example.com - filterTimepoint: - summary: timePoint after 20/07/2021 - value: - - timePoint:gt:2021-07-20T00:00:00 - - name: page - in: query - description: Page number - required: false - schema: - type: integer - default: 1 - - name: pageSize - in: query - description: Number of items per page - required: false - schema: - type: integer - default: 10 - responses: - '200': - description: List of all matching sessions - content: - application/json: - schema: - $ref: '#/components/schemas/sessionList' - default: - $ref: '#/components/responses/error' - /sessions/{sessionID}/revoke: - post: - description: Revokes an existing session - operationId: SessionRevoke - tags: - - Sessions - security: - - basicAuth: [] - parameters: - - name: sessionID - in: path - description: ID of session - required: true - schema: - type: string - minLength: 30 - maxLength: 30 - responses: - '200': - $ref: '#/components/responses/200' - default: - $ref: '#/components/responses/error' - /passkey/append/start: - post: - description: Starts a challenge for creating a new passkey - operationId: PasskeyAppendStart - tags: - - Passkeys - security: - - basicAuth: [] - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/passkeyAppendStartReq' - responses: - '200': - description: Passkey append challenge has been created - content: - application/json: - schema: - $ref: '#/components/schemas/passkeyAppendStartRsp' - default: - $ref: '#/components/responses/error' - /passkey/append/finish: - post: - description: Completes a challenge for creating a new passkey - operationId: PasskeyAppendFinish - tags: - - Passkeys - security: - - basicAuth: [] - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/passkeyAppendFinishReq' - responses: - '200': - description: Passkey append succeeded - content: - application/json: - schema: - $ref: '#/components/schemas/passkeyAppendFinishRsp' - default: - $ref: '#/components/responses/error' - /passkey/login/start: - post: - description: Starts a challenge for an existing passkey - operationId: PasskeyLoginStart - tags: - - Passkeys - security: - - basicAuth: [] - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/passkeyLoginStartReq' - responses: - '200': - description: Passkey login challenge has been created - content: - application/json: - schema: - $ref: '#/components/schemas/passkeyLoginStartRsp' - default: - $ref: '#/components/responses/error' - /passkey/login/finish: - post: - description: Completes a challenge for an existing passkey - operationId: PasskeyLoginFinish - tags: - - Passkeys - security: - - basicAuth: [] - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/passkeyLoginFinishReq' - responses: - '200': - description: Passkey login succeeded - content: - application/json: - schema: - $ref: '#/components/schemas/passkeyLoginFinishRsp' - default: - $ref: '#/components/responses/error' - /passkey/postLogin: - post: - description: Explicitly runs the post-login action - operationId: PasskeyPostLogin - tags: - - Passkeys - security: - - basicAuth: [] - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/passkeyPostLoginReq' - responses: - '200': - description: Post Passkey Login succeeded - content: - application/json: - schema: - $ref: '#/components/schemas/passkeyPostLoginRsp' - default: - $ref: '#/components/responses/error' - /passkey/mediation/start: - post: - description: Starts a challenge for an existing passkey (Conditional UI) - operationId: PasskeyMediationStart - tags: - - Passkeys - security: - - basicAuth: [] - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/passkeyMediationStartReq' - responses: - '200': - description: Passkey login challenge has been created - content: - application/json: - schema: - $ref: '#/components/schemas/passkeyMediationStartRsp' - default: - $ref: '#/components/responses/error' - /passkey/mediation/finish: - post: - description: Completes a challenge for an existing passkey (Conditional UI) - operationId: PasskeyMediationFinish - tags: - - Passkeys - security: - - basicAuth: [] - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/passkeyMediationFinishReq' - responses: - '200': - description: Passkey mediation has been success, thus we can return a userID - content: - application/json: - schema: - $ref: '#/components/schemas/passkeyMediationFinishRsp' - default: - $ref: '#/components/responses/error' -components: - securitySchemes: - basicAuth: - type: http - scheme: basic - parameters: - userID: - name: userID - in: path - description: ID of user - required: true + /users: + post: + summary: Create a new user + description: | + Creates a new user with the given status. Use [login identifiers](/api-reference/backend-api/identifiers/create-a-login-identifier-for-a-user) to add an email address or phone number to the user. + + You can also manage users in the [Developer Panel](https://app.corbado.com/users). + operationId: UserCreate + tags: + - Users + security: + - basicAuth: [] + requestBody: + required: true + content: + application/json: schema: - type: string - challengeID: - name: challengeID - in: path - description: ID of challenge - required: true + $ref: "#/components/schemas/userCreateReq" + responses: + "200": + description: User has been created. + content: + application/json: + schema: + $ref: "#/components/schemas/user" + default: + $ref: "#/components/responses/error" + get: + summary: List users + description: | + Returns a list of project users. + + The list can be sorted and filtered: + - The `sort` parameter supports the following fields: `id`, `name`, `fullName`, `created`, `updated` and `status`. + - The `filter` parameter supports the following fields: `id`, `searchValue`, `name`, `fullName`, `created`, `updated` and `status`. + + Searches in `searchValue` are performed across the `name`, `fullName` fields and identifiers values (emails, usernames and phone numbers). + + Refer to the parameter description for more details on sorting in different directions and using the filter with different operators. + operationId: UserList + tags: + - Users + security: + - basicAuth: [] + parameters: + - $ref: "common.yml#/components/parameters/sort" + - $ref: "common.yml#/components/parameters/filter" + - $ref: "common.yml#/components/parameters/page" + - $ref: "common.yml#/components/parameters/pageSize" + responses: + "200": + description: List of users. + content: + application/json: + schema: + $ref: "#/components/schemas/userList" + default: + $ref: "#/components/responses/error" + + /users/{userID}: + get: + summary: Retrieve a user + description: | + Retrieves a user by given `userID`. This does not return login identifiers like email addresses or phone numbers. + + You can also manage users in the [Developer Panel](https://app.corbado.com/users). + operationId: UserGet + tags: + - Users + security: + - basicAuth: [] + parameters: + - $ref: "#/components/parameters/userID" + responses: + "200": + description: User has been returned. + content: + application/json: + schema: + $ref: "#/components/schemas/user" + default: + $ref: "#/components/responses/error" + patch: + summary: Update a user + description: | + Updates a user by given `userID`. For example, this can be used to modify the user's status. + + You can also manage users in the [Developer Panel](https://app.corbado.com/users). + operationId: UserUpdate + tags: + - Users + security: + - basicAuth: [] + parameters: + - $ref: "#/components/parameters/userID" + requestBody: + required: true + content: + application/json: schema: - type: string - identifierID: - name: identifierID - in: path - description: ID of login identifier - required: true + $ref: "#/components/schemas/userUpdateReq" + responses: + "200": + description: User has been updated. + content: + application/json: + schema: + $ref: "#/components/schemas/user" + default: + $ref: "#/components/responses/error" + delete: + summary: Delete a user + description: | + Deletes a user by given `userID`. + + You can also manage users in the [Developer Panel](https://app.corbado.com/users). + operationId: UserDelete + tags: + - Users + security: + - basicAuth: [] + parameters: + - $ref: "#/components/parameters/userID" + responses: + "200": + $ref: "#/components/responses/200" + default: + $ref: "#/components/responses/error" + + /users/{userID}/challenges: + post: + summary: Create a challenge for a user + description: | + Creates a new challenge to verify a login identifier for a user by given `userID`. Challenges come in three flavors: **Email OTP**, **SMS OTP**, and **Email Magiclink**. + + **OTP** stands for One-Time Password. It is a unique code sent to the user via email or SMS, which they must enter to complete the verification process. + operationId: ChallengeCreate + tags: + - Challenges + security: + - basicAuth: [] + parameters: + - $ref: "#/components/parameters/userID" + requestBody: + required: true + content: + application/json: schema: - type: string - credentialID: - name: credentialID - in: path - description: ID of credential - required: true + $ref: "#/components/schemas/challengeCreateReq" + responses: + "200": + description: Challenge has been created. + content: + application/json: + schema: + $ref: "#/components/schemas/challenge" + default: + $ref: "#/components/responses/error" + + /users/{userID}/challenges/{challengeID}: + patch: + summary: Update a challenge for a user + description: | + Updates a challenge for a user by given `userID` and `challengeID`. For example, this can be used to change the challenge status from `pending` to `completed`. + operationId: ChallengeUpdate + tags: + - Challenges + security: + - basicAuth: [] + parameters: + - $ref: "#/components/parameters/userID" + - $ref: "#/components/parameters/challengeID" + requestBody: + required: true + content: + application/json: schema: - type: string - connectTokenID: - name: connectTokenID - in: path - description: ID of an append token - required: true + $ref: "#/components/schemas/challengeUpdateReq" + responses: + "200": + description: Challenge has been updated. + content: + application/json: + schema: + $ref: "#/components/schemas/challenge" + default: + $ref: "#/components/responses/error" + + /users/{userID}/identifiers: + post: + summary: Create a login identifier for a user + description: | + Creates a new login identifier for a user with the given ID. Login identifiers can be of the type `email`, `phone`, or `username`. Separating login identifiers from users allows Corbado to manage multiple login identifiers of different types for each user. + + You can set up login identifiers in the [Developer Panel](https://app.corbado.com/settings/userinterface?tab=Overview) or consult the [Documentation](/corbado-complete/overview/configuration/user-flow-configuration#2-login-identifiers-and-fallbacks) for more details. + operationId: IdentifierCreate + tags: + - Identifiers + security: + - basicAuth: [] + parameters: + - $ref: "#/components/parameters/userID" + requestBody: + required: true + content: + application/json: schema: - type: string - passkeyChallengeID: - name: passkeyChallengeID - in: path - description: ID of a passkey challenge - required: true + $ref: "#/components/schemas/identifierCreateReq" + responses: + "200": + description: Identifier has been created. + content: + application/json: + schema: + $ref: "#/components/schemas/identifier" + default: + $ref: "#/components/responses/error" + + /users/{userID}/identifiers/{identifierID}: + delete: + summary: Delete a login identifier for a user + description: | + Delete an existing login identifier for a user by given `userID` and `identifierID`. + operationId: IdentifierDelete + tags: + - Identifiers + security: + - basicAuth: [] + parameters: + - $ref: "#/components/parameters/userID" + - $ref: "#/components/parameters/identifierID" + responses: + "200": + $ref: "#/components/responses/200" + default: + $ref: "#/components/responses/error" + patch: + summary: Update a login identifier for a user + description: | + Updates a login identifier (e.g. from `pending` to `verified`) for a user by given `userID` and `identifierID`. + operationId: IdentifierUpdate + tags: + - Identifiers + security: + - basicAuth: [] + parameters: + - $ref: "#/components/parameters/userID" + - $ref: "#/components/parameters/identifierID" + requestBody: + required: true + content: + application/json: schema: - type: string - passkeyEventID: - name: passkeyEventID - in: path - description: ID of a passkey event - required: true + $ref: "#/components/schemas/identifierUpdateReq" + responses: + "200": + description: Identifier has been updated. + content: + application/json: + schema: + $ref: "#/components/schemas/identifier" + default: + $ref: "#/components/responses/error" + + /users/{userID}/socialAccounts: + get: + summary: List all social logins for a user + description: | + Returns a list of social logins for a user by given `userID`. + + The list can be sorted and filtered: + - The `sort` parameter supports the following fields: `providerType` and `foreignID`. + - The `filter` parameter supports the following fields: `providerType` and `foreignID`. + + Refer to the parameter description for more details on sorting in different directions and using the filter with different operators. + operationId: UserSocialAccountList + tags: + - Users + security: + - basicAuth: [] + parameters: + - $ref: "#/components/parameters/userID" + - $ref: "common.yml#/components/parameters/sort" + - $ref: "common.yml#/components/parameters/filter" + - $ref: "common.yml#/components/parameters/page" + - $ref: "common.yml#/components/parameters/pageSize" + responses: + "200": + description: List of social logins. + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/socialAccount" + default: + $ref: "#/components/responses/error" + post: + summary: Create a social login for a user + description: | + Creates a new social login for a user by given `userID`. Social logins are used to authenticate users with third-party providers like Google, Microsoft, or GitHub. + + You can set up social logins in the [Developer Panel](https://app.corbado.com/settings/userinterface?tab=Social) or consult the [Documentation](/corbado-complete/overview/configuration/social-logins/overview) for more details. + operationId: SocialAccountCreate + tags: + - Users + security: + - basicAuth: [] + parameters: + - $ref: "#/components/parameters/userID" + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/socialAccountCreateReq" + responses: + "200": + description: Social login has been created. + content: + application/json: + schema: + $ref: "#/components/schemas/socialAccount" + default: + $ref: "#/components/responses/error" + + /users/{userID}/credentials: + get: + summary: List passkeys for a user + description: | + Returns a list of passkeys for a user by given `userID`. + + The list can be sorted and filtered: + - The `sort` parameter supports the following fields: `userID`, `created`, `status`, `backupState`, `browserName` and `osName`. + - The `filter` parameter supports the following fields: `userID`, `created`, `status`, `backupState`, `browserName` and `osName`. + + Refer to the parameter description for more details on sorting in different directions and using the filter with different operators. + operationId: CredentialList + tags: + - Users + security: + - basicAuth: [] + parameters: + - $ref: "#/components/parameters/userID" + - $ref: "common.yml#/components/parameters/sort" + - $ref: "common.yml#/components/parameters/filter" + - $ref: "common.yml#/components/parameters/page" + - $ref: "common.yml#/components/parameters/pageSize" + responses: + "200": + description: List of passkeys. + content: + application/json: + schema: + $ref: "#/components/schemas/credentialList" + default: + $ref: "#/components/responses/error" + + /users/{userID}/credentials/{credentialID}: + delete: + summary: Delete a passkey for a user + description: | + Deletes an existing passkey for a user by given `userID` and `credentialID`. + operationId: CredentialDelete + tags: + - Users + security: + - basicAuth: [] + parameters: + - $ref: "#/components/parameters/userID" + - $ref: "#/components/parameters/credentialID" + responses: + "200": + $ref: "#/components/responses/200" + default: + $ref: "#/components/responses/error" + + /users/{userID}/authEvents: + post: + description: Create a new authentication event for a user + operationId: AuthEventCreate + x-excluded: true + tags: + - AuthEvents + security: + - basicAuth: [] + parameters: + - $ref: "#/components/parameters/userID" + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/authEventCreateReq" + responses: + "200": + description: Auth event has been created. + content: + application/json: + schema: + $ref: "#/components/schemas/authEvent" + default: + $ref: "#/components/responses/error" + + /users/{userID}/passkeyEvents: + post: + summary: Create a passkey event for a user + description: Creates a new passkey event for a user by given `userID`. + operationId: PasskeyEventCreate + tags: + - PasskeyEvents + security: + - basicAuth: [] + parameters: + - $ref: "#/components/parameters/userID" + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/passkeyEventCreateReq" + responses: + "200": + description: Passkey event has been created. + content: + application/json: + schema: + $ref: "#/components/schemas/passkeyEvent" + default: + $ref: "#/components/responses/error" + get: + summary: List all passkey events for a user + description: | + Returns a list of passkey events for a user by given `userID`. + + The list can be sorted and filtered: + - The `sort` parameter supports the following fields: `created` and `eventType`. + - The `filter` parameter supports the following fields: `eventType`. + + Refer to the parameter description for more details on sorting in different directions and using the filter with different operators. + operationId: PasskeyEventList + tags: + - PasskeyEvents + security: + - basicAuth: [] + parameters: + - $ref: "common.yml#/components/parameters/sort" + - $ref: "common.yml#/components/parameters/filter" + - $ref: "common.yml#/components/parameters/page" + - $ref: "common.yml#/components/parameters/pageSize" + - $ref: "#/components/parameters/userID" + responses: + "200": + description: List of all matching passkey events. + content: + application/json: + schema: + $ref: "#/components/schemas/passkeyEventList" + default: + $ref: "#/components/responses/error" + + /users/{userID}/passkeyEvents/{passkeyEventID}: + delete: + summary: Delete a passkey event for a user + description: Deletes an existing passkey event for a user by given `userID` and `passkeyEventID`. + operationId: PasskeyEventDelete + tags: + - PasskeyEvents + security: + - basicAuth: [] + parameters: + - $ref: "#/components/parameters/userID" + - $ref: "#/components/parameters/passkeyEventID" + responses: + "200": + $ref: "#/components/responses/200" + default: + $ref: "#/components/responses/error" + + /users/{userID}/passkeyChallenges: + get: + summary: List all passkey challenges for a user + description: | + Returns a list of passkey challenges for a user by given `userID`. + + The list can be sorted and filtered: + - The `sort` parameter supports the following fields: `userID`, `projectID`, `status`, and `type`. + - The `filter` parameter supports the following fields: `userID`, `projectID`, `status`, and `type`. + + Refer to the parameter description for more details on sorting in different directions and using the filter with different operators. + operationId: PasskeyChallengeList + tags: + - PasskeyChallenges + security: + - basicAuth: [] + parameters: + - $ref: "common.yml#/components/parameters/sort" + - $ref: "common.yml#/components/parameters/filter" + - $ref: "common.yml#/components/parameters/page" + - $ref: "common.yml#/components/parameters/pageSize" + - $ref: "#/components/parameters/userID" + responses: + "200": + description: List of all matching passkey challenges. + content: + application/json: + schema: + $ref: "#/components/schemas/passkeyChallengeList" + default: + $ref: "#/components/responses/error" + + /users/{userID}/passkeyChallenges/{passkeyChallengeID}: + patch: + summary: Update a passkey challenge for a user + description: Updates a passkey challenge for a user by given `userID` and `passkeyChallengeID`. + operationId: PasskeyChallengeUpdate + tags: + - PasskeyChallenges + security: + - basicAuth: [] + parameters: + - $ref: "#/components/parameters/userID" + - $ref: "#/components/parameters/passkeyChallengeID" + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/passkeyChallengeUpdateReq" + responses: + "200": + description: Passkey challenge has been updated. + content: + application/json: + schema: + $ref: "#/components/schemas/passkeyChallenge" + default: + $ref: "#/components/responses/error" + + /users/{userID}/passwordManagers: + get: + summary: List password managers for a user + description: Returns a list of password managers + operationId: PasswordManagerList + x-excluded: true + tags: + - PasswordManagers + security: + - basicAuth: [] + parameters: + - $ref: "#/components/parameters/userID" + responses: + "200": + description: List of all matching password managers. + content: + application/json: + schema: + $ref: "#/components/schemas/passwordManagerList" + default: + $ref: "#/components/responses/error" + + /users/{userID}/clientEnvs: + get: + summary: List client environments for a user + description: Returns a list of clientEnvs + operationId: ClientEnvList + x-excluded: true + tags: + - ClientEnvs + security: + - basicAuth: [] + parameters: + - $ref: "#/components/parameters/userID" + responses: + "200": + description: List of all matching clientEnvs. + content: + application/json: + schema: + $ref: "#/components/schemas/clientEnvList" + default: + $ref: "#/components/responses/error" + + /identifiers: + get: + summary: List all login identifiers + description: | + Returns a list of login identifiers. + + The list can be sorted and filtered: + - The `sort` parameter supports the following fields: `userID`, `identifierType` and `identifierValue`. + - The `filter` parameter supports the following fields: `userID`, `identifierType` and `identifierValue`. + + Refer to the parameter description for more details on sorting in different directions and using the filter with different operators. + operationId: IdentifierList + tags: + - Identifiers + security: + - basicAuth: [] + parameters: + - $ref: "common.yml#/components/parameters/sort" + - $ref: "common.yml#/components/parameters/filter" + - $ref: "common.yml#/components/parameters/page" + - $ref: "common.yml#/components/parameters/pageSize" + responses: + "200": + description: List of all matching login identifiers. + content: + application/json: + schema: + $ref: "#/components/schemas/identifierList" + default: + $ref: "#/components/responses/error" + + /socialAccounts: + get: + summary: List all social logins + description: | + Returns a list of social logins. + + The list can be sorted and filtered: + - The `sort` parameter supports the following fields: `providerType` and `foreignID`. + - The `filter` parameter supports the following fields: `providerType` and `foreignID`. + + Refer to the parameter description for more details on sorting in different directions and using the filter with different operators. + operationId: SocialAccountList + tags: + - Users + security: + - basicAuth: [] + parameters: + - $ref: "common.yml#/components/parameters/sort" + - $ref: "common.yml#/components/parameters/filter" + - $ref: "common.yml#/components/parameters/page" + - $ref: "common.yml#/components/parameters/pageSize" + responses: + "200": + description: List of social logins. + content: + application/json: + schema: + $ref: "#/components/schemas/socialAccountList" + default: + $ref: "#/components/responses/error" + + /projectConfig/cname: + put: + summary: Update project CNAME and generate SSL certificate + description: Update project config CNAME and generates new SSL certificate + operationId: ProjectConfigUpdateCNAME + x-excluded: true + tags: + - ProjectConfig + security: + - basicAuth: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/projectConfigUpdateCnameReq" + responses: + "200": + $ref: "#/components/responses/200" + default: + $ref: "#/components/responses/error" + + /connectTokens: + post: + summary: Create a connectToken + description: | + Creates a new ConnectToken, which is essential for [Corbado Connect](/corbado-connect). ConnectTokens authorize actions that modify user data. + + Consult the [Documentation](/corbado-connect/concepts/connect-token) for more details. + operationId: ConnectTokenCreate + tags: + - ConnectTokens + security: + - basicAuth: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/connectTokenCreateReq" + responses: + "200": + description: ConnectToken has been created. + content: + application/json: + schema: + $ref: "#/components/schemas/connectToken" + default: + $ref: "#/components/responses/error" + get: + summary: List all ConnectTokens + description: | + Returns a list of ConnectTokens. + + The list can be sorted and filtered: + - The `sort` parameter supports the following fields: `token`, `tokenType`, `status` and `expires`. + - The `filter` parameter supports the following fields: `token`, `tokenType`, `status` and `expires`. + + Refer to the parameter description for more details on sorting in different directions and using the filter with different operators. + operationId: ConnectTokenList + tags: + - ConnectTokens + security: + - basicAuth: [] + parameters: + - $ref: "common.yml#/components/parameters/sort" + - $ref: "common.yml#/components/parameters/filter" + - $ref: "common.yml#/components/parameters/page" + - $ref: "common.yml#/components/parameters/pageSize" + responses: + "200": + description: List of all matching append tokens. + content: + application/json: + schema: + $ref: "#/components/schemas/connectTokenList" + default: + $ref: "#/components/responses/error" + + /connectTokens/{connectTokenID}: + patch: + summary: Update a ConnectToken + description: | + Updates an existing ConnectToken. + operationId: ConnectTokenUpdate + tags: + - ConnectTokens + security: + - basicAuth: [] + parameters: + - $ref: "#/components/parameters/connectTokenID" + requestBody: + required: true + content: + application/json: schema: - type: string - webhookEndpointID: - name: webhookEndpointID - in: path - description: ID of a webhook endpoint - required: true + $ref: "#/components/schemas/connectTokenUpdateReq" + responses: + "200": + $ref: "#/components/responses/200" + default: + $ref: "#/components/responses/error" + delete: + summary: Delete a ConnectToken + description: | + Deletes an existing ConnectToken. + operationId: ConnectTokenDelete + tags: + - ConnectTokens + security: + - basicAuth: [] + parameters: + - $ref: "#/components/parameters/connectTokenID" + responses: + "200": + $ref: "#/components/responses/200" + default: + $ref: "#/components/responses/error" + + /webhookEndpoints: + get: + description: Returns a list of webhook endpoints + operationId: WebhookEndpointList + x-excluded: true + tags: + - WebhookEndpoints + security: + - basicAuth: [] + responses: + "200": + description: List of webhook endpoints. + content: + application/json: + schema: + $ref: "#/components/schemas/webhookEndpointList" + default: + $ref: "#/components/responses/error" + post: + description: Creates a new webhook endpoint + operationId: WebhookEndpointCreate + x-excluded: true + tags: + - WebhookEndpoints + security: + - basicAuth: [] + requestBody: + required: true + content: + application/json: schema: - type: string - schemas: - userCreateReq: - type: object - required: - - status - properties: - fullName: - type: string - status: - $ref: '#/components/schemas/userStatus' - explicitWebauthnID: - type: string - description: For connect projects, the webauthnID can be explicitly set for a user - userUpdateReq: - type: object - properties: - fullName: - type: string - status: - $ref: '#/components/schemas/userStatus' - challengeCreateReq: - type: object - required: - - challengeType - - identifierValue - - clientInformation - properties: - challengeType: - $ref: '#/components/schemas/challengeType' - identifierValue: - type: string - challengeMetadata: - type: object - lifetimeSeconds: - type: integer - clientInformation: - $ref: '#/components/schemas/clientInformation' - challengeUpdateReq: - type: object - required: - - value - properties: - value: - type: string - identifierCreateReq: - type: object - required: - - identifierType - - identifierValue - - status - properties: - identifierType: - $ref: '#/components/schemas/identifierType' - identifierValue: - type: string - status: - $ref: '#/components/schemas/identifierStatus' - identifierUpdateReq: - type: object - required: - - status - properties: - status: - $ref: '#/components/schemas/identifierStatus' - passkeyAppendStartReq: - type: object - required: - - userID - - processID - - username - - clientInformation - - passkeyIntelFlags - properties: - userID: - description: ID of the user - type: string - processID: - type: string - username: - type: string - clientInformation: - $ref: '#/components/schemas/clientInformation' - passkeyIntelFlags: - $ref: '#/components/schemas/passkeyIntelFlags' - passkeyAppendStartRsp: - type: object - required: - - appendAllow - - attestationOptions - - detectionInsights - - decisionInsights - properties: - appendAllow: - type: boolean - attestationOptions: - type: string - example: '{"publicKey":{"challenge":"2m6...0w9/MgW...KE=","rp":{"name":"demo","id":"localhost"},"user":{"name":"example@mail.com","id":"dXN...zk5"},"pubKeyCredParams":[{"type":"public-key","alg":-7},{"type":"public-key","alg":-35},{"type":"public-key","alg":-36},{"type":"public-key","alg":-257},{"type":"public-key","alg":-258},{"type":"public-key","alg":-259},{"type":"public-key","alg":-37},{"type":"public-key","alg":-38},{"type":"public-key","alg":-39},{"type":"public-key","alg":-8}],"authenticatorSelection":{"authenticatorAttachment":"platform","requireResidentKey":false,"userVerification":"required"},"timeout":60000,"attestation":"none"}}' - detectionInsights: - $ref: '#/components/schemas/detectionInsights' - decisionInsights: - $ref: '#/components/schemas/decisionInsightsAppend' - passkeyAppendFinishReq: - type: object - required: - - userID - - processID - - attestationResponse - - clientInformation - properties: - userID: - description: ID of the user - type: string - processID: - type: string - attestationResponse: - type: string - example: '{"type":"public-key","id":"JM6...J_Q","rawId":"JM6...J_Q","authenticatorAttachment":null,"response":{"clientDataJSON":"eyJ...ZX0","authenticatorData":"SZY...AAQ","signature":"Ni7...YAg","userHandle":"dXN...zk5"},"clientExtensionResults":{}}' - clientInformation: - $ref: '#/components/schemas/clientInformation' - sendNotification: - type: boolean - passkeyAppendFinishRsp: - type: object - required: - - passkeyData - properties: - passkeyData: - $ref: '#/components/schemas/passkeyData' - passkeyLoginStartReq: - type: object - required: - - userID - - clientInformation - - crossDeviceAuthenticationStrategy - - processID - properties: - userID: - description: ID of the user - type: string - clientInformation: - $ref: '#/components/schemas/clientInformation' - crossDeviceAuthenticationStrategy: - $ref: '#/components/schemas/crossDeviceAuthenticationStrategy' - processID: - type: string - passkeyLoginStartRsp: - type: object - required: - - loginAllow - - assertionOptions - - detectionInsights - - decisionInsights - properties: - loginAllow: - type: boolean - assertionOptions: - type: string - detectionInsights: - $ref: '#/components/schemas/detectionInsights' - decisionInsights: - $ref: '#/components/schemas/decisionInsights' - passkeyLoginFinishReq: - type: object - required: - - userID - - assertionResponse - - clientInformation - - processID - properties: - userID: - description: ID of the user - type: string - assertionResponse: - type: string - clientInformation: - $ref: '#/components/schemas/clientInformation' - processID: - type: string - signPasskeyData: - type: boolean - passkeyLoginFinishRsp: - type: object - required: - - passkeyData - properties: - passkeyData: - $ref: '#/components/schemas/passkeyData' - signedPasskeyData: - type: string - passkeyPostLoginReq: - type: object - required: - - signedPasskeyData - properties: - signedPasskeyData: - type: string - passkeyPostLoginRsp: - type: object - required: - - session - properties: - session: - type: string - passkeyMediationStartReq: - type: object - required: - - clientInformation - properties: - clientInformation: - $ref: '#/components/schemas/clientInformation' - passkeyMediationStartRsp: - type: object - required: - - loginAllow - - assertionOptions - properties: - loginAllow: - type: boolean - assertionOptions: - type: string - passkeyMediationFinishReq: - type: object - required: - - assertionResponse - - clientInformation - - processID - properties: - assertionResponse: - type: string - clientInformation: - $ref: '#/components/schemas/clientInformation' - processID: - type: string - signPasskeyData: - type: boolean - passkeyMediationFinishRsp: - type: object - required: - - passkeyData - properties: - passkeyData: - $ref: '#/components/schemas/passkeyData' - signedPasskeyData: - type: string - error: - oneOf: - - $ref: '#/components/schemas/passkeyMediationFinishErrorCredentialDeleted' - - $ref: '#/components/schemas/passkeyMediationFinishErrorAlternativeProject' - discriminator: - propertyName: type - mapping: - credentialDeleted: '#/components/schemas/passkeyMediationFinishErrorCredentialDeleted' - alternativeProjectID: '#/components/schemas/passkeyMediationFinishErrorAlternativeProject' - passkeyMediationFinishErrorCredentialDeleted: - type: object - required: - - type - properties: - type: - type: string - enum: - - 'credentialDeleted' - passkeyMediationFinishErrorAlternativeProject: - type: object - required: - - type - - alternativeProjectName - properties: - type: - type: string - enum: - - 'alternativeProjectID' - alternativeProjectName: - type: string - connectTokenCreateReq: - type: object - required: - - type - - data - properties: - type: - $ref: '#/components/schemas/connectTokenType' - data: - $ref: '#/components/schemas/connectTokenData' - maxLifetimeInSeconds: - type: integer - example: 3600 - connectTokenUpdateReq: - type: object - required: - - status - properties: - status: - $ref: '#/components/schemas/connectTokenStatus' - webhookEndpointCreateReq: - type: object - required: - - url - - subscribedEvents - - customHeaders - properties: - url: - type: string - basicAuthUsername: - type: string - basicAuthPassword: - type: string - subscribedEvents: - type: array - items: - $ref: '#/components/schemas/webhookEventType' - customHeaders: - type: object - webhookEndpointUpdateReq: - type: object - properties: - url: - type: string - basicAuthUsername: - type: string - basicAuthPassword: - type: string - subscribedEvents: - type: array - items: - $ref: '#/components/schemas/webhookEventType' - customHeaders: - type: object + $ref: "#/components/schemas/webhookEndpointCreateReq" + responses: + "200": + description: Webhook endpoint has been created. + content: + application/json: + schema: + $ref: "#/components/schemas/webhookEndpoint" + default: + $ref: "#/components/responses/error" + + /webhookEndpoints/{webhookEndpointID}: + put: + description: Updates an existing webhook endpoint + operationId: WebhookEndpointUpdate + x-excluded: true + tags: + - WebhookEndpoints + security: + - basicAuth: [] + parameters: + - $ref: "#/components/parameters/webhookEndpointID" + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/webhookEndpointUpdateReq" + responses: + "200": + description: Webhook endpoint has been updated. + content: + application/json: + schema: + $ref: "#/components/schemas/webhookEndpoint" + default: + $ref: "#/components/responses/error" + delete: + description: Deletes an existing webhook endpoint + operationId: WebhookEndpointDelete + x-excluded: true + tags: + - WebhookEndpoints + security: + - basicAuth: [] + parameters: + - $ref: "#/components/parameters/webhookEndpointID" + responses: + "200": + $ref: "#/components/responses/200" + default: + $ref: "#/components/responses/error" + + /sessions: + get: + summary: List all sessions + description: | + Returns a list of sessions. + + The list can be sorted and filtered: + - The `sort` parameter supports the following fields: `ID`, `userID`, `expires`, `lastAction`, `created`, `updated`, and `status`. + - The `filter` parameter supports the following fields: `ID`, `userID`, `expires`, `lastAction`, `created`, `updated`, and `status`. + + Refer to the parameter description for more details on sorting in different directions and using the filter with different operators. + + You can view and manage sessions in the [Developer Panel](https://app.corbado.com/users/sessions) or consult the [Documentation](https://docs.corbado.com/corbado-complete/sessions/overview) for more details. + operationId: SessionList + tags: + - Sessions + security: + - basicAuth: [] + parameters: + - $ref: "common.yml#/components/parameters/sort" + - $ref: "common.yml#/components/parameters/filter" + - $ref: "common.yml#/components/parameters/page" + - $ref: "common.yml#/components/parameters/pageSize" + responses: + "200": + description: List of all matching sessions. + content: + application/json: + schema: + $ref: "#/components/schemas/sessionList" + default: + $ref: "#/components/responses/error" + + /sessions/{sessionID}/revoke: + post: + summary: Revoke a session + description: Revokes an existing session by given `sessionID`. + operationId: SessionRevoke + tags: + - Sessions + security: + - basicAuth: [] + parameters: + - $ref: "common.yml#/components/parameters/sessionID" + responses: + "200": + $ref: "#/components/responses/200" + default: + $ref: "#/components/responses/error" + + ################################################################### + # Outliers (non-rest calls) # + ################################################################### + + /passkey/append/start: + post: + summary: Start creating a new passkey + description: | + Starts creating a new passkey by initiating the WebAuthn ceremony. To complete the ceremony you need to call [finish](/api-reference/backend-api/passkeys/finish-creating-a-new-passkey). + operationId: PasskeyAppendStart + tags: + - Passkeys + security: + - basicAuth: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/passkeyAppendStartReq" + responses: + "200": + description: Passkey creation process has been started. + content: + application/json: + schema: + $ref: "#/components/schemas/passkeyAppendStartRsp" + default: + $ref: "#/components/responses/error" + + /passkey/append/finish: + post: + summary: Finish creating a new passkey + description: | + Finishes creating a new passkey by completing the WebAuthn ceremony. + operationId: PasskeyAppendFinish + tags: + - Passkeys + security: + - basicAuth: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/passkeyAppendFinishReq" + responses: + "200": + description: Passkey append succeeded. + content: + application/json: + schema: + $ref: "#/components/schemas/passkeyAppendFinishRsp" + default: + $ref: "#/components/responses/error" + + /passkey/login/start: + post: + summary: Start login with an existing passkey + description: | + Starts login with an existing passkey by initiating the WebAuthn ceremony. To complete the ceremony you need to call [finish](/api-reference/backend-api/passkeys/finish-login-with-an-existing-passkey). + operationId: PasskeyLoginStart + tags: + - Passkeys + security: + - basicAuth: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/passkeyLoginStartReq" + responses: + "200": + description: Passkey authentication process has been started. + content: + application/json: + schema: + $ref: "#/components/schemas/passkeyLoginStartRsp" + default: + $ref: "#/components/responses/error" + + /passkey/login/finish: + post: + summary: Finish login with an existing passkey + description: | + Finishes login with an existing passkey by completing the WebAuthn ceremony. + operationId: PasskeyLoginFinish + tags: + - Passkeys + security: + - basicAuth: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/passkeyLoginFinishReq" + responses: + "200": + description: Passkey login succeeded. + content: + application/json: + schema: + $ref: "#/components/schemas/passkeyLoginFinishRsp" + default: + $ref: "#/components/responses/error" + + /passkey/postLogin: + post: + summary: Run the post-login action for passkey + description: Explicitly runs the post-login action + operationId: PasskeyPostLogin + x-excluded: true + tags: + - Passkeys + security: + - basicAuth: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/passkeyPostLoginReq" + responses: + "200": + description: Post Passkey Login succeeded. + content: + application/json: + schema: + $ref: "#/components/schemas/passkeyPostLoginRsp" + default: + $ref: "#/components/responses/error" + + /passkey/verifySignedData: + post: + summary: Verify signedPasskeyData from a passkey login + description: | + Verifies the `signedPasskeyData` from a passkey login. The `signedPasskeyData` is returned by the [finish](/api-reference/backend-api/passkeys/finish-login-with-an-existing-passkey) call and is essential for transferring the authentication state to your backend. + + It is required only for [Corbado Connect](/corbado-connect) and is thoroughly explained in our [Documentation](/corbado-connect/concepts/signed-passkey-data). Our [generic integration guide](/corbado-connect/integration/generic) explains how to use `signedPasskeyData` in your backend. + operationId: PasskeyVerifySignedData + tags: + - Passkeys + security: + - basicAuth: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/passkeyVerifySignedDataReq" + responses: + "200": + description: | + `signedPasskeyData` has been verified. + content: + application/json: + schema: + $ref: "#/components/schemas/passkeyVerifySignedDataRsp" + default: + $ref: "#/components/responses/error" + + /passkey/mediation/start: + post: + summary: Start login with an existing passkey (Conditional UI) + description: | + Starts login with an existing passkey in [Conditional UI](https://www.corbado.com/glossary/conditional-ui) scenario. To complete the ceremony you need to call [finish](/api-reference/backend-api/passkeys/finish-login-with-an-existing-passkey-conditional-ui). + operationId: PasskeyMediationStart + tags: + - Passkeys + security: + - basicAuth: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/passkeyMediationStartReq" + responses: + "200": + description: Passkey login process has been started. + content: + application/json: + schema: + $ref: "#/components/schemas/passkeyMediationStartRsp" + default: + $ref: "#/components/responses/error" + + /passkey/mediation/finish: + post: + summary: Finish login with an existing passkey (Conditional UI) + description: | + Finishes login with an existing passkey in [Conditional UI](https://www.corbado.com/glossary/conditional-ui) scenario. + operationId: PasskeyMediationFinish + tags: + - Passkeys + security: + - basicAuth: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/passkeyMediationFinishReq" + responses: + "200": + description: Passkey login process has been completed. + content: + application/json: + schema: + $ref: "#/components/schemas/passkeyMediationFinishRsp" + default: + $ref: "#/components/responses/error" + +components: + securitySchemes: + basicAuth: + type: http + scheme: basic + description: | + Basic authentication is used to authenticate requests to the Backend API. The username is the project ID and the password is the API secret. + + The project ID and API secret can be found in the [Developer Panel](https://app.corbado.com/settings/api-secrets). + + parameters: + userID: + name: userID + in: path + description: | + Unique identifier of the user. Format: `usr-`. + required: true + schema: + type: string + example: usr-4693224802260150919 + + challengeID: + name: challengeID + in: path + description: ID of challenge + required: true + schema: + type: string + + identifierID: + name: identifierID + in: path + description: | + Unique identifier of the login identifier (e.g., email address or phone number). Format: `ide-`. + required: true + schema: + type: string + example: "ide-4693224802260150919" + + credentialID: + name: credentialID + in: path + description: | + Unique identifier of the passkey. Format: `cre-`. + required: true + schema: + type: string + example: "cre-4693224802260150919" + + connectTokenID: + name: connectTokenID + in: path + description: | + Unique identifier of the connectToken. Format: `ctk-`. + required: true + schema: + type: string + example: "ctk-4693224802260150919" + + passkeyChallengeID: + name: passkeyChallengeID + in: path + description: ID of a passkey challenge + required: true + schema: + type: string + + passkeyEventID: + name: passkeyEventID + in: path + description: ID of a passkey event + required: true + schema: + type: string + + webhookEndpointID: + name: webhookEndpointID + in: path + description: ID of a webhook endpoint + required: true + schema: + type: string + + schemas: + ################################################################### + # Request/Response bodies # + ################################################################### + userCreateReq: + type: object + required: + - status + properties: + fullName: + type: string + example: "Jane Doe" + status: + $ref: "#/components/schemas/userStatus" + explicitWebauthnID: + type: string + description: For [Corbado Connect](https://docs.corbado.com/corbado-connect) projects, the webauthnID can be explicitly set for a user + + userUpdateReq: + type: object + properties: + fullName: + type: string + example: "Jane Doe" + status: + $ref: "#/components/schemas/userStatus" + + challengeCreateReq: + type: object + required: + - challengeType + - identifierValue + - clientInformation + properties: + challengeType: + $ref: "#/components/schemas/challengeType" + identifierValue: + type: string + example: "jane@doe.com" + challengeMetadata: + type: object + example: { "city": "Munich" } + lifetimeSeconds: + type: integer + example: 300 + clientInformation: + $ref: "#/components/schemas/clientInformation" + + challengeUpdateReq: + type: object + required: + - value + properties: + value: + type: string + + identifierCreateReq: + type: object + required: + - identifierType + - identifierValue + - status + properties: + identifierType: + $ref: "#/components/schemas/identifierType" + identifierValue: + type: string + status: + $ref: "#/components/schemas/identifierStatus" + + identifierUpdateReq: + type: object + required: + - status + properties: + status: + $ref: "#/components/schemas/identifierStatus" + + passkeyAppendStartReq: + type: object + required: + - userID + - processID + - username + - clientInformation + - passkeyIntelFlags + properties: + userID: + $ref: "common.yml#/components/schemas/userID" + processID: + type: string + username: + type: string + clientInformation: + $ref: "#/components/schemas/clientInformation" + passkeyIntelFlags: + $ref: "#/components/schemas/passkeyIntelFlags" + + passkeyAppendStartRsp: + type: object + required: + - appendAllow + - attestationOptions + - detectionInsights + - decisionInsights + properties: + appendAllow: + type: boolean + attestationOptions: + type: string + example: '{"publicKey":{"challenge":"2m6...0w9/MgW...KE=","rp":{"name":"demo","id":"localhost"},"user":{"name":"example@mail.com","id":"dXN...zk5"},"pubKeyCredParams":[{"type":"public-key","alg":-7},{"type":"public-key","alg":-35},{"type":"public-key","alg":-36},{"type":"public-key","alg":-257},{"type":"public-key","alg":-258},{"type":"public-key","alg":-259},{"type":"public-key","alg":-37},{"type":"public-key","alg":-38},{"type":"public-key","alg":-39},{"type":"public-key","alg":-8}],"authenticatorSelection":{"authenticatorAttachment":"platform","requireResidentKey":false,"userVerification":"required"},"timeout":60000,"attestation":"none"}}' + detectionInsights: + $ref: "#/components/schemas/detectionInsights" + decisionInsights: + $ref: "#/components/schemas/decisionInsightsAppend" + + passkeyAppendFinishReq: + type: object + required: + - userID + - processID + - attestationResponse + - clientInformation + - trackingID + properties: + userID: + $ref: "common.yml#/components/schemas/userID" + processID: + type: string + attestationResponse: + type: string + example: '{"type":"public-key","id":"JM6...J_Q","rawId":"JM6...J_Q","authenticatorAttachment":null,"response":{"clientDataJSON":"eyJ...ZX0","authenticatorData":"SZY...AAQ","signature":"Ni7...YAg","userHandle":"dXN...zk5"},"clientExtensionResults":{}}' + clientInformation: + $ref: "#/components/schemas/clientInformation" + sendNotification: + type: boolean + trackingID: + type: string + + passkeyAppendFinishRsp: + type: object + required: + - passkeyData + properties: passkeyData: - type: object - required: - - id - - userID - - username - - ceremonyType - - challengeID - - aaguidDetails - properties: - id: - type: string - userID: - type: string - username: - type: string - ceremonyType: - type: string - enum: - - 'local' - - 'cda' - - 'security-key' - challengeID: - type: string - aaguidDetails: - $ref: '#/components/schemas/aaguidDetails' - user: - type: object - required: - - userID - - status - properties: - userID: - type: string - fullName: - type: string - status: - $ref: '#/components/schemas/userStatus' - explicitWebauthnID: - type: string - sessionList: - type: object - required: - - sessions - - paging - properties: - sessions: - type: array - items: - type: object - required: - - sessionID - - userID - - identifierValue - - createdMs - - lastActionMs - - expiresMs - - status - properties: - sessionID: - type: string - userID: - type: string - identifierValue: - type: string - createdMs: - type: integer - format: int64 - lastActionMs: - type: integer - format: int64 - expiresMs: - type: integer - format: int64 - status: - type: string - enum: - - 'active' - - 'logged_out' - - 'expired' - - 'inactivity_reached' - - 'revoked' - paging: - type: object - required: - - page - - totalPages - - totalItems - properties: - page: - description: current page returned in response - type: integer - default: 1 - totalPages: - description: total number of pages available - type: integer - totalItems: - description: total number of items available - type: integer - identifier: - type: object - required: - - identifierID - - type - - value - - status - - userID - properties: - identifierID: - type: string - type: - $ref: '#/components/schemas/identifierType' - value: - type: string - status: - $ref: '#/components/schemas/identifierStatus' - userID: - type: string - identifierList: - type: object - required: - - identifiers - - paging - properties: - identifiers: - type: array - items: - $ref: '#/components/schemas/identifier' - paging: - type: object - required: - - page - - totalPages - - totalItems - properties: - page: - description: current page returned in response - type: integer - default: 1 - totalPages: - description: total number of pages available - type: integer - totalItems: - description: total number of items available - type: integer - socialAccountCreateReq: - type: object - required: - - providerType - - identifierValue - - foreignID - - avatarURL - - fullName - properties: - providerType: - type: string - enum: - - 'google' - - 'microsoft' - - 'github' - identifierValue: - type: string - foreignID: - type: string - avatarURL: - type: string - fullName: - type: string - socialAccount: - type: object - required: - - socialAccountID - - providerType - - identifierValue - - userID - - foreignID - - avatarURL - - fullName - properties: - socialAccountID: - type: string - providerType: - type: string - identifierValue: - type: string - userID: - type: string - foreignID: - type: string - avatarURL: - type: string - fullName: - type: string - socialAccountList: - type: object - required: - - socialAccounts - - paging - properties: - socialAccounts: - type: array - items: - $ref: '#/components/schemas/socialAccount' - paging: - type: object - required: - - page - - totalPages - - totalItems - properties: - page: - description: current page returned in response - type: integer - default: 1 - totalPages: - description: total number of pages available - type: integer - totalItems: - description: total number of items available - type: integer - credential: - type: object - required: - - id - - credentialID - - attestationType - - transport - - backupEligible - - backupState - - authenticatorAAGUID - - aaguidDetails - - sourceOS - - sourceBrowser - - lastUsed - - lastUsedMs - - created - - createdMs - - status - properties: - id: - type: string - example: "cre-12345" - credentialID: - type: string - attestationType: - type: string - transport: - type: array - items: - type: string - enum: - - 'usb' - - 'nfc' - - 'ble' - - 'internal' - - 'hybrid' - - 'smart-card' - backupEligible: - type: boolean - backupState: - type: boolean - authenticatorAAGUID: - type: string - sourceOS: - type: string - sourceBrowser: - type: string - lastUsed: - type: string - description: Timestamp of when the passkey was last used in yyyy-MM-dd'T'HH:mm:ss format - lastUsedMs: - type: integer - format: int64 - created: - description: Timestamp of when the entity was created in yyyy-MM-dd'T'HH:mm:ss format - type: string - createdMs: - type: integer - format: int64 - status: - type: string - enum: - - 'pending' - - 'active' - description: "Status" - aaguidDetails: - $ref: '#/components/schemas/aaguidDetails' + $ref: "#/components/schemas/passkeyData" + + passkeyLoginStartReq: + type: object + required: + - userID + - clientInformation + - crossDeviceAuthenticationStrategy + - processID + properties: + userID: + $ref: "common.yml#/components/schemas/userID" + clientInformation: + $ref: "#/components/schemas/clientInformation" + crossDeviceAuthenticationStrategy: + $ref: "#/components/schemas/crossDeviceAuthenticationStrategy" + processID: + type: string + + passkeyLoginStartRsp: + type: object + required: + - loginAllow + - assertionOptions + - detectionInsights + - decisionInsights + properties: + loginAllow: + type: boolean + assertionOptions: + type: string + detectionInsights: + $ref: "#/components/schemas/detectionInsights" + decisionInsights: + $ref: "#/components/schemas/decisionInsights" + + passkeyLoginFinishReq: + type: object + required: + - userID + - assertionResponse + - clientInformation + - processID + - trackingID + properties: + userID: + $ref: "common.yml#/components/schemas/userID" + assertionResponse: + type: string + clientInformation: + $ref: "#/components/schemas/clientInformation" + processID: + type: string + signPasskeyData: + type: boolean + trackingID: + type: string + + passkeyLoginFinishRsp: + type: object + required: + - passkeyData + properties: + passkeyData: + $ref: "#/components/schemas/passkeyData" + signedPasskeyData: + type: string + + passkeyPostLoginReq: + type: object + required: + - signedPasskeyData + properties: + signedPasskeyData: + type: string + + passkeyPostLoginRsp: + type: object + required: + - session + properties: + session: + type: string + + passkeyVerifySignedDataReq: + type: object + required: + - signedPasskeyData + - username + properties: + signedPasskeyData: + type: string + username: + type: string + + passkeyVerifySignedDataRsp: + type: object + required: + - verificationResult + properties: + verificationResult: + type: string + enum: + [ + "success", + "invalid_signature", + "invalid_challenge", + "user_mismatch", + "generic_error", + ] + + passkeyMediationStartReq: + type: object + required: + - clientInformation + properties: + clientInformation: + $ref: "#/components/schemas/clientInformation" + + passkeyMediationStartRsp: + type: object + required: + - loginAllow + - assertionOptions + properties: + loginAllow: + type: boolean + assertionOptions: + type: string + + passkeyMediationFinishReq: + type: object + required: + - assertionResponse + - clientInformation + - processID + - trackingID + properties: + assertionResponse: + type: string + clientInformation: + $ref: "#/components/schemas/clientInformation" + processID: + type: string + signPasskeyData: + type: boolean + trackingID: + type: string + + passkeyMediationFinishRsp: + type: object + required: + - passkeyData + properties: + passkeyData: + $ref: "#/components/schemas/passkeyData" + signedPasskeyData: + type: string + error: + oneOf: + - $ref: "#/components/schemas/passkeyMediationFinishErrorCredentialDeleted" + - $ref: "#/components/schemas/passkeyMediationFinishErrorAlternativeProject" + discriminator: + propertyName: type + mapping: + credentialDeleted: "#/components/schemas/passkeyMediationFinishErrorCredentialDeleted" + alternativeProjectID: "#/components/schemas/passkeyMediationFinishErrorAlternativeProject" + + passkeyMediationFinishErrorCredentialDeleted: + type: object + required: + - type + properties: + type: + type: string + enum: ["credentialDeleted"] + + passkeyMediationFinishErrorAlternativeProject: + type: object + required: + - type + - alternativeProjectName + properties: + type: + type: string + enum: ["alternativeProjectID"] + alternativeProjectName: + type: string + + connectTokenCreateReq: + type: object + required: + - type + - data + properties: + type: + $ref: "#/components/schemas/connectTokenType" + data: + $ref: "#/components/schemas/connectTokenData" + maxLifetimeInSeconds: + type: integer + description: Maximum lifetime of the connectToken in seconds. + example: 3600 + + connectTokenUpdateReq: + type: object + required: + - status + properties: + status: + $ref: "#/components/schemas/connectTokenStatus" + + webhookEndpointCreateReq: + type: object + required: + - url + - subscribedEvents + - customHeaders + properties: + url: + type: string + basicAuthUsername: + type: string + basicAuthPassword: + type: string + subscribedEvents: + type: array + items: + $ref: "#/components/schemas/webhookEventType" + customHeaders: + type: object + + webhookEndpointUpdateReq: + type: object + properties: + url: + type: string + basicAuthUsername: + type: string + basicAuthPassword: + type: string + subscribedEvents: + type: array + items: + $ref: "#/components/schemas/webhookEventType" + customHeaders: + type: object + + ################################################################### + # Entities # + ################################################################### + + passkeyData: + type: object + required: + - id + - userID + - username + - ceremonyType + - challengeID + - aaguidDetails + properties: + id: + type: string + userID: + type: string + username: + type: string + ceremonyType: + type: string + enum: ["local", "cda", "security-key"] + challengeID: + type: string aaguidDetails: - type: object - required: - - aaguid - - name - - iconLight - - iconDark - properties: - aaguid: - type: string - name: - type: string - iconLight: - type: string - iconDark: - type: string - credentialList: - type: object - required: - - credentials - - paging - properties: - credentials: - type: array - items: - $ref: '#/components/schemas/credential' - paging: - type: object - required: - - page - - totalPages - - totalItems - properties: - page: - description: current page returned in response - type: integer - default: 1 - totalPages: - description: total number of pages available - type: integer - totalItems: - description: total number of items available - type: integer - challenge: - type: object - required: - - challengeID - - type - - identifierValue - - value - - expires - - status - properties: - challengeID: - type: string - type: - $ref: '#/components/schemas/challengeType' - identifierValue: - type: string - value: - type: string - expires: - type: integer - format: int64 - status: - $ref: '#/components/schemas/challengeStatus' - authEventCreateReq: - type: object - required: - - username - - eventType - - method - - status - - clientInformation - properties: - username: - type: string - eventType: - $ref: '#/components/schemas/authEventType' - method: - $ref: '#/components/schemas/authEventMethod' - status: - $ref: '#/components/schemas/authEventStatus' - clientInformation: - $ref: '#/components/schemas/clientInformation' - authEvent: - type: object - required: - - authEventID - - userID - - username - - eventType - - method - - created - - createdMs - - status - properties: - authEventID: - type: string - userID: - description: ID of the user - type: string - username: - type: string - eventType: - $ref: '#/components/schemas/authEventType' - method: - $ref: '#/components/schemas/authEventMethod' - created: - description: Timestamp of when the entity was created in yyyy-MM-dd'T'HH:mm:ss format - type: string - createdMs: - type: integer - format: int64 - status: - $ref: '#/components/schemas/authEventStatus' - passkeyEventCreateReq: - type: object - required: - - eventType - properties: - eventType: - $ref: '#/components/schemas/passkeyEventType' - expires: - type: integer - processID: - type: string - clientEnvID: - type: string - credentialID: - type: string - challenge: - type: string - passkeyEvent: - type: object - required: - - passkeyEventID - - userID - - eventType - - created - - createdMs - properties: - passkeyEventID: - type: string - userID: - description: ID of the user - type: string - eventType: - $ref: '#/components/schemas/passkeyEventType' - clientEnvID: - type: string - processID: - type: string - credentialID: - type: string - expires: - type: integer - created: - description: Timestamp of when the entity was created in yyyy-MM-dd'T'HH:mm:ss format - type: string - createdMs: - type: integer - format: int64 - passkeyEventList: - type: object - required: - - passkeyEvents - - paging - properties: - passkeyEvents: - type: array - items: - $ref: '#/components/schemas/passkeyEvent' - paging: - type: object - required: - - page - - totalPages - - totalItems - properties: - page: - description: current page returned in response - type: integer - default: 1 - totalPages: - description: total number of pages available - type: integer - totalItems: - description: total number of items available - type: integer - projectConfigUpdateCnameReq: - type: object - required: - - cname - properties: - cname: - type: string - detectionTag: - type: object - required: - - category - - name - properties: - category: - type: string - enum: - - 'support' - - 'clientEnv' - - 'history' - - 'passkey' - name: - type: string - decisionTag: + $ref: "#/components/schemas/aaguidDetails" + + user: + type: object + required: + - userID + - status + - updated + - updatedMs + properties: + userID: + type: string + example: "usr-4693224802260150919" + fullName: + type: string + example: "Jane Doe" + status: + $ref: "#/components/schemas/userStatus" + explicitWebauthnID: + type: string + updated: + type: string + updatedMs: + type: integer + format: int64 + + userAggregate: + type: object + required: + - userID + - status + - emailIdentifiers + - phoneNumberIdentifiers + - usernameIdentifiers + - socialAccounts + - created + - createdMS + - updated + - updatedMs + properties: + userID: + type: string + example: "usr-4693224802260150919" + fullName: + type: string + example: "Jane Doe" + status: + $ref: "#/components/schemas/userStatus" + explicitWebauthnID: + type: string + emailIdentifiers: + type: array + items: + $ref: "#/components/schemas/identifier" + phoneNumberIdentifiers: + type: array + items: + $ref: "#/components/schemas/identifier" + usernameIdentifiers: + type: array + items: + $ref: "#/components/schemas/identifier" + socialAccounts: + type: array + items: + $ref: "#/components/schemas/socialAccount" + created: + type: string + createdMS: + type: integer + format: int64 + updated: + type: string + updatedMs: + type: integer + format: int64 + + userList: + type: object + required: + - users + - paging + properties: + users: + type: array + items: + $ref: "#/components/schemas/userAggregate" + paging: + $ref: "common.yml#/components/schemas/paging" + + sessionList: + type: object + required: + - sessions + - paging + properties: + sessions: + type: array + items: + $ref: "common.yml#/components/schemas/session" + paging: + $ref: "common.yml#/components/schemas/paging" + + identifier: + type: object + required: + - identifierID + - type + - value + - status + - userID + properties: + identifierID: + type: string + description: Unique identifier of the login identifier. + example: "ide-4693224802260150919" + type: + $ref: "#/components/schemas/identifierType" + value: + type: string + description: Value of the identifier (here email address). + example: "jane@doe.com" + status: + $ref: "#/components/schemas/identifierStatus" + userID: + type: string + description: Unique identifier of the user. + example: "usr-4693224802260150919" + + identifierList: + type: object + required: + - identifiers + - paging + properties: + identifiers: + type: array + items: + $ref: "#/components/schemas/identifier" + paging: + $ref: "common.yml#/components/schemas/paging" + + socialAccountCreateReq: + type: object + required: + - providerType + - identifierValue + - foreignID + - avatarURL + - fullName + properties: + providerType: + $ref: "common.yml#/components/schemas/socialProviderType" + identifierValue: + type: string + description: Login identifier of the user (here email address). + example: "jane@doe.com" + foreignID: + type: string + description: Unique identifier of the user in the social provider. + example: "53150919" + avatarURL: + type: string + description: URL of the avatar of the user in the social provider. + example: "https://avatars.githubusercontent.com/u/53150919?v=4" + fullName: + type: string + description: Full name of the user in the social provider. + example: "Jane Doe" + + socialAccount: + type: object + required: + - socialAccountID + - providerType + - identifierValue + - userID + - foreignID + - avatarURL + - fullName + properties: + socialAccountID: + type: string + description: Unique identifier of the social account. + example: "soc-6060375336139150919" + providerType: + type: string + description: Type of the social provider. + example: "github" + identifierValue: + type: string + description: Login identifier of the user (here email address). + example: "jane@doe.com" + userID: + type: string + description: Unique identifier of the user. + example: "usr-4693224802260150919" + foreignID: + type: string + description: Unique identifier of the user in the social provider. + example: "53150919" + avatarURL: + type: string + description: URL of the avatar of the user in the social provider. + example: "https://avatars.githubusercontent.com/u/53150919?v=4" + fullName: + type: string + description: Full name of the user in the social provider. + example: "Jane Doe" + + socialAccountList: + type: object + required: + - socialAccounts + - paging + properties: + socialAccounts: + type: array + items: + $ref: "#/components/schemas/socialAccount" + paging: + $ref: "common.yml#/components/schemas/paging" + + credential: + type: object + required: + - id + - credentialID + - attestationType + - transport + - backupEligible + - backupState + - authenticatorAAGUID + - aaguidDetails + - sourceOS + - sourceBrowser + - lastUsed + - lastUsedMs + - created + - createdMs + - status + - tags + properties: + id: + type: string + example: "cre-12345" + credentialID: + type: string + attestationType: + type: string + transport: + type: array + items: type: string - enum: - - env-no-platform-pk-support - - env-no-pk-support - - user-no-pks - - user-login-blacklisted - - user-security-key - - user-positive-env-history - - user-negative-env-history - - env-blacklisted - - user-platform-pk-high-confidence - - user-cross-platform-pk-high-confidence - - user-env-no-pks - - default-deny - - passkey-list-initiated-process - - user-append-blacklisted - - process-pk-login-sk-completed - - process-pk-login-platform-completed - - process-pk-login-not-offered - - process-pk-login-incomplete - - process-pk-login-cross-platform-completed - - device-local-platform-passkey-experiment - - env-broken - - process-pk-login-aborted + enum: ["usb", "nfc", "ble", "internal", "hybrid", "smart-card"] + backupEligible: + type: boolean + backupState: + type: boolean + authenticatorAAGUID: + type: string + sourceOS: + type: string + sourceBrowser: + type: string + lastUsed: + type: string + description: Timestamp of when the passkey was last used in yyyy-MM-dd'T'HH:mm:ss format + lastUsedMs: + type: integer + format: int64 + created: + $ref: "common.yml#/components/schemas/created" + createdMs: + type: integer + format: int64 + status: + type: string + enum: ["pending", "active"] + description: "Status" + aaguidDetails: + $ref: "#/components/schemas/aaguidDetails" + tags: + type: array + items: + type: string + + aaguidDetails: + type: object + required: + - aaguid + - name + - iconLight + - iconDark + properties: + aaguid: + type: string + name: + type: string + iconLight: + type: string + iconDark: + type: string + + credentialList: + type: object + required: + - credentials + - paging + properties: + credentials: + type: array + items: + $ref: "#/components/schemas/credential" + paging: + $ref: "common.yml#/components/schemas/paging" + + challenge: + type: object + required: + - challengeID + - type + - identifierValue + - value + - expires + - status + properties: + challengeID: + type: string + type: + $ref: "#/components/schemas/challengeType" + identifierValue: + type: string + value: + type: string + expires: + type: integer + format: int64 + status: + $ref: "#/components/schemas/challengeStatus" + + authEventCreateReq: + type: object + required: + - username + - eventType + - method + - status + - clientInformation + properties: + username: + type: string + eventType: + $ref: "#/components/schemas/authEventType" + method: + $ref: "#/components/schemas/authEventMethod" + status: + $ref: "#/components/schemas/authEventStatus" clientInformation: - type: object - required: - - remoteAddress - - userAgent - - userVerifyingPlatformAuthenticatorAvailable - - conditionalMediationAvailable - - parsedDeviceInfo - properties: - remoteAddress: - description: Client's IP address - type: string - example: '::ffff:172.18.0.1' - userAgent: - description: Client's user agent - type: string - example: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36' - clientEnvHandle: - description: Client's environment handle - type: string - javascriptFingerprint: - description: Client's fingerprint - type: string - javaScriptHighEntropy: - $ref: '#/components/schemas/javaScriptHighEntropy' - bluetoothAvailable: - description: Client's Bluetooth availability - type: boolean - passwordManagerAvailable: - description: Client's password manager availability - type: boolean - userVerifyingPlatformAuthenticatorAvailable: - type: boolean - conditionalMediationAvailable: - type: boolean - privateMode: - type: boolean - parsedDeviceInfo: - $ref: '#/components/schemas/parsedDeviceInfo' - parsedDeviceInfo: - type: object - required: - - browserName - - browserVersion - - osName - - osVersion - properties: - browserName: - type: string - browserVersion: - type: string - osName: - type: string - osVersion: - type: string - passkeyIntelFlags: - type: object - required: - - forcePasskeyAppend - properties: - forcePasskeyAppend: - type: boolean - askForAutoAppend: - type: boolean + $ref: "#/components/schemas/clientInformation" + + authEvent: + type: object + required: + - authEventID + - userID + - username + - eventType + - method + - created + - createdMs + - status + properties: + authEventID: + type: string + userID: + $ref: "common.yml#/components/schemas/userID" + username: + type: string + eventType: + $ref: "#/components/schemas/authEventType" + method: + $ref: "#/components/schemas/authEventMethod" + created: + $ref: "common.yml#/components/schemas/created" + createdMs: + type: integer + format: int64 + status: + $ref: "#/components/schemas/authEventStatus" + + passkeyEventCreateReq: + type: object + required: + - eventType + properties: + eventType: + $ref: "#/components/schemas/passkeyEventType" + expires: + type: integer + processID: + type: string + clientEnvID: + type: string + credentialID: + type: string + challenge: + type: string + + passkeyEvent: + type: object + required: + - passkeyEventID + - userID + - eventType + - created + - createdMs + properties: + passkeyEventID: + type: string + userID: + $ref: "common.yml#/components/schemas/userID" + eventType: + $ref: "#/components/schemas/passkeyEventType" + clientEnvID: + type: string + processID: + type: string + credentialID: + type: string + expires: + type: integer + created: + $ref: "common.yml#/components/schemas/created" + createdMs: + type: integer + format: int64 + + passkeyEventList: + type: object + required: + - passkeyEvents + - paging + properties: + passkeyEvents: + type: array + items: + $ref: "#/components/schemas/passkeyEvent" + paging: + $ref: "common.yml#/components/schemas/paging" + + projectConfigUpdateCnameReq: + type: object + required: + - cname + properties: + cname: + type: string + + detectionTag: + type: object + required: + - category + - name + properties: + category: + type: string + enum: ["support", "clientEnv", "history", "passkey"] + name: + type: string + + decisionTag: + type: string + enum: + - env-no-platform-pk-support + - env-no-pk-support + - user-no-pks + - user-login-blacklisted + - user-security-key + - user-positive-env-history + - user-negative-env-history + - env-blacklisted + - user-platform-pk-high-confidence + - user-cross-platform-pk-high-confidence + - user-env-no-pks + - default-deny + - passkey-list-initiated-process + - user-append-blacklisted + - process-pk-login-sk-completed + - process-pk-login-platform-completed + - process-pk-login-not-offered + - process-pk-login-incomplete + - process-pk-login-cross-platform-completed + - device-local-platform-passkey-experiment + - env-broken + - process-pk-login-aborted + + clientInformation: + type: object + required: + - remoteAddress + - userAgent + - userVerifyingPlatformAuthenticatorAvailable + - conditionalMediationAvailable + - parsedDeviceInfo + properties: + remoteAddress: + description: Client's IP address + type: string + example: "::ffff:172.18.0.1" + userAgent: + description: Client's user agent + type: string + example: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36" + clientEnvHandle: + description: Client's environment handle + type: string + javascriptFingerprint: + description: Client's fingerprint + type: string javaScriptHighEntropy: - type: object - required: - - platform - - platformVersion - - mobile - properties: - platform: - type: string - platformVersion: - type: string - mobile: - type: boolean - passkeyChallengeUpdateReq: - type: object - required: - - status - properties: - status: - $ref: '#/components/schemas/passkeyChallengeStatus' - passkeyChallengeList: - type: object - required: - - passkeyChallenges - - paging - properties: - passkeyChallenges: - type: array - items: - $ref: '#/components/schemas/passkeyChallenge' - paging: - type: object - required: - - page - - totalPages - - totalItems - properties: - page: - description: current page returned in response - type: integer - default: 1 - totalPages: - description: total number of pages available - type: integer - totalItems: - description: total number of items available - type: integer - passkeyChallenge: - type: object - required: - - challengeID - - type - - value - - status - - created - - createdMs - - expires - properties: - challengeID: - type: string - type: - $ref: '#/components/schemas/passkeyChallengeType' - value: - type: string - status: - $ref: '#/components/schemas/passkeyChallengeStatus' - created: - type: integer - format: int64 - createdMs: - type: integer - format: int64 - expires: - type: integer - format: int64 - passkeyChallengeType: - type: string - enum: - - 'register' - - 'authenticate' - passkeyChallengeStatus: - type: string - enum: - - 'pending' - - 'completed' - - 'consumed' - userStatus: - type: string - enum: - - 'pending' - - 'active' - - 'disabled' - challengeType: - type: string - enum: - - 'email_otp' - - 'email_link' - - 'sms_otp' - challengeStatus: - type: string - enum: - - 'pending' - - 'completed' - - 'expired' - identifierType: - type: string - enum: - - 'email' - - 'phone' - - 'username' - identifierStatus: - type: string - enum: - - 'pending' - - 'primary' - - 'verified' - crossDeviceAuthenticationStrategy: - type: string - enum: - - 'standard' - - 'minimize' - - 'maximize' + $ref: "#/components/schemas/javaScriptHighEntropy" + bluetoothAvailable: + description: Client's Bluetooth availability + type: boolean + passwordManagerAvailable: + description: Client's password manager availability + type: boolean + userVerifyingPlatformAuthenticatorAvailable: + type: boolean + conditionalMediationAvailable: + type: boolean + privateMode: + type: boolean + parsedDeviceInfo: + $ref: "#/components/schemas/parsedDeviceInfo" + nativeMeta: + $ref: "#/components/schemas/nativeMeta" + + parsedDeviceInfo: + type: object + required: + - browserName + - browserVersion + - osName + - osVersion + properties: + browserName: + type: string + browserVersion: + type: string + osName: + type: string + osVersion: + type: string + + nativeMeta: + type: object + required: + - build + properties: + build: + type: string + deviceOwnerAuth: + type: string + isPlatformAuthenticatorAPISupported: + type: boolean + isBluetoothAvailable: + type: boolean + isBluetoothOn: + type: boolean + googlePlayServices: + type: boolean + deviceSecure: + type: boolean + + passkeyIntelFlags: + type: object + required: + - forcePasskeyAppend + properties: + forcePasskeyAppend: + type: boolean + askForAutoAppend: + type: boolean + + javaScriptHighEntropy: + type: object + required: + - platform + - platformVersion + - mobile + properties: + platform: + type: string + platformVersion: + type: string + mobile: + type: boolean + + passkeyChallengeUpdateReq: + type: object + required: + - status + properties: + status: + $ref: "#/components/schemas/passkeyChallengeStatus" + + passkeyChallengeList: + type: object + required: + - passkeyChallenges + - paging + properties: + passkeyChallenges: + type: array + items: + $ref: "#/components/schemas/passkeyChallenge" + paging: + $ref: "common.yml#/components/schemas/paging" + + passkeyChallenge: + type: object + required: + - challengeID + - type + - value + - status + - created + - createdMs + - expires + properties: + challengeID: + type: string + type: + $ref: "#/components/schemas/passkeyChallengeType" + value: + type: string + status: + $ref: "#/components/schemas/passkeyChallengeStatus" + created: + type: integer + format: int64 + createdMs: + type: integer + format: int64 + expires: + type: integer + format: int64 + + passkeyChallengeType: + type: string + enum: ["register", "authenticate"] + + passkeyChallengeStatus: + type: string + enum: ["pending", "completed", "consumed"] + + userStatus: + type: string + enum: ["pending", "active", "disabled"] + + challengeType: + type: string + enum: ["email_otp", "email_link", "sms_otp"] + + challengeStatus: + type: string + enum: ["pending", "completed", "expired"] + + identifierType: + type: string + enum: ["email", "phone", "username"] + + identifierStatus: + type: string + enum: ["pending", "primary", "verified"] + + crossDeviceAuthenticationStrategy: + type: string + enum: ["standard", "minimize", "maximize"] + + connectTokenStatus: + type: string + enum: ["initial", "consumed"] + + connectTokenType: + type: string + enum: + ["passkey-append", "passkey-delete", "passkey-list", "passkey-login"] + + authEventMethod: + type: string + enum: + [ + "password", + "email_otp", + "email_link", + "phone_otp", + "passkey", + "social_github", + "social_google", + "social_microsoft", + ] + + authEventType: + type: string + enum: ["sign_up", "login", "new_passkey_added"] + + authEventStatus: + type: string + enum: ["success", "failure"] + + webhookEventType: + type: string + enum: + [ + "passkey-login.completed", + "passkey.created", + "passkey.deleted", + "user.created", + "user.updated", + "user.deleted", + ] + + passkeyEventType: + type: string + enum: + - user-login-blacklisted + - login-explicit-abort + - login-error + - login-error-untyped + - login-one-tap-switch + - user-append-after-cross-platform-blacklisted + - user-append-after-login-error-blacklisted + - append-credential-exists + - append-explicit-abort + - append-error + - login-no-credentials + + connectToken: + type: object + required: + - id + - tokenType + - data + - connectTokenStatus + - expires + properties: + id: + type: string + description: Unique identifier of the connectToken. + example: "ctk-940364795071150919" + tokenType: + $ref: "#/components/schemas/connectTokenType" + data: + $ref: "#/components/schemas/connectTokenData" connectTokenStatus: + $ref: "#/components/schemas/connectTokenStatus" + secret: + type: string + description: Secret of the connectToken. + example: "ctk1_sxmexzS7RFBaJSA4V4kBFPs45bkxMK" + expires: + type: integer + description: Unix time of when the connectToken expires (in seconds elapsed since January 1, 1970, 00:00:00 UTC). + example: 1752749184 + + connectTokenDataPasskeyAppend: + type: object + description: Data for `passkey-append`. + required: + - displayName + - identifier + properties: + displayName: + type: string + description: Display name of the user. + example: "Jane Doe" + identifier: + type: string + description: Login identifier of the user (here email address). + example: "jane@doe.com" + + connectTokenDataPasskeyDelete: + type: object + description: Data for `passkey-delete`. + required: + - identifier + properties: + identifier: + type: string + description: Login identifier of the user (here email address). + example: "jane@doe.com" + + connectTokenDataPasskeyList: + type: object + description: Data for `passkey-list`. + required: + - identifier + properties: + identifier: + type: string + description: Login identifier of the user (here email address). + example: "jane@doe.com" + + connectTokenDataPasskeyLogin: + type: object + description: Data for `passkey-login`. + required: + - identifier + properties: + identifier: + type: string + description: Login identifier of the user (here email address). + example: "jane@doe.com" + + connectTokenData: + type: object + oneOf: + - $ref: "#/components/schemas/connectTokenDataPasskeyAppend" + - $ref: "#/components/schemas/connectTokenDataPasskeyDelete" + - $ref: "#/components/schemas/connectTokenDataPasskeyList" + - $ref: "#/components/schemas/connectTokenDataPasskeyLogin" + + connectTokenList: + type: object + required: + - connectTokens + - paging + properties: + connectTokens: + type: array + items: + $ref: "#/components/schemas/connectToken" + paging: + $ref: "common.yml#/components/schemas/paging" + + webhookEndpointList: + type: object + required: + - webhookEndpoints + properties: + webhookEndpoints: + type: array + items: + $ref: "#/components/schemas/webhookEndpoint" + + webhookEndpoint: + type: object + required: + - id + - url + - basicAuthUsername + - basicAuthPassword + - customHeaders + - subscribedEvents + - created + - createdMs + - updated + - updatedMs + properties: + id: + type: string + url: + type: string + basicAuthUsername: + type: string + basicAuthPassword: + type: string + customHeaders: + type: object + subscribedEvents: + type: array + items: + $ref: "#/components/schemas/webhookEventType" + created: + type: string + createdMs: + type: integer + format: int64 + updated: + type: string + updatedMs: + type: integer + format: int64 + + detectionInsights: + type: object + required: + - tags + - credentialIds + - clientEnvIds + - isCDACandidate + - passwordManagerIds + - historyData + properties: + tags: + type: array + items: + $ref: "#/components/schemas/detectionTag" + credentialIds: + type: array + items: type: string - enum: - - 'initial' - - 'consumed' - connectTokenType: - type: string - enum: - - 'passkey-append' - - 'passkey-delete' - - 'passkey-list' - - 'passkey-login' - authEventMethod: - type: string - enum: - - 'password' - - 'email_otp' - - 'email_link' - - 'phone_otp' - - 'passkey' - - 'social_github' - - 'social_google' - - 'social_microsoft' - authEventType: - type: string - enum: - - 'sign_up' - - 'login' - - 'new_passkey_added' - authEventStatus: + clientEnvIds: + type: array + items: type: string - enum: - - 'success' - - 'failure' - webhookEventType: + passwordManagerIds: + type: array + items: type: string - enum: - - 'passkey-login.completed' - - 'passkey.created' - - 'passkey.deleted' - - 'user.created' - - 'user.updated' - - 'user.deleted' - passkeyEventType: + historyData: + $ref: "#/components/schemas/appendHistoryData" + + appendHistoryData: + type: object + required: + - defaultCount + - afterErrorCount + - afterHybridCount + - autoCount + - defaultCooldown + - afterErrorCooldown + - afterHybridCooldown + - autoCooldown + properties: + defaultCount: + type: integer + afterErrorCount: + type: integer + afterHybridCount: + type: integer + autoCount: + type: integer + defaultCooldown: + type: boolean + afterErrorCooldown: + type: boolean + afterHybridCooldown: + type: boolean + autoCooldown: + type: boolean + + decisionInsights: + type: object + required: + - tag + - isCDACandidate + - experiments + properties: + tag: + $ref: "#/components/schemas/decisionTag" + isCDACandidate: + type: boolean + experiments: + type: array + items: type: string - enum: - - user-login-blacklisted - - login-explicit-abort - - login-error - - login-error-untyped - - login-one-tap-switch - - user-append-after-cross-platform-blacklisted - - user-append-after-login-error-blacklisted - - append-credential-exists - - append-explicit-abort - - append-error - connectToken: - type: object - required: - - id - - tokenType - - data - - connectTokenStatus - - expires - properties: - id: - type: string - tokenType: - $ref: '#/components/schemas/connectTokenType' - data: - $ref: '#/components/schemas/connectTokenData' - connectTokenStatus: - $ref: '#/components/schemas/connectTokenStatus' - secret: - type: string - expires: - type: integer - connectTokenDataPasskeyAppend: - type: object - required: - - displayName - - identifier - properties: - displayName: - type: string - identifier: - type: string - connectTokenDataPasskeyDelete: - type: object - required: - - identifier - properties: - identifier: - type: string - connectTokenDataPasskeyList: - type: object - required: - - identifier - properties: - identifier: - type: string - connectTokenDataPasskeyLogin: - type: object - required: - - identifier - properties: - identifier: - type: string - connectTokenData: - type: object - oneOf: - - $ref: '#/components/schemas/connectTokenDataPasskeyAppend' - - $ref: '#/components/schemas/connectTokenDataPasskeyDelete' - - $ref: '#/components/schemas/connectTokenDataPasskeyList' - - $ref: '#/components/schemas/connectTokenDataPasskeyLogin' - connectTokenList: - type: object - required: - - connectTokens - - paging - properties: - connectTokens: - type: array - items: - $ref: '#/components/schemas/connectToken' - paging: - type: object - required: - - page - - totalPages - - totalItems - properties: - page: - description: current page returned in response - type: integer - default: 1 - totalPages: - description: total number of pages available - type: integer - totalItems: - description: total number of items available - type: integer - webhookEndpointList: - type: object - required: - - webhookEndpoints - properties: - webhookEndpoints: - type: array - items: - $ref: '#/components/schemas/webhookEndpoint' - webhookEndpoint: - type: object - required: - - id - - url - - basicAuthUsername - - basicAuthPassword - - customHeaders - - subscribedEvents - - created - - createdMs - - updated - - updatedMs - properties: - id: - type: string - url: - type: string - basicAuthUsername: - type: string - basicAuthPassword: - type: string - customHeaders: - type: object - subscribedEvents: - type: array - items: - $ref: '#/components/schemas/webhookEventType' - created: - type: string - createdMs: - type: integer - format: int64 - updated: - type: string - updatedMs: - type: integer - format: int64 - detectionInsights: - type: object - required: - - tags - - credentialIds - - clientEnvIds - - isCDACandidate - - passwordManagerIds - - historyData - properties: - tags: - type: array - items: - $ref: '#/components/schemas/detectionTag' - credentialIds: - type: array - items: - type: string - clientEnvIds: - type: array - items: - type: string - passwordManagerIds: - type: array - items: - type: string - historyData: - $ref: '#/components/schemas/appendHistoryData' - appendHistoryData: - type: object - required: - - defaultCount - - afterErrorCount - - afterHybridCount - - autoCount - - defaultCooldown - - afterErrorCooldown - - afterHybridCooldown - - autoCooldown - properties: - defaultCount: - type: integer - afterErrorCount: - type: integer - afterHybridCount: - type: integer - autoCount: - type: integer - defaultCooldown: - type: boolean - afterErrorCooldown: - type: boolean - afterHybridCooldown: - type: boolean - autoCooldown: - type: boolean - decisionInsights: - type: object - required: - - tag - - isCDACandidate - - experiments - properties: - tag: - $ref: '#/components/schemas/decisionTag' - isCDACandidate: - type: boolean - experiments: - type: array - items: - type: string - decisionInsightsAppend: - type: object - required: - - tag - - isRestrictedBrowser - - variant - - auto - properties: - tag: - $ref: '#/components/schemas/decisionTag' - isRestrictedBrowser: - type: boolean - variant: - type: string - enum: - - 'default' - - 'after-error' - - 'after-hybrid' - - 'passkey-list' - auto: - type: boolean - passwordManagerList: - type: object - required: - - passwordManagers - properties: - passwordManagers: - type: array - items: - $ref: '#/components/schemas/passwordManager' - passwordManager: - type: object - required: - - id - - userID - - clientEnvID - - credentialID - - aaguid - - status - - score - - createdMs - properties: - id: - type: string - userID: - type: string - clientEnvID: - type: string - credentialID: - type: string - aaguid: - type: string - status: - type: string - score: - type: integer - createdMs: - type: integer - format: int64 - clientEnvList: - type: object - required: - - clientEnvs - properties: - clientEnvs: - type: array - items: - $ref: '#/components/schemas/clientEnv' - clientEnv: - type: object - required: - - id - - handle - - browserName - - browserVersion - - osName - - osVersion - - userAgent - - jsFingerprint - - createdMs - properties: - id: - type: string - handle: - type: string - browserName: - type: string - browserVersion: - type: string - osName: - type: string - osVersion: - type: string - userAgent: - type: string - jsFingerprint: - type: string - createdMs: - type: integer - format: int64 - deviceId: - type: string - responses: - error: - description: Error - content: - application/json: - schema: - allOf: - - type: object - required: - - httpStatusCode - - message - - requestData - - runtime - properties: - httpStatusCode: - description: HTTP status code of operation - type: integer - format: int32 - message: - type: string - example: 'OK' - requestData: - description: Data about the request itself, can be used for debugging - type: object - required: - - requestID - properties: - requestID: - description: Unique ID of request, you can provide your own while making the request, if not the ID will be randomly generated on server side - type: string - example: 'req-557...663' - link: - description: Link to dashboard with details about request - type: string - example: 'https://my.corbado.com/requests/req-xxxxxxxxxxxxxxxxxxx' - runtime: - description: Runtime in seconds for this request - type: number - format: float - example: 0.06167686 - - type: object - required: - - error - properties: - data: - type: object - error: - type: object - required: - - type - properties: - type: - description: Type of error - type: string - details: - description: Details of error - type: string - validation: - description: Validation errors per field - type: array - items: - type: object - required: - - field - - message - properties: - field: - type: string - message: - type: string - links: - description: Additional links to help understand the error - type: array - items: - type: string - '200': - description: Operation succeeded - content: - application/json: - schema: - type: object - required: - - httpStatusCode - - message - - requestData - - runtime - properties: - httpStatusCode: - description: HTTP status code of operation - type: integer - format: int32 - message: - type: string - example: 'OK' - requestData: - description: Data about the request itself, can be used for debugging - type: object - required: - - requestID - properties: - requestID: - description: Unique ID of request, you can provide your own while making the request, if not the ID will be randomly generated on server side - type: string - example: 'req-557...663' - link: - description: Link to dashboard with details about request - type: string - example: 'https://my.corbado.com/requests/req-xxxxxxxxxxxxxxxxxxx' - runtime: - description: Runtime in seconds for this request - type: number - format: float - example: 0.06167686 + preferImmediatelyAvailable: + type: boolean + + decisionInsightsAppend: + type: object + required: + - tag + - isRestrictedBrowser + - variant + - auto + properties: + tag: + $ref: "#/components/schemas/decisionTag" + isRestrictedBrowser: + type: boolean + variant: + type: string + enum: + [ + "default", + "after-error", + "after-hybrid", + "passkey-list", + "after-no-credential", + ] + auto: + type: boolean + + passwordManagerList: + type: object + required: + - passwordManagers + properties: + passwordManagers: + type: array + items: + $ref: "#/components/schemas/passwordManager" + + passwordManager: + type: object + required: + - id + - userID + - clientEnvID + - credentialID + - aaguid + - status + - score + - createdMs + properties: + id: + type: string + userID: + type: string + clientEnvID: + type: string + credentialID: + type: string + aaguid: + type: string + status: + type: string + score: + type: integer + createdMs: + type: integer + format: int64 + + clientEnvList: + type: object + required: + - clientEnvs + properties: + clientEnvs: + type: array + items: + $ref: "#/components/schemas/clientEnv" + + clientEnv: + type: object + required: + - id + - handle + - browserName + - browserVersion + - osName + - osVersion + - userAgent + - jsFingerprint + - createdMs + properties: + id: + type: string + handle: + type: string + browserName: + type: string + browserVersion: + type: string + osName: + type: string + osVersion: + type: string + userAgent: + type: string + jsFingerprint: + type: string + createdMs: + type: integer + format: int64 + deviceId: + type: string + + responses: + ################################################################### + # Responses: Error # + ################################################################### + error: + description: Error + content: + application/json: + schema: + $ref: "common.yml#/components/schemas/errorRsp" + "200": + description: Operation succeeded. + content: + application/json: + schema: + $ref: "common.yml#/components/schemas/genericRsp" + +################################################################### +# Security # +################################################################### security: - - basicAuth: [] + - basicAuth: [] diff --git a/scripts/common.yml b/scripts/common.yml new file mode 100644 index 0000000..7c37219 --- /dev/null +++ b/scripts/common.yml @@ -0,0 +1,483 @@ +openapi: 3.0.3 + +info: + version: 1.0.0 + title: Corbado generic API entities + description: Overview of all Corbado generic API entities. + contact: + name: Corbado API Team + email: support@corbado.com + url: https://www.corbado.com + +servers: + - url: https://api.corbado.com + +tags: + - name: Common + description: Common entities + +paths: + # This has to be there with all possible schemas references, so that the generator actually generates types for them + /unused/{sessionID}: + get: + description: unused + operationId: unused + tags: + - Common + security: + - projectID: [] + parameters: + - $ref: "#/components/parameters/remoteAddress" + - $ref: "#/components/parameters/userAgent" + - $ref: "#/components/parameters/sort" + - $ref: "#/components/parameters/filter" + - $ref: "#/components/parameters/page" + - $ref: "#/components/parameters/pageSize" + - $ref: "#/components/parameters/sessionID" + responses: + "200": + description: unused + content: + application/json: + schema: + $ref: "#/components/schemas/allTypes" + +components: + securitySchemes: + projectID: + in: header + name: X-Corbado-ProjectID + type: apiKey + + parameters: + remoteAddress: + name: remoteAddress + in: query + description: Client's remote address + required: false + schema: + type: string + + userAgent: + name: userAgent + in: query + description: | + The User-Agent header of the client’s browser or device. Useful for device fingerprinting or debugging. + Example: `Mozilla/5.0 (Windows NT 10.0; Win64; x64)` + required: false + schema: + type: string + example: Mozilla/5.0 (Windows NT 10.0; Win64; x64) + + sort: + name: sort + in: query + description: | + Field and direction to sort results. Use the format `fieldName:asc` or `fieldName:desc`. + required: false + schema: + type: string + example: createdAt:desc + + filter: + name: filter[] + in: query + description: | + Filter results by specific fields and conditions. Format: `::`. + Supported operators include: + - `eq`: equals (e\.g\. `email:eq:mail@example\.com` matches items where email equals mail@example\.com) + - `gt`: greater than (e\.g\. `created:gt:2021-01-01T00:00:00` matches items created after Jan 1, 2021) + - `lt`: less than (e\.g\. `created:lt:2021-01-01T00:00:00` matches items created before Jan 1, 2021) + required: false + style: form + explode: true + schema: + type: array + items: + type: string + examples: + filterEmail: + summary: Filter by email address + value: + - identifierType:eq:email + - identifierValue:eq:mail@example.com + filterTimepoint: + summary: Filter by date after July 20, 2021 + value: + - timePoint:gt:2021-07-20T00:00:00 + + page: + name: page + in: query + description: | + The page number to retrieve for paginated results. + required: false + schema: + type: integer + default: 1 + example: 1 + + pageSize: + name: pageSize + in: query + description: | + The number of items to return per page. Useful for pagination. + required: false + schema: + type: integer + default: 10 + example: 20 + + sessionID: + name: sessionID + in: path + description: ID of session + required: true + schema: + type: string + minLength: 30 + maxLength: 30 + + schemas: + paging: + type: object + required: + - page + - totalPages + - totalItems + properties: + page: + description: current page returned in response + type: integer + default: 1 + totalPages: + description: total number of pages available + type: integer + totalItems: + description: total number of items available + type: integer + + clientInfo: + type: object + required: + - remoteAddress + - userAgent + properties: + remoteAddress: + description: client's IP address + type: string + example: "::ffff:172.18.0.1" + userAgent: + description: client's User Agent + type: string + example: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36" + + status: + type: string + enum: ["active", "pending", "deleted"] + description: Generic status that can describe Corbado entities + + authMethods: + type: array + items: + $ref: "#/components/schemas/authMethod" + + authMethod: + type: string + enum: ["email", "phone_number", "webauthn", "password"] + description: Authentication methods + + highEntropyValues: + description: High entropy values from browser + type: object + required: + - platform + - platformVersion + - mobile + properties: + platform: + description: Platform + type: string + example: "macOS" + platformVersion: + description: Platform version + type: string + example: "14.1.2" + mobile: + description: Mobile + type: boolean + + ID: + description: generic ID + type: string + + userID: + description: ID of the user + type: string + + deviceID: + description: ID of the device + type: string + + emailID: + description: ID of the email + type: string + + phoneNumberID: + description: ID of the phone number + type: string + + projectID: + description: ID of project + type: string + + requestID: + description: Unique ID of request, you can provide your own while making the request, if not the ID will be randomly generated on server side + type: string + example: "req-557...663" + + emailLinkID: + description: ID of the email magic link + type: string + + emailCodeID: + description: ID of the email OTP + type: string + + additionalPayload: + description: Additional payload in JSON format + type: string + example: '{"projectAbbreviation":"CRBD"}' + + created: + description: Timestamp of when the entity was created in yyyy-MM-dd'T'HH:mm:ss format + type: string + + updated: + description: Timestamp of when the entity was last updated in yyyy-MM-dd'T'HH:mm:ss format + type: string + + deleted: + description: Timestamp of when the entity was deleted in yyyy-MM-dd'T'HH:mm:ss format + type: string + + loginIdentifierType: + description: Login Identifier type (deprecated) + type: string + enum: ["email", "phone_number", "custom"] + + identifierType: + description: Login Identifier type + type: string + enum: ["email", "phone", "username"] + + appType: + description: Application type + type: string + enum: ["empty", "web", "native"] + + sessionManagement: + description: What session management should be used + type: string + enum: ["SessionManagementCorbado", "SessionManagementOwn"] + + requestData: + description: Data about the request itself, can be used for debugging + type: object + required: + - requestID + properties: + requestID: + $ref: "#/components/schemas/requestID" + link: + description: Link to dashboard with details about request + type: string + example: "https://my.corbado.com/requests/req-xxxxxxxxxxxxxxxxxxx" + + loginIdentifierConfig: + type: object + required: + - type + - enforceVerification + - useAsLoginIdentifier + properties: + type: + $ref: "#/components/schemas/identifierType" + enforceVerification: + type: string + enum: [none, signup, at_first_login] + useAsLoginIdentifier: + type: boolean + metadata: + type: object + + socialProviderType: + type: string + description: Type of the social provider. + enum: ["google", "microsoft", "github"] + + session: + type: object + required: + - sessionID + - userID + - identifierValue + - createdMs + - lastActionMs + - expiresMs + - status + properties: + sessionID: + type: string + description: Unique identifier of the session. + example: "V4Gy2mCXekKuvKwbG81ysvegY9dB01" + userID: + type: string + description: Unique identifier of the user. + example: "usr-4693224802260150919" + identifierValue: + type: string + description: Login identifier of the user (here email address). + example: "jane@doe.com" + createdMs: + type: integer + format: int64 + description: Unix time of when the session was created (in milliseconds elapsed since January 1, 1970, 00:00:00 UTC). + example: 1752738240000 + lastActionMs: + type: integer + format: int64 + description: Unix time of when last action (e.g., refresh) on session occurred (in milliseconds elapsed since January 1, 1970, 00:00:00 UTC). + example: 1752738240000 + expiresMs: + type: integer + format: int64 + description: Unix time of when the session expires (in milliseconds elapsed since January 1, 1970, 00:00:00 UTC). + example: 1755330240000 + status: + $ref: "#/components/schemas/sessionStatus" + + sessionStatus: + type: string + enum: ["active", "logged_out", "expired", "inactivity_reached", "revoked"] + + # this is necessary so that code generator doesn't ignore "unused" types + allTypes: + type: object + properties: + p1: + $ref: "#/components/schemas/paging" + p2: + $ref: "#/components/schemas/clientInfo" + p3: + $ref: "#/components/schemas/ID" + p4: + $ref: "#/components/schemas/userID" + p5: + $ref: "#/components/schemas/emailID" + p6: + $ref: "#/components/schemas/emailLinkID" + p7: + $ref: "#/components/schemas/phoneNumberID" + p8: + $ref: "#/components/schemas/created" + p9: + $ref: "#/components/schemas/updated" + p10: + $ref: "#/components/schemas/deleted" + p11: + $ref: "#/components/schemas/deviceID" + p12: + $ref: "#/components/schemas/additionalPayload" + p13: + $ref: "#/components/schemas/status" + p14: + $ref: "#/components/schemas/projectID" + p15: + $ref: "#/components/schemas/requestID" + p16: + $ref: "#/components/schemas/errorRsp" + p17: + $ref: "#/components/schemas/authMethods" + p19: + $ref: "#/components/schemas/loginIdentifierType" + p20: + $ref: "#/components/schemas/emailCodeID" + p21: + $ref: "#/components/schemas/appType" + p22: + $ref: "#/components/schemas/sessionManagement" + p23: + $ref: "#/components/schemas/highEntropyValues" + p24: + $ref: "#/components/schemas/loginIdentifierConfig" + p25: + $ref: "#/components/schemas/socialProviderType" + p26: + $ref: "#/components/schemas/identifierType" + p27: + $ref: "#/components/schemas/session" + p28: + $ref: "#/components/schemas/sessionStatus" + + genericRsp: + type: object + required: + - httpStatusCode + - message + - requestData + - runtime + properties: + httpStatusCode: + description: HTTP status code of operation + type: integer + format: int32 + message: + type: string + example: "OK" + requestData: + $ref: "#/components/schemas/requestData" + runtime: + description: Runtime in seconds for this request + type: number + format: float + example: 0.06167686 + + errorRsp: + allOf: + - $ref: "#/components/schemas/genericRsp" + - type: object + required: + - error + properties: + data: + type: object + error: + type: object + required: + - type + properties: + type: + description: Type of error + type: string + details: + description: Details of error + type: string + validation: + description: Validation errors per field + type: array + items: + type: object + required: + - field + - message + properties: + field: + type: string + message: + type: string + links: + description: Additional links to help understand the error + type: array + items: + type: string diff --git a/scripts/generate-openapi.sh b/scripts/generate-openapi.sh index 84fbdaa..8f49586 100755 --- a/scripts/generate-openapi.sh +++ b/scripts/generate-openapi.sh @@ -5,15 +5,15 @@ GENERATED_PROJECT_NAME="corbado-python-generated" echo "Generating OpenAPI code ..." cd "$(dirname "$0")" -cp backend_api_public_v2.yml .gen/backend_api_public_v2.yml + #rm -rf .gen mkdir -p .gen +cp backend_api_public_v2.yml .gen/backend_api_public_v2.yml +cp common.yml .gen/common.yml cd .gen rm -rf ../../src/$SDK_PACKAGE_NAME/$GENERATED_PACKAGE_NAME mkdir -p ../../src/$SDK_PACKAGE_NAME/$GENERATED_PACKAGE_NAME - -curl -s https://backendapi.cloud.corbado.io/v2/openapi.yaml -o backend_api_public_v2.yml docker run -v ${PWD}:/local --user $(id -u):$(id -g) openapitools/openapi-generator-cli generate -i /local/backend_api_public_v2.yml -g python -o /local --additional-properties=packageName=$SDK_PACKAGE_NAME.$GENERATED_PACKAGE_NAME,projectName=$GENERATED_PROJECT_NAME cp -r $SDK_PACKAGE_NAME/$GENERATED_PACKAGE_NAME/* ../../src/$SDK_PACKAGE_NAME/$GENERATED_PACKAGE_NAME diff --git a/src/corbado_python_sdk/generated/__init__.py b/src/corbado_python_sdk/generated/__init__.py index 93fdd7a..3305a35 100644 --- a/src/corbado_python_sdk/generated/__init__.py +++ b/src/corbado_python_sdk/generated/__init__.py @@ -75,6 +75,10 @@ "DecisionTag", "DetectionInsights", "DetectionTag", + "ErrorRsp", + "ErrorRspAllOfError", + "ErrorRspAllOfErrorValidation", + "GenericRsp", "Identifier", "IdentifierCreateReq", "IdentifierList", @@ -83,6 +87,7 @@ "IdentifierUpdateReq", "JavaScriptHighEntropy", "NativeMeta", + "Paging", "ParsedDeviceInfo", "PasskeyAppendFinishReq", "PasskeyAppendFinishRsp", @@ -117,21 +122,18 @@ "PasswordManager", "PasswordManagerList", "ProjectConfigUpdateCnameReq", + "RequestData", + "Session", "SessionList", - "SessionListSessionsInner", + "SessionStatus", "SocialAccount", "SocialAccountCreateReq", "SocialAccountList", + "SocialProviderType", "User", "UserAggregate", "UserCreateReq", - "UserDelete200Response", "UserList", - "UserListDefaultResponse", - "UserListDefaultResponseAllOfError", - "UserListDefaultResponseAllOfErrorValidationInner", - "UserListDefaultResponseAllOfRequestData", - "UserListPaging", "UserStatus", "UserUpdateReq", "WebhookEndpoint", @@ -202,6 +204,10 @@ from corbado_python_sdk.generated.models.decision_tag import DecisionTag as DecisionTag from corbado_python_sdk.generated.models.detection_insights import DetectionInsights as DetectionInsights from corbado_python_sdk.generated.models.detection_tag import DetectionTag as DetectionTag +from corbado_python_sdk.generated.models.error_rsp import ErrorRsp as ErrorRsp +from corbado_python_sdk.generated.models.error_rsp_all_of_error import ErrorRspAllOfError as ErrorRspAllOfError +from corbado_python_sdk.generated.models.error_rsp_all_of_error_validation import ErrorRspAllOfErrorValidation as ErrorRspAllOfErrorValidation +from corbado_python_sdk.generated.models.generic_rsp import GenericRsp as GenericRsp from corbado_python_sdk.generated.models.identifier import Identifier as Identifier from corbado_python_sdk.generated.models.identifier_create_req import IdentifierCreateReq as IdentifierCreateReq from corbado_python_sdk.generated.models.identifier_list import IdentifierList as IdentifierList @@ -210,6 +216,7 @@ from corbado_python_sdk.generated.models.identifier_update_req import IdentifierUpdateReq as IdentifierUpdateReq from corbado_python_sdk.generated.models.java_script_high_entropy import JavaScriptHighEntropy as JavaScriptHighEntropy from corbado_python_sdk.generated.models.native_meta import NativeMeta as NativeMeta +from corbado_python_sdk.generated.models.paging import Paging as Paging from corbado_python_sdk.generated.models.parsed_device_info import ParsedDeviceInfo as ParsedDeviceInfo from corbado_python_sdk.generated.models.passkey_append_finish_req import PasskeyAppendFinishReq as PasskeyAppendFinishReq from corbado_python_sdk.generated.models.passkey_append_finish_rsp import PasskeyAppendFinishRsp as PasskeyAppendFinishRsp @@ -244,21 +251,18 @@ from corbado_python_sdk.generated.models.password_manager import PasswordManager as PasswordManager from corbado_python_sdk.generated.models.password_manager_list import PasswordManagerList as PasswordManagerList from corbado_python_sdk.generated.models.project_config_update_cname_req import ProjectConfigUpdateCnameReq as ProjectConfigUpdateCnameReq +from corbado_python_sdk.generated.models.request_data import RequestData as RequestData +from corbado_python_sdk.generated.models.session import Session as Session from corbado_python_sdk.generated.models.session_list import SessionList as SessionList -from corbado_python_sdk.generated.models.session_list_sessions_inner import SessionListSessionsInner as SessionListSessionsInner +from corbado_python_sdk.generated.models.session_status import SessionStatus as SessionStatus from corbado_python_sdk.generated.models.social_account import SocialAccount as SocialAccount from corbado_python_sdk.generated.models.social_account_create_req import SocialAccountCreateReq as SocialAccountCreateReq from corbado_python_sdk.generated.models.social_account_list import SocialAccountList as SocialAccountList +from corbado_python_sdk.generated.models.social_provider_type import SocialProviderType as SocialProviderType from corbado_python_sdk.generated.models.user import User as User from corbado_python_sdk.generated.models.user_aggregate import UserAggregate as UserAggregate from corbado_python_sdk.generated.models.user_create_req import UserCreateReq as UserCreateReq -from corbado_python_sdk.generated.models.user_delete200_response import UserDelete200Response as UserDelete200Response from corbado_python_sdk.generated.models.user_list import UserList as UserList -from corbado_python_sdk.generated.models.user_list_default_response import UserListDefaultResponse as UserListDefaultResponse -from corbado_python_sdk.generated.models.user_list_default_response_all_of_error import UserListDefaultResponseAllOfError as UserListDefaultResponseAllOfError -from corbado_python_sdk.generated.models.user_list_default_response_all_of_error_validation_inner import UserListDefaultResponseAllOfErrorValidationInner as UserListDefaultResponseAllOfErrorValidationInner -from corbado_python_sdk.generated.models.user_list_default_response_all_of_request_data import UserListDefaultResponseAllOfRequestData as UserListDefaultResponseAllOfRequestData -from corbado_python_sdk.generated.models.user_list_paging import UserListPaging as UserListPaging from corbado_python_sdk.generated.models.user_status import UserStatus as UserStatus from corbado_python_sdk.generated.models.user_update_req import UserUpdateReq as UserUpdateReq from corbado_python_sdk.generated.models.webhook_endpoint import WebhookEndpoint as WebhookEndpoint diff --git a/src/corbado_python_sdk/generated/api/connect_tokens_api.py b/src/corbado_python_sdk/generated/api/connect_tokens_api.py index 89f372b..045f25e 100644 --- a/src/corbado_python_sdk/generated/api/connect_tokens_api.py +++ b/src/corbado_python_sdk/generated/api/connect_tokens_api.py @@ -24,7 +24,7 @@ from corbado_python_sdk.generated.models.connect_token_create_req import ConnectTokenCreateReq from corbado_python_sdk.generated.models.connect_token_list import ConnectTokenList from corbado_python_sdk.generated.models.connect_token_update_req import ConnectTokenUpdateReq -from corbado_python_sdk.generated.models.user_delete200_response import UserDelete200Response +from corbado_python_sdk.generated.models.generic_rsp import GenericRsp from corbado_python_sdk.generated.api_client import ApiClient, RequestSerialized from corbado_python_sdk.generated.api_response import ApiResponse @@ -334,7 +334,7 @@ def connect_token_delete( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> UserDelete200Response: + ) -> GenericRsp: """Delete a ConnectToken Deletes an existing ConnectToken. @@ -372,7 +372,7 @@ def connect_token_delete( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserDelete200Response", + '200': "GenericRsp", } response_data = self.api_client.call_api( *_param, @@ -401,7 +401,7 @@ def connect_token_delete_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[UserDelete200Response]: + ) -> ApiResponse[GenericRsp]: """Delete a ConnectToken Deletes an existing ConnectToken. @@ -439,7 +439,7 @@ def connect_token_delete_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserDelete200Response", + '200': "GenericRsp", } response_data = self.api_client.call_api( *_param, @@ -506,7 +506,7 @@ def connect_token_delete_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserDelete200Response", + '200': "GenericRsp", } response_data = self.api_client.call_api( *_param, @@ -911,7 +911,7 @@ def connect_token_update( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> UserDelete200Response: + ) -> GenericRsp: """Update a ConnectToken Updates an existing ConnectToken. @@ -952,7 +952,7 @@ def connect_token_update( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserDelete200Response", + '200': "GenericRsp", } response_data = self.api_client.call_api( *_param, @@ -982,7 +982,7 @@ def connect_token_update_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[UserDelete200Response]: + ) -> ApiResponse[GenericRsp]: """Update a ConnectToken Updates an existing ConnectToken. @@ -1023,7 +1023,7 @@ def connect_token_update_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserDelete200Response", + '200': "GenericRsp", } response_data = self.api_client.call_api( *_param, @@ -1094,7 +1094,7 @@ def connect_token_update_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserDelete200Response", + '200': "GenericRsp", } response_data = self.api_client.call_api( *_param, diff --git a/src/corbado_python_sdk/generated/api/identifiers_api.py b/src/corbado_python_sdk/generated/api/identifiers_api.py index ccdb644..df9513b 100644 --- a/src/corbado_python_sdk/generated/api/identifiers_api.py +++ b/src/corbado_python_sdk/generated/api/identifiers_api.py @@ -20,11 +20,11 @@ from pydantic import Field, StrictInt, StrictStr from typing import List, Optional from typing_extensions import Annotated +from corbado_python_sdk.generated.models.generic_rsp import GenericRsp from corbado_python_sdk.generated.models.identifier import Identifier from corbado_python_sdk.generated.models.identifier_create_req import IdentifierCreateReq from corbado_python_sdk.generated.models.identifier_list import IdentifierList from corbado_python_sdk.generated.models.identifier_update_req import IdentifierUpdateReq -from corbado_python_sdk.generated.models.user_delete200_response import UserDelete200Response from corbado_python_sdk.generated.api_client import ApiClient, RequestSerialized from corbado_python_sdk.generated.api_response import ApiResponse @@ -350,7 +350,7 @@ def identifier_delete( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> UserDelete200Response: + ) -> GenericRsp: """Delete a login identifier for a user Delete an existing login identifier for a user by given `userID` and `identifierID`. @@ -391,7 +391,7 @@ def identifier_delete( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserDelete200Response", + '200': "GenericRsp", } response_data = self.api_client.call_api( *_param, @@ -421,7 +421,7 @@ def identifier_delete_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[UserDelete200Response]: + ) -> ApiResponse[GenericRsp]: """Delete a login identifier for a user Delete an existing login identifier for a user by given `userID` and `identifierID`. @@ -462,7 +462,7 @@ def identifier_delete_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserDelete200Response", + '200': "GenericRsp", } response_data = self.api_client.call_api( *_param, @@ -533,7 +533,7 @@ def identifier_delete_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserDelete200Response", + '200': "GenericRsp", } response_data = self.api_client.call_api( *_param, diff --git a/src/corbado_python_sdk/generated/api/passkey_events_api.py b/src/corbado_python_sdk/generated/api/passkey_events_api.py index f76e4bf..886df7b 100644 --- a/src/corbado_python_sdk/generated/api/passkey_events_api.py +++ b/src/corbado_python_sdk/generated/api/passkey_events_api.py @@ -20,10 +20,10 @@ from pydantic import Field, StrictInt, StrictStr from typing import List, Optional from typing_extensions import Annotated +from corbado_python_sdk.generated.models.generic_rsp import GenericRsp from corbado_python_sdk.generated.models.passkey_event import PasskeyEvent from corbado_python_sdk.generated.models.passkey_event_create_req import PasskeyEventCreateReq from corbado_python_sdk.generated.models.passkey_event_list import PasskeyEventList -from corbado_python_sdk.generated.models.user_delete200_response import UserDelete200Response from corbado_python_sdk.generated.api_client import ApiClient, RequestSerialized from corbado_python_sdk.generated.api_response import ApiResponse @@ -349,7 +349,7 @@ def passkey_event_delete( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> UserDelete200Response: + ) -> GenericRsp: """Delete a passkey event for a user Deletes an existing passkey event for a user by given `userID` and `passkeyEventID`. @@ -390,7 +390,7 @@ def passkey_event_delete( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserDelete200Response", + '200': "GenericRsp", } response_data = self.api_client.call_api( *_param, @@ -420,7 +420,7 @@ def passkey_event_delete_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[UserDelete200Response]: + ) -> ApiResponse[GenericRsp]: """Delete a passkey event for a user Deletes an existing passkey event for a user by given `userID` and `passkeyEventID`. @@ -461,7 +461,7 @@ def passkey_event_delete_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserDelete200Response", + '200': "GenericRsp", } response_data = self.api_client.call_api( *_param, @@ -532,7 +532,7 @@ def passkey_event_delete_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserDelete200Response", + '200': "GenericRsp", } response_data = self.api_client.call_api( *_param, diff --git a/src/corbado_python_sdk/generated/api/project_config_api.py b/src/corbado_python_sdk/generated/api/project_config_api.py index 368da31..5f9ff70 100644 --- a/src/corbado_python_sdk/generated/api/project_config_api.py +++ b/src/corbado_python_sdk/generated/api/project_config_api.py @@ -17,8 +17,8 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated +from corbado_python_sdk.generated.models.generic_rsp import GenericRsp from corbado_python_sdk.generated.models.project_config_update_cname_req import ProjectConfigUpdateCnameReq -from corbado_python_sdk.generated.models.user_delete200_response import UserDelete200Response from corbado_python_sdk.generated.api_client import ApiClient, RequestSerialized from corbado_python_sdk.generated.api_response import ApiResponse @@ -54,7 +54,7 @@ def project_config_update_cname( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> UserDelete200Response: + ) -> GenericRsp: """Update project CNAME and generate SSL certificate Update project config CNAME and generates new SSL certificate @@ -92,7 +92,7 @@ def project_config_update_cname( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserDelete200Response", + '200': "GenericRsp", } response_data = self.api_client.call_api( *_param, @@ -121,7 +121,7 @@ def project_config_update_cname_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[UserDelete200Response]: + ) -> ApiResponse[GenericRsp]: """Update project CNAME and generate SSL certificate Update project config CNAME and generates new SSL certificate @@ -159,7 +159,7 @@ def project_config_update_cname_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserDelete200Response", + '200': "GenericRsp", } response_data = self.api_client.call_api( *_param, @@ -226,7 +226,7 @@ def project_config_update_cname_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserDelete200Response", + '200': "GenericRsp", } response_data = self.api_client.call_api( *_param, diff --git a/src/corbado_python_sdk/generated/api/sessions_api.py b/src/corbado_python_sdk/generated/api/sessions_api.py index 0a2b96e..b052dce 100644 --- a/src/corbado_python_sdk/generated/api/sessions_api.py +++ b/src/corbado_python_sdk/generated/api/sessions_api.py @@ -20,8 +20,8 @@ from pydantic import Field, StrictInt, StrictStr from typing import List, Optional from typing_extensions import Annotated +from corbado_python_sdk.generated.models.generic_rsp import GenericRsp from corbado_python_sdk.generated.models.session_list import SessionList -from corbado_python_sdk.generated.models.user_delete200_response import UserDelete200Response from corbado_python_sdk.generated.api_client import ApiClient, RequestSerialized from corbado_python_sdk.generated.api_response import ApiResponse @@ -372,7 +372,7 @@ def session_revoke( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> UserDelete200Response: + ) -> GenericRsp: """Revoke a session Revokes an existing session by given `sessionID`. @@ -410,7 +410,7 @@ def session_revoke( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserDelete200Response", + '200': "GenericRsp", } response_data = self.api_client.call_api( *_param, @@ -439,7 +439,7 @@ def session_revoke_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[UserDelete200Response]: + ) -> ApiResponse[GenericRsp]: """Revoke a session Revokes an existing session by given `sessionID`. @@ -477,7 +477,7 @@ def session_revoke_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserDelete200Response", + '200': "GenericRsp", } response_data = self.api_client.call_api( *_param, @@ -544,7 +544,7 @@ def session_revoke_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserDelete200Response", + '200': "GenericRsp", } response_data = self.api_client.call_api( *_param, diff --git a/src/corbado_python_sdk/generated/api/users_api.py b/src/corbado_python_sdk/generated/api/users_api.py index c7efd6b..5b3b876 100644 --- a/src/corbado_python_sdk/generated/api/users_api.py +++ b/src/corbado_python_sdk/generated/api/users_api.py @@ -21,12 +21,12 @@ from typing import List, Optional from typing_extensions import Annotated from corbado_python_sdk.generated.models.credential_list import CredentialList +from corbado_python_sdk.generated.models.generic_rsp import GenericRsp from corbado_python_sdk.generated.models.social_account import SocialAccount from corbado_python_sdk.generated.models.social_account_create_req import SocialAccountCreateReq from corbado_python_sdk.generated.models.social_account_list import SocialAccountList from corbado_python_sdk.generated.models.user import User from corbado_python_sdk.generated.models.user_create_req import UserCreateReq -from corbado_python_sdk.generated.models.user_delete200_response import UserDelete200Response from corbado_python_sdk.generated.models.user_list import UserList from corbado_python_sdk.generated.models.user_update_req import UserUpdateReq @@ -65,7 +65,7 @@ def credential_delete( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> UserDelete200Response: + ) -> GenericRsp: """Delete a passkey for a user Deletes an existing passkey for a user by given `userID` and `credentialID`. @@ -106,7 +106,7 @@ def credential_delete( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserDelete200Response", + '200': "GenericRsp", } response_data = self.api_client.call_api( *_param, @@ -136,7 +136,7 @@ def credential_delete_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[UserDelete200Response]: + ) -> ApiResponse[GenericRsp]: """Delete a passkey for a user Deletes an existing passkey for a user by given `userID` and `credentialID`. @@ -177,7 +177,7 @@ def credential_delete_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserDelete200Response", + '200': "GenericRsp", } response_data = self.api_client.call_api( *_param, @@ -248,7 +248,7 @@ def credential_delete_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserDelete200Response", + '200': "GenericRsp", } response_data = self.api_client.call_api( *_param, @@ -1548,7 +1548,7 @@ def user_delete( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> UserDelete200Response: + ) -> GenericRsp: """Delete a user Deletes a user by given `userID`. You can also manage users in the [Developer Panel](https://app.corbado.com/users). @@ -1586,7 +1586,7 @@ def user_delete( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserDelete200Response", + '200': "GenericRsp", } response_data = self.api_client.call_api( *_param, @@ -1615,7 +1615,7 @@ def user_delete_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[UserDelete200Response]: + ) -> ApiResponse[GenericRsp]: """Delete a user Deletes a user by given `userID`. You can also manage users in the [Developer Panel](https://app.corbado.com/users). @@ -1653,7 +1653,7 @@ def user_delete_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserDelete200Response", + '200': "GenericRsp", } response_data = self.api_client.call_api( *_param, @@ -1720,7 +1720,7 @@ def user_delete_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserDelete200Response", + '200': "GenericRsp", } response_data = self.api_client.call_api( *_param, diff --git a/src/corbado_python_sdk/generated/api/webhook_endpoints_api.py b/src/corbado_python_sdk/generated/api/webhook_endpoints_api.py index c474824..13b5a29 100644 --- a/src/corbado_python_sdk/generated/api/webhook_endpoints_api.py +++ b/src/corbado_python_sdk/generated/api/webhook_endpoints_api.py @@ -19,7 +19,7 @@ from pydantic import Field, StrictStr from typing_extensions import Annotated -from corbado_python_sdk.generated.models.user_delete200_response import UserDelete200Response +from corbado_python_sdk.generated.models.generic_rsp import GenericRsp from corbado_python_sdk.generated.models.webhook_endpoint import WebhookEndpoint from corbado_python_sdk.generated.models.webhook_endpoint_create_req import WebhookEndpointCreateReq from corbado_python_sdk.generated.models.webhook_endpoint_list import WebhookEndpointList @@ -333,7 +333,7 @@ def webhook_endpoint_delete( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> UserDelete200Response: + ) -> GenericRsp: """webhook_endpoint_delete Deletes an existing webhook endpoint @@ -371,7 +371,7 @@ def webhook_endpoint_delete( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserDelete200Response", + '200': "GenericRsp", } response_data = self.api_client.call_api( *_param, @@ -400,7 +400,7 @@ def webhook_endpoint_delete_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[UserDelete200Response]: + ) -> ApiResponse[GenericRsp]: """webhook_endpoint_delete Deletes an existing webhook endpoint @@ -438,7 +438,7 @@ def webhook_endpoint_delete_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserDelete200Response", + '200': "GenericRsp", } response_data = self.api_client.call_api( *_param, @@ -505,7 +505,7 @@ def webhook_endpoint_delete_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserDelete200Response", + '200': "GenericRsp", } response_data = self.api_client.call_api( *_param, diff --git a/src/corbado_python_sdk/generated/models/__init__.py b/src/corbado_python_sdk/generated/models/__init__.py index 6628f43..06639ea 100644 --- a/src/corbado_python_sdk/generated/models/__init__.py +++ b/src/corbado_python_sdk/generated/models/__init__.py @@ -48,6 +48,10 @@ from corbado_python_sdk.generated.models.decision_tag import DecisionTag from corbado_python_sdk.generated.models.detection_insights import DetectionInsights from corbado_python_sdk.generated.models.detection_tag import DetectionTag +from corbado_python_sdk.generated.models.error_rsp import ErrorRsp +from corbado_python_sdk.generated.models.error_rsp_all_of_error import ErrorRspAllOfError +from corbado_python_sdk.generated.models.error_rsp_all_of_error_validation import ErrorRspAllOfErrorValidation +from corbado_python_sdk.generated.models.generic_rsp import GenericRsp from corbado_python_sdk.generated.models.identifier import Identifier from corbado_python_sdk.generated.models.identifier_create_req import IdentifierCreateReq from corbado_python_sdk.generated.models.identifier_list import IdentifierList @@ -56,6 +60,7 @@ from corbado_python_sdk.generated.models.identifier_update_req import IdentifierUpdateReq from corbado_python_sdk.generated.models.java_script_high_entropy import JavaScriptHighEntropy from corbado_python_sdk.generated.models.native_meta import NativeMeta +from corbado_python_sdk.generated.models.paging import Paging from corbado_python_sdk.generated.models.parsed_device_info import ParsedDeviceInfo from corbado_python_sdk.generated.models.passkey_append_finish_req import PasskeyAppendFinishReq from corbado_python_sdk.generated.models.passkey_append_finish_rsp import PasskeyAppendFinishRsp @@ -90,21 +95,18 @@ from corbado_python_sdk.generated.models.password_manager import PasswordManager from corbado_python_sdk.generated.models.password_manager_list import PasswordManagerList from corbado_python_sdk.generated.models.project_config_update_cname_req import ProjectConfigUpdateCnameReq +from corbado_python_sdk.generated.models.request_data import RequestData +from corbado_python_sdk.generated.models.session import Session from corbado_python_sdk.generated.models.session_list import SessionList -from corbado_python_sdk.generated.models.session_list_sessions_inner import SessionListSessionsInner +from corbado_python_sdk.generated.models.session_status import SessionStatus from corbado_python_sdk.generated.models.social_account import SocialAccount from corbado_python_sdk.generated.models.social_account_create_req import SocialAccountCreateReq from corbado_python_sdk.generated.models.social_account_list import SocialAccountList +from corbado_python_sdk.generated.models.social_provider_type import SocialProviderType from corbado_python_sdk.generated.models.user import User from corbado_python_sdk.generated.models.user_aggregate import UserAggregate from corbado_python_sdk.generated.models.user_create_req import UserCreateReq -from corbado_python_sdk.generated.models.user_delete200_response import UserDelete200Response from corbado_python_sdk.generated.models.user_list import UserList -from corbado_python_sdk.generated.models.user_list_default_response import UserListDefaultResponse -from corbado_python_sdk.generated.models.user_list_default_response_all_of_error import UserListDefaultResponseAllOfError -from corbado_python_sdk.generated.models.user_list_default_response_all_of_error_validation_inner import UserListDefaultResponseAllOfErrorValidationInner -from corbado_python_sdk.generated.models.user_list_default_response_all_of_request_data import UserListDefaultResponseAllOfRequestData -from corbado_python_sdk.generated.models.user_list_paging import UserListPaging from corbado_python_sdk.generated.models.user_status import UserStatus from corbado_python_sdk.generated.models.user_update_req import UserUpdateReq from corbado_python_sdk.generated.models.webhook_endpoint import WebhookEndpoint diff --git a/src/corbado_python_sdk/generated/models/connect_token_list.py b/src/corbado_python_sdk/generated/models/connect_token_list.py index c754271..7f6549f 100644 --- a/src/corbado_python_sdk/generated/models/connect_token_list.py +++ b/src/corbado_python_sdk/generated/models/connect_token_list.py @@ -21,7 +21,7 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List from corbado_python_sdk.generated.models.connect_token import ConnectToken -from corbado_python_sdk.generated.models.user_list_paging import UserListPaging +from corbado_python_sdk.generated.models.paging import Paging from typing import Optional, Set from typing_extensions import Self @@ -30,7 +30,7 @@ class ConnectTokenList(BaseModel): ConnectTokenList """ # noqa: E501 connect_tokens: List[ConnectToken] = Field(alias="connectTokens") - paging: UserListPaging + paging: Paging __properties: ClassVar[List[str]] = ["connectTokens", "paging"] model_config = ConfigDict( @@ -95,7 +95,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "connectTokens": [ConnectToken.from_dict(_item) for _item in obj["connectTokens"]] if obj.get("connectTokens") is not None else None, - "paging": UserListPaging.from_dict(obj["paging"]) if obj.get("paging") is not None else None + "paging": Paging.from_dict(obj["paging"]) if obj.get("paging") is not None else None }) return _obj diff --git a/src/corbado_python_sdk/generated/models/credential_list.py b/src/corbado_python_sdk/generated/models/credential_list.py index a8c53c4..c2843ff 100644 --- a/src/corbado_python_sdk/generated/models/credential_list.py +++ b/src/corbado_python_sdk/generated/models/credential_list.py @@ -21,7 +21,7 @@ from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List from corbado_python_sdk.generated.models.credential import Credential -from corbado_python_sdk.generated.models.user_list_paging import UserListPaging +from corbado_python_sdk.generated.models.paging import Paging from typing import Optional, Set from typing_extensions import Self @@ -30,7 +30,7 @@ class CredentialList(BaseModel): CredentialList """ # noqa: E501 credentials: List[Credential] - paging: UserListPaging + paging: Paging __properties: ClassVar[List[str]] = ["credentials", "paging"] model_config = ConfigDict( @@ -95,7 +95,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "credentials": [Credential.from_dict(_item) for _item in obj["credentials"]] if obj.get("credentials") is not None else None, - "paging": UserListPaging.from_dict(obj["paging"]) if obj.get("paging") is not None else None + "paging": Paging.from_dict(obj["paging"]) if obj.get("paging") is not None else None }) return _obj diff --git a/src/corbado_python_sdk/generated/models/user_list_default_response.py b/src/corbado_python_sdk/generated/models/error_rsp.py similarity index 78% rename from src/corbado_python_sdk/generated/models/user_list_default_response.py rename to src/corbado_python_sdk/generated/models/error_rsp.py index 1812606..d8022ad 100644 --- a/src/corbado_python_sdk/generated/models/user_list_default_response.py +++ b/src/corbado_python_sdk/generated/models/error_rsp.py @@ -20,21 +20,21 @@ from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional, Union -from corbado_python_sdk.generated.models.user_list_default_response_all_of_error import UserListDefaultResponseAllOfError -from corbado_python_sdk.generated.models.user_list_default_response_all_of_request_data import UserListDefaultResponseAllOfRequestData +from corbado_python_sdk.generated.models.error_rsp_all_of_error import ErrorRspAllOfError +from corbado_python_sdk.generated.models.request_data import RequestData from typing import Optional, Set from typing_extensions import Self -class UserListDefaultResponse(BaseModel): +class ErrorRsp(BaseModel): """ - UserListDefaultResponse + ErrorRsp """ # noqa: E501 http_status_code: StrictInt = Field(description="HTTP status code of operation", alias="httpStatusCode") message: StrictStr - request_data: UserListDefaultResponseAllOfRequestData = Field(alias="requestData") + request_data: RequestData = Field(alias="requestData") runtime: Union[StrictFloat, StrictInt] = Field(description="Runtime in seconds for this request") data: Optional[Dict[str, Any]] = None - error: UserListDefaultResponseAllOfError + error: ErrorRspAllOfError __properties: ClassVar[List[str]] = ["httpStatusCode", "message", "requestData", "runtime", "data", "error"] model_config = ConfigDict( @@ -55,7 +55,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of UserListDefaultResponse from a JSON string""" + """Create an instance of ErrorRsp from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -86,7 +86,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of UserListDefaultResponse from a dict""" + """Create an instance of ErrorRsp from a dict""" if obj is None: return None @@ -96,10 +96,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "httpStatusCode": obj.get("httpStatusCode"), "message": obj.get("message"), - "requestData": UserListDefaultResponseAllOfRequestData.from_dict(obj["requestData"]) if obj.get("requestData") is not None else None, + "requestData": RequestData.from_dict(obj["requestData"]) if obj.get("requestData") is not None else None, "runtime": obj.get("runtime"), "data": obj.get("data"), - "error": UserListDefaultResponseAllOfError.from_dict(obj["error"]) if obj.get("error") is not None else None + "error": ErrorRspAllOfError.from_dict(obj["error"]) if obj.get("error") is not None else None }) return _obj diff --git a/src/corbado_python_sdk/generated/models/user_list_default_response_all_of_error.py b/src/corbado_python_sdk/generated/models/error_rsp_all_of_error.py similarity index 80% rename from src/corbado_python_sdk/generated/models/user_list_default_response_all_of_error.py rename to src/corbado_python_sdk/generated/models/error_rsp_all_of_error.py index 71f3482..fdef919 100644 --- a/src/corbado_python_sdk/generated/models/user_list_default_response_all_of_error.py +++ b/src/corbado_python_sdk/generated/models/error_rsp_all_of_error.py @@ -20,17 +20,17 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from corbado_python_sdk.generated.models.user_list_default_response_all_of_error_validation_inner import UserListDefaultResponseAllOfErrorValidationInner +from corbado_python_sdk.generated.models.error_rsp_all_of_error_validation import ErrorRspAllOfErrorValidation from typing import Optional, Set from typing_extensions import Self -class UserListDefaultResponseAllOfError(BaseModel): +class ErrorRspAllOfError(BaseModel): """ - UserListDefaultResponseAllOfError + ErrorRspAllOfError """ # noqa: E501 type: StrictStr = Field(description="Type of error") details: Optional[StrictStr] = Field(default=None, description="Details of error") - validation: Optional[List[UserListDefaultResponseAllOfErrorValidationInner]] = Field(default=None, description="Validation errors per field") + validation: Optional[List[ErrorRspAllOfErrorValidation]] = Field(default=None, description="Validation errors per field") links: Optional[List[StrictStr]] = Field(default=None, description="Additional links to help understand the error") __properties: ClassVar[List[str]] = ["type", "details", "validation", "links"] @@ -52,7 +52,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of UserListDefaultResponseAllOfError from a JSON string""" + """Create an instance of ErrorRspAllOfError from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -84,7 +84,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of UserListDefaultResponseAllOfError from a dict""" + """Create an instance of ErrorRspAllOfError from a dict""" if obj is None: return None @@ -94,7 +94,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "type": obj.get("type"), "details": obj.get("details"), - "validation": [UserListDefaultResponseAllOfErrorValidationInner.from_dict(_item) for _item in obj["validation"]] if obj.get("validation") is not None else None, + "validation": [ErrorRspAllOfErrorValidation.from_dict(_item) for _item in obj["validation"]] if obj.get("validation") is not None else None, "links": obj.get("links") }) return _obj diff --git a/src/corbado_python_sdk/generated/models/user_list_default_response_all_of_error_validation_inner.py b/src/corbado_python_sdk/generated/models/error_rsp_all_of_error_validation.py similarity index 88% rename from src/corbado_python_sdk/generated/models/user_list_default_response_all_of_error_validation_inner.py rename to src/corbado_python_sdk/generated/models/error_rsp_all_of_error_validation.py index e1b7918..b1c2fef 100644 --- a/src/corbado_python_sdk/generated/models/user_list_default_response_all_of_error_validation_inner.py +++ b/src/corbado_python_sdk/generated/models/error_rsp_all_of_error_validation.py @@ -23,9 +23,9 @@ from typing import Optional, Set from typing_extensions import Self -class UserListDefaultResponseAllOfErrorValidationInner(BaseModel): +class ErrorRspAllOfErrorValidation(BaseModel): """ - UserListDefaultResponseAllOfErrorValidationInner + ErrorRspAllOfErrorValidation """ # noqa: E501 var_field: StrictStr = Field(alias="field") message: StrictStr @@ -49,7 +49,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of UserListDefaultResponseAllOfErrorValidationInner from a JSON string""" + """Create an instance of ErrorRspAllOfErrorValidation from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -74,7 +74,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of UserListDefaultResponseAllOfErrorValidationInner from a dict""" + """Create an instance of ErrorRspAllOfErrorValidation from a dict""" if obj is None: return None diff --git a/src/corbado_python_sdk/generated/models/user_delete200_response.py b/src/corbado_python_sdk/generated/models/generic_rsp.py similarity index 83% rename from src/corbado_python_sdk/generated/models/user_delete200_response.py rename to src/corbado_python_sdk/generated/models/generic_rsp.py index 2826e4e..a026257 100644 --- a/src/corbado_python_sdk/generated/models/user_delete200_response.py +++ b/src/corbado_python_sdk/generated/models/generic_rsp.py @@ -20,17 +20,17 @@ from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Union -from corbado_python_sdk.generated.models.user_list_default_response_all_of_request_data import UserListDefaultResponseAllOfRequestData +from corbado_python_sdk.generated.models.request_data import RequestData from typing import Optional, Set from typing_extensions import Self -class UserDelete200Response(BaseModel): +class GenericRsp(BaseModel): """ - UserDelete200Response + GenericRsp """ # noqa: E501 http_status_code: StrictInt = Field(description="HTTP status code of operation", alias="httpStatusCode") message: StrictStr - request_data: UserListDefaultResponseAllOfRequestData = Field(alias="requestData") + request_data: RequestData = Field(alias="requestData") runtime: Union[StrictFloat, StrictInt] = Field(description="Runtime in seconds for this request") __properties: ClassVar[List[str]] = ["httpStatusCode", "message", "requestData", "runtime"] @@ -52,7 +52,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of UserDelete200Response from a JSON string""" + """Create an instance of GenericRsp from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -80,7 +80,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of UserDelete200Response from a dict""" + """Create an instance of GenericRsp from a dict""" if obj is None: return None @@ -90,7 +90,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "httpStatusCode": obj.get("httpStatusCode"), "message": obj.get("message"), - "requestData": UserListDefaultResponseAllOfRequestData.from_dict(obj["requestData"]) if obj.get("requestData") is not None else None, + "requestData": RequestData.from_dict(obj["requestData"]) if obj.get("requestData") is not None else None, "runtime": obj.get("runtime") }) return _obj diff --git a/src/corbado_python_sdk/generated/models/identifier_list.py b/src/corbado_python_sdk/generated/models/identifier_list.py index 5336418..697dc30 100644 --- a/src/corbado_python_sdk/generated/models/identifier_list.py +++ b/src/corbado_python_sdk/generated/models/identifier_list.py @@ -21,7 +21,7 @@ from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List from corbado_python_sdk.generated.models.identifier import Identifier -from corbado_python_sdk.generated.models.user_list_paging import UserListPaging +from corbado_python_sdk.generated.models.paging import Paging from typing import Optional, Set from typing_extensions import Self @@ -30,7 +30,7 @@ class IdentifierList(BaseModel): IdentifierList """ # noqa: E501 identifiers: List[Identifier] - paging: UserListPaging + paging: Paging __properties: ClassVar[List[str]] = ["identifiers", "paging"] model_config = ConfigDict( @@ -95,7 +95,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "identifiers": [Identifier.from_dict(_item) for _item in obj["identifiers"]] if obj.get("identifiers") is not None else None, - "paging": UserListPaging.from_dict(obj["paging"]) if obj.get("paging") is not None else None + "paging": Paging.from_dict(obj["paging"]) if obj.get("paging") is not None else None }) return _obj diff --git a/src/corbado_python_sdk/generated/models/user_list_paging.py b/src/corbado_python_sdk/generated/models/paging.py similarity index 93% rename from src/corbado_python_sdk/generated/models/user_list_paging.py rename to src/corbado_python_sdk/generated/models/paging.py index f1879fa..ff30a8f 100644 --- a/src/corbado_python_sdk/generated/models/user_list_paging.py +++ b/src/corbado_python_sdk/generated/models/paging.py @@ -23,9 +23,9 @@ from typing import Optional, Set from typing_extensions import Self -class UserListPaging(BaseModel): +class Paging(BaseModel): """ - UserListPaging + Paging """ # noqa: E501 page: StrictInt = Field(description="current page returned in response") total_pages: StrictInt = Field(description="total number of pages available", alias="totalPages") @@ -50,7 +50,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of UserListPaging from a JSON string""" + """Create an instance of Paging from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -75,7 +75,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of UserListPaging from a dict""" + """Create an instance of Paging from a dict""" if obj is None: return None diff --git a/src/corbado_python_sdk/generated/models/passkey_challenge_list.py b/src/corbado_python_sdk/generated/models/passkey_challenge_list.py index bc65f85..f9263dc 100644 --- a/src/corbado_python_sdk/generated/models/passkey_challenge_list.py +++ b/src/corbado_python_sdk/generated/models/passkey_challenge_list.py @@ -20,8 +20,8 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List +from corbado_python_sdk.generated.models.paging import Paging from corbado_python_sdk.generated.models.passkey_challenge import PasskeyChallenge -from corbado_python_sdk.generated.models.user_list_paging import UserListPaging from typing import Optional, Set from typing_extensions import Self @@ -30,7 +30,7 @@ class PasskeyChallengeList(BaseModel): PasskeyChallengeList """ # noqa: E501 passkey_challenges: List[PasskeyChallenge] = Field(alias="passkeyChallenges") - paging: UserListPaging + paging: Paging __properties: ClassVar[List[str]] = ["passkeyChallenges", "paging"] model_config = ConfigDict( @@ -95,7 +95,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "passkeyChallenges": [PasskeyChallenge.from_dict(_item) for _item in obj["passkeyChallenges"]] if obj.get("passkeyChallenges") is not None else None, - "paging": UserListPaging.from_dict(obj["paging"]) if obj.get("paging") is not None else None + "paging": Paging.from_dict(obj["paging"]) if obj.get("paging") is not None else None }) return _obj diff --git a/src/corbado_python_sdk/generated/models/passkey_event_list.py b/src/corbado_python_sdk/generated/models/passkey_event_list.py index 94e9d55..ac307c3 100644 --- a/src/corbado_python_sdk/generated/models/passkey_event_list.py +++ b/src/corbado_python_sdk/generated/models/passkey_event_list.py @@ -20,8 +20,8 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List +from corbado_python_sdk.generated.models.paging import Paging from corbado_python_sdk.generated.models.passkey_event import PasskeyEvent -from corbado_python_sdk.generated.models.user_list_paging import UserListPaging from typing import Optional, Set from typing_extensions import Self @@ -30,7 +30,7 @@ class PasskeyEventList(BaseModel): PasskeyEventList """ # noqa: E501 passkey_events: List[PasskeyEvent] = Field(alias="passkeyEvents") - paging: UserListPaging + paging: Paging __properties: ClassVar[List[str]] = ["passkeyEvents", "paging"] model_config = ConfigDict( @@ -95,7 +95,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "passkeyEvents": [PasskeyEvent.from_dict(_item) for _item in obj["passkeyEvents"]] if obj.get("passkeyEvents") is not None else None, - "paging": UserListPaging.from_dict(obj["paging"]) if obj.get("paging") is not None else None + "paging": Paging.from_dict(obj["paging"]) if obj.get("paging") is not None else None }) return _obj diff --git a/src/corbado_python_sdk/generated/models/user_list_default_response_all_of_request_data.py b/src/corbado_python_sdk/generated/models/request_data.py similarity index 92% rename from src/corbado_python_sdk/generated/models/user_list_default_response_all_of_request_data.py rename to src/corbado_python_sdk/generated/models/request_data.py index 9257804..0141673 100644 --- a/src/corbado_python_sdk/generated/models/user_list_default_response_all_of_request_data.py +++ b/src/corbado_python_sdk/generated/models/request_data.py @@ -23,7 +23,7 @@ from typing import Optional, Set from typing_extensions import Self -class UserListDefaultResponseAllOfRequestData(BaseModel): +class RequestData(BaseModel): """ Data about the request itself, can be used for debugging """ # noqa: E501 @@ -49,7 +49,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of UserListDefaultResponseAllOfRequestData from a JSON string""" + """Create an instance of RequestData from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -74,7 +74,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of UserListDefaultResponseAllOfRequestData from a dict""" + """Create an instance of RequestData from a dict""" if obj is None: return None diff --git a/src/corbado_python_sdk/generated/models/session_list_sessions_inner.py b/src/corbado_python_sdk/generated/models/session.py similarity index 85% rename from src/corbado_python_sdk/generated/models/session_list_sessions_inner.py rename to src/corbado_python_sdk/generated/models/session.py index 2eaa328..05aa5ff 100644 --- a/src/corbado_python_sdk/generated/models/session_list_sessions_inner.py +++ b/src/corbado_python_sdk/generated/models/session.py @@ -18,14 +18,15 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List +from corbado_python_sdk.generated.models.session_status import SessionStatus from typing import Optional, Set from typing_extensions import Self -class SessionListSessionsInner(BaseModel): +class Session(BaseModel): """ - SessionListSessionsInner + Session """ # noqa: E501 session_id: StrictStr = Field(description="Unique identifier of the session.", alias="sessionID") user_id: StrictStr = Field(description="Unique identifier of the user.", alias="userID") @@ -33,16 +34,9 @@ class SessionListSessionsInner(BaseModel): created_ms: StrictInt = Field(description="Unix time of when the session was created (in milliseconds elapsed since January 1, 1970, 00:00:00 UTC).", alias="createdMs") last_action_ms: StrictInt = Field(description="Unix time of when last action (e.g., refresh) on session occurred (in milliseconds elapsed since January 1, 1970, 00:00:00 UTC).", alias="lastActionMs") expires_ms: StrictInt = Field(description="Unix time of when the session expires (in milliseconds elapsed since January 1, 1970, 00:00:00 UTC).", alias="expiresMs") - status: StrictStr + status: SessionStatus __properties: ClassVar[List[str]] = ["sessionID", "userID", "identifierValue", "createdMs", "lastActionMs", "expiresMs", "status"] - @field_validator('status') - def status_validate_enum(cls, value): - """Validates the enum""" - if value not in set(['active', 'logged_out', 'expired', 'inactivity_reached', 'revoked']): - raise ValueError("must be one of enum values ('active', 'logged_out', 'expired', 'inactivity_reached', 'revoked')") - return value - model_config = ConfigDict( populate_by_name=True, validate_assignment=True, @@ -61,7 +55,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of SessionListSessionsInner from a JSON string""" + """Create an instance of Session from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -86,7 +80,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of SessionListSessionsInner from a dict""" + """Create an instance of Session from a dict""" if obj is None: return None diff --git a/src/corbado_python_sdk/generated/models/session_list.py b/src/corbado_python_sdk/generated/models/session_list.py index ca4d926..1f10ee7 100644 --- a/src/corbado_python_sdk/generated/models/session_list.py +++ b/src/corbado_python_sdk/generated/models/session_list.py @@ -20,8 +20,8 @@ from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List -from corbado_python_sdk.generated.models.session_list_sessions_inner import SessionListSessionsInner -from corbado_python_sdk.generated.models.user_list_paging import UserListPaging +from corbado_python_sdk.generated.models.paging import Paging +from corbado_python_sdk.generated.models.session import Session from typing import Optional, Set from typing_extensions import Self @@ -29,8 +29,8 @@ class SessionList(BaseModel): """ SessionList """ # noqa: E501 - sessions: List[SessionListSessionsInner] - paging: UserListPaging + sessions: List[Session] + paging: Paging __properties: ClassVar[List[str]] = ["sessions", "paging"] model_config = ConfigDict( @@ -94,8 +94,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "sessions": [SessionListSessionsInner.from_dict(_item) for _item in obj["sessions"]] if obj.get("sessions") is not None else None, - "paging": UserListPaging.from_dict(obj["paging"]) if obj.get("paging") is not None else None + "sessions": [Session.from_dict(_item) for _item in obj["sessions"]] if obj.get("sessions") is not None else None, + "paging": Paging.from_dict(obj["paging"]) if obj.get("paging") is not None else None }) return _obj diff --git a/src/corbado_python_sdk/generated/models/session_status.py b/src/corbado_python_sdk/generated/models/session_status.py new file mode 100644 index 0000000..55f9092 --- /dev/null +++ b/src/corbado_python_sdk/generated/models/session_status.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + Corbado Backend API + + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + + The version of the OpenAPI document: 2.0.0 + Contact: support@corbado.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class SessionStatus(str, Enum): + """ + SessionStatus + """ + + """ + allowed enum values + """ + ACTIVE = 'active' + LOGGED_OUT = 'logged_out' + EXPIRED = 'expired' + INACTIVITY_REACHED = 'inactivity_reached' + REVOKED = 'revoked' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of SessionStatus from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/src/corbado_python_sdk/generated/models/social_account_create_req.py b/src/corbado_python_sdk/generated/models/social_account_create_req.py index f450d15..5c181b7 100644 --- a/src/corbado_python_sdk/generated/models/social_account_create_req.py +++ b/src/corbado_python_sdk/generated/models/social_account_create_req.py @@ -18,8 +18,9 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List +from corbado_python_sdk.generated.models.social_provider_type import SocialProviderType from typing import Optional, Set from typing_extensions import Self @@ -27,20 +28,13 @@ class SocialAccountCreateReq(BaseModel): """ SocialAccountCreateReq """ # noqa: E501 - provider_type: StrictStr = Field(description="Type of the social provider.", alias="providerType") + provider_type: SocialProviderType = Field(alias="providerType") identifier_value: StrictStr = Field(description="Login identifier of the user (here email address).", alias="identifierValue") foreign_id: StrictStr = Field(description="Unique identifier of the user in the social provider.", alias="foreignID") avatar_url: StrictStr = Field(description="URL of the avatar of the user in the social provider.", alias="avatarURL") full_name: StrictStr = Field(description="Full name of the user in the social provider.", alias="fullName") __properties: ClassVar[List[str]] = ["providerType", "identifierValue", "foreignID", "avatarURL", "fullName"] - @field_validator('provider_type') - def provider_type_validate_enum(cls, value): - """Validates the enum""" - if value not in set(['google', 'microsoft', 'github']): - raise ValueError("must be one of enum values ('google', 'microsoft', 'github')") - return value - model_config = ConfigDict( populate_by_name=True, validate_assignment=True, diff --git a/src/corbado_python_sdk/generated/models/social_account_list.py b/src/corbado_python_sdk/generated/models/social_account_list.py index 8acbd4f..71eb9b1 100644 --- a/src/corbado_python_sdk/generated/models/social_account_list.py +++ b/src/corbado_python_sdk/generated/models/social_account_list.py @@ -20,8 +20,8 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List +from corbado_python_sdk.generated.models.paging import Paging from corbado_python_sdk.generated.models.social_account import SocialAccount -from corbado_python_sdk.generated.models.user_list_paging import UserListPaging from typing import Optional, Set from typing_extensions import Self @@ -30,7 +30,7 @@ class SocialAccountList(BaseModel): SocialAccountList """ # noqa: E501 social_accounts: List[SocialAccount] = Field(alias="socialAccounts") - paging: UserListPaging + paging: Paging __properties: ClassVar[List[str]] = ["socialAccounts", "paging"] model_config = ConfigDict( @@ -95,7 +95,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "socialAccounts": [SocialAccount.from_dict(_item) for _item in obj["socialAccounts"]] if obj.get("socialAccounts") is not None else None, - "paging": UserListPaging.from_dict(obj["paging"]) if obj.get("paging") is not None else None + "paging": Paging.from_dict(obj["paging"]) if obj.get("paging") is not None else None }) return _obj diff --git a/src/corbado_python_sdk/generated/models/social_provider_type.py b/src/corbado_python_sdk/generated/models/social_provider_type.py new file mode 100644 index 0000000..f89ea27 --- /dev/null +++ b/src/corbado_python_sdk/generated/models/social_provider_type.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + Corbado Backend API + + # Introduction This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys. + + The version of the OpenAPI document: 2.0.0 + Contact: support@corbado.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class SocialProviderType(str, Enum): + """ + Type of the social provider. + """ + + """ + allowed enum values + """ + GOOGLE = 'google' + MICROSOFT = 'microsoft' + GITHUB = 'github' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of SocialProviderType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/src/corbado_python_sdk/generated/models/user_list.py b/src/corbado_python_sdk/generated/models/user_list.py index edd7442..06fc303 100644 --- a/src/corbado_python_sdk/generated/models/user_list.py +++ b/src/corbado_python_sdk/generated/models/user_list.py @@ -20,8 +20,8 @@ from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List +from corbado_python_sdk.generated.models.paging import Paging from corbado_python_sdk.generated.models.user_aggregate import UserAggregate -from corbado_python_sdk.generated.models.user_list_paging import UserListPaging from typing import Optional, Set from typing_extensions import Self @@ -30,7 +30,7 @@ class UserList(BaseModel): UserList """ # noqa: E501 users: List[UserAggregate] - paging: UserListPaging + paging: Paging __properties: ClassVar[List[str]] = ["users", "paging"] model_config = ConfigDict( @@ -95,7 +95,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "users": [UserAggregate.from_dict(_item) for _item in obj["users"]] if obj.get("users") is not None else None, - "paging": UserListPaging.from_dict(obj["paging"]) if obj.get("paging") is not None else None + "paging": Paging.from_dict(obj["paging"]) if obj.get("paging") is not None else None }) return _obj From e72aa19a9d850ac84b9fc846a332d2569ef81a2b Mon Sep 17 00:00:00 2001 From: Dopeamin Date: Wed, 17 Sep 2025 09:13:33 +0200 Subject: [PATCH 2/6] fixes workflow --- .github/workflows/python-package.yml | 134 +++++++++++++-------------- 1 file changed, 66 insertions(+), 68 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 9b9f758..a8babae 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -4,11 +4,11 @@ name: Python package on: push: - branches: [ "main","feature/**","development", "[0-9]+-*"] + branches: ["main", "feature/**", "development", "[0-9]+-*"] tags: - v[0-9]+.[0-9]+.[0-9]+* pull_request: - branches: [ "main","development"] + branches: ["main", "development"] types: [opened, reopened, edited] jobs: @@ -21,85 +21,83 @@ jobs: python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - cache: 'pip' - cache-dependency-path: | - **/requirements*.txt - - - name: Install dependencies - run: | - python -m pip install --upgrade pip - python -m pip install .[test,tox_gh,tox,mypy,flake8] - - # Linting step only runs for Python 3.8 - - name: mypy - if: matrix.python-version == '3.8' - continue-on-error: true - run: mypy -p corbado_python_sdk --exclude generated --strict --disable-error-code attr-defined - - name: lint with flake8 - if: matrix.python-version == '3.8' - run: flake8 . - - - name: Test with tox - run: | - tox run - env: - CORBADO_PROJECT_ID: ${{ secrets.CORBADO_PROJECT_ID }} - CORBADO_API_SECRET: ${{ secrets.CORBADO_API_SECRET }} - CORBADO_FRONTEND_API: ${{ vars.CORBADO_FRONTEND_API }} - CORBADO_BACKEND_API: ${{ vars.CORBADO_BACKEND_API }} + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + cache: "pip" + cache-dependency-path: | + **/requirements*.txt + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install .[test,tox_gh,tox,mypy,flake8] + + # Linting step only runs for Python 3.8 + - name: mypy + if: matrix.python-version == '3.8' + continue-on-error: true + run: mypy -p corbado_python_sdk --exclude generated --strict --disable-error-code attr-defined + - name: lint with flake8 + if: matrix.python-version == '3.8' + run: flake8 . + + - name: Test with tox + run: | + tox run + env: + CORBADO_PROJECT_ID: "pro-1870103272253508163" + CORBADO_API_SECRET: ${{ secrets.CORBADO_API_SECRET }} + CORBADO_FRONTEND_API: ${{ vars.CORBADO_FRONTEND_API }} + CORBADO_BACKEND_API: ${{ vars.CORBADO_BACKEND_API }} - - build: - if: startsWith(github.ref, 'refs/tags/v') # only make separate build and upload for tag pushes - name: Build and upload distribution package + if: startsWith(github.ref, 'refs/tags/v') # only make separate build and upload for tag pushes + name: Build and upload distribution package runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: "3.12" - - - name: Install pypa/build - run: >- - python3 -m - pip install - build - --user - - - name: Build a binary wheel and a source tarball - run: python3 -m build - - - name: Store the distribution packages - uses: actions/upload-artifact@v4 - with: - name: python-package-distributions - path: dist/ + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.12" + + - name: Install pypa/build + run: >- + python3 -m + pip install + build + --user + + - name: Build a binary wheel and a source tarball + run: python3 -m build + + - name: Store the distribution packages + uses: actions/upload-artifact@v4 + with: + name: python-package-distributions + path: dist/ publish-to-pypi: name: >- Publish Python distribution package to PyPI - if: startsWith(github.ref, 'refs/tags/v') # only publish to PyPI on tag pushes - needs: [build,test-and-lint] # Ensure that package was built and tested for all python versions before publishing + if: startsWith(github.ref, 'refs/tags/v') # only publish to PyPI on tag pushes + needs: [build, test-and-lint] # Ensure that package was built and tested for all python versions before publishing runs-on: ubuntu-latest environment: name: pypi url: https://pypi.org/p/passkeys permissions: - id-token: write + id-token: write steps: - - name: Download all the dists - uses: actions/download-artifact@v4 - with: - name: python-package-distributions - path: dist/ - - name: Publish distribution package to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 + - name: Download all the dists + uses: actions/download-artifact@v4 + with: + name: python-package-distributions + path: dist/ + - name: Publish distribution package to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 From 1d70bb0ea7de999c50c02f48c3cd024eb5594d37 Mon Sep 17 00:00:00 2001 From: Dopeamin Date: Wed, 17 Sep 2025 09:17:58 +0200 Subject: [PATCH 3/6] Update pull request workflow to include 'synchronize' event type --- .github/workflows/python-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index a8babae..51f7844 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -9,7 +9,7 @@ on: - v[0-9]+.[0-9]+.[0-9]+* pull_request: branches: ["main", "development"] - types: [opened, reopened, edited] + types: [opened, reopened, edited, synchronize] jobs: test-and-lint: From 34d0f295d4b411aec845420f945b119fcec7903b Mon Sep 17 00:00:00 2001 From: Dopeamin Date: Wed, 17 Sep 2025 09:40:42 +0200 Subject: [PATCH 4/6] Add updated and updatedMs fields to UserEntity - Enhanced UserEntity to include 'updated' and 'updatedMs' attributes for better tracking of user data changes. --- src/corbado_python_sdk/entities/user_entity.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/corbado_python_sdk/entities/user_entity.py b/src/corbado_python_sdk/entities/user_entity.py index c58c557..151434b 100644 --- a/src/corbado_python_sdk/entities/user_entity.py +++ b/src/corbado_python_sdk/entities/user_entity.py @@ -23,4 +23,6 @@ def from_user(cls, user: User) -> "UserEntity": status=user.status, explicitWebauthnID=user.explicit_webauthn_id, fullName=user.full_name, + updated=user.updated, + updatedMs=user.updated_ms, ) From 95350302faba337c86bd0b603c97dcb770ad6a62 Mon Sep 17 00:00:00 2001 From: Dopeamin Date: Wed, 17 Sep 2025 09:50:41 +0200 Subject: [PATCH 5/6] Refactor UserEntity to use BaseModel and enhance attributes - Updated UserEntity to inherit from BaseModel instead of User. - Added new fields: user_id, full_name, status, and explicit_webauthn_id for improved user representation. - Removed outdated fields 'updated' and 'updatedMs' to streamline the model. --- src/corbado_python_sdk/entities/user_entity.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/corbado_python_sdk/entities/user_entity.py b/src/corbado_python_sdk/entities/user_entity.py index 151434b..e1fadc1 100644 --- a/src/corbado_python_sdk/entities/user_entity.py +++ b/src/corbado_python_sdk/entities/user_entity.py @@ -1,11 +1,18 @@ -from pydantic import ConfigDict +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Optional from corbado_python_sdk.generated.models.user import User +from corbado_python_sdk.generated.models.user_status import UserStatus -class UserEntity(User): +class UserEntity(BaseModel): """Represents a user entity.""" + user_id: StrictStr = Field(alias="userID") + full_name: Optional[StrictStr] = Field(default=None, alias="fullName") + status: UserStatus + explicit_webauthn_id: Optional[StrictStr] = Field(default=None, alias="explicitWebauthnID") + model_config = ConfigDict(populate_by_name=True, from_attributes=True, arbitrary_types_allowed=True) @classmethod @@ -23,6 +30,4 @@ def from_user(cls, user: User) -> "UserEntity": status=user.status, explicitWebauthnID=user.explicit_webauthn_id, fullName=user.full_name, - updated=user.updated, - updatedMs=user.updated_ms, ) From 58febcc58419200cfa0dad260482f499da5e1d11 Mon Sep 17 00:00:00 2001 From: Dopeamin Date: Wed, 17 Sep 2025 09:52:37 +0200 Subject: [PATCH 6/6] Reorganize imports in UserEntity for clarity - Moved import statements for Pydantic to the top of the UserEntity file to enhance readability and maintainability. --- src/corbado_python_sdk/entities/user_entity.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/corbado_python_sdk/entities/user_entity.py b/src/corbado_python_sdk/entities/user_entity.py index e1fadc1..d22c2c0 100644 --- a/src/corbado_python_sdk/entities/user_entity.py +++ b/src/corbado_python_sdk/entities/user_entity.py @@ -1,6 +1,7 @@ -from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Optional +from pydantic import BaseModel, ConfigDict, Field, StrictStr + from corbado_python_sdk.generated.models.user import User from corbado_python_sdk.generated.models.user_status import UserStatus