@vendasta/conversation 0.100.0 → 0.102.0
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/esm2022/lib/_internal/enums/index.mjs +2 -2
- package/esm2022/lib/_internal/enums/message.enum.mjs +6 -1
- package/esm2022/lib/_internal/interfaces/api.interface.mjs +1 -1
- package/esm2022/lib/_internal/interfaces/index.mjs +1 -1
- package/esm2022/lib/_internal/interfaces/message.interface.mjs +1 -1
- package/esm2022/lib/_internal/interfaces/ui-components.interface.mjs +8 -0
- package/esm2022/lib/_internal/objects/api.mjs +5 -1
- package/esm2022/lib/_internal/objects/index.mjs +3 -2
- package/esm2022/lib/_internal/objects/message.mjs +40 -1
- package/esm2022/lib/_internal/objects/ui-components.mjs +40 -0
- package/fesm2022/vendasta-conversation.mjs +95 -8
- package/fesm2022/vendasta-conversation.mjs.map +1 -1
- package/lib/_internal/enums/index.d.ts +1 -1
- package/lib/_internal/enums/message.enum.d.ts +4 -0
- package/lib/_internal/interfaces/api.interface.d.ts +1 -0
- package/lib/_internal/interfaces/index.d.ts +2 -1
- package/lib/_internal/interfaces/message.interface.d.ts +6 -0
- package/lib/_internal/interfaces/ui-components.interface.d.ts +6 -0
- package/lib/_internal/objects/api.d.ts +1 -0
- package/lib/_internal/objects/index.d.ts +2 -1
- package/lib/_internal/objects/message.d.ts +9 -0
- package/lib/_internal/objects/ui-components.d.ts +11 -0
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { GlobalParticipantType, SortDirection, } from './common.enum';
|
|
2
2
|
export { ConversationChannel, PlatformLocation, } from './conversation.enum';
|
|
3
|
-
export { MessageStatus, MessageType, } from './message.enum';
|
|
3
|
+
export { MessageStatus, MessageType, UIComponentType, } from './message.enum';
|
|
4
4
|
export { ParticipantType, } from './participant.enum';
|
|
5
5
|
export { ViewType, } from './conversation-view.enum';
|
|
6
6
|
export { WidgetPosition, } from './widget.enum';
|
|
@@ -57,6 +57,7 @@ export interface CreateConversationRequestInterface {
|
|
|
57
57
|
updated?: Date;
|
|
58
58
|
originLocation?: e.PlatformLocation;
|
|
59
59
|
originLocationExternalId?: string;
|
|
60
|
+
instanceId?: string;
|
|
60
61
|
}
|
|
61
62
|
export interface CreateConversationResponseInterface {
|
|
62
63
|
conversation?: ConversationInterface;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { KeyValuePairInterface, NamespaceDetailInterface, SubjectParticipantInterface, } from './common.interface';
|
|
2
2
|
export { AIConfigurationInterface, ConversationInterface, ConversationKeyInterface, LastSeenByParticipantInterface, LatestMessageSentTimeBySubjectParticipantInterface, SubjectParticipantKeyInterface, } from './conversation.interface';
|
|
3
|
-
export {
|
|
3
|
+
export { UIButtonInterface, } from './ui-components.interface';
|
|
4
|
+
export { MessageInterface, ParticipantMessageStatusInterface, SendStatusInterface, UIComponentInterface, } from './message.interface';
|
|
4
5
|
export { AddressInterface, ParticipantInterface, ParticipantKeyInterface, } from './participant.interface';
|
|
5
6
|
export { AccessInterface, } from './annotations.interface';
|
|
6
7
|
export { ConfigurationAIConfigurationInterface, ConfigurationInterface, ProductFeatureInterface, } from './configuration.interface';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { KeyValuePairInterface } from './common.interface';
|
|
2
|
+
import { UIButtonInterface } from './ui-components.interface';
|
|
2
3
|
import * as e from '../enums';
|
|
3
4
|
export interface MessageInterface {
|
|
4
5
|
messageId?: string;
|
|
@@ -16,6 +17,7 @@ export interface MessageInterface {
|
|
|
16
17
|
channel?: e.ConversationChannel;
|
|
17
18
|
metadata?: KeyValuePairInterface[];
|
|
18
19
|
originalContent?: string;
|
|
20
|
+
uiComponents?: UIComponentInterface[];
|
|
19
21
|
}
|
|
20
22
|
export interface ParticipantMessageStatusInterface {
|
|
21
23
|
participantId?: string;
|
|
@@ -28,3 +30,7 @@ export interface SendStatusInterface {
|
|
|
28
30
|
reason?: string;
|
|
29
31
|
created?: Date;
|
|
30
32
|
}
|
|
33
|
+
export interface UIComponentInterface {
|
|
34
|
+
type?: e.UIComponentType;
|
|
35
|
+
button?: UIButtonInterface;
|
|
36
|
+
}
|
|
@@ -86,6 +86,7 @@ export declare class CreateConversationRequest implements i.CreateConversationRe
|
|
|
86
86
|
updated: Date;
|
|
87
87
|
originLocation: e.PlatformLocation;
|
|
88
88
|
originLocationExternalId: string;
|
|
89
|
+
instanceId: string;
|
|
89
90
|
static fromProto(proto: any): CreateConversationRequest;
|
|
90
91
|
constructor(kwargs?: i.CreateConversationRequestInterface);
|
|
91
92
|
toApiJson(): object;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { KeyValuePair, NamespaceDetail, SubjectParticipant, } from './common';
|
|
2
2
|
export { AIConfiguration, Conversation, ConversationKey, LastSeenByParticipant, LatestMessageSentTimeBySubjectParticipant, SubjectParticipantKey, } from './conversation';
|
|
3
|
-
export {
|
|
3
|
+
export { UIButton, } from './ui-components';
|
|
4
|
+
export { Message, ParticipantMessageStatus, SendStatus, UIComponent, } from './message';
|
|
4
5
|
export { Address, Participant, ParticipantKey, } from './participant';
|
|
5
6
|
export { Access, } from './annotations';
|
|
6
7
|
export { ConfigurationAIConfiguration, Configuration, ProductFeature, } from './configuration';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as i from '../interfaces';
|
|
2
2
|
import { KeyValuePair } from './common';
|
|
3
|
+
import { UIButton } from './ui-components';
|
|
3
4
|
import * as e from '../enums';
|
|
4
5
|
export declare function enumStringToValue<E>(enumRef: any, value: string): E;
|
|
5
6
|
export declare class Message implements i.MessageInterface {
|
|
@@ -18,6 +19,7 @@ export declare class Message implements i.MessageInterface {
|
|
|
18
19
|
channel: e.ConversationChannel;
|
|
19
20
|
metadata: KeyValuePair[];
|
|
20
21
|
originalContent: string;
|
|
22
|
+
uiComponents: UIComponent[];
|
|
21
23
|
static fromProto(proto: any): Message;
|
|
22
24
|
constructor(kwargs?: i.MessageInterface);
|
|
23
25
|
toApiJson(): object;
|
|
@@ -39,3 +41,10 @@ export declare class SendStatus implements i.SendStatusInterface {
|
|
|
39
41
|
constructor(kwargs?: i.SendStatusInterface);
|
|
40
42
|
toApiJson(): object;
|
|
41
43
|
}
|
|
44
|
+
export declare class UIComponent implements i.UIComponentInterface {
|
|
45
|
+
type: e.UIComponentType;
|
|
46
|
+
button: UIButton;
|
|
47
|
+
static fromProto(proto: any): UIComponent;
|
|
48
|
+
constructor(kwargs?: i.UIComponentInterface);
|
|
49
|
+
toApiJson(): object;
|
|
50
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as i from '../interfaces';
|
|
2
|
+
export declare function enumStringToValue<E>(enumRef: any, value: string): E;
|
|
3
|
+
export declare class UIButton implements i.UIButtonInterface {
|
|
4
|
+
label: string;
|
|
5
|
+
id: string;
|
|
6
|
+
action: string;
|
|
7
|
+
payload: string;
|
|
8
|
+
static fromProto(proto: any): UIButton;
|
|
9
|
+
constructor(kwargs?: i.UIButtonInterface);
|
|
10
|
+
toApiJson(): object;
|
|
11
|
+
}
|