@botpress/webchat 1.3.9 → 1.3.11
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 +7 -7
- package/dist/client/MessagingClient/client.d.ts +3 -1
- package/dist/client/PushpinClient/index.d.ts +7 -1
- package/dist/client/types.d.ts +6 -1
- package/dist/gen/client/models.d.ts +6 -0
- package/dist/gen/client/operations/addParticipant.d.ts +6 -0
- package/dist/gen/client/operations/createUser.d.ts +6 -0
- package/dist/gen/client/operations/getParticipant.d.ts +6 -0
- package/dist/gen/client/operations/getUser.d.ts +6 -0
- package/dist/gen/client/operations/listParticipants.d.ts +6 -0
- package/dist/gen/client/operations/updateUser.d.ts +6 -0
- package/dist/{index-8e9a70c6.js → index-224357cc.js} +4532 -4500
- package/dist/{index-de8cc2d3.js → index-409d6709.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/index.umd.cjs +123 -123
- package/dist/providers/WebchatProvider.d.ts +1 -1
- package/dist/schemas/init.d.ts +11 -11
- package/package.json +1 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @botpress/webchat@1.3.
|
|
2
|
+
> @botpress/webchat@1.3.11 build /home/runner/work/echo/echo/packages/webchat-frontend
|
|
3
3
|
> vite build
|
|
4
4
|
|
|
5
5
|
[36mvite v4.4.11 [32mbuilding for production...[36m[39m
|
|
@@ -11,15 +11,15 @@ transforming...
|
|
|
11
11
|
[1m[33m[plugin:vite:resolve][39m[22m [33mModule "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.[39m
|
|
12
12
|
[1m[33m[plugin:vite:resolve][39m[22m [33mModule "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.[39m
|
|
13
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
|
-
[32m✓[39m
|
|
14
|
+
[32m✓[39m 2427 modules transformed.
|
|
15
15
|
rendering chunks...
|
|
16
16
|
[32m
|
|
17
17
|
[36m[vite:dts][32m Start generate declaration files...[39m
|
|
18
18
|
computing gzip size...
|
|
19
|
-
[32m[36m[vite:dts][32m Declaration files built in
|
|
19
|
+
[32m[36m[vite:dts][32m Declaration files built in 14769ms.
|
|
20
20
|
[39m
|
|
21
21
|
[2mdist/[22m[36mindex.js [39m[1m[2m 1.09 kB[22m[1m[22m[2m │ gzip: 0.52 kB[22m
|
|
22
|
-
[2mdist/[22m[36mindex-
|
|
23
|
-
[2mdist/[22m[36mindex-
|
|
24
|
-
[2mdist/[22m[36mindex.umd.cjs [39m[1m[
|
|
25
|
-
[32m✓ built in
|
|
22
|
+
[2mdist/[22m[36mindex-409d6709.js [39m[1m[2m 118.52 kB[22m[1m[22m[2m │ gzip: 31.78 kB[22m
|
|
23
|
+
[2mdist/[22m[36mindex-224357cc.js [39m[1m[33m1,298.16 kB[39m[22m[2m │ gzip: 318.45 kB[22m
|
|
24
|
+
[2mdist/[22m[36mindex.umd.cjs [39m[1m[33m988.34 kB[39m[22m[2m │ gzip: 291.51 kB[22m
|
|
25
|
+
[32m✓ built in 23.81s[39m
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type MessagingSocketOptions, type UserCredentials } from '@botpress/messaging-socket';
|
|
2
2
|
import { EventEmitter } from '../../utils';
|
|
3
|
-
import { Events, UserData, WebchatClient } from '../types';
|
|
3
|
+
import { Events, UserData, WebchatClient, type User } from '../types';
|
|
4
4
|
export type MessagingClientProps = MessagingSocketOptions;
|
|
5
5
|
export declare class MessagingClient implements WebchatClient {
|
|
6
6
|
private socket;
|
|
@@ -15,6 +15,8 @@ export declare class MessagingClient implements WebchatClient {
|
|
|
15
15
|
readonly mode = "messaging";
|
|
16
16
|
connect(creds?: UserCredentials, data?: UserData): Promise<UserCredentials | undefined>;
|
|
17
17
|
disconnect(): Promise<void>;
|
|
18
|
+
getUser(): Promise<User>;
|
|
19
|
+
updateUser(): Promise<User>;
|
|
18
20
|
sendMessage(message: string): Promise<void>;
|
|
19
21
|
sendEvent(event: Record<string, any>): Promise<void>;
|
|
20
22
|
switchConversation(id: string): Promise<void>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EventEmitter } from '../../utils';
|
|
2
|
-
import { Events, Message, UserCredentials, UserData, WebchatClient } from '../types';
|
|
2
|
+
import { Events, Message, UserCredentials, UserData, WebchatClient, type User } from '../types';
|
|
3
3
|
export type PushpinClientProps = {
|
|
4
4
|
apiUrl: string;
|
|
5
5
|
clientId: string;
|
|
@@ -12,6 +12,12 @@ export declare class PushpinClient extends EventEmitter<Events> implements Webch
|
|
|
12
12
|
readonly mode = "pushpin";
|
|
13
13
|
get clientId(): string;
|
|
14
14
|
get userId(): string | undefined;
|
|
15
|
+
getUser(): Promise<{
|
|
16
|
+
data: {
|
|
17
|
+
[k: string]: any;
|
|
18
|
+
} | undefined;
|
|
19
|
+
}>;
|
|
20
|
+
updateUser(user: User): Promise<User>;
|
|
15
21
|
get conversationId(): string | undefined;
|
|
16
22
|
connect(creds?: UserCredentials, data?: UserData): Promise<UserCredentials | undefined>;
|
|
17
23
|
private _initialConnect;
|
package/dist/client/types.d.ts
CHANGED
|
@@ -4,7 +4,10 @@ export type UserCredentials = {
|
|
|
4
4
|
userId: string;
|
|
5
5
|
userToken: string;
|
|
6
6
|
};
|
|
7
|
-
export type UserData = Record<string,
|
|
7
|
+
export type UserData = Record<string, unknown>;
|
|
8
|
+
export type User = {
|
|
9
|
+
data?: UserData;
|
|
10
|
+
};
|
|
8
11
|
export type Message = {
|
|
9
12
|
id: string;
|
|
10
13
|
conversationId: string;
|
|
@@ -30,6 +33,8 @@ export type WebchatClient = {
|
|
|
30
33
|
on: EventEmitter<Events>['on'];
|
|
31
34
|
connect(creds?: UserCredentials, data?: UserData): Promise<UserCredentials | undefined>;
|
|
32
35
|
disconnect(): Promise<void>;
|
|
36
|
+
getUser(): Promise<User>;
|
|
37
|
+
updateUser(user: User): Promise<User>;
|
|
33
38
|
sendMessage(message: string): Promise<void>;
|
|
34
39
|
sendEvent(event: Record<string, any>): Promise<void>;
|
|
35
40
|
switchConversation(id: string): Promise<void>;
|