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
+13
View File
@@ -0,0 +1,13 @@
import rootConfig from '../../eslint.config.mjs'
export default [
...rootConfig,
{
languageOptions: {
parserOptions: {
project: ['./tsconfig.json'],
tsconfigRootDir: import.meta.dirname,
},
},
},
]
@@ -0,0 +1,35 @@
import { z, InterfaceDefinition } from '@botpress/sdk'
const baseItem = z.object({ id: z.string().title('Item ID').describe('The unique identifier for the creatable item') })
const withId = (schema: z.ZodTypeAny) => z.intersection(schema, baseItem)
export default new InterfaceDefinition({
name: 'creatable',
version: '0.0.3',
entities: {
item: {
schema: baseItem,
},
},
events: {
created: {
schema: (args) =>
z.object({
item: withId(args.item),
}),
},
},
actions: {
create: {
input: {
schema: (args) => z.object({ item: args.item }),
},
output: {
schema: (args) => z.object({ item: withId(args.item) }),
},
},
},
__advanced: {
useLegacyZuiTransformer: true,
},
})
+17
View File
@@ -0,0 +1,17 @@
{
"name": "@botpresshub/creatable",
"description": "Creatable interface for Botpress",
"private": true,
"scripts": {
"check:type": "tsc --noEmit",
"check:bplint": "bp lint"
},
"license": "MIT",
"dependencies": {
"@botpress/sdk": "workspace:*"
},
"devDependencies": {
"@botpress/cli": "workspace:*",
"@botpress/sdk": "workspace:*"
}
}
+8
View File
@@ -0,0 +1,8 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"paths": { "*": ["./*"] },
"outDir": "dist"
},
"include": ["*.ts"]
}