@botpress/webchat 1.3.2 → 1.3.4
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 +23 -0
- package/dist/adapters/messaging-to-target.d.ts +72 -40
- package/dist/adapters/target.d.ts +5 -0
- package/dist/adapters/webchat-to-target.d.ts +58 -34
- package/dist/client/MessagingClient/client.d.ts +1 -0
- package/dist/client/PushpinClient/inner-client/index.d.ts +2 -2
- package/dist/client/types.d.ts +1 -0
- package/dist/components/Block.d.ts +7 -5
- package/dist/contexts/WebchatContext.d.ts +3 -7
- package/dist/gen/client/index.d.ts +78 -13
- package/dist/gen/{models/message.t.d.ts → client/models.d.ts} +91 -3
- package/dist/gen/client/operations/addParticipant.d.ts +51 -0
- package/dist/gen/client/operations/createConversation.d.ts +39 -0
- package/dist/gen/client/operations/createEvent.d.ts +79 -0
- package/dist/gen/client/operations/createMessage.d.ts +274 -0
- package/dist/gen/client/operations/createUser.d.ts +60 -0
- package/dist/gen/client/operations/deleteConversation.d.ts +22 -0
- package/dist/gen/client/operations/deleteMessage.d.ts +22 -0
- package/dist/gen/client/operations/deleteUser.d.ts +21 -0
- package/dist/gen/client/operations/getConversation.d.ts +36 -0
- package/dist/gen/client/operations/getEvent.d.ts +58 -0
- package/dist/gen/client/operations/getMessage.d.ts +157 -0
- package/dist/gen/client/operations/getParticipant.d.ts +48 -0
- package/dist/gen/client/operations/getUser.d.ts +46 -0
- package/dist/gen/client/operations/listConversationMessages.d.ts +161 -0
- package/dist/gen/client/operations/listConversations.d.ts +42 -0
- package/dist/gen/client/operations/listParticipants.d.ts +51 -0
- package/dist/gen/client/operations/listenConversation.d.ts +22 -0
- package/dist/gen/client/operations/removeParticipant.d.ts +23 -0
- package/dist/gen/client/operations/updateUser.d.ts +60 -0
- package/dist/gen/signals/{customSignal.t.d.ts → custom.t.d.ts} +1 -1
- package/dist/gen/signals/index.d.ts +16 -16
- package/dist/gen/signals/{messageCreatedSignal.t.d.ts → messageCreated.t.d.ts} +1 -1
- package/dist/gen/signals/{webchatConfigSignal.t.d.ts → webchatConfig.t.d.ts} +1 -1
- package/dist/gen/signals/{webchatVisibilitySignal.t.d.ts → webchatVisibility.t.d.ts} +1 -1
- package/dist/index.js +32913 -21174
- package/dist/index.umd.cjs +278 -95
- package/dist/types/block-type.d.ts +3 -3
- package/openapi.ts +6 -11
- package/package.json +4 -1
- package/dist/gen/client/api.d.ts +0 -2012
- package/dist/gen/client/base.d.ts +0 -54
- package/dist/gen/client/client.d.ts +0 -61
- package/dist/gen/client/common.d.ts +0 -65
- package/dist/gen/client/configuration.d.ts +0 -83
- package/dist/gen/models/conversation.j.d.ts +0 -20
- package/dist/gen/models/conversation.t.d.ts +0 -10
- package/dist/gen/models/conversation.z.d.ts +0 -15
- package/dist/gen/models/index.d.ts +0 -1014
- package/dist/gen/models/message.j.d.ts +0 -490
- package/dist/gen/models/message.z.d.ts +0 -439
- package/dist/gen/models/user.j.d.ts +0 -26
- package/dist/gen/models/user.t.d.ts +0 -12
- package/dist/gen/models/user.z.d.ts +0 -21
- /package/dist/gen/signals/{customSignal.j.d.ts → custom.j.d.ts} +0 -0
- /package/dist/gen/signals/{customSignal.z.d.ts → custom.z.d.ts} +0 -0
- /package/dist/gen/signals/{messageCreatedSignal.j.d.ts → messageCreated.j.d.ts} +0 -0
- /package/dist/gen/signals/{messageCreatedSignal.z.d.ts → messageCreated.z.d.ts} +0 -0
- /package/dist/gen/signals/{webchatConfigSignal.j.d.ts → webchatConfig.j.d.ts} +0 -0
- /package/dist/gen/signals/{webchatConfigSignal.z.d.ts → webchatConfig.z.d.ts} +0 -0
- /package/dist/gen/signals/{webchatVisibilitySignal.j.d.ts → webchatVisibility.j.d.ts} +0 -0
- /package/dist/gen/signals/{webchatVisibilitySignal.z.d.ts → webchatVisibility.z.d.ts} +0 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
export interface UpdateUserRequestHeaders {
|
|
2
|
+
"x-user-key": string;
|
|
3
|
+
}
|
|
4
|
+
export interface UpdateUserRequestQuery {
|
|
5
|
+
}
|
|
6
|
+
export interface UpdateUserRequestParams {
|
|
7
|
+
}
|
|
8
|
+
export interface UpdateUserRequestBody {
|
|
9
|
+
/**
|
|
10
|
+
* Name of the [User](#schema_user) (not a unique identifier)
|
|
11
|
+
*/
|
|
12
|
+
name?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Picture url of the [User](#schema_user)
|
|
15
|
+
*/
|
|
16
|
+
pictureUrl?: string;
|
|
17
|
+
/**
|
|
18
|
+
* User data
|
|
19
|
+
*/
|
|
20
|
+
userData?: {
|
|
21
|
+
[k: string]: any;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export type UpdateUserInput = UpdateUserRequestBody & UpdateUserRequestHeaders & UpdateUserRequestQuery & UpdateUserRequestParams;
|
|
25
|
+
export type UpdateUserRequest = {
|
|
26
|
+
headers: UpdateUserRequestHeaders;
|
|
27
|
+
query: UpdateUserRequestQuery;
|
|
28
|
+
params: UpdateUserRequestParams;
|
|
29
|
+
body: UpdateUserRequestBody;
|
|
30
|
+
};
|
|
31
|
+
export declare const parseReq: (input: UpdateUserInput) => UpdateUserRequest & {
|
|
32
|
+
path: string;
|
|
33
|
+
};
|
|
34
|
+
export interface UpdateUserResponse {
|
|
35
|
+
/**
|
|
36
|
+
* The user object represents someone interacting with the bot within a specific integration. The same person interacting with a bot in slack and messenger will be represented with two different users.
|
|
37
|
+
*/
|
|
38
|
+
user: {
|
|
39
|
+
/**
|
|
40
|
+
* Name of the [User](#schema_user)
|
|
41
|
+
*/
|
|
42
|
+
name?: string;
|
|
43
|
+
/**
|
|
44
|
+
* Picture url of the [User](#schema_user)
|
|
45
|
+
*/
|
|
46
|
+
pictureUrl?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Id of the [User](#schema_user)
|
|
49
|
+
*/
|
|
50
|
+
id: string;
|
|
51
|
+
/**
|
|
52
|
+
* Creation date of the [User](#schema_user) in ISO 8601 format
|
|
53
|
+
*/
|
|
54
|
+
createdAt: string;
|
|
55
|
+
/**
|
|
56
|
+
* Updating date of the [User](#schema_user) in ISO 8601 format
|
|
57
|
+
*/
|
|
58
|
+
updatedAt: string;
|
|
59
|
+
};
|
|
60
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
1
|
+
import type { MessageCreated } from './messageCreated.t';
|
|
2
|
+
import type { WebchatVisibility } from './webchatVisibility.t';
|
|
3
|
+
import type { WebchatConfig } from './webchatConfig.t';
|
|
4
|
+
import type { Custom } from './custom.t';
|
|
5
5
|
export declare const zod: {
|
|
6
|
-
|
|
6
|
+
messageCreated: import("zod").ZodObject<{
|
|
7
7
|
type: import("zod").ZodLiteral<"message_created">;
|
|
8
8
|
data: import("zod").ZodObject<{
|
|
9
9
|
id: import("zod").ZodString;
|
|
@@ -609,7 +609,7 @@ export declare const zod: {
|
|
|
609
609
|
createdAt: string;
|
|
610
610
|
};
|
|
611
611
|
}>;
|
|
612
|
-
|
|
612
|
+
webchatVisibility: import("zod").ZodObject<{
|
|
613
613
|
type: import("zod").ZodLiteral<"webchat_visibility">;
|
|
614
614
|
data: import("zod").ZodObject<{
|
|
615
615
|
visibility: import("zod").ZodEnum<["show", "hide", "toggle"]>;
|
|
@@ -629,7 +629,7 @@ export declare const zod: {
|
|
|
629
629
|
visibility: "show" | "hide" | "toggle";
|
|
630
630
|
};
|
|
631
631
|
}>;
|
|
632
|
-
|
|
632
|
+
webchatConfig: import("zod").ZodObject<{
|
|
633
633
|
type: import("zod").ZodLiteral<"webchat_config">;
|
|
634
634
|
data: import("zod").ZodObject<{
|
|
635
635
|
config: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>;
|
|
@@ -649,7 +649,7 @@ export declare const zod: {
|
|
|
649
649
|
config: Record<string, any>;
|
|
650
650
|
};
|
|
651
651
|
}>;
|
|
652
|
-
|
|
652
|
+
custom: import("zod").ZodObject<{
|
|
653
653
|
type: import("zod").ZodLiteral<"custom">;
|
|
654
654
|
data: import("zod").ZodObject<{
|
|
655
655
|
event: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodAny>;
|
|
@@ -671,7 +671,7 @@ export declare const zod: {
|
|
|
671
671
|
}>;
|
|
672
672
|
};
|
|
673
673
|
export declare const json: {
|
|
674
|
-
|
|
674
|
+
messageCreated: {
|
|
675
675
|
type: string;
|
|
676
676
|
properties: {
|
|
677
677
|
type: {
|
|
@@ -1171,7 +1171,7 @@ export declare const json: {
|
|
|
1171
1171
|
additionalProperties: boolean;
|
|
1172
1172
|
$schema: string;
|
|
1173
1173
|
};
|
|
1174
|
-
|
|
1174
|
+
webchatVisibility: {
|
|
1175
1175
|
type: string;
|
|
1176
1176
|
properties: {
|
|
1177
1177
|
type: {
|
|
@@ -1194,7 +1194,7 @@ export declare const json: {
|
|
|
1194
1194
|
additionalProperties: boolean;
|
|
1195
1195
|
$schema: string;
|
|
1196
1196
|
};
|
|
1197
|
-
|
|
1197
|
+
webchatConfig: {
|
|
1198
1198
|
type: string;
|
|
1199
1199
|
properties: {
|
|
1200
1200
|
type: {
|
|
@@ -1217,7 +1217,7 @@ export declare const json: {
|
|
|
1217
1217
|
additionalProperties: boolean;
|
|
1218
1218
|
$schema: string;
|
|
1219
1219
|
};
|
|
1220
|
-
|
|
1220
|
+
custom: {
|
|
1221
1221
|
type: string;
|
|
1222
1222
|
properties: {
|
|
1223
1223
|
type: {
|
|
@@ -1242,8 +1242,8 @@ export declare const json: {
|
|
|
1242
1242
|
};
|
|
1243
1243
|
};
|
|
1244
1244
|
export type Types = {
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1245
|
+
messageCreated: MessageCreated;
|
|
1246
|
+
webchatVisibility: WebchatVisibility;
|
|
1247
|
+
webchatConfig: WebchatConfig;
|
|
1248
|
+
custom: Custom;
|
|
1249
1249
|
};
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
|
|
4
4
|
* and run json-schema-to-typescript to regenerate this file.
|
|
5
5
|
*/
|
|
6
|
-
export interface
|
|
6
|
+
export interface MessageCreated {
|
|
7
7
|
type: "message_created";
|
|
8
8
|
data: {
|
|
9
9
|
id: string;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
|
|
4
4
|
* and run json-schema-to-typescript to regenerate this file.
|
|
5
5
|
*/
|
|
6
|
-
export interface
|
|
6
|
+
export interface WebchatVisibility {
|
|
7
7
|
type: "webchat_visibility";
|
|
8
8
|
data: {
|
|
9
9
|
visibility: "show" | "hide" | "toggle";
|