@botpress/sdk 4.15.9 → 4.15.11
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 +5 -5
- package/dist/bot/definition.d.ts +4 -0
- package/dist/bot/workflow-proxy/proxy.d.ts +3 -0
- package/dist/bot/workflow-proxy/types.d.ts +15 -0
- package/dist/index.cjs +12 -12
- package/dist/index.cjs.map +3 -3
- package/dist/index.mjs +36 -36
- package/dist/index.mjs.map +3 -3
- package/dist/integration/definition/index.d.ts +1 -0
- package/dist/interface/definition.d.ts +4 -0
- package/dist/plugin/definition.d.ts +4 -0
- package/package.json +1 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
|
|
2
|
-
> @botpress/sdk@4.15.
|
|
2
|
+
> @botpress/sdk@4.15.11 build /home/runner/work/botpress/botpress/packages/sdk
|
|
3
3
|
> pnpm build:type && pnpm build:node && pnpm build:browser
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
> @botpress/sdk@4.15.
|
|
6
|
+
> @botpress/sdk@4.15.11 build:type /home/runner/work/botpress/botpress/packages/sdk
|
|
7
7
|
> tsc -p ./tsconfig.package.json --emitDeclarationOnly --declaration
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
> @botpress/sdk@4.15.
|
|
10
|
+
> @botpress/sdk@4.15.11 build:node /home/runner/work/botpress/botpress/packages/sdk
|
|
11
11
|
> ts-node -T ./build.ts --node
|
|
12
12
|
|
|
13
13
|
Done
|
|
14
14
|
|
|
15
|
-
> @botpress/sdk@4.15.
|
|
15
|
+
> @botpress/sdk@4.15.11 build:browser /home/runner/work/botpress/botpress/packages/sdk
|
|
16
16
|
> ts-node -T ./build.ts --browser
|
|
17
17
|
|
|
18
|
-
(node:
|
|
18
|
+
(node:3706) [DEP0180] DeprecationWarning: fs.Stats constructor is deprecated.
|
|
19
19
|
(Use `node --trace-deprecation ...` to show where the warning was created)
|
|
20
20
|
Done
|
package/dist/bot/definition.d.ts
CHANGED
|
@@ -111,6 +111,9 @@ export type BotDefinitionProps<TStates extends BaseStates = BaseStates, TEvents
|
|
|
111
111
|
[K in keyof TWorkflows]: WorkflowDefinition<TWorkflows[K]>;
|
|
112
112
|
};
|
|
113
113
|
attributes?: Record<string, string>;
|
|
114
|
+
__advanced?: {
|
|
115
|
+
useLegacyZuiTransformer?: boolean;
|
|
116
|
+
};
|
|
114
117
|
};
|
|
115
118
|
export declare class BotDefinition<TStates extends BaseStates = BaseStates, TEvents extends BaseEvents = BaseEvents, TActions extends BaseActions = BaseActions, TTables extends BaseTables = BaseTables, TWorkflows extends BaseWorkflows = BaseWorkflows> {
|
|
116
119
|
readonly props: BotDefinitionProps<TStates, TEvents, TActions, TTables, TWorkflows>;
|
|
@@ -127,6 +130,7 @@ export declare class BotDefinition<TStates extends BaseStates = BaseStates, TEve
|
|
|
127
130
|
readonly tables: this['props']['tables'];
|
|
128
131
|
readonly workflows: this['props']['workflows'];
|
|
129
132
|
readonly attributes: this['props']['attributes'];
|
|
133
|
+
readonly __advanced: this['props']['__advanced'];
|
|
130
134
|
/** Bot definition with plugins merged into it */
|
|
131
135
|
readonly withPlugins: Pick<this['props'], 'user' | 'conversation' | 'message' | 'states' | 'events' | 'recurringEvents' | 'actions' | 'tables' | 'workflows'>;
|
|
132
136
|
constructor(props: BotDefinitionProps<TStates, TEvents, TActions, TTables, TWorkflows>);
|
|
@@ -2,9 +2,12 @@ import type * as client from '@botpress/client';
|
|
|
2
2
|
import type { BotSpecificClient } from '../../bot';
|
|
3
3
|
import type * as typeUtils from '../../utils/type-utils';
|
|
4
4
|
import type { BaseBot } from '../common';
|
|
5
|
+
import * as botServerTypes from '../server/types';
|
|
5
6
|
import type { WorkflowProxy, WorkflowWithUtilities } from './types';
|
|
6
7
|
export declare const proxyWorkflows: <TBot extends BaseBot>(client: BotSpecificClient<TBot> | client.Client) => WorkflowProxy<TBot>;
|
|
7
8
|
export declare const wrapWorkflowInstance: <TBot extends BaseBot, TWorkflowName extends typeUtils.StringKeys<TBot["workflows"]>>(props: {
|
|
8
9
|
client: BotSpecificClient<TBot> | client.Client;
|
|
9
10
|
workflow: client.Workflow;
|
|
11
|
+
event?: botServerTypes.WorkflowUpdateEvent;
|
|
12
|
+
onWorkflowUpdate?: (newState: client.Workflow) => Promise<void> | void;
|
|
10
13
|
}) => WorkflowWithUtilities<TBot, TWorkflowName>;
|
|
@@ -40,6 +40,21 @@ export type WorkflowWithUtilities<TBot extends commonTypes.BaseBot, TWorkflowNam
|
|
|
40
40
|
}>): Promise<{
|
|
41
41
|
workflow: WorkflowWithUtilities<TBot, TWorkflowName>;
|
|
42
42
|
}>;
|
|
43
|
+
/**
|
|
44
|
+
* Acknowledges the start of processing for a pending workflow instance.
|
|
45
|
+
* If the workflow is not in pending status or has already been
|
|
46
|
+
* acknowledged, this is a no-op.
|
|
47
|
+
*
|
|
48
|
+
* This method **should be called in every workflow handler** as soon as the
|
|
49
|
+
* workflow **starts doing work**. If no work needs to be done, setCompleted
|
|
50
|
+
* or setFailed should be called instead.
|
|
51
|
+
*
|
|
52
|
+
* Should a workflow not be acknowledged **in a timely fashion**, it will be
|
|
53
|
+
* retriggered 3 times before being marked as failed.
|
|
54
|
+
*/
|
|
55
|
+
acknowledgeStartOfProcessing(): Promise<{
|
|
56
|
+
workflow: WorkflowWithUtilities<TBot, TWorkflowName>;
|
|
57
|
+
}>;
|
|
43
58
|
/**
|
|
44
59
|
* Marks the current workflow instance as failed and stops execution
|
|
45
60
|
*/
|