diff --git a/go.mod b/go.mod index 418ff1020c3..91ab385e02f 100644 --- a/go.mod +++ b/go.mod @@ -60,7 +60,7 @@ require ( go.uber.org/mock v0.5.2 golang.org/x/crypto v0.52.0 golang.org/x/mod v0.35.0 - golang.org/x/oauth2 v0.35.0 + golang.org/x/oauth2 v0.36.0 golang.org/x/text v0.37.0 golang.org/x/tools v0.44.0 gorm.io/driver/postgres v1.5.10 @@ -361,12 +361,12 @@ require ( go.yaml.in/yaml/v3 v3.0.4 // indirect golang.org/x/exp v0.0.0-20260410095643-746e56fc9e2f // indirect golang.org/x/exp/typeparams v0.0.0-20260209203927-2842357ff358 // indirect - golang.org/x/net v0.54.0 // indirect + golang.org/x/net v0.55.0 // indirect golang.org/x/sync v0.20.0 // indirect golang.org/x/sys v0.45.0 // indirect golang.org/x/telemetry v0.0.0-20260409153401-be6f6cb8b1fa // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20260420184626-e10c466a9529 // indirect - google.golang.org/grpc v1.80.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20260618152121-87f3d3e198d3 // indirect + google.golang.org/grpc v1.81.1 // indirect google.golang.org/protobuf v1.36.11 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect honnef.co/go/tools v0.7.0 // indirect diff --git a/go.sum b/go.sum index 25afd8d8735..d29703d8e1c 100644 --- a/go.sum +++ b/go.sum @@ -897,10 +897,10 @@ go.opentelemetry.io/otel v1.43.0 h1:mYIM03dnh5zfN7HautFE4ieIig9amkNANT+xcVxAj9I= go.opentelemetry.io/otel v1.43.0/go.mod h1:JuG+u74mvjvcm8vj8pI5XiHy1zDeoCS2LB1spIq7Ay0= go.opentelemetry.io/otel/metric v1.43.0 h1:d7638QeInOnuwOONPp4JAOGfbCEpYb+K6DVWvdxGzgM= go.opentelemetry.io/otel/metric v1.43.0/go.mod h1:RDnPtIxvqlgO8GRW18W6Z/4P462ldprJtfxHxyKd2PY= -go.opentelemetry.io/otel/sdk v1.39.0 h1:nMLYcjVsvdui1B/4FRkwjzoRVsMK8uL/cj0OyhKzt18= -go.opentelemetry.io/otel/sdk v1.39.0/go.mod h1:vDojkC4/jsTJsE+kh+LXYQlbL8CgrEcwmt1ENZszdJE= -go.opentelemetry.io/otel/sdk/metric v1.39.0 h1:cXMVVFVgsIf2YL6QkRF4Urbr/aMInf+2WKg+sEJTtB8= -go.opentelemetry.io/otel/sdk/metric v1.39.0/go.mod h1:xq9HEVH7qeX69/JnwEfp6fVq5wosJsY1mt4lLfYdVew= +go.opentelemetry.io/otel/sdk v1.43.0 h1:pi5mE86i5rTeLXqoF/hhiBtUNcrAGHLKQdhg4h4V9Dg= +go.opentelemetry.io/otel/sdk v1.43.0/go.mod h1:P+IkVU3iWukmiit/Yf9AWvpyRDlUeBaRg6Y+C58QHzg= +go.opentelemetry.io/otel/sdk/metric v1.43.0 h1:S88dyqXjJkuBNLeMcVPRFXpRw2fuwdvfCGLEo89fDkw= +go.opentelemetry.io/otel/sdk/metric v1.43.0/go.mod h1:C/RJtwSEJ5hzTiUz5pXF1kILHStzb9zFlIEe85bhj6A= go.opentelemetry.io/otel/trace v1.43.0 h1:BkNrHpup+4k4w+ZZ86CZoHHEkohws8AY+WTX09nk+3A= go.opentelemetry.io/otel/trace v1.43.0/go.mod h1:/QJhyVBUUswCphDVxq+8mld+AvhXZLhe+8WVFxiFff0= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= @@ -986,12 +986,12 @@ golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= golang.org/x/net v0.16.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= -golang.org/x/net v0.54.0 h1:2zJIZAxAHV/OHCDTCOHAYehQzLfSXuf/5SoL/Dv6w/w= -golang.org/x/net v0.54.0/go.mod h1:Sj4oj8jK6XmHpBZU/zWHw3BV3abl4Kvi+Ut7cQcY+cQ= +golang.org/x/net v0.55.0 h1:bcvxaJn3e1U6InsFWt1JUq1aSjnRxLzT2rtD2KfkDF8= +golang.org/x/net v0.55.0/go.mod h1:L5U2KuzuOe1lY7Z+aWVIKK6qEeJXnXV9yzGA+WCHJww= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.35.0 h1:Mv2mzuHuZuY2+bkyWXIHMfhNdJAdwW3FuWeCPYN5GVQ= -golang.org/x/oauth2 v0.35.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA= +golang.org/x/oauth2 v0.36.0 h1:peZ/1z27fi9hUOFCAZaHyrpWG5lwe0RJEEEeH0ThlIs= +golang.org/x/oauth2 v0.36.0/go.mod h1:YDBUJMTkDnJS+A4BP4eZBjCqtokkg1hODuPjwiGPO7Q= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1107,8 +1107,8 @@ google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoA google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto/googleapis/rpc v0.0.0-20260420184626-e10c466a9529 h1:XF8+t6QQiS0o9ArVan/HW8Q7cycNPGsJf6GA2nXxYAg= -google.golang.org/genproto/googleapis/rpc v0.0.0-20260420184626-e10c466a9529/go.mod h1:4Hqkh8ycfw05ld/3BWL7rJOSfebL2Q+DVDeRgYgxUU8= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260618152121-87f3d3e198d3 h1:phvBWCAQMGN1945mp5fjCXP6jEF0+a0+4TjokS4sxNY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260618152121-87f3d3e198d3/go.mod h1:4Hqkh8ycfw05ld/3BWL7rJOSfebL2Q+DVDeRgYgxUU8= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= @@ -1116,8 +1116,8 @@ google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8 google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.80.0 h1:Xr6m2WmWZLETvUNvIUmeD5OAagMw3FiKmMlTdViWsHM= -google.golang.org/grpc v1.80.0/go.mod h1:ho/dLnxwi3EDJA4Zghp7k2Ec1+c2jqup0bFkw07bwF4= +google.golang.org/grpc v1.81.1 h1:VnnIIZ88UzOOKLukQi+ImGz8O1Wdp8nAGGnvOfEIWQQ= +google.golang.org/grpc v1.81.1/go.mod h1:xGH9GfzOyMTGIOXBJmXt+BX/V0kcdQbdcuwQ/zNw42I= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/packages/go/openapi/doc/openapi.json b/packages/go/openapi/doc/openapi.json index 2156186dae9..d52a164cdaf 100644 --- a/packages/go/openapi/doc/openapi.json +++ b/packages/go/openapi/doc/openapi.json @@ -16314,6 +16314,170 @@ } } }, + "/api/v2/clients/management/start": { + "parameters": [ + { + "$ref": "#/components/parameters/header.prefer" + } + ], + "post": { + "operationId": "StartClientManagementOperation", + "summary": "Notifies the API of a management operation start", + "description": "Endpoint for clients to start a management operation and mark the start time.\n\nNote: caller must be a client. For users, this endpoint will return a 403 as\nthey are not expected or allowed to call this endpoint.\n", + "tags": [ + "Clients", + "Enterprise" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/model.client-management-operation-start-request" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/model.client-management-operation" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/bad-request" + }, + "401": { + "$ref": "#/components/responses/unauthorized" + }, + "403": { + "$ref": "#/components/responses/forbidden" + }, + "404": { + "$ref": "#/components/responses/not-found" + }, + "409": { + "description": "Conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/api.error-wrapper" + }, + "example": { + "http_status": 409, + "timestamp": "2026-07-01T13:44:43.247Z", + "request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "errors": [ + { + "context": "", + "message": "invalid management operation status" + } + ] + } + } + } + }, + "429": { + "$ref": "#/components/responses/too-many-requests" + }, + "500": { + "$ref": "#/components/responses/internal-server-error" + } + } + } + }, + "/api/v2/clients/management/end": { + "parameters": [ + { + "$ref": "#/components/parameters/header.prefer" + } + ], + "post": { + "operationId": "EndClientManagementOperation", + "summary": "Notifies the API of a management operation ending", + "description": "Endpoint for clients to end a management operation and mark the completed time.\n\nNote: caller must be a client. For users, this endpoint will return a 403 as\nthey are not expected or allowed to call this endpoint.\n", + "tags": [ + "Clients", + "Enterprise" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/model.client-management-operation-end-request" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/model.client-management-operation" + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/bad-request" + }, + "401": { + "$ref": "#/components/responses/unauthorized" + }, + "403": { + "$ref": "#/components/responses/forbidden" + }, + "404": { + "$ref": "#/components/responses/not-found" + }, + "409": { + "description": "Conflict", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/api.error-wrapper" + }, + "example": { + "http_status": 409, + "timestamp": "2026-07-01T13:44:43.247Z", + "request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "errors": [ + { + "context": "", + "message": "invalid management operation status" + } + ] + } + } + } + }, + "429": { + "$ref": "#/components/responses/too-many-requests" + }, + "500": { + "$ref": "#/components/responses/internal-server-error" + } + } + } + }, "/api/v2/tasks/available": { "parameters": [ { @@ -22486,6 +22650,130 @@ } ] }, + "model.client-management-operation-start-request": { + "type": "object", + "required": [ + "operation_id" + ], + "properties": { + "operation_id": { + "type": "string", + "format": "uuid" + } + } + }, + "enum.client-management-operation-type": { + "type": "string", + "enum": [ + "support_bundle" + ] + }, + "enum.client-management-operation-status": { + "type": "string", + "enum": [ + "queued", + "running", + "succeeded", + "failed", + "canceled" + ] + }, + "model.client-management-operation": { + "allOf": [ + { + "$ref": "#/components/schemas/model.components.uuid" + }, + { + "type": "object", + "properties": { + "client_id": { + "type": "string", + "format": "uuid", + "readOnly": true + }, + "artifact_id": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/null.uuid" + } + ] + }, + "type": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/enum.client-management-operation-type" + } + ] + }, + "status": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/enum.client-management-operation-status" + } + ] + }, + "requested_by_user_id": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/null.uuid" + } + ] + }, + "created_at": { + "type": "string", + "format": "date-time", + "readOnly": true + }, + "started_at": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/null.time.response" + } + ] + }, + "completed_at": { + "readOnly": true, + "allOf": [ + { + "$ref": "#/components/schemas/null.time.response" + } + ] + }, + "execution_time": { + "type": "string", + "format": "date-time", + "readOnly": true + } + } + } + ] + }, + "model.client-management-operation-end-request": { + "type": "object", + "required": [ + "operation_id", + "status" + ], + "properties": { + "operation_id": { + "type": "string", + "format": "uuid" + }, + "status": { + "type": "string", + "enum": [ + "succeeded", + "failed", + "canceled" + ] + } + } + }, "enum.risk-acceptance": { "type": "string", "enum": [ diff --git a/packages/go/openapi/src/openapi.yaml b/packages/go/openapi/src/openapi.yaml index 4db95835896..c8d37392ffc 100644 --- a/packages/go/openapi/src/openapi.yaml +++ b/packages/go/openapi/src/openapi.yaml @@ -700,7 +700,13 @@ paths: /api/v2/jobs/{job_id}/log: $ref: './paths/jobs.jobs.id.log.yaml' -# tasks (deprecated) + # management operations + /api/v2/clients/management/start: + $ref: './paths/clients.clients.management.start.yaml' + /api/v2/clients/management/end: + $ref: './paths/clients.clients.management.end.yaml' + + # tasks (deprecated) /api/v2/tasks/available: $ref: './paths/tasks.tasks.available.yaml' /api/v2/tasks/finished: diff --git a/packages/go/openapi/src/paths/clients.clients.management.end.yaml b/packages/go/openapi/src/paths/clients.clients.management.end.yaml new file mode 100644 index 00000000000..89283da0542 --- /dev/null +++ b/packages/go/openapi/src/paths/clients.clients.management.end.yaml @@ -0,0 +1,70 @@ +# Copyright 2026 Specter Ops, Inc. +# +# Licensed under the Apache License, Version 2.0 +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 + +parameters: + - $ref: './../parameters/header.prefer.yaml' +post: + operationId: EndClientManagementOperation + summary: Notifies the API of a management operation ending + description: | + Endpoint for clients to end a management operation and mark the completed time. + + Note: caller must be a client. For users, this endpoint will return a 403 as + they are not expected or allowed to call this endpoint. + tags: + - Clients + - Enterprise + requestBody: + required: true + content: + application/json: + schema: + $ref: './../schemas/model.client-management-operation-end-request.yaml' + responses: + 200: + description: OK + content: + application/json: + schema: + type: object + properties: + data: + $ref: './../schemas/model.client-management-operation.yaml' + 400: + $ref: './../responses/bad-request.yaml' + 401: + $ref: './../responses/unauthorized.yaml' + 403: + $ref: './../responses/forbidden.yaml' + 404: + $ref: './../responses/not-found.yaml' + 409: + description: Conflict + content: + application/json: + schema: + $ref: './../schemas/api.error-wrapper.yaml' + example: + http_status: 409 + timestamp: 2026-07-01T13:44:43.247Z + request_id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + errors: + - context: "" + message: invalid management operation status + 429: + $ref: './../responses/too-many-requests.yaml' + 500: + $ref: './../responses/internal-server-error.yaml' diff --git a/packages/go/openapi/src/paths/clients.clients.management.start.yaml b/packages/go/openapi/src/paths/clients.clients.management.start.yaml new file mode 100644 index 00000000000..000f00ec8fe --- /dev/null +++ b/packages/go/openapi/src/paths/clients.clients.management.start.yaml @@ -0,0 +1,70 @@ +# Copyright 2026 Specter Ops, Inc. +# +# Licensed under the Apache License, Version 2.0 +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 + +parameters: + - $ref: './../parameters/header.prefer.yaml' +post: + operationId: StartClientManagementOperation + summary: Notifies the API of a management operation start + description: | + Endpoint for clients to start a management operation and mark the start time. + + Note: caller must be a client. For users, this endpoint will return a 403 as + they are not expected or allowed to call this endpoint. + tags: + - Clients + - Enterprise + requestBody: + required: true + content: + application/json: + schema: + $ref: './../schemas/model.client-management-operation-start-request.yaml' + responses: + 200: + description: OK + content: + application/json: + schema: + type: object + properties: + data: + $ref: './../schemas/model.client-management-operation.yaml' + 400: + $ref: './../responses/bad-request.yaml' + 401: + $ref: './../responses/unauthorized.yaml' + 403: + $ref: './../responses/forbidden.yaml' + 404: + $ref: './../responses/not-found.yaml' + 409: + description: Conflict + content: + application/json: + schema: + $ref: './../schemas/api.error-wrapper.yaml' + example: + http_status: 409 + timestamp: 2026-07-01T13:44:43.247Z + request_id: 3fa85f64-5717-4562-b3fc-2c963f66afa6 + errors: + - context: "" + message: invalid management operation status + 429: + $ref: './../responses/too-many-requests.yaml' + 500: + $ref: './../responses/internal-server-error.yaml' diff --git a/packages/go/openapi/src/schemas/enum.client-management-operation-status.yaml b/packages/go/openapi/src/schemas/enum.client-management-operation-status.yaml new file mode 100644 index 00000000000..3dea43e2f83 --- /dev/null +++ b/packages/go/openapi/src/schemas/enum.client-management-operation-status.yaml @@ -0,0 +1,23 @@ +# Copyright 2026 Specter Ops, Inc. +# +# Licensed under the Apache License, Version 2.0 +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 + +type: string +enum: + - queued + - running + - succeeded + - failed + - canceled diff --git a/packages/go/openapi/src/schemas/enum.client-management-operation-type.yaml b/packages/go/openapi/src/schemas/enum.client-management-operation-type.yaml new file mode 100644 index 00000000000..34eab89e383 --- /dev/null +++ b/packages/go/openapi/src/schemas/enum.client-management-operation-type.yaml @@ -0,0 +1,19 @@ +# Copyright 2026 Specter Ops, Inc. +# +# Licensed under the Apache License, Version 2.0 +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 + +type: string +enum: + - support_bundle diff --git a/packages/go/openapi/src/schemas/model.client-management-operation-end-request.yaml b/packages/go/openapi/src/schemas/model.client-management-operation-end-request.yaml new file mode 100644 index 00000000000..652a857087d --- /dev/null +++ b/packages/go/openapi/src/schemas/model.client-management-operation-end-request.yaml @@ -0,0 +1,30 @@ +# Copyright 2026 Specter Ops, Inc. +# +# Licensed under the Apache License, Version 2.0 +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 + +type: object +required: + - operation_id + - status +properties: + operation_id: + type: string + format: uuid + status: + type: string + enum: + - succeeded + - failed + - canceled diff --git a/packages/go/openapi/src/schemas/model.client-management-operation-start-request.yaml b/packages/go/openapi/src/schemas/model.client-management-operation-start-request.yaml new file mode 100644 index 00000000000..7ef82b351bf --- /dev/null +++ b/packages/go/openapi/src/schemas/model.client-management-operation-start-request.yaml @@ -0,0 +1,23 @@ +# Copyright 2026 Specter Ops, Inc. +# +# Licensed under the Apache License, Version 2.0 +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 + +type: object +required: + - operation_id +properties: + operation_id: + type: string + format: uuid diff --git a/packages/go/openapi/src/schemas/model.client-management-operation.yaml b/packages/go/openapi/src/schemas/model.client-management-operation.yaml new file mode 100644 index 00000000000..f9bf4d8f89c --- /dev/null +++ b/packages/go/openapi/src/schemas/model.client-management-operation.yaml @@ -0,0 +1,56 @@ +# Copyright 2026 Specter Ops, Inc. +# +# Licensed under the Apache License, Version 2.0 +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 + +allOf: + - $ref: './model.components.uuid.yaml' + - type: object + properties: + client_id: + type: string + format: uuid + readOnly: true + artifact_id: + readOnly: true + allOf: + - $ref: './null.uuid.yaml' + type: + readOnly: true + allOf: + - $ref: './enum.client-management-operation-type.yaml' + status: + readOnly: true + allOf: + - $ref: './enum.client-management-operation-status.yaml' + requested_by_user_id: + readOnly: true + allOf: + - $ref: './null.uuid.yaml' + created_at: + type: string + format: date-time + readOnly: true + started_at: + readOnly: true + allOf: + - $ref: './null.time.response.yaml' + completed_at: + readOnly: true + allOf: + - $ref: './null.time.response.yaml' + execution_time: + type: string + format: date-time + readOnly: true