@botpress/client 1.24.2 → 1.26.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/dist/bundle.cjs +15 -13
- package/dist/bundle.cjs.map +4 -4
- package/dist/index.cjs +6 -4
- package/dist/index.cjs.map +4 -4
- package/dist/index.d.ts +64 -8
- package/dist/index.mjs +6 -4
- package/dist/index.mjs.map +4 -4
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ type ClientConfig = {
|
|
|
12
12
|
headers: Headers;
|
|
13
13
|
withCredentials: boolean;
|
|
14
14
|
timeout: number;
|
|
15
|
+
debug: boolean;
|
|
15
16
|
};
|
|
16
17
|
|
|
17
18
|
type CommonClientProps = {
|
|
@@ -19,6 +20,7 @@ type CommonClientProps = {
|
|
|
19
20
|
timeout?: number;
|
|
20
21
|
headers?: Headers;
|
|
21
22
|
retry?: RetryConfig;
|
|
23
|
+
debug?: boolean;
|
|
22
24
|
};
|
|
23
25
|
type Cast<T, U> = T extends U ? T : U;
|
|
24
26
|
type AsyncFunc = (...args: any[]) => Promise<any>;
|
|
@@ -800,6 +802,7 @@ interface CreateMessageRequestBody$1 {
|
|
|
800
802
|
*/
|
|
801
803
|
delay?: number;
|
|
802
804
|
};
|
|
805
|
+
origin?: "synthetic";
|
|
803
806
|
}
|
|
804
807
|
type CreateMessageInput$1 = CreateMessageRequestBody$1 & CreateMessageRequestHeaders$1 & CreateMessageRequestQuery$1 & CreateMessageRequestParams$1;
|
|
805
808
|
interface CreateMessageResponse$1 {
|
|
@@ -847,6 +850,10 @@ interface CreateMessageResponse$1 {
|
|
|
847
850
|
tags: {
|
|
848
851
|
[k: string]: string;
|
|
849
852
|
};
|
|
853
|
+
/**
|
|
854
|
+
* Origin of the message (`synthetic`).
|
|
855
|
+
*/
|
|
856
|
+
origin?: "synthetic";
|
|
850
857
|
};
|
|
851
858
|
}
|
|
852
859
|
|
|
@@ -894,6 +901,7 @@ interface GetOrCreateMessageRequestBody$1 {
|
|
|
894
901
|
*/
|
|
895
902
|
delay?: number;
|
|
896
903
|
};
|
|
904
|
+
origin?: "synthetic";
|
|
897
905
|
/**
|
|
898
906
|
* Optional list of tag names to use for strict matching when looking up existing messages. If provided, all specified tags must match exactly for a message to be considered a match. For example, with an existing message whose tags are {"foo": "a", "bar": "b", baz: "c"}: Without this parameter, ALL tags must match exactly. With ["bar","baz"], all listed tags must match their values, and other tags are not considered.
|
|
899
907
|
*/
|
|
@@ -945,6 +953,10 @@ interface GetOrCreateMessageResponse$1 {
|
|
|
945
953
|
tags: {
|
|
946
954
|
[k: string]: string;
|
|
947
955
|
};
|
|
956
|
+
/**
|
|
957
|
+
* Origin of the message (`synthetic`).
|
|
958
|
+
*/
|
|
959
|
+
origin?: "synthetic";
|
|
948
960
|
};
|
|
949
961
|
}
|
|
950
962
|
|
|
@@ -1003,6 +1015,10 @@ interface GetMessageResponse$1 {
|
|
|
1003
1015
|
tags: {
|
|
1004
1016
|
[k: string]: string;
|
|
1005
1017
|
};
|
|
1018
|
+
/**
|
|
1019
|
+
* Origin of the message (`synthetic`).
|
|
1020
|
+
*/
|
|
1021
|
+
origin?: "synthetic";
|
|
1006
1022
|
};
|
|
1007
1023
|
}
|
|
1008
1024
|
|
|
@@ -1073,6 +1089,10 @@ interface UpdateMessageResponse$1 {
|
|
|
1073
1089
|
tags: {
|
|
1074
1090
|
[k: string]: string;
|
|
1075
1091
|
};
|
|
1092
|
+
/**
|
|
1093
|
+
* Origin of the message (`synthetic`).
|
|
1094
|
+
*/
|
|
1095
|
+
origin?: "synthetic";
|
|
1076
1096
|
};
|
|
1077
1097
|
}
|
|
1078
1098
|
|
|
@@ -1132,6 +1152,10 @@ interface ListMessagesResponse$1 {
|
|
|
1132
1152
|
tags: {
|
|
1133
1153
|
[k: string]: string;
|
|
1134
1154
|
};
|
|
1155
|
+
/**
|
|
1156
|
+
* Origin of the message (`synthetic`).
|
|
1157
|
+
*/
|
|
1158
|
+
origin?: "synthetic";
|
|
1135
1159
|
}[];
|
|
1136
1160
|
meta: {
|
|
1137
1161
|
/**
|
|
@@ -2271,7 +2295,7 @@ interface CreateWorkflowRequestBody$1 {
|
|
|
2271
2295
|
tags?: {
|
|
2272
2296
|
[k: string]: string;
|
|
2273
2297
|
};
|
|
2274
|
-
status: "pending" | "in_progress";
|
|
2298
|
+
status: "pending" | "in_progress" | "listening";
|
|
2275
2299
|
/**
|
|
2276
2300
|
* Event id must be specified if the workflow is created with the status in_progress
|
|
2277
2301
|
*/
|
|
@@ -2683,7 +2707,7 @@ interface GetOrCreateWorkflowRequestBody$1 {
|
|
|
2683
2707
|
tags?: {
|
|
2684
2708
|
[k: string]: string;
|
|
2685
2709
|
};
|
|
2686
|
-
status: "pending" | "in_progress";
|
|
2710
|
+
status: "pending" | "in_progress" | "listening";
|
|
2687
2711
|
/**
|
|
2688
2712
|
* Event id must be specified if the workflow is created with the status in_progress
|
|
2689
2713
|
*/
|
|
@@ -2866,6 +2890,7 @@ type ClientProps$8 = CommonClientProps & {
|
|
|
2866
2890
|
token: string;
|
|
2867
2891
|
botId: string;
|
|
2868
2892
|
integrationId?: string;
|
|
2893
|
+
integrationAlias?: string;
|
|
2869
2894
|
};
|
|
2870
2895
|
declare class Client$8 extends Client$9 {
|
|
2871
2896
|
readonly config: Readonly<ClientConfig>;
|
|
@@ -2905,12 +2930,12 @@ declare class Client$8 extends Client$9 {
|
|
|
2905
2930
|
pictureUrl?: string;
|
|
2906
2931
|
}>;
|
|
2907
2932
|
events: (props: {
|
|
2933
|
+
status?: "pending" | "ignored" | "processed" | "failed" | "scheduled" | undefined;
|
|
2908
2934
|
type?: string | undefined;
|
|
2909
2935
|
userId?: string | undefined;
|
|
2910
2936
|
conversationId?: string | undefined;
|
|
2911
2937
|
workflowId?: string | undefined;
|
|
2912
2938
|
messageId?: string | undefined;
|
|
2913
|
-
status?: "pending" | "ignored" | "processed" | "failed" | "scheduled" | undefined;
|
|
2914
2939
|
}) => AsyncCollection<{
|
|
2915
2940
|
id: string;
|
|
2916
2941
|
createdAt: string;
|
|
@@ -2943,6 +2968,7 @@ declare class Client$8 extends Client$9 {
|
|
|
2943
2968
|
tags: {
|
|
2944
2969
|
[k: string]: string;
|
|
2945
2970
|
};
|
|
2971
|
+
origin?: "synthetic";
|
|
2946
2972
|
}>;
|
|
2947
2973
|
users: (props: {
|
|
2948
2974
|
tags?: {
|
|
@@ -2960,13 +2986,13 @@ declare class Client$8 extends Client$9 {
|
|
|
2960
2986
|
pictureUrl?: string;
|
|
2961
2987
|
}>;
|
|
2962
2988
|
tasks: (props: {
|
|
2989
|
+
status?: ("timeout" | "pending" | "failed" | "in_progress" | "completed" | "blocked" | "paused" | "cancelled")[] | undefined;
|
|
2963
2990
|
tags?: {
|
|
2964
2991
|
[x: string]: string;
|
|
2965
2992
|
} | undefined;
|
|
2966
2993
|
type?: string | undefined;
|
|
2967
2994
|
userId?: string | undefined;
|
|
2968
2995
|
conversationId?: string | undefined;
|
|
2969
|
-
status?: ("pending" | "failed" | "in_progress" | "completed" | "blocked" | "paused" | "timeout" | "cancelled")[] | undefined;
|
|
2970
2996
|
parentTaskId?: string | undefined;
|
|
2971
2997
|
}) => AsyncCollection<{
|
|
2972
2998
|
id: string;
|
|
@@ -15509,6 +15535,7 @@ type ClientProps$4 = CommonClientProps & {
|
|
|
15509
15535
|
token: string;
|
|
15510
15536
|
botId: string;
|
|
15511
15537
|
integrationId?: string;
|
|
15538
|
+
integrationAlias?: string;
|
|
15512
15539
|
};
|
|
15513
15540
|
declare class Client$4 extends Client$5 implements IClient$2 {
|
|
15514
15541
|
readonly config: Readonly<ClientConfig>;
|
|
@@ -17263,6 +17290,7 @@ type ClientProps$2 = CommonClientProps & {
|
|
|
17263
17290
|
token: string;
|
|
17264
17291
|
botId: string;
|
|
17265
17292
|
integrationId?: string;
|
|
17293
|
+
integrationAlias?: string;
|
|
17266
17294
|
};
|
|
17267
17295
|
declare class Client$2 extends Client$3 {
|
|
17268
17296
|
readonly config: Readonly<ClientConfig>;
|
|
@@ -18017,6 +18045,7 @@ interface CreateMessageRequestBody {
|
|
|
18017
18045
|
*/
|
|
18018
18046
|
delay?: number;
|
|
18019
18047
|
};
|
|
18048
|
+
origin?: "synthetic";
|
|
18020
18049
|
}
|
|
18021
18050
|
type CreateMessageInput = CreateMessageRequestBody & CreateMessageRequestHeaders & CreateMessageRequestQuery & CreateMessageRequestParams;
|
|
18022
18051
|
interface CreateMessageResponse {
|
|
@@ -18064,6 +18093,10 @@ interface CreateMessageResponse {
|
|
|
18064
18093
|
tags: {
|
|
18065
18094
|
[k: string]: string;
|
|
18066
18095
|
};
|
|
18096
|
+
/**
|
|
18097
|
+
* Origin of the message (`synthetic`).
|
|
18098
|
+
*/
|
|
18099
|
+
origin?: "synthetic";
|
|
18067
18100
|
};
|
|
18068
18101
|
}
|
|
18069
18102
|
|
|
@@ -18111,6 +18144,7 @@ interface GetOrCreateMessageRequestBody {
|
|
|
18111
18144
|
*/
|
|
18112
18145
|
delay?: number;
|
|
18113
18146
|
};
|
|
18147
|
+
origin?: "synthetic";
|
|
18114
18148
|
/**
|
|
18115
18149
|
* Optional list of tag names to use for strict matching when looking up existing messages. If provided, all specified tags must match exactly for a message to be considered a match. For example, with an existing message whose tags are {"foo": "a", "bar": "b", baz: "c"}: Without this parameter, ALL tags must match exactly. With ["bar","baz"], all listed tags must match their values, and other tags are not considered.
|
|
18116
18150
|
*/
|
|
@@ -18162,6 +18196,10 @@ interface GetOrCreateMessageResponse {
|
|
|
18162
18196
|
tags: {
|
|
18163
18197
|
[k: string]: string;
|
|
18164
18198
|
};
|
|
18199
|
+
/**
|
|
18200
|
+
* Origin of the message (`synthetic`).
|
|
18201
|
+
*/
|
|
18202
|
+
origin?: "synthetic";
|
|
18165
18203
|
};
|
|
18166
18204
|
}
|
|
18167
18205
|
|
|
@@ -18220,6 +18258,10 @@ interface GetMessageResponse {
|
|
|
18220
18258
|
tags: {
|
|
18221
18259
|
[k: string]: string;
|
|
18222
18260
|
};
|
|
18261
|
+
/**
|
|
18262
|
+
* Origin of the message (`synthetic`).
|
|
18263
|
+
*/
|
|
18264
|
+
origin?: "synthetic";
|
|
18223
18265
|
};
|
|
18224
18266
|
}
|
|
18225
18267
|
|
|
@@ -18290,6 +18332,10 @@ interface UpdateMessageResponse {
|
|
|
18290
18332
|
tags: {
|
|
18291
18333
|
[k: string]: string;
|
|
18292
18334
|
};
|
|
18335
|
+
/**
|
|
18336
|
+
* Origin of the message (`synthetic`).
|
|
18337
|
+
*/
|
|
18338
|
+
origin?: "synthetic";
|
|
18293
18339
|
};
|
|
18294
18340
|
}
|
|
18295
18341
|
|
|
@@ -18349,6 +18395,10 @@ interface ListMessagesResponse {
|
|
|
18349
18395
|
tags: {
|
|
18350
18396
|
[k: string]: string;
|
|
18351
18397
|
};
|
|
18398
|
+
/**
|
|
18399
|
+
* Origin of the message (`synthetic`).
|
|
18400
|
+
*/
|
|
18401
|
+
origin?: "synthetic";
|
|
18352
18402
|
}[];
|
|
18353
18403
|
meta: {
|
|
18354
18404
|
/**
|
|
@@ -19488,7 +19538,7 @@ interface CreateWorkflowRequestBody {
|
|
|
19488
19538
|
tags?: {
|
|
19489
19539
|
[k: string]: string;
|
|
19490
19540
|
};
|
|
19491
|
-
status: "pending" | "in_progress";
|
|
19541
|
+
status: "pending" | "in_progress" | "listening";
|
|
19492
19542
|
/**
|
|
19493
19543
|
* Event id must be specified if the workflow is created with the status in_progress
|
|
19494
19544
|
*/
|
|
@@ -19900,7 +19950,7 @@ interface GetOrCreateWorkflowRequestBody {
|
|
|
19900
19950
|
tags?: {
|
|
19901
19951
|
[k: string]: string;
|
|
19902
19952
|
};
|
|
19903
|
-
status: "pending" | "in_progress";
|
|
19953
|
+
status: "pending" | "in_progress" | "listening";
|
|
19904
19954
|
/**
|
|
19905
19955
|
* Event id must be specified if the workflow is created with the status in_progress
|
|
19906
19956
|
*/
|
|
@@ -35145,6 +35195,10 @@ interface Message {
|
|
|
35145
35195
|
tags: {
|
|
35146
35196
|
[k: string]: string;
|
|
35147
35197
|
};
|
|
35198
|
+
/**
|
|
35199
|
+
* Origin of the message (`synthetic`).
|
|
35200
|
+
*/
|
|
35201
|
+
origin?: "synthetic";
|
|
35148
35202
|
}
|
|
35149
35203
|
/**
|
|
35150
35204
|
* The state object represents the current payload. A state is always linked to either a bot, a conversation or a user.
|
|
@@ -35828,6 +35882,7 @@ type ClientInputs = Inputs<IClient>;
|
|
|
35828
35882
|
type ClientOutputs = Outputs<IClient>;
|
|
35829
35883
|
type ClientProps = CommonClientProps & {
|
|
35830
35884
|
integrationId?: string;
|
|
35885
|
+
integrationAlias?: string;
|
|
35831
35886
|
workspaceId?: string;
|
|
35832
35887
|
botId?: string;
|
|
35833
35888
|
token?: string;
|
|
@@ -35870,12 +35925,12 @@ declare class Client extends Client$1 implements IClient {
|
|
|
35870
35925
|
pictureUrl?: string;
|
|
35871
35926
|
}>;
|
|
35872
35927
|
events: (props: {
|
|
35928
|
+
status?: "pending" | "ignored" | "processed" | "failed" | "scheduled" | undefined;
|
|
35873
35929
|
type?: string | undefined;
|
|
35874
35930
|
userId?: string | undefined;
|
|
35875
35931
|
conversationId?: string | undefined;
|
|
35876
35932
|
workflowId?: string | undefined;
|
|
35877
35933
|
messageId?: string | undefined;
|
|
35878
|
-
status?: "pending" | "ignored" | "processed" | "failed" | "scheduled" | undefined;
|
|
35879
35934
|
}) => AsyncCollection<{
|
|
35880
35935
|
id: string;
|
|
35881
35936
|
createdAt: string;
|
|
@@ -35908,6 +35963,7 @@ declare class Client extends Client$1 implements IClient {
|
|
|
35908
35963
|
tags: {
|
|
35909
35964
|
[k: string]: string;
|
|
35910
35965
|
};
|
|
35966
|
+
origin?: "synthetic";
|
|
35911
35967
|
}>;
|
|
35912
35968
|
users: (props: {
|
|
35913
35969
|
tags?: {
|
|
@@ -35925,13 +35981,13 @@ declare class Client extends Client$1 implements IClient {
|
|
|
35925
35981
|
pictureUrl?: string;
|
|
35926
35982
|
}>;
|
|
35927
35983
|
tasks: (props: {
|
|
35984
|
+
status?: ("timeout" | "pending" | "failed" | "in_progress" | "completed" | "blocked" | "paused" | "cancelled")[] | undefined;
|
|
35928
35985
|
tags?: {
|
|
35929
35986
|
[x: string]: string;
|
|
35930
35987
|
} | undefined;
|
|
35931
35988
|
type?: string | undefined;
|
|
35932
35989
|
userId?: string | undefined;
|
|
35933
35990
|
conversationId?: string | undefined;
|
|
35934
|
-
status?: ("pending" | "failed" | "in_progress" | "completed" | "blocked" | "paused" | "timeout" | "cancelled")[] | undefined;
|
|
35935
35991
|
parentTaskId?: string | undefined;
|
|
35936
35992
|
}) => AsyncCollection<{
|
|
35937
35993
|
id: string;
|