@unboundcx/sdk 4.0.11 → 4.0.12

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unboundcx/sdk",
3
- "version": "4.0.11",
3
+ "version": "4.0.12",
4
4
  "description": "Official JavaScript SDK for the Unbound API - A comprehensive toolkit for integrating with Unbound's communication, AI, and data management services",
5
5
  "main": "index.js",
6
6
  "type": "module",
package/services/ai.js CHANGED
@@ -224,6 +224,27 @@ export class GenerativeService {
224
224
  return result;
225
225
  }
226
226
 
227
+ /**
228
+ * Summarize chat/transcript content (running summary, chapters, title)
229
+ * @param {Object} payload
230
+ * @param {string} [payload.domain] - Summary domain (e.g. 'meeting')
231
+ * @param {string} [payload.mode] - Summary mode
232
+ * @param {Array} [payload.lines] - Transcript/chat lines to summarize
233
+ * @param {Array} [payload.chatMessages] - Chat messages to summarize
234
+ * @param {string} [payload.runningSummary] - Existing running summary to extend
235
+ * @param {boolean} [payload.includeChapters] - Include chapter breakdown
236
+ * @param {boolean} [payload.includeTitle] - Include a generated title
237
+ * @returns {Promise<Object>} Summary result
238
+ */
239
+ async summarize(payload = {}) {
240
+ const params = {
241
+ body: payload,
242
+ };
243
+
244
+ const result = await this.sdk._fetch('/ai/summarize', 'POST', params);
245
+ return result;
246
+ }
247
+
227
248
  /**
228
249
  * List available chat tools and their metadata
229
250
  * @returns {Promise<Object>} { tools: Array<{ name, label, description, configRequirements }>, count: number }
package/services/video.js CHANGED
@@ -1030,4 +1030,182 @@ export class VideoService {
1030
1030
  const result = await this.sdk._fetch('/video/settings/user', 'GET', params);
1031
1031
  return result;
1032
1032
  }
1033
+
1034
+ /**
1035
+ * Get the AI-generated summary for a video room's transcript
1036
+ * @param {string} roomId - The video room ID
1037
+ * @returns {Promise} Meeting summary
1038
+ */
1039
+ async getSummary(roomId) {
1040
+ this.sdk.validateParams(
1041
+ { roomId },
1042
+ {
1043
+ roomId: { type: 'string', required: true },
1044
+ },
1045
+ );
1046
+
1047
+ const result = await this.sdk._fetch(`/video/${roomId}/summary`, 'GET');
1048
+ return result;
1049
+ }
1050
+
1051
+ /**
1052
+ * Host-only edit of a video room's post-meeting AI summary
1053
+ * @param {string} roomId - The video room ID
1054
+ * @param {Object} update
1055
+ * @param {Object} update.summaryJson - {title, summary, actionItems, chapters}
1056
+ * @returns {Promise} Update result
1057
+ */
1058
+ async updateSummary(roomId, { summaryJson }) {
1059
+ this.sdk.validateParams(
1060
+ { roomId, summaryJson },
1061
+ {
1062
+ roomId: { type: 'string', required: true },
1063
+ summaryJson: { type: 'object', required: true },
1064
+ },
1065
+ );
1066
+
1067
+ const params = {
1068
+ body: { summaryJson },
1069
+ };
1070
+
1071
+ const result = await this.sdk._fetch(
1072
+ `/video/${roomId}/summary`,
1073
+ 'PATCH',
1074
+ params,
1075
+ );
1076
+ return result;
1077
+ }
1078
+
1079
+ /**
1080
+ * Generate a "catch me up" recap of a video room's transcript so far
1081
+ * @param {string} roomId - The video room ID
1082
+ * @returns {Promise} Catch-up summary
1083
+ */
1084
+ async catchMeUp(roomId) {
1085
+ this.sdk.validateParams(
1086
+ { roomId },
1087
+ {
1088
+ roomId: { type: 'string', required: true },
1089
+ },
1090
+ );
1091
+
1092
+ const result = await this.sdk._fetch(
1093
+ `/video/${roomId}/catch-me-up`,
1094
+ 'POST',
1095
+ {},
1096
+ );
1097
+ return result;
1098
+ }
1099
+
1100
+ /**
1101
+ * Ask the room-scoped AI assistant a question, grounded in the meeting
1102
+ * transcript so far
1103
+ * @param {string} roomId - The video room ID
1104
+ * @param {Object} params
1105
+ * @param {string} params.question - The question to ask
1106
+ * @param {Array<{role: 'user'|'assistant', content: string}>} [params.history] - Prior turns
1107
+ * @returns {Promise} Assistant answer
1108
+ */
1109
+ async assistantChat(roomId, { question, history } = {}) {
1110
+ this.sdk.validateParams(
1111
+ { roomId, question },
1112
+ {
1113
+ roomId: { type: 'string', required: true },
1114
+ question: { type: 'string', required: true },
1115
+ },
1116
+ );
1117
+
1118
+ const body = { question };
1119
+ if (history !== undefined) {
1120
+ body.history = history;
1121
+ }
1122
+
1123
+ const result = await this.sdk._fetch(`/video/${roomId}/assistant`, 'POST', {
1124
+ body,
1125
+ });
1126
+ return result;
1127
+ }
1128
+
1129
+ /**
1130
+ * Update the text of a transcript message
1131
+ * @param {string} roomId - The video room ID
1132
+ * @param {string} messageId - The transcript message ID
1133
+ * @param {Object} update
1134
+ * @param {string} update.text - New transcript text
1135
+ * @returns {Promise} Updated transcript message
1136
+ */
1137
+ async updateTranscriptMessage(roomId, messageId, { text }) {
1138
+ this.sdk.validateParams(
1139
+ { roomId, messageId, text },
1140
+ {
1141
+ roomId: { type: 'string', required: true },
1142
+ messageId: { type: 'string', required: true },
1143
+ text: { type: 'string', required: true },
1144
+ },
1145
+ );
1146
+
1147
+ const params = {
1148
+ body: { text },
1149
+ };
1150
+
1151
+ const result = await this.sdk._fetch(
1152
+ `/video/${roomId}/transcript/${messageId}`,
1153
+ 'PATCH',
1154
+ params,
1155
+ );
1156
+ return result;
1157
+ }
1158
+
1159
+ /**
1160
+ * Redact a transcript message
1161
+ * @param {string} roomId - The video room ID
1162
+ * @param {string} messageId - The transcript message ID
1163
+ * @returns {Promise} Redaction result
1164
+ */
1165
+ async redactTranscriptMessage(roomId, messageId) {
1166
+ this.sdk.validateParams(
1167
+ { roomId, messageId },
1168
+ {
1169
+ roomId: { type: 'string', required: true },
1170
+ messageId: { type: 'string', required: true },
1171
+ },
1172
+ );
1173
+
1174
+ const result = await this.sdk._fetch(
1175
+ `/video/${roomId}/transcript/${messageId}/redact`,
1176
+ 'POST',
1177
+ {},
1178
+ );
1179
+ return result;
1180
+ }
1181
+
1182
+ /**
1183
+ * Rename a speaker in the transcript for a video room
1184
+ * @param {string} roomId - The video room ID
1185
+ * @param {Object} update
1186
+ * @param {string} update.participantId - Participant ID whose transcript speaker name to update
1187
+ * @param {string} update.displayName - New display name
1188
+ * @returns {Promise} Update result
1189
+ */
1190
+ async renameTranscriptSpeaker(roomId, { participantId, displayName }) {
1191
+ this.sdk.validateParams(
1192
+ { roomId, participantId, displayName },
1193
+ {
1194
+ roomId: { type: 'string', required: true },
1195
+ participantId: { type: 'string', required: true },
1196
+ displayName: { type: 'string', required: true },
1197
+ },
1198
+ );
1199
+
1200
+ const params = {
1201
+ body: { participantId, displayName },
1202
+ };
1203
+
1204
+ const result = await this.sdk._fetch(
1205
+ `/video/${roomId}/transcript-speakers`,
1206
+ 'PATCH',
1207
+ params,
1208
+ );
1209
+ return result;
1210
+ }
1033
1211
  }