mirror of
https://github.com/stoatchat/javascript-client-api.git
synced 2026-07-15 14:15:37 -04:00
chore: generate OpenAPI specification
This commit is contained in:
+497
-1
@@ -13,7 +13,7 @@
|
||||
"name": "AGPLv3",
|
||||
"url": "https://github.com/revoltchat/delta/blob/master/LICENSE"
|
||||
},
|
||||
"version": "0.8.3"
|
||||
"version": "0.8.4"
|
||||
},
|
||||
"servers": [
|
||||
{
|
||||
@@ -5264,6 +5264,425 @@
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"/webhooks/{webhook_id}/{token}": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"Webhooks"
|
||||
],
|
||||
"summary": "Gets a webhook",
|
||||
"description": "Gets a webhook with a token",
|
||||
"operationId": "webhook_fetch_token_webhook_fetch_token",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "webhook_id",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/Id"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "token",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"default": {
|
||||
"description": "An error occurred.",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/Error"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"200": {
|
||||
"description": "",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/Webhook"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"post": {
|
||||
"tags": [
|
||||
"Webhooks"
|
||||
],
|
||||
"summary": "Executes a webhook",
|
||||
"description": "Executes a webhook and sends a message",
|
||||
"operationId": "webhook_execute_webhook_execute",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "webhook_id",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/Id"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "token",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Idempotency-Key",
|
||||
"in": "header",
|
||||
"description": "Unique key to prevent duplicate requests",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/DataMessageSend"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"responses": {
|
||||
"default": {
|
||||
"description": "An error occurred.",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/Error"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"200": {
|
||||
"description": "",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/Message"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"delete": {
|
||||
"tags": [
|
||||
"Webhooks"
|
||||
],
|
||||
"summary": "Deletes a webhook",
|
||||
"description": "Deletes a webhook with a token",
|
||||
"operationId": "webhook_delete_token_webhook_delete_token",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "webhook_id",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/Id"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "token",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"default": {
|
||||
"description": "An error occurred.",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/Error"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"204": {
|
||||
"description": "Success"
|
||||
}
|
||||
}
|
||||
},
|
||||
"patch": {
|
||||
"tags": [
|
||||
"Webhooks"
|
||||
],
|
||||
"summary": "Edits a webhook",
|
||||
"description": "Edits a webhook with a token",
|
||||
"operationId": "webhook_edit_token_webhook_edit_token",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "webhook_id",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/Id"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "token",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/DataEditWebhook"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"responses": {
|
||||
"default": {
|
||||
"description": "An error occurred.",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/Error"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"200": {
|
||||
"description": "",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/Webhook"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/webhooks/{webhook_id}": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"Webhooks"
|
||||
],
|
||||
"summary": "Gets a webhook",
|
||||
"description": "Gets a webhook",
|
||||
"operationId": "webhook_fetch_webhook_fetch",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "webhook_id",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/Id"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"default": {
|
||||
"description": "An error occurred.",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/Error"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"200": {
|
||||
"description": "",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ResponseWebhook"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"Session Token": []
|
||||
}
|
||||
]
|
||||
},
|
||||
"delete": {
|
||||
"tags": [
|
||||
"Webhooks"
|
||||
],
|
||||
"summary": "Deletes a webhook",
|
||||
"description": "Deletes a webhook",
|
||||
"operationId": "webhook_delete_webhook_delete",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "webhook_id",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/Id"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"default": {
|
||||
"description": "An error occurred.",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/Error"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"204": {
|
||||
"description": "Success"
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"Session Token": []
|
||||
}
|
||||
]
|
||||
},
|
||||
"patch": {
|
||||
"tags": [
|
||||
"Webhooks"
|
||||
],
|
||||
"summary": "Edits a webhook",
|
||||
"description": "Edits a webhook",
|
||||
"operationId": "webhook_edit_webhook_edit",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "webhook_id",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/Id"
|
||||
}
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/DataEditWebhook"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"responses": {
|
||||
"default": {
|
||||
"description": "An error occurred.",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/Error"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"200": {
|
||||
"description": "",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/Webhook"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"Session Token": []
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"/webhooks/{webhook_id}/{token}/github": {
|
||||
"post": {
|
||||
"tags": [
|
||||
"Webhooks"
|
||||
],
|
||||
"summary": "Executes a webhook specific to github",
|
||||
"description": "Executes a webhook specific to github and sends a message containing the relevant info about the event",
|
||||
"operationId": "webhook_execute_github_webhook_execute_github",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "webhook_id",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/Id"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "token",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "X-Github-Event",
|
||||
"in": "header",
|
||||
"description": "The name of the github event",
|
||||
"required": true,
|
||||
"content": {
|
||||
"X-Github-Event": {
|
||||
"schema": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/octet-stream": {
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"responses": {
|
||||
"default": {
|
||||
"description": "An error occurred.",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/Error"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"200": {
|
||||
"description": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"components": {
|
||||
@@ -11471,6 +11890,83 @@
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"DataEditWebhook": {
|
||||
"description": "New webhook information",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"description": "Webhook name",
|
||||
"type": "string",
|
||||
"maxLength": 32,
|
||||
"minLength": 1,
|
||||
"nullable": true
|
||||
},
|
||||
"avatar": {
|
||||
"description": "Avatar ID",
|
||||
"type": "string",
|
||||
"maxLength": 128,
|
||||
"minLength": 1,
|
||||
"nullable": true
|
||||
},
|
||||
"permissions": {
|
||||
"description": "Webhook permissions",
|
||||
"type": "integer",
|
||||
"format": "uint64",
|
||||
"minimum": 0.0,
|
||||
"nullable": true
|
||||
},
|
||||
"remove": {
|
||||
"description": "Fields to remove from webhook",
|
||||
"default": [],
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/FieldsWebhook"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"FieldsWebhook": {
|
||||
"description": "Optional fields on webhook object",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"Avatar"
|
||||
]
|
||||
},
|
||||
"ResponseWebhook": {
|
||||
"description": "Webhook information",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"channel_id",
|
||||
"id",
|
||||
"name",
|
||||
"permissions"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"description": "Webhook Id",
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
"description": "Webhook name",
|
||||
"type": "string"
|
||||
},
|
||||
"avatar": {
|
||||
"description": "Avatar ID",
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
},
|
||||
"channel_id": {
|
||||
"description": "The channel this webhook belongs to",
|
||||
"type": "string"
|
||||
},
|
||||
"permissions": {
|
||||
"description": "The permissions for the webhook",
|
||||
"type": "integer",
|
||||
"format": "uint64",
|
||||
"minimum": 0.0
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"securitySchemes": {
|
||||
|
||||
Reference in New Issue
Block a user