mirror of
https://github.com/zap-proto/gen.git
synced 2026-10-30 15:05:01 +00:00
Force-added past .gitignore's out/ as reproducible proof that one .zap
schema mechanically produces every surface:
- out/ts/tasks/tasks_zap.ts Tier-2 zero-copy View/Client/Server; tsc --noEmit
clean against @zap-proto/zap under strict (noUnusedLocals, verbatimModuleSyntax).
- out/{ts,go}/tasks/tasks.openapi.json OpenAPI 3.1.0; openapi-spec-validator OK;
4/4 methods as POST /tasks/<method>; 9 referenced structs in components.schemas.
- out/go/tasks oapi-codegen Tier-1 client + go.mod + offline request-forming
test: go vet/build/test all green (forms POST https://api.hanzo.ai/tasks/*).
- out/docs/{ts,go}/tasks.mdx generated SDK doc stubs.
Regenerate: bin/zapsdk ts schemas/tasks.zap ; bin/zapsdk go schemas/tasks.zap
350 lines
8.3 KiB
JSON
350 lines
8.3 KiB
JSON
{
|
|
"openapi": "3.1.0",
|
|
"info": {
|
|
"title": "Tasks",
|
|
"version": "1.0.0"
|
|
},
|
|
"servers": [
|
|
{
|
|
"url": "https://api.hanzo.ai/v1"
|
|
}
|
|
],
|
|
"paths": {
|
|
"/tasks/start-workflow": {
|
|
"post": {
|
|
"operationId": "tasks.startWorkflow",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/StartWorkflowResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad request — payload failed validation."
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized — missing or invalid credentials."
|
|
},
|
|
"403": {
|
|
"description": "Forbidden — credentials lack the capability."
|
|
},
|
|
"404": {
|
|
"description": "Not found — unknown method."
|
|
},
|
|
"500": {
|
|
"description": "Internal server error."
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/StartWorkflowRequest"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/tasks/signal-workflow": {
|
|
"post": {
|
|
"operationId": "tasks.signalWorkflow",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK — no response body."
|
|
},
|
|
"400": {
|
|
"description": "Bad request — payload failed validation."
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized — missing or invalid credentials."
|
|
},
|
|
"403": {
|
|
"description": "Forbidden — credentials lack the capability."
|
|
},
|
|
"404": {
|
|
"description": "Not found — unknown method."
|
|
},
|
|
"500": {
|
|
"description": "Internal server error."
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SignalWorkflowRequest"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/tasks/describe-workflow": {
|
|
"post": {
|
|
"operationId": "tasks.describeWorkflow",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DescribeWorkflowResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad request — payload failed validation."
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized — missing or invalid credentials."
|
|
},
|
|
"403": {
|
|
"description": "Forbidden — credentials lack the capability."
|
|
},
|
|
"404": {
|
|
"description": "Not found — unknown method."
|
|
},
|
|
"500": {
|
|
"description": "Internal server error."
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DescribeWorkflowRequest"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/tasks/health": {
|
|
"post": {
|
|
"operationId": "tasks.health",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HealthResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad request — payload failed validation."
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized — missing or invalid credentials."
|
|
},
|
|
"403": {
|
|
"description": "Forbidden — credentials lack the capability."
|
|
},
|
|
"404": {
|
|
"description": "Not found — unknown method."
|
|
},
|
|
"500": {
|
|
"description": "Internal server error."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"components": {
|
|
"schemas": {
|
|
"DescribeWorkflowRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"namespace": {
|
|
"type": "string"
|
|
},
|
|
"workflowId": {
|
|
"type": "string"
|
|
},
|
|
"runId": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"namespace",
|
|
"workflowId",
|
|
"runId"
|
|
],
|
|
"additionalProperties": false
|
|
},
|
|
"DescribeWorkflowResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"info": {
|
|
"$ref": "#/components/schemas/WorkflowExecutionInfo"
|
|
}
|
|
},
|
|
"required": [
|
|
"info"
|
|
],
|
|
"additionalProperties": false
|
|
},
|
|
"HealthResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"service": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"service",
|
|
"status"
|
|
],
|
|
"additionalProperties": false
|
|
},
|
|
"SignalWorkflowRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"namespace": {
|
|
"type": "string"
|
|
},
|
|
"workflowId": {
|
|
"type": "string"
|
|
},
|
|
"runId": {
|
|
"type": "string"
|
|
},
|
|
"signalName": {
|
|
"type": "string"
|
|
},
|
|
"input": {
|
|
"type": "string",
|
|
"format": "byte"
|
|
}
|
|
},
|
|
"required": [
|
|
"namespace",
|
|
"workflowId",
|
|
"runId",
|
|
"signalName",
|
|
"input"
|
|
],
|
|
"additionalProperties": false
|
|
},
|
|
"StartWorkflowRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"namespace": {
|
|
"type": "string"
|
|
},
|
|
"workflowId": {
|
|
"type": "string"
|
|
},
|
|
"taskQueue": {
|
|
"type": "string"
|
|
},
|
|
"input": {
|
|
"type": "string",
|
|
"format": "byte"
|
|
}
|
|
},
|
|
"required": [
|
|
"namespace",
|
|
"workflowId",
|
|
"taskQueue",
|
|
"input"
|
|
],
|
|
"additionalProperties": false
|
|
},
|
|
"StartWorkflowResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"runId": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"runId"
|
|
],
|
|
"additionalProperties": false
|
|
},
|
|
"WorkflowExecution": {
|
|
"type": "object",
|
|
"properties": {
|
|
"workflowId": {
|
|
"type": "string"
|
|
},
|
|
"runId": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"workflowId",
|
|
"runId"
|
|
],
|
|
"additionalProperties": false
|
|
},
|
|
"WorkflowExecutionInfo": {
|
|
"type": "object",
|
|
"properties": {
|
|
"execution": {
|
|
"$ref": "#/components/schemas/WorkflowExecution"
|
|
},
|
|
"type": {
|
|
"$ref": "#/components/schemas/WorkflowType"
|
|
},
|
|
"startTimeMs": {
|
|
"type": "string",
|
|
"format": "int64"
|
|
},
|
|
"closeTimeMs": {
|
|
"type": "string",
|
|
"format": "int64"
|
|
},
|
|
"status": {
|
|
"type": "integer",
|
|
"format": "uint8",
|
|
"minimum": 0,
|
|
"maximum": 255
|
|
},
|
|
"historyLength": {
|
|
"type": "string",
|
|
"format": "int64"
|
|
}
|
|
},
|
|
"required": [
|
|
"execution",
|
|
"type",
|
|
"startTimeMs",
|
|
"closeTimeMs",
|
|
"status",
|
|
"historyLength"
|
|
],
|
|
"additionalProperties": false
|
|
},
|
|
"WorkflowType": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"name"
|
|
],
|
|
"additionalProperties": false
|
|
}
|
|
}
|
|
}
|
|
}
|