From 74771ed132e0b30a5172f7cbbb4552abb891fcc9 Mon Sep 17 00:00:00 2001 From: "Frederick [Bot]" Date: Sun, 8 Mar 2026 18:53:26 +0000 Subject: [PATCH] [skip ci] Updated swagger docs --- pkg/swagger/docs.go | 217 +++++++++++++++++++++++++++++++++++++++ pkg/swagger/swagger.json | 217 +++++++++++++++++++++++++++++++++++++++ pkg/swagger/swagger.yaml | 140 +++++++++++++++++++++++++ 3 files changed, 574 insertions(+) diff --git a/pkg/swagger/docs.go b/pkg/swagger/docs.go index b730cea33..a5747be2b 100644 --- a/pkg/swagger/docs.go +++ b/pkg/swagger/docs.go @@ -7477,6 +7477,219 @@ const docTemplate = `{ } } }, + "/user/settings/webhooks": { + "get": { + "security": [ + { + "JWTKeyAuth": [] + } + ], + "description": "Get all webhook targets configured for the current user (not project-specific).", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "webhooks" + ], + "summary": "Get all user-level webhook targets", + "responses": { + "200": { + "description": "The list of webhook targets", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/models.Webhook" + } + } + }, + "500": { + "description": "Internal server error", + "schema": { + "$ref": "#/definitions/models.Message" + } + } + } + }, + "put": { + "security": [ + { + "JWTKeyAuth": [] + } + ], + "description": "Create a webhook target for the current user that receives events across all projects.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "webhooks" + ], + "summary": "Create a user-level webhook target", + "parameters": [ + { + "description": "The webhook target", + "name": "webhook", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/models.Webhook" + } + } + ], + "responses": { + "200": { + "description": "The created webhook target", + "schema": { + "$ref": "#/definitions/models.Webhook" + } + }, + "400": { + "description": "Invalid webhook", + "schema": { + "$ref": "#/definitions/web.HTTPError" + } + }, + "500": { + "description": "Internal server error", + "schema": { + "$ref": "#/definitions/models.Message" + } + } + } + } + }, + "/user/settings/webhooks/events": { + "get": { + "security": [ + { + "JWTKeyAuth": [] + } + ], + "description": "Get all webhook events that can be used with user-level webhook targets.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "webhooks" + ], + "summary": "Get available user-directed webhook events", + "responses": { + "200": { + "description": "The list of user-directed webhook events", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + }, + "/user/settings/webhooks/{id}": { + "post": { + "security": [ + { + "JWTKeyAuth": [] + } + ], + "description": "Update the events for a user-level webhook target.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "webhooks" + ], + "summary": "Update a user-level webhook target", + "parameters": [ + { + "type": "integer", + "description": "Webhook ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "The updated webhook target", + "schema": { + "$ref": "#/definitions/models.Webhook" + } + }, + "404": { + "description": "Webhook not found", + "schema": { + "$ref": "#/definitions/web.HTTPError" + } + }, + "500": { + "description": "Internal server error", + "schema": { + "$ref": "#/definitions/models.Message" + } + } + } + }, + "delete": { + "security": [ + { + "JWTKeyAuth": [] + } + ], + "description": "Delete a user-level webhook target.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "webhooks" + ], + "summary": "Delete a user-level webhook target", + "parameters": [ + { + "type": "integer", + "description": "Webhook ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "Successfully deleted", + "schema": { + "$ref": "#/definitions/models.Message" + } + }, + "404": { + "description": "Webhook not found", + "schema": { + "$ref": "#/definitions/web.HTTPError" + } + }, + "500": { + "description": "Internal server error", + "schema": { + "$ref": "#/definitions/models.Message" + } + } + } + } + }, "/user/timezones": { "get": { "security": [ @@ -9387,6 +9600,10 @@ const docTemplate = `{ "updated": { "description": "A timestamp when this webhook target was last updated. You cannot change this value.", "type": "string" + }, + "user_id": { + "description": "The user ID if this is a user-level webhook (mutually exclusive with ProjectID)", + "type": "integer" } } }, diff --git a/pkg/swagger/swagger.json b/pkg/swagger/swagger.json index 9fc6cabcc..96b2e114d 100644 --- a/pkg/swagger/swagger.json +++ b/pkg/swagger/swagger.json @@ -7469,6 +7469,219 @@ } } }, + "/user/settings/webhooks": { + "get": { + "security": [ + { + "JWTKeyAuth": [] + } + ], + "description": "Get all webhook targets configured for the current user (not project-specific).", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "webhooks" + ], + "summary": "Get all user-level webhook targets", + "responses": { + "200": { + "description": "The list of webhook targets", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/models.Webhook" + } + } + }, + "500": { + "description": "Internal server error", + "schema": { + "$ref": "#/definitions/models.Message" + } + } + } + }, + "put": { + "security": [ + { + "JWTKeyAuth": [] + } + ], + "description": "Create a webhook target for the current user that receives events across all projects.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "webhooks" + ], + "summary": "Create a user-level webhook target", + "parameters": [ + { + "description": "The webhook target", + "name": "webhook", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/models.Webhook" + } + } + ], + "responses": { + "200": { + "description": "The created webhook target", + "schema": { + "$ref": "#/definitions/models.Webhook" + } + }, + "400": { + "description": "Invalid webhook", + "schema": { + "$ref": "#/definitions/web.HTTPError" + } + }, + "500": { + "description": "Internal server error", + "schema": { + "$ref": "#/definitions/models.Message" + } + } + } + } + }, + "/user/settings/webhooks/events": { + "get": { + "security": [ + { + "JWTKeyAuth": [] + } + ], + "description": "Get all webhook events that can be used with user-level webhook targets.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "webhooks" + ], + "summary": "Get available user-directed webhook events", + "responses": { + "200": { + "description": "The list of user-directed webhook events", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + }, + "/user/settings/webhooks/{id}": { + "post": { + "security": [ + { + "JWTKeyAuth": [] + } + ], + "description": "Update the events for a user-level webhook target.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "webhooks" + ], + "summary": "Update a user-level webhook target", + "parameters": [ + { + "type": "integer", + "description": "Webhook ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "The updated webhook target", + "schema": { + "$ref": "#/definitions/models.Webhook" + } + }, + "404": { + "description": "Webhook not found", + "schema": { + "$ref": "#/definitions/web.HTTPError" + } + }, + "500": { + "description": "Internal server error", + "schema": { + "$ref": "#/definitions/models.Message" + } + } + } + }, + "delete": { + "security": [ + { + "JWTKeyAuth": [] + } + ], + "description": "Delete a user-level webhook target.", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "webhooks" + ], + "summary": "Delete a user-level webhook target", + "parameters": [ + { + "type": "integer", + "description": "Webhook ID", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "Successfully deleted", + "schema": { + "$ref": "#/definitions/models.Message" + } + }, + "404": { + "description": "Webhook not found", + "schema": { + "$ref": "#/definitions/web.HTTPError" + } + }, + "500": { + "description": "Internal server error", + "schema": { + "$ref": "#/definitions/models.Message" + } + } + } + } + }, "/user/timezones": { "get": { "security": [ @@ -9379,6 +9592,10 @@ "updated": { "description": "A timestamp when this webhook target was last updated. You cannot change this value.", "type": "string" + }, + "user_id": { + "description": "The user ID if this is a user-level webhook (mutually exclusive with ProjectID)", + "type": "integer" } } }, diff --git a/pkg/swagger/swagger.yaml b/pkg/swagger/swagger.yaml index 111ff6b8c..3669f72b7 100644 --- a/pkg/swagger/swagger.yaml +++ b/pkg/swagger/swagger.yaml @@ -1148,6 +1148,10 @@ definitions: description: A timestamp when this webhook target was last updated. You cannot change this value. type: string + user_id: + description: The user ID if this is a user-level webhook (mutually exclusive + with ProjectID) + type: integer type: object notifications.DatabaseNotification: properties: @@ -6650,6 +6654,142 @@ paths: summary: Totp QR Code tags: - user + /user/settings/webhooks: + get: + consumes: + - application/json + description: Get all webhook targets configured for the current user (not project-specific). + produces: + - application/json + responses: + "200": + description: The list of webhook targets + schema: + items: + $ref: '#/definitions/models.Webhook' + type: array + "500": + description: Internal server error + schema: + $ref: '#/definitions/models.Message' + security: + - JWTKeyAuth: [] + summary: Get all user-level webhook targets + tags: + - webhooks + put: + consumes: + - application/json + description: Create a webhook target for the current user that receives events + across all projects. + parameters: + - description: The webhook target + in: body + name: webhook + required: true + schema: + $ref: '#/definitions/models.Webhook' + produces: + - application/json + responses: + "200": + description: The created webhook target + schema: + $ref: '#/definitions/models.Webhook' + "400": + description: Invalid webhook + schema: + $ref: '#/definitions/web.HTTPError' + "500": + description: Internal server error + schema: + $ref: '#/definitions/models.Message' + security: + - JWTKeyAuth: [] + summary: Create a user-level webhook target + tags: + - webhooks + /user/settings/webhooks/{id}: + delete: + consumes: + - application/json + description: Delete a user-level webhook target. + parameters: + - description: Webhook ID + in: path + name: id + required: true + type: integer + produces: + - application/json + responses: + "200": + description: Successfully deleted + schema: + $ref: '#/definitions/models.Message' + "404": + description: Webhook not found + schema: + $ref: '#/definitions/web.HTTPError' + "500": + description: Internal server error + schema: + $ref: '#/definitions/models.Message' + security: + - JWTKeyAuth: [] + summary: Delete a user-level webhook target + tags: + - webhooks + post: + consumes: + - application/json + description: Update the events for a user-level webhook target. + parameters: + - description: Webhook ID + in: path + name: id + required: true + type: integer + produces: + - application/json + responses: + "200": + description: The updated webhook target + schema: + $ref: '#/definitions/models.Webhook' + "404": + description: Webhook not found + schema: + $ref: '#/definitions/web.HTTPError' + "500": + description: Internal server error + schema: + $ref: '#/definitions/models.Message' + security: + - JWTKeyAuth: [] + summary: Update a user-level webhook target + tags: + - webhooks + /user/settings/webhooks/events: + get: + consumes: + - application/json + description: Get all webhook events that can be used with user-level webhook + targets. + produces: + - application/json + responses: + "200": + description: The list of user-directed webhook events + schema: + items: + type: string + type: array + security: + - JWTKeyAuth: [] + summary: Get available user-directed webhook events + tags: + - webhooks /user/timezones: get: consumes: