@deepdesk/deepdesk-sdk 11.1.1-beta.2 → 11.1.1-beta.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.
- package/dist/index.cjs.js +7 -7
- package/dist/index.d.mts +61 -23
- package/dist/index.d.ts +61 -23
- package/dist/index.esm.js +7 -7
- package/dist/index.iife.js +15 -15
- package/input.css +1 -1
- package/package.json +1 -1
- package/styles/index.js +1 -1
- package/styles.css +1 -1
- package/widget.css +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { FC, HTMLAttributes, ForwardRefExoticComponent, RefAttributes, ReactNode, SyntheticEvent } from 'react';
|
|
1
|
+
import React, { FC, HTMLAttributes, ForwardRefExoticComponent, RefAttributes, ButtonHTMLAttributes, ReactNode, SyntheticEvent } from 'react';
|
|
2
2
|
import * as redux from 'redux';
|
|
3
3
|
import * as _reduxjs_toolkit_dist_configureStore from '@reduxjs/toolkit/dist/configureStore';
|
|
4
4
|
import * as _reduxjs_toolkit from '@reduxjs/toolkit';
|
|
@@ -103,14 +103,15 @@ declare const styles$g: {
|
|
|
103
103
|
readonly "actionButtonIsDisabled": string;
|
|
104
104
|
readonly "labels": string;
|
|
105
105
|
readonly "label": string;
|
|
106
|
-
readonly "
|
|
106
|
+
readonly "iconButtons": string;
|
|
107
|
+
readonly "iconButton": string;
|
|
107
108
|
};
|
|
108
109
|
|
|
109
110
|
interface ActionsProps extends HTMLAttributes<HTMLElement> {
|
|
110
111
|
fixed?: boolean;
|
|
111
112
|
}
|
|
112
|
-
interface
|
|
113
|
-
|
|
113
|
+
interface IconButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
114
|
+
icon?: ReactNode;
|
|
114
115
|
}
|
|
115
116
|
interface ActionButtonProps extends HTMLAttributes<HTMLElement> {
|
|
116
117
|
primary?: boolean;
|
|
@@ -135,7 +136,7 @@ interface SuggestionComposition {
|
|
|
135
136
|
DropdownButton: FC<ActionButtonProps>;
|
|
136
137
|
DropdownItem: FC<DropdownItemProps>;
|
|
137
138
|
Labels: FC<LabelProps>;
|
|
138
|
-
|
|
139
|
+
IconButton: FC<IconButtonProps>;
|
|
139
140
|
}
|
|
140
141
|
type SuggestionStyles = typeof styles$g;
|
|
141
142
|
declare const Suggestion: ForwardRefExoticComponent<Props$2 & RefAttributes<any>> & SuggestionComposition;
|
|
@@ -947,6 +948,7 @@ declare namespace Server {
|
|
|
947
948
|
*/
|
|
948
949
|
type EventV2Data = {
|
|
949
950
|
name: string;
|
|
951
|
+
platform?: string;
|
|
950
952
|
conversation_id?: string;
|
|
951
953
|
agent_id?: string;
|
|
952
954
|
agent_name?: string;
|
|
@@ -969,9 +971,9 @@ declare namespace Server {
|
|
|
969
971
|
profile_code: string;
|
|
970
972
|
}
|
|
971
973
|
interface Cue {
|
|
972
|
-
id: string;
|
|
973
974
|
text: string;
|
|
974
975
|
title: string;
|
|
976
|
+
rule: Rule;
|
|
975
977
|
}
|
|
976
978
|
/**
|
|
977
979
|
* Handling time event data
|
|
@@ -1136,7 +1138,9 @@ type SendMessageEventData$1 = CamelCaseKeys<Server.SendMessageEventData>;
|
|
|
1136
1138
|
/**
|
|
1137
1139
|
* Event v2 payload
|
|
1138
1140
|
*/
|
|
1139
|
-
type
|
|
1141
|
+
type EventV2<T = unknown> = CamelCaseKeys<Omit<Server.EventV2Data, 'name' | 'backend_version' | 'engine_version' | 'gpt_version' | 'data'>> & {
|
|
1142
|
+
data: T;
|
|
1143
|
+
};
|
|
1140
1144
|
/**
|
|
1141
1145
|
* Handling time event data
|
|
1142
1146
|
*/
|
|
@@ -1146,24 +1150,60 @@ type HandlingTimeEventData = CamelCaseKeys<Pick<Server.HandlingTimeEventData, 'c
|
|
|
1146
1150
|
*/
|
|
1147
1151
|
type AutoflowEventData = CamelCaseKeys<Server.AutoflowEventData>;
|
|
1148
1152
|
/**
|
|
1149
|
-
*
|
|
1153
|
+
* Rule event meta data
|
|
1150
1154
|
*/
|
|
1151
|
-
type
|
|
1155
|
+
type RuleEventMeta = {
|
|
1156
|
+
name: string;
|
|
1157
|
+
description: string;
|
|
1158
|
+
group: string;
|
|
1159
|
+
};
|
|
1152
1160
|
/**
|
|
1153
|
-
*
|
|
1161
|
+
* Map the send event name to the data value in the payload. (V1)
|
|
1162
|
+
* @deprecated
|
|
1154
1163
|
*/
|
|
1155
|
-
type
|
|
1164
|
+
type SendEventV1ArgumentMap = {
|
|
1156
1165
|
'Send Message': SendMessageEventData$1;
|
|
1157
1166
|
'Handling Time': HandlingTimeEventData;
|
|
1158
1167
|
'Start Autoflow': AutoflowEventData;
|
|
1159
1168
|
'Abort Autoflow': AutoflowEventData;
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
'
|
|
1166
|
-
|
|
1169
|
+
};
|
|
1170
|
+
/**
|
|
1171
|
+
* Map the send event name to the data value in the payload. (V2)
|
|
1172
|
+
*/
|
|
1173
|
+
type SendEventV2ArgumentMap = {
|
|
1174
|
+
'Add to personal collection': EventV2<{
|
|
1175
|
+
text: string;
|
|
1176
|
+
}>;
|
|
1177
|
+
'Delete from personal collection': EventV2<{
|
|
1178
|
+
text: string;
|
|
1179
|
+
}>;
|
|
1180
|
+
'entities found': EventV2<{
|
|
1181
|
+
entities: Entity[];
|
|
1182
|
+
}>;
|
|
1183
|
+
'conversation summarized': EventV2<{
|
|
1184
|
+
summary: string;
|
|
1185
|
+
}>;
|
|
1186
|
+
'style suggested': EventV2<{
|
|
1187
|
+
keywordMatches: {
|
|
1188
|
+
keyword: string;
|
|
1189
|
+
suggestion: string;
|
|
1190
|
+
}[];
|
|
1191
|
+
}>;
|
|
1192
|
+
'Image attached': EventV2<{
|
|
1193
|
+
path: string;
|
|
1194
|
+
title: string;
|
|
1195
|
+
}>;
|
|
1196
|
+
'Assistant response displayed': EventV2<RuleEventMeta>;
|
|
1197
|
+
'Assistant response closed': EventV2<RuleEventMeta>;
|
|
1198
|
+
'Assistant response feedback': EventV2<RuleEventMeta & {
|
|
1199
|
+
thumb: 'up' | 'down';
|
|
1200
|
+
}>;
|
|
1201
|
+
'Assistant response used': EventV2<RuleEventMeta & {
|
|
1202
|
+
usedText: string;
|
|
1203
|
+
}>;
|
|
1204
|
+
'Assistant response copied': EventV2<RuleEventMeta & {
|
|
1205
|
+
copiedText: string;
|
|
1206
|
+
}>;
|
|
1167
1207
|
};
|
|
1168
1208
|
/**
|
|
1169
1209
|
* Request retry options
|
|
@@ -1228,12 +1268,12 @@ declare class DeepdeskAPI {
|
|
|
1228
1268
|
/**
|
|
1229
1269
|
* Send event with meta data for analytics
|
|
1230
1270
|
*/
|
|
1231
|
-
sendEvent<T extends keyof
|
|
1271
|
+
sendEvent<T extends keyof SendEventV2ArgumentMap>(event: T, payload: SendEventV2ArgumentMap[T]): Promise<void>;
|
|
1232
1272
|
/**
|
|
1233
1273
|
* Send event with meta data for analytics
|
|
1234
1274
|
* @deprecated
|
|
1235
1275
|
*/
|
|
1236
|
-
sendEventV1<T extends keyof
|
|
1276
|
+
sendEventV1<T extends keyof SendEventV1ArgumentMap>(event: T, payload: SendEventV1ArgumentMap[T]): Promise<void>;
|
|
1237
1277
|
getEntities(messages: Array<{
|
|
1238
1278
|
text: string;
|
|
1239
1279
|
}>): Promise<Entity[]>;
|
|
@@ -1505,9 +1545,7 @@ interface State$2 {
|
|
|
1505
1545
|
isInitialRequest: null | boolean;
|
|
1506
1546
|
}
|
|
1507
1547
|
|
|
1508
|
-
type Cue = CamelCaseKeys<Server.Cue
|
|
1509
|
-
timestamp?: number;
|
|
1510
|
-
};
|
|
1548
|
+
type Cue = CamelCaseKeys<Server.Cue>;
|
|
1511
1549
|
type State$1 = {
|
|
1512
1550
|
cues: Cue[];
|
|
1513
1551
|
fetchState: FetchState;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { FC, HTMLAttributes, ForwardRefExoticComponent, RefAttributes, ReactNode, SyntheticEvent } from 'react';
|
|
1
|
+
import React, { FC, HTMLAttributes, ForwardRefExoticComponent, RefAttributes, ButtonHTMLAttributes, ReactNode, SyntheticEvent } from 'react';
|
|
2
2
|
import * as redux from 'redux';
|
|
3
3
|
import * as _reduxjs_toolkit_dist_configureStore from '@reduxjs/toolkit/dist/configureStore';
|
|
4
4
|
import * as _reduxjs_toolkit from '@reduxjs/toolkit';
|
|
@@ -103,14 +103,15 @@ declare const styles$g: {
|
|
|
103
103
|
readonly "actionButtonIsDisabled": string;
|
|
104
104
|
readonly "labels": string;
|
|
105
105
|
readonly "label": string;
|
|
106
|
-
readonly "
|
|
106
|
+
readonly "iconButtons": string;
|
|
107
|
+
readonly "iconButton": string;
|
|
107
108
|
};
|
|
108
109
|
|
|
109
110
|
interface ActionsProps extends HTMLAttributes<HTMLElement> {
|
|
110
111
|
fixed?: boolean;
|
|
111
112
|
}
|
|
112
|
-
interface
|
|
113
|
-
|
|
113
|
+
interface IconButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
114
|
+
icon?: ReactNode;
|
|
114
115
|
}
|
|
115
116
|
interface ActionButtonProps extends HTMLAttributes<HTMLElement> {
|
|
116
117
|
primary?: boolean;
|
|
@@ -135,7 +136,7 @@ interface SuggestionComposition {
|
|
|
135
136
|
DropdownButton: FC<ActionButtonProps>;
|
|
136
137
|
DropdownItem: FC<DropdownItemProps>;
|
|
137
138
|
Labels: FC<LabelProps>;
|
|
138
|
-
|
|
139
|
+
IconButton: FC<IconButtonProps>;
|
|
139
140
|
}
|
|
140
141
|
type SuggestionStyles = typeof styles$g;
|
|
141
142
|
declare const Suggestion: ForwardRefExoticComponent<Props$2 & RefAttributes<any>> & SuggestionComposition;
|
|
@@ -947,6 +948,7 @@ declare namespace Server {
|
|
|
947
948
|
*/
|
|
948
949
|
type EventV2Data = {
|
|
949
950
|
name: string;
|
|
951
|
+
platform?: string;
|
|
950
952
|
conversation_id?: string;
|
|
951
953
|
agent_id?: string;
|
|
952
954
|
agent_name?: string;
|
|
@@ -969,9 +971,9 @@ declare namespace Server {
|
|
|
969
971
|
profile_code: string;
|
|
970
972
|
}
|
|
971
973
|
interface Cue {
|
|
972
|
-
id: string;
|
|
973
974
|
text: string;
|
|
974
975
|
title: string;
|
|
976
|
+
rule: Rule;
|
|
975
977
|
}
|
|
976
978
|
/**
|
|
977
979
|
* Handling time event data
|
|
@@ -1136,7 +1138,9 @@ type SendMessageEventData$1 = CamelCaseKeys<Server.SendMessageEventData>;
|
|
|
1136
1138
|
/**
|
|
1137
1139
|
* Event v2 payload
|
|
1138
1140
|
*/
|
|
1139
|
-
type
|
|
1141
|
+
type EventV2<T = unknown> = CamelCaseKeys<Omit<Server.EventV2Data, 'name' | 'backend_version' | 'engine_version' | 'gpt_version' | 'data'>> & {
|
|
1142
|
+
data: T;
|
|
1143
|
+
};
|
|
1140
1144
|
/**
|
|
1141
1145
|
* Handling time event data
|
|
1142
1146
|
*/
|
|
@@ -1146,24 +1150,60 @@ type HandlingTimeEventData = CamelCaseKeys<Pick<Server.HandlingTimeEventData, 'c
|
|
|
1146
1150
|
*/
|
|
1147
1151
|
type AutoflowEventData = CamelCaseKeys<Server.AutoflowEventData>;
|
|
1148
1152
|
/**
|
|
1149
|
-
*
|
|
1153
|
+
* Rule event meta data
|
|
1150
1154
|
*/
|
|
1151
|
-
type
|
|
1155
|
+
type RuleEventMeta = {
|
|
1156
|
+
name: string;
|
|
1157
|
+
description: string;
|
|
1158
|
+
group: string;
|
|
1159
|
+
};
|
|
1152
1160
|
/**
|
|
1153
|
-
*
|
|
1161
|
+
* Map the send event name to the data value in the payload. (V1)
|
|
1162
|
+
* @deprecated
|
|
1154
1163
|
*/
|
|
1155
|
-
type
|
|
1164
|
+
type SendEventV1ArgumentMap = {
|
|
1156
1165
|
'Send Message': SendMessageEventData$1;
|
|
1157
1166
|
'Handling Time': HandlingTimeEventData;
|
|
1158
1167
|
'Start Autoflow': AutoflowEventData;
|
|
1159
1168
|
'Abort Autoflow': AutoflowEventData;
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
'
|
|
1166
|
-
|
|
1169
|
+
};
|
|
1170
|
+
/**
|
|
1171
|
+
* Map the send event name to the data value in the payload. (V2)
|
|
1172
|
+
*/
|
|
1173
|
+
type SendEventV2ArgumentMap = {
|
|
1174
|
+
'Add to personal collection': EventV2<{
|
|
1175
|
+
text: string;
|
|
1176
|
+
}>;
|
|
1177
|
+
'Delete from personal collection': EventV2<{
|
|
1178
|
+
text: string;
|
|
1179
|
+
}>;
|
|
1180
|
+
'entities found': EventV2<{
|
|
1181
|
+
entities: Entity[];
|
|
1182
|
+
}>;
|
|
1183
|
+
'conversation summarized': EventV2<{
|
|
1184
|
+
summary: string;
|
|
1185
|
+
}>;
|
|
1186
|
+
'style suggested': EventV2<{
|
|
1187
|
+
keywordMatches: {
|
|
1188
|
+
keyword: string;
|
|
1189
|
+
suggestion: string;
|
|
1190
|
+
}[];
|
|
1191
|
+
}>;
|
|
1192
|
+
'Image attached': EventV2<{
|
|
1193
|
+
path: string;
|
|
1194
|
+
title: string;
|
|
1195
|
+
}>;
|
|
1196
|
+
'Assistant response displayed': EventV2<RuleEventMeta>;
|
|
1197
|
+
'Assistant response closed': EventV2<RuleEventMeta>;
|
|
1198
|
+
'Assistant response feedback': EventV2<RuleEventMeta & {
|
|
1199
|
+
thumb: 'up' | 'down';
|
|
1200
|
+
}>;
|
|
1201
|
+
'Assistant response used': EventV2<RuleEventMeta & {
|
|
1202
|
+
usedText: string;
|
|
1203
|
+
}>;
|
|
1204
|
+
'Assistant response copied': EventV2<RuleEventMeta & {
|
|
1205
|
+
copiedText: string;
|
|
1206
|
+
}>;
|
|
1167
1207
|
};
|
|
1168
1208
|
/**
|
|
1169
1209
|
* Request retry options
|
|
@@ -1228,12 +1268,12 @@ declare class DeepdeskAPI {
|
|
|
1228
1268
|
/**
|
|
1229
1269
|
* Send event with meta data for analytics
|
|
1230
1270
|
*/
|
|
1231
|
-
sendEvent<T extends keyof
|
|
1271
|
+
sendEvent<T extends keyof SendEventV2ArgumentMap>(event: T, payload: SendEventV2ArgumentMap[T]): Promise<void>;
|
|
1232
1272
|
/**
|
|
1233
1273
|
* Send event with meta data for analytics
|
|
1234
1274
|
* @deprecated
|
|
1235
1275
|
*/
|
|
1236
|
-
sendEventV1<T extends keyof
|
|
1276
|
+
sendEventV1<T extends keyof SendEventV1ArgumentMap>(event: T, payload: SendEventV1ArgumentMap[T]): Promise<void>;
|
|
1237
1277
|
getEntities(messages: Array<{
|
|
1238
1278
|
text: string;
|
|
1239
1279
|
}>): Promise<Entity[]>;
|
|
@@ -1505,9 +1545,7 @@ interface State$2 {
|
|
|
1505
1545
|
isInitialRequest: null | boolean;
|
|
1506
1546
|
}
|
|
1507
1547
|
|
|
1508
|
-
type Cue = CamelCaseKeys<Server.Cue
|
|
1509
|
-
timestamp?: number;
|
|
1510
|
-
};
|
|
1548
|
+
type Cue = CamelCaseKeys<Server.Cue>;
|
|
1511
1549
|
type State$1 = {
|
|
1512
1550
|
cues: Cue[];
|
|
1513
1551
|
fetchState: FetchState;
|