@botpress/sdk 4.18.1 → 4.20.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 +5 -5
- package/dist/bot/client/index.d.ts +1 -0
- package/dist/bot/client/types.d.ts +9 -0
- package/dist/bot/definition.d.ts +3 -0
- package/dist/index.cjs +15 -15
- package/dist/index.cjs.map +4 -4
- package/dist/index.d.ts +1 -0
- package/dist/index.mjs +47 -47
- package/dist/index.mjs.map +4 -4
- package/dist/integration/definition/index.d.ts +3 -0
- package/dist/interface/definition.d.ts +3 -0
- package/dist/plugin/definition.d.ts +3 -0
- package/dist/version-utils.d.ts +18 -0
- package/dist/version.d.ts +1 -0
- package/package.json +4 -2
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
|
|
2
|
-
> @botpress/sdk@4.
|
|
2
|
+
> @botpress/sdk@4.20.0 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.
|
|
6
|
+
> @botpress/sdk@4.20.0 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.
|
|
10
|
+
> @botpress/sdk@4.20.0 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
|
+
> @botpress/sdk@4.20.0 build:browser /home/runner/work/botpress/botpress/packages/sdk
|
|
16
16
|
> ts-node -T ./build.ts --browser
|
|
17
17
|
|
|
18
|
-
(node:
|
|
18
|
+
(node:3982) [DEP0180] DeprecationWarning: fs.Stats constructor is deprecated.
|
|
19
19
|
(Use `node --trace-deprecation ...` to show where the warning was created)
|
|
20
20
|
Done
|
|
@@ -56,6 +56,7 @@ export declare class BotSpecificClient<TBot extends common.BaseBot> implements t
|
|
|
56
56
|
updateTableRows: types.UpdateTableRows<TBot>;
|
|
57
57
|
upsertTableRows: types.UpsertTableRows<TBot>;
|
|
58
58
|
createWorkflow: types.CreateWorkflow<TBot>;
|
|
59
|
+
getOrCreateWorkflow: types.GetOrCreateWorkflow<TBot>;
|
|
59
60
|
getWorkflow: types.GetWorkflow<TBot>;
|
|
60
61
|
updateWorkflow: types.UpdateWorkflow<TBot>;
|
|
61
62
|
deleteWorkflow: types.DeleteWorkflow<TBot>;
|
|
@@ -100,6 +100,15 @@ export type CreateWorkflow<TBot extends common.BaseBot> = <TWorkflowName extends
|
|
|
100
100
|
name: NoInfer<TWorkflowName>;
|
|
101
101
|
}>;
|
|
102
102
|
}>>;
|
|
103
|
+
export type GetOrCreateWorkflow<TBot extends common.BaseBot> = <TWorkflowName extends utils.StringKeys<TBot['workflows']>>(x: utils.Merge<Arg<client.Client['getOrCreateWorkflow']>, {
|
|
104
|
+
name: utils.Cast<TWorkflowName, string>;
|
|
105
|
+
input: utils.Cast<TBot['workflows'][TWorkflowName], common.IntegrationInstanceActionDefinition>['input'];
|
|
106
|
+
tags?: utils.AtLeastOneProperty<TBot['workflows'][TWorkflowName]['tags']>;
|
|
107
|
+
}>) => Promise<Readonly<{
|
|
108
|
+
workflow: utils.Merge<Awaited<Res<client.Client['getOrCreateWorkflow']>>['workflow'], {
|
|
109
|
+
name: NoInfer<TWorkflowName>;
|
|
110
|
+
}>;
|
|
111
|
+
}>>;
|
|
103
112
|
export type GetWorkflow<_TBot extends common.BaseBot> = client.Client['getWorkflow'];
|
|
104
113
|
export type UpdateWorkflow<_TBot extends common.BaseBot> = client.Client['updateWorkflow'];
|
|
105
114
|
export type DeleteWorkflow<_TBot extends common.BaseBot> = client.Client['deleteWorkflow'];
|
package/dist/bot/definition.d.ts
CHANGED
|
@@ -135,6 +135,9 @@ export declare class BotDefinition<TStates extends BaseStates = BaseStates, TEve
|
|
|
135
135
|
/** Bot definition with plugins merged into it */
|
|
136
136
|
readonly withPlugins: Pick<this['props'], 'user' | 'conversation' | 'message' | 'states' | 'events' | 'recurringEvents' | 'actions' | 'tables' | 'workflows'>;
|
|
137
137
|
constructor(props: BotDefinitionProps<TStates, TEvents, TActions, TTables, TWorkflows>);
|
|
138
|
+
get metadata(): {
|
|
139
|
+
readonly sdkVersion: string;
|
|
140
|
+
};
|
|
138
141
|
addIntegration<I extends IntegrationPackage>(integrationPkg: I, config?: IntegrationConfigInstance<I>): this;
|
|
139
142
|
addPlugin<P extends PluginPackage>(pluginPkg: P, config: PluginConfigInstance<P>): this;
|
|
140
143
|
private _mergeUser;
|