{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "Flowable IDM API Schemas",
  "description": "JSON Schema definitions extracted from the Flowable IDM OpenAPI specification",
  "definitions": {
    "AccessTokenResponse": {
      "type": "object",
      "required": [
        "creationTime",
        "id",
        "name"
      ],
      "properties": {
        "id": {
          "type": "string",
          "description": "The id of the token"
        },
        "userId": {
          "type": "string",
          "description": "The id of the user that the token belongs to"
        },
        "tenantId": {
          "type": "string",
          "description": "The id of the tenant that the token belongs to"
        },
        "name": {
          "type": "string",
          "description": "The name of the token"
        },
        "description": {
          "type": "string",
          "description": "The description of the token"
        },
        "creationTime": {
          "type": "string",
          "description": "The creation time of the token in ISO 8601 format"
        },
        "expirationTime": {
          "type": "string",
          "description": "The expiry time of the token in ISO 8601 format"
        }
      },
      "description": "Response for an access token"
    },
    "AddGroupPrivilegeRequest": {
      "type": "object",
      "properties": {
        "groupId": {
          "type": "string"
        }
      }
    },
    "AddUserPrivilegeRequest": {
      "type": "object",
      "properties": {
        "userId": {
          "type": "string"
        }
      }
    },
    "Application": {
      "type": "object",
      "required": [
        "id",
        "name",
        "type"
      ],
      "properties": {
        "id": {
          "type": "string",
          "description": "The id of the application"
        },
        "name": {
          "type": "string",
          "description": "The name of the application"
        },
        "type": {
          "type": "string",
          "description": "The type of the application"
        },
        "url": {
          "type": "string",
          "description": "The public URL of the application"
        }
      },
      "description": "The applications that the user has access to"
    },
    "BasicPrivilegeResponse": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        }
      }
    },
    "ChangeUserLanguageRequest": {
      "type": "object",
      "properties": {
        "newLanguage": {
          "type": "string"
        }
      }
    },
    "ChangeUserPasswordRequest": {
      "type": "object",
      "properties": {
        "password": {
          "type": "string"
        },
        "repeatPassword": {
          "type": "string"
        }
      }
    },
    "ChangeUserThemeRequest": {
      "type": "object",
      "properties": {
        "newTheme": {
          "type": "string"
        }
      }
    },
    "ContactFilterResponse": {
      "type": "object",
      "required": [
        "defaultFilter",
        "id"
      ],
      "properties": {
        "id": {
          "type": "string",
          "description": "The id of the filter"
        },
        "labelKey": {
          "type": "string",
          "description": "The key for the label of filter"
        },
        "defaultLabelName": {
          "type": "string",
          "description": "The default name of the filter label"
        },
        "defaultFilter": {
          "type": "boolean",
          "description": "Flag indicating whether this filter is a default one"
        }
      },
      "description": "The response for the contact filters"
    },
    "CreateAccessTokenRequest": {
      "type": "object",
      "required": [
        "name"
      ],
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the token"
        },
        "description": {
          "type": "string",
          "description": "The description of the token"
        },
        "validFor": {
          "type": "string",
          "description": "A positive ISO 8601 duration for which the token should be valid for. Mutually exclusive with validFor"
        },
        "validUntil": {
          "type": "string",
          "description": "The ISO 8601 date until the token should be valid. Mutually exclusive with validFor"
        }
      },
      "description": "Request for creating an access token for a user"
    },
    "CreateAccessTokenResponse": {
      "type": "object",
      "required": [
        "creationTime",
        "id",
        "name",
        "value"
      ],
      "properties": {
        "id": {
          "type": "string",
          "description": "The id of the token"
        },
        "userId": {
          "type": "string",
          "description": "The id of the user that the token belongs to"
        },
        "tenantId": {
          "type": "string",
          "description": "The id of the tenant that the token belongs to"
        },
        "name": {
          "type": "string",
          "description": "The name of the token"
        },
        "description": {
          "type": "string",
          "description": "The description of the token"
        },
        "creationTime": {
          "type": "string",
          "description": "The creation time of the token in ISO 8601 format"
        },
        "expirationTime": {
          "type": "string",
          "description": "The expiry time of the token in ISO 8601 format"
        },
        "value": {
          "type": "string",
          "description": "The value of the token. This is only visible when the token is created. Afterwards it cannot be retrieved."
        }
      },
      "description": "Response for a newly created access token"
    },
    "CreateUserRequest": {
      "type": "object",
      "properties": {
        "firstName": {
          "type": "string"
        },
        "lastName": {
          "type": "string"
        },
        "displayName": {
          "type": "string"
        },
        "loginName": {
          "type": "string"
        },
        "email": {
          "type": "string"
        },
        "password": {
          "type": "string"
        },
        "repeatPassword": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "subType": {
          "type": "string"
        },
        "userDefinitionId": {
          "type": "string"
        },
        "userDefinitionKey": {
          "type": "string"
        },
        "state": {
          "type": "string"
        },
        "subState": {
          "type": "string"
        },
        "avatarId": {
          "type": "string"
        },
        "presence": {
          "type": "string"
        },
        "language": {
          "type": "string"
        },
        "theme": {
          "type": "string"
        },
        "tenantId": {
          "type": "string"
        },
        "identityInfo": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/EngineRestVariable"
          }
        },
        "groups": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "returnIdentityInfo": {
          "type": "boolean"
        }
      }
    },
    "CurrentUserResponse": {
      "type": "object",
      "required": [
        "creationTime",
        "id",
        "state"
      ],
      "properties": {
        "id": {
          "type": "string",
          "example": "john.doe",
          "description": "The id of the user"
        },
        "firstName": {
          "type": "string",
          "example": "John",
          "description": "The first name if the user"
        },
        "lastName": {
          "type": "string",
          "example": "Doe",
          "description": "The last name of the user"
        },
        "displayName": {
          "type": "string",
          "example": "John Doe",
          "description": "The display name of the user"
        },
        "email": {
          "type": "string",
          "example": "no-reply@flowable.org",
          "description": "The email of the user"
        },
        "tenantId": {
          "type": "string",
          "description": "The tenant id of the user"
        },
        "avatarId": {
          "type": "string",
          "example": "CON-111-11-11",
          "description": "The optional avatar if of the user."
        },
        "type": {
          "type": "string",
          "example": "default",
          "description": "The optional type of the user"
        },
        "subType": {
          "type": "string",
          "description": "The optional subType of the user"
        },
        "state": {
          "type": "string",
          "example": "ACTIVE",
          "description": "The state of the user"
        },
        "subState": {
          "type": "string",
          "example": "INITIALIZING",
          "description": "The optional sub state of the user"
        },
        "presence": {
          "type": "string",
          "example": "available",
          "description": "The optional presence state of the user. Known states: available, away, offline, out-of-office, snoozed"
        },
        "language": {
          "type": "string",
          "example": "en",
          "description": "The optional language for the user"
        },
        "theme": {
          "type": "string",
          "example": "flowable",
          "description": "The optional theme for the user"
        },
        "userDefinitionId": {
          "type": "string",
          "description": "The id of the user definition linked with this user"
        },
        "userDefinitionKey": {
          "type": "string",
          "description": "The key of the user definition linked with this user"
        },
        "userDefinitionName": {
          "type": "string",
          "description": "The name of the user definition linked with this user"
        },
        "creatorId": {
          "type": "string",
          "description": "The id of the user that created this user"
        },
        "creationTime": {
          "type": "string",
          "description": "The ISO8601 creation time of this user"
        },
        "updaterId": {
          "type": "string",
          "description": "The id of the user that last updated this user"
        },
        "updateTime": {
          "type": "string",
          "description": "The ISO8601 last update time of this user"
        },
        "groups": {
          "type": "array",
          "description": "Collection of all groups the user has a membership of",
          "items": {
            "$ref": "#/components/schemas/GroupResponse"
          }
        },
        "identityInfo": {
          "type": "array",
          "description": "Collection of all identity infos for the user",
          "items": {
            "$ref": "#/components/schemas/EngineRestVariable"
          }
        },
        "translations": {
          "type": "object",
          "description": "Map of translations for the user info",
          "additionalProperties": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          }
        },
        "allowedTabs": {
          "type": "array",
          "description": "The allowed tabs for the user",
          "uniqueItems": true,
          "items": {
            "type": "string"
          }
        },
        "allowedFeatures": {
          "type": "array",
          "description": "The allowed features for the current user",
          "uniqueItems": true,
          "items": {
            "type": "string"
          }
        },
        "memberGroups": {
          "type": "array",
          "description": "The member groups for the current user",
          "uniqueItems": true,
          "items": {
            "type": "string"
          }
        },
        "adminType": {
          "type": "string",
          "description": "The type of the admin user, if this user is an admin",
          "enum": [
            "superAdmin",
            "tenantAdmin"
          ]
        },
        "themeConfiguration": {
          "$ref": "#/components/schemas/CurrentUserThemeConfiguration"
        },
        "originalAuthentication": {
          "$ref": "#/components/schemas/OriginalAuthentication"
        },
        "availableApplications": {
          "type": "object",
          "description": "The available applications for the current user",
          "additionalProperties": {
            "$ref": "#/components/schemas/Application"
          }
        }
      },
      "description": "The response for a current user"
    },
    "CurrentUserThemeConfiguration": {
      "type": "object",
      "required": [
        "name",
        "options"
      ],
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the theme"
        },
        "options": {
          "type": "object",
          "description": "The options of the theme",
          "additionalProperties": {
            "type": "string"
          }
        }
      },
      "description": "The response for the current user theme configuration"
    },
    "DataResponse": {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "type": "object"
          }
        },
        "total": {
          "type": "integer",
          "format": "int64"
        },
        "start": {
          "type": "integer",
          "format": "int32"
        },
        "sort": {
          "type": "string"
        },
        "order": {
          "type": "string"
        },
        "size": {
          "type": "integer",
          "format": "int32"
        }
      }
    },
    "DataResponseAccessTokenResponse": {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/AccessTokenResponse"
          }
        },
        "total": {
          "type": "integer",
          "format": "int64"
        },
        "start": {
          "type": "integer",
          "format": "int32"
        },
        "sort": {
          "type": "string"
        },
        "order": {
          "type": "string"
        },
        "size": {
          "type": "integer",
          "format": "int32"
        }
      }
    },
    "DataResponseGroupResponse": {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/GroupResponse"
          }
        },
        "total": {
          "type": "integer",
          "format": "int64"
        },
        "start": {
          "type": "integer",
          "format": "int32"
        },
        "sort": {
          "type": "string"
        },
        "order": {
          "type": "string"
        },
        "size": {
          "type": "integer",
          "format": "int32"
        }
      }
    },
    "DataResponsePlatformUserResponse": {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/PlatformUserResponse"
          }
        },
        "total": {
          "type": "integer",
          "format": "int64"
        },
        "start": {
          "type": "integer",
          "format": "int32"
        },
        "sort": {
          "type": "string"
        },
        "order": {
          "type": "string"
        },
        "size": {
          "type": "integer",
          "format": "int32"
        }
      }
    },
    "DataResponsePrivilegeResponse": {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/PrivilegeResponse"
          }
        },
        "total": {
          "type": "integer",
          "format": "int64"
        },
        "start": {
          "type": "integer",
          "format": "int32"
        },
        "sort": {
          "type": "string"
        },
        "order": {
          "type": "string"
        },
        "size": {
          "type": "integer",
          "format": "int32"
        }
      }
    },
    "DataResponseTenantResponse": {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/TenantResponse"
          }
        },
        "total": {
          "type": "integer",
          "format": "int64"
        },
        "start": {
          "type": "integer",
          "format": "int32"
        },
        "sort": {
          "type": "string"
        },
        "order": {
          "type": "string"
        },
        "size": {
          "type": "integer",
          "format": "int32"
        }
      }
    },
    "DataResponseUserAccountResponse": {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/UserAccountResponse"
          }
        },
        "total": {
          "type": "integer",
          "format": "int64"
        },
        "start": {
          "type": "integer",
          "format": "int32"
        },
        "sort": {
          "type": "string"
        },
        "order": {
          "type": "string"
        },
        "size": {
          "type": "integer",
          "format": "int32"
        }
      }
    },
    "DataResponseUserDefinitionResponse": {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/UserDefinitionResponse"
          }
        },
        "total": {
          "type": "integer",
          "format": "int64"
        },
        "start": {
          "type": "integer",
          "format": "int32"
        },
        "sort": {
          "type": "string"
        },
        "order": {
          "type": "string"
        },
        "size": {
          "type": "integer",
          "format": "int32"
        }
      }
    },
    "EngineInfoResponse": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "example": "default"
        },
        "resourceUrl": {
          "type": "string",
          "example": "file://flowable/flowable.cfg.xml"
        },
        "exception": {
          "type": "string",
          "example": "null"
        },
        "version": {
          "type": "string",
          "example": "6.3.1"
        }
      }
    },
    "EngineRestVariable": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "example": "myVariable",
          "description": "Name of the variable"
        },
        "type": {
          "type": "string",
          "example": "string",
          "description": "Type of the variable."
        },
        "value": {
          "type": "object",
          "example": "test",
          "description": "Value of the variable."
        },
        "valueUrl": {
          "type": "string",
          "example": "http://...."
        }
      }
    },
    "FileSystem": {
      "type": "object",
      "properties": {
        "open": {
          "type": "boolean"
        },
        "readOnly": {
          "type": "boolean"
        },
        "separator": {
          "type": "string"
        },
        "rootDirectories": {
          "$ref": "#/components/schemas/IterablePath"
        },
        "fileStores": {
          "$ref": "#/components/schemas/IterableFileStore"
        },
        "userPrincipalLookupService": {
          "$ref": "#/components/schemas/UserPrincipalLookupService"
        }
      }
    },
    "GroupQueryRequest": {
      "type": "object",
      "properties": {
        "start": {
          "type": "integer",
          "format": "int32"
        },
        "size": {
          "type": "integer",
          "format": "int32"
        },
        "sort": {
          "type": "string"
        },
        "order": {
          "type": "string"
        },
        "id": {
          "type": "string",
          "description": "Only return groups with the given id."
        },
        "ids": {
          "type": "array",
          "description": "Only return groups with the given ids.",
          "items": {
            "type": "string"
          }
        },
        "key": {
          "type": "string",
          "description": "Only return groups with the given key."
        },
        "keys": {
          "type": "array",
          "description": "Only return groups with the given keys.",
          "items": {
            "type": "string"
          }
        },
        "name": {
          "type": "string",
          "description": "Only return groups with the given name."
        },
        "nameLike": {
          "type": "string",
          "description": "Only return groups with a name like the given value."
        },
        "nameLikeIgnoreCase": {
          "type": "string",
          "description": "Only return groups with a name like the given value ignoring case."
        },
        "type": {
          "type": "string",
          "description": "Only return groups with a name like the given type."
        },
        "member": {
          "type": "string",
          "description": "Only return groups which have a member with the given username."
        },
        "members": {
          "type": "array",
          "description": "Only return groups which have members with the given usernames.",
          "items": {
            "type": "string"
          }
        },
        "includeIdentityInfo": {
          "type": "boolean",
          "description": "Include the group identity info in the response."
        },
        "tenantId": {
          "type": "string",
          "description": "Only return groups with the given tenant ID."
        }
      },
      "description": "Request that is used for querying groups."
    },
    "GroupRequest": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "example": "testgroup"
        },
        "url": {
          "type": "string",
          "example": "http://localhost:8182/groups/groupId"
        },
        "name": {
          "type": "string",
          "example": "Test group"
        },
        "type": {
          "type": "string",
          "example": "Test type"
        },
        "key": {
          "type": "string",
          "example": "testgroup"
        },
        "tenantId": {
          "type": "string",
          "example": "testtenant"
        },
        "users": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "privileges": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "identityInfo": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/EngineRestVariable"
          }
        },
        "returnIdentityInfo": {
          "type": "boolean"
        },
        "nameChanged": {
          "type": "boolean"
        },
        "typeChanged": {
          "type": "boolean"
        }
      }
    },
    "GroupResponse": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "example": "testgroup"
        },
        "url": {
          "type": "string",
          "example": "http://localhost:8182/groups/groupId"
        },
        "name": {
          "type": "string",
          "example": "Test group"
        },
        "type": {
          "type": "string",
          "example": "Test type"
        },
        "key": {
          "type": "string",
          "example": "testgroup"
        },
        "tenantId": {
          "type": "string",
          "example": "testtenant"
        },
        "users": {
          "type": "array",
          "description": "Collection of all users that have a membership with the group",
          "items": {
            "$ref": "#/components/schemas/UserResponse"
          }
        },
        "privileges": {
          "type": "array",
          "description": "Collection of all privileges for this group",
          "items": {
            "$ref": "#/components/schemas/BasicPrivilegeResponse"
          }
        },
        "identityInfo": {
          "type": "array",
          "description": "Collection of all identity infos for the group",
          "items": {
            "$ref": "#/components/schemas/EngineRestVariable"
          }
        }
      }
    },
    "InputStream": {
      "type": "object"
    },
    "Iterable": {
      "type": "object"
    },
    "IterableFileStore": {
      "type": "object"
    },
    "IterablePath": {
      "type": "object"
    },
    "JsonNode": {
      "type": "object",
      "properties": {
        "nodeType": {
          "type": "string",
          "enum": [
            "ARRAY",
            "BINARY",
            "BOOLEAN",
            "MISSING",
            "NULL",
            "NUMBER",
            "OBJECT",
            "POJO",
            "STRING"
          ]
        },
        "array": {
          "type": "boolean"
        },
        "": {
          "type": "boolean"
        },
        "float": {
          "type": "boolean"
        },
        "number": {
          "type": "boolean"
        },
        "valueNode": {
          "type": "boolean"
        },
        "missingNode": {
          "type": "boolean"
        },
        "object": {
          "type": "boolean"
        },
        "short": {
          "type": "boolean"
        },
        "double": {
          "type": "boolean"
        },
        "bigDecimal": {
          "type": "boolean"
        },
        "bigInteger": {
          "type": "boolean"
        },
        "textual": {
          "type": "boolean"
        },
        "boolean": {
          "type": "boolean"
        },
        "binary": {
          "type": "boolean"
        },
        "int": {
          "type": "boolean"
        },
        "pojo": {
          "type": "boolean"
        },
        "long": {
          "type": "boolean"
        },
        "containerNode": {
          "type": "boolean"
        },
        "integralNumber": {
          "type": "boolean"
        },
        "floatingPointNumber": {
          "type": "boolean"
        }
      }
    },
    "MembershipRequest": {
      "type": "object",
      "properties": {
        "userId": {
          "type": "string",
          "example": "kermit"
        }
      }
    },
    "MembershipResponse": {
      "type": "object",
      "properties": {
        "userId": {
          "type": "string",
          "example": "kermit"
        },
        "url": {
          "type": "string",
          "example": "http://localhost:8182/groups/sales/members/userId"
        },
        "groupId": {
          "type": "string",
          "example": "sales"
        }
      }
    },
    "OriginalAuthentication": {
      "type": "object",
      "required": [
        "id"
      ],
      "properties": {
        "id": {
          "type": "string",
          "description": "The id of the user doing the impersonation"
        }
      },
      "description": "The original authentication for a current user."
    },
    "Page": {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "type": "object"
          }
        },
        "size": {
          "type": "integer",
          "format": "int32"
        },
        "start": {
          "type": "integer",
          "format": "int32"
        },
        "total": {
          "type": "integer",
          "format": "int64"
        },
        "sort": {
          "type": "string"
        },
        "order": {
          "type": "string"
        }
      }
    },
    "PagePlatformUserResponse": {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/PlatformUserResponse"
          }
        },
        "size": {
          "type": "integer",
          "format": "int32"
        },
        "start": {
          "type": "integer",
          "format": "int32"
        },
        "total": {
          "type": "integer",
          "format": "int64"
        },
        "sort": {
          "type": "string"
        },
        "order": {
          "type": "string"
        }
      }
    },
    "Path": {
      "type": "object",
      "properties": {
        "absolute": {
          "type": "boolean"
        },
        "parent": {
          "$ref": "#/components/schemas/Path"
        },
        "root": {
          "$ref": "#/components/schemas/Path"
        },
        "fileName": {
          "$ref": "#/components/schemas/Path"
        },
        "fileSystem": {
          "$ref": "#/components/schemas/FileSystem"
        },
        "nameCount": {
          "type": "integer",
          "format": "int32"
        }
      }
    },
    "PlatformUserResponse": {
      "type": "object",
      "required": [
        "creationTime",
        "id",
        "state"
      ],
      "properties": {
        "id": {
          "type": "string",
          "example": "john.doe",
          "description": "The id of the user"
        },
        "firstName": {
          "type": "string",
          "example": "John",
          "description": "The first name if the user"
        },
        "lastName": {
          "type": "string",
          "example": "Doe",
          "description": "The last name of the user"
        },
        "displayName": {
          "type": "string",
          "example": "John Doe",
          "description": "The display name of the user"
        },
        "email": {
          "type": "string",
          "example": "no-reply@flowable.org",
          "description": "The email of the user"
        },
        "tenantId": {
          "type": "string",
          "description": "The tenant id of the user"
        },
        "avatarId": {
          "type": "string",
          "example": "CON-111-11-11",
          "description": "The optional avatar if of the user."
        },
        "type": {
          "type": "string",
          "example": "default",
          "description": "The optional type of the user"
        },
        "subType": {
          "type": "string",
          "description": "The optional subType of the user"
        },
        "state": {
          "type": "string",
          "example": "ACTIVE",
          "description": "The state of the user"
        },
        "subState": {
          "type": "string",
          "example": "INITIALIZING",
          "description": "The optional sub state of the user"
        },
        "presence": {
          "type": "string",
          "example": "available",
          "description": "The optional presence state of the user. Known states: available, away, offline, out-of-office, snoozed"
        },
        "language": {
          "type": "string",
          "example": "en",
          "description": "The optional language for the user"
        },
        "theme": {
          "type": "string",
          "example": "flowable",
          "description": "The optional theme for the user"
        },
        "userDefinitionId": {
          "type": "string",
          "description": "The id of the user definition linked with this user"
        },
        "userDefinitionKey": {
          "type": "string",
          "description": "The key of the user definition linked with this user"
        },
        "userDefinitionName": {
          "type": "string",
          "description": "The name of the user definition linked with this user"
        },
        "creatorId": {
          "type": "string",
          "description": "The id of the user that created this user"
        },
        "creationTime": {
          "type": "string",
          "description": "The ISO8601 creation time of this user"
        },
        "updaterId": {
          "type": "string",
          "description": "The id of the user that last updated this user"
        },
        "updateTime": {
          "type": "string",
          "description": "The ISO8601 last update time of this user"
        },
        "groups": {
          "type": "array",
          "description": "Collection of all groups the user has a membership of",
          "items": {
            "$ref": "#/components/schemas/GroupResponse"
          }
        },
        "identityInfo": {
          "type": "array",
          "description": "Collection of all identity infos for the user",
          "items": {
            "$ref": "#/components/schemas/EngineRestVariable"
          }
        },
        "translations": {
          "type": "object",
          "description": "Map of translations for the user info",
          "additionalProperties": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          }
        },
        "allowedTabs": {
          "type": "array",
          "description": "The allowed tabs for the user",
          "uniqueItems": true,
          "items": {
            "type": "string"
          }
        }
      },
      "description": "The response for a platform user"
    },
    "PrivilegeResponse": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "users": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/UserResponse"
          }
        },
        "groups": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/GroupResponse"
          }
        }
      }
    },
    "Resource": {
      "type": "object",
      "properties": {
        "open": {
          "type": "boolean"
        },
        "file": {
          "type": "string",
          "format": "binary"
        },
        "readable": {
          "type": "boolean"
        },
        "url": {
          "type": "string",
          "format": "url"
        },
        "filePath": {
          "$ref": "#/components/schemas/Path"
        },
        "filename": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "uri": {
          "type": "string",
          "format": "uri"
        },
        "contentAsByteArray": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "byte"
          }
        },
        "inputStream": {
          "$ref": "#/components/schemas/InputStream"
        }
      }
    },
    "SnoozeUserRequest": {
      "type": "object",
      "required": [
        "snoozeUntil"
      ],
      "properties": {
        "snoozeUntil": {
          "type": "string",
          "description": "The date until the user should be snoozed in ISO 8601 format"
        }
      },
      "description": "Request for snoozing the user"
    },
    "TenantResponse": {
      "type": "object",
      "required": [
        "id"
      ],
      "properties": {
        "id": {
          "type": "string",
          "example": "default",
          "description": "The id of the tenant"
        }
      },
      "description": "The response for a tenant"
    },
    "UpdateUserDefinitionRequest": {
      "type": "object",
      "properties": {
        "userDefinitionId": {
          "type": "string"
        },
        "userDefinitionKey": {
          "type": "string"
        },
        "tenantId": {
          "type": "string"
        }
      }
    },
    "UpdateUserPresenceRequest": {
      "type": "object",
      "required": [
        "presence"
      ],
      "properties": {
        "presence": {
          "type": "string",
          "description": "The presence that should be set on the user",
          "enum": [
            "available",
            "away",
            "offline",
            "out-of-office",
            "snoozed"
          ]
        },
        "tenantId": {
          "type": "string",
          "description": "The tenant id that should be used for updating the presence. Only admin users can modify this parameter"
        }
      },
      "description": "Request for updating user presence"
    },
    "UpdateUserRequest": {
      "type": "object",
      "properties": {
        "firstName": {
          "type": "string"
        },
        "lastName": {
          "type": "string"
        },
        "displayName": {
          "type": "string"
        },
        "email": {
          "type": "string"
        },
        "password": {
          "type": "string"
        },
        "repeatPassword": {
          "type": "string"
        },
        "avatarId": {
          "type": "string"
        },
        "language": {
          "type": "string"
        },
        "theme": {
          "type": "string"
        },
        "identityInfo": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/EngineRestVariable"
          }
        },
        "groups": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "returnIdentityInfo": {
          "type": "boolean"
        }
      }
    },
    "UpdateUserStateRequest": {
      "type": "object",
      "properties": {
        "state": {
          "type": "string"
        },
        "subState": {
          "type": "string"
        }
      }
    },
    "UserAccountResponse": {
      "type": "object",
      "required": [
        "creationTime",
        "id",
        "state",
        "subState",
        "subType",
        "type"
      ],
      "properties": {
        "id": {
          "type": "string",
          "description": "The unique id for the user account"
        },
        "userId": {
          "type": "string",
          "description": "The id of the user that this account belongs to"
        },
        "tenantId": {
          "type": "string",
          "description": "The id of the tenant that this user account belongs to"
        },
        "name": {
          "type": "string",
          "description": "Readable name of the account"
        },
        "type": {
          "type": "string",
          "example": "default, messenger",
          "description": "The type of the account"
        },
        "subType": {
          "type": "string",
          "example": "Facebook, WeChat, WhatsApp, Telegram, LINE",
          "description": "The sub-type of the account"
        },
        "state": {
          "type": "string",
          "description": "The state of the user account"
        },
        "subState": {
          "type": "string",
          "description": "The sub state of the user account"
        },
        "businessAccountId": {
          "type": "string",
          "example": "WhatsApp business number xyz or WeChat official account",
          "description": "The id of the business account id this user account is linked to"
        },
        "externalUserId": {
          "type": "string",
          "example": "The phone number if it is a WhatsApp account or the user-id for a facebook account, etc)",
          "description": "The id of the user within the external system"
        },
        "userAccountDefinitionId": {
          "type": "string",
          "description": "The id of the user account definition for this user account"
        },
        "creatorId": {
          "type": "string",
          "description": "The id of the user that created this account"
        },
        "creationTime": {
          "type": "string",
          "description": "The time of creation of this account"
        },
        "updaterId": {
          "type": "string",
          "description": "The id of the user that last updated the account"
        },
        "updateTime": {
          "type": "string",
          "description": "The time of the last update of this account"
        }
      }
    },
    "UserBaseInformationResponse": {
      "type": "object",
      "required": [
        "id"
      ],
      "properties": {
        "id": {
          "type": "string",
          "example": "john.doe",
          "description": "The id of the user"
        },
        "firstName": {
          "type": "string",
          "example": "John",
          "description": "The first name if the user"
        },
        "lastName": {
          "type": "string",
          "example": "Doe",
          "description": "The last name of the user"
        },
        "displayName": {
          "type": "string",
          "example": "John Doe",
          "description": "The display name of the user"
        },
        "avatarId": {
          "type": "string"
        }
      },
      "description": "The response for the User base information"
    },
    "UserBodyQueryRequest": {
      "type": "object",
      "properties": {
        "start": {
          "type": "integer",
          "format": "int32"
        },
        "size": {
          "type": "integer",
          "format": "int32"
        },
        "sort": {
          "type": "string"
        },
        "order": {
          "type": "string"
        },
        "id": {
          "type": "string",
          "description": "Only return users with the given id"
        },
        "ids": {
          "type": "array",
          "description": "Only return users that match the given ids",
          "items": {
            "type": "string"
          }
        },
        "idsNotIn": {
          "type": "array",
          "description": "Only return users that do not match the given ids",
          "items": {
            "type": "string"
          }
        },
        "firstName": {
          "type": "string",
          "description": "Only return users with the given first name"
        },
        "firstNameLike": {
          "type": "string",
          "description": "Only return users with first name like the given value"
        },
        "firstNameLikeIgnoreCase": {
          "type": "string",
          "description": "Only return users with first name like the given value ignoring case"
        },
        "lastName": {
          "type": "string",
          "description": "Only return users with the given last name"
        },
        "lastNameLike": {
          "type": "string",
          "description": "Only return users with last name like the given value"
        },
        "lastNameLikeIgnoreCase": {
          "type": "string",
          "description": "Only return users with last name like the given value ignoring case"
        },
        "displayName": {
          "type": "string",
          "description": "Only return users with the given display name"
        },
        "displayNameLike": {
          "type": "string",
          "description": "Only return users with display name like the given value"
        },
        "displayNameLikeIgnoreCase": {
          "type": "string",
          "description": "Only return users with display name like the given value ignoring case"
        },
        "fullNameLike": {
          "type": "string",
          "description": "Only return users with full name like the given value"
        },
        "fullNameLikeIgnoreCase": {
          "type": "string",
          "description": "Only return users with full name like the given value ignoring case"
        },
        "email": {
          "type": "string",
          "description": "Only return users with the given email"
        },
        "emailLike": {
          "type": "string",
          "description": "Only return users with email like the given value"
        },
        "state": {
          "type": "string",
          "description": "Only return users with the given state"
        },
        "subState": {
          "type": "string",
          "description": "Only return users with the given sub state"
        },
        "memberOfGroup": {
          "type": "string",
          "description": "Only return users that are member of the given group"
        },
        "memberOfGroups": {
          "type": "array",
          "description": "Only return users that are member of any of the given groups",
          "items": {
            "type": "string"
          }
        },
        "memberOfGroupKey": {
          "type": "string",
          "description": "Only return users that are member of the group with the given key"
        },
        "memberOfGroupKeys": {
          "type": "array",
          "description": "Only return users that are member of any of the groups with the given keys",
          "items": {
            "type": "string"
          }
        },
        "includeIdentityInfo": {
          "type": "boolean",
          "description": "Include the extra identity info for the users."
        },
        "tenantId": {
          "type": "string",
          "description": "Only return users within the given tenant. Only super admin users can modify this parameter, otherwise this is the user doing the request."
        },
        "accessibleByUser": {
          "type": "string",
          "description": "Only return users accessible by the given user. Only admin users can modify this parameter, otherwise this is the user doing the request."
        },
        "accessibleByUserDefinitionKey": {
          "type": "string",
          "description": "Only return users accessible by the given user definition. Only admin users can modify this parameter, otherwise this is the user definition of the user doing the request."
        },
        "usersOrGroups": {
          "$ref": "#/components/schemas/UsersOrGroups"
        }
      },
      "description": "Request that is used for querying users."
    },
    "UserDefinitionModelResponse": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "key": {
          "type": "string"
        },
        "initialState": {
          "type": "string"
        },
        "initialSubState": {
          "type": "string"
        },
        "initialUserType": {
          "type": "string"
        },
        "initialUserSubType": {
          "type": "string"
        },
        "icon": {
          "type": "string"
        },
        "forms": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "memberGroups": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "lookupGroups": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "dynamicLookupVariable": {
          "type": "string"
        },
        "allowedFeatures": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "type": "string"
          }
        },
        "actionPermissions": {
          "type": "object",
          "additionalProperties": {
            "type": "array",
            "uniqueItems": true,
            "items": {
              "type": "string"
            }
          }
        },
        "actionHandlers": {
          "type": "object",
          "additionalProperties": {
            "type": "object",
            "additionalProperties": {
              "type": "object"
            }
          }
        },
        "initialVariables": {
          "type": "object",
          "additionalProperties": {
            "type": "object"
          }
        },
        "restVariables": {
          "type": "object",
          "additionalProperties": {
            "type": "array",
            "uniqueItems": true,
            "items": {
              "type": "string"
            }
          }
        },
        "conversationFilters": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "contactFilters": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "UserDefinitionResponse": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "key": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "icon": {
          "type": "string"
        },
        "initFormKey": {
          "type": "string"
        },
        "viewFormKey": {
          "type": "string"
        },
        "editFormKey": {
          "type": "string"
        },
        "allowedFeatures": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "type": "string"
          }
        },
        "translations": {
          "type": "object",
          "additionalProperties": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          }
        },
        "tenantId": {
          "type": "string"
        }
      }
    },
    "UserPrincipalLookupService": {
      "type": "object"
    },
    "UserResponse": {
      "type": "object",
      "required": [
        "id"
      ],
      "properties": {
        "id": {
          "type": "string",
          "example": "john.doe",
          "description": "The id of the user"
        },
        "firstName": {
          "type": "string",
          "example": "John",
          "description": "The first name if the user"
        },
        "lastName": {
          "type": "string",
          "example": "Doe",
          "description": "The last name of the user"
        },
        "displayName": {
          "type": "string",
          "example": "John Doe",
          "description": "The display name of the user"
        },
        "email": {
          "type": "string",
          "example": "no-reply@flowable.org",
          "description": "The email of the user"
        },
        "tenantId": {
          "type": "string",
          "description": "The tenant id of the user"
        }
      },
      "description": "The response for the OSS User"
    },
    "UsersOrGroups": {
      "type": "object",
      "properties": {
        "userIds": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "groupKeys": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    }
  }
}