/** * This file was auto-generated by openapi-typescript. * Do not make direct changes to the file. */ /** OneOf type helpers */ type Without = { [P in Exclude]?: never }; type XOR = (T | U) extends object ? (Without & U) | (Without & T) : T | U; type OneOf = T extends [infer Only] ? Only : T extends [infer A, infer B, ...infer Rest] ? OneOf<[XOR, ...Rest]> : never; export type paths = { "/ocs/v2.php/apps/spreed/api/{apiVersion}/bot/{token}/message": { /** * Sends a new chat message to the given room * @description The author and timestamp are automatically set to the current user/guest and time. */ post: operations["bot-send-message"]; }; "/ocs/v2.php/apps/spreed/api/{apiVersion}/bot/{token}/reaction/{messageId}": { /** Adds a reaction to a chat message */ post: operations["bot-react"]; /** Deletes a reaction from a chat message */ delete: operations["bot-delete-reaction"]; }; }; export type webhooks = Record; export type components = { schemas: { Capabilities: { features: string[]; "features-local": string[]; config: { attachments: { allowed: boolean; folder?: string; }; call: { enabled: boolean; "breakout-rooms": boolean; recording: boolean; /** Format: int64 */ "recording-consent": number; "supported-reactions": string[]; "predefined-backgrounds": string[]; "can-upload-background": boolean; "sip-enabled": boolean; "sip-dialout-enabled": boolean; "can-enable-sip": boolean; }; chat: { /** Format: int64 */ "max-length": number; /** Format: int64 */ "read-privacy": number; "has-translation-providers": boolean; /** Format: int64 */ "typing-privacy": number; }; conversations: { "can-create": boolean; }; federation: { enabled: boolean; "incoming-enabled": boolean; "outgoing-enabled": boolean; "only-trusted-servers": boolean; }; previews: { /** Format: int64 */ "max-gif-size": number; }; signaling: { /** Format: int64 */ "session-ping-limit": number; "hello-v2-token-key"?: string; }; }; "config-local": { [key: string]: string[]; }; version: string; }; OCSMeta: { status: string; statuscode: number; message?: string; totalitems?: string; itemsperpage?: string; }; PublicCapabilities: OneOf<[{ spreed: components["schemas"]["Capabilities"]; }, unknown[]]>; }; responses: never; parameters: never; requestBodies: never; headers: never; pathItems: never; }; export type $defs = Record; export type external = Record; export type operations = { /** * Sends a new chat message to the given room * @description The author and timestamp are automatically set to the current user/guest and time. */ "bot-send-message": { parameters: { query: { /** @description The message to send */ message: string; /** @description For the message to be able to later identify it again */ referenceId?: string; /** @description Parent id which this message is a reply to */ replyTo?: number; /** @description If sent silent the chat message will not create any notifications */ silent?: 0 | 1; }; header: { /** @description Required to be true for the API request to pass */ "OCS-APIRequest": boolean; }; path: { apiVersion: "v1"; /** @description Conversation token */ token: string; }; }; responses: { /** @description Message sent successfully */ 201: { content: { "application/json": { ocs: { meta: components["schemas"]["OCSMeta"]; data: unknown; }; }; }; }; /** @description When the replyTo is invalid or message is empty */ 400: { content: { "application/json": { ocs: { meta: components["schemas"]["OCSMeta"]; data: unknown; }; }; }; }; /** @description Sending message is not allowed */ 401: { content: { "application/json": { ocs: { meta: components["schemas"]["OCSMeta"]; data: unknown; }; }; }; }; /** @description Message too long */ 413: { content: { "application/json": { ocs: { meta: components["schemas"]["OCSMeta"]; data: unknown; }; }; }; }; }; }; /** Adds a reaction to a chat message */ "bot-react": { parameters: { query: { /** @description Reaction to add */ reaction: string; }; header: { /** @description Required to be true for the API request to pass */ "OCS-APIRequest": boolean; }; path: { apiVersion: "v1"; /** @description Conversation token */ token: string; /** @description ID of the message */ messageId: number; }; }; responses: { /** @description Reaction already exists */ 200: { content: { "application/json": { ocs: { meta: components["schemas"]["OCSMeta"]; data: unknown; }; }; }; }; /** @description Reacted successfully */ 201: { content: { "application/json": { ocs: { meta: components["schemas"]["OCSMeta"]; data: unknown; }; }; }; }; /** @description Reacting is not possible */ 400: { content: { "application/json": { ocs: { meta: components["schemas"]["OCSMeta"]; data: unknown; }; }; }; }; /** @description Reacting is not allowed */ 401: { content: { "application/json": { ocs: { meta: components["schemas"]["OCSMeta"]; data: unknown; }; }; }; }; /** @description Reaction not found */ 404: { content: { "application/json": { ocs: { meta: components["schemas"]["OCSMeta"]; data: unknown; }; }; }; }; }; }; /** Deletes a reaction from a chat message */ "bot-delete-reaction": { parameters: { query: { /** @description Reaction to delete */ reaction: string; }; header: { /** @description Required to be true for the API request to pass */ "OCS-APIRequest": boolean; }; path: { apiVersion: "v1"; /** @description Conversation token */ token: string; /** @description ID of the message */ messageId: number; }; }; responses: { /** @description Reaction deleted successfully */ 200: { content: { "application/json": { ocs: { meta: components["schemas"]["OCSMeta"]; data: unknown; }; }; }; }; /** @description Reacting is not possible */ 400: { content: { "application/json": { ocs: { meta: components["schemas"]["OCSMeta"]; data: unknown; }; }; }; }; /** @description Reacting is not allowed */ 401: { content: { "application/json": { ocs: { meta: components["schemas"]["OCSMeta"]; data: unknown; }; }; }; }; /** @description Reaction not found */ 404: { content: { "application/json": { ocs: { meta: components["schemas"]["OCSMeta"]; data: unknown; }; }; }; }; }; }; };