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
@@ -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,37 @@
import { z, InterfaceDefinition } from '@botpress/sdk'
export default new InterfaceDefinition({
name: 'proactive-user',
version: '0.0.3',
entities: {
user: {
title: 'User',
description: 'A user of the system',
schema: z.object({}).title('User').describe('The user object fields'),
},
},
actions: {
getOrCreateUser: {
title: 'Get or Create a User',
description: 'Proactively create a user from a bot',
input: {
schema: ({ user }) =>
z.object({
name: z.string().optional().title('Name').describe('The name of the user'),
pictureUrl: z.string().optional().title('Picture URL').describe('The URL of the user profile picture'),
email: z.string().optional().title('Email').describe('The email of the user'),
user: user.title('User').describe('The user object fields'),
}),
},
output: {
schema: () =>
z.object({
userId: z.string().title('User ID').describe('The Botpress ID of the created user'),
}),
},
},
},
__advanced: {
useLegacyZuiTransformer: true,
},
})
+16
View File
@@ -0,0 +1,16 @@
{
"name": "@botpresshub/proactive-user",
"description": "interface that allows the bot to proactively create a user in the integration",
"private": true,
"scripts": {
"check:type": "tsc --noEmit",
"check:bplint": "bp lint"
},
"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"]
}