{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "properties": {
        "id": {
            "type": "string",
            "pattern": "^[A-Fa-f\\d]{24}$"
        },
        "userId": {
            "type": "string",
            "pattern": "^[A-Fa-f\\d]{24}$"
        },
        "creationDate": {
            "type": "string",
            "format": "date-time"
        },
        "lastUpdated": {
            "type": "string",
            "format": "date-time"
        },
        "passwordLastUpdated": {
            "type": "string",
            "format": "date-time"
        },
        "email": {
            "type": "string",
            "format": "email",
            "maxLength": 1024
        },
        "firstName": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1024
        },
        "lastName": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1024
        },
        "companyName": {
            "type": "string",
            "maxLength": 1024
        },
        "title": {
            "type": "string",
            "maxLength": 1024
        },
        "phoneNumber": {
            "type": "string",
            "maxLength": 1024
        },
        "location": {
            "type": "string",
            "maxLength": 1024
        },
        "url": {
            "type": "string",
            "maxLength": 1024
        },
        "tokenCutoff": {
            "type": "string",
            "format": "date-time"
        },
        "emailVerified": {
            "type": "boolean"
        },
        "twoFactorAuthEnabled": {
            "type": "boolean"
        },
        "fullName": {
            "type": "string"
        },
        "githubName": {
            "type": "string"
        },
        "twitterName": {
            "type": "string"
        },
        "avatarUrl": {
            "type": "string",
            "format": "url"
        },
        "limits": {
            "apitoken": {
                "type": "number"
            },
            "application": {
                "type": "number"
            },
            "applicationkey": {
                "type": "number"
            },
            "dashboard": {
                "type": "number"
            },
            "datatable": {
                "type": "number"
            },
            "device": {
                "type": "number"
            },
            "devicerecipe": {
                "type": "number"
            },
            "experiencedomain": {
                "type": "number"
            },
            "experienceendpoint": {
                "type": "number"
            },
            "experiencegroup": {
                "type": "number"
            },
            "experienceslug": {
                "type": "number"
            },
            "experienceuser": {
                "type": "number"
            },
            "experienceversion": {
                "type": "number"
            },
            "experienceview": {
                "type": "number"
            },
            "file": {
                "type": "number"
            },
            "flow": {
                "type": "number"
            },
            "integration": {
                "type": "number"
            },
            "notebook": {
                "type": "number"
            },
            "webhook": {
                "type": "number"
            },
            "dataTTL": {
                "type": "number"
            },
            "payload": {
                "type": "number"
            },
            "notebookMinutesPerRun": {
                "type": "number"
            },
            "notebookMinutesPerMonth": {
                "type": "number"
            },
            "notebookInParallel": {
                "type": "number"
            }
        },
        "recentDashboards": {
            "title": "Recent Item List",
            "description": "Schema for an array of recent items",
            "type": "object",
            "properties": {
                "itemType": {
                    "type": "string",
                    "enum": [
                        "application",
                        "device",
                        "flow",
                        "dashboard",
                        "organization"
                    ]
                },
                "parentId": {
                    "type": "string",
                    "pattern": "^[A-Fa-f\\d]{24}$"
                },
                "items": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string",
                                "pattern": "^[A-Fa-f\\d]{24}$"
                            },
                            "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 255
                            }
                        }
                    }
                }
            }
        },
        "recentApplications": {
            "title": "Recent Item List",
            "description": "Schema for an array of recent items",
            "type": "object",
            "properties": {
                "itemType": {
                    "type": "string",
                    "enum": [
                        "application",
                        "device",
                        "flow",
                        "dashboard",
                        "organization"
                    ]
                },
                "parentId": {
                    "type": "string",
                    "pattern": "^[A-Fa-f\\d]{24}$"
                },
                "items": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string",
                                "pattern": "^[A-Fa-f\\d]{24}$"
                            },
                            "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 255
                            }
                        }
                    }
                }
            }
        },
        "recentOrganizations": {
            "title": "Recent Item List",
            "description": "Schema for an array of recent items",
            "type": "object",
            "properties": {
                "itemType": {
                    "type": "string",
                    "enum": [
                        "application",
                        "device",
                        "flow",
                        "dashboard",
                        "organization"
                    ]
                },
                "parentId": {
                    "type": "string",
                    "pattern": "^[A-Fa-f\\d]{24}$"
                },
                "items": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string",
                                "pattern": "^[A-Fa-f\\d]{24}$"
                            },
                            "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 255
                            }
                        }
                    }
                }
            }
        },
        "summary": {
            "type": "object",
            "properties": {
                "apiTokenCount": {
                    "type": "number"
                },
                "appCount": {
                    "type": "number"
                },
                "dashCount": {
                    "type": "number"
                },
                "dataTableCount": {
                    "type": "number"
                },
                "deviceCount": {
                    "type": "number"
                },
                "deviceRecipeCount": {
                    "type": "number"
                },
                "experienceEndpointCount": {
                    "type": "number"
                },
                "experienceGroupCount": {
                    "type": "number"
                },
                "experienceSlugCount": {
                    "type": "number"
                },
                "experienceUserCount": {
                    "type": "number"
                },
                "experienceVersionCount": {
                    "type": "number"
                },
                "experienceViewCount": {
                    "type": "number"
                },
                "fileCount": {
                    "type": "number"
                },
                "flowCount": {
                    "type": "number"
                },
                "integrationCount": {
                    "type": "number"
                },
                "keyCount": {
                    "type": "number"
                },
                "orgCount": {
                    "type": "number"
                },
                "payloadCount": {
                    "title": "Payload Counts",
                    "description": "Schema for the result of a payload count request",
                    "type": "object",
                    "properties": {
                        "mqttOut": {
                            "type": "object",
                            "patternProperties": {
                                ".*": {
                                    "type": "number"
                                }
                            }
                        },
                        "mqttIn": {
                            "type": "object",
                            "patternProperties": {
                                ".*": {
                                    "type": "number"
                                }
                            }
                        },
                        "dataTable": {
                            "type": "object",
                            "patternProperties": {
                                ".*": {
                                    "type": "number"
                                }
                            }
                        },
                        "deviceState": {
                            "type": "object",
                            "patternProperties": {
                                ".*": {
                                    "type": "number"
                                }
                            }
                        },
                        "deviceCommand": {
                            "type": "object",
                            "patternProperties": {
                                ".*": {
                                    "type": "number"
                                }
                            }
                        },
                        "webhook": {
                            "type": "object",
                            "patternProperties": {
                                ".*": {
                                    "type": "number"
                                }
                            }
                        },
                        "timer": {
                            "type": "object",
                            "patternProperties": {
                                ".*": {
                                    "type": "number"
                                }
                            }
                        },
                        "event": {
                            "type": "object",
                            "patternProperties": {
                                ".*": {
                                    "type": "number"
                                }
                            }
                        },
                        "virtualButton": {
                            "type": "object",
                            "patternProperties": {
                                ".*": {
                                    "type": "number"
                                }
                            }
                        },
                        "deviceConnect": {
                            "type": "object",
                            "patternProperties": {
                                ".*": {
                                    "type": "number"
                                }
                            }
                        },
                        "deviceDisconnect": {
                            "type": "object",
                            "patternProperties": {
                                ".*": {
                                    "type": "number"
                                }
                            }
                        },
                        "endpoint": {
                            "type": "object",
                            "patternProperties": {
                                ".*": {
                                    "type": "number"
                                }
                            }
                        },
                        "integration": {
                            "type": "object",
                            "patternProperties": {
                                ".*": {
                                    "type": "number"
                                }
                            }
                        }
                    }
                },
                "storageStats": {
                    "type": "object",
                    "properties": {
                        "count": {
                            "type": "number"
                        },
                        "size": {
                            "type": "number"
                        }
                    }
                },
                "webhookCount": {
                    "type": "number"
                }
            }
        },
        "currentPeriodStart": {
            "type": "string",
            "format": "date-time"
        },
        "currentPeriodEnd": {
            "type": "string",
            "format": "date-time"
        },
        "ssoLinked": {
            "type": "boolean"
        }
    }
}