2.0info:   11.9.3   externalusers  x-senior-domain: platform  x-senior-domain-path: platform  x-senior-service-path: externalusers  contact:    name: Senior X Platform    url: https://dev.senior.com.br    email: seniorx-dev@senior.com.brhost: platform.senior.com.br /t/senior.com.br/bridge/1.0/rest/platformsecurityDefinitions:   APIKeyHeader:     type: apiKey     in: header     name: Authorizationsecurity:  – APIKeyHeader: []  – application/json  – application/jsonpaths:  /externalusers/queries/healthcheck:    post:      description: Request to verify if the project is running      tags:        – Queries      x-senior-visibility: PRIVATE      responses:        200:          description: Ok          schema:            type: object            required:              – status              – checks            properties:              status:                type: string                allOf:                –  #/definitions/healthCheckStatus                description: Healthcheck general status              checks:                type: array                items:                  type: object                  allOf:                   –  #/definitions/checkDTO                  minimum: 1                description: Verified items in healthcheck        401:          description: Invalid Credentials        default:          description: Error response          schema:             #/definitions/genericError    get:      description: Request to verify if the project is running      tags:        – Queries      x-senior-visibility: PRIVATE      responses:        200:          description: Ok          schema:            type: object            required:              – status              – checks            properties:              status:                type: string                allOf:                –  #/definitions/healthCheckStatus                description: Healthcheck general status              checks:                type: array                items:                  type: object                  allOf:                   –  #/definitions/checkDTO                  minimum: 1                description: Verified items in healthcheck        401:          description: Invalid Credentials        default:          description: Error response          schema:             #/definitions/genericError    /externalusers/queries/listAlternativeEmails:    post:      description: Lists all alternative e-mails from the current user      tags:        – Queries      x-senior-visibility: PRIVATE      responses:        200:          description: Ok          schema:            type: object            required:              – emails            properties:              emails:                type: array                items:                  type: string                  minimum: 1                description:         401:          description: Invalid Credentials        default:          description: Error response          schema:             #/definitions/genericError    get:      description: Lists all alternative e-mails from the current user      tags:        – Queries      x-senior-visibility: PRIVATE      responses:        200:          description: Ok          schema:            type: object            required:              – emails            properties:              emails:                type: array                items:                  type: string                  minimum: 1                description:         401:          description: Invalid Credentials        default:          description: Error response          schema:             #/definitions/genericError    /externalusers/queries/userInfo:    post:      description:       tags:        – Queries      x-senior-visibility: PRIVATE      responses:        200:          description: Ok          schema:            type: object            required:              – user            properties:              user:                type: object                allOf:                 –  #/definitions/user                description:         401:          description: Invalid Credentials        default:          description: Error response          schema:             #/definitions/genericError    get:      description:       tags:        – Queries      x-senior-visibility: PRIVATE      responses:        200:          description: Ok          schema:            type: object            required:              – user            properties:              user:                type: object                allOf:                 –  #/definitions/user                description:         401:          description: Invalid Credentials        default:          description: Error response          schema:             #/definitions/genericError    /externalusers/queries/userInfoShared:    post:      description: Returns user data      tags:        – Queries      x-senior-visibility: PRIVATE      parameters:        – name: input          in: body          required: true          schema:            type: object            properties:              username:                type: string                description: The users username or email or phone number, if not informed, it will search for the current user      responses:        200:          description: Ok          schema:            type: object            required:              – user            properties:              user:                type: object                allOf:                 –  #/definitions/user                description:         401:          description: Invalid Credentials        default:          description: Error response          schema:             #/definitions/genericError    get:      description: Returns user data      tags:        – Queries      x-senior-visibility: PRIVATE      parameters:        – name: username          description: The users username or email or phone number, if not informed, it will search for the current user          in: query          type: string      responses:        200:          description: Ok          schema:            type: object            required:              – user            properties:              user:                type: object                allOf:                 –  #/definitions/user                description:         401:          description: Invalid Credentials        default:          description: Error response          schema:             #/definitions/genericError    /externalusers/queries/exists:    post:      description: Verify if the given user already exists      tags:        – Queries      x-senior-visibility: PRIVATE      parameters:        – name: input          in: body          required: true          schema:            type: object            required:              – email            properties:              email:                type: string                description: The email of the user we want to verify      responses:        200:          description: Ok          schema:            type: object            required:              – exists            properties:              exists:                type: boolean                description: True if the user already exists, false otherwise        401:          description: Invalid Credentials        default:          description: Error response          schema:             #/definitions/genericError    get:      description: Verify if the given user already exists      tags:        – Queries      x-senior-visibility: PRIVATE      parameters:        – name: email          description: The email of the user we want to verify          in: query          required: true          type: string      responses:        200:          description: Ok          schema:            type: object            required:              – exists            properties:              exists:                type: boolean                description: True if the user already exists, false otherwise        401:          description: Invalid Credentials        default:          description: Error response          schema:             #/definitions/genericError    /externalusers/queries/getConfiguredProviders:    post:      description: Return a list with the configured providers for the current tenant      tags:        – Queries      x-senior-visibility: PRIVATE      responses:        200:          description: Ok          schema:            type: object            required:              – configuredProviders            properties:              configuredProviders:                type: array                items:                  type: string                  allOf:                  –  #/definitions/provider                  minimum: 1                description:         401:          description: Invalid Credentials        default:          description: Error response          schema:             #/definitions/genericError    get:      description: Return a list with the configured providers for the current tenant      tags:        – Queries      x-senior-visibility: PRIVATE      responses:        200:          description: Ok          schema:            type: object            required:              – configuredProviders            properties:              configuredProviders:                type: array                items:                  type: string                  allOf:                  –  #/definitions/provider                  minimum: 1                description:         401:          description: Invalid Credentials        default:          description: Error response          schema:             #/definitions/genericError    /externalusers/queries/passwordPolicy:    post:      description: Password policy      tags:        – Queries      x-senior-visibility: PRIVATE      parameters:      responses:        200:          description: Ok          schema:            type: object            required:              – minSize              – maxSize              – numbers              – lowerCases              – upperCases              – symbols              – regex            properties:              minSize:                type: integer                format: int64                description: Min size              maxSize:                type: integer                format: int64                description: Max size              numbers:                type: boolean                description: At least one number              lowerCases:                type: boolean                description: At least one lowercase letter              upperCases:                type: boolean                description: At least one uppercase letter              symbols:                type: string                description: At least one symbol              regex:                type: string                description: Regex validator        default:          description: Error response          schema:             #/definitions/genericError    get:      description: Password policy      tags:        – Queries      x-senior-visibility: PRIVATE      responses:        200:          description: Ok          schema:            type: object            required:              – minSize              – maxSize              – numbers              – lowerCases              – upperCases              – symbols              – regex            properties:              minSize:                type: integer                format: int64                description: Min size              maxSize:                type: integer                format: int64                description: Max size              numbers:                type: boolean                description: At least one number              lowerCases:                type: boolean                description: At least one lowercase letter              upperCases:                type: boolean                description: At least one uppercase letter              symbols:                type: string                description: At least one symbol              regex:                type: string                description: Regex validator        default:          description: Error response          schema:             #/definitions/genericError    /externalusers/queries/getConfirmedData:    post:      description: Retrieve the data that has been confirmed by the user      tags:        – Queries      x-senior-visibility: PRIVATE      parameters:        – name: input          in: body          required: true          schema:            type: object            required:              – documentNumber              – documentType            properties:              documentNumber:                type: string                description: Users document number              documentType:                type: string                description: Users document type              userType:                type: string                allOf:                –  #/definitions/userType                description: User type, to identify whether it belongs to the tenant or shared base, if not informed, the default value is TENANT      responses:        200:          description: Ok          schema:            type: object            required:              – userId              – email              – phoneNumber            properties:              userId:                type: string                description: Users id              email:                type: string                description: Users email              phoneNumber:                type: string                description: Users phone number        default:          description: Error response          schema:             #/definitions/genericError    /externalusers/queries/linkedInNewAppIsEnabled:    post:      description: Check if you can use the new LinkedIn app      tags:        – Queries      x-senior-visibility: PRIVATE      parameters:      responses:        200:          description: Ok          schema:            type: object            required:              – isNewApp            properties:              isNewApp:                type: boolean                description: Is new app        default:          description: Error response          schema:             #/definitions/genericError    get:      description: Check if you can use the new LinkedIn app      tags:        – Queries      x-senior-visibility: PRIVATE      responses:        200:          description: Ok          schema:            type: object            required:              – isNewApp            properties:              isNewApp:                type: boolean                description: Is new app        default:          description: Error response          schema:             #/definitions/genericError    /externalusers/queries/listUsers:    post:      description:       tags:        – Queries      x-senior-visibility: PRIVATE      parameters:        – name: input          in: body          required: true          schema:            type: object            properties:              tenant:                type: string                description:               search:                type: string                description:               page:                type: integer                format: int64                description:                 default: 0              size:                type: integer                format: int64                description:                 default: 10              userType:                type: string                allOf:                –  #/definitions/userType                description:       responses:        200:          description: Ok          schema:            type: object            required:              – users              – listInformation            properties:              users:                type: array                items:                  type: object                  allOf:                   –  #/definitions/basicUser                  minimum: 1                description:               listInformation:                type: object                allOf:                 –  #/definitions/listInformation                description:         401:          description: Invalid Credentials        default:          description: Error response          schema:             #/definitions/genericError    /externalusers/queries/getMetadata:    post:      description: Default getMetadata query. Every service must handle this command and return metadata in the format requested.      tags:        – Queries      x-senior-visibility: PRIVATE      parameters:        – name: input          in: body          required: true          schema:            type: object            properties:              metadataFormat:                type: string                description:       responses:        200:          description: Ok          schema:            type: object            required:              – metadata            properties:              metadata:                type: string                description:         401:          description: Invalid Credentials        default:          description: Error response          schema:             #/definitions/genericError    get:      description: Default getMetadata query. Every service must handle this command and return metadata in the format requested.      tags:        – Queries      x-senior-visibility: PRIVATE      parameters:        – name: metadataFormat          description:           in: query          type: string      responses:        200:          description: Ok          schema:            type: object            required:              – metadata            properties:              metadata:                type: string                description:         401:          description: Invalid Credentials        default:          description: Error response          schema:             #/definitions/genericError    /externalusers/queries/getDependencies:    post:      description: Returns a list with all dependencies from this service, along with their respective versions      tags:        – Queries      x-senior-visibility: PRIVATE      responses:        200:          description: Ok          schema:            type: object            required:              – dependencies            properties:              dependencies:                type: array                items:                  type: object                  allOf:                   –  #/definitions/dependency                  minimum: 1                description: List with this service dependencies        401:          description: Invalid Credentials        default:          description: Error response          schema:             #/definitions/genericError    get:      description: Returns a list with all dependencies from this service, along with their respective versions      tags:        – Queries      x-senior-visibility: PRIVATE      responses:        200:          description: Ok          schema:            type: object            required:              – dependencies            properties:              dependencies:                type: array                items:                  type: object                  allOf:                   –  #/definitions/dependency                  minimum: 1                description: List with this service dependencies        401:          description: Invalid Credentials        default:          description: Error response          schema:             #/definitions/genericError  /externalusers/actions/register:    post:      description: Register a new user on the database      tags:        – Actions      x-senior-visibility: PRIVATE      parameters:        – name: input          in: body          required: true          schema:            type: object            allOf:             –  #/definitions/registerUser      responses:        200:          description: Ok          schema:            type: object            required:              – user            properties:              user:                type: object                allOf:                 –  #/definitions/user                description: The user created        default:          description: Error response          schema:             #/definitions/genericError    /externalusers/actions/updateUser:    post:      description: API DEPRECIADA: Use login v8 instead | DATA: 2023-09-09 | Update a user      tags:        – Actions      deprecated : true      x-senior-visibility: PRIVATE      parameters:        – name: input          in: body          required: true          schema:            type: object            required:              – firstName              – lastName            properties:              firstName:                type: string                description: The users first name              lastName:                type: string                description: The users last name      responses:        200:          description: Ok          schema:            type: object            required:              – user            properties:              user:                type: object                allOf:                 –  #/definitions/user                description: The user updated        401:          description: Invalid Credentials        default:          description: Error response          schema:             #/definitions/genericError    /externalusers/actions/updateUser__8:    post:      description: Update a user      tags:        – Actions      x-senior-visibility: PRIVATE      parameters:        – name: input          in: body          required: true          schema:            type: object            properties:              firstName:                type: string                description: The users first name              lastName:                type: string                description: The users last name              documentNumber:                type: string                description: The users document Number              documentType:                type: string                description: The users document type              birthDate:                type: string                format: date                description: The users birth date              userType:                type: string                allOf:                –  #/definitions/userType                description: User type, to identify whether it belongs to the tenant or shared base, if not informed, the default value is TENANT              localization:                type: string                description: The users localization              language:                type: string                description: The users language example: pt-BR, en-US      responses:        200:          description: Ok          schema:            type: object            required:              – user            properties:              user:                type: object                allOf:                 –  #/definitions/user                description: The user updated        401:          description: Invalid Credentials        default:          description: Error response          schema:             #/definitions/genericError    /externalusers/actions/registerUsers:    post:      description: Register many new users on the database      tags:        – Actions      x-senior-visibility: PRIVATE      parameters:        – name: input          in: body          required: true          schema:            type: object            required:              – users            properties:              users:                type: array                items:                  type: object                  allOf:                   –  #/definitions/registerUser                  minimum: 1                description: Users to be registered      responses:        200:          description: Ok          schema:            type: object            required:              – user            properties:              user:                type: array                items:                  type: object                  allOf:                   –  #/definitions/user                  minimum: 1                description: List of created users        401:          description: Invalid Credentials        default:          description: Error response          schema:             #/definitions/genericError    /externalusers/actions/login:    post:      description: API DEPRECIADA: Use login v8 instead | DATA: 2023-09-07 | Generates a token to the given user. If the user doesnt exist or if the password is incorrect an exception will be thrown.      tags:        – Actions      deprecated : true      x-senior-visibility: PRIVATE      parameters:        – name: input          in: body          required: true          schema:            type: object            required:              – email              – password            properties:              email:                type: string                description: The email of the given user              password:                type: string                description: The password of the given user              recaptcha:                type: string                description: Recaptcha to validate the users login.      responses:        200:          description: Ok          schema:            type: object            required:              – token            properties:              token:                type: string                description: The access token generated        401:          description: Invalid Credentials        default:          description: Error response          schema:             #/definitions/genericError    /externalusers/actions/login__8:    post:      description: Generates a token to the given user. If the user doesnt exist or if the password is incorrect an exception will be thrown.      tags:        – Actions      x-senior-visibility: PRIVATE      parameters:        – name: input          in: body          required: true          schema:            type: object            required:              – username              – password            properties:              username:                type: string                description: The username of the given user              password:                type: string                description: The password of the given user              userType:                type: string                allOf:                –  #/definitions/userType                description: User type, if not informed, the default value is TENANT              recaptcha:                type: string                description: Recaptcha to validate the users login.      responses:        200:          description: Ok          schema:            type: object            required:              – token            properties:              token:                type: string                description: The access token generated        default:          description: Error response          schema:             #/definitions/genericError    /externalusers/actions/loginWithCode:    post:      description: Generates a token using the given code. If the code is invalid an exception will be thrown      tags:        – Actions      x-senior-visibility: PRIVATE      parameters:        – name: input          in: body          required: true          schema:            type: object            required:              – code            properties:              code:                type: string                description: The authorization code      responses:        200:          description: Ok          schema:            type: object            required:              – token            properties:              token:                type: string                description: The access token generated        401:          description: Invalid Credentials        default:          description: Error response          schema:             #/definitions/genericError    /externalusers/actions/loginExternal:    post:      description: Make a external login. A external login will authenticate through another application and generate a valid token to the user      tags:        – Actions      x-senior-visibility: PRIVATE      parameters:        – name: input          in: body          required: true          schema:            type: object            required:              – provider            properties:              provider:                type: string                allOf:                –  #/definitions/provider                description: The provider we want to generate the external login      responses:        200:          description: Ok          schema:            type: object            required:              – url            properties:              url:                type: string                description: The URL to call in other to call to grant the access token        401:          description: Invalid Credentials        default:          description: Error response          schema:             #/definitions/genericError    /externalusers/actions/refreshToken:    post:      description: Refresh the users token      tags:        – Actions      x-senior-visibility: PRIVATE      parameters:        – name: input          in: body          required: true          schema:            type: object            required:              – refreshToken            properties:              refreshToken:                type: string                description: The refresh token value      responses:        200:          description: Ok          schema:            type: object            required:              – token            properties:              token:                type: string                description: The token generate from the refresh        401:          description: Invalid Credentials        default:          description: Error response          schema:             #/definitions/genericError    /externalusers/actions/requestNewPassword:    post:      description: Request the password to be reseted. An email will be sent to the email with a token that allows the user to change the password.      tags:        – Actions      x-senior-visibility: PRIVATE      parameters:        – name: input          in: body          required: true          schema:            type: object            required:              – email              – baseUrl            properties:              email:                type: string                description: The email we want to request a new password              baseUrl:                type: string                description: The base URL to create the recover URL              redirectUrl:                type: string                description: The URL to redirect user when login is completed              product:                type: string                description: Identifier of product without spaces and special characters to customize e-mail      responses:        200:          description: Ok          schema:            type: object            required:              – email              – alternativeEmails            properties:              email:                type: string                description: The email we sent a request to change the password              alternativeEmails:                type: array                items:                  type: string                  minimum: 1                description: The alternative e-mails registered to this user        401:          description: Invalid Credentials        default:          description: Error response          schema:             #/definitions/genericError    /externalusers/actions/resetPassword:    post:      description: API DEPRECIADA: Use login v8 instead | DATA: 2023-09-09 | Resets the users password      tags:        – Actions      deprecated : true      x-senior-visibility: PRIVATE      parameters:        – name: input          in: body          required: true          schema:            type: object            required:              – email              – password              – token            properties:              email:                type: string                description: The users email              password:                type: string                description: The new password of the user              token:                type: string                description: The token sent by email to the user      responses:        200:          description: Ok          schema:            type: object            required:              – email            properties:              email:                type: string                description: The email of the user we changed the password        default:          description: Error response          schema:             #/definitions/genericError    /externalusers/actions/resetPassword__8:    post:      description: Resets the users password      tags:        – Actions      x-senior-visibility: PRIVATE      parameters:        – name: input          in: body          required: true          schema:            type: object            required:              – identifier              – password              – token            properties:              identifier:                type: string                description: Users id or username              password:                type: string                description: The new password of the user              token:                type: string                description: The token generated from pin code validation              userType:                type: string                allOf:                –  #/definitions/userType                description: User type, to identify whether it belongs to the tenant or shared base, if not informed, the default value is TENANT      responses:        200:          description: Ok          schema:            type: object        default:          description: Error response          schema:             #/definitions/genericError    /externalusers/actions/confirmEmail:    post:      description: API DEPRECIADA: Use confirmEmail v8 instead | DATA: 2023-09-07 | User email confirmation      tags:        – Actions      deprecated : true      x-senior-visibility: PRIVATE      parameters:        – name: input          in: body          required: true          schema:            type: object            required:              – token              – email            properties:              token:                type: string                description: The token sent by email to the user              email:                type: string                description: The users email      responses:        200:          description: Ok          schema:            type: object            required:              – email            properties:              email:                type: string                description: The email of the user confirmation email        401:          description: Invalid Credentials        default:          description: Error response          schema:             #/definitions/genericError    /externalusers/actions/changePassword:    post:      description: API DEPRECIADA: Use changePassword v8 instead | DATA: 2023-09-09 | Change the users password      tags:        – Actions      deprecated : true      x-senior-visibility: PRIVATE      parameters:        – name: input          in: body          required: true          schema:            type: object            required:              – currentPassword              – newPassword            properties:              currentPassword:                type: string                description: The users current password              newPassword:                type: string                description: The users new password      responses:        200:          description: Ok          schema:            type: object            required:              – email            properties:              email:                type: string                description:         401:          description: Invalid Credentials        default:          description: Error response          schema:             #/definitions/genericError    /externalusers/actions/changePassword__8:    post:      description: Change the users password      tags:        – Actions      x-senior-visibility: PRIVATE      parameters:        – name: input          in: body          required: true          schema:            type: object            required:              – currentPassword              – newPassword            properties:              currentPassword:                type: string                description: The users current password              newPassword:                type: string                description: The users new password              userType:                type: string                allOf:                –  #/definitions/userType                description: User type, to identify whether it belongs to the tenant or shared base, if not informed, the default value is TENANT      responses:        200:          description: Ok          schema:            type: object        401:          description: Invalid Credentials        default:          description: Error response          schema:             #/definitions/genericError    /externalusers/actions/addAssociation:    post:      description: Add an association from the user to the message sender domain and service      tags:        – Actions      x-senior-visibility: PRIVATE      parameters:        – name: input          in: body          required: true          schema:            type: object            required:              – email            properties:              email:                type: string                description: The email of the user      responses:        200:          description: Ok          schema:            type: object            required:              – user            properties:              user:                type: object                allOf:                 –  #/definitions/user                description: The added association user        401:          description: Invalid Credentials        default:          description: Error response          schema:             #/definitions/genericError    /externalusers/actions/addAssociations:    post:      description: Add an association from a list of users to the message sender domain and service      tags:        – Actions      x-senior-visibility: PRIVATE      parameters:        – name: input          in: body          required: true          schema:            type: object            required:              – email            properties:              email:                type: array                items:                  type: string                  minimum: 1                description: List of users e-mail      responses:        200:          description: Ok          schema:            type: object            required:              – user            properties:              user:                type: array                items:                  type: object                  allOf:                   –  #/definitions/user                  minimum: 1                description: List of added association users        401:          description: Invalid Credentials        default:          description: Error response          schema:             #/definitions/genericError    /externalusers/actions/removeAssociation:    post:      description: Remove an association from the user to the message sender domain and service      tags:        – Actions      x-senior-visibility: PRIVATE      parameters:        – name: input          in: body          required: true          schema:            type: object            required:              – email            properties:              email:                type: string                description: The email of the user      responses:        200:          description: Ok          schema:            type: object            required:              – user            properties:              user:                type: object                allOf:                 –  #/definitions/user                description: The user removed        401:          description: Invalid Credentials        default:          description: Error response          schema:             #/definitions/genericError    /externalusers/actions/removeAssociations:    post:      description: Remove a list of associations from the users to the message sender domain and service      tags:        – Actions      x-senior-visibility: PRIVATE      parameters:        – name: input          in: body          required: true          schema:            type: object            required:              – emails            properties:              emails:                type: array                items:                  type: string                  minimum: 1                description: The list of emails to be removed      responses:        200:          description: Ok          schema:            type: object            required:              – users            properties:              users:                type: array                items:                  type: object                  allOf:                   –  #/definitions/user                  minimum: 1                description: The users removed        401:          description: Invalid Credentials        default:          description: Error response          schema:             #/definitions/genericError    /externalusers/actions/updateName:    post:      description: Updates de user first and last name      tags:        – Actions      x-senior-visibility: PRIVATE      parameters:        – name: input          in: body          required: true          schema:            type: object            required:              – firstName              – lastName            properties:              firstName:                type: string                description: The users first name              lastName:                type: string                description: The users last name      responses:        200:          description: Ok          schema:            type: object            required:              – user            properties:              user:                type: object                allOf:                 –  #/definitions/user                description: The updated user        401:          description: Invalid Credentials        default:          description: Error response          schema:             #/definitions/genericError    /externalusers/actions/addAlternativeEmail:    post:      description: Adds an alternative e-mail to the current user. The alternative e-mail can be used to recover the users password.      tags:        – Actions      x-senior-visibility: PRIVATE      parameters:        – name: input          in: body          required: true          schema:            type: object            required:              – email            properties:              email:                type: string                description:       responses:        200:          description: Ok          schema:            type: object            required:              – user            properties:              user:                type: object                allOf:                 –  #/definitions/user                description:         401:          description: Invalid Credentials        default:          description: Error response          schema:             #/definitions/genericError    /externalusers/actions/removeAlternativeEmail:    post:      description: Remove the alternative e-mail association with the current user.      tags:        – Actions      x-senior-visibility: PRIVATE      parameters:        – name: input          in: body          required: true          schema:            type: object            required:              – email            properties:              email:                type: string                description:       responses:        200:          description: Ok          schema:            type: object            required:              – user            properties:              user:                type: object                allOf:                 –  #/definitions/user                description:         401:          description: Invalid Credentials        default:          description: Error response          schema:             #/definitions/genericError    /externalusers/actions/changeEmail:    post:      description: Change the current users e-mail. After changing the e-mail the user cannot log in with the old e-mail anymore      tags:        – Actions      x-senior-visibility: PRIVATE      parameters:        – name: input          in: body          required: true          schema:            type: object            required:              – newEmail              – newPassword            properties:              newEmail:                type: string                description: The new e-mail for the current user              newPassword:                type: string                description: The new password for the current user      responses:        200:          description: Ok          schema:            type: object            required:              – user            properties:              user:                type: object                allOf:                 –  #/definitions/user                description:         401:          description: Invalid Credentials        default:          description: Error response          schema:             #/definitions/genericError    /externalusers/actions/importUsersFromLegacy:    post:      description: Registers a new user in the database and\nAdd an association from a list of users to the message sender domain and service      tags:        – Actions      x-senior-visibility: PRIVATE      parameters:        – name: input          in: body          required: true          schema:            type: object            required:              – users            properties:              users:                type: array                items:                  type: object                  allOf:                   –  #/definitions/registerUser                  minimum: 1                description: Users to be registered      responses:        200:          description: Ok          schema:            type: object            required:              – result            properties:              result:                type: object                allOf:                 –  #/definitions/outputImportUser                description: Result of operation        401:          description: Invalid Credentials        default:          description: Error response          schema:             #/definitions/genericError    /externalusers/actions/addDocument:    post:      description: Add valid documents to use in user registration      tags:        – Actions      x-senior-visibility: PRIVATE      parameters:        – name: input          in: body          required: true          schema:            type: object            required:              – documentTypes            properties:              documentTypes:                type: array                items:                  type: object                  allOf:                   –  #/definitions/document                  minimum: 1                description: Document type      responses:        200:          description: Ok          schema:            type: object        401:          description: Invalid Credentials        default:          description: Error response          schema:             #/definitions/genericError    /externalusers/actions/listDocument:    post:      description: List document types      tags:        – Actions      x-senior-visibility: PRIVATE      responses:        200:          description: Ok          schema:            type: object            required:              – documentTypes            properties:              documentTypes:                type: array                items:                  type: object                  allOf:                   –  #/definitions/document                  minimum: 1                description: Document type        401:          description: Invalid Credentials        default:          description: Error response          schema:             #/definitions/genericError    /externalusers/actions/requestAccountDeletion:    post:      description: Requests to delete current shared users account      tags:        – Actions      x-senior-visibility: PRIVATE      parameters:        – name: input          in: body          required: true          schema:            type: object            required:              – sendCodeTo            properties:              sendCodeTo:                type: string                allOf:                –  #/definitions/modeConfirmation                description: Send confirmation code to EMAIL or SMS              product:                type: string                description: Product acronym to customize the message      responses:        200:          description: Ok          schema:            type: object        401:          description: Invalid Credentials        default:          description: Error response          schema:             #/definitions/genericError    /externalusers/actions/confirmUserAccountDeletion:    post:      description: Confirm deletion of current shared user account. If the message parameter is not null, sends an account deletion confirmation message via e-mail or SMS      tags:        – Actions      x-senior-visibility: PRIVATE      parameters:        – name: input          in: body          required: true          schema:            type: object            required:              – pinCode            properties:              pinCode:                type: integer                format: int64                description: Pin code to confirm the accounts deletion              message:                type: string                description: Optional message. If not null, the message will be sent as the body of an e-mail/SMS for account deletion      responses:        200:          description: Ok          schema:            type: object        401:          description: Invalid Credentials        default:          description: Error response          schema:             #/definitions/genericError    /externalusers/actions/deleteUserAccount:    post:      description: Delete user account      tags:        – Actions      x-senior-visibility: PRIVATE      parameters:        – name: input          in: body          required: true          schema:            type: object            required:              – username            properties:              username:                type: string                description: Username      responses:        200:          description: Ok          schema:            type: object        401:          description: Invalid Credentials        default:          description: Error response          schema:             #/definitions/genericError    /externalusers/actions/checkExistsAccountWithData:    post:      description: check if user already exists      tags:        – Actions      x-senior-visibility: PRIVATE      parameters:        – name: input          in: body          required: true          schema:            type: object            required:              – searchValue              – userType            properties:              searchValue:                type: string                description: Key value, if it is a document it must contain the type, example: CPF:11111111111              userType:                type: string                allOf:                –  #/definitions/userType                description: User type, to identify whether it belongs to the tenant or shared base, if not informed, the default value is TENANT      responses:        200:          description: Ok          schema:            type: object            required:              – exists              – userEnabled            properties:              exists:                type: boolean                description: Returns true if the user exists              userEnabled:                type: boolean                description: It indicates whether the user is enabled or not        default:          description: Error response          schema:             #/definitions/genericError    /externalusers/actions/confirmPhoneNumber:    post:      description: Confirm phone number      tags:        – Actions      x-senior-visibility: PRIVATE      parameters:        – name: input          in: body          required: true          schema:            type: object            required:              – phoneNumber              – pinCode            properties:              phoneNumber:                type: string                description: Username              pinCode:                type: integer                format: int64                description: Pin code sent to by sms              userType:                type: string                allOf:                –  #/definitions/userType                description: User type, to identify whether it belongs to the tenant or shared base, if not informed, the default value is TENANT      responses:        200:          description: Ok          schema:            type: object        default:          description: Error response          schema:             #/definitions/genericError    /externalusers/actions/confirmEmail__8:    post:      description: Email confirmation      tags:        – Actions      x-senior-visibility: PRIVATE      parameters:        – name: input          in: body          required: true          schema:            type: object            required:              – email              – value            properties:              email:                type: string                description: The users email              mode:                type: string                allOf:                –  #/definitions/modeType                description: Confirmation type TOKEN or PIN_CODE, if not informed , the default value is TOKEN              value:                type: string                description: Token or pin code              userType:                type: string                allOf:                –  #/definitions/userType                description: User type, to identify whether it belongs to the tenant or shared base, if not informed, the default value is TENANT      responses:        200:          description: Ok          schema:            type: object        default:          description: Error response          schema:             #/definitions/genericError    /externalusers/actions/changeUserEmail:    post:      description: Change user email      tags:        – Actions      x-senior-visibility: PRIVATE      parameters:        – name: input          in: body          required: true          schema:            type: object            required:              – identifier              – email            properties:              identifier:                type: string                description: User identifier id or username              email:                type: string                description: The users email              userType:                type: string                allOf:                –  #/definitions/userType                description: User type, to identify whether it belongs to the tenant or shared base, if not informed, the default value is TENANT              ignoreConfirmation:                type: boolean                description: If true, the user will not be asked to confirm the email change                default: false      responses:        200:          description: Ok          schema:            type: object        401:          description: Invalid Credentials        default:          description: Error response          schema:             #/definitions/genericError    /externalusers/actions/changeUserPhone:    post:      description: Change user phone number      tags:        – Actions      x-senior-visibility: PRIVATE      parameters:        – name: input          in: body          required: true          schema:            type: object            required:              – identifier              – phoneNumber            properties:              identifier:                type: string                description: User identifier id or username              phoneNumber:                type: string                description: The users phone number              userType:                type: string                allOf:                –  #/definitions/userType                description: User type, to identify whether it belongs to the tenant or shared base, if not informed, the default value is TENANT              ignoreConfirmation:                type: boolean                description: If true, the user will not be asked to confirm the email change                default: false      responses:        200:          description: Ok          schema:            type: object        401:          description: Invalid Credentials        default:          description: Error response          schema:             #/definitions/genericError    /externalusers/actions/sendConfirmation:    post:      description: Send code for account verification. For SHARED users, it sends the pin code for the account confirmation. For TENANT users, it sends the pin code for the account confirmation and the token for the account verification.      tags:        – Actions      x-senior-visibility: PRIVATE      parameters:        – name: input          in: body          required: true          schema:            type: object            required:              – identifier              – modeConfirmation            properties:              identifier:                type: string                description: User id or username              modeConfirmation:                type: string                allOf:                –  #/definitions/modeConfirmation                description: Account confirmation mode              userType:                type: string                allOf:                –  #/definitions/userType                description: User type              product:                type: string                description: Product that is requesting confirmation              baseUrl:                type: string                description: The base URL to confirmation email              redirectUrl:                type: string                description: The URL to redirect user when confirmed email      responses:        200:          description: Ok          schema:            type: object        default:          description: Error response          schema:             #/definitions/genericError    /externalusers/actions/recoverPassword:    post:      description: Request password recovery for a user      tags:        – Actions      x-senior-visibility: PRIVATE      parameters:        – name: input          in: body          required: true          schema:            type: object            required:              – identifier              – mode              – modeConfirmation            properties:              identifier:                type: string                description: Users id or username              mode:                type: string                allOf:                –  #/definitions/modeType                description: Users password recovery method              modeConfirmation:                type: string                allOf:                –  #/definitions/modeConfirmation                description: Indicates the means to which the confirmation of user identity should be sent              userType:                type: string                allOf:                –  #/definitions/userType                description: User type, to identify whether it belongs to the tenant or shared base, if not informed, the default value is TENANT              product:                type: string                description: Used to customize translation keys, email and SMS templates      responses:        200:          description: Ok          schema:            type: object        default:          description: Error response          schema:             #/definitions/genericError    /externalusers/actions/validatePinCodeRecoverPassword:    post:      description: Validate the pin code and generates a token to authorize the password update      tags:        – Actions      x-senior-visibility: PRIVATE      parameters:        – name: input          in: body          required: true          schema:            type: object            required:              – identifier              – pinCode            properties:              identifier:                type: string                description: Users id or username              pinCode:                type: integer                format: int64                description: Pin code sent to email or sms      responses:        200:          description: Ok          schema:            type: object            required:              – token            properties:              token:                type: string                description: Users token        default:          description: Error response          schema:             #/definitions/genericError    /externalusers/actions/resetSMSSend:    post:      description: Restart sending SMS      tags:        – Actions      x-senior-visibility: PRIVATE      parameters:        – name: input          in: body          required: true          schema:            type: object            required:              – identifier            properties:              identifier:                type: string                description: User identifier (username, email or phone number)      responses:        200:          description: Ok          schema:            type: object        401:          description: Invalid Credentials        default:          description: Error response          schema:             #/definitions/genericError    /externalusers/actions/deleteUser:    post:      description: Remove user      tags:        – Actions      x-senior-visibility: PRIVATE      parameters:        – name: input          in: body          required: true          schema:            type: object            required:              – identifier            properties:              tenant:                type: string                description: Tenant name              identifier:                type: string                description: Username or e-mail      responses:        200:          description: Ok          schema:            type: object        401:          description: Invalid Credentials        default:          description: Error response          schema:             #/definitions/genericError  /externalusers/signals/removeUsersUnconfirmed:    post:      description: Remove unconfirmed users      tags:        – Signals      parameters:        – name: input          in: body          required: true          schema:            type: object      responses:        202:          description: Accepted        default:          description: Error response          schema:             #/definitions/genericError    /externalusers/signals/deleteUsers:    post:      description: Remove users      tags:        – Signals      parameters:        – name: input          in: body          required: true          schema:            type: object            required:              – identifiers            properties:              tenant:                type: string                description: Tenant name              identifiers:                type: array                items:                  type: string                  minimum: 1                description: List of username or e-mail      responses:        202:          description: Accepted        default:          description: Error response          schema:             #/definitions/genericError  /externalusers/events/emailChanged:    post:      description: Indicates that a users e-mail has changed      x-senior-event: true      tags:        – Events      parameters:        – name: input          in: body          required: true          schema:            type: object            required:              – oldEmail              – newEmail            properties:              oldEmail:                type: string                description: Users old e-mail              newEmail:                type: string                description: Users new e-mail      responses:        200:          description: OK        default:          description: Error response          schema:             #/definitions/genericError    /externalusers/events/userChanged:    post:      description: Indicate that a users changed      x-senior-event: true      tags:        – Events      parameters:        – name: input          in: body          required: true          schema:            type: object            required:              – username              – user              – confirmedData            properties:              username:                type: string                description: Username              user:                type: object                allOf:                 –  #/definitions/user                description: Users data              confirmedData:                type: array                items:                  type: object                  allOf:                   –  #/definitions/confirmedData                  minimum: 1                description: Users data confirmed      responses:        200:          description: OK        default:          description: Error response          schema:             #/definitions/genericError    /externalusers/events/accountExclusion:    post:      description: Account deletion request      x-senior-event: true      tags:        – Events      parameters:        – name: input          in: body          required: true          schema:            type: object            required:              – username              – requestDate            properties:              username:                type: string                description: Username              requestDate:                type: string                format: YYYY-MM-DDTHH:mm:ss.SSS                pattern: ^[0-9]{4}-(1[0-2]|0[1-9])-(3[01]|[12][0-9]|0[1-9])T(1[0-9]|0[1-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])[.][0-9]{3}$                description: Request date      responses:        200:          description: OK        default:          description: Error response          schema:             #/definitions/genericError    /externalusers/events/loggedIn:    post:      description: Informa que um usuário efetou login no sistema      x-senior-event: true      tags:        – Events      parameters:        – name: input          in: body          required: true          schema:            type: object            required:              – username              – loginDateTime              – tokenExpiration            properties:              username:                type: string                description: Nome do usuário que efetuou o login              loginDateTime:                type: string                format: date-time                description: Data e hora do login              tokenExpiration:                type: integer                format: int64                description: Tempo para expirar o token em segundos      responses:        200:          description: OK        default:          description: Error response          schema:             #/definitions/genericError    /externalusers/events/tokenRefreshed:    post:      description: Informa que o token de um usuário foi atualizado      x-senior-event: true      tags:        – Events      parameters:        – name: input          in: body          required: true          schema:            type: object            required:              – username              – previousToken              – loginDateTime              – tokenExpiration            properties:              username:                type: string                description: Nome do usuário do qual o token foi atualizado              previousToken:                type: string                description: Token anterior do usuário              loginDateTime:                type: string                format: date-time                description: Data e hora do login              tokenExpiration:                type: integer                format: int64                description: Tempo para expirar o token em segundos      responses:        200:          description: OK        default:          description: Error response          schema:             #/definitions/genericErrordefinitions:  healthCheckStatus:    description: Healthcheck status    type: string    enum:      – UP      – DOWN      provider:    description:     type: string    enum:      – Facebook      – Linkedin      – Google      userType:    description: User Type    type: string    enum:      – TENANT      – SHARED      modeType:    description: Mode type    type: string    enum:      – TOKEN      – PIN_CODE      – NONE      – ALL      modeConfirmation:    description: Account confirmation mode    type: string    enum:      – EMAIL      – SMS      – ALL      confirmRegisterOperation:    description: Confirm register operation, to differentiate whether a users contact is being created or changed    type: string    enum:      – CREATE      – UPDATE      userNotificationKind:    description: User notification kind.    type: string    enum:      – Operational      – Management      – News      userNotificationPriority:    description: User notification priority.    type: string    enum:      – Error      – Alert      – None      eventEmailFormat:    description: Format of the email    type: string    enum:      – HTML      – PLAIN_TEXT    checkDTO:    description: Verified item in healthcheck    type: object    required:      – name      – status    properties:      name:        type: string        description: Item name      status:        type: string        allOf:        –  #/definitions/healthCheckStatus        description: Health status    outputImportUser:    description: Output to import user    type: object    required:      – warning      – warningUsers    properties:      warning:        type: boolean        description: Indicates the warning of operation      warningUsers:        type: array        items:          type: object          allOf:           –  #/definitions/warningUser          minimum: 1        description: Users who have any warning    warningUser:    description: Users who have any warning    type: object    required:      – email      – errorMessage    properties:      email:        type: string        description: User e-mail      errorMessage:        type: string        description: Error / warning message    registerUser:    description: Contract for new user    type: object    required:      – password      – firstName      – lastName    properties:      email:        type: string        maxLength: 100        description: The users email      password:        type: string        description: The users password      firstName:        type: string        maxLength: 48        description: The users first name      lastName:        type: string        maxLength: 100        description: The users last name      phoneNumber:        type: string        description: The user phone number      documentNumber:        type: string        description: The user document number      documentType:        type: string        description: The user document type      birthDate:        type: string        format: date        description: The user birth date      baseUrl:        type: string        description: The base URL to confirmation email      redirectUrl:        type: string        description: The URL to redirect user when confirmed email      product:        type: string        description: Identifier of product without spaces and special characters to customize e-mail      userType:        type: string        allOf:        –  #/definitions/userType        description: User type, to identify whether ti belongs to the tenant or shared base, if not informed, the default value is TENANT      localization:        type: string        description: The users localization      language:        type: string        description: The users language example: pt-BR, en-US    user:    description:     type: object    required:      – id      – email      – firstName      – lastName      – phoneNumber      – documentNumber      – documentType      – birthDate      – created      – updated      – lastLogin      – enable      – isComplete    properties:      id:        type: string        description: Users id      email:        type: string        maxLength: 100        description: Users email      firstName:        type: string        maxLength: 48        description: Users first name      lastName:        type: string        maxLength: 100        description: Users last name      phoneNumber:        type: string        description: Users phone number      documentNumber:        type: string        description: Users document number      documentType:        type: string        description: Users document type      birthDate:        type: string        format: date        description: Users birth date      created:        type: string        format: date-time        description: Users created      updated:        type: string        format: date-time        description: Users updated      lastLogin:        type: string        format: date-time        description: Users last login      enable:        type: boolean        description: Users enabled      isComplete:        type: boolean        description: Users registration is complete      localization:        type: string        description: The users localization      language:        type: string        description: The users language example: pt-BR, en-US    document:    description: Document    type: object    required:      – documentType      – country    properties:      documentType:        type: string        description: Document type      country:        type: string        description: Country the document belongs to    confirmedData:    description: Confirmed data    type: object    required:      – key      – value    properties:      key:        type: string        description: Data type      value:        type: string        description: Value    basicUser:    description: Basic user data    type: object    required:      – email      – fullName      – enabled      – created      – updated    properties:      username:        type: string        description: Users Username      email:        type: string        description: Users email      fullName:        type: string        description: Users full name      enabled:        type: boolean        description: Users enabled      created:        type: string        format: date-time        description: Users created      updated:        type: string        format: date-time        description: Users updated      confirmedEmail:        type: boolean        description: Users confirmed email      confirmedPhoneNumber:        type: boolean        description: Users confirmed phone number    smsInfo:    description:     type: object    required:      – attempts    properties:      attempts:        type: integer        format: int64        description:       lastSMSRequest:        type: string        format: date-time        description:       resetBy:        type: string        description:     listInformation:    description:     type: object    required:      – totalElements      – totalPages    properties:      totalElements:        type: integer        format: int64        description:       totalPages:        type: integer        format: int64        description:     notifyUserEventPayload:    description: Represents a regular user event notification payload    discriminator: _discriminator    type: object    required:      – notificationKind      – notificationPriority      – notificationSubject      – notificationContent      – sourceDomain      – sourceService      – destinationUser      – _discriminator    properties:      notificationClass:        type: string        description: Class of notification      notificationOrigin:        type: string        description: Origin of notification. Free text. Optional.      notificationKind:        type: string        allOf:        –  #/definitions/userNotificationKind        description: Notification kind.      notificationPriority:        type: string        allOf:        –  #/definitions/userNotificationPriority        description: Notification priority.      notificationSubject:        type: string        description: Notification subject.      notificationContent:        type: string        description: Notification content.      sourceDomain:        type: string        description: Domain that generates the notification.      sourceService:        type: string        description: Service that generates the notification.      destinationUser:        type: string        description: Username of the destination user.      link:        type: string        description: Notification link      _discriminator:        type: string        description:     emailNotifyUserEventPayload:    description: Represents an email notification payload    allOf:    –  #/definitions/notifyUserEventPayload    –      type: object      required:        – from      properties:        from:          type: string          description: Email sender address        sendTo:          type: array          items:            type: string          description: Additional recipients to send the email to        format:          type: string          allOf:          –  #/definitions/eventEmailFormat          description: Email format    pushNotifyUserEventPayload:    description: Represents a push notification payload    allOf:    –  #/definitions/notifyUserEventPayload    –      type: object      required:        – applicationId      properties:        applicationId:          type: string          description: Apple/Google application id    blobReference:    description: Default blob reference type. Every service defines its own.    type: object    required:      – targetObjectId    properties:      domainName:        type: string        description: The domain the blob belongs to.      serviceName:        type: string        description: The service the blob belongs to.      targetObjectId:        type: string        description: The basic id of the blob.      targetCopyId:        type: string        description: The id of the blob copy.    basicErrorPayload:    description: Default error payload type. Every service defines its own.    type: object    properties:      message:        type: string        description: The user-facing error message, if any.      errorCode:        type: string        description: The program-accessible (and service-specific) error code.    dependency:    description: Represents a service dependency    type: object    required:      – domain      – service      – version    properties:      domain:        type: string        description: Domain of the dependency service      service:        type: string        description: Name of the dependency service              type: string        description: Version of the dependency service  genericError:    properties:      message:        type: string        description: Messaging describing the error.      reason:        type: string        description: A symbolic code identifying the category of the reason of the error.        enum:          – BAD_REQUEST          – UNAUTHORIZED          – PAYMENT_REQUIRED          – FORBIDDEN          – OBJECT_NOT_FOUND          – REQUEST_TIMEOUT          – GONE          – UNPROCESSABLE          – INTERNAL_ERROR          – NOT_IMPLEMENTED          – SERVICE_UNAVAILABLE          – INSUFFICIENT_STORAGE