@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.
Files changed (62) hide show
  1. package/.turbo/turbo-build.log +23 -0
  2. package/dist/adapters/messaging-to-target.d.ts +72 -40
  3. package/dist/adapters/target.d.ts +5 -0
  4. package/dist/adapters/webchat-to-target.d.ts +58 -34
  5. package/dist/client/MessagingClient/client.d.ts +1 -0
  6. package/dist/client/PushpinClient/inner-client/index.d.ts +2 -2
  7. package/dist/client/types.d.ts +1 -0
  8. package/dist/components/Block.d.ts +7 -5
  9. package/dist/contexts/WebchatContext.d.ts +3 -7
  10. package/dist/gen/client/index.d.ts +78 -13
  11. package/dist/gen/{models/message.t.d.ts → client/models.d.ts} +91 -3
  12. package/dist/gen/client/operations/addParticipant.d.ts +51 -0
  13. package/dist/gen/client/operations/createConversation.d.ts +39 -0
  14. package/dist/gen/client/operations/createEvent.d.ts +79 -0
  15. package/dist/gen/client/operations/createMessage.d.ts +274 -0
  16. package/dist/gen/client/operations/createUser.d.ts +60 -0
  17. package/dist/gen/client/operations/deleteConversation.d.ts +22 -0
  18. package/dist/gen/client/operations/deleteMessage.d.ts +22 -0
  19. package/dist/gen/client/operations/deleteUser.d.ts +21 -0
  20. package/dist/gen/client/operations/getConversation.d.ts +36 -0
  21. package/dist/gen/client/operations/getEvent.d.ts +58 -0
  22. package/dist/gen/client/operations/getMessage.d.ts +157 -0
  23. package/dist/gen/client/operations/getParticipant.d.ts +48 -0
  24. package/dist/gen/client/operations/getUser.d.ts +46 -0
  25. package/dist/gen/client/operations/listConversationMessages.d.ts +161 -0
  26. package/dist/gen/client/operations/listConversations.d.ts +42 -0
  27. package/dist/gen/client/operations/listParticipants.d.ts +51 -0
  28. package/dist/gen/client/operations/listenConversation.d.ts +22 -0
  29. package/dist/gen/client/operations/removeParticipant.d.ts +23 -0
  30. package/dist/gen/client/operations/updateUser.d.ts +60 -0
  31. package/dist/gen/signals/{customSignal.t.d.ts → custom.t.d.ts} +1 -1
  32. package/dist/gen/signals/index.d.ts +16 -16
  33. package/dist/gen/signals/{messageCreatedSignal.t.d.ts → messageCreated.t.d.ts} +1 -1
  34. package/dist/gen/signals/{webchatConfigSignal.t.d.ts → webchatConfig.t.d.ts} +1 -1
  35. package/dist/gen/signals/{webchatVisibilitySignal.t.d.ts → webchatVisibility.t.d.ts} +1 -1
  36. package/dist/index.js +32913 -21174
  37. package/dist/index.umd.cjs +278 -95
  38. package/dist/types/block-type.d.ts +3 -3
  39. package/openapi.ts +6 -11
  40. package/package.json +4 -1
  41. package/dist/gen/client/api.d.ts +0 -2012
  42. package/dist/gen/client/base.d.ts +0 -54
  43. package/dist/gen/client/client.d.ts +0 -61
  44. package/dist/gen/client/common.d.ts +0 -65
  45. package/dist/gen/client/configuration.d.ts +0 -83
  46. package/dist/gen/models/conversation.j.d.ts +0 -20
  47. package/dist/gen/models/conversation.t.d.ts +0 -10
  48. package/dist/gen/models/conversation.z.d.ts +0 -15
  49. package/dist/gen/models/index.d.ts +0 -1014
  50. package/dist/gen/models/message.j.d.ts +0 -490
  51. package/dist/gen/models/message.z.d.ts +0 -439
  52. package/dist/gen/models/user.j.d.ts +0 -26
  53. package/dist/gen/models/user.t.d.ts +0 -12
  54. package/dist/gen/models/user.z.d.ts +0 -21
  55. /package/dist/gen/signals/{customSignal.j.d.ts → custom.j.d.ts} +0 -0
  56. /package/dist/gen/signals/{customSignal.z.d.ts → custom.z.d.ts} +0 -0
  57. /package/dist/gen/signals/{messageCreatedSignal.j.d.ts → messageCreated.j.d.ts} +0 -0
  58. /package/dist/gen/signals/{messageCreatedSignal.z.d.ts → messageCreated.z.d.ts} +0 -0
  59. /package/dist/gen/signals/{webchatConfigSignal.j.d.ts → webchatConfig.j.d.ts} +0 -0
  60. /package/dist/gen/signals/{webchatConfigSignal.z.d.ts → webchatConfig.z.d.ts} +0 -0
  61. /package/dist/gen/signals/{webchatVisibilitySignal.j.d.ts → webchatVisibility.j.d.ts} +0 -0
  62. /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
+ }
@@ -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 CustomSignal {
6
+ export interface Custom {
7
7
  type: "custom";
8
8
  data: {
9
9
  event: {
@@ -1,9 +1,9 @@
1
- import type { MessageCreatedSignal } from './messageCreatedSignal.t';
2
- import type { WebchatVisibilitySignal } from './webchatVisibilitySignal.t';
3
- import type { WebchatConfigSignal } from './webchatConfigSignal.t';
4
- import type { CustomSignal } from './customSignal.t';
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
- messageCreatedSignal: import("zod").ZodObject<{
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
- webchatVisibilitySignal: import("zod").ZodObject<{
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
- webchatConfigSignal: import("zod").ZodObject<{
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
- customSignal: import("zod").ZodObject<{
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
- messageCreatedSignal: {
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
- webchatVisibilitySignal: {
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
- webchatConfigSignal: {
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
- customSignal: {
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
- messageCreatedSignal: MessageCreatedSignal;
1246
- webchatVisibilitySignal: WebchatVisibilitySignal;
1247
- webchatConfigSignal: WebchatConfigSignal;
1248
- customSignal: CustomSignal;
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 MessageCreatedSignal {
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 WebchatConfigSignal {
6
+ export interface WebchatConfig {
7
7
  type: "webchat_config";
8
8
  data: {
9
9
  config: {
@@ -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 WebchatVisibilitySignal {
6
+ export interface WebchatVisibility {
7
7
  type: "webchat_visibility";
8
8
  data: {
9
9
  visibility: "show" | "hide" | "toggle";