@botpress/sdk 4.13.0 → 4.14.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/bot/definition.d.ts +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +2 -2
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +2 -2
- package/dist/integration/client/index.d.ts +1 -1
- package/dist/plugin/definition.d.ts +8 -5
- package/package.json +1 -1
|
@@ -10,7 +10,7 @@ export declare class IntegrationSpecificClient<TIntegration extends common.BaseI
|
|
|
10
10
|
constructor(_client: client.Client);
|
|
11
11
|
/**
|
|
12
12
|
* Access the underlying Botpress client.
|
|
13
|
-
* This is useful for operations that are not available in the
|
|
13
|
+
* This is useful for operations that are not available in the IntegrationSpecificClient.
|
|
14
14
|
* You probably shouldn't use this directly if you don't know what you're doing.
|
|
15
15
|
*/
|
|
16
16
|
get _inner(): client.Client;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { StateDefinition as BotStateDefinition, EventDefinition as BotEventDefinition, ConfigurationDefinition, UserDefinition, ConversationDefinition, MessageDefinition, ActionDefinition as BotActionDefinition, TableDefinition as BotTableDefinition, WorkflowDefinition } from '../bot/definition';
|
|
1
|
+
import { StateDefinition as BotStateDefinition, EventDefinition as BotEventDefinition, ConfigurationDefinition as BotConfigurationDefinition, UserDefinition, ConversationDefinition, MessageDefinition, ActionDefinition as BotActionDefinition, TableDefinition as BotTableDefinition, WorkflowDefinition } from '../bot/definition';
|
|
2
2
|
import { IntegrationPackage, InterfacePackage } from '../package';
|
|
3
3
|
import * as typeUtils from '../utils/type-utils';
|
|
4
4
|
import { ZuiObjectSchema, ZuiObjectOrRefSchema, z } from '../zui';
|
|
5
|
-
export {
|
|
6
|
-
type BaseConfig =
|
|
5
|
+
export { UserDefinition, ConversationDefinition, MessageDefinition, IntegrationConfigInstance, WorkflowDefinition, } from '../bot/definition';
|
|
6
|
+
type BaseConfig = ZuiObjectOrRefSchema;
|
|
7
7
|
type BaseStates = Record<string, ZuiObjectOrRefSchema>;
|
|
8
8
|
type BaseEvents = Record<string, ZuiObjectOrRefSchema>;
|
|
9
9
|
type BaseActions = Record<string, ZuiObjectOrRefSchema>;
|
|
@@ -14,6 +14,9 @@ type BaseWorkflows = Record<string, ZuiObjectSchema>;
|
|
|
14
14
|
export type TableDefinition<TTable extends BaseTables[string] = BaseTables[string]> = typeUtils.Merge<BotTableDefinition, {
|
|
15
15
|
schema: TTable;
|
|
16
16
|
}>;
|
|
17
|
+
export type ConfigurationDefinition<TConfig extends BaseConfig = BaseConfig> = typeUtils.Merge<BotConfigurationDefinition, {
|
|
18
|
+
schema: TConfig;
|
|
19
|
+
}>;
|
|
17
20
|
export type StateDefinition<TState extends BaseStates[string] = BaseStates[string]> = typeUtils.Merge<BotStateDefinition, {
|
|
18
21
|
schema: TState;
|
|
19
22
|
}>;
|
|
@@ -72,7 +75,7 @@ export type PluginDefinitionProps<TName extends string = string, TVersion extend
|
|
|
72
75
|
states?: {
|
|
73
76
|
[K in keyof TStates]: GenericDefinition<TInterfaces, StateDefinition<TStates[K]>>;
|
|
74
77
|
};
|
|
75
|
-
configuration?: ConfigurationDefinition<TConfig
|
|
78
|
+
configuration?: GenericDefinition<TInterfaces, ConfigurationDefinition<TConfig>>;
|
|
76
79
|
events?: {
|
|
77
80
|
[K in keyof TEvents]: GenericDefinition<TInterfaces, EventDefinition<TEvents[K]>>;
|
|
78
81
|
};
|
|
@@ -108,7 +111,7 @@ export declare class PluginDefinition<TName extends string = string, TVersion ex
|
|
|
108
111
|
readonly states: {
|
|
109
112
|
[K in keyof TStates]: StateDefinition<TStates[K]>;
|
|
110
113
|
};
|
|
111
|
-
readonly configuration
|
|
114
|
+
readonly configuration?: ConfigurationDefinition<TConfig>;
|
|
112
115
|
readonly events: {
|
|
113
116
|
[K in keyof TEvents]: EventDefinition<TEvents[K]>;
|
|
114
117
|
};
|