@botpress/webchat 2.1.13 → 2.1.14
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 +5 -5
- package/dist/client/PushpinClient/index.d.ts +2 -2
- package/dist/client/types.d.ts +6 -7
- package/dist/index.js +1786 -1780
- package/dist/index.umd.cjs +43 -43
- package/dist/schemas/init.d.ts +22 -0
- package/dist/stores/webchatStore.d.ts +2 -0
- package/package.json +1 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @botpress/webchat@2.1.
|
|
2
|
+
> @botpress/webchat@2.1.14 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
|
|
@@ -12,8 +12,8 @@ rendering chunks...
|
|
|
12
12
|
[32m
|
|
13
13
|
[36m[vite:dts][32m Start generate declaration files...[39m
|
|
14
14
|
computing gzip size...
|
|
15
|
-
[32m[36m[vite:dts][32m Declaration files built in
|
|
15
|
+
[32m[36m[vite:dts][32m Declaration files built in 15301ms.
|
|
16
16
|
[39m
|
|
17
|
-
[2mdist/[22m[36mindex.js [39m[1m[33m1,288.
|
|
18
|
-
[2mdist/[22m[36mindex.umd.cjs [39m[1m[33m902.
|
|
19
|
-
[32m✓ built in 23.
|
|
17
|
+
[2mdist/[22m[36mindex.js [39m[1m[33m1,288.56 kB[39m[22m[2m │ gzip: 316.61 kB[22m
|
|
18
|
+
[2mdist/[22m[36mindex.umd.cjs [39m[1m[33m902.24 kB[39m[22m[2m │ gzip: 264.62 kB[22m
|
|
19
|
+
[32m✓ built in 23.35s[39m
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EventEmitter } from '../../utils';
|
|
2
|
-
import { Events, Message, UserCredentials, UserData, WebchatClient, type User } from '../types';
|
|
2
|
+
import { Events, Message, UserCredentials, UserData, UserOptions, WebchatClient, type User } from '../types';
|
|
3
3
|
import { type FileType } from '../../types';
|
|
4
4
|
export type PushpinClientProps = {
|
|
5
5
|
apiUrl: string;
|
|
@@ -22,7 +22,7 @@ export declare class PushpinClient extends EventEmitter<Events> implements Webch
|
|
|
22
22
|
}>;
|
|
23
23
|
updateUser(user: User): Promise<User>;
|
|
24
24
|
get conversationId(): string | undefined;
|
|
25
|
-
connect(creds?: UserCredentials, data?: UserData): Promise<UserCredentials | undefined>;
|
|
25
|
+
connect(creds?: UserCredentials, data?: UserData, opts?: UserOptions): Promise<UserCredentials | undefined>;
|
|
26
26
|
private _initialConnect;
|
|
27
27
|
private _reConnect;
|
|
28
28
|
disconnect(): Promise<void>;
|
package/dist/client/types.d.ts
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { EventEmitter } from '../utils';
|
|
2
2
|
import { BlockObject, type FileType } from '../types/block-type';
|
|
3
|
+
import { UserProps } from '../types';
|
|
4
|
+
type SafeOmit<T, K extends keyof T> = Omit<T, K>;
|
|
3
5
|
export type UserCredentials = {
|
|
4
6
|
userId: string;
|
|
5
7
|
userToken: string;
|
|
6
8
|
};
|
|
7
|
-
export type
|
|
8
|
-
export type
|
|
9
|
-
|
|
10
|
-
name?: string;
|
|
11
|
-
pictureUrl?: string;
|
|
12
|
-
};
|
|
9
|
+
export type User = UserProps;
|
|
10
|
+
export type UserData = User['data'];
|
|
11
|
+
export type UserOptions = SafeOmit<User, 'data'>;
|
|
13
12
|
export type Message = {
|
|
14
13
|
id: string;
|
|
15
14
|
conversationId: string;
|
|
@@ -48,7 +47,7 @@ export type WebchatClient = {
|
|
|
48
47
|
userId: string | undefined;
|
|
49
48
|
conversationId: string | undefined;
|
|
50
49
|
on: EventEmitter<Events>['on'];
|
|
51
|
-
connect(creds?: UserCredentials, data?: UserData): Promise<UserCredentials | undefined>;
|
|
50
|
+
connect(creds?: UserCredentials, data?: UserData, opts?: UserOptions): Promise<UserCredentials | undefined>;
|
|
52
51
|
disconnect(): Promise<void>;
|
|
53
52
|
getUser(): Promise<User>;
|
|
54
53
|
updateUser(user: User): Promise<User>;
|