@botpress/sdk 4.17.1 → 4.17.3
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.
|
@@ -4,12 +4,14 @@ import * as common from '../common';
|
|
|
4
4
|
import { EnumerateMessages, ConversationTags, GetChannelByName, GetMessageByName, MessageTags } from './sub-types';
|
|
5
5
|
type Arg<F extends (...args: any[]) => any> = Parameters<F>[number];
|
|
6
6
|
type Res<F extends (...args: any[]) => any> = ReturnType<F>;
|
|
7
|
-
type ConversationResponse<TIntegration extends common.BaseIntegration, ChannelName extends keyof TIntegration['channels'] = keyof TIntegration['channels']> = {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
7
|
+
type ConversationResponse<TIntegration extends common.BaseIntegration, ChannelName extends keyof TIntegration['channels'] = keyof TIntegration['channels']> = utils.ValueOf<{
|
|
8
|
+
[TChannelName in ChannelName]: {
|
|
9
|
+
conversation: utils.Merge<Awaited<Res<client.Client['getConversation']>>['conversation'], {
|
|
10
|
+
channel: TChannelName;
|
|
11
|
+
tags: common.ToTags<keyof TIntegration['channels'][TChannelName]['conversation']['tags']>;
|
|
12
|
+
}>;
|
|
13
|
+
};
|
|
14
|
+
}>;
|
|
13
15
|
export type CreateConversation<TIntegration extends common.BaseIntegration> = <ChannelName extends keyof TIntegration['channels']>(x: {
|
|
14
16
|
channel: utils.Cast<ChannelName, string>;
|
|
15
17
|
tags: common.ToTags<keyof GetChannelByName<TIntegration, ChannelName>['conversation']['tags']>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@botpress/sdk",
|
|
3
|
-
"version": "4.17.
|
|
3
|
+
"version": "4.17.3",
|
|
4
4
|
"description": "Botpress SDK",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"author": "",
|
|
20
20
|
"license": "MIT",
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@botpress/client": "1.
|
|
22
|
+
"@botpress/client": "1.27.0",
|
|
23
23
|
"browser-or-node": "^2.1.1"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|