chore: import upstream snapshot with attribution
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
import * as sdk from '@botpress/sdk'
|
||||
import * as packageJson from './package.json'
|
||||
|
||||
export default new sdk.InterfaceDefinition({
|
||||
name: packageJson.interfaceName,
|
||||
version: '1.0.0',
|
||||
entities: {
|
||||
item: {
|
||||
schema: sdk.z.object({
|
||||
id: sdk.z.string(),
|
||||
name: sdk.z.string().optional(),
|
||||
}),
|
||||
},
|
||||
},
|
||||
actions: {
|
||||
manipulateItem: {
|
||||
input: {
|
||||
schema: (entities) =>
|
||||
sdk.z.object({
|
||||
item: entities.item,
|
||||
foo: sdk.z.number(),
|
||||
}),
|
||||
},
|
||||
output: {
|
||||
schema: () => sdk.z.object({}),
|
||||
},
|
||||
},
|
||||
},
|
||||
events: {
|
||||
somethingHappened: {
|
||||
schema: (entities) =>
|
||||
sdk.z.object({
|
||||
item: entities.item,
|
||||
message: sdk.z.string(),
|
||||
}),
|
||||
},
|
||||
},
|
||||
})
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"name": "cli-fixtures-interface-with-entities",
|
||||
"interfaceName": "cli-fixtures-interface-with-entities",
|
||||
"scripts": {
|
||||
"check:type": "tsc --noEmit"
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@botpress/sdk": "workspace:*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^22.16.4",
|
||||
"typescript": "^5.6.3"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"lib": ["es2022"],
|
||||
"module": "commonjs",
|
||||
"strict": true,
|
||||
"esModuleInterop": true,
|
||||
"skipLibCheck": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"moduleResolution": "node",
|
||||
"allowUnusedLabels": false,
|
||||
"allowUnreachableCode": false,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"noImplicitOverride": true,
|
||||
"noImplicitReturns": true,
|
||||
"noUncheckedIndexedAccess": true,
|
||||
"noUnusedParameters": true,
|
||||
"target": "es2017",
|
||||
"paths": { "*": ["./*"] },
|
||||
"outDir": "dist",
|
||||
"checkJs": false,
|
||||
"incremental": true,
|
||||
"exactOptionalPropertyTypes": false,
|
||||
"resolveJsonModule": true,
|
||||
"noPropertyAccessFromIndexSignature": false,
|
||||
"noUnusedLocals": false
|
||||
},
|
||||
"include": [".botpress/**/*", "*.ts", "*.json"]
|
||||
}
|
||||
Reference in New Issue
Block a user