diff --git a/apps/engine/docs/openapi.yaml b/apps/engine/docs/openapi.yaml index c06be0ac..44e5ed61 100644 --- a/apps/engine/docs/openapi.yaml +++ b/apps/engine/docs/openapi.yaml @@ -840,45 +840,74 @@ paths: application/json: schema: $ref: "#/components/schemas/schemas.Error" - /v1/gateways: + /v1/health: + get: + description: Check if Arcade Engine is healthy + tags: + - Operations + summary: Engine health check + operationId: arcade-health + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/schemas.HealthSchema" + "503": + description: Service Unavailable + content: + application/json: + schema: + $ref: "#/components/schemas/schemas.HealthSchema" + /v1/hooks: get: security: - Bearer: [] - description: Returns a paginated list of gateways for the current project + description: Returns all hooks for the current binding with optional filtering tags: - - Gateways - summary: List gateways - operationId: gateways-list + - Hooks + summary: List hooks + operationId: hooks-list parameters: - - description: "Number of items to return (default: 25, max: 100)" + - description: Limit name: limit in: query schema: type: integer - - description: "Offset from the start of the list (default: 0)" + - description: Offset name: offset in: query schema: type: integer + - description: Filter by hook point + name: hook_point + in: query + schema: + type: string + - description: Filter by plugin ID + name: plugin_id + in: query + schema: + type: string + - description: Filter by status + name: status + in: query + schema: + type: string responses: "200": description: OK content: application/json: schema: - $ref: "#/components/schemas/schemas.OffsetPage-schemas_GatewayResponse" + $ref: "#/components/schemas/schemas.OffsetPage-schemas_HookResponse" "400": description: Bad Request content: application/json: schema: $ref: "#/components/schemas/schemas.Error" - "401": - description: Unauthorized - content: - application/json: - schema: - $ref: "#/components/schemas/schemas.Error" "500": description: Internal Server Error content: @@ -888,17 +917,17 @@ paths: post: security: - Bearer: [] - description: Creates a new gateway in the current project + description: Creates a new hook configuration tags: - - Gateways - summary: Create a gateway - operationId: gateways-create + - Hooks + summary: Create a hook + operationId: hooks-create requestBody: content: application/json: schema: - $ref: "#/components/schemas/schemas.CreateGatewayRequest" - description: Gateway configuration + $ref: "#/components/schemas/schemas.CreateHookRequest" + description: Hook configuration required: true responses: "201": @@ -906,15 +935,15 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/schemas.GatewayResponse" + $ref: "#/components/schemas/schemas.HookResponse" "400": description: Bad Request content: application/json: schema: $ref: "#/components/schemas/schemas.Error" - "401": - description: Unauthorized + "404": + description: Not Found content: application/json: schema: @@ -931,21 +960,22 @@ paths: application/json: schema: $ref: "#/components/schemas/schemas.Error" - /v1/gateways/slug: - post: + /v1/hooks/bulk: + patch: security: - Bearer: [] - description: Checks whether a gateway slug is available for use + description: Creates or updates multiple hooks at once. The operation is + transactional. tags: - - Gateways - summary: Check gateway slug availability - operationId: gateways-slug-info + - Hooks + summary: Bulk upsert hooks + operationId: hooks-bulk-upsert requestBody: content: application/json: schema: - $ref: "#/components/schemas/schemas.SlugInfoRequest" - description: Slug info request + $ref: "#/components/schemas/schemas.BulkUpsertHooksRequest" + description: Bulk hook configurations required: true responses: "200": @@ -953,113 +983,53 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/schemas.SlugInfoResponse" + $ref: "#/components/schemas/schemas.BulkUpsertHooksResponse" "400": description: Bad Request content: application/json: schema: $ref: "#/components/schemas/schemas.Error" - "401": - description: Unauthorized - content: - application/json: - schema: - $ref: "#/components/schemas/schemas.Error" "500": description: Internal Server Error content: application/json: schema: $ref: "#/components/schemas/schemas.Error" - "/v1/gateways/{gateway_id}": + "/v1/hooks/{hook_id}": get: security: - Bearer: [] - description: Returns a single gateway by ID + description: Returns a single hook by ID tags: - - Gateways - summary: Get a gateway - operationId: gateways-get + - Hooks + summary: Get a hook + operationId: hooks-get parameters: - - description: Gateway ID - name: gateway_id + - description: Hook ID + name: hook_id in: path required: true schema: type: string - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/schemas.GatewayResponse" - "400": - description: Bad Request - content: - application/json: - schema: - $ref: "#/components/schemas/schemas.Error" - "401": - description: Unauthorized - content: - application/json: - schema: - $ref: "#/components/schemas/schemas.Error" - "404": - description: Not Found - content: - application/json: - schema: - $ref: "#/components/schemas/schemas.Error" - "500": - description: Internal Server Error - content: - application/json: - schema: - $ref: "#/components/schemas/schemas.Error" - put: - security: - - Bearer: [] - description: Replaces the full configuration of an existing gateway - tags: - - Gateways - summary: Update a gateway - operationId: gateways-update - parameters: - - description: Gateway ID - name: gateway_id - in: path - required: true + - description: Filter by binding type (tenant or project) + name: binding_type + in: query schema: type: string - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/schemas.UpdateGatewayRequest" - description: Gateway configuration - required: true responses: "200": description: OK content: application/json: schema: - $ref: "#/components/schemas/schemas.GatewayResponse" + $ref: "#/components/schemas/schemas.HookResponse" "400": description: Bad Request content: application/json: schema: $ref: "#/components/schemas/schemas.Error" - "401": - description: Unauthorized - content: - application/json: - schema: - $ref: "#/components/schemas/schemas.Error" "404": description: Not Found content: @@ -1075,14 +1045,14 @@ paths: delete: security: - Bearer: [] - description: Deletes a gateway by ID + description: Deletes a hook by ID tags: - - Gateways - summary: Delete a gateway - operationId: gateways-delete + - Hooks + summary: Delete a hook + operationId: hooks-delete parameters: - - description: Gateway ID - name: gateway_id + - description: Hook ID + name: hook_id in: path required: true schema: @@ -1096,12 +1066,6 @@ paths: application/json: schema: $ref: "#/components/schemas/schemas.Error" - "401": - description: Unauthorized - content: - application/json: - schema: - $ref: "#/components/schemas/schemas.Error" "404": description: Not Found content: @@ -1117,14 +1081,14 @@ paths: patch: security: - Bearer: [] - description: Partially updates an existing gateway configuration + description: Updates an existing hook configuration tags: - - Gateways - summary: Patch a gateway - operationId: gateways-patch + - Hooks + summary: Update a hook + operationId: hooks-update parameters: - - description: Gateway ID - name: gateway_id + - description: Hook ID + name: hook_id in: path required: true schema: @@ -1133,8 +1097,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/schemas.PatchGatewayRequest" - description: Gateway fields to update + $ref: "#/components/schemas/schemas.PatchHookRequest" + description: Hook configuration to update required: true responses: "200": @@ -1142,19 +1106,13 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/schemas.GatewayResponse" + $ref: "#/components/schemas/schemas.HookResponse" "400": description: Bad Request content: application/json: schema: $ref: "#/components/schemas/schemas.Error" - "401": - description: Unauthorized - content: - application/json: - schema: - $ref: "#/components/schemas/schemas.Error" "404": description: Not Found content: @@ -1167,74 +1125,57 @@ paths: application/json: schema: $ref: "#/components/schemas/schemas.Error" - /v1/health: - get: - description: Check if Arcade Engine is healthy - tags: - - Operations - summary: Engine health check - operationId: arcade-health - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: "#/components/schemas/schemas.HealthSchema" - "503": - description: Service Unavailable - content: - application/json: - schema: - $ref: "#/components/schemas/schemas.HealthSchema" - /v1/hooks: + "/v1/orgs/{org_id}/projects/{project_id}/gateways": get: security: - Bearer: [] - description: Returns all hooks for the current binding with optional filtering + description: Returns a paginated list of gateways for the current project tags: - - Hooks - summary: List hooks - operationId: hooks-list + - Gateways + summary: List gateways + operationId: project-gateways-list parameters: - - description: Limit + - description: Organization ID + name: org_id + in: path + required: true + schema: + type: string + - description: Project ID + name: project_id + in: path + required: true + schema: + type: string + - description: "Number of items to return (default: 25, max: 100)" name: limit in: query schema: type: integer - - description: Offset + - description: "Offset from the start of the list (default: 0)" name: offset in: query schema: type: integer - - description: Filter by hook point - name: hook_point - in: query - schema: - type: string - - description: Filter by plugin ID - name: plugin_id - in: query - schema: - type: string - - description: Filter by status - name: status - in: query - schema: - type: string responses: "200": description: OK content: application/json: schema: - $ref: "#/components/schemas/schemas.OffsetPage-schemas_HookResponse" + $ref: "#/components/schemas/schemas.OffsetPage-schemas_GatewayResponse" "400": description: Bad Request content: application/json: schema: $ref: "#/components/schemas/schemas.Error" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/schemas.Error" "500": description: Internal Server Error content: @@ -1244,17 +1185,30 @@ paths: post: security: - Bearer: [] - description: Creates a new hook configuration + description: Creates a new gateway in the current project tags: - - Hooks - summary: Create a hook - operationId: hooks-create + - Gateways + summary: Create a gateway + operationId: project-gateways-create + parameters: + - description: Organization ID + name: org_id + in: path + required: true + schema: + type: string + - description: Project ID + name: project_id + in: path + required: true + schema: + type: string requestBody: content: application/json: schema: - $ref: "#/components/schemas/schemas.CreateHookRequest" - description: Hook configuration + $ref: "#/components/schemas/schemas.CreateGatewayRequest" + description: Gateway configuration required: true responses: "201": @@ -1262,15 +1216,15 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/schemas.HookResponse" + $ref: "#/components/schemas/schemas.GatewayResponse" "400": description: Bad Request content: application/json: schema: $ref: "#/components/schemas/schemas.Error" - "404": - description: Not Found + "401": + description: Unauthorized content: application/json: schema: @@ -1287,22 +1241,34 @@ paths: application/json: schema: $ref: "#/components/schemas/schemas.Error" - /v1/hooks/bulk: - patch: + "/v1/orgs/{org_id}/projects/{project_id}/gateways/slug": + post: security: - Bearer: [] - description: Creates or updates multiple hooks at once. The operation is - transactional. + description: Checks whether a gateway slug is available for use tags: - - Hooks - summary: Bulk upsert hooks - operationId: hooks-bulk-upsert + - Gateways + summary: Check gateway slug availability + operationId: project-gateways-slug-info + parameters: + - description: Organization ID + name: org_id + in: path + required: true + schema: + type: string + - description: Project ID + name: project_id + in: path + required: true + schema: + type: string requestBody: content: application/json: schema: - $ref: "#/components/schemas/schemas.BulkUpsertHooksRequest" - description: Bulk hook configurations + $ref: "#/components/schemas/schemas.SlugInfoRequest" + description: Slug info request required: true responses: "200": @@ -1310,38 +1276,51 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/schemas.BulkUpsertHooksResponse" + $ref: "#/components/schemas/schemas.SlugInfoResponse" "400": description: Bad Request content: application/json: schema: $ref: "#/components/schemas/schemas.Error" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/schemas.Error" "500": description: Internal Server Error content: application/json: schema: $ref: "#/components/schemas/schemas.Error" - "/v1/hooks/{hook_id}": + "/v1/orgs/{org_id}/projects/{project_id}/gateways/{gateway_id}": get: security: - Bearer: [] - description: Returns a single hook by ID + description: Returns a single gateway by ID tags: - - Hooks - summary: Get a hook - operationId: hooks-get + - Gateways + summary: Get a gateway + operationId: project-gateways-get parameters: - - description: Hook ID - name: hook_id + - description: Organization ID + name: org_id in: path required: true schema: type: string - - description: Filter by binding type (tenant or project) - name: binding_type - in: query + - description: Project ID + name: project_id + in: path + required: true + schema: + type: string + - description: Gateway ID + name: gateway_id + in: path + required: true schema: type: string responses: @@ -1350,13 +1329,84 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/schemas.HookResponse" + $ref: "#/components/schemas/schemas.GatewayResponse" + "400": + description: Bad Request + content: + application/json: + schema: + $ref: "#/components/schemas/schemas.Error" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/schemas.Error" + "404": + description: Not Found + content: + application/json: + schema: + $ref: "#/components/schemas/schemas.Error" + "500": + description: Internal Server Error + content: + application/json: + schema: + $ref: "#/components/schemas/schemas.Error" + put: + security: + - Bearer: [] + description: Replaces the full configuration of an existing gateway + tags: + - Gateways + summary: Update a gateway + operationId: project-gateways-update + parameters: + - description: Organization ID + name: org_id + in: path + required: true + schema: + type: string + - description: Project ID + name: project_id + in: path + required: true + schema: + type: string + - description: Gateway ID + name: gateway_id + in: path + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/schemas.UpdateGatewayRequest" + description: Gateway configuration + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/schemas.GatewayResponse" "400": description: Bad Request content: application/json: schema: $ref: "#/components/schemas/schemas.Error" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/schemas.Error" "404": description: Not Found content: @@ -1372,14 +1422,26 @@ paths: delete: security: - Bearer: [] - description: Deletes a hook by ID + description: Deletes a gateway by ID tags: - - Hooks - summary: Delete a hook - operationId: hooks-delete + - Gateways + summary: Delete a gateway + operationId: project-gateways-delete parameters: - - description: Hook ID - name: hook_id + - description: Organization ID + name: org_id + in: path + required: true + schema: + type: string + - description: Project ID + name: project_id + in: path + required: true + schema: + type: string + - description: Gateway ID + name: gateway_id in: path required: true schema: @@ -1393,6 +1455,12 @@ paths: application/json: schema: $ref: "#/components/schemas/schemas.Error" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/schemas.Error" "404": description: Not Found content: @@ -1408,14 +1476,26 @@ paths: patch: security: - Bearer: [] - description: Updates an existing hook configuration + description: Partially updates an existing gateway configuration tags: - - Hooks - summary: Update a hook - operationId: hooks-update + - Gateways + summary: Patch a gateway + operationId: project-gateways-patch parameters: - - description: Hook ID - name: hook_id + - description: Organization ID + name: org_id + in: path + required: true + schema: + type: string + - description: Project ID + name: project_id + in: path + required: true + schema: + type: string + - description: Gateway ID + name: gateway_id in: path required: true schema: @@ -1424,8 +1504,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/schemas.PatchHookRequest" - description: Hook configuration to update + $ref: "#/components/schemas/schemas.PatchGatewayRequest" + description: Gateway fields to update required: true responses: "200": @@ -1433,13 +1513,19 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/schemas.HookResponse" + $ref: "#/components/schemas/schemas.GatewayResponse" "400": description: Bad Request content: application/json: schema: $ref: "#/components/schemas/schemas.Error" + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: "#/components/schemas/schemas.Error" "404": description: Not Found content: @@ -3100,6 +3186,13 @@ components: type: object properties: allowed_tools: + description: >- + Qualified tool names allowed through this gateway. Each entry must + be in the + + "Provider.ToolName" form (for example, "Google.SendEmail"). Versioned tool + + names are not yet supported. type: array maxItems: 500 uniqueItems: true @@ -4717,6 +4810,13 @@ components: type: object properties: allowed_tools: + description: >- + Qualified tool names allowed through this gateway. Each entry must + be in the + + "Provider.ToolName" form (for example, "Google.SendEmail"). Versioned tool + + names are not yet supported. type: array maxItems: 500 uniqueItems: true