Files
codex/codex-rs/app-server-protocol/schema/json/v2/AccountRateLimitsUpdatedNotification.json
T

316 lines
6.4 KiB
JSON
Generated

{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"CreditsSnapshot": {
"properties": {
"balance": {
"type": [
"string",
"null"
]
},
"hasCredits": {
"type": "boolean"
},
"unlimited": {
"type": "boolean"
}
},
"required": [
"hasCredits",
"unlimited"
],
"type": "object"
},
"GroupSpendControlLimitSnapshot": {
"properties": {
"details": {
"$ref": "#/definitions/SpendControlLimitSnapshot"
},
"groupId": {
"type": "string"
},
"groupName": {
"type": "string"
}
},
"required": [
"details",
"groupId",
"groupName"
],
"type": "object"
},
"PlanType": {
"enum": [
"free",
"go",
"plus",
"pro",
"prolite",
"team",
"self_serve_business_usage_based",
"business",
"enterprise_cbp_usage_based",
"enterprise",
"edu",
"unknown"
],
"type": "string"
},
"RateLimitReachedType": {
"enum": [
"rate_limit_reached",
"workspace_owner_credits_depleted",
"workspace_member_credits_depleted",
"workspace_owner_usage_limit_reached",
"workspace_member_usage_limit_reached"
],
"type": "string"
},
"RateLimitSnapshot": {
"properties": {
"credits": {
"anyOf": [
{
"$ref": "#/definitions/CreditsSnapshot"
},
{
"type": "null"
}
]
},
"limitId": {
"type": [
"string",
"null"
]
},
"limitName": {
"type": [
"string",
"null"
]
},
"planType": {
"anyOf": [
{
"$ref": "#/definitions/PlanType"
},
{
"type": "null"
}
]
},
"primary": {
"anyOf": [
{
"$ref": "#/definitions/RateLimitWindow"
},
{
"type": "null"
}
]
},
"rateLimitReachedType": {
"anyOf": [
{
"$ref": "#/definitions/RateLimitReachedType"
},
{
"type": "null"
}
]
},
"secondary": {
"anyOf": [
{
"$ref": "#/definitions/RateLimitWindow"
},
{
"type": "null"
}
]
},
"spendControl": {
"anyOf": [
{
"$ref": "#/definitions/SpendControlSnapshot"
},
{
"type": "null"
}
]
}
},
"type": "object"
},
"RateLimitWindow": {
"properties": {
"resetsAt": {
"format": "int64",
"type": [
"integer",
"null"
]
},
"usedPercent": {
"format": "int32",
"type": "integer"
},
"windowDurationMins": {
"format": "int64",
"type": [
"integer",
"null"
]
}
},
"required": [
"usedPercent"
],
"type": "object"
},
"SpendControlLimitSnapshot": {
"properties": {
"limit": {
"type": "string"
},
"remaining": {
"type": "string"
},
"remainingPercent": {
"format": "int32",
"type": "integer"
},
"resetAfterSeconds": {
"format": "int32",
"type": "integer"
},
"resetAt": {
"format": "int32",
"type": "integer"
},
"used": {
"type": "string"
},
"usedPercent": {
"format": "int32",
"type": "integer"
}
},
"required": [
"limit",
"remaining",
"remainingPercent",
"resetAfterSeconds",
"resetAt",
"used",
"usedPercent"
],
"type": "object"
},
"SpendControlLimitType": {
"enum": [
"individual",
"group_default",
"workspace_default",
"role_budget",
"group_shared",
"workspace_shared"
],
"type": "string"
},
"SpendControlSnapshot": {
"properties": {
"groupDefaultLimit": {
"anyOf": [
{
"$ref": "#/definitions/GroupSpendControlLimitSnapshot"
},
{
"type": "null"
}
]
},
"groupSharedLimit": {
"anyOf": [
{
"$ref": "#/definitions/GroupSpendControlLimitSnapshot"
},
{
"type": "null"
}
]
},
"individualLimit": {
"anyOf": [
{
"$ref": "#/definitions/SpendControlLimitSnapshot"
},
{
"type": "null"
}
]
},
"reached": {
"type": "boolean"
},
"reachedLimitType": {
"anyOf": [
{
"$ref": "#/definitions/SpendControlLimitType"
},
{
"type": "null"
}
]
},
"roleBudgetLimit": {
"anyOf": [
{
"$ref": "#/definitions/SpendControlLimitSnapshot"
},
{
"type": "null"
}
]
},
"workspaceDefaultLimit": {
"anyOf": [
{
"$ref": "#/definitions/SpendControlLimitSnapshot"
},
{
"type": "null"
}
]
},
"workspaceSharedLimit": {
"anyOf": [
{
"$ref": "#/definitions/SpendControlLimitSnapshot"
},
{
"type": "null"
}
]
}
},
"required": [
"reached"
],
"type": "object"
}
},
"properties": {
"rateLimits": {
"$ref": "#/definitions/RateLimitSnapshot"
}
},
"required": [
"rateLimits"
],
"title": "AccountRateLimitsUpdatedNotification",
"type": "object"
}