{
  "openapi": "3.0.1",
  "info": {
    "title": "Keyclock SSO  API",
    "version": "v1"
  },
  "paths": {
    "/api/Auth/GetToken": {
      "post": {
        "tags": [
          "Auth"
        ],
        "parameters": [
          {
            "name": "Client_ID",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TokenRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/TokenRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/TokenRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/StringApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StringApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/StringApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/Auth/GetRefreshToken": {
      "post": {
        "tags": [
          "Auth"
        ],
        "parameters": [
          {
            "name": "Client_ID",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GetRefreshTokenRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/GetRefreshTokenRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/GetRefreshTokenRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/StringApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StringApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/StringApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/Auth/signout": {
      "post": {
        "tags": [
          "Auth"
        ],
        "parameters": [
          {
            "name": "Client_ID",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SignOutRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SignOutRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SignOutRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/Auth/RevokeToken": {
      "post": {
        "tags": [
          "Auth"
        ],
        "parameters": [
          {
            "name": "Client_ID",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RevokeTokenRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RevokeTokenRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RevokeTokenRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/Auth/LogoutUserByID/{UserId}": {
      "get": {
        "tags": [
          "Auth"
        ],
        "parameters": [
          {
            "name": "UserId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/Clients/roles": {
      "post": {
        "tags": [
          "Clients"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRoleRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRoleRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRoleRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/StringApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StringApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/StringApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/Clients/roles/{roleId}": {
      "put": {
        "tags": [
          "Clients"
        ],
        "parameters": [
          {
            "name": "roleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRoleRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRoleRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRoleRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/StringApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StringApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/StringApiResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Clients"
        ],
        "parameters": [
          {
            "name": "roleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/StringApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StringApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/StringApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/Clients/roles/by-id/{roleId}": {
      "get": {
        "tags": [
          "Clients"
        ],
        "parameters": [
          {
            "name": "roleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ClientRoleApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientRoleApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientRoleApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/Clients/{clientId}/roles": {
      "get": {
        "tags": [
          "Clients"
        ],
        "parameters": [
          {
            "name": "clientId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/RoleRepresentationListApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoleRepresentationListApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoleRepresentationListApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/CompanyUsers": {
      "get": {
        "tags": [
          "CompanyUsers"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "CompanyUsers"
        ],
        "parameters": [
          {
            "name": "Client_ID",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyUserRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyUserRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CompanyUserRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/StringApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StringApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/StringApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/CompanyUsers/UserRoles": {
      "post": {
        "tags": [
          "CompanyUsers"
        ],
        "parameters": [
          {
            "name": "Client_ID",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateUserRolesRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateUserRolesRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateUserRolesRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/StringApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StringApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/StringApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/PermissionManager/GetPermissionsForCurrentUser": {
      "get": {
        "tags": [
          "PermissionManager"
        ],
        "parameters": [
          {
            "name": "Client_ID",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/PermissionManager/GetPermissionsForCurrentUserByModule/{ModuleName}": {
      "get": {
        "tags": [
          "PermissionManager"
        ],
        "parameters": [
          {
            "name": "ModuleName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Client_ID",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/PermissionManager/GetClientRoles": {
      "get": {
        "tags": [
          "PermissionManager"
        ],
        "parameters": [
          {
            "name": "Client_ID",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/PermissionManager/GetRolePermissions/{RoleID}": {
      "get": {
        "tags": [
          "PermissionManager"
        ],
        "parameters": [
          {
            "name": "RoleID",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/PermissionManager/GetRolePermissionActions/{RoleID}": {
      "get": {
        "tags": [
          "PermissionManager"
        ],
        "parameters": [
          {
            "name": "RoleID",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/PermissionManager/CreateOrUpdateRolePermissions": {
      "post": {
        "tags": [
          "PermissionManager"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRolesPermissionsRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRolesPermissionsRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRolesPermissionsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/PermissionManager/CreateOrUpdatePermissionActions": {
      "post": {
        "tags": [
          "PermissionManager"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateOrUpdatePermissionActionRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateOrUpdatePermissionActionRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateOrUpdatePermissionActionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/SupportManager/GetCompanyUsers/{companyCode}": {
      "get": {
        "tags": [
          "SupportManager"
        ],
        "parameters": [
          {
            "name": "companyCode",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/SupportManager/ResetUserPassword/{userId}": {
      "put": {
        "tags": [
          "SupportManager"
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/Users": {
      "post": {
        "tags": [
          "Users"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateUserRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateUserRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateUserRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/StringApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StringApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/StringApiResponse"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Users"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/Users/with-roles": {
      "post": {
        "tags": [
          "Users"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateUserWithRolesRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateUserWithRolesRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateUserWithRolesRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/StringApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StringApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/StringApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/Users/{userId}/password": {
      "put": {
        "tags": [
          "Users"
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetPasswordRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SetPasswordRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SetPasswordRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/Users/{userId}/groups/{groupId}": {
      "post": {
        "tags": [
          "Users"
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "groupId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/Users/{userId}/clients/{clientId}/roles": {
      "post": {
        "tags": [
          "Users"
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "clientId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "text/json": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "application/*+json": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/Users/bulk": {
      "post": {
        "tags": [
          "Users"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/CreateUserRequest"
                }
              }
            },
            "text/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/CreateUserRequest"
                }
              }
            },
            "application/*+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/CreateUserRequest"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/BulkUserResultListApiResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BulkUserResultListApiResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/BulkUserResultListApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/Users/{id}": {
      "get": {
        "tags": [
          "Users"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/KeycloakUser"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KeycloakUser"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/KeycloakUser"
                }
              }
            }
          }
        }
      }
    },
    "/api/Users/search": {
      "get": {
        "tags": [
          "Users"
        ],
        "parameters": [
          {
            "name": "term",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/KeycloakUser"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/KeycloakUser"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/KeycloakUser"
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "BooleanApiResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "message": {
            "type": "string",
            "nullable": true
          },
          "data": {
            "type": "boolean"
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "statusCode": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "BulkUserResult": {
        "type": "object",
        "properties": {
          "username": {
            "type": "string",
            "nullable": true
          },
          "success": {
            "type": "boolean"
          },
          "message": {
            "type": "string",
            "nullable": true
          },
          "userId": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "BulkUserResultListApiResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "message": {
            "type": "string",
            "nullable": true
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BulkUserResult"
            },
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "statusCode": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "Client": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "created_By": {
            "type": "string",
            "nullable": true
          },
          "created_At": {
            "type": "string",
            "format": "date-time"
          },
          "keyCloakClientId": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ClientRole": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "created_By": {
            "type": "string",
            "nullable": true
          },
          "created_At": {
            "type": "string",
            "format": "date-time"
          },
          "clientID": {
            "type": "string",
            "format": "uuid"
          },
          "client": {
            "$ref": "#/components/schemas/Client"
          },
          "keyCloakClientId": {
            "type": "string",
            "nullable": true
          },
          "roleName": {
            "type": "string",
            "nullable": true
          },
          "role": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ClientRoleApiResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "message": {
            "type": "string",
            "nullable": true
          },
          "data": {
            "$ref": "#/components/schemas/ClientRole"
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "statusCode": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "CompanyUserRequest": {
        "required": [
          "companyCode",
          "fullName",
          "password",
          "username"
        ],
        "type": "object",
        "properties": {
          "username": {
            "minLength": 1,
            "type": "string"
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "firstName": {
            "type": "string",
            "nullable": true
          },
          "lastName": {
            "type": "string",
            "nullable": true
          },
          "fullName": {
            "minLength": 1,
            "type": "string"
          },
          "password": {
            "minLength": 1,
            "type": "string"
          },
          "temporaryPassword": {
            "type": "boolean"
          },
          "companyCode": {
            "minLength": 1,
            "type": "string"
          },
          "companyName": {
            "type": "string",
            "nullable": true
          },
          "clientID": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CreateOrUpdatePermissionActionRequest": {
        "type": "object",
        "properties": {
          "roleId": {
            "type": "string",
            "format": "uuid"
          },
          "actions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PermissionActionRequest"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CreateRoleRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CreateRolesPermissionsRequest": {
        "type": "object",
        "properties": {
          "selectedRoleID": {
            "type": "string",
            "format": "uuid"
          },
          "selectedPermissionsList": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CreateUserRequest": {
        "type": "object",
        "properties": {
          "username": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "firstName": {
            "type": "string",
            "nullable": true
          },
          "lastName": {
            "type": "string",
            "nullable": true
          },
          "password": {
            "type": "string",
            "nullable": true
          },
          "temporaryPassword": {
            "type": "boolean"
          },
          "customFields": {
            "$ref": "#/components/schemas/CustomUserFields"
          }
        },
        "additionalProperties": false
      },
      "CreateUserRolesRequest": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "format": "uuid"
          },
          "roles": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CreateUserWithRolesRequest": {
        "type": "object",
        "properties": {
          "username": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "firstName": {
            "type": "string",
            "nullable": true
          },
          "lastName": {
            "type": "string",
            "nullable": true
          },
          "password": {
            "type": "string",
            "nullable": true
          },
          "temporaryPassword": {
            "type": "boolean"
          },
          "customFields": {
            "$ref": "#/components/schemas/CustomUserFields"
          },
          "realmRoles": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "clientRoles": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CustomUserFields": {
        "type": "object",
        "properties": {
          "companycode": {
            "type": "string",
            "nullable": true
          },
          "phoneNumber": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "GetRefreshTokenRequest": {
        "type": "object",
        "properties": {
          "refreshToken": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "KeycloakCredential": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "nullable": true
          },
          "value": {
            "type": "string",
            "nullable": true
          },
          "temporary": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "KeycloakUser": {
        "type": "object",
        "properties": {
          "username": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "firstName": {
            "type": "string",
            "nullable": true
          },
          "lastName": {
            "type": "string",
            "nullable": true
          },
          "enabled": {
            "type": "boolean"
          },
          "emailVerified": {
            "type": "boolean"
          },
          "credentials": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/KeycloakCredential"
            },
            "nullable": true
          },
          "attributes": {
            "type": "object",
            "additionalProperties": { },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "MenuActionsDTOs": {
        "type": "object",
        "properties": {
          "canCreate": {
            "type": "boolean"
          },
          "canDelete": {
            "type": "boolean"
          },
          "canEdit": {
            "type": "boolean"
          },
          "canView": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "PermissionActionRequest": {
        "type": "object",
        "properties": {
          "menuId": {
            "type": "string",
            "format": "uuid"
          },
          "permissionActions": {
            "$ref": "#/components/schemas/MenuActionsDTOs"
          }
        },
        "additionalProperties": false
      },
      "RevokeTokenRequest": {
        "type": "object",
        "properties": {
          "access_token": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "RoleRepresentation": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "composite": {
            "type": "boolean"
          },
          "clientRole": {
            "type": "boolean"
          },
          "containerId": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "RoleRepresentationListApiResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "message": {
            "type": "string",
            "nullable": true
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RoleRepresentation"
            },
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "statusCode": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "SetPasswordRequest": {
        "required": [
          "confirmPassword",
          "newPassword"
        ],
        "type": "object",
        "properties": {
          "newPassword": {
            "minLength": 8,
            "type": "string"
          },
          "confirmPassword": {
            "minLength": 1,
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "SignOutRequest": {
        "type": "object",
        "properties": {
          "refreshToken": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "StringApiResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "message": {
            "type": "string",
            "nullable": true
          },
          "data": {
            "type": "string",
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "statusCode": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "TokenRequest": {
        "required": [
          "password",
          "username"
        ],
        "type": "object",
        "properties": {
          "username": {
            "minLength": 1,
            "type": "string"
          },
          "password": {
            "minLength": 1,
            "type": "string"
          },
          "companyCode": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "Bearer": {
        "type": "http",
        "description": "Please enter a valid token",
        "scheme": "Bearer",
        "bearerFormat": "JWT"
      }
    }
  },
  "security": [
    {
      "Bearer": [ ]
    }
  ]
}