chore: import upstream snapshot with attribution

This commit is contained in:
wehub-resource-sync
2026-07-13 13:34:48 +08:00
commit 77bb5bf71f
3762 changed files with 353249 additions and 0 deletions
+48
View File
@@ -0,0 +1,48 @@
import { state } from '@botpress/api'
import { OpenApi } from '@bpinternal/opapi'
import { conversationSchema } from './models/conversation'
import { eventSchema } from './models/event'
import { messageSchema } from './models/message'
import { userSchema } from './models/user'
import { apiVersion } from './version'
export const { errors } = state
export const sections = {
user: { description: '', title: 'User' },
conversation: { description: '', title: 'Conversation' },
message: { description: '', title: 'Message' },
event: { description: '', title: 'Event' },
} as const
export const parameters = {} as const
export const schemas = {
User: { schema: userSchema, section: 'user' },
Conversation: { schema: conversationSchema, section: 'conversation' },
Message: { schema: messageSchema, section: 'message' },
Event: { schema: eventSchema, section: 'event' },
} as const
export type Schemas = typeof schemas
export type Parameters = typeof parameters
export type Sections = typeof sections
export type ChatApi = OpenApi<keyof Schemas, keyof Parameters, keyof Sections>
export const chatApi = (): ChatApi =>
new OpenApi(
{
metadata: {
title: 'Chat API',
description: 'API for the Chat Integration',
server: 'https://chat.botpress.cloud/',
version: apiVersion,
},
sections,
schemas,
errors,
},
{
allowUnions: true,
}
)