appwrite-utils
Version:
635 lines (634 loc) • 23.4 kB
JavaScript
// AUTO-GENERATED from Appwrite OpenAPI spec at main. DO NOT EDIT.
// Source: https://github.com/appwrite/appwrite/tree/main/app/config/specs
import { z } from "zod";
const UsageSiteJsonSchema = {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"range": {
"type": "string",
"x-example": "30d",
"description": "The time range of the usage stats."
},
"deploymentsTotal": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"x-example": 0,
"description": "Total aggregated number of function deployments."
},
"deploymentsStorageTotal": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"x-example": 0,
"description": "Total aggregated sum of function deployments storage."
},
"buildsTotal": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"x-example": 0,
"description": "Total aggregated number of function builds."
},
"buildsSuccessTotal": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"x-example": 0,
"description": "Total aggregated number of successful function builds."
},
"buildsFailedTotal": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"x-example": 0,
"description": "Total aggregated number of failed function builds."
},
"buildsStorageTotal": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"x-example": 0,
"description": "total aggregated sum of function builds storage."
},
"buildsTimeTotal": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"x-example": 0,
"description": "Total aggregated sum of function builds compute time."
},
"buildsTimeAverage": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"x-example": 0,
"description": "Average builds compute time."
},
"buildsMbSecondsTotal": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"x-example": 0,
"description": "Total aggregated sum of function builds mbSeconds."
},
"executionsTotal": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"x-example": 0,
"description": "Total aggregated number of function executions."
},
"executionsTimeTotal": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"x-example": 0,
"description": "Total aggregated sum of function executions compute time."
},
"executionsMbSecondsTotal": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"x-example": 0,
"description": "Total aggregated sum of function executions mbSeconds."
},
"deployments": {
"type": "array",
"items": {
"type": "object",
"properties": {
"value": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"x-example": 1,
"description": "The value of this metric at the timestamp."
},
"date": {
"type": "string",
"x-example": "2020-10-15T06:38:00.000+00:00",
"description": "The date at which this metric was aggregated in ISO 8601 format."
}
},
"required": [
"value",
"date"
],
"additionalProperties": {},
"example": {
"value": 1,
"date": "2020-10-15T06:38:00.000+00:00"
},
"description": "Metric"
},
"x-example": [],
"description": "Aggregated number of function deployments per period."
},
"deploymentsStorage": {
"type": "array",
"items": {
"type": "object",
"properties": {
"value": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"x-example": 1,
"description": "The value of this metric at the timestamp."
},
"date": {
"type": "string",
"x-example": "2020-10-15T06:38:00.000+00:00",
"description": "The date at which this metric was aggregated in ISO 8601 format."
}
},
"required": [
"value",
"date"
],
"additionalProperties": {},
"example": {
"value": 1,
"date": "2020-10-15T06:38:00.000+00:00"
},
"description": "Metric"
},
"x-example": [],
"description": "Aggregated number of function deployments storage per period."
},
"builds": {
"type": "array",
"items": {
"type": "object",
"properties": {
"value": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"x-example": 1,
"description": "The value of this metric at the timestamp."
},
"date": {
"type": "string",
"x-example": "2020-10-15T06:38:00.000+00:00",
"description": "The date at which this metric was aggregated in ISO 8601 format."
}
},
"required": [
"value",
"date"
],
"additionalProperties": {},
"example": {
"value": 1,
"date": "2020-10-15T06:38:00.000+00:00"
},
"description": "Metric"
},
"x-example": [],
"description": "Aggregated number of function builds per period."
},
"buildsStorage": {
"type": "array",
"items": {
"type": "object",
"properties": {
"value": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"x-example": 1,
"description": "The value of this metric at the timestamp."
},
"date": {
"type": "string",
"x-example": "2020-10-15T06:38:00.000+00:00",
"description": "The date at which this metric was aggregated in ISO 8601 format."
}
},
"required": [
"value",
"date"
],
"additionalProperties": {},
"example": {
"value": 1,
"date": "2020-10-15T06:38:00.000+00:00"
},
"description": "Metric"
},
"x-example": [],
"description": "Aggregated sum of function builds storage per period."
},
"buildsTime": {
"type": "array",
"items": {
"type": "object",
"properties": {
"value": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"x-example": 1,
"description": "The value of this metric at the timestamp."
},
"date": {
"type": "string",
"x-example": "2020-10-15T06:38:00.000+00:00",
"description": "The date at which this metric was aggregated in ISO 8601 format."
}
},
"required": [
"value",
"date"
],
"additionalProperties": {},
"example": {
"value": 1,
"date": "2020-10-15T06:38:00.000+00:00"
},
"description": "Metric"
},
"x-example": [],
"description": "Aggregated sum of function builds compute time per period."
},
"buildsMbSeconds": {
"type": "array",
"items": {
"type": "object",
"properties": {
"value": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"x-example": 1,
"description": "The value of this metric at the timestamp."
},
"date": {
"type": "string",
"x-example": "2020-10-15T06:38:00.000+00:00",
"description": "The date at which this metric was aggregated in ISO 8601 format."
}
},
"required": [
"value",
"date"
],
"additionalProperties": {},
"example": {
"value": 1,
"date": "2020-10-15T06:38:00.000+00:00"
},
"description": "Metric"
},
"x-example": [],
"description": "Aggregated number of function builds mbSeconds per period."
},
"executions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"value": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"x-example": 1,
"description": "The value of this metric at the timestamp."
},
"date": {
"type": "string",
"x-example": "2020-10-15T06:38:00.000+00:00",
"description": "The date at which this metric was aggregated in ISO 8601 format."
}
},
"required": [
"value",
"date"
],
"additionalProperties": {},
"example": {
"value": 1,
"date": "2020-10-15T06:38:00.000+00:00"
},
"description": "Metric"
},
"x-example": [],
"description": "Aggregated number of function executions per period."
},
"executionsTime": {
"type": "array",
"items": {
"type": "object",
"properties": {
"value": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"x-example": 1,
"description": "The value of this metric at the timestamp."
},
"date": {
"type": "string",
"x-example": "2020-10-15T06:38:00.000+00:00",
"description": "The date at which this metric was aggregated in ISO 8601 format."
}
},
"required": [
"value",
"date"
],
"additionalProperties": {},
"example": {
"value": 1,
"date": "2020-10-15T06:38:00.000+00:00"
},
"description": "Metric"
},
"x-example": [],
"description": "Aggregated number of function executions compute time per period."
},
"executionsMbSeconds": {
"type": "array",
"items": {
"type": "object",
"properties": {
"value": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"x-example": 1,
"description": "The value of this metric at the timestamp."
},
"date": {
"type": "string",
"x-example": "2020-10-15T06:38:00.000+00:00",
"description": "The date at which this metric was aggregated in ISO 8601 format."
}
},
"required": [
"value",
"date"
],
"additionalProperties": {},
"example": {
"value": 1,
"date": "2020-10-15T06:38:00.000+00:00"
},
"description": "Metric"
},
"x-example": [],
"description": "Aggregated number of function mbSeconds per period."
},
"buildsSuccess": {
"type": "array",
"items": {
"type": "object",
"properties": {
"value": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"x-example": 1,
"description": "The value of this metric at the timestamp."
},
"date": {
"type": "string",
"x-example": "2020-10-15T06:38:00.000+00:00",
"description": "The date at which this metric was aggregated in ISO 8601 format."
}
},
"required": [
"value",
"date"
],
"additionalProperties": {},
"example": {
"value": 1,
"date": "2020-10-15T06:38:00.000+00:00"
},
"description": "Metric"
},
"x-example": [],
"description": "Aggregated number of successful builds per period."
},
"buildsFailed": {
"type": "array",
"items": {
"type": "object",
"properties": {
"value": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"x-example": 1,
"description": "The value of this metric at the timestamp."
},
"date": {
"type": "string",
"x-example": "2020-10-15T06:38:00.000+00:00",
"description": "The date at which this metric was aggregated in ISO 8601 format."
}
},
"required": [
"value",
"date"
],
"additionalProperties": {},
"example": {
"value": 1,
"date": "2020-10-15T06:38:00.000+00:00"
},
"description": "Metric"
},
"x-example": [],
"description": "Aggregated number of failed builds per period."
},
"requestsTotal": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"x-example": 0,
"description": "Total aggregated number of requests."
},
"requests": {
"type": "array",
"items": {
"type": "object",
"properties": {
"value": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"x-example": 1,
"description": "The value of this metric at the timestamp."
},
"date": {
"type": "string",
"x-example": "2020-10-15T06:38:00.000+00:00",
"description": "The date at which this metric was aggregated in ISO 8601 format."
}
},
"required": [
"value",
"date"
],
"additionalProperties": {},
"example": {
"value": 1,
"date": "2020-10-15T06:38:00.000+00:00"
},
"description": "Metric"
},
"x-example": [],
"description": "Aggregated number of requests per period."
},
"inboundTotal": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"x-example": 0,
"description": "Total aggregated inbound bandwidth."
},
"inbound": {
"type": "array",
"items": {
"type": "object",
"properties": {
"value": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"x-example": 1,
"description": "The value of this metric at the timestamp."
},
"date": {
"type": "string",
"x-example": "2020-10-15T06:38:00.000+00:00",
"description": "The date at which this metric was aggregated in ISO 8601 format."
}
},
"required": [
"value",
"date"
],
"additionalProperties": {},
"example": {
"value": 1,
"date": "2020-10-15T06:38:00.000+00:00"
},
"description": "Metric"
},
"x-example": [],
"description": "Aggregated number of inbound bandwidth per period."
},
"outboundTotal": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"x-example": 0,
"description": "Total aggregated outbound bandwidth."
},
"outbound": {
"type": "array",
"items": {
"type": "object",
"properties": {
"value": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"x-example": 1,
"description": "The value of this metric at the timestamp."
},
"date": {
"type": "string",
"x-example": "2020-10-15T06:38:00.000+00:00",
"description": "The date at which this metric was aggregated in ISO 8601 format."
}
},
"required": [
"value",
"date"
],
"additionalProperties": {},
"example": {
"value": 1,
"date": "2020-10-15T06:38:00.000+00:00"
},
"description": "Metric"
},
"x-example": [],
"description": "Aggregated number of outbound bandwidth per period."
}
},
"required": [
"range",
"deploymentsTotal",
"deploymentsStorageTotal",
"buildsTotal",
"buildsSuccessTotal",
"buildsFailedTotal",
"buildsStorageTotal",
"buildsTimeTotal",
"buildsTimeAverage",
"buildsMbSecondsTotal",
"executionsTotal",
"executionsTimeTotal",
"executionsMbSecondsTotal",
"deployments",
"deploymentsStorage",
"builds",
"buildsStorage",
"buildsTime",
"buildsMbSeconds",
"executions",
"executionsTime",
"executionsMbSeconds",
"buildsSuccess",
"buildsFailed",
"requestsTotal",
"requests",
"inboundTotal",
"inbound",
"outboundTotal",
"outbound"
],
"additionalProperties": {},
"example": {
"range": "30d",
"deploymentsTotal": 0,
"deploymentsStorageTotal": 0,
"buildsTotal": 0,
"buildsSuccessTotal": 0,
"buildsFailedTotal": 0,
"buildsStorageTotal": 0,
"buildsTimeTotal": 0,
"buildsTimeAverage": 0,
"buildsMbSecondsTotal": 0,
"executionsTotal": 0,
"executionsTimeTotal": 0,
"executionsMbSecondsTotal": 0,
"deployments": [],
"deploymentsStorage": [],
"builds": [],
"buildsStorage": [],
"buildsTime": [],
"buildsMbSeconds": [],
"executions": [],
"executionsTime": [],
"executionsMbSeconds": [],
"buildsSuccess": [],
"buildsFailed": [],
"requestsTotal": 0,
"requests": [],
"inboundTotal": 0,
"inbound": [],
"outboundTotal": 0,
"outbound": []
},
"description": "UsageSite"
};
export const UsageSiteSchema = z.fromJSONSchema(UsageSiteJsonSchema);