@botpress/sdk 4.0.7 → 4.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +4 -4
- package/dist/consts.d.ts +1 -0
- package/dist/index.cjs +10 -10
- package/dist/index.cjs.map +4 -4
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.map +4 -4
- package/dist/integration/definition/index.d.ts +1 -1
- package/dist/integration/definition/types.d.ts +1 -0
- package/dist/interface/definition.d.ts +9 -0
- package/dist/{const.d.ts → public-consts.d.ts} +8 -0
- package/package.json +2 -2
|
@@ -57,7 +57,7 @@ type ChannelsOfPackage<TPackage extends InterfacePackage> = {
|
|
|
57
57
|
[M in keyof NonNullable<TPackage['definition']['channels']>[K]['messages']]: NonNullable<NonNullable<TPackage['definition']['channels']>[K]['messages']>[M]['schema'];
|
|
58
58
|
};
|
|
59
59
|
};
|
|
60
|
-
export type ActionOverrideProps = utils.types.AtLeastOneProperty<Pick<Required<ActionDefinition>, 'title' | 'description' | 'billable' | 'cacheable'> & {
|
|
60
|
+
export type ActionOverrideProps = utils.types.AtLeastOneProperty<Pick<Required<ActionDefinition>, 'title' | 'description' | 'billable' | 'cacheable' | 'attributes'> & {
|
|
61
61
|
name: string;
|
|
62
62
|
}>;
|
|
63
63
|
export type EventOverrideProps = utils.types.AtLeastOneProperty<Pick<Required<EventDefinition>, 'title' | 'description'> & {
|
|
@@ -47,6 +47,7 @@ export type ActionDefinition<TAction extends BaseActions[string] = BaseActions[s
|
|
|
47
47
|
output: SchemaDefinition<ZuiObjectSchema>;
|
|
48
48
|
billable?: boolean;
|
|
49
49
|
cacheable?: boolean;
|
|
50
|
+
attributes?: Record<string, string>;
|
|
50
51
|
};
|
|
51
52
|
export type StateType = 'integration' | 'conversation' | 'user';
|
|
52
53
|
export type StateDefinition<TState extends BaseStates[string] = BaseStates[string]> = SchemaDefinition<TState> & {
|
|
@@ -29,10 +29,15 @@ type GenericActionDefinition<TEntities extends BaseEntities, TAction extends Bas
|
|
|
29
29
|
output: {
|
|
30
30
|
schema: GenericZuiSchema<EntityReferences<TEntities>, ZuiObjectSchema>;
|
|
31
31
|
};
|
|
32
|
+
attributes?: Record<string, string>;
|
|
32
33
|
};
|
|
33
34
|
export type InterfaceDefinitionProps<TName extends string = string, TVersion extends string = string, TEntities extends BaseEntities = BaseEntities, TActions extends BaseActions = BaseActions, TEvents extends BaseEntities = BaseEntities, TChannels extends BaseChannels = BaseChannels> = {
|
|
34
35
|
name: TName;
|
|
35
36
|
version: TVersion;
|
|
37
|
+
title?: string;
|
|
38
|
+
description?: string;
|
|
39
|
+
icon?: string;
|
|
40
|
+
readme?: string;
|
|
36
41
|
entities?: {
|
|
37
42
|
[K in keyof TEntities]: EntityDefinition<TEntities[K]>;
|
|
38
43
|
};
|
|
@@ -50,6 +55,10 @@ export declare class InterfaceDefinition<TName extends string = string, TVersion
|
|
|
50
55
|
readonly props: InterfaceDefinitionProps<TName, TVersion, TEntities, TActions, TEvents, TChannels>;
|
|
51
56
|
readonly name: this['props']['name'];
|
|
52
57
|
readonly version: this['props']['version'];
|
|
58
|
+
readonly title: this['props']['title'];
|
|
59
|
+
readonly description: this['props']['description'];
|
|
60
|
+
readonly icon: this['props']['icon'];
|
|
61
|
+
readonly readme: this['props']['readme'];
|
|
53
62
|
readonly entities: {
|
|
54
63
|
[K in keyof TEntities]: EntityDefinition<TEntities[K]>;
|
|
55
64
|
};
|
|
@@ -6,3 +6,11 @@ export declare const configurationTypeHeader = "x-bp-configuration-type";
|
|
|
6
6
|
export declare const configurationHeader = "x-bp-configuration";
|
|
7
7
|
export declare const operationHeader = "x-bp-operation";
|
|
8
8
|
export declare const typeHeader = "x-bp-type";
|
|
9
|
+
export declare const WELL_KNOWN_ATTRIBUTES: {
|
|
10
|
+
readonly HIDDEN_IN_STUDIO: {
|
|
11
|
+
readonly bpActionHiddenInStudio: "true";
|
|
12
|
+
};
|
|
13
|
+
readonly AWAIT_RETURN: {
|
|
14
|
+
readonly bpActionAwaitReturn: "true";
|
|
15
|
+
};
|
|
16
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@botpress/sdk",
|
|
3
|
-
"version": "4.0
|
|
3
|
+
"version": "4.2.0",
|
|
4
4
|
"description": "Botpress SDK",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"author": "",
|
|
17
17
|
"license": "MIT",
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@botpress/client": "1.
|
|
19
|
+
"@botpress/client": "1.7.0",
|
|
20
20
|
"browser-or-node": "^2.1.1"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|