{
"info": {
"title": "difflore Cloud API",
"version": "1.0.0",
"description": "Cloud API for difflore — Rules sync, team management, and billing."
},
"servers": [
{
"url": "https://difflore.dev/api"
}
],
"security": [
{
"bearerAuth": []
}
],
"components": {
"securitySchemes": {
"bearerAuth": {
"type": "http",
"scheme": "bearer"
}
},
"schemas": {
"Success": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
}
},
"required": [
"success"
]
},
"Count": {
"type": "object",
"properties": {
"total": {
"type": "number"
}
},
"required": [
"total"
]
},
"UserProfile": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"image": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"createdAt": {
"type": "string"
}
},
"required": [
"id",
"name",
"email",
"image",
"createdAt"
]
},
"Device": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"platform": {
"type": "string"
},
"lastSeenAt": {
"type": "string"
},
"createdAt": {
"type": "string"
}
},
"required": [
"id",
"name",
"platform",
"lastSeenAt",
"createdAt"
]
},
"RegisterDeviceResult": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"platform": {
"type": "string"
},
"createdAt": {
"type": "string"
},
"deviceToken": {
"type": "string"
}
},
"required": [
"id",
"name",
"platform",
"createdAt",
"deviceToken"
]
},
"AuthProviders": {
"type": "object",
"properties": {
"providers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"id",
"name"
]
}
}
},
"required": [
"providers"
]
},
"Plan": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"listPriceMonthly": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"maxEngineers": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"bestFor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"checkoutMonthlyLabel": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"checkoutYearlyLabel": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"features": {
"type": "array",
"items": {
"type": "object",
"properties": {
"icon": {
"type": "string"
},
"label": {
"type": "string"
}
},
"required": [
"icon",
"label"
]
}
},
"priceMonthly": {
"type": "number"
},
"priceYearly": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"cloudSync": {
"type": "boolean"
},
"teamFeatures": {
"type": "boolean"
},
"ruleAiGen": {
"type": "boolean"
}
},
"required": [
"id",
"name",
"description",
"listPriceMonthly",
"maxEngineers",
"bestFor",
"checkoutMonthlyLabel",
"checkoutYearlyLabel",
"features",
"priceMonthly",
"priceYearly",
"cloudSync",
"teamFeatures",
"ruleAiGen"
]
},
"BillingCurrent": {
"type": "object",
"properties": {
"planId": {
"type": "string"
},
"status": {
"type": "string"
},
"effectiveAccess": {
"enum": [
"active",
"expired"
],
"type": "string"
},
"billingInterval": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"currentPeriodEnd": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"ossGrant": {
"anyOf": [
{
"type": "object",
"properties": {
"isOssGrant": {
"type": "boolean"
},
"expiresAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"isOssGrant",
"expiresAt"
]
},
{
"type": "null"
}
]
}
},
"required": [
"planId",
"status",
"effectiveAccess",
"billingInterval",
"currentPeriodEnd",
"ossGrant"
]
},
"CheckoutResult": {
"type": "object",
"properties": {
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"url"
]
},
"ManageResult": {
"type": "object",
"properties": {
"url": {
"type": "string"
}
},
"required": [
"url"
]
},
"CancelResult": {
"type": "object",
"properties": {
"status": {
"type": "string"
},
"message": {
"type": "string"
},
"effectiveAt": {
"type": "string"
}
},
"required": [
"status",
"message",
"effectiveAt"
]
},
"Team": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"ownerId": {
"type": "string"
},
"maxSeats": {
"type": "number"
},
"githubOrg": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"candidateMinCount": {
"type": "number"
},
"candidateMinDistinctUsers": {
"type": "number"
},
"candidateLookbackDays": {
"type": "number"
},
"candidateEnabled": {
"type": "boolean"
},
"createdAt": {
"type": "string"
},
"isOssGrant": {
"type": "boolean"
},
"ossGrantExpiresAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"name",
"ownerId",
"maxSeats",
"githubOrg",
"candidateMinCount",
"candidateMinDistinctUsers",
"candidateLookbackDays",
"candidateEnabled",
"createdAt",
"isOssGrant",
"ossGrantExpiresAt"
]
},
"TeamMember": {
"type": "object",
"properties": {
"userId": {
"type": "string"
},
"name": {
"type": "string"
},
"email": {
"type": "string"
},
"image": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"role": {
"type": "string"
},
"joinedAt": {
"type": "string"
}
},
"required": [
"userId",
"name",
"email",
"image",
"role",
"joinedAt"
]
},
"Invite": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"email": {
"type": "string"
},
"role": {
"type": "string"
},
"expiresAt": {
"type": "string"
},
"createdAt": {
"type": "string"
}
},
"required": [
"id",
"email",
"role",
"expiresAt",
"createdAt"
]
},
"InviteResult": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"token": {
"type": "string"
},
"email": {
"type": "string"
},
"role": {
"type": "string"
},
"expiresAt": {
"type": "string"
}
},
"required": [
"id",
"token",
"email",
"role",
"expiresAt"
]
},
"AcceptInviteResult": {
"type": "object",
"properties": {
"teamId": {
"type": "string"
},
"role": {
"type": "string"
},
"alreadyMember": {
"type": "boolean"
}
},
"required": [
"teamId",
"role",
"alreadyMember"
]
},
"RuleSummary": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"type": {
"type": "string"
},
"description": {
"type": "string"
},
"version": {
"type": "string"
},
"engines": {
"type": "array",
"items": {
"type": "string"
}
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"trigger": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"checkPrompt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"visibility": {
"type": "string"
},
"filePatterns": {
"type": "array",
"items": {
"type": "string"
}
},
"sourceRepo": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"sourceAttribution": {
"anyOf": [
{
"type": "object",
"properties": {
"author": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"prNumber": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"repoFullName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"commentUrl": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"author",
"prNumber",
"repoFullName",
"commentUrl"
]
},
{
"type": "null"
}
]
},
"updatedAt": {
"type": "string"
},
"createdAt": {
"type": "string"
}
},
"required": [
"id",
"name",
"type",
"description",
"version",
"engines",
"tags",
"trigger",
"checkPrompt",
"visibility",
"filePatterns",
"sourceRepo",
"updatedAt",
"createdAt"
]
},
"RuleDetail": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"type": {
"type": "string"
},
"description": {
"type": "string"
},
"version": {
"type": "string"
},
"engines": {
"type": "array",
"items": {
"type": "string"
}
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"trigger": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"checkPrompt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"visibility": {
"type": "string"
},
"filePatterns": {
"type": "array",
"items": {
"type": "string"
}
},
"sourceRepo": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"sourceAttribution": {
"anyOf": [
{
"type": "object",
"properties": {
"author": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"prNumber": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"repoFullName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"commentUrl": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"author",
"prNumber",
"repoFullName",
"commentUrl"
]
},
{
"type": "null"
}
]
},
"updatedAt": {
"type": "string"
},
"createdAt": {
"type": "string"
},
"content": {
"type": "string"
},
"acceptedCount": {
"type": "number"
},
"citedCount": {
"type": "number"
},
"trustRate": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"reviewerProofReadyCount": {
"type": "number"
},
"sourceEvidence": {
"anyOf": [
{
"type": "object",
"properties": {
"extractionId": {
"type": "string"
},
"reviewId": {
"type": "string"
},
"repoFullName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"prNumber": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"prTitle": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"filePath": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"lineNumber": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"author": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"commentUrl": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"commentText": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"createdAtIso": {
"type": "string"
}
},
"required": [
"extractionId",
"reviewId",
"repoFullName",
"prNumber",
"prTitle",
"filePath",
"lineNumber",
"author",
"commentUrl",
"commentText",
"createdAtIso"
]
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"name",
"type",
"description",
"version",
"engines",
"tags",
"trigger",
"checkPrompt",
"visibility",
"filePatterns",
"sourceRepo",
"updatedAt",
"createdAt",
"content",
"acceptedCount",
"citedCount",
"trustRate",
"reviewerProofReadyCount"
]
},
"RuleSyncResult": {
"type": "object",
"properties": {
"created": {
"type": "array",
"items": {
"$ref": "#/components/schemas/RuleDetail"
}
},
"updated": {
"type": "array",
"items": {
"$ref": "#/components/schemas/RuleDetail"
}
},
"deleted": {
"type": "array",
"items": {
"type": "string"
}
},
"serverHashes": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "string"
}
},
"hashAlgorithm": {
"type": "string"
}
},
"required": [
"created",
"updated",
"deleted",
"serverHashes",
"hashAlgorithm"
]
},
"TeamRuleSummary": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"type": {
"type": "string"
},
"description": {
"type": "string"
},
"version": {
"type": "string"
},
"engines": {
"type": "array",
"items": {
"type": "string"
}
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"trigger": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"checkPrompt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"visibility": {
"type": "string"
},
"filePatterns": {
"type": "array",
"items": {
"type": "string"
}
},
"sourceRepo": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"sourceAttribution": {
"anyOf": [
{
"type": "object",
"properties": {
"author": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"prNumber": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"repoFullName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"commentUrl": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"author",
"prNumber",
"repoFullName",
"commentUrl"
]
},
{
"type": "null"
}
]
},
"updatedAt": {
"type": "string"
},
"createdAt": {
"type": "string"
},
"publishedInTeams": {
"type": "array",
"items": {
"type": "object",
"properties": {
"teamId": {
"type": "string"
},
"enforcement": {
"type": "string"
}
},
"required": [
"teamId",
"enforcement"
]
}
}
},
"required": [
"id",
"name",
"type",
"description",
"version",
"engines",
"tags",
"trigger",
"checkPrompt",
"visibility",
"filePatterns",
"sourceRepo",
"updatedAt",
"createdAt",
"publishedInTeams"
]
},
"SyncSettings": {
"type": "object",
"properties": {
"settings": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"updatedAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"settings",
"updatedAt"
]
},
"SyncProviders": {
"type": "object",
"properties": {
"providers": {
"anyOf": [
{
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"baseUrl": {
"type": "string",
"minLength": 1,
"maxLength": 2048
},
"maskedKey": {
"type": "string",
"maxLength": 32
},
"modelMapping": {
"type": "object",
"propertyNames": {
"type": "string",
"maxLength": 100
},
"additionalProperties": {
"type": "string",
"maxLength": 200
}
},
"updatedAt": {
"type": "string",
"maxLength": 50
}
},
"required": [
"name",
"baseUrl"
]
}
},
{
"type": "null"
}
]
},
"updatedAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"providers",
"updatedAt"
]
},
"ReviewSummary": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"provider": {
"type": "string"
},
"repoFullName": {
"type": "string"
},
"prNumber": {
"type": "number"
},
"prTitle": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"prDiffUrl": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"prUrl": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"createdAt": {
"type": "string"
},
"inputTokens": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"outputTokens": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"estimatedCostUsd": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"durationMs": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"perspectiveCount": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"pastVerdictsUsed": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"extractionCount": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"acceptedExtractionCount": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"commentCount": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"feedbackLearningSignals": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"id",
"provider",
"repoFullName",
"prNumber",
"prTitle",
"prDiffUrl",
"prUrl",
"createdAt"
]
},
"ReviewDetail": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"provider": {
"type": "string"
},
"repoFullName": {
"type": "string"
},
"prNumber": {
"type": "number"
},
"prTitle": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"prDiffUrl": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"prUrl": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"createdAt": {
"type": "string"
},
"inputTokens": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"outputTokens": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"estimatedCostUsd": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"durationMs": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"perspectiveCount": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"pastVerdictsUsed": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"extractionCount": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"acceptedExtractionCount": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"commentCount": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"feedbackLearningSignals": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"comments": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Comment"
}
}
},
"required": [
"id",
"provider",
"repoFullName",
"prNumber",
"prTitle",
"prDiffUrl",
"prUrl",
"createdAt",
"comments"
]
},
"Comment": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"prReviewId": {
"type": "string"
},
"eventType": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"filePath": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"lineNumber": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"content": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"author": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"sourceKind": {
"type": "string",
"minLength": 1,
"default": "human"
},
"commentUrl": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"threadId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"state": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"occurredAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"createdAt": {
"type": "string"
}
},
"required": [
"id",
"eventType",
"filePath",
"lineNumber",
"content",
"author",
"commentUrl",
"threadId",
"state",
"occurredAt",
"createdAt"
]
},
"Extraction": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"prReviewId": {
"type": "string"
},
"prReviewCommentId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"knowledgeType": {
"type": "string"
},
"title": {
"type": "string"
},
"content": {
"type": "string"
},
"confidence": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"filePatterns": {
"anyOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "null"
}
]
},
"status": {
"type": "string"
},
"isBaseline": {
"type": "boolean"
},
"shareScope": {
"enum": [
"self-repo",
"team-shared"
],
"type": "string"
},
"dismissReason": {
"anyOf": [
{
"enum": [
"too_specific",
"too_vague",
"wrong_scope",
"duplicate",
"hallucinated",
"not_team_rule",
"already_covered",
"low_priority",
"other"
],
"type": "string"
},
{
"type": "null"
}
]
},
"dismissNote": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"reviewedBy": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"reviewedAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"createdAt": {
"type": "string"
}
},
"required": [
"id",
"prReviewId",
"prReviewCommentId",
"knowledgeType",
"title",
"content",
"confidence",
"filePatterns",
"status",
"createdAt"
]
},
"ExtractionQualitySummary": {
"type": "object",
"properties": {
"sinceDays": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"exclusiveMinimum": 0
},
"total": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"draft": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"accepted": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"dismissed": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"reviewed": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"pendingReview": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"acceptRate": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"dismissRate": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"dismissReasons": {
"type": "array",
"items": {
"type": "object",
"properties": {
"reason": {
"enum": [
"too_specific",
"too_vague",
"wrong_scope",
"duplicate",
"hallucinated",
"not_team_rule",
"already_covered",
"low_priority",
"other"
],
"type": "string"
},
"count": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"share": {
"type": "number",
"minimum": 0,
"maximum": 1
}
},
"required": [
"reason",
"count",
"share"
]
}
},
"filePatternQuality": {
"type": "object",
"properties": {
"empty": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"projectWide": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"extensionOnly": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"pathSpecific": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"empty",
"projectWide",
"extensionOnly",
"pathSpecific"
]
},
"sourceBreakdown": {
"type": "array",
"items": {
"type": "object",
"properties": {
"sourceKind": {
"type": "string",
"minLength": 1,
"default": "human"
},
"total": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"draft": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"accepted": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"dismissed": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"reviewed": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"acceptRate": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"dismissRate": {
"type": "number",
"minimum": 0,
"maximum": 1
}
},
"required": [
"total",
"draft",
"accepted",
"dismissed",
"reviewed",
"acceptRate",
"dismissRate"
]
}
},
"lastExtractedAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"lastReviewedAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"sinceDays",
"total",
"draft",
"accepted",
"dismissed",
"reviewed",
"pendingReview",
"acceptRate",
"dismissRate",
"dismissReasons",
"filePatternQuality",
"sourceBreakdown",
"lastExtractedAt",
"lastReviewedAt"
]
},
"DashboardSummary": {
"type": "object",
"properties": {
"plan": {
"$ref": "#/components/schemas/DashboardPlan"
},
"ruleCount": {
"type": "number"
},
"deviceCount": {
"type": "number"
},
"readiness": {
"type": "object",
"properties": {
"hasLlmKey": {
"type": "boolean"
},
"githubInstallations": {
"type": "number"
},
"recentReviewAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"hasDraftExtractions": {
"type": "boolean"
}
},
"required": [
"hasLlmKey",
"githubInstallations",
"recentReviewAt",
"hasDraftExtractions"
]
},
"githubAppSlug": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"plan",
"ruleCount",
"deviceCount",
"readiness",
"githubAppSlug"
]
},
"DashboardPlan": {
"type": "object",
"properties": {
"planId": {
"type": "string"
},
"status": {
"type": "string"
},
"effectiveAccess": {
"enum": [
"active",
"expired"
],
"type": "string"
},
"billingInterval": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"currentPeriodEnd": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"planId",
"status",
"effectiveAccess",
"billingInterval",
"currentPeriodEnd"
]
},
"RuleGenResult": {
"type": "object",
"properties": {
"content": {
"type": "string"
},
"suggestedName": {
"type": "string"
}
},
"required": [
"content",
"suggestedName"
]
},
"EvaluateResult": {
"type": "object",
"properties": {
"results": {
"type": "array",
"items": {
"$ref": "#/components/schemas/EvalResult"
}
},
"summary": {
"type": "object",
"properties": {
"total": {
"type": "number"
},
"passed": {
"type": "number"
},
"failed": {
"type": "number"
},
"passRate": {
"type": "number"
}
},
"required": [
"total",
"passed",
"failed",
"passRate"
]
}
},
"required": [
"results",
"summary"
]
},
"EvalResult": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"testInput": {
"type": "string"
},
"expectedBehavior": {
"type": "string"
},
"actualResult": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"passed": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
]
},
"feedback": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"score": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"createdAt": {
"type": "string"
}
},
"required": [
"id",
"testInput",
"expectedBehavior",
"actualResult",
"passed",
"feedback",
"score"
]
},
"AuditLog": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"action": {
"type": "string"
},
"resourceType": {
"type": "string"
},
"resourceId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"meta": {
"anyOf": [
{},
{
"type": "null"
}
]
},
"userName": {
"type": "string"
},
"userEmail": {
"type": "string"
},
"createdAt": {
"type": "string"
}
},
"required": [
"id",
"action",
"resourceType",
"resourceId",
"userName",
"userEmail",
"createdAt"
]
}
}
},
"openapi": "3.1.1",
"paths": {
"/auth/providers": {
"get": {
"operationId": "auth.providers",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AuthProviders"
}
}
}
}
}
}
},
"/auth/profile": {
"get": {
"operationId": "auth.getProfile",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserProfile"
}
}
}
},
"404": {
"description": "404",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "USER_NOT_FOUND"
},
"status": {
"const": 404
},
"message": {
"type": "string",
"default": "USER_NOT_FOUND"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
}
}
},
"put": {
"operationId": "auth.updateProfile",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"image": {
"type": "string",
"maxLength": 2048,
"format": "uri"
}
}
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
}
}
}
}
},
"/auth/devices/count": {
"get": {
"operationId": "auth.countDevices",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Count"
}
}
}
}
}
}
},
"/auth/devices": {
"get": {
"operationId": "auth.listDevices",
"parameters": [
{
"name": "limit",
"in": "query",
"schema": {
"type": "integer",
"minimum": 1,
"maximum": 20,
"default": 20
},
"allowEmptyValue": true,
"allowReserved": true
},
{
"name": "offset",
"in": "query",
"schema": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991,
"default": 0
},
"allowEmptyValue": true,
"allowReserved": true
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Device"
}
}
}
}
}
}
},
"post": {
"operationId": "auth.registerDevice",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"platform": {
"enum": [
"macos",
"linux",
"windows",
"mobile"
],
"type": "string"
}
},
"required": [
"name",
"platform"
]
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RegisterDeviceResult"
}
}
}
},
"403": {
"description": "403",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "DEVICE_LIMIT_EXCEEDED"
},
"status": {
"const": 403
},
"message": {
"type": "string",
"default": "DEVICE_LIMIT_EXCEEDED"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
}
}
}
},
"/auth/devices/{id}": {
"delete": {
"operationId": "auth.removeDevice",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
}
},
"404": {
"description": "404",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "DEVICE_NOT_FOUND"
},
"status": {
"const": 404
},
"message": {
"type": "string",
"default": "DEVICE_NOT_FOUND"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
}
}
}
},
"/teams/{id}/audit-logs": {
"get": {
"operationId": "audit.list",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
},
{
"name": "page",
"in": "query",
"schema": {
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991,
"default": 1
},
"allowEmptyValue": true,
"allowReserved": true
},
{
"name": "pageSize",
"in": "query",
"schema": {
"type": "integer",
"minimum": 1,
"maximum": 20,
"default": 20
},
"allowEmptyValue": true,
"allowReserved": true
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/AuditLog"
}
}
}
}
},
"403": {
"description": "403",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "ADMIN_REQUIRED"
},
"status": {
"const": 403
},
"message": {
"type": "string",
"default": "ADMIN_REQUIRED"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
},
"404": {
"description": "404",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "NOT_TEAM_MEMBER"
},
"status": {
"const": 404
},
"message": {
"type": "string",
"default": "NOT_TEAM_MEMBER"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
}
}
}
},
"/rules": {
"get": {
"operationId": "rules.list",
"parameters": [
{
"name": "limit",
"in": "query",
"schema": {
"type": "integer",
"minimum": 1,
"maximum": 20,
"default": 20
},
"allowEmptyValue": true,
"allowReserved": true
},
{
"name": "offset",
"in": "query",
"schema": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991,
"default": 0
},
"allowEmptyValue": true,
"allowReserved": true
},
{
"name": "query",
"in": "query",
"schema": {
"type": "string",
"maxLength": 200
},
"allowEmptyValue": true,
"allowReserved": true
},
{
"name": "onlyReacted",
"in": "query",
"schema": {
"type": "boolean",
"default": false
},
"allowEmptyValue": true,
"allowReserved": true
},
{
"name": "status",
"in": "query",
"schema": {
"enum": [
"active",
"archived"
],
"type": "string",
"default": "active"
},
"allowEmptyValue": true,
"allowReserved": true
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"type": {
"type": "string"
},
"description": {
"type": "string"
},
"version": {
"type": "string"
},
"engines": {
"type": "array",
"items": {
"type": "string"
}
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"trigger": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"checkPrompt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"visibility": {
"type": "string"
},
"filePatterns": {
"type": "array",
"items": {
"type": "string"
}
},
"sourceRepo": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"sourceAttribution": {
"anyOf": [
{
"type": "object",
"properties": {
"author": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"prNumber": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"repoFullName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"commentUrl": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"author",
"prNumber",
"repoFullName",
"commentUrl"
]
},
{
"type": "null"
}
]
},
"updatedAt": {
"type": "string"
},
"createdAt": {
"type": "string"
},
"origin": {
"type": "string"
},
"feedbackUp": {
"type": "number"
},
"feedbackDown": {
"type": "number"
}
},
"required": [
"id",
"name",
"type",
"description",
"version",
"engines",
"tags",
"trigger",
"checkPrompt",
"visibility",
"filePatterns",
"sourceRepo",
"updatedAt",
"createdAt",
"origin",
"feedbackUp",
"feedbackDown"
]
}
}
}
}
}
}
},
"post": {
"operationId": "rules.create",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"type": {
"enum": [
"skill",
"review_standard"
],
"type": "string",
"default": "skill"
},
"description": {
"type": "string",
"maxLength": 2000,
"default": ""
},
"content": {
"type": "string",
"minLength": 1,
"maxLength": 50000
},
"version": {
"type": "string",
"maxLength": 20,
"default": "1.0.0"
},
"engines": {
"type": "array",
"maxItems": 10,
"items": {
"type": "string",
"maxLength": 50
},
"default": []
},
"tags": {
"type": "array",
"maxItems": 20,
"items": {
"type": "string",
"maxLength": 100
},
"default": []
},
"trigger": {
"anyOf": [
{
"type": "string",
"maxLength": 5000
},
{
"type": "null"
}
]
},
"checkPrompt": {
"anyOf": [
{
"type": "string",
"maxLength": 5000
},
{
"type": "null"
}
]
},
"visibility": {
"enum": [
"private",
"team",
"public"
],
"type": "string",
"default": "private"
},
"origin": {
"enum": [
"manual",
"conversation",
"pr_review",
"extracted",
"observation"
],
"type": "string",
"default": "manual"
},
"filePatterns": {
"type": "array",
"maxItems": 20,
"items": {
"type": "string",
"maxLength": 200
},
"default": []
},
"sourceRepo": {
"anyOf": [
{
"type": "string",
"maxLength": 200
},
{
"type": "null"
}
]
}
},
"required": [
"name",
"content"
]
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"type": {
"type": "string"
},
"description": {
"type": "string"
},
"version": {
"type": "string"
},
"engines": {
"type": "array",
"items": {
"type": "string"
}
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"trigger": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"checkPrompt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"visibility": {
"type": "string"
},
"filePatterns": {
"type": "array",
"items": {
"type": "string"
}
},
"sourceRepo": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"sourceAttribution": {
"anyOf": [
{
"type": "object",
"properties": {
"author": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"prNumber": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"repoFullName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"commentUrl": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"author",
"prNumber",
"repoFullName",
"commentUrl"
]
},
{
"type": "null"
}
]
},
"updatedAt": {
"type": "string"
},
"createdAt": {
"type": "string"
},
"content": {
"type": "string"
},
"acceptedCount": {
"type": "number"
},
"citedCount": {
"type": "number"
},
"trustRate": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"reviewerProofReadyCount": {
"type": "number"
},
"sourceEvidence": {
"anyOf": [
{
"type": "object",
"properties": {
"extractionId": {
"type": "string"
},
"reviewId": {
"type": "string"
},
"repoFullName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"prNumber": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"prTitle": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"filePath": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"lineNumber": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"author": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"commentUrl": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"commentText": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"createdAtIso": {
"type": "string"
}
},
"required": [
"extractionId",
"reviewId",
"repoFullName",
"prNumber",
"prTitle",
"filePath",
"lineNumber",
"author",
"commentUrl",
"commentText",
"createdAtIso"
]
},
{
"type": "null"
}
]
},
"origin": {
"type": "string"
}
},
"required": [
"id",
"name",
"type",
"description",
"version",
"engines",
"tags",
"trigger",
"checkPrompt",
"visibility",
"filePatterns",
"sourceRepo",
"updatedAt",
"createdAt",
"content",
"acceptedCount",
"citedCount",
"trustRate",
"reviewerProofReadyCount",
"origin"
]
}
}
}
},
"403": {
"description": "403",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "PLAN_LIMIT_EXCEEDED"
},
"status": {
"const": 403
},
"message": {
"type": "string",
"default": "PLAN_LIMIT_EXCEEDED"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
}
}
}
},
"/rules/count": {
"get": {
"operationId": "rules.count",
"parameters": [
{
"name": "query",
"in": "query",
"schema": {
"type": "string",
"maxLength": 200
},
"allowEmptyValue": true,
"allowReserved": true
},
{
"name": "onlyReacted",
"in": "query",
"schema": {
"type": "boolean",
"default": false
},
"allowEmptyValue": true,
"allowReserved": true
},
{
"name": "status",
"in": "query",
"schema": {
"enum": [
"active",
"archived"
],
"type": "string",
"default": "active"
},
"allowEmptyValue": true,
"allowReserved": true
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"total": {
"type": "number"
}
},
"required": [
"total"
]
}
}
}
}
}
}
},
"/rules/{ruleId}/restore": {
"post": {
"operationId": "rules.restoreArchived",
"parameters": [
{
"name": "ruleId",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
}
},
"403": {
"description": "403",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "PLAN_LIMIT_EXCEEDED"
},
"status": {
"const": 403
},
"message": {
"type": "string",
"default": "PLAN_LIMIT_EXCEEDED"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
},
"404": {
"description": "404",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "RULE_NOT_FOUND"
},
"status": {
"const": 404
},
"message": {
"type": "string",
"default": "RULE_NOT_FOUND"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
}
}
}
},
"/rules/trending": {
"get": {
"operationId": "rules.trending",
"parameters": [
{
"name": "limit",
"in": "query",
"schema": {
"type": "integer",
"minimum": 1,
"maximum": 20,
"default": 10
},
"allowEmptyValue": true,
"allowReserved": true
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"type": {
"type": "string"
},
"description": {
"type": "string"
},
"version": {
"type": "string"
},
"engines": {
"type": "array",
"items": {
"type": "string"
}
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"trigger": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"checkPrompt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"visibility": {
"type": "string"
},
"filePatterns": {
"type": "array",
"items": {
"type": "string"
}
},
"sourceRepo": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"sourceAttribution": {
"anyOf": [
{
"type": "object",
"properties": {
"author": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"prNumber": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"repoFullName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"commentUrl": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"author",
"prNumber",
"repoFullName",
"commentUrl"
]
},
{
"type": "null"
}
]
},
"updatedAt": {
"type": "string"
},
"createdAt": {
"type": "string"
},
"origin": {
"type": "string"
},
"feedbackUp": {
"type": "number"
},
"feedbackDown": {
"type": "number"
},
"strength": {
"type": "number"
}
},
"required": [
"id",
"name",
"type",
"description",
"version",
"engines",
"tags",
"trigger",
"checkPrompt",
"visibility",
"filePatterns",
"sourceRepo",
"updatedAt",
"createdAt",
"origin",
"feedbackUp",
"feedbackDown",
"strength"
]
}
}
}
}
}
}
}
},
"/rules/{id}": {
"get": {
"operationId": "rules.get",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"type": {
"type": "string"
},
"description": {
"type": "string"
},
"version": {
"type": "string"
},
"engines": {
"type": "array",
"items": {
"type": "string"
}
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"trigger": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"checkPrompt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"visibility": {
"type": "string"
},
"filePatterns": {
"type": "array",
"items": {
"type": "string"
}
},
"sourceRepo": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"sourceAttribution": {
"anyOf": [
{
"type": "object",
"properties": {
"author": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"prNumber": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"repoFullName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"commentUrl": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"author",
"prNumber",
"repoFullName",
"commentUrl"
]
},
{
"type": "null"
}
]
},
"updatedAt": {
"type": "string"
},
"createdAt": {
"type": "string"
},
"content": {
"type": "string"
},
"acceptedCount": {
"type": "number"
},
"citedCount": {
"type": "number"
},
"trustRate": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"reviewerProofReadyCount": {
"type": "number"
},
"sourceEvidence": {
"anyOf": [
{
"type": "object",
"properties": {
"extractionId": {
"type": "string"
},
"reviewId": {
"type": "string"
},
"repoFullName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"prNumber": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"prTitle": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"filePath": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"lineNumber": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"author": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"commentUrl": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"commentText": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"createdAtIso": {
"type": "string"
}
},
"required": [
"extractionId",
"reviewId",
"repoFullName",
"prNumber",
"prTitle",
"filePath",
"lineNumber",
"author",
"commentUrl",
"commentText",
"createdAtIso"
]
},
{
"type": "null"
}
]
},
"origin": {
"type": "string"
}
},
"required": [
"id",
"name",
"type",
"description",
"version",
"engines",
"tags",
"trigger",
"checkPrompt",
"visibility",
"filePatterns",
"sourceRepo",
"updatedAt",
"createdAt",
"content",
"acceptedCount",
"citedCount",
"trustRate",
"reviewerProofReadyCount",
"origin"
]
}
}
}
},
"404": {
"description": "404",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "RULE_NOT_FOUND"
},
"status": {
"const": 404
},
"message": {
"type": "string",
"default": "RULE_NOT_FOUND"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
}
}
},
"put": {
"operationId": "rules.update",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"description": {
"type": "string",
"maxLength": 2000
},
"content": {
"type": "string",
"maxLength": 50000
},
"version": {
"type": "string",
"maxLength": 20
},
"engines": {
"type": "array",
"maxItems": 10,
"items": {
"type": "string",
"maxLength": 50
}
},
"tags": {
"type": "array",
"maxItems": 20,
"items": {
"type": "string",
"maxLength": 100
}
},
"trigger": {
"anyOf": [
{
"type": "string",
"maxLength": 5000
},
{
"type": "null"
}
]
},
"checkPrompt": {
"anyOf": [
{
"type": "string",
"maxLength": 5000
},
{
"type": "null"
}
]
},
"visibility": {
"enum": [
"private",
"team",
"public"
],
"type": "string"
},
"filePatterns": {
"type": "array",
"maxItems": 20,
"items": {
"type": "string",
"maxLength": 200
}
}
}
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"type": {
"type": "string"
},
"description": {
"type": "string"
},
"version": {
"type": "string"
},
"engines": {
"type": "array",
"items": {
"type": "string"
}
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"trigger": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"checkPrompt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"visibility": {
"type": "string"
},
"filePatterns": {
"type": "array",
"items": {
"type": "string"
}
},
"sourceRepo": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"sourceAttribution": {
"anyOf": [
{
"type": "object",
"properties": {
"author": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"prNumber": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"repoFullName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"commentUrl": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"author",
"prNumber",
"repoFullName",
"commentUrl"
]
},
{
"type": "null"
}
]
},
"updatedAt": {
"type": "string"
},
"createdAt": {
"type": "string"
},
"content": {
"type": "string"
},
"acceptedCount": {
"type": "number"
},
"citedCount": {
"type": "number"
},
"trustRate": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"reviewerProofReadyCount": {
"type": "number"
},
"sourceEvidence": {
"anyOf": [
{
"type": "object",
"properties": {
"extractionId": {
"type": "string"
},
"reviewId": {
"type": "string"
},
"repoFullName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"prNumber": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"prTitle": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"filePath": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"lineNumber": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"author": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"commentUrl": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"commentText": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"createdAtIso": {
"type": "string"
}
},
"required": [
"extractionId",
"reviewId",
"repoFullName",
"prNumber",
"prTitle",
"filePath",
"lineNumber",
"author",
"commentUrl",
"commentText",
"createdAtIso"
]
},
{
"type": "null"
}
]
},
"origin": {
"type": "string"
}
},
"required": [
"id",
"name",
"type",
"description",
"version",
"engines",
"tags",
"trigger",
"checkPrompt",
"visibility",
"filePatterns",
"sourceRepo",
"updatedAt",
"createdAt",
"content",
"acceptedCount",
"citedCount",
"trustRate",
"reviewerProofReadyCount",
"origin"
]
}
}
}
},
"403": {
"description": "403",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "PLAN_LIMIT_EXCEEDED"
},
"status": {
"const": 403
},
"message": {
"type": "string",
"default": "PLAN_LIMIT_EXCEEDED"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
},
"404": {
"description": "404",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "RULE_NOT_FOUND"
},
"status": {
"const": 404
},
"message": {
"type": "string",
"default": "RULE_NOT_FOUND"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
}
}
},
"delete": {
"operationId": "rules.delete",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
}
},
"403": {
"description": "403",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "PLAN_LIMIT_EXCEEDED"
},
"status": {
"const": 403
},
"message": {
"type": "string",
"default": "PLAN_LIMIT_EXCEEDED"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
},
"404": {
"description": "404",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "RULE_NOT_FOUND"
},
"status": {
"const": 404
},
"message": {
"type": "string",
"default": "RULE_NOT_FOUND"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
}
}
}
},
"/rules/sync": {
"post": {
"operationId": "rules.sync",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"localHashes": {
"type": "object",
"propertyNames": {
"type": "string",
"format": "uuid"
},
"additionalProperties": {
"type": "string",
"maxLength": 128
}
},
"lastSyncAt": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
}
},
"required": [
"localHashes"
]
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"created": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"type": {
"type": "string"
},
"description": {
"type": "string"
},
"version": {
"type": "string"
},
"engines": {
"type": "array",
"items": {
"type": "string"
}
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"trigger": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"checkPrompt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"visibility": {
"type": "string"
},
"filePatterns": {
"type": "array",
"items": {
"type": "string"
}
},
"sourceRepo": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"sourceAttribution": {
"anyOf": [
{
"type": "object",
"properties": {
"author": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"prNumber": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"repoFullName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"commentUrl": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"author",
"prNumber",
"repoFullName",
"commentUrl"
]
},
{
"type": "null"
}
]
},
"updatedAt": {
"type": "string"
},
"createdAt": {
"type": "string"
},
"content": {
"type": "string"
},
"acceptedCount": {
"type": "number"
},
"citedCount": {
"type": "number"
},
"trustRate": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"reviewerProofReadyCount": {
"type": "number"
},
"sourceEvidence": {
"anyOf": [
{
"type": "object",
"properties": {
"extractionId": {
"type": "string"
},
"reviewId": {
"type": "string"
},
"repoFullName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"prNumber": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"prTitle": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"filePath": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"lineNumber": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"author": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"commentUrl": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"commentText": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"createdAtIso": {
"type": "string"
}
},
"required": [
"extractionId",
"reviewId",
"repoFullName",
"prNumber",
"prTitle",
"filePath",
"lineNumber",
"author",
"commentUrl",
"commentText",
"createdAtIso"
]
},
{
"type": "null"
}
]
},
"origin": {
"type": "string"
}
},
"required": [
"id",
"name",
"type",
"description",
"version",
"engines",
"tags",
"trigger",
"checkPrompt",
"visibility",
"filePatterns",
"sourceRepo",
"updatedAt",
"createdAt",
"content",
"acceptedCount",
"citedCount",
"trustRate",
"reviewerProofReadyCount",
"origin"
]
}
},
"updated": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"type": {
"type": "string"
},
"description": {
"type": "string"
},
"version": {
"type": "string"
},
"engines": {
"type": "array",
"items": {
"type": "string"
}
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"trigger": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"checkPrompt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"visibility": {
"type": "string"
},
"filePatterns": {
"type": "array",
"items": {
"type": "string"
}
},
"sourceRepo": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"sourceAttribution": {
"anyOf": [
{
"type": "object",
"properties": {
"author": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"prNumber": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"repoFullName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"commentUrl": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"author",
"prNumber",
"repoFullName",
"commentUrl"
]
},
{
"type": "null"
}
]
},
"updatedAt": {
"type": "string"
},
"createdAt": {
"type": "string"
},
"content": {
"type": "string"
},
"acceptedCount": {
"type": "number"
},
"citedCount": {
"type": "number"
},
"trustRate": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"reviewerProofReadyCount": {
"type": "number"
},
"sourceEvidence": {
"anyOf": [
{
"type": "object",
"properties": {
"extractionId": {
"type": "string"
},
"reviewId": {
"type": "string"
},
"repoFullName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"prNumber": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"prTitle": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"filePath": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"lineNumber": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"author": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"commentUrl": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"commentText": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"createdAtIso": {
"type": "string"
}
},
"required": [
"extractionId",
"reviewId",
"repoFullName",
"prNumber",
"prTitle",
"filePath",
"lineNumber",
"author",
"commentUrl",
"commentText",
"createdAtIso"
]
},
{
"type": "null"
}
]
},
"origin": {
"type": "string"
}
},
"required": [
"id",
"name",
"type",
"description",
"version",
"engines",
"tags",
"trigger",
"checkPrompt",
"visibility",
"filePatterns",
"sourceRepo",
"updatedAt",
"createdAt",
"content",
"acceptedCount",
"citedCount",
"trustRate",
"reviewerProofReadyCount",
"origin"
]
}
},
"deleted": {
"type": "array",
"items": {
"type": "string"
}
},
"serverHashes": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "string"
}
},
"hashAlgorithm": {
"type": "string"
}
},
"required": [
"created",
"updated",
"deleted",
"serverHashes",
"hashAlgorithm"
]
}
}
}
},
"403": {
"description": "403",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "PLAN_LIMIT_EXCEEDED"
},
"status": {
"const": 403
},
"message": {
"type": "string",
"default": "PLAN_LIMIT_EXCEEDED"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
}
}
}
},
"/rules/team": {
"get": {
"operationId": "rules.listTeam",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"type": {
"type": "string"
},
"description": {
"type": "string"
},
"version": {
"type": "string"
},
"engines": {
"type": "array",
"items": {
"type": "string"
}
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
},
"trigger": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"checkPrompt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"visibility": {
"type": "string"
},
"filePatterns": {
"type": "array",
"items": {
"type": "string"
}
},
"sourceRepo": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"sourceAttribution": {
"anyOf": [
{
"type": "object",
"properties": {
"author": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"prNumber": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"repoFullName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"commentUrl": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"author",
"prNumber",
"repoFullName",
"commentUrl"
]
},
{
"type": "null"
}
]
},
"updatedAt": {
"type": "string"
},
"createdAt": {
"type": "string"
},
"publishedInTeams": {
"type": "array",
"items": {
"type": "object",
"properties": {
"teamId": {
"type": "string"
},
"enforcement": {
"type": "string"
}
},
"required": [
"teamId",
"enforcement"
]
}
},
"origin": {
"type": "string"
}
},
"required": [
"id",
"name",
"type",
"description",
"version",
"engines",
"tags",
"trigger",
"checkPrompt",
"visibility",
"filePatterns",
"sourceRepo",
"updatedAt",
"createdAt",
"publishedInTeams",
"origin"
]
}
}
}
}
}
}
}
},
"/rules/team/publish": {
"post": {
"operationId": "rules.publishToTeam",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"ruleId": {
"type": "string",
"format": "uuid"
},
"teamId": {
"type": "string",
"format": "uuid"
},
"enforcement": {
"enum": [
"required",
"recommended"
],
"type": "string",
"default": "recommended"
}
},
"required": [
"ruleId",
"teamId"
]
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
}
},
"400": {
"description": "400",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "BAD_REQUEST"
},
"status": {
"const": 400
},
"message": {
"type": "string",
"default": "Bad Request"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
},
"403": {
"description": "403",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "PLAN_LIMIT_EXCEEDED"
},
"status": {
"const": 403
},
"message": {
"type": "string",
"default": "PLAN_LIMIT_EXCEEDED"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
},
{
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "ADMIN_REQUIRED"
},
"status": {
"const": 403
},
"message": {
"type": "string",
"default": "ADMIN_REQUIRED"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
]
}
}
}
},
"404": {
"description": "404",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "RULE_NOT_FOUND"
},
"status": {
"const": 404
},
"message": {
"type": "string",
"default": "RULE_NOT_FOUND"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
}
}
}
},
"/rules/team/unpublish": {
"post": {
"operationId": "rules.unpublishFromTeam",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"ruleId": {
"type": "string",
"format": "uuid"
},
"teamId": {
"type": "string",
"format": "uuid"
}
},
"required": [
"ruleId",
"teamId"
]
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
}
},
"403": {
"description": "403",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "PLAN_LIMIT_EXCEEDED"
},
"status": {
"const": 403
},
"message": {
"type": "string",
"default": "PLAN_LIMIT_EXCEEDED"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
},
{
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "ADMIN_REQUIRED"
},
"status": {
"const": 403
},
"message": {
"type": "string",
"default": "ADMIN_REQUIRED"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
]
}
}
}
},
"404": {
"description": "404",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "RULE_NOT_PUBLISHED"
},
"status": {
"const": 404
},
"message": {
"type": "string",
"default": "RULE_NOT_PUBLISHED"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
}
}
}
},
"/rules/candidates": {
"get": {
"operationId": "rules.listCandidates",
"parameters": [
{
"name": "limit",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"minimum": 1,
"maximum": 20,
"default": 20
},
"allowEmptyValue": true,
"allowReserved": true
},
{
"name": "offset",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991,
"default": 0
},
"allowEmptyValue": true,
"allowReserved": true
},
{
"name": "teamId",
"in": "query",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
},
"allowEmptyValue": true,
"allowReserved": true
},
{
"name": "status",
"in": "query",
"required": false,
"schema": {
"enum": [
"pending",
"approved",
"rejected"
],
"type": "string"
},
"allowEmptyValue": true,
"allowReserved": true
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"teamId": {
"type": "string"
},
"diffSignature": {
"type": "string"
},
"acceptanceCount": {
"type": "number"
},
"distinctUsers": {
"type": "number"
},
"generatedName": {
"type": "string"
},
"generatedDescription": {
"type": "string"
},
"generatedSeverity": {
"type": "string"
},
"exampleBefore": {
"type": "string"
},
"exampleAfter": {
"type": "string"
},
"language": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string"
},
"reviewedBy": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"reviewedAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"rejectionReason": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"publishedRuleId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"origin": {
"type": "string"
},
"meta": {
"anyOf": [
{},
{
"type": "null"
}
]
},
"createdAt": {
"type": "string"
}
},
"required": [
"id",
"teamId",
"diffSignature",
"acceptanceCount",
"distinctUsers",
"generatedName",
"generatedDescription",
"generatedSeverity",
"exampleBefore",
"exampleAfter",
"language",
"status",
"reviewedBy",
"reviewedAt",
"rejectionReason",
"publishedRuleId",
"origin",
"createdAt"
]
}
}
}
}
},
"403": {
"description": "403",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "PLAN_LIMIT_EXCEEDED"
},
"status": {
"const": 403
},
"message": {
"type": "string",
"default": "PLAN_LIMIT_EXCEEDED"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
},
{
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "ADMIN_REQUIRED"
},
"status": {
"const": 403
},
"message": {
"type": "string",
"default": "ADMIN_REQUIRED"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
]
}
}
}
},
"404": {
"description": "404",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "NOT_TEAM_MEMBER"
},
"status": {
"const": 404
},
"message": {
"type": "string",
"default": "NOT_TEAM_MEMBER"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
}
}
}
},
"/rules/candidates/count": {
"get": {
"operationId": "rules.countCandidates",
"parameters": [
{
"name": "teamId",
"in": "query",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
},
"allowEmptyValue": true,
"allowReserved": true
},
{
"name": "status",
"in": "query",
"required": false,
"schema": {
"enum": [
"pending",
"approved",
"rejected"
],
"type": "string"
},
"allowEmptyValue": true,
"allowReserved": true
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"total": {
"type": "number"
}
},
"required": [
"total"
]
}
}
}
},
"403": {
"description": "403",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "PLAN_LIMIT_EXCEEDED"
},
"status": {
"const": 403
},
"message": {
"type": "string",
"default": "PLAN_LIMIT_EXCEEDED"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
},
{
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "ADMIN_REQUIRED"
},
"status": {
"const": 403
},
"message": {
"type": "string",
"default": "ADMIN_REQUIRED"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
]
}
}
}
},
"404": {
"description": "404",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "NOT_TEAM_MEMBER"
},
"status": {
"const": 404
},
"message": {
"type": "string",
"default": "NOT_TEAM_MEMBER"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
}
}
}
},
"/rules/candidates/{candidateId}": {
"get": {
"operationId": "rules.getCandidate",
"parameters": [
{
"name": "candidateId",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"teamId": {
"type": "string"
},
"diffSignature": {
"type": "string"
},
"acceptanceCount": {
"type": "number"
},
"distinctUsers": {
"type": "number"
},
"generatedName": {
"type": "string"
},
"generatedDescription": {
"type": "string"
},
"generatedSeverity": {
"type": "string"
},
"exampleBefore": {
"type": "string"
},
"exampleAfter": {
"type": "string"
},
"language": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"type": "string"
},
"reviewedBy": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"reviewedAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"rejectionReason": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"publishedRuleId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"origin": {
"type": "string"
},
"meta": {
"anyOf": [
{},
{
"type": "null"
}
]
},
"createdAt": {
"type": "string"
},
"events": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"candidateId": {
"type": "string"
},
"teamId": {
"type": "string"
},
"eventType": {
"type": "string"
},
"actorId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"statusFrom": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"statusTo": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"reason": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"confidenceBefore": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"confidenceAfter": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"metadata": {
"anyOf": [
{},
{
"type": "null"
}
]
},
"createdAt": {
"type": "string"
}
},
"required": [
"id",
"candidateId",
"teamId",
"eventType",
"actorId",
"statusFrom",
"statusTo",
"reason",
"confidenceBefore",
"confidenceAfter",
"createdAt"
]
}
}
},
"required": [
"id",
"teamId",
"diffSignature",
"acceptanceCount",
"distinctUsers",
"generatedName",
"generatedDescription",
"generatedSeverity",
"exampleBefore",
"exampleAfter",
"language",
"status",
"reviewedBy",
"reviewedAt",
"rejectionReason",
"publishedRuleId",
"origin",
"createdAt",
"events"
]
}
}
}
},
"403": {
"description": "403",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "PLAN_LIMIT_EXCEEDED"
},
"status": {
"const": 403
},
"message": {
"type": "string",
"default": "PLAN_LIMIT_EXCEEDED"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
},
{
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "ADMIN_REQUIRED"
},
"status": {
"const": 403
},
"message": {
"type": "string",
"default": "ADMIN_REQUIRED"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
]
}
}
}
},
"404": {
"description": "404",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "CANDIDATE_NOT_FOUND"
},
"status": {
"const": 404
},
"message": {
"type": "string",
"default": "CANDIDATE_NOT_FOUND"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
},
{
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "NOT_TEAM_MEMBER"
},
"status": {
"const": 404
},
"message": {
"type": "string",
"default": "NOT_TEAM_MEMBER"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
]
}
}
}
}
}
}
},
"/rules/candidates/{candidateId}/approve": {
"post": {
"operationId": "rules.approveCandidate",
"parameters": [
{
"name": "candidateId",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"edits": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"description": {
"type": "string",
"maxLength": 2000
},
"severity": {
"enum": [
"info",
"warning",
"error"
],
"type": "string"
},
"content": {
"type": "string",
"maxLength": 50000
}
}
}
}
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"candidateId": {
"type": "string"
},
"ruleId": {
"type": "string"
}
},
"required": [
"candidateId",
"ruleId"
]
}
}
}
},
"403": {
"description": "403",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "PLAN_LIMIT_EXCEEDED"
},
"status": {
"const": 403
},
"message": {
"type": "string",
"default": "PLAN_LIMIT_EXCEEDED"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
},
{
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "ADMIN_REQUIRED"
},
"status": {
"const": 403
},
"message": {
"type": "string",
"default": "ADMIN_REQUIRED"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
]
}
}
}
},
"404": {
"description": "404",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "CANDIDATE_NOT_FOUND"
},
"status": {
"const": 404
},
"message": {
"type": "string",
"default": "CANDIDATE_NOT_FOUND"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
},
{
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "NOT_TEAM_MEMBER"
},
"status": {
"const": 404
},
"message": {
"type": "string",
"default": "NOT_TEAM_MEMBER"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
]
}
}
}
},
"409": {
"description": "409",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "CANDIDATE_NOT_PENDING"
},
"status": {
"const": 409
},
"message": {
"type": "string",
"default": "CANDIDATE_NOT_PENDING"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
}
}
}
},
"/rules/candidates/{candidateId}/reject": {
"post": {
"operationId": "rules.rejectCandidate",
"parameters": [
{
"name": "candidateId",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"reason": {
"type": "string",
"maxLength": 500
}
}
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
}
},
"403": {
"description": "403",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "PLAN_LIMIT_EXCEEDED"
},
"status": {
"const": 403
},
"message": {
"type": "string",
"default": "PLAN_LIMIT_EXCEEDED"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
},
{
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "ADMIN_REQUIRED"
},
"status": {
"const": 403
},
"message": {
"type": "string",
"default": "ADMIN_REQUIRED"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
]
}
}
}
},
"404": {
"description": "404",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "CANDIDATE_NOT_FOUND"
},
"status": {
"const": 404
},
"message": {
"type": "string",
"default": "CANDIDATE_NOT_FOUND"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
},
{
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "NOT_TEAM_MEMBER"
},
"status": {
"const": 404
},
"message": {
"type": "string",
"default": "NOT_TEAM_MEMBER"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
]
}
}
}
},
"409": {
"description": "409",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "CANDIDATE_NOT_PENDING"
},
"status": {
"const": 409
},
"message": {
"type": "string",
"default": "CANDIDATE_NOT_PENDING"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
}
}
}
},
"/rules/candidates/dismiss-signature": {
"post": {
"operationId": "rules.dismissSignature",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"teamId": {
"type": "string",
"format": "uuid"
},
"signature": {
"type": "string",
"minLength": 1,
"maxLength": 500
},
"reason": {
"type": "string",
"maxLength": 500
}
},
"required": [
"teamId",
"signature"
]
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
}
},
"403": {
"description": "403",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "PLAN_LIMIT_EXCEEDED"
},
"status": {
"const": 403
},
"message": {
"type": "string",
"default": "PLAN_LIMIT_EXCEEDED"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
},
{
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "ADMIN_REQUIRED"
},
"status": {
"const": 403
},
"message": {
"type": "string",
"default": "ADMIN_REQUIRED"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
]
}
}
}
},
"404": {
"description": "404",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "NOT_TEAM_MEMBER"
},
"status": {
"const": 404
},
"message": {
"type": "string",
"default": "NOT_TEAM_MEMBER"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
}
}
}
},
"/rules/candidates/settings": {
"post": {
"operationId": "rules.updateCandidateSettings",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"teamId": {
"type": "string",
"format": "uuid"
},
"minCount": {
"type": "integer",
"minimum": 1,
"maximum": 100
},
"minDistinctUsers": {
"type": "integer",
"minimum": 1,
"maximum": 100
},
"lookbackDays": {
"type": "integer",
"minimum": 1,
"maximum": 365
},
"enabled": {
"type": "boolean"
}
},
"required": [
"teamId"
]
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"teamId": {
"type": "string"
},
"minCount": {
"type": "number"
},
"minDistinctUsers": {
"type": "number"
},
"lookbackDays": {
"type": "number"
},
"enabled": {
"type": "boolean"
}
},
"required": [
"teamId",
"minCount",
"minDistinctUsers",
"lookbackDays",
"enabled"
]
}
}
}
},
"403": {
"description": "403",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "PLAN_LIMIT_EXCEEDED"
},
"status": {
"const": 403
},
"message": {
"type": "string",
"default": "PLAN_LIMIT_EXCEEDED"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
},
{
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "ADMIN_REQUIRED"
},
"status": {
"const": 403
},
"message": {
"type": "string",
"default": "ADMIN_REQUIRED"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
]
}
}
}
},
"404": {
"description": "404",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "NOT_TEAM_MEMBER"
},
"status": {
"const": 404
},
"message": {
"type": "string",
"default": "NOT_TEAM_MEMBER"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
}
}
}
},
"/sync/settings": {
"get": {
"operationId": "sync.getSettings",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SyncSettings"
}
}
}
},
"403": {
"description": "403",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "PLAN_LIMIT_EXCEEDED"
},
"status": {
"const": 403
},
"message": {
"type": "string",
"default": "PLAN_LIMIT_EXCEEDED"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
}
}
},
"put": {
"operationId": "sync.pushSettings",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"settings": {
"type": "object",
"propertyNames": {
"type": "string",
"maxLength": 100
},
"additionalProperties": {}
}
},
"required": [
"settings"
]
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
}
},
"403": {
"description": "403",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "PLAN_LIMIT_EXCEEDED"
},
"status": {
"const": 403
},
"message": {
"type": "string",
"default": "PLAN_LIMIT_EXCEEDED"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
}
}
}
},
"/sync/providers": {
"get": {
"operationId": "sync.getProviders",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SyncProviders"
}
}
}
},
"403": {
"description": "403",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "PLAN_LIMIT_EXCEEDED"
},
"status": {
"const": 403
},
"message": {
"type": "string",
"default": "PLAN_LIMIT_EXCEEDED"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
}
}
},
"put": {
"operationId": "sync.pushProviders",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"providers": {
"type": "array",
"maxItems": 20,
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"baseUrl": {
"type": "string",
"minLength": 1,
"maxLength": 2048
},
"maskedKey": {
"type": "string",
"maxLength": 32
},
"modelMapping": {
"type": "object",
"propertyNames": {
"type": "string",
"maxLength": 100
},
"additionalProperties": {
"type": "string",
"maxLength": 200
}
},
"updatedAt": {
"type": "string",
"maxLength": 50
}
},
"required": [
"name",
"baseUrl"
]
}
}
},
"required": [
"providers"
]
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
}
},
"403": {
"description": "403",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "PLAN_LIMIT_EXCEEDED"
},
"status": {
"const": 403
},
"message": {
"type": "string",
"default": "PLAN_LIMIT_EXCEEDED"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
}
}
}
},
"/billing/plans": {
"get": {
"operationId": "billing.plans",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Plan"
}
}
}
}
}
}
}
},
"/billing/current": {
"get": {
"operationId": "billing.current",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BillingCurrent"
}
}
}
}
}
}
},
"/billing/checkout": {
"post": {
"operationId": "billing.checkout",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"planId": {
"enum": [
"pro",
"team"
],
"type": "string"
},
"interval": {
"enum": [
"month",
"year"
],
"type": "string",
"default": "month"
},
"teamId": {
"type": "string",
"format": "uuid"
}
},
"required": [
"planId"
]
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CheckoutResult"
}
}
}
},
"400": {
"description": "400",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "BAD_REQUEST"
},
"status": {
"const": 400
},
"message": {
"type": "string",
"default": "Bad Request"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
},
"403": {
"description": "403",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "BILLING_ADMIN_REQUIRED"
},
"status": {
"const": 403
},
"message": {
"type": "string",
"default": "BILLING_ADMIN_REQUIRED"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
},
{
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "SCOPE_MISSING"
},
"status": {
"const": 403
},
"message": {
"type": "string",
"default": "SCOPE_MISSING"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
]
}
}
}
},
"404": {
"description": "404",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "PLAN_NOT_FOUND"
},
"status": {
"const": 404
},
"message": {
"type": "string",
"default": "PLAN_NOT_FOUND"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
},
"429": {
"description": "429",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "RATE_LIMITED"
},
"status": {
"const": 429
},
"message": {
"type": "string",
"default": "RATE_LIMITED"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
},
"503": {
"description": "503",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "STRIPE_NOT_CONFIGURED"
},
"status": {
"const": 503
},
"message": {
"type": "string",
"default": "STRIPE_NOT_CONFIGURED"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
},
{
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "PLAN_NOT_CONFIGURED"
},
"status": {
"const": 503
},
"message": {
"type": "string",
"default": "PLAN_NOT_CONFIGURED"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
]
}
}
}
}
}
}
},
"/billing/manage": {
"get": {
"operationId": "billing.manage",
"parameters": [
{
"name": "teamId",
"in": "query",
"schema": {
"type": "string",
"format": "uuid"
},
"allowEmptyValue": true,
"allowReserved": true
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ManageResult"
}
}
}
},
"400": {
"description": "400",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "BAD_REQUEST"
},
"status": {
"const": 400
},
"message": {
"type": "string",
"default": "Bad Request"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
},
{
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "BILLING_TEAM_AMBIGUOUS"
},
"status": {
"const": 400
},
"message": {
"type": "string",
"default": "BILLING_TEAM_AMBIGUOUS"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
]
}
}
}
},
"403": {
"description": "403",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "BILLING_ADMIN_REQUIRED"
},
"status": {
"const": 403
},
"message": {
"type": "string",
"default": "BILLING_ADMIN_REQUIRED"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
},
"404": {
"description": "404",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "NO_ACTIVE_SUBSCRIPTION"
},
"status": {
"const": 404
},
"message": {
"type": "string",
"default": "NO_ACTIVE_SUBSCRIPTION"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
},
{
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "NOT_TEAM_MEMBER"
},
"status": {
"const": 404
},
"message": {
"type": "string",
"default": "NOT_TEAM_MEMBER"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
]
}
}
}
},
"503": {
"description": "503",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "STRIPE_NOT_CONFIGURED"
},
"status": {
"const": 503
},
"message": {
"type": "string",
"default": "STRIPE_NOT_CONFIGURED"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
}
}
}
},
"/billing/cancel": {
"post": {
"operationId": "billing.cancel",
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"teamId": {
"type": "string",
"format": "uuid"
}
}
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CancelResult"
}
}
}
},
"400": {
"description": "400",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "BAD_REQUEST"
},
"status": {
"const": 400
},
"message": {
"type": "string",
"default": "Bad Request"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
},
{
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "BILLING_TEAM_AMBIGUOUS"
},
"status": {
"const": 400
},
"message": {
"type": "string",
"default": "BILLING_TEAM_AMBIGUOUS"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
]
}
}
}
},
"403": {
"description": "403",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "BILLING_ADMIN_REQUIRED"
},
"status": {
"const": 403
},
"message": {
"type": "string",
"default": "BILLING_ADMIN_REQUIRED"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
},
{
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "SCOPE_MISSING"
},
"status": {
"const": 403
},
"message": {
"type": "string",
"default": "SCOPE_MISSING"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
]
}
}
}
},
"404": {
"description": "404",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "NO_ACTIVE_SUBSCRIPTION"
},
"status": {
"const": 404
},
"message": {
"type": "string",
"default": "NO_ACTIVE_SUBSCRIPTION"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
},
{
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "NOT_TEAM_MEMBER"
},
"status": {
"const": 404
},
"message": {
"type": "string",
"default": "NOT_TEAM_MEMBER"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
]
}
}
}
},
"503": {
"description": "503",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "STRIPE_NOT_CONFIGURED"
},
"status": {
"const": 503
},
"message": {
"type": "string",
"default": "STRIPE_NOT_CONFIGURED"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
}
}
}
},
"/dashboard/summary": {
"get": {
"operationId": "dashboard.summary",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DashboardSummary"
}
}
}
}
}
}
},
"/dashboard/mcp-query": {
"post": {
"operationId": "dashboard.trackMcpQuery",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"file": {
"type": "string",
"maxLength": 500
},
"intent": {
"type": "string",
"maxLength": 500
},
"rulesInjected": {
"type": "integer",
"minimum": 0,
"maximum": 20
},
"strictMatchCount": {
"type": "integer",
"minimum": 0,
"maximum": 20
},
"ruleTitles": {
"type": "array",
"maxItems": 10,
"items": {
"type": "string",
"maxLength": 200
}
},
"ruleIds": {
"type": "array",
"maxItems": 10,
"items": {
"type": "string",
"maxLength": 120
}
},
"client": {
"type": "string",
"maxLength": 60
},
"repoFullName": {
"type": "string",
"maxLength": 200
}
},
"required": [
"file",
"rulesInjected"
]
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"ok": {
"const": true
}
},
"required": [
"ok"
]
}
}
}
}
}
}
},
"/dashboard/weekly-rule-impact": {
"get": {
"operationId": "dashboard.weeklyRuleImpact",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"totalInjections": {
"type": "number"
},
"lifetimeInjections": {
"type": "number"
},
"uniqueRulesInvoked": {
"type": "number"
},
"estMinutesSaved": {
"type": "number"
},
"lastInjectionAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"topRules": {
"type": "array",
"items": {
"type": "object",
"properties": {
"title": {
"type": "string"
},
"ruleId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"count": {
"type": "number"
},
"lastAt": {
"type": "string"
},
"feedbackUp": {
"type": "number"
},
"feedbackDown": {
"type": "number"
}
},
"required": [
"title",
"ruleId",
"count",
"lastAt",
"feedbackUp",
"feedbackDown"
]
}
}
},
"required": [
"totalInjections",
"lifetimeInjections",
"uniqueRulesInvoked",
"estMinutesSaved",
"lastInjectionAt",
"topRules"
]
}
}
}
}
}
}
},
"/dashboard/recent-mcp-activity": {
"get": {
"operationId": "dashboard.recentMcpActivity",
"parameters": [
{
"name": "limit",
"in": "query",
"schema": {
"type": "integer",
"minimum": 1,
"maximum": 20
},
"allowEmptyValue": true,
"allowReserved": true
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"events": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"file": {
"type": "string"
},
"intent": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"rulesInjected": {
"type": "number"
},
"ruleTitles": {
"type": "array",
"items": {
"type": "string"
}
},
"client": {
"type": "string"
},
"repoFullName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"serverTs": {
"type": "string"
}
},
"required": [
"id",
"file",
"intent",
"rulesInjected",
"ruleTitles",
"client",
"repoFullName",
"serverTs"
]
}
}
},
"required": [
"events"
]
}
}
}
}
}
}
},
"/dashboard/reviewer-context-status": {
"get": {
"operationId": "dashboard.reviewerContextStatus",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"integrations": {
"type": "array",
"items": {
"type": "object",
"properties": {
"tool": {
"enum": [
"coderabbit",
"generic"
],
"type": "string"
},
"label": {
"type": "string"
},
"mode": {
"const": "dynamic_mcp"
},
"repoFootprint": {
"const": "none"
},
"status": {
"enum": [
"ready",
"connected"
],
"type": "string"
},
"requestsThisWeek": {
"type": "number"
},
"rulesServedThisWeek": {
"type": "number"
},
"likelyUsedThisWeek": {
"type": "number"
},
"lifetimeRequests": {
"type": "number"
},
"lastRequestAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"tool",
"label",
"mode",
"repoFootprint",
"status",
"requestsThisWeek",
"rulesServedThisWeek",
"likelyUsedThisWeek",
"lifetimeRequests",
"lastRequestAt"
]
}
},
"recentChains": {
"type": "array",
"items": {
"type": "object",
"properties": {
"tool": {
"enum": [
"coderabbit",
"generic"
],
"type": "string"
},
"repoFullName": {
"type": "string"
},
"prNumber": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"traceId": {
"type": "string"
},
"ruleId": {
"type": "string"
},
"marker": {
"type": "string"
},
"ruleTitle": {
"type": "string"
},
"servedAt": {
"type": "string"
},
"mentionedAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"commentUrl": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"tool",
"repoFullName",
"prNumber",
"traceId",
"ruleId",
"marker",
"ruleTitle",
"servedAt",
"mentionedAt",
"commentUrl"
]
}
}
},
"required": [
"integrations",
"recentChains"
]
}
}
}
}
}
}
},
"/dashboard/rule-usage-stats": {
"post": {
"operationId": "dashboard.ruleUsageStats",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"titles": {
"type": "array",
"maxItems": 20,
"items": {
"type": "string",
"maxLength": 1000
}
},
"ruleIds": {
"type": "array",
"maxItems": 20,
"items": {
"anyOf": [
{
"type": "string",
"format": "uuid"
},
{
"type": "null"
}
]
}
},
"days": {
"anyOf": [
{
"const": 7
},
{
"const": 30
}
],
"default": 7
}
},
"required": [
"titles"
]
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"stats": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "object",
"properties": {
"count": {
"type": "number"
},
"lastAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"acceptedEditCount": {
"type": "number"
},
"lastAcceptedEdit": {
"anyOf": [
{
"type": "object",
"properties": {
"acceptedAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"acceptedEditId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"filePath": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"repoFullName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"acceptedAt",
"acceptedEditId",
"filePath",
"repoFullName"
]
},
{
"type": "null"
}
]
},
"feedbackUp": {
"type": "number"
},
"feedbackDown": {
"type": "number"
}
},
"required": [
"count",
"lastAt",
"acceptedEditCount",
"lastAcceptedEdit",
"feedbackUp",
"feedbackDown"
]
}
}
},
"required": [
"stats"
]
}
}
}
}
}
}
},
"/dashboard/rule-recall-trace": {
"post": {
"operationId": "dashboard.ruleRecallTrace",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"ruleId": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 25,
"default": 10
},
"windowDays": {
"type": "integer",
"minimum": 1,
"maximum": 365
}
},
"required": [
"ruleId"
]
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"events": {
"type": "array",
"items": {
"type": "object",
"properties": {
"file": {
"type": "string"
},
"intent": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"client": {
"type": "string"
},
"repoFullName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"serverTs": {
"type": "string"
},
"kind": {
"enum": [
"recall",
"accepted_outcome"
],
"type": "string"
},
"observationId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"narrative": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"sessionId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"file",
"intent",
"client",
"repoFullName",
"serverTs",
"kind",
"observationId",
"title",
"narrative",
"sessionId"
]
}
}
},
"required": [
"events"
]
}
}
}
}
}
}
},
"/dashboard/rule-health": {
"get": {
"operationId": "dashboard.ruleHealth",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"totalRules": {
"type": "number"
},
"rulesWithFilePatterns": {
"type": "number"
},
"rulesWithEmptyFilePatterns": {
"type": "number"
},
"byOrigin": {
"type": "array",
"items": {
"type": "object",
"properties": {
"origin": {
"type": "string"
},
"count": {
"type": "number"
}
},
"required": [
"origin",
"count"
]
}
},
"topRepos": {
"type": "array",
"items": {
"type": "object",
"properties": {
"repo": {
"type": "string"
},
"count": {
"type": "number"
}
},
"required": [
"repo",
"count"
]
}
}
},
"required": [
"totalRules",
"rulesWithFilePatterns",
"rulesWithEmptyFilePatterns",
"byOrigin",
"topRepos"
]
}
}
}
}
}
}
},
"/dashboard/audit-runs": {
"post": {
"operationId": "dashboard.uploadAuditRuns",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"runs": {
"type": "array",
"minItems": 1,
"maxItems": 500,
"items": {
"type": "object",
"properties": {
"tsMs": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"projectId": {
"type": "string",
"maxLength": 500
},
"scope": {
"type": "string",
"maxLength": 120
},
"matched": {
"type": "array",
"maxItems": 2000,
"items": {
"type": "string",
"maxLength": 200
}
},
"top": {
"type": "array",
"maxItems": 200,
"items": {
"type": "string",
"maxLength": 200
}
},
"noise": {
"type": "array",
"maxItems": 2000,
"items": {
"type": "string",
"maxLength": 200
}
}
},
"required": [
"tsMs",
"projectId",
"scope",
"matched",
"top",
"noise"
]
}
}
},
"required": [
"runs"
]
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"inserted": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"inserted"
]
}
}
}
}
}
}
},
"/dashboard/audit-rollup": {
"get": {
"operationId": "dashboard.auditRollup",
"parameters": [
{
"name": "limit",
"in": "query",
"schema": {
"type": "integer",
"minimum": 1,
"maximum": 20
},
"allowEmptyValue": true,
"allowReserved": true
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"runsConsidered": {
"type": "number"
},
"stats": {
"type": "array",
"items": {
"type": "object",
"properties": {
"ruleId": {
"type": "string"
},
"matched": {
"type": "number"
},
"top": {
"type": "number"
},
"noise": {
"type": "number"
}
},
"required": [
"ruleId",
"matched",
"top",
"noise"
]
}
}
},
"required": [
"runsConsidered",
"stats"
]
}
}
}
}
}
}
},
"/dashboard/recall-gaps": {
"get": {
"operationId": "dashboard.recallGaps",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"windowDays": {
"type": "number"
},
"totalGaps": {
"type": "number"
},
"totalFiles": {
"type": "number"
},
"topFiles": {
"type": "array",
"items": {
"type": "object",
"properties": {
"file": {
"type": "string"
},
"count": {
"type": "number"
},
"lastAt": {
"type": "string"
},
"intents": {
"type": "array",
"items": {
"type": "string"
}
},
"repoFullName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"file",
"count",
"lastAt",
"intents",
"repoFullName"
]
}
}
},
"required": [
"windowDays",
"totalGaps",
"totalFiles",
"topFiles"
]
}
}
}
}
}
}
},
"/dashboard/noise-auto-archive-summary": {
"get": {
"operationId": "dashboard.noiseAutoArchiveSummary",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"totalArchived": {
"type": "number"
},
"lastSweepAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"totalArchived",
"lastSweepAt"
]
}
}
}
}
}
}
},
"/teams/{teamId}/share-link": {
"post": {
"operationId": "teams.createShareLink",
"parameters": [
{
"name": "teamId",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"token": {
"type": "string"
},
"url": {
"type": "string"
}
},
"required": [
"token",
"url"
]
}
}
}
},
"403": {
"description": "403",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "ADMIN_REQUIRED"
},
"status": {
"const": 403
},
"message": {
"type": "string",
"default": "ADMIN_REQUIRED"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
},
"404": {
"description": "404",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "TEAM_NOT_FOUND"
},
"status": {
"const": 404
},
"message": {
"type": "string",
"default": "TEAM_NOT_FOUND"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
},
{
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "NOT_TEAM_MEMBER"
},
"status": {
"const": 404
},
"message": {
"type": "string",
"default": "NOT_TEAM_MEMBER"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
]
}
}
}
},
"429": {
"description": "429",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "RATE_LIMITED"
},
"status": {
"const": 429
},
"message": {
"type": "string",
"default": "RATE_LIMITED"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
}
}
}
},
"/teams/shared/{token}": {
"get": {
"operationId": "teams.getShared",
"parameters": [
{
"name": "token",
"in": "path",
"required": true,
"schema": {
"type": "string",
"minLength": 32,
"maxLength": 200
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"rules": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"type": {
"type": "string"
},
"sourceRepo": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"name",
"description",
"type",
"sourceRepo"
]
}
}
},
"required": [
"rules"
]
}
}
}
},
"404": {
"description": "404",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "TEAM_NOT_FOUND"
},
"status": {
"const": 404
},
"message": {
"type": "string",
"default": "TEAM_NOT_FOUND"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
},
"429": {
"description": "429",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "RATE_LIMITED"
},
"status": {
"const": 429
},
"message": {
"type": "string",
"default": "RATE_LIMITED"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
}
}
}
},
"/teams/my": {
"get": {
"operationId": "teams.my",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"anyOf": [
{
"$ref": "#/components/schemas/Team"
},
{
"type": "null"
}
]
}
}
}
}
}
}
},
"/teams/list": {
"get": {
"operationId": "teams.list",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"ownerId": {
"type": "string"
},
"maxSeats": {
"type": "number"
},
"githubOrg": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"candidateMinCount": {
"type": "number"
},
"candidateMinDistinctUsers": {
"type": "number"
},
"candidateLookbackDays": {
"type": "number"
},
"candidateEnabled": {
"type": "boolean"
},
"createdAt": {
"type": "string"
},
"isOssGrant": {
"type": "boolean"
},
"ossGrantExpiresAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"role": {
"enum": [
"owner",
"admin",
"member"
],
"type": "string"
}
},
"required": [
"id",
"name",
"ownerId",
"maxSeats",
"githubOrg",
"candidateMinCount",
"candidateMinDistinctUsers",
"candidateLookbackDays",
"candidateEnabled",
"createdAt",
"isOssGrant",
"ossGrantExpiresAt",
"role"
]
}
}
}
}
}
}
}
},
"/teams": {
"post": {
"operationId": "teams.create",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"githubOrg": {
"anyOf": [
{
"type": "string",
"maxLength": 100
},
{
"type": "null"
}
]
}
},
"required": [
"name"
]
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Team"
}
}
}
},
"403": {
"description": "403",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "PLAN_LIMIT_EXCEEDED"
},
"status": {
"const": 403
},
"message": {
"type": "string",
"default": "PLAN_LIMIT_EXCEEDED"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
}
}
}
},
"/teams/{id}": {
"get": {
"operationId": "teams.get",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Team"
}
}
}
},
"404": {
"description": "404",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "TEAM_NOT_FOUND"
},
"status": {
"const": 404
},
"message": {
"type": "string",
"default": "TEAM_NOT_FOUND"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
},
{
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "NOT_TEAM_MEMBER"
},
"status": {
"const": 404
},
"message": {
"type": "string",
"default": "NOT_TEAM_MEMBER"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
]
}
}
}
}
}
},
"put": {
"operationId": "teams.update",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"githubOrg": {
"anyOf": [
{
"type": "string",
"maxLength": 100
},
{
"type": "null"
}
]
}
}
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Team"
}
}
}
},
"403": {
"description": "403",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "ADMIN_REQUIRED"
},
"status": {
"const": 403
},
"message": {
"type": "string",
"default": "ADMIN_REQUIRED"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
},
"404": {
"description": "404",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "TEAM_NOT_FOUND"
},
"status": {
"const": 404
},
"message": {
"type": "string",
"default": "TEAM_NOT_FOUND"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
},
{
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "NOT_TEAM_MEMBER"
},
"status": {
"const": 404
},
"message": {
"type": "string",
"default": "NOT_TEAM_MEMBER"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
]
}
}
}
}
}
},
"delete": {
"operationId": "teams.delete",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
}
},
"403": {
"description": "403",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "FORBIDDEN"
},
"status": {
"const": 403
},
"message": {
"type": "string",
"default": "Forbidden"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
},
{
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "SCOPE_MISSING"
},
"status": {
"const": 403
},
"message": {
"type": "string",
"default": "SCOPE_MISSING"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
]
}
}
}
}
}
}
},
"/teams/{id}/invites": {
"get": {
"operationId": "teams.pendingInvites",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Invite"
}
}
}
}
},
"403": {
"description": "403",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "PLAN_LIMIT_EXCEEDED"
},
"status": {
"const": 403
},
"message": {
"type": "string",
"default": "PLAN_LIMIT_EXCEEDED"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
}
}
}
},
"/teams/{id}/invite": {
"post": {
"operationId": "teams.invite",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"email": {
"type": "string",
"format": "email"
},
"role": {
"enum": [
"admin",
"member"
],
"type": "string",
"default": "member"
}
},
"required": [
"email"
]
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InviteResult"
}
}
}
},
"403": {
"description": "403",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "PLAN_LIMIT_EXCEEDED"
},
"status": {
"const": 403
},
"message": {
"type": "string",
"default": "PLAN_LIMIT_EXCEEDED"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
}
}
}
},
"/teams/{id}/members": {
"get": {
"operationId": "teams.listMembers",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/TeamMember"
}
}
}
}
},
"404": {
"description": "404",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "NOT_TEAM_MEMBER"
},
"status": {
"const": 404
},
"message": {
"type": "string",
"default": "NOT_TEAM_MEMBER"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
}
}
}
},
"/teams/{id}/members/{userId}": {
"delete": {
"operationId": "teams.removeMember",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
},
{
"name": "userId",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
}
},
"403": {
"description": "403",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "CANNOT_REMOVE_OWNER"
},
"status": {
"const": 403
},
"message": {
"type": "string",
"default": "CANNOT_REMOVE_OWNER"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
},
{
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "ADMIN_REQUIRED"
},
"status": {
"const": 403
},
"message": {
"type": "string",
"default": "ADMIN_REQUIRED"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
},
{
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "SCOPE_MISSING"
},
"status": {
"const": 403
},
"message": {
"type": "string",
"default": "SCOPE_MISSING"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
]
}
}
}
},
"404": {
"description": "404",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "MEMBER_NOT_FOUND"
},
"status": {
"const": 404
},
"message": {
"type": "string",
"default": "MEMBER_NOT_FOUND"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
},
{
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "NOT_TEAM_MEMBER"
},
"status": {
"const": 404
},
"message": {
"type": "string",
"default": "NOT_TEAM_MEMBER"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
]
}
}
}
},
"409": {
"description": "409",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "CONFLICT"
},
"status": {
"const": 409
},
"message": {
"type": "string",
"default": "Conflict"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
}
}
}
},
"/teams/{id}/members/{userId}/role": {
"put": {
"operationId": "teams.updateRole",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
},
{
"name": "userId",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"role": {
"enum": [
"admin",
"member"
],
"type": "string"
}
},
"required": [
"role"
]
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
}
},
"403": {
"description": "403",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "CANNOT_CHANGE_OWNER_ROLE"
},
"status": {
"const": 403
},
"message": {
"type": "string",
"default": "CANNOT_CHANGE_OWNER_ROLE"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
},
{
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "ADMIN_REQUIRED"
},
"status": {
"const": 403
},
"message": {
"type": "string",
"default": "ADMIN_REQUIRED"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
},
{
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "SCOPE_MISSING"
},
"status": {
"const": 403
},
"message": {
"type": "string",
"default": "SCOPE_MISSING"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
]
}
}
}
},
"404": {
"description": "404",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "MEMBER_NOT_FOUND"
},
"status": {
"const": 404
},
"message": {
"type": "string",
"default": "MEMBER_NOT_FOUND"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
},
{
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "NOT_TEAM_MEMBER"
},
"status": {
"const": 404
},
"message": {
"type": "string",
"default": "NOT_TEAM_MEMBER"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
]
}
}
}
},
"409": {
"description": "409",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "CONFLICT"
},
"status": {
"const": 409
},
"message": {
"type": "string",
"default": "Conflict"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
}
}
}
},
"/invite/{token}/accept": {
"post": {
"operationId": "invite.accept",
"parameters": [
{
"name": "token",
"in": "path",
"required": true,
"schema": {
"type": "string",
"minLength": 32,
"maxLength": 200
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AcceptInviteResult"
}
}
}
},
"403": {
"description": "403",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "INVITATION_EMAIL_MISMATCH"
},
"status": {
"const": 403
},
"message": {
"type": "string",
"default": "INVITATION_EMAIL_MISMATCH"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
},
{
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "TEAM_CAPACITY_EXCEEDED"
},
"status": {
"const": 403
},
"message": {
"type": "string",
"default": "TEAM_CAPACITY_EXCEEDED"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
]
}
}
}
},
"404": {
"description": "404",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "INVITATION_NOT_FOUND"
},
"status": {
"const": 404
},
"message": {
"type": "string",
"default": "INVITATION_NOT_FOUND"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
},
"409": {
"description": "409",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "INVITATION_ALREADY_ACCEPTED"
},
"status": {
"const": 409
},
"message": {
"type": "string",
"default": "INVITATION_ALREADY_ACCEPTED"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
},
"410": {
"description": "410",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "INVITATION_EXPIRED"
},
"status": {
"const": 410
},
"message": {
"type": "string",
"default": "INVITATION_EXPIRED"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
}
}
}
},
"/invite/{token}/decline": {
"post": {
"operationId": "invite.decline",
"parameters": [
{
"name": "token",
"in": "path",
"required": true,
"schema": {
"type": "string",
"minLength": 32,
"maxLength": 200
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Success"
}
}
}
},
"403": {
"description": "403",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "INVITATION_EMAIL_MISMATCH"
},
"status": {
"const": 403
},
"message": {
"type": "string",
"default": "INVITATION_EMAIL_MISMATCH"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
},
"404": {
"description": "404",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "INVITATION_NOT_FOUND"
},
"status": {
"const": 404
},
"message": {
"type": "string",
"default": "INVITATION_NOT_FOUND"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
},
"409": {
"description": "409",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "INVITATION_ALREADY_ACCEPTED"
},
"status": {
"const": 409
},
"message": {
"type": "string",
"default": "INVITATION_ALREADY_ACCEPTED"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
},
"410": {
"description": "410",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "INVITATION_EXPIRED"
},
"status": {
"const": 410
},
"message": {
"type": "string",
"default": "INVITATION_EXPIRED"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
}
}
}
},
"/teams/explain-permission": {
"get": {
"operationId": "invite.explainPermission",
"parameters": [
{
"name": "userId",
"in": "query",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
},
"allowEmptyValue": true,
"allowReserved": true
},
{
"name": "permission",
"in": "query",
"required": true,
"schema": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"allowEmptyValue": true,
"allowReserved": true
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"permission": {
"type": "string"
},
"userId": {
"type": "string"
},
"allowed": {
"type": "boolean"
},
"reason": {
"type": "string"
},
"sources": {
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"enum": [
"membership",
"plan",
"owner",
"none"
],
"type": "string"
},
"detail": {
"type": "string"
}
},
"required": [
"kind",
"detail"
]
}
}
},
"required": [
"permission",
"userId",
"allowed",
"reason",
"sources"
]
}
}
}
},
"403": {
"description": "403",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "FORBIDDEN"
},
"status": {
"const": 403
},
"message": {
"type": "string",
"default": "Forbidden"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
}
}
}
},
"/reviews": {
"get": {
"operationId": "reviews.listByUser",
"parameters": [
{
"name": "page",
"in": "query",
"schema": {
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991,
"default": 1
},
"allowEmptyValue": true,
"allowReserved": true
},
{
"name": "pageSize",
"in": "query",
"schema": {
"type": "integer",
"minimum": 1,
"maximum": 20,
"default": 20
},
"allowEmptyValue": true,
"allowReserved": true
},
{
"name": "onlyPending",
"in": "query",
"schema": {
"type": "boolean",
"default": false
},
"allowEmptyValue": true,
"allowReserved": true
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ReviewSummary"
}
}
}
}
}
}
}
},
"/reviews/{id}": {
"get": {
"operationId": "reviews.getReview",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ReviewDetail"
}
}
}
},
"404": {
"description": "404",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "REVIEW_NOT_FOUND"
},
"status": {
"const": 404
},
"message": {
"type": "string",
"default": "REVIEW_NOT_FOUND"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
}
}
}
},
"/reviews/comments/recent": {
"get": {
"operationId": "reviews.listRecentComments",
"parameters": [
{
"name": "limit",
"in": "query",
"schema": {
"type": "integer",
"minimum": 1,
"maximum": 20,
"default": 20
},
"allowEmptyValue": true,
"allowReserved": true
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Comment"
}
}
}
}
}
}
}
},
"/reviews/extractions/recent": {
"get": {
"operationId": "reviews.listRecentExtractions",
"parameters": [
{
"name": "limit",
"in": "query",
"schema": {
"type": "integer",
"minimum": 1,
"maximum": 20,
"default": 20
},
"allowEmptyValue": true,
"allowReserved": true
},
{
"name": "includeBaseline",
"in": "query",
"schema": {
"type": "boolean",
"default": false
},
"allowEmptyValue": true,
"allowReserved": true
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Extraction"
}
}
}
}
}
}
}
},
"/reviews/user-stats": {
"get": {
"operationId": "reviews.userStats",
"parameters": [],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"prsImported": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"reviewComments": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"extractedMemories": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"acceptedMemories": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"reposCovered": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"feedbackLearningSignals": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"prsWithPending": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"prsImported",
"reviewComments",
"extractedMemories",
"acceptedMemories",
"reposCovered",
"feedbackLearningSignals",
"prsWithPending"
]
}
}
}
}
}
}
},
"/reviews/{id}/extractions": {
"get": {
"operationId": "reviews.listExtractions",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
},
{
"name": "includeBaseline",
"in": "query",
"schema": {
"type": "boolean",
"default": false
},
"allowEmptyValue": true,
"allowReserved": true
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Extraction"
}
}
}
}
},
"404": {
"description": "404",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "REVIEW_NOT_FOUND"
},
"status": {
"const": 404
},
"message": {
"type": "string",
"default": "REVIEW_NOT_FOUND"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
}
}
}
},
"/reviews/extractions/{id}": {
"patch": {
"operationId": "reviews.updateExtractionStatus",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"status": {
"enum": [
"accepted",
"dismissed"
],
"type": "string"
},
"dismissReason": {
"enum": [
"too_specific",
"too_vague",
"wrong_scope",
"duplicate",
"hallucinated",
"not_team_rule",
"already_covered",
"low_priority",
"other"
],
"type": "string"
},
"dismissNote": {
"type": "string",
"maxLength": 500
}
},
"required": [
"status"
]
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Extraction"
}
}
}
},
"404": {
"description": "404",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "REVIEW_NOT_FOUND"
},
"status": {
"const": 404
},
"message": {
"type": "string",
"default": "REVIEW_NOT_FOUND"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
}
}
}
},
"/reviews/extractions/{id}/content": {
"patch": {
"operationId": "reviews.updateExtractionContent",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"title": {
"type": "string",
"minLength": 3,
"maxLength": 200
},
"content": {
"type": "string",
"minLength": 10,
"maxLength": 5000
},
"filePatterns": {
"type": "array",
"maxItems": 20,
"items": {
"type": "string",
"maxLength": 200
}
}
}
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Extraction"
}
}
}
},
"404": {
"description": "404",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "REVIEW_NOT_FOUND"
},
"status": {
"const": 404
},
"message": {
"type": "string",
"default": "REVIEW_NOT_FOUND"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
}
}
}
},
"/reviews/extractions/{id}/source": {
"get": {
"operationId": "reviews.getExtractionSource",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"author": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"sourceKind": {
"type": "string",
"minLength": 1,
"default": "human"
},
"content": {
"type": "string"
},
"filePath": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"commentUrl": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"diffHunk": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"author",
"content",
"filePath",
"commentUrl",
"diffHunk"
]
}
}
}
},
"404": {
"description": "404",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "REVIEW_NOT_FOUND"
},
"status": {
"const": 404
},
"message": {
"type": "string",
"default": "REVIEW_NOT_FOUND"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
}
}
}
},
"/reviews/extractions/{id}/share-scope": {
"patch": {
"operationId": "reviews.setShareScope",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"shareScope": {
"enum": [
"self-repo",
"team-shared"
],
"type": "string"
}
},
"required": [
"shareScope"
]
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"shareScope": {
"enum": [
"self-repo",
"team-shared"
],
"type": "string"
}
},
"required": [
"id",
"shareScope"
]
}
}
}
},
"400": {
"description": "400",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "BAD_REQUEST"
},
"status": {
"const": 400
},
"message": {
"type": "string",
"default": "Bad Request"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
},
"404": {
"description": "404",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "REVIEW_NOT_FOUND"
},
"status": {
"const": 404
},
"message": {
"type": "string",
"default": "REVIEW_NOT_FOUND"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
}
}
}
},
"/reviews/extractions/bulk-update": {
"post": {
"operationId": "reviews.bulkUpdateExtractionStatus",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"ids": {
"type": "array",
"minItems": 1,
"maxItems": 200,
"items": {
"type": "string",
"format": "uuid"
}
},
"status": {
"enum": [
"accepted",
"dismissed"
],
"type": "string"
},
"dismissReason": {
"enum": [
"too_specific",
"too_vague",
"wrong_scope",
"duplicate",
"hallucinated",
"not_team_rule",
"already_covered",
"low_priority",
"other"
],
"type": "string"
},
"dismissNote": {
"type": "string",
"maxLength": 500
}
},
"required": [
"ids",
"status"
]
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"updated": {
"type": "number"
},
"skipped": {
"type": "number"
}
},
"required": [
"updated",
"skipped"
]
}
}
}
}
}
}
},
"/reviews/import": {
"post": {
"operationId": "reviews.importFromClient",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"reviews": {
"type": "array",
"maxItems": 50,
"items": {
"type": "object",
"properties": {
"repoFullName": {
"type": "string",
"maxLength": 500
},
"sourceRepoFullName": {
"anyOf": [
{
"type": "string",
"maxLength": 500
},
{
"type": "null"
}
]
},
"prNumber": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"prTitle": {
"anyOf": [
{
"type": "string",
"maxLength": 1000
},
{
"type": "null"
}
]
},
"comments": {
"type": "array",
"maxItems": 200,
"items": {
"type": "object",
"properties": {
"filePath": {
"anyOf": [
{
"type": "string",
"maxLength": 1000
},
{
"type": "null"
}
]
},
"lineNumber": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"content": {
"type": "string",
"maxLength": 100000
},
"author": {
"anyOf": [
{
"type": "string",
"maxLength": 200
},
{
"type": "null"
}
]
},
"commentUrl": {
"type": "string",
"maxLength": 2048
},
"threadId": {
"anyOf": [
{
"type": "string",
"maxLength": 200
},
{
"type": "null"
}
]
},
"occurredAt": {
"anyOf": [
{
"type": "string",
"maxLength": 50
},
{
"type": "null"
}
]
}
},
"required": [
"filePath",
"lineNumber",
"content",
"author",
"commentUrl",
"threadId",
"occurredAt"
]
}
}
},
"required": [
"repoFullName",
"prNumber",
"prTitle",
"comments"
]
}
}
},
"required": [
"reviews"
]
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"imported": {
"type": "number"
},
"skipped": {
"type": "number"
},
"extractionQueued": {
"type": "number"
}
},
"required": [
"imported",
"skipped",
"extractionQueued"
]
}
}
}
},
"403": {
"description": "403",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "PLAN_LIMIT_EXCEEDED"
},
"status": {
"const": 403
},
"message": {
"type": "string",
"default": "PLAN_LIMIT_EXCEEDED"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
}
}
}
},
"/reviews/extractions/quality-summary": {
"get": {
"operationId": "reviews.extractionQualitySummary",
"parameters": [
{
"name": "sinceDays",
"in": "query",
"schema": {
"type": "integer",
"minimum": 1,
"maximum": 3650,
"default": 90
},
"allowEmptyValue": true,
"allowReserved": true
},
{
"name": "includeBaseline",
"in": "query",
"schema": {
"type": "boolean",
"default": false
},
"allowEmptyValue": true,
"allowReserved": true
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ExtractionQualitySummary"
}
}
}
}
}
}
},
"/reviews/memory-usage": {
"get": {
"operationId": "reviews.reviewMemoryUsage",
"parameters": [],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"used": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"cap": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"isPaid": {
"type": "boolean"
},
"planId": {
"type": "string"
}
},
"required": [
"used",
"cap",
"isPaid",
"planId"
]
}
}
}
}
}
}
},
"/reviews/recall-past-verdicts": {
"post": {
"operationId": "reviews.recallPastVerdicts",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"embedding": {
"type": "array",
"minItems": 1536,
"maxItems": 1536,
"items": {
"type": "number"
}
},
"queryText": {
"type": "string",
"minLength": 1,
"maxLength": 8000
},
"repoId": {
"type": "string"
},
"teamId": {
"type": "string",
"format": "uuid"
},
"scope": {
"enum": [
"personal",
"team"
],
"type": "string",
"default": "personal"
},
"k": {
"type": "integer",
"minimum": 1,
"maximum": 10,
"default": 5
},
"targetFile": {
"type": "string",
"maxLength": 500
}
}
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"extractionId": {
"type": "string"
},
"codeSnippet": {
"type": "string"
},
"issueText": {
"type": "string"
},
"status": {
"type": "string"
},
"reason": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"similarity": {
"type": "number"
},
"createdAt": {
"type": "string"
},
"signature": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"sourcePrNumber": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"sourcePrTitle": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"sourcePrUrl": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"extractionId",
"codeSnippet",
"issueText",
"status",
"reason",
"similarity",
"createdAt"
]
}
}
}
}
},
"400": {
"description": "400",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "BAD_REQUEST"
},
"status": {
"const": 400
},
"message": {
"type": "string",
"default": "Bad Request"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
},
"403": {
"description": "403",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "PLAN_LIMIT_EXCEEDED"
},
"status": {
"const": 403
},
"message": {
"type": "string",
"default": "PLAN_LIMIT_EXCEEDED"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
},
"404": {
"description": "404",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "NOT_TEAM_MEMBER"
},
"status": {
"const": 404
},
"message": {
"type": "string",
"default": "NOT_TEAM_MEMBER"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
}
}
}
},
"/reviews/{id}/metrics": {
"post": {
"operationId": "reviews.recordReviewMetrics",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"inputTokens": {
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"outputTokens": {
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"estimatedCostUsd": {
"anyOf": [
{
"type": "number",
"minimum": 0
},
{
"type": "null"
}
]
},
"durationMs": {
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"perspectiveCount": {
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"pastVerdictsUsed": {
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
}
}
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"ok": {
"type": "boolean"
}
},
"required": [
"ok"
]
}
}
}
},
"404": {
"description": "404",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "REVIEW_NOT_FOUND"
},
"status": {
"const": 404
},
"message": {
"type": "string",
"default": "REVIEW_NOT_FOUND"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
}
}
}
},
"/reviews/cost/monthly": {
"get": {
"operationId": "reviews.getMonthlyReviewCost",
"parameters": [],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"totalCostUsd": {
"type": "number"
},
"reviewCount": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"totalInputTokens": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"totalOutputTokens": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"month": {
"type": "string"
}
},
"required": [
"totalCostUsd",
"reviewCount",
"totalInputTokens",
"totalOutputTokens",
"month"
]
}
}
}
}
}
}
},
"/reviews/cost/breakdown": {
"get": {
"operationId": "reviews.getCostBreakdown",
"parameters": [
{
"name": "groupBy",
"in": "query",
"required": true,
"schema": {
"enum": [
"week",
"month",
"repo",
"team",
"user"
],
"type": "string"
},
"allowEmptyValue": true,
"allowReserved": true
},
{
"name": "range",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "object",
"properties": {
"from": {
"type": "string",
"format": "date-time",
"x-native-type": "date"
},
"to": {
"type": "string",
"format": "date-time",
"x-native-type": "date"
}
},
"required": [
"from",
"to"
]
},
{
"type": "object",
"properties": {
"lastDays": {
"type": "integer",
"minimum": 1,
"maximum": 365
}
},
"required": [
"lastDays"
]
}
],
"default": {
"lastDays": 84
}
},
"style": "deepObject",
"explode": true,
"allowEmptyValue": true,
"allowReserved": true
},
{
"name": "scope",
"in": "query",
"required": false,
"schema": {
"type": "object",
"properties": {
"teamId": {
"type": "string",
"format": "uuid"
},
"repoId": {
"type": "string"
}
}
},
"style": "deepObject",
"explode": true,
"allowEmptyValue": true,
"allowReserved": true
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"groupBy": {
"enum": [
"week",
"month",
"repo",
"team",
"user"
],
"type": "string"
},
"from": {
"type": "string"
},
"to": {
"type": "string"
},
"buckets": {
"type": "array",
"items": {
"type": "object",
"properties": {
"bucket": {
"type": "string"
},
"costUsd": {
"type": "number"
},
"reviewCount": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"inputTokens": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"outputTokens": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"bucket",
"costUsd",
"reviewCount",
"inputTokens",
"outputTokens"
]
}
}
},
"required": [
"groupBy",
"from",
"to",
"buckets"
]
}
}
}
},
"400": {
"description": "400",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "BAD_REQUEST"
},
"status": {
"const": 400
},
"message": {
"type": "string",
"default": "Bad Request"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
},
"403": {
"description": "403",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "ADMIN_REQUIRED"
},
"status": {
"const": 403
},
"message": {
"type": "string",
"default": "ADMIN_REQUIRED"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
},
"404": {
"description": "404",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "NOT_TEAM_MEMBER"
},
"status": {
"const": 404
},
"message": {
"type": "string",
"default": "NOT_TEAM_MEMBER"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
}
}
}
},
"/reviews/{prReviewId}/baseline": {
"post": {
"operationId": "reviews.snapshotBaseline",
"parameters": [
{
"name": "prReviewId",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"ok": {
"type": "boolean"
},
"flipped": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"ok",
"flipped"
]
}
}
}
},
"404": {
"description": "404",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "REVIEW_NOT_FOUND"
},
"status": {
"const": 404
},
"message": {
"type": "string",
"default": "REVIEW_NOT_FOUND"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
}
}
},
"delete": {
"operationId": "reviews.clearBaseline",
"parameters": [
{
"name": "prReviewId",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"ok": {
"type": "boolean"
},
"cleared": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"ok",
"cleared"
]
}
}
}
},
"404": {
"description": "404",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "REVIEW_NOT_FOUND"
},
"status": {
"const": 404
},
"message": {
"type": "string",
"default": "REVIEW_NOT_FOUND"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
}
}
},
"get": {
"operationId": "reviews.baselineStatus",
"parameters": [
{
"name": "prReviewId",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"setAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"baselineCount": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"newIssueCount": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"required": [
"setAt",
"baselineCount",
"newIssueCount"
]
}
}
}
},
"404": {
"description": "404",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "REVIEW_NOT_FOUND"
},
"status": {
"const": 404
},
"message": {
"type": "string",
"default": "REVIEW_NOT_FOUND"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
}
}
}
},
"/reviews/{prReviewId}/trajectory": {
"post": {
"operationId": "reviews.saveTrajectory",
"parameters": [
{
"name": "prReviewId",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"steps": {
"type": "array",
"items": {
"anyOf": [
{
"type": "object",
"properties": {
"kind": {
"const": "chunks_retrieved"
},
"count": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"symbols": {
"type": "array",
"items": {
"type": "string"
}
},
"similarity_scores": {
"type": "array",
"items": {
"type": "number"
}
}
},
"required": [
"kind",
"count",
"symbols",
"similarity_scores"
]
},
{
"type": "object",
"properties": {
"kind": {
"const": "rules_applied"
},
"rule_ids": {
"type": "array",
"items": {
"type": "string"
}
},
"source": {
"enum": [
"local",
"team",
"global"
],
"type": "string"
}
},
"required": [
"kind",
"rule_ids",
"source"
]
},
{
"type": "object",
"properties": {
"kind": {
"const": "llm_call"
},
"perspective": {
"type": "string"
},
"input_tokens": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"output_tokens": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"raw_output": {
"type": "string"
}
},
"required": [
"kind",
"perspective",
"input_tokens",
"output_tokens"
]
},
{
"type": "object",
"properties": {
"kind": {
"const": "past_verdicts_recalled"
},
"count": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"top_similarities": {
"type": "array",
"items": {
"type": "number"
}
},
"recalled_items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"title": {
"type": "string"
},
"similarity": {
"type": "number"
},
"excerpt": {
"type": "string"
}
},
"required": [
"id",
"title",
"similarity",
"excerpt"
]
},
"default": []
}
},
"required": [
"kind",
"count",
"top_similarities"
]
},
{
"type": "object",
"properties": {
"kind": {
"const": "self_check"
},
"keep_count": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"drop_count": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"avg_confidence": {
"type": "number"
}
},
"required": [
"kind",
"keep_count",
"drop_count",
"avg_confidence"
]
},
{
"type": "object",
"properties": {
"kind": {
"const": "final_decision"
},
"issue_ids_emitted": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"kind",
"issue_ids_emitted"
]
}
]
}
}
},
"required": [
"steps"
]
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
}
},
"required": [
"id"
]
}
}
}
},
"404": {
"description": "404",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "REVIEW_NOT_FOUND"
},
"status": {
"const": 404
},
"message": {
"type": "string",
"default": "REVIEW_NOT_FOUND"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
}
}
},
"get": {
"operationId": "reviews.getTrajectory",
"parameters": [
{
"name": "prReviewId",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"prReviewId": {
"type": "string",
"format": "uuid"
},
"teamId": {
"anyOf": [
{
"type": "string",
"format": "uuid"
},
{
"type": "null"
}
]
},
"steps": {
"type": "array",
"items": {
"anyOf": [
{
"type": "object",
"properties": {
"kind": {
"const": "chunks_retrieved"
},
"count": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"symbols": {
"type": "array",
"items": {
"type": "string"
}
},
"similarity_scores": {
"type": "array",
"items": {
"type": "number"
}
}
},
"required": [
"kind",
"count",
"symbols",
"similarity_scores"
]
},
{
"type": "object",
"properties": {
"kind": {
"const": "rules_applied"
},
"rule_ids": {
"type": "array",
"items": {
"type": "string"
}
},
"source": {
"enum": [
"local",
"team",
"global"
],
"type": "string"
}
},
"required": [
"kind",
"rule_ids",
"source"
]
},
{
"type": "object",
"properties": {
"kind": {
"const": "llm_call"
},
"perspective": {
"type": "string"
},
"input_tokens": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"output_tokens": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"raw_output": {
"type": "string"
}
},
"required": [
"kind",
"perspective",
"input_tokens",
"output_tokens"
]
},
{
"type": "object",
"properties": {
"kind": {
"const": "past_verdicts_recalled"
},
"count": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"top_similarities": {
"type": "array",
"items": {
"type": "number"
}
},
"recalled_items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"title": {
"type": "string"
},
"similarity": {
"type": "number"
},
"excerpt": {
"type": "string"
}
},
"required": [
"id",
"title",
"similarity",
"excerpt"
]
},
"default": []
}
},
"required": [
"kind",
"count",
"top_similarities"
]
},
{
"type": "object",
"properties": {
"kind": {
"const": "self_check"
},
"keep_count": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"drop_count": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"avg_confidence": {
"type": "number"
}
},
"required": [
"kind",
"keep_count",
"drop_count",
"avg_confidence"
]
},
{
"type": "object",
"properties": {
"kind": {
"const": "final_decision"
},
"issue_ids_emitted": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"kind",
"issue_ids_emitted"
]
}
]
}
},
"createdAt": {
"type": "string"
}
},
"required": [
"id",
"prReviewId",
"teamId",
"steps",
"createdAt"
]
}
}
}
},
"403": {
"description": "403",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "PLAN_LIMIT_EXCEEDED"
},
"status": {
"const": 403
},
"message": {
"type": "string",
"default": "PLAN_LIMIT_EXCEEDED"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
},
"404": {
"description": "404",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "REVIEW_NOT_FOUND"
},
"status": {
"const": 404
},
"message": {
"type": "string",
"default": "REVIEW_NOT_FOUND"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
}
}
}
},
"/reviews/trajectory/{id}": {
"delete": {
"operationId": "reviews.deleteTrajectory",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"ok": {
"type": "boolean"
}
},
"required": [
"ok"
]
}
}
}
},
"403": {
"description": "403",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "FORBIDDEN"
},
"status": {
"const": 403
},
"message": {
"type": "string",
"default": "Forbidden"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
},
"404": {
"description": "404",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "REVIEW_NOT_FOUND"
},
"status": {
"const": 404
},
"message": {
"type": "string",
"default": "REVIEW_NOT_FOUND"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
}
}
}
},
"/accepted-edits": {
"post": {
"operationId": "acceptedEdits.record",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"beforeCode": {
"type": "string",
"maxLength": 100000
},
"afterCode": {
"type": "string",
"maxLength": 100000
},
"filePath": {
"anyOf": [
{
"type": "string",
"maxLength": 1000
},
{
"type": "null"
}
]
},
"repoFullName": {
"anyOf": [
{
"type": "string",
"maxLength": 200
},
{
"type": "null"
}
]
},
"targetPrNumber": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"exclusiveMinimum": 0
},
{
"type": "null"
}
]
},
"language": {
"anyOf": [
{
"type": "string",
"maxLength": 50
},
{
"type": "null"
}
]
},
"acceptanceSource": {
"anyOf": [
{
"type": "string",
"maxLength": 64
},
{
"type": "null"
}
]
},
"client": {
"anyOf": [
{
"type": "string",
"maxLength": 64
},
{
"type": "null"
}
]
},
"diffSignature": {
"anyOf": [
{
"type": "string",
"maxLength": 500
},
{
"type": "null"
}
]
},
"ruleIds": {
"type": "array",
"maxItems": 50,
"items": {
"type": "string",
"maxLength": 128
}
}
},
"required": [
"beforeCode",
"afterCode",
"filePath"
]
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"ok": {
"type": "boolean"
},
"acceptanceRecorded": {
"type": "boolean"
},
"acceptanceId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"diffSignature": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"teamId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"attributedRuleIds": {
"type": "array",
"items": {
"type": "string"
}
},
"observationsInserted": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"memoryReinforcementRecorded": {
"type": "boolean"
},
"memoryReinforcementDeduped": {
"type": "boolean"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"ok",
"acceptanceRecorded",
"acceptanceId",
"diffSignature",
"teamId",
"attributedRuleIds",
"observationsInserted",
"memoryReinforcementRecorded",
"memoryReinforcementDeduped",
"error"
]
}
}
}
}
}
}
},
"/backfill/installations": {
"get": {
"operationId": "backfill.myInstallations",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"installations": {
"type": "array",
"items": {
"type": "object",
"properties": {
"repoFullName": {
"type": "string"
},
"alreadySeeded": {
"type": "boolean"
},
"reviewCount": {
"type": "number"
}
},
"required": [
"repoFullName",
"alreadySeeded",
"reviewCount"
]
}
}
},
"required": [
"installations"
]
}
}
}
}
}
}
},
"/backfill/{repoFullName}/status": {
"get": {
"operationId": "backfill.status",
"parameters": [
{
"name": "repoFullName",
"in": "path",
"required": true,
"schema": {
"type": "string",
"maxLength": 200
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"installed": {
"type": "boolean"
},
"existingReviewCount": {
"type": "number"
}
},
"required": [
"installed",
"existingReviewCount"
]
}
}
}
}
}
}
},
"/backfill/start": {
"post": {
"operationId": "backfill.start",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"repoFullName": {
"type": "string",
"maxLength": 200
},
"maxPrs": {
"type": "integer",
"minimum": 1,
"maximum": 500,
"default": 100
},
"since": {
"type": "string",
"format": "date-time"
}
},
"required": [
"repoFullName"
]
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"message": {
"type": "string"
},
"appliedMaxPrs": {
"type": "number"
},
"capped": {
"type": "boolean"
}
},
"required": [
"message",
"appliedMaxPrs",
"capped"
]
}
}
}
}
}
}
},
"/llm-key": {
"get": {
"operationId": "llmKey.get",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"hasKey": {
"type": "boolean"
},
"masked": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"apiUrl": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"embeddingQuota": {
"type": "object",
"properties": {
"mode": {
"enum": [
"managed_capped",
"managed_unlimited",
"byok"
],
"type": "string"
},
"used": {
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"cap": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"exclusiveMinimum": 0
},
{
"type": "null"
}
]
},
"remaining": {
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
}
},
"required": [
"mode",
"used",
"cap",
"remaining"
]
},
"updatedAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"hasKey",
"masked",
"apiUrl",
"embeddingQuota",
"updatedAt"
]
}
}
}
}
}
},
"put": {
"operationId": "llmKey.set",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"apiKey": {
"type": "string",
"minLength": 1,
"maxLength": 500
},
"apiUrl": {
"type": "string",
"maxLength": 500
}
},
"required": [
"apiKey"
]
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"const": true
}
},
"required": [
"success"
]
}
}
}
}
}
},
"delete": {
"operationId": "llmKey.clear",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"const": true
}
},
"required": [
"success"
]
}
}
}
}
}
}
},
"/impact/banner": {
"get": {
"operationId": "impact.banner",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"pastVerdictsThisWeek": {
"type": "number"
},
"weekStartIso": {
"type": "string"
}
},
"required": [
"pastVerdictsThisWeek",
"weekStartIso"
]
}
}
}
}
}
}
},
"/impact/weekly": {
"get": {
"operationId": "impact.weekly",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"weeks": {
"type": "array",
"items": {
"type": "object",
"properties": {
"weekStartIso": {
"type": "string"
},
"rulesSedimented": {
"type": "number"
},
"pastVerdictsRecalled": {
"type": "number"
},
"fixesAccepted": {
"type": "number"
}
},
"required": [
"weekStartIso",
"rulesSedimented",
"pastVerdictsRecalled",
"fixesAccepted"
]
}
}
},
"required": [
"weeks"
]
}
}
}
}
}
}
},
"/impact/fix-scorecard": {
"get": {
"operationId": "impact.fixScorecard",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"last30": {
"type": "object",
"properties": {
"accepted": {
"type": "number"
},
"total": {
"type": "number"
}
},
"required": [
"accepted",
"total"
]
},
"prior30": {
"type": "object",
"properties": {
"accepted": {
"type": "number"
},
"total": {
"type": "number"
}
},
"required": [
"accepted",
"total"
]
},
"trendPct": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"roi": {
"type": "object",
"properties": {
"acceptedFixesLast30": {
"type": "number"
},
"repeatCommentSignals": {
"type": "number"
},
"modeledReviewMinutes": {
"type": "number"
},
"repeatFeedbackReduced": {
"type": "number"
},
"sourceEvidenceItems": {
"type": "number"
},
"acceptedProofRules": {
"type": "number"
},
"reviewerContextRulesServedLast30": {
"type": "number"
}
},
"required": [
"acceptedFixesLast30",
"repeatCommentSignals",
"modeledReviewMinutes",
"repeatFeedbackReduced",
"sourceEvidenceItems",
"acceptedProofRules",
"reviewerContextRulesServedLast30"
]
},
"localAttribution": {
"type": "object",
"properties": {
"linkedRepo": {
"type": "number"
},
"missingRepo": {
"type": "number"
}
},
"required": [
"linkedRepo",
"missingRepo"
]
},
"localRepoBreakdown": {
"type": "array",
"items": {
"type": "object",
"properties": {
"repoFullName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"accepted": {
"type": "number"
}
},
"required": [
"repoFullName",
"accepted"
]
}
}
},
"required": [
"last30",
"prior30",
"trendPct",
"roi",
"localAttribution",
"localRepoBreakdown"
]
}
}
}
}
}
}
},
"/impact/flywheel-proof": {
"get": {
"operationId": "impact.flywheelProof",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"completeSteps": {
"type": "number"
},
"totalSteps": {
"type": "number"
},
"acceptedOutcomeTarget": {
"type": "number"
},
"acceptedOutcomeGap": {
"type": "number"
},
"acceptedOutcomeRules": {
"type": "number"
},
"acceptedOutcomeTraceable": {
"type": "number"
},
"acceptedOutcomeWithFilePath": {
"type": "number"
},
"acceptedOutcomeWithSourcePr": {
"type": "number"
},
"acceptedOutcomeLinkedToPriorRecall": {
"type": "number"
},
"acceptedOutcomePriorRecallRate": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"acceptedOutcomeTraceableRate": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"acceptedOutcomeProofRules": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"sourceRepo": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"sourceReviewUrl": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"sourceReviewExcerpt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"sourcePrNumber": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"sourcePrTitle": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"sourceExtractionStatus": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"sourceExtractionId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"sourceMatchKind": {
"anyOf": [
{
"enum": [
"extraction_id",
"title_fallback"
],
"type": "string"
},
{
"type": "null"
}
]
},
"sourceKind": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"default": "human"
},
{
"type": "null"
}
]
},
"acceptedOutcomes": {
"type": "number"
},
"citedCount": {
"type": "number"
},
"trustRate": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"latestAtIso": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"latestFilePath": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"ruleExists": {
"type": "boolean"
}
},
"required": [
"id",
"name",
"sourceRepo",
"sourceReviewUrl",
"sourceReviewExcerpt",
"sourcePrNumber",
"sourcePrTitle",
"sourceExtractionStatus",
"sourceExtractionId",
"sourceMatchKind",
"acceptedOutcomes",
"citedCount",
"trustRate",
"latestAtIso",
"latestFilePath",
"ruleExists"
]
}
},
"acceptedOutcomeSourceBreakdown": {
"type": "array",
"items": {
"type": "object",
"properties": {
"sourceKind": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"default": "human"
},
{
"type": "null"
}
]
},
"acceptedOutcomes": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"ruleCount": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"modeledReviewMinutes": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"acceptedOutcomes",
"ruleCount",
"modeledReviewMinutes"
]
}
},
"launchProofReady": {
"type": "boolean"
},
"modeledReviewMinutes": {
"type": "number"
},
"closedLoopRate": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"nextStep": {
"type": "string"
},
"steps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"enum": [
"review_memory",
"rule_recall",
"agent_citation",
"edit_attribution",
"accepted_outcome"
],
"type": "string"
},
"label": {
"type": "string"
},
"count": {
"type": "number"
},
"latestAtIso": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"latestFilePath": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"latestRepo": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"evidence": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"enum": [
"complete",
"missing"
],
"type": "string"
}
},
"required": [
"key",
"label",
"count",
"latestAtIso",
"latestFilePath",
"latestRepo",
"evidence",
"status"
]
}
}
},
"required": [
"completeSteps",
"totalSteps",
"acceptedOutcomeTarget",
"acceptedOutcomeGap",
"acceptedOutcomeRules",
"acceptedOutcomeTraceable",
"acceptedOutcomeWithFilePath",
"acceptedOutcomeWithSourcePr",
"acceptedOutcomeLinkedToPriorRecall",
"acceptedOutcomePriorRecallRate",
"acceptedOutcomeTraceableRate",
"acceptedOutcomeProofRules",
"acceptedOutcomeSourceBreakdown",
"launchProofReady",
"modeledReviewMinutes",
"closedLoopRate",
"nextStep",
"steps"
]
}
}
}
}
}
}
},
"/impact/proof-ledger": {
"get": {
"operationId": "impact.proofLedger",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"entries": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"ruleId": {
"type": "string"
},
"ruleExists": {
"type": "boolean"
},
"ruleName": {
"type": "string"
},
"acceptedAtIso": {
"type": "string"
},
"acceptedFilePath": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"acceptedTitle": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"acceptedNarrative": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"acceptedTool": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"acceptedSessionId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"modeledReviewMinutes": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"confidence": {
"enum": [
"strong",
"medium",
"weak"
],
"type": "string"
},
"confidenceReasons": {
"type": "array",
"items": {
"type": "string"
}
},
"source": {
"type": "object",
"properties": {
"sourceRepo": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"sourceReviewUrl": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"sourceReviewExcerpt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"sourcePrNumber": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"sourcePrTitle": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"sourceExtractionId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"sourceMatchKind": {
"anyOf": [
{
"enum": [
"extraction_id",
"title_fallback"
],
"type": "string"
},
{
"type": "null"
}
]
},
"sourceKind": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"default": "human"
},
{
"type": "null"
}
]
}
},
"required": [
"sourceRepo",
"sourceReviewUrl",
"sourceReviewExcerpt",
"sourcePrNumber",
"sourcePrTitle",
"sourceExtractionId",
"sourceMatchKind"
]
},
"priorRecall": {
"anyOf": [
{
"type": "object",
"properties": {
"observationId": {
"type": "string"
},
"eventType": {
"type": "string"
},
"recalledAtIso": {
"type": "string"
},
"filePath": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"narrative": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"sessionId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"strictMatchCount": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"matchKind": {
"enum": [
"same_session",
"same_file",
"same_scope"
],
"type": "string"
}
},
"required": [
"observationId",
"eventType",
"recalledAtIso",
"filePath",
"title",
"narrative",
"sessionId",
"strictMatchCount",
"matchKind"
]
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"ruleId",
"ruleExists",
"ruleName",
"acceptedAtIso",
"acceptedFilePath",
"acceptedTitle",
"acceptedNarrative",
"acceptedTool",
"acceptedSessionId",
"modeledReviewMinutes",
"confidence",
"confidenceReasons",
"source",
"priorRecall"
]
}
},
"totals": {
"type": "object",
"properties": {
"entries": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"strong": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"medium": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"weak": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"modeledReviewMinutes": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"recallBackedEntries": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"sourceLinkedEntries": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"traceableEntries": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"entries",
"strong",
"medium",
"weak",
"modeledReviewMinutes",
"recallBackedEntries",
"sourceLinkedEntries",
"traceableEntries"
]
}
},
"required": [
"entries",
"totals"
]
}
}
}
}
}
}
},
"/impact/top-rules": {
"get": {
"operationId": "impact.topRules",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"rules": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"severity": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"language": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"acceptanceCount": {
"type": "number"
},
"distinctUsers": {
"type": "number"
},
"citedCount": {
"type": "number"
},
"trustRate": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"reviewerProofReadyCount": {
"type": "number"
},
"reviewerContextServes": {
"type": "number"
},
"reviewerMentions": {
"type": "number"
},
"sourceRepo": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"proofChain": {
"anyOf": [
{
"type": "object",
"properties": {
"sourceReviewUrl": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"sourceRepo": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"sourcePrNumber": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"sourcePrTitle": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"reviewerCommentUrl": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"reviewerMentionedAtIso": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"reviewerContextServedAtIso": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"acceptedOutcomes": {
"type": "number"
},
"modeledReviewMinutes": {
"type": "number"
}
},
"required": [
"sourceReviewUrl",
"sourceRepo",
"sourcePrNumber",
"sourcePrTitle",
"reviewerCommentUrl",
"reviewerMentionedAtIso",
"reviewerContextServedAtIso",
"acceptedOutcomes",
"modeledReviewMinutes"
]
},
{
"type": "null"
}
],
"default": null
},
"acceptedProofSource": {
"anyOf": [
{
"enum": [
"local_fix",
"cloud_fix",
"historical_backfill",
"mixed"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"proofLocked": {
"type": "boolean",
"default": false
}
},
"required": [
"id",
"name",
"severity",
"language",
"acceptanceCount",
"distinctUsers",
"citedCount",
"trustRate",
"reviewerProofReadyCount",
"reviewerContextServes",
"reviewerMentions",
"sourceRepo"
]
}
},
"promotionProgress": {
"type": "array",
"items": {
"type": "object",
"properties": {
"filePath": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"language": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"acceptanceCount": {
"type": "number"
},
"requiredCount": {
"type": "number"
},
"distinctUsers": {
"type": "number"
},
"requiredDistinctUsers": {
"type": "number"
}
},
"required": [
"filePath",
"language",
"acceptanceCount",
"requiredCount",
"distinctUsers",
"requiredDistinctUsers"
]
}
}
},
"required": [
"rules",
"promotionProgress"
]
}
}
}
}
}
}
},
"/impact/rule-health": {
"get": {
"operationId": "impact.ruleHealth",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"totalRules": {
"type": "number"
},
"sourceRepos": {
"type": "number"
},
"citedRules": {
"type": "number"
},
"trustedRules": {
"type": "number"
},
"medianTrustRate": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"duplicateGroups": {
"type": "number"
},
"duplicateRules": {
"type": "number"
},
"duplicateRate": {
"type": "number"
},
"topDuplicateGroups": {
"type": "array",
"items": {
"type": "object",
"properties": {
"sourceRepo": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"duplicateCount": {
"type": "number"
},
"primaryRuleId": {
"type": "string"
},
"primaryRuleName": {
"type": "string"
},
"examples": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"id",
"name"
]
}
}
},
"required": [
"sourceRepo",
"duplicateCount",
"primaryRuleId",
"primaryRuleName",
"examples"
]
}
}
},
"required": [
"totalRules",
"sourceRepos",
"citedRules",
"trustedRules",
"medianTrustRate",
"duplicateGroups",
"duplicateRules",
"duplicateRate",
"topDuplicateGroups"
]
}
}
}
}
}
}
},
"/impact/rules-by-origin-daily": {
"get": {
"operationId": "impact.rulesByOriginDaily",
"parameters": [
{
"name": "sinceDays",
"in": "query",
"schema": {
"type": "number",
"minimum": 1,
"maximum": 90,
"default": 30
},
"allowEmptyValue": true,
"allowReserved": true
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"date": {
"type": "string"
},
"origin": {
"type": "string"
},
"count": {
"type": "number"
}
},
"required": [
"date",
"origin",
"count"
]
}
}
}
}
}
}
}
},
"/impact/coverage": {
"get": {
"operationId": "impact.coverage",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"repos": {
"type": "number"
},
"prs": {
"type": "number"
},
"files": {
"type": "number"
},
"reviewCommentsIndexed": {
"type": "number"
},
"aiReviewerCommentsIndexed": {
"type": "number"
},
"humanReviewCommentsIndexed": {
"type": "number"
}
},
"required": [
"repos",
"prs",
"files",
"reviewCommentsIndexed",
"aiReviewerCommentsIndexed",
"humanReviewCommentsIndexed"
]
}
}
}
}
}
}
},
"/impact/learned": {
"get": {
"operationId": "impact.learned",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"title": {
"type": "string"
},
"content": {
"type": "string"
},
"knowledgeType": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"repoFullName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"prNumber": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"filePath": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"createdAtIso": {
"type": "string"
}
},
"required": [
"id",
"title",
"content",
"knowledgeType",
"repoFullName",
"prNumber",
"filePath",
"createdAtIso"
]
}
},
"totalAccepted": {
"type": "number"
}
},
"required": [
"items",
"totalAccepted"
]
}
}
}
}
}
}
},
"/impact/coverage-rules": {
"get": {
"operationId": "impact.coverageRules",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"available": {
"type": "boolean"
},
"ratio": {
"type": "number"
},
"matchedFiles": {
"type": "number"
},
"totalFiles": {
"type": "number"
},
"sparkline": {
"type": "array",
"items": {
"type": "object",
"properties": {
"weekStartIso": {
"type": "string"
},
"value": {
"type": "number"
}
},
"required": [
"weekStartIso",
"value"
]
}
}
},
"required": [
"available",
"ratio",
"matchedFiles",
"totalFiles",
"sparkline"
]
}
}
}
}
}
}
},
"/impact/repeat-mistakes": {
"get": {
"operationId": "impact.repeatMistakes",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"available": {
"type": "boolean"
},
"count": {
"type": "number"
},
"sparkline": {
"type": "array",
"items": {
"type": "object",
"properties": {
"weekStartIso": {
"type": "string"
},
"value": {
"type": "number"
}
},
"required": [
"weekStartIso",
"value"
]
}
}
},
"required": [
"available",
"count",
"sparkline"
]
}
}
}
}
}
}
},
"/impact/team-age": {
"get": {
"operationId": "impact.teamAge",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"daysActive": {
"type": "number"
}
},
"required": [
"daysActive"
]
}
}
}
}
}
}
},
"/impact/preview-digest": {
"post": {
"operationId": "impact.previewDigest",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"weekStartIso": {
"type": "string"
},
"weekEndIso": {
"type": "string"
},
"subject": {
"type": "string"
},
"markdown": {
"type": "string"
},
"html": {
"type": "string"
},
"metrics": {
"type": "object",
"properties": {
"pastVerdictsRecalled": {
"type": "number"
},
"fixesAccepted": {
"type": "number"
},
"newRulesSedimented": {
"type": "number"
},
"topRules": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"acceptanceCount": {
"type": "number"
}
},
"required": [
"name",
"acceptanceCount"
]
}
},
"coverage": {
"type": "object",
"properties": {
"repos": {
"type": "number"
},
"prs": {
"type": "number"
},
"files": {
"type": "number"
}
},
"required": [
"repos",
"prs",
"files"
]
},
"gaps": {
"type": "object",
"properties": {
"totalCalls": {
"type": "number"
},
"totalFiles": {
"type": "number"
},
"topFiles": {
"type": "array",
"items": {
"type": "object",
"properties": {
"file": {
"type": "string"
},
"count": {
"type": "number"
},
"repoFullName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"file",
"count",
"repoFullName"
]
}
}
},
"required": [
"totalCalls",
"totalFiles",
"topFiles"
]
}
},
"required": [
"pastVerdictsRecalled",
"fixesAccepted",
"newRulesSedimented",
"topRules",
"coverage",
"gaps"
]
}
},
"required": [
"weekStartIso",
"weekEndIso",
"subject",
"markdown",
"html",
"metrics"
]
}
}
}
}
}
}
},
"/impact/weekly-digest": {
"get": {
"operationId": "impact.weeklyDigest",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"weekStartIso": {
"type": "string"
},
"weekEndIso": {
"type": "string"
},
"subject": {
"type": "string"
},
"markdown": {
"type": "string"
},
"html": {
"type": "string"
},
"metrics": {
"type": "object",
"properties": {
"pastVerdictsRecalled": {
"type": "number"
},
"fixesAccepted": {
"type": "number"
},
"newRulesSedimented": {
"type": "number"
},
"topRules": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"acceptanceCount": {
"type": "number"
}
},
"required": [
"name",
"acceptanceCount"
]
}
},
"coverage": {
"type": "object",
"properties": {
"repos": {
"type": "number"
},
"prs": {
"type": "number"
},
"files": {
"type": "number"
}
},
"required": [
"repos",
"prs",
"files"
]
},
"gaps": {
"type": "object",
"properties": {
"totalCalls": {
"type": "number"
},
"totalFiles": {
"type": "number"
},
"topFiles": {
"type": "array",
"items": {
"type": "object",
"properties": {
"file": {
"type": "string"
},
"count": {
"type": "number"
},
"repoFullName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"file",
"count",
"repoFullName"
]
}
}
},
"required": [
"totalCalls",
"totalFiles",
"topFiles"
]
}
},
"required": [
"pastVerdictsRecalled",
"fixesAccepted",
"newRulesSedimented",
"topRules",
"coverage",
"gaps"
]
}
},
"required": [
"weekStartIso",
"weekEndIso",
"subject",
"markdown",
"html",
"metrics"
]
}
}
}
}
}
}
},
"/knowledge/corpus": {
"post": {
"operationId": "knowledge.buildCorpus",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"description": {
"type": "string",
"maxLength": 2000
},
"filters": {
"type": "object",
"properties": {
"origin": {
"type": "string",
"maxLength": 100
},
"filePatterns": {
"type": "array",
"maxItems": 20,
"items": {
"type": "string",
"maxLength": 200
}
},
"since": {
"type": "string",
"format": "date-time"
}
},
"default": {}
}
},
"required": [
"name"
]
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"itemCount": {
"type": "number"
}
},
"required": [
"id",
"itemCount"
]
}
}
}
},
"404": {
"description": "404",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "NOT_TEAM_MEMBER"
},
"status": {
"const": 404
},
"message": {
"type": "string",
"default": "NOT_TEAM_MEMBER"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
}
}
}
},
"/knowledge/corpus/{corpusId}/prime": {
"post": {
"operationId": "knowledge.primeCorpus",
"parameters": [
{
"name": "corpusId",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"corpusId": {
"type": "string"
},
"sessionToken": {
"type": "string"
},
"primedAtIso": {
"type": "string"
}
},
"required": [
"corpusId",
"sessionToken",
"primedAtIso"
]
}
}
}
},
"404": {
"description": "404",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "NOT_FOUND"
},
"status": {
"const": 404
},
"message": {
"type": "string",
"default": "Not Found"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
},
{
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "NOT_TEAM_MEMBER"
},
"status": {
"const": 404
},
"message": {
"type": "string",
"default": "NOT_TEAM_MEMBER"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
]
}
}
}
}
}
}
},
"/knowledge/corpus/{corpusId}": {
"get": {
"operationId": "knowledge.getCorpus",
"parameters": [
{
"name": "corpusId",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"itemCount": {
"type": "number"
},
"createdAtIso": {
"type": "string"
},
"primedAtIso": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"lastQueriedAtIso": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"itemKind": {
"enum": [
"rule",
"extraction"
],
"type": "string"
},
"title": {
"type": "string"
},
"preview": {
"type": "string"
}
},
"required": [
"id",
"itemKind",
"title",
"preview"
]
}
}
},
"required": [
"id",
"name",
"description",
"itemCount",
"createdAtIso",
"primedAtIso",
"lastQueriedAtIso",
"items"
]
}
}
}
},
"404": {
"description": "404",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "NOT_FOUND"
},
"status": {
"const": 404
},
"message": {
"type": "string",
"default": "Not Found"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
},
{
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "NOT_TEAM_MEMBER"
},
"status": {
"const": 404
},
"message": {
"type": "string",
"default": "NOT_TEAM_MEMBER"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
]
}
}
}
}
}
}
},
"/knowledge/corpus/{corpusId}/query": {
"post": {
"operationId": "knowledge.queryCorpus",
"parameters": [
{
"name": "corpusId",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"question": {
"type": "string",
"minLength": 1,
"maxLength": 4000
}
},
"required": [
"question"
]
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"answer": {
"type": "string"
},
"citations": {
"type": "array",
"items": {
"type": "object",
"properties": {
"corpusItemId": {
"type": "string"
},
"itemKind": {
"enum": [
"rule",
"extraction"
],
"type": "string"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"corpusItemId",
"itemKind",
"title"
]
}
}
},
"required": [
"answer",
"citations"
]
}
}
}
},
"404": {
"description": "404",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "NOT_FOUND"
},
"status": {
"const": 404
},
"message": {
"type": "string",
"default": "Not Found"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
},
{
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "NOT_TEAM_MEMBER"
},
"status": {
"const": 404
},
"message": {
"type": "string",
"default": "NOT_TEAM_MEMBER"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
]
}
}
}
},
"500": {
"description": "500",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "LLM_API_ERROR"
},
"status": {
"const": 500
},
"message": {
"type": "string",
"default": "LLM_API_ERROR"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
},
"503": {
"description": "503",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "LLM_NOT_CONFIGURED"
},
"status": {
"const": 503
},
"message": {
"type": "string",
"default": "LLM_NOT_CONFIGURED"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
}
}
}
},
"/knowledge/corpora": {
"get": {
"operationId": "knowledge.listCorpora",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"itemCount": {
"type": "number"
},
"createdAtIso": {
"type": "string"
},
"primedAtIso": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"lastQueriedAtIso": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"name",
"itemCount",
"createdAtIso",
"primedAtIso",
"lastQueriedAtIso"
]
}
}
}
}
}
}
}
},
"/me": {
"get": {
"operationId": "me.get",
"parameters": [],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"tier": {
"enum": [
"free",
"pro",
"team",
"enterprise"
],
"type": "string"
},
"planLabel": {
"type": "string"
},
"planAccent": {
"type": "string",
"pattern": "^#[0-9a-f]{6}$"
},
"entitlements": {
"type": "object",
"properties": {
"cloudHosted": {
"type": "boolean"
},
"crossMachineSync": {
"type": "boolean"
},
"reviewMemoryCapacity": {
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"reviewMemoryUsed": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"publishToTeam": {
"type": "boolean"
},
"knowledgeBuild": {
"type": "boolean"
},
"byokAllowed": {
"type": "boolean"
},
"supportSla": {
"enum": [
"community",
"48h",
"8h",
"custom"
],
"type": "string"
}
},
"required": [
"cloudHosted",
"crossMachineSync",
"reviewMemoryCapacity",
"reviewMemoryUsed",
"publishToTeam",
"knowledgeBuild",
"byokAllowed",
"supportSla"
]
},
"ruleCount": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"publishedCount": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"eventStrip": {
"anyOf": [
{
"type": "object",
"properties": {
"kind": {
"const": "none"
}
},
"required": [
"kind"
]
},
{
"type": "object",
"properties": {
"kind": {
"const": "cross_machine"
},
"otherHost": {
"type": "string",
"minLength": 1
}
},
"required": [
"kind",
"otherHost"
]
},
{
"type": "object",
"properties": {
"kind": {
"const": "teammate_caught"
},
"rule": {
"type": "string",
"minLength": 1
},
"teammate": {
"type": "string",
"minLength": 1
},
"firedAt": {
"type": "string",
"format": "date-time"
}
},
"required": [
"kind",
"rule",
"teammate",
"firedAt"
]
}
]
},
"dismissals": {
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"minLength": 1
},
"scope": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"expiresAt": {
"type": "string",
"format": "date-time"
},
"meta": {
"anyOf": [
{
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
{
"type": "null"
}
]
}
},
"required": [
"kind",
"scope",
"expiresAt"
]
}
}
},
"required": [
"tier",
"planLabel",
"planAccent",
"entitlements",
"ruleCount",
"publishedCount",
"eventStrip",
"dismissals"
]
}
}
}
}
}
}
},
"/cli-token": {
"post": {
"operationId": "me.cliToken",
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"token": {
"type": "string"
},
"refreshToken": {
"type": "string"
}
},
"required": [
"token",
"refreshToken"
]
}
}
}
}
}
}
},
"/cli-token/github": {
"post": {
"operationId": "me.githubCliToken",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"githubToken": {
"type": "string",
"minLength": 1,
"maxLength": 512
}
},
"required": [
"githubToken"
]
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"token": {
"type": "string"
},
"refreshToken": {
"type": "string"
}
},
"required": [
"token",
"refreshToken"
]
}
}
}
},
"401": {
"description": "401",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "UNAUTHORIZED"
},
"status": {
"const": 401
},
"message": {
"type": "string",
"default": "Unauthorized"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
},
"429": {
"description": "429",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "RATE_LIMITED"
},
"status": {
"const": 429
},
"message": {
"type": "string",
"default": "RATE_LIMITED"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
}
}
}
},
"/desktop-token": {
"post": {
"operationId": "me.desktopToken",
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"state": {
"type": "string",
"minLength": 16,
"maxLength": 128,
"pattern": "^(?:[0-9a-f]{16,128}|[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})$"
}
}
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"token": {
"type": "string"
},
"refreshToken": {
"type": "string"
},
"handoffCode": {
"type": "string"
}
},
"required": [
"token",
"refreshToken"
]
}
}
}
}
}
},
"get": {
"operationId": "me.desktopTokenPoll",
"parameters": [
{
"name": "state",
"in": "query",
"schema": {
"type": "string",
"minLength": 16,
"maxLength": 128,
"pattern": "^(?:[0-9a-f]{16,128}|[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})$"
},
"allowEmptyValue": true,
"allowReserved": true
},
{
"name": "code",
"in": "query",
"schema": {
"type": "string",
"minLength": 48,
"maxLength": 128,
"pattern": "^[0-9a-f]+$"
},
"allowEmptyValue": true,
"allowReserved": true
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"token": {
"type": "string"
},
"refreshToken": {
"type": "string"
}
},
"required": [
"token",
"refreshToken"
]
}
}
}
},
"400": {
"description": "400",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "BAD_REQUEST"
},
"status": {
"const": 400
},
"message": {
"type": "string",
"default": "Bad Request"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
},
"404": {
"description": "404",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "NOT_FOUND"
},
"status": {
"const": 404
},
"message": {
"type": "string",
"default": "Not Found"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
}
}
},
"options": {
"operationId": "me.desktopTokenOptions",
"responses": {
"204": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"anyOf": [
{},
{
"not": {}
}
]
}
}
}
}
}
}
},
"/token/refresh": {
"post": {
"operationId": "me.refreshToken",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"clientId": {
"enum": [
"difflore-cli",
"difflore-desktop"
],
"type": "string"
},
"refreshToken": {
"type": "string",
"minLength": 64,
"maxLength": 256
}
},
"required": [
"clientId",
"refreshToken"
]
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"token": {
"type": "string"
},
"refreshToken": {
"type": "string"
}
},
"required": [
"token",
"refreshToken"
]
}
}
}
},
"401": {
"description": "401",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "UNAUTHORIZED"
},
"status": {
"const": 401
},
"message": {
"type": "string",
"default": "Unauthorized"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
},
"429": {
"description": "429",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "RATE_LIMITED"
},
"status": {
"const": 429
},
"message": {
"type": "string",
"default": "RATE_LIMITED"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
}
}
}
},
"/me/pr-data/preview": {
"get": {
"operationId": "me.previewPrData",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"counts": {
"type": "object",
"properties": {
"prReviews": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"prReviewComments": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"candidateRules": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"memoryNodes": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"fixAcceptances": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"prReviews",
"prReviewComments",
"candidateRules",
"memoryNodes",
"fixAcceptances"
]
}
},
"required": [
"counts"
]
}
}
}
}
}
}
},
"/me/pr-data": {
"delete": {
"operationId": "me.deletePrData",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"deleted": {
"type": "object",
"properties": {
"prReviews": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"prReviewComments": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"candidateRules": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"memoryNodes": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"fixAcceptances": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"prReviews",
"prReviewComments",
"candidateRules",
"memoryNodes",
"fixAcceptances"
]
}
},
"required": [
"deleted"
]
}
}
}
}
}
}
},
"/pricing/public": {
"get": {
"operationId": "pricing.getPublic",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"anyOf": [
{},
{
"not": {}
}
]
}
}
}
}
}
}
},
"/cloud/observations": {
"post": {
"operationId": "observations.ingest",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"anyOf": [
{},
{
"not": {}
}
]
}
}
}
},
"400": {
"description": "400",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "BAD_REQUEST"
},
"status": {
"const": 400
},
"message": {
"type": "string",
"default": "Bad Request"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
},
"401": {
"description": "401",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "UNAUTHORIZED"
},
"status": {
"const": 401
},
"message": {
"type": "string",
"default": "Unauthorized"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
},
"403": {
"description": "403",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "SCOPE_MISSING"
},
"status": {
"const": 403
},
"message": {
"type": "string",
"default": "SCOPE_MISSING"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
},
{
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "FORBIDDEN"
},
"status": {
"const": 403
},
"message": {
"type": "string",
"default": "Forbidden"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
]
}
}
}
},
"429": {
"description": "429",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "RATE_LIMITED"
},
"status": {
"const": 429
},
"message": {
"type": "string",
"default": "RATE_LIMITED"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
}
}
}
},
"/cloud/session-mined-candidates": {
"post": {
"operationId": "sessionMinedCandidates.ingest",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"anyOf": [
{},
{
"not": {}
}
]
}
}
}
},
"400": {
"description": "400",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "BAD_REQUEST"
},
"status": {
"const": 400
},
"message": {
"type": "string",
"default": "Bad Request"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
},
"401": {
"description": "401",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "UNAUTHORIZED"
},
"status": {
"const": 401
},
"message": {
"type": "string",
"default": "Unauthorized"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
},
"403": {
"description": "403",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "SCOPE_MISSING"
},
"status": {
"const": 403
},
"message": {
"type": "string",
"default": "SCOPE_MISSING"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
},
{
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "FORBIDDEN"
},
"status": {
"const": 403
},
"message": {
"type": "string",
"default": "Forbidden"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
]
}
}
}
},
"429": {
"description": "429",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"defined": {
"const": true
},
"code": {
"const": "RATE_LIMITED"
},
"status": {
"const": 429
},
"message": {
"type": "string",
"default": "RATE_LIMITED"
},
"data": {}
},
"required": [
"defined",
"code",
"status",
"message"
]
}
}
}
}
}
}
},
"/oss-grants/applications": {
"post": {
"operationId": "ossGrants.submit",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"projectName": {
"type": "string",
"minLength": 2,
"maxLength": 120
},
"repoUrl": {
"type": "string",
"maxLength": 500,
"format": "uri"
},
"license": {
"type": "string",
"minLength": 2,
"maxLength": 64
},
"starCount": {
"type": "integer",
"minimum": 100,
"maximum": 10000000
},
"contactEmail": {
"type": "string",
"maxLength": 254,
"format": "email"
},
"contactName": {
"type": "string",
"minLength": 2,
"maxLength": 120
},
"logoUrl": {
"type": "string",
"maxLength": 500,
"format": "uri"
},
"pitch": {
"type": "string",
"minLength": 20,
"maxLength": 2000
}
},
"required": [
"projectName",
"repoUrl",
"license",
"starCount",
"contactEmail",
"pitch"
]
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"ok": {
"const": true
},
"duplicate": {
"type": "boolean"
},
"applicationId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"status": {
"const": "pending"
}
},
"required": [
"ok",
"duplicate",
"applicationId",
"status"
]
}
}
}
}
}
}
}
}
}