@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,23 @@
1
+
2
+ > @botpress/webchat@1.3.4 build /home/runner/work/echo/echo/packages/webchat-frontend
3
+ > vite build
4
+
5
+ vite v4.4.11 building for production...
6
+ transforming...
7
+ [plugin:vite:resolve] Module "crypto" has been externalized for browser compatibility, imported by "/home/runner/work/echo/echo/packages/webchat-frontend/src/gen/client/errors.ts". See http://vitejs.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.
8
+ [plugin:vite:resolve] Module "node:http" has been externalized for browser compatibility, imported by "/home/runner/work/echo/echo/node_modules/.pnpm/@botpress+sdk@0.8.2/node_modules/@botpress/sdk/dist/index.js". See http://vitejs.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.
9
+ [plugin:vite:resolve] Module "util" has been externalized for browser compatibility, imported by "/home/runner/work/echo/echo/node_modules/.pnpm/@botpress+sdk@0.8.2/node_modules/@botpress/sdk/dist/index.js". See http://vitejs.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.
10
+ [plugin:vite:resolve] Module "path" has been externalized for browser compatibility, imported by "/home/runner/work/echo/echo/node_modules/.pnpm/@apidevtools+json-schema-ref-parser@11.6.1/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/url.js". See http://vitejs.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.
11
+ [plugin:vite:resolve] Module "path" has been externalized for browser compatibility, imported by "/home/runner/work/echo/echo/node_modules/.pnpm/@apidevtools+json-schema-ref-parser@11.6.1/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/convert-path-to-posix.js". See http://vitejs.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.
12
+ [plugin:vite:resolve] Module "util" has been externalized for browser compatibility, imported by "/home/runner/work/echo/echo/node_modules/.pnpm/@jsdevtools+ono@7.1.3/node_modules/@jsdevtools/ono/esm/types.js". See http://vitejs.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.
13
+ ../../node_modules/.pnpm/@jsdevtools+ono@7.1.3/node_modules/@jsdevtools/ono/esm/types.js (1:9) "inspect" is not exported by "__vite-browser-external", imported by "../../node_modules/.pnpm/@jsdevtools+ono@7.1.3/node_modules/@jsdevtools/ono/esm/types.js".
14
+ ✓ 2306 modules transformed.
15
+ rendering chunks...
16
+ 
17
+ [vite:dts] Start generate declaration files...
18
+ computing gzip size...
19
+ [vite:dts] Declaration files built in 14532ms.
20
+ 
21
+ dist/index.js 1,501.30 kB │ gzip: 369.07 kB
22
+ dist/index.umd.cjs 1,034.78 kB │ gzip: 308.50 kB
23
+ ✓ built in 25.13s
@@ -1,16 +1,18 @@
1
1
  import * as adapters from 'webchat-adapters';
2
2
  import * as target from './target';
3
3
  type WithBubble<T extends target.Message> = target.BubbleOf<T>;
4
- export type MessagingToTargetAdapters = adapters.Adapter<adapters.messaging.Messages, target.Messages>;
4
+ export type MessagingToTargetAdapters = adapters.Adapter<adapters.messaging.Messages, target.AdaptersOutput>;
5
5
  export declare const audioAdapter: ({ type, audio }: {
6
6
  type: "audio";
7
7
  audio: string;
8
+ title?: string | undefined;
8
9
  className?: string | undefined;
9
10
  avatarUrl?: string | undefined;
10
- title?: string | undefined;
11
11
  }) => {
12
- type: "audio";
13
- url: string;
12
+ payload: {
13
+ type: "audio";
14
+ url: string;
15
+ };
14
16
  };
15
17
  export declare const cardAdapter: (card: {
16
18
  title: string;
@@ -29,10 +31,12 @@ export declare const cardAdapter: (card: {
29
31
  payload: string;
30
32
  })[];
31
33
  className?: string | undefined;
32
- avatarUrl?: string | undefined;
33
- subtitle?: string | undefined;
34
34
  image?: string | undefined;
35
- }) => WithBubble<target.ColumnMessage>;
35
+ subtitle?: string | undefined;
36
+ avatarUrl?: string | undefined;
37
+ }) => {
38
+ payload: WithBubble<target.ColumnMessage>;
39
+ };
36
40
  export declare const carouselAdapter: ({ items }: {
37
41
  type: "carousel";
38
42
  items: {
@@ -52,15 +56,17 @@ export declare const carouselAdapter: ({ items }: {
52
56
  payload: string;
53
57
  })[];
54
58
  className?: string | undefined;
55
- avatarUrl?: string | undefined;
56
- subtitle?: string | undefined;
57
59
  image?: string | undefined;
60
+ subtitle?: string | undefined;
61
+ avatarUrl?: string | undefined;
58
62
  }[];
59
63
  className?: string | undefined;
60
64
  avatarUrl?: string | undefined;
61
65
  }) => {
62
- type: "carousel";
63
- blocks: target.ColumnMessage[];
66
+ payload: {
67
+ type: "carousel";
68
+ blocks: target.ColumnMessage[];
69
+ };
64
70
  };
65
71
  export declare const choiceAdapter: (x: {
66
72
  type: "single-choice";
@@ -70,39 +76,47 @@ export declare const choiceAdapter: (x: {
70
76
  value: string;
71
77
  }[];
72
78
  className?: string | undefined;
73
- avatarUrl?: string | undefined;
74
79
  disableFreeText?: boolean | undefined;
75
- }) => target.Message;
80
+ avatarUrl?: string | undefined;
81
+ }) => {
82
+ disableInput: boolean | undefined;
83
+ payload: target.Message;
84
+ };
76
85
  export declare const dropdownAdapter: (x: {
77
86
  options: {
78
87
  value: string;
79
88
  label: string;
80
89
  }[];
81
90
  type: "dropdown";
91
+ message?: string | undefined;
92
+ text?: string | undefined;
82
93
  className?: string | undefined;
94
+ markdown?: boolean | undefined;
83
95
  avatarUrl?: string | undefined;
84
- message?: string | undefined;
85
96
  allowCreation?: boolean | undefined;
86
97
  placeholderText?: string | undefined;
87
98
  allowMultiple?: boolean | undefined;
88
99
  buttonText?: string | undefined;
89
100
  width?: number | undefined;
90
101
  displayInKeyboard?: boolean | undefined;
91
- markdown?: boolean | undefined;
92
- text?: string | undefined;
93
- }) => WithBubble<target.ColumnMessage>;
102
+ }) => {
103
+ disableInput: true;
104
+ payload: WithBubble<target.ColumnMessage>;
105
+ };
94
106
  export declare const fileAdapter: ({ file, ...props }: {
95
107
  type: "file";
96
108
  file: string;
97
- className?: string | undefined;
98
- avatarUrl?: string | undefined;
99
109
  title?: string | undefined;
100
- }) => {
101
- type: "file";
102
110
  className?: string | undefined;
103
111
  avatarUrl?: string | undefined;
104
- title?: string | undefined;
105
- url: string;
112
+ }) => {
113
+ payload: {
114
+ type: "file";
115
+ title?: string | undefined;
116
+ className?: string | undefined;
117
+ avatarUrl?: string | undefined;
118
+ url: string;
119
+ };
106
120
  };
107
121
  export declare const imageAdapter: ({ type, image }: {
108
122
  type: "image";
@@ -110,42 +124,60 @@ export declare const imageAdapter: ({ type, image }: {
110
124
  className?: string | undefined;
111
125
  avatarUrl?: string | undefined;
112
126
  }) => {
113
- type: "image";
114
- url: string;
127
+ payload: {
128
+ type: "image";
129
+ url: string;
130
+ };
115
131
  };
116
132
  export declare const locationAdapter: ({ type, latitude, longitude, title, address }: {
117
133
  type: "location";
118
134
  latitude: number;
119
135
  longitude: number;
136
+ title?: string | undefined;
120
137
  className?: string | undefined;
121
- avatarUrl?: string | undefined;
122
138
  address?: string | undefined;
123
- title?: string | undefined;
139
+ avatarUrl?: string | undefined;
124
140
  }) => {
125
- type: "location";
126
- latitude: number;
127
- longitude: number;
128
- title: string;
141
+ payload: {
142
+ type: "location";
143
+ latitude: number;
144
+ longitude: number;
145
+ title: string;
146
+ };
147
+ };
148
+ export declare const quickReplyAdapter: ({ text, payload }: {
149
+ type: "quick_reply";
150
+ text: string;
151
+ payload?: string | undefined;
152
+ }) => {
153
+ payload: {
154
+ type: "text";
155
+ text: string;
156
+ };
129
157
  };
130
158
  export declare const textAdapter: ({ type, text }: {
131
159
  type: "text";
132
160
  text: string;
133
161
  className?: string | undefined;
134
- avatarUrl?: string | undefined;
135
162
  markdown?: boolean | undefined;
136
- }) => WithBubble<{
137
- type: "text";
138
- text: string;
139
- }>;
163
+ avatarUrl?: string | undefined;
164
+ }) => {
165
+ payload: WithBubble<{
166
+ type: "text";
167
+ text: string;
168
+ }>;
169
+ };
140
170
  export declare const videoAdapter: ({ type, video }: {
141
171
  type: "video";
142
172
  video: string;
173
+ title?: string | undefined;
143
174
  className?: string | undefined;
144
175
  avatarUrl?: string | undefined;
145
- title?: string | undefined;
146
176
  }) => {
147
- type: "video";
148
- url: string;
177
+ payload: {
178
+ type: "video";
179
+ url: string;
180
+ };
149
181
  };
150
- export declare const messageAdapter: (message: adapters.messaging.Message) => target.Message;
182
+ export declare const messageAdapter: (message: adapters.messaging.Message) => target.AdapterOutput;
151
183
  export {};
@@ -75,3 +75,8 @@ export type RowOf<T extends Message> = Omit<RowMessage, 'blocks'> & {
75
75
  blocks: T[];
76
76
  };
77
77
  export type Messages = adapters.MessagesOf<Message>;
78
+ export type AdapterOutput = {
79
+ payload: Message;
80
+ disableInput?: boolean;
81
+ };
82
+ export type AdaptersOutput = Record<keyof Messages, AdapterOutput>;
@@ -1,13 +1,15 @@
1
1
  import * as adapters from 'webchat-adapters';
2
2
  import * as target from './target';
3
- export type WebchatToTargetAdapters = adapters.Adapter<adapters.webchat.Messages, target.Messages>;
3
+ export type WebchatToTargetAdapters = adapters.Adapter<adapters.webchat.Messages, target.AdaptersOutput>;
4
4
  export declare const audioAdapter: (webchatMessage: {
5
5
  type: "audio";
6
6
  audioUrl: string;
7
7
  className?: string | undefined;
8
8
  }) => {
9
- type: "audio";
10
- url: string;
9
+ payload: {
10
+ type: "audio";
11
+ url: string;
12
+ };
11
13
  };
12
14
  export declare const cardAdapter: (webchatMessage: {
13
15
  title: string;
@@ -20,8 +22,10 @@ export declare const cardAdapter: (webchatMessage: {
20
22
  className?: string | undefined;
21
23
  subtitle?: string | undefined;
22
24
  imageUrl?: string | undefined;
23
- }) => Omit<target.BubbleMessage, "block"> & {
24
- block: target.ColumnMessage;
25
+ }) => {
26
+ payload: Omit<target.BubbleMessage, "block"> & {
27
+ block: target.ColumnMessage;
28
+ };
25
29
  };
26
30
  export declare const carouselAdapter: (webchatMessage: {
27
31
  type: "carousel";
@@ -38,8 +42,10 @@ export declare const carouselAdapter: (webchatMessage: {
38
42
  }[];
39
43
  className?: string | undefined;
40
44
  }) => {
41
- type: "carousel";
42
- blocks: target.ColumnMessage[];
45
+ payload: {
46
+ type: "carousel";
47
+ blocks: target.ColumnMessage[];
48
+ };
43
49
  };
44
50
  export declare const choiceAdapter: (webchatMessage: {
45
51
  options: {
@@ -48,9 +54,12 @@ export declare const choiceAdapter: (webchatMessage: {
48
54
  }[];
49
55
  type: "choice";
50
56
  text: string;
51
- disableFreeText?: boolean | undefined;
52
57
  className?: string | undefined;
53
- }) => target.Message;
58
+ disableFreeText?: boolean | undefined;
59
+ }) => {
60
+ disableInput: boolean | undefined;
61
+ payload: target.Message;
62
+ };
54
63
  export declare const dropdownAdapter: (webchatMessage: {
55
64
  options: {
56
65
  value: string;
@@ -59,8 +68,11 @@ export declare const dropdownAdapter: (webchatMessage: {
59
68
  type: "dropdown";
60
69
  text: string;
61
70
  className?: string | undefined;
62
- }) => Omit<target.BubbleMessage, "block"> & {
63
- block: target.ColumnMessage;
71
+ }) => {
72
+ disableInput: true;
73
+ payload: Omit<target.BubbleMessage, "block"> & {
74
+ block: target.ColumnMessage;
75
+ };
64
76
  };
65
77
  export declare const fileAdapter: (webchatMessage: {
66
78
  type: "file";
@@ -68,51 +80,61 @@ export declare const fileAdapter: (webchatMessage: {
68
80
  title?: string | undefined;
69
81
  className?: string | undefined;
70
82
  }) => {
71
- type: "file";
72
- className?: string | undefined;
73
- avatarUrl?: string | undefined;
74
- title?: string | undefined;
75
- url: string;
83
+ payload: {
84
+ type: "file";
85
+ title?: string | undefined;
86
+ className?: string | undefined;
87
+ avatarUrl?: string | undefined;
88
+ url: string;
89
+ };
76
90
  };
77
91
  export declare const imageAdapter: (webchatMessage: {
78
92
  type: "image";
79
93
  imageUrl: string;
80
94
  className?: string | undefined;
81
95
  }) => {
82
- type: "image";
83
- url: string;
96
+ payload: {
97
+ type: "image";
98
+ url: string;
99
+ };
84
100
  };
85
101
  export declare const locationAdapter: (webchatMessage: {
86
102
  type: "location";
87
103
  latitude: number;
88
104
  longitude: number;
89
105
  title?: string | undefined;
90
- address?: string | undefined;
91
106
  className?: string | undefined;
107
+ address?: string | undefined;
92
108
  }) => {
93
- type: "location";
94
- latitude: number;
95
- longitude: number;
96
- title: string;
109
+ payload: {
110
+ type: "location";
111
+ latitude: number;
112
+ longitude: number;
113
+ title: string;
114
+ };
97
115
  };
98
116
  export declare const markdownAdapter: (webchatMessage: {
99
117
  type: "markdown";
100
118
  markdown: string;
101
119
  className?: string | undefined;
102
- }) => Omit<target.BubbleMessage, "block"> & {
103
- block: {
104
- type: "text";
105
- text: string;
120
+ }) => {
121
+ payload: Omit<target.BubbleMessage, "block"> & {
122
+ block: {
123
+ type: "text";
124
+ text: string;
125
+ };
106
126
  };
107
127
  };
108
128
  export declare const textAdapter: (webchatMessage: {
109
129
  type: "text";
110
130
  text: string;
111
131
  className?: string | undefined;
112
- }) => Omit<target.BubbleMessage, "block"> & {
113
- block: {
114
- type: "text";
115
- text: string;
132
+ }) => {
133
+ payload: Omit<target.BubbleMessage, "block"> & {
134
+ block: {
135
+ type: "text";
136
+ text: string;
137
+ };
116
138
  };
117
139
  };
118
140
  export declare const videoAdapter: (webchatMessage: {
@@ -120,7 +142,9 @@ export declare const videoAdapter: (webchatMessage: {
120
142
  videoUrl: string;
121
143
  className?: string | undefined;
122
144
  }) => {
123
- type: "video";
124
- url: string;
145
+ payload: {
146
+ type: "video";
147
+ url: string;
148
+ };
125
149
  };
126
- export declare const messageAdapter: (message: adapters.webchat.Message) => target.Message;
150
+ export declare const messageAdapter: (message: adapters.webchat.Message) => target.AdapterOutput;
@@ -22,6 +22,7 @@ export declare class MessagingClient implements WebchatClient {
22
22
  newConversation(): Promise<void>;
23
23
  listMessages(limit?: number): Promise<{
24
24
  payload: import("../../adapters/target").Message;
25
+ disableInput: boolean | undefined;
25
26
  id: string;
26
27
  conversationId: string;
27
28
  authorId: string | undefined;
@@ -1,4 +1,4 @@
1
- import { ApiClient as AutoGeneratedClient } from '../../../gen/client/client';
1
+ import { Client as AutoGeneratedClient } from '../../../gen/client';
2
2
  import { SignalListener } from './signal-listener';
3
3
  export type { Message, Conversation, User } from '../../../gen/client';
4
4
  export * from '../../../gen/client/errors';
@@ -37,5 +37,5 @@ export declare class Client implements IClient {
37
37
  readonly deleteUser: IAutoClient['deleteUser'];
38
38
  readonly createEvent: IAutoClient['createEvent'];
39
39
  readonly getEvent: IAutoClient['getEvent'];
40
- readonly listenConversation: ({ id, xUserKey }: ListenConversationArgs) => Promise<SignalListener>;
40
+ readonly listenConversation: ({ id, "x-user-key": userKey, }: ListenConversationArgs) => Promise<SignalListener>;
41
41
  }
@@ -10,6 +10,7 @@ export type Message = {
10
10
  conversationId: string;
11
11
  authorId: string | undefined;
12
12
  sentOn: Date;
13
+ disableInput?: boolean;
13
14
  payload: BlockObject;
14
15
  };
15
16
  export type Events = {
@@ -1,5 +1,7 @@
1
- /// <reference types="react" />
2
- import { BlockMap, BlockTypes, CommonBlockProps } from '../types';
3
- export declare const Block: <T extends BlockTypes>({ block, styles, ...props }: {
4
- block: BlockMap[T];
5
- } & CommonBlockProps) => JSX.Element;
1
+ import { JSX } from 'react';
2
+ import { BlockObjects, BlockType, CommonBlockProps } from '../types';
3
+ type BlockProps<T extends BlockType> = CommonBlockProps & {
4
+ block: BlockObjects[T];
5
+ };
6
+ export declare const Block: <T extends "text" | "image" | "button" | "audio" | "video" | "file" | "location" | "column" | "row" | "bubble" | "carousel" | "dropdown">({ block, styles, ...props }: BlockProps<T>) => JSX.Element;
7
+ export {};
@@ -1,17 +1,13 @@
1
1
  import { CSSProperties, FC, ReactNode, RefObject } from 'react';
2
- import { Theme, Configuration, BlockObject, BlockStyles, MessageObject } from '../types';
2
+ import { Theme, Configuration, BlockObjects, MessageObject, CommonBlockProps, BlockType } from '../types';
3
3
  import { EventEmitter, Events } from '../utils';
4
4
  import { WebchatClient } from '../client';
5
5
  export type StyleOptions = {
6
6
  className?: string;
7
7
  style?: CSSProperties;
8
8
  };
9
- export type Renderers<P extends BlockObject = BlockObject> = {
10
- [T in P['type']]: FC<Extract<P, {
11
- type: T;
12
- }> & {
13
- styles: BlockStyles;
14
- }>;
9
+ export type Renderers = {
10
+ [T in BlockType]: FC<CommonBlockProps & BlockObjects[T]>;
15
11
  };
16
12
  export type ModalProps = {
17
13
  title: string | null;
@@ -1,13 +1,78 @@
1
- /**
2
- * Webchat API
3
- * API for the Webchat Integration
4
- *
5
- * The version of the OpenAPI document: 0.0.0
6
- *
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
11
- */
12
- export * from "./api";
13
- export * from "./configuration";
1
+ import { AxiosInstance, AxiosRequestConfig } from 'axios';
2
+ import * as addParticipant from './operations/addParticipant';
3
+ import * as createConversation from './operations/createConversation';
4
+ import * as deleteConversation from './operations/deleteConversation';
5
+ import * as getConversation from './operations/getConversation';
6
+ import * as getParticipant from './operations/getParticipant';
7
+ import * as listConversationMessages from './operations/listConversationMessages';
8
+ import * as listConversations from './operations/listConversations';
9
+ import * as listParticipants from './operations/listParticipants';
10
+ import * as listenConversation from './operations/listenConversation';
11
+ import * as removeParticipant from './operations/removeParticipant';
12
+ import * as createMessage from './operations/createMessage';
13
+ import * as deleteMessage from './operations/deleteMessage';
14
+ import * as getMessage from './operations/getMessage';
15
+ import * as createUser from './operations/createUser';
16
+ import * as deleteUser from './operations/deleteUser';
17
+ import * as getUser from './operations/getUser';
18
+ import * as updateUser from './operations/updateUser';
19
+ import * as createEvent from './operations/createEvent';
20
+ import * as getEvent from './operations/getEvent';
21
+ export * from './models';
22
+ export * as addParticipant from './operations/addParticipant';
23
+ export * as createConversation from './operations/createConversation';
24
+ export * as deleteConversation from './operations/deleteConversation';
25
+ export * as getConversation from './operations/getConversation';
26
+ export * as getParticipant from './operations/getParticipant';
27
+ export * as listConversationMessages from './operations/listConversationMessages';
28
+ export * as listConversations from './operations/listConversations';
29
+ export * as listParticipants from './operations/listParticipants';
30
+ export * as listenConversation from './operations/listenConversation';
31
+ export * as removeParticipant from './operations/removeParticipant';
32
+ export * as createMessage from './operations/createMessage';
33
+ export * as deleteMessage from './operations/deleteMessage';
34
+ export * as getMessage from './operations/getMessage';
35
+ export * as createUser from './operations/createUser';
36
+ export * as deleteUser from './operations/deleteUser';
37
+ export * as getUser from './operations/getUser';
38
+ export * as updateUser from './operations/updateUser';
39
+ export * as createEvent from './operations/createEvent';
40
+ export * as getEvent from './operations/getEvent';
41
+ export declare class Client {
42
+ private axiosInstance;
43
+ constructor(axiosInstance: AxiosInstance);
44
+ readonly addParticipant: (input: addParticipant.AddParticipantInput) => Promise<addParticipant.AddParticipantResponse>;
45
+ readonly createConversation: (input: createConversation.CreateConversationInput) => Promise<createConversation.CreateConversationResponse>;
46
+ readonly deleteConversation: (input: deleteConversation.DeleteConversationInput) => Promise<deleteConversation.DeleteConversationResponse>;
47
+ readonly getConversation: (input: getConversation.GetConversationInput) => Promise<getConversation.GetConversationResponse>;
48
+ readonly getParticipant: (input: getParticipant.GetParticipantInput) => Promise<getParticipant.GetParticipantResponse>;
49
+ readonly listConversationMessages: (input: listConversationMessages.ListConversationMessagesInput) => Promise<listConversationMessages.ListConversationMessagesResponse>;
50
+ readonly listConversations: (input: listConversations.ListConversationsInput) => Promise<listConversations.ListConversationsResponse>;
51
+ readonly listParticipants: (input: listParticipants.ListParticipantsInput) => Promise<listParticipants.ListParticipantsResponse>;
52
+ readonly listenConversation: (input: listenConversation.ListenConversationInput) => Promise<listenConversation.ListenConversationResponse>;
53
+ readonly removeParticipant: (input: removeParticipant.RemoveParticipantInput) => Promise<removeParticipant.RemoveParticipantResponse>;
54
+ readonly createMessage: (input: createMessage.CreateMessageInput) => Promise<createMessage.CreateMessageResponse>;
55
+ readonly deleteMessage: (input: deleteMessage.DeleteMessageInput) => Promise<deleteMessage.DeleteMessageResponse>;
56
+ readonly getMessage: (input: getMessage.GetMessageInput) => Promise<getMessage.GetMessageResponse>;
57
+ readonly createUser: (input: createUser.CreateUserInput) => Promise<createUser.CreateUserResponse>;
58
+ readonly deleteUser: (input: deleteUser.DeleteUserInput) => Promise<deleteUser.DeleteUserResponse>;
59
+ readonly getUser: (input: getUser.GetUserInput) => Promise<getUser.GetUserResponse>;
60
+ readonly updateUser: (input: updateUser.UpdateUserInput) => Promise<updateUser.UpdateUserResponse>;
61
+ readonly createEvent: (input: createEvent.CreateEventInput) => Promise<createEvent.CreateEventResponse>;
62
+ readonly getEvent: (input: getEvent.GetEventInput) => Promise<getEvent.GetEventResponse>;
63
+ }
64
+ type Primitive = string | number | boolean;
65
+ type Value<P extends Primitive> = P | P[] | Record<string, P>;
66
+ type QueryValue = Value<string> | Value<boolean> | Value<number> | undefined;
67
+ type AnyQueryParams = Record<string, QueryValue>;
68
+ type HeaderValue = string | undefined;
69
+ type AnyHeaderParams = Record<string, HeaderValue>;
70
+ type AnyBodyParams = Record<string, any>;
71
+ type ParsedRequest = {
72
+ method: string;
73
+ path: string;
74
+ query: AnyQueryParams;
75
+ headers: AnyHeaderParams;
76
+ body: AnyBodyParams;
77
+ };
78
+ export declare const toAxiosRequest: (req: ParsedRequest) => AxiosRequestConfig;